Kagome
Polkadot Runtime Engine in C++17
kagome::primitives::BabeConfiguration Struct Reference

Configuration data used by the BABE consensus engine. More...

#include <babe_configuration.hpp>

Collaboration diagram for kagome::primitives::BabeConfiguration:

Public Member Functions

bool isSecondarySlotsAllowed () const
 

Public Attributes

BabeDuration slot_duration {}
 
BabeSlotNumber epoch_length {}
 
std::pair< uint64_t, uint64_t > leadership_rate
 
AuthorityList authorities
 The authorities for block production. More...
 
Randomness randomness
 The randomness for the genesis epoch. More...
 
AllowedSlots allowed_slots
 Type of allowed slots. More...
 

Detailed Description

Configuration data used by the BABE consensus engine.

Definition at line 42 of file babe_configuration.hpp.

Member Function Documentation

bool kagome::primitives::BabeConfiguration::isSecondarySlotsAllowed ( ) const
inline

Definition at line 69 of file babe_configuration.hpp.

Member Data Documentation

AllowedSlots kagome::primitives::BabeConfiguration::allowed_slots

Type of allowed slots.

Definition at line 67 of file babe_configuration.hpp.

AuthorityList kagome::primitives::BabeConfiguration::authorities

The authorities for block production.

Definition at line 61 of file babe_configuration.hpp.

BabeSlotNumber kagome::primitives::BabeConfiguration::epoch_length {}

Definition at line 49 of file babe_configuration.hpp.

std::pair<uint64_t, uint64_t> kagome::primitives::BabeConfiguration::leadership_rate

A constant value that is used in the threshold calculation formula. Expressed as a rational where the first member of the tuple is the numerator and the second is the denominator. The rational should represent a value between 0 and 1. In substrate it is called c In the threshold formula calculation, 1 - leadership_rate represents the probability of a slot being empty.

Definition at line 58 of file babe_configuration.hpp.

Randomness kagome::primitives::BabeConfiguration::randomness

The randomness for the genesis epoch.

Definition at line 64 of file babe_configuration.hpp.

BabeDuration kagome::primitives::BabeConfiguration::slot_duration {}

The slot duration in milliseconds for BABE. Currently, only the value provided by this type at genesis will be used.

Dynamic slot duration may be supported in the future.

Definition at line 47 of file babe_configuration.hpp.


The documentation for this struct was generated from the following file: