Expand description
Runtime primitives for Subspace Network.
Modules§
- Opaque types. These are used by the CLI to instantiate machinery that don’t need to know the specifics of the runtime. They can then be made to be agnostic over specific formats of data like extrinsics, allowing for them to continue syncing the network through upgrades to even the core data structures.
Structs§
- The adjustment variable of the runtime. Higher values will cause
TargetBlockFullness
to change the fees more rapidly. - 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. Seemultiplier_can_grow_from_zero
. - 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§
- The block weight for 2 seconds of compute
- Subspace Credits have 18 decimal places.
- Maximum block length for non-
Normal
extrinsic is 5 MiB. - Minimum desired number of replicas of the blockchain to be stored by the network, impacts storage fees.
- A ratio of
Normal
dispatch class within block, forBlockWeight
andBlockLength
. - The smallest unit of the token is called Shannon.
- 1 in 6 slots (on average, not counting collisions) will have a block. Must match ratio between block and slot duration in constants above.
- One Subspace Credit.
Traits§
- A trait for finding the address for a block reward based on the
PreRuntime
digests contained within it. - A trait for finding the addresses for voting reward based on transactions found in the block.
- A trait for determining whether rewards are enabled or not
Functions§
- We allow for 3.75 MiB for
Normal
extrinsic with 5 MiB maximum block length.
Type Aliases§
- Some way of identifying an account on the chain. We intentionally make it equivalent to the public key of our transaction signing scheme.
- Balance of an account.
- Block number in Subspace network.
- A hash of some data used by the chain.
- Type used for expressing timestamp.
- Index of a transaction in the chain.
- Alias to 512-bit hash when used in the context of a transaction signature on the chain.
- Parameterized slow adjusting fee updated based on https://research.web3.foundation/Polkadot/overview/token-economics#2-slow-adjusting-mechanism