referrerpolicy=no-referrer-when-downgrade

Crate polkadot_runtime_common

source ·
Expand description

Common runtime code for the Relay Chain, e.g. Rococo, Westend, Polkadot, Kusama …

Re-exports§

Modules§

  • This pallet allows to assign permanent (long-lived) or temporary (short-lived) parachain slots to paras, leveraging the existing parachain slot lease mechanism. Temporary slots are given turns in a fair (though best-effort) manner. The dispatchables must be called from the configured origin (typically Sudo or a governance origin). This pallet should not be used on a production relay chain, only on a test relay chain (e.g. Rococo).
  • 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.
  • This pallet is designed to go into a source chain and destination chain to migrate data. The design motivations are:
  • Auxiliary struct/enums for polkadot runtime.
  • Pallet to handle 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.
  • Common try-runtime only tests for runtimes.
  • XCM sender for relay chain.

Macros§

  • Implements the weight types for the elections module and a specific runtime. This macro should not be called directly; use impl_runtime_weights instead.
  • Implements the weight types for a runtime. It expects the passed runtime constants to contain a weights module. The generated weight types were formerly part of the common runtime but are now runtime dependant.
  • Macro to set a value (e.g. when using the parameter_types macro) to either a production value or to an environment variable or testing value (in case the fast-runtime feature is selected) or one of two testing values depending on feature. Note that the environment variable is evaluated at compile time.

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.
  • Convert a balance to an unsigned 256-bit number, use in nomination pools.
  • Maximum length of block. Up to 5MB.
  • The maximum amount of the multiplier.
  • 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.
  • A reasonable benchmarking config for staking pallet.
  • 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.
  • Convert an unsigned 256-bit number to balance, use in nomination pools.

Enums§

  • Contains a variant per dispatchable extrinsic that this pallet has.
  • Representation of the status of a staker.
  • Contains a variant per dispatchable extrinsic that this pallet has.

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. The storage proof size is not limited so far.
  • We allow Normal extrinsics to fill up the block up to 75%, the rest can be used by Operational extrinsics.

Traits§

Type Aliases§