Expand description

Common runtime code for Darwinia and Crab.

Re-exports

pub use gov_origin::*;
pub use impls::*;

Modules

Implementations of some helper traits passed into runtime modules as associated types. Auxillary struct/enums for Darwinia runtime.

Macros

Structs

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

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

Instance2 to be used for instantiable pallet define with pallet macro.

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 limit for off-chain phragmen unsigned solution length.

A limit for off-chain phragmen unsigned solution submission.

Instance1 to be used for instantiable pallet define with pallet macro.

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

Maximum length of block. Up to 5MB.

Block weights base values and limits.

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.

Constants

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

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

Maximum number of iterations for balancing that will be executed in the embedded miner of pallet-election-provider-multi-phase.

We allow Normal extrinsics to fill up the block up to 75%, the rest can be used by Operational extrinsics.

Type Definitions

The election provider of the genesis

The accuracy type used for genesis election provider;

Parameterized slow adjusting fee updated based on https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html#-2.-slow-adjusting-mechanism