Crate moonriver_runtime

Source
Expand description

The Moonriver Runtime.

Primary features of this runtime include:

  • Ethereum compatibility
  • Moonriver tokenomics

Re-exports§

pub use governance::councils::*;

Modules§

api
asset_config
Asset configuration for Moonbase.
bridge_config
currency
MOVR, the native token, uses 18 decimals of precision.
genesis_config_preset
Moonriver Chain Specifications and utilities for building them.
governance
Governance configurations
moonriver_xcm_weights
opaque
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 datastructures.
runtime_params
Dynamic runtime parameters for moonriver.
xcm_config
XCM configuration for Moonbase.

Macros§

get

Structs§

AdjustmentVariable
The adjustment variable of the runtime. Higher values will cause TargetBlockFullness to change the fees more rapidly. This low value causes changes to occur slowly over time.
BabeDataGetter
BlockGasLimit
BlockLength
We allow for 5 MB blocks.
BridgeRejectObsoleteHeadersAndMessages
DepositBase
DepositFactor
EthereumXcmEnsureProxy
ExistentialDeposit
FindAuthorAdapter
The author inherent provides a AccountId20, but pallet evm needs an H160. This simple adapter makes the conversion.
GasLimitPovSizeRatio
The amount of gas per pov. A ratio of 8 if we convert ref_time to gas and we compare it with the pov_size for a block. E.g. ceil( (max_extrinsic.ref_time() / max_extrinsic.proof_size()) / WEIGHT_PER_GAS ) We should re-check xcm_config::Erc20XcmBridgeTransferGasLimit when changing this value
GasLimitStorageGrowthRatio
The amount of gas per storage (in bytes): BLOCK_GAS_LIMIT / BLOCK_STORAGE_LIMIT The current definition of BLOCK_STORAGE_LIMIT is 160 KB, resulting in a value of 366.
GenesisAccount
Account definition used for genesis block construction.
InflationInfo
InitializationPayment
LengthToFee
MaintenanceFilter
Maintenance mode Call filter
MaxAdditionalFields
MaxRegistrars
MaxServiceWeight
MaxSignatories
MaxSpendBalance
MaxSubAccounts
MaxSuffixLength
MaxUsernameLength
MaximumMultiplier
Maximum multiplier. We pick a value that is expensive but not impossibly so; it should act as a safety net.
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 in integration_tests.rs. This value is currently only used by pallet-transaction-payment as an assertion that the next multiplier is always > min value.
NormalFilter
Normal Call Filter
OnChargeEVMTransaction
OnInactiveCollator
OnNewRound
OrbiterReserveIdentifier
PalletInfo
Provides an implementation of PalletInfo to provide information about the pallet setup in the runtime.
PayoutCollatorOrOrbiterReward
PendingUsernameExpiration
PostBlockAndTxnHashes
PrecompilesValue
PreimageBaseDeposit
PreimageByteDeposit
PreimageHoldReason
ProposalBond
Range
RelayChainSlotProvider
RelayOrigin
RelaySignaturesThreshold
ReservedDmpWeight
ReservedXcmpWeight
Runtime
RuntimeApi
RuntimeApiImpl
Implements all runtime apis for the client side.
RuntimeBlockWeights
RuntimeGenesisConfig
RuntimeOrigin
The runtime origin type representing the origin of a call.
SignatureNetworkIdentifier
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.
TransactionConverter
TransactionPaymentAsGasPrice
TreasuryAccount
TreasuryId
Version
WeightPerGas
XcmExecutionManager

Enums§

OriginCaller
PrecompileName
ProxyType
The type used to represent the kinds of proxying allowed.
RuntimeCall
The aggregated runtime call type.
RuntimeError
RuntimeEvent
RuntimeFreezeReason
A reason for placing a freeze on funds.
RuntimeHoldReason
A reason for placing a hold on funds.
RuntimeLockId
An identifier for each lock placed on funds.
RuntimeSlashReason
A reason for slashing funds.
RuntimeTask
An aggregation of all Task enums across all pallets included in the current runtime.
RuntimeViewFunction
Runtime query type.

Constants§

BLOCK_STORAGE_LIMIT
The highest amount of new storage that can be created in a block (160KB). Originally 40KB, then multiplied by 4 when the block deadline was increased from 500ms to 2000ms. Reference: https://github.com/moonbeam-foundation/moonbeam/blob/master/MBIPS/MBIP-5.md#specification
DAYS
EXTRINSIC_BASE_WEIGHT
FOREIGN_ASSET_PRECOMPILE_ADDRESS_PREFIX
The asset precompile address prefix. Addresses that match against this prefix will be routed to Erc20AssetsPrecompileSet being marked as foreign
GAS_PER_SECOND
Current approximation of the gas/s consumption considering EVM execution over compiled WASM (on 4.4Ghz CPU). Given the 2000ms Weight, from which 75% only are used for transactions, the total EVM execution gas limit is: GAS_PER_SECOND * 2 * 0.75 ~= 60_000_000.
HOURS
MAXIMUM_BLOCK_WEIGHT
Maximum weight per block
MAX_POV_SIZE
Maximum PoV size we support right now.
MILLISECS_PER_BLOCK
MINUTES
NORMAL_WEIGHT
RUNTIME_API_VERSIONS
VERSION
This runtime version. The spec_version is composed of 2x2 digits. The first 2 digits represent major changes that can’t be skipped, such as data migration upgrades. The last 2 digits represent minor changes which can be skipped.
WASM_BINARY
WASM_BINARY_BLOATY
WASM_BINARY_PATH
WEEKS
WEIGHT_PER_GAS
Approximate ratio of the amount of Weight per Gas. u64 works for approximations because Weight is a very small unit compared to gas.

Traits§

BuildStorage
Complex storage builder stuff.
Get
A trait for querying a single value from a type.
WeightInfo
Weight functions needed for pallet_parachain_staking.

Functions§

native_version
The version information used to identify this runtime when compiled natively.

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.
AccountIndex
The type for looking up accounts. We don’t expect more than 4 billion of them, but you never know…
Address
The address format for describing accounts.
AllPalletsWithSystem
All pallets included in the runtime as a nested tuple of types.
AllPalletsWithoutSystem
All pallets included in the runtime as a nested tuple of types. Excludes the System pallet.
AssetId
AssetId type
AsyncBacking
AuthorFilter
AuthorFilterConfig
AuthorInherent
AuthorMapping
AuthorMappingConfig
Balance
Balance of an account.
Balances
BalancesConfig
Block
Block type as expected by this runtime.
BlockId
BlockId type as expected by this runtime.
BlockNumber
An index to a block.
BridgePolkadotGrandpa
BridgePolkadotGrandpaConfig
BridgePolkadotMessages
BridgePolkadotMessagesConfig
BridgePolkadotParachains
BridgePolkadotParachainsConfig
BridgeXcmOverMoonbeam
BridgeXcmOverMoonbeamConfig
CheckedExtrinsic
Extrinsic type that has already been checked.
ConvictionVoting
CrowdloanRewards
CumulusXcm
DigestItem
Digest item type.
EVM
EVMConfig
EligibilityValue
The type of eligibility to use
EmergencyParaXcm
Erc20XcmBridge
Ethereum
EthereumChainId
EthereumChainIdConfig
EthereumConfig
EthereumXcm
EvmForeignAssets
EvmForeignAssetsConfig
Executive
Executive: handles dispatch to the various pallets.
ForeignAssetMigratorOrigin
Hash
A hash of some data used by the chain.
Header
Block header type as expected by this runtime.
Identity
Index
Index of a transaction in the chain.
MaintenanceMode
MaintenanceModeConfig
MessageQueue
MoonbeamLazyMigrations
MoonbeamOrbiters
MoonriverPrecompiles
The PrecompileSet installed in the Moonriver runtime. We include the nine Istanbul precompiles (https://github.com/ethereum/go-ethereum/blob/3c46f557/core/vm/contracts.go#L69) The following distribution has been decided for the precompiles 0-1023: Ethereum Mainnet Precompiles 1024-2047 Precompiles that are not in Ethereum Mainnet but are neither Moonbeam specific 2048-4095 Moonbeam specific precompiles
MultiBlockMigrations
Multisig
OpenTechCommitteeCollective
OpenTechCommitteeCollectiveConfig
Origins
ParachainInfo
ParachainInfoConfig
ParachainStaking
ParachainStakingConfig
ParachainSystem
Parameters
PolkadotXcm
PolkadotXcmConfig
Precompiles
Preimage
Proxy
ProxyGenesisCompanion
ProxyGenesisCompanionConfig
Randomness
Referenda
RelayStorageRoots
RootTesting
Scheduler
Signature
Alias to 512-bit hash when used in the context of a transaction signature on the chain.
SignedBlock
A Block signed with a Justification
SlowAdjustingFeeUpdate
Parameterized slow adjusting fee updated based on https://research.web3.foundation/Polkadot/overview/token-economics#2-slow-adjusting-mechanism // editorconfig-checker-disable-line
System
SystemConfig
Timestamp
TransactionPayment
TransactionPaymentConfig
Treasury
TreasuryConfig
TreasuryCouncilCollective
TreasuryCouncilCollectiveConfig
TxExtension
The TransactionExtension to the basic transaction logic.
UncheckedExtrinsic
Unchecked extrinsic type as expected by this runtime.
Utility
WeightReclaim
Whitelist
XcmTransactor
XcmWeightTrader
XcmWeightTraderConfig
XcmpQueue