Crate polkadot_runtime_common[][src]

Expand description

Common runtime code for Polkadot and Kusama.

Re-exports

pub use elections::OffchainSolutionLengthLimit;
pub use elections::OffchainSolutionWeightLimit;
pub use impls::ToAuthor;

Modules

Auctioning system to determine the set of Parachains in operation. This includes logic for the auctioning mechanism and for reserving balance as part of the “payment”. Unreserving the balance happens elsewhere.

Pallet to process claims from Ethereum addresses.

Parachain Crowdloaning pallet

Code for elections.

Auxiliary struct/enums for polkadot runtime.

Pallet to handle parathread/parachain registration and related fund management. In essence this is a simple wrapper around paras.

A simple wrapper allowing Sudo to call into paras routines.

Pallet to process purchase of DOTs.

The SlotRange struct which succinctly handles the 36 values that represent all sub ranges between 0 and 7 inclusive.

Parathread and parachains leasing system. Allows para IDs to be claimed, the code and data to be initialized and parachain slots (i.e. continuous scheduling) to be leased. Also allows for parachains and parathreads to be swapped.

Traits used across pallets for Polkadot.

XCM sender for relay chain.

Structs

The adjustment variable of the runtime. Higher values will cause TargetBlockFullness to change the fees more rapidly.

A placeholder since there is currently no provided session key handler for parachain validator keys.

Importing a block with 0 txs takes ~5 ms

Maximum length of block. Up to 5MB.

Block weights base values and limits.

Executing 10,000 System remarks (no-op) txs takes ~1.26 seconds -> ~125 µs per tx

Minimum amount of the multiplier. This value cannot be too low. A test case should ensure that combined with AdjustmentVariable, we can recover from the minimum. See multiplier_can_grow_from_zero.

A placeholder since there is currently no provided session key handler for parachain validator keys.

By default, Substrate uses RocksDB, so this will be the weight used throughout the runtime.

The portion of the NORMAL_DISPATCH_RATIO that we adjust the fees with. Blocks filled less than this will decrease the weight and more will increase.

Enums

Contains one variant per dispatchable that can be called by an extrinsic.

Indicates the initial status of the staker.

Contains one variant per dispatchable that can be called by an extrinsic.

Constants

We assume that an on-initialize consumes 1% of the weight on average, hence a single extrinsic will not be allowed to consume more than AvailableBlockRatio - 1%.

We allow for 2 seconds of compute with a 6 second average block time.

Traits

Complex storage builder stuff.

Type Definitions

The type used for currency conversion.

Parameterized slow adjusting fee updated based on https://w3f-research.readthedocs.io/en/latest/polkadot/Token%20Economics.html#-2.-slow-adjusting-mechanism