referrerpolicy=no-referrer-when-downgrade

Crate sp_consensus_beefy

Source
Expand description

Primitives for BEEFY protocol.

The crate contains shared data types used by BEEFY protocol and documentation (in a form of code) for building a BEEFY light client.

BEEFY is a gadget that runs alongside another finality gadget (for instance GRANDPA). For simplicity (and the initially intended use case) the documentation says GRANDPA in places where a more abstract “Finality Gadget” term could be used, but there is no reason why BEEFY wouldn’t run with some other finality scheme. BEEFY validator set is supposed to be tracking the Finality Gadget validator set, but note that it will use a different set of keys. For Polkadot use case we plan to use secp256k1 for BEEFY, while GRANDPA uses ed25519.

Modules§

bls_crypto
BEEFY cryptographic types for BLS crypto
ecdsa_bls_crypto
BEEFY cryptographic types for (ECDSA,BLS) crypto pair
ecdsa_crypto
BEEFY cryptographic types for ECDSA crypto
known_payloads
Registry of all known BeefyPayloadId.
mmr
BEEFY + MMR utilities.
test_utils
Test utilities
witness
Primitives for light, 2-phase interactive verification protocol.

Structs§

Commitment
A commitment signed by GRANDPA validators as part of BEEFY protocol.
DoubleVotingProof
Proof showing that an authority voted twice in the same round.
ForkVotingProof
Proof showing that an authority voted for a non-canonical chain.
FutureBlockVotingProof
Proof showing that an authority voted for a future block.
KnownSignature
A commitment signature, accompanied by the id of the validator that it belongs to.
Payload
A BEEFY payload type allowing for future extensibility of adding additional kinds of payloads.
SignedCommitment
A commitment with matching GRANDPA validators’ signatures.
ValidatorSet
A set of BEEFY authorities, a.k.a. validators.
VoteMessage
BEEFY vote message.

Enums§

ConsensusLog
A consensus log item for BEEFY.
VersionedFinalityProof
A SignedCommitment with a version number.

Constants§

BEEFY_ENGINE_ID
The ConsensusEngineId of BEEFY.
GENESIS_AUTHORITY_SET_ID
Authority set id starts with zero at BEEFY pallet genesis.
KEY_TYPE
Key type for BEEFY module.

Traits§

AncestryHelper
Hook containing helper methods for proving/checking commitment canonicity.
AncestryHelperWeightInfo
Weight information for the logic in AncestryHelper.
AuthorityIdBound
A trait bound which lists all traits which are required to be implemented by a BEEFY AuthorityId type in order to be able to be used in BEEFY Keystore
BeefyApi
API necessary for BEEFY voters.
BeefyAuthorityId
Trait representing BEEFY authority id, including custom signature verification.
OnNewValidatorSet
New BEEFY validator set notification hook.
PayloadProvider
Trait for custom BEEFY payload providers.

Functions§

check_commitment_signature
Check a commitment signature by encoding the commitment and verifying the provided signature using the expected authority id.
check_double_voting_proof
Verifies the equivocation proof by making sure that both votes target different blocks and that its signatures are valid.

Type Aliases§

AuthorityIndex
The index of an authority.
BeefyPayloadId
Id of different payloads in the crate::Commitment data.
BeefySignatureHasher
Hasher used for BEEFY signatures.
MmrHashing
The Hashing used within MMR.
MmrRootHash
The type used to represent an MMR root hash.
OpaqueKeyOwnershipProof
An opaque type used to represent the key ownership proof at the runtime API boundary. The inner value is an encoded representation of the actual key ownership proof which will be parameterized when defining the runtime. At the runtime API boundary this type is unknown and as such we keep this opaque representation, implementors of the runtime API will have to make sure that all usages of OpaqueKeyOwnershipProof refer to the same type.
ValidatorSetId
A typedef for validator set id.