Expand description
Types used in crate::simplex.
Structs§
- 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 an aggregated set of finalizes that meets the quorum threshold. When a proposal is finalized, it becomes the canonical block for its view.
- Finalize
- Finalize represents a validator’s finalize over a proposal. This happens after a proposal has been notarized, confirming it as the canonical block for this view.
- Notarization
- Notarization represents an aggregated set of notarizes that meets the quorum threshold. It includes the proposal and the set of signatures from validators.
- Notarize
- Notarize represents a validator’s notarize over a proposal.
- Nullification
- Nullification represents an aggregated set of nullifies that meets the quorum threshold. When a view is nullified, the consensus moves to the next view.
- Nullify
- Nullify represents a validator’s nullify to skip the current view. This is typically used when the leader is unresponsive or fails to propose a valid block.
- 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.
- 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.
- Signature
- Signature represents a validator’s cryptographic signature with their identifier. This combines the validator’s public key index with their actual signature.
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.
Functions§
- finalize_
namespace - Creates a namespace for finalize messages by appending the FINALIZE_SUFFIX
- notarize_
namespace - Creates a namespace for notarize messages by appending the NOTARIZE_SUFFIX
- nullify_
namespace - Creates a namespace for nullify messages by appending the NULLIFY_SUFFIX
- threshold
- Calculates the quorum threshold for a set of validators Returns (threshold, len) where threshold is the minimum number of validators required for a quorum, and len is the total number of validators
- 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.