Crate tp_consensus_babe[−][src]
Primitives for BABE.
Modules
digests | Private implementation details of BABE digests. |
inherents | Inherents for BABE |
Structs
BabeEpochConfiguration | Configuration data used by the BABE consensus engine. |
BabeGenesisConfiguration | Configuration data used by the BABE consensus engine. |
BabeGenesisConfigurationV1 | Configuration data used by the BABE consensus engine. |
Epoch | BABE epoch information |
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 |
Slot | Unit type wrapper that represents a slot. |
Transcript | A transcript of a public-coin argument. |
Enums
AllowedSlots | Types of allowed slots. |
ConsensusLog | An consensus log item for BABE. |
Constants
BABE_ENGINE_ID | The |
BABE_VRF_PREFIX | The prefix used by BABE for its VRF keys. |
KEY_TYPE | Key type for BABE module. |
MEDIAN_ALGORITHM_CARDINALITY | How many blocks to wait before running the median algorithm for relative time This will not vary from chain to chain as it is not dependent on slot duration or epoch length. |
PUBLIC_KEY_LENGTH | The length of the public key |
RANDOMNESS_LENGTH | The length of the Randomness. |
VRF_OUTPUT_LENGTH | Length of VRF output. |
VRF_PROOF_LENGTH | Length of the short VRF proof which lacks support for batch verification. |
Statics
BABE_VRF_INOUT_CONTEXT | BABE VRFInOut context. |
Traits
BabeApi | API necessary for block authorship with BABE. |
Functions
check_equivocation_proof | Verifies the equivocation proof by making sure that: both headers have different hashes, are targetting the same slot, and have valid signatures by the same authority. |
make_transcript | Make a VRF transcript from given randomness, slot number and epoch. |
make_transcript_data | Make a VRF transcript data container |
Type Definitions
AuthorityId | A Babe authority identifier. Necessarily equivalent to the schnorrkel public key used in the main Babe module. If that ever changes, then this must, too. |
AuthorityIndex | The index of an authority. |
AuthorityPair | A Babe authority keypair. Necessarily equivalent to the schnorrkel public key used in the main Babe module. If that ever changes, then this must, too. |
AuthoritySignature | A Babe authority signature. |
BabeAuthorityWeight | The weight of an authority. |
BabeBlockWeight | The weight of a BABE block. |
EquivocationProof | An equivocation proof for multiple block authorships on the same slot (i.e. double vote). |
Randomness | Schnorrkel randomness value. Same size as |