Crate moonbase_runtime

Source
Expand description

The Moonbase Runtime.

Primary features of this runtime include:

  • Ethereum compatibility
  • Moonbase tokenomics

Modules§

api
asset_config
Asset configuration for Moonbase.
currency
UNIT, the native token, uses 18 decimals of precision.
genesis_config_preset
governance
Governance configurations
moonbase_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 data structures.
runtime_params
Dynamic runtime parameters for moonbase.
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 fast multiplier responds by doubling/halving in approximately one hour at extreme block congestion levels.
BabeDataGetter
BlockGasLimit
BlockLength
We allow for 5 MB blocks.
BlockWeights
TODO: this is left here so that impl_runtime_apis_plus_common will find the same type for BlockWeights in all runtimes. It can probably be removed once the custom RuntimeBlockWeights has been pushed to each runtime.
DepositBase
DepositFactor
EthereumXcmEnsureProxy
ExistentialDeposit
FindAuthorAdapter
The author inherent provides an AccountId, but pallet evm needs an H160. This simple adapter makes the conversion for any types T, U such that T: Into
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 (60_000_000 / 160 kb)
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.
NoPreimagePostponement
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 2 sec 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.
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.
CheckedExtrinsic
Extrinsic type that has already been checked.
ConvictionVoting
CrowdloanRewards
CrowdloanRewardsConfig
CumulusXcm
DigestItem
Digest item type.
EVM
EVMConfig
EligibilityValue
The type of eligibility to use
EmergencyParaXcm
Erc20XcmBridge
Ethereum
EthereumChainId
EthereumChainIdConfig
EthereumConfig
EthereumXcm
EvmForeignAssets
Executive
Executive: handles dispatch to the various pallets.
FastAdjustingFeeUpdate
A “Fast” TargetedFeeAdjustment. Parameters chosen based on model described here: https://research.web3.foundation/Polkadot/overview/token-economics#1-fast-adjusting-mechanism
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
MoonbasePrecompiles
The PrecompileSet installed in the Moonbase 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
MoonbeamLazyMigrations
MoonbeamOrbiters
MoonbeamOrbitersConfig
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
Sudo
SudoConfig
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
XcmTransactorConfig
XcmWeightTrader
XcmpQueue