From 9c0754e61764241d537fdd6887b23288f2154ca7 Mon Sep 17 00:00:00 2001 From: Callum Waters Date: Thu, 11 Jun 2020 10:10:06 +0200 Subject: [PATCH] spec: add ProofTrialPeriod to EvidenceParam (#99) --- spec/abci/abci.md | 2 ++ spec/abci/apps.md | 14 +++++++++++--- spec/blockchain/state.md | 7 ++++--- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/spec/abci/abci.md b/spec/abci/abci.md index 8e5a5f588..4a0680871 100644 --- a/spec/abci/abci.md +++ b/spec/abci/abci.md @@ -618,6 +618,8 @@ via light client. unbonding period. `MaxAgeNumBlocks` is calculated by dividing the unboding period by the average block time (e.g. 2 weeks / 6s per block = 2d8h). - `MaxNum (uint32)`: The maximum number of evidence that can be committed to a single block + - `ProofTrialPeriod (int64)`: The duration in terms of blocks that an indicted node has to + provide proof of correctly executing a lock change in the event of amnesia evidence. ### ValidatorParams diff --git a/spec/abci/apps.md b/spec/abci/apps.md index 74d0985b2..3adead3a4 100644 --- a/spec/abci/apps.md +++ b/spec/abci/apps.md @@ -291,12 +291,20 @@ Must have `MaxAgeNumBlocks > 0`. ### EvidenceParams.MaxNum -This is the maximum number of evidence that can be committed to a single block +This is the maximum number of evidence that can be committed to a single block. The product of this and the `MaxEvidenceBytes` must not exceed the size of -a block minus it's overhead ( ~ `MaxBytes`) +a block minus it's overhead ( ~ `MaxBytes`). -The amount must be a positive number +The amount must be a positive number. + +### EvidenceParams.ProofTrialPeriod + +This is the duration in terms of blocks that an indicted validator has to prove a +correct lock change in the event of amnesia evidence when a validator voted more +than once across different rounds. + +This must be positive and less then `EvidenceParams.MaxAgeNumBlocks`. ### Updates diff --git a/spec/blockchain/state.md b/spec/blockchain/state.md index 33eec48da..b503d5718 100644 --- a/spec/blockchain/state.md +++ b/spec/blockchain/state.md @@ -111,9 +111,10 @@ type BlockParams struct { } type EvidenceParams struct { - MaxAgeNumBlocks int64 - MaxAgeDuration time.Duration - MaxNum uint32 + MaxAgeNumBlocks int64 + MaxAgeDuration time.Duration + MaxNum uint32 + ProofTrialPeriod int64 } type ValidatorParams struct {