referrerpolicy=no-referrer-when-downgrade

Crate sp_consensus_sassafras

Source
Expand description

Primitives for Sassafras consensus.

Re-exports§

pub use ticket::ticket_id_threshold;
pub use ticket::TicketBody;
pub use ticket::TicketClaim;
pub use ticket::TicketEnvelope;
pub use ticket::TicketId;

Modules§

digests
Sassafras digests structures and helpers.
ticket
Primitives related to tickets.
vrf
Utilities related to VRF input, pre-output and signatures.

Structs§

Epoch
Sassafras epoch information
EpochConfiguration
Protocol configuration that can be modified on epoch change.
OpaqueKeyOwnershipProof
An opaque type used to represent the key ownership proof at the runtime API boundary.
Slot
Unit type wrapper that represents a slot.
SlotDuration
A slot duration defined in milliseconds.

Constants§

KEY_TYPE
Key type identifier.
RANDOMNESS_LENGTH
VRF output length for per-slot randomness.
SASSAFRAS_ENGINE_ID
Consensus engine identifier.

Traits§

SassafrasApi
API necessary for block authorship with Sassafras.

Type Aliases§

AuthorityId
Sassafras authority identifier. Necessarily equivalent to the schnorrkel public key used in the main Sassafras module. If that ever changes, then this must, too.
AuthorityIndex
Index of an authority.
AuthorityPair
Sassafras authority keypair. Necessarily equivalent to the schnorrkel public key used in the main Sassafras module. If that ever changes, then this must, too.
AuthoritySignature
Sassafras authority signature.
EphemeralPublic
A public key.
EphemeralSignature
A signature.
EquivocationProof
An equivocation proof for multiple block authorships on the same slot (i.e. double vote).
Randomness
Randomness required by some protocol’s operations.
SassafrasBlockWeight
Weight of a Sassafras block. Primary blocks have a weight of 1 whereas secondary blocks have a weight of 0.