Expand description
Common runtime code for the Relay Chain, e.g. Rococo, Westend, Polkadot, Kusama …
Re-exports§
pub use impls::ToAuthor;
Modules§
- assigned_
slots - 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). - auctions
- 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.
- claims
- Pallet to process claims from Ethereum addresses.
- crowdloan
- Parachain
Crowdloaning
pallet - elections
- Code for elections.
- identity_
migrator - This pallet is designed to go into a source chain and destination chain to migrate data. The design motivations are:
- impls
- Auxiliary
struct
/enum
s for polkadot runtime. - paras_
registrar - Pallet to handle parachain registration and related fund management.
In essence this is a simple wrapper around
paras
. - paras_
sudo_ wrapper - A simple wrapper allowing
Sudo
to call intoparas
routines. - purchase
- Pallet to process purchase of DOTs.
- slot_
range - The
SlotRange
struct which succinctly handles the 36 values that represent all sub ranges between 0 and 7 inclusive. - slots
- 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
- Traits used across pallets for Polkadot.
- try_
runtime - Common try-runtime only tests for runtimes.
- xcm_
sender - XCM sender for relay chain.
Macros§
- impl_
elections_ weights - Implements the weight types for the elections module and a specific
runtime.
This macro should not be called directly; use
impl_runtime_weights
instead. - impl_
runtime_ weights - 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. - prod_
or_ fast - 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 thefast-runtime
feature is selected) or one of two testing values depending on feature. Note that the environment variable is evaluated at compile time.
Structs§
- Adjustment
Variable - The adjustment variable of the runtime. Higher values will cause
TargetBlockFullness
to change the fees more rapidly. - Assignment
Session KeyPlaceholder - A placeholder since there is currently no provided session key handler for parachain validator keys.
- Balance
ToU256 - Convert a balance to an unsigned 256-bit number, use in nomination pools.
- Block
Hash Count - Block
Length - Maximum length of block. Up to 5MB.
- Maximum
Multiplier - The maximum amount of the multiplier.
- Minimum
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. Seemultiplier_can_grow_from_zero
. - Parachain
Session KeyPlaceholder - A placeholder since there is currently no provided session key handler for parachain validator keys.
- Staking
Benchmarking Config - A reasonable benchmarking config for staking pallet.
- Target
Block Fullness - 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. - U256
ToBalance - Convert an unsigned 256-bit number to balance, use in nomination pools.
Enums§
- Balances
Call - Contains a variant per dispatchable extrinsic that this pallet has.
- Staker
Status - Representation of the status of a staker.
- Timestamp
Call - Contains a variant per dispatchable extrinsic that this pallet has.
Constants§
- AVERAGE_
ON_ INITIALIZE_ RATIO - 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%
. - MAXIMUM_
BLOCK_ WEIGHT - We allow for 2 seconds of compute with a 6 second average block time. The storage proof size is not limited so far.
- NORMAL_
DISPATCH_ RATIO - We allow
Normal
extrinsics to fill up the block up to 75%, the rest can be used by Operational extrinsics.
Traits§
- Bounded
- Numbers which have upper and lower bounds
- Build
Storage - Complex storage builder stuff.
Type Aliases§
- Currency
ToVote - The type used for currency conversion.
- Negative
Imbalance Deprecated - Slow
Adjusting FeeUpdate - Parameterized slow adjusting fee updated based on https://research.web3.foundation/Polkadot/overview/token-economics#2-slow-adjusting-mechanism