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§
- BEEFY cryptographic types for BLS crypto
- BEEFY cryptographic types for (ECDSA,BLS) crypto pair
- BEEFY cryptographic types for ECDSA crypto
- Registry of all known
BeefyPayloadId
. - BEEFY + MMR utilities.
- Test utilities
- Primitives for light, 2-phase interactive verification protocol.
Structs§
- A commitment signed by GRANDPA validators as part of BEEFY protocol.
- Proof showing that an authority voted twice in the same round.
- Proof showing that an authority voted for a non-canonical chain.
- Proof showing that an authority voted for a future block.
- A commitment signature, accompanied by the id of the validator that it belongs to.
- A BEEFY payload type allowing for future extensibility of adding additional kinds of payloads.
- A commitment with matching GRANDPA validators’ signatures.
- A set of BEEFY authorities, a.k.a. validators.
- BEEFY vote message.
Enums§
- A consensus log item for BEEFY.
- A SignedCommitment with a version number.
Constants§
- The
ConsensusEngineId
of BEEFY. - Authority set id starts with zero at BEEFY pallet genesis.
- Key type for BEEFY module.
Traits§
- Hook containing helper methods for proving/checking commitment canonicity.
- Weight information for the logic in
AncestryHelper
. - 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
- API necessary for BEEFY voters.
- Trait representing BEEFY authority id, including custom signature verification.
- New BEEFY validator set notification hook.
- Trait for custom BEEFY payload providers.
Functions§
- Check a commitment signature by encoding the commitment and verifying the provided signature using the expected authority id.
- Verifies the equivocation proof by making sure that both votes target different blocks and that its signatures are valid.
Type Aliases§
- The index of an authority.
- Id of different payloads in the
crate::Commitment
data. - Hasher used for BEEFY signatures.
- The Hashing used within MMR.
- The type used to represent an MMR root hash.
- 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. - A typedef for validator set id.