-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Milestone
Description
Initial outline of how to incorporate this. Related to #338
New Types
- new
type Evidence interface - new
DuplicateVoteEvidencestruct contains two conflicting votes (note votes already contain val address and index) and the validator's public key (needed for verifying signature on old votes) - possibly other types: invalid proposals, invalid votes, blocks with invalid txs, unjustified votes. Anything else ?
- Unjustified votes may be left for post-crisis recovery for now, until we move justification into the real-time consensus
Block Changes:
- new
Evidencefield inBlockis a[]types.Evidenceand is usually empty - new
EvidenceHash data.Bytesin block header.
Consensus Changes:
- new
Evidencefield in RoundState is a[]types.Evidence - on ErrVoteConflictingVotes in tryAddVote, append to the evidence list
- in createProposalBlock, add all current rs.Evidence to the block via
newBlock.AddEvidence(rs.Evidence) - in finalizeCommit, remove from rs.Evidence anything that was included in the block
ABCI Changes:
- BeginBlock takes a
beginBlockArgscontaining a bitarray of validators who voted in the commit, and a list of validator addresses that have misbehaved (should this include types of misbehaviours?) - Info response includes a
HeightDiffForEvidencewhich is the number of heights back a validator should accept evidence for (to prevent spam).
Validation Changes:
- Need access to pubkey to validate the signature (include in evidence)
Storage Changes:
- Need to persist evidence to disk before its in a block so we dont lose it (perhaps an extra WAL entry in each finalizeCommit containing the remaining evidence in our ConsensusState ?)
- Need to index evidence so a given piece of evidence is only submitted once
Reactor Changes:
- evidence needs to be gossiped to peers quickly
- make a new reactor that copies the structure of the mempool reactor but just for gossiping evidence
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels