Kagome
Polkadot Runtime Engine in C++17
|
Namespaces | |
detail | |
dispatch_error | |
events | |
parachain | |
Classes | |
struct | Authority |
struct | AuthorityId |
struct | AuthorityListChange |
struct | AuthoritySet |
struct | BabeConfiguration |
Configuration data used by the BABE consensus engine. More... | |
struct | Block |
Block class represents polkadot block primitive. More... | |
struct | BlockData |
struct | BlockDataFlags |
struct | BlockHeader |
struct | CheckInherentsResult |
result of check_inherents method of BlockBuilder runtime api More... | |
struct | CodeSubstituteBlockIds |
struct | Consensus |
struct | DecodedConsensusMessage |
struct | DelayInChain |
class | DispatchSuccess |
struct | Extrinsic |
Extrinsic class represents extrinsic. More... | |
struct | ForcedChange |
struct | GenesisBlockHeader |
struct | InherentData |
struct | Justification |
struct | NextConfigDataV1 |
struct | NextEpochData |
struct | OnDisabled |
struct | Other |
struct | Pause |
struct | PreRuntime |
struct | Resume |
struct | RpcMethods |
struct | RuntimeDispatchInfo |
struct | RuntimeEnvironmentUpdated |
Runtime code or heap pages updated. More... | |
struct | ScheduledChange |
struct | Seal |
struct | Session |
Session primitive. More... | |
class | Strobe |
struct | Transaction |
class | Transcript |
struct | ValidTransaction |
Information concerning a valid transaction. More... | |
struct | Version |
Functions | |
SCALE_EMPTY_CODER (DispatchSuccess) | |
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>> | |
Stream & | operator<< (Stream &s, const ArithmeticError &v) |
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>> | |
Stream & | operator>> (Stream &s, ArithmeticError &v) |
bool | operator< (const AuthorityId &lhs, const AuthorityId &rhs) |
std::string_view | to_string (AllowedSlots s) |
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>> | |
Stream & | operator<< (Stream &s, const BabeConfiguration &config) |
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>> | |
Stream & | operator>> (Stream &s, BabeConfiguration &config) |
outcome::result< BlockHash > | calculateBlockHash (BlockHeader const &header, crypto::Hasher const &hasher) |
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>> | |
Stream & | operator<< (Stream &s, const BlockHeader &bh) |
outputs object of type BlockHeader to stream More... | |
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>> | |
Stream & | operator>> (Stream &s, BlockHeader &bh) |
decodes object of type BlockHeader from stream More... | |
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>> | |
Stream & | operator>> (Stream &s, CheckInherentsResult &v) |
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>> | |
Stream & | operator<< (Stream &s, const InherentData &v) |
output InherentData object instance to stream More... | |
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>> | |
Stream & | operator>> (Stream &s, InherentData &v) |
decodes InherentData object instance from stream More... | |
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>> | |
Stream & | operator<< (Stream &s, const RuntimeDispatchInfo &v) |
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>> | |
Stream & | operator>> (Stream &s, RuntimeDispatchInfo &v) |
static common::Buffer | calculateChecksum (gsl::span< uint8_t, kSs58Length-kSs58ChecksumLength > ss58_address, const crypto::Hasher &hasher) |
outcome::result< AccountId > | decodeSs58 (std::string_view account_address, const crypto::Hasher &hasher) noexcept |
std::string | encodeSs58 (uint8_t account_type, const AccountId &id, const crypto::Hasher &hasher) noexcept |
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>> | |
Stream & | operator<< (Stream &s, const TokenError &v) |
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>> | |
Stream & | operator>> (Stream &s, TokenError &v) |
bool | operator== (const Transaction &v1, const Transaction &v2) |
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>> | |
Stream & | operator<< (Stream &s, const InvalidTransaction &v) |
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>> | |
Stream & | operator>> (Stream &s, InvalidTransaction &v) |
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>> | |
Stream & | operator<< (Stream &s, const UnknownTransaction &v) |
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>> | |
Stream & | operator>> (Stream &s, UnknownTransaction &v) |
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>> | |
Stream & | operator<< (Stream &s, const Version &v) |
outputs object of type Version to stream More... | |
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>> | |
Stream & | operator>> (Stream &s, Version &v) |
decodes object of type Version from stream More... | |
Variables | |
const auto | kBabeEngineId |
const auto | kGrandpaEngineId |
const auto | kUnsupportedEngineId_POL1 |
const auto | kUnsupportedEngineId_BEEF |
static constexpr uint32_t | kRpcMethodsVersion = 1 |
constexpr size_t | kSs58ChecksumLength = 2 |
constexpr size_t | kSs58Length |
Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 Authoring api primitives
struct kagome::primitives::CheckInherentsResult |
result of check_inherents method of BlockBuilder runtime api
Definition at line 15 of file check_inherents_result.hpp.
Class Members | ||
---|---|---|
InherentData | errors |
We use the InherentData to store our errors. |
bool | is_fatal_error | Did we encounter a fatal error? |
bool | is_okay | Did the check succeed? |
class kagome::primitives::DispatchSuccess |
Definition at line 24 of file apply_result.hpp.
struct kagome::primitives::GenesisBlockHeader |
Definition at line 46 of file block_header.hpp.
Class Members | ||
---|---|---|
const BlockHash | hash | |
const BlockHeader | header |
struct kagome::primitives::RuntimeDispatchInfo |
Information related to a dispatchable's class, weight, and fee that can be queried from the runtime.
Definition at line 14 of file runtime_dispatch_info.hpp.
Class Members | ||
---|---|---|
typedef uint32_t | Balance | |
typedef uint64_t | Weight |
Class Members | ||
---|---|---|
DispatchClass |
Class Members | ||
---|---|---|
enum DispatchClass | dispatch_class | |
Balance | partial_fee |
The inclusion fee of this dispatch. This does not include a tip or anything else that depends on the signature (i.e. depends on a |
Weight | weight |
struct kagome::primitives::Session |
Session primitive.
Definition at line 27 of file author_api_primitives.hpp.
Class Members | ||
---|---|---|
uint32_t | id |
struct kagome::primitives::Transaction |
Definition at line 14 of file transaction.hpp.
Class Members | ||
---|---|---|
size_t | bytes | Number of bytes encoding of the transaction requires. |
Extrinsic | ext | Raw extrinsic representing that transaction. |
Hash | hash | Extrinsic hash (non-unique) |
Priority | priority | Transaction priority (higher = better) |
vector< Tag > | provides | Tags that this transaction provides. |
vector< Tag > | requires | Tags required by the transaction. |
bool | should_propagate | Should that transaction be propagated. |
Longevity | valid_till | At which block the transaction becomes invalid? |
using kagome::primitives::AccountId = typedef crypto::Sr25519PublicKey |
Definition at line 13 of file account.hpp.
using kagome::primitives::AccountNonce = typedef uint32_t |
Definition at line 15 of file account.hpp.
using kagome::primitives::Api = typedef std::pair<ApiId, uint32_t> |
single Api item
Definition at line 31 of file version.hpp.
using kagome::primitives::ApiId = typedef common::Blob<8u> |
The identity of a particular API interface that the runtime might provide.
This is the same structure as RuntimeVersion from substrate https://github.com/paritytech/substrate/blob/e670c040d42132da982e156e25a385df213354ed/primitives/version/src/lib.rs
Definition at line 26 of file version.hpp.
using kagome::primitives::ApisVec = typedef std::vector<Api> |
A vector of pairs of ApiId
and a u32
for version.
Definition at line 36 of file version.hpp.
using kagome::primitives::ApplyExtrinsicResult = typedef boost::variant<DispatchOutcome, TransactionValidityError> |
Definition at line 99 of file apply_result.hpp.
using kagome::primitives::AuthorityDiscoveryId = typedef crypto::Sr25519PublicKey |
Definition at line 12 of file authority_discovery_id.hpp.
using kagome::primitives::AuthorityIndex = typedef uint32_t |
Authority index
Definition at line 36 of file authority.hpp.
using kagome::primitives::AuthorityList = typedef common::SLVector<Authority, consensus::kMaxValidatorsNumber> |
List of authorities
Definition at line 52 of file authority.hpp.
using kagome::primitives::AuthorityListSize = typedef uint64_t |
Definition at line 21 of file authority.hpp.
using kagome::primitives::AuthoritySetId = typedef uint64_t |
Definition at line 20 of file authority.hpp.
using kagome::primitives::AuthorityWeight = typedef uint64_t |
Definition at line 19 of file authority.hpp.
using kagome::primitives::BabeClock = typedef clock::SystemClock |
Definition at line 19 of file babe_configuration.hpp.
using kagome::primitives::BabeDigest = typedef boost::variant<Unused<0>, NextEpochData, OnDisabled, NextConfigData> |
Definition at line 63 of file digest.hpp.
using kagome::primitives::BabeDuration = typedef BabeClock::Duration |
Definition at line 20 of file babe_configuration.hpp.
using kagome::primitives::BabeSessionKey = typedef crypto::Sr25519PublicKey |
Definition at line 17 of file session_key.hpp.
using kagome::primitives::BabeSlotNumber = typedef uint64_t |
Definition at line 18 of file babe_configuration.hpp.
using kagome::primitives::BlockBody = typedef std::vector<Extrinsic> |
Definition at line 15 of file block_id.hpp.
using kagome::primitives::BlockId = typedef boost::variant<BlockHash, BlockNumber> |
Block id is the variant over BlockHash and BlockNumber.
Definition at line 18 of file block_id.hpp.
using kagome::primitives::BlockInfo = typedef detail::BlockInfoT<struct BlockInfoTag> |
Definition at line 63 of file common.hpp.
using kagome::primitives::BlockNumber = typedef uint32_t |
Definition at line 18 of file common.hpp.
using kagome::primitives::CompactInteger = typedef scale::CompactInteger |
Definition at line 13 of file compact_integer.hpp.
using kagome::primitives::ConsensusEngineId = typedef common::Blob<4> |
Consensus engine unique ID.
Definition at line 23 of file digest.hpp.
using kagome::primitives::Digest = typedef common::SLVector<DigestItem, kMaxItemsInDigest> |
Digest is an implementation- and usage-defined entity, for example, information, needed to verify the block
Definition at line 194 of file digest.hpp.
using kagome::primitives::DigestItem = typedef boost::variant<Other, Unused<1>, Unused<2>, Unused<3>, Consensus, Seal, PreRuntime, Unused<7>, RuntimeEnvironmentUpdated> |
Digest item that is able to encode/decode 'system' digest items and provide opaque access to other items. Note: order of types in variant matters. Should match type ids from here: https://github.com/paritytech/substrate/blob/polkadot-v0.9.12/primitives/runtime/src/generic/digest.rs#L272
Definition at line 182 of file digest.hpp.
using kagome::primitives::DispatchError = typedef boost::variant<de::Other, de::CannotLookup, de::BadOrigin, de::Module, de::ConsumerRemaining, de::NoProviders, de::Token, de::Arithmetic> |
Definition at line 94 of file apply_result.hpp.
using kagome::primitives::DispatchOutcome = typedef boost::variant<DispatchSuccess, DispatchError> |
Definition at line 96 of file apply_result.hpp.
using kagome::primitives::ExtrinsicIndex = typedef uint32_t |
Index of an extrinsic in a block
Definition at line 19 of file extrinsic.hpp.
using kagome::primitives::ExtrinsicKey = typedef std::vector<uint8_t> |
ExtrinsicKey is used as a key to search extrinsic.
Definition at line 40 of file author_api_primitives.hpp.
using kagome::primitives::GenericSessionKey = typedef common::Blob<32> |
Definition at line 15 of file session_key.hpp.
using kagome::primitives::GrandpaDigest = typedef boost::variant<Unused<0>, ScheduledChange, ForcedChange, OnDisabled, Pause, Resume> |
Definition at line 73 of file digest.hpp.
using kagome::primitives::GrandpaSessionKey = typedef crypto::Ed25519PublicKey |
Definition at line 18 of file session_key.hpp.
using kagome::primitives::InherentIdentifier = typedef common::Blob<8u> |
Definition at line 34 of file inherent_data.hpp.
using kagome::primitives::Metadata = typedef std::optional<std::shared_ptr<Session>> |
Metadata primitive.
Definition at line 35 of file author_api_primitives.hpp.
using kagome::primitives::NextConfigData = typedef boost::variant<Unused<0>, NextConfigDataV1> |
Definition at line 45 of file scheduled_change.hpp.
using kagome::primitives::OpaqueMetadata = typedef std::vector<uint8_t> |
Polkadot primitive, which is opaque representation of RuntimeMetadata
Definition at line 16 of file opaque_metadata.hpp.
using kagome::primitives::Randomness = typedef common::Blob<crypto::constants::sr25519::vrf::OUTPUT_SIZE> |
Definition at line 21 of file babe_configuration.hpp.
using kagome::primitives::SubscriptionId = typedef uint64_t |
SubscriptionId primitive.
Definition at line 22 of file author_api_primitives.hpp.
using kagome::primitives::ThreadNumber = typedef size_t |
Definition at line 20 of file common.hpp.
using kagome::primitives::TransactionValidity = typedef boost::variant<ValidTransaction, TransactionValidityError> |
Information on a transaction's validity and, if valid, on how it relate to other transactions.
Definition at line 201 of file transaction_validity.hpp.
using kagome::primitives::TransactionValidityError = typedef boost::variant<InvalidTransaction, UnknownTransaction> |
Definition at line 194 of file transaction_validity.hpp.
using kagome::primitives::UnsupportedDigest_BEEF = typedef Tagged<Empty, struct BEEF> |
Definition at line 76 of file digest.hpp.
using kagome::primitives::UnsupportedDigest_POL1 = typedef Tagged<Empty, struct POL1> |
Definition at line 75 of file digest.hpp.
|
strong |
Enumerator | |
---|---|
PrimaryOnly | |
PrimaryAndSecondaryPlain | |
PrimaryAndSecondaryVRF |
Definition at line 23 of file babe_configuration.hpp.
|
strong |
Enumerator | |
---|---|
Underflow |
Underflow. |
Overflow |
Overflow. |
DivisionByZero |
Division by zero. |
Definition at line 15 of file arithmetic_error.hpp.
|
strong |
inherent data encode/decode error codes
Enumerator | |
---|---|
IDENTIFIER_ALREADY_EXISTS | |
IDENTIFIER_DOES_NOT_EXIST |
Definition at line 25 of file inherent_data.hpp.
|
strong |
Transaction is invalid. Details are described by the error code.
Definition at line 95 of file transaction_validity.hpp.
|
strong |
Enumerator | |
---|---|
INVALID_LENGTH | |
INVALID_CHECKSUM |
Definition at line 20 of file ss58_codec.hpp.
|
strong |
Definition at line 15 of file token_error.hpp.
|
strong |
Enumerator | |
---|---|
InBlock |
Transaction is already included in block. This means that we can't really tell where the transaction is coming from, since it's already in the received block. Note that the custom validation logic using either `Local` or `External` should most likely just allow `InBlock` transactions as well. |
Local |
Transaction is coming from a local source. This means that the transaction was produced internally by the node (for instance an Off-Chain Worker, or an Off-Chain Call), as opposed to being received over the network. |
External |
Transaction has been received externally. This means the transaction has been received from (usually) "untrusted" source, for instance received over the network or RPC. |
Definition at line 20 of file transaction_validity.hpp.
|
strong |
An unknown transaction validity.
Definition at line 156 of file transaction_validity.hpp.
outcome::result< BlockHash > kagome::primitives::calculateBlockHash | ( | BlockHeader const & | header, |
crypto::Hasher const & | hasher | ||
) |
Definition at line 5 of file block_header.cpp.
|
static |
Definition at line 27 of file ss58_codec.cpp.
|
noexcept |
Return the account id part of the provided ss58 address. The checksum is verified in the process.
Definition at line 37 of file ss58_codec.cpp.
|
noexcept |
Definition at line 67 of file ss58_codec.cpp.
|
inline |
Definition at line 29 of file authority.hpp.
Stream& kagome::primitives::operator<< | ( | Stream & | s, |
const ArithmeticError & | v | ||
) |
Definition at line 26 of file arithmetic_error.hpp.
Stream& kagome::primitives::operator<< | ( | Stream & | s, |
const TokenError & | v | ||
) |
Definition at line 34 of file token_error.hpp.
Stream& kagome::primitives::operator<< | ( | Stream & | s, |
const RuntimeDispatchInfo & | v | ||
) |
Definition at line 52 of file runtime_dispatch_info.hpp.
Stream& kagome::primitives::operator<< | ( | Stream & | s, |
const BlockHeader & | bh | ||
) |
outputs object of type BlockHeader to stream
Stream | output stream type |
s | stream reference |
v | value to output |
Definition at line 60 of file block_header.hpp.
Stream& kagome::primitives::operator<< | ( | Stream & | s, |
const BabeConfiguration & | config | ||
) |
Definition at line 78 of file babe_configuration.hpp.
Stream& kagome::primitives::operator<< | ( | Stream & | s, |
const InherentData & | v | ||
) |
output InherentData object instance to stream
Stream | stream type |
s | stream reference |
v | value to output |
Definition at line 98 of file inherent_data.hpp.
Stream& kagome::primitives::operator<< | ( | Stream & | s, |
const Version & | v | ||
) |
outputs object of type Version to stream
Stream | output stream type |
s | stream reference |
v | value to output |
Definition at line 117 of file version.hpp.
Stream& kagome::primitives::operator<< | ( | Stream & | s, |
const InvalidTransaction & | v | ||
) |
Definition at line 130 of file transaction_validity.hpp.
Stream& kagome::primitives::operator<< | ( | Stream & | s, |
const UnknownTransaction & | v | ||
) |
Definition at line 168 of file transaction_validity.hpp.
|
inline |
Definition at line 61 of file transaction.hpp.
Stream& kagome::primitives::operator>> | ( | Stream & | s, |
CheckInherentsResult & | v | ||
) |
Definition at line 26 of file check_inherents_result.hpp.
Stream& kagome::primitives::operator>> | ( | Stream & | s, |
ArithmeticError & | v | ||
) |
Definition at line 34 of file arithmetic_error.hpp.
Stream& kagome::primitives::operator>> | ( | Stream & | s, |
TokenError & | v | ||
) |
Definition at line 42 of file token_error.hpp.
Stream& kagome::primitives::operator>> | ( | Stream & | s, |
RuntimeDispatchInfo & | v | ||
) |
Definition at line 58 of file runtime_dispatch_info.hpp.
Stream& kagome::primitives::operator>> | ( | Stream & | s, |
BlockHeader & | bh | ||
) |
decodes object of type BlockHeader from stream
Stream | input stream type |
s | stream reference |
v | value to output |
Definition at line 74 of file block_header.hpp.
Stream& kagome::primitives::operator>> | ( | Stream & | s, |
BabeConfiguration & | config | ||
) |
Definition at line 90 of file babe_configuration.hpp.
Stream& kagome::primitives::operator>> | ( | Stream & | s, |
InherentData & | v | ||
) |
decodes InherentData object instance from stream
Stream | input stream type |
s | stream reference |
v | value to decode |
Definition at line 118 of file inherent_data.hpp.
Stream& kagome::primitives::operator>> | ( | Stream & | s, |
Version & | v | ||
) |
decodes object of type Version from stream
Stream | input stream type |
s | stream reference |
v | value to decode |
Definition at line 132 of file version.hpp.
Stream& kagome::primitives::operator>> | ( | Stream & | s, |
InvalidTransaction & | v | ||
) |
Definition at line 139 of file transaction_validity.hpp.
Stream& kagome::primitives::operator>> | ( | Stream & | s, |
UnknownTransaction & | v | ||
) |
Definition at line 177 of file transaction_validity.hpp.
kagome::primitives::SCALE_EMPTY_CODER | ( | DispatchSuccess | ) |
|
inline |
Definition at line 29 of file babe_configuration.hpp.
|
inline |
Definition at line 25 of file digest.hpp.
|
inline |
Definition at line 28 of file digest.hpp.
|
static |
Definition at line 18 of file rpc_methods.hpp.
constexpr size_t kagome::primitives::kSs58ChecksumLength = 2 |
Definition at line 22 of file ss58_codec.hpp.
constexpr size_t kagome::primitives::kSs58Length |
Definition at line 23 of file ss58_codec.hpp.
|
inline |
Definition at line 34 of file digest.hpp.
|
inline |
Definition at line 31 of file digest.hpp.