Expand description
Runtime primitives for Subspace Network.
Modules§
Structs§
- Adjustment
Variable - The adjustment variable of the runtime. Higher values will cause
TargetBlockFullness
to change the fees more rapidly. - Block
Transaction Byte Fee - Consensus
Event Segment Size - Event segments are disabled on the consensus chain.
- Council
Democracy Config Params - Domain
Event Segment Size - Event segments are enabled on domain chains, this value was derived from benchmarking.
- 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
. - 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. - XdmAdjusted
Weight ToFee - Adjusted XDM Weight to fee Conversion.
- XdmFee
Multipler
Enums§
Constants§
- BLOCK_
WEIGHT_ FOR_ 2_ SEC - The block weight for 2 seconds of compute
- DECIMAL_
PLACES - Subspace Credits have 18 decimal places.
- DOMAINS_
BLOCK_ PRUNING_ DEPTH - Domains Block pruning depth.
- DOMAINS_
PRUNING_ DEPTH_ MULTIPLIER - Pruning depth multiplier for state and blocks pruning.
- MAX_
BLOCK_ LENGTH - Maximum block length for non-
Normal
extrinsic is 5 MiB. - MAX_
CALL_ RECURSION_ DEPTH - The maximum recursion depth we allow when parsing calls. This is a safety measure to avoid stack overflows.
- MIN_
REPLICATION_ FACTOR - Minimum desired number of replicas of the blockchain to be stored by the network, impacts storage fees.
- NORMAL_
DISPATCH_ RATIO - A ratio of
Normal
dispatch class within block, forBlockWeight
andBlockLength
. - SHANNON
- The smallest unit of the token is called Shannon.
- SLOT_
PROBABILITY - 1 in 6 slots (on average, not counting collisions) will have a block. Must match ratio between block and slot duration in constants above.
- SSC
- One Subspace Credit.
Traits§
- Create
Unsigned - Interface for creating an unsigned general extrinsic
- Find
Block Reward Address - A trait for finding the address for a block reward based on the
PreRuntime
digests contained within it. - Find
Voting Reward Addresses - A trait for finding the addresses for voting reward based on transactions found in the block.
- Rewards
Enabled - A trait for determining whether rewards are enabled or not
- Storage
Fee
Functions§
- maximum_
normal_ block_ length - We allow for 3.75 MiB for
Normal
extrinsic with 5 MiB maximum block length.
Type Aliases§
- Account
Id - Some way of identifying an account on the chain. We intentionally make it equivalent to the public key of our transaction signing scheme.
- Balance
- Balance of an account.
- Block
Number - Block number in Subspace network.
- Hash
- A hash of some data used by the chain.
- Moment
- Type used for expressing timestamp.
- Nonce
- Index of a transaction in the chain.
- OnCharge
Transaction Balance - Balance type pointing to the OnChargeTransaction trait.
- Signature
- Alias to 512-bit hash when used in the context of a transaction signature on the chain.
- Slow
Adjusting FeeUpdate - Parameterized slow adjusting fee updated based on https://research.web3.foundation/Polkadot/overview/token-economics#2-slow-adjusting-mechanism