|
Kagome
Polkadot Runtime Engine in C++17
|
Namespaces | |
| babe | |
| grandpa | |
Classes | |
| struct | BabeBlockHeader |
| class | BabeBlockValidator |
| class | BabeConfigNode |
| class | BabeDigestObserver |
| struct | BabeLottery |
| class | BabeLotteryImpl |
| class | BabeUtil |
| class | BlockAppender |
| class | BlockAppenderImpl |
| class | BlockExecutor |
| class | BlockExecutorImpl |
| class | BlockValidator |
| struct | EpochDescriptor |
| struct | EpochDigest |
| Data are corresponding to the epoch. More... | |
| struct | Seal |
Typedefs | |
| using | BabeClock = clock::SystemClock |
| using | BabeTimePoint = BabeClock::TimePoint |
| BABE uses system clock's time points. More... | |
| using | BabeDuration = BabeClock::Duration |
| using | BabeSlotNumber = uint64_t |
| slot number of the Babe production More... | |
| using | EpochNumber = uint64_t |
| number of the epoch in the Babe production More... | |
| using | EpochLength = EpochNumber |
| using | Threshold = crypto::VRFThreshold |
| threshold, which must not be exceeded for the party to be a slot leader More... | |
| using | Randomness = common::Blob< crypto::constants::sr25519::vrf::OUTPUT_SIZE > |
| random value, which serves as a seed for VRF slot leadership selection More... | |
| using | IsBlockFinalized = Tagged< bool, struct IsBlockFinalizedTag > |
Functions | |
| outcome::result< std::pair< Seal, BabeBlockHeader > > | getBabeDigests (const primitives::BlockHeader &block_header) |
| outcome::result< EpochDigest > | getNextEpochDigest (const primitives::BlockHeader &header) |
| template<typename T , typename VarT > | |
| std::optional< std::reference_wrapper< const std::decay_t< T > > > | getFromVariant (VarT &&v) |
| Threshold | calculateThreshold (const std::pair< uint64_t, uint64_t > &ratio, const primitives::AuthorityList &authorities, primitives::AuthorityIndex authority_index) |
| std::string_view | to_string (SlotType s) |
| primitives::Transcript & | prepareTranscript (primitives::Transcript &transcript, const Randomness &randomness, BabeSlotNumber slot_number, EpochNumber epoch) |
Variables | |
| constexpr size_t | kMaxValidatorsNumber = 2048 |
Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
| using kagome::consensus::BabeClock = typedef clock::SystemClock |
Definition at line 15 of file common.hpp.
| using kagome::consensus::BabeDuration = typedef BabeClock::Duration |
Definition at line 21 of file common.hpp.
| using kagome::consensus::BabeSlotNumber = typedef uint64_t |
slot number of the Babe production
Definition at line 24 of file common.hpp.
| using kagome::consensus::BabeTimePoint = typedef BabeClock::TimePoint |
BABE uses system clock's time points.
Definition at line 18 of file common.hpp.
| using kagome::consensus::EpochLength = typedef EpochNumber |
Definition at line 30 of file common.hpp.
| using kagome::consensus::EpochNumber = typedef uint64_t |
number of the epoch in the Babe production
Definition at line 27 of file common.hpp.
| using kagome::consensus::IsBlockFinalized = typedef Tagged<bool, struct IsBlockFinalizedTag> |
Definition at line 16 of file babe_config_node.hpp.
| using kagome::consensus::Randomness = typedef common::Blob<crypto::constants::sr25519::vrf::OUTPUT_SIZE> |
random value, which serves as a seed for VRF slot leadership selection
Definition at line 36 of file common.hpp.
| using kagome::consensus::Threshold = typedef crypto::VRFThreshold |
threshold, which must not be exceeded for the party to be a slot leader
Definition at line 33 of file common.hpp.
|
strong |
| Enumerator | |
|---|---|
| TIMER_ERROR | |
| NODE_FALL_BEHIND | |
| MISSING_PROOF | |
| BAD_ORDER_OF_DIGEST_ITEM | |
| UNKNOWN_DIGEST_TYPE | |
Definition at line 12 of file babe_error.hpp.
|
strong |
| Enumerator | |
|---|---|
| REQUIRED_DIGESTS_NOT_FOUND | |
| NO_TRAILING_SEAL_DIGEST | |
| MULTIPLE_EPOCH_CHANGE_DIGESTS | |
| NEXT_EPOCH_DIGEST_DOES_NOT_EXIST | |
Definition at line 21 of file babe_digests_util.hpp.
|
strong |
| Threshold kagome::consensus::calculateThreshold | ( | const std::pair< uint64_t, uint64_t > & | ratio, |
| const primitives::AuthorityList & | authorities, | ||
| primitives::AuthorityIndex | authority_index | ||
| ) |
Calculates the primary selection threshold for a given authority, taking into account c (1 - c represents the probability of a slot being empty). https://github.com/paritytech/substrate/blob/7010ec7716e0edf97d61a29bd0c337648b3a57ae/core/consensus/babe/src/authorship.rs#L30
Definition at line 13 of file threshold_util.cpp.
| outcome::result< std::pair< Seal, BabeBlockHeader > > kagome::consensus::getBabeDigests | ( | const primitives::BlockHeader & | block_header | ) |
Definition at line 28 of file babe_digests_util.cpp.
| std::optional<std::reference_wrapper<const std::decay_t<T> > > kagome::consensus::getFromVariant | ( | VarT && | v | ) |
Definition at line 29 of file babe_digests_util.hpp.
| outcome::result< EpochDigest > kagome::consensus::getNextEpochDigest | ( | const primitives::BlockHeader & | header | ) |
Definition at line 60 of file babe_digests_util.cpp.
|
inline |
Definition at line 14 of file prepare_transcript.hpp.
|
inline |
| constexpr size_t kagome::consensus::kMaxValidatorsNumber = 2048 |
Definition at line 11 of file constants.hpp.