github moonbeam-foundation/moonbeam runtime-1200
Runtime 1200

latest releases: runtime-2602, v0.41.1, v0.41.0...
2 years ago

Description

This runtime introduces many changes to our Ethereum layer, specially around the EIP 1559. Here are the important parts:

EVM 0.33.1 - London support

Ethereum 0.11.1

Ethereum API - Changes

  • new rpc eth_feeHistory: Returns transaction fee data for up to 1,024 blocks.
  • new property block.baseFeePerGas: baseFeePerGas used for the given block
  • new property transactionReceipt.effectiveGasPrice: gas price being used for the transaction
  • new property transaction.accessList: is an array of type [[{20 bytes}, [{32 bytes}...]]...], storing the contract address and the storage keys. Ex:
    • [
        [
          "0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae",
          [
           "0x0000000000000000000000000000000000000000000000000000000000000003",
           "0x0000000000000000000000000000000000000000000000000000000000000007"
          ]
        ], [
          "0xbb9bc244d798123fde783fcc1c72d3bb8c189413",
          []
        ]
      ]
      
  • new property transaction.maxFeePerGas: how much BaseFee the transaction is allowed to pay.
  • new property transaction.maxPriorityFeePerGas: Correspond to the "tip" to the miner. (Note: It is currently included in the normal fees, being 20% to parachain bond and 80% burnt. This might change in the future)
  • new property transaction.type: The current type of transaction 0 (Legacy), 1 (EIP-2930), 2 (EIP-1559)
  • ⚠️The base fee used in block is currently constant (1Gwei on Moonbase/Moonriver and 100Gwei on Moonbeam). The call the eth_gasPrice will return that value.

Substrate API (PolkadotJS) - Staking query changes - ⚠️Breaking Change⚠️

  • ⚠️ parachainStaking.executeLeaveCandidates added the weight hint parameter CandidateDelegationCount. It was added after the benchmarking was made more accurate, which also increased the transaction weights (fees).

  • ⚠️parachainStaking.candidateState is now deprecated and won't return any data. It is replaced by the following 3 functions :

  • parachainStaking.candidateInfo => Returns the CandidateMetadata structure:

    •  ParachainStakingCandidateMetadata: {
         bond: 'u128',
         delegationCount: 'u32',
         totalCounted: 'u128',
         lowestTopDelegationAmount: 'u128',
         highestBottomDelegationAmount: 'u128',
         lowestBottomDelegationAmount: 'u128',
         topCapacity: 'ParachainStakingCapacityStatus',
         bottomCapacity: 'ParachainStakingCapacityStatus',
         request: 'Option<ParachainStakingCandidateBondLessRequest>',
         status: 'ParachainStakingCollatorStatus' // This was previously named `state`
       }
      
      Exemple:
      {
        bond: 1,000,000,000,000,000,000,000
        delegationCount: 1
        totalCounted: 2,000,000,000,000,000,000,000
        lowestTopDelegationAmount: 1,000,000,000,000,000,000,000
        highestBottomDelegationAmount: 0
        lowestBottomDelegationAmount: 0
        topCapacity: Partial
        bottomCapacity: Empty
        request: null
        status: Active
      }
      
  • parachainStaking.topDelegations => Returns the Delegations structure:

    •  ParachainStakingDelegations: {
         delegations: 'Vec<ParachainStakingBond>',
         total: 'u128'
       }
      
      Exemple:
      {
        delegations: [
          {
            owner: 0xC0F0f4ab324C46e55D02D0033343B4Be8A55532d
            amount: 1,000,000,000,000,000,000,000
          }
        ]
        total: 1,000,000,000,000,000,000,000
      }
      
  • parachainStaking.bottomDelegations => Returns the same Delegations structure as TopDelegations.

  • ⚠️const parachainStaking.maxDelegatorsPerCandidate => is now replaced by maxTopDelegationsPerCandidate

  • const parachainStaking.maxTopDelegationsPerCandidate => the max number (u32) of delegations in the TopDelegations (currently set to 300 on all runtimes)

  • const parachainStaking.maxBottomDelegationsPerCandidate => the max number (u32) of delegations in the BottomDelegations (currently set to 50 on all runtimes). This implies that bottom delegations after 50 will get automatically and instantly revoked (The list, which includes delegations not eligible for rewards, is ordered by staking amount so the lowest staking delegation are the first ones to be revoked)

  • ⚠️event CandidateWentOffline(RoundIndex, T::AccountId) has been replaced by CandidateWentOffline(T::AccountId)

  • ⚠️event CandidateBackOnline(RoundIndex, T::AccountId) has been replaced by CandidateBackOnline(T::AccountId)

  • event DelegationKicked(T::AccountId, T::AccountId, BalanceOf<T>) has been added => This event is sent when the lowest of the BottomDelegations list is kicked (This happens when the top delegations and bottom delegations are full and a new delegation with higher amount is coming)

Substrate API (PolkadotJS) - Asset manager query changes - ⚠️Breaking Change⚠️

  • ⚠️assetManager.asset_id_units_per_second is now deprecated and won't return any data. It is replaced by the following function :

  • assetManager.asset_type_units_per_second => Returns u128 being the amount of units charged for an asset, as asset_id_units_per_second, but its a mapping whose key is the assetType and not the assetId

  • ⚠️assetManager.setAssetsUnitsPerSecond changes from requesting (T::AssetId, u128) to requesting (T::AssetType, u128)

  • ⚠️assetManager.registerAsset accepts an additional boolean parameter is_sufficient, that indicates whether an account can exist in storage just by having asset units

  • ⚠️event UnitsPerSecondChanged(T::AssetId, u128) has been replaced by UnitsPerSecondChanged(T::AssetType, u128)

  • assetManager.asset_type_id => Returns the assetId associated with an assetType (

    pub type AssetTypeId<T: Config> = StorageMap<_, Blake2_128Concat, T::AssetType, T::AssetId>;
    )
  • a new extrinsic change_existing_asset_type, which allows to change the assetId associated to an assetType

Runtimes

Moonbase

✨ spec_version                : 1200
🏋 size                        : 1140744
#️⃣ sha256                      : 0x2bc686a2c640eb09ce47754ea34648224fbf00a9ed0704911336beb0a811b928
#️⃣ blake2-256                  : 0x480e902941988d9a1d0f62f8b4a1aa9abc3bc44fef2c19e82b0d68b4704cc17d
🗳️ proposal (authorizeUpgrade) : 0xa6cc36a14c0e62e060bc87656742d0469778d500dac44b14fe633d77edb55dd8

Moonriver

✨ spec_version                : 1200
🏋 size                        : 1144341
#️⃣ sha256                      : 0xe22d4bd47af1da1ab38b3284d08d2da247e5853428ca19124360c98272e8780e
#️⃣ blake2-256                  : 0xd616498de1a953e89a7dafb719adaf2b344a50562f92940300230219041cf9d1
🗳️ proposal (authorizeUpgrade) : 0x7a9ef6122fe98bef1940de26e5e32145cf89c5919a539c04759954a4c27e3c5a

Moonbeam

✨ spec_version                : 1200
🏋 size                        : 1131782
#️⃣ sha256                      : 0x6074b7b2db2d410b71c8eecfb8b849cc87723a66b677112278c5319f3f0f7baf
#️⃣ blake2-256                  : 0xed658efc35c7949ead7283405e4509377bad584545ca03459fe0babad823af46
🗳️ proposal (authorizeUpgrade) : 0x9fe2446e6caa9d488ed27596e6df26ee9a95eadc94d4d90076cbfacdeae75aa7

Build information

WASM runtime built using rustc 1.56.1 (59eed8a2a 2021-11-01)

Changes

  • Improve stability & performance of EVM tracing Step event (#1033, #1144)
  • Add is_sufficient support for Assets (#1077)
  • Update Frontier/Ethereum/EVM to support Substrate v0.9.13 + EIP-1559 (#1006, #1176, #1178)
  • Add Identity to NonTransfer proxy for all runtimes (#1123)
  • Add eth_feeHistory RPC method (#1126)
  • Add Author mapping precompile (#1129, #1160)
  • Add deposit/withdraw wETH functions to balances ERC20 precompile (#1106, #1145)
  • Add Democracy precompile to Moonriver (#1148)
  • Disable Identity, ParachainStaking and Treasury in MaintenanceMode (#1153)
  • Improve precompiles support for payable/view keywords (#1142)
  • Fix XCM max UMP weight and add transact info migration (#1114)
  • Fix incorrect staking total for candidate bond more and add extrinsic to fix incorrect state (#1162)
  • Enable XCM on moonbeam (#1183)
  • Fix support for U256::MAX value in ERC20 precompiles approve (#1201)
  • Add support for multi-location Statemine prefix breaking change (#1159, #1205, #1220)
  • Fix leftover staking delegation request in execute_leave_candidates and add extrinsic to fix current state (#1207)
  • Add support for Ethereum convert_transaction runtime API (#1217)
  • Optimize Staking candidate election PoV by splitting candidate state (#1117)
  • Increase amount charged for XCM in local unit (#1228)
  • Add DefaultBaseFeePerGas to runtimes (#1233)
  • Runtime 1200 (#1226)

Dependency changes

Moonbeam: runtime-1103...runtime-1200
Substrate: PureStake/substrate@e09e70a...3a5aa8c
Polkadot: PureStake/polkadot@415ce0d...ac51d9b
Cumulus: PureStake/cumulus@1cb6d23...0f82e1f
Frontier: PureStake/frontier@276a54a...b4729e6

Don't miss a new moonbeam release

NewReleases is sending notifications on new releases.