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.
- Double
Voting Proof - Proof showing that an authority voted twice in the same round.
- Fork
Voting Proof - Proof showing that an authority voted for a non-canonical chain.
- Future
Block Voting Proof - Proof showing that an authority voted for a future block.
- Known
Signature - 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.
- Signed
Commitment - A commitment with matching GRANDPA validators’ signatures.
- Validator
Set - A set of BEEFY authorities, a.k.a. validators.
- Vote
Message - BEEFY vote message.
Enums§
- Consensus
Log - A consensus log item for BEEFY.
- Versioned
Finality Proof - 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§
- Ancestry
Helper - Hook containing helper methods for proving/checking commitment canonicity.
- Ancestry
Helper Weight Info - Weight information for the logic in
AncestryHelper
. - Authority
IdBound - 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
- Beefy
Api - API necessary for BEEFY voters.
- Beefy
Authority Id - Trait representing BEEFY authority id, including custom signature verification.
- OnNew
Validator Set - New BEEFY validator set notification hook.
- Payload
Provider - 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§
- Authority
Index - The index of an authority.
- Beefy
Payload Id - Id of different payloads in the
crate::Commitment
data. - Beefy
Signature Hasher - Hasher used for BEEFY signatures.
- MmrHashing
- The Hashing used within MMR.
- MmrRoot
Hash - The type used to represent an MMR root hash.
- Opaque
KeyOwnership Proof - 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. - Validator
SetId - A typedef for validator set id.