Cosmos-sdk: Max evidence age not effective

Created on 8 Jan 2019  路  4Comments  路  Source: cosmos/cosmos-sdk

Currently the max evidence age in the cosmos sdk is not effective since the Time field in the ABCI evidence is propagated with the block time in which the evidence was reported.

Relevant code in Tendermint getBeginBlockValidatorInfo

    for i, ev := range block.Evidence.Evidence {
        // We need the validator set. We already did this in validateBlock.
        // TODO: Should we instead cache the valset in the evidence itself and add
        // `SetValidatorSet()` and `ToABCI` methods ?
        valset, err := LoadValidators(stateDB, ev.Height())
        if err != nil {
            panic(err) // shouldn't happen
        }
        byzVals[i] = types.TM2PB.Evidence(ev, valset, block.Time)
    }

    return commitInfo, byzVals

That allows validators to be rejailed/slashed if the evidence is older than the maxAge but within the Tendermint max evidence age.


For Admin Use

  • [x] Not duplicate issue
  • [x] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned
bug slashing

All 4 comments

With this, I am in the fourth prison.

@nodebreaker-carl Don't worry, with the tombstone fix (#3103 / #3225), you'll just never get to get out of jail in the first place! 馃槄

@sunnya97 Oh, yes, there's a period. Captain

Was this page helpful?
0 / 5 - 0 ratings