Evidence time is sourced from block time (#138)

This commit is contained in:
Callum Waters
2020-08-10 21:20:24 +02:00
committed by GitHub
parent e96921822d
commit 713a773c81
2 changed files with 8 additions and 4 deletions

View File

@@ -574,9 +574,8 @@ via light client.
- `Type (string)`: Type of the evidence. A hierarchical path like
"duplicate/vote".
- `Validator (Validator`: The offending validator
- `Height (int64)`: Height when the offense was committed
- `Time (google.protobuf.Timestamp)`: Time of the block at height `Height`.
It is the proposer's local time when block was created.
- `Height (int64)`: Height when the offense occured
- `Time (google.protobuf.Timestamp)`: Time of the block that was committed at the height that the offense occured
- `TotalVotingPower (int64)`: Total voting power of the validator set at
height `Height`

View File

@@ -221,7 +221,8 @@ type Evidence interface {
All evidence can be encoded and decoded to and from Protobuf with the `EvidenceToProto()`
and `EvidenceFromProto()` functions. The [Fork Accountability](../consensus/light-client/accountability.md)
document provides a good overview for the types of evidence and how they occur.
document provides a good overview for the types of evidence and how they occur. Each evidence uses
the timestamp of the block that the evidence occured at to indicate the age of the evidence.
`DuplicateVoteEvidence` represents a validator that has voted for two different blocks
in the same round of the same height. Votes are lexicographically sorted on `BlockID`.
@@ -230,6 +231,8 @@ in the same round of the same height. Votes are lexicographically sorted on `Blo
type DuplicateVoteEvidence struct {
VoteA *Vote
VoteB *Vote
Timestamp time.Time
}
```
@@ -253,6 +256,8 @@ type LunaticValidatorEvidence struct {
Header *Header
Vote *Vote
InvalidHeaderField string
Timestamp time.Time
}
```