cosmos-sdk: Failed to slash a validator for double sign at the first block
Summary of Bug
When someone double signed at the first block, the slashing module will not handle it correctly.
Steps to Reproduce
When generating the first block, someone may double sign and trigger the slashing module. log:
Confirmed double sign from FDC8E91E2F361F4BFCCEFA80C1ABAD138E5175AE at height 1, age of 0 less than max age of 120 module=x/slashing
E[09-21|13:27:34.653] CONSENSUS FAILURE!!! module=consensus err="impossible attempt to slash future infraction at height 1 but we are at height 0" stack="goroutine 1193 [running]:\nruntime/debug.Stack(0xc424c4cea0, 0xd5e1c0, 0xc426777690)\n\t/usr/lib/go-
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (19 by maintainers)
@cwgoes we did some analysis and figured out double-sign evidence was included in the first block, then got broadcasted. However, there’s mismatch to treat double-sign evidence. in tendermint the
infractionHeightis 1 but when slashing module process the evidence,ctx.BlockHeight()is still 0. We tried to solve the issue with this PR: https://github.com/irisnet/cosmos-sdk/pull/109 Hope to get more input from you.