Expand description
Types used in crate::threshold_simplex.
Structs§
- Batch
Verifier BatchVerifieris a utility for tracking and batch verifying consensus messages.- Conflicting
Finalize - ConflictingFinalize represents evidence of a Byzantine validator sending conflicting finalizes. Similar to ConflictingNotarize, but for finalizes.
- Conflicting
Notarize - ConflictingNotarize represents evidence of a Byzantine validator sending conflicting notarizes. This is used to prove that a validator has equivocated (voted for different proposals in the same view).
- Context
- Context is a collection of metadata from consensus about a given payload. It provides information about the current view and the parent payload that new proposals are built on.
- Finalization
- Finalization represents a recovered threshold signature to finalize a proposal. When a proposal is finalized, it becomes the canonical block for its view. The threshold signatures provide compact verification compared to collecting individual signatures.
- Finalize
- Finalize represents a validator’s vote to finalize a proposal. This happens after a proposal has been notarized, confirming it as the canonical block for this view. It contains a partial signature on the proposal.
- Notarization
- Notarization represents a recovered threshold signature certifying a proposal. When a proposal is notarized, it means at least 2f+1 validators have voted for it. The threshold signatures provide compact verification compared to collecting individual signatures.
- Notarize
- Notarize represents a validator’s vote to notarize a proposal. In threshold_simplex, it contains a partial signature on the proposal and a partial signature for the seed. The seed is used for leader election and as a source of randomness.
- Nullification
- Nullification represents a recovered threshold signature to skip a view. When a view is nullified, the consensus moves to the next view without finalizing a block. The threshold signatures provide compact verification compared to collecting individual signatures.
- Nullify
- Nullify represents a validator’s vote to skip the current view. This is typically used when the leader is unresponsive or fails to propose a valid block. It contains partial signatures for the view and seed.
- Nullify
Finalize - NullifyFinalize represents evidence of a Byzantine validator sending both a nullify and finalize for the same view, which is contradictory behavior (a validator should either try to skip a view OR finalize a proposal, not both).
- Proposal
- Proposal represents a proposed block in the protocol. It includes the view number, the parent view, and the actual payload (typically a digest of block data).
- Request
- Request is a message to request missing notarizations and nullifications. This is used by validators who need to catch up with the consensus state.
- Response
- Response is a message containing the requested notarizations and nullifications. This is sent in response to a Request message.
- Seed
- Seed represents a threshold signature over the current view.
Enums§
- Activity
- Activity represents all possible activities that can occur in the consensus protocol. This includes both regular consensus messages and fault evidence.
- Backfiller
- Backfiller is a message type for requesting and receiving missing consensus artifacts. This is used to synchronize validators that have fallen behind or just joined the network.
- Voter
- Voter represents all possible message types that can be sent by validators in the consensus protocol.
Constants§
Traits§
- Attributable
- Attributable is a trait that provides access to the signer index. This is used to identify which participant signed a given message.
- Seedable
- Seedable is a trait that provides access to the seed associated with a message.
Functions§
- finalize_
namespace - Creates a namespace for finalize messages by appending the FINALIZE_SUFFIX Domain separation prevents cross-protocol attacks
- notarize_
namespace - Creates a namespace for notarize messages by appending the NOTARIZE_SUFFIX Domain separation prevents cross-protocol attacks
- nullify_
namespace - Creates a namespace for nullify messages by appending the NULLIFY_SUFFIX Domain separation prevents cross-protocol attacks
- seed_
namespace - Creates a namespace for seed messages by appending the SEED_SUFFIX The seed is used for leader election and randomness generation
- view_
message - Creates a message to be signed containing just the view number
Type Aliases§
- View
- View is a monotonically increasing counter that represents the current focus of consensus. Each View corresponds to a round in the consensus protocol where validators attempt to agree on a block to commit.