Crate subspace_runtime_primitives

Source
Expand description

Runtime primitives for Subspace Network.

Modules§

opaque
Opaque types.
time
utility
Runtime primitives for pallet-utility.

Structs§

AdjustmentVariable
The adjustment variable of the runtime. Higher values will cause TargetBlockFullness to change the fees more rapidly.
BlockTransactionByteFee
ConsensusEventSegmentSize
Event segments are disabled on the consensus chain.
CouncilDemocracyConfigParams
DomainEventSegmentSize
Event segments are enabled on domain chains, this value was derived from benchmarking.
MaximumMultiplier
The maximum amount of the multiplier.
MinimumMultiplier
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.
TargetBlockFullness
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.
XdmAdjustedWeightToFee
Adjusted XDM Weight to fee Conversion.
XdmFeeMultipler

Enums§

HoldIdentifier

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, for BlockWeight and BlockLength.
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§

CreateUnsigned
Interface for creating an unsigned general extrinsic
FindBlockRewardAddress
A trait for finding the address for a block reward based on the PreRuntime digests contained within it.
FindVotingRewardAddresses
A trait for finding the addresses for voting reward based on transactions found in the block.
RewardsEnabled
A trait for determining whether rewards are enabled or not
StorageFee

Functions§

maximum_normal_block_length
We allow for 3.75 MiB for Normal extrinsic with 5 MiB maximum block length.

Type Aliases§

AccountId
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.
BlockNumber
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.
OnChargeTransactionBalance
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.
SlowAdjustingFeeUpdate
Parameterized slow adjusting fee updated based on https://research.web3.foundation/Polkadot/overview/token-economics#2-slow-adjusting-mechanism