Crate domain_runtime_primitives

Source
Expand description

Common primitives for subspace domain runtime.

Modules§

opaque
Opaque types.

Structs§

AccountId20
A fully Ethereum-compatible AccountId. Conforms to H160 address and ECDSA key standards. Alternative to H256->H160 mapping.
AccountId20Converter
An AccountId20 to MultiAccount converter.
AccountIdConverter
An AccountId32 to MultiAccount converter.
CheckExtrinsicsValidityError
DecodeExtrinsicError
EVMSignature
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.

Enums§

HoldIdentifier
MultiAccountId
MultiAccountId used by all the domains to describe their account type.

Constants§

CHECK_EXTRINSICS_AND_DO_PRE_DISPATCH_METHOD_NAME
Fully qualified method name of check_extrinsics_and_do_pre_dispatch runtime api. Used to call state machine. Change it when the runtime api’s name is changed in the interface.
DEFAULT_EXTENSION_VERSION
Default version of the Extension used to construct the inherited implication for legacy transactions.
ERR_BALANCE_OVERFLOW
Custom error when balance overflow occurs.
ERR_CONTRACT_CREATION_NOT_ALLOWED
Custom error when a user tries to create a contract, but their account is not on the allow list.
ERR_NONCE_OVERFLOW
Custom error when nonce overflow occurs.
EXISTENTIAL_DEPOSIT
Computed as ED = Account data size * Price per byte, where Price per byte = Min Number of validators * Storage duration (years) * Storage cost per year Account data size (80 bytes) Min Number of redundant validators (10) - For a stable and redundant blockchain we need at least a certain number of full nodes/collators. Storage duration (1 year) - It is theoretically unlimited, accounts will stay around while the chain is alive. Storage cost per year of (12 * 1e-9 * 0.1 ) - SSD storage on cloud hosting costs about 0.1 USD per Gb per month
MAX_OUTGOING_MESSAGES
NORMAL_DISPATCH_RATIO
Dispatch ratio for domains
SLOT_DURATION
Slot duration that is same as consensus chain runtime.

Traits§

Signer
Extracts the signer from an unchecked extrinsic.
TryConvertBack
Extensible conversion trait. Generic over both source and destination types.

Functions§

block_weights
maximum_block_length
Maximum block length for all dispatches. This is set to 3.75 MiB since consensus chain supports on 3.75 MiB for normal
maximum_domain_block_weight
The maximum domain block weight with 3.25 MiB as proof size Consensus allows 3.75 MiB but Fraud proof can carry extra size along with proof size So we set the proof size to 3.25 MiB

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.
Address
The address format for describing accounts.
Balance
Balance of an account.
BlockNumber
An index to a block.
EVMChainId
The EVM chain Id type
EthereumAccountId
Some way of identifying an account on the EVM chain. We intentionally make it equivalent to the public key of the EVM transaction signing scheme.
EthereumSignature
Alias to 512-bit hash when used in the context of a transaction signature on the EVM chain.
Hash
A hash of some data used by the chain.
Nonce
Index of a transaction in the chain.
Signature
Alias to 512-bit hash when used in the context of a transaction signature on the chain.