Browse Source

evidence: Add time to evidence params (#69)

* evidence: Add time to evidence params

- this pr is grouped together with https://github.com/tendermint/tendermint/pull/4254, once that PR is merged then this one can be as well.

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* remove note

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* Apply suggestions from code review

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
pull/7804/head
Marko 5 years ago
committed by GitHub
parent
commit
b0f35a64d9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions
  1. +4
    -3
      spec/abci/abci.md
  2. +4
    -2
      spec/blockchain/state.md

+ 4
- 3
spec/abci/abci.md View File

@ -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


+ 4
- 2
spec/blockchain/state.md View File

@ -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


Loading…
Cancel
Save