Crate common_runtime

source ·

Modules

Structs

The adjustment variable of the runtime. Higher values will cause TargetBlockFullness to change the fees more rapidly.
Basilisk base weight of an extrinsic This includes weight for payment in non-native currency.
Maximum length of block. Up to 5MB.
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.
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.
Opaque, encoded, unchecked extrinsic. Simple blob to hold an extrinsic without committing to its format and ensure it is serialized correctly.

Enums

The type used to represent the kinds of proxying allowed.

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%.
Core asset id
Discounted XYK fee
Max fraction of pool to sell in single transaction
Max fraction of pool to buy in single transaction
Since BABE is probabilistic this is the average expected block time that we are targeting. Blocks will be produced at a minimum duration defined by SLOT_DURATION, but some slots will not be allocated to any authority and hence no block will be produced. We expect to have this block time on average following the defined slot duration and the value of c configured for BABE (where 1 - c represents the probability of a slot being empty). This value is only used indirectly to define the unit constants below that are expressed in blocks. The rest of the code should use SLOT_DURATION instead (like the Timestamp pallet for calculating the minimum period).
Minimum pool liquidity
Trading limit
We allow Normal extrinsics to fill up the block up to 75%, the rest can be used by Operational extrinsics.

Functions

Type Definitions

Some way of identifying an account on the chain. We intentionally make it equivalent to the public key of our transaction signing scheme.
The type for looking up accounts. We don’t expect more than 4 billion of them, but you never know…
Signed version of Balance
Type for storing the id of an asset.
Type for storing the balance of an account.
Block type.
An index to a block.
A hash of some data used by the chain.
Header type.
Index of a transaction in the chain.
Fee multiplier.
Alias to 512-bit hash when used in the context of a transaction signature on the chain.