spec: add ProofTrialPeriod to EvidenceParam (#99)

This commit is contained in:
Callum Waters
2020-06-11 10:10:06 +02:00
committed by GitHub
parent 0d5f212f30
commit 9c0754e617
3 changed files with 17 additions and 6 deletions

View File

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

View File

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

View File

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