Browse Source

Evidence time is sourced from block time (#138)

pull/7804/head
Callum Waters 4 years ago
committed by GitHub
parent
commit
713a773c81
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions
  1. +2
    -3
      spec/abci/abci.md
  2. +6
    -1
      spec/core/data_structures.md

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

@ -574,9 +574,8 @@ via light client.
- `Type (string)`: Type of the evidence. A hierarchical path like - `Type (string)`: Type of the evidence. A hierarchical path like
"duplicate/vote". "duplicate/vote".
- `Validator (Validator`: The offending validator - `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 - `TotalVotingPower (int64)`: Total voting power of the validator set at
height `Height` height `Height`


+ 6
- 1
spec/core/data_structures.md View File

@ -221,7 +221,8 @@ type Evidence interface {
All evidence can be encoded and decoded to and from Protobuf with the `EvidenceToProto()` 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) 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 `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`. 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 { type DuplicateVoteEvidence struct {
VoteA *Vote VoteA *Vote
VoteB *Vote VoteB *Vote
Timestamp time.Time
} }
``` ```
@ -253,6 +256,8 @@ type LunaticValidatorEvidence struct {
Header *Header Header *Header
Vote *Vote Vote *Vote
InvalidHeaderField string InvalidHeaderField string
Timestamp time.Time
} }
``` ```


Loading…
Cancel
Save