- 13.03.21: Ammendment to accomodate forward lunatic attack
- 13/03/2021: Ammendment to accomodate forward lunatic attack
- 29/06/2021: Add information about ABCI specific fields
## Scope
## Scope
@ -111,6 +112,11 @@ We have two concrete types of evidence that fulfil this interface
type LightClientAttackEvidence struct {
type LightClientAttackEvidence struct {
ConflictingBlock *LightBlock
ConflictingBlock *LightBlock
CommonHeight int64 // the last height at which the primary provider and witness provider had the same header
CommonHeight int64 // the last height at which the primary provider and witness provider had the same header
// abci specific information
ByzantineValidators []*Validator // validators in the validator set that misbehaved in creating the conflicting block
TotalVotingPower int64 // total voting power of the validator set at the common height
Timestamp time.Time // timestamp of the block at the common height
}
}
```
```
where the `Hash()` is the hash of the header and commonHeight.
where the `Hash()` is the hash of the header and commonHeight.
@ -121,6 +127,11 @@ Note: It was also discussed whether to include the commit hash which captures th
type DuplicateVoteEvidence {
type DuplicateVoteEvidence {
VoteA *Vote
VoteA *Vote
VoteB *Vote
VoteB *Vote
// abci specific information
TotalVotingPower int64
ValidatorPower int64
Timestamp time.Time
}
}
```
```
where the `Hash()` is the hash of the two votes
where the `Hash()` is the hash of the two votes
@ -174,19 +185,11 @@ For `LightClientAttack`
- Lastly, for each validator, check the look up table to make sure there already isn't evidence against this validator
- Lastly, for each validator, check the look up table to make sure there already isn't evidence against this validator
After verification we persist the evidence with the key `height/hash` to the pending evidence database in the evidence pool with the following format:
```go
type EvidenceInfo struct {
ev Evidence
time time.Time
validators []Validator
totalVotingPower int64
}
```
After verification we persist the evidence with the key `height/hash` to the pending evidence database in the evidence pool.
`time`, `validators` and `totalVotingPower` are need to form the `abci.Evidence` that we send to the application layer. More in this to come later.
#### ABCI Evidence
Both evidence structures contain data (such as timestamp) that are necessary to be passed to the application but do not strictly constitute evidence of misbehaviour. As such, these fields are verified last. If any of these fields are invalid to a node i.e. they don't correspond with their state, nodes will reconstruct a new evidence struct from the existing fields and repopulate the abci specific fields with their own state data.