diff --git a/spec/abci/abci.md b/spec/abci/abci.md index 492629dbb..74cf4d0c4 100644 --- a/spec/abci/abci.md +++ b/spec/abci/abci.md @@ -501,11 +501,12 @@ Commit are included in the header of the next block. ### EvidenceParams - **Fields**: - - `MaxAge (int64)`: Max age of evidence, in blocks. Evidence older than this - is considered stale and ignored. + - `MaxAgeNumBlocks (int64)`: Max age of evidence, in blocks. + - `MaxAgeDuration (time.Duration)`: Max age of evidence, in time. + Evidence older than this is considered stale and ignored. + - This should correspond with an app's "unbonding period" or other similar mechanism for handling Nothing-At-Stake attacks. - - NOTE: this should change to time (instead of blocks)! ### ValidatorParams diff --git a/spec/blockchain/state.md b/spec/blockchain/state.md index 0430819fa..535eee8b2 100644 --- a/spec/blockchain/state.md +++ b/spec/blockchain/state.md @@ -110,7 +110,8 @@ type BlockParams struct { } type EvidenceParams struct { - MaxAge int64 + MaxAgeNumBlocks int64 + MaxAgeDuration time.Duration } type ValidatorParams struct { @@ -135,7 +136,8 @@ The minimal time between consecutive blocks is controlled by the For evidence in a block to be valid, it must satisfy: ``` -block.Header.Height - evidence.Height < ConsensusParams.Evidence.MaxAge +block.Header.Height - evidence.Height < ConsensusParams.Evidence.MaxAgeNumBlocks +block.Header.Time - evidence.Time < ConsensusParams.Evidence.MaxAgeDuration ``` #### Validator