referrerpolicy=no-referrer-when-downgrade

Crate bp_polkadot_core

Source
Expand description

Primitives of the Polkadot-like chains.

Re-exports§

pub use time_units::*;

Modules§

parachains
Primitives of polkadot-like chains, that are related to parachains functionality.
time_units
Human readable time units defined in terms of number of blocks.

Structs§

AccountInfoStorageMapKeyProvider
Provides a storage key for account data.
BlockLength
All Polkadot-like chains have maximal block size set to 5MB.
BlockWeights
All Polkadot-like chains have the same block weights.
ExtrinsicBaseWeight
Weight of executing a NO-OP extrinsic, for example System::remark. Calculated by multiplying the Average with 1.0 and adding 0.
Perbill
A fixed point representation of a number in the range [0, 1].

Constants§

AVERAGE_HEADER_SIZE
Average header size in votes_ancestries field of justification on Polkadot-like chains.
AVERAGE_ON_INITIALIZE_RATIO
All Polkadot-like chains assume that an on-initialize consumes 1 percent of the weight on average, hence a single extrinsic will not be allowed to consume more than AvailableBlockRatio - 1 percent.
EXTRA_STORAGE_PROOF_SIZE
Number of extra bytes (excluding size of storage value itself) of storage proof, built at Polkadot-like chain. This mostly depends on number of entries in the storage trie. Some reserve is reserved to account future chain growth.
MAXIMUM_BLOCK_WEIGHT
All Polkadot-like chains allow 2 seconds of compute with a 6-second average block time.
MAX_AUTHORITIES_COUNT
Maximal number of GRANDPA authorities at Polkadot-like chains.
MAX_MANDATORY_HEADER_SIZE
Approximate maximal header size on Polkadot-like chains.
MAX_MESSAGES_IN_DELIVERY_TRANSACTION
Maximal number of messages in single delivery transaction.
REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY
Reasonable number of headers in the votes_ancestries on Polkadot-like chains.
TX_EXTRA_BYTES
Maximal number of bytes, included in the signed Polkadot-like transaction apart from the encoded call itself.

Traits§

Convert
Infallible conversion trait. Generic over both source and destination types.
Parameter
A type that can be used as a parameter in a dispatchable function.
SuffixedCommonTransactionExtensionExt
Helper trait to define some extra methods on SuffixedCommonTransactionExtension.

Functions§

max_extrinsic_size
Returns maximal extrinsic size on all Polkadot-like chains.
max_extrinsic_weight
Returns maximal extrinsic weight on all Polkadot-like chains.

Type Aliases§

AccountAddress
Address of account on Polkadot-like chains.
AccountId
Id of account on Polkadot-like chains.
AccountPublic
Public key of account on Polkadot-like chains.
Address
Account address, used by the Polkadot-like chain.
Balance
The balance of an account on Polkadot-like chain.
Block
Block type of Polkadot-like chains.
BlockNumber
Block number type used in Polkadot-like chains.
CommonTransactionExtension
Signed extension that is used by most chains.
CommonTransactionExtra
Extra signed extension data that is used by most chains.
Hash
Hash type used in Polkadot-like chains.
Hasher
The type of object that can produce hashes on Polkadot-like chains.
Hashing
Hashing type.
Header
The header type used by Polkadot-like chains.
Nonce
Nonce of a transaction on the Polkadot-like chains.
Signature
Signature type used by Polkadot-like chains.
SignedBlock
Polkadot-like block signed with a Justification.
SuffixedCommonTransactionExtension
Extra transaction extension data that starts with CommonTransactionExtra.
UncheckedExtrinsic
Unchecked Extrinsic type.