#include <babe.hpp>
BABE protocol, used for block production in the Polkadot consensus. One of the two parts in that consensus; the other is Grandpa finality Read more: https://research.web3.foundation/en/latest/polkadot/BABE/Babe/
Definition at line 21 of file babe.hpp.
Enumerator |
---|
WAIT_REMOTE_STATUS |
|
HEADERS_LOADING |
|
HEADERS_LOADED |
|
STATE_LOADING |
|
CATCHING_UP |
|
WAIT_BLOCK_ANNOUNCE |
|
SYNCHRONIZED |
|
Definition at line 25 of file babe.hpp.
kagome::consensus::babe::Babe::~Babe |
( |
| ) |
|
|
overridedefault |
virtual State kagome::consensus::babe::Babe::getCurrentState |
( |
| ) |
const |
|
pure virtual |
virtual void kagome::consensus::babe::Babe::runEpoch |
( |
EpochDescriptor |
epoch | ) |
|
|
pure virtual |
Start a Babe production
- Parameters
-
epoch | - epoch, which is going to be run epoch.starting_slot_finish_time - when the slot, from which the BABE starts, ends; for example, we start from 5th slot of the some epoch. Then, we need to set time when 5th slot finishes; most probably, that time will be calculated using Median algorithm |
- Note
- the function will automatically continue launching all further epochs of the Babe production
-
in fact, it is an implementation of "Invoke-Block-Authoring" from the spec
Implemented in kagome::consensus::babe::BabeImpl.
virtual bool kagome::consensus::babe::Babe::wasSynchronized |
( |
| ) |
const |
|
pure virtual |
Checks whether the node was in a synchronized state at least once since startup.
- Returns
- true when current state was ever set to synchronized during the current run, otherwise - false.
Implemented in kagome::consensus::babe::BabeImpl.
The documentation for this class was generated from the following file: