From 050af7e176d95b0e0f61f59d8ca009495825b6c5 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 29 Feb 2024 21:53:14 +0000 Subject: [PATCH 01/80] Use polkadot-sdk to version 1.7.2 --- Cargo.lock | 5714 ++++++++--------- Cargo.toml | 723 +-- client/rpc-core/txpool/src/types/mod.rs | 2 +- client/rpc/debug/src/lib.rs | 7 +- client/rpc/manual-xcm/src/lib.rs | 38 +- client/rpc/trace/src/lib.rs | 4 +- client/vrf/Cargo.toml | 14 +- client/vrf/src/lib.rs | 4 +- node/cli/src/cli.rs | 4 +- node/cli/src/command.rs | 45 +- node/service/Cargo.toml | 1 + node/service/src/chain_spec/moonbase.rs | 215 +- node/service/src/chain_spec/moonbeam.rs | 210 +- node/service/src/chain_spec/moonriver.rs | 208 +- node/service/src/chain_spec/test_spec.rs | 120 +- node/service/src/client.rs | 10 +- node/service/src/lib.rs | 48 +- node/service/src/rpc.rs | 4 +- pallets/asset-manager/src/benchmarks.rs | 24 +- pallets/asset-manager/src/mock.rs | 12 +- pallets/erc20-xcm-bridge/src/erc20_matcher.rs | 46 +- pallets/erc20-xcm-bridge/src/erc20_trap.rs | 8 +- pallets/erc20-xcm-bridge/src/lib.rs | 64 +- pallets/erc20-xcm-bridge/src/mock.rs | 2 +- .../erc20-xcm-bridge/src/xcm_holding_ext.rs | 31 +- pallets/ethereum-xcm/src/mock.rs | 2 +- pallets/moonbeam-lazy-migrations/src/mock.rs | 2 +- pallets/moonbeam-orbiters/src/mock.rs | 2 +- .../src/generic/benchmarking.rs | 2 +- .../src/generic/mock.rs | 49 +- pallets/moonbeam-xcm-benchmarks/src/mock.rs | 35 +- .../src/weights/fungible.rs | 8 +- .../src/weights/mod.rs | 70 +- pallets/parachain-staking/src/lib.rs | 4 +- pallets/parachain-staking/src/mock.rs | 2 +- pallets/proxy-genesis-companion/src/mock.rs | 2 +- pallets/xcm-transactor/src/benchmarks.rs | 44 +- pallets/xcm-transactor/src/lib.rs | 154 +- pallets/xcm-transactor/src/mock.rs | 102 +- pallets/xcm-transactor/src/tests.rs | 309 +- precompiles/assets-erc20/src/mock.rs | 2 +- precompiles/author-mapping/src/mock.rs | 2 +- precompiles/balances-erc20/src/mock.rs | 2 +- precompiles/batch/src/mock.rs | 2 +- precompiles/call-permit/src/mock.rs | 2 +- precompiles/collective/src/mock.rs | 2 +- precompiles/conviction-voting/src/mock.rs | 2 +- precompiles/crowdloan-rewards/Cargo.toml | 27 +- precompiles/crowdloan-rewards/src/mock.rs | 29 +- precompiles/gmp/src/mock.rs | 83 +- precompiles/gmp/src/types.rs | 8 +- precompiles/identity/src/lib.rs | 51 +- precompiles/identity/src/mock.rs | 2 +- precompiles/identity/src/tests.rs | 26 +- precompiles/parachain-staking/src/mock.rs | 2 +- precompiles/precompile-registry/src/mock.rs | 2 +- precompiles/preimage/src/mock.rs | 2 +- precompiles/proxy/src/mock.rs | 2 +- precompiles/randomness/src/mock.rs | 2 +- precompiles/referenda/src/mock.rs | 2 +- precompiles/relay-data-verifier/src/mock.rs | 2 +- precompiles/relay-encoder/Cargo.toml | 27 +- precompiles/relay-encoder/src/lib.rs | 2 + precompiles/relay-encoder/src/mock.rs | 96 +- precompiles/utils/src/solidity/codec/xcm.rs | 13 +- precompiles/utils/src/tests.rs | 51 +- precompiles/utils/tests-external/lib.rs | 2 +- precompiles/xcm-transactor/src/functions.rs | 83 +- precompiles/xcm-transactor/src/mock.rs | 83 +- precompiles/xcm-transactor/src/tests.rs | 64 +- precompiles/xcm-transactor/src/v1/mod.rs | 18 +- precompiles/xcm-transactor/src/v2/mod.rs | 14 +- precompiles/xcm-transactor/src/v3/mod.rs | 14 +- precompiles/xcm-utils/XcmUtils.sol | 2 +- precompiles/xcm-utils/src/lib.rs | 16 +- precompiles/xcm-utils/src/mock.rs | 90 +- precompiles/xcm-utils/src/tests.rs | 28 +- precompiles/xtokens/Xtokens.sol | 10 +- precompiles/xtokens/src/lib.rs | 69 +- precompiles/xtokens/src/mock.rs | 85 +- precompiles/xtokens/src/tests.rs | 262 +- primitives/xcm/src/asset_id_conversions.rs | 16 +- primitives/xcm/src/fee_handlers.rs | 132 +- primitives/xcm/src/filter_asset_max_fee.rs | 10 +- primitives/xcm/src/origin_conversion.rs | 33 +- primitives/xcm/src/transactor_traits.rs | 4 +- runtime/common/src/apis.rs | 44 +- runtime/common/src/migrations.rs | 2 +- .../src/weights/cumulus_pallet_xcmp_queue.rs | 36 +- runtime/common/src/weights/pallet_balances.rs | 4 + runtime/common/src/weights/pallet_identity.rs | 52 +- runtime/common/src/weights/pallet_sudo.rs | 4 + runtime/common/src/weights/pallet_xcm.rs | 12 + runtime/moonbase/Cargo.toml | 658 +- runtime/moonbase/src/lib.rs | 90 +- runtime/moonbase/src/precompiles.rs | 13 +- runtime/moonbase/src/xcm_config.rs | 150 +- runtime/moonbase/tests/integration_test.rs | 122 +- runtime/moonbase/tests/xcm_mock/parachain.rs | 123 +- .../moonbase/tests/xcm_mock/relay_chain.rs | 31 +- .../moonbase/tests/xcm_mock/statemint_like.rs | 103 +- runtime/moonbase/tests/xcm_tests.rs | 662 +- runtime/moonbeam/Cargo.toml | 632 +- runtime/moonbeam/src/lib.rs | 86 +- runtime/moonbeam/src/precompiles.rs | 13 +- runtime/moonbeam/src/xcm_config.rs | 149 +- runtime/moonbeam/tests/integration_test.rs | 96 +- runtime/moonbeam/tests/xcm_mock/parachain.rs | 62 +- .../moonbeam/tests/xcm_mock/relay_chain.rs | 14 +- .../moonbeam/tests/xcm_mock/statemint_like.rs | 40 +- runtime/moonbeam/tests/xcm_tests.rs | 374 +- runtime/moonriver/Cargo.toml | 628 +- runtime/moonriver/src/lib.rs | 84 +- runtime/moonriver/src/precompiles.rs | 13 +- runtime/moonriver/src/xcm_config.rs | 149 +- runtime/moonriver/tests/integration_test.rs | 86 +- runtime/moonriver/tests/xcm_mock/parachain.rs | 65 +- .../moonriver/tests/xcm_mock/relay_chain.rs | 14 +- .../tests/xcm_mock/statemine_like.rs | 40 +- runtime/moonriver/tests/xcm_tests.rs | 396 +- 120 files changed, 7399 insertions(+), 7471 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7e3c6a96ce..1893ca3270 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,8 +28,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface", - "sp-std", + "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -47,7 +47,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli 0.28.0", + "gimli 0.28.1", ] [[package]] @@ -56,25 +56,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" -dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "aead" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", -] - [[package]] name = "aead" version = "0.5.2" @@ -87,84 +68,27 @@ dependencies = [ [[package]] name = "aes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" -dependencies = [ - "aes-soft", - "aesni", - "cipher 0.2.5", -] - -[[package]] -name = "aes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" -dependencies = [ - "cfg-if", - "cipher 0.3.0", - "cpufeatures", - "opaque-debug 0.3.0", -] - -[[package]] -name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher 0.4.4", "cpufeatures", ] -[[package]] -name = "aes-gcm" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" -dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "cipher 0.3.0", - "ctr 0.8.0", - "ghash 0.4.4", - "subtle 2.4.1", -] - [[package]] name = "aes-gcm" version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ - "aead 0.5.2", - "aes 0.8.3", + "aead", + "aes", "cipher 0.4.4", - "ctr 0.9.2", - "ghash 0.5.0", - "subtle 2.4.1", -] - -[[package]] -name = "aes-soft" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher 0.2.5", - "opaque-debug 0.3.0", -] - -[[package]] -name = "aesni" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" -dependencies = [ - "cipher 0.2.5", - "opaque-debug 0.3.0", + "ctr", + "ghash", + "subtle 2.5.0", ] [[package]] @@ -178,23 +102,23 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.11", + "getrandom 0.2.12", "once_cell", "version_check", "zerocopy", @@ -247,9 +171,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" dependencies = [ "anstyle", "anstyle-parse", @@ -261,43 +185,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" [[package]] name = "approx" @@ -310,24 +234,18 @@ dependencies = [ [[package]] name = "aquamarine" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df752953c49ce90719c7bf1fc587bc8227aed04732ea0c0f85e5397d7fdbd1a1" +checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" dependencies = [ "include_dir", "itertools 0.10.5", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.52", ] -[[package]] -name = "arc-swap" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" - [[package]] name = "ark-bls12-377" version = "0.4.0" @@ -339,6 +257,18 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c7021f180a0cbea0380eba97c2af3c57074cdaffe0eef7e840e1c9f2841e55" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-bls12-381" version = "0.4.0" @@ -351,6 +281,45 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-bls12-381-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1dc4b3d08f19e8ec06e949712f95b8361e43f1391d94f65e4234df03480631c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-bw6-761" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e0605daf0cc5aa2034b78d008aaf159f56901d92a52ee4f6ecdfdac4f426700" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bw6-761-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccee5fba47266f460067588ee1bf070a9c760bf2050c1c509982c5719aadb4f2" +dependencies = [ + "ark-bw6-761", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ec" version = "0.4.2" @@ -365,9 +334,35 @@ dependencies = [ "hashbrown 0.13.2", "itertools 0.10.5", "num-traits", + "rayon", "zeroize", ] +[[package]] +name = "ark-ed-on-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b10d901b9ac4b38f9c32beacedfadcdd64e46f8d7f8e88c1ae1060022cf6f6c6" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ed-on-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524a4fb7540df2e1a8c2e67a83ba1d1e6c3947f4f9342cc2359fc2e789ad731d" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ed-on-bls12-381-bandersnatch" version = "0.4.0" @@ -380,6 +375,19 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15185f1acb49a07ff8cbe5f11a1adc5a93b19e211e325d826ae98e98e124346" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ff" version = "0.4.2" @@ -423,6 +431,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-models-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e9eab5d4b5ff2f228b763d38442adc9b084b0a465409b059fac5c2308835ec2" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", +] + [[package]] name = "ark-poly" version = "0.4.2" @@ -438,9 +459,9 @@ dependencies = [ [[package]] name = "ark-scale" -version = "0.0.11" +version = "0.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51bd73bb6ddb72630987d37fa963e99196896c0d0ea81b7c894567e74a2f83af" +checksum = "5f69c00b3b529be29528a6f2fd5fa7b1790f8bed81b9cdca17e326538545a179" dependencies = [ "ark-ec", "ark-ff", @@ -453,7 +474,7 @@ dependencies = [ [[package]] name = "ark-secret-scalar" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-ec", "ark-ff", @@ -461,7 +482,7 @@ dependencies = [ "ark-std", "ark-transcript", "digest 0.10.7", - "rand_core 0.6.4", + "getrandom_or_panic", "zeroize", ] @@ -496,12 +517,13 @@ checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", "rand 0.8.5", + "rayon", ] [[package]] name = "ark-transcript" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-ff", "ark-serialize", @@ -519,9 +541,9 @@ checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" [[package]] name = "array-bytes" -version = "6.2.0" +version = "6.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de17a919934ad8c5cc99a1a74de4e2dab95d6121a8f27f94755ff525b630382c" +checksum = "6f840fb7195bcfc5e17ea40c26e5ce6d5b9ce5d584466e17703209657e459ae0" [[package]] name = "arrayref" @@ -538,41 +560,19 @@ dependencies = [ "nodrop", ] -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" -[[package]] -name = "asn1-rs" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ff05a702273012438132f449575dbc804e27b2f3cbe3069aa237d26c98fa33" -dependencies = [ - "asn1-rs-derive 0.1.0", - "asn1-rs-impl", - "displaydoc", - "nom", - "num-traits", - "rusticata-macros", - "thiserror", - "time", -] - [[package]] name = "asn1-rs" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" dependencies = [ - "asn1-rs-derive 0.4.0", + "asn1-rs-derive", "asn1-rs-impl", "displaydoc", "nom", @@ -582,18 +582,6 @@ dependencies = [ "time", ] -[[package]] -name = "asn1-rs-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8b7511298d5b7784b40b092d9e9dcd3a627a5707e4b5e507931ab0d44eeebf" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "synstructure", -] - [[package]] name = "asn1-rs-derive" version = "0.4.0" @@ -619,14 +607,14 @@ dependencies = [ [[package]] name = "assert_cmd" -version = "2.0.12" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88903cb14723e4d4003335bb7f8a14f27691649105346a0f0957466c096adfe6" +checksum = "ed72493ac66d5804837f480ab3766c72bdfab91a65e565fc54fa9e42db0073a8" dependencies = [ "anstyle", - "bstr 1.8.0", + "bstr 1.9.1", "doc-comment", - "predicates 3.0.4", + "predicates 3.1.0", "predicates-core", "predicates-tree", "wait-timeout", @@ -641,7 +629,7 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-backing-primitives" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.3.0#a34e9ba41e4411ebb806cc71ee5a15ad99de157a" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" dependencies = [ "sp-api", "sp-consensus-slots", @@ -660,28 +648,28 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37875bd9915b7d67c2f117ea2c30a0989874d0b2cb694fe25403c85763c0c9e" +checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" dependencies = [ "concurrent-queue", - "event-listener 3.1.0", - "event-listener-strategy", + "event-listener 5.2.0", + "event-listener-strategy 0.5.0", "futures-core", "pin-project-lite 0.2.13", ] [[package]] name = "async-executor" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0c4a4f319e45986f347ee47fef8bf5e81c9abc3f6f58dc2391439f30df65f0" +checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" dependencies = [ - "async-lock 2.8.0", + "async-lock 3.3.0", "async-task", "concurrent-queue", "fastrand 2.0.1", - "futures-lite 1.13.0", + "futures-lite 2.2.0", "slab", ] @@ -719,22 +707,21 @@ dependencies = [ [[package]] name = "async-io" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9d5715c2d329bf1b4da8d60455b99b187f27ba726df2883799af9af60997" +checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" dependencies = [ - "async-lock 3.1.0", + "async-lock 3.3.0", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.0.1", + "futures-lite 2.2.0", "parking", - "polling 3.3.0", - "rustix 0.38.24", + "polling 3.5.0", + "rustix 0.38.31", "slab", "tracing", - "waker-fn", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -748,12 +735,12 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb2ab2aa8a746e221ab826c73f48bc6ba41be6763f0855cb249eb6d154cf1d7" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ - "event-listener 3.1.0", - "event-listener-strategy", + "event-listener 4.0.3", + "event-listener-strategy 0.4.0", "pin-project-lite 0.2.13", ] @@ -781,7 +768,7 @@ dependencies = [ "cfg-if", "event-listener 3.1.0", "futures-lite 1.13.0", - "rustix 0.38.24", + "rustix 0.38.31", "windows-sys 0.48.0", ] @@ -791,13 +778,13 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" dependencies = [ - "async-io 2.2.0", + "async-io 2.3.1", "async-lock 2.8.0", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.24", + "rustix 0.38.31", "signal-hook-registry", "slab", "windows-sys 0.48.0", @@ -805,19 +792,19 @@ dependencies = [ [[package]] name = "async-task" -version = "4.5.0" +version = "4.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" +checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -855,26 +842,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] -name = "atty" -version = "0.2.14" +name = "atomic-write-file" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +checksum = "a8204db279bf648d64fe845bd8840f78b39c8132ed4d6a4194c3b10d4b4cfb0b" dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", + "nix 0.28.0", + "rand 0.8.5", ] [[package]] name = "auto_impl" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.52", ] [[package]] @@ -894,14 +879,14 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", - "object 0.32.1", + "object 0.32.2", "rustc-demangle", ] [[package]] name = "bandersnatch_vrfs" -version = "0.0.1" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +version = "0.0.4" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-bls12-381", "ark-ec", @@ -911,11 +896,13 @@ dependencies = [ "ark-std", "dleq_vrf", "fflonk", - "merlin 3.0.0", + "merlin", "rand_chacha 0.3.1", "rand_core 0.6.4", "ring 0.1.0", "sha2 0.10.8", + "sp-ark-bls12-381", + "sp-ark-ed-on-bls12-381-bandersnatch", "zeroize", ] @@ -925,12 +912,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - [[package]] name = "base16ct" version = "0.2.0" @@ -945,9 +926,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -957,9 +938,9 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "basic-toml" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f2139706359229bfa8f19142ac1155b4b80beafb7a60471ac5dd109d4a19778" +checksum = "2db21524cad41c5591204d22d75e1970a2d1f71060214ca931dc7d5afe2c14e5" dependencies = [ "serde", ] @@ -975,8 +956,8 @@ dependencies = [ [[package]] name = "binary-merkle-tree" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "13.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "hash-db 0.16.0", "log", @@ -1003,13 +984,13 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "prettyplease 0.2.15", + "prettyplease 0.2.16", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -1025,7 +1006,7 @@ dependencies = [ "rand_core 0.6.4", "ripemd", "sha2 0.10.8", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] @@ -1036,6 +1017,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ "bitcoin_hashes", + "rand 0.8.5", + "rand_core 0.6.4", + "serde", + "unicode-normalization", ] [[package]] @@ -1052,9 +1037,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "bitvec" @@ -1064,6 +1049,7 @@ checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ "funty", "radium", + "serde", "tap", "wyz", ] @@ -1134,18 +1120,6 @@ dependencies = [ "constant_time_eq 0.3.0", ] -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding 0.1.5", - "byte-tools", - "byteorder", - "generic-array 0.12.4", -] - [[package]] name = "block-buffer" version = "0.9.0" @@ -1164,52 +1138,27 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "block-modes" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" -dependencies = [ - "block-padding 0.2.1", - "cipher 0.2.5", -] - -[[package]] -name = "block-padding" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -dependencies = [ - "byte-tools", -] - -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - [[package]] name = "blocking" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ - "async-channel 2.1.0", - "async-lock 3.1.0", + "async-channel 2.2.0", + "async-lock 3.3.0", "async-task", "fastrand 2.0.1", "futures-io", - "futures-lite 2.0.1", + "futures-lite 2.2.0", "piper", "tracing", ] [[package]] name = "bounded-collections" -version = "0.1.9" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd" +checksum = "d32385ecb91a31bddaf908e8dcf4a15aef1bcd3913cc03ebfad02ff6d568abc1" dependencies = [ "log", "parity-scale-codec", @@ -1228,8 +1177,8 @@ dependencies = [ [[package]] name = "bp-xcm-bridge-hub-router" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.6.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", "scale-info", @@ -1266,12 +1215,12 @@ dependencies = [ [[package]] name = "bstr" -version = "1.8.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" +checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" dependencies = [ "memchr", - "regex-automata 0.4.3", + "regex-automata 0.4.6", "serde", ] @@ -1286,9 +1235,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b" [[package]] name = "byte-slice-cast" @@ -1304,9 +1253,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.14.0" +version = "1.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +checksum = "a2ef034f05691a48569bd920a96c81b9d91bbad1ab5ac7c4616c1f6ef36cb79f" [[package]] name = "byteorder" @@ -1352,9 +1301,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12024c4645c97566567129c204f65d5815a8c9aecf30fcbe682b2fe034996d36" +checksum = "694c8807f2ae16faecc43dc17d74b3eb042482789fd0eb64b39a2e04e087053f" dependencies = [ "serde", ] @@ -1367,7 +1316,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.20", + "semver 1.0.22", "serde", "serde_json", "thiserror", @@ -1381,25 +1330,14 @@ checksum = "fd6c0e7b807d60291f42f33f58480c0bfafe28ed08286446f45e463728cf9c1c" [[package]] name = "cc" -version = "1.0.83" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "a0ba8f7aaa012f30d5b2861462f6708eccd49c3c39863fe083a308035f63d723" dependencies = [ "jobserver", "libc", ] -[[package]] -name = "ccm" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" -dependencies = [ - "aead 0.3.2", - "cipher 0.2.5", - "subtle 2.4.1", -] - [[package]] name = "cexpr" version = "0.6.0" @@ -1411,9 +1349,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.5" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" +checksum = "fa50868b64a9a6fda9d593ce778849ea8715cd2a3d2cc17ffdb4a2f2f2f1961d" dependencies = [ "smallvec", ] @@ -1457,7 +1395,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ - "aead 0.5.2", + "aead", "chacha20", "cipher 0.4.4", "poly1305", @@ -1466,16 +1404,16 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.48.5", + "windows-targets 0.52.4", ] [[package]] @@ -1486,7 +1424,7 @@ checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" dependencies = [ "core2", "multibase", - "multihash", + "multihash 0.17.0", "serde", "unsigned-varint", ] @@ -1500,15 +1438,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array 0.14.7", -] - [[package]] name = "cipher" version = "0.4.4" @@ -1531,9 +1460,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" +checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" dependencies = [ "glob", "libc", @@ -1542,9 +1471,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.8" +version = "4.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64" +checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" dependencies = [ "clap_builder", "clap_derive", @@ -1552,43 +1481,43 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.8" +version = "4.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc" +checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" dependencies = [ "anstream", "anstyle", "clap_lex", "strsim", + "terminal_size", ] [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "coarsetime" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71367d3385c716342014ad17e3d19f7788ae514885a1f4c24f500260fb365e1a" +checksum = "13b3839cf01bb7960114be3ccf2340f541b6d0c81f8690b007b2b39f750f7e5d" dependencies = [ "libc", - "once_cell", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasix", "wasm-bindgen", ] @@ -1631,7 +1560,7 @@ dependencies = [ "ark-std", "fflonk", "getrandom_or_panic", - "merlin 3.0.0", + "merlin", "rand_chacha 0.3.1", ] @@ -1643,37 +1572,37 @@ checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" [[package]] name = "concurrent-queue" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] [[package]] name = "console" -version = "0.15.7" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ "encode_unicode", "lazy_static", "libc", "unicode-width", - "windows-sys 0.45.0", + "windows-sys 0.52.0", ] [[package]] name = "const-oid" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "const-random" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" dependencies = [ "const-random-macro", ] @@ -1684,7 +1613,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "once_cell", "tiny-keccak", ] @@ -1721,9 +1650,9 @@ checksum = "fb4a24b1aaf0fd0ce8b45161144d6f42cd91677fd5940fd431183eb023b3a2b8" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -1731,9 +1660,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core2" @@ -1765,9 +1694,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -1887,55 +1816,46 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.15" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", - "memoffset 0.9.0", - "scopeguard", ] [[package]] name = "crossbeam-queue" -version = "0.3.8" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crunchy" @@ -1945,25 +1865,13 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", - "subtle 2.4.1", - "zeroize", -] - -[[package]] -name = "crypto-bigint" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28f85c3514d2a6e64160359b45a3918c3b4178bcbf4ae5d03ab2d02e521c479a" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] @@ -1995,26 +1903,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.7", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] name = "crypto-mac" -version = "0.11.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" dependencies = [ "generic-array 0.14.7", - "subtle 2.4.1", -] - -[[package]] -name = "ctr" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" -dependencies = [ - "cipher 0.3.0", + "subtle 2.5.0", ] [[package]] @@ -2028,8 +1927,8 @@ dependencies = [ [[package]] name = "cumulus-client-cli" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "clap", "parity-scale-codec", @@ -2037,6 +1936,7 @@ dependencies = [ "sc-cli", "sc-client-api", "sc-service", + "sp-blockchain", "sp-core", "sp-runtime", "url", @@ -2044,13 +1944,13 @@ dependencies = [ [[package]] name = "cumulus-client-collator" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", "cumulus-primitives-core", - "futures 0.3.29", + "futures 0.3.30", "parity-scale-codec", "parking_lot 0.12.1", "polkadot-node-primitives", @@ -2067,15 +1967,15 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "cumulus-client-pov-recovery", "cumulus-primitives-core", "cumulus-relay-chain-interface", "dyn-clone", - "futures 0.3.29", + "futures 0.3.30", "log", "parity-scale-codec", "polkadot-primitives", @@ -2096,8 +1996,8 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-proposer" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "anyhow", "async-trait", @@ -2111,14 +2011,14 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-relay-chain" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "cumulus-client-consensus-common", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.29", + "futures 0.3.30", "parking_lot 0.12.1", "sc-consensus", "sp-api", @@ -2134,12 +2034,12 @@ dependencies = [ [[package]] name = "cumulus-client-network" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "cumulus-relay-chain-interface", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "parity-scale-codec", "parking_lot 0.12.1", @@ -2156,14 +2056,38 @@ dependencies = [ ] [[package]] -name = "cumulus-client-pov-recovery" +name = "cumulus-client-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" +dependencies = [ + "async-trait", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-relay-chain-interface", + "cumulus-test-relay-sproof-builder", + "parity-scale-codec", + "sc-client-api", + "scale-info", + "sp-api", + "sp-crypto-hashing", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-trie", + "tracing", +] + +[[package]] +name = "cumulus-client-pov-recovery" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "parity-scale-codec", "polkadot-node-primitives", @@ -2181,8 +2105,8 @@ dependencies = [ [[package]] name = "cumulus-client-service" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -2190,10 +2114,11 @@ dependencies = [ "cumulus-client-network", "cumulus-client-pov-recovery", "cumulus-primitives-core", + "cumulus-primitives-proof-size-hostfunction", "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", "cumulus-relay-chain-minimal-node", - "futures 0.3.29", + "futures 0.3.30", "polkadot-primitives", "sc-client-api", "sc-consensus", @@ -2216,10 +2141,11 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "cumulus-primitives-core", + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -2227,35 +2153,38 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", ] [[package]] name = "cumulus-pallet-parachain-system" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", + "cumulus-primitives-proof-size-hostfunction", "environmental", + "frame-benchmarking", "frame-support", "frame-system", "impl-trait-for-tuples", "log", + "pallet-message-queue", "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-runtime-parachains", "scale-info", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-inherents", "sp-io", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-trie", "sp-version", "staging-xcm", @@ -2264,19 +2193,19 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.6.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "cumulus-pallet-xcm" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2285,38 +2214,39 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", ] [[package]] name = "cumulus-pallet-xcmp-queue" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ + "bounded-collections", "bp-xcm-bridge-hub-router", "cumulus-primitives-core", "frame-benchmarking", "frame-support", "frame-system", "log", + "pallet-message-queue", "parity-scale-codec", "polkadot-runtime-common", "polkadot-runtime-parachains", - "rand_chacha 0.3.1", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-executor", ] [[package]] name = "cumulus-primitives-core" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -2325,62 +2255,65 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-trie", "staging-xcm", ] [[package]] name = "cumulus-primitives-parachain-inherent" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "cumulus-primitives-core", - "cumulus-relay-chain-interface", - "cumulus-test-relay-sproof-builder", "parity-scale-codec", - "sc-client-api", "scale-info", - "sp-api", "sp-core", "sp-inherents", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-storage", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-trie", +] + +[[package]] +name = "cumulus-primitives-proof-size-hostfunction" +version = "0.2.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" +dependencies = [ + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-trie", - "tracing", ] [[package]] name = "cumulus-primitives-timestamp" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "cumulus-primitives-core", - "futures 0.3.29", + "futures 0.3.30", "parity-scale-codec", "sp-inherents", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-timestamp", ] [[package]] name = "cumulus-primitives-utility" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "cumulus-primitives-core", "frame-support", "log", + "pallet-asset-conversion", "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-runtime-common", "polkadot-runtime-parachains", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -2388,13 +2321,13 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "polkadot-cli", "polkadot-service", @@ -2412,12 +2345,12 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "cumulus-primitives-core", - "futures 0.3.29", + "futures 0.3.30", "jsonrpsee-core", "parity-scale-codec", "polkadot-overseer", @@ -2430,49 +2363,55 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-minimal-node" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.0", + "array-bytes 6.2.2", "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", "cumulus-relay-chain-rpc-interface", - "futures 0.3.29", + "futures 0.3.30", + "parking_lot 0.12.1", "polkadot-availability-recovery", "polkadot-collator-protocol", "polkadot-core-primitives", "polkadot-network-bridge", "polkadot-node-collation-generation", + "polkadot-node-core-chain-api", + "polkadot-node-core-prospective-parachains", "polkadot-node-core-runtime-api", "polkadot-node-network-protocol", "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", "sc-authority-discovery", + "sc-client-api", "sc-network", "sc-network-common", "sc-service", "sc-tracing", "sc-utils", "sp-api", + "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-runtime", "substrate-prometheus-endpoint", + "tokio", "tracing", ] [[package]] name = "cumulus-relay-chain-rpc-interface" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", "either", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "jsonrpsee", "parity-scale-codec", @@ -2493,7 +2432,8 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-version", "thiserror", "tokio", "tokio-util", @@ -2503,31 +2443,18 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", "polkadot-primitives", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-trie", ] -[[package]] -name = "curve25519-dalek" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" -dependencies = [ - "byteorder", - "digest 0.8.1", - "rand_core 0.5.1", - "subtle 2.4.1", - "zeroize", -] - [[package]] name = "curve25519-dalek" version = "3.2.0" @@ -2537,15 +2464,15 @@ dependencies = [ "byteorder", "digest 0.9.0", "rand_core 0.5.1", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] [[package]] name = "curve25519-dalek" -version = "4.1.1" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" dependencies = [ "cfg-if", "cpufeatures", @@ -2554,7 +2481,7 @@ dependencies = [ "fiat-crypto", "platforms", "rustc_version", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] @@ -2566,7 +2493,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -2584,9 +2511,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.110" +version = "1.0.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7129e341034ecb940c9072817cd9007974ea696844fc4dd582dc1653a7fbe2e8" +checksum = "635179be18797d7e10edb9cd06c859580237750c7351f39ed9b298bfc17544ad" dependencies = [ "cc", "cxxbridge-flags", @@ -2596,9 +2523,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.110" +version = "1.0.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a24f3f5f8eed71936f21e570436f024f5c2e25628f7496aa7ccd03b90109d5" +checksum = "9324397d262f63ef77eb795d900c0d682a34a43ac0932bec049ed73055d52f63" dependencies = [ "cc", "codespan-reporting", @@ -2606,72 +2533,37 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "cxxbridge-flags" -version = "1.0.110" +version = "1.0.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06fdd177fc61050d63f67f5bd6351fac6ab5526694ea8e359cd9cd3b75857f44" +checksum = "a87ff7342ffaa54b7c61618e0ce2bbcf827eba6d55b923b83d82551acbbecfe5" [[package]] name = "cxxbridge-macro" -version = "1.0.110" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "587663dd5fb3d10932c8aecfe7c844db1bcf0aee93eeab08fac13dc1212c2e7f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "darling" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.14.4" +version = "1.0.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +checksum = "70b5b86cf65fa0626d85720619d80b288013477a91a0389fa8bc716bf4903ad1" dependencies = [ - "fnv", - "ident_case", "proc-macro2", "quote", - "strsim", - "syn 1.0.109", -] - -[[package]] -name = "darling_macro" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" -dependencies = [ - "darling_core", - "quote", - "syn 1.0.109", + "syn 2.0.52", ] [[package]] name = "data-encoding" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "data-encoding-macro" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99" +checksum = "20c01c06f5f429efdf2bae21eb67c28b3df3cf85b7dd2d8ef09c0838dac5d33e" dependencies = [ "data-encoding", "data-encoding-macro-internal", @@ -2679,25 +2571,14 @@ dependencies = [ [[package]] name = "data-encoding-macro-internal" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772" +checksum = "0047d07f2c89b17dd631c80450d69841a6b5d7fb17278cbc43d7e4cfcf2576f3" dependencies = [ "data-encoding", "syn 1.0.109", ] -[[package]] -name = "der" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" -dependencies = [ - "const-oid", - "pem-rfc7468", - "zeroize", -] - [[package]] name = "der" version = "0.7.8" @@ -2708,27 +2589,13 @@ dependencies = [ "zeroize", ] -[[package]] -name = "der-parser" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe398ac75057914d7d07307bf67dc7f3f574a26783b4fc7805a20ffa9f506e82" -dependencies = [ - "asn1-rs 0.3.1", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", -] - [[package]] name = "der-parser" version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", "displaydoc", "nom", "num-bigint", @@ -2738,9 +2605,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", ] @@ -2767,37 +2634,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_builder" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_builder_macro" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" -dependencies = [ - "derive_builder_core", - "syn 1.0.109", -] - [[package]] name = "derive_more" version = "0.99.17" @@ -2850,7 +2686,7 @@ dependencies = [ "block-buffer 0.10.4", "const-oid", "crypto-common", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] @@ -2903,13 +2739,13 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "dleq_vrf" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-ec", "ark-ff", @@ -2919,7 +2755,6 @@ dependencies = [ "ark-std", "ark-transcript", "arrayvec 0.7.4", - "rand_core 0.6.4", "zeroize", ] @@ -2931,18 +2766,18 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "docify" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4235e9b248e2ba4b92007fe9c646f3adf0ffde16dc74713eacc92b8bc58d8d2f" +checksum = "7cc4fd38aaa9fb98ac70794c82a00360d1e165a87fbf96a8a91f9dfc602aaee2" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47020e12d7c7505670d1363dd53d6c23724f71a90a3ae32ff8eba40de8404626" +checksum = "63fa215f3a0d40fb2a221b3aa90d8e1fbb8379785a990cb60d62ac71ebdc6460" dependencies = [ "common-path", "derive-syn-parse", @@ -2950,9 +2785,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.39", + "syn 2.0.52", "termcolor", - "toml 0.7.8", + "toml 0.8.10", "walkdir", ] @@ -3003,34 +2838,22 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "ecdsa" -version = "0.14.8" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ - "der 0.6.1", - "elliptic-curve 0.12.3", - "rfc6979 0.3.1", - "signature 1.6.4", -] - -[[package]] -name = "ecdsa" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" -dependencies = [ - "der 0.7.8", - "digest 0.10.7", - "elliptic-curve 0.13.7", - "rfc6979 0.4.0", - "signature 2.2.0", - "spki 0.7.2", + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature 2.2.0", + "spki", ] [[package]] @@ -3048,7 +2871,7 @@ version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ - "pkcs8 0.10.2", + "pkcs8", "signature 2.2.0", ] @@ -3067,16 +2890,16 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ - "curve25519-dalek 4.1.1", + "curve25519-dalek 4.1.2", "ed25519 2.2.3", "rand_core 0.6.4", "serde", "sha2 0.10.8", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] @@ -3100,9 +2923,9 @@ version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ - "curve25519-dalek 4.1.1", + "curve25519-dalek 4.1.2", "ed25519 2.2.3", - "hashbrown 0.14.2", + "hashbrown 0.14.3", "hex", "rand_core 0.6.4", "sha2 0.10.8", @@ -3111,51 +2934,29 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" dependencies = [ "serde", ] [[package]] name = "elliptic-curve" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" -dependencies = [ - "base16ct 0.1.1", - "crypto-bigint 0.4.9", - "der 0.6.1", - "digest 0.10.7", - "ff 0.12.1", - "generic-array 0.14.7", - "group 0.12.1", - "hkdf", - "pem-rfc7468", - "pkcs8 0.9.0", - "rand_core 0.6.4", - "sec1 0.3.0", - "subtle 2.4.1", - "zeroize", -] - -[[package]] -name = "elliptic-curve" -version = "0.13.7" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9775b22bc152ad86a0cf23f0f348b884b26add12bf741e7ffc4d4ab2ab4d205" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ - "base16ct 0.2.0", - "crypto-bigint 0.5.4", + "base16ct", + "crypto-bigint", "digest 0.10.7", - "ff 0.13.0", + "ff", "generic-array 0.14.7", - "group 0.13.0", - "pkcs8 0.10.2", + "group", + "pkcs8", "rand_core 0.6.4", - "sec1 0.7.3", - "subtle 2.4.1", + "sec1", + "subtle 2.5.0", "zeroize", ] @@ -3179,40 +2980,40 @@ dependencies = [ [[package]] name = "enumflags2" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" +checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" +checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "enumn" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" +checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "env_logger" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -3235,12 +3036,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3260,20 +3061,20 @@ dependencies = [ [[package]] name = "ethereum" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a89fb87a9e103f71b903b80b670200b54cc67a07578f070681f1fffb7396fb7" +checksum = "2e04d24d20b8ff2235cffbf242d5092de3aa45f77c5270ddbfadd2778ca13fea" dependencies = [ "bytes", "ethereum-types", - "hash-db 0.15.2", + "hash-db 0.16.0", "hash256-std-hasher", "parity-scale-codec", "rlp", "scale-info", "serde", "sha3", - "triehash", + "trie-root 0.18.0", ] [[package]] @@ -3309,20 +3110,52 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[package]] +name = "event-listener" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite 0.2.13", +] + +[[package]] +name = "event-listener" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite 0.2.13", +] + [[package]] name = "event-listener-strategy" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96b852f1345da36d551b9473fa1e2b1eb5c5195585c6c018118bc92a8d91160" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" dependencies = [ - "event-listener 3.1.0", + "event-listener 4.0.3", + "pin-project-lite 0.2.13", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" +dependencies = [ + "event-listener 5.2.0", "pin-project-lite 0.2.13", ] [[package]] name = "evm" -version = "0.40.0" -source = "git+https://github.com/moonbeam-foundation/evm?branch=moonbeam-polkadot-v1.3.0#3b73337fe0495bc02259081a4004c74b5afbe52b" +version = "0.41.1" +source = "git+https://github.com/moonbeam-foundation/evm?branch=moonbeam-polkadot-v1.7.2#d8991ec727ad0fb64fe9957a3cd307387a6701e4" dependencies = [ "auto_impl", "environmental", @@ -3341,8 +3174,8 @@ dependencies = [ [[package]] name = "evm-core" -version = "0.40.0" -source = "git+https://github.com/moonbeam-foundation/evm?branch=moonbeam-polkadot-v1.3.0#3b73337fe0495bc02259081a4004c74b5afbe52b" +version = "0.41.0" +source = "git+https://github.com/moonbeam-foundation/evm?branch=moonbeam-polkadot-v1.7.2#d8991ec727ad0fb64fe9957a3cd307387a6701e4" dependencies = [ "parity-scale-codec", "primitive-types", @@ -3352,8 +3185,8 @@ dependencies = [ [[package]] name = "evm-gasometer" -version = "0.40.0" -source = "git+https://github.com/moonbeam-foundation/evm?branch=moonbeam-polkadot-v1.3.0#3b73337fe0495bc02259081a4004c74b5afbe52b" +version = "0.41.0" +source = "git+https://github.com/moonbeam-foundation/evm?branch=moonbeam-polkadot-v1.7.2#d8991ec727ad0fb64fe9957a3cd307387a6701e4" dependencies = [ "environmental", "evm-core", @@ -3363,8 +3196,8 @@ dependencies = [ [[package]] name = "evm-runtime" -version = "0.40.0" -source = "git+https://github.com/moonbeam-foundation/evm?branch=moonbeam-polkadot-v1.3.0#3b73337fe0495bc02259081a4004c74b5afbe52b" +version = "0.41.0" +source = "git+https://github.com/moonbeam-foundation/evm?branch=moonbeam-polkadot-v1.7.2#d8991ec727ad0fb64fe9957a3cd307387a6701e4" dependencies = [ "auto_impl", "environmental", @@ -3384,7 +3217,7 @@ dependencies = [ "evm-gasometer", "evm-runtime", "parity-scale-codec", - "sp-runtime-interface", + "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -3393,7 +3226,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", ] [[package]] @@ -3418,15 +3251,9 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" - [[package]] name = "fallible-iterator" version = "0.2.0" @@ -3472,7 +3299,7 @@ checksum = "f5aa1e3ae159e592ad222dc90c5acbad632b527779ba88486abe92782ab268bd" dependencies = [ "expander 0.0.4", "indexmap 1.9.3", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -3482,7 +3309,7 @@ dependencies = [ [[package]] name = "fc-api" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "async-trait", "fp-storage", @@ -3494,7 +3321,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "async-trait", "fp-consensus", @@ -3510,7 +3337,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "async-trait", "ethereum", @@ -3519,7 +3346,7 @@ dependencies = [ "fp-consensus", "fp-rpc", "fp-storage", - "futures 0.3.29", + "futures 0.3.30", "kvdb-rocksdb", "log", "parity-db", @@ -3533,7 +3360,7 @@ dependencies = [ "sp-core", "sp-database", "sp-runtime", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sqlx", "tokio", ] @@ -3541,13 +3368,13 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "fc-db", "fc-storage", "fp-consensus", "fp-rpc", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "log", "parking_lot 0.12.1", @@ -3564,7 +3391,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "ethereum", "ethereum-types", @@ -3576,7 +3403,7 @@ dependencies = [ "fp-evm", "fp-rpc", "fp-storage", - "futures 0.3.29", + "futures 0.3.30", "hex", "jsonrpsee", "libsecp256k1", @@ -3604,11 +3431,12 @@ dependencies = [ "sp-consensus", "sp-consensus-aura", "sp-core", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-inherents", "sp-io", "sp-runtime", "sp-state-machine", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-timestamp", "substrate-prometheus-endpoint", "thiserror", @@ -3618,20 +3446,22 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "ethereum", "ethereum-types", "jsonrpsee", + "rlp", "rustc-hex", "serde", "serde_json", + "sp-core-hashing", ] [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "ethereum", "ethereum-types", @@ -3643,26 +3473,17 @@ dependencies = [ "sp-blockchain", "sp-io", "sp-runtime", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "fdlimit" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b" +checksum = "e182f7dbc2ef73d9ef67351c5fbbea084729c48362d3ce9dd44c28e32e277fe5" dependencies = [ "libc", -] - -[[package]] -name = "ff" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" -dependencies = [ - "rand_core 0.6.4", - "subtle 2.4.1", + "thiserror", ] [[package]] @@ -3672,7 +3493,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] @@ -3685,14 +3506,14 @@ dependencies = [ "ark-poly", "ark-serialize", "ark-std", - "merlin 3.0.0", + "merlin", ] [[package]] name = "fiat-crypto" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" +checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382" [[package]] name = "file-per-thread-logger" @@ -3706,14 +3527,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.22" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", - "windows-sys 0.48.0", + "redox_syscall 0.4.1", + "windows-sys 0.52.0", ] [[package]] @@ -3723,7 +3544,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36530797b9bf31cd4ff126dcfee8170f86b00cfdcea3269d73133cc0415945c3" dependencies = [ "either", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "log", "num-traits", @@ -3817,17 +3638,17 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" -version = "3.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "12.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", ] [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -3835,7 +3656,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "hex", "impl-serde 0.4.0", @@ -3847,55 +3668,55 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface", - "sp-std", + "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "ethereum", "parity-scale-codec", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "ethereum", "ethereum-types", "fp-evm", "frame-support", "parity-scale-codec", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "evm", "frame-support", - "num_enum 0.7.1", + "num_enum 0.7.2", "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "ethereum", "ethereum-types", @@ -3906,13 +3727,13 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "frame-support", "parity-scale-codec", @@ -3924,7 +3745,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "parity-scale-codec", "serde", @@ -3938,8 +3759,8 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-support", "frame-support-procedural", @@ -3955,19 +3776,19 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "static_assertions", ] [[package]] name = "frame-benchmarking-cli" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "32.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "Inflector", - "array-bytes 6.2.0", + "array-bytes 6.2.2", "chrono", "clap", "comfy-table", @@ -3996,34 +3817,34 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-database", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-inherents", "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-trie", - "sp-wasm-interface", + "sp-wasm-interface 20.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "thiserror", "thousands", ] [[package]] name = "frame-election-provider-solution-type" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "13.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "frame-election-provider-support" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -4034,13 +3855,13 @@ dependencies = [ "sp-core", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "frame-executive" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-support", "frame-system", @@ -4051,8 +3872,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -4069,16 +3890,17 @@ dependencies = [ [[package]] name = "frame-remote-externalities" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.35.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "indicatif", "jsonrpsee", "log", "parity-scale-codec", "serde", "sp-core", + "sp-crypto-hashing", "sp-io", "sp-runtime", "sp-state-machine", @@ -4090,10 +3912,11 @@ dependencies = [ [[package]] name = "frame-support" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "aquamarine", + "array-bytes 6.2.2", "bitflags 1.3.2", "docify", "environmental", @@ -4112,8 +3935,8 @@ dependencies = [ "sp-api", "sp-arithmetic", "sp-core", - "sp-core-hashing-proc-macro", - "sp-debug-derive", + "sp-crypto-hashing-proc-macro", + "sp-debug-derive 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -4121,8 +3944,8 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std", - "sp-tracing", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-weights", "static_assertions", "tt-call", @@ -4130,8 +3953,8 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "23.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "Inflector", "cfg-expr", @@ -4143,38 +3966,39 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "sp-core-hashing", - "syn 2.0.39", + "sp-crypto-hashing", + "syn 2.0.52", ] [[package]] name = "frame-support-procedural-tools" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "10.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "frame-support-procedural-tools-derive" -version = "3.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "11.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "frame-system" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "cfg-if", + "docify", "frame-support", "log", "parity-scale-codec", @@ -4183,15 +4007,15 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-version", "sp-weights", ] [[package]] name = "frame-system-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -4200,13 +4024,13 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "frame-system-rpc-runtime-api" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "26.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", "sp-api", @@ -4214,21 +4038,21 @@ dependencies = [ [[package]] name = "frame-try-runtime" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.34.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-support", "parity-scale-codec", "sp-api", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "fs-err" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5fd9bcbe8b1087cbd395b51498c01bc997cef73e778a80b77a811af5e2d29f" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" dependencies = [ "autocfg", ] @@ -4245,11 +4069,11 @@ dependencies = [ [[package]] name = "fs4" -version = "0.6.6" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" +checksum = "29f9df8a11882c4e3335eb2d18a0137c505d9ca927470b0cac9c6f0ae07d28f7" dependencies = [ - "rustix 0.38.24", + "rustix 0.38.31", "windows-sys 0.48.0", ] @@ -4267,9 +4091,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -4282,9 +4106,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -4292,15 +4116,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -4321,9 +4145,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" @@ -4342,23 +4166,26 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.0.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb" +checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" dependencies = [ + "fastrand 2.0.1", "futures-core", + "futures-io", + "parking", "pin-project-lite 0.2.13", ] [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -4369,32 +4196,32 @@ checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ "futures-io", "rustls 0.20.9", - "webpki 0.22.4", + "webpki", ] [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures 0.1.31", "futures-channel", @@ -4463,9 +4290,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "js-sys", @@ -4480,27 +4307,18 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" dependencies = [ + "rand 0.8.5", "rand_core 0.6.4", ] [[package]] name = "ghash" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" -dependencies = [ - "opaque-debug 0.3.0", - "polyval 0.5.3", -] - -[[package]] -name = "ghash" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" dependencies = [ - "opaque-debug 0.3.0", - "polyval 0.6.1", + "opaque-debug 0.3.1", + "polyval", ] [[package]] @@ -4516,9 +4334,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "glob" @@ -4526,46 +4344,22 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "globset" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" -dependencies = [ - "aho-corasick", - "bstr 1.8.0", - "fnv", - "log", - "regex", -] - -[[package]] -name = "group" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" -dependencies = [ - "ff 0.12.1", - "rand_core 0.6.4", - "subtle 2.4.1", -] - [[package]] name = "group" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "ff 0.13.0", + "ff", "rand_core 0.6.4", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] name = "h2" -version = "0.3.22" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -4573,7 +4367,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.1.0", + "indexmap 2.2.5", "slab", "tokio", "tokio-util", @@ -4621,7 +4415,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.7", + "ahash 0.7.8", ] [[package]] @@ -4630,16 +4424,16 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", ] [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", "allocator-api2", "serde", ] @@ -4650,7 +4444,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.2", + "hashbrown 0.14.3", ] [[package]] @@ -4664,18 +4458,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.3" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -4700,9 +4485,9 @@ checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac 0.12.1", ] @@ -4723,7 +4508,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" dependencies = [ - "crypto-mac 0.11.1", + "crypto-mac 0.11.0", "digest 0.9.0", ] @@ -4749,11 +4534,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4769,9 +4554,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -4780,9 +4565,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -4815,9 +4600,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", @@ -4830,7 +4615,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite 0.2.13", - "socket2 0.4.10", + "socket2 0.5.6", "tokio", "tower-service", "tracing", @@ -4847,25 +4632,24 @@ dependencies = [ "http", "hyper", "log", - "rustls 0.21.9", + "rustls 0.21.10", "rustls-native-certs", "tokio", "tokio-rustls", - "webpki-roots 0.25.2", ] [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows-core 0.52.0", ] [[package]] @@ -4877,12 +4661,6 @@ dependencies = [ "cc", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "0.2.3" @@ -4896,9 +4674,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -4906,24 +4684,24 @@ dependencies = [ [[package]] name = "if-addrs" -version = "0.7.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc0fa01ffc752e9dbc72818cdb072cd028b86be5e09dd04c5a643704fe101a9" +checksum = "cabb0019d51a643781ff15c9c8a3e5dedc365c47211270f4e8f82812fedd8f0a" dependencies = [ "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "if-watch" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb892e5777fe09e16f3d44de7802f4daa7267ecbe8c466f19d94e25bb0c303e" +checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ - "async-io 1.13.0", + "async-io 2.3.1", "core-foundation", "fnv", - "futures 0.3.29", + "futures 0.3.30", "if-addrs", "ipnet", "log", @@ -5012,12 +4790,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" dependencies = [ "equivalent", - "hashbrown 0.14.2", + "hashbrown 0.14.3", ] [[package]] @@ -5028,9 +4806,9 @@ checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" [[package]] name = "indicatif" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" +checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" dependencies = [ "console", "instant", @@ -5072,32 +4850,13 @@ dependencies = [ "num-traits", ] -[[package]] -name = "interceptor" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8a11ae2da61704edada656798b61c94b35ecac2c58eb955156987d5e6be90b" -dependencies = [ - "async-trait", - "bytes", - "log", - "rand 0.8.5", - "rtcp", - "rtp", - "thiserror", - "tokio", - "waitgroup", - "webrtc-srtp", - "webrtc-util", -] - [[package]] name = "io-lifetimes" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi", "libc", "windows-sys 0.48.0", ] @@ -5114,7 +4873,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.5", + "socket2 0.5.6", "widestring", "windows-sys 0.48.0", "winreg", @@ -5128,13 +4887,13 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.3.3", - "rustix 0.38.24", - "windows-sys 0.48.0", + "hermit-abi", + "libc", + "windows-sys 0.52.0", ] [[package]] @@ -5164,35 +4923,44 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.65" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] [[package]] name = "jsonrpsee" -version = "0.16.3" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" +checksum = "affdc52f7596ccb2d7645231fc6163bb314630c989b64998f3699a28b4d5d4dc" dependencies = [ "jsonrpsee-core", "jsonrpsee-http-client", @@ -5200,19 +4968,19 @@ dependencies = [ "jsonrpsee-server", "jsonrpsee-types", "jsonrpsee-ws-client", + "tokio", "tracing", ] [[package]] name = "jsonrpsee-client-transport" -version = "0.16.3" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" +checksum = "b5b005c793122d03217da09af68ba9383363caa950b90d3436106df8cabce935" dependencies = [ "futures-util", "http", "jsonrpsee-core", - "jsonrpsee-types", "pin-project", "rustls-native-certs", "soketto", @@ -5221,24 +4989,21 @@ dependencies = [ "tokio-rustls", "tokio-util", "tracing", - "webpki-roots 0.25.2", + "url", ] [[package]] name = "jsonrpsee-core" -version = "0.16.3" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" +checksum = "da2327ba8df2fdbd5e897e2b5ed25ce7f299d345b9736b6828814c3dbd1fd47b" dependencies = [ "anyhow", - "arrayvec 0.7.4", "async-lock 2.8.0", "async-trait", "beef", - "futures-channel", "futures-timer", "futures-util", - "globset", "hyper", "jsonrpsee-types", "parking_lot 0.12.1", @@ -5254,31 +5019,32 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.16.3" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" +checksum = "5f80c17f62c7653ce767e3d7288b793dfec920f97067ceb189ebdd3570f2bc20" dependencies = [ "async-trait", "hyper", "hyper-rustls", "jsonrpsee-core", "jsonrpsee-types", - "rustc-hash", "serde", "serde_json", "thiserror", "tokio", + "tower", "tracing", + "url", ] [[package]] name = "jsonrpsee-proc-macros" -version = "0.16.3" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" +checksum = "29110019693a4fa2dbda04876499d098fa16d70eba06b1e6e2b3f1b251419515" dependencies = [ "heck", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -5286,19 +5052,20 @@ dependencies = [ [[package]] name = "jsonrpsee-server" -version = "0.16.3" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4d945a6008c9b03db3354fb3c83ee02d2faa9f2e755ec1dfb69c3551b8f4ba" +checksum = "82c39a00449c9ef3f50b84fc00fc4acba20ef8f559f07902244abf4c15c5ab9c" dependencies = [ - "futures-channel", "futures-util", "http", "hyper", "jsonrpsee-core", "jsonrpsee-types", + "route-recognizer", "serde", "serde_json", "soketto", + "thiserror", "tokio", "tokio-stream", "tokio-util", @@ -5308,9 +5075,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.16.3" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5" +checksum = "5be0be325642e850ed0bdff426674d2e66b2b7117c9be23a7caef68a2902b7d9" dependencies = [ "anyhow", "beef", @@ -5322,34 +5089,35 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.16.3" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" +checksum = "bca9cb3933ccae417eb6b08c3448eb1cb46e39834e5b503e395e5e5bd08546c0" dependencies = [ "http", "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-types", + "url", ] [[package]] name = "k256" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if", - "ecdsa 0.16.9", - "elliptic-curve 0.13.7", + "ecdsa", + "elliptic-curve", "once_cell", "sha2 0.10.8", ] [[package]] name = "keccak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] @@ -5421,18 +5189,18 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.150" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libloading" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "winapi", + "windows-targets 0.52.4", ] [[package]] @@ -5443,14 +5211,14 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libp2p" -version = "0.51.3" +version = "0.51.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f210d259724eae82005b5c48078619b7745edb7b76de370b03f8ba59ea103097" +checksum = "f35eae38201a993ece6bdc823292d6abd1bffed1c4d0f4a3517d2bd8e1d917fe" dependencies = [ "bytes", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", - "getrandom 0.2.11", + "getrandom 0.2.12", "instant", "libp2p-allow-block-list", "libp2p-connection-limits", @@ -5468,7 +5236,6 @@ dependencies = [ "libp2p-swarm", "libp2p-tcp", "libp2p-wasm-ext", - "libp2p-webrtc", "libp2p-websocket", "libp2p-yamux", "multiaddr", @@ -5507,13 +5274,13 @@ checksum = "3c1df63c0b582aa434fb09b2d86897fa2b419ffeccf934b36f87fcedc8e835c2" dependencies = [ "either", "fnv", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "instant", "libp2p-identity", "log", "multiaddr", - "multihash", + "multihash 0.17.0", "multistream-select", "once_cell", "parking_lot 0.12.1", @@ -5533,7 +5300,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "libp2p-core", "log", "parking_lot 0.12.1", @@ -5549,7 +5316,7 @@ checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" dependencies = [ "asynchronous-codec", "either", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "libp2p-core", "libp2p-identity", @@ -5570,10 +5337,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ "bs58 0.4.0", - "ed25519-dalek 2.1.0", + "ed25519-dalek 2.1.1", "log", "multiaddr", - "multihash", + "multihash 0.17.0", "quick-protobuf", "rand 0.8.5", "sha2 0.10.8", @@ -5592,7 +5359,7 @@ dependencies = [ "bytes", "either", "fnv", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "instant", "libp2p-core", @@ -5616,7 +5383,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" dependencies = [ "data-encoding", - "futures 0.3.29", + "futures 0.3.30", "if-watch", "libp2p-core", "libp2p-identity", @@ -5652,7 +5419,7 @@ checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" dependencies = [ "bytes", "curve25519-dalek 3.2.0", - "futures 0.3.29", + "futures 0.3.30", "libp2p-core", "libp2p-identity", "log", @@ -5674,7 +5441,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202" dependencies = [ "either", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "instant", "libp2p-core", @@ -5691,7 +5458,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" dependencies = [ "bytes", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "if-watch", "libp2p-core", @@ -5713,7 +5480,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" dependencies = [ "async-trait", - "futures 0.3.29", + "futures 0.3.30", "instant", "libp2p-core", "libp2p-identity", @@ -5730,7 +5497,7 @@ checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296" dependencies = [ "either", "fnv", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "instant", "libp2p-core", @@ -5760,7 +5527,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "if-watch", "libc", @@ -5776,16 +5543,16 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "futures-rustls", "libp2p-core", "libp2p-identity", - "rcgen 0.10.0", + "rcgen", "ring 0.16.20", "rustls 0.20.9", "thiserror", - "webpki 0.22.4", - "x509-parser 0.14.0", + "webpki", + "x509-parser", "yasna", ] @@ -5795,7 +5562,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "js-sys", "libp2p-core", "parity-send-wrapper", @@ -5804,45 +5571,14 @@ dependencies = [ ] [[package]] -name = "libp2p-webrtc" -version = "0.4.0-alpha.4" +name = "libp2p-websocket" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba48592edbc2f60b4bc7c10d65445b0c3964c07df26fdf493b6880d33be36f8" +checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" dependencies = [ - "async-trait", - "asynchronous-codec", - "bytes", - "futures 0.3.29", - "futures-timer", - "hex", - "if-watch", - "libp2p-core", - "libp2p-identity", - "libp2p-noise", - "log", - "multihash", - "quick-protobuf", - "quick-protobuf-codec", - "rand 0.8.5", - "rcgen 0.9.3", - "serde", - "stun", - "thiserror", - "tinytemplate", - "tokio", - "tokio-util", - "webrtc", -] - -[[package]] -name = "libp2p-websocket" -version = "0.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" -dependencies = [ - "either", - "futures 0.3.29", - "futures-rustls", + "either", + "futures 0.3.30", + "futures-rustls", "libp2p-core", "log", "parking_lot 0.12.1", @@ -5850,7 +5586,7 @@ dependencies = [ "rw-stream-sink", "soketto", "url", - "webpki-roots 0.22.6", + "webpki-roots", ] [[package]] @@ -5859,7 +5595,7 @@ version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "libp2p-core", "log", "thiserror", @@ -5872,7 +5608,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "libc", "redox_syscall 0.4.1", ] @@ -5919,7 +5655,7 @@ checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" dependencies = [ "crunchy", "digest 0.9.0", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] @@ -5942,9 +5678,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326" +checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" dependencies = [ "cc", "pkg-config", @@ -5953,9 +5689,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.12" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" +checksum = "037731f5d3aaa87a5675e895b63ddff1a87624bc29f77004ea829809654e48f6" dependencies = [ "cc", "pkg-config", @@ -6009,9 +5745,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.11" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lioness" @@ -6037,9 +5773,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "lru" @@ -6103,7 +5839,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -6117,7 +5853,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -6128,7 +5864,7 @@ checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -6139,7 +5875,7 @@ checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -6163,7 +5899,7 @@ version = "0.1.0" dependencies = [ "cumulus-primitives-core", "flume 0.10.14", - "futures 0.3.29", + "futures 0.3.30", "hex-literal 0.3.4", "jsonrpsee", "parity-scale-codec", @@ -6209,21 +5945,11 @@ dependencies = [ "rawpointer", ] -[[package]] -name = "md-5" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if", - "digest 0.10.7", -] - [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memfd" @@ -6231,7 +5957,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.24", + "rustix 0.38.31", ] [[package]] @@ -6244,28 +5970,28 @@ dependencies = [ ] [[package]] -name = "memoffset" -version = "0.6.5" +name = "memmap2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" dependencies = [ - "autocfg", + "libc", ] [[package]] name = "memoffset" -version = "0.8.0" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ "autocfg", ] [[package]] name = "memoffset" -version = "0.9.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" dependencies = [ "autocfg", ] @@ -6279,18 +6005,6 @@ dependencies = [ "hash-db 0.16.0", ] -[[package]] -name = "merlin" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" -dependencies = [ - "byteorder", - "keccak", - "rand_core 0.5.1", - "zeroize", -] - [[package]] name = "merlin" version = "3.0.0" @@ -6309,7 +6023,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "rand 0.8.5", "thrift", ] @@ -6322,18 +6036,18 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.9" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -6351,7 +6065,7 @@ dependencies = [ "bitflags 1.3.2", "blake2 0.10.6", "c2-chacha", - "curve25519-dalek 4.1.1", + "curve25519-dalek 4.1.2", "either", "hashlink", "lioness", @@ -6360,17 +6074,17 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rand_distr", - "subtle 2.4.1", + "subtle 2.5.0", "thiserror", "zeroize", ] [[package]] name = "mmr-gadget" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "29.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "log", "parity-scale-codec", "sc-client-api", @@ -6386,10 +6100,9 @@ dependencies = [ [[package]] name = "mmr-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "anyhow", "jsonrpsee", "parity-scale-codec", "serde", @@ -6496,7 +6209,6 @@ dependencies = [ "pallet-evm-precompile-crowdloan-rewards", "pallet-evm-precompile-dispatch", "pallet-evm-precompile-gmp", - "pallet-evm-precompile-identity", "pallet-evm-precompile-modexp", "pallet-evm-precompile-parachain-staking", "pallet-evm-precompile-preimage", @@ -6540,7 +6252,7 @@ dependencies = [ "pallet-xcm", "pallet-xcm-benchmarks", "pallet-xcm-transactor", - "parachain-info", + "parachains-common", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", @@ -6557,17 +6269,18 @@ dependencies = [ "sp-block-builder", "sp-consensus-slots", "sp-core", - "sp-debug-derive", + "sp-debug-derive 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-inherents", "sp-io", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-timestamp", "sp-transaction-pool", "sp-version", "sp-weights", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -6584,7 +6297,7 @@ name = "moonbeam" version = "0.12.3" dependencies = [ "assert_cmd", - "futures 0.3.29", + "futures 0.3.30", "hex", "moonbeam-cli", "moonbeam-service", @@ -6626,7 +6339,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-wasm-interface", + "sp-wasm-interface 20.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "substrate-build-script-utils", "substrate-prometheus-endpoint", "try-runtime-cli", @@ -6643,7 +6356,7 @@ dependencies = [ "primitive-types", "sha3", "sp-runtime", - "tiny-bip39 0.8.2", + "tiny-bip39", "url", ] @@ -6659,7 +6372,7 @@ dependencies = [ "serde", "serde_json", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -6689,7 +6402,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -6699,7 +6412,7 @@ dependencies = [ "fc-api", "fc-db", "fc-rpc", - "futures 0.3.29", + "futures 0.3.30", "jsonrpsee", "parity-scale-codec", "sp-api", @@ -6716,9 +6429,9 @@ dependencies = [ "ethereum-types", "evm-tracing-events", "parity-scale-codec", - "sp-externalities", - "sp-runtime-interface", - "sp-std", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -6741,7 +6454,7 @@ dependencies = [ "rococo-runtime", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", "westend-runtime", "xcm-primitives 0.1.1", @@ -6752,7 +6465,7 @@ name = "moonbeam-rpc-core-debug" version = "0.1.0" dependencies = [ "ethereum-types", - "futures 0.3.29", + "futures 0.3.30", "jsonrpsee", "moonbeam-client-evm-tracing", "moonbeam-rpc-core-types", @@ -6766,7 +6479,7 @@ name = "moonbeam-rpc-core-trace" version = "0.6.0" dependencies = [ "ethereum-types", - "futures 0.3.29", + "futures 0.3.30", "jsonrpsee", "moonbeam-client-evm-tracing", "moonbeam-rpc-core-types", @@ -6807,7 +6520,7 @@ dependencies = [ "fc-rpc", "fc-storage", "fp-rpc", - "futures 0.3.29", + "futures 0.3.30", "hex-literal 0.3.4", "jsonrpsee", "moonbeam-client-evm-tracing", @@ -6839,7 +6552,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -6852,7 +6565,7 @@ dependencies = [ "sp-api", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -6866,7 +6579,7 @@ dependencies = [ "fc-rpc-core", "fc-storage", "fp-rpc", - "futures 0.3.29", + "futures 0.3.30", "jsonrpsee", "log", "moonbeam-client-evm-tracing", @@ -6883,7 +6596,7 @@ dependencies = [ "sp-blockchain", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-transaction-pool", "substrate-prometheus-endpoint", "tokio", @@ -6909,7 +6622,7 @@ dependencies = [ "sp-blockchain", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -6980,7 +6693,6 @@ dependencies = [ "pallet-evm-precompile-crowdloan-rewards", "pallet-evm-precompile-dispatch", "pallet-evm-precompile-gmp", - "pallet-evm-precompile-identity", "pallet-evm-precompile-modexp", "pallet-evm-precompile-parachain-staking", "pallet-evm-precompile-preimage", @@ -7020,7 +6732,7 @@ dependencies = [ "pallet-xcm", "pallet-xcm-benchmarks", "pallet-xcm-transactor", - "parachain-info", + "parachains-common", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", @@ -7042,10 +6754,11 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-transaction-pool", "sp-version", "sp-weights", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -7113,7 +6826,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -7135,6 +6848,7 @@ dependencies = [ "cumulus-client-consensus-proposer", "cumulus-client-consensus-relay-chain", "cumulus-client-network", + "cumulus-client-parachain-inherent", "cumulus-client-service", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", @@ -7158,7 +6872,7 @@ dependencies = [ "frame-benchmarking", "frame-benchmarking-cli", "frame-system-rpc-runtime-api", - "futures 0.3.29", + "futures 0.3.30", "hex-literal 0.3.4", "jsonrpsee", "libsecp256k1", @@ -7238,7 +6952,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-timestamp", "sp-transaction-pool", "sp-trie", @@ -7250,7 +6964,7 @@ dependencies = [ "substrate-test-runtime", "substrate-test-runtime-client", "tempfile", - "tiny-bip39 0.8.2", + "tiny-bip39", "tokio", "trie-root 0.15.2", ] @@ -7262,7 +6976,7 @@ dependencies = [ "nimbus-primitives", "parity-scale-codec", "polkadot-primitives", - "schnorrkel 0.9.1", + "schnorrkel 0.11.4", "session-keys-primitives", "sp-api", "sp-application-crypto", @@ -7288,7 +7002,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -7371,7 +7085,6 @@ dependencies = [ "pallet-evm-precompile-crowdloan-rewards", "pallet-evm-precompile-dispatch", "pallet-evm-precompile-gmp", - "pallet-evm-precompile-identity", "pallet-evm-precompile-modexp", "pallet-evm-precompile-parachain-staking", "pallet-evm-precompile-preimage", @@ -7411,7 +7124,7 @@ dependencies = [ "pallet-xcm", "pallet-xcm-benchmarks", "pallet-xcm-transactor", - "parachain-info", + "parachains-common", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", @@ -7428,16 +7141,17 @@ dependencies = [ "sp-block-builder", "sp-consensus-slots", "sp-core", - "sp-debug-derive", + "sp-debug-derive 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-inherents", "sp-io", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-transaction-pool", "sp-version", "sp-weights", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -7460,7 +7174,7 @@ dependencies = [ "data-encoding", "log", "multibase", - "multihash", + "multihash 0.17.0", "percent-encoding", "serde", "static_assertions", @@ -7490,19 +7204,87 @@ dependencies = [ "blake3", "core2", "digest 0.10.7", - "multihash-derive", + "multihash-derive 0.8.0", "sha2 0.10.8", "sha3", "unsigned-varint", ] +[[package]] +name = "multihash" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfd8a792c1694c6da4f68db0a9d707c72bd260994da179e6030a5dcee00bb815" +dependencies = [ + "core2", + "digest 0.10.7", + "multihash-derive 0.8.0", + "sha2 0.10.8", + "unsigned-varint", +] + +[[package]] +name = "multihash" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076d548d76a0e2a0d4ab471d0b1c36c577786dfc4471242035d97a12a735c492" +dependencies = [ + "core2", + "unsigned-varint", +] + +[[package]] +name = "multihash-codetable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6d815ecb3c8238d00647f8630ede7060a642c9f704761cd6082cb4028af6935" +dependencies = [ + "blake2b_simd", + "blake2s_simd", + "blake3", + "core2", + "digest 0.10.7", + "multihash-derive 0.9.0", + "ripemd", + "serde", + "sha1", + "sha2 0.10.8", + "sha3", + "strobe-rs", +] + [[package]] name = "multihash-derive" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc076939022111618a5026d3be019fd8b366e76314538ff9a1b59ffbcbf98bcd" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure", +] + +[[package]] +name = "multihash-derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "890e72cb7396cb99ed98c1246a97b243cc16394470d94e0bc8b0c2c11d84290e" +dependencies = [ + "core2", + "multihash 0.19.1", + "multihash-derive-impl", +] + +[[package]] +name = "multihash-derive-impl" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38685e08adb338659871ecfc6ee47ba9b22dcc8abcf6975d379cc49145c3040" +dependencies = [ + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", @@ -7523,7 +7305,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" dependencies = [ "bytes", - "futures 0.3.29", + "futures 0.3.30", "log", "pin-project", "smallvec", @@ -7532,9 +7314,9 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.32.3" +version = "0.32.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" +checksum = "4541eb06dce09c0241ebbaab7102f0a01a0c8994afed2e5d0d66775016e25ac2" dependencies = [ "approx", "matrixmultiply", @@ -7559,9 +7341,9 @@ dependencies = [ [[package]] name = "names" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d66043b25d4a6cccb23619d10c19c25304b355a7dccd4a8e11423dd2382146" +checksum = "7bddcd3bf5144b6392de80e04c347cd7fab2508f6df16a85fc496ecd5cec39bc" dependencies = [ "rand 0.8.5", ] @@ -7572,7 +7354,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", ] [[package]] @@ -7638,7 +7420,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" dependencies = [ "bytes", - "futures 0.3.29", + "futures 0.3.30", "log", "netlink-packet-core", "netlink-sys", @@ -7653,7 +7435,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" dependencies = [ "bytes", - "futures 0.3.29", + "futures 0.3.30", "libc", "log", "tokio", @@ -7662,17 +7444,18 @@ dependencies = [ [[package]] name = "nimbus-consensus" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.3.0#a34e9ba41e4411ebb806cc71ee5a15ad99de157a" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" dependencies = [ "async-backing-primitives", "async-trait", "cumulus-client-collator", "cumulus-client-consensus-common", "cumulus-client-consensus-proposer", + "cumulus-client-parachain-inherent", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "cumulus-relay-chain-interface", - "futures 0.3.29", + "futures 0.3.30", "log", "nimbus-primitives", "parity-scale-codec", @@ -7693,6 +7476,7 @@ dependencies = [ "sp-inherents", "sp-keystore", "sp-runtime", + "sp-version", "substrate-prometheus-endpoint", "tracing", ] @@ -7700,7 +7484,7 @@ dependencies = [ [[package]] name = "nimbus-primitives" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.3.0#a34e9ba41e4411ebb806cc71ee5a15ad99de157a" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" dependencies = [ "async-trait", "frame-benchmarking", @@ -7712,7 +7496,7 @@ dependencies = [ "sp-application-crypto", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -7737,7 +7521,29 @@ dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", - "memoffset 0.6.5", +] + +[[package]] +name = "nix" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +dependencies = [ + "bitflags 2.4.2", + "cfg-if", + "libc", +] + +[[package]] +name = "nix" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +dependencies = [ + "bitflags 2.4.2", + "cfg-if", + "cfg_aliases", + "libc", ] [[package]] @@ -7801,13 +7607,19 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" +checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-format" version = "0.4.4" @@ -7820,19 +7632,18 @@ dependencies = [ [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-iter" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" dependencies = [ "autocfg", "num-integer", @@ -7853,9 +7664,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", "libm", @@ -7867,7 +7678,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi", "libc", ] @@ -7882,11 +7693,11 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683751d591e6d81200c39fb0d1032608b77724f34114db54f571ff1317b337c0" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" dependencies = [ - "num_enum_derive 0.7.1", + "num_enum_derive 0.7.2", ] [[package]] @@ -7902,14 +7713,14 @@ dependencies = [ [[package]] name = "num_enum_derive" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c11e44798ad209ccdd91fc192f0526a369a01234f7373e1b141c96d7cee4f0e" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -7932,36 +7743,27 @@ dependencies = [ [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] -[[package]] -name = "oid-registry" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e20717fa0541f39bd146692035c37bedfa532b3e5071b35761082407546b2a" -dependencies = [ - "asn1-rs 0.3.1", -] - [[package]] name = "oid-registry" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -7971,17 +7773,17 @@ checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.59" +version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "cfg-if", "foreign-types", "libc", @@ -7998,7 +7800,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -8009,9 +7811,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.95" +version = "0.9.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9" +checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" dependencies = [ "cc", "libc", @@ -8027,13 +7829,13 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orchestra" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46d78e1deb2a8d54fc1f063a544130db4da31dfe4d5d3b493186424910222a76" +checksum = "2356622ffdfe72362a45a1e5e87bb113b8327e596e39b91f11f0ef4395c8da79" dependencies = [ "async-trait", "dyn-clonable", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "orchestra-proc-macro", "pin-project", @@ -8044,15 +7846,15 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d035b1f968d91a826f2e34a9d6d02cb2af5aa7ca39ebd27922d850ab4b2dd2c6" +checksum = "eedb646674596266dc9bb2b5c7eea7c36b32ecc7777eba0d510196972d72c4fd" dependencies = [ "expander 2.0.0", - "indexmap 2.1.0", + "indexmap 2.2.5", "itertools 0.11.0", "petgraph", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -8069,8 +7871,8 @@ dependencies = [ [[package]] name = "orml-traits" -version = "0.6.1" -source = "git+https://github.com/moonbeam-foundation/open-runtime-module-library?branch=moonbeam-polkadot-v1.3.0#f5c743d972d4b94cdb2cd53c819adc002d1afafc" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/open-runtime-module-library?branch=moonbeam-polkadot-v1.7.2#f90f4de88986571e24ea3c027b9c09a4b732ee1f" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -8083,14 +7885,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", ] [[package]] name = "orml-utilities" -version = "0.6.1" -source = "git+https://github.com/moonbeam-foundation/open-runtime-module-library?branch=moonbeam-polkadot-v1.3.0#f5c743d972d4b94cdb2cd53c819adc002d1afafc" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/open-runtime-module-library?branch=moonbeam-polkadot-v1.7.2#f90f4de88986571e24ea3c027b9c09a4b732ee1f" dependencies = [ "frame-support", "parity-scale-codec", @@ -8099,29 +7901,28 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "orml-xcm-support" -version = "0.6.1" -source = "git+https://github.com/moonbeam-foundation/open-runtime-module-library?branch=moonbeam-polkadot-v1.3.0#f5c743d972d4b94cdb2cd53c819adc002d1afafc" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/open-runtime-module-library?branch=moonbeam-polkadot-v1.7.2#f90f4de88986571e24ea3c027b9c09a4b732ee1f" dependencies = [ "frame-support", "orml-traits", "parity-scale-codec", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-executor", ] [[package]] name = "orml-xtokens" -version = "0.6.1" -source = "git+https://github.com/moonbeam-foundation/open-runtime-module-library?branch=moonbeam-polkadot-v1.3.0#f5c743d972d4b94cdb2cd53c819adc002d1afafc" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/open-runtime-module-library?branch=moonbeam-polkadot-v1.7.2#f90f4de88986571e24ea3c027b9c09a4b732ee1f" dependencies = [ - "cumulus-primitives-core", "frame-support", "frame-system", "log", @@ -8133,31 +7934,27 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-executor", ] [[package]] -name = "p256" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" -dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.8", -] - -[[package]] -name = "p384" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" +name = "pallet-asset-conversion" +version = "10.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.8", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -8175,30 +7972,48 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", "xcm-primitives 0.1.1", ] [[package]] name = "pallet-asset-rate" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", +] + +[[package]] +name = "pallet-asset-tx-payment" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "pallet-transaction-payment", "parity-scale-codec", "scale-info", + "serde", "sp-core", + "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-assets" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "29.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -8208,13 +8023,13 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-async-backing" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.3.0#a34e9ba41e4411ebb806cc71ee5a15ad99de157a" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", @@ -8228,13 +8043,13 @@ dependencies = [ "sp-consensus-slots", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-author-inherent" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.3.0#a34e9ba41e4411ebb806cc71ee5a15ad99de157a" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8247,13 +8062,13 @@ dependencies = [ "sp-application-crypto", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-author-mapping" version = "2.0.5" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.3.0#a34e9ba41e4411ebb806cc71ee5a15ad99de157a" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8265,13 +8080,13 @@ dependencies = [ "serde", "session-keys-primitives", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-author-slot-filter" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.3.0#a34e9ba41e4411ebb806cc71ee5a15ad99de157a" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8283,13 +8098,13 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-authority-discovery" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-support", "frame-system", @@ -8299,13 +8114,13 @@ dependencies = [ "sp-application-crypto", "sp-authority-discovery", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-authorship" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-support", "frame-system", @@ -8313,13 +8128,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-babe" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -8337,13 +8152,13 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-bags-list" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "27.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "aquamarine", "docify", @@ -8358,15 +8173,16 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-balances" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -8374,13 +8190,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-beefy" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-support", "frame-system", @@ -8394,15 +8210,15 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-beefy-mmr" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.0", + "array-bytes 6.2.2", "binary-merkle-tree", "frame-support", "frame-system", @@ -8419,13 +8235,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-bounties" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "27.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -8437,13 +8253,30 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", +] + +[[package]] +name = "pallet-broker" +version = "0.6.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" +dependencies = [ + "bitvec", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-child-bounties" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "27.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -8456,13 +8289,32 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", +] + +[[package]] +name = "pallet-collator-selection" +version = "9.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-authorship", + "pallet-session", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sp-runtime", + "sp-staking", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-collective" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -8473,13 +8325,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-conviction-voting" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "assert_matches", "frame-benchmarking", @@ -8490,13 +8342,13 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-crowdloan-rewards" version = "0.6.0" -source = "git+https://github.com/moonbeam-foundation/crowdloan-rewards?branch=moonbeam-polkadot-v1.3.0#b0b477f2d176f95ea5099ba797d7060d0f09d40b" +source = "git+https://github.com/moonbeam-foundation/crowdloan-rewards?branch=moonbeam-polkadot-v1.7.2#df3b3772383ddc985c93673414e4af6597f4bb34" dependencies = [ "ed25519-dalek 1.0.1", "frame-benchmarking", @@ -8511,14 +8363,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-trie", ] [[package]] name = "pallet-democracy" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -8530,13 +8382,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-election-provider-multi-phase" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "27.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8552,14 +8404,14 @@ dependencies = [ "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "strum 0.24.1", ] [[package]] name = "pallet-election-provider-support-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "27.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8567,13 +8419,13 @@ dependencies = [ "parity-scale-codec", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-elections-phragmen" -version = "5.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "29.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -8586,7 +8438,7 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -8607,7 +8459,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-executor", ] @@ -8615,7 +8467,7 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "environmental", "ethereum", @@ -8633,7 +8485,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -8664,14 +8516,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "xcm-primitives 0.1.1", ] [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "environmental", "evm", @@ -8691,13 +8543,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-evm-chain-id" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "frame-support", "frame-system", @@ -8729,7 +8581,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -8757,7 +8609,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -8785,13 +8637,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "fp-evm", ] @@ -8799,7 +8651,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-bn128" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "fp-evm", "sp-core", @@ -8832,7 +8684,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -8863,7 +8715,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "xcm-primitives 0.1.1", ] @@ -8891,7 +8743,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -8911,6 +8763,7 @@ dependencies = [ "pallet-balances", "pallet-crowdloan-rewards", "pallet-evm", + "pallet-message-queue", "pallet-scheduler", "pallet-timestamp", "parity-scale-codec", @@ -8922,13 +8775,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-evm-precompile-dispatch" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "fp-evm", "frame-support", @@ -8967,7 +8820,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -8975,36 +8828,9 @@ dependencies = [ ] [[package]] -name = "pallet-evm-precompile-identity" -version = "0.1.0" -dependencies = [ - "enumflags2", - "evm", - "fp-evm", - "frame-support", - "frame-system", - "hex", - "hex-literal 0.3.4", - "log", - "pallet-balances", - "pallet-evm", - "pallet-identity", - "pallet-timestamp", - "parity-scale-codec", - "precompile-utils", - "scale-info", - "serde", - "sha3", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-evm-precompile-modexp" -version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +name = "pallet-evm-precompile-modexp" +version = "2.0.0-dev" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "fp-evm", "num", @@ -9034,7 +8860,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -9061,7 +8887,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -9089,7 +8915,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -9117,7 +8943,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -9146,7 +8972,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -9170,7 +8996,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -9201,7 +9027,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -9230,14 +9056,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "storage-proof-primitives", ] [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "fp-evm", "tiny-keccak", @@ -9246,7 +9072,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.3.0#8c90bb75ed280318465dcbedebd534a40ad09aa5" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" dependencies = [ "fp-evm", "ripemd", @@ -9280,7 +9106,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-weights", "staging-xcm", "staging-xcm-builder", @@ -9312,7 +9138,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-weights", "staging-xcm", "staging-xcm-builder", @@ -9346,7 +9172,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-weights", "staging-xcm", "staging-xcm-builder", @@ -9379,13 +9205,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-fast-unstake" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "27.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "docify", "frame-benchmarking", @@ -9398,13 +9224,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-grandpa" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9421,29 +9247,30 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-identity" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "enumflags2", "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-im-online" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "27.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9457,13 +9284,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-indices" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9474,13 +9301,13 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-maintenance-mode" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.3.0#a34e9ba41e4411ebb806cc71ee5a15ad99de157a" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -9489,14 +9316,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "xcm-primitives 0.1.0", ] [[package]] name = "pallet-membership" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9507,14 +9334,15 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-message-queue" -version = "7.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "31.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ + "environmental", "frame-benchmarking", "frame-support", "frame-system", @@ -9525,14 +9353,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-weights", ] [[package]] name = "pallet-migrations" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.3.0#a34e9ba41e4411ebb806cc71ee5a15ad99de157a" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" dependencies = [ "frame-benchmarking", "frame-support", @@ -9544,14 +9372,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "xcm-primitives 0.1.0", ] [[package]] name = "pallet-mmr" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "27.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9563,7 +9391,7 @@ dependencies = [ "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -9584,7 +9412,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -9602,13 +9430,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-multisig" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9618,13 +9446,13 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-nis" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9634,13 +9462,13 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-nomination-pools" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "25.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-support", "frame-system", @@ -9652,14 +9480,14 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", - "sp-tracing", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-nomination-pools-benchmarking" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "26.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -9671,26 +9499,26 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-runtime-interface", + "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-nomination-pools-runtime-api" -version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "23.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", "sp-api", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-offences" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "27.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-support", "frame-system", @@ -9701,13 +9529,13 @@ dependencies = [ "serde", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-offences-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -9725,7 +9553,7 @@ dependencies = [ "scale-info", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -9746,7 +9574,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "substrate-fixed", ] @@ -9762,14 +9590,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "storage-proof-primitives", ] [[package]] name = "pallet-preimage" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9780,13 +9608,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-proxy" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9795,7 +9623,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -9813,13 +9641,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-randomness" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.3.0#a34e9ba41e4411ebb806cc71ee5a15ad99de157a" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" dependencies = [ "environmental", "frame-benchmarking", @@ -9830,24 +9658,25 @@ dependencies = [ "nimbus-primitives", "parity-scale-codec", "scale-info", - "schnorrkel 0.9.1", + "schnorrkel 0.11.4", "serde", "session-keys-primitives", "sp-consensus-babe", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-ranked-collective" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", @@ -9855,13 +9684,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-recovery" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9870,13 +9699,13 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-referenda" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "assert_matches", "frame-benchmarking", @@ -9889,13 +9718,13 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-relay-storage-roots" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.3.0#a34e9ba41e4411ebb806cc71ee5a15ad99de157a" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", @@ -9912,13 +9741,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-root-testing" -version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "4.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-support", "frame-system", @@ -9927,13 +9756,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-scheduler" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "29.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "docify", "frame-benchmarking", @@ -9944,14 +9773,14 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-weights", ] [[package]] name = "pallet-session" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-support", "frame-system", @@ -9966,14 +9795,14 @@ dependencies = [ "sp-session", "sp-staking", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-trie", ] [[package]] name = "pallet-session-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9984,13 +9813,13 @@ dependencies = [ "rand 0.8.5", "sp-runtime", "sp-session", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-society" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10002,13 +9831,13 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-staking" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -10025,24 +9854,24 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-staking-reward-curve" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "11.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "pallet-staking-reward-fn" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "19.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "log", "sp-arithmetic", @@ -10050,17 +9879,18 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "14.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", "sp-api", + "sp-staking", ] [[package]] name = "pallet-state-trie-migration" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "29.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10071,13 +9901,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-sudo" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "docify", "frame-benchmarking", @@ -10087,13 +9917,13 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-timestamp" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "27.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "docify", "frame-benchmarking", @@ -10105,15 +9935,15 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std", - "sp-storage", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-timestamp", ] [[package]] name = "pallet-tips" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "27.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10126,13 +9956,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-transaction-payment" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-support", "frame-system", @@ -10142,13 +9972,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-transaction-payment-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "30.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -10163,8 +9993,8 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -10175,8 +10005,8 @@ dependencies = [ [[package]] name = "pallet-treasury" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "27.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "docify", "frame-benchmarking", @@ -10189,13 +10019,13 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-utility" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10205,13 +10035,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-vesting" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10220,13 +10050,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-whitelist" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "27.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10235,34 +10065,36 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "pallet-xcm" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "bounded-collections", "frame-benchmarking", "frame-support", "frame-system", "log", + "pallet-balances", "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", + "staging-xcm-builder", "staging-xcm-executor", ] [[package]] name = "pallet-xcm-benchmarks" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10272,7 +10104,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -10297,7 +10129,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -10305,24 +10137,41 @@ dependencies = [ ] [[package]] -name = "parachain-info" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +name = "parachains-common" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "cumulus-primitives-core", + "cumulus-primitives-utility", "frame-support", "frame-system", + "log", + "pallet-asset-tx-payment", + "pallet-assets", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-message-queue", + "pallet-xcm", "parity-scale-codec", + "polkadot-primitives", "scale-info", + "sp-consensus-aura", + "sp-core", + "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-executor", + "substrate-wasm-builder", ] [[package]] name = "parity-db" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59e9ab494af9e6e813c72170f0d3c1de1500990d62c97cc05cc7576f91aa402f" +checksum = "592a28a24b09c9dc20ac8afaa6839abc417c720afe42c12e1e4a9d6aa2508d2e" dependencies = [ "blake2 0.10.6", "crc32fast", @@ -10331,18 +10180,19 @@ dependencies = [ "libc", "log", "lz4", - "memmap2", + "memmap2 0.5.10", "parking_lot 0.12.1", "rand 0.8.5", "siphasher", "snap", + "winapi", ] [[package]] name = "parity-scale-codec" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -10355,11 +10205,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 1.0.109", @@ -10458,16 +10308,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ - "crypto-mac 0.11.1", -] - -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", + "crypto-mac 0.11.0", ] [[package]] @@ -10495,26 +10336,17 @@ dependencies = [ "base64 0.13.1", ] -[[package]] -name = "pem-rfc7468" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac" -dependencies = [ - "base64ct", -] - [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.5" +version = "2.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" +checksum = "56f8023d0fb78c8e03784ea1c7f3fa36e68a723138990b8d5a47d916b651e7a8" dependencies = [ "memchr", "thiserror", @@ -10523,9 +10355,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.5" +version = "2.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2" +checksum = "b0d24f72393fd16ab6ac5738bc33cdb6a9aa73f8b902e8fe29cf4e67d7dd1026" dependencies = [ "pest", "pest_generator", @@ -10533,22 +10365,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.5" +version = "2.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227" +checksum = "fdc17e2a6c7d0a492f0158d7a4bd66cc17280308bbaff78d5bef566dca35ab80" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "pest_meta" -version = "2.7.5" +version = "2.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" +checksum = "934cd7631c050f4674352a6e835d5f6711ffbfb9345c2fc0107155ac495ae293" dependencies = [ "once_cell", "pest", @@ -10562,27 +10394,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.1.0", + "indexmap 2.2.5", ] [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -10614,45 +10446,37 @@ dependencies = [ "futures-io", ] -[[package]] -name = "pkcs8" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" -dependencies = [ - "der 0.6.1", - "spki 0.6.0", -] - [[package]] name = "pkcs8" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.8", - "spki 0.7.2", + "der", + "spki", ] [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "platforms" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" +checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" [[package]] name = "polkadot-approval-distribution" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "futures 0.3.29", + "bitvec", + "futures 0.3.30", "futures-timer", + "itertools 0.10.5", "polkadot-node-jaeger", "polkadot-node-metrics", "polkadot-node-network-protocol", @@ -10666,11 +10490,11 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "always-assert", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", @@ -10682,12 +10506,12 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "derive_more", "fatality", - "futures 0.3.29", + "futures 0.3.30", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -10705,12 +10529,12 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "fatality", - "futures 0.3.29", + "futures 0.3.30", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -10722,17 +10546,19 @@ dependencies = [ "sc-network", "schnellru", "thiserror", + "tokio", "tracing-gum", ] [[package]] name = "polkadot-cli" -version = "1.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ + "cfg-if", "clap", "frame-benchmarking-cli", - "futures 0.3.29", + "futures 0.3.30", "log", "polkadot-node-metrics", "polkadot-node-primitives", @@ -10754,12 +10580,12 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "bitvec", "fatality", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -10776,26 +10602,26 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "polkadot-dispute-distribution" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "derive_more", "fatality", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", - "indexmap 1.9.3", + "indexmap 2.2.5", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -10813,8 +10639,8 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -10827,10 +10653,10 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", @@ -10842,20 +10668,21 @@ dependencies = [ "sc-network-common", "sp-application-crypto", "sp-core", + "sp-crypto-hashing", "sp-keystore", "tracing-gum", ] [[package]] name = "polkadot-network-bridge" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "always-assert", "async-trait", "bytes", "fatality", - "futures 0.3.29", + "futures 0.3.30", "parity-scale-codec", "parking_lot 0.12.1", "polkadot-node-metrics", @@ -10871,10 +10698,10 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-primitives", @@ -10889,15 +10716,16 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "bitvec", "derive_more", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", + "itertools 0.10.5", "kvdb", - "merlin 2.0.1", + "merlin", "parity-scale-codec", "polkadot-node-jaeger", "polkadot-node-primitives", @@ -10905,9 +10733,12 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", "sc-keystore", "schnellru", - "schnorrkel 0.9.1", + "schnorrkel 0.11.4", "sp-application-crypto", "sp-consensus", "sp-consensus-slots", @@ -10918,11 +10749,11 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "bitvec", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "kvdb", "parity-scale-codec", @@ -10940,18 +10771,19 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "bitvec", "fatality", - "futures 0.3.29", + "futures 0.3.30", "polkadot-erasure-coding", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", "polkadot-statement-table", + "schnellru", "sp-keystore", "thiserror", "tracing-gum", @@ -10959,10 +10791,10 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", @@ -10974,11 +10806,11 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "parity-scale-codec", "polkadot-node-core-pvf", @@ -10995,25 +10827,24 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "polkadot-node-metrics", "polkadot-node-subsystem", - "polkadot-primitives", + "polkadot-node-subsystem-types", "sc-client-api", "sc-consensus-babe", - "sp-blockchain", "tracing-gum", ] [[package]] name = "polkadot-node-core-chain-selection" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "kvdb", "parity-scale-codec", @@ -11027,11 +10858,11 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "fatality", - "futures 0.3.29", + "futures 0.3.30", "kvdb", "parity-scale-codec", "polkadot-node-primitives", @@ -11046,11 +10877,11 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "polkadot-node-subsystem", "polkadot-overseer", @@ -11063,12 +10894,12 @@ dependencies = [ [[package]] name = "polkadot-node-core-prospective-parachains" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "6.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "bitvec", "fatality", - "futures 0.3.29", + "futures 0.3.30", "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -11080,12 +10911,12 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "bitvec", "fatality", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -11097,12 +10928,14 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "always-assert", + "array-bytes 6.2.2", + "blake3", "cfg-if", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "is_executable", "libc", @@ -11112,24 +10945,26 @@ dependencies = [ "polkadot-node-core-pvf-common", "polkadot-node-metrics", "polkadot-node-primitives", + "polkadot-node-subsystem", "polkadot-parachain-primitives", "polkadot-primitives", "rand 0.8.5", "slotmap", "sp-core", "sp-maybe-compressed-blob", - "sp-wasm-interface", + "sp-wasm-interface 20.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "tempfile", + "thiserror", "tokio", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf-checker" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -11142,34 +10977,37 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-common" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "cfg-if", "cpu-time", - "futures 0.3.29", + "futures 0.3.30", "landlock", "libc", + "nix 0.27.1", "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-primitives", "sc-executor", "sc-executor-common", "sc-executor-wasmtime", + "seccompiler", "sp-core", - "sp-externalities", + "sp-crypto-hashing", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-io", - "sp-tracing", - "tokio", + "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-runtime-api" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "polkadot-node-metrics", "polkadot-node-subsystem", "polkadot-node-subsystem-types", @@ -11181,8 +11019,8 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "lazy_static", "log", @@ -11199,11 +11037,11 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "bs58 0.5.0", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "log", "parity-scale-codec", @@ -11218,15 +11056,15 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-channel 1.9.0", "async-trait", "bitvec", "derive_more", "fatality", - "futures 0.3.29", + "futures 0.3.30", "hex", "parity-scale-codec", "polkadot-node-jaeger", @@ -11242,15 +11080,16 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ + "bitvec", "bounded-vec", - "futures 0.3.29", + "futures 0.3.30", "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-primitives", - "schnorrkel 0.9.1", + "schnorrkel 0.11.4", "serde", "sp-application-crypto", "sp-consensus-babe", @@ -11264,8 +11103,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -11274,12 +11113,13 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", + "bitvec", "derive_more", - "futures 0.3.29", + "futures 0.3.30", "orchestra", "polkadot-node-jaeger", "polkadot-node-network-protocol", @@ -11292,26 +11132,28 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", + "sp-blockchain", "sp-consensus-babe", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "polkadot-node-subsystem-util" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "derive_more", "fatality", - "futures 0.3.29", + "futures 0.3.30", "futures-channel", "itertools 0.10.5", "kvdb", "parity-db", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.1", "pin-project", "polkadot-node-jaeger", "polkadot-node-metrics", @@ -11334,11 +11176,11 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "orchestra", "parking_lot 0.12.1", @@ -11356,28 +11198,29 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "6.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "bounded-collections", "derive_more", - "frame-support", "parity-scale-codec", "polkadot-core-primitives", "scale-info", "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-weights", ] [[package]] name = "polkadot-primitives" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "bitvec", "hex-literal 0.4.1", + "log", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", @@ -11394,13 +11237,13 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "polkadot-rpc" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -11416,6 +11259,7 @@ dependencies = [ "sc-consensus-grandpa", "sc-consensus-grandpa-rpc", "sc-rpc", + "sc-rpc-spec-v2", "sc-sync-state-rpc", "sc-transaction-pool-api", "sp-api", @@ -11431,8 +11275,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "bitvec", "frame-benchmarking", @@ -11446,8 +11290,10 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-broker", "pallet-election-provider-multi-phase", "pallet-fast-unstake", + "pallet-identity", "pallet-session", "pallet-staking", "pallet-staking-reward-fn", @@ -11472,7 +11318,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -11481,21 +11327,21 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "bs58 0.5.0", "frame-benchmarking", "parity-scale-codec", "polkadot-primitives", - "sp-std", - "sp-tracing", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "polkadot-runtime-parachains" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "bitflags 1.3.2", "bitvec", @@ -11509,6 +11355,7 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-broker", "pallet-message-queue", "pallet-session", "pallet-staking", @@ -11526,6 +11373,7 @@ dependencies = [ "serde", "sp-api", "sp-application-crypto", + "sp-arithmetic", "sp-core", "sp-inherents", "sp-io", @@ -11533,7 +11381,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-executor", "static_assertions", @@ -11541,8 +11389,8 @@ dependencies = [ [[package]] name = "polkadot-service" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "frame-benchmarking", @@ -11550,7 +11398,7 @@ dependencies = [ "frame-support", "frame-system", "frame-system-rpc-runtime-api", - "futures 0.3.29", + "futures 0.3.30", "hex-literal 0.4.1", "is_executable", "kvdb", @@ -11564,6 +11412,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "parity-db", "parity-scale-codec", + "parking_lot 0.12.1", "polkadot-approval-distribution", "polkadot-availability-bitfield-distribution", "polkadot-availability-distribution", @@ -11645,7 +11494,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-timestamp", "sp-transaction-pool", "sp-version", @@ -11659,20 +11508,19 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "arrayvec 0.7.4", "bitvec", "fatality", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", - "indexmap 1.9.3", + "indexmap 2.2.5", "parity-scale-codec", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", - "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-primitives", "sp-keystore", @@ -11683,84 +11531,110 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", "polkadot-primitives", "sp-core", + "tracing-gum", ] [[package]] -name = "polling" -version = "2.8.0" +name = "polkavm-common" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite 0.2.13", - "windows-sys 0.48.0", -] +checksum = "92c99f7eee94e7be43ba37eef65ad0ee8cbaf89b7c00001c3f6d2be985cb1817" [[package]] -name = "polling" -version = "3.3.0" +name = "polkavm-derive" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e53b6af1f60f36f8c2ac2aad5459d75a5a9b4be1e8cdd40264f315d78193e531" +checksum = "79fa916f7962348bd1bb1a65a83401675e6fc86c51a0fdbcf92a3108e58e6125" dependencies = [ - "cfg-if", + "polkavm-derive-impl-macro", +] + +[[package]] +name = "polkavm-derive-impl" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c10b2654a8a10a83c260bfb93e97b262cf0017494ab94a65d389e0eda6de6c9c" +dependencies = [ + "polkavm-common", + "proc-macro2", + "quote", + "syn 2.0.52", +] + +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e85319a0d5129dc9f021c62607e0804f5fb777a05cdda44d750ac0732def66" +dependencies = [ + "polkavm-derive-impl", + "syn 2.0.52", +] + +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", "concurrent-queue", + "libc", + "log", "pin-project-lite 0.2.13", - "rustix 0.38.24", - "tracing", "windows-sys 0.48.0", ] [[package]] -name = "poly1305" -version = "0.8.0" +name = "polling" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +checksum = "24f040dee2588b4963afb4e420540439d126f73fdacf4a9c486a96d840bac3c9" dependencies = [ - "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash 0.5.1", + "cfg-if", + "concurrent-queue", + "pin-project-lite 0.2.13", + "rustix 0.38.31", + "tracing", + "windows-sys 0.52.0", ] [[package]] -name = "polyval" -version = "0.5.3" +name = "poly1305" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ - "cfg-if", "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash 0.4.1", + "opaque-debug 0.3.1", + "universal-hash", ] [[package]] name = "polyval" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if", "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash 0.5.1", + "opaque-debug 0.3.1", + "universal-hash", ] [[package]] name = "portable-atomic" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bccab0e7fd7cc19f820a1c8c91720af652d0c88dc9664dd72aef2614f04af3b" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" [[package]] name = "powerfmt" @@ -11801,7 +11675,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-weights", "staging-xcm", ] @@ -11821,7 +11695,7 @@ dependencies = [ "quote", "sha3", "sp-core", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "syn 1.0.109", "trybuild", ] @@ -11847,7 +11721,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -11866,13 +11740,12 @@ dependencies = [ [[package]] name = "predicates" -version = "3.0.4" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dfc28575c2e3f19cb3c73b93af36460ae898d426eba6fc15b9bd2a5220758a0" +checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" dependencies = [ "anstyle", "difflib", - "itertools 0.11.0", "predicates-core", ] @@ -11904,12 +11777,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ "proc-macro2", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -11928,14 +11801,14 @@ dependencies = [ [[package]] name = "prioritized-metered-channel" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e99f0c89bd88f393aab44a4ab949351f7bc7e7e1179d11ecbfe50cbe4c47e342" +checksum = "a172e6cc603231f2cf004232eabcecccc0da53ba576ab286ef7baa0cfc7927ad" dependencies = [ "coarsetime", "crossbeam-queue", "derive_more", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "nanorand", "thiserror", @@ -11949,7 +11822,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.7", +] + +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.1", ] [[package]] @@ -11978,20 +11869,20 @@ dependencies = [ [[package]] name = "proc-macro-warning" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b698b0b09d40e9b7c1a47b132d66a8b54bcd20583d9b6d06e4535e383b4405c" +checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -12030,7 +11921,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -12040,7 +11931,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.11.9", +] + +[[package]] +name = "prost" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" +dependencies = [ + "bytes", + "prost-derive 0.12.3", ] [[package]] @@ -12057,7 +11958,7 @@ dependencies = [ "multimap", "petgraph", "prettyplease 0.1.25", - "prost", + "prost 0.11.9", "prost-types", "regex", "syn 1.0.109", @@ -12078,13 +11979,26 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "prost-derive" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" +dependencies = [ + "anyhow", + "itertools 0.11.0", + "proc-macro2", + "quote", + "syn 2.0.52", +] + [[package]] name = "prost-types" version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost", + "prost 0.11.9", ] [[package]] @@ -12150,14 +12064,14 @@ dependencies = [ "thiserror", "tinyvec", "tracing", - "webpki 0.22.4", + "webpki", ] [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -12227,7 +12141,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", ] [[package]] @@ -12266,9 +12180,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" dependencies = [ "either", "rayon-core", @@ -12276,27 +12190,14 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", ] -[[package]] -name = "rcgen" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" -dependencies = [ - "pem", - "ring 0.16.20", - "time", - "x509-parser 0.13.2", - "yasna", -] - [[package]] name = "rcgen" version = "0.10.0" @@ -12318,15 +12219,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -12342,42 +12234,41 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "libredox", "thiserror", ] [[package]] name = "reed-solomon-novelpoly" -version = "1.0.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58130877ca403ab42c864fbac74bb319a0746c07a634a92a5cfc7f54af272582" +checksum = "87413ebb313323d431e85d0afc5a68222aaed972843537cbfe5f061cf1b4bcab" dependencies = [ "derive_more", "fs-err", - "itertools 0.11.0", "static_init", "thiserror", ] [[package]] name = "ref-cast" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acde58d073e9c79da00f2b5b84eed919c8326832648a5b109b3fce1bb1175280" +checksum = "c4846d4c50d1721b1a3bef8af76924eef20d5e723647333798c1b519b3a9473f" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" +checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -12394,13 +12285,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.3", + "regex-automata 0.4.6", "regex-syntax 0.8.2", ] @@ -12415,9 +12306,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -12446,17 +12337,6 @@ dependencies = [ "quick-error", ] -[[package]] -name = "rfc6979" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" -dependencies = [ - "crypto-bigint 0.4.9", - "hmac 0.12.1", - "zeroize", -] - [[package]] name = "rfc6979" version = "0.4.0" @@ -12464,7 +12344,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ "hmac 0.12.1", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] @@ -12480,7 +12360,7 @@ dependencies = [ "blake2 0.10.6", "common", "fflonk", - "merlin 3.0.0", + "merlin", ] [[package]] @@ -12500,16 +12380,17 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.5" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", - "getrandom 0.2.11", + "cfg-if", + "getrandom 0.2.12", "libc", "spin 0.9.8", "untrusted 0.9.0", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -12555,8 +12436,8 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "binary-merkle-tree", "frame-benchmarking", @@ -12596,6 +12477,7 @@ dependencies = [ "pallet-ranked-collective", "pallet-recovery", "pallet-referenda", + "pallet-root-testing", "pallet-scheduler", "pallet-session", "pallet-society", @@ -12637,8 +12519,8 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", - "sp-storage", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-transaction-pool", "sp-version", "staging-xcm", @@ -12650,8 +12532,8 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-support", "polkadot-primitives", @@ -12661,8 +12543,15 @@ dependencies = [ "sp-runtime", "sp-weights", "staging-xcm", + "staging-xcm-builder", ] +[[package]] +name = "route-recognizer" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" + [[package]] name = "rpassword" version = "7.3.1" @@ -12674,24 +12563,13 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "rtcp" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1919efd6d4a6a85d13388f9487549bb8e359f17198cc03ffd72f79b553873691" -dependencies = [ - "bytes", - "thiserror", - "webrtc-util", -] - [[package]] name = "rtnetlink" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "log", "netlink-packet-route", "netlink-proto", @@ -12710,20 +12588,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "rtp" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a095411ff00eed7b12e4c6a118ba984d113e1079582570d56a5ee723f11f80" -dependencies = [ - "async-trait", - "bytes", - "rand 0.8.5", - "serde", - "thiserror", - "webrtc-util", -] - [[package]] name = "rustc-demangle" version = "0.1.23" @@ -12748,7 +12612,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.20", + "semver 1.0.22", ] [[package]] @@ -12790,28 +12654,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.24" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ad981d6c340a49cdc40a1028d9c6084ec7e9fa33fcb839cab656a267071e234" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "errno", "libc", - "linux-raw-sys 0.4.11", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64 0.13.1", - "log", - "ring 0.16.20", - "sct 0.6.1", - "webpki 0.21.4", + "linux-raw-sys 0.4.13", + "windows-sys 0.52.0", ] [[package]] @@ -12822,20 +12673,20 @@ checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", "ring 0.16.20", - "sct 0.7.1", - "webpki 0.22.4", + "sct", + "webpki", ] [[package]] name = "rustls" -version = "0.21.9" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring 0.17.5", + "ring 0.17.8", "rustls-webpki", - "sct 0.7.1", + "sct", ] [[package]] @@ -12856,7 +12707,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", ] [[package]] @@ -12865,7 +12716,7 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.5", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -12892,16 +12743,16 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "pin-project", "static_assertions", ] [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "safe_arch" @@ -12923,29 +12774,30 @@ dependencies = [ [[package]] name = "sc-allocator" -version = "4.1.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "23.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "log", "sp-core", - "sp-wasm-interface", + "sp-wasm-interface 20.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "thiserror", ] [[package]] name = "sc-authority-discovery" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.34.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "ip_network", "libp2p", "log", - "multihash", + "multihash 0.18.1", + "multihash-codetable", "parity-scale-codec", - "prost", + "prost 0.12.3", "prost-build", "rand 0.8.5", "sc-client-api", @@ -12962,15 +12814,14 @@ dependencies = [ [[package]] name = "sc-basic-authorship" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.34.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "log", "parity-scale-codec", "sc-block-builder", - "sc-client-api", "sc-proposer-metrics", "sc-telemetry", "sc-transaction-pool-api", @@ -12985,25 +12836,29 @@ dependencies = [ [[package]] name = "sc-block-builder" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.33.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", - "sc-client-api", "sp-api", "sp-block-builder", "sp-blockchain", "sp-core", "sp-inherents", "sp-runtime", + "sp-trie", ] [[package]] name = "sc-chain-spec" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "27.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "memmap2", + "array-bytes 6.2.2", + "docify", + "log", + "memmap2 0.9.4", + "parity-scale-codec", "sc-chain-spec-derive", "sc-client-api", "sc-executor", @@ -13013,31 +12868,36 @@ dependencies = [ "serde_json", "sp-blockchain", "sp-core", + "sp-crypto-hashing", + "sp-genesis-builder", + "sp-io", "sp-runtime", "sp-state-machine", ] [[package]] name = "sc-chain-spec-derive" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "11.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "sc-cli" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.36.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.0", + "array-bytes 6.2.2", + "bip39", "chrono", "clap", "fdlimit", - "futures 0.3.29", + "futures 0.3.30", + "itertools 0.10.5", "libp2p-identity", "log", "names", @@ -13064,20 +12924,19 @@ dependencies = [ "sp-panic-handler", "sp-runtime", "sp-state-machine", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-version", "thiserror", - "tiny-bip39 1.0.0", "tokio", ] [[package]] name = "sc-client-api" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "fnv", - "futures 0.3.29", + "futures 0.3.30", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -13089,19 +12948,19 @@ dependencies = [ "sp-consensus", "sp-core", "sp-database", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-runtime", "sp-state-machine", "sp-statement-store", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-trie", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.35.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "hash-db 0.16.0", "kvdb", @@ -13126,11 +12985,11 @@ dependencies = [ [[package]] name = "sc-consensus" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.33.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "libp2p-identity", "log", @@ -13151,11 +13010,11 @@ dependencies = [ [[package]] name = "sc-consensus-aura" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.34.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", - "futures 0.3.29", + "futures 0.3.30", "log", "parity-scale-codec", "sc-block-builder", @@ -13180,12 +13039,12 @@ dependencies = [ [[package]] name = "sc-consensus-babe" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.34.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "fork-tree", - "futures 0.3.29", + "futures 0.3.30", "log", "num-bigint", "num-rational", @@ -13206,6 +13065,7 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-slots", "sp-core", + "sp-crypto-hashing", "sp-inherents", "sp-keystore", "sp-runtime", @@ -13215,10 +13075,10 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.34.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "jsonrpsee", "sc-consensus-babe", "sc-consensus-epochs", @@ -13237,14 +13097,14 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "13.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.0", + "array-bytes 6.2.2", "async-channel 1.9.0", "async-trait", "fnv", - "futures 0.3.29", + "futures 0.3.30", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -13261,20 +13121,22 @@ dependencies = [ "sp-consensus", "sp-consensus-beefy", "sp-core", + "sp-crypto-hashing", "sp-keystore", "sp-mmr-primitives", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "tokio", "wasm-timer", ] [[package]] name = "sc-consensus-beefy-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "13.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "jsonrpsee", "log", "parity-scale-codec", @@ -13290,8 +13152,8 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.33.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "fork-tree", "parity-scale-codec", @@ -13303,16 +13165,16 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.19.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "ahash 0.8.6", - "array-bytes 6.2.0", + "ahash 0.8.11", + "array-bytes 6.2.2", "async-trait", "dyn-clone", "finality-grandpa", "fork-tree", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "log", "parity-scale-codec", @@ -13325,6 +13187,7 @@ dependencies = [ "sc-network", "sc-network-common", "sc-network-gossip", + "sc-network-sync", "sc-telemetry", "sc-transaction-pool-api", "sc-utils", @@ -13336,6 +13199,7 @@ dependencies = [ "sp-consensus", "sp-consensus-grandpa", "sp-core", + "sp-crypto-hashing", "sp-keystore", "sp-runtime", "substrate-prometheus-endpoint", @@ -13344,11 +13208,11 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.19.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "finality-grandpa", - "futures 0.3.29", + "futures 0.3.30", "jsonrpsee", "log", "parity-scale-codec", @@ -13364,12 +13228,12 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.35.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "assert_matches", "async-trait", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "jsonrpsee", "log", @@ -13399,11 +13263,11 @@ dependencies = [ [[package]] name = "sc-consensus-slots" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.33.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "log", "parity-scale-codec", @@ -13422,8 +13286,8 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.32.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "log", "parity-scale-codec", @@ -13433,33 +13297,33 @@ dependencies = [ "schnellru", "sp-api", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-io", "sp-panic-handler", - "sp-runtime-interface", + "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-trie", "sp-version", - "sp-wasm-interface", + "sp-wasm-interface 20.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "tracing", ] [[package]] name = "sc-executor-common" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.29.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface", + "sp-wasm-interface 20.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "thiserror", "wasm-instrument", ] [[package]] name = "sc-executor-wasmtime" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.29.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "anyhow", "cfg-if", @@ -13471,33 +13335,34 @@ dependencies = [ "sc-allocator", "sc-executor-common", "sp-core", - "sp-runtime-interface", - "sp-wasm-interface", + "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-wasm-interface 20.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "wasmtime", ] [[package]] name = "sc-informant" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.33.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "ansi_term", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "log", "sc-client-api", "sc-network", "sc-network-common", + "sc-network-sync", "sp-blockchain", "sp-runtime", ] [[package]] name = "sc-keystore" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "25.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.0", + "array-bytes 6.2.2", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -13508,13 +13373,14 @@ dependencies = [ [[package]] name = "sc-mixnet" -version = "0.1.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.4.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "array-bytes 4.2.0", "arrayvec 0.7.4", "blake2 0.10.6", - "futures 0.3.29", + "bytes", + "futures 0.3.30", "futures-timer", "libp2p-identity", "log", @@ -13536,17 +13402,17 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.34.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.0", + "array-bytes 6.2.2", "async-channel 1.9.0", "async-trait", "asynchronous-codec", "bytes", "either", "fnv", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "ip_network", "libp2p", @@ -13570,6 +13436,8 @@ dependencies = [ "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "tokio", + "tokio-stream", "unsigned-varint", "wasm-timer", "zeroize", @@ -13577,15 +13445,15 @@ dependencies = [ [[package]] name = "sc-network-bitswap" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.33.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-channel 1.9.0", "cid", - "futures 0.3.29", + "futures 0.3.30", "libp2p-identity", "log", - "prost", + "prost 0.12.3", "prost-build", "sc-client-api", "sc-network", @@ -13597,12 +13465,12 @@ dependencies = [ [[package]] name = "sc-network-common" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.33.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "bitflags 1.3.2", - "futures 0.3.29", + "futures 0.3.30", "libp2p-identity", "parity-scale-codec", "prost-build", @@ -13614,16 +13482,17 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.34.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "ahash 0.8.6", - "futures 0.3.29", + "ahash 0.8.11", + "futures 0.3.30", "futures-timer", "libp2p", "log", "sc-network", "sc-network-common", + "sc-network-sync", "schnellru", "sp-runtime", "substrate-prometheus-endpoint", @@ -13632,16 +13501,16 @@ dependencies = [ [[package]] name = "sc-network-light" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.33.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.0", + "array-bytes 6.2.2", "async-channel 1.9.0", - "futures 0.3.29", + "futures 0.3.30", "libp2p-identity", "log", "parity-scale-codec", - "prost", + "prost 0.12.3", "prost-build", "sc-client-api", "sc-network", @@ -13653,20 +13522,20 @@ dependencies = [ [[package]] name = "sc-network-sync" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.33.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.0", + "array-bytes 6.2.2", "async-channel 1.9.0", "async-trait", "fork-tree", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "libp2p", "log", "mockall", "parity-scale-codec", - "prost", + "prost 0.12.3", "prost-build", "sc-client-api", "sc-consensus", @@ -13683,21 +13552,23 @@ dependencies = [ "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "tokio", "tokio-stream", ] [[package]] name = "sc-network-transactions" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.33.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.0", - "futures 0.3.29", + "array-bytes 6.2.2", + "futures 0.3.30", "libp2p", "log", "parity-scale-codec", "sc-network", "sc-network-common", + "sc-network-sync", "sc-utils", "sp-consensus", "sp-runtime", @@ -13706,13 +13577,13 @@ dependencies = [ [[package]] name = "sc-offchain" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "29.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.0", + "array-bytes 6.2.2", "bytes", "fnv", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "hyper", "hyper-rustls", @@ -13730,7 +13601,7 @@ dependencies = [ "sc-utils", "sp-api", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-keystore", "sp-offchain", "sp-runtime", @@ -13740,8 +13611,8 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.17.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -13749,10 +13620,10 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "29.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "jsonrpsee", "log", "parity-scale-codec", @@ -13781,8 +13652,8 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.33.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -13801,8 +13672,8 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "11.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "http", "jsonrpsee", @@ -13816,11 +13687,11 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.34.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.0", - "futures 0.3.29", + "array-bytes 6.2.2", + "futures 0.3.30", "futures-util", "hex", "jsonrpsee", @@ -13829,12 +13700,14 @@ dependencies = [ "parking_lot 0.12.1", "sc-chain-spec", "sc-client-api", + "sc-rpc", "sc-transaction-pool-api", "sc-utils", "serde", "sp-api", "sp-blockchain", "sp-core", + "sp-rpc", "sp-runtime", "sp-version", "thiserror", @@ -13844,13 +13717,13 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.35.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "directories", "exit-future", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "jsonrpsee", "log", @@ -13858,7 +13731,6 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "rand 0.8.5", - "sc-block-builder", "sc-chain-spec", "sc-client-api", "sc-client-db", @@ -13887,12 +13759,12 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-keystore", "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-transaction-pool", "sp-transaction-storage-proof", "sp-trie", @@ -13908,8 +13780,8 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.30.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "log", "parity-scale-codec", @@ -13919,13 +13791,12 @@ dependencies = [ [[package]] name = "sc-storage-monitor" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.16.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "clap", "fs4", "log", - "sc-client-db", "sp-core", "thiserror", "tokio", @@ -13933,8 +13804,8 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.34.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -13952,10 +13823,11 @@ dependencies = [ [[package]] name = "sc-sysinfo" -version = "6.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "27.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "futures 0.3.29", + "derive_more", + "futures 0.3.30", "libc", "log", "rand 0.8.5", @@ -13965,17 +13837,18 @@ dependencies = [ "serde", "serde_json", "sp-core", + "sp-crypto-hashing", "sp-io", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "sc-telemetry" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "15.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "chrono", - "futures 0.3.29", + "futures 0.3.30", "libp2p", "log", "parking_lot 0.12.1", @@ -13990,15 +13863,16 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "ansi_term", - "atty", "chrono", + "is-terminal", "lazy_static", "libc", "log", + "parity-scale-codec", "parking_lot 0.12.1", "regex", "rustc-hash", @@ -14010,7 +13884,7 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-tracing", + "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "thiserror", "tracing", "tracing-log", @@ -14019,22 +13893,22 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "11.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "sc-transaction-pool" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "linked-hash-map", "log", @@ -14047,8 +13921,9 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-core", + "sp-crypto-hashing", "sp-runtime", - "sp-tracing", + "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-transaction-pool", "substrate-prometheus-endpoint", "thiserror", @@ -14056,11 +13931,11 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", - "futures 0.3.29", + "futures 0.3.30", "log", "parity-scale-codec", "serde", @@ -14072,11 +13947,11 @@ dependencies = [ [[package]] name = "sc-utils" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "14.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-channel 1.9.0", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "lazy_static", "log", @@ -14105,7 +13980,7 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -14113,11 +13988,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -14126,42 +14001,43 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", "cfg-if", "hashbrown 0.13.2", ] [[package]] name = "schnorrkel" -version = "0.9.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" +checksum = "844b7645371e6ecdf61ff246ba1958c29e802881a749ae3fb1993675d210d28d" dependencies = [ "arrayref", - "arrayvec 0.5.2", - "curve25519-dalek 2.1.3", - "getrandom 0.1.16", - "merlin 2.0.1", - "rand 0.7.3", - "rand_core 0.5.1", - "sha2 0.8.2", - "subtle 2.4.1", + "arrayvec 0.7.4", + "curve25519-dalek-ng", + "merlin", + "rand_core 0.6.4", + "sha2 0.9.9", + "subtle-ng", "zeroize", ] [[package]] name = "schnorrkel" -version = "0.10.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "844b7645371e6ecdf61ff246ba1958c29e802881a749ae3fb1993675d210d28d" +checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" dependencies = [ + "aead", "arrayref", "arrayvec 0.7.4", - "curve25519-dalek-ng", - "merlin 3.0.0", + "curve25519-dalek 4.1.2", + "getrandom_or_panic", + "merlin", "rand_core 0.6.4", - "sha2 0.9.9", - "subtle-ng", + "serde_bytes", + "sha2 0.10.8", + "subtle 2.5.0", "zeroize", ] @@ -14177,80 +14053,53 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - [[package]] name = "sct" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.5", + "ring 0.17.8", "untrusted 0.9.0", ] [[package]] -name = "sdp" -version = "0.5.3" +name = "sec1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d22a5ef407871893fd72b4562ee15e4742269b173959db4b8df6f538c414e13" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "rand 0.8.5", - "substring", - "thiserror", - "url", -] - -[[package]] -name = "sec1" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" -dependencies = [ - "base16ct 0.1.1", - "der 0.6.1", + "base16ct", + "der", "generic-array 0.14.7", - "pkcs8 0.9.0", - "subtle 2.4.1", + "pkcs8", + "subtle 2.5.0", "zeroize", ] [[package]] -name = "sec1" -version = "0.7.3" +name = "seccompiler" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +checksum = "345a3e4dddf721a478089d4697b83c6c0a8f5bf16086f6c13397e4534eb6e2e5" dependencies = [ - "base16ct 0.2.0", - "der 0.7.8", - "generic-array 0.14.7", - "pkcs8 0.10.2", - "subtle 2.4.1", - "zeroize", + "libc", ] [[package]] name = "secp256k1" -version = "0.24.3" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" +checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" dependencies = [ "secp256k1-sys", ] [[package]] name = "secp256k1-sys" -version = "0.6.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" +checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb" dependencies = [ "cc", ] @@ -14298,9 +14147,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" dependencies = [ "serde", ] @@ -14313,29 +14162,38 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.192" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] +[[package]] +name = "serde_bytes" +version = "0.11.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +dependencies = [ + "serde", +] + [[package]] name = "serde_derive" -version = "1.0.192" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "itoa", "ryu", @@ -14344,9 +14202,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -14354,7 +14212,7 @@ dependencies = [ [[package]] name = "session-keys-primitives" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.3.0#a34e9ba41e4411ebb806cc71ee5a15ad99de157a" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" dependencies = [ "async-trait", "frame-support", @@ -14368,7 +14226,7 @@ dependencies = [ "sp-inherents", "sp-keystore", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -14381,7 +14239,7 @@ dependencies = [ "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", ] [[package]] @@ -14395,18 +14253,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "sha2" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" -dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", -] - [[package]] name = "sha2" version = "0.9.9" @@ -14417,7 +14263,7 @@ dependencies = [ "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", ] [[package]] @@ -14452,9 +14298,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" @@ -14470,10 +14316,6 @@ name = "signature" version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" -dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", -] [[package]] name = "signature" @@ -14500,9 +14342,9 @@ dependencies = [ [[package]] name = "similar" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aeaf503862c419d66959f5d7ca015337d864e9c49485d771b732e2a20453597" +checksum = "32fea41aca09ee824cc9724996433064c89f7777e60762749a4170a14abbfa21" dependencies = [ "bstr 0.2.17", "unicode-segmentation", @@ -14518,6 +14360,11 @@ dependencies = [ "similar", ] +[[package]] +name = "simple-mermaid" +version = "0.1.0" +source = "git+https://github.com/kianenigma/simple-mermaid.git?rev=e48b187bcfd5cc75111acd9d241f1bd36604344b#e48b187bcfd5cc75111acd9d241f1bd36604344b" + [[package]] name = "siphasher" version = "0.3.11" @@ -14553,30 +14400,30 @@ dependencies = [ [[package]] name = "slot-range-helper" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "enumn", "parity-scale-codec", "paste", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "slotmap" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" +checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" dependencies = [ "version_check", ] [[package]] name = "smallvec" -version = "1.11.2" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "smol" @@ -14604,7 +14451,7 @@ dependencies = [ "arrayvec 0.7.4", "async-lock 2.8.0", "atomic-take", - "base64 0.21.5", + "base64 0.21.7", "bip39", "blake2-rfc", "bs58 0.5.0", @@ -14617,12 +14464,12 @@ dependencies = [ "fnv", "futures-lite 1.13.0", "futures-util", - "hashbrown 0.14.2", + "hashbrown 0.14.3", "hex", "hmac 0.12.1", "itertools 0.11.0", "libsecp256k1", - "merlin 3.0.0", + "merlin", "no-std-net", "nom", "num-bigint", @@ -14645,7 +14492,7 @@ dependencies = [ "soketto", "twox-hash", "wasmi", - "x25519-dalek 2.0.0", + "x25519-dalek 2.0.1", "zeroize", ] @@ -14657,7 +14504,7 @@ checksum = "256b5bad1d6b49045e95fe87492ce73d5af81545d8b4d8318a872d2007024c33" dependencies = [ "async-channel 1.9.0", "async-lock 2.8.0", - "base64 0.21.5", + "base64 0.21.7", "blake2-rfc", "derive_more", "either", @@ -14666,7 +14513,7 @@ dependencies = [ "futures-channel", "futures-lite 1.13.0", "futures-util", - "hashbrown 0.14.2", + "hashbrown 0.14.3", "hex", "itertools 0.11.0", "log", @@ -14687,25 +14534,25 @@ dependencies = [ [[package]] name = "snap" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" +checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" [[package]] name = "snow" -version = "0.9.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58021967fd0a5eeeb23b08df6cc244a4d4a5b4aec1d27c9e02fad1a58b4cd74e" +checksum = "850948bee068e713b8ab860fe1adc4d109676ab4c3b621fd8147f06b261f2f85" dependencies = [ - "aes-gcm 0.10.3", + "aes-gcm", "blake2 0.10.6", "chacha20poly1305", - "curve25519-dalek 4.1.1", + "curve25519-dalek 4.1.2", "rand_core 0.6.4", - "ring 0.17.5", + "ring 0.17.8", "rustc_version", "sha2 0.10.8", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] @@ -14720,12 +14567,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -14737,7 +14584,7 @@ dependencies = [ "base64 0.13.1", "bytes", "flate2", - "futures 0.3.29", + "futures 0.3.30", "http", "httparse", "log", @@ -14747,8 +14594,8 @@ dependencies = [ [[package]] name = "sp-api" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "26.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "hash-db 0.16.0", "log", @@ -14756,11 +14603,11 @@ dependencies = [ "scale-info", "sp-api-proc-macro", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-metadata-ir", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-trie", "sp-version", "thiserror", @@ -14768,75 +14615,93 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "15.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "Inflector", "blake2 0.10.6", "expander 2.0.0", - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "sp-application-crypto" -version = "23.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "30.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "sp-arithmetic" -version = "16.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "23.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "static_assertions", ] +[[package]] +name = "sp-ark-bls12-381" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-bls12-381-ext", + "sp-crypto-ec-utils", +] + +[[package]] +name = "sp-ark-ed-on-bls12-381-bandersnatch" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-ed-on-bls12-381-bandersnatch-ext", + "sp-crypto-ec-utils", +] + [[package]] name = "sp-authority-discovery" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "26.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "sp-block-builder" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "26.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "sp-api", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "sp-blockchain" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -14851,11 +14716,11 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.32.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", - "futures 0.3.29", + "futures 0.3.30", "log", "sp-core", "sp-inherents", @@ -14866,8 +14731,8 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.32.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "parity-scale-codec", @@ -14877,14 +14742,14 @@ dependencies = [ "sp-consensus-slots", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-timestamp", ] [[package]] name = "sp-consensus-babe" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.32.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "parity-scale-codec", @@ -14896,14 +14761,14 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-timestamp", ] [[package]] name = "sp-consensus-beefy" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "13.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "lazy_static", "parity-scale-codec", @@ -14912,17 +14777,18 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-core", + "sp-crypto-hashing", "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "strum 0.24.1", ] [[package]] name = "sp-consensus-grandpa" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "13.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "finality-grandpa", "log", @@ -14934,63 +14800,62 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "sp-consensus-slots" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.32.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-timestamp", ] [[package]] name = "sp-core" -version = "21.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.0", + "array-bytes 6.2.2", "bandersnatch_vrfs", + "bip39", "bitflags 1.3.2", "blake2 0.10.6", "bounded-collections", "bs58 0.5.0", "dyn-clonable", "ed25519-zebra 3.1.0", - "futures 0.3.29", + "futures 0.3.30", "hash-db 0.16.0", "hash256-std-hasher", "impl-serde 0.4.0", - "lazy_static", + "itertools 0.10.5", "libsecp256k1", "log", - "merlin 2.0.1", + "merlin", "parity-scale-codec", "parking_lot 0.12.1", "paste", "primitive-types", "rand 0.8.5", - "regex", "scale-info", - "schnorrkel 0.9.1", + "schnorrkel 0.11.4", "secp256k1", "secrecy", "serde", - "sp-core-hashing", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-crypto-hashing", + "sp-debug-derive 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "ss58-registry", "substrate-bip39", "thiserror", - "tiny-bip39 1.0.0", "tracing", "w3f-bls", "zeroize", @@ -14998,8 +14863,37 @@ dependencies = [ [[package]] name = "sp-core-hashing" -version = "9.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "15.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" +dependencies = [ + "sp-crypto-hashing", +] + +[[package]] +name = "sp-crypto-ec-utils" +version = "0.10.0" +source = "git+https://github.com/paritytech/polkadot-sdk#475e7a147676a4e7a9d255ddc7969dd35ea22882" +dependencies = [ + "ark-bls12-377", + "ark-bls12-377-ext", + "ark-bls12-381", + "ark-bls12-381-ext", + "ark-bw6-761", + "ark-bw6-761-ext", + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ed-on-bls12-377-ext", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ed-on-bls12-381-bandersnatch-ext", + "ark-scale", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", +] + +[[package]] +name = "sp-crypto-hashing" +version = "0.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "blake2b_simd", "byteorder", @@ -15010,19 +14904,19 @@ dependencies = [ ] [[package]] -name = "sp-core-hashing-proc-macro" -version = "9.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +name = "sp-crypto-hashing-proc-macro" +version = "0.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "quote", - "sp-core-hashing", - "syn 2.0.39", + "sp-crypto-hashing", + "syn 2.0.52", ] [[package]] name = "sp-database" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "10.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -15030,69 +14924,91 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "8.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "14.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", +] + +[[package]] +name = "sp-debug-derive" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#475e7a147676a4e7a9d255ddc7969dd35ea22882" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "sp-externalities" -version = "0.19.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.25.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", +] + +[[package]] +name = "sp-externalities" +version = "0.25.0" +source = "git+https://github.com/paritytech/polkadot-sdk#475e7a147676a4e7a9d255ddc7969dd35ea22882" dependencies = [ "environmental", "parity-scale-codec", - "sp-std", - "sp-storage", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk)", ] [[package]] name = "sp-genesis-builder" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "serde_json", "sp-api", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "sp-inherents" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "26.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "thiserror", ] [[package]] name = "sp-io" -version = "23.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "30.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "bytes", - "ed25519-dalek 2.1.0", + "ed25519-dalek 2.1.1", "libsecp256k1", "log", "parity-scale-codec", "rustversion", "secp256k1", "sp-core", - "sp-externalities", + "sp-crypto-hashing", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-keystore", - "sp-runtime-interface", + "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-state-machine", - "sp-std", - "sp-tracing", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-trie", "tracing", "tracing-core", @@ -15100,10 +15016,9 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "24.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "31.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "lazy_static", "sp-core", "sp-runtime", "strum 0.24.1", @@ -15111,20 +15026,20 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.27.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.34.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "thiserror", ] [[package]] name = "sp-maybe-compressed-blob" -version = "4.1.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "11.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "thiserror", "zstd 0.12.4", @@ -15132,31 +15047,31 @@ dependencies = [ [[package]] name = "sp-metadata-ir" -version = "0.1.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.6.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-metadata", "parity-scale-codec", "scale-info", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "sp-mixnet" -version = "0.1.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.4.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "sp-mmr-primitives" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "26.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -15165,16 +15080,16 @@ dependencies = [ "serde", "sp-api", "sp-core", - "sp-debug-derive", + "sp-debug-derive 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "thiserror", ] [[package]] name = "sp-npos-elections" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "26.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", "scale-info", @@ -15182,13 +15097,13 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "sp-offchain" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "26.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "sp-api", "sp-core", @@ -15197,8 +15112,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "8.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "13.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "backtrace", "lazy_static", @@ -15207,8 +15122,8 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "6.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "26.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "rustc-hash", "serde", @@ -15217,9 +15132,10 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "24.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "31.0.1" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ + "docify", "either", "hash256-std-hasher", "impl-trait-for-tuples", @@ -15229,48 +15145,82 @@ dependencies = [ "rand 0.8.5", "scale-info", "serde", + "simple-mermaid", "sp-application-crypto", "sp-arithmetic", "sp-core", "sp-io", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-weights", ] [[package]] name = "sp-runtime-interface" -version = "17.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "24.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-runtime-interface-proc-macro 17.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-wasm-interface 20.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#475e7a147676a4e7a9d255ddc7969dd35ea22882" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", + "polkavm-derive", "primitive-types", - "sp-externalities", - "sp-runtime-interface-proc-macro", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-runtime-interface-proc-macro 17.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" -version = "11.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "17.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "Inflector", - "proc-macro-crate", + "expander 2.0.0", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.52", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#475e7a147676a4e7a9d255ddc7969dd35ea22882" +dependencies = [ + "Inflector", + "expander 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "sp-session" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "27.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", "scale-info", @@ -15279,13 +15229,13 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "sp-staking" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "26.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -15293,13 +15243,13 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] name = "sp-state-machine" -version = "0.28.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.35.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "hash-db 0.16.0", "log", @@ -15308,9 +15258,9 @@ dependencies = [ "rand 0.8.5", "smallvec", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-panic-handler", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-trie", "thiserror", "tracing", @@ -15319,12 +15269,12 @@ dependencies = [ [[package]] name = "sp-statement-store" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "10.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "aes-gcm 0.10.3", - "curve25519-dalek 4.1.1", - "ed25519-dalek 2.1.0", + "aes-gcm", + "curve25519-dalek 4.1.2", + "ed25519-dalek 2.1.1", "hkdf", "parity-scale-codec", "rand 0.8.5", @@ -15333,52 +15283,83 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-core", - "sp-externalities", + "sp-crypto-hashing", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-runtime", - "sp-runtime-interface", - "sp-std", + "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "thiserror", - "x25519-dalek 2.0.0", + "x25519-dalek 2.0.1", ] [[package]] name = "sp-std" -version = "8.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "14.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" + +[[package]] +name = "sp-std" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#475e7a147676a4e7a9d255ddc7969dd35ea22882" [[package]] name = "sp-storage" -version = "13.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "19.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" +dependencies = [ + "impl-serde 0.4.0", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", +] + +[[package]] +name = "sp-storage" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#475e7a147676a4e7a9d255ddc7969dd35ea22882" dependencies = [ "impl-serde 0.4.0", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", ] [[package]] name = "sp-timestamp" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "26.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "parity-scale-codec", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "thiserror", ] [[package]] name = "sp-tracing" -version = "10.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "16.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" +dependencies = [ + "parity-scale-codec", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-tracing" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#475e7a147676a4e7a9d255ddc7969dd35ea22882" dependencies = [ "parity-scale-codec", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "tracing", "tracing-core", "tracing-subscriber", @@ -15386,8 +15367,8 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "26.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "sp-api", "sp-runtime", @@ -15395,8 +15376,8 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "26.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "parity-scale-codec", @@ -15404,18 +15385,17 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-trie", ] [[package]] name = "sp-trie" -version = "22.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "29.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", "hash-db 0.16.0", - "hashbrown 0.13.2", "lazy_static", "memory-db", "nohash-hasher", @@ -15425,7 +15405,8 @@ dependencies = [ "scale-info", "schnellru", "sp-core", - "sp-std", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "thiserror", "tracing", "trie-db", @@ -15434,58 +15415,71 @@ dependencies = [ [[package]] name = "sp-version" -version = "22.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "29.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "impl-serde 0.4.0", "parity-scale-codec", "parity-wasm", "scale-info", "serde", - "sp-core-hashing-proc-macro", + "sp-crypto-hashing-proc-macro", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-version-proc-macro", "thiserror", ] [[package]] name = "sp-version-proc-macro" -version = "8.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "13.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "sp-wasm-interface" -version = "14.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "20.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "wasmtime", ] [[package]] -name = "sp-weights" +name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +source = "git+https://github.com/paritytech/polkadot-sdk#475e7a147676a4e7a9d255ddc7969dd35ea22882" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "wasmtime", +] + +[[package]] +name = "sp-weights" +version = "27.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ + "bounded-collections", "parity-scale-codec", "scale-info", "serde", "smallvec", "sp-arithmetic", - "sp-core", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", ] [[package]] @@ -15505,9 +15499,9 @@ dependencies = [ [[package]] name = "spinners" -version = "4.1.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08615eea740067d9899969bc2891c68a19c315cb1f66640af9a9ecb91b13bcab" +checksum = "a0ef947f358b9c238923f764c72a4a9d42f2d637c46e059dbd319d6e7cfb4f82" dependencies = [ "lazy_static", "maplit", @@ -15516,40 +15510,30 @@ dependencies = [ [[package]] name = "spki" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" -dependencies = [ - "base64ct", - "der 0.6.1", -] - -[[package]] -name = "spki" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", - "der 0.7.8", + "der", ] [[package]] name = "sqlformat" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b7b278788e7be4d0d29c0f39497a0eef3fba6bbc8e70d8bf7fde46edeaa9e85" +checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" dependencies = [ - "itertools 0.11.0", + "itertools 0.12.1", "nom", "unicode_categories", ] [[package]] name = "sqlx" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e50c216e3624ec8e7ecd14c6a6a6370aad6ee5d8cfc3ab30b5162eeeef2ed33" +checksum = "dba03c279da73694ef99763320dea58b51095dfe87d001b1d4b5fe78ba8763cf" dependencies = [ "sqlx-core", "sqlx-macros", @@ -15558,11 +15542,11 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d6753e460c998bbd4cd8c6f0ed9a64346fcca0723d6e75e52fdc351c5d2169d" +checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", "atoi", "byteorder", "bytes", @@ -15578,7 +15562,7 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap 2.1.0", + "indexmap 2.2.5", "log", "memchr", "native-tls", @@ -15598,9 +15582,9 @@ dependencies = [ [[package]] name = "sqlx-macros" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a793bb3ba331ec8359c1853bd39eed32cdd7baaf22c35ccf5c92a7e8d1189ec" +checksum = "89961c00dc4d7dffb7aee214964b065072bff69e36ddb9e2c107541f75e4f2a5" dependencies = [ "proc-macro2", "quote", @@ -15611,10 +15595,11 @@ dependencies = [ [[package]] name = "sqlx-macros-core" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4ee1e104e00dedb6aa5ffdd1343107b0a4702e862a84320ee7cc74782d96fc" +checksum = "d0bd4519486723648186a08785143599760f7cc81c52334a55d6a83ea1e20841" dependencies = [ + "atomic-write-file", "dotenvy", "either", "heck", @@ -15635,9 +15620,9 @@ dependencies = [ [[package]] name = "sqlx-sqlite" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59dc83cf45d89c555a577694534fcd1b55c545a816c816ce51f20bbe56a4f3f" +checksum = "210976b7d948c7ba9fced8ca835b11cbb2d677c59c79de41ac0d397e14547490" dependencies = [ "atoi", "flume 0.11.0", @@ -15653,13 +15638,14 @@ dependencies = [ "sqlx-core", "tracing", "url", + "urlencoding", ] [[package]] name = "ss58-registry" -version = "1.44.0" +version = "1.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35935738370302d5e33963665b77541e4b990a3e919ec904c837a56cfc891de1" +checksum = "b1114ee5900b8569bbc8b1a014a942f937b752af4b44f4607430b5f86cedaac0" dependencies = [ "Inflector", "num-format", @@ -15677,14 +15663,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] -name = "staging-xcm" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +name = "staging-parachain-info" +version = "0.7.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "bounded-collections", - "derivative", - "environmental", - "impl-trait-for-tuples", + "cumulus-primitives-core", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", +] + +[[package]] +name = "staging-xcm" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" +dependencies = [ + "array-bytes 6.2.2", + "bounded-collections", + "derivative", + "environmental", + "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", @@ -15695,8 +15696,8 @@ dependencies = [ [[package]] name = "staging-xcm-builder" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-support", "frame-system", @@ -15709,7 +15710,7 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-weights", "staging-xcm", "staging-xcm-executor", @@ -15717,8 +15718,8 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "environmental", "frame-benchmarking", @@ -15726,11 +15727,12 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", + "scale-info", "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-weights", "staging-xcm", ] @@ -15780,15 +15782,28 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-trie", ] +[[package]] +name = "strobe-rs" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fabb238a1cccccfa4c4fb703670c0d157e1256c1ba695abf1b93bd2bb14bab2d" +dependencies = [ + "bitflags 1.3.2", + "byteorder", + "keccak", + "subtle 2.5.0", + "zeroize", +] + [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "strum" @@ -15828,37 +15843,18 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.39", -] - -[[package]] -name = "stun" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7e94b1ec00bad60e6410e058b52f1c66de3dc5fe4d62d09b3e52bb7d3b73e25" -dependencies = [ - "base64 0.13.1", - "crc", - "lazy_static", - "md-5", - "rand 0.8.5", - "ring 0.16.20", - "subtle 2.4.1", - "thiserror", - "tokio", - "url", - "webrtc-util", + "syn 2.0.52", ] [[package]] name = "substrate-bip39" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" +checksum = "6a7590dc041b9bc2825e52ce5af8416c73dbe9d0654402bfd4b4941938b94d8f" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", - "schnorrkel 0.9.1", + "schnorrkel 0.11.4", "sha2 0.9.9", "zeroize", ] @@ -15878,13 +15874,13 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" -version = "3.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "11.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" [[package]] name = "substrate-fixed" version = "0.5.9" -source = "git+https://github.com/encointer/substrate-fixed#a75f3ba3f7c7893fb420500639cc055f964b1b88" +source = "git+https://github.com/encointer/substrate-fixed#879c58bcc6fd676a74315dcd38b598f28708b0b5" dependencies = [ "parity-scale-codec", "scale-info", @@ -15893,11 +15889,11 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "28.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-system-rpc-runtime-api", - "futures 0.3.29", + "futures 0.3.30", "jsonrpsee", "log", "parity-scale-codec", @@ -15912,8 +15908,8 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.17.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "hyper", "log", @@ -15924,8 +15920,8 @@ dependencies = [ [[package]] name = "substrate-rpc-client" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.33.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "jsonrpsee", @@ -15937,8 +15933,8 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "27.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -15955,11 +15951,11 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.0", + "array-bytes 6.2.2", "async-trait", - "futures 0.3.29", + "futures 0.3.30", "parity-scale-codec", "sc-client-api", "sc-client-db", @@ -15976,14 +15972,15 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-state-machine", + "tokio", ] [[package]] name = "substrate-test-runtime" version = "2.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.0", + "array-bytes 6.2.2", "frame-executive", "frame-support", "frame-system", @@ -15995,8 +15992,6 @@ dependencies = [ "parity-scale-codec", "sc-service", "scale-info", - "serde", - "serde_json", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -16004,7 +15999,8 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-grandpa", "sp-core", - "sp-externalities", + "sp-crypto-hashing", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -16013,7 +16009,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-transaction-pool", "sp-trie", "sp-version", @@ -16024,9 +16020,9 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" version = "2.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -16051,31 +16047,22 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "5.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "17.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "ansi_term", "build-helper", "cargo_metadata", + "console", "filetime", "parity-wasm", "sp-maybe-compressed-blob", "strum 0.24.1", "tempfile", - "toml 0.7.8", + "toml 0.8.10", "walkdir", "wasm-opt", ] -[[package]] -name = "substring" -version = "1.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86" -dependencies = [ - "autocfg", -] - [[package]] name = "subtle" version = "1.0.0" @@ -16084,9 +16071,9 @@ checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "subtle-ng" @@ -16119,9 +16106,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" dependencies = [ "proc-macro2", "quote", @@ -16169,32 +16156,41 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.12" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" +checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "tempfile" -version = "3.8.1" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand 2.0.1", - "redox_syscall 0.4.1", - "rustix 0.38.24", - "windows-sys 0.48.0", + "rustix 0.38.31", + "windows-sys 0.52.0", ] [[package]] name = "termcolor" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] +[[package]] +name = "terminal_size" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +dependencies = [ + "rustix 0.38.31", + "windows-sys 0.48.0", +] + [[package]] name = "termtree" version = "0.4.1" @@ -16203,42 +16199,42 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-core" -version = "1.0.38" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d97345f6437bb2004cd58819d8a9ef8e36cdd7661c2abc4bbde0a7c40d9f497" +checksum = "c001ee18b7e5e3f62cbf58c7fe220119e68d902bb7443179c0c8aef30090e999" dependencies = [ "thiserror-core-impl", ] [[package]] name = "thiserror-core-impl" -version = "1.0.38" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10ac1c5050e43014d16b2f94d0d2ce79e65ffdd8b38d8048f9c8f6a8a6da62ac" +checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.52", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -16249,9 +16245,9 @@ checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -16302,12 +16298,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.30" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", "itoa", + "num-conv", "powerfmt", "serde", "time-core", @@ -16322,10 +16319,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ + "num-conv", "time-core", ] @@ -16348,25 +16346,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "tiny-bip39" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" -dependencies = [ - "anyhow", - "hmac 0.12.1", - "once_cell", - "pbkdf2 0.11.0", - "rand 0.8.5", - "rustc-hash", - "sha2 0.10.8", - "thiserror", - "unicode-normalization", - "wasm-bindgen", - "zeroize", -] - [[package]] name = "tiny-keccak" version = "2.0.2" @@ -16376,16 +16355,6 @@ dependencies = [ "crunchy", ] -[[package]] -name = "tinytemplate" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" -dependencies = [ - "serde", - "serde_json", -] - [[package]] name = "tinyvec" version = "1.6.0" @@ -16403,9 +16372,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.34.0" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ "backtrace", "bytes", @@ -16415,7 +16384,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project-lite 0.2.13", "signal-hook-registry", - "socket2 0.5.5", + "socket2 0.5.6", "tokio-macros", "windows-sys 0.48.0", ] @@ -16428,7 +16397,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -16448,7 +16417,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.9", + "rustls 0.21.10", "tokio", ] @@ -16490,14 +16459,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.22.6", ] [[package]] @@ -16515,11 +16484,44 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.5", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +dependencies = [ + "indexmap 2.2.5", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap 2.2.5", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" +dependencies = [ + "indexmap 2.2.5", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.5", ] [[package]] @@ -16528,6 +16530,10 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite 0.2.13", "tower-layer", "tower-service", "tracing", @@ -16539,7 +16545,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "bytes", "futures-core", "futures-util", @@ -16583,7 +16589,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -16608,11 +16614,10 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "coarsetime", - "polkadot-node-jaeger", "polkadot-primitives", "tracing", "tracing-gum-proc-macro", @@ -16620,14 +16625,14 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "5.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "expander 2.0.0", - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -16705,16 +16710,6 @@ dependencies = [ "hash-db 0.16.0", ] -[[package]] -name = "triehash" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1631b201eb031b563d2e85ca18ec8092508e262a3196ce9bd10a67ec87b9f5c" -dependencies = [ - "hash-db 0.15.2", - "rlp", -] - [[package]] name = "trust-dns-proto" version = "0.22.0" @@ -16763,14 +16758,14 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "try-runtime-cli" -version = "0.10.0-dev" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "0.38.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "async-trait", "clap", @@ -16787,8 +16782,8 @@ dependencies = [ "sp-consensus-aura", "sp-consensus-babe", "sp-core", - "sp-debug-derive", - "sp-externalities", + "sp-debug-derive 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-inherents", "sp-io", "sp-keystore", @@ -16805,9 +16800,9 @@ dependencies = [ [[package]] name = "trybuild" -version = "1.0.85" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196a58260a906cedb9bf6d8034b6379d0c11f552416960452f267402ceeddff1" +checksum = "9a9d3ba662913483d6722303f619e75ea10b7855b0f8e0d72799cf8621bb488f" dependencies = [ "basic-toml", "glob", @@ -16824,25 +16819,6 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f195fd851901624eee5a58c4bb2b4f06399148fcd0ed336e6f1cb60a9881df" -[[package]] -name = "turn" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4712ee30d123ec7ae26d1e1b218395a16c87cdbaf4b3925d170d684af62ea5e8" -dependencies = [ - "async-trait", - "base64 0.13.1", - "futures 0.3.29", - "log", - "md-5", - "rand 0.8.5", - "ring 0.16.20", - "stun", - "thiserror", - "tokio", - "webrtc-util", -] - [[package]] name = "twox-hash" version = "1.6.3" @@ -16881,9 +16857,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -16902,9 +16878,9 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" @@ -16924,16 +16900,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" -[[package]] -name = "universal-hash" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array 0.14.7", - "subtle 2.4.1", -] - [[package]] name = "universal-hash" version = "0.5.1" @@ -16941,7 +16907,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] @@ -16970,29 +16936,26 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna 0.5.0", "percent-encoding", ] [[package]] -name = "utf8parse" -version = "0.2.1" +name = "urlencoding" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] -name = "uuid" -version = "1.5.0" +name = "utf8parse" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" -dependencies = [ - "getrandom 0.2.11", -] +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "valuable" @@ -17051,15 +17014,6 @@ dependencies = [ "libc", ] -[[package]] -name = "waitgroup" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1f50000a783467e6c0200f9d10642f4bc424e39efc1b770203e88b488f79292" -dependencies = [ - "atomic-waker", -] - [[package]] name = "waker-fn" version = "1.1.1" @@ -17068,9 +17022,9 @@ checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -17097,11 +17051,20 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasix" +version = "0.12.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1fbb4ef9bbca0c1170e0b00dd28abc9e3b68669821600cad1caaed606583c6d" +dependencies = [ + "wasi 0.11.0+wasi-snapshot-preview1", +] + [[package]] name = "wasm-bindgen" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -17109,24 +17072,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.38" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -17136,9 +17099,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -17146,28 +17109,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-instrument" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa1dafb3e60065305741e83db35c6c2584bb3725b692b5b66148a38d72ace6cd" +checksum = "2a47ecb37b9734d1085eaa5ae1a81e60801fd8c28d4cabdd8aedb982021918bc" dependencies = [ "parity-wasm", ] @@ -17218,7 +17181,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "js-sys", "parking_lot 0.11.2", "pin-utils", @@ -17229,9 +17192,9 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.31.0" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f341edb80021141d4ae6468cbeefc50798716a347d4085c3811900049ea8945" +checksum = "77a8281d1d660cdf54c76a3efa9ddd0c270cada1383a995db3ccb43d166456c7" dependencies = [ "smallvec", "spin 0.9.8", @@ -17242,9 +17205,9 @@ dependencies = [ [[package]] name = "wasmi_arena" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468" +checksum = "104a7f73be44570cac297b3035d76b169d6599637631cf37a1703326a0727073" [[package]] name = "wasmi_core" @@ -17321,7 +17284,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.21.5", + "base64 0.21.7", "bincode", "directories-next", "file-per-thread-logger", @@ -17474,31 +17437,21 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.65" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - [[package]] name = "webpki" version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.17.5", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -17508,227 +17461,13 @@ version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ - "webpki 0.22.4", -] - -[[package]] -name = "webpki-roots" -version = "0.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" - -[[package]] -name = "webrtc" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3bc9049bdb2cea52f5fd4f6f728184225bdb867ed0dc2410eab6df5bdd67bb" -dependencies = [ - "arc-swap", - "async-trait", - "bytes", - "hex", - "interceptor", - "lazy_static", - "log", - "rand 0.8.5", - "rcgen 0.9.3", - "regex", - "ring 0.16.20", - "rtcp", - "rtp", - "rustls 0.19.1", - "sdp", - "serde", - "serde_json", - "sha2 0.10.8", - "stun", - "thiserror", - "time", - "tokio", - "turn", - "url", - "waitgroup", - "webrtc-data", - "webrtc-dtls", - "webrtc-ice", - "webrtc-mdns", - "webrtc-media", - "webrtc-sctp", - "webrtc-srtp", - "webrtc-util", -] - -[[package]] -name = "webrtc-data" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef36a4d12baa6e842582fe9ec16a57184ba35e1a09308307b67d43ec8883100" -dependencies = [ - "bytes", - "derive_builder", - "log", - "thiserror", - "tokio", - "webrtc-sctp", - "webrtc-util", -] - -[[package]] -name = "webrtc-dtls" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a00f4242f2db33307347bd5be53263c52a0331c96c14292118c9a6bb48d267" -dependencies = [ - "aes 0.6.0", - "aes-gcm 0.10.3", - "async-trait", - "bincode", - "block-modes", - "byteorder", - "ccm", - "curve25519-dalek 3.2.0", - "der-parser 8.2.0", - "elliptic-curve 0.12.3", - "hkdf", - "hmac 0.12.1", - "log", - "p256", - "p384", - "rand 0.8.5", - "rand_core 0.6.4", - "rcgen 0.10.0", - "ring 0.16.20", - "rustls 0.19.1", - "sec1 0.3.0", - "serde", - "sha1", - "sha2 0.10.8", - "signature 1.6.4", - "subtle 2.4.1", - "thiserror", - "tokio", - "webpki 0.21.4", - "webrtc-util", - "x25519-dalek 2.0.0", - "x509-parser 0.13.2", -] - -[[package]] -name = "webrtc-ice" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465a03cc11e9a7d7b4f9f99870558fe37a102b65b93f8045392fef7c67b39e80" -dependencies = [ - "arc-swap", - "async-trait", - "crc", - "log", - "rand 0.8.5", - "serde", - "serde_json", - "stun", - "thiserror", - "tokio", - "turn", - "url", - "uuid", - "waitgroup", - "webrtc-mdns", - "webrtc-util", -] - -[[package]] -name = "webrtc-mdns" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" -dependencies = [ - "log", - "socket2 0.4.10", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-media" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f72e1650a8ae006017d1a5280efb49e2610c19ccc3c0905b03b648aee9554991" -dependencies = [ - "byteorder", - "bytes", - "rand 0.8.5", - "rtp", - "thiserror", -] - -[[package]] -name = "webrtc-sctp" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d47adcd9427eb3ede33d5a7f3424038f63c965491beafcc20bc650a2f6679c0" -dependencies = [ - "arc-swap", - "async-trait", - "bytes", - "crc", - "log", - "rand 0.8.5", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-srtp" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6183edc4c1c6c0175f8812eefdce84dfa0aea9c3ece71c2bf6ddd3c964de3da5" -dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "aes-gcm 0.9.4", - "async-trait", - "byteorder", - "bytes", - "ctr 0.8.0", - "hmac 0.11.0", - "log", - "rtcp", - "rtp", - "sha-1", - "subtle 2.4.1", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-util" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f1db1727772c05cf7a2cfece52c3aca8045ca1e176cd517d323489aa3c6d87" -dependencies = [ - "async-trait", - "bitflags 1.3.2", - "bytes", - "cc", - "ipnet", - "lazy_static", - "libc", - "log", - "nix 0.24.3", - "rand 0.8.5", - "thiserror", - "tokio", - "winapi", + "webpki", ] [[package]] name = "westend-runtime" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "binary-merkle-tree", "bitvec", @@ -17774,6 +17513,7 @@ dependencies = [ "pallet-proxy", "pallet-recovery", "pallet-referenda", + "pallet-root-testing", "pallet-scheduler", "pallet-session", "pallet-session-benchmarking", @@ -17819,8 +17559,8 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", - "sp-storage", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-transaction-pool", "sp-version", "staging-xcm", @@ -17832,8 +17572,8 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-support", "polkadot-primitives", @@ -17843,6 +17583,7 @@ dependencies = [ "sp-runtime", "sp-weights", "staging-xcm", + "staging-xcm-builder", ] [[package]] @@ -17854,14 +17595,14 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.24", + "rustix 0.38.31", ] [[package]] name = "wide" -version = "0.7.13" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68938b57b33da363195412cfc5fc37c9ed49aa9cfe2156fde64b8d2c9498242" +checksum = "89beec544f246e679fc25490e3f8e08003bc4bf612068f325120dad4cea02c1c" dependencies = [ "bytemuck", "safe_arch", @@ -17910,7 +17651,7 @@ version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows-core", + "windows-core 0.51.1", "windows-targets 0.48.5", ] @@ -17923,6 +17664,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.4", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -17941,6 +17691,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.4", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -17971,6 +17730,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +dependencies = [ + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -17983,6 +17757,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -17995,6 +17775,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -18007,6 +17793,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -18019,6 +17811,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -18031,6 +17829,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -18043,6 +17847,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -18055,11 +17865,26 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" + [[package]] name = "winnow" -version = "0.5.19" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" dependencies = [ "memchr", ] @@ -18096,48 +17921,29 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" +checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" dependencies = [ - "curve25519-dalek 4.1.1", + "curve25519-dalek 4.1.2", "rand_core 0.6.4", "serde", "zeroize", ] -[[package]] -name = "x509-parser" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb9bace5b5589ffead1afb76e43e34cff39cd0f3ce7e170ae0c29e53b88eb1c" -dependencies = [ - "asn1-rs 0.3.1", - "base64 0.13.1", - "data-encoding", - "der-parser 7.0.0", - "lazy_static", - "nom", - "oid-registry 0.4.0", - "ring 0.16.20", - "rusticata-macros", - "thiserror", - "time", -] - [[package]] name = "x509-parser" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", "base64 0.13.1", "data-encoding", - "der-parser 8.2.0", + "der-parser", "lazy_static", "nom", - "oid-registry 0.6.1", + "oid-registry", "rusticata-macros", "thiserror", "time", @@ -18146,7 +17952,7 @@ dependencies = [ [[package]] name = "xcm-primitives" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.3.0#a34e9ba41e4411ebb806cc71ee5a15ad99de157a" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" dependencies = [ "sp-runtime", ] @@ -18173,7 +17979,7 @@ dependencies = [ "sha3", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -18181,19 +17987,19 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] name = "xcm-simulator" -version = "1.0.0" -source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.3.0#771cd7512cf6c4efc9f01539acb797a6f1cbb623" +version = "7.0.0" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "frame-support", "parity-scale-codec", @@ -18202,7 +18008,7 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-runtime-parachains", "sp-io", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -18214,7 +18020,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d9ba232399af1783a58d8eb26f6b5006fbefe2dc9ef36bd283324792d03ea5" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "log", "nohash-hasher", "parking_lot 0.12.1", @@ -18233,22 +18039,22 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.26" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.26" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] @@ -18268,7 +18074,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.52", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index bc837a7731..3cbb7c9e20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,44 +1,44 @@ [workspace] exclude = ["bin/utils/moonkey"] members = [ - "bin/utils/moonkey", - "client/rpc/finality", - "client/rpc/manual-xcm", - "client/vrf", - "node", - "node/cli", - "node/service", - "pallets/erc20-xcm-bridge", - "pallets/moonbeam-orbiters", - "pallets/precompile-benchmarks", - "pallets/proxy-genesis-companion", - "pallets/moonbeam-lazy-migrations", - "precompiles/balances-erc20", - "precompiles/batch", - "precompiles/call-permit", - "precompiles/collective", - "precompiles/conviction-voting", - "precompiles/crowdloan-rewards", - "precompiles/gmp", - "precompiles/identity", - "precompiles/parachain-staking", - "precompiles/precompile-registry", - "precompiles/preimage", - "precompiles/proxy", - "precompiles/referenda", - "precompiles/relay-encoder", - "precompiles/relay-data-verifier", - "precompiles/utils", - "precompiles/utils/macro", - "precompiles/utils/tests-external", - "precompiles/xcm-transactor", - "precompiles/xtokens", - "primitives/storage-proof", - "runtime/moonbase", - "runtime/moonbeam", - "runtime/moonriver", - "runtime/relay-encoder", - "runtime/summarize-precompile-checks", + "bin/utils/moonkey", + "client/rpc/finality", + "client/rpc/manual-xcm", + "client/vrf", + "node", + "node/cli", + "node/service", + "pallets/erc20-xcm-bridge", + "pallets/moonbeam-orbiters", + "pallets/precompile-benchmarks", + "pallets/proxy-genesis-companion", + "pallets/moonbeam-lazy-migrations", + "precompiles/balances-erc20", + "precompiles/batch", + "precompiles/call-permit", + "precompiles/collective", + "precompiles/conviction-voting", + "precompiles/crowdloan-rewards", + "precompiles/gmp", + # TODO(RODRIGO) "precompiles/identity", + "precompiles/parachain-staking", + "precompiles/precompile-registry", + "precompiles/preimage", + "precompiles/proxy", + "precompiles/referenda", + "precompiles/relay-encoder", + "precompiles/relay-data-verifier", + "precompiles/utils", + "precompiles/utils/macro", + "precompiles/utils/tests-external", + "precompiles/xcm-transactor", + "precompiles/xtokens", + "primitives/storage-proof", + "runtime/moonbase", + "runtime/moonbeam", + "runtime/moonriver", + "runtime/relay-encoder", + "runtime/summarize-precompile-checks", ] resolver = "2" @@ -54,333 +54,334 @@ repository = "https://github.com/PureStake/moonbeam" # - "client" dependencies are only used in the client, and thus don't need to be no_std compatible. # Moonbeam (wasm) -account = {path = "primitives/account", default-features = false} -evm-tracing-events = {path = "primitives/rpc/evm-tracing-events", default-features = false} -moonbeam-core-primitives = {path = "core-primitives", default-features = false} -moonbeam-primitives-ext = {path = "primitives/ext", default-features = false} -moonbeam-rpc-primitives-debug = {path = "primitives/rpc/debug", default-features = false} -moonbeam-rpc-primitives-txpool = {path = "primitives/rpc/txpool", default-features = false} -storage-proof-primitives = {path = "primitives/storage-proof", default-features = false} +account = { path = "primitives/account", default-features = false } +evm-tracing-events = { path = "primitives/rpc/evm-tracing-events", default-features = false } +moonbeam-core-primitives = { path = "core-primitives", default-features = false } +moonbeam-primitives-ext = { path = "primitives/ext", default-features = false } +moonbeam-rpc-primitives-debug = { path = "primitives/rpc/debug", default-features = false } +moonbeam-rpc-primitives-txpool = { path = "primitives/rpc/txpool", default-features = false } +storage-proof-primitives = { path = "primitives/storage-proof", default-features = false } -moonbeam-evm-tracer = {path = "runtime/evm_tracer", default-features = false} -moonbeam-relay-encoder = {path = "runtime/relay-encoder", default-features = false} -moonbeam-runtime-common = {path = "runtime/common", default-features = false} +moonbeam-evm-tracer = { path = "runtime/evm_tracer", default-features = false } +moonbeam-relay-encoder = { path = "runtime/relay-encoder", default-features = false } +moonbeam-runtime-common = { path = "runtime/common", default-features = false } -moonbeam-xcm-benchmarks = {path = "pallets/moonbeam-xcm-benchmarks", default-features = false} -pallet-asset-manager = {path = "pallets/asset-manager", default-features = false} -pallet-erc20-xcm-bridge = {path = "pallets/erc20-xcm-bridge", default-features = false} -pallet-ethereum-xcm = {path = "pallets/ethereum-xcm", default-features = false} +moonbeam-xcm-benchmarks = { path = "pallets/moonbeam-xcm-benchmarks", default-features = false } +pallet-asset-manager = { path = "pallets/asset-manager", default-features = false } +pallet-erc20-xcm-bridge = { path = "pallets/erc20-xcm-bridge", default-features = false } +pallet-ethereum-xcm = { path = "pallets/ethereum-xcm", default-features = false } -pallet-evm-precompile-author-mapping = {path = "precompiles/author-mapping", default-features = false} -pallet-evm-precompile-balances-erc20 = {path = "precompiles/balances-erc20", default-features = false} -pallet-evm-precompile-batch = {path = "precompiles/batch", default-features = false} -pallet-evm-precompile-call-permit = {path = "precompiles/call-permit", default-features = false} -pallet-evm-precompile-collective = {path = "precompiles/collective", default-features = false} -pallet-evm-precompile-conviction-voting = {path = "precompiles/conviction-voting", default-features = false} -pallet-evm-precompile-crowdloan-rewards = {path = "precompiles/crowdloan-rewards", default-features = false} -pallet-evm-precompile-gmp = {path = "precompiles/gmp", default-features = false} -pallet-evm-precompile-identity = {path = "precompiles/identity", default-features = false} -pallet-evm-precompile-parachain-staking = {path = "precompiles/parachain-staking", default-features = false} -pallet-evm-precompile-preimage = {path = "precompiles/preimage", default-features = false} -pallet-evm-precompile-proxy = {path = "precompiles/proxy", default-features = false} -pallet-evm-precompile-randomness = {path = "precompiles/randomness", default-features = false} -pallet-evm-precompile-referenda = {path = "precompiles/referenda", default-features = false} -pallet-evm-precompile-registry = {path = "precompiles/precompile-registry", default-features = false} -pallet-evm-precompile-relay-encoder = {path = "precompiles/relay-encoder", default-features = false} -pallet-evm-precompile-relay-verifier = {path = "precompiles/relay-data-verifier", default-features = false} -pallet-evm-precompile-xcm-transactor = {path = "precompiles/xcm-transactor", default-features = false} -pallet-evm-precompile-xcm-utils = {path = "precompiles/xcm-utils", default-features = false} -pallet-evm-precompile-xtokens = {path = "precompiles/xtokens", default-features = false} -pallet-evm-precompileset-assets-erc20 = {path = "precompiles/assets-erc20", default-features = false} -pallet-moonbeam-lazy-migrations = {path = "pallets/moonbeam-lazy-migrations", default-features = false} -pallet-moonbeam-orbiters = {path = "pallets/moonbeam-orbiters", default-features = false} -pallet-parachain-staking = {path = "pallets/parachain-staking", default-features = false} -pallet-precompile-benchmarks = {path = "pallets/precompile-benchmarks", default-features = false} -pallet-proxy-genesis-companion = {path = "pallets/proxy-genesis-companion", default-features = false} -pallet-xcm-transactor = {path = "pallets/xcm-transactor", default-features = false} -precompile-utils = {path = "precompiles/utils", default-features = false} -xcm-primitives = {path = "primitives/xcm", default-features = false} +pallet-evm-precompile-author-mapping = { path = "precompiles/author-mapping", default-features = false } +pallet-evm-precompile-balances-erc20 = { path = "precompiles/balances-erc20", default-features = false } +pallet-evm-precompile-batch = { path = "precompiles/batch", default-features = false } +pallet-evm-precompile-call-permit = { path = "precompiles/call-permit", default-features = false } +pallet-evm-precompile-collective = { path = "precompiles/collective", default-features = false } +pallet-evm-precompile-conviction-voting = { path = "precompiles/conviction-voting", default-features = false } +pallet-evm-precompile-crowdloan-rewards = { path = "precompiles/crowdloan-rewards", default-features = false } +pallet-evm-precompile-gmp = { path = "precompiles/gmp", default-features = false } +# TODO(RODRIGO) pallet-evm-precompile-identity = { path = "precompiles/identity", default-features = false } +pallet-evm-precompile-parachain-staking = { path = "precompiles/parachain-staking", default-features = false } +pallet-evm-precompile-preimage = { path = "precompiles/preimage", default-features = false } +pallet-evm-precompile-proxy = { path = "precompiles/proxy", default-features = false } +pallet-evm-precompile-randomness = { path = "precompiles/randomness", default-features = false } +pallet-evm-precompile-referenda = { path = "precompiles/referenda", default-features = false } +pallet-evm-precompile-registry = { path = "precompiles/precompile-registry", default-features = false } +pallet-evm-precompile-relay-encoder = { path = "precompiles/relay-encoder", default-features = false } +pallet-evm-precompile-relay-verifier = { path = "precompiles/relay-data-verifier", default-features = false } +pallet-evm-precompile-xcm-transactor = { path = "precompiles/xcm-transactor", default-features = false } +pallet-evm-precompile-xcm-utils = { path = "precompiles/xcm-utils", default-features = false } +pallet-evm-precompile-xtokens = { path = "precompiles/xtokens", default-features = false } +pallet-evm-precompileset-assets-erc20 = { path = "precompiles/assets-erc20", default-features = false } +pallet-moonbeam-orbiters = { path = "pallets/moonbeam-orbiters", default-features = false } +pallet-parachain-staking = { path = "pallets/parachain-staking", default-features = false } +pallet-precompile-benchmarks = { path = "pallets/precompile-benchmarks", default-features = false } +pallet-proxy-genesis-companion = { path = "pallets/proxy-genesis-companion", default-features = false } +pallet-xcm-transactor = { path = "pallets/xcm-transactor", default-features = false } +pallet-moonbeam-lazy-migrations = { path = "pallets/moonbeam-lazy-migrations", default-features = false } +precompile-utils = { path = "precompiles/utils", default-features = false } +xcm-primitives = { path = "primitives/xcm", default-features = false } -pallet-crowdloan-rewards = {git = "https://github.com/moonbeam-foundation/crowdloan-rewards", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-crowdloan-rewards = { git = "https://github.com/moonbeam-foundation/crowdloan-rewards", branch = "moonbeam-polkadot-v1.7.2", default-features = false } # Moonbeam (client) -moonbeam-cli = {path = "node/cli", default-features = false} -moonbeam-cli-opt = {path = "node/cli-opt", default-features = false} -moonbeam-service = {path = "node/service", default-features = false} +moonbeam-cli = { path = "node/cli", default-features = false } +moonbeam-cli-opt = { path = "node/cli-opt", default-features = false } +moonbeam-service = { path = "node/service", default-features = false } -manual-xcm-rpc = {path = "client/rpc/manual-xcm"} -moonbeam-client-evm-tracing = {path = "client/evm-tracing"} -moonbeam-finality-rpc = {path = "client/rpc/finality"} -moonbeam-rpc-core-debug = {path = "client/rpc-core/debug"} -moonbeam-rpc-core-trace = {path = "client/rpc-core/trace"} -moonbeam-rpc-core-txpool = {path = "client/rpc-core/txpool"} -moonbeam-rpc-core-types = {path = "client/rpc-core/types"} -moonbeam-rpc-debug = {path = "client/rpc/debug"} -moonbeam-rpc-trace = {path = "client/rpc/trace"} -moonbeam-rpc-txpool = {path = "client/rpc/txpool"} -moonbeam-vrf = {path = "client/vrf"} +manual-xcm-rpc = { path = "client/rpc/manual-xcm" } +moonbeam-client-evm-tracing = { path = "client/evm-tracing" } +moonbeam-finality-rpc = { path = "client/rpc/finality" } +moonbeam-rpc-core-debug = { path = "client/rpc-core/debug" } +moonbeam-rpc-core-trace = { path = "client/rpc-core/trace" } +moonbeam-rpc-core-txpool = { path = "client/rpc-core/txpool" } +moonbeam-rpc-core-types = { path = "client/rpc-core/types" } +moonbeam-rpc-debug = { path = "client/rpc/debug" } +moonbeam-rpc-trace = { path = "client/rpc/trace" } +moonbeam-rpc-txpool = { path = "client/rpc/txpool" } +moonbeam-vrf = { path = "client/vrf" } -moonbase-runtime = {path = "runtime/moonbase"} -moonbeam-runtime = {path = "runtime/moonbeam"} -moonriver-runtime = {path = "runtime/moonriver"} +moonbase-runtime = { path = "runtime/moonbase" } +moonbeam-runtime = { path = "runtime/moonbeam" } +moonriver-runtime = { path = "runtime/moonriver" } -# Substrate (wasm) -frame-benchmarking = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -frame-executive = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -frame-support = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -frame-system = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -frame-system-benchmarking = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -frame-system-rpc-runtime-api = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -frame-try-runtime = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-assets = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-balances = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-collective = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-conviction-voting = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-identity = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-message-queue = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -pallet-multisig = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-preimage = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-proxy = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-referenda = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-root-testing = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-scheduler = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-society = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-staking = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-sudo = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-timestamp = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-transaction-payment = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-transaction-payment-rpc-runtime-api = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-treasury = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-utility = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-whitelist = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -parity-scale-codec = {version = "3.2.2", default-features = false, features = [ - "derive", -]} -scale-info = {version = "2.0", default-features = false, features = [ - "derive", -]} -sp-api = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-application-crypto = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-block-builder = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-consensus-babe = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-consensus-slots = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-core = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-debug-derive = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-externalities = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-inherents = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-io = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-keystore = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-offchain = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-runtime = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-runtime-interface = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-session = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-state-machine = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-std = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-transaction-pool = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-trie = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-version = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -sp-weights = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -substrate-fixed = {git = "https://github.com/encointer/substrate-fixed", default-features = false} +frame-benchmarking = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +frame-executive = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +frame-support = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +frame-system = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +frame-system-benchmarking = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +frame-try-runtime = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-assets = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-balances = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-collective = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-conviction-voting = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-identity = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-message-queue = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +pallet-multisig = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-preimage = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-proxy = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-referenda = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-root-testing = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-scheduler = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-society = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-staking = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-sudo = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-timestamp = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-transaction-payment = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-treasury = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-utility = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-whitelist = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +parity-scale-codec = { version = "3.2.2", default-features = false, features = [ + "derive", +] } +scale-info = { version = "2.0", default-features = false, features = [ + "derive", +] } +sp-api = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-application-crypto = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-block-builder = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-consensus-babe = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-consensus-slots = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-core = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-debug-derive = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-externalities = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-inherents = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-io = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-keystore = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-offchain = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-runtime = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-runtime-interface = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-session = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-std = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-state-machine = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-transaction-pool = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-trie = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-version = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-weights = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +substrate-fixed = { git = "https://github.com/encointer/substrate-fixed", default-features = false } # Substrate (client) -frame-benchmarking-cli = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -pallet-transaction-payment-rpc = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-basic-authorship = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-block-builder = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-chain-spec = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-cli = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-client-api = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-client-db = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-consensus = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-consensus-grandpa = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-consensus-manual-seal = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-executor = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-informant = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-network = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-network-common = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-network-sync = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-offchain = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-rpc = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-rpc-api = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-service = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-sysinfo = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-telemetry = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-tracing = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-transaction-pool = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-transaction-pool-api = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sc-utils = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sp-blockchain = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sp-consensus = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sp-storage = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sp-timestamp = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -sp-wasm-interface = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -substrate-build-script-utils = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -substrate-frame-rpc-system = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -substrate-prometheus-endpoint = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -substrate-test-client = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -substrate-test-runtime = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -substrate-test-runtime-client = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -substrate-wasm-builder = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -try-runtime-cli = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +frame-benchmarking-cli = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +pallet-transaction-payment-rpc = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-basic-authorship = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-block-builder = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-chain-spec = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-cli = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-client-api = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-client-db = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-consensus = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-consensus-grandpa = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-consensus-manual-seal = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-executor = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-informant = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-network = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-network-common = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-network-sync = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-offchain = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-rpc = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-rpc-api = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-service = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-sysinfo = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-telemetry = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-tracing = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-transaction-pool = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-transaction-pool-api = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sc-utils = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sp-blockchain = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sp-consensus = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sp-storage = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sp-timestamp = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +sp-wasm-interface = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +substrate-build-script-utils = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +substrate-frame-rpc-system = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +substrate-prometheus-endpoint = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +substrate-test-client = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +substrate-test-runtime = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +substrate-test-runtime-client = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +substrate-wasm-builder = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +try-runtime-cli = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } # Frontier (wasm) -ethereum = {version = "0.14.0", default-features = false, features = [ - "with-codec", -]} -ethereum-types = {version = "0.14", default-features = false} -evm = {git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -evm-gasometer = {git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -evm-runtime = {git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -fp-ethereum = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -fp-evm = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -fp-rpc = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -fp-self-contained = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-ethereum = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false, features = [ - "forbid-evm-reentrancy", -]} -pallet-evm = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false, features = [ - "forbid-evm-reentrancy", -]} -pallet-evm-chain-id = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-evm-precompile-blake2 = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-evm-precompile-bn128 = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-evm-precompile-dispatch = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-evm-precompile-modexp = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-evm-precompile-sha3fips = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-evm-precompile-simple = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +ethereum = { version = "0.15.0", default-features = false, features = [ + "with-codec", +] } +ethereum-types = { version = "0.14", default-features = false } +evm = { git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +evm-gasometer = { git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +evm-runtime = { git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +fp-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +fp-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2", default-features = false, features = [ + "forbid-evm-reentrancy", +] } +pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2", default-features = false, features = [ + "forbid-evm-reentrancy", +] } +pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-evm-precompile-blake2 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-evm-precompile-bn128 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-evm-precompile-modexp = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-evm-precompile-sha3fips = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-evm-precompile-simple = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2", default-features = false } # Frontier (client) -fc-api = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0"} -fc-consensus = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0"} -fc-db = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0"} -fc-mapping-sync = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0"} -fc-rpc = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", features = [ - "rpc-binary-search-estimate", -]} -fc-rpc-core = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0"} -fc-storage = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0"} -fp-consensus = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0"} -fp-storage = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0"} +fc-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2" } +fc-db = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2" } +fc-api = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2" } +fc-mapping-sync = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2" } +fc-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2", features = [ + "rpc-binary-search-estimate", +] } +fc-rpc-core = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2" } +fc-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2" } +fp-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2" } +fp-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.7.2" } # Cumulus (wasm) -cumulus-pallet-dmp-queue = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -cumulus-pallet-parachain-system = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false, features = [ - "parameterized-consensus-hook", -]} -cumulus-pallet-xcm = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -cumulus-pallet-xcmp-queue = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -cumulus-primitives-core = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -cumulus-primitives-parachain-inherent = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -cumulus-primitives-timestamp = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -cumulus-primitives-utility = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -cumulus-test-relay-sproof-builder = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -parachain-info = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +cumulus-pallet-dmp-queue = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +cumulus-pallet-parachain-system = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false, features = [ + "parameterized-consensus-hook", +] } +cumulus-pallet-xcm = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +cumulus-pallet-xcmp-queue = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +cumulus-primitives-core = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +cumulus-primitives-parachain-inherent = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +cumulus-primitives-timestamp = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +cumulus-primitives-utility = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +cumulus-test-relay-sproof-builder = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +parachain-info = { package = "staging-parachain-info", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +parachains-common = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } # Cumulus (client) -cumulus-client-cli = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -cumulus-client-collator = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -cumulus-client-consensus-common = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -cumulus-client-consensus-proposer = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -cumulus-client-consensus-relay-chain = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -cumulus-client-network = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -cumulus-client-service = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -cumulus-relay-chain-inprocess-interface = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -cumulus-relay-chain-interface = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -cumulus-relay-chain-minimal-node = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -cumulus-relay-chain-rpc-interface = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +cumulus-client-cli = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +cumulus-client-collator = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +cumulus-client-consensus-common = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +cumulus-client-consensus-proposer = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +cumulus-client-consensus-relay-chain = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +cumulus-client-network = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +cumulus-client-service = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +cumulus-client-parachain-inherent = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +cumulus-relay-chain-inprocess-interface = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +cumulus-relay-chain-interface = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +cumulus-relay-chain-minimal-node = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +cumulus-relay-chain-rpc-interface = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } # Polkadot / XCM (wasm) -orml-traits = {git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -orml-xcm-support = {git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -orml-xtokens = {git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-xcm = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-xcm-benchmarks = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -polkadot-core-primitives = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -polkadot-parachain = {package = "polkadot-parachain-primitives", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -polkadot-runtime-common = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -polkadot-runtime-parachains = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -xcm = {package = "staging-xcm", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -xcm-builder = {package = "staging-xcm-builder", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -xcm-executor = {package = "staging-xcm-executor", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +orml-traits = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +orml-xcm-support = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +orml-xtokens = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-xcm = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-xcm-benchmarks = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +polkadot-core-primitives = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +polkadot-parachain = { package = "polkadot-parachain-primitives", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +polkadot-runtime-common = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +polkadot-runtime-parachains = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +xcm = { package = "staging-xcm", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } # Polkadot / XCM (client) -#kusama-runtime = { package = "staging-kusama-runtime", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -polkadot-cli = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -polkadot-primitives = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -#polkadot-runtime = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -polkadot-service = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -rococo-runtime = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -westend-runtime = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} -xcm-simulator = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +#kusama-runtime = { package = "staging-kusama-runtime", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +polkadot-cli = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +polkadot-primitives = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +#polkadot-runtime = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +polkadot-service = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +rococo-runtime = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +westend-runtime = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +xcm-simulator = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } # Moonkit (wasm) -async-backing-primitives = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -moonkit-xcm-primitives = {package = "xcm-primitives", git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -nimbus-primitives = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-async-backing = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-author-inherent = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-author-mapping = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-author-slot-filter = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-maintenance-mode = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-migrations = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-randomness = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -pallet-relay-storage-roots = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} -session-keys-primitives = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +async-backing-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } +moonkit-xcm-primitives = { package = "xcm-primitives", git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } +nimbus-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } +pallet-async-backing = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } +pallet-author-inherent = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } +pallet-author-mapping = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } +pallet-author-slot-filter = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } +pallet-maintenance-mode = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } +pallet-migrations = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } +pallet-randomness = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } +pallet-relay-storage-roots = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } +session-keys-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } # Moonkit (client) -nimbus-consensus = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0"} +nimbus-consensus = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2" } # Other (wasm) affix = "0.1.2" -async-trait = {version = "0.1.42"} -blake2-rfc = {version = "0.2.18", default-features = false} +async-trait = { version = "0.1.42" } +blake2-rfc = { version = "0.2.18", default-features = false } derive_more = "0.99" -environmental = {version = "1.1.2", default-features = false} -frame-metadata = {version = "16.0.0", default-features = false, features = [ - "current", -]} -hex = {version = "0.4.3", default-features = false} -hex-literal = {version = "0.3.4"} -impl-serde = {version = "0.3.1", default-features = false} +environmental = { version = "1.1.2", default-features = false } +frame-metadata = { version = "16.0.0", default-features = false, features = [ + "current", +] } +hex = { version = "0.4.3", default-features = false } +hex-literal = { version = "0.3.4" } +impl-serde = { version = "0.3.1", default-features = false } impl-trait-for-tuples = "0.2.1" -libsecp256k1 = {version = "0.7", default-features = false} -log = {version = "0.4", default-features = false} -num_enum = {version = "0.5.3", default-features = false} +libsecp256k1 = { version = "0.7", default-features = false } +log = { version = "0.4", default-features = false } +num_enum = { version = "0.5.3", default-features = false } paste = "1.0.6" -rlp = {version = "0.5", default-features = false} -rustc-hex = {version = "2.0.1", default-features = false} -serde = {version = "1.0.101", default-features = false} -sha3 = {version = "0.10", default-features = false} +rlp = { version = "0.5", default-features = false } +rustc-hex = { version = "2.0.1", default-features = false } +serde = { version = "1.0.101", default-features = false } +sha3 = { version = "0.10", default-features = false } slices = "0.2.0" smallvec = "1.8.0" -strum = {version = "0.24", default-features = false, features = ["derive"]} +strum = { version = "0.24", default-features = false, features = ["derive"] } strum_macros = "0.24" # Other (client) + ansi_term = "0.12.1" assert_cmd = "2.0.10" async-io = "1.3" -bip32 = {version = "0.5.1", default-features = false, features = ["bip39"]} -clap = {version = "4.0.9", features = ["derive"]} +bip32 = { version = "0.5.1", default-features = false, features = ["bip39"] } +clap = { version = "4.0.9", features = ["derive"] } exit-future = "0.2" flume = "0.10.9" -futures = {version = "0.3.21"} -jsonrpsee = {version = "0.16.2", default-features = false} +futures = { version = "0.3.21" } +jsonrpsee = { version = "0.20.3", default-features = false } maplit = "1.0.2" nix = "0.23" parking_lot = "0.12.0" primitive-types = "0.12.0" -prometheus = {version = "0.13.0", default-features = false} +prometheus = { version = "0.13.0", default-features = false } rand = "0.7.3" -schnorrkel = {version = "0.9.1", default-features = false, features = [ - "preaudit_deprecated", - "u64_backend", -]} -serde_json = {version = "1.0"} +serde_json = { version = "1.0" } similar-asserts = "1.1.0" tempfile = "3.2.0" -tiny-bip39 = {version = "0.8", default-features = false} -tokio = {version = "1.13"} +tiny-bip39 = { version = "0.8", default-features = false } +schnorrkel = { version = "0.11.4", default-features = false, features = [ + "preaudit_deprecated", +] } +tokio = { version = "1.36" } tracing = "0.1.34" tracing-core = "0.1.29" trie-root = "0.15.2" @@ -402,49 +403,49 @@ url = "2.2.2" # # This list is ordered alphabetically. [profile.dev.package] -blake2 = {opt-level = 3} -blake2b_simd = {opt-level = 3} -chacha20poly1305 = {opt-level = 3} -cranelift-codegen = {opt-level = 3} -cranelift-wasm = {opt-level = 3} -crc32fast = {opt-level = 3} -crossbeam-deque = {opt-level = 3} -crypto-mac = {opt-level = 3} -curve25519-dalek = {opt-level = 3} -ed25519-zebra = {opt-level = 3} -flate2 = {opt-level = 3} -futures-channel = {opt-level = 3} -hash-db = {opt-level = 3} -hashbrown = {opt-level = 3} -hmac = {opt-level = 3} -httparse = {opt-level = 3} -integer-sqrt = {opt-level = 3} -k256 = {opt-level = 3} -keccak = {opt-level = 3} -libm = {opt-level = 3} -librocksdb-sys = {opt-level = 3} -libsecp256k1 = {opt-level = 3} -libz-sys = {opt-level = 3} -mio = {opt-level = 3} -nalgebra = {opt-level = 3} -num-bigint = {opt-level = 3} -parking_lot = {opt-level = 3} -parking_lot_core = {opt-level = 3} -percent-encoding = {opt-level = 3} -primitive-types = {opt-level = 3} -ring = {opt-level = 3} -rustls = {opt-level = 3} -secp256k1 = {opt-level = 3} -sha2 = {opt-level = 3} -sha3 = {opt-level = 3} -smallvec = {opt-level = 3} -snow = {opt-level = 3} -twox-hash = {opt-level = 3} -uint = {opt-level = 3} -wasmi = {opt-level = 3} -x25519-dalek = {opt-level = 3} -yamux = {opt-level = 3} -zeroize = {opt-level = 3} +blake2 = { opt-level = 3 } +blake2b_simd = { opt-level = 3 } +chacha20poly1305 = { opt-level = 3 } +cranelift-codegen = { opt-level = 3 } +cranelift-wasm = { opt-level = 3 } +crc32fast = { opt-level = 3 } +crossbeam-deque = { opt-level = 3 } +crypto-mac = { opt-level = 3 } +curve25519-dalek = { opt-level = 3 } +ed25519-zebra = { opt-level = 3 } +flate2 = { opt-level = 3 } +futures-channel = { opt-level = 3 } +hash-db = { opt-level = 3 } +hashbrown = { opt-level = 3 } +hmac = { opt-level = 3 } +httparse = { opt-level = 3 } +integer-sqrt = { opt-level = 3 } +k256 = { opt-level = 3 } +keccak = { opt-level = 3 } +libm = { opt-level = 3 } +librocksdb-sys = { opt-level = 3 } +libsecp256k1 = { opt-level = 3 } +libz-sys = { opt-level = 3 } +mio = { opt-level = 3 } +nalgebra = { opt-level = 3 } +num-bigint = { opt-level = 3 } +parking_lot = { opt-level = 3 } +parking_lot_core = { opt-level = 3 } +percent-encoding = { opt-level = 3 } +primitive-types = { opt-level = 3 } +ring = { opt-level = 3 } +rustls = { opt-level = 3 } +secp256k1 = { opt-level = 3 } +sha2 = { opt-level = 3 } +sha3 = { opt-level = 3 } +smallvec = { opt-level = 3 } +snow = { opt-level = 3 } +twox-hash = { opt-level = 3 } +uint = { opt-level = 3 } +wasmi = { opt-level = 3 } +x25519-dalek = { opt-level = 3 } +yamux = { opt-level = 3 } +zeroize = { opt-level = 3 } # make sure dev builds with backtrace do # not slow us down @@ -459,12 +460,12 @@ lto = true [profile.release] debug-assertions = true # Enable debug-assert! for non-production profiles -opt-level = 3 +opt-level = 3 # Moonbeam runtime requires unwinding. panic = "unwind" [profile.testnet] -debug = 1 # debug symbols are useful for profilers +debug = 1 # debug symbols are useful for profilers debug-assertions = true # Enable debug-assert! for non-production profiles -inherits = "release" +inherits = "release" overflow-checks = true diff --git a/client/rpc-core/txpool/src/types/mod.rs b/client/rpc-core/txpool/src/types/mod.rs index 2a783eaa22..c6d6f7069e 100644 --- a/client/rpc-core/txpool/src/types/mod.rs +++ b/client/rpc-core/txpool/src/types/mod.rs @@ -27,7 +27,7 @@ pub use self::inspect::Summary; pub type TransactionMap = HashMap>; -#[derive(Debug, Serialize)] +#[derive(Debug, Clone, Serialize)] pub struct TxPoolResult { pub pending: T, pub queued: T, diff --git a/client/rpc/debug/src/lib.rs b/client/rpc/debug/src/lib.rs index 6b05126110..46d852a2f2 100644 --- a/client/rpc/debug/src/lib.rs +++ b/client/rpc/debug/src/lib.rs @@ -30,12 +30,15 @@ use moonbeam_rpc_core_types::{RequestBlockId, RequestBlockTag}; use moonbeam_rpc_primitives_debug::{DebugRuntimeApi, TracerInput}; use sc_client_api::backend::{Backend, StateBackend, StorageProvider}; use sc_utils::mpsc::TracingUnboundedSender; -use sp_api::{ApiExt, BlockId, Core, HeaderT, ProvideRuntimeApi}; +use sp_api::{ApiExt, Core, ProvideRuntimeApi}; use sp_block_builder::BlockBuilder; use sp_blockchain::{ Backend as BlockchainBackend, Error as BlockChainError, HeaderBackend, HeaderMetadata, }; -use sp_runtime::traits::{BlakeTwo256, Block as BlockT, UniqueSaturatedInto}; +use sp_runtime::{ + generic::BlockId, + traits::{BlakeTwo256, Block as BlockT, Header as HeaderT, UniqueSaturatedInto}, +}; use std::{future::Future, marker::PhantomData, sync::Arc}; pub enum RequesterInput { diff --git a/client/rpc/manual-xcm/src/lib.rs b/client/rpc/manual-xcm/src/lib.rs index cd3899b473..31d2a2cb91 100644 --- a/client/rpc/manual-xcm/src/lib.rs +++ b/client/rpc/manual-xcm/src/lib.rs @@ -15,10 +15,17 @@ // along with Moonbeam. If not, see . use cumulus_primitives_core::ParaId; use cumulus_primitives_core::XcmpMessageFormat; -use jsonrpsee::{core::RpcResult, proc_macros::rpc}; +use jsonrpsee::{ + core::RpcResult, + proc_macros::rpc, + types::{ + error::{INTERNAL_ERROR_CODE, INTERNAL_ERROR_MSG}, + ErrorObjectOwned, + }, +}; use parity_scale_codec::Encode; -use xcm::latest::prelude::*; use xcm::opaque::lts::Weight; +use xcm::v3::prelude::*; use xcm_primitives::DEFAULT_PROOF_SIZE; /// This RPC interface is used to manually submit XCM messages that will be injected into a @@ -68,12 +75,12 @@ impl ManualXcmApiServer for ManualXcm { }, DepositAsset { assets: AllCounted(1).into(), - beneficiary: MultiLocation::new( + beneficiary: Location::new( 0, - X1(AccountKey20 { + [AccountKey20 { network: None, key: hex_literal::hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac"), - }), + }], ), }, ])) @@ -113,12 +120,12 @@ impl ManualXcmApiServer for ManualXcm { }, DepositAsset { assets: AllCounted(1).into(), - beneficiary: MultiLocation::new( + beneficiary: Location::new( 0, - X1(AccountKey20 { + [AccountKey20 { network: None, key: hex_literal::hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac"), - }), + }], ), }, ])) @@ -141,13 +148,10 @@ impl ManualXcmApiServer for ManualXcm { } // This bit cribbed from frontier. -pub fn internal_err>(message: T) -> jsonrpsee::core::Error { - jsonrpsee::core::Error::Call(jsonrpsee::types::error::CallError::Custom( - jsonrpsee::types::error::ErrorObject::borrowed( - jsonrpsee::types::error::INTERNAL_ERROR_CODE, - &message, - None, - ) - .into_owned(), - )) +pub fn internal_err(message: T) -> ErrorObjectOwned { + ErrorObjectOwned::owned( + INTERNAL_ERROR_CODE, + INTERNAL_ERROR_MSG, + Some(message.to_string()), + ) } diff --git a/client/rpc/trace/src/lib.rs b/client/rpc/trace/src/lib.rs index f407dbfa7e..3cade6fd6f 100644 --- a/client/rpc/trace/src/lib.rs +++ b/client/rpc/trace/src/lib.rs @@ -34,12 +34,12 @@ use tracing::{instrument, Instrument}; use sc_client_api::backend::{Backend, StateBackend, StorageProvider}; use sc_utils::mpsc::TracingUnboundedSender; -use sp_api::{ApiExt, Core, HeaderT, ProvideRuntimeApi}; +use sp_api::{ApiExt, Core, ProvideRuntimeApi}; use sp_block_builder::BlockBuilder; use sp_blockchain::{ Backend as BlockchainBackend, Error as BlockChainError, HeaderBackend, HeaderMetadata, }; -use sp_runtime::traits::{BlakeTwo256, Block as BlockT}; +use sp_runtime::traits::{BlakeTwo256, Block as BlockT, Header as HeaderT}; use substrate_prometheus_endpoint::{ register, Counter, PrometheusError, Registry as PrometheusRegistry, U64, }; diff --git a/client/vrf/Cargo.toml b/client/vrf/Cargo.toml index ed22600ec5..ec2a2104e8 100644 --- a/client/vrf/Cargo.toml +++ b/client/vrf/Cargo.toml @@ -9,21 +9,23 @@ version = "0.1.0" [dependencies] # Substrate -parity-scale-codec = { workspace = true, features = [ "derive", "std" ] } -sp-api = { workspace = true, features = [ "std" ] } +parity-scale-codec = { workspace = true, features = ["derive", "std"] } +sp-api = { workspace = true, features = ["std"] } sp-application-crypto = { workspace = true } -sp-core = { workspace = true, features = [ "std" ] } +sp-core = { workspace = true, features = ["std"] } sp-keystore = { workspace = true } sp-runtime = { workspace = true } # Moonbeam -session-keys-primitives = { workspace = true, features = [ "std" ] } +session-keys-primitives = { workspace = true, features = ["std"] } # Nimbus -nimbus-primitives = { workspace = true, features = [ "std" ] } +nimbus-primitives = { workspace = true, features = ["std"] } # Polkadot polkadot-primitives = { workspace = true } # Other -schnorrkel = { workspace = true, default-features = false, features = [ "preaudit_deprecated", "u64_backend" ] } +schnorrkel = { workspace = true, default-features = false, features = [ + "preaudit_deprecated", +] } diff --git a/client/vrf/src/lib.rs b/client/vrf/src/lib.rs index aefcbe2c70..9140823805 100644 --- a/client/vrf/src/lib.rs +++ b/client/vrf/src/lib.rs @@ -61,7 +61,7 @@ fn sign_vrf(last_vrf_output: H256, key: VrfId, keystore: &KeystorePtr) -> Option if let Ok(Some(signature)) = try_sign { let public = PublicKey::from_bytes(&key.to_raw_vec()).ok()?; if signature - .output + .pre_output .0 .attach_input_hash(&public, transcript.0.clone()) .is_err() @@ -70,7 +70,7 @@ fn sign_vrf(last_vrf_output: H256, key: VrfId, keystore: &KeystorePtr) -> Option return None; } Some(PreDigest { - vrf_output: signature.output, + vrf_output: signature.pre_output, vrf_proof: signature.proof, }) } else { diff --git a/node/cli/src/cli.rs b/node/cli/src/cli.rs index 33f2a1d0be..200b1476b2 100644 --- a/node/cli/src/cli.rs +++ b/node/cli/src/cli.rs @@ -30,7 +30,7 @@ use std::path::PathBuf; pub enum Subcommand { /// Export the genesis state of the parachain. #[clap(name = "export-genesis-state")] - ExportGenesisState(ExportGenesisStateCommand), + ExportGenesisHead(ExportGenesisHeadCommand), /// Export the genesis wasm of the parachain. #[clap(name = "export-genesis-wasm")] @@ -91,7 +91,7 @@ pub struct BuildSpecCommand { /// Command for exporting the genesis state of the parachain #[derive(Debug, Parser)] -pub struct ExportGenesisStateCommand { +pub struct ExportGenesisHeadCommand { /// Output file name or stdout if unspecified. #[clap(value_parser)] pub output: Option, diff --git a/node/cli/src/command.rs b/node/cli/src/command.rs index 90f514b211..3af554f236 100644 --- a/node/cli/src/command.rs +++ b/node/cli/src/command.rs @@ -17,7 +17,7 @@ //! This module constructs and executes the appropriate service components for the given subcommand use crate::cli::{Cli, RelayChainCli, RunCmd, Subcommand}; -use cumulus_client_cli::{extract_genesis_wasm, generate_genesis_block}; +use cumulus_client_cli::extract_genesis_wasm; use cumulus_primitives_core::ParaId; use frame_benchmarking_cli::BenchmarkCmd; use log::{info, warn}; @@ -35,7 +35,10 @@ use sc_service::{ DatabaseSource, PartialComponents, }; use sp_core::hexdisplay::HexDisplay; -use sp_runtime::traits::{AccountIdConversion, Block as _}; +use sp_runtime::{ + traits::{AccountIdConversion, Block as BlockT, Hash as HashT, Header as HeaderT, Zero}, + StateVersion, +}; use std::{io::Write, net::SocketAddr}; fn load_spec( @@ -388,7 +391,7 @@ pub fn run() -> Result<()> { _ => panic!("invalid chain spec"), } } - Some(Subcommand::ExportGenesisState(params)) => { + Some(Subcommand::ExportGenesisHead(params)) => { let mut builder = sc_cli::LoggerBuilder::new(""); builder.with_profiling(sc_tracing::TracingReceiver::Log, ""); let _ = builder.init(); @@ -956,3 +959,39 @@ impl CliConfiguration for RelayChainCli { self.base.base.announce_block() } } + +/// Generate the genesis block from a given ChainSpec. +pub fn generate_genesis_block( + chain_spec: &dyn ChainSpec, + genesis_state_version: StateVersion, +) -> std::result::Result { + let storage = chain_spec.build_storage()?; + + let child_roots = storage.children_default.iter().map(|(sk, child_content)| { + let state_root = <<::Header as HeaderT>::Hashing as HashT>::trie_root( + child_content.data.clone().into_iter().collect(), + genesis_state_version, + ); + (sk.clone(), state_root.encode()) + }); + let state_root = <<::Header as HeaderT>::Hashing as HashT>::trie_root( + storage.top.clone().into_iter().chain(child_roots).collect(), + genesis_state_version, + ); + + let extrinsics_root = <<::Header as HeaderT>::Hashing as HashT>::trie_root( + Vec::new(), + genesis_state_version, + ); + + Ok(Block::new( + <::Header as HeaderT>::new( + Zero::zero(), + extrinsics_root, + state_root, + Default::default(), + Default::default(), + ), + Default::default(), + )) +} diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index 916674958b..9763ad771f 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -128,6 +128,7 @@ cumulus-client-network = { workspace = true } cumulus-client-service = { workspace = true } cumulus-primitives-core = { workspace = true } cumulus-primitives-parachain-inherent = { workspace = true } +cumulus-client-parachain-inherent = { workspace = true } cumulus-relay-chain-inprocess-interface = { workspace = true } cumulus-relay-chain-interface = { workspace = true } cumulus-relay-chain-minimal-node = { workspace = true } diff --git a/node/service/src/chain_spec/moonbase.rs b/node/service/src/chain_spec/moonbase.rs index e957ecd54b..e94b6f4d1d 100644 --- a/node/service/src/chain_spec/moonbase.rs +++ b/node/service/src/chain_spec/moonbase.rs @@ -29,7 +29,7 @@ use moonbase_runtime::{ CrowdloanRewardsConfig, EVMConfig, EligibilityValue, EthereumChainIdConfig, EthereumConfig, GenesisAccount, InflationInfo, MaintenanceModeConfig, MoonbeamOrbitersConfig, OpenTechCommitteeCollectiveConfig, ParachainInfoConfig, ParachainStakingConfig, - PolkadotXcmConfig, Precompiles, Range, RuntimeGenesisConfig, SudoConfig, SystemConfig, + PolkadotXcmConfig, Precompiles, Range, RuntimeGenesisConfig, SudoConfig, TransactionPaymentConfig, TreasuryCouncilCollectiveConfig, XcmTransactorConfig, HOURS, WASM_BINARY, }; @@ -61,130 +61,110 @@ pub fn development_chain_spec(mnemonic: Option, num_accounts: Option Alith - vec![( - accounts[0], - get_from_seed::("Alice"), - 1_000 * UNIT, - )], - // Delegations - vec![], - accounts.clone(), - 3_000_000 * UNIT, - Default::default(), // para_id - 1281, //ChainId - ) - }, - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - None, - // Fork ID - None, - // Properties - Some( - serde_json::from_str( - "{\"tokenDecimals\": 18, \"tokenSymbol\": \"UNIT\", \"SS58Prefix\": 1287}", - ) - .expect("Provided valid json map"), - ), - // Extensions + ChainSpec::builder( + WASM_BINARY.expect("WASM binary was not build, please build it!"), Extensions { relay_chain: "dev-service".into(), para_id: Default::default(), }, ) + .with_name("Moonbase Development Testnet") + .with_id("moonbase_dev") + .with_chain_type(ChainType::Development) + .with_properties( + serde_json::from_str( + "{\"tokenDecimals\": 18, \"tokenSymbol\": \"UNIT\", \"SS58Prefix\": 1287}", + ) + .expect("Provided valid json map"), + ) + .with_genesis_config(testnet_genesis( + // Alith is Sudo + accounts[0], + // Treasury Council members: Baltathar, Charleth and Dorothy + vec![accounts[1], accounts[2], accounts[3]], + // Open Tech committee members: Alith, Baltathar and Charleth + vec![accounts[0], accounts[1], accounts[2]], + // Collator Candidate: Alice -> Alith + vec![( + accounts[0], + get_from_seed::("Alice"), + 1_000 * UNIT, + )], + // Delegations + vec![], + accounts.clone(), + 3_000_000 * UNIT, + Default::default(), // para_id + 1281, //ChainId + )) + .build() } /// Generate a default spec for the parachain service. Use this as a starting point when launching /// a custom chain. pub fn get_chain_spec(para_id: ParaId) -> ChainSpec { - ChainSpec::from_genesis( - // TODO Apps depends on this string to determine whether the chain is an ethereum compat - // or not. We should decide the proper strings, and update Apps accordingly. - // Or maybe Apps can be smart enough to say if the string contains "moonbeam" at all... - "Moonbase Local Testnet", - "moonbase_local", - ChainType::Local, - move || { - testnet_genesis( - // Alith is Sudo - AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), - // Treasury Council members: Baltathar, Charleth and Dorothy - vec![ - AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), - AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")), - AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")), - ], - // Open Tech committee members: Alith and Baltathar - vec![ - AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), - AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), - ], - // Collator Candidates - vec![ - // Alice -> Alith - ( - AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), - get_from_seed::("Alice"), - 1_000 * UNIT, - ), - // Bob -> Baltathar - ( - AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), - get_from_seed::("Bob"), - 1_000 * UNIT, - ), - ], - // Delegations - vec![], - // Endowed: Alith, Baltathar, Charleth and Dorothy - vec![ - AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), - AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), - AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")), - AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")), - ], - 3_000_000 * UNIT, - para_id, - 1280, //ChainId - ) - }, - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - None, - // Fork ID - None, - // Properties - Some( - serde_json::from_str( - "{\"tokenDecimals\": 18, \"tokenSymbol\": \"UNIT\", \"SS58Prefix\": 1287}", - ) - .expect("Provided valid json map"), - ), - // Extensions + ChainSpec::builder( + WASM_BINARY.expect("WASM binary was not build, please build it!"), Extensions { relay_chain: "westend-local".into(), para_id: para_id.into(), }, ) + // TODO Apps depends on this string to determine whether the chain is an ethereum compat + // or not. We should decide the proper strings, and update Apps accordingly. + // Or maybe Apps can be smart enough to say if the string contains "moonbeam" at all... + .with_name("Moonbase Local Testnet") + .with_id("moonbase_local") + .with_chain_type(ChainType::Local) + .with_properties( + serde_json::from_str( + "{\"tokenDecimals\": 18, \"tokenSymbol\": \"UNIT\", \"SS58Prefix\": 1287}", + ) + .expect("Provided valid json map"), + ) + .with_genesis_config(testnet_genesis( + // Alith is Sudo + AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), + // Treasury Council members: Baltathar, Charleth and Dorothy + vec![ + AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), + AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")), + AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")), + ], + // Open Tech committee members: Alith and Baltathar + vec![ + AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), + AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), + ], + // Collator Candidates + vec![ + // Alice -> Alith + ( + AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), + get_from_seed::("Alice"), + 1_000 * UNIT, + ), + // Bob -> Baltathar + ( + AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), + get_from_seed::("Bob"), + 1_000 * UNIT, + ), + ], + // Delegations + vec![], + // Endowed: Alith, Baltathar, Charleth and Dorothy + vec![ + AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), + AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), + AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")), + AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")), + ], + 3_000_000 * UNIT, + para_id, + 1280, //ChainId + )) + .build() } const COLLATOR_COMMISSION: Perbill = Perbill::from_percent(20); @@ -229,20 +209,15 @@ pub fn testnet_genesis( crowdloan_fund_pot: Balance, para_id: ParaId, chain_id: u64, -) -> RuntimeGenesisConfig { +) -> serde_json::Value { // This is the simplest bytecode to revert without returning any data. // We will pre-deploy it under all of our precompiles to ensure they can be called from // within contracts. // (PUSH1 0x00 PUSH1 0x00 REVERT) let revert_bytecode = vec![0x60, 0x00, 0x60, 0x00, 0xFD]; - RuntimeGenesisConfig { - system: SystemConfig { - code: WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, + let config = RuntimeGenesisConfig { + system: Default::default(), balances: BalancesConfig { balances: endowed_accounts .iter() @@ -337,7 +312,9 @@ pub fn testnet_genesis( relay_indices: moonbeam_relay_encoder::westend::WESTEND_RELAY_INDICES, ..Default::default() }, - } + }; + + serde_json::to_value(&config).expect("Could not build genesis config.") } #[cfg(test)] diff --git a/node/service/src/chain_spec/moonbeam.rs b/node/service/src/chain_spec/moonbeam.rs index ef89ad49ef..234f861c16 100644 --- a/node/service/src/chain_spec/moonbeam.rs +++ b/node/service/src/chain_spec/moonbeam.rs @@ -30,8 +30,8 @@ use moonbeam_runtime::{ Balance, BalancesConfig, CrowdloanRewardsConfig, EVMConfig, EthereumChainIdConfig, EthereumConfig, GenesisAccount, InflationInfo, MaintenanceModeConfig, OpenTechCommitteeCollectiveConfig, ParachainInfoConfig, ParachainStakingConfig, - PolkadotXcmConfig, Precompiles, Range, RuntimeGenesisConfig, SystemConfig, - TransactionPaymentConfig, TreasuryCouncilCollectiveConfig, HOURS, WASM_BINARY, + PolkadotXcmConfig, Precompiles, Range, RuntimeGenesisConfig, TransactionPaymentConfig, + TreasuryCouncilCollectiveConfig, HOURS, WASM_BINARY, }; use nimbus_primitives::NimbusId; use pallet_transaction_payment::Multiplier; @@ -54,126 +54,107 @@ pub fn development_chain_spec(mnemonic: Option, num_accounts: Option Alith - vec![( - accounts[0], - get_from_seed::("Alice"), - 20_000 * GLMR * SUPPLY_FACTOR, - )], - // Delegations - vec![], - accounts.clone(), - 1_500_000 * GLMR * SUPPLY_FACTOR, - Default::default(), // para_id - 1281, //ChainId - ) - }, - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - None, - // Fork ID - None, - // Properties - Some( - serde_json::from_str( - "{\"tokenDecimals\": 18, \"tokenSymbol\": \"GLMR\", \"SS58Prefix\": 1284}", - ) - .expect("Provided valid json map"), - ), - // Extensions + + ChainSpec::builder( + WASM_BINARY.expect("WASM binary was not build, please build it!"), Extensions { relay_chain: "dev-service".into(), para_id: Default::default(), }, ) + .with_name("Moonbeam Development Testnet") + .with_id("moonbeam_dev") + .with_chain_type(ChainType::Development) + .with_properties( + serde_json::from_str( + "{\"tokenDecimals\": 18, \"tokenSymbol\": \"GLMR\", \"SS58Prefix\": 1284}", + ) + .expect("Provided valid json map"), + ) + .with_genesis_config(testnet_genesis( + // Treasury Council members: Baltathar, Charleth and Dorothy + vec![accounts[1], accounts[2], accounts[3]], + // Open Tech committee members: Alith and Baltathar + vec![accounts[0], accounts[1]], + // Collator Candidate: Alice -> Alith + vec![( + accounts[0], + get_from_seed::("Alice"), + 20_000 * GLMR * SUPPLY_FACTOR, + )], + // Delegations + vec![], + accounts.clone(), + 1_500_000 * GLMR * SUPPLY_FACTOR, + Default::default(), // para_id + 1281, //ChainId + )) + .build() } /// Generate a default spec for the parachain service. Use this as a starting point when launching /// a custom chain. pub fn get_chain_spec(para_id: ParaId) -> ChainSpec { - ChainSpec::from_genesis( - // TODO Apps depends on this string to determine whether the chain is an ethereum compat - // or not. We should decide the proper strings, and update Apps accordingly. - // Or maybe Apps can be smart enough to say if the string contains "moonbeam" at all... - "Moonbeam Local Testnet", - "moonbeam_local", - ChainType::Local, - move || { - testnet_genesis( - // Treasury Council members: Baltathar, Charleth and Dorothy - vec![ - AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), - AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")), - AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")), - ], - // Open Tech committee members: Alith and Baltathar - vec![ - AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), - AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), - ], - // Collator Candidates - vec![ - // Alice -> Alith - ( - AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), - get_from_seed::("Alice"), - 20_000 * GLMR * SUPPLY_FACTOR, - ), - // Bob -> Baltathar - ( - AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), - get_from_seed::("Bob"), - 20_000 * GLMR * SUPPLY_FACTOR, - ), - ], - // Delegations - vec![], - // Endowed: Alith, Baltathar, Charleth and Dorothy - vec![ - AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), - AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), - AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")), - AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")), - ], - 1_500_000 * GLMR * SUPPLY_FACTOR, - para_id, - 1280, //ChainId - ) - }, - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - None, - // Fork ID - None, - // Properties - Some( - serde_json::from_str( - "{\"tokenDecimals\": 18, \"tokenSymbol\": \"GLMR\", \"SS58Prefix\": 1284}", - ) - .expect("Provided valid json map"), - ), - // Extensions + ChainSpec::builder( + WASM_BINARY.expect("WASM binary was not build, please build it!"), Extensions { relay_chain: "polkadot-local".into(), para_id: para_id.into(), }, ) + // TODO Apps depends on this string to determine whether the chain is an ethereum compat + // or not. We should decide the proper strings, and update Apps accordingly. + // Or maybe Apps can be smart enough to say if the string contains "moonbeam" at all... + .with_name("Moonbeam Local Testnet") + .with_id("moonbeam_local") + .with_chain_type(ChainType::Local) + .with_properties( + serde_json::from_str( + "{\"tokenDecimals\": 18, \"tokenSymbol\": \"GLMR\", \"SS58Prefix\": 1284}", + ) + .expect("Provided valid json map"), + ) + .with_genesis_config(testnet_genesis( + // Treasury Council members: Baltathar, Charleth and Dorothy + vec![ + AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), + AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")), + AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")), + ], + // Open Tech committee members: Alith and Baltathar + vec![ + AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), + AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), + ], + // Collator Candidates + vec![ + // Alice -> Alith + ( + AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), + get_from_seed::("Alice"), + 20_000 * GLMR * SUPPLY_FACTOR, + ), + // Bob -> Baltathar + ( + AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), + get_from_seed::("Bob"), + 20_000 * GLMR * SUPPLY_FACTOR, + ), + ], + // Delegations + vec![], + // Endowed: Alith, Baltathar, Charleth and Dorothy + vec![ + AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), + AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), + AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")), + AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")), + ], + 1_500_000 * GLMR * SUPPLY_FACTOR, + para_id, + 1280, //ChainId + )) + .build() } const COLLATOR_COMMISSION: Perbill = Perbill::from_percent(20); @@ -217,20 +198,15 @@ pub fn testnet_genesis( crowdloan_fund_pot: Balance, para_id: ParaId, chain_id: u64, -) -> RuntimeGenesisConfig { +) -> serde_json::Value { // This is the simplest bytecode to revert without returning any data. // We will pre-deploy it under all of our precompiles to ensure they can be called from // within contracts. // (PUSH1 0x00 PUSH1 0x00 REVERT) let revert_bytecode = vec![0x60, 0x00, 0x60, 0x00, 0xFD]; - RuntimeGenesisConfig { - system: SystemConfig { - code: WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, + let config = RuntimeGenesisConfig { + system: Default::default(), balances: BalancesConfig { balances: endowed_accounts .iter() @@ -315,7 +291,9 @@ pub fn testnet_genesis( multiplier: Multiplier::from(8u128), ..Default::default() }, - } + }; + + serde_json::to_value(&config).expect("Could not build genesis config.") } #[cfg(test)] diff --git a/node/service/src/chain_spec/moonriver.rs b/node/service/src/chain_spec/moonriver.rs index 15b47bc089..e6f4f642ac 100644 --- a/node/service/src/chain_spec/moonriver.rs +++ b/node/service/src/chain_spec/moonriver.rs @@ -30,7 +30,7 @@ use moonriver_runtime::{ CrowdloanRewardsConfig, EVMConfig, EthereumChainIdConfig, EthereumConfig, GenesisAccount, InflationInfo, MaintenanceModeConfig, OpenTechCommitteeCollectiveConfig, ParachainInfoConfig, ParachainStakingConfig, PolkadotXcmConfig, Precompiles, Range, RuntimeGenesisConfig, - SystemConfig, TransactionPaymentConfig, TreasuryCouncilCollectiveConfig, HOURS, WASM_BINARY, + TransactionPaymentConfig, TreasuryCouncilCollectiveConfig, HOURS, WASM_BINARY, }; use nimbus_primitives::NimbusId; use pallet_transaction_payment::Multiplier; @@ -53,126 +53,107 @@ pub fn development_chain_spec(mnemonic: Option, num_accounts: Option Alith - vec![( - AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), - get_from_seed::("Alice"), - 100_000 * MOVR, - )], - // Delegations - vec![], - accounts.clone(), - 3_000_000 * MOVR, - Default::default(), // para_id - 1281, //ChainId - ) - }, - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - None, - // Fork ID - None, - // Properties - Some( - serde_json::from_str( - "{\"tokenDecimals\": 18, \"tokenSymbol\": \"MOVR\", \"SS58Prefix\": 1285}", - ) - .expect("Provided valid json map"), - ), - // Extensions + + ChainSpec::builder( + WASM_BINARY.expect("WASM binary was not build, please build it!"), Extensions { relay_chain: "dev-service".into(), para_id: Default::default(), }, ) + .with_name("Moonriver Development Testnet") + .with_id("moonriver_dev") + .with_chain_type(ChainType::Development) + .with_properties( + serde_json::from_str( + "{\"tokenDecimals\": 18, \"tokenSymbol\": \"MOVR\", \"SS58Prefix\": 1285}", + ) + .expect("Provided valid json map"), + ) + .with_genesis_config(testnet_genesis( + // Treasury Council members: Baltathar, Charleth and Dorothy + vec![accounts[1], accounts[2], accounts[3]], + // Open Tech committee members: Alith and Baltathar + vec![accounts[0], accounts[1]], + // Collator Candidate: Alice -> Alith + vec![( + AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), + get_from_seed::("Alice"), + 100_000 * MOVR, + )], + // Delegations + vec![], + accounts.clone(), + 3_000_000 * MOVR, + Default::default(), // para_id + 1281, //ChainId + )) + .build() } /// Generate a default spec for the parachain service. Use this as a starting point when launching /// a custom chain. pub fn get_chain_spec(para_id: ParaId) -> ChainSpec { - ChainSpec::from_genesis( - // TODO Apps depends on this string to determine whether the chain is an ethereum compat - // or not. We should decide the proper strings, and update Apps accordingly. - // Or maybe Apps can be smart enough to say if the string contains "moonbeam" at all... - "Moonriver Local Testnet", - "moonriver_local", - ChainType::Local, - move || { - testnet_genesis( - // Treasury Council members: Baltathar, Charleth and Dorothy - vec![ - AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), - AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")), - AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")), - ], - // Open Tech committee members: Alith and Baltathar - vec![ - AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), - AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), - ], - // Collator Candidates - vec![ - // Alice -> Alith - ( - AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), - get_from_seed::("Alice"), - 100_000 * MOVR, - ), - // Bob -> Baltathar - ( - AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), - get_from_seed::("Bob"), - 100_000 * MOVR, - ), - ], - // Delegations - vec![], - // Endowed: Alith, Baltathar, Charleth and Dorothy - vec![ - AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), - AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), - AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")), - AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")), - ], - 3_000_000 * MOVR, - para_id, - 1280, //ChainId - ) - }, - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - None, - // Fork ID - None, - // Properties - Some( - serde_json::from_str( - "{\"tokenDecimals\": 18, \"tokenSymbol\": \"MOVR\", \"SS58Prefix\": 1285}", - ) - .expect("Provided valid json map"), - ), - // Extensions + ChainSpec::builder( + WASM_BINARY.expect("WASM binary was not build, please build it!"), Extensions { relay_chain: "kusama-local".into(), para_id: para_id.into(), }, ) + // TODO Apps depends on this string to determine whether the chain is an ethereum compat + // or not. We should decide the proper strings, and update Apps accordingly. + // Or maybe Apps can be smart enough to say if the string contains "moonbeam" at all... + .with_name("Moonriver Local Testnet") + .with_id("moonriver_local") + .with_chain_type(ChainType::Local) + .with_properties( + serde_json::from_str( + "{\"tokenDecimals\": 18, \"tokenSymbol\": \"MOVR\", \"SS58Prefix\": 1285}", + ) + .expect("Provided valid json map"), + ) + .with_genesis_config(testnet_genesis( + // Treasury Council members: Baltathar, Charleth and Dorothy + vec![ + AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), + AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")), + AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")), + ], + // Open Tech committee members: Alith and Baltathar + vec![ + AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), + AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), + ], + // Collator Candidates + vec![ + // Alice -> Alith + ( + AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), + get_from_seed::("Alice"), + 100_000 * MOVR, + ), + // Bob -> Baltathar + ( + AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), + get_from_seed::("Bob"), + 100_000 * MOVR, + ), + ], + // Delegations + vec![], + // Endowed: Alith, Baltathar, Charleth and Dorothy + vec![ + AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), + AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), + AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")), + AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")), + ], + 3_000_000 * MOVR, + para_id, + 1280, //ChainId + )) + .build() } const COLLATOR_COMMISSION: Perbill = Perbill::from_percent(20); @@ -216,20 +197,15 @@ pub fn testnet_genesis( crowdloan_fund_pot: Balance, para_id: ParaId, chain_id: u64, -) -> RuntimeGenesisConfig { +) -> serde_json::Value { // This is the simplest bytecode to revert without returning any data. // We will pre-deploy it under all of our precompiles to ensure they can be called from // within contracts. // (PUSH1 0x00 PUSH1 0x00 REVERT) let revert_bytecode = vec![0x60, 0x00, 0x60, 0x00, 0xFD]; - RuntimeGenesisConfig { - system: SystemConfig { - code: WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, + let config = RuntimeGenesisConfig { + system: Default::default(), balances: BalancesConfig { balances: endowed_accounts .iter() @@ -314,7 +290,9 @@ pub fn testnet_genesis( multiplier: Multiplier::from(10u128), ..Default::default() }, - } + }; + + serde_json::to_value(&config).expect("Could not build genesis config.") } #[cfg(test)] diff --git a/node/service/src/chain_spec/test_spec.rs b/node/service/src/chain_spec/test_spec.rs index 17e65959c8..19bb7c0706 100644 --- a/node/service/src/chain_spec/test_spec.rs +++ b/node/service/src/chain_spec/test_spec.rs @@ -19,79 +19,71 @@ use crate::chain_spec::moonbase::{testnet_genesis, ChainSpec}; use crate::chain_spec::{get_from_seed, Extensions}; use cumulus_primitives_core::ParaId; use hex_literal::hex; -use moonbase_runtime::{currency::UNIT, AccountId}; +use moonbase_runtime::{currency::UNIT, AccountId, WASM_BINARY}; use nimbus_primitives::NimbusId; use sc_service::ChainType; /// Generate testing chain_spec for staking integration tests with accounts initialized for /// collating and nominating. pub fn staking_spec(para_id: ParaId) -> ChainSpec { - ChainSpec::from_genesis( - "Moonbase Development Testnet", - "staking", - ChainType::Local, - move || { - testnet_genesis( - // Root - AccountId::from(hex!("6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b")), - // Treasury Council members: Baltathar, Charleth and Dorothy - vec![ - AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), - AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")), - AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")), - ], - // Open Tech Committee members: Alith and Baltathar - vec![ - AccountId::from(hex!("6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b")), - AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), - ], - // Collators - vec![ - ( - AccountId::from(hex!("6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b")), - get_from_seed::("Alice"), - 1_000 * UNIT, - ), - ( - AccountId::from(hex!("C0F0f4ab324C46e55D02D0033343B4Be8A55532d")), - get_from_seed::("Faith"), - 1_000 * UNIT, - ), - ], - // Delegations - vec![], - // Endowed accounts (each minted 1 << 80 balance) - vec![ - // Alith, Baltathar, Charleth, Dorothy and Faith - AccountId::from(hex!("6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b")), - AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), - AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")), - AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")), - AccountId::from(hex!("C0F0f4ab324C46e55D02D0033343B4Be8A55532d")), - // Additional accounts - AccountId::from(hex!("Ff64d3F6efE2317EE2807d223a0Bdc4c0c49dfDB")), - AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), - ], - 3_000_000 * UNIT, - para_id, - // Chain ID - 1280, - ) - }, - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - None, - // Fork ID - None, - // Properties - Some(serde_json::from_str("{\"tokenDecimals\": 18}").expect("Provided valid json map")), - // Extensions + ChainSpec::builder( + WASM_BINARY.expect("WASM binary was not build, please build it!"), Extensions { relay_chain: "westend_local".into(), para_id: para_id.into(), }, ) + .with_name("Moonbase Development Testnet") + .with_id("staking") + .with_chain_type(ChainType::Local) + .with_properties( + serde_json::from_str("{\"tokenDecimals\": 18}").expect("Provided valid json map"), + ) + .with_genesis_config(testnet_genesis( + // Root + AccountId::from(hex!("6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b")), + // Treasury Council members: Baltathar, Charleth and Dorothy + vec![ + AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), + AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")), + AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")), + ], + // Open Tech Committee members: Alith and Baltathar + vec![ + AccountId::from(hex!("6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b")), + AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), + ], + // Collators + vec![ + ( + AccountId::from(hex!("6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b")), + get_from_seed::("Alice"), + 1_000 * UNIT, + ), + ( + AccountId::from(hex!("C0F0f4ab324C46e55D02D0033343B4Be8A55532d")), + get_from_seed::("Faith"), + 1_000 * UNIT, + ), + ], + // Delegations + vec![], + // Endowed accounts (each minted 1 << 80 balance) + vec![ + // Alith, Baltathar, Charleth, Dorothy and Faith + AccountId::from(hex!("6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b")), + AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), + AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")), + AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")), + AccountId::from(hex!("C0F0f4ab324C46e55D02D0033343B4Be8A55532d")), + // Additional accounts + AccountId::from(hex!("Ff64d3F6efE2317EE2807d223a0Bdc4c0c49dfDB")), + AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), + ], + 3_000_000 * UNIT, + para_id, + // Chain ID + 1280, + )) + .build() } diff --git a/node/service/src/client.rs b/node/service/src/client.rs index 9af24eb753..d78884f734 100644 --- a/node/service/src/client.rs +++ b/node/service/src/client.rs @@ -15,12 +15,12 @@ // along with Moonbeam. If not, see . pub use moonbeam_core_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Header, Index}; use sc_client_api::{Backend as BackendT, BlockchainEvents, KeysIter, MerkleValue, PairsIter}; -use sp_api::{CallApiAt, NumberFor, ProvideRuntimeApi}; +use sp_api::{CallApiAt, ProvideRuntimeApi}; use sp_blockchain::HeaderBackend; use sp_consensus::BlockStatus; use sp_runtime::{ generic::SignedBlock, - traits::{BlakeTwo256, Block as BlockT}, + traits::{BlakeTwo256, Block as BlockT, NumberFor}, Justifications, }; use sp_storage::{ChildInfo, StorageData, StorageKey}; @@ -84,7 +84,7 @@ pub trait AbstractClient: where Block: BlockT, Backend: BackendT, - Backend::State: sp_api::StateBackend, + Backend::State: sc_client_api::backend::StateBackend, Self::Api: RuntimeApiCollection, { } @@ -93,7 +93,7 @@ impl AbstractClient for Client where Block: BlockT, Backend: BackendT, - Backend::State: sp_api::StateBackend, + Backend::State: sc_client_api::backend::StateBackend, Client: BlockchainEvents + ProvideRuntimeApi + HeaderBackend @@ -126,7 +126,7 @@ pub trait ExecuteWithClient { fn execute_with_client(self, client: Arc) -> Self::Output where Backend: sc_client_api::Backend, - Backend::State: sp_api::StateBackend, + Backend::State: sc_client_api::backend::StateBackend, Api: crate::RuntimeApiCollection, Client: AbstractClient + 'static; } diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index 2675817e6c..ccf2cac256 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -28,15 +28,13 @@ use cumulus_client_cli::CollatorOptions; use cumulus_client_collator::service::CollatorService; use cumulus_client_consensus_common::ParachainBlockImport as TParachainBlockImport; use cumulus_client_consensus_proposer::Proposer; +use cumulus_client_parachain_inherent::{MockValidationDataInherentDataProvider, MockXcmConfig}; use cumulus_client_service::{ prepare_node_config, start_relay_chain_tasks, CollatorSybilResistance, DARecoveryProfile, StartRelayChainTasksParams, }; use cumulus_primitives_core::relay_chain::CollatorPair; use cumulus_primitives_core::ParaId; -use cumulus_primitives_parachain_inherent::{ - MockValidationDataInherentDataProvider, MockXcmConfig, -}; use cumulus_relay_chain_inprocess_interface::build_inprocess_relay_chain; use cumulus_relay_chain_interface::{OverseerHandle, RelayChainInterface, RelayChainResult}; use cumulus_relay_chain_minimal_node::build_minimal_relay_chain_node_with_rpc; @@ -1001,7 +999,8 @@ where RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - sc_client_api::StateBackendFor, Block>: sp_api::StateBackend, + sc_client_api::StateBackendFor, Block>: + sc_client_api::StateBackend, Executor: sc_executor::NativeExecutionDispatch + 'static, SO: SyncOracle + Send + Sync + Clone + 'static, { @@ -1091,6 +1090,7 @@ where relay_client: relay_chain_interface, slot_duration: None, sync_oracle, + reinitialize: false, }), ); } else { @@ -1725,30 +1725,22 @@ mod tests { fn test_config(chain_id: &str) -> Configuration { let network_config = NetworkConfiguration::new("", "", Default::default(), None); let runtime = tokio::runtime::Runtime::new().expect("failed creating tokio runtime"); - let spec = ChainSpec::from_genesis( - "test", - chain_id, - ChainType::Local, - move || { - testnet_genesis( - AccountId::from_str("6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b").unwrap(), - vec![], - vec![], - vec![], - vec![], - vec![], - 1000 * UNIT, - ParaId::new(0), - 0, - ) - }, - vec![], - None, - None, - None, - None, - Extensions::default(), - ); + let spec = ChainSpec::builder(&[0u8], Extensions::default()) + .with_name("test") + .with_id(chain_id) + .with_chain_type(ChainType::Local) + .with_genesis_config(testnet_genesis( + AccountId::from_str("6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b").unwrap(), + vec![], + vec![], + vec![], + vec![], + vec![], + 1000 * UNIT, + ParaId::new(0), + 0, + )) + .build(); Configuration { impl_name: String::from("test-impl"), diff --git a/node/service/src/rpc.rs b/node/service/src/rpc.rs index d83175663d..d7c771f134 100644 --- a/node/service/src/rpc.rs +++ b/node/service/src/rpc.rs @@ -52,12 +52,12 @@ use sc_rpc_api::DenyUnsafe; use sc_service::TaskManager; use sc_transaction_pool::{ChainApi, Pool}; use sc_transaction_pool_api::TransactionPool; -use sp_api::{CallApiAt, HeaderT, ProvideRuntimeApi}; +use sp_api::{CallApiAt, ProvideRuntimeApi}; use sp_blockchain::{ Backend as BlockchainBackend, Error as BlockChainError, HeaderBackend, HeaderMetadata, }; use sp_core::H256; -use sp_runtime::traits::{BlakeTwo256, Block as BlockT}; +use sp_runtime::traits::{BlakeTwo256, Block as BlockT, Header as HeaderT}; use std::collections::BTreeMap; pub struct MoonbeamEGA; diff --git a/pallets/asset-manager/src/benchmarks.rs b/pallets/asset-manager/src/benchmarks.rs index 3cee04b8ca..caf695e702 100644 --- a/pallets/asset-manager/src/benchmarks.rs +++ b/pallets/asset-manager/src/benchmarks.rs @@ -45,7 +45,7 @@ fn create_funded_user( benchmarks! { // This where clause allows us to create ForeignAssetTypes - where_clause { where T::ForeignAssetType: From } + where_clause { where T::ForeignAssetType: From } register_foreign_asset { // does not really matter what we register let asset_type = T::ForeignAssetType::default(); @@ -62,9 +62,9 @@ benchmarks! { // We make it dependent on the number of existing assets already let x in 5..100; for i in 0..x { - let asset_type: T::ForeignAssetType = MultiLocation::new( + let asset_type: T::ForeignAssetType = Location::new( 0, - X1(GeneralIndex(i as u128)) + [(GeneralIndex(i as u128))] ).into(); let metadata = T::AssetRegistrarMetadata::default(); let amount = 1u32.into(); @@ -101,7 +101,7 @@ benchmarks! { // We make it dependent on the number of existing assets already let x in 5..100; for i in 0..x { - let asset_type: T::ForeignAssetType = MultiLocation::new(0, X1(GeneralIndex(i as u128))).into(); + let asset_type: T::ForeignAssetType = Location::new(0, X1(GeneralIndex(i as u128))).into(); let metadata = T::AssetRegistrarMetadata::default(); let amount = 1u32.into(); Pallet::::register_foreign_asset( @@ -115,9 +115,9 @@ benchmarks! { } let new_asset_type = T::ForeignAssetType::default(); - let asset_type_to_be_changed: T::ForeignAssetType = MultiLocation::new( + let asset_type_to_be_changed: T::ForeignAssetType = Location::new( 0, - X1(GeneralIndex((x-1) as u128)) + [(GeneralIndex((x-1) as u128))] ).into(); let asset_id_to_be_changed = asset_type_to_be_changed.into(); }: _(RawOrigin::Root, asset_id_to_be_changed, new_asset_type.clone(), x) @@ -131,7 +131,7 @@ benchmarks! { // We make it dependent on the number of existing assets already let x in 5..100; for i in 0..x { - let asset_type: T::ForeignAssetType = MultiLocation::new(0, X1(GeneralIndex(i as u128))).into(); + let asset_type: T::ForeignAssetType = Location::new(0, X1(GeneralIndex(i as u128))).into(); let metadata = T::AssetRegistrarMetadata::default(); let amount = 1u32.into(); Pallet::::register_foreign_asset( @@ -143,9 +143,9 @@ benchmarks! { )?; Pallet::::set_asset_units_per_second(RawOrigin::Root.into(), asset_type.clone(), 1, i)?; } - let asset_type_to_be_removed: T::ForeignAssetType = MultiLocation::new( + let asset_type_to_be_removed: T::ForeignAssetType = Location::new( 0, - X1(GeneralIndex((x-1) as u128)) + [(GeneralIndex((x-1) as u128))] ).into(); // We try to remove the last asset type }: _(RawOrigin::Root, asset_type_to_be_removed.clone(), x) @@ -179,7 +179,7 @@ benchmarks! { // Worst case is we need to remove it from SupportedAAssetsFeePayment too let x in 5..100; for i in 0..x { - let asset_type: T::ForeignAssetType = MultiLocation::new(0, X1(GeneralIndex(i as u128))).into(); + let asset_type: T::ForeignAssetType = Location::new(0, X1(GeneralIndex(i as u128))).into(); let metadata = T::AssetRegistrarMetadata::default(); let amount = 1u32.into(); Pallet::::register_foreign_asset( @@ -192,9 +192,9 @@ benchmarks! { Pallet::::set_asset_units_per_second(RawOrigin::Root.into(), asset_type.clone(), 1, i)?; } - let asset_type_to_be_removed: T::ForeignAssetType = MultiLocation::new( + let asset_type_to_be_removed: T::ForeignAssetType = Location::new( 0, - X1(GeneralIndex((x-1) as u128)) + [(GeneralIndex((x-1) as u128))] ).into(); let asset_id: T::AssetId = asset_type_to_be_removed.clone().into(); }: _(RawOrigin::Root, asset_id, x) diff --git a/pallets/asset-manager/src/mock.rs b/pallets/asset-manager/src/mock.rs index e3c18cf59d..99496fa74d 100644 --- a/pallets/asset-manager/src/mock.rs +++ b/pallets/asset-manager/src/mock.rs @@ -50,6 +50,7 @@ impl frame_system::Config for Test { type BlockLength = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type Hash = H256; @@ -86,7 +87,6 @@ impl pallet_balances::Config for Test { type ReserveIdentifier = [u8; 8]; type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } @@ -107,7 +107,7 @@ parameter_types! { pub type AssetId = u128; #[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, TypeInfo)] pub enum MockAssetType { - Xcm(MultiLocation), + Xcm(Location), MockAsset(AssetId), } @@ -131,14 +131,14 @@ impl From for AssetId { } } -impl From for MockAssetType { - fn from(location: MultiLocation) -> Self { +impl From for MockAssetType { + fn from(location: Location) -> Self { Self::Xcm(location) } } -impl Into> for MockAssetType { - fn into(self) -> Option { +impl Into> for MockAssetType { + fn into(self) -> Option { match self { Self::Xcm(location) => Some(location), _ => None, diff --git a/pallets/erc20-xcm-bridge/src/erc20_matcher.rs b/pallets/erc20-xcm-bridge/src/erc20_matcher.rs index 799eabd600..1dc7e20c86 100644 --- a/pallets/erc20-xcm-bridge/src/erc20_matcher.rs +++ b/pallets/erc20-xcm-bridge/src/erc20_matcher.rs @@ -18,19 +18,19 @@ use sp_core::{Get, H160, U256}; use xcm::latest::prelude::*; -use xcm::latest::{Junction, MultiLocation}; +use xcm::latest::{Junction, Location}; use xcm_executor::traits::{Error as MatchError, MatchesFungibles}; pub(crate) struct Erc20Matcher( core::marker::PhantomData, ); -impl> MatchesFungibles +impl> MatchesFungibles for Erc20Matcher { - fn matches_fungibles(multiasset: &MultiAsset) -> Result<(H160, U256), MatchError> { + fn matches_fungibles(multiasset: &Asset) -> Result<(H160, U256), MatchError> { let (amount, id) = match (&multiasset.fun, &multiasset.id) { - (Fungible(ref amount), Concrete(ref id)) => (amount, id), + (Fungible(ref amount), AssetId(ref id)) => (amount, id), _ => return Err(MatchError::AssetNotHandled), }; let contract_address = Self::matches_erc20_multilocation(id) @@ -41,14 +41,14 @@ impl> MatchesFungibles } } -impl> Erc20Matcher { - pub(crate) fn is_erc20_asset(multiasset: &MultiAsset) -> bool { +impl> Erc20Matcher { + pub(crate) fn is_erc20_asset(multiasset: &Asset) -> bool { match (&multiasset.fun, &multiasset.id) { - (Fungible(_), Concrete(ref id)) => Self::matches_erc20_multilocation(id).is_ok(), + (Fungible(_), AssetId(ref id)) => Self::matches_erc20_multilocation(id).is_ok(), _ => false, } } - fn matches_erc20_multilocation(multilocation: &MultiLocation) -> Result { + fn matches_erc20_multilocation(multilocation: &Location) -> Result { let prefix = Erc20MultilocationPrefix::get(); if prefix.parent_count() != multilocation.parent_count() || prefix @@ -84,29 +84,28 @@ mod tests { } frame_support::parameter_types! { - pub const Erc20MultilocationPrefix: MultiLocation = MultiLocation { + pub Erc20MultilocationPrefix: Location = Location { parents:0, - interior: Junctions::X1( - PalletInstance(42u8) - ) + interior: [PalletInstance(42u8)].into() }; } #[test] fn should_match_valid_erc20_location() { - let location = MultiLocation { + let location = Location { parents: 0, - interior: Junctions::X2( + interior: [ PalletInstance(42u8), AccountKey20 { key: [0; 20], network: None, }, - ), + ] + .into(), }; assert_ok!( - Erc20Matcher::::matches_fungibles(&MultiAsset::from(( + Erc20Matcher::::matches_fungibles(&Asset::from(( location, 100u128 ))), (H160([0; 20]), U256([100, 0, 0, 0])) @@ -115,19 +114,20 @@ mod tests { #[test] fn should_match_valid_erc20_location_with_amount_greater_than_u64() { - let location = MultiLocation { + let location = Location { parents: 0, - interior: Junctions::X2( + interior: [ PalletInstance(42u8), AccountKey20 { key: [0; 20], network: None, }, - ), + ] + .into(), }; assert_ok!( - Erc20Matcher::::matches_fungibles(&MultiAsset::from(( + Erc20Matcher::::matches_fungibles(&Asset::from(( location, 100000000000000000u128 ))), @@ -137,13 +137,13 @@ mod tests { #[test] fn should_not_match_invalid_erc20_location() { - let invalid_location = MultiLocation { + let invalid_location = Location { parents: 0, - interior: Junctions::X2(PalletInstance(42u8), GeneralIndex(0)), + interior: [PalletInstance(42u8), GeneralIndex(0)].into(), }; assert!( - Erc20Matcher::::matches_fungibles(&MultiAsset::from(( + Erc20Matcher::::matches_fungibles(&Asset::from(( invalid_location, 100u128 ))) diff --git a/pallets/erc20-xcm-bridge/src/erc20_trap.rs b/pallets/erc20-xcm-bridge/src/erc20_trap.rs index 93359ec459..cde38b0583 100644 --- a/pallets/erc20-xcm-bridge/src/erc20_trap.rs +++ b/pallets/erc20-xcm-bridge/src/erc20_trap.rs @@ -24,8 +24,8 @@ pub struct AssetTrapWrapper(core::marker::PhantomData<(AssetTrap, // Morph a given `DropAssets` implementation into one which filter out erc20 assets. impl DropAssets for AssetTrapWrapper { fn drop_assets( - origin: &xcm::latest::MultiLocation, - mut assets: xcm_executor::Assets, + origin: &xcm::latest::Location, + mut assets: xcm_executor::AssetsInHolding, context: &XcmContext, ) -> xcm::latest::Weight { // Remove all erc20 assets @@ -36,8 +36,8 @@ impl DropAssets for AssetTrapWrapper; - type Erc20MultilocationPrefix: Get; + type Erc20MultilocationPrefix: Get; type Erc20TransferGasLimit: Get; type EvmRunner: Runner; } impl Pallet { - pub fn is_erc20_asset(asset: &MultiAsset) -> bool { + pub fn is_erc20_asset(asset: &Asset) -> bool { Erc20Matcher::::is_erc20_asset(asset) } pub fn gas_limit_of_erc20_transfer(asset_id: &AssetId) -> u64 { - if let AssetId::Concrete(multilocation) = asset_id { - if let Some(Junction::GeneralKey { - length: _, - ref data, - }) = multilocation.interior().into_iter().next_back() - { - // As GeneralKey definition might change in future versions of XCM, this is meant - // to throw a compile error as a warning that data type has changed. - // If that happens, a new check is needed to ensure that data has at least 18 - // bytes (size of b"gas_limit:" + u64) - let data: &[u8; 32] = &data; - if let Ok(content) = core::str::from_utf8(&data[0..10]) { - if content == "gas_limit:" { - let mut bytes: [u8; 8] = Default::default(); - bytes.copy_from_slice(&data[10..18]); - return u64::from_le_bytes(bytes); - } + let location = &asset_id.0; + if let Some(Junction::GeneralKey { + length: _, + ref data, + }) = location.interior().into_iter().next_back() + { + // As GeneralKey definition might change in future versions of XCM, this is meant + // to throw a compile error as a warning that data type has changed. + // If that happens, a new check is needed to ensure that data has at least 18 + // bytes (size of b"gas_limit:" + u64) + let data: &[u8; 32] = &data; + if let Ok(content) = core::str::from_utf8(&data[0..10]) { + if content == "gas_limit:" { + let mut bytes: [u8; 8] = Default::default(); + bytes.copy_from_slice(&data[10..18]); + return u64::from_le_bytes(bytes); } } - }; + } T::Erc20TransferGasLimit::get() } pub fn weight_of_erc20_transfer(asset_id: &AssetId) -> Weight { @@ -159,11 +157,7 @@ pub mod pallet { // For optimization reasons, the asset we want to deposit has not really been withdrawn, // we have just traced from which account it should have been withdrawn. // So we will retrieve these information and make the transfer from the origin account. - fn deposit_asset( - what: &MultiAsset, - who: &MultiLocation, - _context: Option<&XcmContext>, - ) -> XcmResult { + fn deposit_asset(what: &Asset, who: &Location, _context: Option<&XcmContext>) -> XcmResult { let (contract_address, amount) = Erc20Matcher::::matches_fungibles(what)?; @@ -206,11 +200,11 @@ pub mod pallet { } fn internal_transfer_asset( - asset: &MultiAsset, - from: &MultiLocation, - to: &MultiLocation, + asset: &Asset, + from: &Location, + to: &Location, _context: &XcmContext, - ) -> Result { + ) -> Result { let (contract_address, amount) = Erc20Matcher::::matches_fungibles(asset)?; @@ -239,10 +233,10 @@ pub mod pallet { // In order to perform only one evm call, we just trace the origin of the asset, // and then the transfer will only really be performed in the deposit instruction. fn withdraw_asset( - what: &MultiAsset, - who: &MultiLocation, + what: &Asset, + who: &Location, _context: Option<&XcmContext>, - ) -> Result { + ) -> Result { let (contract_address, amount) = Erc20Matcher::::matches_fungibles(what)?; let who = T::AccountIdConverter::convert_location(who) diff --git a/pallets/erc20-xcm-bridge/src/mock.rs b/pallets/erc20-xcm-bridge/src/mock.rs index 2d3089680c..7175eca3a2 100644 --- a/pallets/erc20-xcm-bridge/src/mock.rs +++ b/pallets/erc20-xcm-bridge/src/mock.rs @@ -47,6 +47,7 @@ impl frame_system::Config for Test { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -84,7 +85,6 @@ impl pallet_balances::Config for Test { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/pallets/erc20-xcm-bridge/src/xcm_holding_ext.rs b/pallets/erc20-xcm-bridge/src/xcm_holding_ext.rs index 4611e3db8c..eee75baf98 100644 --- a/pallets/erc20-xcm-bridge/src/xcm_holding_ext.rs +++ b/pallets/erc20-xcm-bridge/src/xcm_holding_ext.rs @@ -20,6 +20,7 @@ use core::marker::PhantomData; use sp_core::{H160, U256}; use sp_std::collections::btree_map::BTreeMap; use sp_std::vec::Vec; +use xcm_executor::traits::XcmAssetTransfers; environmental::environmental!(XCM_HOLDING_ERC20_ORIGINS: XcmHoldingErc20sOrigins); @@ -95,24 +96,23 @@ impl XcmHoldingErc20sOrigins { } /// Xcm executor wrapper that inject xcm holding extension "XcmHoldingErc20sOrigins" -pub struct XcmExecutorWrapper( - PhantomData<(RuntimeCall, InnerXcmExecutor)>, -); -impl xcm::latest::ExecuteXcm - for XcmExecutorWrapper +pub struct XcmExecutorWrapper(PhantomData<(Config, InnerXcmExecutor)>); +impl xcm::latest::ExecuteXcm + for XcmExecutorWrapper where - InnerXcmExecutor: xcm::latest::ExecuteXcm, + Config: xcm_executor::Config, + InnerXcmExecutor: xcm::latest::ExecuteXcm, { type Prepared = InnerXcmExecutor::Prepared; fn prepare( - message: xcm::latest::Xcm, - ) -> Result> { + message: xcm::latest::Xcm, + ) -> Result> { InnerXcmExecutor::prepare(message) } fn execute( - origin: impl Into, + origin: impl Into, pre: Self::Prepared, hash: &mut xcm::latest::XcmHash, weight_credit: xcm::latest::Weight, @@ -124,13 +124,22 @@ where } fn charge_fees( - location: impl Into, - fees: xcm::latest::MultiAssets, + location: impl Into, + fees: xcm::latest::Assets, ) -> Result<(), xcm::latest::Error> { InnerXcmExecutor::charge_fees(location, fees) } } +impl XcmAssetTransfers for XcmExecutorWrapper +where + Config: xcm_executor::Config, +{ + type IsReserve = Config::IsReserve; + type IsTeleporter = Config::IsTeleporter; + type AssetTransactor = Config::AssetTransactor; +} + #[cfg(test)] mod tests { use super::*; diff --git a/pallets/ethereum-xcm/src/mock.rs b/pallets/ethereum-xcm/src/mock.rs index d82c90de0b..1c029f702e 100644 --- a/pallets/ethereum-xcm/src/mock.rs +++ b/pallets/ethereum-xcm/src/mock.rs @@ -68,6 +68,7 @@ impl frame_system::Config for Test { type BlockLength = (); type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type Hash = H256; @@ -107,7 +108,6 @@ impl pallet_balances::Config for Test { type ReserveIdentifier = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/pallets/moonbeam-lazy-migrations/src/mock.rs b/pallets/moonbeam-lazy-migrations/src/mock.rs index 65630ab6c6..988ee0ba04 100644 --- a/pallets/moonbeam-lazy-migrations/src/mock.rs +++ b/pallets/moonbeam-lazy-migrations/src/mock.rs @@ -58,6 +58,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = RocksDbWeight; type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -95,7 +96,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/pallets/moonbeam-orbiters/src/mock.rs b/pallets/moonbeam-orbiters/src/mock.rs index 9a633a2e36..57e071d81c 100644 --- a/pallets/moonbeam-orbiters/src/mock.rs +++ b/pallets/moonbeam-orbiters/src/mock.rs @@ -58,6 +58,7 @@ impl frame_system::Config for Test { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -98,7 +99,6 @@ impl pallet_balances::Config for Test { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/pallets/moonbeam-xcm-benchmarks/src/generic/benchmarking.rs b/pallets/moonbeam-xcm-benchmarks/src/generic/benchmarking.rs index 486dfd18a3..c75bcc5510 100644 --- a/pallets/moonbeam-xcm-benchmarks/src/generic/benchmarking.rs +++ b/pallets/moonbeam-xcm-benchmarks/src/generic/benchmarking.rs @@ -30,7 +30,7 @@ benchmarks! { let mut executor = new_executor::(Default::default()); executor.set_holding(holding); - let fee_asset = Concrete(MultiLocation::parent()); + let fee_asset = Concrete(Location::parent()); let instruction = Instruction::>::BuyExecution { fees: (fee_asset, 100_000_000u128).into(), // should be something inside of holding diff --git a/pallets/moonbeam-xcm-benchmarks/src/generic/mock.rs b/pallets/moonbeam-xcm-benchmarks/src/generic/mock.rs index e4c70c7584..86b21379e2 100644 --- a/pallets/moonbeam-xcm-benchmarks/src/generic/mock.rs +++ b/pallets/moonbeam-xcm-benchmarks/src/generic/mock.rs @@ -50,7 +50,7 @@ frame_support::construct_runtime!( parameter_types! { pub const BlockHashCount: u64 = 250; - pub UniversalLocation: InteriorMultiLocation = Here; + pub UniversalLocation: InteriorLocation = Here; } impl frame_system::Config for Test { @@ -59,6 +59,7 @@ impl frame_system::Config for Test { type BlockLength = (); type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type Hash = H256; @@ -91,7 +92,6 @@ impl pallet_balances::Config for Test { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } @@ -99,19 +99,11 @@ impl pallet_balances::Config for Test { /// The benchmarks in this pallet should never need an asset transactor to begin with. pub struct NoAssetTransactor; impl xcm_executor::traits::TransactAsset for NoAssetTransactor { - fn deposit_asset( - _: &MultiAsset, - _: &MultiLocation, - _: Option<&XcmContext>, - ) -> Result<(), XcmError> { + fn deposit_asset(_: &Asset, _: &Location, _: Option<&XcmContext>) -> Result<(), XcmError> { unreachable!(); } - fn withdraw_asset( - _: &MultiAsset, - _: &MultiLocation, - _: Option<&XcmContext>, - ) -> Result { + fn withdraw_asset(_: &Asset, _: &Location, _: Option<&XcmContext>) -> Result { unreachable!(); } } @@ -154,8 +146,8 @@ impl pallet_xcm_benchmarks::Config for Test { type XcmConfig = XcmConfig; type AccountIdConverter = AccountIdConverter; type DeliveryHelper = (); - fn valid_destination() -> Result { - let valid_destination: MultiLocation = Junction::AccountId32 { + fn valid_destination() -> Result { + let valid_destination: Location = Junction::AccountId32 { network: None, id: [0u8; 32], } @@ -163,7 +155,7 @@ impl pallet_xcm_benchmarks::Config for Test { Ok(valid_destination) } - fn worst_case_holding(_depositable_count: u32) -> MultiAssets { + fn worst_case_holding(_depositable_count: u32) -> Assets { crate::mock::mock_worst_case_holding() } } @@ -173,48 +165,48 @@ impl pallet_xcm_benchmarks::generic::Config for Test { type TransactAsset = Balances; fn worst_case_response() -> (u64, Response) { - let assets: MultiAssets = (Concrete(Here.into()), 100).into(); + let assets: Assets = (Concrete(Here.into()), 100).into(); (0, Response::Assets(assets)) } - fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + fn worst_case_asset_exchange() -> Result<(Assets, Assets), BenchmarkError> { Err(BenchmarkError::Skip) } - fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> { + fn universal_alias() -> Result<(Location, Junction), BenchmarkError> { Err(BenchmarkError::Skip) } fn export_message_origin_and_destination( - ) -> Result<(MultiLocation, NetworkId, Junctions), BenchmarkError> { + ) -> Result<(Location, NetworkId, Junctions), BenchmarkError> { Err(BenchmarkError::Skip) } - fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { + fn transact_origin_and_runtime_call() -> Result<(Location, RuntimeCall), BenchmarkError> { Ok(( Default::default(), frame_system::Call::remark_with_event { remark: vec![] }.into(), )) } - fn subscribe_origin() -> Result { + fn subscribe_origin() -> Result { Ok(Default::default()) } - fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> { - let assets: MultiAssets = (Concrete(Here.into()), 100).into(); - let ticket = MultiLocation { + fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError> { + let assets: Assets = (Concrete(Here.into()), 100).into(); + let ticket = Location { parents: 0, interior: X1(GeneralIndex(0)), }; Ok((Default::default(), ticket, assets)) } - fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { + fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { Err(BenchmarkError::Skip) } - fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { + fn alias_origin() -> Result<(Location, Location), BenchmarkError> { Ok((Default::default(), Default::default())) } } @@ -237,10 +229,7 @@ where Origin: OriginTrait, ::AccountId: Decode, { - fn convert_origin( - _origin: impl Into, - _kind: OriginKind, - ) -> Result { + fn convert_origin(_origin: impl Into, _kind: OriginKind) -> Result { Ok(Origin::signed( ::AccountId::decode(&mut TrailingZeroInput::zeroes()) .expect("infinite length input; no invalid inputs for type; qed"), diff --git a/pallets/moonbeam-xcm-benchmarks/src/mock.rs b/pallets/moonbeam-xcm-benchmarks/src/mock.rs index f1e3e2aa4c..8e7ab86af9 100644 --- a/pallets/moonbeam-xcm-benchmarks/src/mock.rs +++ b/pallets/moonbeam-xcm-benchmarks/src/mock.rs @@ -24,10 +24,10 @@ impl SendXcm for DevNull { type Ticket = (); fn validate( - _destination: &mut Option, + _destination: &mut Option, _message: &mut Option, ) -> SendResult { - Ok(((), MultiAssets::new())) + Ok(((), Assets::new())) } fn deliver(_: Self::Ticket) -> Result { @@ -36,13 +36,13 @@ impl SendXcm for DevNull { } impl xcm_executor::traits::OnResponse for DevNull { - fn expecting_response(_: &MultiLocation, _: u64, _: Option<&MultiLocation>) -> bool { + fn expecting_response(_: &Location, _: u64, _: Option<&Location>) -> bool { false } fn on_response( - _: &MultiLocation, + _: &Location, _: u64, - _: Option<&MultiLocation>, + _: Option<&Location>, _: Response, _: Weight, _: &XcmContext, @@ -53,34 +53,33 @@ impl xcm_executor::traits::OnResponse for DevNull { pub struct AccountIdConverter; impl ConvertLocation for AccountIdConverter { - fn convert_location(ml: &MultiLocation) -> Option { - match ml { - MultiLocation { - parents: 0, - interior: X1(Junction::AccountId32 { id, .. }), - } => Some(::decode(&mut &*id.to_vec()).unwrap()), + fn convert_location(ml: &Location) -> Option { + match ml.unpack() { + (0, [Junction::AccountId32 { id, .. }]) => { + Some(::decode(&mut &*id.to_vec()).unwrap()) + } _ => None, } } } parameter_types! { - pub Ancestry: MultiLocation = Junction::Parachain(101).into(); + pub Ancestry: Location = Junction::Parachain(101).into(); pub UnitWeightCost: u64 = 10; - pub WeightPrice: (AssetId, u128, u128) = (Concrete(MultiLocation::parent()), 1_000_000, 1024); + pub WeightPrice: (AssetId, u128, u128) = (AssetId(Location::parent()), 1_000_000, 1024); } pub struct AllAssetLocationsPass; -impl ContainsPair for AllAssetLocationsPass { - fn contains(_: &MultiAsset, _: &MultiLocation) -> bool { +impl ContainsPair for AllAssetLocationsPass { + fn contains(_: &Asset, _: &Location) -> bool { true } } #[cfg(feature = "runtime-benchmarks")] -pub fn mock_worst_case_holding() -> MultiAssets { - let assets: Vec = vec![MultiAsset { - id: Concrete(MultiLocation::parent()), +pub fn mock_worst_case_holding() -> Assets { + let assets: Vec = vec![Asset { + id: Concrete(Location::parent()), fun: Fungible(u128::MAX), }]; assets.into() diff --git a/pallets/moonbeam-xcm-benchmarks/src/weights/fungible.rs b/pallets/moonbeam-xcm-benchmarks/src/weights/fungible.rs index 9ceb1f6c9e..7147dd2bd1 100644 --- a/pallets/moonbeam-xcm-benchmarks/src/weights/fungible.rs +++ b/pallets/moonbeam-xcm-benchmarks/src/weights/fungible.rs @@ -20,7 +20,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -use xcm::latest::MultiAsset; +use xcm::latest::Asset; // Values copied from statemint benchmarks const ASSET_BURN_MAX_PROOF_SIZE: u64 = 7242; @@ -30,7 +30,7 @@ const ASSET_TRANSFER_MAX_PROOF_SIZE: u64 = 13412; /// Weights for `pallet_xcm_benchmarks::fungible`. pub struct WeightInfo(PhantomData); impl WeightInfo { - pub(crate) fn withdraw_asset(asset: &MultiAsset) -> Weight { + pub(crate) fn withdraw_asset(asset: &Asset) -> Weight { if pallet_erc20_xcm_bridge::Pallet::::is_erc20_asset(asset) { pallet_erc20_xcm_bridge::Pallet::::weight_of_erc20_transfer(&asset.id) @@ -38,14 +38,14 @@ impl WeightInfo { Weight::from_parts(200_000_000 as u64, ASSET_BURN_MAX_PROOF_SIZE) } } - pub(crate) fn transfer_asset(asset: &MultiAsset) -> Weight { + pub(crate) fn transfer_asset(asset: &Asset) -> Weight { if pallet_erc20_xcm_bridge::Pallet::::is_erc20_asset(asset) { pallet_erc20_xcm_bridge::Pallet::::weight_of_erc20_transfer(&asset.id) } else { Weight::from_parts(200_000_000 as u64, ASSET_TRANSFER_MAX_PROOF_SIZE) } } - pub(crate) fn transfer_reserve_asset(asset: &MultiAsset) -> Weight { + pub(crate) fn transfer_reserve_asset(asset: &Asset) -> Weight { if pallet_erc20_xcm_bridge::Pallet::::is_erc20_asset(asset) { pallet_erc20_xcm_bridge::Pallet::::weight_of_erc20_transfer(&asset.id) } else { diff --git a/pallets/moonbeam-xcm-benchmarks/src/weights/mod.rs b/pallets/moonbeam-xcm-benchmarks/src/weights/mod.rs index be27df8b83..42aec6af23 100644 --- a/pallets/moonbeam-xcm-benchmarks/src/weights/mod.rs +++ b/pallets/moonbeam-xcm-benchmarks/src/weights/mod.rs @@ -37,7 +37,7 @@ trait WeighMultiAssetsFilter { fn weigh_multi_assets_filter(&self, weight: Weight) -> XCMWeight; } -impl WeighMultiAssetsFilter for MultiAssetFilter { +impl WeighMultiAssetsFilter for AssetFilter { fn weigh_multi_assets_filter(&self, weight: Weight) -> XCMWeight { match self { Self::Definite(assets) => { @@ -51,7 +51,7 @@ impl WeighMultiAssetsFilter for MultiAssetFilter { } } -impl WeighMultiAssets for MultiAssets { +impl WeighMultiAssets for Assets { fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight { weight.saturating_mul(self.inner().into_iter().count() as u64) } @@ -62,36 +62,32 @@ impl XcmWeightInfo for XcmWeight where Runtime: frame_system::Config + pallet_erc20_xcm_bridge::Config, { - fn withdraw_asset(assets: &MultiAssets) -> XCMWeight { + fn withdraw_asset(assets: &Assets) -> XCMWeight { assets.inner().iter().fold(Weight::zero(), |acc, asset| { acc.saturating_add(XcmFungibleWeight::::withdraw_asset(&asset)) }) } // Currently there is no trusted reserve - fn reserve_asset_deposited(_assets: &MultiAssets) -> XCMWeight { + fn reserve_asset_deposited(_assets: &Assets) -> XCMWeight { XcmFungibleWeight::::reserve_asset_deposited() } - fn receive_teleported_asset(assets: &MultiAssets) -> XCMWeight { + fn receive_teleported_asset(assets: &Assets) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) } fn query_response( _query_id: &u64, _response: &Response, _max_weight: &Weight, - _querier: &Option, + _querier: &Option, ) -> XCMWeight { XcmGeneric::::query_response() } - fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> XCMWeight { + fn transfer_asset(assets: &Assets, _dest: &Location) -> XCMWeight { assets.inner().iter().fold(Weight::zero(), |acc, asset| { acc.saturating_add(XcmFungibleWeight::::transfer_asset(&asset)) }) } - fn transfer_reserve_asset( - assets: &MultiAssets, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> XCMWeight { + fn transfer_reserve_asset(assets: &Assets, _dest: &Location, _xcm: &Xcm<()>) -> XCMWeight { assets.inner().iter().fold(Weight::zero(), |acc, asset| { acc.saturating_add(XcmFungibleWeight::::transfer_reserve_asset(&asset)) }) @@ -122,32 +118,24 @@ where fn clear_origin() -> XCMWeight { XcmGeneric::::clear_origin() } - fn descend_origin(_who: &InteriorMultiLocation) -> XCMWeight { + fn descend_origin(_who: &InteriorLocation) -> XCMWeight { XcmGeneric::::descend_origin() } fn report_error(_query_response_info: &QueryResponseInfo) -> XCMWeight { XcmGeneric::::report_error() } - fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> XCMWeight { + fn deposit_asset(assets: &AssetFilter, _dest: &Location) -> XCMWeight { assets.weigh_multi_assets_filter(XcmFungibleWeight::::deposit_asset()) } - fn deposit_reserve_asset( - assets: &MultiAssetFilter, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> XCMWeight { + fn deposit_reserve_asset(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> XCMWeight { assets.weigh_multi_assets_filter(XcmFungibleWeight::::deposit_reserve_asset()) } - fn exchange_asset( - _give: &MultiAssetFilter, - _receive: &MultiAssets, - _maximal: &bool, - ) -> XCMWeight { + fn exchange_asset(_give: &AssetFilter, _receive: &Assets, _maximal: &bool) -> XCMWeight { Weight::MAX } fn initiate_reserve_withdraw( - _assets: &MultiAssetFilter, - _reserve: &MultiLocation, + _assets: &AssetFilter, + _reserve: &Location, _xcm: &Xcm<()>, ) -> XCMWeight { // This is not correct. initiate reserve withdraw does not to that many db reads @@ -155,17 +143,13 @@ where //assets.weigh_multi_assets(XcmGeneric::::initiate_reserve_withdraw()) XcmGeneric::::initiate_reserve_withdraw() } - fn initiate_teleport( - _assets: &MultiAssetFilter, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> XCMWeight { + fn initiate_teleport(_assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> XCMWeight { XcmFungibleWeight::::initiate_teleport() } - fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { + fn report_holding(_response_info: &QueryResponseInfo, _assets: &AssetFilter) -> Weight { XcmGeneric::::report_holding() } - fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight { + fn buy_execution(_fees: &Asset, _weight_limit: &WeightLimit) -> XCMWeight { XcmGeneric::::buy_execution() } fn refund_surplus() -> XCMWeight { @@ -180,7 +164,7 @@ where fn clear_error() -> XCMWeight { XcmGeneric::::clear_error() } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> XCMWeight { + fn claim_asset(_assets: &Assets, _ticket: &Location) -> XCMWeight { XcmGeneric::::claim_asset() } fn trap(_code: &u64) -> XCMWeight { @@ -192,13 +176,13 @@ where fn unsubscribe_version() -> XCMWeight { XcmGeneric::::unsubscribe_version() } - fn burn_asset(assets: &MultiAssets) -> Weight { + fn burn_asset(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmGeneric::::burn_asset()) } - fn expect_asset(assets: &MultiAssets) -> Weight { + fn expect_asset(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmGeneric::::expect_asset()) } - fn expect_origin(_origin: &Option) -> Weight { + fn expect_origin(_origin: &Option) -> Weight { XcmGeneric::::expect_origin() } fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight { @@ -231,16 +215,16 @@ where fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { Weight::MAX } - fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn lock_asset(_: &Asset, _: &Location) -> Weight { Weight::MAX } - fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn unlock_asset(_: &Asset, _: &Location) -> Weight { Weight::MAX } - fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn note_unlockable(_: &Asset, _: &Location) -> Weight { Weight::MAX } - fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn request_unlock(_: &Asset, _: &Location) -> Weight { Weight::MAX } fn set_fees_mode(_: &bool) -> Weight { @@ -252,11 +236,11 @@ where fn clear_topic() -> Weight { XcmGeneric::::clear_topic() } - fn alias_origin(_: &MultiLocation) -> Weight { + fn alias_origin(_: &Location) -> Weight { // XCM Executor does not currently support alias origin operations Weight::MAX } - fn unpaid_execution(_: &WeightLimit, _: &Option) -> Weight { + fn unpaid_execution(_: &WeightLimit, _: &Option) -> Weight { XcmGeneric::::unpaid_execution() } } diff --git a/pallets/parachain-staking/src/lib.rs b/pallets/parachain-staking/src/lib.rs index acadf403a1..30169489fe 100644 --- a/pallets/parachain-staking/src/lib.rs +++ b/pallets/parachain-staking/src/lib.rs @@ -460,7 +460,7 @@ pub mod pallet { let mut weight = ::WeightInfo::base_on_initialize(); let mut round = >::get(); - if round.should_update(n.into()) { + if round.should_update(n) { // fetch current slot number let current_slot: u64 = T::SlotProvider::get().into(); @@ -472,7 +472,7 @@ pub mod pallet { .saturating_mul(T::SlotDuration::get()); // mutate round - round.update(n.into(), current_slot); + round.update(n, current_slot); // notify that new round begin weight = weight.saturating_add(T::OnNewRound::on_new_round(round.current)); // pay all stakers for T::RewardPaymentDelay rounds ago diff --git a/pallets/parachain-staking/src/mock.rs b/pallets/parachain-staking/src/mock.rs index 8e2f1baaa3..79c6acb8b9 100644 --- a/pallets/parachain-staking/src/mock.rs +++ b/pallets/parachain-staking/src/mock.rs @@ -64,6 +64,7 @@ impl frame_system::Config for Test { type BaseCallFilter = Everything; type DbWeight = RocksDbWeight; type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -100,7 +101,6 @@ impl pallet_balances::Config for Test { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/pallets/proxy-genesis-companion/src/mock.rs b/pallets/proxy-genesis-companion/src/mock.rs index 61237c8019..09c04b6881 100644 --- a/pallets/proxy-genesis-companion/src/mock.rs +++ b/pallets/proxy-genesis-companion/src/mock.rs @@ -57,6 +57,7 @@ impl frame_system::Config for Test { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -94,7 +95,6 @@ impl pallet_balances::Config for Test { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/pallets/xcm-transactor/src/benchmarks.rs b/pallets/xcm-transactor/src/benchmarks.rs index eaa5f2c01b..4c5d4d3b33 100644 --- a/pallets/xcm-transactor/src/benchmarks.rs +++ b/pallets/xcm-transactor/src/benchmarks.rs @@ -25,7 +25,7 @@ use sp_std::vec; use xcm::latest::prelude::*; benchmarks! { - where_clause { where T::Transactor: Default, T::CurrencyId: From} + where_clause { where T::Transactor: Default, T::CurrencyId: From} register { let user: T::AccountId = account("account id", 0u32, 0u32); @@ -48,10 +48,10 @@ benchmarks! { let extra_weight: Weight = Weight::from_parts(300000000u64, 0); let fee_per_second = 1; let max_weight: Weight = Weight::from_parts(20000000000u64, 0); - let location = MultiLocation::parent(); + let location = Location::parent(); }: _( RawOrigin::Root, - Box::new(xcm::VersionedMultiLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V3(location.clone())), extra_weight, max_weight, None @@ -67,25 +67,25 @@ benchmarks! { remove_transact_info { let extra_weight: Weight = Weight::from_parts(300000000u64, 0); let max_weight: Weight = Weight::from_parts(20000000000u64, u64::MAX); - let location = MultiLocation::parent(); + let location = Location::parent(); Pallet::::set_transact_info( RawOrigin::Root.into(), - Box::new(xcm::VersionedMultiLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V3(location.clone())), extra_weight, max_weight, None ).expect("must succeed"); - }: _(RawOrigin::Root, Box::new(xcm::VersionedMultiLocation::V3(location.clone()))) + }: _(RawOrigin::Root, Box::new(xcm::VersionedLocation::V3(location.clone()))) verify { assert!(Pallet::::transact_info(&location).is_none()); } set_fee_per_second { let fee_per_second = 1; - let location = MultiLocation::parent(); + let location = Location::parent(); }: _( RawOrigin::Root, - Box::new(xcm::VersionedMultiLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V3(location.clone())), fee_per_second ) verify { @@ -98,21 +98,21 @@ benchmarks! { let fee_per_second = 1; let extra_weight: Weight = Weight::from_parts(300000000u64, 0); let max_weight: Weight = Weight::from_parts(20000000000u64, u64::MAX); - let location = MultiLocation::parent(); + let location = Location::parent(); let call = vec![1u8]; let dest_weight: Weight = Weight::from_parts(100u64, 0); let currency: T::CurrencyId = location.clone().into(); let user: T::AccountId = account("account id", 0u32, 0u32); Pallet::::set_transact_info( RawOrigin::Root.into(), - Box::new(xcm::VersionedMultiLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V3(location.clone())), extra_weight, max_weight, Some(extra_weight) ).expect("must succeed"); Pallet::::set_fee_per_second( RawOrigin::Root.into(), - Box::new(xcm::VersionedMultiLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V3(location.clone())), fee_per_second ).expect("must succeed"); Pallet::::register( @@ -155,28 +155,28 @@ benchmarks! { let fee_per_second = 1; let extra_weight: Weight = Weight::from_parts(300000000u64, 0); let max_weight: Weight = Weight::from_parts(20000000000u64, u64::MAX); - let location = MultiLocation::parent(); + let location = Location::parent(); let currency: T::CurrencyId = location.clone().into(); let call = vec![1u8]; let dest_weight: Weight = Weight::from_parts(100u64, 0); let user: T::AccountId = account("account id", 0u32, 0u32); Pallet::::set_transact_info( RawOrigin::Root.into(), - Box::new(xcm::VersionedMultiLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V3(location.clone())), extra_weight, max_weight, Some(extra_weight) ).expect("must succeed"); Pallet::::set_fee_per_second( RawOrigin::Root.into(), - Box::new(xcm::VersionedMultiLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V3(location.clone())), fee_per_second ).expect("must succeed"); }: { let result = Pallet::::transact_through_sovereign( RawOrigin::Root.into(), - Box::new(xcm::VersionedMultiLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V3(location.clone())), user.clone(), CurrencyPayment { // This might involve a db Read when translating, therefore worst case @@ -208,26 +208,26 @@ benchmarks! { let fee_per_second = 1; let extra_weight: Weight = Weight::from_parts(300000000u64, 0); let max_weight: Weight = Weight::from_parts(20000000000u64, u64::MAX); - let location = MultiLocation::parent(); + let location = Location::parent(); let currency: T::CurrencyId = location.clone().into(); let call = vec![1u8]; let dest_weight: Weight = Weight::from_parts(100u64, 0); let user: T::AccountId = account("account id", 0u32, 0u32); Pallet::::set_transact_info( RawOrigin::Root.into(), - Box::new(xcm::VersionedMultiLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V3(location.clone())), extra_weight, max_weight, Some(extra_weight) ).expect("must succeed"); Pallet::::set_fee_per_second( RawOrigin::Root.into(), - Box::new(xcm::VersionedMultiLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V3(location.clone())), fee_per_second ).expect("must succeed"); }: _( RawOrigin::Signed(user.clone()), - Box::new(xcm::VersionedMultiLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V3(location.clone())), CurrencyPayment { // This might involve a db Read when translating, therefore worst case currency: Currency::AsCurrencyId(currency), @@ -247,21 +247,21 @@ benchmarks! { let fee_per_second = 1; let extra_weight: Weight = Weight::from_parts(300000000u64, 0); let max_weight: Weight = Weight::from_parts(20000000000u64, u64::MAX); - let location = MultiLocation::parent(); + let location = Location::parent(); let currency: T::CurrencyId = location.clone().into(); let call = vec![1u8]; let dest_weight: Weight = Weight::from_parts(100u64, 0); let user: T::AccountId = account("account id", 0u32, 0u32); Pallet::::set_transact_info( RawOrigin::Root.into(), - Box::new(xcm::VersionedMultiLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V3(location.clone())), extra_weight, max_weight, Some(extra_weight) ).expect("must succeed"); Pallet::::set_fee_per_second( RawOrigin::Root.into(), - Box::new(xcm::VersionedMultiLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V3(location.clone())), fee_per_second ).expect("must succeed"); }: _( diff --git a/pallets/xcm-transactor/src/lib.rs b/pallets/xcm-transactor/src/lib.rs index a96e7793e2..f17d10c16c 100644 --- a/pallets/xcm-transactor/src/lib.rs +++ b/pallets/xcm-transactor/src/lib.rs @@ -103,7 +103,7 @@ pub mod pallet { use sp_std::convert::TryFrom; use sp_std::prelude::*; use sp_std::vec::Vec; - use xcm::{latest::prelude::*, VersionedMultiLocation}; + use xcm::{latest::prelude::*, VersionedLocation}; use xcm_executor::traits::{TransactAsset, WeightBounds}; use xcm_primitives::{ FilterMaxAssetFee, HrmpAvailableCalls, HrmpEncodeCall, UtilityAvailableCalls, @@ -129,8 +129,8 @@ pub mod pallet { /// Currency Id. type CurrencyId: Parameter + Member + Clone; - /// Convert `T::CurrencyId` to `MultiLocation`. - type CurrencyIdToMultiLocation: Convert>; + /// Convert `T::CurrencyId` to `Location`. + type CurrencyIdToLocation: Convert>; // XcmTransact needs to be implemented. This type needs to implement // utility call encoding and multilocation gathering @@ -146,18 +146,18 @@ pub mod pallet { // The origin that is allowed to register derivative address indices type HrmpManipulatorOrigin: EnsureOrigin; - /// Convert `T::AccountId` to `MultiLocation`. - type AccountIdToMultiLocation: Convert; + /// Convert `T::AccountId` to `Location`. + type AccountIdToLocation: Convert; /// Means of measuring the weight consumed by an XCM message locally. type Weigher: WeightBounds; /// This chain's Universal Location. - type UniversalLocation: Get; + type UniversalLocation: Get; /// Self chain location. #[pallet::constant] - type SelfLocation: Get; + type SelfLocation: Get; // The origin that is allowed to dispatch calls from the sovereign account directly type SovereignAccountDispatcherOrigin: EnsureOrigin; @@ -172,7 +172,7 @@ pub mod pallet { #[pallet::constant] type BaseXcmWeight: Get; - /// The way to retrieve the reserve of a MultiAsset. This can be + /// The way to retrieve the reserve of a Asset. This can be /// configured to accept absolute or relative paths for self tokens type ReserveProvider: Reserve; @@ -217,12 +217,12 @@ pub mod pallet { // Express the Currency as a CurrencyId AsCurrencyId(CurrencyId), // Express the Currency as its MultiLOcation - AsMultiLocation(Box), + AsMultiLocation(Box), } impl Default for Currency { fn default() -> Currency { - Currency::::AsMultiLocation(Box::new(MultiLocation::default().into())) + Currency::::AsMultiLocation(Box::new(Location::default().into())) } } @@ -262,7 +262,7 @@ pub mod pallet { /// Struct that defines how to express the payment in a particular currency /// currency is defined by the Currency enum, which can be expressed as: /// - CurrencyId - /// - MultiLocation + /// - Location /// /// The fee_amount is an option. In case of None, the fee will be tried to /// be calculated from storage. If the storage item for the currency is not @@ -302,20 +302,19 @@ pub mod pallet { #[pallet::getter(fn index_to_account)] pub type IndexToAccount = StorageMap<_, Blake2_128Concat, u16, T::AccountId>; - /// Stores the transact info of a MultiLocation. This defines how much extra weight we need to + /// Stores the transact info of a Location. This defines how much extra weight we need to /// add when we want to transact in the destination chain and maximum amount of weight allowed /// by the destination chain #[pallet::storage] #[pallet::getter(fn transact_info)] pub type TransactInfoWithWeightLimit = - StorageMap<_, Blake2_128Concat, MultiLocation, RemoteTransactInfoWithMaxWeight>; + StorageMap<_, Blake2_128Concat, Location, RemoteTransactInfoWithMaxWeight>; /// Stores the fee per second for an asset in its reserve chain. This allows us to convert /// from weight to fee #[pallet::storage] #[pallet::getter(fn dest_asset_fee_per_second)] - pub type DestinationAssetFeePerSecond = - StorageMap<_, Twox64Concat, MultiLocation, u128>; + pub type DestinationAssetFeePerSecond = StorageMap<_, Twox64Concat, Location, u128>; /// Stores the indices of relay chain pallets #[pallet::storage] @@ -360,20 +359,20 @@ pub mod pallet { /// Transacted the inner call through a derivative account in a destination chain. TransactedDerivative { account_id: T::AccountId, - dest: MultiLocation, + dest: Location, call: Vec, index: u16, }, /// Transacted the call through the sovereign account in a destination chain. TransactedSovereign { fee_payer: T::AccountId, - dest: MultiLocation, + dest: Location, call: Vec, }, /// Transacted the call through a signed account in a destination chain. TransactedSigned { fee_payer: T::AccountId, - dest: MultiLocation, + dest: Location, call: Vec, }, /// Registered a derivative index for an account id. @@ -390,21 +389,21 @@ pub mod pallet { }, /// Changed the transact info of a location TransactInfoChanged { - location: MultiLocation, + location: Location, remote_info: RemoteTransactInfoWithMaxWeight, }, /// Removed the transact info of a location TransactInfoRemoved { - location: MultiLocation, + location: Location, }, /// Set dest fee per second DestFeePerSecondChanged { - location: MultiLocation, + location: Location, fee_per_second: u128, }, /// Remove dest fee per second DestFeePerSecondRemoved { - location: MultiLocation, + location: Location, }, /// HRMP manage action succesfully sent HrmpManagementSent { @@ -597,7 +596,7 @@ pub mod pallet { pub fn transact_through_sovereign( origin: OriginFor, // destination to which the message should be sent - dest: Box, + dest: Box, // account paying for fees fee_payer: T::AccountId, // fee to be used @@ -616,7 +615,7 @@ pub mod pallet { let fee_location = Self::currency_to_multilocation(fee.currency) .ok_or(Error::::NotCrossChainTransferableCurrency)?; - let dest = MultiLocation::try_from(*dest).map_err(|()| Error::::BadVersion)?; + let dest = Location::try_from(*dest).map_err(|()| Error::::BadVersion)?; // Calculate the total weight that the xcm message is going to spend in the // destination chain @@ -682,14 +681,13 @@ pub mod pallet { #[pallet::weight(T::WeightInfo::set_transact_info())] pub fn set_transact_info( origin: OriginFor, - location: Box, + location: Box, transact_extra_weight: Weight, max_weight: Weight, transact_extra_weight_signed: Option, ) -> DispatchResult { T::DerivativeAddressRegistrationOrigin::ensure_origin(origin)?; - let location = - MultiLocation::try_from(*location).map_err(|()| Error::::BadVersion)?; + let location = Location::try_from(*location).map_err(|()| Error::::BadVersion)?; let remote_info = RemoteTransactInfoWithMaxWeight { transact_extra_weight, max_weight, @@ -710,11 +708,10 @@ pub mod pallet { #[pallet::weight(T::WeightInfo::remove_transact_info())] pub fn remove_transact_info( origin: OriginFor, - location: Box, + location: Box, ) -> DispatchResult { T::DerivativeAddressRegistrationOrigin::ensure_origin(origin)?; - let location = - MultiLocation::try_from(*location).map_err(|()| Error::::BadVersion)?; + let location = Location::try_from(*location).map_err(|()| Error::::BadVersion)?; // Remove transact info TransactInfoWithWeightLimit::::remove(&location); @@ -733,7 +730,7 @@ pub mod pallet { pub fn transact_through_signed( origin: OriginFor, // destination to which the message should be sent - dest: Box, + dest: Box, // fee to be used fee: CurrencyPayment>, // call to be executed in destination @@ -745,7 +742,7 @@ pub mod pallet { ) -> DispatchResult { let who = ensure_signed(origin)?; - let dest = MultiLocation::try_from(*dest).map_err(|()| Error::::BadVersion)?; + let dest = Location::try_from(*dest).map_err(|()| Error::::BadVersion)?; let fee_location = Self::currency_to_multilocation(fee.currency) .ok_or(Error::::NotCrossChainTransferableCurrency)?; @@ -780,7 +777,7 @@ pub mod pallet { // If refund is true, the appendix instruction will be a deposit back to the sender let appendix = refund .then(|| -> Result<_, DispatchError> { - let sender = T::AccountIdToMultiLocation::convert(who.clone()); + let sender = T::AccountIdToLocation::convert(who.clone()); Ok(vec![ RefundSurplus, Self::deposit_instruction(sender, &dest, 1u32)?, @@ -815,12 +812,12 @@ pub mod pallet { #[pallet::weight(T::WeightInfo::set_fee_per_second())] pub fn set_fee_per_second( origin: OriginFor, - asset_location: Box, + asset_location: Box, fee_per_second: u128, ) -> DispatchResult { T::DerivativeAddressRegistrationOrigin::ensure_origin(origin)?; let asset_location = - MultiLocation::try_from(*asset_location).map_err(|()| Error::::BadVersion)?; + Location::try_from(*asset_location).map_err(|()| Error::::BadVersion)?; DestinationAssetFeePerSecond::::insert(&asset_location, &fee_per_second); @@ -836,11 +833,11 @@ pub mod pallet { #[pallet::weight(T::WeightInfo::set_fee_per_second())] pub fn remove_fee_per_second( origin: OriginFor, - asset_location: Box, + asset_location: Box, ) -> DispatchResult { T::DerivativeAddressRegistrationOrigin::ensure_origin(origin)?; let asset_location = - MultiLocation::try_from(*asset_location).map_err(|()| Error::::BadVersion)?; + Location::try_from(*asset_location).map_err(|()| Error::::BadVersion)?; DestinationAssetFeePerSecond::::remove(&asset_location); @@ -895,7 +892,7 @@ pub mod pallet { // Grab the destination // For hrmp, it is always parent - let destination = MultiLocation::parent(); + let destination = Location::parent(); // Calculate the total weight that the xcm message is going to spend in the // destination chain @@ -951,9 +948,9 @@ pub mod pallet { impl Pallet { fn transact_in_dest_chain_asset_non_signed( - dest: MultiLocation, + dest: Location, fee_payer: Option, - fee: MultiAsset, + fee: Asset, call: Vec, origin_kind: OriginKind, total_weight: WeightLimit, @@ -962,7 +959,7 @@ pub mod pallet { ) -> DispatchResult { if let Some(fee_payer) = fee_payer { // Convert origin to multilocation - let origin_as_mult = T::AccountIdToMultiLocation::convert(fee_payer); + let origin_as_mult = T::AccountIdToLocation::convert(fee_payer); // Construct the local withdraw message with the previous calculated amount // This message deducts and burns "amount" from the caller when executed @@ -996,9 +993,9 @@ pub mod pallet { } fn transact_in_dest_chain_asset_signed( - dest: MultiLocation, + dest: Location, fee_payer: T::AccountId, - fee: MultiAsset, + fee: Asset, call: Vec, origin_kind: OriginKind, total_weight: WeightLimit, @@ -1006,7 +1003,7 @@ pub mod pallet { with_appendix: Option>>, ) -> DispatchResult { // Convert origin to multilocation - let origin_as_mult = T::AccountIdToMultiLocation::convert(fee_payer); + let origin_as_mult = T::AccountIdToLocation::convert(fee_payer); // Construct the transact message. This is composed of WithdrawAsset||BuyExecution|| // Transact. @@ -1045,11 +1042,11 @@ pub mod pallet { /// Calculate the amount of fee based on the multilocation of the fee asset and /// the total weight to be spent fn calculate_fee( - fee_location: MultiLocation, + fee_location: Location, fee_amount: Option, - destination: MultiLocation, + destination: Location, total_weight: Weight, - ) -> Result { + ) -> Result { // If amount is provided, just use it // Else, multiply weight*destination_units_per_second to see how much we should charge for // this weight execution @@ -1064,17 +1061,17 @@ pub mod pallet { |v| Ok(v), )?; - // Construct MultiAsset - Ok(MultiAsset { - id: Concrete(fee_location), + // Construct Asset + Ok(Asset { + id: AssetId(fee_location), fun: Fungible(amount), }) } /// Construct the transact xcm message with the provided parameters fn transact_message( - dest: MultiLocation, - asset: MultiAsset, + dest: Location, + asset: Asset, dest_weight: WeightLimit, call: Vec, dispatch_weight: Weight, @@ -1098,13 +1095,13 @@ pub mod pallet { /// Construct a buy execution xcm order with the provided parameters fn buy_execution( - asset: MultiAsset, - at: &MultiLocation, + asset: Asset, + at: &Location, weight: WeightLimit, ) -> Result, DispatchError> { let universal_location = T::UniversalLocation::get(); let fees = asset - .reanchored(at, universal_location) + .reanchored(at, &universal_location) .map_err(|_| Error::::CannotReanchor)?; Ok(BuyExecution { @@ -1115,12 +1112,12 @@ pub mod pallet { /// Construct a withdraw instruction from a sovereign account fn withdraw_instruction( - asset: MultiAsset, - at: &MultiLocation, + asset: Asset, + at: &Location, ) -> Result, DispatchError> { let universal_location = T::UniversalLocation::get(); let fees = asset - .reanchored(at, universal_location) + .reanchored(at, &universal_location) .map_err(|_| Error::::CannotReanchor)?; Ok(WithdrawAsset(fees.into())) @@ -1128,13 +1125,13 @@ pub mod pallet { /// Construct a deposit instruction to a sovereign account fn deposit_instruction( - mut beneficiary: MultiLocation, - at: &MultiLocation, + mut beneficiary: Location, + at: &Location, max_assets: u32, ) -> Result, DispatchError> { let universal_location = T::UniversalLocation::get(); beneficiary - .reanchor(at, universal_location) + .reanchor(at, &universal_location) .map_err(|_| Error::::CannotReanchor)?; Ok(DepositAsset { assets: Wild(AllCounted(max_assets)), @@ -1150,7 +1147,7 @@ pub mod pallet { } /// Ensure `dest` has chain part and none recipient part. - fn ensure_valid_dest(dest: &MultiLocation) -> Result { + fn ensure_valid_dest(dest: &Location) -> Result { if let (Some(dest), None) = (dest.chain_part(), dest.non_chain_part()) { Ok(dest) } else { @@ -1162,10 +1159,7 @@ pub mod pallet { /// /// Returns `Err` if `asset` is not a reserved asset of `dest`, /// else returns `dest`, parachain or relay chain location. - fn transfer_allowed( - asset: &MultiAsset, - dest: &MultiLocation, - ) -> Result { + fn transfer_allowed(asset: &Asset, dest: &Location) -> Result { let dest = Self::ensure_valid_dest(dest)?; let self_location = T::SelfLocation::get(); @@ -1182,21 +1176,21 @@ pub mod pallet { /// Returns weight of `weight_of_initiate_reserve_withdraw` call. fn weight_of_initiate_reserve_withdraw() -> Weight { - let dest = MultiLocation::parent(); + let dest = Location::parent(); // We can use whatever asset here - let asset = MultiLocation::parent(); + let asset = Location::parent(); - // Construct MultiAsset - let fee = MultiAsset { - id: Concrete(asset.clone()), + // Construct Asset + let fee = Asset { + id: AssetId(asset.clone()), fun: Fungible(0), }; let xcm: Xcm<()> = Xcm(vec![ WithdrawAsset(fee.into()), InitiateReserveWithdraw { - assets: MultiAssetFilter::Wild(All), + assets: AssetFilter::Wild(All), reserve: dest.clone(), xcm: Xcm(vec![]), }, @@ -1223,7 +1217,7 @@ pub mod pallet { /// Returns the weight information for a destination from storage /// it returns the weight to be used in non-signed cases pub fn take_weight_from_transact_info( - dest: MultiLocation, + dest: Location, dest_weight: Weight, refund: bool, ) -> Result { @@ -1248,7 +1242,7 @@ pub mod pallet { /// Returns the weight information for a destination from storage /// it returns the weight to be used in signed cases pub fn take_weight_from_transact_info_signed( - dest: MultiLocation, + dest: Location, dest_weight: Weight, refund: bool, ) -> Result { @@ -1279,8 +1273,8 @@ pub mod pallet { /// Returns the fee per second charged by a reserve chain for an asset /// it takes this information from storage pub fn take_fee_per_second_from_storage( - fee_location: MultiLocation, - destination: MultiLocation, + fee_location: Location, + destination: Location, total_weight: Weight, ) -> Result { let fee_per_second = DestinationAssetFeePerSecond::::get(&fee_location) @@ -1295,12 +1289,10 @@ pub mod pallet { } /// Converts Currency to multilocation - pub fn currency_to_multilocation( - currency: Currency>, - ) -> Option { + pub fn currency_to_multilocation(currency: Currency>) -> Option { match currency { - Currency::AsCurrencyId(id) => T::CurrencyIdToMultiLocation::convert(id), - Currency::AsMultiLocation(multiloc) => MultiLocation::try_from(*multiloc).ok(), + Currency::AsCurrencyId(id) => T::CurrencyIdToLocation::convert(id), + Currency::AsMultiLocation(multiloc) => Location::try_from(*multiloc).ok(), } } } diff --git a/pallets/xcm-transactor/src/mock.rs b/pallets/xcm-transactor/src/mock.rs index c63f47b8a6..cc55c474aa 100644 --- a/pallets/xcm-transactor/src/mock.rs +++ b/pallets/xcm-transactor/src/mock.rs @@ -18,7 +18,7 @@ use super::*; use crate as pallet_xcm_transactor; -use cumulus_primitives_core::MultiAssets; +use cumulus_primitives_core::Assets; use frame_support::traits::PalletInfo as PalletInfoTrait; use frame_support::{construct_runtime, parameter_types, weights::Weight}; use frame_system::EnsureRoot; @@ -29,10 +29,10 @@ use sp_io; use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; use sp_runtime::BuildStorage; use xcm::latest::{ - opaque, Error as XcmError, Instruction, InteriorMultiLocation, + opaque, Asset, Error as XcmError, Instruction, InteriorLocation, Junction::{AccountKey20, GlobalConsensus, PalletInstance, Parachain}, - Junctions, MultiAsset, MultiLocation, NetworkId, Result as XcmResult, SendError, SendResult, - SendXcm, Xcm, XcmContext, XcmHash, + Location, NetworkId, Result as XcmResult, SendError, SendResult, SendXcm, Xcm, XcmContext, + XcmHash, }; use xcm::{IntoVersion, VersionedXcm, WrapVersion}; use xcm_primitives::{UtilityAvailableCalls, UtilityEncodeCall, XcmTransact}; @@ -40,7 +40,7 @@ use xcm_primitives::{UtilityAvailableCalls, UtilityEncodeCall, XcmTransact}; use sp_std::cell::RefCell; use xcm_executor::{ traits::{TransactAsset, WeightBounds, WeightTrader}, - Assets, + AssetsInHolding, }; type Block = frame_system::mocking::MockBlock; @@ -74,6 +74,7 @@ impl frame_system::Config for Test { type RuntimeOrigin = RuntimeOrigin; type Nonce = u64; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; @@ -107,7 +108,6 @@ impl pallet_balances::Config for Test { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } @@ -128,7 +128,7 @@ const XCM_VERSION_ROOT_KEY: &'static [u8] = b"XCM_VERSION_ROOT_KEY"; pub struct CustomVersionWrapper; impl WrapVersion for CustomVersionWrapper { fn wrap_version( - _dest: &xcm::latest::MultiLocation, + _dest: &xcm::latest::Location, xcm: impl Into>, ) -> Result, ()> { let xcm_version: u32 = @@ -149,10 +149,10 @@ impl SendXcm for DoNothingRouter { type Ticket = (); fn validate( - _destination: &mut Option, + _destination: &mut Option, _message: &mut Option, ) -> SendResult { - Ok(((), MultiAssets::new())) + Ok(((), Assets::new())) } fn deliver(_: Self::Ticket) -> Result { @@ -162,20 +162,16 @@ impl SendXcm for DoNothingRouter { pub struct DummyAssetTransactor; impl TransactAsset for DummyAssetTransactor { - fn deposit_asset( - _what: &MultiAsset, - _who: &MultiLocation, - _context: Option<&XcmContext>, - ) -> XcmResult { + fn deposit_asset(_what: &Asset, _who: &Location, _context: Option<&XcmContext>) -> XcmResult { Ok(()) } fn withdraw_asset( - _what: &MultiAsset, - _who: &MultiLocation, + _what: &Asset, + _who: &Location, _context: Option<&XcmContext>, - ) -> Result { - Ok(Assets::default()) + ) -> Result { + Ok(AssetsInHolding::default()) } } @@ -188,10 +184,10 @@ impl WeightTrader for DummyWeightTrader { fn buy_weight( &mut self, _weight: Weight, - _payment: Assets, + _payment: AssetsInHolding, _context: &XcmContext, - ) -> Result { - Ok(Assets::default()) + ) -> Result { + Ok(AssetsInHolding::default()) } } @@ -207,40 +203,40 @@ impl WeightBounds for DummyWeigher { } } -pub struct AccountIdToMultiLocation; -impl sp_runtime::traits::Convert for AccountIdToMultiLocation { - fn convert(_account: u64) -> MultiLocation { +pub struct AccountIdToLocation; +impl sp_runtime::traits::Convert for AccountIdToLocation { + fn convert(_account: u64) -> Location { let as_h160: H160 = H160::repeat_byte(0xAA); - MultiLocation::new( + Location::new( 0, - Junctions::X1(AccountKey20 { + [AccountKey20 { network: None, key: as_h160.as_fixed_bytes().clone(), - }), + }], ) } } parameter_types! { - pub Ancestry: MultiLocation = Parachain(ParachainId::get().into()).into(); + pub Ancestry: Location = Parachain(ParachainId::get().into()).into(); pub const BaseXcmWeight: Weight = Weight::from_parts(1000u64, 1000u64); pub const RelayNetwork: NetworkId = NetworkId::Polkadot; - pub SelfLocation: MultiLocation = MultiLocation::here(); + pub SelfLocation: Location = Location::here(); - pub SelfReserve: MultiLocation = MultiLocation::new( + pub SelfReserve: Location = Location::new( 1, - Junctions::X2( + [ Parachain(ParachainId::get().into()), PalletInstance( ::PalletInfo::index::().unwrap() as u8 ) - )); + ]); pub MaxInstructions: u32 = 100; - pub UniversalLocation: InteriorMultiLocation = - Junctions::X2(GlobalConsensus(RelayNetwork::get()), Parachain(ParachainId::get().into())); + pub UniversalLocation: InteriorLocation = + [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainId::get().into())].into(); } #[derive(Encode, Decode)] @@ -285,9 +281,9 @@ impl Default for Transactors { } impl XcmTransact for Transactors { - fn destination(self) -> MultiLocation { + fn destination(self) -> Location { match self { - Transactors::Relay => MultiLocation::parent(), + Transactors::Relay => Location::parent(), } } } @@ -314,21 +310,21 @@ pub enum CurrencyId { OtherReserve(AssetId), } -pub struct CurrencyIdToMultiLocation; +pub struct CurrencyIdToLocation; -impl sp_runtime::traits::Convert> for CurrencyIdToMultiLocation { - fn convert(currency: CurrencyId) -> Option { +impl sp_runtime::traits::Convert> for CurrencyIdToLocation { + fn convert(currency: CurrencyId) -> Option { match currency { CurrencyId::SelfReserve => { - let multi: MultiLocation = SelfReserve::get(); + let multi: Location = SelfReserve::get(); Some(multi) } // To distinguish between relay and others, specially for reserve asset CurrencyId::OtherReserve(asset) => { if asset == 0 { - Some(MultiLocation::parent()) + Some(Location::parent()) } else { - Some(MultiLocation::new(1, Junctions::X1(Parachain(2)))) + Some(Location::new(1, [Parachain(2)])) } } } @@ -336,11 +332,11 @@ impl sp_runtime::traits::Convert> for Currency } #[cfg(feature = "runtime-benchmarks")] -impl From for CurrencyId { - fn from(location: MultiLocation) -> CurrencyId { +impl From for CurrencyId { + fn from(location: Location) -> CurrencyId { if location == SelfReserve::get() { CurrencyId::SelfReserve - } else if location == MultiLocation::parent() { + } else if location == Location::parent() { CurrencyId::OtherReserve(0) } else { CurrencyId::OtherReserve(1) @@ -350,9 +346,9 @@ impl From for CurrencyId { // Simulates sending a XCM message thread_local! { - pub static SENT_XCM: RefCell> = RefCell::new(Vec::new()); + pub static SENT_XCM: RefCell> = RefCell::new(Vec::new()); } -pub fn sent_xcm() -> Vec<(MultiLocation, opaque::Xcm)> { +pub fn sent_xcm() -> Vec<(Location, opaque::Xcm)> { SENT_XCM.with(|q| (*q.borrow()).clone()) } pub struct TestSendXcm; @@ -360,16 +356,16 @@ impl SendXcm for TestSendXcm { type Ticket = (); fn validate( - destination: &mut Option, + destination: &mut Option, message: &mut Option, ) -> SendResult { SENT_XCM.with(|q| { q.borrow_mut() .push((destination.clone().unwrap(), message.clone().unwrap())) }); - CustomVersionWrapper::wrap_version(&destination.unwrap(), message.clone().unwrap()) + CustomVersionWrapper::wrap_version(&destination.clone().unwrap(), message.clone().unwrap()) .map_err(|()| SendError::DestinationUnsupported)?; - Ok(((), MultiAssets::new())) + Ok(((), Assets::new())) } fn deliver(_: Self::Ticket) -> Result { @@ -378,7 +374,7 @@ impl SendXcm for TestSendXcm { } parameter_types! { - pub MaxFee: MultiAsset = (MultiLocation::parent(), 1_000_000_000_000u128).into(); + pub MaxFee: Asset = (Location::parent(), 1_000_000_000_000u128).into(); } pub type MaxHrmpRelayFee = xcm_builder::Case; @@ -390,8 +386,8 @@ impl Config for Test { type SovereignAccountDispatcherOrigin = EnsureRoot; type AssetTransactor = DummyAssetTransactor; type CurrencyId = CurrencyId; - type CurrencyIdToMultiLocation = CurrencyIdToMultiLocation; - type AccountIdToMultiLocation = AccountIdToMultiLocation; + type CurrencyIdToLocation = CurrencyIdToLocation; + type AccountIdToLocation = AccountIdToLocation; type SelfLocation = SelfLocation; type Weigher = DummyWeigher; type UniversalLocation = UniversalLocation; diff --git a/pallets/xcm-transactor/src/tests.rs b/pallets/xcm-transactor/src/tests.rs index 9224e4dab7..e94e7ea940 100644 --- a/pallets/xcm-transactor/src/tests.rs +++ b/pallets/xcm-transactor/src/tests.rs @@ -62,9 +62,9 @@ fn test_transact_through_derivative_errors() { Transactors::Relay, 1, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new( - xcm::VersionedMultiLocation::V3(MultiLocation::parent()) - )), + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() + ))), fee_amount: None }, vec![0u8], @@ -87,9 +87,9 @@ fn test_transact_through_derivative_errors() { Transactors::Relay, 1, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new( - xcm::VersionedMultiLocation::V3(MultiLocation::parent()) - )), + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() + ))), fee_amount: None }, vec![0u8], @@ -105,7 +105,7 @@ fn test_transact_through_derivative_errors() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 0.into(), 10000.into(), None @@ -118,9 +118,9 @@ fn test_transact_through_derivative_errors() { Transactors::Relay, 1, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new( - xcm::VersionedMultiLocation::V3(MultiLocation::parent()) - )), + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() + ))), fee_amount: None }, vec![0u8], @@ -136,9 +136,9 @@ fn test_transact_through_derivative_errors() { // Set fee per second assert_ok!(XcmTransactor::set_fee_per_second( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::new( + Box::new(xcm::VersionedLocation::V4(Location::new( 1, - Junctions::X1(Junction::Parachain(1000)) + [Junction::Parachain(1000)] ))), 1 )); @@ -150,12 +150,9 @@ fn test_transact_through_derivative_errors() { Transactors::Relay, 1, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new( - xcm::VersionedMultiLocation::V3(MultiLocation::new( - 1, - Junctions::X1(Junction::Parachain(1000)) - )) - )), + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::new(1, [Junction::Parachain(1000)]) + ))), fee_amount: None }, vec![0u8], @@ -171,7 +168,7 @@ fn test_transact_through_derivative_errors() { // Set fee per second assert_ok!(XcmTransactor::set_fee_per_second( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1 )); @@ -182,9 +179,9 @@ fn test_transact_through_derivative_errors() { Transactors::Relay, 1, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new( - xcm::VersionedMultiLocation::V3(MultiLocation::parent()) - )), + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() + ))), fee_amount: None }, vec![0u8], @@ -209,11 +206,11 @@ fn test_transact_through_signed_errors() { assert_noop!( XcmTransactor::transact_through_signed( RuntimeOrigin::signed(1u64), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new( - xcm::VersionedMultiLocation::V3(MultiLocation::parent()) - )), + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() + ))), fee_amount: None }, vec![0u8], @@ -229,7 +226,7 @@ fn test_transact_through_signed_errors() { // Root can set transact info without extra_signed being None assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 0.into(), 10000.into(), None @@ -239,11 +236,11 @@ fn test_transact_through_signed_errors() { assert_noop!( XcmTransactor::transact_through_signed( RuntimeOrigin::signed(1u64), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new( - xcm::VersionedMultiLocation::V3(MultiLocation::parent()) - )), + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() + ))), fee_amount: None }, vec![0u8], @@ -259,7 +256,7 @@ fn test_transact_through_signed_errors() { // Root can set transact info, with extra signed assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 0.into(), 15000.into(), Some(12000.into()) @@ -269,11 +266,11 @@ fn test_transact_through_signed_errors() { assert_noop!( XcmTransactor::transact_through_signed( RuntimeOrigin::signed(1u64), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new( - xcm::VersionedMultiLocation::V3(MultiLocation::parent()) - )), + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() + ))), fee_amount: None }, vec![0u8], @@ -289,9 +286,9 @@ fn test_transact_through_signed_errors() { // Set fee per second assert_ok!(XcmTransactor::set_fee_per_second( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::new( + Box::new(xcm::VersionedLocation::V4(Location::new( 1, - Junctions::X1(Junction::Parachain(1000)) + [Junction::Parachain(1000)] ))), 1 )); @@ -300,14 +297,11 @@ fn test_transact_through_signed_errors() { assert_noop!( XcmTransactor::transact_through_signed( RuntimeOrigin::signed(1u64), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new( - xcm::VersionedMultiLocation::V3(MultiLocation::new( - 1, - Junctions::X1(Junction::Parachain(1000)) - )) - )), + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::new(1, [Junction::Parachain(1000)]) + ))), fee_amount: None }, vec![0u8], @@ -334,7 +328,7 @@ fn test_transact_through_derivative_multilocation_success() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 0.into(), 10000.into(), None @@ -343,7 +337,7 @@ fn test_transact_through_derivative_multilocation_success() { // Set fee per second assert_ok!(XcmTransactor::set_fee_per_second( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1 )); @@ -353,8 +347,8 @@ fn test_transact_through_derivative_multilocation_success() { Transactors::Relay, 1, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), fee_amount: None }, @@ -371,7 +365,7 @@ fn test_transact_through_derivative_multilocation_success() { index: 1, }, crate::Event::TransactInfoChanged { - location: MultiLocation::parent(), + location: Location::parent(), remote_info: RemoteTransactInfoWithMaxWeight { transact_extra_weight: 0.into(), max_weight: 10000.into(), @@ -379,12 +373,12 @@ fn test_transact_through_derivative_multilocation_success() { }, }, crate::Event::DestFeePerSecondChanged { - location: MultiLocation::parent(), + location: Location::parent(), fee_per_second: 1, }, crate::Event::TransactedDerivative { account_id: 1u64, - dest: MultiLocation::parent(), + dest: Location::parent(), call: Transactors::Relay .encode_call(UtilityAvailableCalls::AsDerivative(1, vec![1u8])), index: 1, @@ -406,7 +400,7 @@ fn test_transact_through_derivative_success() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 0.into(), 10000.into(), None @@ -415,7 +409,7 @@ fn test_transact_through_derivative_success() { // Set fee per second assert_ok!(XcmTransactor::set_fee_per_second( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1 )); @@ -441,7 +435,7 @@ fn test_transact_through_derivative_success() { index: 1, }, crate::Event::TransactInfoChanged { - location: MultiLocation::parent(), + location: Location::parent(), remote_info: RemoteTransactInfoWithMaxWeight { transact_extra_weight: 0.into(), max_weight: 10000.into(), @@ -449,12 +443,12 @@ fn test_transact_through_derivative_success() { }, }, crate::Event::DestFeePerSecondChanged { - location: MultiLocation::parent(), + location: Location::parent(), fee_per_second: 1, }, crate::Event::TransactedDerivative { account_id: 1u64, - dest: MultiLocation::parent(), + dest: Location::parent(), call: Transactors::Relay .encode_call(UtilityAvailableCalls::AsDerivative(1, vec![1u8])), index: 1, @@ -469,9 +463,9 @@ fn test_transact_through_derivative_success() { RefundSurplus, DepositAsset { assets: Wild(AllCounted(1u32)), - beneficiary: MultiLocation { + beneficiary: Location { parents: 0, - interior: X1(Junction::Parachain(100)) + interior: [Junction::Parachain(100)].into() } } ])))); @@ -488,12 +482,12 @@ fn test_root_can_transact_through_sovereign() { assert_noop!( XcmTransactor::transact_through_sovereign( RuntimeOrigin::signed(1), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1u64, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new( - xcm::VersionedMultiLocation::V3(MultiLocation::parent()) - )), + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() + ))), fee_amount: None }, vec![1u8], @@ -510,7 +504,7 @@ fn test_root_can_transact_through_sovereign() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 0.into(), 10000.into(), None @@ -519,18 +513,18 @@ fn test_root_can_transact_through_sovereign() { // Set fee per second assert_ok!(XcmTransactor::set_fee_per_second( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1 )); // fee as destination are the same, this time it should work assert_ok!(XcmTransactor::transact_through_sovereign( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1u64, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), fee_amount: None }, @@ -545,7 +539,7 @@ fn test_root_can_transact_through_sovereign() { let expected = vec![ crate::Event::TransactInfoChanged { - location: MultiLocation::parent(), + location: Location::parent(), remote_info: RemoteTransactInfoWithMaxWeight { transact_extra_weight: 0.into(), max_weight: 10000.into(), @@ -553,12 +547,12 @@ fn test_root_can_transact_through_sovereign() { }, }, crate::Event::DestFeePerSecondChanged { - location: MultiLocation::parent(), + location: Location::parent(), fee_per_second: 1, }, crate::Event::TransactedSovereign { fee_payer: 1u64, - dest: MultiLocation::parent(), + dest: Location::parent(), call: vec![1u8], }, ]; @@ -634,7 +628,7 @@ fn removing_transact_info_works() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 0.into(), 10000.into(), None @@ -643,14 +637,14 @@ fn removing_transact_info_works() { // Root can remove transact info assert_ok!(XcmTransactor::remove_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), )); - assert!(XcmTransactor::transact_info(MultiLocation::parent()).is_none()); + assert!(XcmTransactor::transact_info(Location::parent()).is_none()); let expected = vec![ crate::Event::TransactInfoChanged { - location: MultiLocation::parent(), + location: Location::parent(), remote_info: RemoteTransactInfoWithMaxWeight { transact_extra_weight: 0.into(), max_weight: 10000.into(), @@ -658,7 +652,7 @@ fn removing_transact_info_works() { }, }, crate::Event::TransactInfoRemoved { - location: MultiLocation::parent(), + location: Location::parent(), }, ]; assert_eq!(events(), expected); @@ -675,7 +669,7 @@ fn test_transact_through_signed_fails_if_transact_info_not_set_at_all() { assert_noop!( XcmTransactor::transact_through_signed( RuntimeOrigin::signed(1u64), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { currency: Currency::AsCurrencyId(CurrencyId::OtherReserve(0)), fee_amount: None @@ -701,7 +695,7 @@ fn test_transact_through_signed_fails_if_weight_is_not_set() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 0.into(), 10000.into(), None @@ -711,7 +705,7 @@ fn test_transact_through_signed_fails_if_weight_is_not_set() { assert_noop!( XcmTransactor::transact_through_signed( RuntimeOrigin::signed(1u64), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { currency: Currency::AsCurrencyId(CurrencyId::OtherReserve(0)), fee_amount: None @@ -737,7 +731,7 @@ fn test_transact_through_signed_fails_if_weight_overflows() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 0.into(), 10000.into(), Some(Weight::MAX) @@ -747,7 +741,7 @@ fn test_transact_through_signed_fails_if_weight_overflows() { assert_noop!( XcmTransactor::transact_through_signed( RuntimeOrigin::signed(1u64), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { currency: Currency::AsCurrencyId(CurrencyId::OtherReserve(0)), fee_amount: None @@ -773,7 +767,7 @@ fn test_transact_through_signed_fails_if_weight_is_bigger_than_max_weight() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 0.into(), 10000.into(), Some(1.into()) @@ -783,7 +777,7 @@ fn test_transact_through_signed_fails_if_weight_is_bigger_than_max_weight() { assert_noop!( XcmTransactor::transact_through_signed( RuntimeOrigin::signed(1u64), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { currency: Currency::AsCurrencyId(CurrencyId::OtherReserve(0)), fee_amount: None @@ -809,7 +803,7 @@ fn test_transact_through_signed_fails_if_fee_per_second_not_set() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 0.into(), 10000.into(), Some(1.into()) @@ -819,7 +813,7 @@ fn test_transact_through_signed_fails_if_fee_per_second_not_set() { assert_noop!( XcmTransactor::transact_through_signed( RuntimeOrigin::signed(1u64), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { currency: Currency::AsCurrencyId(CurrencyId::OtherReserve(0)), fee_amount: None @@ -845,7 +839,7 @@ fn test_transact_through_signed_works() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 0.into(), 10000.into(), Some(1.into()) @@ -854,7 +848,7 @@ fn test_transact_through_signed_works() { // Set fee per second assert_ok!(XcmTransactor::set_fee_per_second( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1 )); @@ -862,7 +856,7 @@ fn test_transact_through_signed_works() { // this time it should work assert_ok!(XcmTransactor::transact_through_signed( RuntimeOrigin::signed(1u64), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { currency: Currency::AsCurrencyId(CurrencyId::OtherReserve(0)), fee_amount: None @@ -877,7 +871,7 @@ fn test_transact_through_signed_works() { let expected = vec![ crate::Event::TransactInfoChanged { - location: MultiLocation::parent(), + location: Location::parent(), remote_info: RemoteTransactInfoWithMaxWeight { transact_extra_weight: 0.into(), max_weight: 10000.into(), @@ -885,12 +879,12 @@ fn test_transact_through_signed_works() { }, }, crate::Event::DestFeePerSecondChanged { - location: MultiLocation::parent(), + location: Location::parent(), fee_per_second: 1, }, crate::Event::TransactedSigned { fee_payer: 1u64, - dest: MultiLocation::parent(), + dest: Location::parent(), call: vec![1u8], }, ]; @@ -938,7 +932,7 @@ fn test_send_through_derivative_with_custom_weight_and_fee() { }, crate::Event::TransactedDerivative { account_id: 1u64, - dest: MultiLocation::parent(), + dest: Location::parent(), call: Transactors::Relay .encode_call(UtilityAvailableCalls::AsDerivative(1, vec![1u8])), index: 1, @@ -950,9 +944,9 @@ fn test_send_through_derivative_with_custom_weight_and_fee() { // Lets make sure the message is as expected assert!(sent_message .0 - .contains(&WithdrawAsset((MultiLocation::here(), total_fee).into()))); + .contains(&WithdrawAsset((Location::here(), total_fee).into()))); assert!(sent_message.0.contains(&BuyExecution { - fees: (MultiLocation::here(), total_fee).into(), + fees: (Location::here(), total_fee).into(), weight_limit: Limited(total_weight), })); assert!(sent_message.0.contains(&Transact { @@ -987,11 +981,11 @@ fn test_send_through_sovereign_with_custom_weight_and_fee() { // fee as destination are the same, this time it should work assert_ok!(XcmTransactor::transact_through_sovereign( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1u64, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), fee_amount: Some(total_fee) }, @@ -1011,7 +1005,7 @@ fn test_send_through_sovereign_with_custom_weight_and_fee() { }, crate::Event::TransactedSovereign { fee_payer: 1u64, - dest: MultiLocation::parent(), + dest: Location::parent(), call: vec![1u8], }, ]; @@ -1021,9 +1015,9 @@ fn test_send_through_sovereign_with_custom_weight_and_fee() { // Lets make sure the message is as expected assert!(sent_message .0 - .contains(&WithdrawAsset((MultiLocation::here(), total_fee).into()))); + .contains(&WithdrawAsset((Location::here(), total_fee).into()))); assert!(sent_message.0.contains(&BuyExecution { - fees: (MultiLocation::here(), total_fee).into(), + fees: (Location::here(), total_fee).into(), weight_limit: Limited(total_weight), })); assert!(sent_message.0.contains(&Transact { @@ -1053,10 +1047,10 @@ fn test_send_through_signed_with_custom_weight_and_fee() { // fee as destination are the same, this time it should work assert_ok!(XcmTransactor::transact_through_signed( RuntimeOrigin::signed(1u64), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), fee_amount: Some(total_fee) }, @@ -1070,7 +1064,7 @@ fn test_send_through_signed_with_custom_weight_and_fee() { let expected = vec![crate::Event::TransactedSigned { fee_payer: 1u64, - dest: MultiLocation::parent(), + dest: Location::parent(), call: vec![1u8], }]; assert_eq!(events(), expected); @@ -1079,9 +1073,9 @@ fn test_send_through_signed_with_custom_weight_and_fee() { // Lets make sure the message is as expected assert!(sent_message .0 - .contains(&WithdrawAsset((MultiLocation::here(), total_fee).into()))); + .contains(&WithdrawAsset((Location::here(), total_fee).into()))); assert!(sent_message.0.contains(&BuyExecution { - fees: (MultiLocation::here(), total_fee).into(), + fees: (Location::here(), total_fee).into(), weight_limit: Limited(total_weight), })); assert!(sent_message.0.contains(&Transact { @@ -1112,8 +1106,8 @@ fn test_hrmp_manipulator_init() { proposed_max_message_size: 1 }), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), fee_amount: Some(total_fee) }, @@ -1128,9 +1122,9 @@ fn test_hrmp_manipulator_init() { // Lets make sure the message is as expected assert!(sent_message .0 - .contains(&WithdrawAsset((MultiLocation::here(), total_fee).into()))); + .contains(&WithdrawAsset((Location::here(), total_fee).into()))); assert!(sent_message.0.contains(&BuyExecution { - fees: (MultiLocation::here(), total_fee).into(), + fees: (Location::here(), total_fee).into(), weight_limit: Limited(total_weight), })); assert!(sent_message.0.contains(&Transact { @@ -1164,8 +1158,8 @@ fn test_hrmp_manipulator_init_v2_convert_works() { proposed_max_message_size: 1 }), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), fee_amount: Some(total_fee) }, @@ -1180,9 +1174,9 @@ fn test_hrmp_manipulator_init_v2_convert_works() { // Lets make sure the message is as expected assert!(sent_message .0 - .contains(&WithdrawAsset((MultiLocation::here(), total_fee).into()))); + .contains(&WithdrawAsset((Location::here(), total_fee).into()))); assert!(sent_message.0.contains(&BuyExecution { - fees: (MultiLocation::here(), total_fee).into(), + fees: (Location::here(), total_fee).into(), weight_limit: Limited(total_weight), })); assert!(sent_message.0.contains(&Transact { @@ -1196,9 +1190,9 @@ fn test_hrmp_manipulator_init_v2_convert_works() { RefundSurplus, DepositAsset { assets: Wild(AllCounted(1)), - beneficiary: MultiLocation { + beneficiary: Location { parents: 0, - interior: X1(Junction::Parachain(100)) + interior: [Junction::Parachain(100)].into() } } ])))); @@ -1228,8 +1222,8 @@ fn test_hrmp_manipulator_init_v3_convert_works() { proposed_max_message_size: 1 }), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), fee_amount: Some(total_fee) }, @@ -1244,9 +1238,9 @@ fn test_hrmp_manipulator_init_v3_convert_works() { // Lets make sure the message is as expected assert!(sent_message .0 - .contains(&WithdrawAsset((MultiLocation::here(), total_fee).into()))); + .contains(&WithdrawAsset((Location::here(), total_fee).into()))); assert!(sent_message.0.contains(&BuyExecution { - fees: (MultiLocation::here(), total_fee).into(), + fees: (Location::here(), total_fee).into(), weight_limit: Limited(total_weight), })); assert!(sent_message.0.contains(&Transact { @@ -1260,9 +1254,9 @@ fn test_hrmp_manipulator_init_v3_convert_works() { RefundSurplus, DepositAsset { assets: Wild(AllCounted(1)), - beneficiary: MultiLocation { + beneficiary: Location { parents: 0, - interior: X1(Junction::Parachain(100)) + interior: [Junction::Parachain(100)].into() } } ])))); @@ -1293,9 +1287,9 @@ fn test_hrmp_manipulator_init_v4_convert_fails() { proposed_max_message_size: 1 }), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new( - xcm::VersionedMultiLocation::V3(MultiLocation::parent()) - )), + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() + ))), fee_amount: Some(total_fee) }, TransactWeights { @@ -1327,9 +1321,9 @@ fn test_hrmp_max_fee_errors() { proposed_max_message_size: 1 }), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new( - xcm::VersionedMultiLocation::V3(MultiLocation::parent()) - )), + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() + ))), fee_amount: Some(total_fee) }, TransactWeights { @@ -1360,8 +1354,8 @@ fn test_hrmp_manipulator_accept() { para_id: 1u32.into() }, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), fee_amount: Some(total_fee) }, @@ -1376,9 +1370,9 @@ fn test_hrmp_manipulator_accept() { // Lets make sure the message is as expected assert!(sent_message .0 - .contains(&WithdrawAsset((MultiLocation::here(), total_fee).into()))); + .contains(&WithdrawAsset((Location::here(), total_fee).into()))); assert!(sent_message.0.contains(&BuyExecution { - fees: (MultiLocation::here(), total_fee).into(), + fees: (Location::here(), total_fee).into(), weight_limit: Limited(total_weight), })); assert!(sent_message.0.contains(&Transact { @@ -1413,8 +1407,8 @@ fn test_hrmp_manipulator_cancel() { open_requests }, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), fee_amount: Some(total_fee) }, @@ -1429,9 +1423,9 @@ fn test_hrmp_manipulator_cancel() { // Lets make sure the message is as expected assert!(sent_message .0 - .contains(&WithdrawAsset((MultiLocation::here(), total_fee).into()))); + .contains(&WithdrawAsset((Location::here(), total_fee).into()))); assert!(sent_message.0.contains(&BuyExecution { - fees: (MultiLocation::here(), total_fee).into(), + fees: (Location::here(), total_fee).into(), weight_limit: Limited(total_weight), })); assert!(sent_message.0.contains(&Transact { @@ -1461,8 +1455,8 @@ fn test_hrmp_manipulator_close() { recipient: 1u32.into() }), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), fee_amount: Some(total_fee) }, @@ -1477,9 +1471,9 @@ fn test_hrmp_manipulator_close() { // Lets make sure the message is as expected assert!(sent_message .0 - .contains(&WithdrawAsset((MultiLocation::here(), total_fee).into()))); + .contains(&WithdrawAsset((Location::here(), total_fee).into()))); assert!(sent_message.0.contains(&BuyExecution { - fees: (MultiLocation::here(), total_fee).into(), + fees: (Location::here(), total_fee).into(), weight_limit: Limited(total_weight), })); assert!(sent_message.0.contains(&Transact { @@ -1502,7 +1496,7 @@ fn test_transact_through_derivative_with_refund_works() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 0.into(), 10000.into(), None @@ -1511,7 +1505,7 @@ fn test_transact_through_derivative_with_refund_works() { // Set fee per second assert_ok!(XcmTransactor::set_fee_per_second( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1 )); @@ -1537,7 +1531,7 @@ fn test_transact_through_derivative_with_refund_works() { index: 1, }, crate::Event::TransactInfoChanged { - location: MultiLocation::parent(), + location: Location::parent(), remote_info: RemoteTransactInfoWithMaxWeight { transact_extra_weight: 0.into(), max_weight: 10000.into(), @@ -1545,12 +1539,12 @@ fn test_transact_through_derivative_with_refund_works() { }, }, crate::Event::DestFeePerSecondChanged { - location: MultiLocation::parent(), + location: Location::parent(), fee_per_second: 1, }, crate::Event::TransactedDerivative { account_id: 1u64, - dest: MultiLocation::parent(), + dest: Location::parent(), call: Transactors::Relay .encode_call(UtilityAvailableCalls::AsDerivative(1, vec![1u8])), index: 1, @@ -1565,9 +1559,9 @@ fn test_transact_through_derivative_with_refund_works() { RefundSurplus, DepositAsset { assets: Wild(AllCounted(1u32)), - beneficiary: MultiLocation { + beneficiary: Location { parents: 0, - interior: X1(Junction::Parachain(100)) + interior: [Junction::Parachain(100)].into() } } ])))); @@ -1586,7 +1580,7 @@ fn test_transact_through_derivative_with_refund_fails_overall_weight_not_set() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 0.into(), 10000.into(), None @@ -1595,7 +1589,7 @@ fn test_transact_through_derivative_with_refund_fails_overall_weight_not_set() { // Set fee per second assert_ok!(XcmTransactor::set_fee_per_second( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1 )); @@ -1630,7 +1624,7 @@ fn test_transact_through_signed_with_refund_works() { // Set fee per second assert_ok!(XcmTransactor::set_fee_per_second( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1 )); @@ -1638,7 +1632,7 @@ fn test_transact_through_signed_with_refund_works() { let total_weight: Weight = 10_100u64.into(); assert_ok!(XcmTransactor::transact_through_signed( RuntimeOrigin::signed(1u64), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { currency: Currency::AsCurrencyId(CurrencyId::OtherReserve(0)), fee_amount: None @@ -1653,12 +1647,12 @@ fn test_transact_through_signed_with_refund_works() { let expected = vec![ crate::Event::DestFeePerSecondChanged { - location: MultiLocation::parent(), + location: Location::parent(), fee_per_second: 1, }, crate::Event::TransactedSigned { fee_payer: 1u64, - dest: MultiLocation::parent(), + dest: Location::parent(), call: vec![1u8], }, ]; @@ -1671,15 +1665,16 @@ fn test_transact_through_signed_with_refund_works() { RefundSurplus, DepositAsset { assets: Wild(AllCounted(1u32)), - beneficiary: MultiLocation { + beneficiary: Location { parents: 0, - interior: X2( + interior: [ Junction::Parachain(100), - AccountIdToMultiLocation::convert(1) + AccountIdToLocation::convert(1) .interior .take_first() .unwrap() - ) + ] + .into() } } ])))); diff --git a/precompiles/assets-erc20/src/mock.rs b/precompiles/assets-erc20/src/mock.rs index 57ea8659eb..cc6f459521 100644 --- a/precompiles/assets-erc20/src/mock.rs +++ b/precompiles/assets-erc20/src/mock.rs @@ -85,6 +85,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -134,7 +135,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/precompiles/author-mapping/src/mock.rs b/precompiles/author-mapping/src/mock.rs index 44ea0abca3..5cf6d14a7b 100644 --- a/precompiles/author-mapping/src/mock.rs +++ b/precompiles/author-mapping/src/mock.rs @@ -56,6 +56,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -92,7 +93,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/precompiles/balances-erc20/src/mock.rs b/precompiles/balances-erc20/src/mock.rs index 447aa76a65..866563bf14 100644 --- a/precompiles/balances-erc20/src/mock.rs +++ b/precompiles/balances-erc20/src/mock.rs @@ -40,6 +40,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -89,7 +90,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/precompiles/batch/src/mock.rs b/precompiles/batch/src/mock.rs index 37fcb1f0e9..6f22ed5e81 100644 --- a/precompiles/batch/src/mock.rs +++ b/precompiles/batch/src/mock.rs @@ -54,6 +54,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -90,7 +91,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/precompiles/call-permit/src/mock.rs b/precompiles/call-permit/src/mock.rs index fa52607944..82a6df48b5 100644 --- a/precompiles/call-permit/src/mock.rs +++ b/precompiles/call-permit/src/mock.rs @@ -54,6 +54,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -90,7 +91,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/precompiles/collective/src/mock.rs b/precompiles/collective/src/mock.rs index e240c0d533..2510220457 100644 --- a/precompiles/collective/src/mock.rs +++ b/precompiles/collective/src/mock.rs @@ -65,6 +65,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -103,7 +104,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/precompiles/conviction-voting/src/mock.rs b/precompiles/conviction-voting/src/mock.rs index 411a99f3ee..56bd64ee08 100644 --- a/precompiles/conviction-voting/src/mock.rs +++ b/precompiles/conviction-voting/src/mock.rs @@ -61,6 +61,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -97,7 +98,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/precompiles/crowdloan-rewards/Cargo.toml b/precompiles/crowdloan-rewards/Cargo.toml index 0dbc39a4bb..9b691e0d78 100644 --- a/precompiles/crowdloan-rewards/Cargo.toml +++ b/precompiles/crowdloan-rewards/Cargo.toml @@ -23,7 +23,7 @@ sp-runtime = { workspace = true } # Frontier fp-evm = { workspace = true } -pallet-evm = { workspace = true, features = [ "forbid-evm-reentrancy" ] } +pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] } [dev-dependencies] derive_more = { workspace = true } @@ -31,25 +31,26 @@ serde = { workspace = true } sha3 = { workspace = true } # Moonbeam -precompile-utils = { workspace = true, features = [ "std", "testing" ] } +precompile-utils = { workspace = true, features = ["std", "testing"] } # Substrate -pallet-balances = { workspace = true, features = [ "std" ] } -pallet-scheduler = { workspace = true, features = [ "std" ] } -pallet-timestamp = { workspace = true, features = [ "std" ] } -parity-scale-codec = { workspace = true, features = [ "max-encoded-len", "std" ] } -scale-info = { workspace = true, features = [ "derive", "std" ] } +pallet-balances = { workspace = true, features = ["std"] } +pallet-scheduler = { workspace = true, features = ["std"] } +pallet-timestamp = { workspace = true, features = ["std"] } +parity-scale-codec = { workspace = true, features = ["max-encoded-len", "std"] } +scale-info = { workspace = true, features = ["derive", "std"] } sp-io = { workspace = true } -sp-runtime = { workspace = true, features = [ "std" ] } +sp-runtime = { workspace = true, features = ["std"] } +pallet-message-queue = { workspace = true, features = ["std"] } # Cumulus -cumulus-pallet-parachain-system = { workspace = true, features = [ "std" ] } -cumulus-primitives-core = { workspace = true, features = [ "std" ] } -cumulus-primitives-parachain-inherent = { workspace = true, features = [ "std" ] } -cumulus-test-relay-sproof-builder = { workspace = true, features = [ "std" ] } +cumulus-pallet-parachain-system = { workspace = true, features = ["std"] } +cumulus-primitives-core = { workspace = true, features = ["std"] } +cumulus-primitives-parachain-inherent = { workspace = true, features = ["std"] } +cumulus-test-relay-sproof-builder = { workspace = true, features = ["std"] } [features] -default = [ "std" ] +default = ["std"] std = [ "cumulus-pallet-parachain-system/std", "cumulus-primitives-core/std", diff --git a/precompiles/crowdloan-rewards/src/mock.rs b/precompiles/crowdloan-rewards/src/mock.rs index 72eae184be..197c959558 100644 --- a/precompiles/crowdloan-rewards/src/mock.rs +++ b/precompiles/crowdloan-rewards/src/mock.rs @@ -17,7 +17,8 @@ //! Test utilities use super::*; use cumulus_primitives_core::{ - relay_chain::BlockNumber as RelayChainBlockNumber, PersistedValidationData, + relay_chain::BlockNumber as RelayChainBlockNumber, AggregateMessageOrigin, + PersistedValidationData, }; use cumulus_primitives_parachain_inherent::ParachainInherentData; use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder; @@ -53,11 +54,13 @@ construct_runtime!( Timestamp: pallet_timestamp, ParachainSystem: cumulus_pallet_parachain_system, Crowdloan: pallet_crowdloan_rewards, + MessageQueue: pallet_message_queue, } ); parameter_types! { pub ParachainId: cumulus_primitives_core::ParaId = 100.into(); + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; } impl cumulus_pallet_parachain_system::Config for Runtime { @@ -67,10 +70,30 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type OutboundXcmpMessageSource = (); type XcmpMessageHandler = (); type ReservedXcmpWeight = (); - type DmpMessageHandler = (); + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type ReservedDmpWeight = (); type CheckAssociatedRelayNumber = cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; type ConsensusHook = cumulus_pallet_parachain_system::ExpectParentIncluded; + type WeightInfo = cumulus_pallet_parachain_system::weights::SubstrateWeight; +} + +parameter_types! { + pub MessageQueueServiceWeight: Weight = Weight::from_parts(1_000_000_000, 1_000_000); + pub const MessageQueueHeapSize: u32 = 65_536; + pub const MessageQueueMaxStale: u32 = 16; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Size = u32; + type HeapSize = MessageQueueHeapSize; + type MaxStale = MessageQueueMaxStale; + type ServiceWeight = MessageQueueServiceWeight; + type MessageProcessor = + pallet_message_queue::mock_helpers::NoopMessageProcessor; + type QueueChangeHandler = (); + type WeightInfo = (); + type QueuePausedQuery = (); } parameter_types! { @@ -81,6 +104,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -117,7 +141,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/precompiles/gmp/src/mock.rs b/precompiles/gmp/src/mock.rs index e4093c6e89..37897dbf9f 100644 --- a/precompiles/gmp/src/mock.rs +++ b/precompiles/gmp/src/mock.rs @@ -35,7 +35,7 @@ use xcm::latest::{prelude::*, Error as XcmError}; use xcm_builder::{AllowUnpaidExecutionFrom, FixedWeightBounds}; use xcm_executor::{ traits::{TransactAsset, WeightTrader}, - Assets, XcmExecutor, + AssetsInHolding, XcmExecutor, }; use xcm_primitives::XcmV2Weight; @@ -60,7 +60,7 @@ mock_account!(SelfReserveAccount, |_| MockAccount::from_u64(2)); parameter_types! { pub ParachainId: cumulus_primitives_core::ParaId = 100.into(); - pub UniversalLocation: InteriorMultiLocation = RelayNetwork::get().into(); + pub UniversalLocation: InteriorLocation = RelayNetwork::get().into(); } parameter_types! { @@ -75,6 +75,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -111,14 +112,13 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } #[cfg(feature = "runtime-benchmarks")] parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); + pub ReachableDest: Option = Some(Parent.into()); } pub struct DoNothingRouter; @@ -126,10 +126,10 @@ impl SendXcm for DoNothingRouter { type Ticket = (); fn validate( - _destination: &mut Option, + _destination: &mut Option, _message: &mut Option>, ) -> SendResult { - Ok(((), MultiAssets::new())) + Ok(((), Assets::new())) } fn deliver(_: Self::Ticket) -> Result { @@ -195,6 +195,8 @@ impl xcm_executor::Config for XcmConfig { type UniversalAliases = Nothing; type SafeCallFilter = Everything; type Aliasers = Nothing; + + type TransactionalProcessor = (); } pub type Precompiles = PrecompileSetBuilder< @@ -209,20 +211,16 @@ pub type Barrier = AllowUnpaidExecutionFrom; pub struct DummyAssetTransactor; impl TransactAsset for DummyAssetTransactor { - fn deposit_asset( - _what: &MultiAsset, - _who: &MultiLocation, - _context: Option<&XcmContext>, - ) -> XcmResult { + fn deposit_asset(_what: &Asset, _who: &Location, _context: Option<&XcmContext>) -> XcmResult { Ok(()) } fn withdraw_asset( - _what: &MultiAsset, - _who: &MultiLocation, + _what: &Asset, + _who: &Location, _maybe_context: Option<&XcmContext>, - ) -> Result { - Ok(Assets::default()) + ) -> Result { + Ok(AssetsInHolding::default()) } } @@ -235,10 +233,10 @@ impl WeightTrader for DummyWeightTrader { fn buy_weight( &mut self, _weight: Weight, - _payment: Assets, + _payment: AssetsInHolding, _context: &XcmContext, - ) -> Result { - Ok(Assets::default()) + ) -> Result { + Ok(AssetsInHolding::default()) } } @@ -302,10 +300,10 @@ impl pallet_timestamp::Config for Runtime { pub struct ConvertOriginToLocal; impl EnsureOrigin for ConvertOriginToLocal { - type Success = MultiLocation; + type Success = Location; - fn try_origin(_: Origin) -> Result { - Ok(MultiLocation::here()) + fn try_origin(_: Origin) -> Result { + Ok(Location::here()) } #[cfg(feature = "runtime-benchmarks")] @@ -333,65 +331,62 @@ impl AccountIdToCurrencyId for Runtime { } } -pub struct AccountIdToMultiLocation; -impl sp_runtime::traits::Convert for AccountIdToMultiLocation { - fn convert(account: AccountId) -> MultiLocation { +pub struct AccountIdToLocation; +impl sp_runtime::traits::Convert for AccountIdToLocation { + fn convert(account: AccountId) -> Location { let as_h160: H160 = account.into(); - MultiLocation::new( + Location::new( 1, - Junctions::X1(AccountKey20 { + [AccountKey20 { network: None, key: as_h160.as_fixed_bytes().clone(), - }), + }], ) } } parameter_types! { - pub Ancestry: MultiLocation = Parachain(ParachainId::get().into()).into(); + pub Ancestry: Location = Parachain(ParachainId::get().into()).into(); pub const BaseXcmWeight: XcmV2Weight = 1000; pub const RelayNetwork: NetworkId = NetworkId::Polkadot; pub const MaxAssetsForTransfer: usize = 2; - pub SelfLocation: MultiLocation = - MultiLocation::new(1, Junctions::X1(Parachain(ParachainId::get().into()))); + pub SelfLocation: Location = + Location::new(1, [Parachain(ParachainId::get().into())]); - pub SelfReserve: MultiLocation = MultiLocation::new( + pub SelfReserve: Location = Location::new( 1, - Junctions::X2( + [ Parachain(ParachainId::get().into()), PalletInstance( ::PalletInfo::index::().unwrap() as u8 ) - )); + ]); pub MaxInstructions: u32 = 100; } parameter_type_with_key! { - pub ParachainMinFee: |_location: MultiLocation| -> Option { + pub ParachainMinFee: |_location: Location| -> Option { Some(u128::MAX) }; } pub struct CurrencyIdToMultiLocation; -impl sp_runtime::traits::Convert> for CurrencyIdToMultiLocation { - fn convert(currency: CurrencyId) -> Option { +impl sp_runtime::traits::Convert> for CurrencyIdToMultiLocation { + fn convert(currency: CurrencyId) -> Option { match currency { CurrencyId::SelfReserve => { - let multi: MultiLocation = SelfReserve::get(); + let multi: Location = SelfReserve::get(); Some(multi) } // To distinguish between relay and others, specially for reserve asset CurrencyId::OtherReserve(asset) => { if asset == 0 { - Some(MultiLocation::parent()) + Some(Location::parent()) } else { - Some(MultiLocation::new( - 1, - Junctions::X2(Parachain(2), GeneralIndex(asset)), - )) + Some(Location::new(1, [Parachain(2), GeneralIndex(asset)])) } } } @@ -402,7 +397,7 @@ impl orml_xtokens::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = AccountIdToMultiLocation; + type AccountIdToLocation = AccountIdToLocation; type CurrencyIdConvert = CurrencyIdToMultiLocation; type XcmExecutor = XcmExecutor; type SelfLocation = SelfLocation; @@ -410,7 +405,7 @@ impl orml_xtokens::Config for Runtime { type BaseXcmWeight = BaseXcmWeight; type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; - type MultiLocationsFilter = Everything; + type LocationsFilter = Everything; type ReserveProvider = AbsoluteReserveProvider; type UniversalLocation = UniversalLocation; } diff --git a/precompiles/gmp/src/types.rs b/precompiles/gmp/src/types.rs index 90e5318b5e..835c4adacd 100644 --- a/precompiles/gmp/src/types.rs +++ b/precompiles/gmp/src/types.rs @@ -20,21 +20,21 @@ use parity_scale_codec::{Decode, Encode}; use precompile_utils::prelude::*; use sp_core::{H256, U256}; use sp_std::vec::Vec; -use xcm::VersionedMultiLocation; +use xcm::VersionedLocation; // A user action which will attempt to route the transferred assets to the account/chain specified -// by the given MultiLocation. Recall that a MultiLocation can contain both a chain and an account +// by the given Location. Recall that a Location can contain both a chain and an account // on that chain, as this one should. #[derive(Encode, Decode, Debug)] pub struct XcmRoutingUserAction { - pub destination: VersionedMultiLocation, + pub destination: VersionedLocation, } // A user action which is the same as XcmRoutingUserAction but also allows a fee to be paid. The // fee is paid in the same asset being transferred, and must be <= the amount being sent. #[derive(Encode, Decode, Debug)] pub struct XcmRoutingUserActionWithFee { - pub destination: VersionedMultiLocation, + pub destination: VersionedLocation, pub fee: U256, } diff --git a/precompiles/identity/src/lib.rs b/precompiles/identity/src/lib.rs index 740cc5fd3b..b9dd7889a8 100644 --- a/precompiles/identity/src/lib.rs +++ b/precompiles/identity/src/lib.rs @@ -26,7 +26,7 @@ use frame_support::dispatch::{GetDispatchInfo, PostDispatchInfo}; use frame_support::sp_runtime::traits::StaticLookup; use frame_support::traits::Currency; use pallet_evm::AddressMapping; -use pallet_identity::simple::IdentityField; +use pallet_identity::legacy::IdentityField; use parity_scale_codec::MaxEncodedLen; use precompile_utils::prelude::*; use sp_core::{ConstU32, Get, H160, H256, U256}; @@ -45,8 +45,7 @@ type BalanceOf = <::Currency as Currency< >>::Balance; type IdentityFieldOf = <::IdentityInformation - as pallet_identity::IdentityInformationProvider>::IdentityField; -type MaxAdditionalFieldsOf = ::MaxAdditionalFields; + as pallet_identity::IdentityInformationProvider>::FieldsIdentifier; /// Solidity selector of the Vote log, which is the Keccak of the Log signature. pub(crate) const SELECTOR_LOG_IDENTITY_SET: [u8; 32] = keccak256!("IdentitySet(address)"); @@ -65,24 +64,23 @@ pub(crate) const SELECTOR_LOG_SUB_IDENTITY_REVOKED: [u8; 32] = keccak256!("SubIdentityRevoked(address)"); /// A precompile to wrap the functionality from pallet-identity -pub struct IdentityPrecompile(PhantomData); +pub struct IdentityPrecompile( + PhantomData<(Runtime, MaxAdditionalFields)>, +); #[precompile_utils::precompile] -#[precompile::test_concrete_types(mock::Runtime)] -impl IdentityPrecompile +#[precompile::test_concrete_types(mock::Runtime, ConstU32<2>)] +impl IdentityPrecompile where - Runtime: pallet_evm::Config - + pallet_identity::Config< - IdentityInformation = pallet_identity::simple::IdentityInfo< - MaxAdditionalFieldsOf, - >, - >, + Runtime: pallet_evm::Config + pallet_identity::Config, + ::FieldsIdentifier: From, Runtime::AccountId: Into, Runtime::Hash: From, Runtime::RuntimeCall: Dispatchable + GetDispatchInfo, ::RuntimeOrigin: From>, Runtime::RuntimeCall: From>, BalanceOf: TryFrom + Into + solidity::Codec, + MaxAdditionalFields: Get { // Note: addRegistrar(address) & killIdentity(address) are not supported since they use a // force origin. @@ -91,7 +89,7 @@ where #[precompile::public("setIdentity((((bool,bytes),(bool,bytes))[],(bool,bytes),(bool,bytes),(bool,bytes),(bool,bytes),(bool,bytes),bool,bytes,(bool,bytes),(bool,bytes)))")] fn set_identity( handle: &mut impl PrecompileHandle, - info: IdentityInfo, + info: IdentityInfo ) -> EvmResult { // editorconfig-checker-enable let caller = handle.context().caller; @@ -371,7 +369,7 @@ where fn identity( handle: &mut impl PrecompileHandle, who: Address, - ) -> EvmResult> { + ) -> EvmResult> { // Storage item: IdentityOf -> // Registration, T::MaxRegistrars, T::MaxAdditionalFields> handle.record_db_read::(pallet_identity::Registration::< @@ -485,10 +483,7 @@ where fn identity_fields_to_input( fields: IdentityFields, - ) -> Result< - pallet_identity::IdentityFields>, - enumflags2::FromBitsError>, - > { + ) -> IdentityFieldOf { let mut field_bits = 0u64; if fields.display { field_bits = field_bits | IdentityField::Display as u64; @@ -515,18 +510,16 @@ where field_bits = field_bits | IdentityField::Twitter as u64; } - let bit_flags = BitFlags::>::from_bits(field_bits)?; - - Ok(pallet_identity::IdentityFields(bit_flags)) + IdentityFieldOf::::from(field_bits) } fn identity_to_input( - info: IdentityInfo, - ) -> MayRevert>> { + info: IdentityInfo, + ) -> MayRevert>> { // let additional: Vec<(pallet_identity::Data, pallet_identity::Data)> = info.additional.into(); let mut additional: sp_runtime::BoundedVec< (pallet_identity::Data, pallet_identity::Data), - Runtime::MaxAdditionalFields, + MaxAdditionalFields, > = Default::default(); let iter: Vec<_> = info.additional.into(); for (i, (k, v)) in iter.into_iter().enumerate() { @@ -550,7 +543,7 @@ where } else { None }; - let identity_info = pallet_identity::simple::IdentityInfo:: { + let identity_info = pallet_identity::legacy::IdentityInfo:: { additional, display: info .display @@ -594,7 +587,7 @@ where Runtime::IdentityInformation, >, >, - ) -> MayRevert> { + ) -> MayRevert> { if registration.is_none() { return Ok(Registration::::default()); } @@ -814,14 +807,14 @@ pub struct Judgement { } #[derive(Eq, PartialEq, Debug, solidity::Codec)] -pub struct Registration { +pub struct Registration { is_valid: bool, judgements: Vec<(u32, Judgement)>, deposit: U256, - info: IdentityInfo, + info: T::IdentityInformation, } -impl Default for Registration { +impl Default for Registration { fn default() -> Self { Self { is_valid: false, diff --git a/precompiles/identity/src/mock.rs b/precompiles/identity/src/mock.rs index e1f84193f8..3316d95a84 100644 --- a/precompiles/identity/src/mock.rs +++ b/precompiles/identity/src/mock.rs @@ -23,7 +23,7 @@ use frame_support::{ }; use frame_system::{EnsureRoot, EnsureSignedBy}; use pallet_evm::{EnsureAddressNever, EnsureAddressRoot}; -use pallet_identity::simple::IdentityInfo; +use pallet_identity::legacy::IdentityInfo; use precompile_utils::mock_account; use precompile_utils::{precompile_set::*, testing::MockAccount}; use sp_core::{H256, U256}; diff --git a/precompiles/identity/src/tests.rs b/precompiles/identity/src/tests.rs index 7139da182b..7f830ce0bf 100644 --- a/precompiles/identity/src/tests.rs +++ b/precompiles/identity/src/tests.rs @@ -307,7 +307,7 @@ fn test_set_identity_works() { Some(pallet_identity::Registration:: { judgements: Default::default(), deposit: BasicDeposit::get() as u128 + FieldDeposit::get() as u128 * 2, - info: pallet_identity::simple::IdentityInfo:: { + info: pallet_identity::legacy::IdentityInfo:: { additional: vec![ ( pallet_identity::Data::Raw( @@ -414,7 +414,7 @@ fn test_set_identity_works_for_already_set_identity() { Some(pallet_identity::Registration:: { judgements: Default::default(), deposit: BasicDeposit::get() as u128, - info: pallet_identity::simple::IdentityInfo:: { + info: pallet_identity::legacy::IdentityInfo:: { additional: Default::default(), display: pallet_identity::Data::Raw( vec![0x01].try_into().expect("succeeds") @@ -452,7 +452,7 @@ fn test_set_identity_works_for_already_set_identity() { Some(pallet_identity::Registration:: { judgements: Default::default(), deposit: BasicDeposit::get() as u128, - info: pallet_identity::simple::IdentityInfo:: { + info: pallet_identity::legacy::IdentityInfo:: { additional: Default::default(), display: pallet_identity::Data::Raw( vec![0xff].try_into().expect("succeeds") @@ -496,7 +496,7 @@ fn test_set_subs_works_if_identity_set() { Some(pallet_identity::Registration:: { judgements: Default::default(), deposit: BasicDeposit::get() as u128, - info: pallet_identity::simple::IdentityInfo:: { + info: pallet_identity::legacy::IdentityInfo:: { additional: Default::default(), display: pallet_identity::Data::Raw( vec![0x01].try_into().expect("succeeds") @@ -615,7 +615,7 @@ fn test_clear_identity_works_if_identity_set() { Some(pallet_identity::Registration:: { judgements: Default::default(), deposit: BasicDeposit::get() as u128, - info: pallet_identity::simple::IdentityInfo:: { + info: pallet_identity::legacy::IdentityInfo:: { additional: Default::default(), display: pallet_identity::Data::Raw( vec![0x01].try_into().expect("succeeds") @@ -894,7 +894,7 @@ fn test_provide_judgement_works_if_identity_judgement_requested() { let identity = pallet_identity::Registration:: { judgements: Default::default(), deposit: BasicDeposit::get() as u128, - info: pallet_identity::simple::IdentityInfo:: { + info: pallet_identity::legacy::IdentityInfo:: { additional: Default::default(), display: pallet_identity::Data::Raw(vec![0x01].try_into().expect("succeeds")), legal: pallet_identity::Data::None, @@ -1250,7 +1250,7 @@ fn test_identity_returns_valid_data_for_identity_info() { assert_ok!(Identity::set_identity( RuntimeOrigin::signed(Bob.into()), Box::new( - pallet_identity::simple::IdentityInfo:: { + pallet_identity::legacy::IdentityInfo:: { additional: vec![ ( pallet_identity::Data::Raw( @@ -1378,7 +1378,7 @@ fn test_identity_returns_valid_data_for_requested_judgement() { assert_ok!(Identity::set_identity( RuntimeOrigin::signed(Bob.into()), Box::new( - pallet_identity::simple::IdentityInfo:: { + pallet_identity::legacy::IdentityInfo:: { additional: Default::default(), display: pallet_identity::Data::Raw( vec![0x01].try_into().expect("succeeds") @@ -1498,7 +1498,7 @@ fn test_identity_returns_valid_data_for_judged_identity() { RuntimeOrigin::signed(RegistrarAndForceOrigin.into()), Alice.into(), )); - let identity = pallet_identity::simple::IdentityInfo:: { + let identity = pallet_identity::legacy::IdentityInfo:: { additional: Default::default(), display: pallet_identity::Data::Raw(vec![0x01].try_into().expect("succeeds")), legal: pallet_identity::Data::None, @@ -1570,7 +1570,7 @@ fn test_super_of_returns_empty_if_not_set() { assert_ok!(Identity::set_identity( RuntimeOrigin::signed(Bob.into()), Box::new( - pallet_identity::simple::IdentityInfo:: { + pallet_identity::legacy::IdentityInfo:: { additional: Default::default(), display: pallet_identity::Data::Raw( vec![0x01].try_into().expect("succeeds") @@ -1611,7 +1611,7 @@ fn test_super_of_returns_account_if_set() { assert_ok!(Identity::set_identity( RuntimeOrigin::signed(Bob.into()), Box::new( - pallet_identity::simple::IdentityInfo:: { + pallet_identity::legacy::IdentityInfo:: { additional: Default::default(), display: pallet_identity::Data::Raw( vec![0x01].try_into().expect("succeeds") @@ -1661,7 +1661,7 @@ fn test_subs_of_returns_empty_if_not_set() { assert_ok!(Identity::set_identity( RuntimeOrigin::signed(Bob.into()), Box::new( - pallet_identity::simple::IdentityInfo:: { + pallet_identity::legacy::IdentityInfo:: { additional: Default::default(), display: pallet_identity::Data::Raw( vec![0x01].try_into().expect("succeeds") @@ -1702,7 +1702,7 @@ fn test_subs_of_returns_account_if_set() { assert_ok!(Identity::set_identity( RuntimeOrigin::signed(Bob.into()), Box::new( - pallet_identity::simple::IdentityInfo:: { + pallet_identity::legacy::IdentityInfo:: { additional: Default::default(), display: pallet_identity::Data::Raw( vec![0x01].try_into().expect("succeeds") diff --git a/precompiles/parachain-staking/src/mock.rs b/precompiles/parachain-staking/src/mock.rs index 0dcb75d292..af20411be7 100644 --- a/precompiles/parachain-staking/src/mock.rs +++ b/precompiles/parachain-staking/src/mock.rs @@ -64,6 +64,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -101,7 +102,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/precompiles/precompile-registry/src/mock.rs b/precompiles/precompile-registry/src/mock.rs index 3dd055f062..4caeaa6b5b 100644 --- a/precompiles/precompile-registry/src/mock.rs +++ b/precompiles/precompile-registry/src/mock.rs @@ -54,6 +54,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -90,7 +91,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/precompiles/preimage/src/mock.rs b/precompiles/preimage/src/mock.rs index f573a0e537..5dc9ceada4 100644 --- a/precompiles/preimage/src/mock.rs +++ b/precompiles/preimage/src/mock.rs @@ -53,6 +53,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -89,7 +90,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/precompiles/proxy/src/mock.rs b/precompiles/proxy/src/mock.rs index fc1a9a8898..a8b4038ef5 100644 --- a/precompiles/proxy/src/mock.rs +++ b/precompiles/proxy/src/mock.rs @@ -61,6 +61,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -97,7 +98,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/precompiles/randomness/src/mock.rs b/precompiles/randomness/src/mock.rs index 889c4178d7..06e6c9aa9f 100644 --- a/precompiles/randomness/src/mock.rs +++ b/precompiles/randomness/src/mock.rs @@ -56,6 +56,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -93,7 +94,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/precompiles/referenda/src/mock.rs b/precompiles/referenda/src/mock.rs index 978cc92bd5..20b9f97de3 100644 --- a/precompiles/referenda/src/mock.rs +++ b/precompiles/referenda/src/mock.rs @@ -64,6 +64,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -101,7 +102,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/precompiles/relay-data-verifier/src/mock.rs b/precompiles/relay-data-verifier/src/mock.rs index a8dc67ea93..c8c0b8465c 100644 --- a/precompiles/relay-data-verifier/src/mock.rs +++ b/precompiles/relay-data-verifier/src/mock.rs @@ -55,6 +55,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -93,7 +94,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/precompiles/relay-encoder/Cargo.toml b/precompiles/relay-encoder/Cargo.toml index 89783c6ba2..593b8c7bf6 100644 --- a/precompiles/relay-encoder/Cargo.toml +++ b/precompiles/relay-encoder/Cargo.toml @@ -19,14 +19,14 @@ xcm-primitives = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } pallet-staking = { workspace = true } -parity-scale-codec = { workspace = true, features = [ "derive" ] } +parity-scale-codec = { workspace = true, features = ["derive"] } sp-core = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } # Frontier fp-evm = { workspace = true } -pallet-evm = { workspace = true, features = [ "forbid-evm-reentrancy" ] } +pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] } # Cumulus cumulus-primitives-core = { workspace = true } @@ -38,32 +38,33 @@ serde = { workspace = true } sha3 = { workspace = true } # Moonbeam -precompile-utils = { workspace = true, features = [ "testing" ] } +precompile-utils = { workspace = true, features = ["std", "testing"] } # Substrate -pallet-balances = { workspace = true } -pallet-timestamp = { workspace = true } -scale-info = { workspace = true, features = [ "derive" ] } -sp-io = { workspace = true } +pallet-balances = { workspace = true, features = ["std"] } +pallet-timestamp = { workspace = true, features = ["std"] } +scale-info = { workspace = true, features = ["std", "derive"] } +sp-io = { workspace = true, features = ["std"] } # Cumulus -cumulus-pallet-parachain-system = { workspace = true } +cumulus-pallet-parachain-system = { workspace = true, features = ["std"] } # Polkadot -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } +xcm = { workspace = true, features = ["std"] } +xcm-builder = { workspace = true, features = ["std"] } +xcm-executor = { workspace = true, features = ["std"] } # ORML -orml-traits = { workspace = true } +orml-traits = { workspace = true, features = ["std"] } [features] -default = [ "std" ] +default = ["std"] std = [ "cumulus-primitives-core/std", "fp-evm/std", "frame-support/std", "frame-system/std", + "sp-core/std", "pallet-evm/std", "pallet-staking/std", "pallet-xcm-transactor/std", diff --git a/precompiles/relay-encoder/src/lib.rs b/precompiles/relay-encoder/src/lib.rs index 9f529f4942..3edb93e73f 100644 --- a/precompiles/relay-encoder/src/lib.rs +++ b/precompiles/relay-encoder/src/lib.rs @@ -417,6 +417,7 @@ impl solidity::Codec for RewardDestinationWrapper { match enum_selector[0] { 0u8 => Ok(RewardDestinationWrapper(RewardDestination::Staked)), 1u8 => Ok(RewardDestinationWrapper(RewardDestination::Stash)), + // Deprecated in https://github.com/paritytech/polkadot-sdk/pull/2380 2u8 => Ok(RewardDestinationWrapper(RewardDestination::Controller)), 3u8 => { let address = encoded_reward_destination.read::()?; @@ -440,6 +441,7 @@ impl solidity::Codec for RewardDestinationWrapper { encoded.push(1); encoded.as_slice().into() } + // Deprecated in https://github.com/paritytech/polkadot-sdk/pull/2380 RewardDestination::Controller => { encoded.push(2); encoded.as_slice().into() diff --git a/precompiles/relay-encoder/src/mock.rs b/precompiles/relay-encoder/src/mock.rs index c3c8c8d110..15bfc3a0ba 100644 --- a/precompiles/relay-encoder/src/mock.rs +++ b/precompiles/relay-encoder/src/mock.rs @@ -17,6 +17,7 @@ //! Test utilities use super::*; +use cumulus_primitives_core::AggregateMessageOrigin; use frame_support::{ construct_runtime, parameter_types, traits::{Everything, PalletInfo as PalletInfoTrait}, @@ -33,7 +34,7 @@ use sp_runtime::{ }; use xcm::latest::{prelude::*, Error as XcmError}; use xcm_builder::FixedWeightBounds; -use xcm_executor::{traits::TransactAsset, Assets}; +use xcm_executor::{traits::TransactAsset, AssetsInHolding}; pub type AccountId = MockAccount; pub type Balance = u128; @@ -49,6 +50,7 @@ construct_runtime!( ParachainSystem: cumulus_pallet_parachain_system, Timestamp: pallet_timestamp, XcmTransactor: pallet_xcm_transactor, + MessageQueue: pallet_message_queue, } ); @@ -60,6 +62,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -84,6 +87,7 @@ impl frame_system::Config for Runtime { parameter_types! { pub ParachainId: cumulus_primitives_core::ParaId = 100.into(); + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; } impl cumulus_pallet_parachain_system::Config for Runtime { @@ -93,10 +97,30 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type OutboundXcmpMessageSource = (); type XcmpMessageHandler = (); type ReservedXcmpWeight = (); - type DmpMessageHandler = (); + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type ReservedDmpWeight = (); type CheckAssociatedRelayNumber = cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; type ConsensusHook = cumulus_pallet_parachain_system::ExpectParentIncluded; + type WeightInfo = cumulus_pallet_parachain_system::weights::SubstrateWeight; +} + +parameter_types! { + pub MessageQueueServiceWeight: Weight = Weight::from_parts(1_000_000_000, 1_000_000); + pub const MessageQueueHeapSize: u32 = 65_536; + pub const MessageQueueMaxStale: u32 = 16; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Size = u32; + type HeapSize = MessageQueueHeapSize; + type MaxStale = MessageQueueMaxStale; + type ServiceWeight = MessageQueueServiceWeight; + type MessageProcessor = + pallet_message_queue::mock_helpers::NoopMessageProcessor; + type QueueChangeHandler = (); + type WeightInfo = (); + type QueuePausedQuery = (); } parameter_types! { @@ -114,7 +138,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } @@ -132,10 +155,10 @@ impl SendXcm for DoNothingRouter { type Ticket = (); fn validate( - _destination: &mut Option, + _destination: &mut Option, _message: &mut Option>, ) -> SendResult { - Ok(((), MultiAssets::new())) + Ok(((), Assets::new())) } fn deliver(_: Self::Ticket) -> Result { @@ -144,59 +167,56 @@ impl SendXcm for DoNothingRouter { } parameter_types! { - pub Ancestry: MultiLocation = Parachain(ParachainId::get().into()).into(); + pub Ancestry: Location = Parachain(ParachainId::get().into()).into(); pub const BaseXcmWeight: Weight = Weight::from_parts(1000u64, 1000u64); pub const RelayNetwork: NetworkId = NetworkId::Polkadot; - pub SelfLocation: MultiLocation = - MultiLocation::new(1, Junctions::X1(Parachain(ParachainId::get().into()))); + pub SelfLocation: Location = + Location::new(1, [Parachain(ParachainId::get().into())]); - pub SelfReserve: MultiLocation = MultiLocation::new( + pub SelfReserve: Location = Location::new( 1, - Junctions::X2( + [ Parachain(ParachainId::get().into()), PalletInstance( ::PalletInfo::index::().unwrap() as u8 ) - )); + ]); pub MaxInstructions: u32 = 100; - pub UniversalLocation: InteriorMultiLocation = Here; + pub UniversalLocation: InteriorLocation = Here; } -pub struct AccountIdToMultiLocation; -impl sp_runtime::traits::Convert for AccountIdToMultiLocation { - fn convert(account: AccountId) -> MultiLocation { +pub struct AccountIdToLocation; +impl sp_runtime::traits::Convert for AccountIdToLocation { + fn convert(account: AccountId) -> Location { let as_h160: H160 = account.into(); - MultiLocation::new( + Location::new( 0, - Junctions::X1(AccountKey20 { + [AccountKey20 { network: None, key: as_h160.as_fixed_bytes().clone(), - }), + }], ) } } -pub struct CurrencyIdToMultiLocation; +pub struct CurrencyIdToLocation; -impl sp_runtime::traits::Convert> for CurrencyIdToMultiLocation { - fn convert(currency: CurrencyId) -> Option { +impl sp_runtime::traits::Convert> for CurrencyIdToLocation { + fn convert(currency: CurrencyId) -> Option { match currency { CurrencyId::SelfReserve => { - let multi: MultiLocation = SelfReserve::get(); + let multi: Location = SelfReserve::get(); Some(multi) } // To distinguish between relay and others, specially for reserve asset CurrencyId::OtherReserve(asset) => { if asset == 0 { - Some(MultiLocation::parent()) + Some(Location::parent()) } else { - Some(MultiLocation::new( - 1, - Junctions::X2(Parachain(2), GeneralIndex(asset)), - )) + Some(Location::new(1, [Parachain(2), GeneralIndex(asset)])) } } } @@ -249,29 +269,25 @@ impl xcm_primitives::UtilityEncodeCall for MockTransactors { } impl xcm_primitives::XcmTransact for MockTransactors { - fn destination(self) -> MultiLocation { + fn destination(self) -> Location { match self { - MockTransactors::Relay => MultiLocation::parent(), + MockTransactors::Relay => Location::parent(), } } } pub struct DummyAssetTransactor; impl TransactAsset for DummyAssetTransactor { - fn deposit_asset( - _what: &MultiAsset, - _who: &MultiLocation, - _context: Option<&XcmContext>, - ) -> XcmResult { + fn deposit_asset(_what: &Asset, _who: &Location, _context: Option<&XcmContext>) -> XcmResult { Ok(()) } fn withdraw_asset( - _what: &MultiAsset, - _who: &MultiLocation, + _what: &Asset, + _who: &Location, _maybe_context: Option<&XcmContext>, - ) -> Result { - Ok(Assets::default()) + ) -> Result { + Ok(AssetsInHolding::default()) } } @@ -282,8 +298,8 @@ impl pallet_xcm_transactor::Config for Runtime { type DerivativeAddressRegistrationOrigin = frame_system::EnsureRoot; type SovereignAccountDispatcherOrigin = frame_system::EnsureRoot; type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = AccountIdToMultiLocation; - type CurrencyIdToMultiLocation = CurrencyIdToMultiLocation; + type AccountIdToLocation = AccountIdToLocation; + type CurrencyIdToLocation = CurrencyIdToLocation; type SelfLocation = SelfLocation; type Weigher = FixedWeightBounds; type UniversalLocation = UniversalLocation; diff --git a/precompiles/utils/src/solidity/codec/xcm.rs b/precompiles/utils/src/solidity/codec/xcm.rs index 58b2b064fc..a02f128175 100644 --- a/precompiles/utils/src/solidity/codec/xcm.rs +++ b/precompiles/utils/src/solidity/codec/xcm.rs @@ -26,7 +26,7 @@ use { sp_core::H256, sp_std::vec::Vec, sp_weights::Weight, - xcm::latest::{Junction, Junctions, MultiLocation, NetworkId}, + xcm::latest::{Junction, Junctions, Location, NetworkId}, }; pub const JUNCTION_SIZE_LIMIT: u32 = 2u32.pow(16); @@ -38,7 +38,7 @@ pub const JUNCTION_SIZE_LIMIT: u32 = 2u32.pow(16); // The first byte represents the enum variant to be used. // - Indexes 0,2,3 represent XCM V2 variants // - Index 1 changes name in V3 (`ByGenesis`), but is compatible with V2 `Named` -// - Indexes 4~10 represent new XCM V3 variants +// - Indexes 4~11 represent new XCM V3 variants // The rest of the bytes (if any), represent the additional data that such enum variant requires // In such a case, since NetworkIds will be appended at the end, we will read the buffer until the // end to recover the name @@ -106,6 +106,11 @@ pub(crate) fn network_id_to_bytes(network_id: Option) -> Vec { encoded.push(9u8); encoded } + Some(NetworkId::PolkadotBulletin) => { + encoded.push(11u8); + encoded.push(10u8); + encoded + } } } @@ -349,12 +354,12 @@ impl Codec for Junctions { } // Cannot used derive macro since it is a foreign struct. -impl Codec for MultiLocation { +impl Codec for Location { fn read(reader: &mut Reader) -> MayRevert { let (parents, interior) = reader .read() .map_in_tuple_to_field(&["parents", "interior"])?; - Ok(MultiLocation { parents, interior }) + Ok(Location { parents, interior }) } fn write(writer: &mut Writer, value: Self) { diff --git a/precompiles/utils/src/tests.rs b/precompiles/utils/src/tests.rs index 8f0739358a..93bcfd3e60 100644 --- a/precompiles/utils/src/tests.rs +++ b/precompiles/utils/src/tests.rs @@ -650,7 +650,7 @@ fn read_vec_of_bytes() { // // It also provides an example on how to impl `solidity::Codec` for Solidity structs. // -// struct MultiLocation { +// struct Location { // uint8 parents; // bytes [] interior; // } @@ -658,12 +658,12 @@ fn read_vec_of_bytes() { // function transfer( // address currency_address, // uint256 amount, -// MultiLocation memory destination, +// Location memory destination, // uint64 weight // ) external; #[derive(Clone, Debug, Eq, PartialEq, solidity::Codec)] -struct MultiLocation { +struct Location { parents: u8, interior: Vec, } @@ -702,8 +702,8 @@ fn read_complex_solidity_function() { assert_eq!(selector, Some(0xb38c60fa)); // asset assert_eq!( - reader.read::().unwrap(), - MultiLocation { + reader.read::().unwrap(), + Location { parents: 1, interior: vec![ UnboundedBytes::from(&hex!("00000003e8")[..]), @@ -717,8 +717,8 @@ fn read_complex_solidity_function() { // destination assert_eq!( - reader.read::().unwrap(), - MultiLocation { + reader.read::().unwrap(), + Location { parents: 1, interior: vec![UnboundedBytes::from( &hex!("01010101010101010101010101010101010101010101010101010101010101010100")[..] @@ -732,38 +732,33 @@ fn read_complex_solidity_function() { #[test] fn junctions_decoder_works() { - let writer_output = Writer::new() - .write(Junctions::X1(Junction::OnlyChild)) - .build(); + let junctions: Junctions = [(Junction::OnlyChild)].into(); + let writer_output = Writer::new().write(junctions).build(); let mut reader = Reader::new(&writer_output); let parsed: Junctions = reader .read::() .expect("to correctly parse Junctions"); - assert_eq!(parsed, Junctions::X1(Junction::OnlyChild)); + assert_eq!(parsed, [Junction::OnlyChild]); - let writer_output = Writer::new() - .write(Junctions::X2(Junction::OnlyChild, Junction::OnlyChild)) - .build(); + let junctions: Junctions = [Junction::OnlyChild, Junction::OnlyChild].into(); + let writer_output = Writer::new().write(junctions).build(); let mut reader = Reader::new(&writer_output); let parsed: Junctions = reader .read::() .expect("to correctly parse Junctions"); - assert_eq!( - parsed, - Junctions::X2(Junction::OnlyChild, Junction::OnlyChild) - ); + assert_eq!(parsed, [Junction::OnlyChild, Junction::OnlyChild]); - let writer_output = Writer::new() - .write(Junctions::X3( - Junction::OnlyChild, - Junction::OnlyChild, - Junction::OnlyChild, - )) - .build(); + let junctions: Junctions = [ + Junction::OnlyChild, + Junction::OnlyChild, + Junction::OnlyChild, + ] + .into(); + let writer_output = Writer::new().write(junctions).build(); let mut reader = Reader::new(&writer_output); let parsed: Junctions = reader @@ -772,11 +767,11 @@ fn junctions_decoder_works() { assert_eq!( parsed, - Junctions::X3( + [ Junction::OnlyChild, Junction::OnlyChild, Junction::OnlyChild - ), + ], ); } @@ -1117,5 +1112,5 @@ fn evm_data_solidity_types() { ); // Struct encode like tuples - assert_eq!(MultiLocation::signature(), "(uint8,bytes[])"); + assert_eq!(Location::signature(), "(uint8,bytes[])"); } diff --git a/precompiles/utils/tests-external/lib.rs b/precompiles/utils/tests-external/lib.rs index cfb9eab388..ca32c4e41a 100644 --- a/precompiles/utils/tests-external/lib.rs +++ b/precompiles/utils/tests-external/lib.rs @@ -64,6 +64,7 @@ mod tests { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -100,7 +101,6 @@ mod tests { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } diff --git a/precompiles/xcm-transactor/src/functions.rs b/precompiles/xcm-transactor/src/functions.rs index 6316543bfe..aa944afa0f 100644 --- a/precompiles/xcm-transactor/src/functions.rs +++ b/precompiles/xcm-transactor/src/functions.rs @@ -36,7 +36,7 @@ use sp_std::{ }; use sp_weights::Weight; use xcm::latest::prelude::*; -use xcm::latest::MultiLocation; +use xcm::latest::Location; use xcm_primitives::{ AccountIdToCurrencyId, UtilityAvailableCalls, UtilityEncodeCall, DEFAULT_PROOF_SIZE, }; @@ -77,22 +77,21 @@ where pub(crate) fn transact_info( handle: &mut impl PrecompileHandle, - multilocation: MultiLocation, + multilocation: Location, ) -> EvmResult<(u64, U256, u64)> { // fetch data from pallet - // storage item: TransactInfoWithWeightLimit: Blake2_128(16) + MultiLocation + // storage item: TransactInfoWithWeightLimit: Blake2_128(16) + Location // + RemoteTransactInfoWithMaxWeight handle.record_db_read::( - 16 + MultiLocation::max_encoded_len() - + RemoteTransactInfoWithMaxWeight::max_encoded_len(), + 16 + Location::max_encoded_len() + RemoteTransactInfoWithMaxWeight::max_encoded_len(), )?; let remote_transact_info: RemoteTransactInfoWithMaxWeight = pallet_xcm_transactor::Pallet::::transact_info(&multilocation) .ok_or(revert("Transact Info not set"))?; // fetch data from pallet - // storage item: AssetTypeUnitsPerSecond: Blake2_128(16) + MultiLocation + u128(16) - handle.record_db_read::(32 + MultiLocation::max_encoded_len())?; + // storage item: AssetTypeUnitsPerSecond: Blake2_128(16) + Location + u128(16) + handle.record_db_read::(32 + Location::max_encoded_len())?; let fee_per_second: u128 = pallet_xcm_transactor::Pallet::::dest_asset_fee_per_second(&multilocation) .ok_or(revert("Fee Per Second not set"))?; @@ -106,14 +105,13 @@ where pub(crate) fn transact_info_with_signed( handle: &mut impl PrecompileHandle, - multilocation: MultiLocation, + multilocation: Location, ) -> EvmResult<(u64, u64, u64)> { // fetch data from pallet - // storage item: TransactInfoWithWeightLimit: Blake2_128(16) + MultiLocation + // storage item: TransactInfoWithWeightLimit: Blake2_128(16) + Location // + RemoteTransactInfoWithMaxWeight handle.record_db_read::( - 16 + MultiLocation::max_encoded_len() - + RemoteTransactInfoWithMaxWeight::max_encoded_len(), + 16 + Location::max_encoded_len() + RemoteTransactInfoWithMaxWeight::max_encoded_len(), )?; let remote_transact_info: RemoteTransactInfoWithMaxWeight = pallet_xcm_transactor::Pallet::::transact_info(multilocation) @@ -132,13 +130,13 @@ where pub(crate) fn fee_per_second( handle: &mut impl PrecompileHandle, - multilocation: MultiLocation, + location: Location, ) -> EvmResult { // fetch data from pallet - // storage item: AssetTypeUnitsPerSecond: Blake2_128(16) + MultiLocation + u128(16) - handle.record_db_read::(32 + MultiLocation::max_encoded_len())?; + // storage item: AssetTypeUnitsPerSecond: Blake2_128(16) + Location + u128(16) + handle.record_db_read::(32 + Location::max_encoded_len())?; let fee_per_second: u128 = - pallet_xcm_transactor::Pallet::::dest_asset_fee_per_second(multilocation) + pallet_xcm_transactor::Pallet::::dest_asset_fee_per_second(location) .ok_or(revert("Fee Per Second not set"))?; Ok(fee_per_second.into()) @@ -148,7 +146,7 @@ where handle: &mut impl PrecompileHandle, transactor: u8, index: u16, - fee_asset: MultiLocation, + fee_asset: Location, weight: u64, inner_call: BoundedBytes, ) -> EvmResult { @@ -164,7 +162,7 @@ where dest: transactor, index, fee: CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( fee_asset, ))), fee_amount: None, @@ -193,7 +191,7 @@ where handle: &mut impl PrecompileHandle, transactor: u8, index: u16, - fee_asset: MultiLocation, + fee_asset: Location, weight: u64, inner_call: BoundedBytes, fee_amount: u128, @@ -212,7 +210,7 @@ where dest: transactor, index, fee: CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( fee_asset, ))), fee_amount: Some(fee_amount), @@ -344,8 +342,8 @@ where pub(crate) fn transact_through_signed_multilocation( handle: &mut impl PrecompileHandle, - dest: MultiLocation, - fee_asset: MultiLocation, + dest: Location, + fee_asset: Location, weight: u64, call: BoundedBytes, ) -> EvmResult { @@ -355,9 +353,9 @@ where // moonbeam, as we are using IdentityMapping let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); let call = pallet_xcm_transactor::Call::::transact_through_signed { - dest: Box::new(xcm::VersionedMultiLocation::V3(dest)), + dest: Box::new(xcm::VersionedLocation::V4(dest)), fee: CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( fee_asset, ))), fee_amount: None, @@ -380,8 +378,8 @@ where pub(crate) fn transact_through_signed_multilocation_fee_weight( handle: &mut impl PrecompileHandle, - dest: MultiLocation, - fee_asset: MultiLocation, + dest: Location, + fee_asset: Location, weight: u64, call: BoundedBytes, fee_amount: u128, @@ -393,9 +391,9 @@ where // moonbeam, as we are using IdentityMapping let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); let call = pallet_xcm_transactor::Call::::transact_through_signed { - dest: Box::new(xcm::VersionedMultiLocation::V3(dest)), + dest: Box::new(xcm::VersionedLocation::V4(dest)), fee: CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( fee_asset, ))), fee_amount: Some(fee_amount), @@ -421,7 +419,7 @@ where pub(crate) fn transact_through_signed( handle: &mut impl PrecompileHandle, - dest: MultiLocation, + dest: Location, fee_asset: Address, weight: u64, call: BoundedBytes, @@ -444,7 +442,7 @@ where // moonbeam, as we are using IdentityMapping let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); let call = pallet_xcm_transactor::Call::::transact_through_signed { - dest: Box::new(xcm::VersionedMultiLocation::V3(dest)), + dest: Box::new(xcm::VersionedLocation::V4(dest)), fee: CurrencyPayment { currency: Currency::AsCurrencyId(currency_id), fee_amount: None, @@ -467,7 +465,7 @@ where pub(crate) fn transact_through_signed_fee_weight( handle: &mut impl PrecompileHandle, - dest: MultiLocation, + dest: Location, fee_asset: Address, weight: u64, call: BoundedBytes, @@ -492,7 +490,7 @@ where // moonbeam, as we are using IdentityMapping let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); let call = pallet_xcm_transactor::Call::::transact_through_signed { - dest: Box::new(xcm::VersionedMultiLocation::V3(dest)), + dest: Box::new(xcm::VersionedLocation::V4(dest)), fee: CurrencyPayment { currency: Currency::AsCurrencyId(currency_id), fee_amount: Some(fee_amount), @@ -542,14 +540,13 @@ where pub(crate) fn transact_info_with_signed_v3( handle: &mut impl PrecompileHandle, - multilocation: MultiLocation, + multilocation: Location, ) -> EvmResult<(Weight, Weight, Weight)> { // fetch data from pallet - // storage item: TransactInfoWithWeightLimit: Blake2_128(16) + MultiLocation + // storage item: TransactInfoWithWeightLimit: Blake2_128(16) + Location // + RemoteTransactInfoWithMaxWeight handle.record_db_read::( - 16 + MultiLocation::max_encoded_len() - + RemoteTransactInfoWithMaxWeight::max_encoded_len(), + 16 + Location::max_encoded_len() + RemoteTransactInfoWithMaxWeight::max_encoded_len(), )?; let remote_transact_info: RemoteTransactInfoWithMaxWeight = @@ -571,7 +568,7 @@ where handle: &mut impl PrecompileHandle, transactor: u8, index: u16, - fee_asset: MultiLocation, + fee_asset: Location, weight: Weight, inner_call: BoundedBytes, fee_amount: u128, @@ -596,7 +593,7 @@ where dest: transactor, index, fee: CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( fee_asset, ))), fee_amount: Some(fee_amount), @@ -672,8 +669,8 @@ where pub(crate) fn transact_through_signed_multilocation_v3( handle: &mut impl PrecompileHandle, - dest: MultiLocation, - fee_asset: MultiLocation, + dest: Location, + fee_asset: Location, weight: Weight, call: BoundedBytes, fee_amount: u128, @@ -691,9 +688,9 @@ where // moonbeam, as we are using IdentityMapping let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); let call = pallet_xcm_transactor::Call::::transact_through_signed { - dest: Box::new(xcm::VersionedMultiLocation::V3(dest)), + dest: Box::new(xcm::VersionedLocation::V4(dest)), fee: CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( fee_asset, ))), fee_amount: Some(fee_amount), @@ -713,7 +710,7 @@ where pub(crate) fn transact_through_signed_v3( handle: &mut impl PrecompileHandle, - dest: MultiLocation, + dest: Location, fee_asset: Address, weight: Weight, call: BoundedBytes, @@ -744,7 +741,7 @@ where // moonbeam, as we are using IdentityMapping let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); let call = pallet_xcm_transactor::Call::::transact_through_signed { - dest: Box::new(xcm::VersionedMultiLocation::V3(dest)), + dest: Box::new(xcm::VersionedLocation::V4(dest)), fee: CurrencyPayment { currency: Currency::AsCurrencyId(currency_id), fee_amount: Some(fee_amount), diff --git a/precompiles/xcm-transactor/src/mock.rs b/precompiles/xcm-transactor/src/mock.rs index 1adb818ec9..83e100478a 100644 --- a/precompiles/xcm-transactor/src/mock.rs +++ b/precompiles/xcm-transactor/src/mock.rs @@ -38,7 +38,7 @@ use xcm::latest::{prelude::*, Error as XcmError}; use xcm_builder::FixedWeightBounds; use xcm_executor::{ traits::{TransactAsset, WeightTrader}, - Assets, + AssetsInHolding, }; use xcm_primitives::AccountIdToCurrencyId; @@ -58,16 +58,16 @@ construct_runtime!( } ); -pub struct AccountIdToMultiLocation; -impl sp_runtime::traits::Convert for AccountIdToMultiLocation { - fn convert(account: AccountId) -> MultiLocation { +pub struct AccountIdToLocation; +impl sp_runtime::traits::Convert for AccountIdToLocation { + fn convert(account: AccountId) -> Location { let as_h160: H160 = account.into(); - MultiLocation::new( + Location::new( 0, - Junctions::X1(AccountKey20 { + [AccountKey20 { network: None, key: as_h160.as_fixed_bytes().clone(), - }), + }], ) } } @@ -91,6 +91,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = MockDbWeight; type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -127,7 +128,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } @@ -229,10 +229,10 @@ impl pallet_timestamp::Config for Runtime { } pub struct ConvertOriginToLocal; impl EnsureOrigin for ConvertOriginToLocal { - type Success = MultiLocation; + type Success = Location; - fn try_origin(_: Origin) -> Result { - Ok(MultiLocation::here()) + fn try_origin(_: Origin) -> Result { + Ok(Location::here()) } #[cfg(feature = "runtime-benchmarks")] @@ -246,10 +246,10 @@ impl SendXcm for DoNothingRouter { type Ticket = (); fn validate( - _destination: &mut Option, + _destination: &mut Option, _message: &mut Option>, ) -> SendResult { - Ok(((), MultiAssets::new())) + Ok(((), Assets::new())) } fn deliver(_: Self::Ticket) -> Result { @@ -259,20 +259,16 @@ impl SendXcm for DoNothingRouter { pub struct DummyAssetTransactor; impl TransactAsset for DummyAssetTransactor { - fn deposit_asset( - _what: &MultiAsset, - _who: &MultiLocation, - _context: Option<&XcmContext>, - ) -> XcmResult { + fn deposit_asset(_what: &Asset, _who: &Location, _context: Option<&XcmContext>) -> XcmResult { Ok(()) } fn withdraw_asset( - _what: &MultiAsset, - _who: &MultiLocation, + _what: &Asset, + _who: &Location, _maybe_context: Option<&XcmContext>, - ) -> Result { - Ok(Assets::default()) + ) -> Result { + Ok(AssetsInHolding::default()) } } @@ -285,10 +281,10 @@ impl WeightTrader for DummyWeightTrader { fn buy_weight( &mut self, _weight: Weight, - _payment: Assets, + _payment: AssetsInHolding, _context: &XcmContext, - ) -> Result { - Ok(Assets::default()) + ) -> Result { + Ok(AssetsInHolding::default()) } } @@ -299,25 +295,25 @@ pub enum CurrencyId { } parameter_types! { - pub Ancestry: MultiLocation = Parachain(ParachainId::get().into()).into(); + pub Ancestry: Location = Parachain(ParachainId::get().into()).into(); pub const BaseXcmWeight: Weight = Weight::from_parts(1000u64, 1000u64); pub const RelayNetwork: NetworkId = NetworkId::Polkadot; - pub SelfLocation: MultiLocation = - MultiLocation::new(1, Junctions::X1(Parachain(ParachainId::get().into()))); + pub SelfLocation: Location = + Location::new(1, [Parachain(ParachainId::get().into())]); - pub SelfReserve: MultiLocation = MultiLocation::new( + pub SelfReserve: Location = Location::new( 1, - Junctions::X2( + [ Parachain(ParachainId::get().into()), PalletInstance( ::PalletInfo::index::().unwrap() as u8 ) - )); + ]); pub MaxInstructions: u32 = 100; - pub UniversalLocation: InteriorMultiLocation = Here; + pub UniversalLocation: InteriorLocation = Here; } impl pallet_xcm_transactor::Config for Runtime { @@ -327,8 +323,8 @@ impl pallet_xcm_transactor::Config for Runtime { type DerivativeAddressRegistrationOrigin = frame_system::EnsureRoot; type SovereignAccountDispatcherOrigin = frame_system::EnsureRoot; type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = AccountIdToMultiLocation; - type CurrencyIdToMultiLocation = CurrencyIdToMultiLocation; + type AccountIdToLocation = AccountIdToLocation; + type CurrencyIdToLocation = CurrencyIdToLocation; type SelfLocation = SelfLocation; type Weigher = FixedWeightBounds; type UniversalLocation = UniversalLocation; @@ -372,9 +368,9 @@ impl TryFrom for MockTransactors { } impl xcm_primitives::XcmTransact for MockTransactors { - fn destination(self) -> MultiLocation { + fn destination(self) -> Location { match self { - MockTransactors::Relay => MultiLocation::parent(), + MockTransactors::Relay => Location::parent(), } } } @@ -407,24 +403,21 @@ impl AccountIdToCurrencyId for Runtime { } } -pub struct CurrencyIdToMultiLocation; +pub struct CurrencyIdToLocation; -impl sp_runtime::traits::Convert> for CurrencyIdToMultiLocation { - fn convert(currency: CurrencyId) -> Option { +impl sp_runtime::traits::Convert> for CurrencyIdToLocation { + fn convert(currency: CurrencyId) -> Option { match currency { CurrencyId::SelfReserve => { - let multi: MultiLocation = SelfReserve::get(); + let multi: Location = SelfReserve::get(); Some(multi) } // To distinguish between relay and others, specially for reserve asset CurrencyId::OtherReserve(asset) => { if asset == 0 { - Some(MultiLocation::parent()) + Some(Location::parent()) } else { - Some(MultiLocation::new( - 1, - Junctions::X2(Parachain(2), GeneralIndex(asset)), - )) + Some(Location::new(1, [Parachain(2), GeneralIndex(asset)])) } } } diff --git a/precompiles/xcm-transactor/src/tests.rs b/precompiles/xcm-transactor/src/tests.rs index b96dd4a8fe..8bf3825612 100644 --- a/precompiles/xcm-transactor/src/tests.rs +++ b/precompiles/xcm-transactor/src/tests.rs @@ -22,7 +22,7 @@ use frame_support::{assert_ok, weights::Weight}; use precompile_utils::{prelude::*, testing::*}; use sp_core::H160; use sp_std::boxed::Box; -use xcm::latest::MultiLocation; +use xcm::latest::Location; fn precompiles() -> Precompiles { PrecompilesValue::get() @@ -138,7 +138,7 @@ fn take_transact_info() { .build() .execute_with(|| { let input: Vec<_> = PCallV1::transact_info { - multilocation: MultiLocation::parent(), + location: Location::parent(), } .into(); @@ -150,7 +150,7 @@ fn take_transact_info() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), Weight::zero(), 10000u64.into(), None @@ -159,7 +159,7 @@ fn take_transact_info() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1 )); @@ -177,7 +177,7 @@ fn take_transact_info_with_signed() { .build() .execute_with(|| { let input: Vec<_> = PCallV1::transact_info_with_signed { - multilocation: MultiLocation::parent(), + multilocation: Location::parent(), } .into(); @@ -189,7 +189,7 @@ fn take_transact_info_with_signed() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), Weight::zero(), 10000u64.into(), Some(1.into()) @@ -198,7 +198,7 @@ fn take_transact_info_with_signed() { // Root can set fee per second assert_ok!(XcmTransactor::set_fee_per_second( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1 )); @@ -217,7 +217,7 @@ fn take_fee_per_second() { .build() .execute_with(|| { let input: Vec<_> = PCallV1::fee_per_second { - multilocation: MultiLocation::parent(), + multilocation: Location::parent(), } .into(); @@ -229,7 +229,7 @@ fn take_fee_per_second() { // Root can set fee per secnd assert_ok!(XcmTransactor::set_fee_per_second( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1 )); precompiles() @@ -254,7 +254,7 @@ fn test_transact_derivative_multilocation_v2() { )); // we pay with our current self reserve. - let fee_payer_asset = MultiLocation::parent(); + let fee_payer_asset = Location::parent(); let bytes = vec![1u8, 2u8, 3u8]; @@ -294,7 +294,7 @@ fn test_transact_derivative_multilocation_v3() { )); // we pay with our current self reserve. - let fee_payer_asset = MultiLocation::parent(); + let fee_payer_asset = Location::parent(); let bytes = vec![1u8, 2u8, 3u8]; @@ -330,7 +330,7 @@ fn take_transact_info_with_signed_v3() { .build() .execute_with(|| { let input: Vec<_> = PCallV3::transact_info_with_signed { - multilocation: MultiLocation::parent(), + multilocation: Location::parent(), } .into(); @@ -342,7 +342,7 @@ fn take_transact_info_with_signed_v3() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), Weight::zero(), 10000u64.into(), Some(1.into()) @@ -351,7 +351,7 @@ fn take_transact_info_with_signed_v3() { // Root can set fee per second assert_ok!(XcmTransactor::set_fee_per_second( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1 )); @@ -387,7 +387,7 @@ fn test_transact_derivative_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), Weight::zero(), 10000000.into(), None @@ -396,12 +396,12 @@ fn test_transact_derivative_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1 )); // we pay with our current self reserve. - let fee_payer_asset = MultiLocation::parent(); + let fee_payer_asset = Location::parent(); let bytes = vec![1u8, 2u8, 3u8]; @@ -440,7 +440,7 @@ fn test_transact_derivative() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), Weight::zero(), 10000000.into(), None @@ -449,7 +449,7 @@ fn test_transact_derivative() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1 )); @@ -562,7 +562,7 @@ fn test_transact_signed() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), Weight::zero(), 10000000.into(), Some(1.into()) @@ -571,12 +571,12 @@ fn test_transact_signed() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1 )); // Destination - let dest = MultiLocation::parent(); + let dest = Location::parent(); let bytes = vec![1u8, 2u8, 3u8]; @@ -605,7 +605,7 @@ fn test_transact_signed_v2() { .build() .execute_with(|| { // Destination - let dest = MultiLocation::parent(); + let dest = Location::parent(); let bytes = vec![1u8, 2u8, 3u8]; @@ -654,7 +654,7 @@ fn test_transact_signed_v3() { Alice, TransactorV3, PCallV3::transact_through_signed { - dest: MultiLocation::parent(), + dest: Location::parent(), fee_asset: Address(AssetAddress(0).into()), weight: require_weight_at_most, call: bytes.into(), @@ -678,7 +678,7 @@ fn test_transact_signed_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), Weight::zero(), 10000000.into(), Some(1.into()) @@ -687,14 +687,14 @@ fn test_transact_signed_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1 )); // Destination - let dest = MultiLocation::parent(); + let dest = Location::parent(); - let fee_payer_asset = MultiLocation::parent(); + let fee_payer_asset = Location::parent(); let bytes = vec![1u8, 2u8, 3u8]; @@ -723,9 +723,9 @@ fn test_transact_signed_multilocation_v2() { .build() .execute_with(|| { // Destination - let dest = MultiLocation::parent(); + let dest = Location::parent(); - let fee_payer_asset = MultiLocation::parent(); + let fee_payer_asset = Location::parent(); let bytes = vec![1u8, 2u8, 3u8]; @@ -765,7 +765,7 @@ fn test_transact_through_signed_multilocation_v3() { )); // we pay with our current self reserve. - let fee_payer_asset = MultiLocation::parent(); + let fee_payer_asset = Location::parent(); let bytes = vec![1u8, 2u8, 3u8]; @@ -777,7 +777,7 @@ fn test_transact_through_signed_multilocation_v3() { Alice, TransactorV3, PCallV3::transact_through_signed_multilocation { - dest: MultiLocation::parent(), + dest: Location::parent(), fee_asset: fee_payer_asset, weight: require_weight_at_most, call: bytes.into(), diff --git a/precompiles/xcm-transactor/src/v1/mod.rs b/precompiles/xcm-transactor/src/v1/mod.rs index 853b834a30..e92ac40df5 100644 --- a/precompiles/xcm-transactor/src/v1/mod.rs +++ b/precompiles/xcm-transactor/src/v1/mod.rs @@ -24,7 +24,7 @@ use precompile_utils::prelude::*; use sp_core::{H160, U256}; use sp_runtime::traits::Dispatchable; use sp_std::{convert::TryFrom, marker::PhantomData}; -use xcm::latest::MultiLocation; +use xcm::latest::Location; use xcm_primitives::AccountIdToCurrencyId; /// A precompile to wrap the functionality from xcm transactor @@ -53,9 +53,9 @@ where #[precompile::view] fn transact_info( handle: &mut impl PrecompileHandle, - multilocation: MultiLocation, + location: Location, ) -> EvmResult<(u64, U256, u64)> { - XcmTransactorWrapper::::transact_info(handle, multilocation) + XcmTransactorWrapper::::transact_info(handle, location) } #[precompile::public("transactInfoWithSigned((uint8,bytes[]))")] @@ -63,7 +63,7 @@ where #[precompile::view] fn transact_info_with_signed( handle: &mut impl PrecompileHandle, - multilocation: MultiLocation, + multilocation: Location, ) -> EvmResult<(u64, u64, u64)> { XcmTransactorWrapper::::transact_info_with_signed(handle, multilocation) } @@ -73,7 +73,7 @@ where #[precompile::view] fn fee_per_second( handle: &mut impl PrecompileHandle, - multilocation: MultiLocation, + multilocation: Location, ) -> EvmResult { XcmTransactorWrapper::::fee_per_second(handle, multilocation) } @@ -98,7 +98,7 @@ where handle: &mut impl PrecompileHandle, transactor: u8, index: u16, - fee_asset: MultiLocation, + fee_asset: Location, weight: u64, inner_call: BoundedBytes, ) -> EvmResult { @@ -143,8 +143,8 @@ where )] fn transact_through_signed_multilocation( handle: &mut impl PrecompileHandle, - dest: MultiLocation, - fee_asset: MultiLocation, + dest: Location, + fee_asset: Location, weight: u64, call: BoundedBytes, ) -> EvmResult { @@ -157,7 +157,7 @@ where #[precompile::public("transact_through_signed((uint8,bytes[]),address,uint64,bytes)")] fn transact_through_signed( handle: &mut impl PrecompileHandle, - dest: MultiLocation, + dest: Location, fee_asset: Address, weight: u64, call: BoundedBytes, diff --git a/precompiles/xcm-transactor/src/v2/mod.rs b/precompiles/xcm-transactor/src/v2/mod.rs index 83bd5e9f8d..63586675d7 100644 --- a/precompiles/xcm-transactor/src/v2/mod.rs +++ b/precompiles/xcm-transactor/src/v2/mod.rs @@ -23,7 +23,7 @@ use precompile_utils::prelude::*; use sp_core::{H160, U256}; use sp_runtime::traits::Dispatchable; use sp_std::{convert::TryFrom, marker::PhantomData}; -use xcm::latest::MultiLocation; +use xcm::latest::Location; use xcm_primitives::AccountIdToCurrencyId; /// A precompile to wrap the functionality from xcm transactor @@ -50,7 +50,7 @@ where #[precompile::view] fn transact_info_with_signed( handle: &mut impl PrecompileHandle, - multilocation: MultiLocation, + multilocation: Location, ) -> EvmResult<(u64, u64, u64)> { XcmTransactorWrapper::::transact_info_with_signed(handle, multilocation) } @@ -59,7 +59,7 @@ where #[precompile::view] fn fee_per_second( handle: &mut impl PrecompileHandle, - multilocation: MultiLocation, + multilocation: Location, ) -> EvmResult { XcmTransactorWrapper::::fee_per_second(handle, multilocation) } @@ -77,7 +77,7 @@ where handle: &mut impl PrecompileHandle, transactor: u8, index: u16, - fee_asset: MultiLocation, + fee_asset: Location, weight: u64, inner_call: BoundedBytes, fee_amount: Convert, @@ -138,8 +138,8 @@ where )] fn transact_through_signed_multilocation( handle: &mut impl PrecompileHandle, - dest: MultiLocation, - fee_asset: MultiLocation, + dest: Location, + fee_asset: Location, weight: u64, call: BoundedBytes, fee_amount: Convert, @@ -161,7 +161,7 @@ where )] fn transact_through_signed( handle: &mut impl PrecompileHandle, - dest: MultiLocation, + dest: Location, fee_asset: Address, weight: u64, call: BoundedBytes, diff --git a/precompiles/xcm-transactor/src/v3/mod.rs b/precompiles/xcm-transactor/src/v3/mod.rs index 90e9a50ff8..9575e0175b 100644 --- a/precompiles/xcm-transactor/src/v3/mod.rs +++ b/precompiles/xcm-transactor/src/v3/mod.rs @@ -24,7 +24,7 @@ use sp_core::{H160, U256}; use sp_runtime::traits::Dispatchable; use sp_std::{convert::TryFrom, marker::PhantomData}; use sp_weights::Weight; -use xcm::latest::MultiLocation; +use xcm::latest::Location; use xcm_primitives::AccountIdToCurrencyId; /// A precompile to wrap the functionality from xcm transactor @@ -51,7 +51,7 @@ where #[precompile::view] fn transact_info_with_signed( handle: &mut impl PrecompileHandle, - multilocation: MultiLocation, + multilocation: Location, ) -> EvmResult<(Weight, Weight, Weight)> { XcmTransactorWrapper::::transact_info_with_signed_v3(handle, multilocation) } @@ -60,7 +60,7 @@ where #[precompile::view] fn fee_per_second( handle: &mut impl PrecompileHandle, - multilocation: MultiLocation, + multilocation: Location, ) -> EvmResult { XcmTransactorWrapper::::fee_per_second(handle, multilocation) } @@ -80,7 +80,7 @@ where handle: &mut impl PrecompileHandle, transactor: u8, index: u16, - fee_asset: MultiLocation, + fee_asset: Location, weight: Weight, inner_call: BoundedBytes, fee_amount: Convert, @@ -147,8 +147,8 @@ where )] fn transact_through_signed_multilocation( handle: &mut impl PrecompileHandle, - dest: MultiLocation, - fee_asset: MultiLocation, + dest: Location, + fee_asset: Location, weight: Weight, call: BoundedBytes, fee_amount: Convert, @@ -179,7 +179,7 @@ where )] fn transact_through_signed( handle: &mut impl PrecompileHandle, - dest: MultiLocation, + dest: Location, fee_asset: Address, weight: Weight, call: BoundedBytes, diff --git a/precompiles/xcm-utils/XcmUtils.sol b/precompiles/xcm-utils/XcmUtils.sol index 791525c288..a222277939 100644 --- a/precompiles/xcm-utils/XcmUtils.sol +++ b/precompiles/xcm-utils/XcmUtils.sol @@ -18,7 +18,7 @@ interface XcmUtils { bytes[] interior; } - /// Get retrieve the account associated to a given MultiLocation + /// Get retrieve the account associated to a given Location /// @custom:selector 343b3e00 /// @param multilocation The multilocation that we want to know to which account maps to /// @return account The account the multilocation maps to in this chain diff --git a/precompiles/xcm-utils/src/lib.rs b/precompiles/xcm-utils/src/lib.rs index b2bc90d62a..f187a983e7 100644 --- a/precompiles/xcm-utils/src/lib.rs +++ b/precompiles/xcm-utils/src/lib.rs @@ -107,14 +107,14 @@ where #[precompile::view] fn multilocation_to_address( handle: &mut impl PrecompileHandle, - multilocation: MultiLocation, + location: Location, ) -> EvmResult
{ // storage item: AssetTypeUnitsPerSecond // max encoded len: hash (16) + Multilocation + u128 (16) - handle.record_db_read::(32 + MultiLocation::max_encoded_len())?; + handle.record_db_read::(32 + Location::max_encoded_len())?; let origin = - XcmConfig::OriginConverter::convert_origin(multilocation, OriginKind::SovereignAccount) + XcmConfig::OriginConverter::convert_origin(location, OriginKind::SovereignAccount) .map_err(|_| { RevertReason::custom("Failed multilocation conversion") .in_field("multilocation") @@ -133,21 +133,21 @@ where #[precompile::view] fn get_units_per_second( handle: &mut impl PrecompileHandle, - multilocation: MultiLocation, + location: Location, ) -> EvmResult { // storage item: AssetTypeUnitsPerSecond // max encoded len: hash (16) + Multilocation + u128 (16) - handle.record_db_read::(32 + MultiLocation::max_encoded_len())?; + handle.record_db_read::(32 + Location::max_encoded_len())?; // We will construct an asset with the max amount, and check how much we // get in return to substract - let multiasset: xcm::latest::MultiAsset = (multilocation.clone(), u128::MAX).into(); + let multiasset: xcm::latest::Asset = (location.clone(), u128::MAX).into(); let weight_per_second = 1_000_000_000_000u64; let mut trader = ::Trader::new(); let ctx = XcmContext { - origin: Some(multilocation), + origin: Some(location), message_id: XcmHash::default(), topic: None, }; @@ -233,7 +233,7 @@ where #[precompile::public("xcmSend((uint8,bytes[]),bytes)")] fn xcm_send( handle: &mut impl PrecompileHandle, - dest: MultiLocation, + dest: Location, message: BoundedBytes, ) -> EvmResult { let message: Vec = message.into(); diff --git a/precompiles/xcm-utils/src/mock.rs b/precompiles/xcm-utils/src/mock.rs index 26b9ca4308..495a59d514 100644 --- a/precompiles/xcm-utils/src/mock.rs +++ b/precompiles/xcm-utils/src/mock.rs @@ -38,7 +38,7 @@ use xcm_builder::IsConcrete; use xcm_builder::SovereignSignedViaLocation; use xcm_executor::{ traits::{ConvertLocation, TransactAsset, WeightTrader}, - Assets, + AssetsInHolding, }; use Junctions::Here; @@ -70,13 +70,13 @@ use frame_system::RawOrigin as SystemRawOrigin; use xcm::latest::Junction; pub struct MockAccountToAccountKey20(PhantomData<(Origin, AccountId)>); -impl> TryConvert +impl> TryConvert for MockAccountToAccountKey20 where Origin::PalletsOrigin: From> + TryInto, Error = Origin::PalletsOrigin>, { - fn try_convert(o: Origin) -> Result { + fn try_convert(o: Origin) -> Result { o.try_with_caller(|caller| match caller.try_into() { Ok(SystemRawOrigin::Signed(who)) => { let account_h160: H160 = who.into(); @@ -94,9 +94,9 @@ where pub struct MockParentMultilocationToAccountConverter; impl ConvertLocation for MockParentMultilocationToAccountConverter { - fn convert_location(location: &MultiLocation) -> Option { + fn convert_location(location: &Location) -> Option { match location { - MultiLocation { + Location { parents: 1, interior: Here, } => Some(ParentAccount.into()), @@ -107,12 +107,9 @@ impl ConvertLocation for MockParentMultilocationToAccountConverter { pub struct MockParachainMultilocationToAccountConverter; impl ConvertLocation for MockParachainMultilocationToAccountConverter { - fn convert_location(location: &MultiLocation) -> Option { - match location { - MultiLocation { - parents: 1, - interior: Junctions::X1(Parachain(id)), - } => Some(SiblingParachainAccount(*id).into()), + fn convert_location(location: &Location) -> Option { + match location.unpack() { + (1, [Parachain(id)]) => Some(SiblingParachainAccount(*id).into()), _ => None, } } @@ -124,16 +121,16 @@ pub type LocationToAccountId = ( xcm_builder::AccountKey20Aliases, ); -pub struct AccountIdToMultiLocation; -impl sp_runtime::traits::Convert for AccountIdToMultiLocation { - fn convert(account: AccountId) -> MultiLocation { +pub struct AccountIdToLocation; +impl sp_runtime::traits::Convert for AccountIdToLocation { + fn convert(account: AccountId) -> Location { let as_h160: H160 = account.into(); - MultiLocation::new( + Location::new( 0, - Junctions::X1(AccountKey20 { + [AccountKey20 { network: None, key: as_h160.as_fixed_bytes().clone(), - }), + }], ) } } @@ -156,6 +153,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = MockDbWeight; type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -192,18 +190,17 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } #[cfg(feature = "runtime-benchmarks")] parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); + pub ReachableDest: Option = Some(Parent.into()); } parameter_types! { - pub MatcherLocation: MultiLocation = MultiLocation::here(); + pub MatcherLocation: Location = Location::here(); } pub type LocalOriginToLocation = MockAccountToAccountKey20; impl pallet_xcm::Config for Runtime { @@ -316,10 +313,10 @@ pub type Barrier = AllowUnpaidExecutionFrom; pub struct ConvertOriginToLocal; impl EnsureOrigin for ConvertOriginToLocal { - type Success = MultiLocation; + type Success = Location; - fn try_origin(_: Origin) -> Result { - Ok(MultiLocation::here()) + fn try_origin(_: Origin) -> Result { + Ok(Location::here()) } #[cfg(feature = "runtime-benchmarks")] @@ -332,9 +329,9 @@ use sp_std::cell::RefCell; use xcm::latest::opaque; // Simulates sending a XCM message thread_local! { - pub static SENT_XCM: RefCell> = RefCell::new(Vec::new()); + pub static SENT_XCM: RefCell> = RefCell::new(Vec::new()); } -pub fn sent_xcm() -> Vec<(MultiLocation, opaque::Xcm)> { +pub fn sent_xcm() -> Vec<(Location, opaque::Xcm)> { SENT_XCM.with(|q| (*q.borrow()).clone()) } pub struct TestSendXcm; @@ -342,14 +339,14 @@ impl SendXcm for TestSendXcm { type Ticket = (); fn validate( - destination: &mut Option, + destination: &mut Option, message: &mut Option, ) -> SendResult { SENT_XCM.with(|q| { q.borrow_mut() .push((destination.clone().unwrap(), message.clone().unwrap())) }); - Ok(((), MultiAssets::new())) + Ok(((), Assets::new())) } fn deliver(_: Self::Ticket) -> Result { @@ -359,20 +356,16 @@ impl SendXcm for TestSendXcm { pub struct DummyAssetTransactor; impl TransactAsset for DummyAssetTransactor { - fn deposit_asset( - _what: &MultiAsset, - _who: &MultiLocation, - _context: Option<&XcmContext>, - ) -> XcmResult { + fn deposit_asset(_what: &Asset, _who: &Location, _context: Option<&XcmContext>) -> XcmResult { Ok(()) } fn withdraw_asset( - _what: &MultiAsset, - _who: &MultiLocation, + _what: &Asset, + _who: &Location, _maybe_context: Option<&XcmContext>, - ) -> Result { - Ok(Assets::default()) + ) -> Result { + Ok(AssetsInHolding::default()) } } @@ -385,11 +378,10 @@ impl WeightTrader for DummyWeightTrader { fn buy_weight( &mut self, weight: Weight, - payment: Assets, + payment: AssetsInHolding, _context: &XcmContext, - ) -> Result { - let asset_to_charge: MultiAsset = - (MultiLocation::parent(), weight.ref_time() as u128).into(); + ) -> Result { + let asset_to_charge: Asset = (Location::parent(), weight.ref_time() as u128).into(); let unused = payment .checked_sub(asset_to_charge) .map_err(|_| XcmError::TooExpensive)?; @@ -402,20 +394,20 @@ parameter_types! { pub const BaseXcmWeight: Weight = Weight::from_parts(1000u64, 0u64); pub const RelayNetwork: NetworkId = NetworkId::Polkadot; - pub SelfLocation: MultiLocation = - MultiLocation::new(1, Junctions::X1(Parachain(ParachainId::get().into()))); + pub SelfLocation: Location = + Location::new(1, [Parachain(ParachainId::get().into())]); - pub SelfReserve: MultiLocation = MultiLocation::new( + pub SelfReserve: Location = Location::new( 1, - Junctions::X2( + [ Parachain(ParachainId::get().into()), PalletInstance(::PalletInfo::index::().unwrap() as u8) - )); + ]); pub MaxInstructions: u32 = 100; - pub UniversalLocation: InteriorMultiLocation = Here; - pub Ancestry: InteriorMultiLocation = - X2(GlobalConsensus(RelayNetwork::get()), Parachain(ParachainId::get().into()).into()); + pub UniversalLocation: InteriorLocation = Here; + pub Ancestry: InteriorLocation = + [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainId::get().into())].into(); pub const MaxAssetsIntoHolding: u32 = 64; } @@ -452,6 +444,8 @@ impl xcm_executor::Config for XcmConfig { type UniversalAliases = Nothing; type SafeCallFilter = Everything; type Aliasers = Nothing; + + type TransactionalProcessor = (); } pub(crate) struct ExtBuilder { diff --git a/precompiles/xcm-utils/src/tests.rs b/precompiles/xcm-utils/src/tests.rs index 7eee70e843..3ed4178420 100644 --- a/precompiles/xcm-utils/src/tests.rs +++ b/precompiles/xcm-utils/src/tests.rs @@ -50,7 +50,7 @@ fn modifiers() { fn test_get_account_parent() { ExtBuilder::default().build().execute_with(|| { let input = PCall::multilocation_to_address { - multilocation: MultiLocation::parent(), + location: Location::parent(), }; let expected_address: H160 = ParentAccount.into(); @@ -67,9 +67,9 @@ fn test_get_account_parent() { fn test_get_account_sibling() { ExtBuilder::default().build().execute_with(|| { let input = PCall::multilocation_to_address { - multilocation: MultiLocation { + location: Location { parents: 1, - interior: Junctions::X1(Junction::Parachain(2000u32)), + interior: [Junction::Parachain(2000u32)].into(), }, }; @@ -86,7 +86,7 @@ fn test_get_account_sibling() { #[test] fn test_weight_message() { ExtBuilder::default().build().execute_with(|| { - let message: Vec = xcm::VersionedXcm::<()>::V3(Xcm(vec![ClearOrigin])).encode(); + let message: Vec = xcm::VersionedXcm::<()>::V4(Xcm(vec![ClearOrigin])).encode(); let input = PCall::weight_message { message: message.into(), @@ -104,7 +104,7 @@ fn test_weight_message() { fn test_get_units_per_second() { ExtBuilder::default().build().execute_with(|| { let input = PCall::get_units_per_second { - multilocation: MultiLocation::parent(), + location: Location::parent(), }; precompiles() @@ -118,7 +118,7 @@ fn test_get_units_per_second() { #[test] fn test_executor_clear_origin() { ExtBuilder::default().build().execute_with(|| { - let xcm_to_execute = VersionedXcm::<()>::V3(Xcm(vec![ClearOrigin])).encode(); + let xcm_to_execute = VersionedXcm::<()>::V4(Xcm(vec![ClearOrigin])).encode(); let input = PCall::xcm_execute { message: xcm_to_execute.into(), @@ -136,12 +136,12 @@ fn test_executor_clear_origin() { #[test] fn test_executor_send() { ExtBuilder::default().build().execute_with(|| { - let withdrawn_asset: MultiAsset = (MultiLocation::parent(), 1u128).into(); - let xcm_to_execute = VersionedXcm::<()>::V3(Xcm(vec![ + let withdrawn_asset: Asset = (Location::parent(), 1u128).into(); + let xcm_to_execute = VersionedXcm::<()>::V4(Xcm(vec![ WithdrawAsset(vec![withdrawn_asset].into()), InitiateReserveWithdraw { - assets: MultiAssetFilter::Wild(All), - reserve: MultiLocation::parent(), + assets: AssetFilter::Wild(All), + reserve: Location::parent(), xcm: Xcm(vec![]), }, ])) @@ -184,7 +184,7 @@ fn test_executor_transact() { } .encode(); encoded.append(&mut call_bytes); - let xcm_to_execute = VersionedXcm::<()>::V3(Xcm(vec![Transact { + let xcm_to_execute = VersionedXcm::<()>::V4(Xcm(vec![Transact { origin_kind: OriginKind::SovereignAccount, require_weight_at_most: Weight::from_parts(1_000_000_000u64, 5206u64), call: encoded.into(), @@ -211,10 +211,10 @@ fn test_executor_transact() { #[test] fn test_send_clear_origin() { ExtBuilder::default().build().execute_with(|| { - let xcm_to_send = VersionedXcm::<()>::V3(Xcm(vec![ClearOrigin])).encode(); + let xcm_to_send = VersionedXcm::<()>::V4(Xcm(vec![ClearOrigin])).encode(); let input = PCall::xcm_send { - dest: MultiLocation::parent(), + dest: Location::parent(), message: xcm_to_send.into(), }; @@ -244,7 +244,7 @@ fn execute_fails_if_called_by_smart_contract() { // Set code to Alice address as it if was a smart contract. pallet_evm::AccountCodes::::insert(H160::from(Alice), vec![10u8]); - let xcm_to_execute = VersionedXcm::<()>::V3(Xcm(vec![ClearOrigin])).encode(); + let xcm_to_execute = VersionedXcm::<()>::V4(Xcm(vec![ClearOrigin])).encode(); let input = PCall::xcm_execute { message: xcm_to_execute.into(), diff --git a/precompiles/xtokens/Xtokens.sol b/precompiles/xtokens/Xtokens.sol index 50194e20cc..1d13878833 100644 --- a/precompiles/xtokens/Xtokens.sol +++ b/precompiles/xtokens/Xtokens.sol @@ -18,8 +18,8 @@ interface Xtokens { bytes[] interior; } - // A MultiAsset is defined by a multilocation and an amount - struct MultiAsset { + // A Asset is defined by a multilocation and an amount + struct Asset { Multilocation location; uint256 amount; } @@ -63,7 +63,7 @@ interface Xtokens { uint64 weight ) external; - /// Transfer a token through XCM based on its MultiLocation + /// Transfer a token through XCM based on its Location /// /// @dev The token transfer burns/transfers the corresponding amount before sending /// @param asset The asset we want to transfer, defined by its multilocation. @@ -80,7 +80,7 @@ interface Xtokens { uint64 weight ) external; - /// Transfer a token through XCM based on its MultiLocation specifying fee + /// Transfer a token through XCM based on its Location specifying fee /// /// @dev The token transfer burns/transfers the corresponding amount before sending /// @param asset The asset we want to transfer, defined by its multilocation. @@ -124,7 +124,7 @@ interface Xtokens { /// (uint64::MAX means Unlimited weight) /// @custom:selector 797b45fd function transferMultiAssets( - MultiAsset[] memory assets, + Asset[] memory assets, uint32 feeItem, Multilocation memory destination, uint64 weight diff --git a/precompiles/xtokens/src/lib.rs b/precompiles/xtokens/src/lib.rs index c75540b8a3..5d3fd5f82a 100644 --- a/precompiles/xtokens/src/lib.rs +++ b/precompiles/xtokens/src/lib.rs @@ -35,8 +35,8 @@ use sp_std::{ }; use sp_weights::Weight; use xcm::{ - latest::{AssetId, Fungibility, MultiAsset, MultiAssets, MultiLocation, WeightLimit}, - VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, + latest::{Asset, AssetId, Assets, Fungibility, Location, WeightLimit}, + VersionedAsset, VersionedAssets, VersionedLocation, }; use xcm_primitives::{AccountIdToCurrencyId, DEFAULT_PROOF_SIZE}; @@ -80,7 +80,7 @@ where handle: &mut impl PrecompileHandle, currency_address: Address, amount: U256, - destination: MultiLocation, + destination: Location, weight: u64, ) -> EvmResult { let to_address: H160 = currency_address.into(); @@ -105,7 +105,7 @@ where let call = orml_xtokens::Call::::transfer { currency_id, amount, - dest: Box::new(VersionedMultiLocation::V3(destination)), + dest: Box::new(VersionedLocation::V4(destination)), dest_weight_limit, }; @@ -126,7 +126,7 @@ where currency_address: Address, amount: U256, fee: U256, - destination: MultiLocation, + destination: Location, weight: u64, ) -> EvmResult { let to_address: H160 = currency_address.into(); @@ -160,7 +160,7 @@ where currency_id, amount, fee, - dest: Box::new(VersionedMultiLocation::V3(destination)), + dest: Box::new(VersionedLocation::V4(destination)), dest_weight_limit, }; @@ -178,9 +178,9 @@ where #[precompile::public("transfer_multiasset((uint8,bytes[]),uint256,(uint8,bytes[]),uint64)")] fn transfer_multiasset( handle: &mut impl PrecompileHandle, - asset: MultiLocation, + asset: Location, amount: U256, - destination: MultiLocation, + destination: Location, weight: u64, ) -> EvmResult { let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); @@ -195,11 +195,11 @@ where }; let call = orml_xtokens::Call::::transfer_multiasset { - asset: Box::new(VersionedMultiAsset::V3(MultiAsset { - id: AssetId::Concrete(asset), + asset: Box::new(VersionedAsset::V4(Asset { + id: AssetId(asset), fun: Fungibility::Fungible(to_balance), })), - dest: Box::new(VersionedMultiLocation::V3(destination)), + dest: Box::new(VersionedLocation::V4(destination)), dest_weight_limit, }; @@ -221,10 +221,10 @@ where )] fn transfer_multiasset_with_fee( handle: &mut impl PrecompileHandle, - asset: MultiLocation, + asset: Location, amount: U256, fee: U256, - destination: MultiLocation, + destination: Location, weight: u64, ) -> EvmResult { let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); @@ -242,15 +242,15 @@ where }; let call = orml_xtokens::Call::::transfer_multiasset_with_fee { - asset: Box::new(VersionedMultiAsset::V3(MultiAsset { - id: AssetId::Concrete(asset.clone()), + asset: Box::new(VersionedAsset::V4(Asset { + id: AssetId(asset.clone()), fun: Fungibility::Fungible(amount), })), - fee: Box::new(VersionedMultiAsset::V3(MultiAsset { - id: AssetId::Concrete(asset), + fee: Box::new(VersionedAsset::V4(Asset { + id: AssetId(asset), fun: Fungibility::Fungible(fee), })), - dest: Box::new(VersionedMultiLocation::V3(destination)), + dest: Box::new(VersionedLocation::V4(destination)), dest_weight_limit, }; @@ -274,7 +274,7 @@ where handle: &mut impl PrecompileHandle, currencies: BoundedVec>, fee_item: u32, - destination: MultiLocation, + destination: Location, weight: u64, ) -> EvmResult { let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); @@ -315,7 +315,7 @@ where let call = orml_xtokens::Call::::transfer_multicurrencies { currencies, fee_item, - dest: Box::new(VersionedMultiLocation::V3(destination)), + dest: Box::new(VersionedLocation::V4(destination)), dest_weight_limit, }; @@ -337,15 +337,15 @@ where )] fn transfer_multi_assets( handle: &mut impl PrecompileHandle, - assets: BoundedVec>, + assets: BoundedVec>, fee_item: u32, - destination: MultiLocation, + destination: Location, weight: u64, ) -> EvmResult { let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); let assets: Vec<_> = assets.into(); - let multiasset_vec: EvmResult> = assets + let multiasset_vec: EvmResult> = assets .into_iter() .enumerate() .map(|(index, evm_multiasset)| { @@ -360,11 +360,10 @@ where // Since multiassets sorts them, we need to check whether the index is still correct, // and error otherwise as there is not much we can do other than that - let multiassets = - MultiAssets::from_sorted_and_deduplicated(multiasset_vec?).map_err(|_| { - RevertReason::custom("Provided assets either not sorted nor deduplicated") - .in_field("assets") - })?; + let assets = Assets::from_sorted_and_deduplicated(multiasset_vec?).map_err(|_| { + RevertReason::custom("Provided assets either not sorted nor deduplicated") + .in_field("assets") + })?; let dest_weight_limit = if weight == u64::MAX { WeightLimit::Unlimited @@ -373,9 +372,9 @@ where }; let call = orml_xtokens::Call::::transfer_multiassets { - assets: Box::new(VersionedMultiAssets::V3(multiassets)), + assets: Box::new(VersionedAssets::V4(assets)), fee_item, - dest: Box::new(VersionedMultiLocation::V3(destination)), + dest: Box::new(VersionedLocation::V4(destination)), dest_weight_limit, }; @@ -407,14 +406,14 @@ impl From<(Address, U256)> for Currency { } #[derive(solidity::Codec)] -pub struct EvmMultiAsset { - location: MultiLocation, +pub struct EvmAsset { + location: Location, amount: U256, } -impl From<(MultiLocation, U256)> for EvmMultiAsset { - fn from(tuple: (MultiLocation, U256)) -> Self { - EvmMultiAsset { +impl From<(Location, U256)> for EvmAsset { + fn from(tuple: (Location, U256)) -> Self { + EvmAsset { location: tuple.0, amount: tuple.1, } diff --git a/precompiles/xtokens/src/mock.rs b/precompiles/xtokens/src/mock.rs index dcd017aba1..cd98e6ceb9 100644 --- a/precompiles/xtokens/src/mock.rs +++ b/precompiles/xtokens/src/mock.rs @@ -37,7 +37,7 @@ use xcm::latest::{prelude::*, Error as XcmError}; use xcm_builder::{AllowUnpaidExecutionFrom, FixedWeightBounds, IsConcrete}; use xcm_executor::{ traits::{TransactAsset, WeightTrader}, - Assets, XcmExecutor, + AssetsInHolding, XcmExecutor, }; pub type AccountId = MockAccount; @@ -76,6 +76,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -112,7 +113,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } @@ -186,10 +186,10 @@ impl pallet_timestamp::Config for Runtime { } pub struct ConvertOriginToLocal; impl EnsureOrigin for ConvertOriginToLocal { - type Success = MultiLocation; + type Success = Location; - fn try_origin(_: Origin) -> Result { - Ok(MultiLocation::here()) + fn try_origin(_: Origin) -> Result { + Ok(Location::here()) } #[cfg(feature = "runtime-benchmarks")] @@ -203,10 +203,10 @@ impl SendXcm for DoNothingRouter { type Ticket = (); fn validate( - _destination: &mut Option, + _destination: &mut Option, _message: &mut Option>, ) -> SendResult { - Ok(((), MultiAssets::new())) + Ok(((), Assets::new())) } fn deliver(_: Self::Ticket) -> Result { @@ -218,20 +218,16 @@ pub type Barrier = AllowUnpaidExecutionFrom; pub struct DummyAssetTransactor; impl TransactAsset for DummyAssetTransactor { - fn deposit_asset( - _what: &MultiAsset, - _who: &MultiLocation, - _context: Option<&XcmContext>, - ) -> XcmResult { + fn deposit_asset(_what: &Asset, _who: &Location, _context: Option<&XcmContext>) -> XcmResult { Ok(()) } fn withdraw_asset( - _what: &MultiAsset, - _who: &MultiLocation, + _what: &Asset, + _who: &Location, _maybe_context: Option<&XcmContext>, - ) -> Result { - Ok(Assets::default()) + ) -> Result { + Ok(AssetsInHolding::default()) } } @@ -244,17 +240,17 @@ impl WeightTrader for DummyWeightTrader { fn buy_weight( &mut self, _weight: Weight, - _payment: Assets, + _payment: AssetsInHolding, _context: &XcmContext, - ) -> Result { - Ok(Assets::default()) + ) -> Result { + Ok(AssetsInHolding::default()) } } parameter_types! { - pub UniversalLocation: InteriorMultiLocation = Here; - pub MatcherLocation: MultiLocation = MultiLocation::here(); - pub ReachableDest: Option = Some(MultiLocation::here()); + pub UniversalLocation: InteriorLocation = Here; + pub MatcherLocation: Location = Location::here(); + pub ReachableDest: Option = Some(Location::here()); pub const MaxAssetsIntoHolding: u32 = 64; } @@ -314,6 +310,8 @@ impl xcm_executor::Config for XcmConfig { type UniversalAliases = Nothing; type SafeCallFilter = Everything; type Aliasers = Nothing; + + type TransactionalProcessor = (); } #[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] @@ -337,65 +335,62 @@ impl AccountIdToCurrencyId for Runtime { pub struct CurrencyIdToMultiLocation; -impl sp_runtime::traits::Convert> for CurrencyIdToMultiLocation { - fn convert(currency: CurrencyId) -> Option { +impl sp_runtime::traits::Convert> for CurrencyIdToMultiLocation { + fn convert(currency: CurrencyId) -> Option { match currency { CurrencyId::SelfReserve => { - let multi: MultiLocation = SelfReserve::get(); + let multi: Location = SelfReserve::get(); Some(multi) } // To distinguish between relay and others, specially for reserve asset CurrencyId::OtherReserve(asset) => { if asset == 0 { - Some(MultiLocation::parent()) + Some(Location::parent()) } else { - Some(MultiLocation::new( - 1, - Junctions::X2(Parachain(2), GeneralIndex(asset)), - )) + Some(Location::new(1, [Parachain(2), GeneralIndex(asset)])) } } } } } -pub struct AccountIdToMultiLocation; -impl sp_runtime::traits::Convert for AccountIdToMultiLocation { - fn convert(account: AccountId) -> MultiLocation { +pub struct AccountIdToLocation; +impl sp_runtime::traits::Convert for AccountIdToLocation { + fn convert(account: AccountId) -> Location { let as_h160: H160 = account.into(); - MultiLocation::new( + Location::new( 1, - Junctions::X1(AccountKey20 { + [AccountKey20 { network: None, key: as_h160.as_fixed_bytes().clone(), - }), + }], ) } } parameter_types! { - pub Ancestry: MultiLocation = Parachain(ParachainId::get().into()).into(); + pub Ancestry: Location = Parachain(ParachainId::get().into()).into(); pub const BaseXcmWeight: Weight = Weight::from_parts(1000u64, 1000u64); pub const RelayNetwork: NetworkId = NetworkId::Polkadot; pub const MaxAssetsForTransfer: usize = 2; - pub SelfLocation: MultiLocation = - MultiLocation::new(1, Junctions::X1(Parachain(ParachainId::get().into()))); + pub SelfLocation: Location = + Location::new(1, [Parachain(ParachainId::get().into())]); - pub SelfReserve: MultiLocation = MultiLocation::new( + pub SelfReserve: Location = Location::new( 1, - Junctions::X2( + [ Parachain(ParachainId::get().into()), PalletInstance( ::PalletInfo::index::().unwrap() as u8 ) - )); + ]); pub MaxInstructions: u32 = 100; } parameter_type_with_key! { - pub ParachainMinFee: |_location: MultiLocation| -> Option { + pub ParachainMinFee: |_location: Location| -> Option { Some(u128::MAX) }; } @@ -404,7 +399,7 @@ impl orml_xtokens::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = AccountIdToMultiLocation; + type AccountIdToLocation = AccountIdToLocation; type CurrencyIdConvert = CurrencyIdToMultiLocation; type XcmExecutor = XcmExecutor; type SelfLocation = SelfLocation; @@ -413,7 +408,7 @@ impl orml_xtokens::Config for Runtime { type UniversalLocation = UniversalLocation; type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; - type MultiLocationsFilter = Everything; + type LocationsFilter = Everything; type ReserveProvider = AbsoluteReserveProvider; } diff --git a/precompiles/xtokens/src/tests.rs b/precompiles/xtokens/src/tests.rs index 29bffdef3c..d80f1acc9e 100644 --- a/precompiles/xtokens/src/tests.rs +++ b/precompiles/xtokens/src/tests.rs @@ -18,14 +18,12 @@ use crate::mock::{ events, AssetAccount, CurrencyId, CurrencyIdToMultiLocation, ExtBuilder, PCall, Precompiles, PrecompilesValue, Runtime, SelfReserveAccount, }; -use crate::{Currency, EvmMultiAsset}; +use crate::{Currency, EvmAsset}; use orml_xtokens::Event as XtokensEvent; use precompile_utils::{prelude::*, testing::*}; use sp_core::U256; use sp_runtime::traits::Convert; -use xcm::latest::{ - AssetId, Fungibility, Junction, Junctions, MultiAsset, MultiAssets, MultiLocation, -}; +use xcm::latest::{Asset, AssetId, Assets, Fungibility, Junction, Junctions, Location}; fn precompiles() -> Precompiles { PrecompilesValue::get() @@ -77,12 +75,12 @@ fn transfer_self_reserve_works() { .with_balances(vec![(Alice.into(), 1000)]) .build() .execute_with(|| { - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); precompiles() @@ -100,13 +98,11 @@ fn transfer_self_reserve_works() { .expect_no_logs() .execute_returns(()); - let expected_asset: MultiAsset = MultiAsset { - id: AssetId::Concrete( - CurrencyIdToMultiLocation::convert(CurrencyId::SelfReserve).unwrap(), - ), + let expected_asset: Asset = Asset { + id: AssetId(CurrencyIdToMultiLocation::convert(CurrencyId::SelfReserve).unwrap()), fun: Fungibility::Fungible(500), }; - let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredMultiAssets { + let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredAssets { sender: Alice.into(), assets: vec![expected_asset.clone()].into(), fee: expected_asset, @@ -124,12 +120,12 @@ fn transfer_to_reserve_works() { .with_balances(vec![(Alice.into(), 1000)]) .build() .execute_with(|| { - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); // We are transferring asset 0, which we have instructed to be the relay asset precompiles() @@ -147,13 +143,13 @@ fn transfer_to_reserve_works() { .expect_no_logs() .execute_returns(()); - let expected_asset: MultiAsset = MultiAsset { - id: AssetId::Concrete( + let expected_asset: Asset = Asset { + id: AssetId( CurrencyIdToMultiLocation::convert(CurrencyId::OtherReserve(0u128)).unwrap(), ), fun: Fungibility::Fungible(500), }; - let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredMultiAssets { + let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredAssets { sender: Alice.into(), assets: vec![expected_asset.clone()].into(), fee: expected_asset, @@ -171,12 +167,12 @@ fn transfer_to_reserve_with_unlimited_weight_works() { .with_balances(vec![(Alice.into(), 1000)]) .build() .execute_with(|| { - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); // We are transferring asset 0, which we have instructed to be the relay asset precompiles() @@ -194,13 +190,13 @@ fn transfer_to_reserve_with_unlimited_weight_works() { .expect_no_logs() .execute_returns(()); - let expected_asset: MultiAsset = MultiAsset { - id: AssetId::Concrete( + let expected_asset: Asset = Asset { + id: AssetId( CurrencyIdToMultiLocation::convert(CurrencyId::OtherReserve(0u128)).unwrap(), ), fun: Fungibility::Fungible(500), }; - let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredMultiAssets { + let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredAssets { sender: Alice.into(), assets: vec![expected_asset.clone()].into(), fee: expected_asset, @@ -218,12 +214,12 @@ fn transfer_to_reserve_with_fee_works() { .with_balances(vec![(Alice.into(), 1000)]) .build() .execute_with(|| { - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); // We are transferring asset 0, which we have instructed to be the relay asset // Fees are not trully charged, so no worries @@ -243,19 +239,19 @@ fn transfer_to_reserve_with_fee_works() { .expect_no_logs() .execute_returns(()); - let expected_asset: MultiAsset = MultiAsset { - id: AssetId::Concrete( + let expected_asset: Asset = Asset { + id: AssetId( CurrencyIdToMultiLocation::convert(CurrencyId::OtherReserve(0u128)).unwrap(), ), fun: Fungibility::Fungible(500), }; - let expected_fee: MultiAsset = MultiAsset { - id: AssetId::Concrete( + let expected_fee: Asset = Asset { + id: AssetId( CurrencyIdToMultiLocation::convert(CurrencyId::OtherReserve(0u128)).unwrap(), ), fun: Fungibility::Fungible(50), }; - let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredMultiAssets { + let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredAssets { sender: Alice.into(), assets: vec![expected_asset.clone(), expected_fee.clone()].into(), fee: expected_fee, @@ -274,12 +270,12 @@ fn transfer_non_reserve_to_non_reserve_works() { .with_balances(vec![(Alice.into(), 1000)]) .build() .execute_with(|| { - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); // We are transferring asset 1, which corresponds to another parachain Id asset @@ -298,13 +294,13 @@ fn transfer_non_reserve_to_non_reserve_works() { .expect_no_logs() .execute_returns(()); - let expected_asset: MultiAsset = MultiAsset { - id: AssetId::Concrete( + let expected_asset: Asset = Asset { + id: AssetId( CurrencyIdToMultiLocation::convert(CurrencyId::OtherReserve(1u128)).unwrap(), ), fun: Fungibility::Fungible(500), }; - let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredMultiAssets { + let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredAssets { sender: Alice.into(), assets: vec![expected_asset.clone()].into(), fee: expected_asset, @@ -322,12 +318,12 @@ fn transfer_non_reserve_to_non_reserve_with_fee_works() { .with_balances(vec![(Alice.into(), 1000)]) .build() .execute_with(|| { - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); // We are transferring asset 1, which corresponds to another parachain Id asset @@ -347,19 +343,19 @@ fn transfer_non_reserve_to_non_reserve_with_fee_works() { .expect_no_logs() .execute_returns(()); - let expected_asset: MultiAsset = MultiAsset { - id: AssetId::Concrete( + let expected_asset: Asset = Asset { + id: AssetId( CurrencyIdToMultiLocation::convert(CurrencyId::OtherReserve(1u128)).unwrap(), ), fun: Fungibility::Fungible(500), }; - let expected_fee: MultiAsset = MultiAsset { - id: AssetId::Concrete( + let expected_fee: Asset = Asset { + id: AssetId( CurrencyIdToMultiLocation::convert(CurrencyId::OtherReserve(1u128)).unwrap(), ), fun: Fungibility::Fungible(50), }; - let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredMultiAssets { + let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredAssets { sender: Alice.into(), assets: vec![expected_asset.clone(), expected_fee.clone()].into(), fee: expected_fee, @@ -377,15 +373,15 @@ fn transfer_multi_asset_to_reserve_works() { .with_balances(vec![(Alice.into(), 1000)]) .build() .execute_with(|| { - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); - let asset = MultiLocation::parent(); + let asset = Location::parent(); precompiles() .prepare_test( @@ -402,11 +398,11 @@ fn transfer_multi_asset_to_reserve_works() { .expect_no_logs() .execute_returns(()); - let expected_asset: MultiAsset = MultiAsset { - id: AssetId::Concrete(asset), + let expected_asset: Asset = Asset { + id: AssetId(asset), fun: Fungibility::Fungible(500), }; - let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredMultiAssets { + let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredAssets { sender: Alice.into(), assets: vec![expected_asset.clone()].into(), fee: expected_asset, @@ -425,12 +421,12 @@ fn transfer_multi_asset_self_reserve_works() { .with_balances(vec![(Alice.into(), 1000)]) .build() .execute_with(|| { - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); let self_reserve = crate::mock::SelfReserve::get(); @@ -450,11 +446,11 @@ fn transfer_multi_asset_self_reserve_works() { .expect_no_logs() .execute_returns(()); - let expected_asset: MultiAsset = MultiAsset { - id: AssetId::Concrete(self_reserve), + let expected_asset: Asset = Asset { + id: AssetId(self_reserve), fun: Fungibility::Fungible(500), }; - let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredMultiAssets { + let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredAssets { sender: Alice.into(), assets: vec![expected_asset.clone()].into(), fee: expected_asset, @@ -472,12 +468,12 @@ fn transfer_multi_asset_self_reserve_with_fee_works() { .with_balances(vec![(Alice.into(), 1000)]) .build() .execute_with(|| { - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); let self_reserve = crate::mock::SelfReserve::get(); @@ -498,15 +494,15 @@ fn transfer_multi_asset_self_reserve_with_fee_works() { .expect_no_logs() .execute_returns(()); - let expected_asset: MultiAsset = MultiAsset { - id: AssetId::Concrete(self_reserve.clone()), + let expected_asset: Asset = Asset { + id: AssetId(self_reserve.clone()), fun: Fungibility::Fungible(500), }; - let expected_fee: MultiAsset = MultiAsset { - id: AssetId::Concrete(self_reserve), + let expected_fee: Asset = Asset { + id: AssetId(self_reserve), fun: Fungibility::Fungible(50), }; - let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredMultiAssets { + let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredAssets { sender: Alice.into(), assets: vec![expected_asset.clone(), expected_fee.clone()].into(), fee: expected_fee, @@ -524,18 +520,16 @@ fn transfer_multi_asset_non_reserve_to_non_reserve() { .with_balances(vec![(Alice.into(), 1000)]) .build() .execute_with(|| { - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); - let asset_location = MultiLocation::new( - 1, - Junctions::X2(Junction::Parachain(2), Junction::GeneralIndex(5u128)), - ); + let asset_location = + Location::new(1, [Junction::Parachain(2), Junction::GeneralIndex(5u128)]); precompiles() .prepare_test( @@ -552,11 +546,11 @@ fn transfer_multi_asset_non_reserve_to_non_reserve() { .expect_no_logs() .execute_returns(()); - let expected_asset: MultiAsset = MultiAsset { - id: AssetId::Concrete(asset_location), + let expected_asset: Asset = Asset { + id: AssetId(asset_location), fun: Fungibility::Fungible(500), }; - let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredMultiAssets { + let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredAssets { sender: Alice.into(), assets: vec![expected_asset.clone()].into(), fee: expected_asset, @@ -574,18 +568,16 @@ fn transfer_multi_asset_non_reserve_to_non_reserve_with_fee() { .with_balances(vec![(Alice.into(), 1000)]) .build() .execute_with(|| { - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); - let asset_location = MultiLocation::new( - 1, - Junctions::X2(Junction::Parachain(2), Junction::GeneralIndex(5u128)), - ); + let asset_location = + Location::new(1, [Junction::Parachain(2), Junction::GeneralIndex(5u128)]); precompiles() .prepare_test( @@ -603,15 +595,15 @@ fn transfer_multi_asset_non_reserve_to_non_reserve_with_fee() { .expect_no_logs() .execute_returns(()); - let expected_asset: MultiAsset = MultiAsset { - id: AssetId::Concrete(asset_location.clone()), + let expected_asset: Asset = Asset { + id: AssetId(asset_location.clone()), fun: Fungibility::Fungible(500), }; - let expected_fee: MultiAsset = MultiAsset { - id: AssetId::Concrete(asset_location), + let expected_fee: Asset = Asset { + id: AssetId(asset_location), fun: Fungibility::Fungible(50), }; - let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredMultiAssets { + let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredAssets { sender: Alice.into(), assets: vec![expected_asset.clone(), expected_fee.clone()].into(), fee: expected_fee, @@ -629,12 +621,12 @@ fn transfer_multi_currencies() { .with_balances(vec![(Alice.into(), 1000)]) .build() .execute_with(|| { - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); let currencies: Vec = vec![ (Address(AssetAccount(1u128).into()), U256::from(500)).into(), @@ -657,19 +649,19 @@ fn transfer_multi_currencies() { .expect_no_logs() .execute_returns(()); - let expected_asset_1: MultiAsset = MultiAsset { - id: AssetId::Concrete( + let expected_asset_1: Asset = Asset { + id: AssetId( CurrencyIdToMultiLocation::convert(CurrencyId::OtherReserve(1u128)).unwrap(), ), fun: Fungibility::Fungible(500), }; - let expected_asset_2: MultiAsset = MultiAsset { - id: AssetId::Concrete( + let expected_asset_2: Asset = Asset { + id: AssetId( CurrencyIdToMultiLocation::convert(CurrencyId::OtherReserve(2u128)).unwrap(), ), fun: Fungibility::Fungible(500), }; - let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredMultiAssets { + let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredAssets { sender: Alice.into(), assets: vec![expected_asset_1.clone(), expected_asset_2].into(), fee: expected_asset_1, @@ -687,32 +679,28 @@ fn transfer_multi_assets() { .with_balances(vec![(Alice.into(), 1000)]) .build() .execute_with(|| { - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X2( + [ Junction::Parachain(2), Junction::AccountId32 { network: None, id: [1u8; 32], }, - ), + ], ); - let asset_1_location = MultiLocation::new( - 1, - Junctions::X2(Junction::Parachain(2), Junction::GeneralIndex(0u128)), - ); - let asset_2_location = MultiLocation::new( - 1, - Junctions::X2(Junction::Parachain(2), Junction::GeneralIndex(1u128)), - ); + let asset_1_location = + Location::new(1, [Junction::Parachain(2), Junction::GeneralIndex(0u128)]); + let asset_2_location = + Location::new(1, [Junction::Parachain(2), Junction::GeneralIndex(1u128)]); - let assets: Vec = vec![ + let assets: Vec = vec![ (asset_1_location.clone(), U256::from(500)).into(), (asset_2_location.clone(), U256::from(500)).into(), ]; - let multiassets = MultiAssets::from_sorted_and_deduplicated(vec![ + let multiassets = Assets::from_sorted_and_deduplicated(vec![ (asset_1_location.clone(), 500).into(), (asset_2_location, 500).into(), ]) @@ -734,7 +722,7 @@ fn transfer_multi_assets() { .expect_no_logs() .execute_returns(()); - let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredMultiAssets { + let expected: crate::mock::RuntimeEvent = XtokensEvent::TransferredAssets { sender: Alice.into(), assets: multiassets, fee: (asset_1_location, 500).into(), @@ -754,12 +742,12 @@ fn transfer_multi_currencies_cannot_insert_more_than_max() { .with_balances(vec![(Alice.into(), 1000)]) .build() .execute_with(|| { - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); let currencies: Vec = vec![ (Address(AssetAccount(1u128).into()), U256::from(500)).into(), @@ -789,32 +777,26 @@ fn transfer_multi_assets_cannot_insert_more_than_max() { .with_balances(vec![(Alice.into(), 1000)]) .build() .execute_with(|| { - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X2( + [ Junction::Parachain(2), Junction::AccountId32 { network: None, id: [1u8; 32], }, - ), + ], ); - let asset_1_location = MultiLocation::new( - 1, - Junctions::X2(Junction::Parachain(2), Junction::GeneralIndex(0u128)), - ); - let asset_2_location = MultiLocation::new( - 1, - Junctions::X2(Junction::Parachain(2), Junction::GeneralIndex(1u128)), - ); + let asset_1_location = + Location::new(1, [Junction::Parachain(2), Junction::GeneralIndex(0u128)]); + let asset_2_location = + Location::new(1, [Junction::Parachain(2), Junction::GeneralIndex(1u128)]); - let asset_3_location = MultiLocation::new( - 1, - Junctions::X2(Junction::Parachain(2), Junction::GeneralIndex(2u128)), - ); + let asset_3_location = + Location::new(1, [Junction::Parachain(2), Junction::GeneralIndex(2u128)]); - let assets: Vec = vec![ + let assets: Vec = vec![ (asset_1_location.clone(), U256::from(500)).into(), (asset_2_location.clone(), U256::from(500)).into(), (asset_3_location.clone(), U256::from(500)).into(), @@ -842,28 +824,24 @@ fn transfer_multi_assets_is_not_sorted_error() { .with_balances(vec![(Alice.into(), 1000)]) .build() .execute_with(|| { - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X2( + [ Junction::Parachain(2), Junction::AccountId32 { network: None, id: [1u8; 32], }, - ), + ], ); // Disordered vec creation - let asset_1_location = MultiLocation::new( - 1, - Junctions::X2(Junction::Parachain(2), Junction::GeneralIndex(1u128)), - ); - let asset_2_location = MultiLocation::new( - 1, - Junctions::X2(Junction::Parachain(2), Junction::GeneralIndex(0u128)), - ); + let asset_1_location = + Location::new(1, [Junction::Parachain(2), Junction::GeneralIndex(1u128)]); + let asset_2_location = + Location::new(1, [Junction::Parachain(2), Junction::GeneralIndex(0u128)]); - let assets: Vec = vec![ + let assets: Vec = vec![ (asset_1_location.clone(), U256::from(500)).into(), (asset_2_location.clone(), U256::from(500)).into(), ]; diff --git a/primitives/xcm/src/asset_id_conversions.rs b/primitives/xcm/src/asset_id_conversions.rs index 539f9aa02d..f049716545 100644 --- a/primitives/xcm/src/asset_id_conversions.rs +++ b/primitives/xcm/src/asset_id_conversions.rs @@ -16,28 +16,28 @@ use sp_runtime::traits::MaybeEquivalence; use sp_std::marker::PhantomData; -use xcm::latest::MultiLocation; +use xcm::latest::Location; use xcm_executor::traits::ConvertLocation; /// Converter struct implementing `AssetIdConversion` converting a numeric asset ID -/// (must be `TryFrom/TryInto`) into a MultiLocation Value and vice versa through +/// (must be `TryFrom/TryInto`) into a Location Value and vice versa through /// an intermediate generic type AssetType. /// The trait bounds enforce is that the AssetTypeGetter trait is also implemented for /// AssetIdInfoGetter pub struct AsAssetType( PhantomData<(AssetId, AssetType, AssetIdInfoGetter)>, ); -impl MaybeEquivalence +impl MaybeEquivalence for AsAssetType where AssetId: Clone, - AssetType: From + Into> + Clone, + AssetType: From + Into> + Clone, AssetIdInfoGetter: AssetTypeGetter, { - fn convert(id: &MultiLocation) -> Option { + fn convert(id: &Location) -> Option { AssetIdInfoGetter::get_asset_id(id.clone().into()) } - fn convert_back(what: &AssetId) -> Option { + fn convert_back(what: &AssetId) -> Option { AssetIdInfoGetter::get_asset_type(what.clone()).and_then(Into::into) } } @@ -45,10 +45,10 @@ impl ConvertLocation for AsAssetType where AssetId: Clone, - AssetType: From + Into> + Clone, + AssetType: From + Into> + Clone, AssetIdInfoGetter: AssetTypeGetter, { - fn convert_location(id: &MultiLocation) -> Option { + fn convert_location(id: &Location) -> Option { AssetIdInfoGetter::get_asset_id(id.clone().into()) } } diff --git a/primitives/xcm/src/fee_handlers.rs b/primitives/xcm/src/fee_handlers.rs index e4cfadbfc1..ff62a5053c 100644 --- a/primitives/xcm/src/fee_handlers.rs +++ b/primitives/xcm/src/fee_handlers.rs @@ -28,24 +28,22 @@ use frame_support::{ }; use sp_runtime::traits::Zero; use sp_std::marker::PhantomData; -use xcm::latest::{ - AssetId as xcmAssetId, Error as XcmError, Fungibility, MultiAsset, MultiLocation, -}; +use xcm::latest::{Asset, AssetId as xcmAssetId, Error as XcmError, Fungibility, Location}; use xcm_builder::TakeRevenue; use xcm_executor::traits::{MatchesFungibles, WeightTrader}; pub struct FirstAssetTrader< - AssetType: From + Clone, + AssetType: From + Clone, AssetIdInfoGetter: UnitsToWeightRatio, R: TakeRevenue, >( Weight, - Option<(MultiLocation, u128, u128)>, // id, amount, units_per_second + Option<(Location, u128, u128)>, // id, amount, units_per_second PhantomData<(AssetType, AssetIdInfoGetter, R)>, ); impl< - AssetType: From + Clone, + AssetType: From + Clone, AssetIdInfoGetter: UnitsToWeightRatio, R: TakeRevenue, > WeightTrader for FirstAssetTrader @@ -56,9 +54,9 @@ impl< fn buy_weight( &mut self, weight: Weight, - payment: xcm_executor::Assets, + payment: xcm_executor::AssetsInHolding, _context: &XcmContext, - ) -> Result { + ) -> Result { // can only call one time if self.1.is_some() { // TODO: better error @@ -75,8 +73,8 @@ impl< // We are only going to check first asset for now. This should be sufficient for simple token // transfers. We will see later if we change this. match (first_asset.id, first_asset.fun) { - (xcmAssetId::Concrete(id), Fungibility::Fungible(_)) => { - let asset_type: AssetType = id.clone().into(); + (xcmAssetId(location), Fungibility::Fungible(_)) => { + let asset_type: AssetType = location.clone().into(); // Shortcut if we know the asset is not supported // This involves the same db read per block, mitigating any attack based on // non-supported assets @@ -96,16 +94,16 @@ impl< return Ok(payment); } - let required = MultiAsset { + let required = Asset { fun: Fungibility::Fungible(amount), - id: xcmAssetId::Concrete(id.clone()), + id: xcmAssetId(location.clone()), }; let unused = payment .checked_sub(required) .map_err(|_| XcmError::TooExpensive)?; self.0 = weight; - self.1 = Some((id, amount, units_per_second)); + self.1 = Some((location, amount, units_per_second)); return Ok(unused); } else { @@ -117,21 +115,21 @@ impl< } // Refund weight. We will refund in whatever asset is stored in self. - fn refund_weight(&mut self, weight: Weight, _context: &XcmContext) -> Option { - if let Some((id, prev_amount, units_per_second)) = self.1.clone() { + fn refund_weight(&mut self, weight: Weight, _context: &XcmContext) -> Option { + if let Some((location, prev_amount, units_per_second)) = self.1.clone() { let weight = weight.min(self.0); self.0 -= weight; let amount = units_per_second * (weight.ref_time() as u128) / (WEIGHT_REF_TIME_PER_SECOND as u128); let amount = amount.min(prev_amount); self.1 = Some(( - id.clone(), + location.clone(), prev_amount.saturating_sub(amount), units_per_second, )); - Some(MultiAsset { + Some(Asset { fun: Fungibility::Fungible(amount), - id: xcmAssetId::Concrete(id.clone()), + id: xcmAssetId(location.clone()), }) } else { None @@ -141,7 +139,7 @@ impl< /// Deal with spent fees, deposit them as dictated by R impl< - AssetType: From + Clone, + AssetType: From + Clone, AssetIdInfoGetter: UnitsToWeightRatio, R: TakeRevenue, > Drop for FirstAssetTrader @@ -156,7 +154,7 @@ impl< } /// XCM fee depositor to which we implement the TakeRevenue trait -/// It receives a fungibles::Mutate implemented argument, a matcher to convert MultiAsset into +/// It receives a fungibles::Mutate implemented argument, a matcher to convert Asset into /// AssetId and amount, and the fee receiver account pub struct XcmFeesToAccount( PhantomData<(Assets, Matcher, AccountId, ReceiverAccount)>, @@ -168,7 +166,7 @@ impl< ReceiverAccount: Get, > TakeRevenue for XcmFeesToAccount { - fn take_revenue(revenue: MultiAsset) { + fn take_revenue(revenue: Asset) { match Matcher::matches_fungibles(&revenue) { Ok((asset_id, amount)) => { let ok = Assets::mint_into(asset_id, &ReceiverAccount::get(), amount).is_ok(); @@ -198,19 +196,19 @@ mod test { use super::*; use cumulus_primitives_core::XcmHash; use xcm::latest::{AssetId, Fungibility, Junction, Junctions}; - use xcm_executor::Assets; + use xcm_executor::AssetsInHolding; - const ARBITRARY_ML: MultiLocation = MultiLocation { + const ARBITRARY_ML: Location = Location { parents: 0u8, interior: Junctions::Here, }; - const ARBITRARY_ID: AssetId = AssetId::Concrete(ARBITRARY_ML); + const ARBITRARY_ID: AssetId = AssetId(ARBITRARY_ML); - impl UnitsToWeightRatio for () { - fn payment_is_supported(_asset_type: MultiLocation) -> bool { + impl UnitsToWeightRatio for () { + fn payment_is_supported(_asset_type: Location) -> bool { true } - fn get_units_per_second(_asset_type: MultiLocation) -> Option { + fn get_units_per_second(_asset_type: Location) -> Option { // return WEIGHT_REF_TIME_PER_SECOND to cancel the division out in buy_weight() // this should make weight and payment amounts directly comparable Some(WEIGHT_REF_TIME_PER_SECOND as u128) @@ -221,19 +219,19 @@ mod test { fn test_buy_weight_accounts_weight_properly() { let amount = 1000u128; - let mut payment = Assets::new(); - let multilocation = MultiLocation { + let mut payment = AssetsInHolding::new(); + let location = Location { parents: 0u8, interior: Junctions::Here, }; - payment.subsume(MultiAsset { - id: AssetId::Concrete(multilocation), + payment.subsume(Asset { + id: AssetId(location.clone()), fun: Fungibility::Fungible(amount), }); - let mut trader: FirstAssetTrader = FirstAssetTrader::new(); + let mut trader: FirstAssetTrader = FirstAssetTrader::new(); let ctx = XcmContext { - origin: Some(multilocation), + origin: Some(location), message_id: XcmHash::default(), topic: None, }; @@ -246,20 +244,20 @@ mod test { #[test] fn cant_call_buy_weight_twice() { - let mut trader: FirstAssetTrader = FirstAssetTrader::new(); + let mut trader: FirstAssetTrader = FirstAssetTrader::new(); // should be able to buy once - let mut asset_one_payment = Assets::new(); - let multilocation = MultiLocation { + let mut asset_one_payment = AssetsInHolding::new(); + let location = Location { parents: 0u8, - interior: Junctions::X1(Junction::Parachain(1000)), + interior: [Junction::Parachain(1000)].into(), }; - asset_one_payment.subsume(MultiAsset { - id: AssetId::Concrete(multilocation), + asset_one_payment.subsume(Asset { + id: AssetId(location.clone()), fun: Fungibility::Fungible(100u128), }); let ctx = XcmContext { - origin: Some(multilocation), + origin: Some(location), message_id: XcmHash::default(), topic: None, }; @@ -271,9 +269,9 @@ mod test { assert_eq!( trader.1, Some(( - MultiLocation { + Location { parents: 0u8, - interior: Junctions::X1(Junction::Parachain(1000)) + interior: [Junction::Parachain(1000)].into() }, 100, WEIGHT_REF_TIME_PER_SECOND as u128 @@ -281,17 +279,17 @@ mod test { ); // but not twice - let mut asset_two_payment = xcm_executor::Assets::new(); - let multi_location = MultiLocation { + let mut asset_two_payment = xcm_executor::AssetsInHolding::new(); + let location = Location { parents: 0u8, - interior: Junctions::X1(Junction::Parachain(1001)), + interior: [Junction::Parachain(1001)].into(), }; - asset_two_payment.subsume(MultiAsset { - id: AssetId::Concrete(multi_location), + asset_two_payment.subsume(Asset { + id: AssetId(location.clone()), fun: Fungibility::Fungible(10_000u128), }); let ctx = XcmContext { - origin: Some(multi_location), + origin: Some(location), message_id: XcmHash::default(), topic: None, }; @@ -305,9 +303,9 @@ mod test { assert_eq!( trader.1, Some(( - MultiLocation { + Location { parents: 0u8, - interior: Junctions::X1(Junction::Parachain(1000)) + interior: [Junction::Parachain(1000)].into() }, 100, WEIGHT_REF_TIME_PER_SECOND as u128 @@ -319,13 +317,13 @@ mod test { fn can_call_refund_weight_with_all_weight() { let amount = 1000u128; - let mut payment = Assets::new(); - payment.subsume(MultiAsset { + let mut payment = AssetsInHolding::new(); + payment.subsume(Asset { id: ARBITRARY_ID, fun: Fungibility::Fungible(amount), }); - let mut trader: FirstAssetTrader = FirstAssetTrader::new(); + let mut trader: FirstAssetTrader = FirstAssetTrader::new(); let ctx = XcmContext { origin: Some(ARBITRARY_ML), message_id: XcmHash::default(), @@ -339,7 +337,7 @@ mod test { assert_eq!( trader.refund_weight(1000u64.into(), &ctx), - Some(MultiAsset { + Some(Asset { fun: Fungibility::Fungible(1000), id: ARBITRARY_ID, }) @@ -350,13 +348,13 @@ mod test { fn can_call_refund_multiple_times() { let amount = 1000u128; - let mut payment = Assets::new(); - payment.subsume(MultiAsset { + let mut payment = AssetsInHolding::new(); + payment.subsume(Asset { id: ARBITRARY_ID, fun: Fungibility::Fungible(amount), }); - let mut trader: FirstAssetTrader = FirstAssetTrader::new(); + let mut trader: FirstAssetTrader = FirstAssetTrader::new(); let ctx = XcmContext { origin: Some(ARBITRARY_ML), message_id: XcmHash::default(), @@ -370,7 +368,7 @@ mod test { assert_eq!( trader.refund_weight(100u64.into(), &ctx), - Some(MultiAsset { + Some(Asset { fun: Fungibility::Fungible(100), id: ARBITRARY_ID, }) @@ -383,7 +381,7 @@ mod test { // can call again assert_eq!( trader.refund_weight(200u64.into(), &ctx), - Some(MultiAsset { + Some(Asset { fun: Fungibility::Fungible(200), id: ARBITRARY_ID, }) @@ -398,8 +396,8 @@ mod test { fn refund_weight_caps_weight() { let amount = 1000u128; - let mut payment = Assets::new(); - payment.subsume(MultiAsset { + let mut payment = AssetsInHolding::new(); + payment.subsume(Asset { id: ARBITRARY_ID, fun: Fungibility::Fungible(amount), }); @@ -408,7 +406,7 @@ mod test { message_id: XcmHash::default(), topic: None, }; - let mut trader: FirstAssetTrader = FirstAssetTrader::new(); + let mut trader: FirstAssetTrader = FirstAssetTrader::new(); let unused = trader .buy_weight((amount as u64).into(), payment.clone(), &ctx) .expect("can buy weight once"); @@ -418,7 +416,7 @@ mod test { // can't call with more weight assert_eq!( trader.refund_weight(9999u64.into(), &ctx), - Some(MultiAsset { + Some(Asset { fun: Fungibility::Fungible(1000), id: ARBITRARY_ID, }) @@ -430,8 +428,8 @@ mod test { fn refund_weight_caps_currency() { let amount = 1000u128; - let mut payment = Assets::new(); - payment.subsume(MultiAsset { + let mut payment = AssetsInHolding::new(); + payment.subsume(Asset { id: ARBITRARY_ID, fun: Fungibility::Fungible(amount), }); @@ -441,7 +439,7 @@ mod test { message_id: XcmHash::default(), topic: None, }; - let mut trader: FirstAssetTrader = FirstAssetTrader::new(); + let mut trader: FirstAssetTrader = FirstAssetTrader::new(); let unused = trader .buy_weight((amount as u64).into(), payment.clone(), &ctx) .expect("can buy weight once"); @@ -455,7 +453,7 @@ mod test { // can't call with more weight assert_eq!( trader.refund_weight(1500u64.into(), &ctx), - Some(MultiAsset { + Some(Asset { fun: Fungibility::Fungible(1000), id: ARBITRARY_ID, }) diff --git a/primitives/xcm/src/filter_asset_max_fee.rs b/primitives/xcm/src/filter_asset_max_fee.rs index af7bc2d64e..93668b6b74 100644 --- a/primitives/xcm/src/filter_asset_max_fee.rs +++ b/primitives/xcm/src/filter_asset_max_fee.rs @@ -15,7 +15,7 @@ // along with Moonbeam. If not, see . use frame_support::traits::Get; -use xcm::latest::MultiAsset; +use xcm::latest::Asset; use xcm_builder::Case; /// Filters max fee for a given multiasset. @@ -24,12 +24,12 @@ use xcm_builder::Case; /// If any item returns `true`, it short-circuits, else `false` is returned. pub trait FilterMaxAssetFee { /// A filter to be able to compare against a max asset. - fn filter_max_asset_fee(asset: &MultiAsset) -> bool; + fn filter_max_asset_fee(asset: &Asset) -> bool; } #[impl_trait_for_tuples::impl_for_tuples(30)] impl FilterMaxAssetFee for Tuple { - fn filter_max_asset_fee(what: &MultiAsset) -> bool { + fn filter_max_asset_fee(what: &Asset) -> bool { for_tuples!( #( if Tuple::filter_max_asset_fee(what) { return true } )* ); @@ -42,8 +42,8 @@ impl FilterMaxAssetFee for Tuple { } } -impl> FilterMaxAssetFee for Case { - fn filter_max_asset_fee(asset: &MultiAsset) -> bool { +impl> FilterMaxAssetFee for Case { + fn filter_max_asset_fee(asset: &Asset) -> bool { log::trace!(target: "xcm::filter_max_asset_fee", "Case asset: {:?}", asset); let max = T::get(); max.contains(asset) diff --git a/primitives/xcm/src/origin_conversion.rs b/primitives/xcm/src/origin_conversion.rs index 39400bb62e..9ac288992e 100644 --- a/primitives/xcm/src/origin_conversion.rs +++ b/primitives/xcm/src/origin_conversion.rs @@ -17,22 +17,22 @@ use frame_support::traits::{Get, OriginTrait}; use orml_traits::location::{RelativeReserveProvider, Reserve}; use sp_std::{convert::TryInto, marker::PhantomData}; -use xcm::latest::{Junction::AccountKey20, Junctions::*, MultiAsset, MultiLocation, NetworkId}; +use xcm::latest::{Asset, Junction::AccountKey20, Location, NetworkId}; -/// Instructs how to convert a 20 byte accountId into a MultiLocation -pub struct AccountIdToMultiLocation(sp_std::marker::PhantomData); -impl sp_runtime::traits::Convert - for AccountIdToMultiLocation +/// Instructs how to convert a 20 byte accountId into a Location +pub struct AccountIdToLocation(sp_std::marker::PhantomData); +impl sp_runtime::traits::Convert for AccountIdToLocation where AccountId: Into<[u8; 20]>, { - fn convert(account: AccountId) -> MultiLocation { - MultiLocation { + fn convert(account: AccountId) -> Location { + Location { parents: 0, - interior: X1(AccountKey20 { + interior: [AccountKey20 { network: None, key: account.into(), - }), + }] + .into(), } } } @@ -42,13 +42,12 @@ pub struct SignedToAccountId20( sp_std::marker::PhantomData<(Origin, AccountId, Network)>, ); impl, Network: Get> - sp_runtime::traits::TryConvert - for SignedToAccountId20 + sp_runtime::traits::TryConvert for SignedToAccountId20 where Origin::PalletsOrigin: From> + TryInto, Error = Origin::PalletsOrigin>, { - fn try_convert(o: Origin) -> Result { + fn try_convert(o: Origin) -> Result { o.try_with_caller(|caller| match caller.try_into() { Ok(frame_system::RawOrigin::Signed(who)) => Ok(AccountKey20 { key: who.into(), @@ -62,20 +61,20 @@ where } /// This struct offers uses RelativeReserveProvider to output relative views of multilocations -/// However, additionally accepts a MultiLocation that aims at representing the chain part +/// However, additionally accepts a Location that aims at representing the chain part /// (parent: 1, Parachain(paraId)) of the absolute representation of our chain. -/// If a token reserve matches against this absolute view, we return Some(MultiLocation::here()) +/// If a token reserve matches against this absolute view, we return Some(Location::here()) /// This helps users by preventing errors when they try to transfer a token through xtokens /// to our chain (either inserting the relative or the absolute value). pub struct AbsoluteAndRelativeReserve(PhantomData); impl Reserve for AbsoluteAndRelativeReserve where - AbsoluteMultiLocation: Get, + AbsoluteMultiLocation: Get, { - fn reserve(asset: &MultiAsset) -> Option { + fn reserve(asset: &Asset) -> Option { RelativeReserveProvider::reserve(asset).map(|relative_reserve| { if relative_reserve == AbsoluteMultiLocation::get() { - MultiLocation::here() + Location::here() } else { relative_reserve } diff --git a/primitives/xcm/src/transactor_traits.rs b/primitives/xcm/src/transactor_traits.rs index d2243a6c70..5a50350e94 100644 --- a/primitives/xcm/src/transactor_traits.rs +++ b/primitives/xcm/src/transactor_traits.rs @@ -18,7 +18,7 @@ use cumulus_primitives_core::{ ParaId, }; use sp_std::vec::Vec; -use xcm::latest::{Error as XcmError, MultiLocation}; +use xcm::latest::{Error as XcmError, Location}; // The utility calls that need to be implemented as part of // using a derivative account from a certain account @@ -63,7 +63,7 @@ impl HrmpEncodeCall for () { // It must implement UtilityEncodeCall pub trait XcmTransact: UtilityEncodeCall { /// Encode call from the relay. - fn destination(self) -> MultiLocation; + fn destination(self) -> Location; } pub enum AvailableStakeCalls { diff --git a/runtime/common/src/apis.rs b/runtime/common/src/apis.rs index c2f237ba4f..8fd783f852 100644 --- a/runtime/common/src/apis.rs +++ b/runtime/common/src/apis.rs @@ -441,7 +441,7 @@ macro_rules! impl_runtime_apis_plus_common { fn gas_limit_multiplier_support() {} fn pending_block( - xts: Vec<::Extrinsic> + xts: Vec<::Extrinsic> ) -> ( Option, Option> ) { @@ -615,16 +615,16 @@ macro_rules! impl_runtime_apis_plus_common { type XcmConfig = xcm_config::XcmExecutorConfig; type AccountIdConverter = xcm_config::LocationToAccountId; type DeliveryHelper = (); - fn valid_destination() -> Result { - Ok(MultiLocation::parent()) + fn valid_destination() -> Result { + Ok(Location::parent()) } - fn worst_case_holding(_depositable_count: u32) -> MultiAssets { + fn worst_case_holding(_depositable_count: u32) -> Assets { // 100 fungibles const HOLDING_FUNGIBLES: u32 = 100; let fungibles_amount: u128 = 100; let assets = (0..HOLDING_FUNGIBLES).map(|i| { - let location: MultiLocation = GeneralIndex(i as u128).into(); - MultiAsset { + let location: Location = GeneralIndex(i as u128).into(); + Asset { id: Concrete(location), fun: Fungible(fungibles_amount * i as u128), } @@ -632,8 +632,8 @@ macro_rules! impl_runtime_apis_plus_common { }) .chain( core::iter::once( - MultiAsset { - id: Concrete(MultiLocation::parent()), + Asset { + id: Concrete(Location::parent()), fun: Fungible(u128::MAX) } ) @@ -642,7 +642,7 @@ macro_rules! impl_runtime_apis_plus_common { for (i, asset) in assets.iter().enumerate() { - if let MultiAsset { + if let Asset { id: Concrete(location), fun: Fungible(_) } = asset { @@ -675,45 +675,45 @@ macro_rules! impl_runtime_apis_plus_common { } fn worst_case_asset_exchange() - -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + -> Result<(Assets, Assets), BenchmarkError> { Err(BenchmarkError::Skip) } - fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> { + fn universal_alias() -> Result<(Location, Junction), BenchmarkError> { Err(BenchmarkError::Skip) } fn export_message_origin_and_destination() - -> Result<(MultiLocation, NetworkId, Junctions), BenchmarkError> { + -> Result<(Location, NetworkId, Junctions), BenchmarkError> { Err(BenchmarkError::Skip) } fn transact_origin_and_runtime_call() - -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { - Ok((MultiLocation::parent(), frame_system::Call::remark_with_event { + -> Result<(Location, RuntimeCall), BenchmarkError> { + Ok((Location::parent(), frame_system::Call::remark_with_event { remark: vec![] }.into())) } - fn subscribe_origin() -> Result { - Ok(MultiLocation::parent()) + fn subscribe_origin() -> Result { + Ok(Location::parent()) } fn claimable_asset() - -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> { - let origin = MultiLocation::parent(); - let assets: MultiAssets = (Concrete(MultiLocation::parent()), 1_000u128) + -> Result<(Location, Location, Assets), BenchmarkError> { + let origin = Location::parent(); + let assets: Assets = (Concrete(Location::parent()), 1_000u128) .into(); - let ticket = MultiLocation { parents: 0, interior: Here }; + let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } fn unlockable_asset() - -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { + -> Result<(Location, Location, Asset), BenchmarkError> { Err(BenchmarkError::Skip) } - fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { + fn alias_origin() -> Result<(Location, Location), BenchmarkError> { Err(BenchmarkError::Skip) } } diff --git a/runtime/common/src/migrations.rs b/runtime/common/src/migrations.rs index e3a7f12d5f..f8adf2c019 100644 --- a/runtime/common/src/migrations.rs +++ b/runtime/common/src/migrations.rs @@ -120,7 +120,7 @@ where Runtime: AuthorSlotFilterConfig, Runtime: pallet_preimage::Config, Runtime: pallet_asset_manager::Config, - ::ForeignAssetType: From, + ::ForeignAssetType: From, Runtime: pallet_xcm_transactor::Config, Runtime: pallet_moonbeam_orbiters::Config, Runtime: pallet_balances::Config, diff --git a/runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs index 509739e662..5449587638 100644 --- a/runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs @@ -57,16 +57,28 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `XcmpQueue::QueueConfig` (r:1 w:1) - /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_config_with_weight() -> Weight { - // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `1627` - // Minimum execution time: 4_831_000 picoseconds. - Weight::from_parts(4_988_000, 0) - .saturating_add(Weight::from_parts(0, 1627)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } + + fn enqueue_xcmp_message() -> Weight { + todo!() + } + + fn suspend_channel() -> Weight { + todo!() + } + + fn resume_channel() -> Weight { + todo!() + } + + fn take_first_concatenated_xcm() -> Weight { + todo!() + } + + fn on_idle_good_msg() -> Weight { + todo!() + } + + fn on_idle_large_msg() -> Weight { + todo!() + } } diff --git a/runtime/common/src/weights/pallet_balances.rs b/runtime/common/src/weights/pallet_balances.rs index e4d532c9b2..7f54bafcc3 100644 --- a/runtime/common/src/weights/pallet_balances.rs +++ b/runtime/common/src/weights/pallet_balances.rs @@ -145,4 +145,8 @@ impl pallet_balances::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2591).saturating_mul(u.into())) } + + fn force_adjust_total_issuance() -> Weight { + todo!() + } } diff --git a/runtime/common/src/weights/pallet_identity.rs b/runtime/common/src/weights/pallet_identity.rs index d07315afe0..640b7a8748 100644 --- a/runtime/common/src/weights/pallet_identity.rs +++ b/runtime/common/src/weights/pallet_identity.rs @@ -64,7 +64,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7526), added: 10001, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[0, 100]`. - fn set_identity(r: u32, x: u32, ) -> Weight { + fn set_identity(r: u32 ) -> Weight { // Proof Size summary in bytes: // Measured: `430 + r * (5 ±0)` // Estimated: `10991` @@ -73,8 +73,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 10991)) // Standard Error: 3_785 .saturating_add(Weight::from_parts(150_588, 0).saturating_mul(r.into())) - // Standard Error: 738 - .saturating_add(Weight::from_parts(514_331, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -129,7 +127,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. /// The range of component `x` is `[0, 100]`. - fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { + fn clear_identity(r: u32, s: u32) -> Weight { // Proof Size summary in bytes: // Measured: `445 + r * (5 ±0) + s * (20 ±0) + x * (66 ±0)` // Estimated: `10991` @@ -140,8 +138,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(275_001, 0).saturating_mul(r.into())) // Standard Error: 1_382 .saturating_add(Weight::from_parts(1_492_955, 0).saturating_mul(s.into())) - // Standard Error: 1_382 - .saturating_add(Weight::from_parts(283_758, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -152,7 +148,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7526), added: 10001, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[0, 100]`. - fn request_judgement(r: u32, x: u32, ) -> Weight { + fn request_judgement(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `355 + r * (45 ±0) + x * (66 ±0)` // Estimated: `10991` @@ -161,8 +157,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 10991)) // Standard Error: 3_421 .saturating_add(Weight::from_parts(109_577, 0).saturating_mul(r.into())) - // Standard Error: 667 - .saturating_add(Weight::from_parts(537_126, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -170,7 +164,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7526), added: 10001, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[0, 100]`. - fn cancel_request(r: u32, x: u32, ) -> Weight { + fn cancel_request(r: u32,) -> Weight { // Proof Size summary in bytes: // Measured: `386 + x * (66 ±0)` // Estimated: `10991` @@ -179,8 +173,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 10991)) // Standard Error: 3_232 .saturating_add(Weight::from_parts(84_735, 0).saturating_mul(r.into())) - // Standard Error: 630 - .saturating_add(Weight::from_parts(531_372, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -235,7 +227,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7526), added: 10001, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. /// The range of component `x` is `[0, 100]`. - fn provide_judgement(r: u32, x: u32, ) -> Weight { + fn provide_judgement(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `421 + r * (45 ±0) + x * (66 ±0)` // Estimated: `10991` @@ -244,8 +236,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 10991)) // Standard Error: 4_037 .saturating_add(Weight::from_parts(77_912, 0).saturating_mul(r.into())) - // Standard Error: 747 - .saturating_add(Weight::from_parts(883_021, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -260,7 +250,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. /// The range of component `x` is `[0, 100]`. - fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { + fn kill_identity(r: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `712 + r * (5 ±0) + s * (20 ±0) + x * (66 ±0)` // Estimated: `10991` @@ -271,8 +261,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(283_613, 0).saturating_mul(r.into())) // Standard Error: 1_430 .saturating_add(Weight::from_parts(1_493_205, 0).saturating_mul(s.into())) - // Standard Error: 1_430 - .saturating_add(Weight::from_parts(282_393, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -351,4 +339,32 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } + + fn add_username_authority() -> Weight { + todo!() + } + + fn remove_username_authority() -> Weight { + todo!() + } + + fn set_username_for() -> Weight { + todo!() + } + + fn accept_username() -> Weight { + todo!() + } + + fn remove_expired_approval() -> Weight { + todo!() + } + + fn set_primary_username() -> Weight { + todo!() + } + + fn remove_dangling_username() -> Weight { + todo!() + } } diff --git a/runtime/common/src/weights/pallet_sudo.rs b/runtime/common/src/weights/pallet_sudo.rs index 58c4f8adb8..fb5519a011 100644 --- a/runtime/common/src/weights/pallet_sudo.rs +++ b/runtime/common/src/weights/pallet_sudo.rs @@ -79,4 +79,8 @@ impl pallet_sudo::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 1505)) .saturating_add(T::DbWeight::get().reads(1)) } + + fn remove_key() -> Weight { + todo!() + } } diff --git a/runtime/common/src/weights/pallet_xcm.rs b/runtime/common/src/weights/pallet_xcm.rs index f871268f7e..397791383d 100644 --- a/runtime/common/src/weights/pallet_xcm.rs +++ b/runtime/common/src/weights/pallet_xcm.rs @@ -279,4 +279,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } + + fn transfer_assets() -> Weight { + todo!() + } + + fn new_query() -> Weight { + todo!() + } + + fn take_response() -> Weight { + todo!() + } } diff --git a/runtime/moonbase/Cargo.toml b/runtime/moonbase/Cargo.toml index 4b0f51527b..94746af2ec 100644 --- a/runtime/moonbase/Cargo.toml +++ b/runtime/moonbase/Cargo.toml @@ -1,5 +1,5 @@ [package] -authors = {workspace = true} +authors = { workspace = true } build = "build.rs" description = "Moonbase Runtime" edition = "2021" @@ -9,293 +9,296 @@ name = "moonbase-runtime" version = "0.8.4" [dependencies] -hex-literal = {workspace = true, optional = true} -log = {workspace = true} -num_enum = {workspace = true} -rlp = {workspace = true, optional = true} -serde = {workspace = true, features = ["derive"]} -sha3 = {workspace = true, optional = true} -smallvec = {workspace = true} -strum = {workspace = true} -strum_macros = {workspace = true} +hex-literal = { workspace = true, optional = true } +log = { workspace = true } +num_enum = { workspace = true } +rlp = { workspace = true, optional = true } +serde = { workspace = true, features = ["derive"] } +sha3 = { workspace = true, optional = true } +smallvec = { workspace = true } +strum = { workspace = true } +strum_macros = { workspace = true } # Moonbeam -account = {workspace = true} -moonbeam-core-primitives = {workspace = true} -moonbeam-relay-encoder = {workspace = true} -moonbeam-runtime-common = {workspace = true} -precompile-utils = {workspace = true} -session-keys-primitives = {workspace = true} -xcm-primitives = {workspace = true} +account = { workspace = true } +moonbeam-core-primitives = { workspace = true } +moonbeam-relay-encoder = { workspace = true } +moonbeam-runtime-common = { workspace = true } +precompile-utils = { workspace = true } +session-keys-primitives = { workspace = true } +xcm-primitives = { workspace = true } # Moonbeam pallets -moonbeam-xcm-benchmarks = {workspace = true} -pallet-asset-manager = {workspace = true} -pallet-author-mapping = {workspace = true} -pallet-crowdloan-rewards = {workspace = true} -pallet-erc20-xcm-bridge = {workspace = true} -pallet-ethereum-xcm = {workspace = true} -pallet-evm-chain-id = {workspace = true} -pallet-maintenance-mode = {workspace = true, features = ["xcm-support"]} -pallet-migrations = {workspace = true} -pallet-moonbeam-lazy-migrations = {workspace = true} -pallet-moonbeam-orbiters = {workspace = true} -pallet-parachain-staking = {workspace = true} -pallet-precompile-benchmarks = {workspace = true} -pallet-proxy-genesis-companion = {workspace = true} -pallet-randomness = {workspace = true} -pallet-xcm-transactor = {workspace = true} +moonbeam-xcm-benchmarks = { workspace = true } +pallet-asset-manager = { workspace = true } +pallet-author-mapping = { workspace = true } +pallet-crowdloan-rewards = { workspace = true } +pallet-erc20-xcm-bridge = { workspace = true } +pallet-ethereum-xcm = { workspace = true } +pallet-evm-chain-id = { workspace = true } +pallet-maintenance-mode = { workspace = true, features = ["xcm-support"] } +pallet-migrations = { workspace = true } +pallet-moonbeam-lazy-migrations = { workspace = true } +pallet-moonbeam-orbiters = { workspace = true } +pallet-parachain-staking = { workspace = true } +pallet-precompile-benchmarks = { workspace = true } +pallet-proxy-genesis-companion = { workspace = true } +pallet-randomness = { workspace = true } +pallet-xcm-transactor = { workspace = true } # Moonbeam precompiles -pallet-evm-precompile-author-mapping = {workspace = true} -pallet-evm-precompile-balances-erc20 = {workspace = true} -pallet-evm-precompile-batch = {workspace = true} -pallet-evm-precompile-call-permit = {workspace = true} -pallet-evm-precompile-collective = {workspace = true} -pallet-evm-precompile-conviction-voting = {workspace = true} -pallet-evm-precompile-crowdloan-rewards = {workspace = true} -pallet-evm-precompile-gmp = {workspace = true} -pallet-evm-precompile-identity = {workspace = true} -pallet-evm-precompile-parachain-staking = {workspace = true} -pallet-evm-precompile-preimage = {workspace = true} -pallet-evm-precompile-proxy = {workspace = true} -pallet-evm-precompile-randomness = {workspace = true} -pallet-evm-precompile-referenda = {workspace = true} -pallet-evm-precompile-registry = {workspace = true} -pallet-evm-precompile-relay-encoder = {workspace = true} -pallet-evm-precompile-relay-verifier = {workspace = true} -pallet-evm-precompile-xcm-transactor = {workspace = true} -pallet-evm-precompile-xcm-utils = {workspace = true} -pallet-evm-precompile-xtokens = {workspace = true} -pallet-evm-precompileset-assets-erc20 = {workspace = true} +pallet-evm-precompile-author-mapping = { workspace = true } +pallet-evm-precompile-balances-erc20 = { workspace = true } +pallet-evm-precompile-batch = { workspace = true } +pallet-evm-precompile-call-permit = { workspace = true } +pallet-evm-precompile-collective = { workspace = true } +pallet-evm-precompile-conviction-voting = { workspace = true } +pallet-evm-precompile-crowdloan-rewards = { workspace = true } +pallet-evm-precompile-gmp = { workspace = true } +# TODO(RODRIGO) pallet-evm-precompile-identity = { workspace = true } +pallet-evm-precompile-parachain-staking = { workspace = true } +pallet-evm-precompile-preimage = { workspace = true } +pallet-evm-precompile-proxy = { workspace = true } +pallet-evm-precompile-randomness = { workspace = true } +pallet-evm-precompile-referenda = { workspace = true } +pallet-evm-precompile-registry = { workspace = true } +pallet-evm-precompile-relay-encoder = { workspace = true } +pallet-evm-precompile-relay-verifier = { workspace = true } +pallet-evm-precompile-xcm-transactor = { workspace = true } +pallet-evm-precompile-xcm-utils = { workspace = true } +pallet-evm-precompile-xtokens = { workspace = true } +pallet-evm-precompileset-assets-erc20 = { workspace = true } # Moonbeam tracing -evm-tracing-events = {workspace = true, optional = true} -moonbeam-evm-tracer = {workspace = true, optional = true} -moonbeam-rpc-primitives-debug = {workspace = true} -moonbeam-rpc-primitives-txpool = {workspace = true} +evm-tracing-events = { workspace = true, optional = true } +moonbeam-evm-tracer = { workspace = true, optional = true } +moonbeam-rpc-primitives-debug = { workspace = true } +moonbeam-rpc-primitives-txpool = { workspace = true } # Substrate -frame-executive = {workspace = true} -frame-support = {workspace = true} -frame-system = {workspace = true} -frame-system-rpc-runtime-api = {workspace = true} -pallet-assets = {workspace = true} -pallet-balances = {workspace = true, features = ["insecure_zero_ed"]} -pallet-collective = {workspace = true} -pallet-conviction-voting = {workspace = true} -pallet-identity = {workspace = true} -pallet-multisig = {workspace = true} -pallet-preimage = {workspace = true} -pallet-proxy = {workspace = true} -pallet-referenda = {workspace = true} -pallet-root-testing = {workspace = true} -pallet-scheduler = {workspace = true} -pallet-society = {workspace = true} -pallet-sudo = {workspace = true} -pallet-timestamp = {workspace = true} -pallet-transaction-payment = {workspace = true} -pallet-transaction-payment-rpc-runtime-api = {workspace = true} -pallet-treasury = {workspace = true} -pallet-utility = {workspace = true} -pallet-whitelist = {workspace = true} -parity-scale-codec = {workspace = true, features = [ - "derive", - "max-encoded-len", - "chain-error", -]} -scale-info = {workspace = true, features = ["derive"]} -sp-api = {workspace = true} -sp-block-builder = {workspace = true} -sp-consensus-slots = {workspace = true} -sp-core = {workspace = true} -sp-debug-derive = {workspace = true} -sp-inherents = {workspace = true} -sp-io = {workspace = true, features = ["improved_panic_error_reporting"]} -sp-offchain = {workspace = true} -sp-runtime = {workspace = true} -sp-session = {workspace = true} -sp-std = {workspace = true} -sp-transaction-pool = {workspace = true} -sp-version = {workspace = true} -sp-weights = {workspace = true} +frame-executive = { workspace = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +frame-system-rpc-runtime-api = { workspace = true } +pallet-assets = { workspace = true } +pallet-balances = { workspace = true, features = ["insecure_zero_ed"] } +pallet-collective = { workspace = true } +pallet-conviction-voting = { workspace = true } +pallet-identity = { workspace = true } +pallet-multisig = { workspace = true } +pallet-preimage = { workspace = true } +pallet-proxy = { workspace = true } +pallet-referenda = { workspace = true } +pallet-root-testing = { workspace = true } +pallet-scheduler = { workspace = true } +pallet-society = { workspace = true } +pallet-sudo = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-transaction-payment = { workspace = true } +pallet-transaction-payment-rpc-runtime-api = { workspace = true } +pallet-treasury = { workspace = true } +pallet-utility = { workspace = true } +pallet-whitelist = { workspace = true } +parity-scale-codec = { workspace = true, features = [ + "derive", + "max-encoded-len", + "chain-error", +] } +scale-info = { workspace = true, features = ["derive"] } +sp-api = { workspace = true } +sp-block-builder = { workspace = true } +sp-consensus-slots = { workspace = true } +sp-core = { workspace = true } +sp-debug-derive = { workspace = true } +sp-inherents = { workspace = true } +sp-io = { workspace = true, features = ["improved_panic_error_reporting"] } +sp-offchain = { workspace = true } +sp-runtime = { workspace = true } +sp-session = { workspace = true } +sp-std = { workspace = true } +sp-transaction-pool = { workspace = true } +sp-version = { workspace = true } +sp-weights = { workspace = true } # Frontier -fp-evm = {workspace = true} -fp-rpc = {workspace = true} -fp-self-contained = {workspace = true, features = ["serde"]} -pallet-ethereum = {workspace = true, features = ["forbid-evm-reentrancy"]} -pallet-evm = {workspace = true, features = ["forbid-evm-reentrancy"]} -pallet-evm-precompile-blake2 = {workspace = true} -pallet-evm-precompile-bn128 = {workspace = true} -pallet-evm-precompile-dispatch = {workspace = true} -pallet-evm-precompile-modexp = {workspace = true} -pallet-evm-precompile-sha3fips = {workspace = true} -pallet-evm-precompile-simple = {workspace = true} +fp-evm = { workspace = true } +fp-rpc = { workspace = true } +fp-self-contained = { workspace = true, features = ["serde"] } +pallet-ethereum = { workspace = true, features = ["forbid-evm-reentrancy"] } +pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] } +pallet-evm-precompile-blake2 = { workspace = true } +pallet-evm-precompile-bn128 = { workspace = true } +pallet-evm-precompile-dispatch = { workspace = true } +pallet-evm-precompile-modexp = { workspace = true } +pallet-evm-precompile-sha3fips = { workspace = true } +pallet-evm-precompile-simple = { workspace = true } # Polkadot / XCM -orml-traits = {workspace = true} -orml-xcm-support = {workspace = true} -orml-xtokens = {workspace = true} -pallet-xcm = {workspace = true} -pallet-xcm-benchmarks = {workspace = true, optional = true} -polkadot-core-primitives = {workspace = true} -polkadot-parachain = {workspace = true} -polkadot-runtime-common = {workspace = true} -xcm = {workspace = true} -xcm-builder = {workspace = true} -xcm-executor = {workspace = true} +orml-traits = { workspace = true } +orml-xcm-support = { workspace = true } +orml-xtokens = { workspace = true } +pallet-xcm = { workspace = true } +pallet-xcm-benchmarks = { workspace = true, optional = true } +pallet-message-queue = { workspace = true } +polkadot-core-primitives = { workspace = true } +polkadot-parachain = { workspace = true } +polkadot-runtime-common = { workspace = true } +xcm = { workspace = true } +xcm-builder = { workspace = true } +xcm-executor = { workspace = true } # Cumulus -cumulus-pallet-dmp-queue = {workspace = true} -cumulus-pallet-parachain-system = {workspace = true} -cumulus-pallet-xcm = {workspace = true} -cumulus-pallet-xcmp-queue = {workspace = true} -cumulus-primitives-core = {workspace = true} -cumulus-primitives-timestamp = {workspace = true} -cumulus-primitives-utility = {workspace = true} -parachain-info = {workspace = true} +cumulus-pallet-dmp-queue = { workspace = true } +cumulus-pallet-parachain-system = { workspace = true } +cumulus-pallet-xcm = { workspace = true } +cumulus-pallet-xcmp-queue = { workspace = true } +cumulus-primitives-core = { workspace = true } +cumulus-primitives-timestamp = { workspace = true } +cumulus-primitives-utility = { workspace = true } +parachain-info = { workspace = true } +parachains-common = { workspace = true } # Moonkit -async-backing-primitives = {workspace = true} -moonkit-xcm-primitives = {workspace = true} -nimbus-primitives = {workspace = true} -pallet-async-backing = {workspace = true} -pallet-author-inherent = {workspace = true} -pallet-author-slot-filter = {workspace = true} -pallet-relay-storage-roots = {workspace = true} +async-backing-primitives = { workspace = true } +moonkit-xcm-primitives = { workspace = true } +nimbus-primitives = { workspace = true } +pallet-async-backing = { workspace = true } +pallet-author-inherent = { workspace = true } +pallet-author-slot-filter = { workspace = true } +pallet-relay-storage-roots = { workspace = true } # Benchmarking -frame-benchmarking = {workspace = true, optional = true} -frame-system-benchmarking = {workspace = true, optional = true} -frame-try-runtime = {workspace = true, optional = true} +frame-benchmarking = { workspace = true, optional = true } +frame-system-benchmarking = { workspace = true, optional = true } +frame-try-runtime = { workspace = true, optional = true } [dev-dependencies] -ethereum = {workspace = true} -hex = {workspace = true, features = ["std"]} -sha3 = {workspace = true, features = ["std"]} +ethereum = { workspace = true } +hex = { workspace = true, features = ["std"] } +sha3 = { workspace = true, features = ["std"] } -cumulus-primitives-parachain-inherent = {workspace = true} -cumulus-test-relay-sproof-builder = {workspace = true} +cumulus-primitives-parachain-inherent = { workspace = true } +cumulus-test-relay-sproof-builder = { workspace = true } -frame-metadata = {workspace = true} -pallet-message-queue = {workspace = true} -polkadot-runtime-parachains = {workspace = true} -sp-timestamp = {workspace = true} -xcm-simulator = {workspace = true} +frame-metadata = { workspace = true } +polkadot-runtime-parachains = { workspace = true } +sp-timestamp = { workspace = true } +xcm-simulator = { workspace = true } -precompile-utils = {workspace = true, features = ["std", "testing"]} +precompile-utils = { workspace = true, features = ["std", "testing"] } [build-dependencies] -substrate-wasm-builder = {workspace = true} +substrate-wasm-builder = { workspace = true } [features] default = ["std"] std = [ - "account/std", - "async-backing-primitives/std", - "cumulus-pallet-dmp-queue/std", - "cumulus-pallet-parachain-system/std", - "cumulus-pallet-xcm/std", - "cumulus-pallet-xcmp-queue/std", - "cumulus-primitives-core/std", - "cumulus-primitives-timestamp/std", - "evm-tracing-events/std", - "fp-evm/std", - "fp-rpc/std", - "fp-self-contained/std", - "frame-benchmarking/std", - "frame-executive/std", - "frame-support/std", - "frame-system-rpc-runtime-api/std", - "frame-system/std", - "moonbeam-core-primitives/std", - "moonbeam-evm-tracer/std", - "moonbeam-relay-encoder/std", - "moonbeam-rpc-primitives-debug/std", - "moonbeam-rpc-primitives-txpool/std", - "moonbeam-runtime-common/std", - "moonkit-xcm-primitives/std", - "nimbus-primitives/std", - "orml-xtokens/std", - "pallet-asset-manager/std", - "pallet-assets/std", - "pallet-async-backing/std", - "pallet-author-inherent/std", - "pallet-author-mapping/std", - "pallet-author-slot-filter/std", - "pallet-balances/std", - "pallet-collective/std", - "pallet-conviction-voting/std", - "pallet-crowdloan-rewards/std", - "pallet-erc20-xcm-bridge/std", - "pallet-evm-chain-id/std", - "pallet-ethereum-xcm/std", - "pallet-ethereum/std", - "pallet-evm-precompile-author-mapping/std", - "pallet-evm-precompile-balances-erc20/std", - "pallet-evm-precompile-batch/std", - "pallet-evm-precompile-call-permit/std", - "pallet-evm-precompile-collective/std", - "pallet-evm-precompile-conviction-voting/std", - "pallet-evm-precompile-parachain-staking/std", - "pallet-evm-precompile-preimage/std", - "pallet-evm-precompile-randomness/std", - "pallet-evm-precompile-referenda/std", - "pallet-evm-precompile-registry/std", - "pallet-evm-precompile-xcm-transactor/std", - "pallet-evm-precompile-xcm-utils/std", - "pallet-evm-precompile-xtokens/std", - "pallet-evm-precompileset-assets-erc20/std", - "pallet-evm/std", - "pallet-identity/std", - "pallet-maintenance-mode/std", - "pallet-migrations/std", - "pallet-moonbeam-lazy-migrations/std", - "pallet-moonbeam-orbiters/std", - "pallet-multisig/std", - "pallet-parachain-staking/std", - "pallet-precompile-benchmarks/std", - "pallet-preimage/std", - "pallet-proxy-genesis-companion/std", - "pallet-proxy/std", - "pallet-randomness/std", - "pallet-referenda/std", - "pallet-relay-storage-roots/std", - "pallet-root-testing/std", - "pallet-scheduler/std", - "pallet-society/std", - "pallet-sudo/std", - "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-treasury/std", - "pallet-utility/std", - "pallet-whitelist/std", - "pallet-xcm-transactor/std", - "pallet-xcm/std", - "parachain-info/std", - "parity-scale-codec/std", - "precompile-utils/std", - "scale-info/std", - "session-keys-primitives/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-slots/std", - "sp-core/std", - "sp-inherents/std", - "sp-io/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", - "strum/std", - "xcm-builder/std", - "xcm-executor/std", - "xcm-primitives/std", - "xcm/std", + "account/std", + "async-backing-primitives/std", + "cumulus-pallet-dmp-queue/std", + "cumulus-pallet-parachain-system/std", + "cumulus-pallet-xcm/std", + "cumulus-pallet-xcmp-queue/std", + "cumulus-primitives-core/std", + "cumulus-primitives-timestamp/std", + "cumulus-primitives-utility/std", + "evm-tracing-events/std", + "fp-evm/std", + "fp-rpc/std", + "fp-self-contained/std", + "frame-benchmarking/std", + "frame-executive/std", + "frame-support/std", + "frame-system-rpc-runtime-api/std", + "frame-system/std", + "moonbeam-core-primitives/std", + "moonbeam-evm-tracer/std", + "moonbeam-relay-encoder/std", + "moonbeam-rpc-primitives-debug/std", + "moonbeam-rpc-primitives-txpool/std", + "moonbeam-runtime-common/std", + "moonkit-xcm-primitives/std", + "nimbus-primitives/std", + "orml-xtokens/std", + "pallet-asset-manager/std", + "pallet-assets/std", + "pallet-async-backing/std", + "pallet-author-inherent/std", + "pallet-author-mapping/std", + "pallet-author-slot-filter/std", + "pallet-balances/std", + "pallet-collective/std", + "pallet-conviction-voting/std", + "pallet-crowdloan-rewards/std", + "pallet-erc20-xcm-bridge/std", + "pallet-evm-chain-id/std", + "pallet-ethereum-xcm/std", + "pallet-ethereum/std", + "pallet-evm-precompile-author-mapping/std", + "pallet-evm-precompile-balances-erc20/std", + "pallet-evm-precompile-batch/std", + "pallet-evm-precompile-call-permit/std", + "pallet-evm-precompile-collective/std", + "pallet-evm-precompile-conviction-voting/std", + "pallet-evm-precompile-parachain-staking/std", + "pallet-evm-precompile-preimage/std", + "pallet-evm-precompile-randomness/std", + "pallet-evm-precompile-referenda/std", + "pallet-evm-precompile-registry/std", + "pallet-evm-precompile-xcm-transactor/std", + "pallet-evm-precompile-xcm-utils/std", + "pallet-evm-precompile-xtokens/std", + "pallet-evm-precompileset-assets-erc20/std", + "pallet-evm/std", + "pallet-identity/std", + "pallet-maintenance-mode/std", + "pallet-migrations/std", + "pallet-moonbeam-lazy-migrations/std", + "pallet-moonbeam-orbiters/std", + "pallet-multisig/std", + "pallet-parachain-staking/std", + "pallet-precompile-benchmarks/std", + "pallet-preimage/std", + "pallet-proxy-genesis-companion/std", + "pallet-proxy/std", + "pallet-randomness/std", + "pallet-referenda/std", + "pallet-relay-storage-roots/std", + "pallet-root-testing/std", + "pallet-scheduler/std", + "pallet-society/std", + "pallet-sudo/std", + "pallet-timestamp/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", + "pallet-treasury/std", + "pallet-utility/std", + "pallet-whitelist/std", + "pallet-xcm-transactor/std", + "pallet-xcm/std", + "parachain-info/std", + "parachains-common/std", + "parity-scale-codec/std", + "precompile-utils/std", + "scale-info/std", + "session-keys-primitives/std", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-slots/std", + "sp-core/std", + "sp-inherents/std", + "sp-io/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-transaction-pool/std", + "sp-version/std", + "strum/std", + "xcm-builder/std", + "xcm-executor/std", + "xcm-primitives/std", + "xcm/std", ] # Must be enabled for tracing runtimes only @@ -313,79 +316,80 @@ runtime-wasm = [] on-chain-release-build = ["sp-api/disable-logging"] runtime-benchmarks = [ - "cumulus-pallet-parachain-system/runtime-benchmarks", - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system-benchmarking/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "hex-literal", - "moonbeam-relay-encoder/runtime-benchmarks", - "moonbeam-runtime-common/runtime-benchmarks", - "moonbeam-xcm-benchmarks/runtime-benchmarks", - "pallet-asset-manager/runtime-benchmarks", - "pallet-assets/runtime-benchmarks", - "pallet-author-inherent/runtime-benchmarks", - "pallet-author-mapping/runtime-benchmarks", - "pallet-author-slot-filter/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-collective/runtime-benchmarks", - "pallet-conviction-voting/runtime-benchmarks", - "pallet-crowdloan-rewards/runtime-benchmarks", - "pallet-ethereum-xcm/runtime-benchmarks", - "pallet-ethereum/runtime-benchmarks", - "pallet-evm/runtime-benchmarks", - "pallet-identity/runtime-benchmarks", - "pallet-migrations/runtime-benchmarks", - "pallet-moonbeam-lazy-migrations/runtime-benchmarks", - "pallet-moonbeam-orbiters/runtime-benchmarks", - "pallet-multisig/runtime-benchmarks", - "pallet-parachain-staking/runtime-benchmarks", - "pallet-precompile-benchmarks/runtime-benchmarks", - "pallet-preimage/runtime-benchmarks", - "pallet-proxy/runtime-benchmarks", - "pallet-randomness/runtime-benchmarks", - "pallet-referenda/runtime-benchmarks", - "pallet-relay-storage-roots/runtime-benchmarks", - "pallet-scheduler/runtime-benchmarks", - "pallet-society/runtime-benchmarks", - "pallet-sudo/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-treasury/runtime-benchmarks", - "pallet-utility/runtime-benchmarks", - "pallet-whitelist/runtime-benchmarks", - "pallet-xcm-benchmarks", - "pallet-xcm-transactor/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "session-keys-primitives/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system-benchmarking/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "hex-literal", + "moonbeam-relay-encoder/runtime-benchmarks", + "moonbeam-runtime-common/runtime-benchmarks", + "moonbeam-xcm-benchmarks/runtime-benchmarks", + "parachains-common/runtime-benchmarks", + "pallet-asset-manager/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", + "pallet-author-inherent/runtime-benchmarks", + "pallet-author-mapping/runtime-benchmarks", + "pallet-author-slot-filter/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-collective/runtime-benchmarks", + "pallet-conviction-voting/runtime-benchmarks", + "pallet-crowdloan-rewards/runtime-benchmarks", + "pallet-ethereum-xcm/runtime-benchmarks", + "pallet-ethereum/runtime-benchmarks", + "pallet-evm/runtime-benchmarks", + "pallet-identity/runtime-benchmarks", + "pallet-migrations/runtime-benchmarks", + "pallet-moonbeam-lazy-migrations/runtime-benchmarks", + "pallet-moonbeam-orbiters/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "pallet-parachain-staking/runtime-benchmarks", + "pallet-precompile-benchmarks/runtime-benchmarks", + "pallet-preimage/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-randomness/runtime-benchmarks", + "pallet-referenda/runtime-benchmarks", + "pallet-relay-storage-roots/runtime-benchmarks", + "pallet-scheduler/runtime-benchmarks", + "pallet-society/runtime-benchmarks", + "pallet-sudo/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "pallet-whitelist/runtime-benchmarks", + "pallet-xcm-benchmarks", + "pallet-xcm-transactor/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "session-keys-primitives/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", ] try-runtime = [ - "fp-self-contained/try-runtime", - "frame-executive/try-runtime", - "frame-system/try-runtime", - "frame-try-runtime", - "moonbeam-runtime-common/try-runtime", - "pallet-asset-manager/try-runtime", - "pallet-author-mapping/try-runtime", - "pallet-author-slot-filter/try-runtime", - "pallet-balances/try-runtime", - "pallet-collective/try-runtime", - "pallet-conviction-voting/try-runtime", - "pallet-maintenance-mode/try-runtime", - "pallet-maintenance-mode/try-runtime", - "pallet-migrations/try-runtime", - "pallet-moonbeam-lazy-migrations/try-runtime", - "pallet-parachain-staking/try-runtime", - "pallet-preimage/try-runtime", - "pallet-referenda/try-runtime", - "pallet-relay-storage-roots/try-runtime", - "pallet-root-testing/try-runtime", - "pallet-scheduler/try-runtime", - "pallet-society/try-runtime", - "pallet-timestamp/try-runtime", - "pallet-xcm-transactor/try-runtime", + "fp-self-contained/try-runtime", + "frame-executive/try-runtime", + "frame-system/try-runtime", + "frame-try-runtime", + "moonbeam-runtime-common/try-runtime", + "pallet-asset-manager/try-runtime", + "pallet-author-mapping/try-runtime", + "pallet-author-slot-filter/try-runtime", + "pallet-balances/try-runtime", + "pallet-collective/try-runtime", + "pallet-conviction-voting/try-runtime", + "pallet-maintenance-mode/try-runtime", + "pallet-maintenance-mode/try-runtime", + "pallet-migrations/try-runtime", + "pallet-moonbeam-lazy-migrations/try-runtime", + "pallet-parachain-staking/try-runtime", + "pallet-preimage/try-runtime", + "pallet-referenda/try-runtime", + "pallet-relay-storage-roots/try-runtime", + "pallet-root-testing/try-runtime", + "pallet-scheduler/try-runtime", + "pallet-society/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-xcm-transactor/try-runtime", ] moonbase-runtime-benchmarks = [] diff --git a/runtime/moonbase/src/lib.rs b/runtime/moonbase/src/lib.rs index 5a55170890..fba8e78677 100644 --- a/runtime/moonbase/src/lib.rs +++ b/runtime/moonbase/src/lib.rs @@ -54,7 +54,7 @@ use account::AccountId20; use cumulus_pallet_parachain_system::{ RelayChainStateProof, RelayNumberMonotonicallyIncreases, RelaychainDataProvider, }; -use cumulus_primitives_core::relay_chain; +use cumulus_primitives_core::{relay_chain, AggregateMessageOrigin}; use fp_rpc::TransactionStatus; use frame_support::{ construct_runtime, @@ -156,7 +156,7 @@ pub mod currency { // TODO: multiply MAXIMUM_BLOCK_WEIGHT times 4 when async backing will be definitly enabled pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND, u64::MAX) .saturating_div(2) - .set_proof_size(cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64); + .set_proof_size(relay_chain::MAX_POV_SIZE as u64); pub const MILLISECS_PER_BLOCK: u64 = 6_000; pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); @@ -262,6 +262,8 @@ impl frame_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. type RuntimeOrigin = RuntimeOrigin; + /// The aggregated RuntimeTask type. + type RuntimeTask = RuntimeTask; /// Maximum number of block number to block hash mappings to keep (oldest pruned first). type BlockHashCount = ConstU32<256>; /// Maximum weight of each block. With a default weight system of 1byte == 1weight, 4mb is ok. @@ -313,7 +315,6 @@ impl pallet_balances::Config for Runtime { type MaxFreezes = ConstU32<0>; type RuntimeHoldReason = RuntimeHoldReason; type RuntimeFreezeReason = RuntimeFreezeReason; - type MaxHolds = ConstU32<1>; type WeightInfo = moonbeam_weights::pallet_balances::WeightInfo; } @@ -608,6 +609,15 @@ impl pallet_treasury::Config for Runtime { type BenchmarkHelper = BenchmarkHelper; } +parameter_types! { + pub const MaxSubAccounts: u32 = 100; + pub const MaxAdditionalFields: u32 = 100; + pub const MaxRegistrars: u32 = 20; + pub const PendingUsernameExpiration: u32 = 7 * DAYS; + pub const MaxSuffixLength: u32 = 7; + pub const MaxUsernameLength: u32 = 32; +} + type IdentityForceOrigin = EitherOfDiverse, governance::custom_origins::GeneralAdmin>; type IdentityRegistrarOrigin = @@ -618,17 +628,22 @@ impl pallet_identity::Config for Runtime { type Currency = Balances; // Add one item in storage and take 258 bytes type BasicDeposit = ConstU128<{ currency::deposit(1, 258) }>; - // Not add any item to the storage but takes 66 bytes - type FieldDeposit = ConstU128<{ currency::deposit(0, 66) }>; + // Does not add any item to the storage but takes 1 bytes + type ByteDeposit = ConstU128<{ currency::deposit(0, 1) }>; // Add one item in storage and take 53 bytes type SubAccountDeposit = ConstU128<{ currency::deposit(1, 53) }>; - type MaxSubAccounts = ConstU32<100>; - type MaxAdditionalFields = ConstU32<100>; - type IdentityInformation = pallet_identity::simple::IdentityInfo; - type MaxRegistrars = ConstU32<20>; + type MaxSubAccounts = MaxSubAccounts; + type IdentityInformation = pallet_identity::legacy::IdentityInfo; + type MaxRegistrars = MaxRegistrars; type Slashed = Treasury; type ForceOrigin = IdentityForceOrigin; type RegistrarOrigin = IdentityRegistrarOrigin; + type OffchainSignature = Signature; + type SigningPublicKey = ::Signer; + type UsernameAuthorityOrigin = EnsureRoot; + type PendingUsernameExpiration = PendingUsernameExpiration; + type MaxSuffixLength = MaxSuffixLength; + type MaxUsernameLength = MaxUsernameLength; type WeightInfo = moonbeam_weights::pallet_identity::WeightInfo; } @@ -696,6 +711,7 @@ impl pallet_ethereum_xcm::Config for Runtime { parameter_types! { pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; } /// Maximum number of blocks simultaneously accepted by the Runtime, not yet included @@ -715,13 +731,14 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OnSystemEvent = (); type SelfParaId = ParachainInfo; - type DmpMessageHandler = MaintenanceMode; type ReservedDmpWeight = ReservedDmpWeight; type OutboundXcmpMessageSource = XcmpQueue; type XcmpMessageHandler = XcmpQueue; type ReservedXcmpWeight = ReservedXcmpWeight; type CheckAssociatedRelayNumber = RelayNumberMonotonicallyIncreases; type ConsensusHook = crate::timestamp::ConsensusHookWrapperForRelayTimestamp; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; + type WeightInfo = cumulus_pallet_parachain_system::weights::SubstrateWeight; } impl parachain_info::Config for Runtime {} @@ -885,7 +902,7 @@ impl pallet_crowdloan_rewards::Config for Runtime { type RewardAddressChangeOrigin = EnsureSigned; type RewardAddressRelayVoteThreshold = RelaySignaturesThreshold; type SignatureNetworkIdentifier = SignatureNetworkIdentifier; - type VestingBlockNumber = cumulus_primitives_core::relay_chain::BlockNumber; + type VestingBlockNumber = relay_chain::BlockNumber; type VestingBlockProvider = RelaychainDataProvider; type WeightInfo = moonbeam_weights::pallet_crowdloan_rewards::WeightInfo; } @@ -968,7 +985,7 @@ impl pallet_evm_precompile_proxy::EvmProxyCallFilter for ProxyType { && match PrecompileName::from_address(call.to.0) { Some( PrecompileName::AuthorMappingPrecompile - | PrecompileName::IdentityPrecompile + //TODO (RODRIGO) | PrecompileName::IdentityPrecompile | PrecompileName::ParachainStakingPrecompile, ) => true, Some(ref precompile) if is_governance_precompile(precompile) => true, @@ -1189,8 +1206,6 @@ impl Contains for NormalFilter { } } -use cumulus_primitives_core::{relay_chain::BlockNumber as RelayBlockNumber, DmpMessageHandler}; - pub struct XcmExecutionManager; impl moonkit_xcm_primitives::PauseXcmExecution for XcmExecutionManager { fn suspend_xcm_execution() -> DispatchResult { @@ -1201,34 +1216,6 @@ impl moonkit_xcm_primitives::PauseXcmExecution for XcmExecutionManager { } } -pub struct NormalDmpHandler; -impl DmpMessageHandler for NormalDmpHandler { - // This implementation makes messages be queued - // Since the limit is 0, messages are queued for next iteration - fn handle_dmp_messages( - iter: impl Iterator)>, - limit: Weight, - ) -> Weight { - (if Migrations::should_pause_xcm() { - DmpQueue::handle_dmp_messages(iter, Weight::zero()) - } else { - DmpQueue::handle_dmp_messages(iter, limit) - }) + ::DbWeight::get().reads(1) - } -} - -pub struct MaintenanceDmpHandler; -impl DmpMessageHandler for MaintenanceDmpHandler { - // This implementation makes messages be queued - // Since the limit is 0, messages are queued for next iteration - fn handle_dmp_messages( - iter: impl Iterator)>, - _limit: Weight, - ) -> Weight { - DmpQueue::handle_dmp_messages(iter, Weight::zero()) - } -} - /// The hooks we wnat to run in Maintenance Mode pub struct MaintenanceHooks; @@ -1280,12 +1267,6 @@ impl pallet_maintenance_mode::Config for Runtime { type MaintenanceOrigin = pallet_collective::EnsureProportionAtLeast; type XcmExecutionManager = XcmExecutionManager; - type NormalDmpHandler = NormalDmpHandler; - type MaintenanceDmpHandler = MaintenanceDmpHandler; - // We use AllPalletsWithSystem because we dont want to change the hooks in normal - // operation - type NormalExecutiveHooks = AllPalletsWithSystem; - type MaintenanceExecutiveHooks = MaintenanceHooks; } impl pallet_proxy_genesis_companion::Config for Runtime { @@ -1376,7 +1357,9 @@ impl pallet_randomness::Config for Runtime { type WeightInfo = moonbeam_weights::pallet_randomness::WeightInfo; } -impl pallet_root_testing::Config for Runtime {} +impl pallet_root_testing::Config for Runtime { + type RuntimeEvent = RuntimeEvent; +} parameter_types! { // One storage item; key size is 32 + 20; value is size 4+4+16+20 bytes = 44 bytes. @@ -1448,6 +1431,7 @@ construct_runtime! { Migrations: pallet_migrations::{Pallet, Storage, Config, Event} = 32, XcmTransactor: pallet_xcm_transactor::{Pallet, Call, Config, Storage, Event} = 33, ProxyGenesisCompanion: pallet_proxy_genesis_companion::{Pallet, Config} = 34, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 35, // Previously 36: pallet_assets:: MoonbeamOrbiters: pallet_moonbeam_orbiters::{Pallet, Call, Storage, Event, Config} = 37, EthereumXcm: pallet_ethereum_xcm::{Pallet, Call, Storage, Origin} = 38, @@ -1461,7 +1445,7 @@ construct_runtime! { Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event} = 45, OpenTechCommitteeCollective: pallet_collective::::{Pallet, Call, Storage, Event, Origin, Config} = 46, - RootTesting: pallet_root_testing::{Pallet, Call, Storage} = 47, + RootTesting: pallet_root_testing::{Pallet, Call, Storage, Event} = 47, Erc20XcmBridge: pallet_erc20_xcm_bridge::{Pallet} = 48, Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 49, AsyncBacking: pallet_async_backing::{Pallet, Storage} = 50, @@ -1501,7 +1485,7 @@ pub type Executive = frame_executive::Executive< Block, frame_system::ChainContext, Runtime, - pallet_maintenance_mode::ExecutiveHooks, + AllPalletsWithSystem, >; #[cfg(feature = "runtime-benchmarks")] @@ -1741,8 +1725,8 @@ mod tests { Balance::from(1 * UNIT + 25800 * MICROUNIT) ); assert_eq!( - get!(pallet_identity, FieldDeposit, u128), - Balance::from(6600 * MICROUNIT) + get!(pallet_identity, ByteDeposit, u128), + Balance::from(100 * MICROUNIT) ); assert_eq!( get!(pallet_identity, SubAccountDeposit, u128), diff --git a/runtime/moonbase/src/precompiles.rs b/runtime/moonbase/src/precompiles.rs index a951e6d29f..95bdea3eea 100644 --- a/runtime/moonbase/src/precompiles.rs +++ b/runtime/moonbase/src/precompiles.rs @@ -30,7 +30,7 @@ use pallet_evm_precompile_collective::CollectivePrecompile; use pallet_evm_precompile_conviction_voting::ConvictionVotingPrecompile; use pallet_evm_precompile_crowdloan_rewards::CrowdloanRewardsPrecompile; use pallet_evm_precompile_gmp::GmpPrecompile; -use pallet_evm_precompile_identity::IdentityPrecompile; +// TODO(RODRIGO) use pallet_evm_precompile_identity::IdentityPrecompile; use pallet_evm_precompile_modexp::Modexp; use pallet_evm_precompile_parachain_staking::ParachainStakingPrecompile; use pallet_evm_precompile_preimage::PreimagePrecompile; @@ -228,11 +228,12 @@ type MoonbasePrecompilesAt = ( XcmTransactorPrecompileV3, (CallableByContract, CallableByPrecompile), >, - PrecompileAt< - AddressU64<2072>, - IdentityPrecompile, - (CallableByContract, CallableByPrecompile), - >, + // TODO(RODRIGO) + // PrecompileAt< + // AddressU64<2072>, + // IdentityPrecompile, + // (CallableByContract, CallableByPrecompile), + // >, PrecompileAt< AddressU64<2073>, RelayDataVerifierPrecompile, diff --git a/runtime/moonbase/src/xcm_config.rs b/runtime/moonbase/src/xcm_config.rs index f4cb860d32..3d5b030a44 100644 --- a/runtime/moonbase/src/xcm_config.rs +++ b/runtime/moonbase/src/xcm_config.rs @@ -19,8 +19,9 @@ use super::{ governance, AccountId, AssetId, AssetManager, Assets, Balance, Balances, DealWithFees, - Erc20XcmBridge, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, - RuntimeEvent, RuntimeOrigin, Treasury, XcmpQueue, + Erc20XcmBridge, MaintenanceMode, MessageQueue, ParachainInfo, ParachainSystem, Perbill, + PolkadotXcm, Runtime, RuntimeBlockWeights, RuntimeCall, RuntimeEvent, RuntimeOrigin, Treasury, + XcmpQueue, }; use moonbeam_runtime_common::weights as moonbeam_weights; use pallet_evm_precompileset_assets_erc20::AccountIdAssetIdConversion; @@ -31,7 +32,7 @@ use sp_runtime::{ use frame_support::{ parameter_types, - traits::{EitherOfDiverse, Everything, Nothing, PalletInfoAccess}, + traits::{EitherOfDiverse, Everything, Nothing, PalletInfoAccess, TransformOrigin}, }; use frame_system::{EnsureRoot, RawOrigin}; @@ -39,25 +40,29 @@ use sp_core::{ConstU32, H160, H256}; use sp_weights::Weight; use xcm_builder::{ AccountKey20Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, ConvertedConcreteId, CurrencyAdapter as XcmCurrencyAdapter, - DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FungiblesAdapter, HashedDescription, + AllowTopLevelPaidExecutionFrom, ConvertedConcreteId, DescribeAllTerminal, DescribeFamily, + EnsureXcmOrigin, FungibleAdapter as XcmCurrencyAdapter, FungiblesAdapter, HashedDescription, NoChecking, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountKey20AsNative, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, WithComputedOrigin, }; +use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; + use xcm::latest::prelude::*; use xcm_executor::traits::{CallDispatcher, ConvertLocation, JustTry}; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use orml_xcm_support::MultiNativeAsset; use xcm_primitives::{ - AbsoluteAndRelativeReserve, AccountIdToCurrencyId, AccountIdToMultiLocation, AsAssetType, + AbsoluteAndRelativeReserve, AccountIdToCurrencyId, AccountIdToLocation, AsAssetType, FirstAssetTrader, SignedToAccountId20, UtilityAvailableCalls, UtilityEncodeCall, XcmTransact, }; use parity_scale_codec::{Decode, Encode}; use scale_info::TypeInfo; +use sp_core::Get; use sp_std::{ convert::{From, Into, TryFrom}, prelude::*, @@ -73,23 +78,23 @@ parameter_types! { // The relay chain Origin type pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); // The universal location within the global consensus system - pub UniversalLocation: InteriorMultiLocation = - X2(GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())); + pub UniversalLocation: InteriorLocation = + [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())].into(); // Self Reserve location, defines the multilocation identifiying the self-reserve currency // This is used to match it also against our Balances pallet when we receive such - // a MultiLocation: (Self Balances pallet index) + // a Location: (Self Balances pallet index) // We use the RELATIVE multilocation - pub SelfReserve: MultiLocation = MultiLocation { + pub SelfReserve: Location = Location { parents:0, - interior: Junctions::X1( + interior: [ PalletInstance(::index() as u8) - ) + ].into() }; } -/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used +/// Type for specifying how a `Location` can be converted into an `AccountId`. This is used /// when determining ownership of accounts for asset transacting and when attempting to use XCM /// `Transact` in order to determine the dispatch Origin. pub type LocationToAccountId = ( @@ -97,7 +102,7 @@ pub type LocationToAccountId = ( ParentIsPreset, // Sibling parachain origins convert to AccountId via the `ParaId::into`. SiblingParachainConvertsVia, - // If we receive a MultiLocation of type AccountKey20, just generate a native account + // If we receive a Location of type AccountKey20, just generate a native account AccountKey20Aliases, // Generate remote accounts according to polkadot standards HashedDescription>, @@ -106,7 +111,7 @@ pub type LocationToAccountId = ( /// Wrapper type around `LocationToAccountId` to convert an `AccountId` to type `H160`. pub struct LocationToH160; impl ConvertLocation for LocationToH160 { - fn convert_location(location: &MultiLocation) -> Option { + fn convert_location(location: &Location) -> Option { >::convert_location(location) .map(Into::into) } @@ -127,7 +132,7 @@ pub type ForeignFungiblesTransactor = FungiblesAdapter< JustTry, >, ), - // Do a simple punn to convert an AccountId20 MultiLocation into a native chain account ID: + // Do a simple punn to convert an AccountId20 Location into a native chain account ID: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, @@ -304,9 +309,10 @@ impl xcm_executor::Config for XcmExecutorConfig { type UniversalAliases = Nothing; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; + type TransactionalProcessor = xcm_builder::FrameTransactionalProcessor; } -// Converts a Signed Local Origin into a MultiLocation +// Converts a Signed Local Origin into a Location pub type LocalOriginToLocation = SignedToAccountId20; /// The means for routing XCM messages which are not for local execution into the right message @@ -319,13 +325,13 @@ pub type XcmRouter = ( ); type XcmExecutor = pallet_erc20_xcm_bridge::XcmExecutorWrapper< - RuntimeCall, + XcmExecutorConfig, xcm_executor::XcmExecutor, >; #[cfg(feature = "runtime-benchmarks")] parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); + pub ReachableDest: Option = Some(Parent.into()); } impl pallet_xcm::Config for Runtime { @@ -364,10 +370,10 @@ impl cumulus_pallet_xcm::Config for Runtime { impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRoot; + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = EnsureRoot; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = moonbeam_weights::cumulus_pallet_xcmp_queue::WeightInfo; @@ -376,31 +382,65 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { >; } +parameter_types! { + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; +} + +// TODO: This pallet can be removed after the lazy migration is done and event `Completed` is emitted. +// https://github.com/paritytech/polkadot-sdk/pull/1246 impl cumulus_pallet_dmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRoot; + type DmpSink = frame_support::traits::EnqueueWithOrigin; + type WeightInfo = cumulus_pallet_dmp_queue::weights::SubstrateWeight; +} + +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(25) * RuntimeBlockWeights::get().max_block; + // TODO: describe + pub const MessageQueueMaxStale: u32 = 8; + // TODO: describe + pub const MessageQueueHeapSize: u32 = 64 * 1024; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + #[cfg(feature = "runtime-benchmarks")] + type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor< + cumulus_primitives_core::AggregateMessageOrigin, + >; + #[cfg(not(feature = "runtime-benchmarks"))] + type MessageProcessor = + xcm_builder::ProcessXcmMessage; + type Size = u32; + type HeapSize = MessageQueueHeapSize; + type MaxStale = MessageQueueMaxStale; + type ServiceWeight = MessageQueueServiceWeight; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + // NarrowOriginToSibling calls XcmpQueue's is_pause if Origin is sibling. Allows all other origins + type QueuePausedQuery = (MaintenanceMode, NarrowOriginToSibling); + type WeightInfo = pallet_message_queue::weights::SubstrateWeight; } // Our AssetType. For now we only handle Xcm Assets #[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] pub enum AssetType { - Xcm(MultiLocation), + Xcm(Location), } impl Default for AssetType { fn default() -> Self { - Self::Xcm(MultiLocation::here()) + Self::Xcm(Location::here()) } } -impl From for AssetType { - fn from(location: MultiLocation) -> Self { +impl From for AssetType { + fn from(location: Location) -> Self { Self::Xcm(location) } } -impl Into> for AssetType { - fn into(self) -> Option { +impl Into> for AssetType { + fn into(self) -> Option { match self { Self::Xcm(location) => Some(location), } @@ -454,17 +494,17 @@ impl AccountIdToCurrencyId for Runtime { } } -// How to convert from CurrencyId to MultiLocation -pub struct CurrencyIdtoMultiLocation(sp_std::marker::PhantomData); -impl sp_runtime::traits::Convert> - for CurrencyIdtoMultiLocation +// How to convert from CurrencyId to Location +pub struct CurrencyIdToLocation(sp_std::marker::PhantomData); +impl sp_runtime::traits::Convert> + for CurrencyIdToLocation where - AssetXConverter: MaybeEquivalence, + AssetXConverter: MaybeEquivalence, { - fn convert(currency: CurrencyId) -> Option { + fn convert(currency: CurrencyId) -> Option { match currency { CurrencyId::SelfReserve => { - let multi: MultiLocation = SelfReserve::get(); + let multi: Location = SelfReserve::get(); Some(multi) } CurrencyId::ForeignAsset(asset) => AssetXConverter::convert_back(&asset), @@ -489,20 +529,20 @@ parameter_types! { pub const MaxAssetsForTransfer: usize = 2; // This is how we are going to detect whether the asset is a Reserve asset // This however is the chain part only - pub SelfLocation: MultiLocation = MultiLocation::here(); + pub SelfLocation: Location = Location::here(); // We need this to be able to catch when someone is trying to execute a non- // cross-chain transfer in xtokens through the absolute path way - pub SelfLocationAbsolute: MultiLocation = MultiLocation { + pub SelfLocationAbsolute: Location = Location { parents:1, - interior: Junctions::X1( + interior: [ Parachain(ParachainInfo::parachain_id().into()) - ) + ].into() }; } parameter_type_with_key! { - pub ParachainMinFee: |location: MultiLocation| -> Option { + pub ParachainMinFee: |location: Location| -> Option { match (location.parents, location.first_interior()) { // AssetHub fee (1, Some(Parachain(1001u32))) => Some(50_000_000u128), @@ -515,9 +555,8 @@ impl orml_xtokens::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = AccountIdToMultiLocation; - type CurrencyIdConvert = - CurrencyIdtoMultiLocation>; + type AccountIdToLocation = AccountIdToLocation; + type CurrencyIdConvert = CurrencyIdToLocation>; type XcmExecutor = XcmExecutor; type SelfLocation = SelfLocation; type Weigher = XcmWeigher; @@ -525,13 +564,13 @@ impl orml_xtokens::Config for Runtime { type UniversalLocation = UniversalLocation; type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; - type MultiLocationsFilter = Everything; + type LocationsFilter = Everything; type ReserveProvider = AbsoluteAndRelativeReserve; } // 1 WND/ROC should be enough parameter_types! { - pub MaxHrmpRelayFee: MultiAsset = (MultiLocation::parent(), 1_000_000_000_000u128).into(); + pub MaxHrmpRelayFee: Asset = (Location::parent(), 1_000_000_000_000u128).into(); } // For now we only allow to transact in the relay, although this might change in the future @@ -572,9 +611,9 @@ impl UtilityEncodeCall for Transactors { } impl XcmTransact for Transactors { - fn destination(self) -> MultiLocation { + fn destination(self) -> Location { match self { - Transactors::Relay => MultiLocation::parent(), + Transactors::Relay => Location::parent(), } } } @@ -589,9 +628,8 @@ impl pallet_xcm_transactor::Config for Runtime { type DerivativeAddressRegistrationOrigin = DerivativeAddressRegistrationOrigin; type SovereignAccountDispatcherOrigin = EnsureRoot; type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = AccountIdToMultiLocation; - type CurrencyIdToMultiLocation = - CurrencyIdtoMultiLocation>; + type AccountIdToLocation = AccountIdToLocation; + type CurrencyIdToLocation = CurrencyIdToLocation>; type XcmSender = XcmRouter; type SelfLocation = SelfLocation; type Weigher = XcmWeigher; @@ -608,11 +646,11 @@ parameter_types! { // This is the relative view of erc20 assets. // Identified by this prefix + AccountKey20(contractAddress) // We use the RELATIVE multilocation - pub Erc20XcmBridgePalletLocation: MultiLocation = MultiLocation { + pub Erc20XcmBridgePalletLocation: Location = Location { parents:0, - interior: Junctions::X1( + interior: [ PalletInstance(::index() as u8) - ) + ].into() }; // To be able to support almost all erc20 implementations, @@ -634,8 +672,8 @@ mod testing { /// This From exists for benchmarking purposes. It has the potential side-effect of calling /// AssetManager::set_asset_type_asset_id() and should NOT be used in any production code. - impl From for CurrencyId { - fn from(location: MultiLocation) -> CurrencyId { + impl From for CurrencyId { + fn from(location: Location) -> CurrencyId { use xcm_primitives::AssetTypeGetter; // If it does not exist, for benchmarking purposes, we create the association diff --git a/runtime/moonbase/tests/integration_test.rs b/runtime/moonbase/tests/integration_test.rs index 8db6dbbe25..ceae403284 100644 --- a/runtime/moonbase/tests/integration_test.rs +++ b/runtime/moonbase/tests/integration_test.rs @@ -1242,7 +1242,7 @@ fn update_reward_address_via_precompile() { #[test] fn asset_can_be_registered() { ExtBuilder::default().build().execute_with(|| { - let source_location = AssetType::Xcm(MultiLocation::parent()); + let source_location = AssetType::Xcm(Location::parent()); let source_id: moonbase_runtime::AssetId = source_location.clone().into(); let asset_metadata = AssetRegistrarMetadata { name: b"RelayToken".to_vec(), @@ -1265,7 +1265,7 @@ fn asset_can_be_registered() { fn xcm_asset_erc20_precompiles_supply_and_balance() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1282,7 +1282,7 @@ fn xcm_asset_erc20_precompiles_supply_and_balance() { .build() .execute_with(|| { // We have the assetId that corresponds to the relay chain registered - let relay_asset_id: AssetId = AssetType::Xcm(MultiLocation::parent()).into(); + let relay_asset_id: AssetId = AssetType::Xcm(Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1323,7 +1323,7 @@ fn xcm_asset_erc20_precompiles_supply_and_balance() { fn xcm_asset_erc20_precompiles_transfer() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1340,7 +1340,7 @@ fn xcm_asset_erc20_precompiles_transfer() { .build() .execute_with(|| { // We have the assetId that corresponds to the relay chain registered - let relay_asset_id: AssetId = AssetType::Xcm(MultiLocation::parent()).into(); + let relay_asset_id: AssetId = AssetType::Xcm(Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1387,7 +1387,7 @@ fn xcm_asset_erc20_precompiles_transfer() { fn xcm_asset_erc20_precompiles_approve() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1404,7 +1404,7 @@ fn xcm_asset_erc20_precompiles_approve() { .build() .execute_with(|| { // We have the assetId that corresponds to the relay chain registered - let relay_asset_id: AssetId = AssetType::Xcm(MultiLocation::parent()).into(); + let relay_asset_id: AssetId = AssetType::Xcm(Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1472,7 +1472,7 @@ fn xcm_asset_erc20_precompiles_approve() { fn xtokens_precompiles_transfer() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1492,7 +1492,7 @@ fn xtokens_precompiles_transfer() { let xtokens_precompile_address = H160::from_low_u64_be(2052); // We have the assetId that corresponds to the relay chain registered - let relay_asset_id: AssetId = AssetType::Xcm(MultiLocation::parent()).into(); + let relay_asset_id: AssetId = AssetType::Xcm(Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1501,12 +1501,12 @@ fn xtokens_precompiles_transfer() { ); // Alice has 1000 tokens. She should be able to send through precompile - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); // We use the address of the asset as an identifier of the asset we want to transfer @@ -1531,7 +1531,7 @@ fn xtokens_precompiles_transfer() { fn xtokens_precompiles_transfer_multiasset() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1551,12 +1551,12 @@ fn xtokens_precompiles_transfer_multiasset() { let xtokens_precompile_address = H160::from_low_u64_be(2052); // Alice has 1000 tokens. She should be able to send through precompile - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); // This time we transfer it through TransferMultiAsset @@ -1567,7 +1567,7 @@ fn xtokens_precompiles_transfer_multiasset() { xtokens_precompile_address, XtokensPCall::transfer_multiasset { // We want to transfer the relay token - asset: MultiLocation::parent(), + asset: Location::parent(), amount: 500_000_000_000_000u128.into(), destination, weight: 4_000_000, @@ -1595,12 +1595,12 @@ fn xtokens_precompiles_transfer_native() { let asset_precompile_address = H160::from_low_u64_be(2050); // Alice has 1000 tokens. She should be able to send through precompile - let destination = MultiLocation::new( + let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); // We use the address of the asset as an identifier of the asset we want to transfer @@ -1927,7 +1927,7 @@ fn root_can_change_default_xcm_vers() { (AccountId::from(BOB), 1_000 * UNIT), ]) .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1939,13 +1939,14 @@ fn root_can_change_default_xcm_vers() { }]) .build() .execute_with(|| { - let source_location = AssetType::Xcm(MultiLocation::parent()); - let dest = MultiLocation { + let source_location = AssetType::Xcm(Location::parent()); + let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: [1u8; 32], - }), + }] + .into(), }; let source_id: moonbase_runtime::AssetId = source_location.clone().into(); // Default XCM version is not set yet, so xtokens should fail because it does not @@ -1955,7 +1956,7 @@ fn root_can_change_default_xcm_vers() { origin_of(AccountId::from(ALICE)), moonbase_runtime::xcm_config::CurrencyId::ForeignAsset(source_id), 100_000_000_000_000, - Box::new(xcm::VersionedMultiLocation::V3(dest.clone())), + Box::new(xcm::VersionedLocation::V4(dest.clone())), WeightLimit::Limited(4000000000.into()) ), orml_xtokens::Error::::XcmExecutionFailed @@ -1972,7 +1973,7 @@ fn root_can_change_default_xcm_vers() { origin_of(AccountId::from(ALICE)), moonbase_runtime::xcm_config::CurrencyId::ForeignAsset(source_id), 100_000_000_000_000, - Box::new(xcm::VersionedMultiLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V4(dest)), WeightLimit::Limited(4000000000.into()) )); }) @@ -1986,7 +1987,7 @@ fn transactor_cannot_use_more_than_max_weight() { (AccountId::from(BOB), 1_000 * UNIT), ]) .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1998,7 +1999,7 @@ fn transactor_cannot_use_more_than_max_weight() { }]) .build() .execute_with(|| { - let source_location = AssetType::Xcm(MultiLocation::parent()); + let source_location = AssetType::Xcm(Location::parent()); let source_id: moonbase_runtime::AssetId = source_location.clone().into(); assert_ok!(XcmTransactor::register( root_origin(), @@ -2009,7 +2010,7 @@ fn transactor_cannot_use_more_than_max_weight() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( root_origin(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000.into(), @@ -2018,7 +2019,7 @@ fn transactor_cannot_use_more_than_max_weight() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( root_origin(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1, )); @@ -2028,9 +2029,9 @@ fn transactor_cannot_use_more_than_max_weight() { moonbase_runtime::xcm_config::Transactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new( - xcm::VersionedMultiLocation::V3(MultiLocation::parent()) - )), + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() + ))), fee_amount: None }, vec![], @@ -2085,9 +2086,9 @@ fn root_can_use_hrmp_manage() { para_id: 2000u32.into() }, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new( - xcm::VersionedMultiLocation::V3(MultiLocation::parent()) - )), + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() + ))), fee_amount: Some(10000) }, // 20000 is the max @@ -2112,9 +2113,9 @@ fn transact_through_signed_precompile_works_v1() { .build() .execute_with(|| { // Destination - let dest = MultiLocation::parent(); + let dest = Location::parent(); - let fee_payer_asset = MultiLocation::parent(); + let fee_payer_asset = Location::parent(); let bytes = vec![1u8, 2u8, 3u8]; @@ -2123,7 +2124,7 @@ fn transact_through_signed_precompile_works_v1() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( root_origin(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), Weight::from_parts(200_000, (xcm_primitives::DEFAULT_PROOF_SIZE) + 4000), @@ -2132,7 +2133,7 @@ fn transact_through_signed_precompile_works_v1() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( root_origin(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1, )); @@ -2164,9 +2165,9 @@ fn transact_through_signed_precompile_works_v2() { .build() .execute_with(|| { // Destination - let dest = MultiLocation::parent(); + let dest = Location::parent(); - let fee_payer_asset = MultiLocation::parent(); + let fee_payer_asset = Location::parent(); let bytes = vec![1u8, 2u8, 3u8]; @@ -2204,9 +2205,9 @@ fn transact_through_signed_cannot_send_to_local_chain() { .build() .execute_with(|| { // Destination - let dest = MultiLocation::here(); + let dest = Location::here(); - let fee_payer_asset = MultiLocation::parent(); + let fee_payer_asset = Location::parent(); let bytes = vec![1u8, 2u8, 3u8]; @@ -2399,7 +2400,7 @@ fn test_xcm_utils_ml_tp_account() { ExtBuilder::default().build().execute_with(|| { let xcm_utils_precompile_address = H160::from_low_u64_be(2060); let expected_address_parent: H160 = - ParentIsPreset::::convert_location(&MultiLocation::parent()) + ParentIsPreset::::convert_location(&Location::parent()) .unwrap() .into(); @@ -2408,14 +2409,14 @@ fn test_xcm_utils_ml_tp_account() { ALICE, xcm_utils_precompile_address, XcmUtilsPCall::multilocation_to_address { - multilocation: MultiLocation::parent(), + location: Location::parent(), }, ) .expect_cost(1000) .expect_no_logs() .execute_returns(Address(expected_address_parent)); - let parachain_2000_multilocation = MultiLocation::new(1, X1(Parachain(2000))); + let parachain_2000_multilocation = Location::new(1, [Parachain(2000)]); let expected_address_parachain: H160 = SiblingParachainConvertsVia::::convert_location( ¶chain_2000_multilocation, @@ -2428,27 +2429,28 @@ fn test_xcm_utils_ml_tp_account() { ALICE, xcm_utils_precompile_address, XcmUtilsPCall::multilocation_to_address { - multilocation: parachain_2000_multilocation, + location: parachain_2000_multilocation, }, ) .expect_cost(1000) .expect_no_logs() .execute_returns(Address(expected_address_parachain)); - let alice_in_parachain_2000_multilocation = MultiLocation::new( + let alice_in_parachain_2000_multilocation = Location::new( 1, - X2( + [ Parachain(2000), AccountKey20 { network: None, key: ALICE, }, - ), + ], ); - let expected_address_alice_in_parachain_2000: H160 = - xcm_builder::HashedDescriptionDescribeFamilyAllTerminal::::convert_location( - &alice_in_parachain_2000_multilocation, - ) + let expected_address_alice_in_parachain_2000 = + xcm_builder::HashedDescription::< + AccountId, + xcm_builder::DescribeFamily, + >::convert_location(&alice_in_parachain_2000_multilocation) .unwrap() .into(); @@ -2457,7 +2459,7 @@ fn test_xcm_utils_ml_tp_account() { ALICE, xcm_utils_precompile_address, XcmUtilsPCall::multilocation_to_address { - multilocation: alice_in_parachain_2000_multilocation, + location: alice_in_parachain_2000_multilocation, }, ) .expect_cost(1000) @@ -2473,7 +2475,7 @@ fn test_xcm_utils_weight_message() { let expected_weight = XcmWeight::::clear_origin().ref_time(); - let message: Vec = xcm::VersionedXcm::<()>::V3(Xcm(vec![ClearOrigin])).encode(); + let message: Vec = xcm::VersionedXcm::<()>::V4(Xcm(vec![ClearOrigin])).encode(); let input = XcmUtilsPCall::weight_message { message: message.into(), @@ -2491,9 +2493,9 @@ fn test_xcm_utils_weight_message() { fn test_xcm_utils_get_units_per_second() { ExtBuilder::default().build().execute_with(|| { let xcm_utils_precompile_address = H160::from_low_u64_be(2060); - let multilocation = SelfReserve::get(); + let location = SelfReserve::get(); - let input = XcmUtilsPCall::get_units_per_second { multilocation }; + let input = XcmUtilsPCall::get_units_per_second { location }; let expected_units = WEIGHT_REF_TIME_PER_SECOND as u128 * moonbase_runtime::currency::WEIGHT_FEE; diff --git a/runtime/moonbase/tests/xcm_mock/parachain.rs b/runtime/moonbase/tests/xcm_mock/parachain.rs index f442a3618f..315af8830f 100644 --- a/runtime/moonbase/tests/xcm_mock/parachain.rs +++ b/runtime/moonbase/tests/xcm_mock/parachain.rs @@ -46,12 +46,12 @@ use polkadot_parachain::primitives::{Id as ParaId, Sibling}; use xcm::latest::{ AssetId as XcmAssetId, Error as XcmError, ExecuteXcm, Junction::{PalletInstance, Parachain}, - Junctions, MultiLocation, NetworkId, Outcome, Xcm, + Location, NetworkId, Outcome, Xcm, }; use xcm_builder::{ AccountKey20Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, ConvertedConcreteId, CurrencyAdapter as XcmCurrencyAdapter, - EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, FungiblesAdapter, IsConcrete, + AllowTopLevelPaidExecutionFrom, ConvertedConcreteId, EnsureXcmOrigin, FixedRateOfFungible, + FixedWeightBounds, FungibleAdapter as XcmCurrencyAdapter, FungiblesAdapter, IsConcrete, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountKey20AsNative, SovereignSignedViaLocation, TakeWeightCredit, WithComputedOrigin, @@ -78,6 +78,7 @@ parameter_types! { impl frame_system::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type Hash = H256; @@ -119,7 +120,6 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } @@ -197,7 +197,7 @@ impl pallet_assets::Config for Runtime { } } -/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used +/// Type for specifying how a `Location` can be converted into an `AccountId`. This is used /// when determining ownership of accounts for asset transacting and when attempting to use XCM /// `Transact` in order to determine the dispatch Origin. pub type LocationToAccountId = ( @@ -207,7 +207,10 @@ pub type LocationToAccountId = ( SiblingParachainConvertsVia, AccountKey20Aliases, // The rest of multilocations convert via hashing it - xcm_builder::HashedDescriptionDescribeFamilyAllTerminal, + xcm_builder::HashedDescription< + AccountId, + xcm_builder::DescribeFamily, + >, ); /// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, @@ -251,7 +254,7 @@ pub type ForeignFungiblesTransactor = FungiblesAdapter< JustTry, >, ), - // Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID: + // Do a simple punn to convert an AccountId32 Location into a native chain account ID: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, @@ -268,7 +271,7 @@ pub type LocalAssetTransactor = XcmCurrencyAdapter< // Use this currency when it is a fungible asset matching any of the locations in // SelfReserveRepresentations IsConcrete, - // We can convert the MultiLocations with our converter above: + // We can convert the Locations with our converter above: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, @@ -324,7 +327,7 @@ parameter_types! { // a native trader that charges same number of units as weight // We use both the old and new anchoring logics pub ParaTokensPerSecond: (XcmAssetId, u128, u128) = ( - Concrete(SelfReserve::get()), + AssetId(SelfReserve::get()), 1000000000000, 0, ); @@ -333,17 +336,17 @@ parameter_types! { parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Polkadot; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub UniversalLocation: InteriorMultiLocation = - X2(GlobalConsensus(RelayNetwork::get()), Parachain(MsgQueue::parachain_id().into())); + pub UniversalLocation: InteriorLocation = + [GlobalConsensus(RelayNetwork::get()), Parachain(MsgQueue::parachain_id().into())].into(); // New Self Reserve location, defines the multilocation identifiying the self-reserve currency // This is used to match it also against our Balances pallet when we receive such - // a MultiLocation: (Self Balances pallet index) - pub SelfReserve: MultiLocation = MultiLocation { + // a Location: (Self Balances pallet index) + pub SelfReserve: Location = Location { parents:0, - interior: Junctions::X1( + interior: [ PalletInstance(::index() as u8) - ) + ].into() }; pub const MaxAssetsIntoHolding: u32 = 64; } @@ -390,6 +393,8 @@ impl Config for XcmConfig { type UniversalAliases = Nothing; type SafeCallFilter = Everything; type Aliasers = Nothing; + + type TransactionalProcessor = (); } impl cumulus_pallet_xcm::Config for Runtime { @@ -404,14 +409,14 @@ pub enum CurrencyId { ForeignAsset(AssetId), } -// How to convert from CurrencyId to MultiLocation -pub struct CurrencyIdtoMultiLocation(sp_std::marker::PhantomData); -impl sp_runtime::traits::Convert> - for CurrencyIdtoMultiLocation +// How to convert from CurrencyId to Location +pub struct CurrencyIdToLocation(sp_std::marker::PhantomData); +impl sp_runtime::traits::Convert> + for CurrencyIdToLocation where - AssetXConverter: MaybeEquivalence, + AssetXConverter: MaybeEquivalence, { - fn convert(currency: CurrencyId) -> Option { + fn convert(currency: CurrencyId) -> Option { match currency { CurrencyId::SelfReserve => { // For now and until Xtokens is adapted to handle 0.9.16 version we use @@ -419,7 +424,7 @@ where // This is not a problem in either cases, since the view of the destination // chain does not change // TODO! change this to NewAnchoringSelfReserve once xtokens is adapted for it - let multi: MultiLocation = SelfReserve::get(); + let multi: Location = SelfReserve::get(); Some(multi) } CurrencyId::ForeignAsset(asset) => AssetXConverter::convert_back(&asset), @@ -430,17 +435,17 @@ where parameter_types! { pub const BaseXcmWeight: Weight = Weight::from_parts(100u64, 100u64); pub const MaxAssetsForTransfer: usize = 2; - pub SelfLocation: MultiLocation = MultiLocation::here(); - pub SelfLocationAbsolute: MultiLocation = MultiLocation { + pub SelfLocation: Location = Location::here(); + pub SelfLocationAbsolute: Location = Location { parents:1, - interior: Junctions::X1( + interior: [ Parachain(MsgQueue::parachain_id().into()) - ) + ].into() }; } parameter_type_with_key! { - pub ParachainMinFee: |location: MultiLocation| -> Option { + pub ParachainMinFee: |location: Location| -> Option { match (location.parents, location.first_interior()) { (1, Some(Parachain(4u32))) => Some(50u128), _ => None, @@ -453,9 +458,9 @@ impl orml_xtokens::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = xcm_primitives::AccountIdToMultiLocation; + type AccountIdToLocation = xcm_primitives::AccountIdToLocation; type CurrencyIdConvert = - CurrencyIdtoMultiLocation>; + CurrencyIdToLocation>; type XcmExecutor = XcmExecutor; type SelfLocation = SelfLocation; type Weigher = xcm_builder::FixedWeightBounds; @@ -463,7 +468,7 @@ impl orml_xtokens::Config for Runtime { type UniversalLocation = UniversalLocation; type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; - type MultiLocationsFilter = Everything; + type LocationsFilter = Everything; type ReserveProvider = xcm_primitives::AbsoluteAndRelativeReserve; } @@ -568,15 +573,25 @@ pub mod mock_msg_queue { let hash = Encode::using_encoded(&xcm, T::Hashing::hash); let (result, event) = match Xcm::::try_from(xcm) { Ok(xcm) => { - let location = MultiLocation::new(1, Junctions::X1(Parachain(sender.into()))); + let location = Location::new(1, [Parachain(sender.into())]); let mut id = [0u8; 32]; id.copy_from_slice(hash.as_ref()); - match T::XcmExecutor::execute_xcm(location, xcm, id, max_weight) { - Outcome::Error(e) => (Err(e.clone()), Event::Fail(Some(hash), e)), - Outcome::Complete(w) => (Ok(w), Event::Success(Some(hash))), + match T::XcmExecutor::prepare_and_execute( + location, + xcm, + &mut id, + max_weight, + Weight::zero(), + ) { + Outcome::Error { error } => { + (Err(error.clone()), Event::Fail(Some(hash), error)) + } + Outcome::Complete { used } => (Ok(used), Event::Success(Some(hash))), // As far as the caller is concerned, this was dispatched without error, so // we just report the weight used. - Outcome::Incomplete(w, e) => (Ok(w), Event::Fail(Some(hash), e)), + Outcome::Incomplete { used, error } => { + (Ok(used), Event::Fail(Some(hash), error)) + } } } Err(()) => ( @@ -620,7 +635,7 @@ pub mod mock_msg_queue { limit: Weight, ) -> Weight { for (_i, (_sent_at, data)) in iter.enumerate() { - let id = sp_io::hashing::blake2_256(&data[..]); + let mut id = sp_io::hashing::blake2_256(&data[..]); let maybe_msg = VersionedXcm::::decode(&mut &data[..]) .map(Xcm::::try_from); match maybe_msg { @@ -631,7 +646,13 @@ pub mod mock_msg_queue { Self::deposit_event(Event::UnsupportedVersion(id)); } Ok(Ok(x)) => { - let outcome = T::XcmExecutor::execute_xcm(Parent, x, id, limit); + let outcome = T::XcmExecutor::prepare_and_execute( + Parent, + x, + &mut id, + limit, + Weight::zero(), + ); Self::deposit_event(Event::ExecutedDownward(id, outcome)); } @@ -698,12 +719,12 @@ pub type LocalOriginToLocation = xcm_primitives::SignedToAccountId20; parameter_types! { - pub MatcherLocation: MultiLocation = MultiLocation::here(); + pub MatcherLocation: Location = Location::here(); } #[cfg(feature = "runtime-benchmarks")] parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); + pub ReachableDest: Option = Some(Parent.into()); } impl pallet_xcm::Config for Runtime { @@ -739,22 +760,22 @@ impl pallet_xcm::Config for Runtime { // Our AssetType. For now we only handle Xcm Assets #[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] pub enum AssetType { - Xcm(MultiLocation), + Xcm(Location), } impl Default for AssetType { fn default() -> Self { - Self::Xcm(MultiLocation::here()) + Self::Xcm(Location::here()) } } -impl From for AssetType { - fn from(location: MultiLocation) -> Self { +impl From for AssetType { + fn from(location: Location) -> Self { Self::Xcm(location) } } -impl Into> for AssetType { - fn into(self) -> Option { +impl Into> for AssetType { + fn into(self) -> Option { match self { Self::Xcm(location) => Some(location), } @@ -860,7 +881,7 @@ impl pallet_asset_manager::Config for Runtime { // 1 ROC/WND should be enough parameter_types! { - pub MaxHrmpRelayFee: MultiAsset = (MultiLocation::parent(), 1_000_000_000_000u128).into(); + pub MaxHrmpRelayFee: Asset = (Location::parent(), 1_000_000_000_000u128).into(); } impl pallet_xcm_transactor::Config for Runtime { @@ -870,9 +891,9 @@ impl pallet_xcm_transactor::Config for Runtime { type DerivativeAddressRegistrationOrigin = EnsureRoot; type SovereignAccountDispatcherOrigin = frame_system::EnsureRoot; type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = xcm_primitives::AccountIdToMultiLocation; - type CurrencyIdToMultiLocation = - CurrencyIdtoMultiLocation>; + type AccountIdToLocation = xcm_primitives::AccountIdToLocation; + type CurrencyIdToLocation = + CurrencyIdToLocation>; type SelfLocation = SelfLocation; type Weigher = xcm_builder::FixedWeightBounds; type UniversalLocation = UniversalLocation; @@ -985,9 +1006,9 @@ pub enum MockTransactors { } impl xcm_primitives::XcmTransact for MockTransactors { - fn destination(self) -> MultiLocation { + fn destination(self) -> Location { match self { - MockTransactors::Relay => MultiLocation::parent(), + MockTransactors::Relay => Location::parent(), } } } diff --git a/runtime/moonbase/tests/xcm_mock/relay_chain.rs b/runtime/moonbase/tests/xcm_mock/relay_chain.rs index 31fb79a3a1..4b068d9638 100644 --- a/runtime/moonbase/tests/xcm_mock/relay_chain.rs +++ b/runtime/moonbase/tests/xcm_mock/relay_chain.rs @@ -40,9 +40,10 @@ use xcm::latest::prelude::*; use xcm_builder::{ Account32Hash, AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, - ChildSystemParachainAsSuperuser, CurrencyAdapter as XcmCurrencyAdapter, FixedRateOfFungible, - FixedWeightBounds, IsConcrete, ProcessXcmMessage, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, WithComputedOrigin, + ChildSystemParachainAsSuperuser, FixedRateOfFungible, FixedWeightBounds, + FungibleAdapter as XcmCurrencyAdapter, IsConcrete, ProcessXcmMessage, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + WithComputedOrigin, }; use xcm_executor::{Config, XcmExecutor}; pub type AccountId = AccountId32; @@ -56,6 +57,7 @@ parameter_types! { impl frame_system::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type Hash = H256; @@ -97,7 +99,6 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } @@ -109,17 +110,19 @@ impl pallet_utility::Config for Runtime { type PalletsOrigin = OriginCaller; } -impl shared::Config for Runtime {} +impl shared::Config for Runtime { + type DisabledValidators = (); +} impl configuration::Config for Runtime { type WeightInfo = configuration::TestWeightInfo; } parameter_types! { - pub KsmLocation: MultiLocation = Here.into(); + pub KsmLocation: Location = Here.into(); pub const KusamaNetwork: NetworkId = NetworkId::Kusama; pub const AnyNetwork: Option = None; - pub UniversalLocation: InteriorMultiLocation = Here; + pub UniversalLocation: InteriorLocation = Here; } pub type SovereignAccountOf = ( @@ -142,10 +145,10 @@ type LocalOriginConverter = ( parameter_types! { pub const BaseXcmWeight: Weight = Weight::from_parts(1000u64, 1000u64); - pub KsmPerSecond: (AssetId, u128, u128) = (Concrete(KsmLocation::get()), 1, 1); + pub KsmPerSecond: (AssetId, u128, u128) = (AssetId(KsmLocation::get()), 1, 1); pub const MaxInstructions: u32 = 100; pub const MaxAssetsIntoHolding: u32 = 64; - pub MatcherLocation: MultiLocation = MultiLocation::here(); + pub MatcherLocation: Location = Location::here(); } pub type XcmRouter = super::RelayChainXcmRouter; @@ -168,9 +171,9 @@ pub type XcmBarrier = ( ); parameter_types! { - pub Kusama: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(KsmLocation::get()) }); - pub Statemine: MultiLocation = Parachain(4).into(); - pub KusamaForStatemine: (MultiAssetFilter, MultiLocation) = (Kusama::get(), Statemine::get()); + pub Kusama: AssetFilter = Wild(AllOf { fun: WildFungible, id: AssetId(KsmLocation::get()) }); + pub Statemine: Location = Parachain(4).into(); + pub KusamaForStatemine: (AssetFilter, Location) = (Kusama::get(), Statemine::get()); } pub type TrustedTeleporters = xcm_builder::Case; @@ -201,13 +204,14 @@ impl Config for XcmConfig { type UniversalAliases = Nothing; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = (); } pub type LocalOriginToLocation = SignedToAccountId32; #[cfg(feature = "runtime-benchmarks")] parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); + pub ReachableDest: Option = Some(Parent.into()); } impl pallet_xcm::Config for Runtime { @@ -272,6 +276,7 @@ impl paras::Config for Runtime { type NextSessionRotation = TestNextSessionRotation; type QueueFootprinter = (); type OnNewHead = (); + type AssignCoretime = (); } impl dmp::Config for Runtime {} diff --git a/runtime/moonbase/tests/xcm_mock/statemint_like.rs b/runtime/moonbase/tests/xcm_mock/statemint_like.rs index 7348b799e4..18ffad9742 100644 --- a/runtime/moonbase/tests/xcm_mock/statemint_like.rs +++ b/runtime/moonbase/tests/xcm_mock/statemint_like.rs @@ -17,8 +17,8 @@ //! Relay chain runtime mock. use frame_support::{ - construct_runtime, match_types, parameter_types, - traits::{AsEnsureOriginWithArg, Everything, Nothing}, + construct_runtime, parameter_types, + traits::{AsEnsureOriginWithArg, Contains, Everything, Nothing}, weights::Weight, }; use frame_system::{EnsureRoot, EnsureSigned}; @@ -39,7 +39,7 @@ use xcm::VersionedXcm; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, + ConvertedConcreteId, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, FungibleAdapter, FungiblesAdapter, IsConcrete, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, @@ -60,6 +60,7 @@ parameter_types! { impl frame_system::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type Hash = H256; @@ -101,7 +102,6 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } @@ -156,18 +156,18 @@ impl pallet_assets::Config for Runtime { } parameter_types! { - pub const KsmLocation: MultiLocation = MultiLocation::parent(); + pub const KsmLocation: Location = Location::parent(); pub const RelayNetwork: NetworkId = NetworkId::Kusama; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub UniversalLocation: InteriorMultiLocation = - X2(GlobalConsensus(RelayNetwork::get()), Parachain(MsgQueue::parachain_id().into())); - pub Local: MultiLocation = Here.into(); + pub UniversalLocation: InteriorLocation = + [GlobalConsensus(RelayNetwork::get()), Parachain(MsgQueue::parachain_id().into())].into(); + pub Local: Location = Here.into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); pub KsmPerSecond: (xcm::latest::prelude::AssetId, u128, u128) = - (Concrete(KsmLocation::get()), 1, 1); + (AssetId(KsmLocation::get()), 1, 1); } -/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used +/// Type for specifying how a `Location` can be converted into an `AccountId`. This is used /// when determining ownership of accounts for asset transacting and when attempting to use XCM /// `Transact` in order to determine the dispatch Origin. pub type LocationToAccountId = ( @@ -180,12 +180,12 @@ pub type LocationToAccountId = ( ); /// Means for transacting the native currency on this chain. -pub type CurrencyTransactor = CurrencyAdapter< +pub type CurrencyTransactor = FungibleAdapter< // Use this currency: Balances, // Use this currency when it is a fungible asset matching the given location or name: IsConcrete, - // Convert an XCM MultiLocation into a local account id: + // Convert an XCM Location into a local account id: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, @@ -204,7 +204,7 @@ pub type FungiblesTransactor = FungiblesAdapter< AsPrefixedGeneralIndex, JustTry, >, - // Convert an XCM MultiLocation into a local account id: + // Convert an XCM Location into a local account id: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, @@ -247,17 +247,28 @@ parameter_types! { pub const MaxInstructions: u32 = 100; } -match_types! { - pub type ParentOrParentsExecutivePlurality: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } - }; +pub struct ParentOrParentsExecutivePlurality; +impl Contains for ParentOrParentsExecutivePlurality { + fn contains(location: &Location) -> bool { + matches!( + location.unpack(), + (1, []) + | ( + 1, + [Plurality { + id: BodyId::Executive, + .. + }] + ) + ) + } } -match_types! { - pub type ParentOrSiblings: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(_) } - }; + +pub struct ParentOrSiblings; +impl Contains for ParentOrSiblings { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, []) | (1, [_])) + } } pub type Barrier = ( @@ -272,7 +283,7 @@ pub type Barrier = ( ); parameter_types! { - pub MatcherLocation: MultiLocation = MultiLocation::here(); + pub MatcherLocation: Location = Location::here(); pub const MaxAssetsIntoHolding: u32 = 64; } @@ -303,6 +314,8 @@ impl Config for XcmConfig { type UniversalAliases = Nothing; type SafeCallFilter = Everything; type Aliasers = Nothing; + + type TransactionalProcessor = (); } /// No local origins on this chain are allowed to dispatch XCM sends/executions. @@ -312,7 +325,7 @@ pub type XcmRouter = super::ParachainXcmRouter; #[cfg(feature = "runtime-benchmarks")] parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); + pub ReachableDest: Option = Some(Parent.into()); } impl pallet_xcm::Config for Runtime { @@ -413,15 +426,25 @@ pub mod mock_msg_queue { let hash = Encode::using_encoded(&xcm, T::Hashing::hash); let (result, event) = match Xcm::::try_from(xcm) { Ok(xcm) => { - let location = MultiLocation::new(1, Junctions::X1(Parachain(sender.into()))); + let location = Location::new(1, [Parachain(sender.into())]); let mut id = [0u8; 32]; id.copy_from_slice(hash.as_ref()); - match T::XcmExecutor::execute_xcm(location, xcm, id, max_weight) { - Outcome::Error(e) => (Err(e.clone()), Event::Fail(Some(hash), e)), - Outcome::Complete(w) => (Ok(w), Event::Success(Some(hash))), + match T::XcmExecutor::prepare_and_execute( + location, + xcm, + &mut id, + max_weight, + Weight::zero(), + ) { + Outcome::Error { error } => { + (Err(error.clone()), Event::Fail(Some(hash), error)) + } + Outcome::Complete { used } => (Ok(used), Event::Success(Some(hash))), // As far as the caller is concerned, this was dispatched without error, so // we just report the weight used. - Outcome::Incomplete(w, e) => (Ok(w), Event::Fail(Some(hash), e)), + Outcome::Incomplete { used, error } => { + (Ok(used), Event::Fail(Some(hash), error)) + } } } Err(()) => ( @@ -465,7 +488,7 @@ pub mod mock_msg_queue { limit: Weight, ) -> Weight { for (_i, (_sent_at, data)) in iter.enumerate() { - let id = sp_io::hashing::blake2_256(&data[..]); + let mut id = sp_io::hashing::blake2_256(&data[..]); let maybe_msg = VersionedXcm::::decode(&mut &data[..]) .map(Xcm::::try_from); match maybe_msg { @@ -476,7 +499,13 @@ pub mod mock_msg_queue { Self::deposit_event(Event::UnsupportedVersion(id)); } Ok(Ok(x)) => { - let outcome = T::XcmExecutor::execute_xcm(Parent, x, id, limit); + let outcome = T::XcmExecutor::prepare_and_execute( + Parent, + x, + &mut id, + limit, + Weight::zero(), + ); Self::deposit_event(Event::ExecutedDownward(id, outcome)); } @@ -511,10 +540,10 @@ pub mod mock_statemint_prefix { #[pallet::storage] #[pallet::getter(fn current_prefix)] - pub(super) type CurrentPrefix = StorageValue<_, MultiLocation, ValueQuery>; + pub(super) type CurrentPrefix = StorageValue<_, Location, ValueQuery>; - impl Get for Pallet { - fn get() -> MultiLocation { + impl Get for Pallet { + fn get() -> Location { Self::current_prefix() } } @@ -523,11 +552,11 @@ pub mod mock_statemint_prefix { #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { // Changed Prefix - PrefixChanged(MultiLocation), + PrefixChanged(Location), } impl Pallet { - pub fn set_prefix(prefix: MultiLocation) { + pub fn set_prefix(prefix: Location) { CurrentPrefix::::put(&prefix); Self::deposit_event(Event::PrefixChanged(prefix)); } diff --git a/runtime/moonbase/tests/xcm_tests.rs b/runtime/moonbase/tests/xcm_tests.rs index ca0b9fa5a1..f75daefb4e 100644 --- a/runtime/moonbase/tests/xcm_tests.rs +++ b/runtime/moonbase/tests/xcm_tests.rs @@ -28,9 +28,12 @@ use pallet_xcm_transactor::{ Currency, CurrencyPayment, HrmpInitParams, HrmpOperation, TransactWeights, }; use sp_std::boxed::Box; -use xcm::latest::prelude::*; -use xcm::{VersionedMultiLocation, WrapVersion}; -use xcm_builder::HashedDescriptionDescribeFamilyAllTerminal; +use xcm::latest::prelude::{ + AccountId32, AccountKey20, All, BuyExecution, ClearOrigin, DepositAsset, GeneralIndex, + Junction, Junctions, Limited, Location, OriginKind, PalletInstance, Parachain, QueryResponse, + Reanchorable, Response, WeightLimit, WithdrawAsset, Xcm, +}; +use xcm::{VersionedLocation, WrapVersion}; use xcm_executor::traits::ConvertLocation; use xcm_mock::*; use xcm_primitives::{UtilityEncodeCall, DEFAULT_PROOF_SIZE}; @@ -42,7 +45,7 @@ use cumulus_primitives_core::relay_chain::HrmpChannelId; fn receive_relay_asset_from_relay() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -67,7 +70,7 @@ fn receive_relay_asset_from_relay() { }); // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -76,8 +79,8 @@ fn receive_relay_asset_from_relay() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([], 123).into()), 0, )); }); @@ -94,7 +97,7 @@ fn receive_relay_asset_from_relay() { fn send_relay_asset_to_relay() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -121,7 +124,7 @@ fn send_relay_asset_to_relay() { )); }); - let dest: MultiLocation = Junction::AccountKey20 { + let dest: Location = Junction::AccountKey20 { network: None, key: PARAALICE, } @@ -132,8 +135,8 @@ fn send_relay_asset_to_relay() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([], 123).into()), 0, )); }); @@ -150,12 +153,13 @@ fn send_relay_asset_to_relay() { }); // We now send back some money to the relay - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: RELAYALICE.into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -164,7 +168,7 @@ fn send_relay_asset_to_relay() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 123, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -185,7 +189,7 @@ fn send_relay_asset_to_relay() { fn send_relay_asset_to_para_b() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -229,7 +233,7 @@ fn send_relay_asset_to_para_b() { }); // First send relay chain asset to Parachain A like in previous test - let dest: MultiLocation = Junction::AccountKey20 { + let dest: Location = Junction::AccountKey20 { network: None, key: PARAALICE, } @@ -238,8 +242,8 @@ fn send_relay_asset_to_para_b() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([], 123).into()), 0, )); }); @@ -250,15 +254,16 @@ fn send_relay_asset_to_para_b() { }); // Now send relay asset from para A to para B - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaA::execute_with(|| { @@ -266,7 +271,7 @@ fn send_relay_asset_to_para_b() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -287,7 +292,7 @@ fn send_para_a_asset_to_para_b() { MockNet::reset(); // this represents the asset in paraA - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -315,15 +320,16 @@ fn send_para_a_asset_to_para_b() { }); // Send para A asset from para A to para B - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaA::execute_with(|| { @@ -332,7 +338,7 @@ fn send_para_a_asset_to_para_b() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(800000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -356,7 +362,7 @@ fn send_para_a_asset_from_para_b_to_para_c() { MockNet::reset(); // Represents para A asset - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -401,15 +407,16 @@ fn send_para_a_asset_from_para_b_to_para_c() { }); // Send para A asset to para B - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaA::execute_with(|| { // free execution, full amount received @@ -417,7 +424,7 @@ fn send_para_a_asset_from_para_b_to_para_c() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -436,15 +443,16 @@ fn send_para_a_asset_from_para_b_to_para_c() { }); // Send para A asset from para B to para C - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(3), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaB::execute_with(|| { @@ -452,7 +460,7 @@ fn send_para_a_asset_from_para_b_to_para_c() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -468,7 +476,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { MockNet::reset(); // Para A asset - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -496,22 +504,23 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { }); // Send para A asset to para B - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaA::execute_with(|| { assert_ok!(XTokens::transfer( parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -530,22 +539,23 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { }); // Send back para A asset to para A - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(1), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaB::execute_with(|| { assert_ok!(XTokens::transfer( parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -563,7 +573,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { MockNet::reset(); - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -589,22 +599,23 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { )); }); - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaA::execute_with(|| { assert_ok!(XTokens::transfer( parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -625,14 +636,14 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { // This time we will force the new reanchoring by manually sending the // Message through polkadotXCM pallet - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: X1(Parachain(1)), + interior: [Parachain(1)].into(), }; - let reanchored_para_a_balances = MultiLocation::new(0, X1(PalletInstance(1u8))); + let reanchored_para_a_balances = Location::new(0, [PalletInstance(1u8)]); - let message = xcm::VersionedXcm::<()>::V3(Xcm(vec![ + let message = xcm::VersionedXcm::<()>::V4(Xcm(vec![ WithdrawAsset((reanchored_para_a_balances.clone(), 100).into()), ClearOrigin, BuyExecution { @@ -641,12 +652,12 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { }, DepositAsset { assets: All.into(), - beneficiary: MultiLocation::new( + beneficiary: Location::new( 0, - X1(AccountKey20 { + [AccountKey20 { network: None, key: PARAALICE, - }), + }], ), }, ])); @@ -673,7 +684,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { fn receive_relay_asset_with_trader() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -701,7 +712,7 @@ fn receive_relay_asset_with_trader() { )); }); - let dest: MultiLocation = Junction::AccountKey20 { + let dest: Location = Junction::AccountKey20 { network: None, key: PARAALICE, } @@ -716,8 +727,8 @@ fn receive_relay_asset_with_trader() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), - Box::new((Here, 100).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([], 100).into()), 0, )); }); @@ -734,7 +745,7 @@ fn receive_relay_asset_with_trader() { fn send_para_a_asset_to_para_b_with_trader() { MockNet::reset(); - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -760,15 +771,16 @@ fn send_para_a_asset_to_para_b_with_trader() { )); }); - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; // In destination chain, we only need 4 weight @@ -778,7 +790,7 @@ fn send_para_a_asset_to_para_b_with_trader() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(10u64, DEFAULT_PROOF_SIZE)) )); }); @@ -808,7 +820,7 @@ fn send_para_a_asset_to_para_b_with_trader() { fn send_para_a_asset_to_para_b_with_trader_and_fee() { MockNet::reset(); - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -835,15 +847,16 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { )); }); - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; // we use transfer_with_fee @@ -853,7 +866,7 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { parachain::CurrencyId::SelfReserve, 100, 1, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(800000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -876,7 +889,7 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { fn error_when_not_paying_enough() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -885,7 +898,7 @@ fn error_when_not_paying_enough() { decimals: 12, }; - let dest: MultiLocation = Junction::AccountKey20 { + let dest: Location = Junction::AccountKey20 { network: None, key: PARAALICE, } @@ -916,8 +929,8 @@ fn error_when_not_paying_enough() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), - Box::new((Here, 5).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([], 5).into()), 0, )); }); @@ -932,7 +945,7 @@ fn error_when_not_paying_enough() { fn transact_through_derivative_multilocation() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -959,7 +972,7 @@ fn transact_through_derivative_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000000000.into(), @@ -968,14 +981,14 @@ fn transact_through_derivative_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), WEIGHT_REF_TIME_PER_SECOND as u128, )); }); // Let's construct the call to know how much weight it is going to require - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -985,8 +998,8 @@ fn transact_through_derivative_multilocation() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), - Box::new((Here, 4000003100u128).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([], 4000003100u128).into()), 0, )); }); @@ -1008,12 +1021,13 @@ fn transact_through_derivative_multilocation() { // Send to registered address let registered_address = derivative_account_id(para_a_account(), 0); - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: registered_address.clone().into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -1022,7 +1036,7 @@ fn transact_through_derivative_multilocation() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1063,8 +1077,8 @@ fn transact_through_derivative_multilocation() { parachain::MockTransactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), fee_amount: None }, @@ -1100,7 +1114,7 @@ fn transact_through_derivative_multilocation() { fn transact_through_derivative_with_custom_fee_weight() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1127,7 +1141,7 @@ fn transact_through_derivative_with_custom_fee_weight() { // Let's construct the call to know how much weight it is going to require - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1137,8 +1151,8 @@ fn transact_through_derivative_with_custom_fee_weight() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), - Box::new((Here, 4000003100u128).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([], 4000003100u128).into()), 0, )); }); @@ -1160,12 +1174,13 @@ fn transact_through_derivative_with_custom_fee_weight() { // Send to registered address let registered_address = derivative_account_id(para_a_account(), 0); - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: registered_address.clone().into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -1174,7 +1189,7 @@ fn transact_through_derivative_with_custom_fee_weight() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1216,8 +1231,8 @@ fn transact_through_derivative_with_custom_fee_weight() { parachain::MockTransactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), // 1-1 fee weight mapping fee_amount: Some(overall_weight as u128) @@ -1254,7 +1269,7 @@ fn transact_through_derivative_with_custom_fee_weight() { fn transact_through_derivative_with_custom_fee_weight_refund() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1281,7 +1296,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { // Let's construct the call to know how much weight it is going to require - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1291,8 +1306,8 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), - Box::new((Here, 4000009100u128).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([], 4000009100u128).into()), 0, )); }); @@ -1314,12 +1329,13 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { // Send to registered address let registered_address = derivative_account_id(para_a_account(), 0); - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: registered_address.clone().into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -1328,7 +1344,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1370,8 +1386,8 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { parachain::MockTransactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), // 1-1 fee weight mapping fee_amount: Some(overall_weight as u128) @@ -1407,7 +1423,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { fn transact_through_sovereign() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1434,7 +1450,7 @@ fn transact_through_sovereign() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000000000.into(), @@ -1443,12 +1459,12 @@ fn transact_through_sovereign() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), WEIGHT_REF_TIME_PER_SECOND as u128, )); }); - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1457,8 +1473,8 @@ fn transact_through_sovereign() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), - Box::new((Here, 4000003100u128).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([], 4000003100u128).into()), 0, )); }); @@ -1479,12 +1495,13 @@ fn transact_through_sovereign() { // Send to registered address let registered_address = derivative_account_id(para_a_account(), 0); - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: registered_address.clone().into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -1493,7 +1510,7 @@ fn transact_through_sovereign() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1512,9 +1529,9 @@ fn transact_through_sovereign() { }); // We send the xcm transact operation to parent - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: Here, + interior: [].into(), }; // Encode the call. Balances transact to para_a_account @@ -1543,11 +1560,11 @@ fn transact_through_sovereign() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_sovereign( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V4(dest)), PARAALICE.into(), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), fee_amount: None }, @@ -1573,7 +1590,7 @@ fn transact_through_sovereign() { fn transact_through_sovereign_with_custom_fee_weight() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1598,7 +1615,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { )); }); - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1607,8 +1624,8 @@ fn transact_through_sovereign_with_custom_fee_weight() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), - Box::new((Here, 4000003100u128).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([], 4000003100u128).into()), 0, )); }); @@ -1629,12 +1646,13 @@ fn transact_through_sovereign_with_custom_fee_weight() { // Send to registered address let registered_address = derivative_account_id(para_a_account(), 0); - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: registered_address.clone().into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -1643,7 +1661,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1662,9 +1680,9 @@ fn transact_through_sovereign_with_custom_fee_weight() { }); // We send the xcm transact operation to parent - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: Here, + interior: [].into(), }; // Encode the call. Balances transact to para_a_account @@ -1694,11 +1712,11 @@ fn transact_through_sovereign_with_custom_fee_weight() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_sovereign( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V4(dest)), PARAALICE.into(), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), // 1-1 fee-weight mapping fee_amount: Some(total_weight as u128) @@ -1725,7 +1743,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { fn transact_through_sovereign_with_custom_fee_weight_refund() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1750,7 +1768,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { )); }); - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1759,8 +1777,8 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), - Box::new((Here, 4000009100u128).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([], 4000009100u128).into()), 0, )); }); @@ -1781,12 +1799,13 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { // Send to registered address let registered_address = derivative_account_id(para_a_account(), 0); - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: registered_address.clone().into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -1795,7 +1814,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1814,9 +1833,9 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { }); // We send the xcm transact operation to parent - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: Here, + interior: [].into(), }; // Encode the call. Balances transact to para_a_account @@ -1846,11 +1865,11 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_sovereign( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V4(dest)), PARAALICE.into(), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), // 1-1 fee-weight mapping fee_amount: Some(total_weight as u128) @@ -1878,7 +1897,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { fn test_automatic_versioning_on_runtime_upgrade_with_relay() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1903,7 +1922,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { }); let response = Response::Version(2); - let querier: MultiLocation = Here.into(); + let querier: Location = [].into(); // This is irrelevant, nothing will be done with this message, // but we need to pass a message as an argument to trigger the storage change @@ -1916,7 +1935,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { // The router is mocked, and we cannot use WrapVersion in ChildParachainRouter. So we will force // it directly here // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1941,8 +1960,8 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([], 123).into()), 0, )); @@ -1955,9 +1974,9 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { let expected_supported_version: relay_chain::RuntimeEvent = pallet_xcm::Event::SupportedVersionChanged { - location: MultiLocation { + location: Location { parents: 0, - interior: X1(Parachain(1)), + interior: [Parachain(1)].into(), }, version: 1, } @@ -1990,9 +2009,9 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { // This event should have been seen in the relay let expected_supported_version_2: relay_chain::RuntimeEvent = pallet_xcm::Event::SupportedVersionChanged { - location: MultiLocation { + location: Location { parents: 0, - interior: X1(Parachain(1)), + interior: [Parachain(1)].into(), }, version: 2, } @@ -2008,7 +2027,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { MockNet::reset(); - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -2018,7 +2037,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { decimals: 18, }; let response = Response::Version(2); - let querier: MultiLocation = Here.into(); + let querier: Location = [].into(); // This is irrelevant, nothing will be done with this message, // but we need to pass a message as an argument to trigger the storage change @@ -2061,7 +2080,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { )); // Wrap version, which sets VersionedStorage assert_ok!(::wrap_version( - &MultiLocation::new(1, X1(Parachain(2))).into(), + &Location::new(1, [Parachain(2)]).into(), mock_message )); @@ -2073,9 +2092,9 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { let expected_supported_version: parachain::RuntimeEvent = pallet_xcm::Event::SupportedVersionChanged { - location: MultiLocation { + location: Location { parents: 1, - interior: X1(Parachain(2)), + interior: [Parachain(2)].into(), }, version: 0, } @@ -2087,23 +2106,25 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { }); // Let's ensure talking in v0 works - let dest = MultiLocation { + let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), - }; + ] + .into(), + } + .into(); ParaA::execute_with(|| { // free execution, full amount received assert_ok!(XTokens::transfer( parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); // free execution, full amount received @@ -2140,9 +2161,9 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { // This event should have been seen in para A let expected_supported_version_2: parachain::RuntimeEvent = pallet_xcm::Event::SupportedVersionChanged { - location: MultiLocation { + location: Location { parents: 1, - interior: X1(Parachain(2)), + interior: [Parachain(2)].into(), }, version: 2, } @@ -2160,7 +2181,7 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { MockNet::reset(); let fresh_account = [2u8; 20]; - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -2185,7 +2206,7 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { }); // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: fresh_account, } @@ -2194,8 +2215,8 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest.clone()).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest.clone()).clone().into()), + Box::new(([], 123).into()), 0, )); }); @@ -2220,8 +2241,8 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([], 123).into()), 0, )); }); @@ -2238,7 +2259,7 @@ fn receive_assets_with_sufficients_true_allows_non_funded_account_to_receive_ass MockNet::reset(); let fresh_account = [2u8; 20]; - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -2263,7 +2284,7 @@ fn receive_assets_with_sufficients_true_allows_non_funded_account_to_receive_ass }); // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: fresh_account, } @@ -2272,8 +2293,8 @@ fn receive_assets_with_sufficients_true_allows_non_funded_account_to_receive_ass assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest.clone()).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest.clone()).clone().into()), + Box::new(([], 123).into()), 0, )); }); @@ -2299,7 +2320,7 @@ fn evm_account_receiving_assets_should_handle_sufficients_ref_count() { assert_eq!(parachain::System::account(evm_account_id).sufficients, 1); }); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -2323,7 +2344,7 @@ fn evm_account_receiving_assets_should_handle_sufficients_ref_count() { }); // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: sufficient_account, } @@ -2332,8 +2353,8 @@ fn evm_account_receiving_assets_should_handle_sufficients_ref_count() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest.clone()).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest.clone()).clone().into()), + Box::new(([], 123).into()), 0, )); }); @@ -2367,7 +2388,7 @@ fn empty_account_should_not_be_reset() { let evm_account_id = parachain::AccountId::from(sufficient_account); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -2401,7 +2422,7 @@ fn empty_account_should_not_be_reset() { }); // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: sufficient_account, } @@ -2410,8 +2431,8 @@ fn empty_account_should_not_be_reset() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest.clone()).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest.clone()).clone().into()), + Box::new(([], 123).into()), 0, )); }); @@ -2463,7 +2484,7 @@ fn empty_account_should_not_be_reset() { fn test_statemint_like() { MockNet::reset(); - let dest_para = MultiLocation::new(1, X1(Parachain(1))); + let dest_para = Location::new(1, [Parachain(1)]); let sov = xcm_builder::SiblingParachainConvertsVia::< polkadot_parachain::primitives::Sibling, @@ -2471,13 +2492,13 @@ fn test_statemint_like() { >::convert_location(&dest_para) .unwrap(); - let statemint_asset_a_balances = MultiLocation::new( + let statemint_asset_a_balances = Location::new( 1, - X3( + [ Parachain(4), PalletInstance(5), xcm::latest::prelude::GeneralIndex(0u128), - ), + ], ); let source_location = parachain::AssetType::Xcm(statemint_asset_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -2531,7 +2552,7 @@ fn test_statemint_like() { )); // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -2540,16 +2561,16 @@ fn test_statemint_like() { // Send asset with previous prefix assert_ok!(StatemintChainPalletXcm::reserve_transfer_assets( statemint_like::RuntimeOrigin::signed(RELAYALICE), - Box::new(MultiLocation::new(1, X1(Parachain(1))).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(Location::new(1, [Parachain(1)]).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), Box::new( ( - X2( + [ xcm::latest::prelude::PalletInstance( ::index() as u8 ), xcm::latest::prelude::GeneralIndex(0), - ), + ], 123 ) .into() @@ -2568,7 +2589,7 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { MockNet::reset(); // Relay asset - let relay_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let relay_location = parachain::AssetType::Xcm(Location::parent()); let source_relay_id: parachain::AssetId = relay_location.clone().into(); let relay_asset_metadata = parachain::AssetMetadata { @@ -2578,9 +2599,9 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { }; // Statemint asset - let statemint_asset = MultiLocation::new( + let statemint_asset = Location::new( 1, - X3(Parachain(4u32), PalletInstance(5u8), GeneralIndex(10u128)), + [Parachain(4u32), PalletInstance(5u8), GeneralIndex(10u128)], ); let statemint_location_asset = parachain::AssetType::Xcm(statemint_asset); let source_statemint_asset_id: parachain::AssetId = statemint_location_asset.clone().into(); @@ -2591,7 +2612,7 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { decimals: 12, }; - let dest_para = MultiLocation::new(1, X1(Parachain(1))); + let dest_para = Location::new(1, [Parachain(1)]); let sov = xcm_builder::SiblingParachainConvertsVia::< polkadot_parachain::primitives::Sibling, @@ -2629,7 +2650,7 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { )); }); - let parachain_beneficiary_from_relay: MultiLocation = Junction::AccountKey20 { + let parachain_beneficiary_from_relay: Location = Junction::AccountKey20 { network: None, key: PARAALICE, } @@ -2641,11 +2662,11 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), Box::new( - VersionedMultiLocation::V3(parachain_beneficiary_from_relay) + VersionedLocation::V4(parachain_beneficiary_from_relay) .clone() .into() ), - Box::new((Here, 200).into()), + Box::new(([], 200).into()), 0, )); }); @@ -2679,7 +2700,7 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { )); // Send statemint USDC asset to Alice in Parachain A - let parachain_beneficiary_from_statemint: MultiLocation = AccountKey20 { + let parachain_beneficiary_from_statemint: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -2688,20 +2709,20 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { // Send with new prefix assert_ok!(StatemintChainPalletXcm::reserve_transfer_assets( statemint_like::RuntimeOrigin::signed(RELAYALICE), - Box::new(MultiLocation::new(1, X1(Parachain(1))).into()), + Box::new(Location::new(1, [Parachain(1)]).into()), Box::new( - VersionedMultiLocation::V3(parachain_beneficiary_from_statemint) + VersionedLocation::V4(parachain_beneficiary_from_statemint) .clone() .into() ), Box::new( ( - X2( + [ xcm::latest::prelude::PalletInstance( ::index() as u8 ), GeneralIndex(10), - ), + ], 125 ) .into() @@ -2710,15 +2731,16 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { )); }); - let statemint_beneficiary = MultiLocation { + let statemint_beneficiary = Location { parents: 1, - interior: X2( + interior: [ Parachain(4), AccountId32 { network: None, id: RELAYBOB.into(), }, - ), + ] + .into(), }; ParaA::execute_with(|| { @@ -2749,7 +2771,7 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { (parachain::CurrencyId::ForeignAsset(source_relay_id), 100) ], 1, - Box::new(VersionedMultiLocation::V3(statemint_beneficiary)), + Box::new(VersionedLocation::V4(statemint_beneficiary)), WeightLimit::Limited(Weight::from_parts(80_000_000u64, 100_000u64)) )); }); @@ -2774,13 +2796,13 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { #[test] fn transact_through_signed_multilocation() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000000000.into(), @@ -2790,17 +2812,18 @@ fn transact_through_signed_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), WEIGHT_REF_TIME_PER_SECOND as u128, )); ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); let mut descend_origin_multilocation = parachain::SelfLocation::get(); descend_origin_multilocation @@ -2809,7 +2832,7 @@ fn transact_through_signed_multilocation() { // To convert it to what the relay will see instead of us descend_origin_multilocation - .reanchor(&MultiLocation::parent(), ancestry.interior) + .reanchor(&Location::parent(), &ancestry.interior) .unwrap(); let derived = xcm_builder::Account32Hash::< @@ -2853,10 +2876,10 @@ fn transact_through_signed_multilocation() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), fee_amount: None }, @@ -2880,17 +2903,18 @@ fn transact_through_signed_multilocation() { #[test] fn transact_through_signed_multilocation_custom_fee_and_weight() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); ParaA::execute_with(|| { ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); let mut descend_origin_multilocation = parachain::SelfLocation::get(); descend_origin_multilocation @@ -2899,7 +2923,7 @@ fn transact_through_signed_multilocation_custom_fee_and_weight() { // To convert it to what the relay will see instead of us descend_origin_multilocation - .reanchor(&MultiLocation::parent(), ancestry.interior) + .reanchor(&Location::parent(), &ancestry.interior) .unwrap(); let derived = xcm_builder::Account32Hash::< @@ -2944,10 +2968,10 @@ fn transact_through_signed_multilocation_custom_fee_and_weight() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), fee_amount: Some(total_weight as u128) }, @@ -2971,17 +2995,18 @@ fn transact_through_signed_multilocation_custom_fee_and_weight() { #[test] fn transact_through_signed_multilocation_custom_fee_and_weight_refund() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); ParaA::execute_with(|| { ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); let mut descend_origin_multilocation = parachain::SelfLocation::get(); descend_origin_multilocation @@ -2990,7 +3015,7 @@ fn transact_through_signed_multilocation_custom_fee_and_weight_refund() { // To convert it to what the relay will see instead of us descend_origin_multilocation - .reanchor(&MultiLocation::parent(), ancestry.interior) + .reanchor(&Location::parent(), &ancestry.interior) .unwrap(); let derived = xcm_builder::Account32Hash::< @@ -3035,10 +3060,10 @@ fn transact_through_signed_multilocation_custom_fee_and_weight_refund() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), fee_amount: Some(total_weight as u128) }, @@ -3064,18 +3089,18 @@ fn transact_through_signed_multilocation_custom_fee_and_weight_refund() { #[test] fn transact_through_signed_multilocation_para_to_para() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); - let para_b_location = MultiLocation::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, [Parachain(2)]); - let para_b_balances = MultiLocation::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, [Parachain(2), PalletInstance(1u8)]); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedMultiLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -3085,17 +3110,18 @@ fn transact_through_signed_multilocation_para_to_para() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); let mut descend_origin_multilocation = parachain::SelfLocation::get(); descend_origin_multilocation @@ -3104,14 +3130,14 @@ fn transact_through_signed_multilocation_para_to_para() { // To convert it to what the paraB will see instead of us descend_origin_multilocation - .reanchor(¶_b_location, ancestry.interior) + .reanchor(¶_b_location, &ancestry.interior) .unwrap(); - let derived = - HashedDescriptionDescribeFamilyAllTerminal::::convert_location( - &descend_origin_multilocation, - ) - .unwrap(); + let derived = xcm_builder::HashedDescription::< + parachain::AccountId, + xcm_builder::DescribeFamily, + >::convert_location(&descend_origin_multilocation) + .unwrap(); ParaB::execute_with(|| { // free execution, full amount received @@ -3147,9 +3173,9 @@ fn transact_through_signed_multilocation_para_to_para() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V4(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( para_b_balances ))), fee_amount: None @@ -3175,26 +3201,27 @@ fn transact_through_signed_multilocation_para_to_para() { #[test] fn transact_through_signed_multilocation_para_to_para_refund() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); - let para_b_location = MultiLocation::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, [Parachain(2)]); - let para_b_balances = MultiLocation::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, [Parachain(2), PalletInstance(1u8)]); ParaA::execute_with(|| { assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); let mut descend_origin_multilocation = parachain::SelfLocation::get(); descend_origin_multilocation @@ -3203,14 +3230,14 @@ fn transact_through_signed_multilocation_para_to_para_refund() { // To convert it to what the paraB will see instead of us descend_origin_multilocation - .reanchor(¶_b_location, ancestry.interior) + .reanchor(¶_b_location, &ancestry.interior) .unwrap(); - let derived = - HashedDescriptionDescribeFamilyAllTerminal::::convert_location( - &descend_origin_multilocation, - ) - .unwrap(); + let derived = xcm_builder::HashedDescription::< + parachain::AccountId, + xcm_builder::DescribeFamily, + >::convert_location(&descend_origin_multilocation) + .unwrap(); ParaB::execute_with(|| { // free execution, full amount received @@ -3247,9 +3274,9 @@ fn transact_through_signed_multilocation_para_to_para_refund() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V4(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( para_b_balances ))), fee_amount: Some(overall_weight as u128) @@ -3276,18 +3303,18 @@ fn transact_through_signed_multilocation_para_to_para_refund() { #[test] fn transact_through_signed_multilocation_para_to_para_ethereum() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); - let para_b_location = MultiLocation::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, [Parachain(2)]); - let para_b_balances = MultiLocation::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, [Parachain(2), PalletInstance(1u8)]); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedMultiLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -3297,17 +3324,18 @@ fn transact_through_signed_multilocation_para_to_para_ethereum() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); let mut descend_origin_multilocation = parachain::SelfLocation::get(); descend_origin_multilocation @@ -3316,14 +3344,14 @@ fn transact_through_signed_multilocation_para_to_para_ethereum() { // To convert it to what the paraB will see instead of us descend_origin_multilocation - .reanchor(¶_b_location, ancestry.interior) + .reanchor(¶_b_location, &ancestry.interior) .unwrap(); - let derived = - HashedDescriptionDescribeFamilyAllTerminal::::convert_location( - &descend_origin_multilocation, - ) - .unwrap(); + let derived = xcm_builder::HashedDescription::< + parachain::AccountId, + xcm_builder::DescribeFamily, + >::convert_location(&descend_origin_multilocation) + .unwrap(); let mut parachain_b_alice_balances_before = 0; ParaB::execute_with(|| { @@ -3374,9 +3402,9 @@ fn transact_through_signed_multilocation_para_to_para_ethereum() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V4(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( para_b_balances ))), fee_amount: None @@ -3404,18 +3432,18 @@ fn transact_through_signed_multilocation_para_to_para_ethereum() { #[test] fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); - let para_b_location = MultiLocation::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, [Parachain(2)]); - let para_b_balances = MultiLocation::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, [Parachain(2), PalletInstance(1u8)]); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedMultiLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -3425,17 +3453,18 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); let mut descend_origin_multilocation = parachain::SelfLocation::get(); descend_origin_multilocation @@ -3444,14 +3473,14 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() // To convert it to what the paraB will see instead of us descend_origin_multilocation - .reanchor(¶_b_location, ancestry.interior) + .reanchor(¶_b_location, &ancestry.interior) .unwrap(); - let derived = - HashedDescriptionDescribeFamilyAllTerminal::::convert_location( - &descend_origin_multilocation, - ) - .unwrap(); + let derived = xcm_builder::HashedDescription::< + parachain::AccountId, + xcm_builder::DescribeFamily, + >::convert_location(&descend_origin_multilocation) + .unwrap(); let mut parachain_b_alice_balances_before = 0; ParaB::execute_with(|| { @@ -3503,9 +3532,9 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V4(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( para_b_balances ))), fee_amount: None @@ -3528,18 +3557,18 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() #[test] fn transact_through_signed_multilocation_para_to_para_ethereum_proxy_succeeds() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); - let para_b_location = MultiLocation::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, [Parachain(2)]); - let para_b_balances = MultiLocation::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, [Parachain(2), PalletInstance(1u8)]); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedMultiLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -3549,17 +3578,18 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_proxy_succeeds() // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); let mut descend_origin_multilocation = parachain::SelfLocation::get(); descend_origin_multilocation @@ -3568,14 +3598,14 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_proxy_succeeds() // To convert it to what the paraB will see instead of us descend_origin_multilocation - .reanchor(¶_b_location, ancestry.interior) + .reanchor(¶_b_location, &ancestry.interior) .unwrap(); - let derived = - HashedDescriptionDescribeFamilyAllTerminal::::convert_location( - &descend_origin_multilocation, - ) - .unwrap(); + let derived = xcm_builder::HashedDescription::< + parachain::AccountId, + xcm_builder::DescribeFamily, + >::convert_location(&descend_origin_multilocation) + .unwrap(); let transfer_recipient = evm_account(); let mut transfer_recipient_balance_before = 0; @@ -3635,9 +3665,9 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_proxy_succeeds() ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V4(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( para_b_balances ))), fee_amount: None @@ -3690,8 +3720,8 @@ fn hrmp_init_accept_through_root() { proposed_max_message_size: 1 }), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), fee_amount: Some(total_fee) }, @@ -3723,8 +3753,8 @@ fn hrmp_init_accept_through_root() { para_id: 1u32.into() }, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), fee_amount: Some(total_fee) }, @@ -3780,8 +3810,8 @@ fn hrmp_close_works() { recipient: 2u32.into() }), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( + Location::parent() ))), fee_amount: Some(total_fee) }, diff --git a/runtime/moonbeam/Cargo.toml b/runtime/moonbeam/Cargo.toml index d881934db9..032e054504 100644 --- a/runtime/moonbeam/Cargo.toml +++ b/runtime/moonbeam/Cargo.toml @@ -1,5 +1,5 @@ [package] -authors = {workspace = true} +authors = { workspace = true } build = "build.rs" description = "Moonbeam Runtime" edition = "2021" @@ -9,285 +9,288 @@ name = "moonbeam-runtime" version = "0.8.4" [dependencies] -hex-literal = {workspace = true, optional = true} -log = {workspace = true} -num_enum = {workspace = true} -rlp = {workspace = true, optional = true} -serde = {workspace = true, features = ["derive"]} -sha3 = {workspace = true, optional = true} -smallvec = {workspace = true} -strum = {workspace = true} -strum_macros = {workspace = true} +hex-literal = { workspace = true, optional = true } +log = { workspace = true } +num_enum = { workspace = true } +rlp = { workspace = true, optional = true } +serde = { workspace = true, features = ["derive"] } +sha3 = { workspace = true, optional = true } +smallvec = { workspace = true } +strum = { workspace = true } +strum_macros = { workspace = true } # Moonbeam -account = {workspace = true} -moonbeam-core-primitives = {workspace = true} -moonbeam-relay-encoder = {workspace = true} -moonbeam-runtime-common = {workspace = true} -precompile-utils = {workspace = true} -session-keys-primitives = {workspace = true} -xcm-primitives = {workspace = true} +account = { workspace = true } +moonbeam-core-primitives = { workspace = true } +moonbeam-relay-encoder = { workspace = true } +moonbeam-runtime-common = { workspace = true } +precompile-utils = { workspace = true } +session-keys-primitives = { workspace = true } +xcm-primitives = { workspace = true } # Moonbeam pallets -moonbeam-xcm-benchmarks = {workspace = true} -pallet-asset-manager = {workspace = true} -pallet-author-mapping = {workspace = true} -pallet-crowdloan-rewards = {workspace = true} -pallet-erc20-xcm-bridge = {workspace = true} -pallet-ethereum-xcm = {workspace = true} -pallet-evm-chain-id = {workspace = true} -pallet-maintenance-mode = {workspace = true, features = ["xcm-support"]} -pallet-migrations = {workspace = true} -pallet-moonbeam-lazy-migrations = {workspace = true} -pallet-moonbeam-orbiters = {workspace = true} -pallet-parachain-staking = {workspace = true} -pallet-proxy-genesis-companion = {workspace = true} -pallet-randomness = {workspace = true} -pallet-xcm-transactor = {workspace = true} +moonbeam-xcm-benchmarks = { workspace = true } +pallet-asset-manager = { workspace = true } +pallet-author-mapping = { workspace = true } +pallet-crowdloan-rewards = { workspace = true } +pallet-erc20-xcm-bridge = { workspace = true } +pallet-ethereum-xcm = { workspace = true } +pallet-evm-chain-id = { workspace = true } +pallet-maintenance-mode = { workspace = true, features = ["xcm-support"] } +pallet-migrations = { workspace = true } +pallet-moonbeam-lazy-migrations = { workspace = true } +pallet-moonbeam-orbiters = { workspace = true } +pallet-parachain-staking = { workspace = true } +pallet-proxy-genesis-companion = { workspace = true } +pallet-randomness = { workspace = true } +pallet-xcm-transactor = { workspace = true } # Moonbeam precompiles -pallet-evm-precompile-author-mapping = {workspace = true} -pallet-evm-precompile-balances-erc20 = {workspace = true} -pallet-evm-precompile-batch = {workspace = true} -pallet-evm-precompile-call-permit = {workspace = true} -pallet-evm-precompile-collective = {workspace = true} -pallet-evm-precompile-conviction-voting = {workspace = true} -pallet-evm-precompile-crowdloan-rewards = {workspace = true} -pallet-evm-precompile-gmp = {workspace = true} -pallet-evm-precompile-identity = {workspace = true} -pallet-evm-precompile-parachain-staking = {workspace = true} -pallet-evm-precompile-preimage = {workspace = true} -pallet-evm-precompile-proxy = {workspace = true} -pallet-evm-precompile-randomness = {workspace = true} -pallet-evm-precompile-referenda = {workspace = true} -pallet-evm-precompile-registry = {workspace = true} -pallet-evm-precompile-relay-encoder = {workspace = true} -pallet-evm-precompile-xcm-transactor = {workspace = true} -pallet-evm-precompile-xcm-utils = {workspace = true} -pallet-evm-precompile-xtokens = {workspace = true} -pallet-evm-precompileset-assets-erc20 = {workspace = true} +pallet-evm-precompile-author-mapping = { workspace = true } +pallet-evm-precompile-balances-erc20 = { workspace = true } +pallet-evm-precompile-batch = { workspace = true } +pallet-evm-precompile-call-permit = { workspace = true } +pallet-evm-precompile-collective = { workspace = true } +pallet-evm-precompile-conviction-voting = { workspace = true } +pallet-evm-precompile-crowdloan-rewards = { workspace = true } +pallet-evm-precompile-gmp = { workspace = true } +# TODO(RODRIGO) pallet-evm-precompile-identity = { workspace = true } +pallet-evm-precompile-parachain-staking = { workspace = true } +pallet-evm-precompile-preimage = { workspace = true } +pallet-evm-precompile-proxy = { workspace = true } +pallet-evm-precompile-randomness = { workspace = true } +pallet-evm-precompile-referenda = { workspace = true } +pallet-evm-precompile-registry = { workspace = true } +pallet-evm-precompile-relay-encoder = { workspace = true } +pallet-evm-precompile-xcm-transactor = { workspace = true } +pallet-evm-precompile-xcm-utils = { workspace = true } +pallet-evm-precompile-xtokens = { workspace = true } +pallet-evm-precompileset-assets-erc20 = { workspace = true } # Moonbeam tracing -evm-tracing-events = {workspace = true, optional = true} -moonbeam-evm-tracer = {workspace = true, optional = true} -moonbeam-rpc-primitives-debug = {workspace = true} -moonbeam-rpc-primitives-txpool = {workspace = true} +evm-tracing-events = { workspace = true, optional = true } +moonbeam-evm-tracer = { workspace = true, optional = true } +moonbeam-rpc-primitives-debug = { workspace = true } +moonbeam-rpc-primitives-txpool = { workspace = true } # Substrate -frame-executive = {workspace = true} -frame-support = {workspace = true} -frame-system = {workspace = true} -frame-system-rpc-runtime-api = {workspace = true} -pallet-assets = {workspace = true} -pallet-balances = {workspace = true, features = ["insecure_zero_ed"]} -pallet-collective = {workspace = true} -pallet-conviction-voting = {workspace = true} -pallet-identity = {workspace = true} -pallet-multisig = {workspace = true} -pallet-preimage = {workspace = true} -pallet-proxy = {workspace = true} -pallet-referenda = {workspace = true} -pallet-root-testing = {workspace = true} -pallet-scheduler = {workspace = true} -pallet-society = {workspace = true} -pallet-timestamp = {workspace = true} -pallet-transaction-payment = {workspace = true} -pallet-transaction-payment-rpc-runtime-api = {workspace = true} -pallet-treasury = {workspace = true} -pallet-utility = {workspace = true} -pallet-whitelist = {workspace = true} -parity-scale-codec = {workspace = true, features = [ - "derive", - "max-encoded-len", - "chain-error", -]} -scale-info = {workspace = true, features = ["derive"]} -sp-api = {workspace = true} -sp-block-builder = {workspace = true} -sp-consensus-slots = {workspace = true} -sp-core = {workspace = true} -sp-inherents = {workspace = true} -sp-io = {workspace = true, features = ["improved_panic_error_reporting"]} -sp-offchain = {workspace = true} -sp-runtime = {workspace = true} -sp-session = {workspace = true} -sp-std = {workspace = true} -sp-transaction-pool = {workspace = true} -sp-version = {workspace = true} -sp-weights = {workspace = true} +frame-executive = { workspace = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +frame-system-rpc-runtime-api = { workspace = true } +pallet-assets = { workspace = true } +pallet-balances = { workspace = true, features = ["insecure_zero_ed"] } +pallet-collective = { workspace = true } +pallet-conviction-voting = { workspace = true } +pallet-identity = { workspace = true } +pallet-multisig = { workspace = true } +pallet-preimage = { workspace = true } +pallet-proxy = { workspace = true } +pallet-referenda = { workspace = true } +pallet-root-testing = { workspace = true } +pallet-scheduler = { workspace = true } +pallet-society = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-transaction-payment = { workspace = true } +pallet-transaction-payment-rpc-runtime-api = { workspace = true } +pallet-treasury = { workspace = true } +pallet-utility = { workspace = true } +pallet-whitelist = { workspace = true } +parity-scale-codec = { workspace = true, features = [ + "derive", + "max-encoded-len", + "chain-error", +] } +scale-info = { workspace = true, features = ["derive"] } +sp-api = { workspace = true } +sp-block-builder = { workspace = true } +sp-consensus-slots = { workspace = true } +sp-core = { workspace = true } +sp-inherents = { workspace = true } +sp-io = { workspace = true, features = ["improved_panic_error_reporting"] } +sp-offchain = { workspace = true } +sp-runtime = { workspace = true } +sp-session = { workspace = true } +sp-std = { workspace = true } +sp-transaction-pool = { workspace = true } +sp-version = { workspace = true } +sp-weights = { workspace = true } # Frontier -fp-evm = {workspace = true} -fp-rpc = {workspace = true} -fp-self-contained = {workspace = true, features = ["serde"]} -pallet-ethereum = {workspace = true, features = ["forbid-evm-reentrancy"]} -pallet-evm = {workspace = true, features = ["forbid-evm-reentrancy"]} -pallet-evm-precompile-blake2 = {workspace = true} -pallet-evm-precompile-bn128 = {workspace = true} -pallet-evm-precompile-dispatch = {workspace = true} -pallet-evm-precompile-modexp = {workspace = true} -pallet-evm-precompile-sha3fips = {workspace = true} -pallet-evm-precompile-simple = {workspace = true} +fp-evm = { workspace = true } +fp-rpc = { workspace = true } +fp-self-contained = { workspace = true, features = ["serde"] } +pallet-ethereum = { workspace = true, features = ["forbid-evm-reentrancy"] } +pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] } +pallet-evm-precompile-blake2 = { workspace = true } +pallet-evm-precompile-bn128 = { workspace = true } +pallet-evm-precompile-dispatch = { workspace = true } +pallet-evm-precompile-modexp = { workspace = true } +pallet-evm-precompile-sha3fips = { workspace = true } +pallet-evm-precompile-simple = { workspace = true } # Polkadot / XCM -orml-traits = {workspace = true} -orml-xcm-support = {workspace = true} -orml-xtokens = {workspace = true} -pallet-xcm = {workspace = true} -pallet-xcm-benchmarks = {workspace = true, optional = true} -polkadot-core-primitives = {workspace = true} -polkadot-parachain = {workspace = true} -polkadot-runtime-common = {workspace = true} -xcm = {workspace = true} -xcm-builder = {workspace = true} -xcm-executor = {workspace = true} +orml-traits = { workspace = true } +orml-xcm-support = { workspace = true } +orml-xtokens = { workspace = true } +pallet-xcm = { workspace = true } +pallet-xcm-benchmarks = { workspace = true, optional = true } +pallet-message-queue = { workspace = true } +polkadot-core-primitives = { workspace = true } +polkadot-runtime-common = { workspace = true } +polkadot-parachain = { workspace = true } +xcm = { workspace = true } +xcm-builder = { workspace = true } +xcm-executor = { workspace = true } # Cumulus -cumulus-pallet-dmp-queue = {workspace = true} -cumulus-pallet-parachain-system = {workspace = true} -cumulus-pallet-xcm = {workspace = true} -cumulus-pallet-xcmp-queue = {workspace = true} -cumulus-primitives-core = {workspace = true} -cumulus-primitives-timestamp = {workspace = true} -cumulus-primitives-utility = {workspace = true} -parachain-info = {workspace = true} +cumulus-pallet-dmp-queue = { workspace = true } +cumulus-pallet-parachain-system = { workspace = true } +cumulus-pallet-xcm = { workspace = true } +cumulus-pallet-xcmp-queue = { workspace = true } +cumulus-primitives-core = { workspace = true } +cumulus-primitives-timestamp = { workspace = true } +cumulus-primitives-utility = { workspace = true } +parachain-info = { workspace = true } +parachains-common = { workspace = true } # Moonkit -async-backing-primitives = {workspace = true} -moonkit-xcm-primitives = {workspace = true} -nimbus-primitives = {workspace = true} -pallet-author-inherent = {workspace = true} -pallet-author-slot-filter = {workspace = true} +async-backing-primitives = { workspace = true } +moonkit-xcm-primitives = { workspace = true } +nimbus-primitives = { workspace = true } +pallet-author-inherent = { workspace = true } +pallet-author-slot-filter = { workspace = true } # Benchmarking -frame-benchmarking = {workspace = true, optional = true} -frame-system-benchmarking = {workspace = true, optional = true} -frame-try-runtime = {workspace = true, optional = true} +frame-benchmarking = { workspace = true, optional = true } +frame-system-benchmarking = { workspace = true, optional = true } +frame-try-runtime = { workspace = true, optional = true } [dev-dependencies] -ethereum = {workspace = true} -frame-metadata = {workspace = true} -hex = {workspace = true, features = ["std"]} -sha3 = {workspace = true, features = ["std"]} +ethereum = { workspace = true } +frame-metadata = { workspace = true } +hex = { workspace = true, features = ["std"] } +sha3 = { workspace = true, features = ["std"] } -cumulus-primitives-parachain-inherent = {workspace = true} -cumulus-test-relay-sproof-builder = {workspace = true} +cumulus-primitives-parachain-inherent = { workspace = true } +cumulus-test-relay-sproof-builder = { workspace = true } -pallet-message-queue = {workspace = true} -polkadot-runtime-parachains = {workspace = true} -xcm-simulator = {workspace = true} +polkadot-runtime-parachains = { workspace = true } +xcm-simulator = { workspace = true } -precompile-utils = {workspace = true, features = ["std", "testing"]} +precompile-utils = { workspace = true, features = ["std", "testing"] } [build-dependencies] -substrate-wasm-builder = {workspace = true} +substrate-wasm-builder = { workspace = true } [features] default = ["std"] -evm-tracing = ["evm-tracing-events", "moonbeam-evm-tracer", "rlp", "sha3"] std = [ - "account/std", - "async-backing-primitives/std", - "cumulus-pallet-dmp-queue/std", - "cumulus-pallet-parachain-system/std", - "cumulus-pallet-xcm/std", - "cumulus-pallet-xcmp-queue/std", - "cumulus-primitives-core/std", - "cumulus-primitives-timestamp/std", - "evm-tracing-events/std", - "fp-evm/std", - "fp-rpc/std", - "fp-self-contained/std", - "frame-benchmarking/std", - "frame-executive/std", - "frame-support/std", - "frame-system-rpc-runtime-api/std", - "frame-system/std", - "moonbeam-core-primitives/std", - "moonbeam-evm-tracer/std", - "moonbeam-relay-encoder/std", - "moonbeam-rpc-primitives-debug/std", - "moonbeam-rpc-primitives-txpool/std", - "moonbeam-runtime-common/std", - "moonbeam-xcm-benchmarks/std", - "moonkit-xcm-primitives/std", - "nimbus-primitives/std", - "orml-xtokens/std", - "pallet-asset-manager/std", - "pallet-assets/std", - "pallet-author-inherent/std", - "pallet-author-mapping/std", - "pallet-author-slot-filter/std", - "pallet-balances/std", - "pallet-collective/std", - "pallet-conviction-voting/std", - "pallet-crowdloan-rewards/std", - "pallet-erc20-xcm-bridge/std", - "pallet-evm-chain-id/std", - "pallet-ethereum-xcm/std", - "pallet-ethereum/std", - "pallet-evm-precompile-author-mapping/std", - "pallet-evm-precompile-balances-erc20/std", - "pallet-evm-precompile-batch/std", - "pallet-evm-precompile-call-permit/std", - "pallet-evm-precompile-collective/std", - "pallet-evm-precompile-conviction-voting/std", - "pallet-evm-precompile-parachain-staking/std", - "pallet-evm-precompile-preimage/std", - "pallet-evm-precompile-randomness/std", - "pallet-evm-precompile-referenda/std", - "pallet-evm-precompile-relay-encoder/std", - "pallet-evm-precompile-xcm-transactor/std", - "pallet-evm-precompile-xcm-utils/std", - "pallet-evm-precompile-xtokens/std", - "pallet-evm-precompileset-assets-erc20/std", - "pallet-evm/std", - "pallet-identity/std", - "pallet-maintenance-mode/std", - "pallet-migrations/std", - "pallet-moonbeam-lazy-migrations/std", - "pallet-moonbeam-orbiters/std", - "pallet-multisig/std", - "pallet-parachain-staking/std", - "pallet-preimage/std", - "pallet-proxy-genesis-companion/std", - "pallet-proxy/std", - "pallet-randomness/std", - "pallet-referenda/std", - "pallet-root-testing/std", - "pallet-scheduler/std", - "pallet-society/std", - "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-treasury/std", - "pallet-utility/std", - "pallet-whitelist/std", - "pallet-xcm-transactor/std", - "pallet-xcm/std", - "parachain-info/std", - "parity-scale-codec/std", - "precompile-utils/std", - "scale-info/std", - "session-keys-primitives/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-slots/std", - "sp-core/std", - "sp-inherents/std", - "sp-io/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", - "strum/std", - "xcm-builder/std", - "xcm-executor/std", - "xcm-primitives/std", - "xcm/std", + "account/std", + "async-backing-primitives/std", + "cumulus-pallet-dmp-queue/std", + "cumulus-pallet-parachain-system/std", + "cumulus-pallet-xcm/std", + "cumulus-pallet-xcmp-queue/std", + "cumulus-primitives-core/std", + "cumulus-primitives-timestamp/std", + "cumulus-primitives-utility/std", + "evm-tracing-events/std", + "fp-evm/std", + "fp-rpc/std", + "fp-self-contained/std", + "frame-benchmarking/std", + "frame-executive/std", + "frame-support/std", + "frame-system-rpc-runtime-api/std", + "frame-system/std", + "moonbeam-core-primitives/std", + "moonbeam-evm-tracer/std", + "moonbeam-relay-encoder/std", + "moonbeam-rpc-primitives-debug/std", + "moonbeam-rpc-primitives-txpool/std", + "moonbeam-runtime-common/std", + "moonbeam-xcm-benchmarks/std", + "moonkit-xcm-primitives/std", + "nimbus-primitives/std", + "orml-xtokens/std", + "pallet-asset-manager/std", + "pallet-assets/std", + "pallet-author-inherent/std", + "pallet-author-mapping/std", + "pallet-author-slot-filter/std", + "pallet-balances/std", + "pallet-collective/std", + "pallet-conviction-voting/std", + "pallet-crowdloan-rewards/std", + "pallet-erc20-xcm-bridge/std", + "pallet-evm-chain-id/std", + "pallet-ethereum-xcm/std", + "pallet-ethereum/std", + "pallet-evm-precompile-author-mapping/std", + "pallet-evm-precompile-balances-erc20/std", + "pallet-evm-precompile-batch/std", + "pallet-evm-precompile-call-permit/std", + "pallet-evm-precompile-collective/std", + "pallet-evm-precompile-conviction-voting/std", + "pallet-evm-precompile-parachain-staking/std", + "pallet-evm-precompile-preimage/std", + "pallet-evm-precompile-randomness/std", + "pallet-evm-precompile-referenda/std", + "pallet-evm-precompile-relay-encoder/std", + "pallet-evm-precompile-xcm-transactor/std", + "pallet-evm-precompile-xcm-utils/std", + "pallet-evm-precompile-xtokens/std", + "pallet-evm-precompileset-assets-erc20/std", + "pallet-evm/std", + "pallet-identity/std", + "pallet-maintenance-mode/std", + "pallet-migrations/std", + "pallet-moonbeam-lazy-migrations/std", + "pallet-moonbeam-orbiters/std", + "pallet-multisig/std", + "pallet-parachain-staking/std", + "pallet-preimage/std", + "pallet-proxy-genesis-companion/std", + "pallet-proxy/std", + "pallet-randomness/std", + "pallet-referenda/std", + "pallet-root-testing/std", + "pallet-scheduler/std", + "pallet-society/std", + "pallet-timestamp/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", + "pallet-treasury/std", + "pallet-utility/std", + "pallet-whitelist/std", + "pallet-xcm-transactor/std", + "pallet-xcm/std", + "parachain-info/std", + "parachains-common/std", + "parity-scale-codec/std", + "precompile-utils/std", + "scale-info/std", + "session-keys-primitives/std", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-slots/std", + "sp-core/std", + "sp-inherents/std", + "sp-io/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-transaction-pool/std", + "sp-version/std", + "strum/std", + "xcm-builder/std", + "xcm-executor/std", + "xcm-primitives/std", + "xcm/std", ] +evm-tracing = ["evm-tracing-events", "moonbeam-evm-tracer", "rlp", "sha3"] # Will be enabled by the `wasm-builder` when building the runtime for WASM. runtime-wasm = [] @@ -298,73 +301,74 @@ runtime-wasm = [] on-chain-release-build = ["sp-api/disable-logging"] runtime-benchmarks = [ - "cumulus-pallet-parachain-system/runtime-benchmarks", - "frame-benchmarking", - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system-benchmarking/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "hex-literal", - "moonbeam-relay-encoder/runtime-benchmarks", - "moonbeam-runtime-common/runtime-benchmarks", - "moonbeam-xcm-benchmarks/runtime-benchmarks", - "pallet-asset-manager/runtime-benchmarks", - "pallet-assets/runtime-benchmarks", - "pallet-author-inherent/runtime-benchmarks", - "pallet-author-mapping/runtime-benchmarks", - "pallet-author-slot-filter/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-collective/runtime-benchmarks", - "pallet-conviction-voting/runtime-benchmarks", - "pallet-crowdloan-rewards/runtime-benchmarks", - "pallet-ethereum-xcm/runtime-benchmarks", - "pallet-ethereum/runtime-benchmarks", - "pallet-evm/runtime-benchmarks", - "pallet-identity/runtime-benchmarks", - "pallet-migrations/runtime-benchmarks", - "pallet-moonbeam-lazy-migrations/runtime-benchmarks", - "pallet-moonbeam-orbiters/runtime-benchmarks", - "pallet-multisig/runtime-benchmarks", - "pallet-parachain-staking/runtime-benchmarks", - "pallet-preimage/runtime-benchmarks", - "pallet-proxy/runtime-benchmarks", - "pallet-randomness/runtime-benchmarks", - "pallet-referenda/runtime-benchmarks", - "pallet-scheduler/runtime-benchmarks", - "pallet-society/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-treasury/runtime-benchmarks", - "pallet-utility/runtime-benchmarks", - "pallet-whitelist/runtime-benchmarks", - "pallet-xcm-benchmarks", - "pallet-xcm-transactor/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "session-keys-primitives/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "frame-benchmarking", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system-benchmarking/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "hex-literal", + "moonbeam-relay-encoder/runtime-benchmarks", + "moonbeam-runtime-common/runtime-benchmarks", + "moonbeam-xcm-benchmarks/runtime-benchmarks", + "parachains-common/runtime-benchmarks", + "pallet-asset-manager/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", + "pallet-author-inherent/runtime-benchmarks", + "pallet-author-mapping/runtime-benchmarks", + "pallet-author-slot-filter/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-collective/runtime-benchmarks", + "pallet-conviction-voting/runtime-benchmarks", + "pallet-crowdloan-rewards/runtime-benchmarks", + "pallet-ethereum-xcm/runtime-benchmarks", + "pallet-ethereum/runtime-benchmarks", + "pallet-evm/runtime-benchmarks", + "pallet-identity/runtime-benchmarks", + "pallet-migrations/runtime-benchmarks", + "pallet-moonbeam-lazy-migrations/runtime-benchmarks", + "pallet-moonbeam-orbiters/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "pallet-parachain-staking/runtime-benchmarks", + "pallet-preimage/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-randomness/runtime-benchmarks", + "pallet-referenda/runtime-benchmarks", + "pallet-scheduler/runtime-benchmarks", + "pallet-society/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "pallet-whitelist/runtime-benchmarks", + "pallet-xcm-benchmarks", + "pallet-xcm-transactor/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "session-keys-primitives/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", ] try-runtime = [ - "fp-self-contained/try-runtime", - "frame-executive/try-runtime", - "frame-system/try-runtime", - "frame-try-runtime", - "moonbeam-runtime-common/try-runtime", - "pallet-asset-manager/try-runtime", - "pallet-author-mapping/try-runtime", - "pallet-author-slot-filter/try-runtime", - "pallet-balances/try-runtime", - "pallet-collective/try-runtime", - "pallet-conviction-voting/try-runtime", - "pallet-maintenance-mode/try-runtime", - "pallet-migrations/try-runtime", - "pallet-moonbeam-lazy-migrations/try-runtime", - "pallet-parachain-staking/try-runtime", - "pallet-preimage/try-runtime", - "pallet-referenda/try-runtime", - "pallet-root-testing/try-runtime", - "pallet-scheduler/try-runtime", - "pallet-society/try-runtime", - "pallet-timestamp/try-runtime", - "pallet-whitelist/try-runtime", + "fp-self-contained/try-runtime", + "frame-executive/try-runtime", + "frame-system/try-runtime", + "frame-try-runtime", + "moonbeam-runtime-common/try-runtime", + "pallet-asset-manager/try-runtime", + "pallet-author-mapping/try-runtime", + "pallet-author-slot-filter/try-runtime", + "pallet-balances/try-runtime", + "pallet-collective/try-runtime", + "pallet-conviction-voting/try-runtime", + "pallet-maintenance-mode/try-runtime", + "pallet-migrations/try-runtime", + "pallet-moonbeam-lazy-migrations/try-runtime", + "pallet-parachain-staking/try-runtime", + "pallet-preimage/try-runtime", + "pallet-referenda/try-runtime", + "pallet-root-testing/try-runtime", + "pallet-scheduler/try-runtime", + "pallet-society/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-whitelist/try-runtime", ] diff --git a/runtime/moonbeam/src/lib.rs b/runtime/moonbeam/src/lib.rs index 558bd5ba26..fd9c3ea620 100644 --- a/runtime/moonbeam/src/lib.rs +++ b/runtime/moonbeam/src/lib.rs @@ -30,11 +30,9 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); use account::AccountId20; use cumulus_pallet_parachain_system::{RelayChainStateProof, RelaychainDataProvider}; -use cumulus_primitives_core::relay_chain; use fp_rpc::TransactionStatus; -// Re-export required by get! macro. -use cumulus_primitives_core::{relay_chain::BlockNumber as RelayBlockNumber, DmpMessageHandler}; +use cumulus_primitives_core::{relay_chain, AggregateMessageOrigin}; #[cfg(feature = "std")] pub use fp_evm::GenesisAccount; pub use frame_support::traits::Get; @@ -148,7 +146,7 @@ pub mod currency { /// Maximum weight per block pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND, u64::MAX) .saturating_div(2) - .set_proof_size(cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64); + .set_proof_size(relay_chain::MAX_POV_SIZE as u64); pub const MILLISECS_PER_BLOCK: u64 = 12000; pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); @@ -251,6 +249,8 @@ impl frame_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. type RuntimeOrigin = RuntimeOrigin; + /// The aggregated RuntimeTask type. + type RuntimeTask = RuntimeTask; /// Maximum number of block number to block hash mappings to keep (oldest pruned first). type BlockHashCount = ConstU32<256>; /// Maximum weight of each block. With a default weight system of 1byte == 1weight, 4mb is ok. @@ -302,7 +302,6 @@ impl pallet_balances::Config for Runtime { type MaxFreezes = ConstU32<0>; type RuntimeHoldReason = RuntimeHoldReason; type RuntimeFreezeReason = RuntimeFreezeReason; - type MaxHolds = ConstU32<1>; type WeightInfo = moonbeam_weights::pallet_balances::WeightInfo; } @@ -593,6 +592,15 @@ impl pallet_treasury::Config for Runtime { type BenchmarkHelper = BenchmarkHelper; } +parameter_types! { + pub const MaxSubAccounts: u32 = 100; + pub const MaxAdditionalFields: u32 = 100; + pub const MaxRegistrars: u32 = 20; + pub const PendingUsernameExpiration: u32 = 7 * DAYS; + pub const MaxSuffixLength: u32 = 7; + pub const MaxUsernameLength: u32 = 32; +} + type IdentityForceOrigin = EitherOfDiverse, governance::custom_origins::GeneralAdmin>; type IdentityRegistrarOrigin = @@ -603,18 +611,22 @@ impl pallet_identity::Config for Runtime { type Currency = Balances; // Add one item in storage and take 258 bytes type BasicDeposit = ConstU128<{ currency::deposit(1, 258) }>; - // Not add any item to the storage but takes 66 bytes - type FieldDeposit = ConstU128<{ currency::deposit(0, 66) }>; + // Does not add any item to the storage but takes 1 bytes + type ByteDeposit = ConstU128<{ currency::deposit(0, 1) }>; // Add one item in storage and take 53 bytes type SubAccountDeposit = ConstU128<{ currency::deposit(1, 53) }>; - type MaxSubAccounts = ConstU32<100>; - type MaxAdditionalFields = ConstU32<100>; - type IdentityInformation = pallet_identity::simple::IdentityInfo; - - type MaxRegistrars = ConstU32<20>; + type MaxSubAccounts = MaxSubAccounts; + type IdentityInformation = pallet_identity::legacy::IdentityInfo; + type MaxRegistrars = MaxRegistrars; type Slashed = Treasury; type ForceOrigin = IdentityForceOrigin; type RegistrarOrigin = IdentityRegistrarOrigin; + type OffchainSignature = Signature; + type SigningPublicKey = ::Signer; + type UsernameAuthorityOrigin = EnsureRoot; + type PendingUsernameExpiration = PendingUsernameExpiration; + type MaxSuffixLength = MaxSuffixLength; + type MaxUsernameLength = MaxUsernameLength; type WeightInfo = moonbeam_weights::pallet_identity::WeightInfo; } @@ -657,13 +669,14 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OnSystemEvent = (); type SelfParaId = ParachainInfo; - type DmpMessageHandler = MaintenanceMode; type ReservedDmpWeight = ReservedDmpWeight; type OutboundXcmpMessageSource = XcmpQueue; type XcmpMessageHandler = XcmpQueue; type ReservedXcmpWeight = ReservedXcmpWeight; type CheckAssociatedRelayNumber = cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; type ConsensusHook = cumulus_pallet_parachain_system::ExpectParentIncluded; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; + type WeightInfo = cumulus_pallet_parachain_system::weights::SubstrateWeight; } pub struct EthereumXcmEnsureProxy; @@ -695,6 +708,7 @@ impl pallet_ethereum_xcm::Config for Runtime { parameter_types! { pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; } impl parachain_info::Config for Runtime {} @@ -1180,34 +1194,6 @@ impl moonkit_xcm_primitives::PauseXcmExecution for XcmExecutionManager { } } -pub struct NormalDmpHandler; -impl DmpMessageHandler for NormalDmpHandler { - // This implementation makes messages be queued - // Since the limit is 0, messages are queued for next iteration - fn handle_dmp_messages( - iter: impl Iterator)>, - limit: Weight, - ) -> Weight { - (if Migrations::should_pause_xcm() { - DmpQueue::handle_dmp_messages(iter, Weight::zero()) - } else { - DmpQueue::handle_dmp_messages(iter, limit) - }) + ::DbWeight::get().reads(1) - } -} - -pub struct MaintenanceDmpHandler; -impl DmpMessageHandler for MaintenanceDmpHandler { - // This implementation makes messages be queued - // Since the limit is 0, messages are queued for next iteration - fn handle_dmp_messages( - iter: impl Iterator)>, - _limit: Weight, - ) -> Weight { - DmpQueue::handle_dmp_messages(iter, Weight::zero()) - } -} - /// The hooks we want to run in Maintenance Mode pub struct MaintenanceHooks; @@ -1259,12 +1245,6 @@ impl pallet_maintenance_mode::Config for Runtime { type MaintenanceOrigin = pallet_collective::EnsureProportionAtLeast; type XcmExecutionManager = XcmExecutionManager; - type NormalDmpHandler = NormalDmpHandler; - type MaintenanceDmpHandler = MaintenanceDmpHandler; - // We use AllPalletsWithSystem because we dont want to change the hooks in normal - // operation - type NormalExecutiveHooks = AllPalletsWithSystem; - type MaintenanceExecutiveHooks = MaintenanceHooks; } impl pallet_proxy_genesis_companion::Config for Runtime { @@ -1355,7 +1335,9 @@ impl pallet_randomness::Config for Runtime { type WeightInfo = moonbeam_weights::pallet_randomness::WeightInfo; } -impl pallet_root_testing::Config for Runtime {} +impl pallet_root_testing::Config for Runtime { + type RuntimeEvent = RuntimeEvent; +} parameter_types! { // One storage item; key size is 32 + 20; value is size 4+4+16+20 bytes = 44 bytes. @@ -1384,7 +1366,7 @@ construct_runtime! { // Previously 2: pallet_randomness_collective_flip Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, - RootTesting: pallet_root_testing::{Pallet, Call, Storage} = 5, + RootTesting: pallet_root_testing::{Pallet, Call, Storage, Event} = 5, // Monetary stuff. Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, @@ -1450,7 +1432,7 @@ construct_runtime! { // Previously 108: pallet_assets:: EthereumXcm: pallet_ethereum_xcm::{Pallet, Call, Storage, Origin} = 109, Erc20XcmBridge: pallet_erc20_xcm_bridge::{Pallet} = 110, - + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 111, // Randomness Randomness: pallet_randomness::{Pallet, Call, Storage, Event, Inherent} = 120, @@ -1526,7 +1508,7 @@ pub type Executive = frame_executive::Executive< Block, frame_system::ChainContext, Runtime, - pallet_maintenance_mode::ExecutiveHooks, + AllPalletsWithSystem, >; // All of our runtimes share most of their Runtime API implementations. @@ -1734,7 +1716,7 @@ mod tests { Balance::from(10 * GLMR + 2580 * MILLIGLMR) ); assert_eq!( - get!(pallet_identity, FieldDeposit, u128), + get!(pallet_identity, ByteDeposit, u128), Balance::from(660 * MILLIGLMR) ); assert_eq!( diff --git a/runtime/moonbeam/src/precompiles.rs b/runtime/moonbeam/src/precompiles.rs index cf7469bb62..e60947b7c8 100644 --- a/runtime/moonbeam/src/precompiles.rs +++ b/runtime/moonbeam/src/precompiles.rs @@ -30,7 +30,7 @@ use pallet_evm_precompile_collective::CollectivePrecompile; use pallet_evm_precompile_conviction_voting::ConvictionVotingPrecompile; use pallet_evm_precompile_crowdloan_rewards::CrowdloanRewardsPrecompile; use pallet_evm_precompile_gmp::GmpPrecompile; -use pallet_evm_precompile_identity::IdentityPrecompile; +// TODO(RODRIGO) use pallet_evm_precompile_identity::IdentityPrecompile; use pallet_evm_precompile_modexp::Modexp; use pallet_evm_precompile_parachain_staking::ParachainStakingPrecompile; use pallet_evm_precompile_preimage::PreimagePrecompile; @@ -227,11 +227,12 @@ type MoonbeamPrecompilesAt = ( XcmTransactorPrecompileV3, (CallableByContract, CallableByPrecompile), >, - PrecompileAt< - AddressU64<2072>, - IdentityPrecompile, - (CallableByContract, CallableByPrecompile), - >, + // TODO(RODRIGO) + // PrecompileAt< + // AddressU64<2072>, + // IdentityPrecompile, + // (CallableByContract, CallableByPrecompile), + // >, ); pub struct DisabledLocalAssets(sp_std::marker::PhantomData); diff --git a/runtime/moonbeam/src/xcm_config.rs b/runtime/moonbeam/src/xcm_config.rs index 8985f52563..b89bea9a14 100644 --- a/runtime/moonbeam/src/xcm_config.rs +++ b/runtime/moonbeam/src/xcm_config.rs @@ -19,13 +19,14 @@ use super::{ governance, AccountId, AssetId, AssetManager, Assets, Balance, Balances, DealWithFees, - Erc20XcmBridge, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, - RuntimeEvent, RuntimeOrigin, Treasury, XcmpQueue, + Erc20XcmBridge, MaintenanceMode, MessageQueue, ParachainInfo, ParachainSystem, Perbill, + PolkadotXcm, Runtime, RuntimeBlockWeights, RuntimeCall, RuntimeEvent, RuntimeOrigin, Treasury, + XcmpQueue, }; use frame_support::{ parameter_types, - traits::{EitherOfDiverse, Everything, Nothing, PalletInfoAccess}, + traits::{EitherOfDiverse, Everything, Nothing, PalletInfoAccess, TransformOrigin}, }; use moonbeam_runtime_common::weights as moonbeam_weights; use pallet_evm_precompileset_assets_erc20::AccountIdAssetIdConversion; @@ -40,25 +41,28 @@ use sp_core::{ConstU32, H160, H256}; use xcm_builder::{ AccountKey20Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, ConvertedConcreteId, CurrencyAdapter as XcmCurrencyAdapter, - DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FungiblesAdapter, HashedDescription, + AllowTopLevelPaidExecutionFrom, ConvertedConcreteId, DescribeAllTerminal, DescribeFamily, + EnsureXcmOrigin, FungibleAdapter as XcmCurrencyAdapter, FungiblesAdapter, HashedDescription, NoChecking, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountKey20AsNative, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, WithComputedOrigin, }; +use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; use xcm::latest::prelude::*; use xcm_executor::traits::{CallDispatcher, ConvertLocation, JustTry}; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use orml_xcm_support::MultiNativeAsset; use xcm_primitives::{ - AbsoluteAndRelativeReserve, AccountIdToCurrencyId, AccountIdToMultiLocation, AsAssetType, + AbsoluteAndRelativeReserve, AccountIdToCurrencyId, AccountIdToLocation, AsAssetType, FirstAssetTrader, SignedToAccountId20, UtilityAvailableCalls, UtilityEncodeCall, XcmTransact, }; use parity_scale_codec::{Decode, Encode}; use scale_info::TypeInfo; +use sp_core::Get; use sp_std::{ convert::{From, Into, TryFrom}, prelude::*, @@ -73,21 +77,21 @@ parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Polkadot; // The relay chain Origin type pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub UniversalLocation: InteriorMultiLocation = - X2(GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())); + pub UniversalLocation: InteriorLocation = + [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())].into(); // Self Reserve location, defines the multilocation identifiying the self-reserve currency // This is used to match it also against our Balances pallet when we receive such - // a MultiLocation: (Self Balances pallet index) + // a Location: (Self Balances pallet index) // We use the RELATIVE multilocation - pub SelfReserve: MultiLocation = MultiLocation { + pub SelfReserve: Location = Location { parents:0, - interior: Junctions::X1( + interior: [ PalletInstance(::index() as u8) - ) + ].into() }; } -/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used +/// Type for specifying how a `Location` can be converted into an `AccountId`. This is used /// when determining ownership of accounts for asset transacting and when attempting to use XCM /// `Transact` in order to determine the dispatch Origin. pub type LocationToAccountId = ( @@ -95,7 +99,7 @@ pub type LocationToAccountId = ( ParentIsPreset, // Sibling parachain origins convert to AccountId via the `ParaId::into`. SiblingParachainConvertsVia, - // If we receive a MultiLocation of type AccountKey20, just generate a native account + // If we receive a Location of type AccountKey20, just generate a native account AccountKey20Aliases, // Generate remote accounts according to polkadot standards HashedDescription>, @@ -104,7 +108,7 @@ pub type LocationToAccountId = ( /// Wrapper type around `LocationToAccountId` to convert an `AccountId` to type `H160`. pub struct LocationToH160; impl ConvertLocation for LocationToH160 { - fn convert_location(location: &MultiLocation) -> Option { + fn convert_location(location: &Location) -> Option { >::convert_location(location) .map(Into::into) } @@ -124,7 +128,7 @@ pub type ForeignFungiblesTransactor = FungiblesAdapter< JustTry, >, ), - // Do a simple punn to convert an AccountId20 MultiLocation into a native chain account ID: + // Do a simple punn to convert an AccountId20 Location into a native chain account ID: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, @@ -297,14 +301,15 @@ impl xcm_executor::Config for XcmExecutorConfig { type UniversalAliases = Nothing; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; + type TransactionalProcessor = xcm_builder::FrameTransactionalProcessor; } type XcmExecutor = pallet_erc20_xcm_bridge::XcmExecutorWrapper< - RuntimeCall, + XcmExecutorConfig, xcm_executor::XcmExecutor, >; -// Converts a Signed Local Origin into a MultiLocation +// Converts a Signed Local Origin into a Location pub type LocalOriginToLocation = SignedToAccountId20; /// The means for routing XCM messages which are not for local execution into the right message @@ -318,7 +323,7 @@ pub type XcmRouter = ( #[cfg(feature = "runtime-benchmarks")] parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); + pub ReachableDest: Option = Some(Parent.into()); } impl pallet_xcm::Config for Runtime { @@ -357,10 +362,10 @@ impl cumulus_pallet_xcm::Config for Runtime { impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRoot; + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = EnsureRoot; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = moonbeam_weights::cumulus_pallet_xcmp_queue::WeightInfo; @@ -369,30 +374,64 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { >; } +parameter_types! { + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; +} + +// TODO: This pallet can be removed after the lazy migration is done and event `Completed` is emitted. +// https://github.com/paritytech/polkadot-sdk/pull/1246 impl cumulus_pallet_dmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRoot; + type DmpSink = frame_support::traits::EnqueueWithOrigin; + type WeightInfo = cumulus_pallet_dmp_queue::weights::SubstrateWeight; +} + +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(25) * RuntimeBlockWeights::get().max_block; + // TODO: describe + pub const MessageQueueMaxStale: u32 = 8; + // TODO: describe + pub const MessageQueueHeapSize: u32 = 64 * 1024; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + #[cfg(feature = "runtime-benchmarks")] + type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor< + cumulus_primitives_core::AggregateMessageOrigin, + >; + #[cfg(not(feature = "runtime-benchmarks"))] + type MessageProcessor = + xcm_builder::ProcessXcmMessage; + type Size = u32; + type HeapSize = MessageQueueHeapSize; + type MaxStale = MessageQueueMaxStale; + type ServiceWeight = MessageQueueServiceWeight; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + // NarrowOriginToSibling calls XcmpQueue's is_pause if Origin is sibling. Allows all other origins + type QueuePausedQuery = (MaintenanceMode, NarrowOriginToSibling); + type WeightInfo = pallet_message_queue::weights::SubstrateWeight; } // Our AssetType. For now we only handle Xcm Assets #[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] pub enum AssetType { - Xcm(MultiLocation), + Xcm(Location), } impl Default for AssetType { fn default() -> Self { - Self::Xcm(MultiLocation::here()) + Self::Xcm(Location::here()) } } -impl From for AssetType { - fn from(location: MultiLocation) -> Self { +impl From for AssetType { + fn from(location: Location) -> Self { Self::Xcm(location) } } -impl Into> for AssetType { - fn into(self) -> Option { +impl Into> for AssetType { + fn into(self) -> Option { match self { Self::Xcm(location) => Some(location), } @@ -446,17 +485,17 @@ impl AccountIdToCurrencyId for Runtime { }) } } -// How to convert from CurrencyId to MultiLocation -pub struct CurrencyIdtoMultiLocation(sp_std::marker::PhantomData); -impl sp_runtime::traits::Convert> - for CurrencyIdtoMultiLocation +// How to convert from CurrencyId to Location +pub struct CurrencyIdToLocation(sp_std::marker::PhantomData); +impl sp_runtime::traits::Convert> + for CurrencyIdToLocation where - AssetXConverter: sp_runtime::traits::MaybeEquivalence, + AssetXConverter: sp_runtime::traits::MaybeEquivalence, { - fn convert(currency: CurrencyId) -> Option { + fn convert(currency: CurrencyId) -> Option { match currency { CurrencyId::SelfReserve => { - let multi: MultiLocation = SelfReserve::get(); + let multi: Location = SelfReserve::get(); Some(multi) } CurrencyId::ForeignAsset(asset) => AssetXConverter::convert_back(&asset), @@ -481,19 +520,19 @@ parameter_types! { // This is how we are going to detect whether the asset is a Reserve asset // This however is the chain part only - pub SelfLocation: MultiLocation = MultiLocation::here(); + pub SelfLocation: Location = Location::here(); // We need this to be able to catch when someone is trying to execute a non- // cross-chain transfer in xtokens through the absolute path way - pub SelfLocationAbsolute: MultiLocation = MultiLocation { + pub SelfLocationAbsolute: Location = Location { parents:1, - interior: Junctions::X1( + interior: [ Parachain(ParachainInfo::parachain_id().into()) - ) + ].into() }; } parameter_type_with_key! { - pub ParachainMinFee: |location: MultiLocation| -> Option { + pub ParachainMinFee: |location: Location| -> Option { match (location.parents, location.first_interior()) { // Polkadot AssetHub fee (1, Some(Parachain(1000u32))) => Some(50_000_000u128), @@ -506,9 +545,8 @@ impl orml_xtokens::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = AccountIdToMultiLocation; - type CurrencyIdConvert = - CurrencyIdtoMultiLocation>; + type AccountIdToLocation = AccountIdToLocation; + type CurrencyIdConvert = CurrencyIdToLocation>; type XcmExecutor = XcmExecutor; type SelfLocation = SelfLocation; type Weigher = XcmWeigher; @@ -516,13 +554,13 @@ impl orml_xtokens::Config for Runtime { type UniversalLocation = UniversalLocation; type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; - type MultiLocationsFilter = Everything; + type LocationsFilter = Everything; type ReserveProvider = AbsoluteAndRelativeReserve; } // 1 DOT should be enough parameter_types! { - pub MaxHrmpRelayFee: MultiAsset = (MultiLocation::parent(), 1_000_000_000_000u128).into(); + pub MaxHrmpRelayFee: Asset = (Location::parent(), 1_000_000_000_000u128).into(); } // For now we only allow to transact in the relay, although this might change in the future @@ -563,9 +601,9 @@ impl UtilityEncodeCall for Transactors { } impl XcmTransact for Transactors { - fn destination(self) -> MultiLocation { + fn destination(self) -> Location { match self { - Transactors::Relay => MultiLocation::parent(), + Transactors::Relay => Location::parent(), } } } @@ -580,9 +618,8 @@ impl pallet_xcm_transactor::Config for Runtime { type DerivativeAddressRegistrationOrigin = DerivativeAddressRegistrationOrigin; type SovereignAccountDispatcherOrigin = EnsureRoot; type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = AccountIdToMultiLocation; - type CurrencyIdToMultiLocation = - CurrencyIdtoMultiLocation>; + type AccountIdToLocation = AccountIdToLocation; + type CurrencyIdToLocation = CurrencyIdToLocation>; type XcmSender = XcmRouter; type SelfLocation = SelfLocation; type Weigher = XcmWeigher; @@ -599,11 +636,11 @@ parameter_types! { // This is the relative view of erc20 assets. // Identified by this prefix + AccountKey20(contractAddress) // We use the RELATIVE multilocation - pub Erc20XcmBridgePalletLocation: MultiLocation = MultiLocation { + pub Erc20XcmBridgePalletLocation: Location = Location { parents:0, - interior: Junctions::X1( + interior: [ PalletInstance(::index() as u8) - ) + ].into() }; // To be able to support almost all erc20 implementations, @@ -624,8 +661,8 @@ mod testing { /// This From exists for benchmarking purposes. It has the potential side-effect of calling /// AssetManager::set_asset_type_asset_id() and should NOT be used in any production code. - impl From for CurrencyId { - fn from(location: MultiLocation) -> CurrencyId { + impl From for CurrencyId { + fn from(location: Location) -> CurrencyId { use xcm_primitives::AssetTypeGetter; // If it does not exist, for benchmarking purposes, we create the association diff --git a/runtime/moonbeam/tests/integration_test.rs b/runtime/moonbeam/tests/integration_test.rs index 3ec1073c92..63f53c870c 100644 --- a/runtime/moonbeam/tests/integration_test.rs +++ b/runtime/moonbeam/tests/integration_test.rs @@ -64,7 +64,7 @@ use sp_runtime::{ }; use std::str::from_utf8; use xcm::latest::prelude::*; -use xcm::{VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation}; +use xcm::{VersionedAsset, VersionedAssets, VersionedLocation}; use xcm_builder::{ParentIsPreset, SiblingParachainConvertsVia}; use xcm_executor::traits::ConvertLocation; @@ -1576,7 +1576,7 @@ fn root_can_change_default_xcm_vers() { (AccountId::from(BOB), 1_000 * GLMR), ]) .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1588,8 +1588,8 @@ fn root_can_change_default_xcm_vers() { }]) .build() .execute_with(|| { - let source_location = AssetType::Xcm(MultiLocation::parent()); - let dest = MultiLocation { + let source_location = AssetType::Xcm(Location::parent()); + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -1604,7 +1604,7 @@ fn root_can_change_default_xcm_vers() { origin_of(AccountId::from(ALICE)), CurrencyId::ForeignAsset(source_id), 100_000_000_000_000, - Box::new(xcm::VersionedMultiLocation::V3(dest.clone())), + Box::new(xcm::VersionedLocation::V3(dest.clone())), WeightLimit::Limited(4000000000.into()) ), orml_xtokens::Error::::XcmExecutionFailed @@ -1621,7 +1621,7 @@ fn root_can_change_default_xcm_vers() { origin_of(AccountId::from(ALICE)), CurrencyId::ForeignAsset(source_id), 100_000_000_000_000, - Box::new(xcm::VersionedMultiLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V3(dest)), WeightLimit::Limited(4000000000.into()) )); }) @@ -1630,7 +1630,7 @@ fn root_can_change_default_xcm_vers() { #[test] fn asset_can_be_registered() { ExtBuilder::default().build().execute_with(|| { - let source_location = AssetType::Xcm(MultiLocation::parent()); + let source_location = AssetType::Xcm(Location::parent()); let source_id: moonbeam_runtime::AssetId = source_location.clone().into(); let asset_metadata = AssetRegistrarMetadata { name: b"RelayToken".to_vec(), @@ -1653,7 +1653,7 @@ fn asset_can_be_registered() { fn xcm_asset_erc20_precompiles_supply_and_balance() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1671,7 +1671,7 @@ fn xcm_asset_erc20_precompiles_supply_and_balance() { .execute_with(|| { // We have the assetId that corresponds to the relay chain registered let relay_asset_id: moonbeam_runtime::AssetId = - AssetType::Xcm(MultiLocation::parent()).into(); + AssetType::Xcm(Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1712,7 +1712,7 @@ fn xcm_asset_erc20_precompiles_supply_and_balance() { fn xcm_asset_erc20_precompiles_transfer() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1730,7 +1730,7 @@ fn xcm_asset_erc20_precompiles_transfer() { .execute_with(|| { // We have the assetId that corresponds to the relay chain registered let relay_asset_id: moonbeam_runtime::AssetId = - AssetType::Xcm(MultiLocation::parent()).into(); + AssetType::Xcm(Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1777,7 +1777,7 @@ fn xcm_asset_erc20_precompiles_transfer() { fn xcm_asset_erc20_precompiles_approve() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1795,7 +1795,7 @@ fn xcm_asset_erc20_precompiles_approve() { .execute_with(|| { // We have the assetId that corresponds to the relay chain registered let relay_asset_id: moonbeam_runtime::AssetId = - AssetType::Xcm(MultiLocation::parent()).into(); + AssetType::Xcm(Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1863,7 +1863,7 @@ fn xcm_asset_erc20_precompiles_approve() { fn xtokens_precompile_transfer() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1884,7 +1884,7 @@ fn xtokens_precompile_transfer() { // We have the assetId that corresponds to the relay chain registered let relay_asset_id: moonbeam_runtime::AssetId = - AssetType::Xcm(MultiLocation::parent()).into(); + AssetType::Xcm(Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1893,7 +1893,7 @@ fn xtokens_precompile_transfer() { ); // Alice has 1000 tokens. She should be able to send through precompile - let destination = MultiLocation::new( + let destination = Location::new( 1, Junctions::X1(Junction::AccountId32 { network: None, @@ -1923,7 +1923,7 @@ fn xtokens_precompile_transfer() { fn xtokens_precompile_transfer_multiasset() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1943,7 +1943,7 @@ fn xtokens_precompile_transfer_multiasset() { let xtokens_precompile_address = H160::from_low_u64_be(2052); // Alice has 1000 tokens. She should be able to send through precompile - let destination = MultiLocation::new( + let destination = Location::new( 1, Junctions::X1(Junction::AccountId32 { network: None, @@ -1959,7 +1959,7 @@ fn xtokens_precompile_transfer_multiasset() { xtokens_precompile_address, XtokensPCall::transfer_multiasset { // We want to transfer the relay token - asset: MultiLocation::parent(), + asset: Location::parent(), amount: 500_000_000_000_000u128.into(), destination: destination.clone(), weight: 4_000_000, @@ -1986,7 +1986,7 @@ fn make_sure_glmr_can_be_transferred_precompile() { .with_safe_xcm_version(2) .build() .execute_with(|| { - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -1995,11 +1995,11 @@ fn make_sure_glmr_can_be_transferred_precompile() { }; assert_ok!(XTokens::transfer_multiasset( origin_of(AccountId::from(ALICE)), - Box::new(VersionedMultiAsset::V3(MultiAsset { + Box::new(VersionedAsset::V3(Asset { id: Concrete(moonbeam_runtime::xcm_config::SelfReserve::get()), fun: Fungible(1000) })), - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(40000.into()) )); }); @@ -2020,7 +2020,7 @@ fn make_sure_glmr_can_be_transferred() { .with_safe_xcm_version(2) .build() .execute_with(|| { - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -2031,7 +2031,7 @@ fn make_sure_glmr_can_be_transferred() { origin_of(AccountId::from(ALICE)), CurrencyId::SelfReserve, 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(40000.into()) )); }); @@ -2051,14 +2051,14 @@ fn make_sure_polkadot_xcm_cannot_be_called() { )]) .build() .execute_with(|| { - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, id: [1u8; 32], }), }; - let multiassets: MultiAssets = [MultiAsset { + let multiassets: Assets = [Asset { id: Concrete(moonbeam_runtime::xcm_config::SelfLocation::get()), fun: Fungible(1000), }] @@ -2066,9 +2066,9 @@ fn make_sure_polkadot_xcm_cannot_be_called() { .into(); assert_noop!( RuntimeCall::PolkadotXcm(pallet_xcm::Call::::reserve_transfer_assets { - dest: Box::new(VersionedMultiLocation::V3(dest.clone())), - beneficiary: Box::new(VersionedMultiLocation::V3(dest)), - assets: Box::new(VersionedMultiAssets::V3(multiassets)), + dest: Box::new(VersionedLocation::V3(dest.clone())), + beneficiary: Box::new(VersionedLocation::V3(dest)), + assets: Box::new(VersionedAssets::V3(multiassets)), fee_asset_item: 0, }) .dispatch(::RuntimeOrigin::signed( @@ -2090,9 +2090,9 @@ fn transact_through_signed_precompile_works_v2() { .build() .execute_with(|| { // Destination - let dest = MultiLocation::parent(); + let dest = Location::parent(); - let fee_payer_asset = MultiLocation::parent(); + let fee_payer_asset = Location::parent(); let bytes = vec![1u8, 2u8, 3u8]; @@ -2130,9 +2130,9 @@ fn transact_through_signed_cannot_send_to_local_chain() { .build() .execute_with(|| { // Destination - let dest = MultiLocation::here(); + let dest = Location::here(); - let fee_payer_asset = MultiLocation::parent(); + let fee_payer_asset = Location::parent(); let bytes = vec![1u8, 2u8, 3u8]; @@ -2170,7 +2170,7 @@ fn transactor_cannot_use_more_than_max_weight() { (AccountId::from(BOB), 1_000 * GLMR), ]) .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -2182,7 +2182,7 @@ fn transactor_cannot_use_more_than_max_weight() { }]) .build() .execute_with(|| { - let source_location = AssetType::Xcm(MultiLocation::parent()); + let source_location = AssetType::Xcm(Location::parent()); let source_id: moonbeam_runtime::AssetId = source_location.clone().into(); assert_ok!(XcmTransactor::register( root_origin(), @@ -2193,7 +2193,7 @@ fn transactor_cannot_use_more_than_max_weight() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( root_origin(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000.into(), @@ -2203,7 +2203,7 @@ fn transactor_cannot_use_more_than_max_weight() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( root_origin(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), 1, )); @@ -2213,9 +2213,9 @@ fn transactor_cannot_use_more_than_max_weight() { moonbeam_runtime::xcm_config::Transactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new( - xcm::VersionedMultiLocation::V3(MultiLocation::parent()) - )), + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() + ))), fee_amount: None }, vec![], @@ -2259,7 +2259,7 @@ fn call_xtokens_with_fee() { ]) .with_safe_xcm_version(2) .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -2271,8 +2271,8 @@ fn call_xtokens_with_fee() { }]) .build() .execute_with(|| { - let source_location = AssetType::Xcm(MultiLocation::parent()); - let dest = MultiLocation { + let source_location = AssetType::Xcm(Location::parent()); + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -2289,7 +2289,7 @@ fn call_xtokens_with_fee() { CurrencyId::ForeignAsset(source_id), 100_000_000_000_000, 100, - Box::new(xcm::VersionedMultiLocation::V3(dest.clone())), + Box::new(xcm::VersionedLocation::V3(dest.clone())), WeightLimit::Limited(4000000000.into()) )); @@ -2304,7 +2304,7 @@ fn test_xcm_utils_ml_tp_account() { ExtBuilder::default().build().execute_with(|| { let xcm_utils_precompile_address = H160::from_low_u64_be(2060); let expected_address_parent: H160 = - ParentIsPreset::::convert_location(&MultiLocation::parent()) + ParentIsPreset::::convert_location(&Location::parent()) .unwrap() .into(); @@ -2313,14 +2313,14 @@ fn test_xcm_utils_ml_tp_account() { ALICE, xcm_utils_precompile_address, XcmUtilsPCall::multilocation_to_address { - multilocation: MultiLocation::parent(), + multilocation: Location::parent(), }, ) .expect_cost(1000) .expect_no_logs() .execute_returns(Address(expected_address_parent)); - let parachain_2000_multilocation = MultiLocation::new(1, X1(Parachain(2000))); + let parachain_2000_multilocation = Location::new(1, X1(Parachain(2000))); let expected_address_parachain: H160 = SiblingParachainConvertsVia::::convert_location( ¶chain_2000_multilocation, @@ -2340,7 +2340,7 @@ fn test_xcm_utils_ml_tp_account() { .expect_no_logs() .execute_returns(Address(expected_address_parachain)); - let alice_in_parachain_2000_multilocation = MultiLocation::new( + let alice_in_parachain_2000_multilocation = Location::new( 1, X2( Parachain(2000), diff --git a/runtime/moonbeam/tests/xcm_mock/parachain.rs b/runtime/moonbeam/tests/xcm_mock/parachain.rs index bf3bd82f2a..e4cc09c551 100644 --- a/runtime/moonbeam/tests/xcm_mock/parachain.rs +++ b/runtime/moonbeam/tests/xcm_mock/parachain.rs @@ -46,7 +46,7 @@ use polkadot_parachain::primitives::{Id as ParaId, Sibling}; use xcm::latest::{ AssetId as XcmAssetId, Error as XcmError, ExecuteXcm, Junction::{PalletInstance, Parachain}, - Junctions, MultiLocation, NetworkId, Outcome, Xcm, + Junctions, Location, NetworkId, Outcome, Xcm, }; use xcm_builder::{ AccountKey20Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, @@ -172,7 +172,7 @@ impl pallet_assets::Config for Runtime { } } -/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used +/// Type for specifying how a `Location` can be converted into an `AccountId`. This is used /// when determining ownership of accounts for asset transacting and when attempting to use XCM /// `Transact` in order to determine the dispatch Origin. pub type LocationToAccountId = ( @@ -225,7 +225,7 @@ pub type ForeignFungiblesTransactor = FungiblesAdapter< JustTry, >, ), - // Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID: + // Do a simple punn to convert an AccountId32 Location into a native chain account ID: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, @@ -300,9 +300,9 @@ parameter_types! { parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Polkadot; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub UniversalLocation: InteriorMultiLocation = + pub UniversalLocation: InteriorLocation = X2(GlobalConsensus(RelayNetwork::get()), Parachain(MsgQueue::parachain_id().into())); - pub SelfReserve: MultiLocation = MultiLocation { + pub SelfReserve: Location = Location { parents:0, interior: Junctions::X1( PalletInstance(::index() as u8) @@ -366,17 +366,17 @@ pub enum CurrencyId { ForeignAsset(AssetId), } -// How to convert from CurrencyId to MultiLocation +// How to convert from CurrencyId to Location pub struct CurrencyIdtoMultiLocation(sp_std::marker::PhantomData); -impl sp_runtime::traits::Convert> +impl sp_runtime::traits::Convert> for CurrencyIdtoMultiLocation where - AssetXConverter: MaybeEquivalence, + AssetXConverter: MaybeEquivalence, { - fn convert(currency: CurrencyId) -> Option { + fn convert(currency: CurrencyId) -> Option { match currency { CurrencyId::SelfReserve => { - let multi: MultiLocation = SelfReserve::get(); + let multi: Location = SelfReserve::get(); Some(multi) } CurrencyId::ForeignAsset(asset) => AssetXConverter::convert_back(&asset), @@ -387,17 +387,17 @@ where parameter_types! { pub const BaseXcmWeight: Weight = Weight::from_parts(100u64, 100u64); pub const MaxAssetsForTransfer: usize = 2; - pub SelfLocation: MultiLocation = MultiLocation::here(); - pub SelfLocationAbsolute: MultiLocation = MultiLocation { + pub SelfLocation: Location = Location::here(); + pub SelfLocationAbsolute: Location = Location { parents:1, - interior: Junctions::X1( + interior: [ Parachain(MsgQueue::parachain_id().into()) - ) + ] }; } parameter_type_with_key! { - pub ParachainMinFee: |location: MultiLocation| -> Option { + pub ParachainMinFee: |location: Location| -> Option { match (location.parents, location.first_interior()) { (1, Some(Parachain(4u32))) => Some(50u128), _ => None, @@ -410,7 +410,7 @@ impl orml_xtokens::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = xcm_primitives::AccountIdToMultiLocation; + type AccountIdToLocation = xcm_primitives::AccountIdToLocation; type CurrencyIdConvert = CurrencyIdtoMultiLocation>; type XcmExecutor = XcmExecutor; @@ -525,7 +525,7 @@ pub mod mock_msg_queue { let hash = Encode::using_encoded(&xcm, T::Hashing::hash); let (result, event) = match Xcm::::try_from(xcm) { Ok(xcm) => { - let location = MultiLocation::new(1, Junctions::X1(Parachain(sender.into()))); + let location = Location::new(1, Junctions::X1(Parachain(sender.into()))); let mut id = [0u8; 32]; id.copy_from_slice(hash.as_ref()); match T::XcmExecutor::execute_xcm(location, xcm, id, max_weight) { @@ -654,12 +654,12 @@ pub type LocalOriginToLocation = xcm_primitives::SignedToAccountId20; parameter_types! { - pub MatcherLocation: MultiLocation = MultiLocation::here(); + pub MatcherLocation: Location = Location::here(); } #[cfg(feature = "runtime-benchmarks")] parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); + pub ReachableDest: Option = Some(Parent.into()); } impl pallet_xcm::Config for Runtime { @@ -695,22 +695,22 @@ impl pallet_xcm::Config for Runtime { // Our AssetType. For now we only handle Xcm Assets #[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] pub enum AssetType { - Xcm(MultiLocation), + Xcm(Location), } impl Default for AssetType { fn default() -> Self { - Self::Xcm(MultiLocation::here()) + Self::Xcm(Location::here()) } } -impl From for AssetType { - fn from(location: MultiLocation) -> Self { +impl From for AssetType { + fn from(location: Location) -> Self { Self::Xcm(location) } } -impl Into> for AssetType { - fn into(self) -> Option { +impl Into> for AssetType { + fn into(self) -> Option { match self { Self::Xcm(location) => Some(location), } @@ -816,7 +816,7 @@ impl pallet_asset_manager::Config for Runtime { // 1 DOT should be enough parameter_types! { - pub MaxHrmpRelayFee: MultiAsset = (MultiLocation::parent(), 1_000_000_000_000u128).into(); + pub MaxHrmpRelayFee: Asset = (Location::parent(), 1_000_000_000_000u128).into(); } impl pallet_xcm_transactor::Config for Runtime { @@ -826,9 +826,9 @@ impl pallet_xcm_transactor::Config for Runtime { type DerivativeAddressRegistrationOrigin = EnsureRoot; type SovereignAccountDispatcherOrigin = frame_system::EnsureRoot; type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = xcm_primitives::AccountIdToMultiLocation; - type CurrencyIdToMultiLocation = - CurrencyIdtoMultiLocation>; + type AccountIdToLocation = xcm_primitives::AccountIdToLocation; + type CurrencyIdToLocation = + CurrencyIdToLocation>; type SelfLocation = SelfLocation; type Weigher = xcm_builder::FixedWeightBounds; type UniversalLocation = UniversalLocation; @@ -941,9 +941,9 @@ pub enum MockTransactors { } impl xcm_primitives::XcmTransact for MockTransactors { - fn destination(self) -> MultiLocation { + fn destination(self) -> Location { match self { - MockTransactors::Relay => MultiLocation::parent(), + MockTransactors::Relay => Location::parent(), } } } diff --git a/runtime/moonbeam/tests/xcm_mock/relay_chain.rs b/runtime/moonbeam/tests/xcm_mock/relay_chain.rs index 8eeaad46cd..d889189165 100644 --- a/runtime/moonbeam/tests/xcm_mock/relay_chain.rs +++ b/runtime/moonbeam/tests/xcm_mock/relay_chain.rs @@ -116,10 +116,10 @@ impl configuration::Config for Runtime { } parameter_types! { - pub KsmLocation: MultiLocation = Here.into(); + pub KsmLocation: Location = Here.into(); pub const KusamaNetwork: NetworkId = NetworkId::Kusama; pub const AnyNetwork: Option = None; - pub UniversalLocation: InteriorMultiLocation = Here; + pub UniversalLocation: InteriorLocation = Here; } pub type SovereignAccountOf = ( @@ -145,7 +145,7 @@ parameter_types! { pub KsmPerSecond: (AssetId, u128, u128) = (Concrete(KsmLocation::get()), 1, 1); pub const MaxInstructions: u32 = 100; pub const MaxAssetsIntoHolding: u32 = 64; - pub MatcherLocation: MultiLocation = MultiLocation::here(); + pub MatcherLocation: Location = Location::here(); } pub type XcmRouter = super::RelayChainXcmRouter; @@ -168,9 +168,9 @@ pub type XcmBarrier = ( ); parameter_types! { - pub Kusama: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(KsmLocation::get()) }); - pub Statemine: MultiLocation = Parachain(4).into(); - pub KusamaForStatemine: (MultiAssetFilter, MultiLocation) = (Kusama::get(), Statemine::get()); + pub Kusama: AssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(KsmLocation::get()) }); + pub Statemine: Location = Parachain(4).into(); + pub KusamaForStatemine: (AssetFilter, Location) = (Kusama::get(), Statemine::get()); } pub type TrustedTeleporters = xcm_builder::Case; @@ -207,7 +207,7 @@ pub type LocalOriginToLocation = SignedToAccountId32 = Some(Parent.into()); + pub ReachableDest: Option = Some(Parent.into()); } impl pallet_xcm::Config for Runtime { diff --git a/runtime/moonbeam/tests/xcm_mock/statemint_like.rs b/runtime/moonbeam/tests/xcm_mock/statemint_like.rs index 987a83ae4a..271cc057b6 100644 --- a/runtime/moonbeam/tests/xcm_mock/statemint_like.rs +++ b/runtime/moonbeam/tests/xcm_mock/statemint_like.rs @@ -156,18 +156,18 @@ impl pallet_assets::Config for Runtime { } parameter_types! { - pub const KsmLocation: MultiLocation = MultiLocation::parent(); + pub const KsmLocation: Location = Location::parent(); pub const RelayNetwork: NetworkId = NetworkId::Kusama; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub UniversalLocation: InteriorMultiLocation = + pub UniversalLocation: InteriorLocation = X2(GlobalConsensus(RelayNetwork::get()), Parachain(MsgQueue::parachain_id().into())); - pub Local: MultiLocation = Here.into(); + pub Local: Location = Here.into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); pub KsmPerSecond: (xcm::latest::prelude::AssetId, u128, u128) = (Concrete(KsmLocation::get()), 1, 1); } -/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used +/// Type for specifying how a `Location` can be converted into an `AccountId`. This is used /// when determining ownership of accounts for asset transacting and when attempting to use XCM /// `Transact` in order to determine the dispatch Origin. pub type LocationToAccountId = ( @@ -185,7 +185,7 @@ pub type CurrencyTransactor = CurrencyAdapter< Balances, // Use this currency when it is a fungible asset matching the given location or name: IsConcrete, - // Convert an XCM MultiLocation into a local account id: + // Convert an XCM Location into a local account id: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, @@ -204,7 +204,7 @@ pub type FungiblesTransactor = FungiblesAdapter< AsPrefixedGeneralIndex, JustTry, >, - // Convert an XCM MultiLocation into a local account id: + // Convert an XCM Location into a local account id: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, @@ -248,15 +248,15 @@ parameter_types! { } match_types! { - pub type ParentOrParentsExecutivePlurality: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } + pub type ParentOrParentsExecutivePlurality: impl Contains = { + Location { parents: 1, interior: Here } | + Location { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } }; } match_types! { - pub type ParentOrSiblings: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(_) } + pub type ParentOrSiblings: impl Contains = { + Location { parents: 1, interior: Here } | + Location { parents: 1, interior: [_] } }; } @@ -272,7 +272,7 @@ pub type Barrier = ( ); parameter_types! { - pub MatcherLocation: MultiLocation = MultiLocation::here(); + pub MatcherLocation: Location = Location::here(); pub const MaxAssetsIntoHolding: u32 = 64; } @@ -312,7 +312,7 @@ pub type XcmRouter = super::ParachainXcmRouter; #[cfg(feature = "runtime-benchmarks")] parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); + pub ReachableDest: Option = Some(Parent.into()); } impl pallet_xcm::Config for Runtime { @@ -413,7 +413,7 @@ pub mod mock_msg_queue { let hash = Encode::using_encoded(&xcm, T::Hashing::hash); let (result, event) = match Xcm::::try_from(xcm) { Ok(xcm) => { - let location = MultiLocation::new(1, Junctions::X1(Parachain(sender.into()))); + let location = Location::new(1, Junctions::X1(Parachain(sender.into()))); let mut id = [0u8; 32]; id.copy_from_slice(hash.as_ref()); match T::XcmExecutor::execute_xcm(location, xcm, id, max_weight) { @@ -510,10 +510,10 @@ pub mod mock_statemint_prefix { #[pallet::storage] #[pallet::getter(fn current_prefix)] - pub(super) type CurrentPrefix = StorageValue<_, MultiLocation, ValueQuery>; + pub(super) type CurrentPrefix = StorageValue<_, Location, ValueQuery>; - impl Get for Pallet { - fn get() -> MultiLocation { + impl Get for Pallet { + fn get() -> Location { Self::current_prefix() } } @@ -522,11 +522,11 @@ pub mod mock_statemint_prefix { #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { // Changed Prefix - PrefixChanged(MultiLocation), + PrefixChanged(Location), } impl Pallet { - pub fn set_prefix(prefix: MultiLocation) { + pub fn set_prefix(prefix: Location) { CurrentPrefix::::put(&prefix); Self::deposit_event(Event::PrefixChanged(prefix)); } diff --git a/runtime/moonbeam/tests/xcm_tests.rs b/runtime/moonbeam/tests/xcm_tests.rs index 5739252288..e38a43a4aa 100644 --- a/runtime/moonbeam/tests/xcm_tests.rs +++ b/runtime/moonbeam/tests/xcm_tests.rs @@ -30,7 +30,7 @@ use pallet_xcm_transactor::{ }; use sp_core::ConstU32; use xcm::latest::prelude::*; -use xcm::{VersionedMultiLocation, WrapVersion}; +use xcm::{VersionedLocation, WrapVersion}; use xcm_builder::HashedDescriptionDescribeFamilyAllTerminal; use xcm_executor::traits::ConvertLocation; use xcm_mock::parachain; @@ -44,7 +44,7 @@ use xcm_simulator::TestExt; fn receive_relay_asset_from_relay() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -70,7 +70,7 @@ fn receive_relay_asset_from_relay() { }); // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -81,7 +81,7 @@ fn receive_relay_asset_from_relay() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 123).into()), 0, )); @@ -99,7 +99,7 @@ fn receive_relay_asset_from_relay() { fn send_relay_asset_to_relay() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -126,7 +126,7 @@ fn send_relay_asset_to_relay() { )); }); - let dest: MultiLocation = Junction::AccountKey20 { + let dest: Location = Junction::AccountKey20 { network: None, key: PARAALICE, } @@ -137,7 +137,7 @@ fn send_relay_asset_to_relay() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 123).into()), 0, )); @@ -155,7 +155,7 @@ fn send_relay_asset_to_relay() { }); // We now send back some money to the relay - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -168,7 +168,7 @@ fn send_relay_asset_to_relay() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 123, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -189,7 +189,7 @@ fn send_relay_asset_to_relay() { fn send_relay_asset_to_para_b() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -232,7 +232,7 @@ fn send_relay_asset_to_para_b() { )); }); - let dest: MultiLocation = Junction::AccountKey20 { + let dest: Location = Junction::AccountKey20 { network: None, key: PARAALICE, } @@ -241,7 +241,7 @@ fn send_relay_asset_to_para_b() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 123).into()), 0, )); @@ -253,7 +253,7 @@ fn send_relay_asset_to_para_b() { }); // Now send relay asset from para A to para B - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X2( Parachain(2), @@ -269,7 +269,7 @@ fn send_relay_asset_to_para_b() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -290,7 +290,7 @@ fn send_para_a_asset_to_para_b() { MockNet::reset(); // This represents the asset in paraA - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -318,7 +318,7 @@ fn send_para_a_asset_to_para_b() { }); // Send para A asset from para A to para B - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X2( Parachain(2), @@ -336,7 +336,7 @@ fn send_para_a_asset_to_para_b() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(800000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -360,7 +360,7 @@ fn send_para_a_asset_from_para_b_to_para_c() { MockNet::reset(); // Represents para A asset - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -404,7 +404,7 @@ fn send_para_a_asset_from_para_b_to_para_c() { )); }); - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X2( Parachain(2), @@ -419,7 +419,7 @@ fn send_para_a_asset_from_para_b_to_para_c() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -438,7 +438,7 @@ fn send_para_a_asset_from_para_b_to_para_c() { }); // Send para A asset from para B to para C - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X2( Parachain(3), @@ -454,7 +454,7 @@ fn send_para_a_asset_from_para_b_to_para_c() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -470,7 +470,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { MockNet::reset(); // para A asset - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -498,7 +498,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { }); // Send para A asset to para B - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X2( Parachain(2), @@ -514,7 +514,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -533,7 +533,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { }); // Send back para A asset to para A - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X2( Parachain(1), @@ -548,7 +548,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -566,7 +566,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { fn receive_relay_asset_with_trader() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -594,7 +594,7 @@ fn receive_relay_asset_with_trader() { )); }); - let dest: MultiLocation = Junction::AccountKey20 { + let dest: Location = Junction::AccountKey20 { network: None, key: PARAALICE, } @@ -609,7 +609,7 @@ fn receive_relay_asset_with_trader() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 100).into()), 0, )); @@ -627,7 +627,7 @@ fn receive_relay_asset_with_trader() { fn send_para_a_asset_to_para_b_with_trader() { MockNet::reset(); - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -653,7 +653,7 @@ fn send_para_a_asset_to_para_b_with_trader() { )); }); - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X2( Parachain(2), @@ -671,7 +671,7 @@ fn send_para_a_asset_to_para_b_with_trader() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(10u64, DEFAULT_PROOF_SIZE)) )); }); @@ -701,7 +701,7 @@ fn send_para_a_asset_to_para_b_with_trader() { fn send_para_a_asset_to_para_b_with_trader_and_fee() { MockNet::reset(); - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -728,7 +728,7 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { )); }); - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X2( Parachain(2), @@ -746,7 +746,7 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { parachain::CurrencyId::SelfReserve, 100, 1, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(800000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -769,7 +769,7 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { fn error_when_not_paying_enough() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -778,7 +778,7 @@ fn error_when_not_paying_enough() { decimals: 12, }; - let dest: MultiLocation = Junction::AccountKey20 { + let dest: Location = Junction::AccountKey20 { network: None, key: PARAALICE, } @@ -809,7 +809,7 @@ fn error_when_not_paying_enough() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 5).into()), 0, )); @@ -825,7 +825,7 @@ fn error_when_not_paying_enough() { fn transact_through_derivative_multilocation() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -852,7 +852,7 @@ fn transact_through_derivative_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000000000.into(), @@ -861,14 +861,14 @@ fn transact_through_derivative_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), WEIGHT_REF_TIME_PER_SECOND as u128, )); }); // Let's construct the call to know how much weight it is going to require - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -878,7 +878,7 @@ fn transact_through_derivative_multilocation() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 4000003100u128).into()), 0, )); @@ -901,7 +901,7 @@ fn transact_through_derivative_multilocation() { // Send to registered address let registered_address = derivative_account_id(para_a_account(), 0); - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -915,7 +915,7 @@ fn transact_through_derivative_multilocation() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -956,8 +956,8 @@ fn transact_through_derivative_multilocation() { parachain::MockTransactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), fee_amount: None }, @@ -983,7 +983,7 @@ fn transact_through_derivative_multilocation() { fn transact_through_derivative_with_custom_fee_weight() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1010,7 +1010,7 @@ fn transact_through_derivative_with_custom_fee_weight() { // Let's construct the call to know how much weight it is going to require - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1020,7 +1020,7 @@ fn transact_through_derivative_with_custom_fee_weight() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 4000003100u128).into()), 0, )); @@ -1043,7 +1043,7 @@ fn transact_through_derivative_with_custom_fee_weight() { // Send to registered address let registered_address = derivative_account_id(para_a_account(), 0); - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -1057,7 +1057,7 @@ fn transact_through_derivative_with_custom_fee_weight() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1099,8 +1099,8 @@ fn transact_through_derivative_with_custom_fee_weight() { parachain::MockTransactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), // 1-1 fee weight mapping fee_amount: Some(overall_weight as u128) @@ -1137,7 +1137,7 @@ fn transact_through_derivative_with_custom_fee_weight() { fn transact_through_derivative_with_custom_fee_weight_refund() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1164,7 +1164,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { // Let's construct the call to know how much weight it is going to require - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1174,7 +1174,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 4000009100u128).into()), 0, )); @@ -1197,7 +1197,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { // Send to registered address let registered_address = derivative_account_id(para_a_account(), 0); - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -1211,7 +1211,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1253,8 +1253,8 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { parachain::MockTransactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), // 1-1 fee weight mapping fee_amount: Some(overall_weight as u128) @@ -1290,7 +1290,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { fn transact_through_sovereign() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1317,7 +1317,7 @@ fn transact_through_sovereign() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000000000.into(), @@ -1326,12 +1326,12 @@ fn transact_through_sovereign() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), WEIGHT_REF_TIME_PER_SECOND as u128, )); }); - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1340,7 +1340,7 @@ fn transact_through_sovereign() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 4000003100u128).into()), 0, )); @@ -1362,7 +1362,7 @@ fn transact_through_sovereign() { // Send to registered address let registered_address = derivative_account_id(para_a_account(), 0); - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -1376,7 +1376,7 @@ fn transact_through_sovereign() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1395,7 +1395,7 @@ fn transact_through_sovereign() { }); // We send the xcm transact operation to parent - let dest = MultiLocation { + let dest = Location { parents: 1, interior: Here, }; @@ -1426,11 +1426,11 @@ fn transact_through_sovereign() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_sovereign( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V3(dest)), PARAALICE.into(), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), fee_amount: None }, @@ -1456,7 +1456,7 @@ fn transact_through_sovereign() { fn transact_through_sovereign_with_custom_fee_weight() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1481,7 +1481,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { )); }); - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1490,7 +1490,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 4000003100u128).into()), 0, )); @@ -1512,7 +1512,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { // Send to registered address let registered_address = derivative_account_id(para_a_account(), 0); - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -1526,7 +1526,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1545,7 +1545,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { }); // We send the xcm transact operation to parent - let dest = MultiLocation { + let dest = Location { parents: 1, interior: Here, }; @@ -1577,11 +1577,11 @@ fn transact_through_sovereign_with_custom_fee_weight() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_sovereign( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V3(dest)), PARAALICE.into(), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), // 1-1 fee-weight mapping fee_amount: Some(total_weight as u128) @@ -1608,7 +1608,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { fn transact_through_sovereign_with_custom_fee_weight_refund() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1633,7 +1633,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { )); }); - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1642,7 +1642,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 4000009100u128).into()), 0, )); @@ -1664,7 +1664,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { // Send to registered address let registered_address = derivative_account_id(para_a_account(), 0); - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -1678,7 +1678,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1697,7 +1697,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { }); // We send the xcm transact operation to parent - let dest = MultiLocation { + let dest = Location { parents: 1, interior: Here, }; @@ -1729,11 +1729,11 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_sovereign( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V3(dest)), PARAALICE.into(), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), // 1-1 fee-weight mapping fee_amount: Some(total_weight as u128) @@ -1761,7 +1761,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { fn test_automatic_versioning_on_runtime_upgrade_with_relay() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1786,7 +1786,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { }); let response = Response::Version(2); - let querier: MultiLocation = Here.into(); + let querier: Location = Here.into(); // This is irrelevant, nothing will be done with this message, // but we need to pass a message as an argument to trigger the storage change @@ -1799,7 +1799,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { // The router is mocked, and we cannot use WrapVersion in ChildParachainRouter. So we will force // it directly here // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1824,7 +1824,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 123).into()), 0, )); @@ -1838,7 +1838,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { let expected_supported_version: relay_chain::RuntimeEvent = pallet_xcm::Event::SupportedVersionChanged { - location: MultiLocation { + location: Location { parents: 0, interior: X1(Parachain(1)), }, @@ -1873,7 +1873,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { // This event should have been seen in the relay let expected_supported_version_2: relay_chain::RuntimeEvent = pallet_xcm::Event::SupportedVersionChanged { - location: MultiLocation { + location: Location { parents: 0, interior: X1(Parachain(1)), }, @@ -1892,7 +1892,7 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { MockNet::reset(); let fresh_account = [2u8; 20]; - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -1917,7 +1917,7 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { }); // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: fresh_account, } @@ -1926,7 +1926,7 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest.clone()).clone().into()), + Box::new(VersionedLocation::V3(dest.clone()).clone().into()), Box::new((Here, 123).into()), 0, )); @@ -1952,7 +1952,7 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 123).into()), 0, )); @@ -1970,7 +1970,7 @@ fn receive_assets_with_sufficients_true_allows_non_funded_account_to_receive_ass MockNet::reset(); let fresh_account = [2u8; 20]; - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -1995,7 +1995,7 @@ fn receive_assets_with_sufficients_true_allows_non_funded_account_to_receive_ass }); // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: fresh_account, } @@ -2004,7 +2004,7 @@ fn receive_assets_with_sufficients_true_allows_non_funded_account_to_receive_ass assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest.clone()).clone().into()), + Box::new(VersionedLocation::V3(dest.clone()).clone().into()), Box::new((Here, 123).into()), 0, )); @@ -2031,7 +2031,7 @@ fn evm_account_receiving_assets_should_handle_sufficients_ref_count() { assert_eq!(parachain::System::account(evm_account_id).sufficients, 1); }); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -2055,7 +2055,7 @@ fn evm_account_receiving_assets_should_handle_sufficients_ref_count() { }); // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: sufficient_account, } @@ -2064,7 +2064,7 @@ fn evm_account_receiving_assets_should_handle_sufficients_ref_count() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest.clone()).clone().into()), + Box::new(VersionedLocation::V3(dest.clone()).clone().into()), Box::new((Here, 123).into()), 0, )); @@ -2099,7 +2099,7 @@ fn empty_account_should_not_be_reset() { let evm_account_id = parachain::AccountId::from(sufficient_account); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -2133,7 +2133,7 @@ fn empty_account_should_not_be_reset() { }); // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: sufficient_account, } @@ -2142,7 +2142,7 @@ fn empty_account_should_not_be_reset() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest.clone()).clone().into()), + Box::new(VersionedLocation::V3(dest.clone()).clone().into()), Box::new((Here, 123).into()), 0, )); @@ -2197,7 +2197,7 @@ fn empty_account_should_not_be_reset() { fn test_statemint_like() { MockNet::reset(); - let dest_para = MultiLocation::new(1, X1(Parachain(1))); + let dest_para = Location::new(1, X1(Parachain(1))); let sov = xcm_builder::SiblingParachainConvertsVia::< polkadot_parachain::primitives::Sibling, @@ -2205,7 +2205,7 @@ fn test_statemint_like() { >::convert_location(&dest_para) .unwrap(); - let statemint_asset_a_balances = MultiLocation::new( + let statemint_asset_a_balances = Location::new( 1, X3( Parachain(4), @@ -2266,7 +2266,7 @@ fn test_statemint_like() { )); // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -2275,8 +2275,8 @@ fn test_statemint_like() { // Send with new prefix assert_ok!(StatemintChainPalletXcm::reserve_transfer_assets( statemint_like::RuntimeOrigin::signed(RELAYALICE), - Box::new(MultiLocation::new(1, X1(Parachain(1))).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(Location::new(1, X1(Parachain(1))).into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new( ( X2( @@ -2303,7 +2303,7 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { MockNet::reset(); // Relay asset - let relay_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let relay_location = parachain::AssetType::Xcm(Location::parent()); let source_relay_id: parachain::AssetId = relay_location.clone().into(); let relay_asset_metadata = parachain::AssetMetadata { @@ -2313,7 +2313,7 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { }; // Statemint asset - let statemint_asset = MultiLocation::new( + let statemint_asset = Location::new( 1, X3(Parachain(4u32), PalletInstance(5u8), GeneralIndex(10u128)), ); @@ -2326,7 +2326,7 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { decimals: 12, }; - let dest_para = MultiLocation::new(1, X1(Parachain(1))); + let dest_para = Location::new(1, X1(Parachain(1))); let sov = xcm_builder::SiblingParachainConvertsVia::< polkadot_parachain::primitives::Sibling, @@ -2364,7 +2364,7 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { )); }); - let parachain_beneficiary_from_relay: MultiLocation = Junction::AccountKey20 { + let parachain_beneficiary_from_relay: Location = Junction::AccountKey20 { network: None, key: PARAALICE, } @@ -2376,7 +2376,7 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), Box::new( - VersionedMultiLocation::V3(parachain_beneficiary_from_relay) + VersionedLocation::V3(parachain_beneficiary_from_relay) .clone() .into() ), @@ -2414,7 +2414,7 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { )); // Send statemint USDC asset to Alice in Parachain A - let parachain_beneficiary_from_statemint: MultiLocation = AccountKey20 { + let parachain_beneficiary_from_statemint: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -2423,9 +2423,9 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { // Send with new prefix assert_ok!(StatemintChainPalletXcm::reserve_transfer_assets( statemint_like::RuntimeOrigin::signed(RELAYALICE), - Box::new(MultiLocation::new(1, X1(Parachain(1))).into()), + Box::new(Location::new(1, X1(Parachain(1))).into()), Box::new( - VersionedMultiLocation::V3(parachain_beneficiary_from_statemint) + VersionedLocation::V3(parachain_beneficiary_from_statemint) .clone() .into() ), @@ -2445,7 +2445,7 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { )); }); - let statemint_beneficiary = MultiLocation { + let statemint_beneficiary = Location { parents: 1, interior: X2( Parachain(4), @@ -2484,7 +2484,7 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { (parachain::CurrencyId::ForeignAsset(source_relay_id), 100) ], 1, - Box::new(VersionedMultiLocation::V3(statemint_beneficiary)), + Box::new(VersionedLocation::V3(statemint_beneficiary)), WeightLimit::Limited(Weight::from_parts(80_000_000u64, 100_000u64)) )); }); @@ -2510,13 +2510,13 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { #[test] fn transact_through_signed_multilocation() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000000000.into(), @@ -2526,7 +2526,7 @@ fn transact_through_signed_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), WEIGHT_REF_TIME_PER_SECOND as u128, )); ancestry = parachain::UniversalLocation::get().into(); @@ -2545,7 +2545,7 @@ fn transact_through_signed_multilocation() { // To convert it to what the relay will see instead of us descend_origin_multilocation - .reanchor(&MultiLocation::parent(), ancestry.interior) + .reanchor(&Location::parent(), &ancestry.interior) .unwrap(); let derived = xcm_builder::Account32Hash::< @@ -2589,10 +2589,10 @@ fn transact_through_signed_multilocation() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), fee_amount: None }, @@ -2616,7 +2616,7 @@ fn transact_through_signed_multilocation() { #[test] fn transact_through_signed_multilocation_custom_fee_and_weight() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); ParaA::execute_with(|| { ancestry = parachain::UniversalLocation::get().into(); @@ -2635,7 +2635,7 @@ fn transact_through_signed_multilocation_custom_fee_and_weight() { // To convert it to what the relay will see instead of us descend_origin_multilocation - .reanchor(&MultiLocation::parent(), ancestry.interior) + .reanchor(&Location::parent(), &ancestry.interior) .unwrap(); let derived = xcm_builder::Account32Hash::< @@ -2680,10 +2680,10 @@ fn transact_through_signed_multilocation_custom_fee_and_weight() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), fee_amount: Some(total_weight as u128) }, @@ -2707,7 +2707,7 @@ fn transact_through_signed_multilocation_custom_fee_and_weight() { #[test] fn transact_through_signed_multilocation_custom_fee_and_weight_refund() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); ParaA::execute_with(|| { ancestry = parachain::UniversalLocation::get().into(); @@ -2726,7 +2726,7 @@ fn transact_through_signed_multilocation_custom_fee_and_weight_refund() { // To convert it to what the relay will see instead of us descend_origin_multilocation - .reanchor(&MultiLocation::parent(), ancestry.interior) + .reanchor(&Location::parent(), &ancestry.interior) .unwrap(); let derived = xcm_builder::Account32Hash::< @@ -2771,10 +2771,10 @@ fn transact_through_signed_multilocation_custom_fee_and_weight_refund() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), fee_amount: Some(total_weight as u128) }, @@ -2800,18 +2800,18 @@ fn transact_through_signed_multilocation_custom_fee_and_weight_refund() { #[test] fn transact_through_signed_multilocation_para_to_para() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); - let para_b_location = MultiLocation::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, X1(Parachain(2))); - let para_b_balances = MultiLocation::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedMultiLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V3(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -2821,7 +2821,7 @@ fn transact_through_signed_multilocation_para_to_para() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); @@ -2840,7 +2840,7 @@ fn transact_through_signed_multilocation_para_to_para() { // To convert it to what the paraB will see instead of us descend_origin_multilocation - .reanchor(¶_b_location, ancestry.interior) + .reanchor(¶_b_location, &ancestry.interior) .unwrap(); let derived = @@ -2883,9 +2883,9 @@ fn transact_through_signed_multilocation_para_to_para() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V3(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( para_b_balances ))), fee_amount: None @@ -2911,16 +2911,16 @@ fn transact_through_signed_multilocation_para_to_para() { #[test] fn transact_through_signed_multilocation_para_to_para_refund() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); - let para_b_location = MultiLocation::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, X1(Parachain(2))); - let para_b_balances = MultiLocation::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); ParaA::execute_with(|| { assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); @@ -2939,7 +2939,7 @@ fn transact_through_signed_multilocation_para_to_para_refund() { // To convert it to what the paraB will see instead of us descend_origin_multilocation - .reanchor(¶_b_location, ancestry.interior) + .reanchor(¶_b_location, &ancestry.interior) .unwrap(); let derived = @@ -2983,9 +2983,9 @@ fn transact_through_signed_multilocation_para_to_para_refund() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V3(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( para_b_balances ))), fee_amount: Some(overall_weight as u128) @@ -3012,18 +3012,18 @@ fn transact_through_signed_multilocation_para_to_para_refund() { #[test] fn transact_through_signed_multilocation_para_to_para_ethereum() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); - let para_b_location = MultiLocation::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, X1(Parachain(2))); - let para_b_balances = MultiLocation::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedMultiLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V3(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -3033,7 +3033,7 @@ fn transact_through_signed_multilocation_para_to_para_ethereum() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); @@ -3052,7 +3052,7 @@ fn transact_through_signed_multilocation_para_to_para_ethereum() { // To convert it to what the paraB will see instead of us descend_origin_multilocation - .reanchor(¶_b_location, ancestry.interior) + .reanchor(¶_b_location, &ancestry.interior) .unwrap(); let derived = @@ -3110,9 +3110,9 @@ fn transact_through_signed_multilocation_para_to_para_ethereum() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V3(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( para_b_balances ))), fee_amount: None @@ -3140,18 +3140,18 @@ fn transact_through_signed_multilocation_para_to_para_ethereum() { #[test] fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); - let para_b_location = MultiLocation::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, X1(Parachain(2))); - let para_b_balances = MultiLocation::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedMultiLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V3(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -3161,7 +3161,7 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); @@ -3180,7 +3180,7 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() // To convert it to what the paraB will see instead of us descend_origin_multilocation - .reanchor(¶_b_location, ancestry.interior) + .reanchor(¶_b_location, &ancestry.interior) .unwrap(); let derived = @@ -3239,9 +3239,9 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V3(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( para_b_balances ))), fee_amount: None @@ -3264,18 +3264,18 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() #[test] fn transact_through_signed_multilocation_para_to_para_ethereum_proxy_succeeds() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); - let para_b_location = MultiLocation::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, X1(Parachain(2))); - let para_b_balances = MultiLocation::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedMultiLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V3(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -3285,7 +3285,7 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_proxy_succeeds() // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); @@ -3304,7 +3304,7 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_proxy_succeeds() // To convert it to what the paraB will see instead of us descend_origin_multilocation - .reanchor(¶_b_location, ancestry.interior) + .reanchor(¶_b_location, &ancestry.interior) .unwrap(); let derived = @@ -3371,9 +3371,9 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_proxy_succeeds() ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V3(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( para_b_balances ))), fee_amount: None @@ -3426,8 +3426,8 @@ fn hrmp_init_accept_through_root() { proposed_max_message_size: 1 }), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), fee_amount: Some(total_fee) }, @@ -3459,8 +3459,8 @@ fn hrmp_init_accept_through_root() { para_id: 1u32.into() }, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), fee_amount: Some(total_fee) }, @@ -3517,8 +3517,8 @@ fn hrmp_close_works() { recipient: 2u32.into() }), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), fee_amount: Some(total_fee) }, diff --git a/runtime/moonriver/Cargo.toml b/runtime/moonriver/Cargo.toml index 526b9f182f..7c4c328c9c 100644 --- a/runtime/moonriver/Cargo.toml +++ b/runtime/moonriver/Cargo.toml @@ -1,5 +1,5 @@ [package] -authors = {workspace = true} +authors = { workspace = true } build = "build.rs" description = "Moonriver Runtime" edition = "2021" @@ -9,282 +9,285 @@ name = "moonriver-runtime" version = "0.8.4" [dependencies] -hex-literal = {workspace = true, optional = true} -log = {workspace = true} -num_enum = {workspace = true} -rlp = {workspace = true, optional = true} -serde = {workspace = true, features = ["derive"]} -sha3 = {workspace = true, optional = true} -smallvec = {workspace = true} -strum = {workspace = true} -strum_macros = {workspace = true} +hex-literal = { workspace = true, optional = true } +log = { workspace = true } +num_enum = { workspace = true } +rlp = { workspace = true, optional = true } +serde = { workspace = true, features = ["derive"] } +sha3 = { workspace = true, optional = true } +smallvec = { workspace = true } +strum = { workspace = true } +strum_macros = { workspace = true } # Moonbeam -account = {workspace = true} -moonbeam-core-primitives = {workspace = true} -moonbeam-relay-encoder = {workspace = true} -moonbeam-runtime-common = {workspace = true} -precompile-utils = {workspace = true} -session-keys-primitives = {workspace = true} -xcm-primitives = {workspace = true} +account = { workspace = true } +moonbeam-core-primitives = { workspace = true } +moonbeam-relay-encoder = { workspace = true } +moonbeam-runtime-common = { workspace = true } +precompile-utils = { workspace = true } +session-keys-primitives = { workspace = true } +xcm-primitives = { workspace = true } # Moonbeam pallets -moonbeam-xcm-benchmarks = {workspace = true} -pallet-asset-manager = {workspace = true} -pallet-author-mapping = {workspace = true} -pallet-crowdloan-rewards = {workspace = true} -pallet-erc20-xcm-bridge = {workspace = true} -pallet-ethereum-xcm = {workspace = true} -pallet-evm-chain-id = {workspace = true} -pallet-maintenance-mode = {workspace = true, features = ["xcm-support"]} -pallet-migrations = {workspace = true} -pallet-moonbeam-lazy-migrations = {workspace = true} -pallet-moonbeam-orbiters = {workspace = true} -pallet-parachain-staking = {workspace = true} -pallet-proxy-genesis-companion = {workspace = true} -pallet-randomness = {workspace = true} -pallet-xcm-transactor = {workspace = true} +moonbeam-xcm-benchmarks = { workspace = true } +pallet-asset-manager = { workspace = true } +pallet-author-mapping = { workspace = true } +pallet-crowdloan-rewards = { workspace = true } +pallet-erc20-xcm-bridge = { workspace = true } +pallet-ethereum-xcm = { workspace = true } +pallet-evm-chain-id = { workspace = true } +pallet-maintenance-mode = { workspace = true, features = ["xcm-support"] } +pallet-migrations = { workspace = true } +pallet-moonbeam-lazy-migrations = { workspace = true } +pallet-moonbeam-orbiters = { workspace = true } +pallet-parachain-staking = { workspace = true } +pallet-proxy-genesis-companion = { workspace = true } +pallet-randomness = { workspace = true } +pallet-xcm-transactor = { workspace = true } # Moonbeam precompiles -pallet-evm-precompile-author-mapping = {workspace = true} -pallet-evm-precompile-balances-erc20 = {workspace = true} -pallet-evm-precompile-batch = {workspace = true} -pallet-evm-precompile-call-permit = {workspace = true} -pallet-evm-precompile-collective = {workspace = true} -pallet-evm-precompile-conviction-voting = {workspace = true} -pallet-evm-precompile-crowdloan-rewards = {workspace = true} -pallet-evm-precompile-gmp = {workspace = true} -pallet-evm-precompile-identity = {workspace = true} -pallet-evm-precompile-parachain-staking = {workspace = true} -pallet-evm-precompile-preimage = {workspace = true} -pallet-evm-precompile-proxy = {workspace = true} -pallet-evm-precompile-randomness = {workspace = true} -pallet-evm-precompile-referenda = {workspace = true} -pallet-evm-precompile-registry = {workspace = true} -pallet-evm-precompile-relay-encoder = {workspace = true} -pallet-evm-precompile-xcm-transactor = {workspace = true} -pallet-evm-precompile-xcm-utils = {workspace = true} -pallet-evm-precompile-xtokens = {workspace = true} -pallet-evm-precompileset-assets-erc20 = {workspace = true} +pallet-evm-precompile-author-mapping = { workspace = true } +pallet-evm-precompile-balances-erc20 = { workspace = true } +pallet-evm-precompile-batch = { workspace = true } +pallet-evm-precompile-call-permit = { workspace = true } +pallet-evm-precompile-collective = { workspace = true } +pallet-evm-precompile-conviction-voting = { workspace = true } +pallet-evm-precompile-crowdloan-rewards = { workspace = true } +pallet-evm-precompile-gmp = { workspace = true } +# TODO(RODRIGO) pallet-evm-precompile-identity = { workspace = true } +pallet-evm-precompile-parachain-staking = { workspace = true } +pallet-evm-precompile-preimage = { workspace = true } +pallet-evm-precompile-proxy = { workspace = true } +pallet-evm-precompile-randomness = { workspace = true } +pallet-evm-precompile-referenda = { workspace = true } +pallet-evm-precompile-registry = { workspace = true } +pallet-evm-precompile-relay-encoder = { workspace = true } +pallet-evm-precompile-xcm-transactor = { workspace = true } +pallet-evm-precompile-xcm-utils = { workspace = true } +pallet-evm-precompile-xtokens = { workspace = true } +pallet-evm-precompileset-assets-erc20 = { workspace = true } # Moonbeam tracing -evm-tracing-events = {workspace = true, optional = true} -moonbeam-evm-tracer = {workspace = true, optional = true} -moonbeam-rpc-primitives-debug = {workspace = true} -moonbeam-rpc-primitives-txpool = {workspace = true} +evm-tracing-events = { workspace = true, optional = true } +moonbeam-evm-tracer = { workspace = true, optional = true } +moonbeam-rpc-primitives-debug = { workspace = true } +moonbeam-rpc-primitives-txpool = { workspace = true } # Substrate -frame-executive = {workspace = true} -frame-support = {workspace = true} -frame-system = {workspace = true} -frame-system-rpc-runtime-api = {workspace = true} -pallet-assets = {workspace = true} -pallet-balances = {workspace = true, features = ["insecure_zero_ed"]} -pallet-collective = {workspace = true} -pallet-conviction-voting = {workspace = true} -pallet-identity = {workspace = true} -pallet-multisig = {workspace = true} -pallet-preimage = {workspace = true} -pallet-proxy = {workspace = true} -pallet-referenda = {workspace = true} -pallet-root-testing = {workspace = true} -pallet-scheduler = {workspace = true} -pallet-society = {workspace = true} -pallet-timestamp = {workspace = true} -pallet-transaction-payment = {workspace = true} -pallet-transaction-payment-rpc-runtime-api = {workspace = true} -pallet-treasury = {workspace = true} -pallet-utility = {workspace = true} -pallet-whitelist = {workspace = true} -parity-scale-codec = {workspace = true, features = [ - "derive", - "max-encoded-len", - "chain-error", -]} -scale-info = {workspace = true, features = ["derive"]} -sp-api = {workspace = true} -sp-block-builder = {workspace = true} -sp-consensus-slots = {workspace = true} -sp-core = {workspace = true} -sp-debug-derive = {workspace = true} -sp-inherents = {workspace = true} -sp-io = {workspace = true, features = ["improved_panic_error_reporting"]} -sp-offchain = {workspace = true} -sp-runtime = {workspace = true} -sp-session = {workspace = true} -sp-std = {workspace = true} -sp-transaction-pool = {workspace = true} -sp-version = {workspace = true} -sp-weights = {workspace = true} +frame-executive = { workspace = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +frame-system-rpc-runtime-api = { workspace = true } +pallet-assets = { workspace = true } +pallet-balances = { workspace = true, features = ["insecure_zero_ed"] } +pallet-collective = { workspace = true } +pallet-conviction-voting = { workspace = true } +pallet-identity = { workspace = true } +pallet-multisig = { workspace = true } +pallet-preimage = { workspace = true } +pallet-proxy = { workspace = true } +pallet-referenda = { workspace = true } +pallet-root-testing = { workspace = true } +pallet-scheduler = { workspace = true } +pallet-society = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-transaction-payment = { workspace = true } +pallet-transaction-payment-rpc-runtime-api = { workspace = true } +pallet-treasury = { workspace = true } +pallet-utility = { workspace = true } +pallet-whitelist = { workspace = true } +parity-scale-codec = { workspace = true, features = [ + "derive", + "max-encoded-len", + "chain-error", +] } +scale-info = { workspace = true, features = ["derive"] } +sp-api = { workspace = true } +sp-block-builder = { workspace = true } +sp-consensus-slots = { workspace = true } +sp-core = { workspace = true } +sp-debug-derive = { workspace = true } +sp-inherents = { workspace = true } +sp-io = { workspace = true, features = ["improved_panic_error_reporting"] } +sp-offchain = { workspace = true } +sp-runtime = { workspace = true } +sp-session = { workspace = true } +sp-std = { workspace = true } +sp-transaction-pool = { workspace = true } +sp-version = { workspace = true } +sp-weights = { workspace = true } # Frontier -fp-evm = {workspace = true} -fp-rpc = {workspace = true} -fp-self-contained = {workspace = true, features = ["serde"]} -pallet-ethereum = {workspace = true, features = ["forbid-evm-reentrancy"]} -pallet-evm = {workspace = true, features = ["forbid-evm-reentrancy"]} -pallet-evm-precompile-blake2 = {workspace = true} -pallet-evm-precompile-bn128 = {workspace = true} -pallet-evm-precompile-dispatch = {workspace = true} -pallet-evm-precompile-modexp = {workspace = true} -pallet-evm-precompile-sha3fips = {workspace = true} -pallet-evm-precompile-simple = {workspace = true} +fp-evm = { workspace = true } +fp-rpc = { workspace = true } +fp-self-contained = { workspace = true, features = ["serde"] } +pallet-ethereum = { workspace = true, features = ["forbid-evm-reentrancy"] } +pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] } +pallet-evm-precompile-blake2 = { workspace = true } +pallet-evm-precompile-bn128 = { workspace = true } +pallet-evm-precompile-dispatch = { workspace = true } +pallet-evm-precompile-modexp = { workspace = true } +pallet-evm-precompile-sha3fips = { workspace = true } +pallet-evm-precompile-simple = { workspace = true } # Polkadot / XCM -orml-traits = {workspace = true} -orml-xcm-support = {workspace = true} -orml-xtokens = {workspace = true} -pallet-xcm = {workspace = true} -pallet-xcm-benchmarks = {workspace = true, optional = true} -polkadot-core-primitives = {workspace = true} -polkadot-parachain = {workspace = true} -polkadot-runtime-common = {workspace = true} -xcm = {workspace = true} -xcm-builder = {workspace = true} -xcm-executor = {workspace = true} +orml-traits = { workspace = true } +orml-xcm-support = { workspace = true } +orml-xtokens = { workspace = true } +pallet-xcm = { workspace = true } +pallet-xcm-benchmarks = { workspace = true, optional = true } +polkadot-core-primitives = { workspace = true } +polkadot-parachain = { workspace = true } +polkadot-runtime-common = { workspace = true } +xcm = { workspace = true } +xcm-builder = { workspace = true } +xcm-executor = { workspace = true } +pallet-message-queue = { workspace = true } # Cumulus -cumulus-pallet-dmp-queue = {workspace = true} -cumulus-pallet-parachain-system = {workspace = true} -cumulus-pallet-xcm = {workspace = true} -cumulus-pallet-xcmp-queue = {workspace = true} -cumulus-primitives-core = {workspace = true} -cumulus-primitives-timestamp = {workspace = true} -cumulus-primitives-utility = {workspace = true} -parachain-info = {workspace = true} +cumulus-pallet-dmp-queue = { workspace = true } +cumulus-pallet-parachain-system = { workspace = true } +cumulus-pallet-xcm = { workspace = true } +cumulus-pallet-xcmp-queue = { workspace = true } +cumulus-primitives-core = { workspace = true } +cumulus-primitives-timestamp = { workspace = true } +cumulus-primitives-utility = { workspace = true } +parachain-info = { workspace = true } +parachains-common = { workspace = true } # Moonkit -async-backing-primitives = {workspace = true} -moonkit-xcm-primitives = {workspace = true} -nimbus-primitives = {workspace = true} -pallet-author-inherent = {workspace = true} -pallet-author-slot-filter = {workspace = true} +async-backing-primitives = { workspace = true } +moonkit-xcm-primitives = { workspace = true } +nimbus-primitives = { workspace = true } +pallet-author-inherent = { workspace = true } +pallet-author-slot-filter = { workspace = true } # Benchmarking -frame-benchmarking = {workspace = true, optional = true} -frame-system-benchmarking = {workspace = true, optional = true} -frame-try-runtime = {workspace = true, optional = true} +frame-benchmarking = { workspace = true, optional = true } +frame-system-benchmarking = { workspace = true, optional = true } +frame-try-runtime = { workspace = true, optional = true } [dev-dependencies] -ethereum = {workspace = true} -frame-metadata = {workspace = true} -hex = {workspace = true, features = ["std"]} -sha3 = {workspace = true, features = ["std"]} +ethereum = { workspace = true } +frame-metadata = { workspace = true } +hex = { workspace = true, features = ["std"] } +sha3 = { workspace = true, features = ["std"] } -cumulus-primitives-parachain-inherent = {workspace = true} -cumulus-test-relay-sproof-builder = {workspace = true} +cumulus-primitives-parachain-inherent = { workspace = true } +cumulus-test-relay-sproof-builder = { workspace = true } -pallet-message-queue = {workspace = true} -polkadot-runtime-parachains = {workspace = true} -xcm-simulator = {workspace = true} +polkadot-runtime-parachains = { workspace = true } +xcm-simulator = { workspace = true } -precompile-utils = {workspace = true, features = ["std", "testing"]} +precompile-utils = { workspace = true, features = ["std", "testing"] } [build-dependencies] -substrate-wasm-builder = {workspace = true} +substrate-wasm-builder = { workspace = true } [features] default = ["std"] std = [ - "account/std", - "async-backing-primitives/std", - "cumulus-pallet-dmp-queue/std", - "cumulus-pallet-parachain-system/std", - "cumulus-pallet-xcm/std", - "cumulus-pallet-xcmp-queue/std", - "cumulus-primitives-core/std", - "cumulus-primitives-timestamp/std", - "evm-tracing-events/std", - "fp-evm/std", - "fp-rpc/std", - "fp-self-contained/std", - "frame-benchmarking/std", - "frame-executive/std", - "frame-support/std", - "frame-system-rpc-runtime-api/std", - "frame-system/std", - "moonbeam-core-primitives/std", - "moonbeam-evm-tracer/std", - "moonbeam-relay-encoder/std", - "moonbeam-rpc-primitives-debug/std", - "moonbeam-rpc-primitives-txpool/std", - "moonbeam-runtime-common/std", - "moonbeam-xcm-benchmarks/std", - "moonkit-xcm-primitives/std", - "nimbus-primitives/std", - "orml-xtokens/std", - "pallet-asset-manager/std", - "pallet-assets/std", - "pallet-author-inherent/std", - "pallet-author-mapping/std", - "pallet-author-slot-filter/std", - "pallet-balances/std", - "pallet-collective/std", - "pallet-conviction-voting/std", - "pallet-crowdloan-rewards/std", - "pallet-erc20-xcm-bridge/std", - "pallet-evm-chain-id/std", - "pallet-ethereum-xcm/std", - "pallet-ethereum/std", - "pallet-evm-precompile-author-mapping/std", - "pallet-evm-precompile-balances-erc20/std", - "pallet-evm-precompile-batch/std", - "pallet-evm-precompile-call-permit/std", - "pallet-evm-precompile-collective/std", - "pallet-evm-precompile-conviction-voting/std", - "pallet-evm-precompile-parachain-staking/std", - "pallet-evm-precompile-preimage/std", - "pallet-evm-precompile-randomness/std", - "pallet-evm-precompile-referenda/std", - "pallet-evm-precompile-xcm-transactor/std", - "pallet-evm-precompile-xcm-utils/std", - "pallet-evm-precompile-xtokens/std", - "pallet-evm/std", - "pallet-identity/std", - "pallet-maintenance-mode/std", - "pallet-migrations/std", - "pallet-moonbeam-lazy-migrations/std", - "pallet-moonbeam-orbiters/std", - "pallet-multisig/std", - "pallet-parachain-staking/std", - "pallet-preimage/std", - "pallet-proxy-genesis-companion/std", - "pallet-proxy/std", - "pallet-randomness/std", - "pallet-referenda/std", - "pallet-root-testing/std", - "pallet-scheduler/std", - "pallet-society/std", - "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-treasury/std", - "pallet-utility/std", - "pallet-whitelist/std", - "pallet-xcm-transactor/std", - "pallet-xcm/std", - "parachain-info/std", - "parity-scale-codec/std", - "precompile-utils/std", - "scale-info/std", - "session-keys-primitives/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-slots/std", - "sp-core/std", - "sp-inherents/std", - "sp-io/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", - "strum/std", - "xcm-builder/std", - "xcm-executor/std", - "xcm-primitives/std", - "xcm/std", + "account/std", + "async-backing-primitives/std", + "cumulus-pallet-dmp-queue/std", + "cumulus-pallet-parachain-system/std", + "cumulus-pallet-xcm/std", + "cumulus-pallet-xcmp-queue/std", + "cumulus-primitives-core/std", + "cumulus-primitives-timestamp/std", + "cumulus-primitives-utility/std", + "evm-tracing-events/std", + "fp-evm/std", + "fp-rpc/std", + "fp-self-contained/std", + "frame-benchmarking/std", + "frame-executive/std", + "frame-support/std", + "frame-system-rpc-runtime-api/std", + "frame-system/std", + "moonbeam-core-primitives/std", + "moonbeam-evm-tracer/std", + "moonbeam-relay-encoder/std", + "moonbeam-rpc-primitives-debug/std", + "moonbeam-rpc-primitives-txpool/std", + "moonbeam-runtime-common/std", + "moonbeam-xcm-benchmarks/std", + "moonkit-xcm-primitives/std", + "nimbus-primitives/std", + "orml-xtokens/std", + "pallet-asset-manager/std", + "pallet-assets/std", + "pallet-author-inherent/std", + "pallet-author-mapping/std", + "pallet-author-slot-filter/std", + "pallet-balances/std", + "pallet-collective/std", + "pallet-conviction-voting/std", + "pallet-crowdloan-rewards/std", + "pallet-erc20-xcm-bridge/std", + "pallet-evm-chain-id/std", + "pallet-ethereum-xcm/std", + "pallet-ethereum/std", + "pallet-evm-precompile-author-mapping/std", + "pallet-evm-precompile-balances-erc20/std", + "pallet-evm-precompile-batch/std", + "pallet-evm-precompile-call-permit/std", + "pallet-evm-precompile-collective/std", + "pallet-evm-precompile-conviction-voting/std", + "pallet-evm-precompile-parachain-staking/std", + "pallet-evm-precompile-preimage/std", + "pallet-evm-precompile-randomness/std", + "pallet-evm-precompile-referenda/std", + "pallet-evm-precompile-xcm-transactor/std", + "pallet-evm-precompile-xcm-utils/std", + "pallet-evm-precompile-xtokens/std", + "pallet-evm/std", + "pallet-identity/std", + "pallet-maintenance-mode/std", + "pallet-migrations/std", + "pallet-moonbeam-lazy-migrations/std", + "pallet-moonbeam-orbiters/std", + "pallet-multisig/std", + "pallet-parachain-staking/std", + "pallet-preimage/std", + "pallet-proxy-genesis-companion/std", + "pallet-proxy/std", + "pallet-randomness/std", + "pallet-referenda/std", + "pallet-root-testing/std", + "pallet-scheduler/std", + "pallet-society/std", + "pallet-timestamp/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", + "pallet-treasury/std", + "pallet-utility/std", + "pallet-whitelist/std", + "pallet-xcm-transactor/std", + "pallet-xcm/std", + "parachain-info/std", + "parachains-common/std", + "parity-scale-codec/std", + "precompile-utils/std", + "scale-info/std", + "session-keys-primitives/std", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-slots/std", + "sp-core/std", + "sp-inherents/std", + "sp-io/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-transaction-pool/std", + "sp-version/std", + "strum/std", + "xcm-builder/std", + "xcm-executor/std", + "xcm-primitives/std", + "xcm/std", ] # Must be enabled for tracing runtimes only @@ -302,72 +305,73 @@ runtime-wasm = [] on-chain-release-build = ["sp-api/disable-logging"] runtime-benchmarks = [ - "cumulus-pallet-parachain-system/runtime-benchmarks", - "frame-benchmarking", - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system-benchmarking/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "hex-literal", - "moonbeam-relay-encoder/runtime-benchmarks", - "moonbeam-runtime-common/runtime-benchmarks", - "moonbeam-xcm-benchmarks/runtime-benchmarks", - "pallet-asset-manager/runtime-benchmarks", - "pallet-assets/runtime-benchmarks", - "pallet-author-inherent/runtime-benchmarks", - "pallet-author-mapping/runtime-benchmarks", - "pallet-author-slot-filter/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-collective/runtime-benchmarks", - "pallet-conviction-voting/runtime-benchmarks", - "pallet-crowdloan-rewards/runtime-benchmarks", - "pallet-ethereum-xcm/runtime-benchmarks", - "pallet-ethereum/runtime-benchmarks", - "pallet-evm/runtime-benchmarks", - "pallet-identity/runtime-benchmarks", - "pallet-migrations/runtime-benchmarks", - "pallet-moonbeam-lazy-migrations/runtime-benchmarks", - "pallet-moonbeam-orbiters/runtime-benchmarks", - "pallet-multisig/runtime-benchmarks", - "pallet-parachain-staking/runtime-benchmarks", - "pallet-preimage/runtime-benchmarks", - "pallet-proxy/runtime-benchmarks", - "pallet-randomness/runtime-benchmarks", - "pallet-referenda/runtime-benchmarks", - "pallet-scheduler/runtime-benchmarks", - "pallet-society/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-treasury/runtime-benchmarks", - "pallet-utility/runtime-benchmarks", - "pallet-whitelist/runtime-benchmarks", - "pallet-xcm-benchmarks", - "pallet-xcm-transactor/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "session-keys-primitives/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "frame-benchmarking", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system-benchmarking/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "hex-literal", + "moonbeam-relay-encoder/runtime-benchmarks", + "moonbeam-runtime-common/runtime-benchmarks", + "moonbeam-xcm-benchmarks/runtime-benchmarks", + "parachains-common/runtime-benchmarks", + "pallet-asset-manager/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", + "pallet-author-inherent/runtime-benchmarks", + "pallet-author-mapping/runtime-benchmarks", + "pallet-author-slot-filter/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-collective/runtime-benchmarks", + "pallet-conviction-voting/runtime-benchmarks", + "pallet-crowdloan-rewards/runtime-benchmarks", + "pallet-ethereum-xcm/runtime-benchmarks", + "pallet-ethereum/runtime-benchmarks", + "pallet-evm/runtime-benchmarks", + "pallet-identity/runtime-benchmarks", + "pallet-migrations/runtime-benchmarks", + "pallet-moonbeam-lazy-migrations/runtime-benchmarks", + "pallet-moonbeam-orbiters/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "pallet-parachain-staking/runtime-benchmarks", + "pallet-preimage/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-randomness/runtime-benchmarks", + "pallet-referenda/runtime-benchmarks", + "pallet-scheduler/runtime-benchmarks", + "pallet-society/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "pallet-whitelist/runtime-benchmarks", + "pallet-xcm-benchmarks", + "pallet-xcm-transactor/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "session-keys-primitives/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", ] try-runtime = [ - "fp-self-contained/try-runtime", - "frame-executive/try-runtime", - "frame-system/try-runtime", - "frame-try-runtime", - "moonbeam-runtime-common/try-runtime", - "pallet-asset-manager/try-runtime", - "pallet-author-mapping/try-runtime", - "pallet-author-slot-filter/try-runtime", - "pallet-balances/try-runtime", - "pallet-collective/try-runtime", - "pallet-conviction-voting/try-runtime", - "pallet-maintenance-mode/try-runtime", - "pallet-migrations/try-runtime", - "pallet-moonbeam-lazy-migrations/try-runtime", - "pallet-parachain-staking/try-runtime", - "pallet-preimage/try-runtime", - "pallet-referenda/try-runtime", - "pallet-root-testing/try-runtime", - "pallet-scheduler/try-runtime", - "pallet-society/try-runtime", - "pallet-timestamp/try-runtime", - "pallet-whitelist/try-runtime", + "fp-self-contained/try-runtime", + "frame-executive/try-runtime", + "frame-system/try-runtime", + "frame-try-runtime", + "moonbeam-runtime-common/try-runtime", + "pallet-asset-manager/try-runtime", + "pallet-author-mapping/try-runtime", + "pallet-author-slot-filter/try-runtime", + "pallet-balances/try-runtime", + "pallet-collective/try-runtime", + "pallet-conviction-voting/try-runtime", + "pallet-maintenance-mode/try-runtime", + "pallet-migrations/try-runtime", + "pallet-moonbeam-lazy-migrations/try-runtime", + "pallet-parachain-staking/try-runtime", + "pallet-preimage/try-runtime", + "pallet-referenda/try-runtime", + "pallet-root-testing/try-runtime", + "pallet-scheduler/try-runtime", + "pallet-society/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-whitelist/try-runtime", ] diff --git a/runtime/moonriver/src/lib.rs b/runtime/moonriver/src/lib.rs index 658dff94a9..6a194db06b 100644 --- a/runtime/moonriver/src/lib.rs +++ b/runtime/moonriver/src/lib.rs @@ -30,10 +30,10 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); use account::AccountId20; use cumulus_pallet_parachain_system::{RelayChainStateProof, RelaychainDataProvider}; -use cumulus_primitives_core::relay_chain; use fp_rpc::TransactionStatus; // Re-export required by get! macro. +use cumulus_primitives_core::{relay_chain, AggregateMessageOrigin}; #[cfg(feature = "std")] pub use fp_evm::GenesisAccount; pub use frame_support::traits::Get; @@ -97,7 +97,6 @@ use sp_runtime::{ }; use sp_std::{convert::TryFrom, prelude::*}; -use cumulus_primitives_core::{relay_chain::BlockNumber as RelayBlockNumber, DmpMessageHandler}; use smallvec::smallvec; #[cfg(feature = "std")] use sp_version::NativeVersion; @@ -149,7 +148,7 @@ pub mod currency { /// Maximum weight per block pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND, u64::MAX) .saturating_div(2) - .set_proof_size(cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64); + .set_proof_size(relay_chain::MAX_POV_SIZE as u64); pub const MILLISECS_PER_BLOCK: u64 = 12000; pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); @@ -251,6 +250,8 @@ impl frame_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. type RuntimeOrigin = RuntimeOrigin; + /// The aggregated RuntimeTask type. + type RuntimeTask = RuntimeTask; /// Maximum number of block number to block hash mappings to keep (oldest pruned first). type BlockHashCount = ConstU32<256>; /// Maximum weight of each block. With a default weight system of 1byte == 1weight, 4mb is ok. @@ -302,7 +303,6 @@ impl pallet_balances::Config for Runtime { type MaxFreezes = ConstU32<0>; type RuntimeHoldReason = RuntimeHoldReason; type RuntimeFreezeReason = RuntimeFreezeReason; - type MaxHolds = ConstU32<1>; type WeightInfo = moonbeam_weights::pallet_balances::WeightInfo; } @@ -593,6 +593,15 @@ impl pallet_treasury::Config for Runtime { type BenchmarkHelper = BenchmarkHelper; } +parameter_types! { + pub const MaxSubAccounts: u32 = 100; + pub const MaxAdditionalFields: u32 = 100; + pub const MaxRegistrars: u32 = 20; + pub const PendingUsernameExpiration: u32 = 7 * DAYS; + pub const MaxSuffixLength: u32 = 7; + pub const MaxUsernameLength: u32 = 32; +} + type IdentityForceOrigin = EitherOfDiverse, governance::custom_origins::GeneralAdmin>; type IdentityRegistrarOrigin = @@ -603,18 +612,22 @@ impl pallet_identity::Config for Runtime { type Currency = Balances; // Add one item in storage and take 258 bytes type BasicDeposit = ConstU128<{ currency::deposit(1, 258) }>; - // Not add any item to the storage but takes 66 bytes - type FieldDeposit = ConstU128<{ currency::deposit(0, 66) }>; + // Does not add any item to the storage but takes 1 bytes + type ByteDeposit = ConstU128<{ currency::deposit(0, 1) }>; // Add one item in storage and take 53 bytes type SubAccountDeposit = ConstU128<{ currency::deposit(1, 53) }>; - type MaxSubAccounts = ConstU32<100>; - type MaxAdditionalFields = ConstU32<100>; - type IdentityInformation = pallet_identity::simple::IdentityInfo; - - type MaxRegistrars = ConstU32<20>; + type MaxSubAccounts = MaxSubAccounts; + type IdentityInformation = pallet_identity::legacy::IdentityInfo; + type MaxRegistrars = MaxRegistrars; type Slashed = Treasury; type ForceOrigin = IdentityForceOrigin; type RegistrarOrigin = IdentityRegistrarOrigin; + type OffchainSignature = Signature; + type SigningPublicKey = ::Signer; + type UsernameAuthorityOrigin = EnsureRoot; + type PendingUsernameExpiration = PendingUsernameExpiration; + type MaxSuffixLength = MaxSuffixLength; + type MaxUsernameLength = MaxUsernameLength; type WeightInfo = moonbeam_weights::pallet_identity::WeightInfo; } @@ -682,19 +695,21 @@ impl pallet_ethereum_xcm::Config for Runtime { parameter_types! { pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; } impl cumulus_pallet_parachain_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OnSystemEvent = (); type SelfParaId = ParachainInfo; - type DmpMessageHandler = MaintenanceMode; type ReservedDmpWeight = ReservedDmpWeight; type OutboundXcmpMessageSource = XcmpQueue; type XcmpMessageHandler = XcmpQueue; type ReservedXcmpWeight = ReservedXcmpWeight; type CheckAssociatedRelayNumber = cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; type ConsensusHook = cumulus_pallet_parachain_system::ExpectParentIncluded; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; + type WeightInfo = cumulus_pallet_parachain_system::weights::SubstrateWeight; } impl parachain_info::Config for Runtime {} @@ -1182,34 +1197,6 @@ impl moonkit_xcm_primitives::PauseXcmExecution for XcmExecutionManager { } } -pub struct NormalDmpHandler; -impl DmpMessageHandler for NormalDmpHandler { - // This implementation makes messages be queued - // Since the limit is 0, messages are queued for next iteration - fn handle_dmp_messages( - iter: impl Iterator)>, - limit: Weight, - ) -> Weight { - (if Migrations::should_pause_xcm() { - DmpQueue::handle_dmp_messages(iter, Weight::zero()) - } else { - DmpQueue::handle_dmp_messages(iter, limit) - }) + ::DbWeight::get().reads(1) - } -} - -pub struct MaintenanceDmpHandler; -impl DmpMessageHandler for MaintenanceDmpHandler { - // This implementation makes messages be queued - // Since the limit is 0, messages are queued for next iteration - fn handle_dmp_messages( - iter: impl Iterator)>, - _limit: Weight, - ) -> Weight { - DmpQueue::handle_dmp_messages(iter, Weight::zero()) - } -} - /// The hooks we wantt to run in Maintenance Mode pub struct MaintenanceHooks; @@ -1261,12 +1248,6 @@ impl pallet_maintenance_mode::Config for Runtime { type MaintenanceOrigin = pallet_collective::EnsureProportionAtLeast; type XcmExecutionManager = XcmExecutionManager; - type NormalDmpHandler = NormalDmpHandler; - type MaintenanceDmpHandler = MaintenanceDmpHandler; - // We use AllPalletsWithSystem because we dont want to change the hooks in normal - // operation - type NormalExecutiveHooks = AllPalletsWithSystem; - type MaintenanceExecutiveHooks = MaintenanceHooks; } impl pallet_proxy_genesis_companion::Config for Runtime { @@ -1357,7 +1338,9 @@ impl pallet_randomness::Config for Runtime { type WeightInfo = moonbeam_weights::pallet_randomness::WeightInfo; } -impl pallet_root_testing::Config for Runtime {} +impl pallet_root_testing::Config for Runtime { + type RuntimeEvent = RuntimeEvent; +} parameter_types! { // One storage item; key size is 32 + 20; value is size 4+4+16+20 bytes = 44 bytes. @@ -1386,7 +1369,7 @@ construct_runtime! { // Previously 2: pallet_randomness_collective_flip Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, - RootTesting: pallet_root_testing::{Pallet, Call, Storage} = 5, + RootTesting: pallet_root_testing::{Pallet, Call, Storage, Event} = 5, // Monetary stuff. Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, @@ -1451,6 +1434,7 @@ construct_runtime! { // Previously 108: pallet_assets:: EthereumXcm: pallet_ethereum_xcm::{Pallet, Call, Storage, Origin} = 109, Erc20XcmBridge: pallet_erc20_xcm_bridge::{Pallet} = 110, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 111, // Randomness Randomness: pallet_randomness::{Pallet, Call, Storage, Event, Inherent} = 120, @@ -1526,7 +1510,7 @@ pub type Executive = frame_executive::Executive< Block, frame_system::ChainContext, Runtime, - pallet_maintenance_mode::ExecutiveHooks, + AllPalletsWithSystem, >; // All of our runtimes share most of their Runtime API implementations. @@ -1734,7 +1718,7 @@ mod tests { Balance::from(1 * MOVR + 25800 * MICROMOVR) ); assert_eq!( - get!(pallet_identity, FieldDeposit, u128), + get!(pallet_identity, ByteDeposit, u128), Balance::from(6600 * MICROMOVR) ); assert_eq!( diff --git a/runtime/moonriver/src/precompiles.rs b/runtime/moonriver/src/precompiles.rs index 8b8282f5a8..3781fd8685 100644 --- a/runtime/moonriver/src/precompiles.rs +++ b/runtime/moonriver/src/precompiles.rs @@ -29,7 +29,7 @@ use pallet_evm_precompile_collective::CollectivePrecompile; use pallet_evm_precompile_conviction_voting::ConvictionVotingPrecompile; use pallet_evm_precompile_crowdloan_rewards::CrowdloanRewardsPrecompile; use pallet_evm_precompile_gmp::GmpPrecompile; -use pallet_evm_precompile_identity::IdentityPrecompile; +// TODO(RODRIGO) use pallet_evm_precompile_identity::IdentityPrecompile; use pallet_evm_precompile_modexp::Modexp; use pallet_evm_precompile_parachain_staking::ParachainStakingPrecompile; use pallet_evm_precompile_preimage::PreimagePrecompile; @@ -221,11 +221,12 @@ type MoonriverPrecompilesAt = ( XcmTransactorPrecompileV3, (CallableByContract, CallableByPrecompile), >, - PrecompileAt< - AddressU64<2072>, - IdentityPrecompile, - (CallableByContract, CallableByPrecompile), - >, + // TODO(RODRIGO) + // PrecompileAt< + // AddressU64<2072>, + // IdentityPrecompile, + // (CallableByContract, CallableByPrecompile), + // >, ); /// The PrecompileSet installed in the Moonriver runtime. diff --git a/runtime/moonriver/src/xcm_config.rs b/runtime/moonriver/src/xcm_config.rs index 394737f06c..6474801ad6 100644 --- a/runtime/moonriver/src/xcm_config.rs +++ b/runtime/moonriver/src/xcm_config.rs @@ -19,13 +19,14 @@ use super::{ governance, AccountId, AssetId, AssetManager, Assets, Balance, Balances, DealWithFees, - Erc20XcmBridge, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, - RuntimeEvent, RuntimeOrigin, Treasury, XcmpQueue, + Erc20XcmBridge, MaintenanceMode, MessageQueue, ParachainInfo, ParachainSystem, Perbill, + PolkadotXcm, Runtime, RuntimeBlockWeights, RuntimeCall, RuntimeEvent, RuntimeOrigin, Treasury, + XcmpQueue, }; use frame_support::{ parameter_types, - traits::{EitherOfDiverse, Everything, Nothing, PalletInfoAccess}, + traits::{EitherOfDiverse, Everything, Nothing, PalletInfoAccess, TransformOrigin}, }; use moonbeam_runtime_common::weights as moonbeam_weights; use pallet_evm_precompileset_assets_erc20::AccountIdAssetIdConversion; @@ -40,25 +41,28 @@ use sp_core::{ConstU32, H160, H256}; use xcm_builder::{ AccountKey20Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, ConvertedConcreteId, CurrencyAdapter as XcmCurrencyAdapter, - DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FungiblesAdapter, HashedDescription, + AllowTopLevelPaidExecutionFrom, ConvertedConcreteId, DescribeAllTerminal, DescribeFamily, + EnsureXcmOrigin, FungibleAdapter as XcmCurrencyAdapter, FungiblesAdapter, HashedDescription, NoChecking, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountKey20AsNative, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, WithComputedOrigin, }; +use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; use xcm::latest::prelude::*; use xcm_executor::traits::{CallDispatcher, ConvertLocation, JustTry}; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use orml_xcm_support::MultiNativeAsset; use xcm_primitives::{ - AbsoluteAndRelativeReserve, AccountIdToCurrencyId, AccountIdToMultiLocation, AsAssetType, + AbsoluteAndRelativeReserve, AccountIdToCurrencyId, AccountIdToLocation, AsAssetType, FirstAssetTrader, SignedToAccountId20, UtilityAvailableCalls, UtilityEncodeCall, XcmTransact, }; use parity_scale_codec::{Decode, Encode}; use scale_info::TypeInfo; +use sp_core::Get; use sp_std::{ convert::{From, Into, TryFrom}, prelude::*, @@ -74,22 +78,22 @@ parameter_types! { // The relay chain Origin type pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); // The universal location within the global consensus system - pub UniversalLocation: InteriorMultiLocation = - X2(GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())); + pub UniversalLocation: InteriorLocation = + [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())].into(); // Self Reserve location, defines the multilocation identifiying the self-reserve currency // This is used to match it also against our Balances pallet when we receive such - // a MultiLocation: (Self Balances pallet index) + // a Location: (Self Balances pallet index) // We use the RELATIVE multilocation - pub SelfReserve: MultiLocation = MultiLocation { + pub SelfReserve: Location = Location { parents:0, - interior: Junctions::X1( + interior: [ PalletInstance(::index() as u8) - ) + ].into() }; } -/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used +/// Type for specifying how a `Location` can be converted into an `AccountId`. This is used /// when determining ownership of accounts for asset transacting and when attempting to use XCM /// `Transact` in order to determine the dispatch Origin. pub type LocationToAccountId = ( @@ -97,7 +101,7 @@ pub type LocationToAccountId = ( ParentIsPreset, // Sibling parachain origins convert to AccountId via the `ParaId::into`. SiblingParachainConvertsVia, - // If we receive a MultiLocation of type AccountKey20, just generate a native account + // If we receive a Location of type AccountKey20, just generate a native account AccountKey20Aliases, // Generate remote accounts according to polkadot standards HashedDescription>, @@ -106,7 +110,7 @@ pub type LocationToAccountId = ( /// Wrapper type around `LocationToAccountId` to convert an `AccountId` to type `H160`. pub struct LocationToH160; impl ConvertLocation for LocationToH160 { - fn convert_location(location: &MultiLocation) -> Option { + fn convert_location(location: &Location) -> Option { >::convert_location(location) .map(Into::into) } @@ -126,7 +130,7 @@ pub type ForeignFungiblesTransactor = FungiblesAdapter< JustTry, >, ), - // Do a simple punn to convert an AccountId20 MultiLocation into a native chain account ID: + // Do a simple punn to convert an AccountId20 Location into a native chain account ID: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, @@ -305,14 +309,15 @@ impl xcm_executor::Config for XcmExecutorConfig { type UniversalAliases = Nothing; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; + type TransactionalProcessor = xcm_builder::FrameTransactionalProcessor; } type XcmExecutor = pallet_erc20_xcm_bridge::XcmExecutorWrapper< - RuntimeCall, + XcmExecutorConfig, xcm_executor::XcmExecutor, >; -// Converts a Signed Local Origin into a MultiLocation +// Converts a Signed Local Origin into a Location pub type LocalOriginToLocation = SignedToAccountId20; /// The means for routing XCM messages which are not for local execution into the right message @@ -326,7 +331,7 @@ pub type XcmRouter = ( #[cfg(feature = "runtime-benchmarks")] parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); + pub ReachableDest: Option = Some(Parent.into()); } impl pallet_xcm::Config for Runtime { @@ -365,10 +370,10 @@ impl cumulus_pallet_xcm::Config for Runtime { impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRoot; + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = EnsureRoot; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = moonbeam_weights::cumulus_pallet_xcmp_queue::WeightInfo; @@ -377,30 +382,64 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { >; } +parameter_types! { + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; +} + +// TODO: This pallet can be removed after the lazy migration is done and event `Completed` is emitted. +// https://github.com/paritytech/polkadot-sdk/pull/1246 impl cumulus_pallet_dmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRoot; + type DmpSink = frame_support::traits::EnqueueWithOrigin; + type WeightInfo = cumulus_pallet_dmp_queue::weights::SubstrateWeight; +} + +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(25) * RuntimeBlockWeights::get().max_block; + // TODO: describe + pub const MessageQueueMaxStale: u32 = 8; + // TODO: describe + pub const MessageQueueHeapSize: u32 = 64 * 1024; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + #[cfg(feature = "runtime-benchmarks")] + type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor< + cumulus_primitives_core::AggregateMessageOrigin, + >; + #[cfg(not(feature = "runtime-benchmarks"))] + type MessageProcessor = + xcm_builder::ProcessXcmMessage; + type Size = u32; + type HeapSize = MessageQueueHeapSize; + type MaxStale = MessageQueueMaxStale; + type ServiceWeight = MessageQueueServiceWeight; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + // NarrowOriginToSibling calls XcmpQueue's is_pause if Origin is sibling. Allows all other origins + type QueuePausedQuery = (MaintenanceMode, NarrowOriginToSibling); + type WeightInfo = pallet_message_queue::weights::SubstrateWeight; } // Our AssetType. For now we only handle Xcm Assets #[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] pub enum AssetType { - Xcm(MultiLocation), + Xcm(Location), } impl Default for AssetType { fn default() -> Self { - Self::Xcm(MultiLocation::here()) + Self::Xcm(Location::here()) } } -impl From for AssetType { - fn from(location: MultiLocation) -> Self { +impl From for AssetType { + fn from(location: Location) -> Self { Self::Xcm(location) } } -impl Into> for AssetType { - fn into(self) -> Option { +impl Into> for AssetType { + fn into(self) -> Option { match self { Self::Xcm(location) => Some(location), } @@ -454,14 +493,14 @@ impl AccountIdToCurrencyId for Runtime { } } -// How to convert from CurrencyId to MultiLocation -pub struct CurrencyIdtoMultiLocation(sp_std::marker::PhantomData); -impl sp_runtime::traits::Convert> - for CurrencyIdtoMultiLocation +// How to convert from CurrencyId to Location +pub struct CurrencyIdToLocation(sp_std::marker::PhantomData); +impl sp_runtime::traits::Convert> + for CurrencyIdToLocation where - AssetXConverter: MaybeEquivalence, + AssetXConverter: MaybeEquivalence, { - fn convert(currency: CurrencyId) -> Option { + fn convert(currency: CurrencyId) -> Option { match currency { // For now and until Xtokens is adapted to handle 0.9.16 version we use // the old anchoring here @@ -469,7 +508,7 @@ where // chain does not change // TODO! change this to NewAnchoringSelfReserve once xtokens is adapted for it CurrencyId::SelfReserve => { - let multi: MultiLocation = SelfReserve::get(); + let multi: Location = SelfReserve::get(); Some(multi) } CurrencyId::ForeignAsset(asset) => AssetXConverter::convert_back(&asset), @@ -494,19 +533,19 @@ parameter_types! { // This is how we are going to detect whether the asset is a Reserve asset // This however is the chain part only - pub SelfLocation: MultiLocation = MultiLocation::here(); + pub SelfLocation: Location = Location::here(); // We need this to be able to catch when someone is trying to execute a non- // cross-chain transfer in xtokens through the absolute path way - pub SelfLocationAbsolute: MultiLocation = MultiLocation { + pub SelfLocationAbsolute: Location = Location { parents:1, - interior: Junctions::X1( + interior: [ Parachain(ParachainInfo::parachain_id().into()) - ) + ].into() }; } parameter_type_with_key! { - pub ParachainMinFee: |location: MultiLocation| -> Option { + pub ParachainMinFee: |location: Location| -> Option { match (location.parents, location.first_interior()) { // Kusama AssetHub fee (1, Some(Parachain(1000u32))) => Some(50_000_000u128), @@ -519,9 +558,8 @@ impl orml_xtokens::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = AccountIdToMultiLocation; - type CurrencyIdConvert = - CurrencyIdtoMultiLocation>; + type AccountIdToLocation = AccountIdToLocation; + type CurrencyIdConvert = CurrencyIdToLocation>; type XcmExecutor = XcmExecutor; type SelfLocation = SelfLocation; type Weigher = XcmWeigher; @@ -529,13 +567,13 @@ impl orml_xtokens::Config for Runtime { type UniversalLocation = UniversalLocation; type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; - type MultiLocationsFilter = Everything; + type LocationsFilter = Everything; type ReserveProvider = AbsoluteAndRelativeReserve; } // 1 KSM should be enough parameter_types! { - pub MaxHrmpRelayFee: MultiAsset = (MultiLocation::parent(), 1_000_000_000_000u128).into(); + pub MaxHrmpRelayFee: Asset = (Location::parent(), 1_000_000_000_000u128).into(); } // For now we only allow to transact in the relay, although this might change in the future @@ -576,9 +614,9 @@ impl UtilityEncodeCall for Transactors { } impl XcmTransact for Transactors { - fn destination(self) -> MultiLocation { + fn destination(self) -> Location { match self { - Transactors::Relay => MultiLocation::parent(), + Transactors::Relay => Location::parent(), } } } @@ -593,9 +631,8 @@ impl pallet_xcm_transactor::Config for Runtime { type DerivativeAddressRegistrationOrigin = DerivativeAddressRegistrationOrigin; type SovereignAccountDispatcherOrigin = EnsureRoot; type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = AccountIdToMultiLocation; - type CurrencyIdToMultiLocation = - CurrencyIdtoMultiLocation>; + type AccountIdToLocation = AccountIdToLocation; + type CurrencyIdToLocation = CurrencyIdToLocation>; type XcmSender = XcmRouter; type SelfLocation = SelfLocation; type Weigher = XcmWeigher; @@ -612,11 +649,11 @@ parameter_types! { // This is the relative view of erc20 assets. // Identified by this prefix + AccountKey20(contractAddress) // We use the RELATIVE multilocation - pub Erc20XcmBridgePalletLocation: MultiLocation = MultiLocation { + pub Erc20XcmBridgePalletLocation: Location = Location { parents:0, - interior: Junctions::X1( + interior: [ PalletInstance(::index() as u8) - ) + ].into() }; // To be able to support almost all erc20 implementations, @@ -637,8 +674,8 @@ mod testing { /// This From exists for benchmarking purposes. It has the potential side-effect of calling /// AssetManager::set_asset_type_asset_id() and should NOT be used in any production code. - impl From for CurrencyId { - fn from(location: MultiLocation) -> CurrencyId { + impl From for CurrencyId { + fn from(location: Location) -> CurrencyId { use xcm_primitives::AssetTypeGetter; // If it does not exist, for benchmarking purposes, we create the association diff --git a/runtime/moonriver/tests/integration_test.rs b/runtime/moonriver/tests/integration_test.rs index 641153c72f..b13680196d 100644 --- a/runtime/moonriver/tests/integration_test.rs +++ b/runtime/moonriver/tests/integration_test.rs @@ -62,7 +62,7 @@ use sp_runtime::{ }; use std::str::from_utf8; use xcm::latest::prelude::*; -use xcm::{VersionedMultiAssets, VersionedMultiLocation}; +use xcm::{VersionedAssets, VersionedLocation}; use xcm_builder::{ParentIsPreset, SiblingParachainConvertsVia}; use xcm_executor::traits::ConvertLocation; @@ -1553,7 +1553,7 @@ fn root_can_change_default_xcm_vers() { (AccountId::from(BOB), 1_000 * MOVR), ]) .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1565,8 +1565,8 @@ fn root_can_change_default_xcm_vers() { }]) .build() .execute_with(|| { - let source_location = AssetType::Xcm(MultiLocation::parent()); - let dest = MultiLocation { + let source_location = AssetType::Xcm(Location::parent()); + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -1581,7 +1581,7 @@ fn root_can_change_default_xcm_vers() { origin_of(AccountId::from(ALICE)), CurrencyId::ForeignAsset(source_id), 100_000_000_000_000, - Box::new(xcm::VersionedMultiLocation::V3(dest.clone())), + Box::new(xcm::VersionedLocation::V3(dest.clone())), WeightLimit::Limited(4000000000.into()) ), orml_xtokens::Error::::XcmExecutionFailed @@ -1598,7 +1598,7 @@ fn root_can_change_default_xcm_vers() { origin_of(AccountId::from(ALICE)), CurrencyId::ForeignAsset(source_id), 100_000_000_000_000, - Box::new(xcm::VersionedMultiLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V3(dest)), WeightLimit::Limited(4000000000.into()) )); }) @@ -1607,7 +1607,7 @@ fn root_can_change_default_xcm_vers() { #[test] fn asset_can_be_registered() { ExtBuilder::default().build().execute_with(|| { - let source_location = AssetType::Xcm(MultiLocation::parent()); + let source_location = AssetType::Xcm(Location::parent()); let source_id: moonriver_runtime::AssetId = source_location.clone().into(); let asset_metadata = AssetRegistrarMetadata { name: b"RelayToken".to_vec(), @@ -1630,7 +1630,7 @@ fn asset_can_be_registered() { fn xcm_asset_erc20_precompiles_supply_and_balance() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1647,7 +1647,7 @@ fn xcm_asset_erc20_precompiles_supply_and_balance() { .build() .execute_with(|| { // We have the assetId that corresponds to the relay chain registered - let relay_asset_id: AssetId = AssetType::Xcm(MultiLocation::parent()).into(); + let relay_asset_id: AssetId = AssetType::Xcm(Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1688,7 +1688,7 @@ fn xcm_asset_erc20_precompiles_supply_and_balance() { fn xcm_asset_erc20_precompiles_transfer() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1705,7 +1705,7 @@ fn xcm_asset_erc20_precompiles_transfer() { .build() .execute_with(|| { // We have the assetId that corresponds to the relay chain registered - let relay_asset_id: AssetId = AssetType::Xcm(MultiLocation::parent()).into(); + let relay_asset_id: AssetId = AssetType::Xcm(Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1752,7 +1752,7 @@ fn xcm_asset_erc20_precompiles_transfer() { fn xcm_asset_erc20_precompiles_approve() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1769,7 +1769,7 @@ fn xcm_asset_erc20_precompiles_approve() { .build() .execute_with(|| { // We have the assetId that corresponds to the relay chain registered - let relay_asset_id: AssetId = AssetType::Xcm(MultiLocation::parent()).into(); + let relay_asset_id: AssetId = AssetType::Xcm(Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1837,7 +1837,7 @@ fn xcm_asset_erc20_precompiles_approve() { fn xtokens_precompiles_transfer() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1858,7 +1858,7 @@ fn xtokens_precompiles_transfer() { // We have the assetId that corresponds to the relay chain registered let relay_asset_id: moonriver_runtime::AssetId = - AssetType::Xcm(MultiLocation::parent()).into(); + AssetType::Xcm(Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1867,7 +1867,7 @@ fn xtokens_precompiles_transfer() { ); // Alice has 1000 tokens. She should be able to send through precompile - let destination = MultiLocation::new( + let destination = Location::new( 1, Junctions::X1(Junction::AccountId32 { network: None, @@ -1897,7 +1897,7 @@ fn xtokens_precompiles_transfer() { fn xtokens_precompiles_transfer_multiasset() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1917,7 +1917,7 @@ fn xtokens_precompiles_transfer_multiasset() { let xtokens_precompile_address = H160::from_low_u64_be(2052); // Alice has 1000 tokens. She should be able to send through precompile - let destination = MultiLocation::new( + let destination = Location::new( 1, Junctions::X1(Junction::AccountId32 { network: None, @@ -1933,7 +1933,7 @@ fn xtokens_precompiles_transfer_multiasset() { xtokens_precompile_address, XtokensPCall::transfer_multiasset { // We want to transfer the relay token - asset: MultiLocation::parent(), + asset: Location::parent(), amount: 500_000_000_000_000u128.into(), destination, weight: 4_000_000, @@ -1959,14 +1959,14 @@ fn make_sure_polkadot_xcm_cannot_be_called() { )]) .build() .execute_with(|| { - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, id: [1u8; 32], }), }; - let multiassets: MultiAssets = [MultiAsset { + let multiassets: Assets = [Asset { id: Concrete(moonriver_runtime::xcm_config::SelfLocation::get()), fun: Fungible(1000), }] @@ -1974,9 +1974,9 @@ fn make_sure_polkadot_xcm_cannot_be_called() { .into(); assert_noop!( RuntimeCall::PolkadotXcm(pallet_xcm::Call::::reserve_transfer_assets { - dest: Box::new(VersionedMultiLocation::V3(dest.clone())), - beneficiary: Box::new(VersionedMultiLocation::V3(dest)), - assets: Box::new(VersionedMultiAssets::V3(multiassets)), + dest: Box::new(VersionedLocation::V3(dest.clone())), + beneficiary: Box::new(VersionedLocation::V3(dest)), + assets: Box::new(VersionedAssets::V3(multiassets)), fee_asset_item: 0, }) .dispatch(::RuntimeOrigin::signed( @@ -1995,7 +1995,7 @@ fn transactor_cannot_use_more_than_max_weight() { (AccountId::from(BOB), 1_000 * MOVR), ]) .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -2007,7 +2007,7 @@ fn transactor_cannot_use_more_than_max_weight() { }]) .build() .execute_with(|| { - let source_location = AssetType::Xcm(MultiLocation::parent()); + let source_location = AssetType::Xcm(Location::parent()); let source_id: moonriver_runtime::AssetId = source_location.clone().into(); assert_ok!(XcmTransactor::register( root_origin(), @@ -2018,7 +2018,7 @@ fn transactor_cannot_use_more_than_max_weight() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( root_origin(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000.into(), @@ -2028,7 +2028,7 @@ fn transactor_cannot_use_more_than_max_weight() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( root_origin(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), 1 )); @@ -2038,9 +2038,9 @@ fn transactor_cannot_use_more_than_max_weight() { moonriver_runtime::xcm_config::Transactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new( - xcm::VersionedMultiLocation::V3(MultiLocation::parent()) - )), + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() + ))), fee_amount: None }, vec![], @@ -2086,9 +2086,9 @@ fn transact_through_signed_precompile_works_v2() { .build() .execute_with(|| { // Destination - let dest = MultiLocation::parent(); + let dest = Location::parent(); - let fee_payer_asset = MultiLocation::parent(); + let fee_payer_asset = Location::parent(); let bytes = vec![1u8, 2u8, 3u8]; @@ -2126,9 +2126,9 @@ fn transact_through_signed_cannot_send_to_local_chain() { .build() .execute_with(|| { // Destination - let dest = MultiLocation::here(); + let dest = Location::here(); - let fee_payer_asset = MultiLocation::parent(); + let fee_payer_asset = Location::parent(); let bytes = vec![1u8, 2u8, 3u8]; @@ -2167,7 +2167,7 @@ fn call_xtokens_with_fee() { ]) .with_safe_xcm_version(2) .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(MultiLocation::parent()), + asset_type: AssetType::Xcm(Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -2179,8 +2179,8 @@ fn call_xtokens_with_fee() { }]) .build() .execute_with(|| { - let source_location = AssetType::Xcm(MultiLocation::parent()); - let dest = MultiLocation { + let source_location = AssetType::Xcm(Location::parent()); + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -2197,7 +2197,7 @@ fn call_xtokens_with_fee() { CurrencyId::ForeignAsset(source_id), 100_000_000_000_000, 100, - Box::new(xcm::VersionedMultiLocation::V3(dest.clone())), + Box::new(xcm::VersionedLocation::V3(dest.clone())), WeightLimit::Limited(4000000000.into()) ),); @@ -2212,7 +2212,7 @@ fn test_xcm_utils_ml_tp_account() { ExtBuilder::default().build().execute_with(|| { let xcm_utils_precompile_address = H160::from_low_u64_be(2060); let expected_address_parent: H160 = - ParentIsPreset::::convert_location(&MultiLocation::parent()) + ParentIsPreset::::convert_location(&Location::parent()) .unwrap() .into(); @@ -2221,14 +2221,14 @@ fn test_xcm_utils_ml_tp_account() { ALICE, xcm_utils_precompile_address, XcmUtilsPCall::multilocation_to_address { - multilocation: MultiLocation::parent(), + multilocation: Location::parent(), }, ) .expect_cost(1000) .expect_no_logs() .execute_returns(Address(expected_address_parent)); - let parachain_2000_multilocation = MultiLocation::new(1, X1(Parachain(2000))); + let parachain_2000_multilocation = Location::new(1, X1(Parachain(2000))); let expected_address_parachain: H160 = SiblingParachainConvertsVia::::convert_location( ¶chain_2000_multilocation, @@ -2248,7 +2248,7 @@ fn test_xcm_utils_ml_tp_account() { .expect_no_logs() .execute_returns(Address(expected_address_parachain)); - let alice_in_parachain_2000_multilocation = MultiLocation::new( + let alice_in_parachain_2000_multilocation = Location::new( 1, X2( Parachain(2000), diff --git a/runtime/moonriver/tests/xcm_mock/parachain.rs b/runtime/moonriver/tests/xcm_mock/parachain.rs index f6f1843fc8..c3c27c9e6e 100644 --- a/runtime/moonriver/tests/xcm_mock/parachain.rs +++ b/runtime/moonriver/tests/xcm_mock/parachain.rs @@ -45,7 +45,7 @@ use polkadot_parachain::primitives::{Id as ParaId, Sibling}; use xcm::latest::{ AssetId as XcmAssetId, Error as XcmError, ExecuteXcm, Junction::{PalletInstance, Parachain}, - Junctions, MultiLocation, NetworkId, Outcome, Xcm, + Junctions, Location, NetworkId, Outcome, Xcm, }; use xcm_builder::{ AccountKey20Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, @@ -77,6 +77,7 @@ parameter_types! { impl frame_system::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type Hash = H256; @@ -118,7 +119,6 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } @@ -171,7 +171,7 @@ impl pallet_assets::Config for Runtime { } } -/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used +/// Type for specifying how a `Location` can be converted into an `AccountId`. This is used /// when determining ownership of accounts for asset transacting and when attempting to use XCM /// `Transact` in order to determine the dispatch Origin. pub type LocationToAccountId = ( @@ -224,7 +224,7 @@ pub type ForeignFungiblesTransactor = FungiblesAdapter< JustTry, >, ), - // Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID: + // Do a simple punn to convert an AccountId32 Location into a native chain account ID: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, @@ -303,12 +303,12 @@ parameter_types! { parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Polkadot; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub UniversalLocation: InteriorMultiLocation = + pub UniversalLocation: InteriorLocation = X2(GlobalConsensus(RelayNetwork::get()), Parachain(MsgQueue::parachain_id().into())); - // This is used to match it against our Balances pallet when we receive such a MultiLocation + // This is used to match it against our Balances pallet when we receive such a Location // (Parent, Self Para Id, Self Balances pallet index) - pub SelfReserve: MultiLocation = MultiLocation { + pub SelfReserve: Location = Location { parents:0, interior: Junctions::X1( PalletInstance(::index() as u8) @@ -359,6 +359,7 @@ impl Config for XcmConfig { type UniversalAliases = Nothing; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = xcm_builder::FrameTransactionalProcessor; } impl cumulus_pallet_xcm::Config for Runtime { @@ -373,14 +374,14 @@ pub enum CurrencyId { ForeignAsset(AssetId), } -// How to convert from CurrencyId to MultiLocation +// How to convert from CurrencyId to Location pub struct CurrencyIdtoMultiLocation(sp_std::marker::PhantomData); -impl sp_runtime::traits::Convert> +impl sp_runtime::traits::Convert> for CurrencyIdtoMultiLocation where - AssetXConverter: MaybeEquivalence, + AssetXConverter: MaybeEquivalence, { - fn convert(currency: CurrencyId) -> Option { + fn convert(currency: CurrencyId) -> Option { match currency { CurrencyId::SelfReserve => { // For now and until Xtokens is adapted to handle 0.9.16 version we use @@ -388,7 +389,7 @@ where // This is not a problem in either cases, since the view of the destination // chain does not change // TODO! change this to NewAnchoringSelfReserve once xtokens is adapted for it - let multi: MultiLocation = SelfReserve::get(); + let multi: Location = SelfReserve::get(); Some(multi) } CurrencyId::ForeignAsset(asset) => AssetXConverter::convert_back(&asset), @@ -399,8 +400,8 @@ where parameter_types! { pub const BaseXcmWeight: Weight = Weight::from_parts(100u64, 100u64); pub const MaxAssetsForTransfer: usize = 2; - pub SelfLocation: MultiLocation = MultiLocation::here(); - pub SelfLocationAbsolute: MultiLocation = MultiLocation { + pub SelfLocation: Location = Location::here(); + pub SelfLocationAbsolute: Location = Location { parents:1, interior: Junctions::X1( Parachain(MsgQueue::parachain_id().into()) @@ -409,7 +410,7 @@ parameter_types! { } parameter_type_with_key! { - pub ParachainMinFee: |location: MultiLocation| -> Option { + pub ParachainMinFee: |location: Location| -> Option { match (location.parents, location.first_interior()) { (1, Some(Parachain(4u32))) => Some(50u128), _ => None, @@ -422,7 +423,7 @@ impl orml_xtokens::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = xcm_primitives::AccountIdToMultiLocation; + type AccountIdToLocation = xcm_primitives::AccountIdToLocation; type CurrencyIdConvert = CurrencyIdtoMultiLocation>; type XcmExecutor = XcmExecutor; @@ -432,7 +433,7 @@ impl orml_xtokens::Config for Runtime { type UniversalLocation = UniversalLocation; type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; - type MultiLocationsFilter = Everything; + type LocationsFilter = Everything; type ReserveProvider = xcm_primitives::AbsoluteAndRelativeReserve; } @@ -537,7 +538,7 @@ pub mod mock_msg_queue { let hash = Encode::using_encoded(&xcm, T::Hashing::hash); let (result, event) = match Xcm::::try_from(xcm) { Ok(xcm) => { - let location = MultiLocation::new(1, Junctions::X1(Parachain(sender.into()))); + let location = Location::new(1, Junctions::X1(Parachain(sender.into()))); let mut id = [0u8; 32]; id.copy_from_slice(hash.as_ref()); match T::XcmExecutor::execute_xcm(location, xcm, id, max_weight) { @@ -667,12 +668,12 @@ pub type LocalOriginToLocation = xcm_primitives::SignedToAccountId20; parameter_types! { - pub MatcherLocation: MultiLocation = MultiLocation::here(); + pub MatcherLocation: Location = Location::here(); } #[cfg(feature = "runtime-benchmarks")] parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); + pub ReachableDest: Option = Some(Parent.into()); } impl pallet_xcm::Config for Runtime { @@ -708,22 +709,22 @@ impl pallet_xcm::Config for Runtime { // Our AssetType. For now we only handle Xcm Assets #[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] pub enum AssetType { - Xcm(MultiLocation), + Xcm(Location), } impl Default for AssetType { fn default() -> Self { - Self::Xcm(MultiLocation::here()) + Self::Xcm(Location::here()) } } -impl From for AssetType { - fn from(location: MultiLocation) -> Self { +impl From for AssetType { + fn from(location: Location) -> Self { Self::Xcm(location) } } -impl Into> for AssetType { - fn into(self) -> Option { +impl Into> for AssetType { + fn into(self) -> Option { match self { Self::Xcm(location) => Some(location), } @@ -826,7 +827,7 @@ impl pallet_asset_manager::Config for Runtime { // 1 KSM should be enough parameter_types! { - pub MaxHrmpRelayFee: MultiAsset = (MultiLocation::parent(), 1_000_000_000_000u128).into(); + pub MaxHrmpRelayFee: Asset = (Location::parent(), 1_000_000_000_000u128).into(); } impl pallet_xcm_transactor::Config for Runtime { @@ -836,9 +837,9 @@ impl pallet_xcm_transactor::Config for Runtime { type DerivativeAddressRegistrationOrigin = EnsureRoot; type SovereignAccountDispatcherOrigin = frame_system::EnsureRoot; type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = xcm_primitives::AccountIdToMultiLocation; - type CurrencyIdToMultiLocation = - CurrencyIdtoMultiLocation>; + type AccountIdToLocation = xcm_primitives::AccountIdToLocation; + type CurrencyIdToLocation = + CurrencyIdToLocation>; type SelfLocation = SelfLocation; type Weigher = xcm_builder::FixedWeightBounds; type UniversalLocation = UniversalLocation; @@ -951,9 +952,9 @@ pub enum MockTransactors { } impl xcm_primitives::XcmTransact for MockTransactors { - fn destination(self) -> MultiLocation { + fn destination(self) -> Location { match self { - MockTransactors::Relay => MultiLocation::parent(), + MockTransactors::Relay => Location::parent(), } } } diff --git a/runtime/moonriver/tests/xcm_mock/relay_chain.rs b/runtime/moonriver/tests/xcm_mock/relay_chain.rs index 8eeaad46cd..d889189165 100644 --- a/runtime/moonriver/tests/xcm_mock/relay_chain.rs +++ b/runtime/moonriver/tests/xcm_mock/relay_chain.rs @@ -116,10 +116,10 @@ impl configuration::Config for Runtime { } parameter_types! { - pub KsmLocation: MultiLocation = Here.into(); + pub KsmLocation: Location = Here.into(); pub const KusamaNetwork: NetworkId = NetworkId::Kusama; pub const AnyNetwork: Option = None; - pub UniversalLocation: InteriorMultiLocation = Here; + pub UniversalLocation: InteriorLocation = Here; } pub type SovereignAccountOf = ( @@ -145,7 +145,7 @@ parameter_types! { pub KsmPerSecond: (AssetId, u128, u128) = (Concrete(KsmLocation::get()), 1, 1); pub const MaxInstructions: u32 = 100; pub const MaxAssetsIntoHolding: u32 = 64; - pub MatcherLocation: MultiLocation = MultiLocation::here(); + pub MatcherLocation: Location = Location::here(); } pub type XcmRouter = super::RelayChainXcmRouter; @@ -168,9 +168,9 @@ pub type XcmBarrier = ( ); parameter_types! { - pub Kusama: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(KsmLocation::get()) }); - pub Statemine: MultiLocation = Parachain(4).into(); - pub KusamaForStatemine: (MultiAssetFilter, MultiLocation) = (Kusama::get(), Statemine::get()); + pub Kusama: AssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(KsmLocation::get()) }); + pub Statemine: Location = Parachain(4).into(); + pub KusamaForStatemine: (AssetFilter, Location) = (Kusama::get(), Statemine::get()); } pub type TrustedTeleporters = xcm_builder::Case; @@ -207,7 +207,7 @@ pub type LocalOriginToLocation = SignedToAccountId32 = Some(Parent.into()); + pub ReachableDest: Option = Some(Parent.into()); } impl pallet_xcm::Config for Runtime { diff --git a/runtime/moonriver/tests/xcm_mock/statemine_like.rs b/runtime/moonriver/tests/xcm_mock/statemine_like.rs index 1046428fa6..306526dc20 100644 --- a/runtime/moonriver/tests/xcm_mock/statemine_like.rs +++ b/runtime/moonriver/tests/xcm_mock/statemine_like.rs @@ -156,18 +156,18 @@ impl pallet_assets::Config for Runtime { } parameter_types! { - pub const KsmLocation: MultiLocation = MultiLocation::parent(); + pub const KsmLocation: Location = Location::parent(); pub const RelayNetwork: NetworkId = NetworkId::Kusama; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub UniversalLocation: InteriorMultiLocation = + pub UniversalLocation: InteriorLocation = X2(GlobalConsensus(RelayNetwork::get()), Parachain(MsgQueue::parachain_id().into())); - pub Local: MultiLocation = Here.into(); + pub Local: Location = Here.into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); pub KsmPerSecond: (xcm::latest::prelude::AssetId, u128, u128) = (Concrete(KsmLocation::get()), 1, 1); } -/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used +/// Type for specifying how a `Location` can be converted into an `AccountId`. This is used /// when determining ownership of accounts for asset transacting and when attempting to use XCM /// `Transact` in order to determine the dispatch Origin. pub type LocationToAccountId = ( @@ -185,7 +185,7 @@ pub type CurrencyTransactor = CurrencyAdapter< Balances, // Use this currency when it is a fungible asset matching the given location or name: IsConcrete, - // Convert an XCM MultiLocation into a local account id: + // Convert an XCM Location into a local account id: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, @@ -204,7 +204,7 @@ pub type FungiblesTransactor = FungiblesAdapter< AsPrefixedGeneralIndex, JustTry, >, - // Convert an XCM MultiLocation into a local account id: + // Convert an XCM Location into a local account id: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, @@ -248,15 +248,15 @@ parameter_types! { } match_types! { - pub type ParentOrParentsExecutivePlurality: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } + pub type ParentOrParentsExecutivePlurality: impl Contains = { + Location { parents: 1, interior: Here } | + Location { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } }; } match_types! { - pub type ParentOrSiblings: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(_) } + pub type ParentOrSiblings: impl Contains = { + Location { parents: 1, interior: Here } | + Location { parents: 1, interior: [_] } }; } @@ -272,7 +272,7 @@ pub type Barrier = ( ); parameter_types! { - pub MatcherLocation: MultiLocation = MultiLocation::here(); + pub MatcherLocation: Location = Location::here(); pub const MaxAssetsIntoHolding: u32 = 64; } @@ -312,7 +312,7 @@ pub type XcmRouter = super::ParachainXcmRouter; #[cfg(feature = "runtime-benchmarks")] parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); + pub ReachableDest: Option = Some(Parent.into()); } impl pallet_xcm::Config for Runtime { @@ -413,7 +413,7 @@ pub mod mock_msg_queue { let hash = Encode::using_encoded(&xcm, T::Hashing::hash); let (result, event) = match Xcm::::try_from(xcm) { Ok(xcm) => { - let location = MultiLocation::new(1, Junctions::X1(Parachain(sender.into()))); + let location = Location::new(1, Junctions::X1(Parachain(sender.into()))); let mut id = [0u8; 32]; id.copy_from_slice(hash.as_ref()); match T::XcmExecutor::execute_xcm(location, xcm, id, max_weight) { @@ -511,10 +511,10 @@ pub mod mock_statemine_prefix { #[pallet::storage] #[pallet::getter(fn current_prefix)] - pub(super) type CurrentPrefix = StorageValue<_, MultiLocation, ValueQuery>; + pub(super) type CurrentPrefix = StorageValue<_, Location, ValueQuery>; - impl Get for Pallet { - fn get() -> MultiLocation { + impl Get for Pallet { + fn get() -> Location { Self::current_prefix() } } @@ -523,11 +523,11 @@ pub mod mock_statemine_prefix { #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { // Changed Prefix - PrefixChanged(MultiLocation), + PrefixChanged(Location), } impl Pallet { - pub fn set_prefix(prefix: MultiLocation) { + pub fn set_prefix(prefix: Location) { CurrentPrefix::::put(&prefix); Self::deposit_event(Event::PrefixChanged(prefix)); } diff --git a/runtime/moonriver/tests/xcm_tests.rs b/runtime/moonriver/tests/xcm_tests.rs index 1868ecd47f..94f81ce3fe 100644 --- a/runtime/moonriver/tests/xcm_tests.rs +++ b/runtime/moonriver/tests/xcm_tests.rs @@ -25,7 +25,7 @@ use frame_support::{ }; use sp_core::ConstU32; use xcm::latest::prelude::*; -use xcm::{VersionedMultiLocation, WrapVersion}; +use xcm::{VersionedLocation, WrapVersion}; use xcm_builder::HashedDescriptionDescribeFamilyAllTerminal; use xcm_executor::traits::ConvertLocation; use xcm_mock::parachain; @@ -44,7 +44,7 @@ use xcm_primitives::{UtilityEncodeCall, DEFAULT_PROOF_SIZE}; fn receive_relay_asset_from_relay() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -69,7 +69,7 @@ fn receive_relay_asset_from_relay() { }); // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -78,7 +78,7 @@ fn receive_relay_asset_from_relay() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 123).into()), 0, )); @@ -96,7 +96,7 @@ fn receive_relay_asset_from_relay() { fn send_relay_asset_to_relay() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -123,7 +123,7 @@ fn send_relay_asset_to_relay() { )); }); - let dest: MultiLocation = Junction::AccountKey20 { + let dest: Location = Junction::AccountKey20 { network: None, key: PARAALICE, } @@ -134,7 +134,7 @@ fn send_relay_asset_to_relay() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 123).into()), 0, )); @@ -152,7 +152,7 @@ fn send_relay_asset_to_relay() { }); // We now send back some money to the relay - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -165,7 +165,7 @@ fn send_relay_asset_to_relay() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 123, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -185,7 +185,7 @@ fn send_relay_asset_to_relay() { fn send_relay_asset_to_para_b() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -229,7 +229,7 @@ fn send_relay_asset_to_para_b() { }); // First send relay chain asset to Parachain A like in previous test - let dest: MultiLocation = Junction::AccountKey20 { + let dest: Location = Junction::AccountKey20 { network: None, key: PARAALICE, } @@ -238,7 +238,7 @@ fn send_relay_asset_to_para_b() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 123).into()), 0, )); @@ -249,7 +249,7 @@ fn send_relay_asset_to_para_b() { }); // Now send relay asset from para A to para B - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X2( Parachain(2), @@ -265,7 +265,7 @@ fn send_relay_asset_to_para_b() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -286,7 +286,7 @@ fn send_para_a_asset_to_para_b() { MockNet::reset(); // This represents the asset in paraA - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -314,7 +314,7 @@ fn send_para_a_asset_to_para_b() { }); // Send para A asset from para A to para B - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X2( Parachain(2), @@ -330,7 +330,7 @@ fn send_para_a_asset_to_para_b() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(800000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -356,7 +356,7 @@ fn send_para_a_asset_from_para_b_to_para_c() { MockNet::reset(); // Represents para A asset - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -401,7 +401,7 @@ fn send_para_a_asset_from_para_b_to_para_c() { }); // Send para A asset to para B - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X2( Parachain(2), @@ -416,7 +416,7 @@ fn send_para_a_asset_from_para_b_to_para_c() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -435,7 +435,7 @@ fn send_para_a_asset_from_para_b_to_para_c() { }); // Send para A asset from para B to para C - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X2( Parachain(3), @@ -451,7 +451,7 @@ fn send_para_a_asset_from_para_b_to_para_c() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -468,7 +468,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { MockNet::reset(); // Para A asset - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -496,7 +496,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { }); // Send para A asset to para B - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X2( Parachain(2), @@ -511,7 +511,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -530,7 +530,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { }); // Send back para A asset to para A - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X2( Parachain(1), @@ -545,7 +545,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -564,7 +564,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { MockNet::reset(); - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -590,7 +590,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { )); }); - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X2( Parachain(2), @@ -605,7 +605,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -626,12 +626,12 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { // This time we will force the new reanchoring by manually sending the // Message through polkadotXCM pallet - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(Parachain(1)), }; - let reanchored_para_a_balances = MultiLocation::new(0, X1(PalletInstance(1u8))); + let reanchored_para_a_balances = Location::new(0, X1(PalletInstance(1u8))); let message = xcm::VersionedXcm::<()>::V3(Xcm(vec![ WithdrawAsset((reanchored_para_a_balances.clone(), 100).into()), @@ -642,7 +642,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { }, DepositAsset { assets: All.into(), - beneficiary: MultiLocation::new( + beneficiary: Location::new( 0, X1(AccountKey20 { network: None, @@ -669,12 +669,12 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { // This time we will force the new reanchoring by manually sending the // Message through polkadotXCM pallet - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(Parachain(1)), }; - let reanchored_para_a_balances = MultiLocation::new(0, X1(PalletInstance(1u8))); + let reanchored_para_a_balances = Location::new(0, X1(PalletInstance(1u8))); let message = xcm::VersionedXcm::<()>::V3(Xcm(vec![ WithdrawAsset((reanchored_para_a_balances.clone(), 100).into()), @@ -685,7 +685,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { }, DepositAsset { assets: All.into(), - beneficiary: MultiLocation::new( + beneficiary: Location::new( 0, X1(AccountKey20 { network: None, @@ -717,7 +717,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { fn receive_relay_asset_with_trader() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -745,7 +745,7 @@ fn receive_relay_asset_with_trader() { )); }); - let dest: MultiLocation = Junction::AccountKey20 { + let dest: Location = Junction::AccountKey20 { network: None, key: PARAALICE, } @@ -760,7 +760,7 @@ fn receive_relay_asset_with_trader() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 100).into()), 0, )); @@ -778,7 +778,7 @@ fn receive_relay_asset_with_trader() { fn send_para_a_asset_to_para_b_with_trader() { MockNet::reset(); - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -804,7 +804,7 @@ fn send_para_a_asset_to_para_b_with_trader() { )); }); - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X2( Parachain(2), @@ -822,7 +822,7 @@ fn send_para_a_asset_to_para_b_with_trader() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(10u64, DEFAULT_PROOF_SIZE)) )); }); @@ -852,7 +852,7 @@ fn send_para_a_asset_to_para_b_with_trader() { fn send_para_a_asset_to_para_b_with_trader_and_fee() { MockNet::reset(); - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -879,7 +879,7 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { )); }); - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X2( Parachain(2), @@ -897,7 +897,7 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { parachain::CurrencyId::SelfReserve, 100, 1, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(800000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -920,7 +920,7 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { fn error_when_not_paying_enough() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -929,7 +929,7 @@ fn error_when_not_paying_enough() { decimals: 12, }; - let dest: MultiLocation = Junction::AccountKey20 { + let dest: Location = Junction::AccountKey20 { network: None, key: PARAALICE, } @@ -960,7 +960,7 @@ fn error_when_not_paying_enough() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 5).into()), 0, )); @@ -976,7 +976,7 @@ fn error_when_not_paying_enough() { fn transact_through_derivative_multilocation() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1003,7 +1003,7 @@ fn transact_through_derivative_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000000000.into(), @@ -1012,14 +1012,14 @@ fn transact_through_derivative_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), WEIGHT_REF_TIME_PER_SECOND as u128, )); }); // Let's construct the call to know how much weight it is going to require - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1029,7 +1029,7 @@ fn transact_through_derivative_multilocation() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 4000003100u128).into()), 0, )); @@ -1052,7 +1052,7 @@ fn transact_through_derivative_multilocation() { // Send to registered address let registered_address = derivative_account_id(para_a_account(), 0); - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -1066,7 +1066,7 @@ fn transact_through_derivative_multilocation() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1107,8 +1107,8 @@ fn transact_through_derivative_multilocation() { parachain::MockTransactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), fee_amount: None }, @@ -1134,7 +1134,7 @@ fn transact_through_derivative_multilocation() { fn transact_through_derivative_with_custom_fee_weight() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1161,7 +1161,7 @@ fn transact_through_derivative_with_custom_fee_weight() { // Let's construct the call to know how much weight it is going to require - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1171,7 +1171,7 @@ fn transact_through_derivative_with_custom_fee_weight() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 4000003100u128).into()), 0, )); @@ -1194,7 +1194,7 @@ fn transact_through_derivative_with_custom_fee_weight() { // Send to registered address let registered_address = derivative_account_id(para_a_account(), 0); - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -1208,7 +1208,7 @@ fn transact_through_derivative_with_custom_fee_weight() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1250,8 +1250,8 @@ fn transact_through_derivative_with_custom_fee_weight() { parachain::MockTransactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), // 1-1 fee weight mapping fee_amount: Some(overall_weight as u128) @@ -1288,7 +1288,7 @@ fn transact_through_derivative_with_custom_fee_weight() { fn transact_through_derivative_with_custom_fee_weight_refund() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1315,7 +1315,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { // Let's construct the call to know how much weight it is going to require - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1325,7 +1325,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 4000009100u128).into()), 0, )); @@ -1348,7 +1348,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { // Send to registered address let registered_address = derivative_account_id(para_a_account(), 0); - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -1362,7 +1362,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1404,8 +1404,8 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { parachain::MockTransactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), // 1-1 fee weight mapping fee_amount: Some(overall_weight as u128) @@ -1441,7 +1441,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { fn transact_through_sovereign() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1468,7 +1468,7 @@ fn transact_through_sovereign() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000000000.into(), @@ -1477,12 +1477,12 @@ fn transact_through_sovereign() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), WEIGHT_REF_TIME_PER_SECOND as u128, )); }); - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1491,7 +1491,7 @@ fn transact_through_sovereign() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 4000003100u128).into()), 0, )); @@ -1513,7 +1513,7 @@ fn transact_through_sovereign() { // Send to registered address let registered_address = derivative_account_id(para_a_account(), 0); - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -1527,7 +1527,7 @@ fn transact_through_sovereign() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1546,7 +1546,7 @@ fn transact_through_sovereign() { }); // We send the xcm transact operation to parent - let dest = MultiLocation { + let dest = Location { parents: 1, interior: Here, }; @@ -1577,11 +1577,11 @@ fn transact_through_sovereign() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_sovereign( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V3(dest)), PARAALICE.into(), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), fee_amount: None }, @@ -1607,7 +1607,7 @@ fn transact_through_sovereign() { fn transact_through_sovereign_with_custom_fee_weight() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1632,7 +1632,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { )); }); - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1641,7 +1641,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 4000003100u128).into()), 0, )); @@ -1663,7 +1663,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { // Send to registered address let registered_address = derivative_account_id(para_a_account(), 0); - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -1677,7 +1677,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1696,7 +1696,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { }); // We send the xcm transact operation to parent - let dest = MultiLocation { + let dest = Location { parents: 1, interior: Here, }; @@ -1728,11 +1728,11 @@ fn transact_through_sovereign_with_custom_fee_weight() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_sovereign( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V3(dest)), PARAALICE.into(), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), // 1-1 fee-weight mapping fee_amount: Some(total_weight as u128) @@ -1759,7 +1759,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { fn transact_through_sovereign_with_custom_fee_weight_refund() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1784,7 +1784,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { )); }); - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1793,7 +1793,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 4000009100u128).into()), 0, )); @@ -1815,7 +1815,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { // Send to registered address let registered_address = derivative_account_id(para_a_account(), 0); - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X1(AccountId32 { network: None, @@ -1829,7 +1829,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1848,7 +1848,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { }); // We send the xcm transact operation to parent - let dest = MultiLocation { + let dest = Location { parents: 1, interior: Here, }; @@ -1880,11 +1880,11 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_sovereign( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V3(dest)), PARAALICE.into(), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), // 1-1 fee-weight mapping fee_amount: Some(total_weight as u128) @@ -1912,7 +1912,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { fn test_automatic_versioning_on_runtime_upgrade_with_relay() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1937,7 +1937,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { }); let response = Response::Version(2); - let querier: MultiLocation = Here.into(); + let querier: Location = Here.into(); // This is irrelevant, nothing will be done with this message, // but we need to pass a message as an argument to trigger the storage change @@ -1950,7 +1950,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { // The router is mocked, and we cannot use WrapVersion in ChildParachainRouter. So we will force // it directly here // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -1975,7 +1975,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 123).into()), 0, )); @@ -1989,7 +1989,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { let expected_supported_version: relay_chain::RuntimeEvent = pallet_xcm::Event::SupportedVersionChanged { - location: MultiLocation { + location: Location { parents: 0, interior: X1(Parachain(1)), }, @@ -2024,7 +2024,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { // This event should have been seen in the relay let expected_supported_version_2: relay_chain::RuntimeEvent = pallet_xcm::Event::SupportedVersionChanged { - location: MultiLocation { + location: Location { parents: 0, interior: X1(Parachain(1)), }, @@ -2042,7 +2042,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { MockNet::reset(); - let para_a_balances = MultiLocation::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -2052,7 +2052,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { decimals: 18, }; let response = Response::Version(2); - let querier: MultiLocation = Here.into(); + let querier: Location = Here.into(); // This is irrelevant, nothing will be done with this message, // but we need to pass a message as an argument to trigger the storage change @@ -2095,7 +2095,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { )); // Wrap version, which sets VersionedStorage assert_ok!(::wrap_version( - &MultiLocation::new(1, X1(Parachain(2))).into(), + &Location::new(1, X1(Parachain(2))).into(), mock_message )); @@ -2107,7 +2107,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { let expected_supported_version: parachain::RuntimeEvent = pallet_xcm::Event::SupportedVersionChanged { - location: MultiLocation { + location: Location { parents: 1, interior: X1(Parachain(2)), }, @@ -2121,7 +2121,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { }); // Let's ensure talking in v0 works - let dest = MultiLocation { + let dest = Location { parents: 1, interior: X2( Parachain(2), @@ -2137,7 +2137,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedMultiLocation::V3(dest)), + Box::new(VersionedLocation::V3(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); // free execution, full amount received @@ -2174,7 +2174,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { // This event should have been seen in para A let expected_supported_version_2: parachain::RuntimeEvent = pallet_xcm::Event::SupportedVersionChanged { - location: MultiLocation { + location: Location { parents: 1, interior: X1(Parachain(2)), }, @@ -2194,7 +2194,7 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { MockNet::reset(); let fresh_account = [2u8; 20]; - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -2219,7 +2219,7 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { }); // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: fresh_account, } @@ -2228,7 +2228,7 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest.clone()).clone().into()), + Box::new(VersionedLocation::V3(dest.clone()).clone().into()), Box::new((Here, 123).into()), 0, )); @@ -2254,7 +2254,7 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new((Here, 123).into()), 0, )); @@ -2272,7 +2272,7 @@ fn receive_assets_with_sufficients_true_allows_non_funded_account_to_receive_ass MockNet::reset(); let fresh_account = [2u8; 20]; - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -2297,7 +2297,7 @@ fn receive_assets_with_sufficients_true_allows_non_funded_account_to_receive_ass }); // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: fresh_account, } @@ -2306,7 +2306,7 @@ fn receive_assets_with_sufficients_true_allows_non_funded_account_to_receive_ass assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest.clone()).clone().into()), + Box::new(VersionedLocation::V3(dest.clone()).clone().into()), Box::new((Here, 123).into()), 0, )); @@ -2333,7 +2333,7 @@ fn evm_account_receiving_assets_should_handle_sufficients_ref_count() { assert_eq!(parachain::System::account(evm_account_id).sufficients, 1); }); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -2357,7 +2357,7 @@ fn evm_account_receiving_assets_should_handle_sufficients_ref_count() { }); // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: sufficient_account, } @@ -2366,7 +2366,7 @@ fn evm_account_receiving_assets_should_handle_sufficients_ref_count() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest.clone()).clone().into()), + Box::new(VersionedLocation::V3(dest.clone()).clone().into()), Box::new((Here, 123).into()), 0, )); @@ -2401,7 +2401,7 @@ fn empty_account_should_not_be_reset() { let evm_account_id = parachain::AccountId::from(sufficient_account); - let source_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let source_location = parachain::AssetType::Xcm(Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -2435,7 +2435,7 @@ fn empty_account_should_not_be_reset() { }); // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: sufficient_account, } @@ -2444,7 +2444,7 @@ fn empty_account_should_not_be_reset() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedMultiLocation::V3(dest.clone()).clone().into()), + Box::new(VersionedLocation::V3(dest.clone()).clone().into()), Box::new((Here, 123).into()), 0, )); @@ -2499,7 +2499,7 @@ fn empty_account_should_not_be_reset() { fn test_statemine_like() { MockNet::reset(); - let dest_para = MultiLocation::new(1, X1(Parachain(1))); + let dest_para = Location::new(1, X1(Parachain(1))); let sov = xcm_builder::SiblingParachainConvertsVia::< polkadot_parachain::primitives::Sibling, @@ -2507,7 +2507,7 @@ fn test_statemine_like() { >::convert_location(&dest_para) .unwrap(); - let statemine_asset_a_balances = MultiLocation::new( + let statemine_asset_a_balances = Location::new( 1, X3( Parachain(4), @@ -2567,7 +2567,7 @@ fn test_statemine_like() { )); // Actually send relay asset to parachain - let dest: MultiLocation = AccountKey20 { + let dest: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -2576,8 +2576,8 @@ fn test_statemine_like() { // Send with new prefix assert_ok!(StatemineChainPalletXcm::reserve_transfer_assets( statemine_like::RuntimeOrigin::signed(RELAYALICE), - Box::new(MultiLocation::new(1, X1(Parachain(1))).into()), - Box::new(VersionedMultiLocation::V3(dest).clone().into()), + Box::new(Location::new(1, X1(Parachain(1))).into()), + Box::new(VersionedLocation::V3(dest).clone().into()), Box::new( ( X2( @@ -2604,7 +2604,7 @@ fn send_statemint_asset_from_para_a_to_statemine_with_relay_fee() { MockNet::reset(); // Relay asset - let relay_location = parachain::AssetType::Xcm(MultiLocation::parent()); + let relay_location = parachain::AssetType::Xcm(Location::parent()); let source_relay_id: parachain::AssetId = relay_location.clone().into(); let relay_asset_metadata = parachain::AssetMetadata { @@ -2614,7 +2614,7 @@ fn send_statemint_asset_from_para_a_to_statemine_with_relay_fee() { }; // Statemine asset - let statemine_asset = MultiLocation::new( + let statemine_asset = Location::new( 1, X3(Parachain(4u32), PalletInstance(5u8), GeneralIndex(10u128)), ); @@ -2627,7 +2627,7 @@ fn send_statemint_asset_from_para_a_to_statemine_with_relay_fee() { decimals: 12, }; - let dest_para = MultiLocation::new(1, X1(Parachain(1))); + let dest_para = Location::new(1, X1(Parachain(1))); let sov = xcm_builder::SiblingParachainConvertsVia::< polkadot_parachain::primitives::Sibling, @@ -2665,7 +2665,7 @@ fn send_statemint_asset_from_para_a_to_statemine_with_relay_fee() { )); }); - let parachain_beneficiary_from_relay: MultiLocation = Junction::AccountKey20 { + let parachain_beneficiary_from_relay: Location = Junction::AccountKey20 { network: None, key: PARAALICE, } @@ -2677,7 +2677,7 @@ fn send_statemint_asset_from_para_a_to_statemine_with_relay_fee() { relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), Box::new( - VersionedMultiLocation::V3(parachain_beneficiary_from_relay) + VersionedLocation::V3(parachain_beneficiary_from_relay) .clone() .into() ), @@ -2715,7 +2715,7 @@ fn send_statemint_asset_from_para_a_to_statemine_with_relay_fee() { )); // Send statemine USDC asset to Alice in Parachain A - let parachain_beneficiary_from_statemint: MultiLocation = AccountKey20 { + let parachain_beneficiary_from_statemint: Location = AccountKey20 { network: None, key: PARAALICE, } @@ -2724,9 +2724,9 @@ fn send_statemint_asset_from_para_a_to_statemine_with_relay_fee() { // Send with new prefix assert_ok!(StatemineChainPalletXcm::reserve_transfer_assets( statemine_like::RuntimeOrigin::signed(RELAYALICE), - Box::new(MultiLocation::new(1, X1(Parachain(1))).into()), + Box::new(Location::new(1, X1(Parachain(1))).into()), Box::new( - VersionedMultiLocation::V3(parachain_beneficiary_from_statemint) + VersionedLocation::V3(parachain_beneficiary_from_statemint) .clone() .into() ), @@ -2746,7 +2746,7 @@ fn send_statemint_asset_from_para_a_to_statemine_with_relay_fee() { )); }); - let statemine_beneficiary = MultiLocation { + let statemine_beneficiary = Location { parents: 1, interior: X2( Parachain(4), @@ -2785,7 +2785,7 @@ fn send_statemint_asset_from_para_a_to_statemine_with_relay_fee() { (parachain::CurrencyId::ForeignAsset(source_relay_id), 100) ], 1, - Box::new(VersionedMultiLocation::V3(statemine_beneficiary)), + Box::new(VersionedLocation::V3(statemine_beneficiary)), WeightLimit::Limited(Weight::from_parts(80_000_000u64, 100_000u64)) )); }); @@ -2810,13 +2810,13 @@ fn send_statemint_asset_from_para_a_to_statemine_with_relay_fee() { #[test] fn transact_through_signed_multilocation() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000000000.into(), @@ -2826,7 +2826,7 @@ fn transact_through_signed_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), WEIGHT_REF_TIME_PER_SECOND as u128, )); ancestry = parachain::UniversalLocation::get().into(); @@ -2845,7 +2845,7 @@ fn transact_through_signed_multilocation() { // To convert it to what the relay will see instead of us descend_origin_multilocation - .reanchor(&MultiLocation::parent(), ancestry.interior) + .reanchor(&Location::parent(), ancestry.interior) .unwrap(); let derived = xcm_builder::Account32Hash::< @@ -2889,10 +2889,10 @@ fn transact_through_signed_multilocation() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), fee_amount: None }, @@ -2917,7 +2917,7 @@ fn transact_through_signed_multilocation() { #[test] fn transact_through_signed_multilocation_custom_fee_and_weight() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); ParaA::execute_with(|| { ancestry = parachain::UniversalLocation::get().into(); @@ -2936,7 +2936,7 @@ fn transact_through_signed_multilocation_custom_fee_and_weight() { // To convert it to what the relay will see instead of us descend_origin_multilocation - .reanchor(&MultiLocation::parent(), ancestry.interior) + .reanchor(&Location::parent(), ancestry.interior) .unwrap(); let derived = xcm_builder::Account32Hash::< @@ -2981,10 +2981,10 @@ fn transact_through_signed_multilocation_custom_fee_and_weight() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), fee_amount: Some(total_weight as u128) }, @@ -3008,7 +3008,7 @@ fn transact_through_signed_multilocation_custom_fee_and_weight() { #[test] fn transact_through_signed_multilocation_custom_fee_and_weight_refund() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); ParaA::execute_with(|| { ancestry = parachain::UniversalLocation::get().into(); @@ -3027,7 +3027,7 @@ fn transact_through_signed_multilocation_custom_fee_and_weight_refund() { // To convert it to what the relay will see instead of us descend_origin_multilocation - .reanchor(&MultiLocation::parent(), ancestry.interior) + .reanchor(&Location::parent(), ancestry.interior) .unwrap(); let derived = xcm_builder::Account32Hash::< @@ -3072,10 +3072,10 @@ fn transact_through_signed_multilocation_custom_fee_and_weight_refund() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(MultiLocation::parent())), + Box::new(xcm::VersionedLocation::V3(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), fee_amount: Some(total_weight as u128) }, @@ -3101,18 +3101,18 @@ fn transact_through_signed_multilocation_custom_fee_and_weight_refund() { #[test] fn transact_through_signed_multilocation_para_to_para() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); - let para_b_location = MultiLocation::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, X1(Parachain(2))); - let para_b_balances = MultiLocation::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedMultiLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V3(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -3122,7 +3122,7 @@ fn transact_through_signed_multilocation_para_to_para() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); @@ -3184,9 +3184,9 @@ fn transact_through_signed_multilocation_para_to_para() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V3(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( para_b_balances ))), fee_amount: None @@ -3212,16 +3212,16 @@ fn transact_through_signed_multilocation_para_to_para() { #[test] fn transact_through_signed_multilocation_para_to_para_refund() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); - let para_b_location = MultiLocation::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, X1(Parachain(2))); - let para_b_balances = MultiLocation::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); ParaA::execute_with(|| { assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); @@ -3284,9 +3284,9 @@ fn transact_through_signed_multilocation_para_to_para_refund() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V3(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( para_b_balances ))), fee_amount: Some(overall_weight as u128) @@ -3313,18 +3313,18 @@ fn transact_through_signed_multilocation_para_to_para_refund() { #[test] fn transact_through_signed_multilocation_para_to_para_ethereum() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); - let para_b_location = MultiLocation::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, X1(Parachain(2))); - let para_b_balances = MultiLocation::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedMultiLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V3(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -3334,7 +3334,7 @@ fn transact_through_signed_multilocation_para_to_para_ethereum() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); @@ -3411,9 +3411,9 @@ fn transact_through_signed_multilocation_para_to_para_ethereum() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V3(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( para_b_balances ))), fee_amount: None @@ -3441,18 +3441,18 @@ fn transact_through_signed_multilocation_para_to_para_ethereum() { #[test] fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); - let para_b_location = MultiLocation::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, X1(Parachain(2))); - let para_b_balances = MultiLocation::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedMultiLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V3(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -3462,7 +3462,7 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); @@ -3540,9 +3540,9 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V3(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( para_b_balances ))), fee_amount: None @@ -3565,18 +3565,18 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() #[test] fn transact_through_signed_multilocation_para_to_para_ethereum_proxy_succeeds() { MockNet::reset(); - let mut ancestry = MultiLocation::parent(); + let mut ancestry = Location::parent(); - let para_b_location = MultiLocation::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, X1(Parachain(2))); - let para_b_balances = MultiLocation::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedMultiLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V3(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -3586,7 +3586,7 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_proxy_succeeds() // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedMultiLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); @@ -3672,9 +3672,9 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_proxy_succeeds() ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedMultiLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V3(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( para_b_balances ))), fee_amount: None @@ -3727,8 +3727,8 @@ fn hrmp_init_accept_through_root() { proposed_max_message_size: 1 }), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), fee_amount: Some(total_fee) }, @@ -3760,8 +3760,8 @@ fn hrmp_init_accept_through_root() { para_id: 1u32.into() }, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), fee_amount: Some(total_fee) }, @@ -3818,8 +3818,8 @@ fn hrmp_close_works() { recipient: 2u32.into() }), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedMultiLocation::V3( - MultiLocation::parent() + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + Location::parent() ))), fee_amount: Some(total_fee) }, From 3e2a41888bd84926b7854c2d90750909398349f8 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Fri, 1 Mar 2024 15:56:06 +0000 Subject: [PATCH 02/80] fix test compilation --- client/rpc/manual-xcm/src/lib.rs | 6 +- node/service/src/lib.rs | 12 +- pallets/asset-manager/src/benchmarks.rs | 6 +- pallets/xcm-transactor/src/benchmarks.rs | 28 +- precompiles/xtokens/src/tests.rs | 2 +- .../moonbase/tests/xcm_mock/statemint_like.rs | 2 +- runtime/moonbeam/tests/common/mod.rs | 4 +- runtime/moonbeam/tests/integration_test.rs | 105 ++-- runtime/moonbeam/tests/xcm_mock/parachain.rs | 78 ++- .../moonbeam/tests/xcm_mock/relay_chain.rs | 20 +- .../moonbeam/tests/xcm_mock/statemint_like.rs | 78 ++- runtime/moonbeam/tests/xcm_tests.rs | 475 ++++++++-------- runtime/moonriver/tests/common/mod.rs | 4 +- runtime/moonriver/tests/integration_test.rs | 85 +-- runtime/moonriver/tests/xcm_mock/parachain.rs | 74 ++- .../moonriver/tests/xcm_mock/relay_chain.rs | 20 +- .../tests/xcm_mock/statemine_like.rs | 79 ++- runtime/moonriver/tests/xcm_tests.rs | 538 +++++++++--------- 18 files changed, 894 insertions(+), 722 deletions(-) diff --git a/client/rpc/manual-xcm/src/lib.rs b/client/rpc/manual-xcm/src/lib.rs index 31d2a2cb91..6998c912b8 100644 --- a/client/rpc/manual-xcm/src/lib.rs +++ b/client/rpc/manual-xcm/src/lib.rs @@ -25,7 +25,7 @@ use jsonrpsee::{ }; use parity_scale_codec::Encode; use xcm::opaque::lts::Weight; -use xcm::v3::prelude::*; +use xcm::v4::prelude::*; use xcm_primitives::DEFAULT_PROOF_SIZE; /// This RPC interface is used to manually submit XCM messages that will be injected into a @@ -66,7 +66,7 @@ impl ManualXcmApiServer for ManualXcm { let downward_message_channel = self.downward_message_channel.clone(); // If no message is supplied, inject a default one. let msg = if msg.is_empty() { - xcm::VersionedXcm::<()>::V3(Xcm(vec![ + xcm::VersionedXcm::<()>::V4(Xcm(vec![ ReserveAssetDeposited((Parent, 10000000000000u128).into()), ClearOrigin, BuyExecution { @@ -106,7 +106,7 @@ impl ManualXcmApiServer for ManualXcm { let msg = if msg.is_empty() { let mut mes = XcmpMessageFormat::ConcatenatedVersionedXcm.encode(); mes.append( - &mut (xcm::VersionedXcm::<()>::V3(Xcm(vec![ + &mut (xcm::VersionedXcm::<()>::V4(Xcm(vec![ ReserveAssetDeposited( ((Parent, Parachain(sender.into())), 10000000000000u128).into(), ), diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index ccf2cac256..30ac0e2236 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -1651,7 +1651,7 @@ mod tests { #[test] fn dalek_does_not_panic() { use futures::executor::block_on; - use sc_block_builder::BlockBuilderProvider; + use sc_block_builder::BlockBuilderBuilder; use sc_client_db::{Backend, BlocksPruning, DatabaseSettings, DatabaseSource, PruningMode}; use sp_api::ProvideRuntimeApi; use sp_consensus::BlockOrigin; @@ -1701,12 +1701,17 @@ mod tests { sp_io::UseDalekExt, >::new(1)); - let a1 = client - .new_block_at(client.chain_info().genesis_hash, Default::default(), false) + let a1 = BlockBuilderBuilder::new(&client) + .on_parent_block(client.chain_info().genesis_hash) + .with_parent_block_number(0) + // Enable proof recording if required. This call is optional. + .enable_proof_recording() + .build() .unwrap() .build() .unwrap() .block; + block_on(client.import(BlockOrigin::NetworkInitialSync, a1.clone())).unwrap(); // On block zero it will use dalek @@ -1772,6 +1777,7 @@ mod tests { rpc_max_subs_per_conn: Default::default(), rpc_addr: None, rpc_port: Default::default(), + rpc_message_buffer_capacity: Default::default(), data_path: Default::default(), prometheus_config: None, telemetry_endpoints: None, diff --git a/pallets/asset-manager/src/benchmarks.rs b/pallets/asset-manager/src/benchmarks.rs index caf695e702..c9de54ee07 100644 --- a/pallets/asset-manager/src/benchmarks.rs +++ b/pallets/asset-manager/src/benchmarks.rs @@ -101,7 +101,7 @@ benchmarks! { // We make it dependent on the number of existing assets already let x in 5..100; for i in 0..x { - let asset_type: T::ForeignAssetType = Location::new(0, X1(GeneralIndex(i as u128))).into(); + let asset_type: T::ForeignAssetType = Location::new(0, [GeneralIndex(i as u128)]).into(); let metadata = T::AssetRegistrarMetadata::default(); let amount = 1u32.into(); Pallet::::register_foreign_asset( @@ -131,7 +131,7 @@ benchmarks! { // We make it dependent on the number of existing assets already let x in 5..100; for i in 0..x { - let asset_type: T::ForeignAssetType = Location::new(0, X1(GeneralIndex(i as u128))).into(); + let asset_type: T::ForeignAssetType = Location::new(0, [GeneralIndex(i as u128)]).into(); let metadata = T::AssetRegistrarMetadata::default(); let amount = 1u32.into(); Pallet::::register_foreign_asset( @@ -179,7 +179,7 @@ benchmarks! { // Worst case is we need to remove it from SupportedAAssetsFeePayment too let x in 5..100; for i in 0..x { - let asset_type: T::ForeignAssetType = Location::new(0, X1(GeneralIndex(i as u128))).into(); + let asset_type: T::ForeignAssetType = Location::new(0, [GeneralIndex(i as u128)]).into(); let metadata = T::AssetRegistrarMetadata::default(); let amount = 1u32.into(); Pallet::::register_foreign_asset( diff --git a/pallets/xcm-transactor/src/benchmarks.rs b/pallets/xcm-transactor/src/benchmarks.rs index 4c5d4d3b33..8d0febe19b 100644 --- a/pallets/xcm-transactor/src/benchmarks.rs +++ b/pallets/xcm-transactor/src/benchmarks.rs @@ -51,7 +51,7 @@ benchmarks! { let location = Location::parent(); }: _( RawOrigin::Root, - Box::new(xcm::VersionedLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V4(location.clone())), extra_weight, max_weight, None @@ -70,12 +70,12 @@ benchmarks! { let location = Location::parent(); Pallet::::set_transact_info( RawOrigin::Root.into(), - Box::new(xcm::VersionedLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V4(location.clone())), extra_weight, max_weight, None ).expect("must succeed"); - }: _(RawOrigin::Root, Box::new(xcm::VersionedLocation::V3(location.clone()))) + }: _(RawOrigin::Root, Box::new(xcm::VersionedLocation::V4(location.clone()))) verify { assert!(Pallet::::transact_info(&location).is_none()); } @@ -85,7 +85,7 @@ benchmarks! { let location = Location::parent(); }: _( RawOrigin::Root, - Box::new(xcm::VersionedLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V4(location.clone())), fee_per_second ) verify { @@ -105,14 +105,14 @@ benchmarks! { let user: T::AccountId = account("account id", 0u32, 0u32); Pallet::::set_transact_info( RawOrigin::Root.into(), - Box::new(xcm::VersionedLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V4(location.clone())), extra_weight, max_weight, Some(extra_weight) ).expect("must succeed"); Pallet::::set_fee_per_second( RawOrigin::Root.into(), - Box::new(xcm::VersionedLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V4(location.clone())), fee_per_second ).expect("must succeed"); Pallet::::register( @@ -162,21 +162,21 @@ benchmarks! { let user: T::AccountId = account("account id", 0u32, 0u32); Pallet::::set_transact_info( RawOrigin::Root.into(), - Box::new(xcm::VersionedLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V4(location.clone())), extra_weight, max_weight, Some(extra_weight) ).expect("must succeed"); Pallet::::set_fee_per_second( RawOrigin::Root.into(), - Box::new(xcm::VersionedLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V4(location.clone())), fee_per_second ).expect("must succeed"); }: { let result = Pallet::::transact_through_sovereign( RawOrigin::Root.into(), - Box::new(xcm::VersionedLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V4(location.clone())), user.clone(), CurrencyPayment { // This might involve a db Read when translating, therefore worst case @@ -215,19 +215,19 @@ benchmarks! { let user: T::AccountId = account("account id", 0u32, 0u32); Pallet::::set_transact_info( RawOrigin::Root.into(), - Box::new(xcm::VersionedLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V4(location.clone())), extra_weight, max_weight, Some(extra_weight) ).expect("must succeed"); Pallet::::set_fee_per_second( RawOrigin::Root.into(), - Box::new(xcm::VersionedLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V4(location.clone())), fee_per_second ).expect("must succeed"); }: _( RawOrigin::Signed(user.clone()), - Box::new(xcm::VersionedLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V4(location.clone())), CurrencyPayment { // This might involve a db Read when translating, therefore worst case currency: Currency::AsCurrencyId(currency), @@ -254,14 +254,14 @@ benchmarks! { let user: T::AccountId = account("account id", 0u32, 0u32); Pallet::::set_transact_info( RawOrigin::Root.into(), - Box::new(xcm::VersionedLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V4(location.clone())), extra_weight, max_weight, Some(extra_weight) ).expect("must succeed"); Pallet::::set_fee_per_second( RawOrigin::Root.into(), - Box::new(xcm::VersionedLocation::V3(location.clone())), + Box::new(xcm::VersionedLocation::V4(location.clone())), fee_per_second ).expect("must succeed"); }: _( diff --git a/precompiles/xtokens/src/tests.rs b/precompiles/xtokens/src/tests.rs index d80f1acc9e..3240504d0e 100644 --- a/precompiles/xtokens/src/tests.rs +++ b/precompiles/xtokens/src/tests.rs @@ -23,7 +23,7 @@ use orml_xtokens::Event as XtokensEvent; use precompile_utils::{prelude::*, testing::*}; use sp_core::U256; use sp_runtime::traits::Convert; -use xcm::latest::{Asset, AssetId, Assets, Fungibility, Junction, Junctions, Location}; +use xcm::latest::{Asset, AssetId, Assets, Fungibility, Junction, Location}; fn precompiles() -> Precompiles { PrecompilesValue::get() diff --git a/runtime/moonbase/tests/xcm_mock/statemint_like.rs b/runtime/moonbase/tests/xcm_mock/statemint_like.rs index 18ffad9742..65909e6578 100644 --- a/runtime/moonbase/tests/xcm_mock/statemint_like.rs +++ b/runtime/moonbase/tests/xcm_mock/statemint_like.rs @@ -235,7 +235,7 @@ pub type XcmOriginToTransactDispatchOrigin = ( // transaction from the Root origin. ParentAsSuperuser, // Native signed account converter; this just converts an `AccountId32` origin into a normal - // `Origin::Signed` origin of the same 32-byte value. + // `RuntimeOrigin::signed` origin of the same 32-byte value. SignedAccountId32AsNative, // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. pallet_xcm::XcmPassthrough, diff --git a/runtime/moonbeam/tests/common/mod.rs b/runtime/moonbeam/tests/common/mod.rs index 353a68a64c..1db8374af5 100644 --- a/runtime/moonbeam/tests/common/mod.rs +++ b/runtime/moonbeam/tests/common/mod.rs @@ -26,7 +26,7 @@ pub use moonbeam_runtime::{ asset_config::AssetRegistrarMetadata, currency::{GIGAWEI, GLMR, SUPPLY_FACTOR, WEI}, xcm_config::AssetType, - AccountId, AssetId, AssetManager, Assets, AuthorInherent, Balance, Balances, CrowdloanRewards, + AccountId, AssetId, AssetManager, AuthorInherent, Balance, Balances, CrowdloanRewards, Ethereum, Executive, Header, InflationInfo, ParachainStaking, Range, Runtime, RuntimeCall, RuntimeEvent, System, TransactionConverter, TransactionPaymentAsGasPrice, UncheckedExtrinsic, HOURS, WEEKS, @@ -301,7 +301,7 @@ impl ExtBuilder { ) .unwrap(); for (account, balance) in xcm_asset_initialization.balances { - Assets::mint( + moonbeam_runtime::Assets::mint( origin_of(AssetManager::account_id()), asset_id.into(), account, diff --git a/runtime/moonbeam/tests/integration_test.rs b/runtime/moonbeam/tests/integration_test.rs index 63f53c870c..dfe1b74357 100644 --- a/runtime/moonbeam/tests/integration_test.rs +++ b/runtime/moonbeam/tests/integration_test.rs @@ -1591,10 +1591,11 @@ fn root_can_change_default_xcm_vers() { let source_location = AssetType::Xcm(Location::parent()); let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: [1u8; 32], - }), + }] + .into(), }; let source_id: moonbeam_runtime::AssetId = source_location.clone().into(); // Default XCM version is not set yet, so xtokens should fail because it does not @@ -1604,7 +1605,7 @@ fn root_can_change_default_xcm_vers() { origin_of(AccountId::from(ALICE)), CurrencyId::ForeignAsset(source_id), 100_000_000_000_000, - Box::new(xcm::VersionedLocation::V3(dest.clone())), + Box::new(xcm::VersionedLocation::V4(dest.clone())), WeightLimit::Limited(4000000000.into()) ), orml_xtokens::Error::::XcmExecutionFailed @@ -1621,7 +1622,7 @@ fn root_can_change_default_xcm_vers() { origin_of(AccountId::from(ALICE)), CurrencyId::ForeignAsset(source_id), 100_000_000_000_000, - Box::new(xcm::VersionedLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V4(dest)), WeightLimit::Limited(4000000000.into()) )); }) @@ -1680,7 +1681,10 @@ fn xcm_asset_erc20_precompiles_supply_and_balance() { ); // Assert the asset has been created with the correct supply - assert_eq!(Assets::total_supply(relay_asset_id), 1_000 * GLMR); + assert_eq!( + moonbeam_runtime::Assets::total_supply(relay_asset_id), + 1_000 * GLMR + ); // Access totalSupply through precompile. Important that the context is correct Precompiles::new() @@ -1895,10 +1899,10 @@ fn xtokens_precompile_transfer() { // Alice has 1000 tokens. She should be able to send through precompile let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); // We use the address of the asset as an identifier of the asset we want to transfer @@ -1945,10 +1949,10 @@ fn xtokens_precompile_transfer_multiasset() { // Alice has 1000 tokens. She should be able to send through precompile let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); // This time we transfer it through TransferMultiAsset @@ -1988,18 +1992,19 @@ fn make_sure_glmr_can_be_transferred_precompile() { .execute_with(|| { let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: [1u8; 32], - }), + }] + .into(), }; assert_ok!(XTokens::transfer_multiasset( origin_of(AccountId::from(ALICE)), - Box::new(VersionedAsset::V3(Asset { - id: Concrete(moonbeam_runtime::xcm_config::SelfReserve::get()), + Box::new(VersionedAsset::V4(Asset { + id: AssetId(moonbeam_runtime::xcm_config::SelfReserve::get()), fun: Fungible(1000) })), - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(40000.into()) )); }); @@ -2022,16 +2027,17 @@ fn make_sure_glmr_can_be_transferred() { .execute_with(|| { let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: [1u8; 32], - }), + }] + .into(), }; assert_ok!(XTokens::transfer( origin_of(AccountId::from(ALICE)), CurrencyId::SelfReserve, 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(40000.into()) )); }); @@ -2053,22 +2059,23 @@ fn make_sure_polkadot_xcm_cannot_be_called() { .execute_with(|| { let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: [1u8; 32], - }), + }] + .into(), }; - let multiassets: Assets = [Asset { - id: Concrete(moonbeam_runtime::xcm_config::SelfLocation::get()), + let assets: Assets = [Asset { + id: AssetId(moonbeam_runtime::xcm_config::SelfLocation::get()), fun: Fungible(1000), }] .to_vec() .into(); assert_noop!( RuntimeCall::PolkadotXcm(pallet_xcm::Call::::reserve_transfer_assets { - dest: Box::new(VersionedLocation::V3(dest.clone())), - beneficiary: Box::new(VersionedLocation::V3(dest)), - assets: Box::new(VersionedAssets::V3(multiassets)), + dest: Box::new(VersionedLocation::V4(dest.clone())), + beneficiary: Box::new(VersionedLocation::V4(dest)), + assets: Box::new(VersionedAssets::V4(assets)), fee_asset_item: 0, }) .dispatch(::RuntimeOrigin::signed( @@ -2193,7 +2200,7 @@ fn transactor_cannot_use_more_than_max_weight() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( root_origin(), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000.into(), @@ -2203,7 +2210,7 @@ fn transactor_cannot_use_more_than_max_weight() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( root_origin(), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1, )); @@ -2213,7 +2220,7 @@ fn transactor_cannot_use_more_than_max_weight() { moonbeam_runtime::xcm_config::Transactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), fee_amount: None @@ -2274,14 +2281,16 @@ fn call_xtokens_with_fee() { let source_location = AssetType::Xcm(Location::parent()); let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: [1u8; 32], - }), + }] + .into(), }; let source_id: moonbeam_runtime::AssetId = source_location.clone().into(); - let before_balance = Assets::balance(source_id, &AccountId::from(ALICE)); + let before_balance = + moonbeam_runtime::Assets::balance(source_id, &AccountId::from(ALICE)); // We are able to transfer with fee assert_ok!(XTokens::transfer_with_fee( @@ -2289,11 +2298,12 @@ fn call_xtokens_with_fee() { CurrencyId::ForeignAsset(source_id), 100_000_000_000_000, 100, - Box::new(xcm::VersionedLocation::V3(dest.clone())), + Box::new(xcm::VersionedLocation::V4(dest.clone())), WeightLimit::Limited(4000000000.into()) )); - let after_balance = Assets::balance(source_id, &AccountId::from(ALICE)); + let after_balance = + moonbeam_runtime::Assets::balance(source_id, &AccountId::from(ALICE)); // At least these much (plus fees) should have been charged assert_eq!(before_balance - 100_000_000_000_000 - 100, after_balance); }); @@ -2313,17 +2323,17 @@ fn test_xcm_utils_ml_tp_account() { ALICE, xcm_utils_precompile_address, XcmUtilsPCall::multilocation_to_address { - multilocation: Location::parent(), + location: Location::parent(), }, ) .expect_cost(1000) .expect_no_logs() .execute_returns(Address(expected_address_parent)); - let parachain_2000_multilocation = Location::new(1, X1(Parachain(2000))); + let parachain_2000_location = Location::new(1, [Parachain(2000)]); let expected_address_parachain: H160 = SiblingParachainConvertsVia::::convert_location( - ¶chain_2000_multilocation, + ¶chain_2000_location, ) .unwrap() .into(); @@ -2333,27 +2343,28 @@ fn test_xcm_utils_ml_tp_account() { ALICE, xcm_utils_precompile_address, XcmUtilsPCall::multilocation_to_address { - multilocation: parachain_2000_multilocation, + location: parachain_2000_location, }, ) .expect_cost(1000) .expect_no_logs() .execute_returns(Address(expected_address_parachain)); - let alice_in_parachain_2000_multilocation = Location::new( + let alice_in_parachain_2000_location = Location::new( 1, - X2( + [ Parachain(2000), AccountKey20 { network: None, key: ALICE, }, - ), + ], ); - let expected_address_alice_in_parachain_2000: H160 = - xcm_builder::HashedDescriptionDescribeFamilyAllTerminal::::convert_location( - &alice_in_parachain_2000_multilocation, - ) + let expected_address_alice_in_parachain_2000 = + xcm_builder::HashedDescription::< + AccountId, + xcm_builder::DescribeFamily, + >::convert_location(&alice_in_parachain_2000_location) .unwrap() .into(); @@ -2362,7 +2373,7 @@ fn test_xcm_utils_ml_tp_account() { ALICE, xcm_utils_precompile_address, XcmUtilsPCall::multilocation_to_address { - multilocation: alice_in_parachain_2000_multilocation, + location: alice_in_parachain_2000_location, }, ) .expect_cost(1000) @@ -2378,7 +2389,7 @@ fn test_xcm_utils_weight_message() { let expected_weight = XcmWeight::::clear_origin().ref_time(); - let message: Vec = xcm::VersionedXcm::<()>::V3(Xcm(vec![ClearOrigin])).encode(); + let message: Vec = xcm::VersionedXcm::<()>::V4(Xcm(vec![ClearOrigin])).encode(); let input = XcmUtilsPCall::weight_message { message: message.into(), @@ -2396,9 +2407,9 @@ fn test_xcm_utils_weight_message() { fn test_xcm_utils_get_units_per_second() { ExtBuilder::default().build().execute_with(|| { let xcm_utils_precompile_address = H160::from_low_u64_be(2060); - let multilocation = SelfReserve::get(); + let location = SelfReserve::get(); - let input = XcmUtilsPCall::get_units_per_second { multilocation }; + let input = XcmUtilsPCall::get_units_per_second { location }; let expected_units = WEIGHT_REF_TIME_PER_SECOND as u128 * moonbeam_runtime::currency::WEIGHT_FEE; diff --git a/runtime/moonbeam/tests/xcm_mock/parachain.rs b/runtime/moonbeam/tests/xcm_mock/parachain.rs index e4cc09c551..9ae6224d95 100644 --- a/runtime/moonbeam/tests/xcm_mock/parachain.rs +++ b/runtime/moonbeam/tests/xcm_mock/parachain.rs @@ -27,9 +27,7 @@ use frame_support::{ PalletId, }; -use cumulus_primitives_core::relay_chain::HrmpChannelId; use frame_system::{pallet_prelude::BlockNumberFor, EnsureNever, EnsureRoot}; -use orml_traits::parameter_type_with_key; use pallet_xcm::migration::v1::VersionUncheckedMigrateToV1; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use sp_core::H256; @@ -40,18 +38,20 @@ use sp_runtime::{ use sp_std::{convert::TryFrom, prelude::*}; use xcm::{latest::prelude::*, Version as XcmVersion, VersionedXcm}; +use cumulus_primitives_core::relay_chain::HrmpChannelId; +use orml_traits::parameter_type_with_key; use pallet_ethereum::PostLogContent; use polkadot_core_primitives::BlockNumber as RelayBlockNumber; use polkadot_parachain::primitives::{Id as ParaId, Sibling}; use xcm::latest::{ AssetId as XcmAssetId, Error as XcmError, ExecuteXcm, Junction::{PalletInstance, Parachain}, - Junctions, Location, NetworkId, Outcome, Xcm, + Location, NetworkId, Outcome, Xcm, }; use xcm_builder::{ AccountKey20Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, ConvertedConcreteId, CurrencyAdapter as XcmCurrencyAdapter, - EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, FungiblesAdapter, IsConcrete, + AllowTopLevelPaidExecutionFrom, ConvertedConcreteId, EnsureXcmOrigin, FixedRateOfFungible, + FixedWeightBounds, FungibleAdapter as XcmCurrencyAdapter, FungiblesAdapter, IsConcrete, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountKey20AsNative, SovereignSignedViaLocation, TakeWeightCredit, WithComputedOrigin, @@ -78,6 +78,7 @@ parameter_types! { impl frame_system::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type Hash = H256; @@ -119,7 +120,6 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } @@ -182,7 +182,10 @@ pub type LocationToAccountId = ( SiblingParachainConvertsVia, AccountKey20Aliases, // Generate remote accounts according to polkadot standards - xcm_builder::HashedDescriptionDescribeFamilyAllTerminal, + xcm_builder::HashedDescription< + AccountId, + xcm_builder::DescribeFamily, + >, ); /// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, @@ -241,7 +244,7 @@ pub type LocalAssetTransactor = XcmCurrencyAdapter< // Use this currency when it is a fungible asset matching any of the locations in // SelfReserveRepresentations IsConcrete, - // We can convert the MultiLocations with our converter above: + // We can convert the Locations with our converter above: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, @@ -293,20 +296,23 @@ pub type XcmFeesToAccount_ = xcm_primitives::XcmFeesToAccount< parameter_types! { // We cannot skip the native trader for some specific tests, so we will have to work with // a native trader that charges same number of units as weight - pub ParaTokensPerSecond: (XcmAssetId, u128, u128) = - (Concrete(SelfReserve::get()), 1000000000000, 0); + pub ParaTokensPerSecond: (XcmAssetId, u128, u128) = ( + AssetId(SelfReserve::get()), + 1000000000000, + 0, + ); } parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Polkadot; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorLocation = - X2(GlobalConsensus(RelayNetwork::get()), Parachain(MsgQueue::parachain_id().into())); + [GlobalConsensus(RelayNetwork::get()), Parachain(MsgQueue::parachain_id().into())].into(); pub SelfReserve: Location = Location { parents:0, - interior: Junctions::X1( + interior: [ PalletInstance(::index() as u8) - ) + ].into() }; pub const MaxAssetsIntoHolding: u32 = 64; } @@ -352,6 +358,8 @@ impl Config for XcmConfig { type UniversalAliases = Nothing; type SafeCallFilter = Everything; type Aliasers = Nothing; + + type TransactionalProcessor = (); } impl cumulus_pallet_xcm::Config for Runtime { @@ -367,9 +375,9 @@ pub enum CurrencyId { } // How to convert from CurrencyId to Location -pub struct CurrencyIdtoMultiLocation(sp_std::marker::PhantomData); +pub struct CurrencyIdToLocation(sp_std::marker::PhantomData); impl sp_runtime::traits::Convert> - for CurrencyIdtoMultiLocation + for CurrencyIdToLocation where AssetXConverter: MaybeEquivalence, { @@ -392,7 +400,7 @@ parameter_types! { parents:1, interior: [ Parachain(MsgQueue::parachain_id().into()) - ] + ].into() }; } @@ -412,7 +420,7 @@ impl orml_xtokens::Config for Runtime { type CurrencyId = CurrencyId; type AccountIdToLocation = xcm_primitives::AccountIdToLocation; type CurrencyIdConvert = - CurrencyIdtoMultiLocation>; + CurrencyIdToLocation>; type XcmExecutor = XcmExecutor; type SelfLocation = SelfLocation; type Weigher = xcm_builder::FixedWeightBounds; @@ -420,7 +428,7 @@ impl orml_xtokens::Config for Runtime { type UniversalLocation = UniversalLocation; type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; - type MultiLocationsFilter = Everything; + type LocationsFilter = Everything; type ReserveProvider = xcm_primitives::AbsoluteAndRelativeReserve; } @@ -525,15 +533,25 @@ pub mod mock_msg_queue { let hash = Encode::using_encoded(&xcm, T::Hashing::hash); let (result, event) = match Xcm::::try_from(xcm) { Ok(xcm) => { - let location = Location::new(1, Junctions::X1(Parachain(sender.into()))); + let location = Location::new(1, [Parachain(sender.into())]); let mut id = [0u8; 32]; id.copy_from_slice(hash.as_ref()); - match T::XcmExecutor::execute_xcm(location, xcm, id, max_weight) { - Outcome::Error(e) => (Err(e.clone()), Event::Fail(Some(hash), e)), - Outcome::Complete(w) => (Ok(w), Event::Success(Some(hash))), + match T::XcmExecutor::prepare_and_execute( + location, + xcm, + &mut id, + max_weight, + Weight::zero(), + ) { + Outcome::Error { error } => { + (Err(error.clone()), Event::Fail(Some(hash), error)) + } + Outcome::Complete { used } => (Ok(used), Event::Success(Some(hash))), // As far as the caller is concerned, this was dispatched without error, so // we just report the weight used. - Outcome::Incomplete(w, e) => (Ok(w), Event::Fail(Some(hash), e)), + Outcome::Incomplete { used, error } => { + (Ok(used), Event::Fail(Some(hash), error)) + } } } Err(()) => ( @@ -577,7 +595,7 @@ pub mod mock_msg_queue { limit: Weight, ) -> Weight { for (_i, (_sent_at, data)) in iter.enumerate() { - let id = sp_io::hashing::blake2_256(&data[..]); + let mut id = sp_io::hashing::blake2_256(&data[..]); let maybe_msg = VersionedXcm::::decode(&mut &data[..]) .map(Xcm::::try_from); match maybe_msg { @@ -588,7 +606,14 @@ pub mod mock_msg_queue { Self::deposit_event(Event::UnsupportedVersion(id)); } Ok(Ok(x)) => { - let outcome = T::XcmExecutor::execute_xcm(Parent, x, id, limit); + let outcome = T::XcmExecutor::prepare_and_execute( + Parent, + x, + &mut id, + limit, + Weight::zero(), + ); + Self::deposit_event(Event::ExecutedDownward(id, outcome)); } } @@ -763,7 +788,7 @@ impl pallet_asset_manager::AssetRegistrar for AssetRegistrar { fn destroy_foreign_asset(asset: AssetId) -> DispatchResult { // Mark the asset as destroying - Assets::start_destroy(RuntimeOrigin::root(), asset)?; + Assets::start_destroy(RuntimeOrigin::root(), asset.into())?; Ok(()) } @@ -996,7 +1021,6 @@ impl pallet_ethereum::Config for Runtime { type PostLogContent = PostBlockAndTxnHashes; type ExtraDataLength = ConstU32<30>; } - parameter_types! { pub ReservedXcmpWeight: Weight = Weight::from_parts(u64::max_value(), 0); } diff --git a/runtime/moonbeam/tests/xcm_mock/relay_chain.rs b/runtime/moonbeam/tests/xcm_mock/relay_chain.rs index d889189165..4b068d9638 100644 --- a/runtime/moonbeam/tests/xcm_mock/relay_chain.rs +++ b/runtime/moonbeam/tests/xcm_mock/relay_chain.rs @@ -40,9 +40,10 @@ use xcm::latest::prelude::*; use xcm_builder::{ Account32Hash, AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, - ChildSystemParachainAsSuperuser, CurrencyAdapter as XcmCurrencyAdapter, FixedRateOfFungible, - FixedWeightBounds, IsConcrete, ProcessXcmMessage, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, WithComputedOrigin, + ChildSystemParachainAsSuperuser, FixedRateOfFungible, FixedWeightBounds, + FungibleAdapter as XcmCurrencyAdapter, IsConcrete, ProcessXcmMessage, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + WithComputedOrigin, }; use xcm_executor::{Config, XcmExecutor}; pub type AccountId = AccountId32; @@ -56,6 +57,7 @@ parameter_types! { impl frame_system::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type Hash = H256; @@ -97,7 +99,6 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } @@ -109,7 +110,9 @@ impl pallet_utility::Config for Runtime { type PalletsOrigin = OriginCaller; } -impl shared::Config for Runtime {} +impl shared::Config for Runtime { + type DisabledValidators = (); +} impl configuration::Config for Runtime { type WeightInfo = configuration::TestWeightInfo; @@ -142,7 +145,7 @@ type LocalOriginConverter = ( parameter_types! { pub const BaseXcmWeight: Weight = Weight::from_parts(1000u64, 1000u64); - pub KsmPerSecond: (AssetId, u128, u128) = (Concrete(KsmLocation::get()), 1, 1); + pub KsmPerSecond: (AssetId, u128, u128) = (AssetId(KsmLocation::get()), 1, 1); pub const MaxInstructions: u32 = 100; pub const MaxAssetsIntoHolding: u32 = 64; pub MatcherLocation: Location = Location::here(); @@ -168,7 +171,7 @@ pub type XcmBarrier = ( ); parameter_types! { - pub Kusama: AssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(KsmLocation::get()) }); + pub Kusama: AssetFilter = Wild(AllOf { fun: WildFungible, id: AssetId(KsmLocation::get()) }); pub Statemine: Location = Parachain(4).into(); pub KusamaForStatemine: (AssetFilter, Location) = (Kusama::get(), Statemine::get()); } @@ -201,6 +204,7 @@ impl Config for XcmConfig { type UniversalAliases = Nothing; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = (); } pub type LocalOriginToLocation = SignedToAccountId32; @@ -272,6 +276,7 @@ impl paras::Config for Runtime { type NextSessionRotation = TestNextSessionRotation; type QueueFootprinter = (); type OnNewHead = (); + type AssignCoretime = (); } impl dmp::Config for Runtime {} @@ -404,7 +409,6 @@ impl hrmp::WeightInfo for TestHrmpWeightInfo { fn force_open_hrmp_channel(_: u32) -> Weight { Weight::from_parts(1, 0) } - fn establish_system_channel() -> Weight { Weight::from_parts(1, 0) } diff --git a/runtime/moonbeam/tests/xcm_mock/statemint_like.rs b/runtime/moonbeam/tests/xcm_mock/statemint_like.rs index 271cc057b6..65909e6578 100644 --- a/runtime/moonbeam/tests/xcm_mock/statemint_like.rs +++ b/runtime/moonbeam/tests/xcm_mock/statemint_like.rs @@ -17,8 +17,8 @@ //! Relay chain runtime mock. use frame_support::{ - construct_runtime, match_types, parameter_types, - traits::{AsEnsureOriginWithArg, Everything, Nothing}, + construct_runtime, parameter_types, + traits::{AsEnsureOriginWithArg, Contains, Everything, Nothing}, weights::Weight, }; use frame_system::{EnsureRoot, EnsureSigned}; @@ -39,7 +39,7 @@ use xcm::VersionedXcm; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, + ConvertedConcreteId, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, FungibleAdapter, FungiblesAdapter, IsConcrete, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, @@ -60,6 +60,7 @@ parameter_types! { impl frame_system::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type Hash = H256; @@ -101,7 +102,6 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } @@ -160,11 +160,11 @@ parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Kusama; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorLocation = - X2(GlobalConsensus(RelayNetwork::get()), Parachain(MsgQueue::parachain_id().into())); + [GlobalConsensus(RelayNetwork::get()), Parachain(MsgQueue::parachain_id().into())].into(); pub Local: Location = Here.into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); pub KsmPerSecond: (xcm::latest::prelude::AssetId, u128, u128) = - (Concrete(KsmLocation::get()), 1, 1); + (AssetId(KsmLocation::get()), 1, 1); } /// Type for specifying how a `Location` can be converted into an `AccountId`. This is used @@ -180,7 +180,7 @@ pub type LocationToAccountId = ( ); /// Means for transacting the native currency on this chain. -pub type CurrencyTransactor = CurrencyAdapter< +pub type CurrencyTransactor = FungibleAdapter< // Use this currency: Balances, // Use this currency when it is a fungible asset matching the given location or name: @@ -247,17 +247,28 @@ parameter_types! { pub const MaxInstructions: u32 = 100; } -match_types! { - pub type ParentOrParentsExecutivePlurality: impl Contains = { - Location { parents: 1, interior: Here } | - Location { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } - }; +pub struct ParentOrParentsExecutivePlurality; +impl Contains for ParentOrParentsExecutivePlurality { + fn contains(location: &Location) -> bool { + matches!( + location.unpack(), + (1, []) + | ( + 1, + [Plurality { + id: BodyId::Executive, + .. + }] + ) + ) + } } -match_types! { - pub type ParentOrSiblings: impl Contains = { - Location { parents: 1, interior: Here } | - Location { parents: 1, interior: [_] } - }; + +pub struct ParentOrSiblings; +impl Contains for ParentOrSiblings { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, []) | (1, [_])) + } } pub type Barrier = ( @@ -303,6 +314,8 @@ impl Config for XcmConfig { type UniversalAliases = Nothing; type SafeCallFilter = Everything; type Aliasers = Nothing; + + type TransactionalProcessor = (); } /// No local origins on this chain are allowed to dispatch XCM sends/executions. @@ -413,15 +426,25 @@ pub mod mock_msg_queue { let hash = Encode::using_encoded(&xcm, T::Hashing::hash); let (result, event) = match Xcm::::try_from(xcm) { Ok(xcm) => { - let location = Location::new(1, Junctions::X1(Parachain(sender.into()))); + let location = Location::new(1, [Parachain(sender.into())]); let mut id = [0u8; 32]; id.copy_from_slice(hash.as_ref()); - match T::XcmExecutor::execute_xcm(location, xcm, id, max_weight) { - Outcome::Error(e) => (Err(e.clone()), Event::Fail(Some(hash), e)), - Outcome::Complete(w) => (Ok(w), Event::Success(Some(hash))), + match T::XcmExecutor::prepare_and_execute( + location, + xcm, + &mut id, + max_weight, + Weight::zero(), + ) { + Outcome::Error { error } => { + (Err(error.clone()), Event::Fail(Some(hash), error)) + } + Outcome::Complete { used } => (Ok(used), Event::Success(Some(hash))), // As far as the caller is concerned, this was dispatched without error, so // we just report the weight used. - Outcome::Incomplete(w, e) => (Ok(w), Event::Fail(Some(hash), e)), + Outcome::Incomplete { used, error } => { + (Ok(used), Event::Fail(Some(hash), error)) + } } } Err(()) => ( @@ -465,7 +488,7 @@ pub mod mock_msg_queue { limit: Weight, ) -> Weight { for (_i, (_sent_at, data)) in iter.enumerate() { - let id = sp_io::hashing::blake2_256(&data[..]); + let mut id = sp_io::hashing::blake2_256(&data[..]); let maybe_msg = VersionedXcm::::decode(&mut &data[..]) .map(Xcm::::try_from); match maybe_msg { @@ -476,7 +499,14 @@ pub mod mock_msg_queue { Self::deposit_event(Event::UnsupportedVersion(id)); } Ok(Ok(x)) => { - let outcome = T::XcmExecutor::execute_xcm(Parent, x, id, limit); + let outcome = T::XcmExecutor::prepare_and_execute( + Parent, + x, + &mut id, + limit, + Weight::zero(), + ); + Self::deposit_event(Event::ExecutedDownward(id, outcome)); } } diff --git a/runtime/moonbeam/tests/xcm_tests.rs b/runtime/moonbeam/tests/xcm_tests.rs index e38a43a4aa..30883c9b54 100644 --- a/runtime/moonbeam/tests/xcm_tests.rs +++ b/runtime/moonbeam/tests/xcm_tests.rs @@ -29,9 +29,12 @@ use pallet_xcm_transactor::{ Currency, CurrencyPayment, HrmpInitParams, HrmpOperation, TransactWeights, }; use sp_core::ConstU32; -use xcm::latest::prelude::*; +use xcm::latest::prelude::{ + AccountId32, AccountKey20, All, BuyExecution, ClearOrigin, DepositAsset, GeneralIndex, + Junction, Junctions, Limited, Location, OriginKind, PalletInstance, Parachain, QueryResponse, + Reanchorable, Response, WeightLimit, WithdrawAsset, Xcm, +}; use xcm::{VersionedLocation, WrapVersion}; -use xcm_builder::HashedDescriptionDescribeFamilyAllTerminal; use xcm_executor::traits::ConvertLocation; use xcm_mock::parachain; use xcm_mock::relay_chain; @@ -81,8 +84,8 @@ fn receive_relay_asset_from_relay() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 123).into()), 0, )); }); @@ -137,8 +140,8 @@ fn send_relay_asset_to_relay() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 123).into()), 0, )); }); @@ -157,10 +160,11 @@ fn send_relay_asset_to_relay() { // We now send back some money to the relay let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: RELAYALICE.into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -168,7 +172,7 @@ fn send_relay_asset_to_relay() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 123, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -241,8 +245,8 @@ fn send_relay_asset_to_para_b() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 123).into()), 0, )); }); @@ -255,13 +259,14 @@ fn send_relay_asset_to_para_b() { // Now send relay asset from para A to para B let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaA::execute_with(|| { @@ -269,7 +274,7 @@ fn send_relay_asset_to_para_b() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -290,7 +295,7 @@ fn send_para_a_asset_to_para_b() { MockNet::reset(); // This represents the asset in paraA - let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -320,13 +325,14 @@ fn send_para_a_asset_to_para_b() { // Send para A asset from para A to para B let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; // Native token is substracted in paraA @@ -336,7 +342,7 @@ fn send_para_a_asset_to_para_b() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(800000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -360,7 +366,7 @@ fn send_para_a_asset_from_para_b_to_para_c() { MockNet::reset(); // Represents para A asset - let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -406,20 +412,21 @@ fn send_para_a_asset_from_para_b_to_para_c() { let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaA::execute_with(|| { assert_ok!(XTokens::transfer( parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -440,13 +447,14 @@ fn send_para_a_asset_from_para_b_to_para_c() { // Send para A asset from para B to para C let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(3), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaB::execute_with(|| { @@ -454,7 +462,7 @@ fn send_para_a_asset_from_para_b_to_para_c() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -470,7 +478,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { MockNet::reset(); // para A asset - let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -500,13 +508,14 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { // Send para A asset to para B let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaA::execute_with(|| { @@ -514,7 +523,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -535,20 +544,21 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { // Send back para A asset to para A let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(1), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaB::execute_with(|| { assert_ok!(XTokens::transfer( parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -609,8 +619,8 @@ fn receive_relay_asset_with_trader() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 100).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 100).into()), 0, )); }); @@ -627,7 +637,7 @@ fn receive_relay_asset_with_trader() { fn send_para_a_asset_to_para_b_with_trader() { MockNet::reset(); - let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -655,13 +665,14 @@ fn send_para_a_asset_to_para_b_with_trader() { let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; // In destination chain, we only need 4 weight @@ -671,7 +682,7 @@ fn send_para_a_asset_to_para_b_with_trader() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(10u64, DEFAULT_PROOF_SIZE)) )); }); @@ -701,7 +712,7 @@ fn send_para_a_asset_to_para_b_with_trader() { fn send_para_a_asset_to_para_b_with_trader_and_fee() { MockNet::reset(); - let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -730,13 +741,14 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; // we use transfer_with_fee @@ -746,7 +758,7 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { parachain::CurrencyId::SelfReserve, 100, 1, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(800000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -809,8 +821,8 @@ fn error_when_not_paying_enough() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 5).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 5).into()), 0, )); }); @@ -852,7 +864,7 @@ fn transact_through_derivative_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000000000.into(), @@ -861,7 +873,7 @@ fn transact_through_derivative_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), WEIGHT_REF_TIME_PER_SECOND as u128, )); }); @@ -878,8 +890,8 @@ fn transact_through_derivative_multilocation() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 4000003100u128).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 4000003100u128).into()), 0, )); }); @@ -903,10 +915,11 @@ fn transact_through_derivative_multilocation() { let registered_address = derivative_account_id(para_a_account(), 0); let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: registered_address.clone().into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -915,7 +928,7 @@ fn transact_through_derivative_multilocation() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -956,7 +969,7 @@ fn transact_through_derivative_multilocation() { parachain::MockTransactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), fee_amount: None @@ -1020,8 +1033,8 @@ fn transact_through_derivative_with_custom_fee_weight() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 4000003100u128).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 4000003100u128).into()), 0, )); }); @@ -1045,10 +1058,11 @@ fn transact_through_derivative_with_custom_fee_weight() { let registered_address = derivative_account_id(para_a_account(), 0); let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: registered_address.clone().into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -1057,7 +1071,7 @@ fn transact_through_derivative_with_custom_fee_weight() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1099,7 +1113,7 @@ fn transact_through_derivative_with_custom_fee_weight() { parachain::MockTransactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), // 1-1 fee weight mapping @@ -1174,8 +1188,8 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 4000009100u128).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 4000009100u128).into()), 0, )); }); @@ -1199,10 +1213,11 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { let registered_address = derivative_account_id(para_a_account(), 0); let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: registered_address.clone().into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -1211,7 +1226,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1253,7 +1268,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { parachain::MockTransactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), // 1-1 fee weight mapping @@ -1317,7 +1332,7 @@ fn transact_through_sovereign() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000000000.into(), @@ -1326,7 +1341,7 @@ fn transact_through_sovereign() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), WEIGHT_REF_TIME_PER_SECOND as u128, )); }); @@ -1340,8 +1355,8 @@ fn transact_through_sovereign() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 4000003100u128).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 4000003100u128).into()), 0, )); }); @@ -1364,10 +1379,11 @@ fn transact_through_sovereign() { let registered_address = derivative_account_id(para_a_account(), 0); let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: registered_address.clone().into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -1376,7 +1392,7 @@ fn transact_through_sovereign() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1397,7 +1413,7 @@ fn transact_through_sovereign() { // We send the xcm transact operation to parent let dest = Location { parents: 1, - interior: Here, + interior: /* Here */ [].into(), }; // Encode the call. Balances transact to para_a_account @@ -1426,10 +1442,10 @@ fn transact_through_sovereign() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_sovereign( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V4(dest)), PARAALICE.into(), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), fee_amount: None @@ -1490,8 +1506,8 @@ fn transact_through_sovereign_with_custom_fee_weight() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 4000003100u128).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 4000003100u128).into()), 0, )); }); @@ -1514,10 +1530,11 @@ fn transact_through_sovereign_with_custom_fee_weight() { let registered_address = derivative_account_id(para_a_account(), 0); let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: registered_address.clone().into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -1526,7 +1543,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1547,7 +1564,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { // We send the xcm transact operation to parent let dest = Location { parents: 1, - interior: Here, + interior: /* Here */ [].into(), }; // Encode the call. Balances transact to para_a_account @@ -1577,10 +1594,10 @@ fn transact_through_sovereign_with_custom_fee_weight() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_sovereign( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V4(dest)), PARAALICE.into(), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), // 1-1 fee-weight mapping @@ -1642,8 +1659,8 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 4000009100u128).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 4000009100u128).into()), 0, )); }); @@ -1666,10 +1683,11 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { let registered_address = derivative_account_id(para_a_account(), 0); let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: registered_address.clone().into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -1678,7 +1696,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1699,7 +1717,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { // We send the xcm transact operation to parent let dest = Location { parents: 1, - interior: Here, + interior: /* Here */ [].into(), }; // Encode the call. Balances transact to para_a_account @@ -1729,10 +1747,10 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_sovereign( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V4(dest)), PARAALICE.into(), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), // 1-1 fee-weight mapping @@ -1786,7 +1804,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { }); let response = Response::Version(2); - let querier: Location = Here.into(); + let querier: Location = ([]/* Here */).into(); // This is irrelevant, nothing will be done with this message, // but we need to pass a message as an argument to trigger the storage change @@ -1824,8 +1842,8 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 123).into()), 0, )); @@ -1840,7 +1858,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { pallet_xcm::Event::SupportedVersionChanged { location: Location { parents: 0, - interior: X1(Parachain(1)), + interior: [Parachain(1)].into(), }, version: 1, } @@ -1875,7 +1893,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { pallet_xcm::Event::SupportedVersionChanged { location: Location { parents: 0, - interior: X1(Parachain(1)), + interior: [Parachain(1)].into(), }, version: 2, } @@ -1926,8 +1944,8 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest.clone()).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest.clone()).clone().into()), + Box::new(([] /* Here */, 123).into()), 0, )); }); @@ -1952,8 +1970,8 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 123).into()), 0, )); }); @@ -2004,8 +2022,8 @@ fn receive_assets_with_sufficients_true_allows_non_funded_account_to_receive_ass assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest.clone()).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest.clone()).clone().into()), + Box::new(([] /* Here */, 123).into()), 0, )); }); @@ -2064,8 +2082,8 @@ fn evm_account_receiving_assets_should_handle_sufficients_ref_count() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest.clone()).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest.clone()).clone().into()), + Box::new(([] /* Here */, 123).into()), 0, )); }); @@ -2142,8 +2160,8 @@ fn empty_account_should_not_be_reset() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest.clone()).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest.clone()).clone().into()), + Box::new(([] /* Here */, 123).into()), 0, )); }); @@ -2197,7 +2215,7 @@ fn empty_account_should_not_be_reset() { fn test_statemint_like() { MockNet::reset(); - let dest_para = Location::new(1, X1(Parachain(1))); + let dest_para = Location::new(1, [Parachain(1)]); let sov = xcm_builder::SiblingParachainConvertsVia::< polkadot_parachain::primitives::Sibling, @@ -2207,11 +2225,11 @@ fn test_statemint_like() { let statemint_asset_a_balances = Location::new( 1, - X3( + [ Parachain(4), PalletInstance(5), xcm::latest::prelude::GeneralIndex(0u128), - ), + ], ); let source_location = parachain::AssetType::Xcm(statemint_asset_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -2275,16 +2293,16 @@ fn test_statemint_like() { // Send with new prefix assert_ok!(StatemintChainPalletXcm::reserve_transfer_assets( statemint_like::RuntimeOrigin::signed(RELAYALICE), - Box::new(Location::new(1, X1(Parachain(1))).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), + Box::new(Location::new(1, [Parachain(1)]).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), Box::new( ( - X2( + [ xcm::latest::prelude::PalletInstance( ::index() as u8 ), xcm::latest::prelude::GeneralIndex(0), - ), + ], 123 ) .into() @@ -2315,7 +2333,7 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { // Statemint asset let statemint_asset = Location::new( 1, - X3(Parachain(4u32), PalletInstance(5u8), GeneralIndex(10u128)), + [Parachain(4u32), PalletInstance(5u8), GeneralIndex(10u128)], ); let statemint_location_asset = parachain::AssetType::Xcm(statemint_asset); let source_statemint_asset_id: parachain::AssetId = statemint_location_asset.clone().into(); @@ -2326,7 +2344,7 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { decimals: 12, }; - let dest_para = Location::new(1, X1(Parachain(1))); + let dest_para = Location::new(1, [Parachain(1)]); let sov = xcm_builder::SiblingParachainConvertsVia::< polkadot_parachain::primitives::Sibling, @@ -2376,11 +2394,11 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), Box::new( - VersionedLocation::V3(parachain_beneficiary_from_relay) + VersionedLocation::V4(parachain_beneficiary_from_relay) .clone() .into() ), - Box::new((Here, 200).into()), + Box::new(([] /* Here */, 200).into()), 0, )); }); @@ -2423,20 +2441,20 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { // Send with new prefix assert_ok!(StatemintChainPalletXcm::reserve_transfer_assets( statemint_like::RuntimeOrigin::signed(RELAYALICE), - Box::new(Location::new(1, X1(Parachain(1))).into()), + Box::new(Location::new(1, [Parachain(1)]).into()), Box::new( - VersionedLocation::V3(parachain_beneficiary_from_statemint) + VersionedLocation::V4(parachain_beneficiary_from_statemint) .clone() .into() ), Box::new( ( - X2( + [ xcm::latest::prelude::PalletInstance( ::index() as u8 ), GeneralIndex(10), - ), + ], 125 ) .into() @@ -2447,13 +2465,14 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { let statemint_beneficiary = Location { parents: 1, - interior: X2( + interior: [ Parachain(4), AccountId32 { network: None, id: RELAYBOB.into(), }, - ), + ] + .into(), }; ParaA::execute_with(|| { @@ -2484,7 +2503,7 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { (parachain::CurrencyId::ForeignAsset(source_relay_id), 100) ], 1, - Box::new(VersionedLocation::V3(statemint_beneficiary)), + Box::new(VersionedLocation::V4(statemint_beneficiary)), WeightLimit::Limited(Weight::from_parts(80_000_000u64, 100_000u64)) )); }); @@ -2516,7 +2535,7 @@ fn transact_through_signed_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000000000.into(), @@ -2526,17 +2545,18 @@ fn transact_through_signed_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), WEIGHT_REF_TIME_PER_SECOND as u128, )); ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); let mut descend_origin_multilocation = parachain::SelfLocation::get(); descend_origin_multilocation @@ -2589,9 +2609,9 @@ fn transact_through_signed_multilocation() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), fee_amount: None @@ -2623,10 +2643,11 @@ fn transact_through_signed_multilocation_custom_fee_and_weight() { }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); let mut descend_origin_multilocation = parachain::SelfLocation::get(); descend_origin_multilocation @@ -2680,9 +2701,9 @@ fn transact_through_signed_multilocation_custom_fee_and_weight() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), fee_amount: Some(total_weight as u128) @@ -2714,10 +2735,11 @@ fn transact_through_signed_multilocation_custom_fee_and_weight_refund() { }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); let mut descend_origin_multilocation = parachain::SelfLocation::get(); descend_origin_multilocation @@ -2771,9 +2793,9 @@ fn transact_through_signed_multilocation_custom_fee_and_weight_refund() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), fee_amount: Some(total_weight as u128) @@ -2802,16 +2824,16 @@ fn transact_through_signed_multilocation_para_to_para() { MockNet::reset(); let mut ancestry = Location::parent(); - let para_b_location = Location::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, [Parachain(2)]); - let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, [Parachain(2), PalletInstance(1u8)]); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -2821,33 +2843,32 @@ fn transact_through_signed_multilocation_para_to_para() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); - let mut descend_origin_multilocation = parachain::SelfLocation::get(); - descend_origin_multilocation - .append_with(signed_origin) - .unwrap(); + let mut descend_origin_location = parachain::SelfLocation::get(); + descend_origin_location.append_with(signed_origin).unwrap(); // To convert it to what the paraB will see instead of us - descend_origin_multilocation + descend_origin_location .reanchor(¶_b_location, &ancestry.interior) .unwrap(); - let derived = - HashedDescriptionDescribeFamilyAllTerminal::::convert_location( - &descend_origin_multilocation, - ) - .unwrap(); + let derived = xcm_builder::HashedDescription::< + parachain::AccountId, + xcm_builder::DescribeFamily, + >::convert_location(&descend_origin_location) + .unwrap(); ParaB::execute_with(|| { // free execution, full amount received @@ -2883,9 +2904,9 @@ fn transact_through_signed_multilocation_para_to_para() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V4(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( para_b_balances ))), fee_amount: None @@ -2913,40 +2934,39 @@ fn transact_through_signed_multilocation_para_to_para_refund() { MockNet::reset(); let mut ancestry = Location::parent(); - let para_b_location = Location::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, [Parachain(2)]); - let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, [Parachain(2), PalletInstance(1u8)]); ParaA::execute_with(|| { assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); - let mut descend_origin_multilocation = parachain::SelfLocation::get(); - descend_origin_multilocation - .append_with(signed_origin) - .unwrap(); + let mut descend_origin_location = parachain::SelfLocation::get(); + descend_origin_location.append_with(signed_origin).unwrap(); // To convert it to what the paraB will see instead of us - descend_origin_multilocation + descend_origin_location .reanchor(¶_b_location, &ancestry.interior) .unwrap(); - let derived = - HashedDescriptionDescribeFamilyAllTerminal::::convert_location( - &descend_origin_multilocation, - ) - .unwrap(); + let derived = xcm_builder::HashedDescription::< + parachain::AccountId, + xcm_builder::DescribeFamily, + >::convert_location(&descend_origin_location) + .unwrap(); ParaB::execute_with(|| { // free execution, full amount received @@ -2983,9 +3003,9 @@ fn transact_through_signed_multilocation_para_to_para_refund() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V4(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( para_b_balances ))), fee_amount: Some(overall_weight as u128) @@ -3014,16 +3034,16 @@ fn transact_through_signed_multilocation_para_to_para_ethereum() { MockNet::reset(); let mut ancestry = Location::parent(); - let para_b_location = Location::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, [Parachain(2)]); - let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, [Parachain(2), PalletInstance(1u8)]); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -3033,33 +3053,32 @@ fn transact_through_signed_multilocation_para_to_para_ethereum() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); - let mut descend_origin_multilocation = parachain::SelfLocation::get(); - descend_origin_multilocation - .append_with(signed_origin) - .unwrap(); + let mut descend_origin_location = parachain::SelfLocation::get(); + descend_origin_location.append_with(signed_origin).unwrap(); // To convert it to what the paraB will see instead of us - descend_origin_multilocation + descend_origin_location .reanchor(¶_b_location, &ancestry.interior) .unwrap(); - let derived = - HashedDescriptionDescribeFamilyAllTerminal::::convert_location( - &descend_origin_multilocation, - ) - .unwrap(); + let derived = xcm_builder::HashedDescription::< + parachain::AccountId, + xcm_builder::DescribeFamily, + >::convert_location(&descend_origin_location) + .unwrap(); let mut parachain_b_alice_balances_before = 0; ParaB::execute_with(|| { @@ -3110,9 +3129,9 @@ fn transact_through_signed_multilocation_para_to_para_ethereum() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V4(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( para_b_balances ))), fee_amount: None @@ -3142,16 +3161,16 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() MockNet::reset(); let mut ancestry = Location::parent(); - let para_b_location = Location::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, [Parachain(2)]); - let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, [Parachain(2), PalletInstance(1u8)]); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -3161,33 +3180,32 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); - let mut descend_origin_multilocation = parachain::SelfLocation::get(); - descend_origin_multilocation - .append_with(signed_origin) - .unwrap(); + let mut descend_origin_location = parachain::SelfLocation::get(); + descend_origin_location.append_with(signed_origin).unwrap(); // To convert it to what the paraB will see instead of us - descend_origin_multilocation + descend_origin_location .reanchor(¶_b_location, &ancestry.interior) .unwrap(); - let derived = - HashedDescriptionDescribeFamilyAllTerminal::::convert_location( - &descend_origin_multilocation, - ) - .unwrap(); + let derived = xcm_builder::HashedDescription::< + parachain::AccountId, + xcm_builder::DescribeFamily, + >::convert_location(&descend_origin_location) + .unwrap(); let mut parachain_b_alice_balances_before = 0; ParaB::execute_with(|| { @@ -3239,9 +3257,9 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V4(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( para_b_balances ))), fee_amount: None @@ -3266,16 +3284,16 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_proxy_succeeds() MockNet::reset(); let mut ancestry = Location::parent(); - let para_b_location = Location::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, [Parachain(2)]); - let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, [Parachain(2), PalletInstance(1u8)]); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -3285,33 +3303,32 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_proxy_succeeds() // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); - let mut descend_origin_multilocation = parachain::SelfLocation::get(); - descend_origin_multilocation - .append_with(signed_origin) - .unwrap(); + let mut descend_origin_location = parachain::SelfLocation::get(); + descend_origin_location.append_with(signed_origin).unwrap(); // To convert it to what the paraB will see instead of us - descend_origin_multilocation + descend_origin_location .reanchor(¶_b_location, &ancestry.interior) .unwrap(); - let derived = - HashedDescriptionDescribeFamilyAllTerminal::::convert_location( - &descend_origin_multilocation, - ) - .unwrap(); + let derived = xcm_builder::HashedDescription::< + parachain::AccountId, + xcm_builder::DescribeFamily, + >::convert_location(&descend_origin_location) + .unwrap(); let transfer_recipient = evm_account(); let mut transfer_recipient_balance_before = 0; @@ -3371,9 +3388,9 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_proxy_succeeds() ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V4(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( para_b_balances ))), fee_amount: None @@ -3426,7 +3443,7 @@ fn hrmp_init_accept_through_root() { proposed_max_message_size: 1 }), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), fee_amount: Some(total_fee) @@ -3459,7 +3476,7 @@ fn hrmp_init_accept_through_root() { para_id: 1u32.into() }, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), fee_amount: Some(total_fee) @@ -3517,7 +3534,7 @@ fn hrmp_close_works() { recipient: 2u32.into() }), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), fee_amount: Some(total_fee) diff --git a/runtime/moonriver/tests/common/mod.rs b/runtime/moonriver/tests/common/mod.rs index da3092da5e..626c2e9a3f 100644 --- a/runtime/moonriver/tests/common/mod.rs +++ b/runtime/moonriver/tests/common/mod.rs @@ -26,7 +26,7 @@ pub use moonriver_runtime::{ asset_config::AssetRegistrarMetadata, currency::{GIGAWEI, MOVR, SUPPLY_FACTOR, WEI}, xcm_config::AssetType, - AccountId, AssetId, AssetManager, Assets, AuthorInherent, Balance, Balances, CrowdloanRewards, + AccountId, AssetId, AssetManager, AuthorInherent, Balance, Balances, CrowdloanRewards, Ethereum, Executive, Header, InflationInfo, ParachainStaking, Range, Runtime, RuntimeCall, RuntimeEvent, System, TransactionConverter, TransactionPaymentAsGasPrice, UncheckedExtrinsic, HOURS, WEEKS, @@ -308,7 +308,7 @@ impl ExtBuilder { ) .unwrap(); for (account, balance) in xcm_asset_initialization.balances { - Assets::mint( + moonriver_runtime::Assets::mint( origin_of(AssetManager::account_id()), asset_id.into(), account, diff --git a/runtime/moonriver/tests/integration_test.rs b/runtime/moonriver/tests/integration_test.rs index b13680196d..e0ff65eb0a 100644 --- a/runtime/moonriver/tests/integration_test.rs +++ b/runtime/moonriver/tests/integration_test.rs @@ -1568,10 +1568,11 @@ fn root_can_change_default_xcm_vers() { let source_location = AssetType::Xcm(Location::parent()); let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: [1u8; 32], - }), + }] + .into(), }; let source_id: moonriver_runtime::AssetId = source_location.clone().into(); // Default XCM version is not set yet, so xtokens should fail because it does not @@ -1581,7 +1582,7 @@ fn root_can_change_default_xcm_vers() { origin_of(AccountId::from(ALICE)), CurrencyId::ForeignAsset(source_id), 100_000_000_000_000, - Box::new(xcm::VersionedLocation::V3(dest.clone())), + Box::new(xcm::VersionedLocation::V4(dest.clone())), WeightLimit::Limited(4000000000.into()) ), orml_xtokens::Error::::XcmExecutionFailed @@ -1598,7 +1599,7 @@ fn root_can_change_default_xcm_vers() { origin_of(AccountId::from(ALICE)), CurrencyId::ForeignAsset(source_id), 100_000_000_000_000, - Box::new(xcm::VersionedLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V4(dest)), WeightLimit::Limited(4000000000.into()) )); }) @@ -1656,7 +1657,10 @@ fn xcm_asset_erc20_precompiles_supply_and_balance() { ); // Assert the asset has been created with the correct supply - assert_eq!(Assets::total_supply(relay_asset_id), 1_000 * MOVR); + assert_eq!( + moonriver_runtime::Assets::total_supply(relay_asset_id), + 1_000 * MOVR + ); // Access totalSupply through precompile. Important that the context is correct Precompiles::new() @@ -1869,10 +1873,10 @@ fn xtokens_precompiles_transfer() { // Alice has 1000 tokens. She should be able to send through precompile let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); // We use the address of the asset as an identifier of the asset we want to transferS @@ -1919,10 +1923,10 @@ fn xtokens_precompiles_transfer_multiasset() { // Alice has 1000 tokens. She should be able to send through precompile let destination = Location::new( 1, - Junctions::X1(Junction::AccountId32 { + [Junction::AccountId32 { network: None, id: [1u8; 32], - }), + }], ); // This time we transfer it through TransferMultiAsset @@ -1961,22 +1965,23 @@ fn make_sure_polkadot_xcm_cannot_be_called() { .execute_with(|| { let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: [1u8; 32], - }), + }] + .into(), }; - let multiassets: Assets = [Asset { - id: Concrete(moonriver_runtime::xcm_config::SelfLocation::get()), + let assets: Assets = [Asset { + id: AssetId(moonriver_runtime::xcm_config::SelfLocation::get()), fun: Fungible(1000), }] .to_vec() .into(); assert_noop!( RuntimeCall::PolkadotXcm(pallet_xcm::Call::::reserve_transfer_assets { - dest: Box::new(VersionedLocation::V3(dest.clone())), - beneficiary: Box::new(VersionedLocation::V3(dest)), - assets: Box::new(VersionedAssets::V3(multiassets)), + dest: Box::new(VersionedLocation::V4(dest.clone())), + beneficiary: Box::new(VersionedLocation::V4(dest)), + assets: Box::new(VersionedAssets::V4(assets)), fee_asset_item: 0, }) .dispatch(::RuntimeOrigin::signed( @@ -2018,7 +2023,7 @@ fn transactor_cannot_use_more_than_max_weight() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( root_origin(), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000.into(), @@ -2028,7 +2033,7 @@ fn transactor_cannot_use_more_than_max_weight() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( root_origin(), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), 1 )); @@ -2038,7 +2043,7 @@ fn transactor_cannot_use_more_than_max_weight() { moonriver_runtime::xcm_config::Transactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), fee_amount: None @@ -2182,14 +2187,16 @@ fn call_xtokens_with_fee() { let source_location = AssetType::Xcm(Location::parent()); let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: [1u8; 32], - }), + }] + .into(), }; let source_id: moonriver_runtime::AssetId = source_location.clone().into(); - let before_balance = Assets::balance(source_id, &AccountId::from(ALICE)); + let before_balance = + moonriver_runtime::Assets::balance(source_id, &AccountId::from(ALICE)); // We are able to transfer with fee assert_ok!(XTokens::transfer_with_fee( @@ -2197,11 +2204,12 @@ fn call_xtokens_with_fee() { CurrencyId::ForeignAsset(source_id), 100_000_000_000_000, 100, - Box::new(xcm::VersionedLocation::V3(dest.clone())), + Box::new(xcm::VersionedLocation::V4(dest.clone())), WeightLimit::Limited(4000000000.into()) ),); - let after_balance = Assets::balance(source_id, &AccountId::from(ALICE)); + let after_balance = + moonriver_runtime::Assets::balance(source_id, &AccountId::from(ALICE)); // At least these much (plus fees) should have been charged assert_eq!(before_balance - 100_000_000_000_000 - 100, after_balance); }); @@ -2221,14 +2229,14 @@ fn test_xcm_utils_ml_tp_account() { ALICE, xcm_utils_precompile_address, XcmUtilsPCall::multilocation_to_address { - multilocation: Location::parent(), + location: Location::parent(), }, ) .expect_cost(1000) .expect_no_logs() .execute_returns(Address(expected_address_parent)); - let parachain_2000_multilocation = Location::new(1, X1(Parachain(2000))); + let parachain_2000_multilocation = Location::new(1, [Parachain(2000)]); let expected_address_parachain: H160 = SiblingParachainConvertsVia::::convert_location( ¶chain_2000_multilocation, @@ -2241,27 +2249,28 @@ fn test_xcm_utils_ml_tp_account() { ALICE, xcm_utils_precompile_address, XcmUtilsPCall::multilocation_to_address { - multilocation: parachain_2000_multilocation, + location: parachain_2000_multilocation, }, ) .expect_cost(1000) .expect_no_logs() .execute_returns(Address(expected_address_parachain)); - let alice_in_parachain_2000_multilocation = Location::new( + let alice_in_parachain_2000_location = Location::new( 1, - X2( + [ Parachain(2000), AccountKey20 { network: None, key: ALICE, }, - ), + ], ); - let expected_address_alice_in_parachain_2000: H160 = - xcm_builder::HashedDescriptionDescribeFamilyAllTerminal::::convert_location( - &alice_in_parachain_2000_multilocation, - ) + let expected_address_alice_in_parachain_2000 = + xcm_builder::HashedDescription::< + AccountId, + xcm_builder::DescribeFamily, + >::convert_location(&alice_in_parachain_2000_location) .unwrap() .into(); @@ -2270,7 +2279,7 @@ fn test_xcm_utils_ml_tp_account() { ALICE, xcm_utils_precompile_address, XcmUtilsPCall::multilocation_to_address { - multilocation: alice_in_parachain_2000_multilocation, + location: alice_in_parachain_2000_location, }, ) .expect_cost(1000) @@ -2286,7 +2295,7 @@ fn test_xcm_utils_weight_message() { let expected_weight = XcmWeight::::clear_origin().ref_time(); - let message: Vec = xcm::VersionedXcm::<()>::V3(Xcm(vec![ClearOrigin])).encode(); + let message: Vec = xcm::VersionedXcm::<()>::V4(Xcm(vec![ClearOrigin])).encode(); let input = XcmUtilsPCall::weight_message { message: message.into(), @@ -2304,9 +2313,9 @@ fn test_xcm_utils_weight_message() { fn test_xcm_utils_get_units_per_second() { ExtBuilder::default().build().execute_with(|| { let xcm_utils_precompile_address = H160::from_low_u64_be(2060); - let multilocation = SelfReserve::get(); + let location = SelfReserve::get(); - let input = XcmUtilsPCall::get_units_per_second { multilocation }; + let input = XcmUtilsPCall::get_units_per_second { location }; let expected_units = WEIGHT_REF_TIME_PER_SECOND as u128 * moonriver_runtime::currency::WEIGHT_FEE; diff --git a/runtime/moonriver/tests/xcm_mock/parachain.rs b/runtime/moonriver/tests/xcm_mock/parachain.rs index c3c27c9e6e..1617475606 100644 --- a/runtime/moonriver/tests/xcm_mock/parachain.rs +++ b/runtime/moonriver/tests/xcm_mock/parachain.rs @@ -45,12 +45,12 @@ use polkadot_parachain::primitives::{Id as ParaId, Sibling}; use xcm::latest::{ AssetId as XcmAssetId, Error as XcmError, ExecuteXcm, Junction::{PalletInstance, Parachain}, - Junctions, Location, NetworkId, Outcome, Xcm, + Location, NetworkId, Outcome, Xcm, }; use xcm_builder::{ AccountKey20Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, ConvertedConcreteId, CurrencyAdapter as XcmCurrencyAdapter, - EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, FungiblesAdapter, IsConcrete, + AllowTopLevelPaidExecutionFrom, ConvertedConcreteId, EnsureXcmOrigin, FixedRateOfFungible, + FixedWeightBounds, FungibleAdapter as XcmCurrencyAdapter, FungiblesAdapter, IsConcrete, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountKey20AsNative, SovereignSignedViaLocation, TakeWeightCredit, WithComputedOrigin, @@ -181,7 +181,10 @@ pub type LocationToAccountId = ( SiblingParachainConvertsVia, AccountKey20Aliases, // Generate remote accounts according to polkadot standards - xcm_builder::HashedDescriptionDescribeFamilyAllTerminal, + xcm_builder::HashedDescription< + AccountId, + xcm_builder::DescribeFamily, + >, ); /// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, @@ -240,7 +243,7 @@ pub type LocalAssetTransactor = XcmCurrencyAdapter< // Use this currency when it is a fungible asset matching any of the locations in // SelfReserveRepresentations IsConcrete, - // We can convert the MultiLocations with our converter above: + // We can convert the Locations with our converter above: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, @@ -294,7 +297,7 @@ parameter_types! { // We cannot skip the native trader for some specific tests, so we will have to work with // a native trader that charges same number of units as weight pub ParaTokensPerSecond: (XcmAssetId, u128, u128) = ( - Concrete(SelfReserve::get()), + AssetId(SelfReserve::get()), 1000000000000, 0, ); @@ -304,15 +307,12 @@ parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Polkadot; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorLocation = - X2(GlobalConsensus(RelayNetwork::get()), Parachain(MsgQueue::parachain_id().into())); - - // This is used to match it against our Balances pallet when we receive such a Location - // (Parent, Self Para Id, Self Balances pallet index) + [GlobalConsensus(RelayNetwork::get()), Parachain(MsgQueue::parachain_id().into())].into(); pub SelfReserve: Location = Location { parents:0, - interior: Junctions::X1( + interior: [ PalletInstance(::index() as u8) - ) + ].into() }; pub const MaxAssetsIntoHolding: u32 = 64; } @@ -344,7 +344,6 @@ impl Config for XcmConfig { FixedRateOfFungible, xcm_primitives::FirstAssetTrader, ); - type ResponseHandler = PolkadotXcm; type SubscriptionService = PolkadotXcm; type AssetTrap = PolkadotXcm; @@ -359,7 +358,8 @@ impl Config for XcmConfig { type UniversalAliases = Nothing; type SafeCallFilter = Everything; type Aliasers = Nothing; - type TransactionalProcessor = xcm_builder::FrameTransactionalProcessor; + + type TransactionalProcessor = (); } impl cumulus_pallet_xcm::Config for Runtime { @@ -375,9 +375,9 @@ pub enum CurrencyId { } // How to convert from CurrencyId to Location -pub struct CurrencyIdtoMultiLocation(sp_std::marker::PhantomData); +pub struct CurrencyIdToLocation(sp_std::marker::PhantomData); impl sp_runtime::traits::Convert> - for CurrencyIdtoMultiLocation + for CurrencyIdToLocation where AssetXConverter: MaybeEquivalence, { @@ -403,9 +403,9 @@ parameter_types! { pub SelfLocation: Location = Location::here(); pub SelfLocationAbsolute: Location = Location { parents:1, - interior: Junctions::X1( + interior: [ Parachain(MsgQueue::parachain_id().into()) - ) + ].into() }; } @@ -425,7 +425,7 @@ impl orml_xtokens::Config for Runtime { type CurrencyId = CurrencyId; type AccountIdToLocation = xcm_primitives::AccountIdToLocation; type CurrencyIdConvert = - CurrencyIdtoMultiLocation>; + CurrencyIdToLocation>; type XcmExecutor = XcmExecutor; type SelfLocation = SelfLocation; type Weigher = xcm_builder::FixedWeightBounds; @@ -538,15 +538,25 @@ pub mod mock_msg_queue { let hash = Encode::using_encoded(&xcm, T::Hashing::hash); let (result, event) = match Xcm::::try_from(xcm) { Ok(xcm) => { - let location = Location::new(1, Junctions::X1(Parachain(sender.into()))); + let location = Location::new(1, [Parachain(sender.into())]); let mut id = [0u8; 32]; id.copy_from_slice(hash.as_ref()); - match T::XcmExecutor::execute_xcm(location, xcm, id, max_weight) { - Outcome::Error(e) => (Err(e.clone()), Event::Fail(Some(hash), e)), - Outcome::Complete(w) => (Ok(w), Event::Success(Some(hash))), + match T::XcmExecutor::prepare_and_execute( + location, + xcm, + &mut id, + max_weight, + Weight::zero(), + ) { + Outcome::Error { error } => { + (Err(error.clone()), Event::Fail(Some(hash), error)) + } + Outcome::Complete { used } => (Ok(used), Event::Success(Some(hash))), // As far as the caller is concerned, this was dispatched without error, so // we just report the weight used. - Outcome::Incomplete(w, e) => (Ok(w), Event::Fail(Some(hash), e)), + Outcome::Incomplete { used, error } => { + (Ok(used), Event::Fail(Some(hash), error)) + } } } Err(()) => ( @@ -590,7 +600,7 @@ pub mod mock_msg_queue { limit: Weight, ) -> Weight { for (_i, (_sent_at, data)) in iter.enumerate() { - let id = sp_io::hashing::blake2_256(&data[..]); + let mut id = sp_io::hashing::blake2_256(&data[..]); let maybe_msg = VersionedXcm::::decode(&mut &data[..]) .map(Xcm::::try_from); match maybe_msg { @@ -601,7 +611,13 @@ pub mod mock_msg_queue { Self::deposit_event(Event::UnsupportedVersion(id)); } Ok(Ok(x)) => { - let outcome = T::XcmExecutor::execute_xcm(Parent, x, id, limit); + let outcome = T::XcmExecutor::prepare_and_execute( + Parent, + x, + &mut id, + limit, + Weight::zero(), + ); Self::deposit_event(Event::ExecutedDownward(id, outcome)); } @@ -777,14 +793,16 @@ impl pallet_asset_manager::AssetRegistrar for AssetRegistrar { fn destroy_foreign_asset(asset: AssetId) -> DispatchResult { // Mark the asset as destroying - Assets::start_destroy(RuntimeOrigin::root(), asset)?; + Assets::start_destroy(RuntimeOrigin::root(), asset.into())?; Ok(()) } fn destroy_asset_dispatch_info_weight(asset: AssetId) -> Weight { RuntimeCall::Assets( - pallet_assets::Call::::start_destroy { id: asset }, + pallet_assets::Call::::start_destroy { + id: asset.into(), + }, ) .get_dispatch_info() .weight diff --git a/runtime/moonriver/tests/xcm_mock/relay_chain.rs b/runtime/moonriver/tests/xcm_mock/relay_chain.rs index d889189165..4b068d9638 100644 --- a/runtime/moonriver/tests/xcm_mock/relay_chain.rs +++ b/runtime/moonriver/tests/xcm_mock/relay_chain.rs @@ -40,9 +40,10 @@ use xcm::latest::prelude::*; use xcm_builder::{ Account32Hash, AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, - ChildSystemParachainAsSuperuser, CurrencyAdapter as XcmCurrencyAdapter, FixedRateOfFungible, - FixedWeightBounds, IsConcrete, ProcessXcmMessage, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, WithComputedOrigin, + ChildSystemParachainAsSuperuser, FixedRateOfFungible, FixedWeightBounds, + FungibleAdapter as XcmCurrencyAdapter, IsConcrete, ProcessXcmMessage, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + WithComputedOrigin, }; use xcm_executor::{Config, XcmExecutor}; pub type AccountId = AccountId32; @@ -56,6 +57,7 @@ parameter_types! { impl frame_system::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type Hash = H256; @@ -97,7 +99,6 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } @@ -109,7 +110,9 @@ impl pallet_utility::Config for Runtime { type PalletsOrigin = OriginCaller; } -impl shared::Config for Runtime {} +impl shared::Config for Runtime { + type DisabledValidators = (); +} impl configuration::Config for Runtime { type WeightInfo = configuration::TestWeightInfo; @@ -142,7 +145,7 @@ type LocalOriginConverter = ( parameter_types! { pub const BaseXcmWeight: Weight = Weight::from_parts(1000u64, 1000u64); - pub KsmPerSecond: (AssetId, u128, u128) = (Concrete(KsmLocation::get()), 1, 1); + pub KsmPerSecond: (AssetId, u128, u128) = (AssetId(KsmLocation::get()), 1, 1); pub const MaxInstructions: u32 = 100; pub const MaxAssetsIntoHolding: u32 = 64; pub MatcherLocation: Location = Location::here(); @@ -168,7 +171,7 @@ pub type XcmBarrier = ( ); parameter_types! { - pub Kusama: AssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(KsmLocation::get()) }); + pub Kusama: AssetFilter = Wild(AllOf { fun: WildFungible, id: AssetId(KsmLocation::get()) }); pub Statemine: Location = Parachain(4).into(); pub KusamaForStatemine: (AssetFilter, Location) = (Kusama::get(), Statemine::get()); } @@ -201,6 +204,7 @@ impl Config for XcmConfig { type UniversalAliases = Nothing; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = (); } pub type LocalOriginToLocation = SignedToAccountId32; @@ -272,6 +276,7 @@ impl paras::Config for Runtime { type NextSessionRotation = TestNextSessionRotation; type QueueFootprinter = (); type OnNewHead = (); + type AssignCoretime = (); } impl dmp::Config for Runtime {} @@ -404,7 +409,6 @@ impl hrmp::WeightInfo for TestHrmpWeightInfo { fn force_open_hrmp_channel(_: u32) -> Weight { Weight::from_parts(1, 0) } - fn establish_system_channel() -> Weight { Weight::from_parts(1, 0) } diff --git a/runtime/moonriver/tests/xcm_mock/statemine_like.rs b/runtime/moonriver/tests/xcm_mock/statemine_like.rs index 306526dc20..83258b0204 100644 --- a/runtime/moonriver/tests/xcm_mock/statemine_like.rs +++ b/runtime/moonriver/tests/xcm_mock/statemine_like.rs @@ -17,8 +17,8 @@ //! Relay chain runtime mock. use frame_support::{ - construct_runtime, match_types, parameter_types, - traits::{AsEnsureOriginWithArg, Everything, Nothing}, + construct_runtime, parameter_types, + traits::{AsEnsureOriginWithArg, Contains, Everything, Nothing}, weights::Weight, }; use frame_system::{EnsureRoot, EnsureSigned}; @@ -39,7 +39,7 @@ use xcm::VersionedXcm; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, + ConvertedConcreteId, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, FungibleAdapter, FungiblesAdapter, IsConcrete, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, @@ -60,6 +60,7 @@ parameter_types! { impl frame_system::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type Hash = H256; @@ -101,7 +102,6 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } @@ -160,11 +160,11 @@ parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Kusama; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorLocation = - X2(GlobalConsensus(RelayNetwork::get()), Parachain(MsgQueue::parachain_id().into())); + [GlobalConsensus(RelayNetwork::get()), Parachain(MsgQueue::parachain_id().into())].into(); pub Local: Location = Here.into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); pub KsmPerSecond: (xcm::latest::prelude::AssetId, u128, u128) = - (Concrete(KsmLocation::get()), 1, 1); + (AssetId(KsmLocation::get()), 1, 1); } /// Type for specifying how a `Location` can be converted into an `AccountId`. This is used @@ -180,7 +180,7 @@ pub type LocationToAccountId = ( ); /// Means for transacting the native currency on this chain. -pub type CurrencyTransactor = CurrencyAdapter< +pub type CurrencyTransactor = FungibleAdapter< // Use this currency: Balances, // Use this currency when it is a fungible asset matching the given location or name: @@ -235,7 +235,7 @@ pub type XcmOriginToTransactDispatchOrigin = ( // transaction from the Root origin. ParentAsSuperuser, // Native signed account converter; this just converts an `AccountId32` origin into a normal - // `Origin::Signed` origin of the same 32-byte value. + // `RuntimeOrigin::signed` origin of the same 32-byte value. SignedAccountId32AsNative, // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. pallet_xcm::XcmPassthrough, @@ -247,17 +247,28 @@ parameter_types! { pub const MaxInstructions: u32 = 100; } -match_types! { - pub type ParentOrParentsExecutivePlurality: impl Contains = { - Location { parents: 1, interior: Here } | - Location { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } - }; +pub struct ParentOrParentsExecutivePlurality; +impl Contains for ParentOrParentsExecutivePlurality { + fn contains(location: &Location) -> bool { + matches!( + location.unpack(), + (1, []) + | ( + 1, + [Plurality { + id: BodyId::Executive, + .. + }] + ) + ) + } } -match_types! { - pub type ParentOrSiblings: impl Contains = { - Location { parents: 1, interior: Here } | - Location { parents: 1, interior: [_] } - }; + +pub struct ParentOrSiblings; +impl Contains for ParentOrSiblings { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, []) | (1, [_])) + } } pub type Barrier = ( @@ -303,6 +314,8 @@ impl Config for XcmConfig { type UniversalAliases = Nothing; type SafeCallFilter = Everything; type Aliasers = Nothing; + + type TransactionalProcessor = (); } /// No local origins on this chain are allowed to dispatch XCM sends/executions. @@ -413,15 +426,25 @@ pub mod mock_msg_queue { let hash = Encode::using_encoded(&xcm, T::Hashing::hash); let (result, event) = match Xcm::::try_from(xcm) { Ok(xcm) => { - let location = Location::new(1, Junctions::X1(Parachain(sender.into()))); + let location = Location::new(1, [Parachain(sender.into())]); let mut id = [0u8; 32]; id.copy_from_slice(hash.as_ref()); - match T::XcmExecutor::execute_xcm(location, xcm, id, max_weight) { - Outcome::Error(e) => (Err(e.clone()), Event::Fail(Some(hash), e)), - Outcome::Complete(w) => (Ok(w), Event::Success(Some(hash))), + match T::XcmExecutor::prepare_and_execute( + location, + xcm, + &mut id, + max_weight, + Weight::zero(), + ) { + Outcome::Error { error } => { + (Err(error.clone()), Event::Fail(Some(hash), error)) + } + Outcome::Complete { used } => (Ok(used), Event::Success(Some(hash))), // As far as the caller is concerned, this was dispatched without error, so // we just report the weight used. - Outcome::Incomplete(w, e) => (Ok(w), Event::Fail(Some(hash), e)), + Outcome::Incomplete { used, error } => { + (Ok(used), Event::Fail(Some(hash), error)) + } } } Err(()) => ( @@ -465,7 +488,7 @@ pub mod mock_msg_queue { limit: Weight, ) -> Weight { for (_i, (_sent_at, data)) in iter.enumerate() { - let id = sp_io::hashing::blake2_256(&data[..]); + let mut id = sp_io::hashing::blake2_256(&data[..]); let maybe_msg = VersionedXcm::::decode(&mut &data[..]) .map(Xcm::::try_from); match maybe_msg { @@ -476,7 +499,13 @@ pub mod mock_msg_queue { Self::deposit_event(Event::UnsupportedVersion(id)); } Ok(Ok(x)) => { - let outcome = T::XcmExecutor::execute_xcm(Parent, x, id, limit); + let outcome = T::XcmExecutor::prepare_and_execute( + Parent, + x, + &mut id, + limit, + Weight::zero(), + ); Self::deposit_event(Event::ExecutedDownward(id, outcome)); } diff --git a/runtime/moonriver/tests/xcm_tests.rs b/runtime/moonriver/tests/xcm_tests.rs index 94f81ce3fe..6a282df7ac 100644 --- a/runtime/moonriver/tests/xcm_tests.rs +++ b/runtime/moonriver/tests/xcm_tests.rs @@ -24,9 +24,12 @@ use frame_support::{ BoundedVec, }; use sp_core::ConstU32; -use xcm::latest::prelude::*; +use xcm::latest::prelude::{ + AccountId32, AccountKey20, All, BuyExecution, ClearOrigin, DepositAsset, GeneralIndex, + Junction, Junctions, Limited, Location, OriginKind, PalletInstance, Parachain, QueryResponse, + Reanchorable, Response, WeightLimit, WithdrawAsset, Xcm, +}; use xcm::{VersionedLocation, WrapVersion}; -use xcm_builder::HashedDescriptionDescribeFamilyAllTerminal; use xcm_executor::traits::ConvertLocation; use xcm_mock::parachain; use xcm_mock::relay_chain; @@ -78,8 +81,8 @@ fn receive_relay_asset_from_relay() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 123).into()), 0, )); }); @@ -134,8 +137,8 @@ fn send_relay_asset_to_relay() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 123).into()), 0, )); }); @@ -154,10 +157,11 @@ fn send_relay_asset_to_relay() { // We now send back some money to the relay let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: RELAYALICE.into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -165,7 +169,7 @@ fn send_relay_asset_to_relay() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 123, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -238,8 +242,8 @@ fn send_relay_asset_to_para_b() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 123).into()), 0, )); }); @@ -251,13 +255,14 @@ fn send_relay_asset_to_para_b() { // Now send relay asset from para A to para B let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaA::execute_with(|| { @@ -265,7 +270,7 @@ fn send_relay_asset_to_para_b() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -286,7 +291,7 @@ fn send_para_a_asset_to_para_b() { MockNet::reset(); // This represents the asset in paraA - let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -316,13 +321,14 @@ fn send_para_a_asset_to_para_b() { // Send para A asset from para A to para B let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaA::execute_with(|| { @@ -330,7 +336,7 @@ fn send_para_a_asset_to_para_b() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(800000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -356,7 +362,7 @@ fn send_para_a_asset_from_para_b_to_para_c() { MockNet::reset(); // Represents para A asset - let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -403,20 +409,21 @@ fn send_para_a_asset_from_para_b_to_para_c() { // Send para A asset to para B let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaA::execute_with(|| { assert_ok!(XTokens::transfer( parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -437,13 +444,14 @@ fn send_para_a_asset_from_para_b_to_para_c() { // Send para A asset from para B to para C let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(3), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaB::execute_with(|| { @@ -451,7 +459,7 @@ fn send_para_a_asset_from_para_b_to_para_c() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -468,7 +476,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { MockNet::reset(); // Para A asset - let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -498,20 +506,21 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { // Send para A asset to para B let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaA::execute_with(|| { assert_ok!(XTokens::transfer( parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -532,20 +541,21 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { // Send back para A asset to para A let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(1), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaB::execute_with(|| { assert_ok!(XTokens::transfer( parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -564,7 +574,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { MockNet::reset(); - let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -592,20 +602,21 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaA::execute_with(|| { assert_ok!(XTokens::transfer( parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); }); @@ -628,12 +639,12 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { let dest = Location { parents: 1, - interior: X1(Parachain(1)), + interior: [Parachain(1)].into(), }; - let reanchored_para_a_balances = Location::new(0, X1(PalletInstance(1u8))); + let reanchored_para_a_balances = Location::new(0, [PalletInstance(1u8)]); - let message = xcm::VersionedXcm::<()>::V3(Xcm(vec![ + let message = xcm::VersionedXcm::<()>::V4(Xcm(vec![ WithdrawAsset((reanchored_para_a_balances.clone(), 100).into()), ClearOrigin, BuyExecution { @@ -644,10 +655,10 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { assets: All.into(), beneficiary: Location::new( 0, - X1(AccountKey20 { + [AccountKey20 { network: None, key: PARAALICE, - }), + }], ), }, ])); @@ -671,12 +682,12 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { let dest = Location { parents: 1, - interior: X1(Parachain(1)), + interior: [Parachain(1)].into(), }; - let reanchored_para_a_balances = Location::new(0, X1(PalletInstance(1u8))); + let reanchored_para_a_balances = Location::new(0, [PalletInstance(1u8)]); - let message = xcm::VersionedXcm::<()>::V3(Xcm(vec![ + let message = xcm::VersionedXcm::<()>::V4(Xcm(vec![ WithdrawAsset((reanchored_para_a_balances.clone(), 100).into()), ClearOrigin, BuyExecution { @@ -687,10 +698,10 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { assets: All.into(), beneficiary: Location::new( 0, - X1(AccountKey20 { + [AccountKey20 { network: None, key: PARAALICE, - }), + }], ), }, ])); @@ -760,8 +771,8 @@ fn receive_relay_asset_with_trader() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 100).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 100).into()), 0, )); }); @@ -778,7 +789,7 @@ fn receive_relay_asset_with_trader() { fn send_para_a_asset_to_para_b_with_trader() { MockNet::reset(); - let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -806,13 +817,14 @@ fn send_para_a_asset_to_para_b_with_trader() { let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; // In destination chain, we only need 4 weight @@ -822,7 +834,7 @@ fn send_para_a_asset_to_para_b_with_trader() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(10u64, DEFAULT_PROOF_SIZE)) )); }); @@ -852,7 +864,7 @@ fn send_para_a_asset_to_para_b_with_trader() { fn send_para_a_asset_to_para_b_with_trader_and_fee() { MockNet::reset(); - let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -881,13 +893,14 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; // we use transfer_with_fee @@ -897,7 +910,7 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { parachain::CurrencyId::SelfReserve, 100, 1, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(800000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -960,8 +973,8 @@ fn error_when_not_paying_enough() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 5).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 5).into()), 0, )); }); @@ -1003,7 +1016,7 @@ fn transact_through_derivative_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000000000.into(), @@ -1012,7 +1025,7 @@ fn transact_through_derivative_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), WEIGHT_REF_TIME_PER_SECOND as u128, )); }); @@ -1029,8 +1042,8 @@ fn transact_through_derivative_multilocation() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 4000003100u128).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 4000003100u128).into()), 0, )); }); @@ -1054,10 +1067,11 @@ fn transact_through_derivative_multilocation() { let registered_address = derivative_account_id(para_a_account(), 0); let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: registered_address.clone().into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -1066,7 +1080,7 @@ fn transact_through_derivative_multilocation() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1107,7 +1121,7 @@ fn transact_through_derivative_multilocation() { parachain::MockTransactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), fee_amount: None @@ -1171,8 +1185,8 @@ fn transact_through_derivative_with_custom_fee_weight() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 4000003100u128).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 4000003100u128).into()), 0, )); }); @@ -1196,10 +1210,11 @@ fn transact_through_derivative_with_custom_fee_weight() { let registered_address = derivative_account_id(para_a_account(), 0); let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: registered_address.clone().into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -1208,7 +1223,7 @@ fn transact_through_derivative_with_custom_fee_weight() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1250,7 +1265,7 @@ fn transact_through_derivative_with_custom_fee_weight() { parachain::MockTransactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), // 1-1 fee weight mapping @@ -1325,8 +1340,8 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 4000009100u128).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 4000009100u128).into()), 0, )); }); @@ -1350,10 +1365,11 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { let registered_address = derivative_account_id(para_a_account(), 0); let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: registered_address.clone().into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -1362,7 +1378,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1404,7 +1420,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { parachain::MockTransactors::Relay, 0, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), // 1-1 fee weight mapping @@ -1468,7 +1484,7 @@ fn transact_through_sovereign() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000000000.into(), @@ -1477,7 +1493,7 @@ fn transact_through_sovereign() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), WEIGHT_REF_TIME_PER_SECOND as u128, )); }); @@ -1491,8 +1507,8 @@ fn transact_through_sovereign() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 4000003100u128).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 4000003100u128).into()), 0, )); }); @@ -1515,10 +1531,11 @@ fn transact_through_sovereign() { let registered_address = derivative_account_id(para_a_account(), 0); let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: registered_address.clone().into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -1527,7 +1544,7 @@ fn transact_through_sovereign() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1548,7 +1565,7 @@ fn transact_through_sovereign() { // We send the xcm transact operation to parent let dest = Location { parents: 1, - interior: Here, + interior: /* Here */ [].into(), }; // Encode the call. Balances transact to para_a_account @@ -1577,10 +1594,10 @@ fn transact_through_sovereign() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_sovereign( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V4(dest)), PARAALICE.into(), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), fee_amount: None @@ -1641,8 +1658,8 @@ fn transact_through_sovereign_with_custom_fee_weight() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 4000003100u128).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 4000003100u128).into()), 0, )); }); @@ -1665,10 +1682,11 @@ fn transact_through_sovereign_with_custom_fee_weight() { let registered_address = derivative_account_id(para_a_account(), 0); let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: registered_address.clone().into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -1677,7 +1695,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1698,7 +1716,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { // We send the xcm transact operation to parent let dest = Location { parents: 1, - interior: Here, + interior: /* Here */ [].into(), }; // Encode the call. Balances transact to para_a_account @@ -1728,10 +1746,10 @@ fn transact_through_sovereign_with_custom_fee_weight() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_sovereign( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V4(dest)), PARAALICE.into(), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), // 1-1 fee-weight mapping @@ -1793,8 +1811,8 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 4000009100u128).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 4000009100u128).into()), 0, )); }); @@ -1817,10 +1835,11 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { let registered_address = derivative_account_id(para_a_account(), 0); let dest = Location { parents: 1, - interior: X1(AccountId32 { + interior: [AccountId32 { network: None, id: registered_address.clone().into(), - }), + }] + .into(), }; ParaA::execute_with(|| { @@ -1829,7 +1848,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::ForeignAsset(source_id), 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(40000u64, DEFAULT_PROOF_SIZE)) )); }); @@ -1850,7 +1869,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { // We send the xcm transact operation to parent let dest = Location { parents: 1, - interior: Here, + interior: /* Here */ [].into(), }; // Encode the call. Balances transact to para_a_account @@ -1880,10 +1899,10 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_sovereign( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(dest)), + Box::new(xcm::VersionedLocation::V4(dest)), PARAALICE.into(), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), // 1-1 fee-weight mapping @@ -1937,7 +1956,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { }); let response = Response::Version(2); - let querier: Location = Here.into(); + let querier: Location = ([]/* Here */).into(); // This is irrelevant, nothing will be done with this message, // but we need to pass a message as an argument to trigger the storage change @@ -1975,8 +1994,8 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 123).into()), 0, )); @@ -1991,7 +2010,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { pallet_xcm::Event::SupportedVersionChanged { location: Location { parents: 0, - interior: X1(Parachain(1)), + interior: [Parachain(1)].into(), }, version: 1, } @@ -2026,7 +2045,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { pallet_xcm::Event::SupportedVersionChanged { location: Location { parents: 0, - interior: X1(Parachain(1)), + interior: [Parachain(1)].into(), }, version: 2, } @@ -2042,7 +2061,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_relay() { fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { MockNet::reset(); - let para_a_balances = Location::new(1, X2(Parachain(1), PalletInstance(1u8))); + let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); let source_location = parachain::AssetType::Xcm(para_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -2052,7 +2071,8 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { decimals: 18, }; let response = Response::Version(2); - let querier: Location = Here.into(); + let querier: Location = [] /* Here */ + .into(); // This is irrelevant, nothing will be done with this message, // but we need to pass a message as an argument to trigger the storage change @@ -2095,7 +2115,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { )); // Wrap version, which sets VersionedStorage assert_ok!(::wrap_version( - &Location::new(1, X1(Parachain(2))).into(), + &Location::new(1, [Parachain(2)]).into(), mock_message )); @@ -2109,7 +2129,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { pallet_xcm::Event::SupportedVersionChanged { location: Location { parents: 1, - interior: X1(Parachain(2)), + interior: [Parachain(2)].into(), }, version: 0, } @@ -2123,13 +2143,14 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { // Let's ensure talking in v0 works let dest = Location { parents: 1, - interior: X2( + interior: [ Parachain(2), AccountKey20 { network: None, key: PARAALICE.into(), }, - ), + ] + .into(), }; ParaA::execute_with(|| { // free execution, full amount received @@ -2137,7 +2158,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { parachain::RuntimeOrigin::signed(PARAALICE.into()), parachain::CurrencyId::SelfReserve, 100, - Box::new(VersionedLocation::V3(dest)), + Box::new(VersionedLocation::V4(dest)), WeightLimit::Limited(Weight::from_parts(80u64, DEFAULT_PROOF_SIZE)) )); // free execution, full amount received @@ -2176,7 +2197,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { pallet_xcm::Event::SupportedVersionChanged { location: Location { parents: 1, - interior: X1(Parachain(2)), + interior: [Parachain(2)].into(), }, version: 2, } @@ -2228,8 +2249,8 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest.clone()).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest.clone()).clone().into()), + Box::new(([] /* Here */, 123).into()), 0, )); }); @@ -2254,8 +2275,8 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), + Box::new(([] /* Here */, 123).into()), 0, )); }); @@ -2306,8 +2327,8 @@ fn receive_assets_with_sufficients_true_allows_non_funded_account_to_receive_ass assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest.clone()).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest.clone()).clone().into()), + Box::new(([] /* Here */, 123).into()), 0, )); }); @@ -2366,8 +2387,8 @@ fn evm_account_receiving_assets_should_handle_sufficients_ref_count() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest.clone()).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest.clone()).clone().into()), + Box::new(([] /* Here */, 123).into()), 0, )); }); @@ -2444,8 +2465,8 @@ fn empty_account_should_not_be_reset() { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), - Box::new(VersionedLocation::V3(dest.clone()).clone().into()), - Box::new((Here, 123).into()), + Box::new(VersionedLocation::V4(dest.clone()).clone().into()), + Box::new(([] /* Here */, 123).into()), 0, )); }); @@ -2499,7 +2520,7 @@ fn empty_account_should_not_be_reset() { fn test_statemine_like() { MockNet::reset(); - let dest_para = Location::new(1, X1(Parachain(1))); + let dest_para = Location::new(1, [Parachain(1)]); let sov = xcm_builder::SiblingParachainConvertsVia::< polkadot_parachain::primitives::Sibling, @@ -2509,11 +2530,11 @@ fn test_statemine_like() { let statemine_asset_a_balances = Location::new( 1, - X3( + [ Parachain(4), PalletInstance(5), xcm::latest::prelude::GeneralIndex(0u128), - ), + ], ); let source_location = parachain::AssetType::Xcm(statemine_asset_a_balances); let source_id: parachain::AssetId = source_location.clone().into(); @@ -2576,16 +2597,16 @@ fn test_statemine_like() { // Send with new prefix assert_ok!(StatemineChainPalletXcm::reserve_transfer_assets( statemine_like::RuntimeOrigin::signed(RELAYALICE), - Box::new(Location::new(1, X1(Parachain(1))).into()), - Box::new(VersionedLocation::V3(dest).clone().into()), + Box::new(Location::new(1, [Parachain(1)]).into()), + Box::new(VersionedLocation::V4(dest).clone().into()), Box::new( ( - X2( + [ xcm::latest::prelude::PalletInstance( ::index() as u8 ), xcm::latest::prelude::GeneralIndex(0), - ), + ], 123 ) .into() @@ -2616,7 +2637,7 @@ fn send_statemint_asset_from_para_a_to_statemine_with_relay_fee() { // Statemine asset let statemine_asset = Location::new( 1, - X3(Parachain(4u32), PalletInstance(5u8), GeneralIndex(10u128)), + [Parachain(4u32), PalletInstance(5u8), GeneralIndex(10u128)], ); let statemine_location_asset = parachain::AssetType::Xcm(statemine_asset); let source_statemine_asset_id: parachain::AssetId = statemine_location_asset.clone().into(); @@ -2627,7 +2648,7 @@ fn send_statemint_asset_from_para_a_to_statemine_with_relay_fee() { decimals: 12, }; - let dest_para = Location::new(1, X1(Parachain(1))); + let dest_para = Location::new(1, [Parachain(1)]); let sov = xcm_builder::SiblingParachainConvertsVia::< polkadot_parachain::primitives::Sibling, @@ -2677,11 +2698,11 @@ fn send_statemint_asset_from_para_a_to_statemine_with_relay_fee() { relay_chain::RuntimeOrigin::signed(RELAYALICE), Box::new(Parachain(1).into()), Box::new( - VersionedLocation::V3(parachain_beneficiary_from_relay) + VersionedLocation::V4(parachain_beneficiary_from_relay) .clone() .into() ), - Box::new((Here, 200).into()), + Box::new(([] /* Here */, 200).into()), 0, )); }); @@ -2724,20 +2745,20 @@ fn send_statemint_asset_from_para_a_to_statemine_with_relay_fee() { // Send with new prefix assert_ok!(StatemineChainPalletXcm::reserve_transfer_assets( statemine_like::RuntimeOrigin::signed(RELAYALICE), - Box::new(Location::new(1, X1(Parachain(1))).into()), + Box::new(Location::new(1, [Parachain(1)]).into()), Box::new( - VersionedLocation::V3(parachain_beneficiary_from_statemint) + VersionedLocation::V4(parachain_beneficiary_from_statemint) .clone() .into() ), Box::new( ( - X2( + [ xcm::latest::prelude::PalletInstance( ::index() as u8 ), GeneralIndex(10), - ), + ], 125 ) .into() @@ -2748,13 +2769,14 @@ fn send_statemint_asset_from_para_a_to_statemine_with_relay_fee() { let statemine_beneficiary = Location { parents: 1, - interior: X2( + interior: [ Parachain(4), AccountId32 { network: None, id: RELAYBOB.into(), }, - ), + ] + .into(), }; ParaA::execute_with(|| { @@ -2785,7 +2807,7 @@ fn send_statemint_asset_from_para_a_to_statemine_with_relay_fee() { (parachain::CurrencyId::ForeignAsset(source_relay_id), 100) ], 1, - Box::new(VersionedLocation::V3(statemine_beneficiary)), + Box::new(VersionedLocation::V4(statemine_beneficiary)), WeightLimit::Limited(Weight::from_parts(80_000_000u64, 100_000u64)) )); }); @@ -2816,7 +2838,7 @@ fn transact_through_signed_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), // Relay charges 1000 for every instruction, and we have 3, so 3000 3000.into(), 20000000000.into(), @@ -2826,17 +2848,18 @@ fn transact_through_signed_multilocation() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), WEIGHT_REF_TIME_PER_SECOND as u128, )); ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); let mut descend_origin_multilocation = parachain::SelfLocation::get(); descend_origin_multilocation @@ -2845,7 +2868,7 @@ fn transact_through_signed_multilocation() { // To convert it to what the relay will see instead of us descend_origin_multilocation - .reanchor(&Location::parent(), ancestry.interior) + .reanchor(&Location::parent(), &ancestry.interior) .unwrap(); let derived = xcm_builder::Account32Hash::< @@ -2889,9 +2912,9 @@ fn transact_through_signed_multilocation() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), fee_amount: None @@ -2924,10 +2947,11 @@ fn transact_through_signed_multilocation_custom_fee_and_weight() { }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); let mut descend_origin_multilocation = parachain::SelfLocation::get(); descend_origin_multilocation @@ -2936,7 +2960,7 @@ fn transact_through_signed_multilocation_custom_fee_and_weight() { // To convert it to what the relay will see instead of us descend_origin_multilocation - .reanchor(&Location::parent(), ancestry.interior) + .reanchor(&Location::parent(), &ancestry.interior) .unwrap(); let derived = xcm_builder::Account32Hash::< @@ -2981,9 +3005,9 @@ fn transact_through_signed_multilocation_custom_fee_and_weight() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), fee_amount: Some(total_weight as u128) @@ -3015,10 +3039,11 @@ fn transact_through_signed_multilocation_custom_fee_and_weight_refund() { }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); let mut descend_origin_multilocation = parachain::SelfLocation::get(); descend_origin_multilocation @@ -3027,7 +3052,7 @@ fn transact_through_signed_multilocation_custom_fee_and_weight_refund() { // To convert it to what the relay will see instead of us descend_origin_multilocation - .reanchor(&Location::parent(), ancestry.interior) + .reanchor(&Location::parent(), &ancestry.interior) .unwrap(); let derived = xcm_builder::Account32Hash::< @@ -3072,9 +3097,9 @@ fn transact_through_signed_multilocation_custom_fee_and_weight_refund() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedLocation::V3(Location::parent())), + Box::new(xcm::VersionedLocation::V4(Location::parent())), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), fee_amount: Some(total_weight as u128) @@ -3103,16 +3128,16 @@ fn transact_through_signed_multilocation_para_to_para() { MockNet::reset(); let mut ancestry = Location::parent(); - let para_b_location = Location::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, [Parachain(2)]); - let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, [Parachain(2), PalletInstance(1u8)]); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -3122,33 +3147,32 @@ fn transact_through_signed_multilocation_para_to_para() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); - let mut descend_origin_multilocation = parachain::SelfLocation::get(); - descend_origin_multilocation - .append_with(signed_origin) - .unwrap(); + let mut descend_origin_location = parachain::SelfLocation::get(); + descend_origin_location.append_with(signed_origin).unwrap(); // To convert it to what the paraB will see instead of us - descend_origin_multilocation - .reanchor(¶_b_location, ancestry.interior) + descend_origin_location + .reanchor(¶_b_location, &ancestry.interior) .unwrap(); - let derived = - HashedDescriptionDescribeFamilyAllTerminal::::convert_location( - &descend_origin_multilocation, - ) - .unwrap(); + let derived = xcm_builder::HashedDescription::< + parachain::AccountId, + xcm_builder::DescribeFamily, + >::convert_location(&descend_origin_location) + .unwrap(); ParaB::execute_with(|| { // free execution, full amount received @@ -3184,9 +3208,9 @@ fn transact_through_signed_multilocation_para_to_para() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V4(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( para_b_balances ))), fee_amount: None @@ -3214,40 +3238,39 @@ fn transact_through_signed_multilocation_para_to_para_refund() { MockNet::reset(); let mut ancestry = Location::parent(); - let para_b_location = Location::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, [Parachain(2)]); - let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, [Parachain(2), PalletInstance(1u8)]); ParaA::execute_with(|| { assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); - let mut descend_origin_multilocation = parachain::SelfLocation::get(); - descend_origin_multilocation - .append_with(signed_origin) - .unwrap(); + let mut descend_origin_location = parachain::SelfLocation::get(); + descend_origin_location.append_with(signed_origin).unwrap(); // To convert it to what the paraB will see instead of us - descend_origin_multilocation - .reanchor(¶_b_location, ancestry.interior) + descend_origin_location + .reanchor(¶_b_location, &ancestry.interior) .unwrap(); - let derived = - HashedDescriptionDescribeFamilyAllTerminal::::convert_location( - &descend_origin_multilocation, - ) - .unwrap(); + let derived = xcm_builder::HashedDescription::< + parachain::AccountId, + xcm_builder::DescribeFamily, + >::convert_location(&descend_origin_location) + .unwrap(); ParaB::execute_with(|| { // free execution, full amount received @@ -3284,9 +3307,9 @@ fn transact_through_signed_multilocation_para_to_para_refund() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V4(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( para_b_balances ))), fee_amount: Some(overall_weight as u128) @@ -3315,16 +3338,16 @@ fn transact_through_signed_multilocation_para_to_para_ethereum() { MockNet::reset(); let mut ancestry = Location::parent(); - let para_b_location = Location::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, [Parachain(2)]); - let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, [Parachain(2), PalletInstance(1u8)]); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -3334,33 +3357,32 @@ fn transact_through_signed_multilocation_para_to_para_ethereum() { // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); - let mut descend_origin_multilocation = parachain::SelfLocation::get(); - descend_origin_multilocation - .append_with(signed_origin) - .unwrap(); + let mut descend_origin_location = parachain::SelfLocation::get(); + descend_origin_location.append_with(signed_origin).unwrap(); // To convert it to what the paraB will see instead of us - descend_origin_multilocation - .reanchor(¶_b_location, ancestry.interior) + descend_origin_location + .reanchor(¶_b_location, &ancestry.interior) .unwrap(); - let derived = - HashedDescriptionDescribeFamilyAllTerminal::::convert_location( - &descend_origin_multilocation, - ) - .unwrap(); + let derived = xcm_builder::HashedDescription::< + parachain::AccountId, + xcm_builder::DescribeFamily, + >::convert_location(&descend_origin_location) + .unwrap(); let mut parachain_b_alice_balances_before = 0; ParaB::execute_with(|| { @@ -3411,9 +3433,9 @@ fn transact_through_signed_multilocation_para_to_para_ethereum() { ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V4(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( para_b_balances ))), fee_amount: None @@ -3443,16 +3465,16 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() MockNet::reset(); let mut ancestry = Location::parent(); - let para_b_location = Location::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, [Parachain(2)]); - let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, [Parachain(2), PalletInstance(1u8)]); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -3462,33 +3484,32 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); - let mut descend_origin_multilocation = parachain::SelfLocation::get(); - descend_origin_multilocation - .append_with(signed_origin) - .unwrap(); + let mut descend_origin_location = parachain::SelfLocation::get(); + descend_origin_location.append_with(signed_origin).unwrap(); // To convert it to what the paraB will see instead of us - descend_origin_multilocation - .reanchor(¶_b_location, ancestry.interior) + descend_origin_location + .reanchor(¶_b_location, &ancestry.interior) .unwrap(); - let derived = - HashedDescriptionDescribeFamilyAllTerminal::::convert_location( - &descend_origin_multilocation, - ) - .unwrap(); + let derived = xcm_builder::HashedDescription::< + parachain::AccountId, + xcm_builder::DescribeFamily, + >::convert_location(&descend_origin_location) + .unwrap(); let mut parachain_b_alice_balances_before = 0; ParaB::execute_with(|| { @@ -3540,9 +3561,9 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_no_proxy_fails() ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V4(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( para_b_balances ))), fee_amount: None @@ -3567,16 +3588,16 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_proxy_succeeds() MockNet::reset(); let mut ancestry = Location::parent(); - let para_b_location = Location::new(1, X1(Parachain(2))); + let para_b_location = Location::new(1, [Parachain(2)]); - let para_b_balances = Location::new(1, X2(Parachain(2), PalletInstance(1u8))); + let para_b_balances = Location::new(1, [Parachain(2), PalletInstance(1u8)]); ParaA::execute_with(|| { // Root can set transact info assert_ok!(XcmTransactor::set_transact_info( parachain::RuntimeOrigin::root(), // ParaB - Box::new(xcm::VersionedLocation::V3(para_b_location.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_location.clone())), // Para charges 1000 for every instruction, and we have 3, so 3 3.into(), 20000000000.into(), @@ -3586,33 +3607,32 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_proxy_succeeds() // Root can set transact info assert_ok!(XcmTransactor::set_fee_per_second( parachain::RuntimeOrigin::root(), - Box::new(xcm::VersionedLocation::V3(para_b_balances.clone())), + Box::new(xcm::VersionedLocation::V4(para_b_balances.clone())), parachain::ParaTokensPerSecond::get().1 as u128, )); ancestry = parachain::UniversalLocation::get().into(); }); // Let's construct the Junction that we will append with DescendOrigin - let signed_origin: Junctions = X1(AccountKey20 { + let signed_origin: Junctions = [AccountKey20 { network: None, key: PARAALICE, - }); + }] + .into(); - let mut descend_origin_multilocation = parachain::SelfLocation::get(); - descend_origin_multilocation - .append_with(signed_origin) - .unwrap(); + let mut descend_origin_location = parachain::SelfLocation::get(); + descend_origin_location.append_with(signed_origin).unwrap(); // To convert it to what the paraB will see instead of us - descend_origin_multilocation - .reanchor(¶_b_location, ancestry.interior) + descend_origin_location + .reanchor(¶_b_location, &ancestry.interior) .unwrap(); - let derived = - HashedDescriptionDescribeFamilyAllTerminal::::convert_location( - &descend_origin_multilocation, - ) - .unwrap(); + let derived = xcm_builder::HashedDescription::< + parachain::AccountId, + xcm_builder::DescribeFamily, + >::convert_location(&descend_origin_location) + .unwrap(); let transfer_recipient = evm_account(); let mut transfer_recipient_balance_before = 0; @@ -3672,9 +3692,9 @@ fn transact_through_signed_multilocation_para_to_para_ethereum_proxy_succeeds() ParaA::execute_with(|| { assert_ok!(XcmTransactor::transact_through_signed( parachain::RuntimeOrigin::signed(PARAALICE.into()), - Box::new(xcm::VersionedLocation::V3(para_b_location)), + Box::new(xcm::VersionedLocation::V4(para_b_location)), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( para_b_balances ))), fee_amount: None @@ -3727,7 +3747,7 @@ fn hrmp_init_accept_through_root() { proposed_max_message_size: 1 }), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), fee_amount: Some(total_fee) @@ -3760,7 +3780,7 @@ fn hrmp_init_accept_through_root() { para_id: 1u32.into() }, CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), fee_amount: Some(total_fee) @@ -3818,7 +3838,7 @@ fn hrmp_close_works() { recipient: 2u32.into() }), CurrencyPayment { - currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V3( + currency: Currency::AsMultiLocation(Box::new(xcm::VersionedLocation::V4( Location::parent() ))), fee_amount: Some(total_fee) From cf063ddf6619ce0b8b7387a196e6c244ae4bcbad Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Mon, 4 Mar 2024 21:30:29 +0000 Subject: [PATCH 03/80] Fix runtime API --- Cargo.lock | 5 +- Cargo.toml | 1 + .../src/generic/benchmarking.rs | 2 +- .../src/generic/mock.rs | 4 +- pallets/moonbeam-xcm-benchmarks/src/mock.rs | 2 +- precompiles/gmp/src/mock.rs | 7 - precompiles/xcm-utils/src/mock.rs | 7 - precompiles/xtokens/src/mock.rs | 3 - runtime/common/Cargo.toml | 227 +++++++++--------- runtime/common/src/apis.rs | 73 +++++- .../src/weights/cumulus_pallet_xcmp_queue.rs | 102 ++++++-- runtime/common/src/weights/pallet_balances.rs | 13 +- runtime/common/src/weights/pallet_sudo.rs | 14 +- runtime/common/src/weights/pallet_xcm.rs | 6 +- runtime/moonbase/Cargo.toml | 5 +- runtime/moonbase/src/lib.rs | 7 +- runtime/moonbase/src/xcm_config.rs | 23 +- runtime/moonbase/tests/xcm_mock/parachain.rs | 7 - .../moonbase/tests/xcm_mock/relay_chain.rs | 7 - .../moonbase/tests/xcm_mock/statemint_like.rs | 7 - runtime/moonbeam/Cargo.toml | 5 +- runtime/moonbeam/src/lib.rs | 4 +- runtime/moonbeam/src/xcm_config.rs | 23 +- runtime/moonbeam/tests/xcm_mock/parachain.rs | 7 - .../moonbeam/tests/xcm_mock/relay_chain.rs | 7 - .../moonbeam/tests/xcm_mock/statemint_like.rs | 7 - runtime/moonriver/Cargo.toml | 5 +- runtime/moonriver/src/lib.rs | 4 +- runtime/moonriver/src/xcm_config.rs | 23 +- runtime/moonriver/tests/xcm_mock/parachain.rs | 7 - .../moonriver/tests/xcm_mock/relay_chain.rs | 7 - .../tests/xcm_mock/statemine_like.rs | 7 - 32 files changed, 342 insertions(+), 286 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1893ca3270..7df4393265 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6270,6 +6270,7 @@ dependencies = [ "sp-consensus-slots", "sp-core", "sp-debug-derive 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", @@ -6749,6 +6750,7 @@ dependencies = [ "sp-block-builder", "sp-consensus-slots", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", @@ -6824,7 +6826,7 @@ dependencies = [ "sp-api", "sp-consensus-slots", "sp-core", - "sp-io", + "sp-genesis-builder", "sp-runtime", "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "staging-xcm", @@ -7142,6 +7144,7 @@ dependencies = [ "sp-consensus-slots", "sp-core", "sp-debug-derive 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", diff --git a/Cargo.toml b/Cargo.toml index 3cbb7c9e20..c57f909d0f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -179,6 +179,7 @@ sp-transaction-pool = { git = "https://github.com/moonbeam-foundation/polkadot-s sp-trie = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } sp-version = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } sp-weights = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +sp-genesis-builder = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } substrate-fixed = { git = "https://github.com/encointer/substrate-fixed", default-features = false } # Substrate (client) diff --git a/pallets/moonbeam-xcm-benchmarks/src/generic/benchmarking.rs b/pallets/moonbeam-xcm-benchmarks/src/generic/benchmarking.rs index c75bcc5510..a16d6b6a1d 100644 --- a/pallets/moonbeam-xcm-benchmarks/src/generic/benchmarking.rs +++ b/pallets/moonbeam-xcm-benchmarks/src/generic/benchmarking.rs @@ -30,7 +30,7 @@ benchmarks! { let mut executor = new_executor::(Default::default()); executor.set_holding(holding); - let fee_asset = Concrete(Location::parent()); + let fee_asset = AssetId(Location::parent()); let instruction = Instruction::>::BuyExecution { fees: (fee_asset, 100_000_000u128).into(), // should be something inside of holding diff --git a/pallets/moonbeam-xcm-benchmarks/src/generic/mock.rs b/pallets/moonbeam-xcm-benchmarks/src/generic/mock.rs index 86b21379e2..7578ca65ec 100644 --- a/pallets/moonbeam-xcm-benchmarks/src/generic/mock.rs +++ b/pallets/moonbeam-xcm-benchmarks/src/generic/mock.rs @@ -165,7 +165,7 @@ impl pallet_xcm_benchmarks::generic::Config for Test { type TransactAsset = Balances; fn worst_case_response() -> (u64, Response) { - let assets: Assets = (Concrete(Here.into()), 100).into(); + let assets: Assets = (AssetId(Here.into()), 100).into(); (0, Response::Assets(assets)) } @@ -194,7 +194,7 @@ impl pallet_xcm_benchmarks::generic::Config for Test { } fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError> { - let assets: Assets = (Concrete(Here.into()), 100).into(); + let assets: Assets = (AssetId(Here.into()), 100).into(); let ticket = Location { parents: 0, interior: X1(GeneralIndex(0)), diff --git a/pallets/moonbeam-xcm-benchmarks/src/mock.rs b/pallets/moonbeam-xcm-benchmarks/src/mock.rs index 8e7ab86af9..9a75c0f64d 100644 --- a/pallets/moonbeam-xcm-benchmarks/src/mock.rs +++ b/pallets/moonbeam-xcm-benchmarks/src/mock.rs @@ -79,7 +79,7 @@ impl ContainsPair for AllAssetLocationsPass { #[cfg(feature = "runtime-benchmarks")] pub fn mock_worst_case_holding() -> Assets { let assets: Vec = vec![Asset { - id: Concrete(Location::parent()), + id: AssetId(Location::parent()), fun: Fungible(u128::MAX), }]; assets.into() diff --git a/precompiles/gmp/src/mock.rs b/precompiles/gmp/src/mock.rs index 37897dbf9f..f90e4b878c 100644 --- a/precompiles/gmp/src/mock.rs +++ b/precompiles/gmp/src/mock.rs @@ -116,11 +116,6 @@ impl pallet_balances::Config for Runtime { type RuntimeFreezeReason = (); } -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - pub struct DoNothingRouter; impl SendXcm for DoNothingRouter { type Ticket = (); @@ -161,8 +156,6 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); type AdminOrigin = frame_system::EnsureRoot; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; } parameter_types! { diff --git a/precompiles/xcm-utils/src/mock.rs b/precompiles/xcm-utils/src/mock.rs index 495a59d514..2098470bd1 100644 --- a/precompiles/xcm-utils/src/mock.rs +++ b/precompiles/xcm-utils/src/mock.rs @@ -194,11 +194,6 @@ impl pallet_balances::Config for Runtime { type RuntimeFreezeReason = (); } -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - parameter_types! { pub MatcherLocation: Location = Location::here(); } @@ -229,8 +224,6 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); type AdminOrigin = frame_system::EnsureRoot; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; } pub type Precompiles = PrecompileSetBuilder< R, diff --git a/precompiles/xtokens/src/mock.rs b/precompiles/xtokens/src/mock.rs index cd98e6ceb9..17ea747d82 100644 --- a/precompiles/xtokens/src/mock.rs +++ b/precompiles/xtokens/src/mock.rs @@ -250,7 +250,6 @@ impl WeightTrader for DummyWeightTrader { parameter_types! { pub UniversalLocation: InteriorLocation = Here; pub MatcherLocation: Location = Location::here(); - pub ReachableDest: Option = Some(Location::here()); pub const MaxAssetsIntoHolding: u32 = 64; } @@ -280,8 +279,6 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); type AdminOrigin = frame_system::EnsureRoot; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; } pub struct XcmConfig; diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index c87a4f7d7e..f66dcd57a1 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -1,5 +1,5 @@ [package] -authors = {workspace = true} +authors = { workspace = true } description = "Common code shared between runtimes" edition = "2021" homepage = "https://moonbeam.network" @@ -13,131 +13,132 @@ impl-trait-for-tuples = "0.2.1" log = "0.4" # Moonbeam -moonbeam-xcm-benchmarks = {workspace = true} -pallet-asset-manager = {workspace = true} -pallet-author-mapping = {workspace = true} -pallet-conviction-voting = {workspace = true} -pallet-ethereum-xcm = {workspace = true} -pallet-migrations = {workspace = true} -pallet-moonbeam-lazy-migrations = {workspace = true} -pallet-parachain-staking = {workspace = true} -pallet-precompile-benchmarks = {workspace = true} -pallet-randomness = {workspace = true} -pallet-relay-storage-roots = {workspace = true} -pallet-xcm-transactor = {workspace = true} -precompile-utils = {workspace = true} -xcm-primitives = {workspace = true} +moonbeam-xcm-benchmarks = { workspace = true } +pallet-asset-manager = { workspace = true } +pallet-author-mapping = { workspace = true } +pallet-conviction-voting = { workspace = true } +pallet-ethereum-xcm = { workspace = true } +pallet-migrations = { workspace = true } +pallet-moonbeam-lazy-migrations = { workspace = true } +pallet-parachain-staking = { workspace = true } +pallet-precompile-benchmarks = { workspace = true } +pallet-randomness = { workspace = true } +pallet-relay-storage-roots = { workspace = true } +pallet-xcm-transactor = { workspace = true } +precompile-utils = { workspace = true } +xcm-primitives = { workspace = true } # Substrate -cumulus-pallet-xcmp-queue = {workspace = true} -frame-benchmarking = {workspace = true} -frame-support = {workspace = true} -frame-system = {workspace = true} -pallet-assets = {workspace = true} -pallet-balances = {workspace = true} -pallet-collective = {workspace = true} -pallet-crowdloan-rewards = {workspace = true} -pallet-identity = {workspace = true} -pallet-moonbeam-orbiters = {workspace = true} -pallet-multisig = {workspace = true} -pallet-preimage = {workspace = true} -pallet-proxy = {workspace = true} -pallet-referenda = {workspace = true} -pallet-scheduler = {workspace = true} -pallet-sudo = {workspace = true} -pallet-timestamp = {workspace = true} -pallet-treasury = {workspace = true} -pallet-utility = {workspace = true} -pallet-whitelist = {workspace = true} -pallet-xcm = {workspace = true} -sp-api = {workspace = true} -sp-consensus-slots = {workspace = true} -sp-core = {workspace = true} -sp-io = {workspace = true} -sp-runtime = {workspace = true} -sp-std = {workspace = true} +cumulus-pallet-xcmp-queue = { workspace = true } +frame-benchmarking = { workspace = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +pallet-assets = { workspace = true } +pallet-balances = { workspace = true } +pallet-collective = { workspace = true } +pallet-crowdloan-rewards = { workspace = true } +pallet-identity = { workspace = true } +pallet-moonbeam-orbiters = { workspace = true } +pallet-multisig = { workspace = true } +pallet-preimage = { workspace = true } +pallet-proxy = { workspace = true } +pallet-referenda = { workspace = true } +pallet-scheduler = { workspace = true } +pallet-sudo = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-treasury = { workspace = true } +pallet-utility = { workspace = true } +pallet-whitelist = { workspace = true } +pallet-xcm = { workspace = true } +sp-api = { workspace = true } +sp-consensus-slots = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } +sp-genesis-builder = { workspace = true } # Frontier -fp-ethereum = {workspace = true} -fp-evm = {workspace = true} -pallet-evm = {workspace = true, features = ["forbid-evm-reentrancy"]} -pallet-evm-chain-id = {workspace = true} +fp-ethereum = { workspace = true } +fp-evm = { workspace = true } +pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] } +pallet-evm-chain-id = { workspace = true } # Moonkit -nimbus-primitives = {workspace = true} -pallet-async-backing = {workspace = true} -pallet-author-inherent = {workspace = true} -pallet-author-slot-filter = {workspace = true} +nimbus-primitives = { workspace = true } +pallet-async-backing = { workspace = true } +pallet-author-inherent = { workspace = true } +pallet-author-slot-filter = { workspace = true } # Polkadot -xcm = {workspace = true} -xcm-builder = {workspace = true} -xcm-executor = {workspace = true} +xcm = { workspace = true } +xcm-builder = { workspace = true } +xcm-executor = { workspace = true } # Parity -parity-scale-codec = {workspace = true} +parity-scale-codec = { workspace = true } -account = {workspace = true} +account = { workspace = true } [features] -runtime-benchmarks = [ - "cumulus-pallet-xcmp-queue/runtime-benchmarks", - "frame-benchmarking/runtime-benchmarks", - "pallet-asset-manager/runtime-benchmarks", - "pallet-assets/runtime-benchmarks", - "pallet-author-inherent/runtime-benchmarks", - "pallet-author-mapping/runtime-benchmarks", - "pallet-author-slot-filter/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-conviction-voting/runtime-benchmarks", - "pallet-crowdloan-rewards/runtime-benchmarks", - "pallet-ethereum-xcm/runtime-benchmarks", - "pallet-evm/runtime-benchmarks", - "pallet-identity/runtime-benchmarks", - "pallet-moonbeam-orbiters/runtime-benchmarks", - "pallet-multisig/runtime-benchmarks", - "pallet-parachain-staking/runtime-benchmarks", - "pallet-preimage/runtime-benchmarks", - "pallet-proxy/runtime-benchmarks", - "pallet-randomness/runtime-benchmarks", - "pallet-referenda/runtime-benchmarks", - "pallet-referenda/runtime-benchmarks", - "pallet-scheduler/runtime-benchmarks", - "pallet-sudo/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-treasury/runtime-benchmarks", - "pallet-utility/runtime-benchmarks", - "pallet-whitelist/runtime-benchmarks", - "pallet-xcm-transactor/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "pallet-moonbeam-lazy-migrations/runtime-benchmarks", - "moonbeam-xcm-benchmarks/runtime-benchmarks", -] std = [ - "fp-ethereum/std", - "fp-evm/std", - "frame-support/std", - "pallet-asset-manager/std", - "pallet-async-backing/std", - "pallet-author-inherent/std", - "pallet-author-mapping/std", - "pallet-ethereum-xcm/std", - "pallet-evm/std", - "pallet-migrations/std", - "pallet-parachain-staking/std", - "pallet-randomness/std", - "pallet-referenda/std", - "pallet-scheduler/std", - "pallet-xcm-transactor/std", - "pallet-moonbeam-lazy-migrations/std", - "parity-scale-codec/std", - "precompile-utils/std", - "sp-consensus-slots/std", - "sp-core/std", - "sp-runtime/std", - "sp-std/std", - "xcm-executor/std", - "xcm/std", - "account/std", + "fp-ethereum/std", + "fp-evm/std", + "frame-support/std", + "pallet-asset-manager/std", + "pallet-async-backing/std", + "pallet-author-inherent/std", + "pallet-author-mapping/std", + "pallet-ethereum-xcm/std", + "pallet-evm/std", + "pallet-migrations/std", + "pallet-parachain-staking/std", + "pallet-randomness/std", + "pallet-referenda/std", + "pallet-scheduler/std", + "pallet-xcm-transactor/std", + "pallet-moonbeam-lazy-migrations/std", + "parity-scale-codec/std", + "precompile-utils/std", + "sp-consensus-slots/std", + "sp-core/std", + "sp-runtime/std", + "sp-std/std", + "sp-genesis-builder/std", + "xcm-executor/std", + "xcm/std", + "account/std", +] +runtime-benchmarks = [ + "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "pallet-asset-manager/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", + "pallet-author-inherent/runtime-benchmarks", + "pallet-author-mapping/runtime-benchmarks", + "pallet-author-slot-filter/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-conviction-voting/runtime-benchmarks", + "pallet-crowdloan-rewards/runtime-benchmarks", + "pallet-ethereum-xcm/runtime-benchmarks", + "pallet-evm/runtime-benchmarks", + "pallet-identity/runtime-benchmarks", + "pallet-moonbeam-orbiters/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "pallet-parachain-staking/runtime-benchmarks", + "pallet-preimage/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-randomness/runtime-benchmarks", + "pallet-referenda/runtime-benchmarks", + "pallet-referenda/runtime-benchmarks", + "pallet-scheduler/runtime-benchmarks", + "pallet-sudo/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "pallet-whitelist/runtime-benchmarks", + "pallet-xcm-transactor/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "pallet-moonbeam-lazy-migrations/runtime-benchmarks", + "moonbeam-xcm-benchmarks/runtime-benchmarks", ] try-runtime = ["frame-support/try-runtime", "pallet-migrations/try-runtime"] diff --git a/runtime/common/src/apis.rs b/runtime/common/src/apis.rs index 8fd783f852..9b2af4c61a 100644 --- a/runtime/common/src/apis.rs +++ b/runtime/common/src/apis.rs @@ -89,6 +89,16 @@ macro_rules! impl_runtime_apis_plus_common { } } + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + frame_support::genesis_builder_helper::create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + frame_support::genesis_builder_helper::build_config::(config) + } + } + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { fn account_nonce(account: AccountId) -> Index { System::account_nonce(account) @@ -587,6 +597,8 @@ macro_rules! impl_runtime_apis_plus_common { use frame_support::traits::StorageInfoTrait; use MoonbeamXcmBenchmarks::XcmGenericBenchmarks as MoonbeamXcmGenericBench; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + let mut list = Vec::::new(); list_benchmarks!(list, extra); @@ -600,8 +612,12 @@ macro_rules! impl_runtime_apis_plus_common { ) -> Result, sp_runtime::RuntimeString> { use frame_benchmarking::{add_benchmark, BenchmarkBatch, Benchmarking}; use frame_support::traits::TrackedStorageKey; + use cumulus_primitives_core::ParaId; - use xcm::latest::prelude::*; + use xcm::latest::prelude::{ + GeneralIndex, Junction, Junctions, Location, Response, NetworkId, AssetId, + Assets as XcmAssets, Fungible, Asset, ParentThen, Parachain, Parent + }; use frame_benchmarking::BenchmarkError; use frame_system_benchmarking::Pallet as SystemBench; @@ -611,6 +627,41 @@ macro_rules! impl_runtime_apis_plus_common { impl moonbeam_xcm_benchmarks::generic::Config for Runtime {} use pallet_asset_manager::Config as PalletAssetManagerConfig; + + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + type ExistentialDeposit = ConstU128<0>; + parameter_types! { + pub const RandomParaId: ParaId = ParaId::new(43211234); + } + + impl pallet_xcm::benchmarking::Config for Runtime { + fn reachable_dest() -> Option { + Some(Parent.into()) + } + + fn teleportable_asset_and_dest() -> Option<(Asset, Location)> { + // Relay/native token can be teleported between AH and Relay. + Some(( + Asset { + fun: Fungible(ExistentialDeposit::get()), + id: AssetId(Parent.into()) + }, + Parent.into(), + )) + } + + fn reserve_transferable_asset_and_dest() -> Option<(Asset, Location)> { + Some(( + Asset { + fun: Fungible(ExistentialDeposit::get()), + id: AssetId(Parent.into()) + }, + // AH can reserve transfer native token to some random parachain. + ParentThen(Parachain(RandomParaId::get().into()).into()).into(), + )) + } + } + impl pallet_xcm_benchmarks::Config for Runtime { type XcmConfig = xcm_config::XcmExecutorConfig; type AccountIdConverter = xcm_config::LocationToAccountId; @@ -618,14 +669,14 @@ macro_rules! impl_runtime_apis_plus_common { fn valid_destination() -> Result { Ok(Location::parent()) } - fn worst_case_holding(_depositable_count: u32) -> Assets { + fn worst_case_holding(_depositable_count: u32) -> XcmAssets { // 100 fungibles const HOLDING_FUNGIBLES: u32 = 100; let fungibles_amount: u128 = 100; let assets = (0..HOLDING_FUNGIBLES).map(|i| { let location: Location = GeneralIndex(i as u128).into(); Asset { - id: Concrete(location), + id: AssetId(location), fun: Fungible(fungibles_amount * i as u128), } .into() @@ -633,7 +684,7 @@ macro_rules! impl_runtime_apis_plus_common { .chain( core::iter::once( Asset { - id: Concrete(Location::parent()), + id: AssetId(Location::parent()), fun: Fungible(u128::MAX) } ) @@ -643,7 +694,7 @@ macro_rules! impl_runtime_apis_plus_common { for (i, asset) in assets.iter().enumerate() { if let Asset { - id: Concrete(location), + id: AssetId(location), fun: Fungible(_) } = asset { Result<(Assets, Assets), BenchmarkError> { + -> Result<(XcmAssets, XcmAssets), BenchmarkError> { Err(BenchmarkError::Skip) } @@ -700,14 +751,18 @@ macro_rules! impl_runtime_apis_plus_common { } fn claimable_asset() - -> Result<(Location, Location, Assets), BenchmarkError> { + -> Result<(Location, Location, XcmAssets), BenchmarkError> { let origin = Location::parent(); - let assets: Assets = (Concrete(Location::parent()), 1_000u128) + let assets: XcmAssets = (AssetId(Location::parent()), 1_000u128) .into(); - let ticket = Location { parents: 0, interior: Here }; + let ticket = Location { parents: 0, interior: [].into() /* Here */ }; Ok((origin, ticket, assets)) } + fn fee_asset() -> Result { + Err(BenchmarkError::Skip) + } + fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { Err(BenchmarkError::Skip) diff --git a/runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs index 5449587638..26abb12c14 100644 --- a/runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs @@ -57,28 +57,94 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn enqueue_xcmp_message() -> Weight { - todo!() - } - + // Proof Size summary in bytes: + // Measured: `148` + // Estimated: `3517` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(12_000_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn suspend_channel() -> Weight { - todo!() - } - + // Proof Size summary in bytes: + // Measured: `142` + // Estimated: `1627` + // Minimum execution time: 4_831_000 picoseconds. + Weight::from_parts(4_988_000, 0) + .saturating_add(Weight::from_parts(0, 1627)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn resume_channel() -> Weight { - todo!() - } - + // Proof Size summary in bytes: + // Measured: `177` + // Estimated: `1662` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(4_000_000, 0) + .saturating_add(Weight::from_parts(0, 1662)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } fn take_first_concatenated_xcm() -> Weight { - todo!() - } - + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn on_idle_good_msg() -> Weight { - todo!() - } - + // Proof Size summary in bytes: + // Measured: `65777` + // Estimated: `69242` + // Minimum execution time: 44_000_000 picoseconds. + Weight::from_parts(45_000_000, 0) + .saturating_add(Weight::from_parts(0, 69242)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) fn on_idle_large_msg() -> Weight { - todo!() - } + // Proof Size summary in bytes: + // Measured: `65776` + // Estimated: `69241` + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(30_000_000, 0) + .saturating_add(Weight::from_parts(0, 69241)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } diff --git a/runtime/common/src/weights/pallet_balances.rs b/runtime/common/src/weights/pallet_balances.rs index 7f54bafcc3..afe11d96d2 100644 --- a/runtime/common/src/weights/pallet_balances.rs +++ b/runtime/common/src/weights/pallet_balances.rs @@ -145,8 +145,15 @@ impl pallet_balances::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2591).saturating_mul(u.into())) } - + /// Storage: `Balances::InactiveIssuance` (r:1 w:0) + /// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) fn force_adjust_total_issuance() -> Weight { - todo!() - } + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1501` + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(6_000_000, 0) + .saturating_add(Weight::from_parts(0, 1501)) + .saturating_add(T::DbWeight::get().reads(1)) + } } diff --git a/runtime/common/src/weights/pallet_sudo.rs b/runtime/common/src/weights/pallet_sudo.rs index fb5519a011..fce6e127cb 100644 --- a/runtime/common/src/weights/pallet_sudo.rs +++ b/runtime/common/src/weights/pallet_sudo.rs @@ -79,8 +79,16 @@ impl pallet_sudo::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 1505)) .saturating_add(T::DbWeight::get().reads(1)) } - + /// Storage: `Sudo::Key` (r:1 w:1) + /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn remove_key() -> Weight { - todo!() - } + // Proof Size summary in bytes: + // Measured: `153` + // Estimated: `1505` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_000_000, 0) + .saturating_add(Weight::from_parts(0, 1505)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/runtime/common/src/weights/pallet_xcm.rs b/runtime/common/src/weights/pallet_xcm.rs index 397791383d..a555ca1b1c 100644 --- a/runtime/common/src/weights/pallet_xcm.rs +++ b/runtime/common/src/weights/pallet_xcm.rs @@ -282,13 +282,13 @@ impl pallet_xcm::WeightInfo for WeightInfo { fn transfer_assets() -> Weight { todo!() - } + } fn new_query() -> Weight { todo!() - } + } fn take_response() -> Weight { todo!() - } + } } diff --git a/runtime/moonbase/Cargo.toml b/runtime/moonbase/Cargo.toml index 94746af2ec..8bd1d10a25 100644 --- a/runtime/moonbase/Cargo.toml +++ b/runtime/moonbase/Cargo.toml @@ -119,6 +119,7 @@ sp-std = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } sp-weights = { workspace = true } +sp-genesis-builder = { workspace = true } # Frontier fp-evm = { workspace = true } @@ -294,6 +295,7 @@ std = [ "sp-std/std", "sp-transaction-pool/std", "sp-version/std", + "sp-genesis-builder/std", "strum/std", "xcm-builder/std", "xcm-executor/std", @@ -317,6 +319,7 @@ on-chain-release-build = ["sp-api/disable-logging"] runtime-benchmarks = [ "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", @@ -357,7 +360,7 @@ runtime-benchmarks = [ "pallet-treasury/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-whitelist/runtime-benchmarks", - "pallet-xcm-benchmarks", + "pallet-xcm-benchmarks/runtime-benchmarks", "pallet-xcm-transactor/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "session-keys-primitives/runtime-benchmarks", diff --git a/runtime/moonbase/src/lib.rs b/runtime/moonbase/src/lib.rs index fba8e78677..fad06dcc9e 100644 --- a/runtime/moonbase/src/lib.rs +++ b/runtime/moonbase/src/lib.rs @@ -1431,7 +1431,7 @@ construct_runtime! { Migrations: pallet_migrations::{Pallet, Storage, Config, Event} = 32, XcmTransactor: pallet_xcm_transactor::{Pallet, Call, Config, Storage, Event} = 33, ProxyGenesisCompanion: pallet_proxy_genesis_companion::{Pallet, Config} = 34, - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 35, + // Previously 35: BaseFee // Previously 36: pallet_assets:: MoonbeamOrbiters: pallet_moonbeam_orbiters::{Pallet, Call, Storage, Event, Config} = 37, EthereumXcm: pallet_ethereum_xcm::{Pallet, Call, Storage, Origin} = 38, @@ -1452,6 +1452,7 @@ construct_runtime! { MoonbeamLazyMigrations: pallet_moonbeam_lazy_migrations::{Pallet, Call, Storage} = 51, RelayStorageRoots: pallet_relay_storage_roots::{Pallet, Storage} = 52, PrecompileBenchmarks: pallet_precompile_benchmarks::{Pallet} = 53, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 54, } } @@ -1511,9 +1512,9 @@ mod benches { [pallet_crowdloan_rewards, CrowdloanRewards] [pallet_author_mapping, AuthorMapping] [pallet_proxy, Proxy] - [pallet_identity, Identity] + // TODO(RODRIGO) [pallet_identity, Identity] [cumulus_pallet_xcmp_queue, XcmpQueue] - [pallet_xcm, PolkadotXcm] + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] [pallet_asset_manager, AssetManager] [pallet_xcm_transactor, XcmTransactor] [pallet_moonbeam_orbiters, MoonbeamOrbiters] diff --git a/runtime/moonbase/src/xcm_config.rs b/runtime/moonbase/src/xcm_config.rs index 3d5b030a44..b9c592a5ce 100644 --- a/runtime/moonbase/src/xcm_config.rs +++ b/runtime/moonbase/src/xcm_config.rs @@ -18,10 +18,9 @@ //! use super::{ - governance, AccountId, AssetId, AssetManager, Assets, Balance, Balances, DealWithFees, - Erc20XcmBridge, MaintenanceMode, MessageQueue, ParachainInfo, ParachainSystem, Perbill, - PolkadotXcm, Runtime, RuntimeBlockWeights, RuntimeCall, RuntimeEvent, RuntimeOrigin, Treasury, - XcmpQueue, + governance, AccountId, AssetId, AssetManager, Balance, Balances, DealWithFees, Erc20XcmBridge, + MaintenanceMode, MessageQueue, ParachainInfo, ParachainSystem, Perbill, PolkadotXcm, Runtime, + RuntimeBlockWeights, RuntimeCall, RuntimeEvent, RuntimeOrigin, Treasury, XcmpQueue, }; use moonbeam_runtime_common::weights as moonbeam_weights; use pallet_evm_precompileset_assets_erc20::AccountIdAssetIdConversion; @@ -49,7 +48,10 @@ use xcm_builder::{ use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; -use xcm::latest::prelude::*; +use xcm::latest::prelude::{ + Asset, GlobalConsensus, InteriorLocation, Junction, Location, NetworkId, PalletInstance, + Parachain, +}; use xcm_executor::traits::{CallDispatcher, ConvertLocation, JustTry}; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; @@ -122,7 +124,7 @@ impl ConvertLocation for LocationToH160 { // This is intended to match FOREIGN ASSETS pub type ForeignFungiblesTransactor = FungiblesAdapter< // Use this fungibles implementation: - Assets, + super::Assets, // Use this currency when it is a fungible asset matching the given location or name: ( ConvertedConcreteId< @@ -230,7 +232,7 @@ parameter_types! { /// We do not burn anything because we want to mimic exactly what /// the sovereign account has pub type XcmFeesToAccount = xcm_primitives::XcmFeesToAccount< - Assets, + super::Assets, ( ConvertedConcreteId< AssetId, @@ -329,11 +331,6 @@ type XcmExecutor = pallet_erc20_xcm_bridge::XcmExecutorWrapper< xcm_executor::XcmExecutor, >; -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; @@ -358,8 +355,6 @@ impl pallet_xcm::Config for Runtime { type RemoteLockConsumerIdentifier = (); // TODO pallet-xcm weights type WeightInfo = moonbeam_weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; } diff --git a/runtime/moonbase/tests/xcm_mock/parachain.rs b/runtime/moonbase/tests/xcm_mock/parachain.rs index 315af8830f..2b807765fa 100644 --- a/runtime/moonbase/tests/xcm_mock/parachain.rs +++ b/runtime/moonbase/tests/xcm_mock/parachain.rs @@ -722,11 +722,6 @@ parameter_types! { pub MatcherLocation: Location = Location::here(); } -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; @@ -753,8 +748,6 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); type AdminOrigin = frame_system::EnsureRoot; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; } // Our AssetType. For now we only handle Xcm Assets diff --git a/runtime/moonbase/tests/xcm_mock/relay_chain.rs b/runtime/moonbase/tests/xcm_mock/relay_chain.rs index 4b068d9638..40bff5e1ae 100644 --- a/runtime/moonbase/tests/xcm_mock/relay_chain.rs +++ b/runtime/moonbase/tests/xcm_mock/relay_chain.rs @@ -209,11 +209,6 @@ impl Config for XcmConfig { pub type LocalOriginToLocation = SignedToAccountId32; -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; @@ -239,8 +234,6 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); type AdminOrigin = frame_system::EnsureRoot; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; } parameter_types! { diff --git a/runtime/moonbase/tests/xcm_mock/statemint_like.rs b/runtime/moonbase/tests/xcm_mock/statemint_like.rs index 65909e6578..a3da2c2160 100644 --- a/runtime/moonbase/tests/xcm_mock/statemint_like.rs +++ b/runtime/moonbase/tests/xcm_mock/statemint_like.rs @@ -323,11 +323,6 @@ pub type LocalOriginToLocation = SignedToAccountId32; -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; @@ -352,8 +347,6 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); type AdminOrigin = frame_system::EnsureRoot; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/runtime/moonbeam/Cargo.toml b/runtime/moonbeam/Cargo.toml index 032e054504..cd68008905 100644 --- a/runtime/moonbeam/Cargo.toml +++ b/runtime/moonbeam/Cargo.toml @@ -115,6 +115,7 @@ sp-std = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } sp-weights = { workspace = true } +sp-genesis-builder = { workspace = true } # Frontier fp-evm = { workspace = true } @@ -284,6 +285,7 @@ std = [ "sp-std/std", "sp-transaction-pool/std", "sp-version/std", + "sp-genesis-builder/std", "strum/std", "xcm-builder/std", "xcm-executor/std", @@ -302,6 +304,7 @@ on-chain-release-build = ["sp-api/disable-logging"] runtime-benchmarks = [ "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks", "frame-benchmarking", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", @@ -340,7 +343,7 @@ runtime-benchmarks = [ "pallet-treasury/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-whitelist/runtime-benchmarks", - "pallet-xcm-benchmarks", + "pallet-xcm-benchmarks/runtime-benchmarks", "pallet-xcm-transactor/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "session-keys-primitives/runtime-benchmarks", diff --git a/runtime/moonbeam/src/lib.rs b/runtime/moonbeam/src/lib.rs index fd9c3ea620..58f1e4602e 100644 --- a/runtime/moonbeam/src/lib.rs +++ b/runtime/moonbeam/src/lib.rs @@ -1461,9 +1461,9 @@ mod benches { [pallet_crowdloan_rewards, CrowdloanRewards] [pallet_author_mapping, AuthorMapping] [pallet_proxy, Proxy] - [pallet_identity, Identity] + // TODO(RODRIGO) [pallet_identity, Identity] [cumulus_pallet_xcmp_queue, XcmpQueue] - [pallet_xcm, PolkadotXcm] + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] [pallet_asset_manager, AssetManager] [pallet_xcm_transactor, XcmTransactor] [pallet_moonbeam_orbiters, MoonbeamOrbiters] diff --git a/runtime/moonbeam/src/xcm_config.rs b/runtime/moonbeam/src/xcm_config.rs index b89bea9a14..c661e5f33d 100644 --- a/runtime/moonbeam/src/xcm_config.rs +++ b/runtime/moonbeam/src/xcm_config.rs @@ -18,10 +18,9 @@ //! use super::{ - governance, AccountId, AssetId, AssetManager, Assets, Balance, Balances, DealWithFees, - Erc20XcmBridge, MaintenanceMode, MessageQueue, ParachainInfo, ParachainSystem, Perbill, - PolkadotXcm, Runtime, RuntimeBlockWeights, RuntimeCall, RuntimeEvent, RuntimeOrigin, Treasury, - XcmpQueue, + governance, AccountId, AssetId, AssetManager, Balance, Balances, DealWithFees, Erc20XcmBridge, + MaintenanceMode, MessageQueue, ParachainInfo, ParachainSystem, Perbill, PolkadotXcm, Runtime, + RuntimeBlockWeights, RuntimeCall, RuntimeEvent, RuntimeOrigin, Treasury, XcmpQueue, }; use frame_support::{ @@ -49,7 +48,10 @@ use xcm_builder::{ }; use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; -use xcm::latest::prelude::*; +use xcm::latest::prelude::{ + Asset, GlobalConsensus, InteriorLocation, Junction, Location, NetworkId, PalletInstance, + Parachain, +}; use xcm_executor::traits::{CallDispatcher, ConvertLocation, JustTry}; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; @@ -118,7 +120,7 @@ impl ConvertLocation for LocationToH160 { // It will use pallet-assets, and the Id will be matched against AsAssetType pub type ForeignFungiblesTransactor = FungiblesAdapter< // Use this fungibles implementation: - Assets, + super::Assets, // Use this currency when it is a fungible asset matching the given location or name: ( ConvertedConcreteId< @@ -222,7 +224,7 @@ parameter_types! { /// We do not burn anything because we want to mimic exactly what /// the sovereign account has pub type XcmFeesToAccount = xcm_primitives::XcmFeesToAccount< - Assets, + super::Assets, ( ConvertedConcreteId< AssetId, @@ -321,11 +323,6 @@ pub type XcmRouter = ( XcmpQueue, ); -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; @@ -350,8 +347,6 @@ impl pallet_xcm::Config for Runtime { type RemoteLockConsumerIdentifier = (); // TODO pallet-xcm weights type WeightInfo = moonbeam_weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; } diff --git a/runtime/moonbeam/tests/xcm_mock/parachain.rs b/runtime/moonbeam/tests/xcm_mock/parachain.rs index 9ae6224d95..075a5a8c8c 100644 --- a/runtime/moonbeam/tests/xcm_mock/parachain.rs +++ b/runtime/moonbeam/tests/xcm_mock/parachain.rs @@ -682,11 +682,6 @@ parameter_types! { pub MatcherLocation: Location = Location::here(); } -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; @@ -713,8 +708,6 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); type AdminOrigin = frame_system::EnsureRoot; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; } // Our AssetType. For now we only handle Xcm Assets diff --git a/runtime/moonbeam/tests/xcm_mock/relay_chain.rs b/runtime/moonbeam/tests/xcm_mock/relay_chain.rs index 4b068d9638..40bff5e1ae 100644 --- a/runtime/moonbeam/tests/xcm_mock/relay_chain.rs +++ b/runtime/moonbeam/tests/xcm_mock/relay_chain.rs @@ -209,11 +209,6 @@ impl Config for XcmConfig { pub type LocalOriginToLocation = SignedToAccountId32; -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; @@ -239,8 +234,6 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); type AdminOrigin = frame_system::EnsureRoot; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; } parameter_types! { diff --git a/runtime/moonbeam/tests/xcm_mock/statemint_like.rs b/runtime/moonbeam/tests/xcm_mock/statemint_like.rs index 65909e6578..a3da2c2160 100644 --- a/runtime/moonbeam/tests/xcm_mock/statemint_like.rs +++ b/runtime/moonbeam/tests/xcm_mock/statemint_like.rs @@ -323,11 +323,6 @@ pub type LocalOriginToLocation = SignedToAccountId32; -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; @@ -352,8 +347,6 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); type AdminOrigin = frame_system::EnsureRoot; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/runtime/moonriver/Cargo.toml b/runtime/moonriver/Cargo.toml index 7c4c328c9c..73f02e7633 100644 --- a/runtime/moonriver/Cargo.toml +++ b/runtime/moonriver/Cargo.toml @@ -116,6 +116,7 @@ sp-std = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } sp-weights = { workspace = true } +sp-genesis-builder = { workspace = true } # Frontier fp-evm = { workspace = true } @@ -283,6 +284,7 @@ std = [ "sp-std/std", "sp-transaction-pool/std", "sp-version/std", + "sp-genesis-builder/std", "strum/std", "xcm-builder/std", "xcm-executor/std", @@ -306,6 +308,7 @@ on-chain-release-build = ["sp-api/disable-logging"] runtime-benchmarks = [ "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks", "frame-benchmarking", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", @@ -344,7 +347,7 @@ runtime-benchmarks = [ "pallet-treasury/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-whitelist/runtime-benchmarks", - "pallet-xcm-benchmarks", + "pallet-xcm-benchmarks/runtime-benchmarks", "pallet-xcm-transactor/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "session-keys-primitives/runtime-benchmarks", diff --git a/runtime/moonriver/src/lib.rs b/runtime/moonriver/src/lib.rs index 6a194db06b..a408273fd3 100644 --- a/runtime/moonriver/src/lib.rs +++ b/runtime/moonriver/src/lib.rs @@ -1463,9 +1463,9 @@ mod benches { [pallet_crowdloan_rewards, CrowdloanRewards] [pallet_author_mapping, AuthorMapping] [pallet_proxy, Proxy] - [pallet_identity, Identity] + // TODO(RODRIGO) [pallet_identity, Identity] [cumulus_pallet_xcmp_queue, XcmpQueue] - [pallet_xcm, PolkadotXcm] + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] [pallet_asset_manager, AssetManager] [pallet_xcm_transactor, XcmTransactor] [pallet_moonbeam_orbiters, MoonbeamOrbiters] diff --git a/runtime/moonriver/src/xcm_config.rs b/runtime/moonriver/src/xcm_config.rs index 6474801ad6..939db584a9 100644 --- a/runtime/moonriver/src/xcm_config.rs +++ b/runtime/moonriver/src/xcm_config.rs @@ -18,10 +18,9 @@ //! use super::{ - governance, AccountId, AssetId, AssetManager, Assets, Balance, Balances, DealWithFees, - Erc20XcmBridge, MaintenanceMode, MessageQueue, ParachainInfo, ParachainSystem, Perbill, - PolkadotXcm, Runtime, RuntimeBlockWeights, RuntimeCall, RuntimeEvent, RuntimeOrigin, Treasury, - XcmpQueue, + governance, AccountId, AssetId, AssetManager, Balance, Balances, DealWithFees, Erc20XcmBridge, + MaintenanceMode, MessageQueue, ParachainInfo, ParachainSystem, Perbill, PolkadotXcm, Runtime, + RuntimeBlockWeights, RuntimeCall, RuntimeEvent, RuntimeOrigin, Treasury, XcmpQueue, }; use frame_support::{ @@ -49,7 +48,10 @@ use xcm_builder::{ }; use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; -use xcm::latest::prelude::*; +use xcm::latest::prelude::{ + Asset, GlobalConsensus, InteriorLocation, Junction, Location, NetworkId, PalletInstance, + Parachain, +}; use xcm_executor::traits::{CallDispatcher, ConvertLocation, JustTry}; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; @@ -120,7 +122,7 @@ impl ConvertLocation for LocationToH160 { // It will use pallet-assets, and the Id will be matched against AsAssetType pub type ForeignFungiblesTransactor = FungiblesAdapter< // Use this fungibles implementation: - Assets, + super::Assets, // Use this currency when it is a fungible asset matching the given location or name: ( ConvertedConcreteId< @@ -230,7 +232,7 @@ parameter_types! { /// We do not burn anything because we want to mimic exactly what /// the sovereign account has pub type XcmFeesToAccount = xcm_primitives::XcmFeesToAccount< - Assets, + super::Assets, ( ConvertedConcreteId< AssetId, @@ -329,11 +331,6 @@ pub type XcmRouter = ( XcmpQueue, ); -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; @@ -358,8 +355,6 @@ impl pallet_xcm::Config for Runtime { type RemoteLockConsumerIdentifier = (); // TODO pallet-xcm weights type WeightInfo = moonbeam_weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; } diff --git a/runtime/moonriver/tests/xcm_mock/parachain.rs b/runtime/moonriver/tests/xcm_mock/parachain.rs index 1617475606..2b3e11a9ac 100644 --- a/runtime/moonriver/tests/xcm_mock/parachain.rs +++ b/runtime/moonriver/tests/xcm_mock/parachain.rs @@ -687,11 +687,6 @@ parameter_types! { pub MatcherLocation: Location = Location::here(); } -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; @@ -718,8 +713,6 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); type AdminOrigin = frame_system::EnsureRoot; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; } // Our AssetType. For now we only handle Xcm Assets diff --git a/runtime/moonriver/tests/xcm_mock/relay_chain.rs b/runtime/moonriver/tests/xcm_mock/relay_chain.rs index 4b068d9638..40bff5e1ae 100644 --- a/runtime/moonriver/tests/xcm_mock/relay_chain.rs +++ b/runtime/moonriver/tests/xcm_mock/relay_chain.rs @@ -209,11 +209,6 @@ impl Config for XcmConfig { pub type LocalOriginToLocation = SignedToAccountId32; -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; @@ -239,8 +234,6 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); type AdminOrigin = frame_system::EnsureRoot; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; } parameter_types! { diff --git a/runtime/moonriver/tests/xcm_mock/statemine_like.rs b/runtime/moonriver/tests/xcm_mock/statemine_like.rs index 83258b0204..b3d5e778c0 100644 --- a/runtime/moonriver/tests/xcm_mock/statemine_like.rs +++ b/runtime/moonriver/tests/xcm_mock/statemine_like.rs @@ -323,11 +323,6 @@ pub type LocalOriginToLocation = SignedToAccountId32; -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; @@ -352,8 +347,6 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); type AdminOrigin = frame_system::EnsureRoot; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; } impl cumulus_pallet_xcm::Config for Runtime { From 4693b738b9d48d87f55a691175363f59bf97bf50 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 5 Mar 2024 14:28:34 +0000 Subject: [PATCH 04/80] fix runtime-benchmarks for pallet-identity --- primitives/account/Cargo.toml | 8 +- primitives/account/src/lib.rs | 20 +++ runtime/common/src/weights/pallet_identity.rs | 119 ++++++++++++++---- runtime/moonbase/src/lib.rs | 4 +- runtime/moonbeam/src/lib.rs | 4 +- runtime/moonriver/src/lib.rs | 4 +- 6 files changed, 124 insertions(+), 35 deletions(-) diff --git a/primitives/account/Cargo.toml b/primitives/account/Cargo.toml index 92ffb618b4..4865ca9f0e 100644 --- a/primitives/account/Cargo.toml +++ b/primitives/account/Cargo.toml @@ -8,14 +8,14 @@ repository = { workspace = true } version = "0.1.1" [package.metadata.docs.rs] -targets = [ "x86_64-unknown-linux-gnu" ] +targets = ["x86_64-unknown-linux-gnu"] [dependencies] blake2-rfc = { workspace = true, optional = true } impl-serde = { workspace = true } -libsecp256k1 = { workspace = true, features = [ "hmac" ] } +libsecp256k1 = { workspace = true, features = ["hmac"] } log = { workspace = true } -serde = { workspace = true, features = [ "derive" ] } +serde = { workspace = true, features = ["derive"] } sha3 = { workspace = true } # Substrate @@ -31,7 +31,7 @@ sp-std = { workspace = true } hex = { workspace = true } [features] -default = [ "std" ] +default = ["std"] std = [ "full_crypto", "hex/std", diff --git a/primitives/account/src/lib.rs b/primitives/account/src/lib.rs index 84f6e121c7..1a1d6a916a 100644 --- a/primitives/account/src/lib.rs +++ b/primitives/account/src/lib.rs @@ -82,6 +82,12 @@ impl From<[u8; 32]> for AccountId20 { Self(buffer) } } +impl From for AccountId20 { + fn from(account: sp_runtime::AccountId32) -> Self { + let bytes: &[u8; 32] = account.as_ref(); + Self::from(*bytes) + } +} impl From for AccountId20 { fn from(h160: H160) -> Self { @@ -116,6 +122,20 @@ impl From for EthereumSignature { } } +impl From for EthereumSignature { + fn from(signature: sp_runtime::MultiSignature) -> Self { + match signature { + sp_runtime::MultiSignature::Ed25519(_) => { + panic!("Ed25519 not supported for EthereumSignature") + } + sp_runtime::MultiSignature::Sr25519(_) => { + panic!("Sr25519 not supported for EthereumSignature") + } + sp_runtime::MultiSignature::Ecdsa(sig) => Self(sig), + } + } +} + impl sp_runtime::traits::Verify for EthereumSignature { type Signer = EthereumSigner; fn verify>(&self, mut msg: L, signer: &AccountId20) -> bool { diff --git a/runtime/common/src/weights/pallet_identity.rs b/runtime/common/src/weights/pallet_identity.rs index 640b7a8748..cf46431bb3 100644 --- a/runtime/common/src/weights/pallet_identity.rs +++ b/runtime/common/src/weights/pallet_identity.rs @@ -64,7 +64,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7526), added: 10001, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[0, 100]`. - fn set_identity(r: u32 ) -> Weight { + fn set_identity(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `430 + r * (5 ±0)` // Estimated: `10991` @@ -127,7 +127,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. /// The range of component `x` is `[0, 100]`. - fn clear_identity(r: u32, s: u32) -> Weight { + fn clear_identity(r: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `445 + r * (5 ±0) + s * (20 ±0) + x * (66 ±0)` // Estimated: `10991` @@ -164,7 +164,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7526), added: 10001, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[0, 100]`. - fn cancel_request(r: u32,) -> Weight { + fn cancel_request(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `386 + x * (66 ±0)` // Estimated: `10991` @@ -339,32 +339,101 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - + /// Storage: `Identity::UsernameAuthorities` (r:0 w:1) + /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) fn add_username_authority() -> Weight { - todo!() - } - + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::UsernameAuthorities` (r:1 w:1) + /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) fn remove_username_authority() -> Weight { - todo!() - } - + // Proof Size summary in bytes: + // Measured: `67` + // Estimated: `3505` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(Weight::from_parts(0, 3505)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::UsernameAuthorities` (r:1 w:1) + /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `Identity::AccountOfUsername` (r:1 w:1) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`) + /// Storage: `Identity::PendingUsernames` (r:1 w:0) + /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7560), added: 10035, mode: `MaxEncodedLen`) fn set_username_for() -> Weight { - todo!() - } - + // Proof Size summary in bytes: + // Measured: `67` + // Estimated: `11025` + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(23_000_000, 0) + .saturating_add(Weight::from_parts(0, 11025)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Identity::PendingUsernames` (r:1 w:1) + /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7560), added: 10035, mode: `MaxEncodedLen`) + /// Storage: `Identity::AccountOfUsername` (r:0 w:1) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`) fn accept_username() -> Weight { - todo!() - } - + // Proof Size summary in bytes: + // Measured: `101` + // Estimated: `11025` + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(20_000_000, 0) + .saturating_add(Weight::from_parts(0, 11025)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Identity::PendingUsernames` (r:1 w:1) + /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) fn remove_expired_approval() -> Weight { - todo!() - } - + // Proof Size summary in bytes: + // Measured: `101` + // Estimated: `3538` + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(30_000_000, 0) + .saturating_add(Weight::from_parts(0, 3538)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::AccountOfUsername` (r:1 w:0) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7560), added: 10035, mode: `MaxEncodedLen`) fn set_primary_username() -> Weight { - todo!() - } - + // Proof Size summary in bytes: + // Measured: `232` + // Estimated: `11025` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) + .saturating_add(Weight::from_parts(0, 11025)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::AccountOfUsername` (r:1 w:1) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7560), added: 10035, mode: `MaxEncodedLen`) fn remove_dangling_username() -> Weight { - todo!() - } -} + // Proof Size summary in bytes: + // Measured: `86` + // Estimated: `11025` + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(11_000_000, 0) + .saturating_add(Weight::from_parts(0, 11025)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} \ No newline at end of file diff --git a/runtime/moonbase/src/lib.rs b/runtime/moonbase/src/lib.rs index fad06dcc9e..6725840006 100644 --- a/runtime/moonbase/src/lib.rs +++ b/runtime/moonbase/src/lib.rs @@ -640,7 +640,7 @@ impl pallet_identity::Config for Runtime { type RegistrarOrigin = IdentityRegistrarOrigin; type OffchainSignature = Signature; type SigningPublicKey = ::Signer; - type UsernameAuthorityOrigin = EnsureRoot; + type UsernameAuthorityOrigin = EnsureRoot; type PendingUsernameExpiration = PendingUsernameExpiration; type MaxSuffixLength = MaxSuffixLength; type MaxUsernameLength = MaxUsernameLength; @@ -1512,7 +1512,7 @@ mod benches { [pallet_crowdloan_rewards, CrowdloanRewards] [pallet_author_mapping, AuthorMapping] [pallet_proxy, Proxy] - // TODO(RODRIGO) [pallet_identity, Identity] + [pallet_identity, Identity] [cumulus_pallet_xcmp_queue, XcmpQueue] [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] [pallet_asset_manager, AssetManager] diff --git a/runtime/moonbeam/src/lib.rs b/runtime/moonbeam/src/lib.rs index 58f1e4602e..135b668f8f 100644 --- a/runtime/moonbeam/src/lib.rs +++ b/runtime/moonbeam/src/lib.rs @@ -623,7 +623,7 @@ impl pallet_identity::Config for Runtime { type RegistrarOrigin = IdentityRegistrarOrigin; type OffchainSignature = Signature; type SigningPublicKey = ::Signer; - type UsernameAuthorityOrigin = EnsureRoot; + type UsernameAuthorityOrigin = EnsureRoot; type PendingUsernameExpiration = PendingUsernameExpiration; type MaxSuffixLength = MaxSuffixLength; type MaxUsernameLength = MaxUsernameLength; @@ -1461,7 +1461,7 @@ mod benches { [pallet_crowdloan_rewards, CrowdloanRewards] [pallet_author_mapping, AuthorMapping] [pallet_proxy, Proxy] - // TODO(RODRIGO) [pallet_identity, Identity] + [pallet_identity, Identity] [cumulus_pallet_xcmp_queue, XcmpQueue] [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] [pallet_asset_manager, AssetManager] diff --git a/runtime/moonriver/src/lib.rs b/runtime/moonriver/src/lib.rs index a408273fd3..d41000ccbe 100644 --- a/runtime/moonriver/src/lib.rs +++ b/runtime/moonriver/src/lib.rs @@ -624,7 +624,7 @@ impl pallet_identity::Config for Runtime { type RegistrarOrigin = IdentityRegistrarOrigin; type OffchainSignature = Signature; type SigningPublicKey = ::Signer; - type UsernameAuthorityOrigin = EnsureRoot; + type UsernameAuthorityOrigin = EnsureRoot; type PendingUsernameExpiration = PendingUsernameExpiration; type MaxSuffixLength = MaxSuffixLength; type MaxUsernameLength = MaxUsernameLength; @@ -1463,7 +1463,7 @@ mod benches { [pallet_crowdloan_rewards, CrowdloanRewards] [pallet_author_mapping, AuthorMapping] [pallet_proxy, Proxy] - // TODO(RODRIGO) [pallet_identity, Identity] + [pallet_identity, Identity] [cumulus_pallet_xcmp_queue, XcmpQueue] [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] [pallet_asset_manager, AssetManager] From 48ee91ea489880c6d1c2716aee2b6d9c3dc20e82 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Wed, 6 Mar 2024 15:32:20 +0000 Subject: [PATCH 05/80] fix identity precompile --- Cargo.lock | 31 ++++ Cargo.toml | 4 +- precompiles/identity/src/lib.rs | 66 +++++---- precompiles/identity/src/mock.rs | 28 ++-- precompiles/identity/src/tests.rs | 181 ++++++++++++----------- precompiles/relay-encoder/Cargo.toml | 1 + precompiles/utils/src/testing/account.rs | 72 +++++++++ runtime/moonbase/Cargo.toml | 2 +- runtime/moonbase/src/precompiles.rs | 13 +- runtime/moonbeam/Cargo.toml | 2 +- runtime/moonbeam/src/lib.rs | 2 +- runtime/moonbeam/src/precompiles.rs | 13 +- runtime/moonbeam/tests/xcm_tests.rs | 5 +- runtime/moonriver/Cargo.toml | 2 +- runtime/moonriver/src/lib.rs | 2 +- runtime/moonriver/src/precompiles.rs | 13 +- 16 files changed, 283 insertions(+), 154 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7df4393265..12ac0f9272 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6209,6 +6209,7 @@ dependencies = [ "pallet-evm-precompile-crowdloan-rewards", "pallet-evm-precompile-dispatch", "pallet-evm-precompile-gmp", + "pallet-evm-precompile-identity", "pallet-evm-precompile-modexp", "pallet-evm-precompile-parachain-staking", "pallet-evm-precompile-preimage", @@ -6694,6 +6695,7 @@ dependencies = [ "pallet-evm-precompile-crowdloan-rewards", "pallet-evm-precompile-dispatch", "pallet-evm-precompile-gmp", + "pallet-evm-precompile-identity", "pallet-evm-precompile-modexp", "pallet-evm-precompile-parachain-staking", "pallet-evm-precompile-preimage", @@ -7087,6 +7089,7 @@ dependencies = [ "pallet-evm-precompile-crowdloan-rewards", "pallet-evm-precompile-dispatch", "pallet-evm-precompile-gmp", + "pallet-evm-precompile-identity", "pallet-evm-precompile-modexp", "pallet-evm-precompile-parachain-staking", "pallet-evm-precompile-preimage", @@ -8830,6 +8833,33 @@ dependencies = [ "xcm-primitives 0.1.1", ] +[[package]] +name = "pallet-evm-precompile-identity" +version = "0.1.0" +dependencies = [ + "enumflags2", + "evm", + "fp-evm", + "frame-support", + "frame-system", + "hex", + "hex-literal 0.3.4", + "log", + "pallet-balances", + "pallet-evm", + "pallet-identity", + "pallet-timestamp", + "parity-scale-codec", + "precompile-utils", + "scale-info", + "serde", + "sha3", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", +] + [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" @@ -9018,6 +9048,7 @@ dependencies = [ "orml-traits", "pallet-balances", "pallet-evm", + "pallet-message-queue", "pallet-staking", "pallet-timestamp", "pallet-xcm-transactor", diff --git a/Cargo.toml b/Cargo.toml index c57f909d0f..bb9a1641f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ members = [ "precompiles/conviction-voting", "precompiles/crowdloan-rewards", "precompiles/gmp", - # TODO(RODRIGO) "precompiles/identity", + "precompiles/identity", "precompiles/parachain-staking", "precompiles/precompile-registry", "precompiles/preimage", @@ -79,7 +79,7 @@ pallet-evm-precompile-collective = { path = "precompiles/collective", default-fe pallet-evm-precompile-conviction-voting = { path = "precompiles/conviction-voting", default-features = false } pallet-evm-precompile-crowdloan-rewards = { path = "precompiles/crowdloan-rewards", default-features = false } pallet-evm-precompile-gmp = { path = "precompiles/gmp", default-features = false } -# TODO(RODRIGO) pallet-evm-precompile-identity = { path = "precompiles/identity", default-features = false } +pallet-evm-precompile-identity = { path = "precompiles/identity", default-features = false } pallet-evm-precompile-parachain-staking = { path = "precompiles/parachain-staking", default-features = false } pallet-evm-precompile-preimage = { path = "precompiles/preimage", default-features = false } pallet-evm-precompile-proxy = { path = "precompiles/proxy", default-features = false } diff --git a/precompiles/identity/src/lib.rs b/precompiles/identity/src/lib.rs index b9dd7889a8..5db45d2678 100644 --- a/precompiles/identity/src/lib.rs +++ b/precompiles/identity/src/lib.rs @@ -20,7 +20,6 @@ extern crate alloc; -use enumflags2::BitFlags; use fp_evm::PrecompileHandle; use frame_support::dispatch::{GetDispatchInfo, PostDispatchInfo}; use frame_support::sp_runtime::traits::StaticLookup; @@ -69,18 +68,18 @@ pub struct IdentityPrecompile( ); #[precompile_utils::precompile] -#[precompile::test_concrete_types(mock::Runtime, ConstU32<2>)] +#[precompile::test_concrete_types(mock::Runtime, mock::MaxAdditionalFields)] impl IdentityPrecompile where - Runtime: pallet_evm::Config + pallet_identity::Config, - ::FieldsIdentifier: From, + MaxAdditionalFields: Get + 'static, + Runtime: pallet_evm::Config + pallet_identity::Config>, + ::FieldsIdentifier: Into + From, Runtime::AccountId: Into, Runtime::Hash: From, Runtime::RuntimeCall: Dispatchable + GetDispatchInfo, ::RuntimeOrigin: From>, Runtime::RuntimeCall: From>, - BalanceOf: TryFrom + Into + solidity::Codec, - MaxAdditionalFields: Get + BalanceOf: TryFrom + Into + solidity::Codec { // Note: addRegistrar(address) & killIdentity(address) are not supported since they use a // force origin. @@ -101,8 +100,10 @@ where ); handle.record_log_costs(&[&event])?; + let info: Box = Self::identity_to_input(info)?; + let call = pallet_identity::Call::::set_identity { - info: Self::identity_to_input(info)?, + info, }; let origin = Runtime::AddressMapping::into_account_id(caller); @@ -235,8 +236,7 @@ where index: u32, fields: IdentityFields, ) -> EvmResult { - let fields = Self::identity_fields_to_input(fields) - .map_err(|_| RevertReason::custom("invalid flag").in_field("fields"))?; + let fields = Self::identity_fields_to_input(fields); let call = pallet_identity::Call::::set_fields { index, fields }; let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); @@ -369,7 +369,7 @@ where fn identity( handle: &mut impl PrecompileHandle, who: Address, - ) -> EvmResult> { + ) -> EvmResult> { // Storage item: IdentityOf -> // Registration, T::MaxRegistrars, T::MaxAdditionalFields> handle.record_db_read::(pallet_identity::Registration::< @@ -452,20 +452,21 @@ where .enumerate() .map(|(index, maybe_reg)| { if let Some(reg) = maybe_reg { + let fields: u64 = reg.fields.into(); Registrar { is_valid: true, index: index as u32, account: Address(reg.account.into()), fee: reg.fee.into(), fields: IdentityFields { - display: reg.fields.0.contains(IdentityField::Display), - legal: reg.fields.0.contains(IdentityField::Legal), - web: reg.fields.0.contains(IdentityField::Web), - riot: reg.fields.0.contains(IdentityField::Riot), - email: reg.fields.0.contains(IdentityField::Email), - pgp_fingerprint: reg.fields.0.contains(IdentityField::PgpFingerprint), - image: reg.fields.0.contains(IdentityField::Image), - twitter: reg.fields.0.contains(IdentityField::Twitter), + display: fields & (IdentityField::Display as u64) == (IdentityField::Display as u64), + legal: fields & (IdentityField::Legal as u64) == (IdentityField::Legal as u64), + web: fields & (IdentityField::Web as u64) == (IdentityField::Web as u64), + riot: fields & (IdentityField::Riot as u64) == (IdentityField::Riot as u64), + email: fields & (IdentityField::Email as u64) == (IdentityField::Email as u64), + pgp_fingerprint: fields & (IdentityField::PgpFingerprint as u64) == (IdentityField::PgpFingerprint as u64), + image: fields & (IdentityField::Image as u64) == (IdentityField::Image as u64), + twitter: fields & (IdentityField::Twitter as u64) == (IdentityField::Twitter as u64), }, } } else { @@ -581,19 +582,22 @@ where fn identity_to_output( registration: Option< - pallet_identity::Registration< - BalanceOf, - Runtime::MaxRegistrars, - Runtime::IdentityInformation, - >, + ( + pallet_identity::Registration< + BalanceOf, + Runtime::MaxRegistrars, + Runtime::IdentityInformation, + >, + Option::MaxUsernameLength>> + ) >, - ) -> MayRevert> { + ) -> MayRevert> { if registration.is_none() { - return Ok(Registration::::default()); + return Ok(Registration::::default()); } - let registration = registration.expect("none case checked above; qed"); - let mut identity_info = IdentityInfo:: { + let registration = registration.expect("none case checked above; qed").0; + let mut identity_info = IdentityInfo:: { additional: Default::default(), display: Self::data_to_output(registration.info.display), legal: Self::data_to_output(registration.info.legal), @@ -625,7 +629,7 @@ where judgements.push((index, Self::judgement_to_output(judgement))); } - let reg = Registration:: { + let reg = Registration:: { is_valid: true, judgements: judgements.into(), deposit: registration.deposit.into(), @@ -807,14 +811,14 @@ pub struct Judgement { } #[derive(Eq, PartialEq, Debug, solidity::Codec)] -pub struct Registration { +pub struct Registration { is_valid: bool, judgements: Vec<(u32, Judgement)>, deposit: U256, - info: T::IdentityInformation, + info: IdentityInfo, } -impl Default for Registration { +impl Default for Registration { fn default() -> Self { Self { is_valid: false, diff --git a/precompiles/identity/src/mock.rs b/precompiles/identity/src/mock.rs index 3316d95a84..f6cbd57717 100644 --- a/precompiles/identity/src/mock.rs +++ b/precompiles/identity/src/mock.rs @@ -25,7 +25,10 @@ use frame_system::{EnsureRoot, EnsureSignedBy}; use pallet_evm::{EnsureAddressNever, EnsureAddressRoot}; use pallet_identity::legacy::IdentityInfo; use precompile_utils::mock_account; -use precompile_utils::{precompile_set::*, testing::MockAccount}; +use precompile_utils::{ + precompile_set::*, + testing::{MockAccount, MockSignature}, +}; use sp_core::{H256, U256}; use sp_runtime::{ traits::{BlakeTwo256, IdentityLookup}, @@ -59,6 +62,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type Nonce = u64; type Block = Block; type RuntimeCall = RuntimeCall; @@ -95,7 +99,6 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type RuntimeHoldReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); type RuntimeFreezeReason = (); } @@ -118,10 +121,12 @@ parameter_types! { }; } -pub type Precompiles = - PrecompileSetBuilder, IdentityPrecompile>,)>; +pub type Precompiles = PrecompileSetBuilder< + R, + (PrecompileAt, IdentityPrecompile>,), +>; -pub type PCall = IdentityPrecompileCall; +pub type PCall = IdentityPrecompileCall; impl pallet_evm::Config for Runtime { type FeeCalculator = (); @@ -172,7 +177,7 @@ type EnsureRegistrarAndForceOriginOrRoot = parameter_types! { pub const BasicDeposit: u64 = 10; - pub const FieldDeposit: u64 = 10; + pub const ByteDeposit: u64 = 10; pub const SubAccountDeposit: u64 = 10; pub const MaxSubAccounts: u32 = 2; pub const MaxAdditionalFields: u32 = 2; @@ -187,16 +192,21 @@ impl pallet_identity::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; type BasicDeposit = BasicDeposit; - type FieldDeposit = FieldDeposit; + type ByteDeposit = ByteDeposit; type SubAccountDeposit = SubAccountDeposit; type MaxSubAccounts = MaxSubAccounts; - type MaxAdditionalFields = MaxAdditionalFields; + type IdentityInformation = IdentityInfo; type MaxRegistrars = MaxRegistrars; type Slashed = (); type RegistrarOrigin = EnsureRegistrarAndForceOriginOrRoot; type ForceOrigin = EnsureRegistrarAndForceOriginOrRoot; + type OffchainSignature = MockSignature; + type SigningPublicKey = ::Signer; + type UsernameAuthorityOrigin = EnsureRoot; + type PendingUsernameExpiration = ConstU32<100>; + type MaxSuffixLength = ConstU32<7>; + type MaxUsernameLength = ConstU32<32>; type WeightInfo = (); - type IdentityInformation = IdentityInfo; } pub(crate) struct ExtBuilder { diff --git a/precompiles/identity/src/tests.rs b/precompiles/identity/src/tests.rs index 7f830ce0bf..4641c1ef59 100644 --- a/precompiles/identity/src/tests.rs +++ b/precompiles/identity/src/tests.rs @@ -26,8 +26,9 @@ use crate::{ use frame_support::assert_ok; use pallet_evm::{Call as EvmCall, Event as EvmEvent}; use pallet_identity::{ - simple::IdentityField, Event as IdentityEvent, Pallet as IdentityPallet, RegistrarInfo, + legacy::IdentityField, Event as IdentityEvent, Pallet as IdentityPallet, RegistrarInfo, }; +use parity_scale_codec::Encode; use precompile_utils::prelude::*; use precompile_utils::testing::*; use sp_core::{H160, U256}; @@ -82,7 +83,7 @@ fn test_set_fee_on_existing_registrar_index_succeeds() { vec![Some(RegistrarInfo { account: Bob.into(), fee: 100, - fields: pallet_identity::IdentityFields::default(), + fields: Default::default(), })] ); }) @@ -132,7 +133,7 @@ fn test_set_account_id_on_existing_registrar_index_succeeds() { vec![Some(RegistrarInfo { account: Charlie.into(), fee: 0, - fields: pallet_identity::IdentityFields::default(), + fields: Default::default(), })] ); }) @@ -186,9 +187,7 @@ fn test_set_fields_on_existing_registrar_index_succeeds() { vec![Some(RegistrarInfo { account: Bob.into(), fee: 0, - fields: pallet_identity::IdentityFields( - IdentityField::Display | IdentityField::Web - ), + fields: IdentityField::Display as u64 | IdentityField::Web as u64, })] ); }) @@ -302,11 +301,15 @@ fn test_set_identity_works() { .into() )); + let identity = + >::identity(AccountId::from(Bob)).expect("exists"); + let encoded_byte_size = identity.0.info.encoded_size() as u32; + let byte_deposit = ByteDeposit::get().saturating_mul(encoded_byte_size as u64); assert_eq!( - >::identity(AccountId::from(Bob)), - Some(pallet_identity::Registration:: { + identity.0, + pallet_identity::Registration:: { judgements: Default::default(), - deposit: BasicDeposit::get() as u128 + FieldDeposit::get() as u128 * 2, + deposit: (BasicDeposit::get() + byte_deposit).into(), info: pallet_identity::legacy::IdentityInfo:: { additional: vec![ ( @@ -341,7 +344,7 @@ fn test_set_identity_works() { vec![0x08].try_into().expect("succeeds") ), } - }), + }, ); }) } @@ -409,11 +412,15 @@ fn test_set_identity_works_for_already_set_identity() { .into() )); + let identity = + >::identity(AccountId::from(Bob)).expect("exists"); + let encoded_byte_size = identity.0.info.encoded_size() as u32; + let byte_deposit = ByteDeposit::get().saturating_mul(encoded_byte_size as u64); assert_eq!( - >::identity(AccountId::from(Bob)), - Some(pallet_identity::Registration:: { + identity.0, + pallet_identity::Registration:: { judgements: Default::default(), - deposit: BasicDeposit::get() as u128, + deposit: (BasicDeposit::get() + byte_deposit) as u128, info: pallet_identity::legacy::IdentityInfo:: { additional: Default::default(), display: pallet_identity::Data::Raw( @@ -429,7 +436,7 @@ fn test_set_identity_works_for_already_set_identity() { vec![0x08].try_into().expect("succeeds") ), } - }), + }, ); assert_ok!(RuntimeCall::Evm(evm_call( @@ -447,11 +454,15 @@ fn test_set_identity_works_for_already_set_identity() { )) .dispatch(RuntimeOrigin::root())); + let identity = + >::identity(AccountId::from(Bob)).expect("exists"); + let encoded_byte_size = identity.0.info.encoded_size() as u32; + let byte_deposit = ByteDeposit::get().saturating_mul(encoded_byte_size as u64); assert_eq!( - >::identity(AccountId::from(Bob)), - Some(pallet_identity::Registration:: { + identity.0, + pallet_identity::Registration:: { judgements: Default::default(), - deposit: BasicDeposit::get() as u128, + deposit: (BasicDeposit::get() + byte_deposit).into(), info: pallet_identity::legacy::IdentityInfo:: { additional: Default::default(), display: pallet_identity::Data::Raw( @@ -465,7 +476,7 @@ fn test_set_identity_works_for_already_set_identity() { image: pallet_identity::Data::None, twitter: pallet_identity::Data::None, } - }), + }, ); }) } @@ -491,11 +502,15 @@ fn test_set_subs_works_if_identity_set() { )) .dispatch(RuntimeOrigin::root())); + let identity = + >::identity(AccountId::from(Bob)).expect("exists"); + let encoded_byte_size = identity.0.info.encoded_size() as u32; + let byte_deposit = ByteDeposit::get().saturating_mul(encoded_byte_size as u64); assert_eq!( - >::identity(AccountId::from(Bob)), - Some(pallet_identity::Registration:: { + identity.0, + pallet_identity::Registration:: { judgements: Default::default(), - deposit: BasicDeposit::get() as u128, + deposit: (BasicDeposit::get() + byte_deposit).into(), info: pallet_identity::legacy::IdentityInfo:: { additional: Default::default(), display: pallet_identity::Data::Raw( @@ -509,7 +524,7 @@ fn test_set_subs_works_if_identity_set() { image: pallet_identity::Data::None, twitter: pallet_identity::Data::None, } - }), + }, ); assert_ok!(RuntimeCall::Evm(evm_call( @@ -610,11 +625,15 @@ fn test_clear_identity_works_if_identity_set() { )) .dispatch(RuntimeOrigin::root())); + let identity = + >::identity(AccountId::from(Bob)).expect("exists"); + let encoded_byte_size = identity.0.info.encoded_size() as u32; + let byte_deposit = ByteDeposit::get().saturating_mul(encoded_byte_size as u64); assert_eq!( - >::identity(AccountId::from(Bob)), - Some(pallet_identity::Registration:: { + identity.0, + pallet_identity::Registration:: { judgements: Default::default(), - deposit: BasicDeposit::get() as u128, + deposit: (BasicDeposit::get() + byte_deposit).into(), info: pallet_identity::legacy::IdentityInfo:: { additional: Default::default(), display: pallet_identity::Data::Raw( @@ -628,7 +647,7 @@ fn test_clear_identity_works_if_identity_set() { image: pallet_identity::Data::None, twitter: pallet_identity::Data::None, } - }), + }, ); assert_ok!( @@ -639,7 +658,7 @@ fn test_clear_identity_works_if_identity_set() { assert!(events().contains(&Into::::into( IdentityEvent::IdentityCleared { who: Bob.into(), - deposit: BasicDeposit::get() as u128, + deposit: (BasicDeposit::get() + byte_deposit).into(), } ))); assert!(events().contains( @@ -752,6 +771,7 @@ fn test_request_judgement_works_if_identity_set() { assert_eq!( >::identity(AccountId::from(Bob)) .expect("exists") + .0 .judgements .to_vec(), vec![(0, pallet_identity::Judgement::FeePaid(100))], @@ -836,6 +856,7 @@ fn test_cancel_request_works_if_identity_judgement_requested() { assert_eq!( >::identity(AccountId::from(Bob)) .expect("exists") + .0 .judgements .to_vec(), vec![], @@ -909,7 +930,8 @@ fn test_provide_judgement_works_if_identity_judgement_requested() { assert_eq!( >::identity(AccountId::from(Bob)) - .expect("") + .expect("exists") + .0 .info, identity.info ); @@ -952,6 +974,7 @@ fn test_provide_judgement_works_if_identity_judgement_requested() { assert_eq!( >::identity(AccountId::from(Bob)) .expect("exists") + .0 .judgements .to_vec(), vec![(0, pallet_identity::Judgement::Reasonable)], @@ -1247,46 +1270,35 @@ fn test_identity_returns_valid_data_for_identity_info() { .with_balances(vec![(Alice.into(), 100_000), (Bob.into(), 100_000)]) .build() .execute_with(|| { + let identity = pallet_identity::legacy::IdentityInfo:: { + additional: vec![ + ( + pallet_identity::Data::Raw(vec![0xa1].try_into().expect("succeeds")), + pallet_identity::Data::Raw(vec![0xb1].try_into().expect("succeeds")), + ), + ( + pallet_identity::Data::Raw(vec![0xa2].try_into().expect("succeeds")), + pallet_identity::Data::Raw(vec![0xb2].try_into().expect("succeeds")), + ), + ] + .try_into() + .expect("succeeds"), + display: pallet_identity::Data::Raw(vec![0x01].try_into().expect("succeeds")), + legal: pallet_identity::Data::Raw(vec![0x02].try_into().expect("succeeds")), + web: pallet_identity::Data::Raw(vec![0x03].try_into().expect("succeeds")), + riot: pallet_identity::Data::Raw(vec![0x04].try_into().expect("succeeds")), + email: pallet_identity::Data::Raw(vec![0x05].try_into().expect("succeeds")), + pgp_fingerprint: Some([0x06; 20].try_into().expect("succeeds")), + image: pallet_identity::Data::Raw(vec![0x07].try_into().expect("succeeds")), + twitter: pallet_identity::Data::Raw(vec![0x08].try_into().expect("succeeds")), + }; assert_ok!(Identity::set_identity( RuntimeOrigin::signed(Bob.into()), - Box::new( - pallet_identity::legacy::IdentityInfo:: { - additional: vec![ - ( - pallet_identity::Data::Raw( - vec![0xa1].try_into().expect("succeeds") - ), - pallet_identity::Data::Raw( - vec![0xb1].try_into().expect("succeeds") - ) - ), - ( - pallet_identity::Data::Raw( - vec![0xa2].try_into().expect("succeeds") - ), - pallet_identity::Data::Raw( - vec![0xb2].try_into().expect("succeeds") - ) - ), - ] - .try_into() - .expect("succeeds"), - display: pallet_identity::Data::Raw( - vec![0x01].try_into().expect("succeeds") - ), - legal: pallet_identity::Data::Raw(vec![0x02].try_into().expect("succeeds")), - web: pallet_identity::Data::Raw(vec![0x03].try_into().expect("succeeds")), - riot: pallet_identity::Data::Raw(vec![0x04].try_into().expect("succeeds")), - email: pallet_identity::Data::Raw(vec![0x05].try_into().expect("succeeds")), - pgp_fingerprint: Some([0x06; 20].try_into().expect("succeeds")), - image: pallet_identity::Data::Raw(vec![0x07].try_into().expect("succeeds")), - twitter: pallet_identity::Data::Raw( - vec![0x08].try_into().expect("succeeds") - ), - } - ) + Box::new(identity.clone()) )); + let encoded_byte_size = identity.encoded_size() as u32; + let byte_deposit = ByteDeposit::get().saturating_mul(encoded_byte_size as u64); precompiles() .prepare_test( Bob, @@ -1299,7 +1311,7 @@ fn test_identity_returns_valid_data_for_identity_info() { .execute_returns(Registration { is_valid: true, judgements: vec![], - deposit: (BasicDeposit::get() + FieldDeposit::get() * 2).into(), + deposit: (BasicDeposit::get() + byte_deposit).into(), info: IdentityInfo:: { additional: vec![ ( @@ -1375,23 +1387,22 @@ fn test_identity_returns_valid_data_for_requested_judgement() { 0, 100, )); + + let identity = pallet_identity::legacy::IdentityInfo:: { + additional: Default::default(), + display: pallet_identity::Data::Raw(vec![0x01].try_into().expect("succeeds")), + legal: pallet_identity::Data::None, + web: pallet_identity::Data::None, + riot: pallet_identity::Data::None, + email: pallet_identity::Data::None, + pgp_fingerprint: None, + image: pallet_identity::Data::None, + twitter: pallet_identity::Data::None, + }; + assert_ok!(Identity::set_identity( RuntimeOrigin::signed(Bob.into()), - Box::new( - pallet_identity::legacy::IdentityInfo:: { - additional: Default::default(), - display: pallet_identity::Data::Raw( - vec![0x01].try_into().expect("succeeds") - ), - legal: pallet_identity::Data::None, - web: pallet_identity::Data::None, - riot: pallet_identity::Data::None, - email: pallet_identity::Data::None, - pgp_fingerprint: None, - image: pallet_identity::Data::None, - twitter: pallet_identity::Data::None, - } - ), + Box::new(identity.clone()), )); assert_ok!(Identity::request_judgement( RuntimeOrigin::signed(Bob.into()), @@ -1399,6 +1410,8 @@ fn test_identity_returns_valid_data_for_requested_judgement() { 1000, )); + let encoded_byte_size = identity.encoded_size() as u32; + let byte_deposit = ByteDeposit::get().saturating_mul(encoded_byte_size as u64); precompiles() .prepare_test( Bob, @@ -1418,7 +1431,7 @@ fn test_identity_returns_valid_data_for_requested_judgement() { ..Default::default() }, )], - deposit: BasicDeposit::get().into(), + deposit: (BasicDeposit::get() + byte_deposit).into(), info: IdentityInfo:: { additional: Default::default(), display: Data { @@ -1513,7 +1526,7 @@ fn test_identity_returns_valid_data_for_judged_identity() { assert_ok!(Identity::set_identity( RuntimeOrigin::signed(Bob.into()), - Box::new(identity), + Box::new(identity.clone()), )); assert_ok!(Identity::request_judgement( RuntimeOrigin::signed(Bob.into()), @@ -1528,6 +1541,8 @@ fn test_identity_returns_valid_data_for_judged_identity() { identity_hash, )); + let encoded_byte_size = identity.encoded_size() as u32; + let byte_deposit = ByteDeposit::get().saturating_mul(encoded_byte_size as u64); precompiles() .prepare_test( Bob, @@ -1540,7 +1555,7 @@ fn test_identity_returns_valid_data_for_judged_identity() { .execute_returns(Registration { is_valid: true, judgements: vec![(0, test_case.expected_judgement)], - deposit: BasicDeposit::get().into(), + deposit: (BasicDeposit::get() + byte_deposit).into(), info: IdentityInfo:: { additional: Default::default(), display: Data { diff --git a/precompiles/relay-encoder/Cargo.toml b/precompiles/relay-encoder/Cargo.toml index 593b8c7bf6..47fa06593c 100644 --- a/precompiles/relay-encoder/Cargo.toml +++ b/precompiles/relay-encoder/Cargo.toml @@ -43,6 +43,7 @@ precompile-utils = { workspace = true, features = ["std", "testing"] } # Substrate pallet-balances = { workspace = true, features = ["std"] } pallet-timestamp = { workspace = true, features = ["std"] } +pallet-message-queue = { workspace = true, features = ["std"] } scale-info = { workspace = true, features = ["std", "derive"] } sp-io = { workspace = true, features = ["std"] } diff --git a/precompiles/utils/src/testing/account.rs b/precompiles/utils/src/testing/account.rs index acc0010ab2..4902d10e42 100644 --- a/precompiles/utils/src/testing/account.rs +++ b/precompiles/utils/src/testing/account.rs @@ -105,6 +105,78 @@ impl sp_runtime::traits::Convert for MockAccount { } } +#[derive( + Eq, PartialEq, Clone, Encode, Decode, sp_core::RuntimeDebug, TypeInfo, Serialize, Deserialize, +)] +pub struct MockSignature(sp_core::ecdsa::Signature); + +impl From for MockSignature { + fn from(x: sp_core::ecdsa::Signature) -> Self { + MockSignature(x) + } +} + +impl From for MockSignature { + fn from(signature: sp_runtime::MultiSignature) -> Self { + match signature { + sp_runtime::MultiSignature::Ed25519(_) => { + panic!("Ed25519 not supported for MockSignature") + } + sp_runtime::MultiSignature::Sr25519(_) => { + panic!("Sr25519 not supported for MockSignature") + } + sp_runtime::MultiSignature::Ecdsa(sig) => Self(sig), + } + } +} + +impl sp_runtime::traits::Verify for MockSignature { + type Signer = MockSigner; + fn verify>(&self, mut msg: L, signer: &MockAccount) -> bool { + let mut m = [0u8; 32]; + m.copy_from_slice(::digest(msg.get()).as_slice()); + match sp_io::crypto::secp256k1_ecdsa_recover(self.0.as_ref(), &m) { + Ok(pubkey) => { + MockAccount(sp_core::H160::from_slice(&::digest(pubkey).as_slice()[12..32])) + == *signer + } + Err(sp_io::EcdsaVerifyError::BadRS) => { + log::error!(target: "evm", "Error recovering: Incorrect value of R or S"); + false + } + Err(sp_io::EcdsaVerifyError::BadV) => { + log::error!(target: "evm", "Error recovering: Incorrect value of V"); + false + } + Err(sp_io::EcdsaVerifyError::BadSignature) => { + log::error!(target: "evm", "Error recovering: Invalid signature"); + false + } + } + } +} + + +/// Public key for an Ethereum / Moonbeam compatible account +#[derive( + Eq, PartialEq, Ord, PartialOrd, Clone, Encode, Decode, sp_core::RuntimeDebug, TypeInfo, +)] +#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))] +pub struct MockSigner([u8; 20]); + +impl sp_runtime::traits::IdentifyAccount for MockSigner { + type AccountId = MockAccount; + fn into_account(self) -> MockAccount { + MockAccount(self.0.into()) + } +} + +impl From<[u8; 20]> for MockSigner { + fn from(x: [u8; 20]) -> Self { + MockSigner(x) + } +} + #[macro_export] macro_rules! mock_account { ($name:ident, $convert:expr) => { diff --git a/runtime/moonbase/Cargo.toml b/runtime/moonbase/Cargo.toml index 8bd1d10a25..206d003f48 100644 --- a/runtime/moonbase/Cargo.toml +++ b/runtime/moonbase/Cargo.toml @@ -55,7 +55,7 @@ pallet-evm-precompile-collective = { workspace = true } pallet-evm-precompile-conviction-voting = { workspace = true } pallet-evm-precompile-crowdloan-rewards = { workspace = true } pallet-evm-precompile-gmp = { workspace = true } -# TODO(RODRIGO) pallet-evm-precompile-identity = { workspace = true } +pallet-evm-precompile-identity = { workspace = true } pallet-evm-precompile-parachain-staking = { workspace = true } pallet-evm-precompile-preimage = { workspace = true } pallet-evm-precompile-proxy = { workspace = true } diff --git a/runtime/moonbase/src/precompiles.rs b/runtime/moonbase/src/precompiles.rs index 95bdea3eea..f68fb11962 100644 --- a/runtime/moonbase/src/precompiles.rs +++ b/runtime/moonbase/src/precompiles.rs @@ -30,7 +30,7 @@ use pallet_evm_precompile_collective::CollectivePrecompile; use pallet_evm_precompile_conviction_voting::ConvictionVotingPrecompile; use pallet_evm_precompile_crowdloan_rewards::CrowdloanRewardsPrecompile; use pallet_evm_precompile_gmp::GmpPrecompile; -// TODO(RODRIGO) use pallet_evm_precompile_identity::IdentityPrecompile; +use pallet_evm_precompile_identity::IdentityPrecompile; use pallet_evm_precompile_modexp::Modexp; use pallet_evm_precompile_parachain_staking::ParachainStakingPrecompile; use pallet_evm_precompile_preimage::PreimagePrecompile; @@ -228,12 +228,11 @@ type MoonbasePrecompilesAt = ( XcmTransactorPrecompileV3, (CallableByContract, CallableByPrecompile), >, - // TODO(RODRIGO) - // PrecompileAt< - // AddressU64<2072>, - // IdentityPrecompile, - // (CallableByContract, CallableByPrecompile), - // >, + PrecompileAt< + AddressU64<2072>, + IdentityPrecompile, + (CallableByContract, CallableByPrecompile), + >, PrecompileAt< AddressU64<2073>, RelayDataVerifierPrecompile, diff --git a/runtime/moonbeam/Cargo.toml b/runtime/moonbeam/Cargo.toml index cd68008905..4777c107f7 100644 --- a/runtime/moonbeam/Cargo.toml +++ b/runtime/moonbeam/Cargo.toml @@ -54,7 +54,7 @@ pallet-evm-precompile-collective = { workspace = true } pallet-evm-precompile-conviction-voting = { workspace = true } pallet-evm-precompile-crowdloan-rewards = { workspace = true } pallet-evm-precompile-gmp = { workspace = true } -# TODO(RODRIGO) pallet-evm-precompile-identity = { workspace = true } +pallet-evm-precompile-identity = { workspace = true } pallet-evm-precompile-parachain-staking = { workspace = true } pallet-evm-precompile-preimage = { workspace = true } pallet-evm-precompile-proxy = { workspace = true } diff --git a/runtime/moonbeam/src/lib.rs b/runtime/moonbeam/src/lib.rs index 135b668f8f..c28affa6cf 100644 --- a/runtime/moonbeam/src/lib.rs +++ b/runtime/moonbeam/src/lib.rs @@ -1717,7 +1717,7 @@ mod tests { ); assert_eq!( get!(pallet_identity, ByteDeposit, u128), - Balance::from(660 * MILLIGLMR) + Balance::from(10 * MILLIGLMR) ); assert_eq!( get!(pallet_identity, SubAccountDeposit, u128), diff --git a/runtime/moonbeam/src/precompiles.rs b/runtime/moonbeam/src/precompiles.rs index e60947b7c8..8ffbf9dab3 100644 --- a/runtime/moonbeam/src/precompiles.rs +++ b/runtime/moonbeam/src/precompiles.rs @@ -30,7 +30,7 @@ use pallet_evm_precompile_collective::CollectivePrecompile; use pallet_evm_precompile_conviction_voting::ConvictionVotingPrecompile; use pallet_evm_precompile_crowdloan_rewards::CrowdloanRewardsPrecompile; use pallet_evm_precompile_gmp::GmpPrecompile; -// TODO(RODRIGO) use pallet_evm_precompile_identity::IdentityPrecompile; +use pallet_evm_precompile_identity::IdentityPrecompile; use pallet_evm_precompile_modexp::Modexp; use pallet_evm_precompile_parachain_staking::ParachainStakingPrecompile; use pallet_evm_precompile_preimage::PreimagePrecompile; @@ -227,12 +227,11 @@ type MoonbeamPrecompilesAt = ( XcmTransactorPrecompileV3, (CallableByContract, CallableByPrecompile), >, - // TODO(RODRIGO) - // PrecompileAt< - // AddressU64<2072>, - // IdentityPrecompile, - // (CallableByContract, CallableByPrecompile), - // >, + PrecompileAt< + AddressU64<2072>, + IdentityPrecompile, + (CallableByContract, CallableByPrecompile), + >, ); pub struct DisabledLocalAssets(sp_std::marker::PhantomData); diff --git a/runtime/moonbeam/tests/xcm_tests.rs b/runtime/moonbeam/tests/xcm_tests.rs index 30883c9b54..3c95016de8 100644 --- a/runtime/moonbeam/tests/xcm_tests.rs +++ b/runtime/moonbeam/tests/xcm_tests.rs @@ -30,9 +30,8 @@ use pallet_xcm_transactor::{ }; use sp_core::ConstU32; use xcm::latest::prelude::{ - AccountId32, AccountKey20, All, BuyExecution, ClearOrigin, DepositAsset, GeneralIndex, - Junction, Junctions, Limited, Location, OriginKind, PalletInstance, Parachain, QueryResponse, - Reanchorable, Response, WeightLimit, WithdrawAsset, Xcm, + AccountId32, AccountKey20, GeneralIndex, Junction, Junctions, Limited, Location, OriginKind, + PalletInstance, Parachain, QueryResponse, Reanchorable, Response, WeightLimit, Xcm, }; use xcm::{VersionedLocation, WrapVersion}; use xcm_executor::traits::ConvertLocation; diff --git a/runtime/moonriver/Cargo.toml b/runtime/moonriver/Cargo.toml index 73f02e7633..a592d14185 100644 --- a/runtime/moonriver/Cargo.toml +++ b/runtime/moonriver/Cargo.toml @@ -54,7 +54,7 @@ pallet-evm-precompile-collective = { workspace = true } pallet-evm-precompile-conviction-voting = { workspace = true } pallet-evm-precompile-crowdloan-rewards = { workspace = true } pallet-evm-precompile-gmp = { workspace = true } -# TODO(RODRIGO) pallet-evm-precompile-identity = { workspace = true } +pallet-evm-precompile-identity = { workspace = true } pallet-evm-precompile-parachain-staking = { workspace = true } pallet-evm-precompile-preimage = { workspace = true } pallet-evm-precompile-proxy = { workspace = true } diff --git a/runtime/moonriver/src/lib.rs b/runtime/moonriver/src/lib.rs index d41000ccbe..e21eace35e 100644 --- a/runtime/moonriver/src/lib.rs +++ b/runtime/moonriver/src/lib.rs @@ -1719,7 +1719,7 @@ mod tests { ); assert_eq!( get!(pallet_identity, ByteDeposit, u128), - Balance::from(6600 * MICROMOVR) + Balance::from(100 * MICROMOVR) ); assert_eq!( get!(pallet_identity, SubAccountDeposit, u128), diff --git a/runtime/moonriver/src/precompiles.rs b/runtime/moonriver/src/precompiles.rs index 3781fd8685..73e58f5aae 100644 --- a/runtime/moonriver/src/precompiles.rs +++ b/runtime/moonriver/src/precompiles.rs @@ -29,7 +29,7 @@ use pallet_evm_precompile_collective::CollectivePrecompile; use pallet_evm_precompile_conviction_voting::ConvictionVotingPrecompile; use pallet_evm_precompile_crowdloan_rewards::CrowdloanRewardsPrecompile; use pallet_evm_precompile_gmp::GmpPrecompile; -// TODO(RODRIGO) use pallet_evm_precompile_identity::IdentityPrecompile; +use pallet_evm_precompile_identity::IdentityPrecompile; use pallet_evm_precompile_modexp::Modexp; use pallet_evm_precompile_parachain_staking::ParachainStakingPrecompile; use pallet_evm_precompile_preimage::PreimagePrecompile; @@ -221,12 +221,11 @@ type MoonriverPrecompilesAt = ( XcmTransactorPrecompileV3, (CallableByContract, CallableByPrecompile), >, - // TODO(RODRIGO) - // PrecompileAt< - // AddressU64<2072>, - // IdentityPrecompile, - // (CallableByContract, CallableByPrecompile), - // >, + PrecompileAt< + AddressU64<2072>, + IdentityPrecompile, + (CallableByContract, CallableByPrecompile), + >, ); /// The PrecompileSet installed in the Moonriver runtime. From 677fe970f94640f57ea2c7ae41df74aeb9a6f14f Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Wed, 6 Mar 2024 15:52:18 +0000 Subject: [PATCH 06/80] format code --- precompiles/utils/src/testing/account.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/precompiles/utils/src/testing/account.rs b/precompiles/utils/src/testing/account.rs index 4902d10e42..af6ce14b92 100644 --- a/precompiles/utils/src/testing/account.rs +++ b/precompiles/utils/src/testing/account.rs @@ -137,8 +137,9 @@ impl sp_runtime::traits::Verify for MockSignature { m.copy_from_slice(::digest(msg.get()).as_slice()); match sp_io::crypto::secp256k1_ecdsa_recover(self.0.as_ref(), &m) { Ok(pubkey) => { - MockAccount(sp_core::H160::from_slice(&::digest(pubkey).as_slice()[12..32])) - == *signer + MockAccount(sp_core::H160::from_slice( + &::digest(pubkey).as_slice()[12..32], + )) == *signer } Err(sp_io::EcdsaVerifyError::BadRS) => { log::error!(target: "evm", "Error recovering: Incorrect value of R or S"); @@ -156,7 +157,6 @@ impl sp_runtime::traits::Verify for MockSignature { } } - /// Public key for an Ethereum / Moonbeam compatible account #[derive( Eq, PartialEq, Ord, PartialOrd, Clone, Encode, Decode, sp_core::RuntimeDebug, TypeInfo, From cefa404f6984bd1cdc4a513ab6ce98249939d364 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Wed, 6 Mar 2024 17:44:42 +0000 Subject: [PATCH 07/80] fix rust tests --- pallets/xcm-transactor/src/tests.rs | 4 ++-- precompiles/balances-erc20/src/tests.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pallets/xcm-transactor/src/tests.rs b/pallets/xcm-transactor/src/tests.rs index e94e7ea940..bb55624d8c 100644 --- a/pallets/xcm-transactor/src/tests.rs +++ b/pallets/xcm-transactor/src/tests.rs @@ -1264,7 +1264,7 @@ fn test_hrmp_manipulator_init_v3_convert_works() { } #[test] -fn test_hrmp_manipulator_init_v4_convert_fails() { +fn test_hrmp_manipulator_init_v5_convert_fails() { ExtBuilder::default() .with_balances(vec![]) .build() @@ -1276,7 +1276,7 @@ fn test_hrmp_manipulator_init_v4_convert_fails() { let total_fee = 100u128; // Change xcm version - CustomVersionWrapper::set_version(4); + CustomVersionWrapper::set_version(5); assert_noop!( XcmTransactor::hrmp_manage( diff --git a/precompiles/balances-erc20/src/tests.rs b/precompiles/balances-erc20/src/tests.rs index 47a1fb2099..e644f75144 100644 --- a/precompiles/balances-erc20/src/tests.rs +++ b/precompiles/balances-erc20/src/tests.rs @@ -280,7 +280,7 @@ fn transfer() { value: 400.into(), }, ) - .expect_cost(184118756) // 1 weight => 1 gas in mock + .expect_cost(172298756) // 1 weight => 1 gas in mock .expect_log(log3( Precompile1, SELECTOR_LOG_TRANSFER, @@ -370,7 +370,7 @@ fn transfer_from() { value: 400.into(), }, ) - .expect_cost(184118756) // 1 weight => 1 gas in mock + .expect_cost(172298756) // 1 weight => 1 gas in mock .expect_log(log3( Precompile1, SELECTOR_LOG_TRANSFER, @@ -466,7 +466,7 @@ fn transfer_from_self() { value: 400.into(), }, ) - .expect_cost(184118756) // 1 weight => 1 gas in mock + .expect_cost(172298756) // 1 weight => 1 gas in mock .expect_log(log3( Precompile1, SELECTOR_LOG_TRANSFER, From 0e2995d3ec728e5348610a3d5a47eb2566c0722d Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Wed, 6 Mar 2024 18:22:31 +0000 Subject: [PATCH 08/80] fix license check --- scripts/run-zombie-moonbeam.sh | 24 ++++++++++++++++++++++++ scripts/verify-licenses.sh | 4 +++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100755 scripts/run-zombie-moonbeam.sh diff --git a/scripts/run-zombie-moonbeam.sh b/scripts/run-zombie-moonbeam.sh new file mode 100755 index 0000000000..eeecc40c3f --- /dev/null +++ b/scripts/run-zombie-moonbeam.sh @@ -0,0 +1,24 @@ +mkdir -p target/release/wbuild/moonbase-runtime/ +mkdir -p test/tmp + +# When we remove this step, re-add "runScripts": ["download-polkadot.sh"]," to moonwall config +cd test/tmp +wget https://opslayer-dev-artifacts.s3.us-east-2.amazonaws.com/bins/moonbeam/polkadot/1.3.0/polkadot +wget https://opslayer-dev-artifacts.s3.us-east-2.amazonaws.com/bins/moonbeam/polkadot/1.3.0/polkadot-execute-worker +wget https://opslayer-dev-artifacts.s3.us-east-2.amazonaws.com/bins/moonbeam/polkadot/1.3.0/polkadot-prepare-worker + +chmod +x polkadot +chmod +x polkadot-execute-worker +chmod +x polkadot-prepare-worker + +cd .. +pnpm install + +## Generate old spec using latest published node, modify it, and generate raw spec +chmod uog+x tmp/moonbeam_rt +chmod uog+x ../target/release/moonbeam +tmp/moonbeam_rt build-spec --chain moonbase-local > tmp/moonbase-plain-spec.json +pnpm tsx scripts/modify-plain-specs.ts process tmp/moonbase-plain-spec.json tmp/moonbase-modified-spec.json +tmp/moonbeam_rt build-spec --chain tmp/moonbase-modified-spec.json --raw > tmp/moonbase-raw-spec.json +pnpm tsx scripts/preapprove-rt-rawspec.ts process tmp/moonbase-raw-spec.json tmp/moonbase-modified-raw-spec.json ../target/release/wbuild/moonbase-runtime/moonbase_runtime.compact.compressed.wasm + \ No newline at end of file diff --git a/scripts/verify-licenses.sh b/scripts/verify-licenses.sh index 2d2e1dd96a..6200e8dbe9 100755 --- a/scripts/verify-licenses.sh +++ b/scripts/verify-licenses.sh @@ -9,6 +9,7 @@ LICENSES=( "Apache-2.0 OR BSD-1-Clause OR MIT" "Apache-2.0 OR BSD-2-Clause OR MIT" "Apache-2.0 OR BSD-3-Clause OR MIT" + "Apache-2.0 OR BSD-3-Clause" "Apache-2.0 OR BSL-1.0" "Apache-2.0 OR CC0-1.0 OR MIT-0" "Apache-2.0 OR CC0-1.0" @@ -46,7 +47,8 @@ NAMES=( licenses_filter=$(printf ' .license != "%s" and' "${LICENSES[@]}") authors_filter=$(printf ' .authors != "%s" and' "${AUTHORS[@]}") names_filter=$(printf ' .name != "%s" and' "${NAMES[@]}") -filter="${licenses_filter}${authors_filter}${names_filter:0:-4}" +# "true" at the end is necessary to close the "and" conditional +filter="${licenses_filter}${authors_filter}${names_filter} true" echo -e "checking licenses with filter:\n$filter\n" RESULT=$(jq "[.[] | select($filter)]" licenses.json) From fd4cc41460569a1591a1f41b474b38cd054dcfe4 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Wed, 6 Mar 2024 18:54:25 +0000 Subject: [PATCH 09/80] fix format --- precompiles/identity/src/lib.rs | 63 ++++++++++++++----------- primitives/xcm/src/origin_conversion.rs | 3 +- runtime/moonbase/src/xcm_config.rs | 6 ++- runtime/moonbeam/src/xcm_config.rs | 6 ++- runtime/moonriver/src/xcm_config.rs | 6 ++- 5 files changed, 50 insertions(+), 34 deletions(-) diff --git a/precompiles/identity/src/lib.rs b/precompiles/identity/src/lib.rs index 5db45d2678..74ba4e7f2d 100644 --- a/precompiles/identity/src/lib.rs +++ b/precompiles/identity/src/lib.rs @@ -72,14 +72,16 @@ pub struct IdentityPrecompile( impl IdentityPrecompile where MaxAdditionalFields: Get + 'static, - Runtime: pallet_evm::Config + pallet_identity::Config>, - ::FieldsIdentifier: Into + From, + Runtime: pallet_evm::Config + + pallet_identity::Config< + IdentityInformation = pallet_identity::legacy::IdentityInfo, + >, Runtime::AccountId: Into, Runtime::Hash: From, Runtime::RuntimeCall: Dispatchable + GetDispatchInfo, ::RuntimeOrigin: From>, Runtime::RuntimeCall: From>, - BalanceOf: TryFrom + Into + solidity::Codec + BalanceOf: TryFrom + Into + solidity::Codec, { // Note: addRegistrar(address) & killIdentity(address) are not supported since they use a // force origin. @@ -88,7 +90,7 @@ where #[precompile::public("setIdentity((((bool,bytes),(bool,bytes))[],(bool,bytes),(bool,bytes),(bool,bytes),(bool,bytes),(bool,bytes),bool,bytes,(bool,bytes),(bool,bytes)))")] fn set_identity( handle: &mut impl PrecompileHandle, - info: IdentityInfo + info: IdentityInfo, ) -> EvmResult { // editorconfig-checker-enable let caller = handle.context().caller; @@ -102,9 +104,7 @@ where let info: Box = Self::identity_to_input(info)?; - let call = pallet_identity::Call::::set_identity { - info, - }; + let call = pallet_identity::Call::::set_identity { info }; let origin = Runtime::AddressMapping::into_account_id(caller); RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; @@ -459,14 +459,22 @@ where account: Address(reg.account.into()), fee: reg.fee.into(), fields: IdentityFields { - display: fields & (IdentityField::Display as u64) == (IdentityField::Display as u64), - legal: fields & (IdentityField::Legal as u64) == (IdentityField::Legal as u64), - web: fields & (IdentityField::Web as u64) == (IdentityField::Web as u64), - riot: fields & (IdentityField::Riot as u64) == (IdentityField::Riot as u64), - email: fields & (IdentityField::Email as u64) == (IdentityField::Email as u64), - pgp_fingerprint: fields & (IdentityField::PgpFingerprint as u64) == (IdentityField::PgpFingerprint as u64), - image: fields & (IdentityField::Image as u64) == (IdentityField::Image as u64), - twitter: fields & (IdentityField::Twitter as u64) == (IdentityField::Twitter as u64), + display: fields & (IdentityField::Display as u64) + == (IdentityField::Display as u64), + legal: fields & (IdentityField::Legal as u64) + == (IdentityField::Legal as u64), + web: fields & (IdentityField::Web as u64) + == (IdentityField::Web as u64), + riot: fields & (IdentityField::Riot as u64) + == (IdentityField::Riot as u64), + email: fields & (IdentityField::Email as u64) + == (IdentityField::Email as u64), + pgp_fingerprint: fields & (IdentityField::PgpFingerprint as u64) + == (IdentityField::PgpFingerprint as u64), + image: fields & (IdentityField::Image as u64) + == (IdentityField::Image as u64), + twitter: fields & (IdentityField::Twitter as u64) + == (IdentityField::Twitter as u64), }, } } else { @@ -482,9 +490,7 @@ where Ok(registrars) } - fn identity_fields_to_input( - fields: IdentityFields, - ) -> IdentityFieldOf { + fn identity_fields_to_input(fields: IdentityFields) -> IdentityFieldOf { let mut field_bits = 0u64; if fields.display { field_bits = field_bits | IdentityField::Display as u64; @@ -581,16 +587,19 @@ where } fn identity_to_output( - registration: Option< - ( - pallet_identity::Registration< - BalanceOf, - Runtime::MaxRegistrars, - Runtime::IdentityInformation, + registration: Option<( + pallet_identity::Registration< + BalanceOf, + Runtime::MaxRegistrars, + Runtime::IdentityInformation, + >, + Option< + frame_support::BoundedVec< + u8, + ::MaxUsernameLength, >, - Option::MaxUsernameLength>> - ) - >, + >, + )>, ) -> MayRevert> { if registration.is_none() { return Ok(Registration::::default()); diff --git a/primitives/xcm/src/origin_conversion.rs b/primitives/xcm/src/origin_conversion.rs index 9ac288992e..8f47727079 100644 --- a/primitives/xcm/src/origin_conversion.rs +++ b/primitives/xcm/src/origin_conversion.rs @@ -16,6 +16,7 @@ use frame_support::traits::{Get, OriginTrait}; use orml_traits::location::{RelativeReserveProvider, Reserve}; +use sp_runtime::traits::TryConvert; use sp_std::{convert::TryInto, marker::PhantomData}; use xcm::latest::{Asset, Junction::AccountKey20, Location, NetworkId}; @@ -42,7 +43,7 @@ pub struct SignedToAccountId20( sp_std::marker::PhantomData<(Origin, AccountId, Network)>, ); impl, Network: Get> - sp_runtime::traits::TryConvert for SignedToAccountId20 + TryConvert for SignedToAccountId20 where Origin::PalletsOrigin: From> + TryInto, Error = Origin::PalletsOrigin>, diff --git a/runtime/moonbase/src/xcm_config.rs b/runtime/moonbase/src/xcm_config.rs index b9c592a5ce..2003ef0ccd 100644 --- a/runtime/moonbase/src/xcm_config.rs +++ b/runtime/moonbase/src/xcm_config.rs @@ -381,7 +381,8 @@ parameter_types! { pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; } -// TODO: This pallet can be removed after the lazy migration is done and event `Completed` is emitted. +// TODO: This pallet can be removed after the lazy migration is done and +// event `Completed` is emitted. // https://github.com/paritytech/polkadot-sdk/pull/1246 impl cumulus_pallet_dmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; @@ -390,7 +391,8 @@ impl cumulus_pallet_dmp_queue::Config for Runtime { } parameter_types! { - pub MessageQueueServiceWeight: Weight = Perbill::from_percent(25) * RuntimeBlockWeights::get().max_block; + pub MessageQueueServiceWeight: Weight = + Perbill::from_percent(25) * RuntimeBlockWeights::get().max_block; // TODO: describe pub const MessageQueueMaxStale: u32 = 8; // TODO: describe diff --git a/runtime/moonbeam/src/xcm_config.rs b/runtime/moonbeam/src/xcm_config.rs index c661e5f33d..3586aa3592 100644 --- a/runtime/moonbeam/src/xcm_config.rs +++ b/runtime/moonbeam/src/xcm_config.rs @@ -373,7 +373,8 @@ parameter_types! { pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; } -// TODO: This pallet can be removed after the lazy migration is done and event `Completed` is emitted. +// TODO: This pallet can be removed after the lazy migration is done and +// event `Completed` is emitted. // https://github.com/paritytech/polkadot-sdk/pull/1246 impl cumulus_pallet_dmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; @@ -382,7 +383,8 @@ impl cumulus_pallet_dmp_queue::Config for Runtime { } parameter_types! { - pub MessageQueueServiceWeight: Weight = Perbill::from_percent(25) * RuntimeBlockWeights::get().max_block; + pub MessageQueueServiceWeight: Weight = + Perbill::from_percent(25) * RuntimeBlockWeights::get().max_block; // TODO: describe pub const MessageQueueMaxStale: u32 = 8; // TODO: describe diff --git a/runtime/moonriver/src/xcm_config.rs b/runtime/moonriver/src/xcm_config.rs index 939db584a9..e4447f5d9f 100644 --- a/runtime/moonriver/src/xcm_config.rs +++ b/runtime/moonriver/src/xcm_config.rs @@ -381,7 +381,8 @@ parameter_types! { pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; } -// TODO: This pallet can be removed after the lazy migration is done and event `Completed` is emitted. +// TODO: This pallet can be removed after the lazy migration is done and +// event `Completed` is emitted. // https://github.com/paritytech/polkadot-sdk/pull/1246 impl cumulus_pallet_dmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; @@ -390,7 +391,8 @@ impl cumulus_pallet_dmp_queue::Config for Runtime { } parameter_types! { - pub MessageQueueServiceWeight: Weight = Perbill::from_percent(25) * RuntimeBlockWeights::get().max_block; + pub MessageQueueServiceWeight: Weight = + Perbill::from_percent(25) * RuntimeBlockWeights::get().max_block; // TODO: describe pub const MessageQueueMaxStale: u32 = 8; // TODO: describe From f8469eb5a0cfef2b6cf0a24a337f430644e5ae93 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 7 Mar 2024 08:40:40 +0000 Subject: [PATCH 10/80] chore(ci): explicitly set rust toolchain before running the jobs --- .github/workflow-templates/cargo-build/action.yml | 2 ++ .github/workflow-templates/rust-toolchain/action.yml | 11 +++++++++++ .github/workflows/build.yml | 2 ++ 3 files changed, 15 insertions(+) create mode 100644 .github/workflow-templates/rust-toolchain/action.yml diff --git a/.github/workflow-templates/cargo-build/action.yml b/.github/workflow-templates/cargo-build/action.yml index 339b492665..3d846df046 100644 --- a/.github/workflow-templates/cargo-build/action.yml +++ b/.github/workflow-templates/cargo-build/action.yml @@ -13,6 +13,8 @@ runs: steps: - name: Run sccache-cache uses: mozilla-actions/sccache-action@v0.0.3 + - name: Install Rust Toolchain + uses: ./.github/workflow-templates/rust-toolchain - name: Setup Variables shell: bash run: | diff --git a/.github/workflow-templates/rust-toolchain/action.yml b/.github/workflow-templates/rust-toolchain/action.yml new file mode 100644 index 0000000000..177499d09a --- /dev/null +++ b/.github/workflow-templates/rust-toolchain/action.yml @@ -0,0 +1,11 @@ +name: Rust Toolchain +description: Install Rust toolchain + +runs: + using: "composite" + steps: + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: 1.74.0 + override: true \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1199a77e5c..aa30f0fdbc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -271,6 +271,8 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ needs.set-tags.outputs.git_ref }} + - name: Install Rust Toolchain + uses: ./.github/workflow-templates/rust-toolchain - name: Install Protoc uses: arduino/setup-protoc@v1 - name: Setup Rust toolchain From 0a57a6bfc0eba0ddcf2f5067d8f97af0933310d9 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 7 Mar 2024 08:52:27 +0000 Subject: [PATCH 11/80] chore(ci): add rust-src component --- .github/workflow-templates/rust-toolchain/action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflow-templates/rust-toolchain/action.yml b/.github/workflow-templates/rust-toolchain/action.yml index 177499d09a..79beb84a74 100644 --- a/.github/workflow-templates/rust-toolchain/action.yml +++ b/.github/workflow-templates/rust-toolchain/action.yml @@ -8,4 +8,7 @@ runs: uses: actions-rs/toolchain@v1 with: toolchain: 1.74.0 - override: true \ No newline at end of file + override: true + run: | + rustup component add rust-src + rustup target add wasm32-unknown-unknown From eec0501024999907b2e4c72c74605e86e722a971 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 7 Mar 2024 08:56:05 +0000 Subject: [PATCH 12/80] chore(ci): fix rust-toolchain component installation --- .github/workflow-templates/rust-toolchain/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflow-templates/rust-toolchain/action.yml b/.github/workflow-templates/rust-toolchain/action.yml index 79beb84a74..c2d310bedd 100644 --- a/.github/workflow-templates/rust-toolchain/action.yml +++ b/.github/workflow-templates/rust-toolchain/action.yml @@ -9,6 +9,8 @@ runs: with: toolchain: 1.74.0 override: true + - name: Install components and targets + shell: bash run: | rustup component add rust-src rustup target add wasm32-unknown-unknown From 90bd671628194474cded9e816eee50d8d305764f Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 7 Mar 2024 09:23:39 +0000 Subject: [PATCH 13/80] chore(ci): remove deprectated actions-rs/toolchain action --- .../workflow-templates/cargo-build/action.yml | 10 ------- .../rust-toolchain/action.yml | 17 +++++++---- .github/workflows/build.yml | 29 +++++-------------- .github/workflows/check-licenses.yml | 7 ++--- .github/workflows/coverage.yml | 2 -- .github/workflows/docs.yml | 6 ++-- .github/workflows/prepare-binary.yml | 4 +-- 7 files changed, 25 insertions(+), 50 deletions(-) diff --git a/.github/workflow-templates/cargo-build/action.yml b/.github/workflow-templates/cargo-build/action.yml index 3d846df046..1a88ba2e96 100644 --- a/.github/workflow-templates/cargo-build/action.yml +++ b/.github/workflow-templates/cargo-build/action.yml @@ -30,16 +30,6 @@ runs: run: | mkdir -p mold curl -L --retry 10 --silent --show-error https://github.com/rui314/mold/releases/download/v1.1.1/mold-1.1.1-$(uname -m)-linux.tar.gz | tar -C $(realpath mold) --strip-components=1 -xzf - - # With rustup's nice new toml format, we just need to run rustup show to install the toolchain - # https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659 - - name: Setup Rust toolchain - shell: bash - run: | - if ! which "rustup" > /dev/null; then - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - fi - rustup show - rustup target add wasm32-unknown-unknown - name: Build Node shell: bash run: | diff --git a/.github/workflow-templates/rust-toolchain/action.yml b/.github/workflow-templates/rust-toolchain/action.yml index c2d310bedd..83878a715c 100644 --- a/.github/workflow-templates/rust-toolchain/action.yml +++ b/.github/workflow-templates/rust-toolchain/action.yml @@ -4,13 +4,18 @@ description: Install Rust toolchain runs: using: "composite" steps: - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.74.0 - override: true - name: Install components and targets shell: bash run: | - rustup component add rust-src + if ! which "rustup" > /dev/null; then + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + fi + rustup override unset + rustup toolchain install 1.74 + rustup default 1.74 + rustup component add rust-src rustfmt clippy llvm-tools-preview rustup target add wasm32-unknown-unknown + - name: Shows the name of the active toolchain and the version of `rustc` + shell: bash + run: rustup show + diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aa30f0fdbc..3143447167 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -223,10 +223,8 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ needs.set-tags.outputs.git_ref }} - # With rustup's nice new toml format, we just need to run rustup show to install the toolchain - # https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659 - - name: Setup Rust toolchain - run: rustup show + - name: Install Rust Toolchain + uses: ./.github/workflow-templates/rust-toolchain - name: Check Cargo.toml files format with toml_sort run: ./scripts/check-cargo-toml-files-format.sh @@ -239,8 +237,8 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ needs.set-tags.outputs.git_ref }} - - name: Setup Rust toolchain - run: rustup show + - name: Install Rust Toolchain + uses: ./.github/workflow-templates/rust-toolchain - name: Verifies all 'pallet-evm/ethereum' use 'forbid-evm-reentrancy' feature run: ./scripts/check-forbid-evm-reentrancy.sh @@ -253,10 +251,8 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ needs.set-tags.outputs.git_ref }} - # With rustup's nice new toml format, we just need to run rustup show to install the toolchain - # https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659 - - name: Setup Rust toolchain - run: rustup show + - name: Install Rust Toolchain + uses: ./.github/workflow-templates/rust-toolchain - name: Format code with rustfmt run: cargo fmt -- --check @@ -275,8 +271,6 @@ jobs: uses: ./.github/workflow-templates/rust-toolchain - name: Install Protoc uses: arduino/setup-protoc@v1 - - name: Setup Rust toolchain - run: rustup show # Development branch clippy check - name: Clippy (dev) if: github.ref != 'refs/heads/master' && !startsWith(github.ref, 'perm-') @@ -333,15 +327,8 @@ jobs: run: | mkdir -p mold curl -L --retry 10 --silent --show-error https://github.com/rui314/mold/releases/download/v1.1.1/mold-1.1.1-$(uname -m)-linux.tar.gz | tar -C $(realpath mold) --strip-components=1 -xzf - - # With rustup's nice new toml format, we just need to run rustup show to install the toolchain - # https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659 - - name: Setup Rust toolchain - run: | - if ! which "rustup" > /dev/null; then - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - fi - rustup show - rustup target add wasm32-unknown-unknown + - name: Install Rust Toolchain + uses: ./.github/workflow-templates/rust-toolchain # Checks are run after uploading artifacts since they are modified by the tests - name: Unit tests run: | diff --git a/.github/workflows/check-licenses.yml b/.github/workflows/check-licenses.yml index 3c53edb1b8..fa2ebb759a 100644 --- a/.github/workflows/check-licenses.yml +++ b/.github/workflows/check-licenses.yml @@ -9,11 +9,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.74.0 - override: true + - name: Install Rust Toolchain + uses: ./.github/workflow-templates/rust-toolchain - name: Verify Licenses run: | cargo install cargo-license diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index a9edafe991..b0965c8104 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -113,8 +113,6 @@ jobs: wget https://github.com/mozilla/grcov/releases/download/v${{ env.GRCOV_VERSION }}/grcov-x86_64-unknown-linux-gnu.tar.bz2 tar xvf grcov-x86_64-unknown-linux-gnu.tar.bz2 chmod +x grcov - - name: Install llvm tools - run: rustup component add llvm-tools-preview - name: Cargo build uses: ./.github/workflow-templates/cargo-build - name: Enable coverage gathering diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b41d593e24..a59cbed291 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -19,10 +19,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - # With rustup's nice new toml format, we just need to run rustup show to install the toolchain - # https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659 - - name: Setup Rust toolchain - run: rustup show + - name: Cargo build + uses: ./.github/workflow-templates/rust-toolchain - uses: actions/cache@v3 with: diff --git a/.github/workflows/prepare-binary.yml b/.github/workflows/prepare-binary.yml index addf99115f..54be5e4317 100644 --- a/.github/workflows/prepare-binary.yml +++ b/.github/workflows/prepare-binary.yml @@ -23,8 +23,8 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.sha }} - - name: Setup Rust toolchain - run: rustup show + - name: Cargo build + uses: ./.github/workflow-templates/rust-toolchain - name: Build Node run: cargo build --profile=production --all - name: Save parachain binary From de0fcf543867e1446664f8ae28ae1a9d098ec605 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 7 Mar 2024 09:40:52 +0000 Subject: [PATCH 14/80] chore(ci): try to fix CI --- .github/workflow-templates/rust-toolchain/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow-templates/rust-toolchain/action.yml b/.github/workflow-templates/rust-toolchain/action.yml index 83878a715c..ad6c4d63da 100644 --- a/.github/workflow-templates/rust-toolchain/action.yml +++ b/.github/workflow-templates/rust-toolchain/action.yml @@ -7,6 +7,7 @@ runs: - name: Install components and targets shell: bash run: | + sudo apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler if ! which "rustup" > /dev/null; then curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y fi @@ -18,4 +19,3 @@ runs: - name: Shows the name of the active toolchain and the version of `rustc` shell: bash run: rustup show - From d50f2070d103e0ecaebcb29152a7626208fdf31b Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 7 Mar 2024 09:42:23 +0000 Subject: [PATCH 15/80] chore(ci): try to fix CI --- .github/workflow-templates/rust-toolchain/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow-templates/rust-toolchain/action.yml b/.github/workflow-templates/rust-toolchain/action.yml index ad6c4d63da..99ba9f1914 100644 --- a/.github/workflow-templates/rust-toolchain/action.yml +++ b/.github/workflow-templates/rust-toolchain/action.yml @@ -7,7 +7,7 @@ runs: - name: Install components and targets shell: bash run: | - sudo apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler + apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler if ! which "rustup" > /dev/null; then curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y fi From 52787b1de7906bc88b5da040fc0937e6f32c53c0 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 7 Mar 2024 09:43:28 +0000 Subject: [PATCH 16/80] chore(ci): try to fix CI --- .github/workflow-templates/rust-toolchain/action.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflow-templates/rust-toolchain/action.yml b/.github/workflow-templates/rust-toolchain/action.yml index 99ba9f1914..e64e512131 100644 --- a/.github/workflow-templates/rust-toolchain/action.yml +++ b/.github/workflow-templates/rust-toolchain/action.yml @@ -7,13 +7,12 @@ runs: - name: Install components and targets shell: bash run: | - apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler if ! which "rustup" > /dev/null; then curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y fi rustup override unset - rustup toolchain install 1.74 - rustup default 1.74 + rustup toolchain install 1.75 + rustup default 1.75 rustup component add rust-src rustfmt clippy llvm-tools-preview rustup target add wasm32-unknown-unknown - name: Shows the name of the active toolchain and the version of `rustc` From 504b560a5b1fa3e2bd664cfd70b155401c2cac68 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 7 Mar 2024 09:51:33 +0000 Subject: [PATCH 17/80] chore(ci): try to fix CI --- .../workflow-templates/rust-toolchain/action.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflow-templates/rust-toolchain/action.yml b/.github/workflow-templates/rust-toolchain/action.yml index e64e512131..12d873f57f 100644 --- a/.github/workflow-templates/rust-toolchain/action.yml +++ b/.github/workflow-templates/rust-toolchain/action.yml @@ -4,16 +4,15 @@ description: Install Rust toolchain runs: using: "composite" steps: + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: 1.74.0 + override: true + components: rust-src, rustfmt, clippy - name: Install components and targets shell: bash run: | - if ! which "rustup" > /dev/null; then - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - fi - rustup override unset - rustup toolchain install 1.75 - rustup default 1.75 - rustup component add rust-src rustfmt clippy llvm-tools-preview rustup target add wasm32-unknown-unknown - name: Shows the name of the active toolchain and the version of `rustc` shell: bash From 11ee0f0a07a3d3251aae6ac08bee212339ede629 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 7 Mar 2024 10:20:25 +0000 Subject: [PATCH 18/80] disable crate default-features --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index bb9a1641f9..ce4e9f0f9c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -136,7 +136,7 @@ pallet-balances = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", pallet-collective = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } pallet-conviction-voting = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } pallet-identity = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } -pallet-message-queue = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } +pallet-message-queue = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } pallet-multisig = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } pallet-preimage = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } pallet-proxy = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2", default-features = false } From 20bd522f4aadafedac77a19edc7210af42687743 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 7 Mar 2024 11:40:10 +0000 Subject: [PATCH 19/80] fix tests --- .../moonbeam-xcm-benchmarks/src/generic/mock.rs | 14 ++++++++++++-- precompiles/relay-encoder/src/lib.rs | 6 +++++- precompiles/relay-encoder/src/tests.rs | 14 ++++++++++---- runtime/common/Cargo.toml | 1 + runtime/relay-encoder/src/westend.rs | 14 ++++++++------ 5 files changed, 36 insertions(+), 13 deletions(-) diff --git a/pallets/moonbeam-xcm-benchmarks/src/generic/mock.rs b/pallets/moonbeam-xcm-benchmarks/src/generic/mock.rs index 7578ca65ec..800a0676b6 100644 --- a/pallets/moonbeam-xcm-benchmarks/src/generic/mock.rs +++ b/pallets/moonbeam-xcm-benchmarks/src/generic/mock.rs @@ -103,7 +103,11 @@ impl xcm_executor::traits::TransactAsset for NoAssetTransactor { unreachable!(); } - fn withdraw_asset(_: &Asset, _: &Location, _: Option<&XcmContext>) -> Result { + fn withdraw_asset( + _: &Asset, + _: &Location, + _: Option<&XcmContext>, + ) -> Result { unreachable!(); } } @@ -140,6 +144,8 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = (); + + type TransactionalProcessor = (); } impl pallet_xcm_benchmarks::Config for Test { @@ -177,6 +183,10 @@ impl pallet_xcm_benchmarks::generic::Config for Test { Err(BenchmarkError::Skip) } + fn fee_asset() -> Result { + Err(BenchmarkError::Skip) + } + fn export_message_origin_and_destination( ) -> Result<(Location, NetworkId, Junctions), BenchmarkError> { Err(BenchmarkError::Skip) @@ -197,7 +207,7 @@ impl pallet_xcm_benchmarks::generic::Config for Test { let assets: Assets = (AssetId(Here.into()), 100).into(); let ticket = Location { parents: 0, - interior: X1(GeneralIndex(0)), + interior: [GeneralIndex(0)].into(), }; Ok((Default::default(), ticket, assets)) } diff --git a/precompiles/relay-encoder/src/lib.rs b/precompiles/relay-encoder/src/lib.rs index 3edb93e73f..d9cffee46d 100644 --- a/precompiles/relay-encoder/src/lib.rs +++ b/precompiles/relay-encoder/src/lib.rs @@ -418,7 +418,10 @@ impl solidity::Codec for RewardDestinationWrapper { 0u8 => Ok(RewardDestinationWrapper(RewardDestination::Staked)), 1u8 => Ok(RewardDestinationWrapper(RewardDestination::Stash)), // Deprecated in https://github.com/paritytech/polkadot-sdk/pull/2380 - 2u8 => Ok(RewardDestinationWrapper(RewardDestination::Controller)), + 2u8 => Err(RevertReason::custom( + "`Controller` was deprecated. Use `Account(controller)` instead.", + ) + .into()), 3u8 => { let address = encoded_reward_destination.read::()?; Ok(RewardDestinationWrapper(RewardDestination::Account( @@ -442,6 +445,7 @@ impl solidity::Codec for RewardDestinationWrapper { encoded.as_slice().into() } // Deprecated in https://github.com/paritytech/polkadot-sdk/pull/2380 + #[allow(deprecated)] RewardDestination::Controller => { encoded.push(2); encoded.as_slice().into() diff --git a/precompiles/relay-encoder/src/tests.rs b/precompiles/relay-encoder/src/tests.rs index 2d49a64d41..41929bddd4 100644 --- a/precompiles/relay-encoder/src/tests.rs +++ b/precompiles/relay-encoder/src/tests.rs @@ -80,6 +80,7 @@ fn no_selector_exists_but_length_is_right() { #[test] fn test_encode_bond() { + let controller = sp_runtime::AccountId32::from([0; 32]); ExtBuilder::default() .with_balances(vec![(Alice.into(), 1000)]) .build() @@ -90,7 +91,9 @@ fn test_encode_bond() { Precompile1, PCall::encode_bond { amount: 100.into(), - reward_destination: RewardDestinationWrapper(RewardDestination::Controller), + reward_destination: RewardDestinationWrapper(RewardDestination::Account( + controller.clone(), + )), }, ) .expect_cost(1000) @@ -98,7 +101,7 @@ fn test_encode_bond() { .execute_returns(UnboundedBytes::from( TestEncoder::encode_call(AvailableStakeCalls::Bond( 100u32.into(), - RewardDestination::Controller, + RewardDestination::Account(controller), )) .as_slice(), )); @@ -206,6 +209,7 @@ fn test_encode_set_controller() { #[test] fn test_encode_set_payee() { + let controller = sp_runtime::AccountId32::from([0; 32]); ExtBuilder::default() .with_balances(vec![(Alice.into(), 1000)]) .build() @@ -215,14 +219,16 @@ fn test_encode_set_payee() { Alice, Precompile1, PCall::encode_set_payee { - reward_destination: RewardDestinationWrapper(RewardDestination::Controller), + reward_destination: RewardDestinationWrapper(RewardDestination::Account( + controller.clone(), + )), }, ) .expect_cost(1000) .expect_no_logs() .execute_returns(UnboundedBytes::from( TestEncoder::encode_call(AvailableStakeCalls::SetPayee( - RewardDestination::Controller, + RewardDestination::Account(controller), )) .as_slice(), )); diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index f66dcd57a1..9d981b559c 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -97,6 +97,7 @@ std = [ "pallet-scheduler/std", "pallet-xcm-transactor/std", "pallet-moonbeam-lazy-migrations/std", + "pallet-identity/std", "parity-scale-codec/std", "precompile-utils/std", "sp-consensus-slots/std", diff --git a/runtime/relay-encoder/src/westend.rs b/runtime/relay-encoder/src/westend.rs index 2fb7e9054e..499ee5db26 100644 --- a/runtime/relay-encoder/src/westend.rs +++ b/runtime/relay-encoder/src/westend.rs @@ -256,6 +256,7 @@ mod tests { #[test] fn test_stake_bond() { let mut expected_encoded: Vec = Vec::new(); + let controller: AccountId32 = [1u8; 32].into(); let index = ::PalletInfo::index::< westend_runtime::Staking, @@ -265,7 +266,7 @@ mod tests { let mut expected = pallet_staking::Call::::bond { value: 100u32.into(), - payee: pallet_staking::RewardDestination::Controller, + payee: pallet_staking::RewardDestination::Account(controller.clone()), } .encode(); expected_encoded.append(&mut expected); @@ -274,7 +275,7 @@ mod tests { ::encode_call( xcm_primitives::AvailableStakeCalls::Bond( 100u32.into(), - pallet_staking::RewardDestination::Controller + pallet_staking::RewardDestination::Account(controller.clone()), ) ), expected_encoded.clone() @@ -291,7 +292,7 @@ mod tests { >::encode_call( xcm_primitives::AvailableStakeCalls::Bond( 100u32.into(), - pallet_staking::RewardDestination::Controller + pallet_staking::RewardDestination::Account(controller) ) ), expected_encoded @@ -535,6 +536,7 @@ mod tests { #[test] fn test_set_payee() { let mut expected_encoded: Vec = Vec::new(); + let controller: AccountId32 = [1u8; 32].into(); let index = ::PalletInfo::index::< westend_runtime::Staking, @@ -543,7 +545,7 @@ mod tests { expected_encoded.push(index); let mut expected = pallet_staking::Call::::set_payee { - payee: pallet_staking::RewardDestination::Controller, + payee: pallet_staking::RewardDestination::Account(controller.clone()), } .encode(); expected_encoded.append(&mut expected); @@ -551,7 +553,7 @@ mod tests { assert_eq!( ::encode_call( xcm_primitives::AvailableStakeCalls::SetPayee( - pallet_staking::RewardDestination::Controller + pallet_staking::RewardDestination::Account(controller.clone()) ) ), expected_encoded.clone() @@ -567,7 +569,7 @@ mod tests { moonbase_runtime::Runtime> as StakeEncodeCall >::encode_call( xcm_primitives::AvailableStakeCalls::SetPayee( - pallet_staking::RewardDestination::Controller + pallet_staking::RewardDestination::Account(controller) ) ), expected_encoded From e1269b06976097343e80210cd6d949d206704a7b Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 7 Mar 2024 18:44:43 +0000 Subject: [PATCH 20/80] fix try-runtime --- Cargo.lock | 54 +++++++++------------ node/cli/Cargo.toml | 6 ++- node/service/Cargo.toml | 6 ++- pallets/parachain-staking/src/migrations.rs | 2 +- pallets/precompile-benchmarks/Cargo.toml | 5 +- runtime/common/Cargo.toml | 1 + runtime/common/src/migrations.rs | 8 +-- runtime/moonbase/Cargo.toml | 32 +++++++++++- runtime/moonbase/src/lib.rs | 52 ++------------------ runtime/moonbeam/Cargo.toml | 28 +++++++++++ runtime/moonbeam/src/lib.rs | 50 +------------------ runtime/moonriver/Cargo.toml | 29 +++++++++++ runtime/moonriver/src/lib.rs | 50 +------------------ 13 files changed, 135 insertions(+), 188 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 12ac0f9272..5306fe5947 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1235,9 +1235,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.3" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "byte-slice-cast" @@ -1330,9 +1330,9 @@ checksum = "fd6c0e7b807d60291f42f33f58480c0bfafe28ed08286446f45e463728cf9c1c" [[package]] name = "cc" -version = "1.0.89" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0ba8f7aaa012f30d5b2861462f6708eccd49c3c39863fe083a308035f63d723" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" dependencies = [ "jobserver", "libc", @@ -1404,9 +1404,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.34" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" +checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1471,9 +1471,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.1" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" +checksum = "b230ab84b0ffdf890d5a10abdbc8b83ae1c4918275daea1ab8801f71536b2651" dependencies = [ "clap_builder", "clap_derive", @@ -1481,9 +1481,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.1" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstream", "anstyle", @@ -4649,7 +4649,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core 0.52.0", + "windows-core", ] [[package]] @@ -6785,6 +6785,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "frame-try-runtime", "hex-literal 0.3.4", "impl-trait-for-tuples", "log", @@ -8354,7 +8355,7 @@ dependencies = [ [[package]] name = "pallet-crowdloan-rewards" version = "0.6.0" -source = "git+https://github.com/moonbeam-foundation/crowdloan-rewards?branch=moonbeam-polkadot-v1.7.2#df3b3772383ddc985c93673414e4af6597f4bb34" +source = "git+https://github.com/moonbeam-foundation/crowdloan-rewards?branch=moonbeam-polkadot-v1.7.2#f398e102dbff742db441bf00502565aa9c863828" dependencies = [ "ed25519-dalek 1.0.1", "frame-benchmarking", @@ -14906,7 +14907,7 @@ dependencies = [ [[package]] name = "sp-crypto-ec-utils" version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk#475e7a147676a4e7a9d255ddc7969dd35ea22882" +source = "git+https://github.com/paritytech/polkadot-sdk#629506ce061db76d31d4f7a81f4a497752b27259" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -14969,7 +14970,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#475e7a147676a4e7a9d255ddc7969dd35ea22882" +source = "git+https://github.com/paritytech/polkadot-sdk#629506ce061db76d31d4f7a81f4a497752b27259" dependencies = [ "proc-macro2", "quote", @@ -14990,7 +14991,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.25.0" -source = "git+https://github.com/paritytech/polkadot-sdk#475e7a147676a4e7a9d255ddc7969dd35ea22882" +source = "git+https://github.com/paritytech/polkadot-sdk#629506ce061db76d31d4f7a81f4a497752b27259" dependencies = [ "environmental", "parity-scale-codec", @@ -15209,7 +15210,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#475e7a147676a4e7a9d255ddc7969dd35ea22882" +source = "git+https://github.com/paritytech/polkadot-sdk#629506ce061db76d31d4f7a81f4a497752b27259" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -15241,7 +15242,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#475e7a147676a4e7a9d255ddc7969dd35ea22882" +source = "git+https://github.com/paritytech/polkadot-sdk#629506ce061db76d31d4f7a81f4a497752b27259" dependencies = [ "Inflector", "expander 2.0.0", @@ -15334,7 +15335,7 @@ source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbea [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#475e7a147676a4e7a9d255ddc7969dd35ea22882" +source = "git+https://github.com/paritytech/polkadot-sdk#629506ce061db76d31d4f7a81f4a497752b27259" [[package]] name = "sp-storage" @@ -15352,7 +15353,7 @@ dependencies = [ [[package]] name = "sp-storage" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#475e7a147676a4e7a9d255ddc7969dd35ea22882" +source = "git+https://github.com/paritytech/polkadot-sdk#629506ce061db76d31d4f7a81f4a497752b27259" dependencies = [ "impl-serde 0.4.0", "parity-scale-codec", @@ -15390,7 +15391,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#475e7a147676a4e7a9d255ddc7969dd35ea22882" +source = "git+https://github.com/paritytech/polkadot-sdk#629506ce061db76d31d4f7a81f4a497752b27259" dependencies = [ "parity-scale-codec", "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", @@ -15491,7 +15492,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#475e7a147676a4e7a9d255ddc7969dd35ea22882" +source = "git+https://github.com/paritytech/polkadot-sdk#629506ce061db76d31d4f7a81f4a497752b27259" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -17685,7 +17686,7 @@ version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows-core 0.51.1", + "windows-core", "windows-targets 0.48.5", ] @@ -17698,15 +17699,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.4", -] - [[package]] name = "windows-sys" version = "0.45.0" diff --git a/node/cli/Cargo.toml b/node/cli/Cargo.toml index cd6d10a3ff..82903928e8 100644 --- a/node/cli/Cargo.toml +++ b/node/cli/Cargo.toml @@ -63,6 +63,10 @@ runtime-benchmarks = [ "moonbeam-service/runtime-benchmarks", "polkadot-service/runtime-benchmarks", ] -try-runtime = ["moonbeam-service/try-runtime", "try-runtime-cli/try-runtime"] +try-runtime = [ + "moonbeam-service/try-runtime", + "try-runtime-cli/try-runtime", + "polkadot-service/try-runtime", +] moonbase-runtime-benchmarks = ["moonbeam-service/moonbase-runtime-benchmarks"] diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index 9763ad771f..3fd850ed11 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -200,7 +200,11 @@ runtime-benchmarks = [ "pallet-ethereum/runtime-benchmarks", ] -try-runtime = ["moonbase-runtime", "moonbase-runtime/try-runtime"] +try-runtime = [ + "moonbase-runtime", + "moonbase-runtime/try-runtime", + "polkadot-service/try-runtime", +] moonbase-runtime-benchmarks = [ "moonbase-native", diff --git a/pallets/parachain-staking/src/migrations.rs b/pallets/parachain-staking/src/migrations.rs index 3971d6e87a..fb3e89e587 100644 --- a/pallets/parachain-staking/src/migrations.rs +++ b/pallets/parachain-staking/src/migrations.rs @@ -171,7 +171,7 @@ where #[cfg(feature = "try-runtime")] fn post_upgrade(_state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { - let round = crate::Round::::get(); // Should panic if SCALE decode fail + let _round = crate::Round::::get(); // Should panic if SCALE decode fail Ok(()) } } diff --git a/pallets/precompile-benchmarks/Cargo.toml b/pallets/precompile-benchmarks/Cargo.toml index 9686467581..8d0ccd908a 100644 --- a/pallets/precompile-benchmarks/Cargo.toml +++ b/pallets/precompile-benchmarks/Cargo.toml @@ -12,7 +12,7 @@ storage-proof-primitives = { workspace = true } cumulus-primitives-core = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } -parity-scale-codec = { workspace = true, features = [ "derive" ] } +parity-scale-codec = { workspace = true, features = ["derive"] } scale-info = { workspace = true } sp-core = { workspace = true } sp-std = { workspace = true } @@ -24,7 +24,7 @@ pallet-relay-storage-roots = { workspace = true } frame-benchmarking = { workspace = true, optional = true } [features] -default = [ "std" ] +default = ["std"] std = [ "cumulus-primitives-core/std", "frame-benchmarking/std", @@ -42,3 +42,4 @@ runtime-benchmarks = [ "frame-system/runtime-benchmarks", "frame-support/runtime-benchmarks", ] +try-runtime = ["frame-support/try-runtime"] diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 9d981b559c..309b670079 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -56,6 +56,7 @@ sp-core = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } sp-genesis-builder = { workspace = true } +frame-try-runtime = { workspace = true } # Frontier fp-ethereum = { workspace = true } diff --git a/runtime/common/src/migrations.rs b/runtime/common/src/migrations.rs index f8adf2c019..c693d8b7c5 100644 --- a/runtime/common/src/migrations.rs +++ b/runtime/common/src/migrations.rs @@ -19,10 +19,6 @@ //! This module acts as a registry where each migration is defined. Each migration should implement //! the "Migration" trait declared in the pallet-migrations crate. -#[cfg(feature = "try-runtime")] -use frame_support::ensure; -#[cfg(feature = "try-runtime")] -use frame_support::migration::get_storage_value; use frame_support::{ parameter_types, storage::unhashed::contains_prefixed_key, traits::OnRuntimeUpgrade, weights::Weight, @@ -92,7 +88,7 @@ where #[cfg(feature = "try-runtime")] fn pre_upgrade(&self) -> Result, sp_runtime::DispatchError> { - frame_support::migrations::RemovePallet::< + let _ = frame_support::migrations::RemovePallet::< DemocracyPalletName, ::DbWeight, >::pre_upgrade(); @@ -102,7 +98,7 @@ where #[cfg(feature = "try-runtime")] fn post_upgrade(&self, _state: Vec) -> Result<(), sp_runtime::DispatchError> { - frame_support::migrations::RemovePallet::< + let _ = frame_support::migrations::RemovePallet::< DemocracyPalletName, ::DbWeight, >::post_upgrade(_state); diff --git a/runtime/moonbase/Cargo.toml b/runtime/moonbase/Cargo.toml index 206d003f48..6a4a8baaed 100644 --- a/runtime/moonbase/Cargo.toml +++ b/runtime/moonbase/Cargo.toml @@ -369,6 +369,10 @@ runtime-benchmarks = [ ] try-runtime = [ + "cumulus-pallet-parachain-system/try-runtime", + "cumulus-pallet-xcmp-queue/try-runtime", + "cumulus-pallet-xcm/try-runtime", + "cumulus-pallet-dmp-queue/try-runtime", "fp-self-contained/try-runtime", "frame-executive/try-runtime", "frame-system/try-runtime", @@ -381,7 +385,6 @@ try-runtime = [ "pallet-collective/try-runtime", "pallet-conviction-voting/try-runtime", "pallet-maintenance-mode/try-runtime", - "pallet-maintenance-mode/try-runtime", "pallet-migrations/try-runtime", "pallet-moonbeam-lazy-migrations/try-runtime", "pallet-parachain-staking/try-runtime", @@ -393,6 +396,33 @@ try-runtime = [ "pallet-society/try-runtime", "pallet-timestamp/try-runtime", "pallet-xcm-transactor/try-runtime", + "pallet-xcm/try-runtime", + "pallet-message-queue/try-runtime", + "pallet-utility/try-runtime", + "pallet-sudo/try-runtime", + "pallet-transaction-payment/try-runtime", + "parachain-info/try-runtime", + "pallet-evm-chain-id/try-runtime", + "parachain-info/try-runtime", + "pallet-evm/try-runtime", + "pallet-ethereum/try-runtime", + "pallet-treasury/try-runtime", + "pallet-author-inherent/try-runtime", + "pallet-crowdloan-rewards/try-runtime", + "pallet-proxy/try-runtime", + "pallet-identity/try-runtime", + "orml-xtokens/try-runtime", + "pallet-assets/try-runtime", + "pallet-xcm-transactor/try-runtime", + "pallet-proxy-genesis-companion/try-runtime", + "pallet-moonbeam-orbiters/try-runtime", + "pallet-ethereum-xcm/try-runtime", + "pallet-randomness/try-runtime", + "pallet-whitelist/try-runtime", + "pallet-erc20-xcm-bridge/try-runtime", + "pallet-multisig/try-runtime", + "pallet-async-backing/try-runtime", + "pallet-precompile-benchmarks/try-runtime", ] moonbase-runtime-benchmarks = [] diff --git a/runtime/moonbase/src/lib.rs b/runtime/moonbase/src/lib.rs index 6725840006..0d1878d937 100644 --- a/runtime/moonbase/src/lib.rs +++ b/runtime/moonbase/src/lib.rs @@ -67,8 +67,8 @@ use frame_support::{ tokens::imbalance::ResolveTo, tokens::{PayFromAccount, UnityAssetBalanceConversion}, ConstBool, ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, Contains, EitherOfDiverse, - EqualPrivilegeOnly, FindAuthor, Imbalance, InstanceFilter, LinearStoragePrice, - OffchainWorker, OnFinalize, OnIdle, OnInitialize, OnRuntimeUpgrade, OnUnbalanced, + EqualPrivilegeOnly, FindAuthor, Imbalance, InstanceFilter, LinearStoragePrice, OnFinalize, + OnUnbalanced, }, weights::{ constants::{RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND}, @@ -97,8 +97,6 @@ use scale_info::TypeInfo; use sp_api::impl_runtime_apis; use sp_consensus_slots::Slot; use sp_core::{OpaqueMetadata, H160, H256, U256}; -#[cfg(feature = "try-runtime")] -use sp_runtime::TryRuntimeError; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ @@ -1216,50 +1214,6 @@ impl moonkit_xcm_primitives::PauseXcmExecution for XcmExecutionManager { } } -/// The hooks we wnat to run in Maintenance Mode -pub struct MaintenanceHooks; - -impl OnInitialize for MaintenanceHooks { - fn on_initialize(n: BlockNumber) -> Weight { - AllPalletsWithSystem::on_initialize(n) - } -} - -// return 0 -// For some reason using empty tuple () isnt working -// There exist only two pallets that use onIdle and these are xcmp and dmp queues -// For some reason putting an empty tumple does not work (transaction never finishes) -// We use an empty onIdle, if on the future we want one of the pallets to execute it -// we need to provide it here -impl OnIdle for MaintenanceHooks { - fn on_idle(_n: BlockNumber, _max_weight: Weight) -> Weight { - Weight::zero() - } -} - -impl OnRuntimeUpgrade for MaintenanceHooks { - fn on_runtime_upgrade() -> Weight { - AllPalletsWithSystem::on_runtime_upgrade() - } - - #[cfg(feature = "try-runtime")] - fn try_on_runtime_upgrade(checks: bool) -> Result { - AllPalletsWithSystem::try_on_runtime_upgrade(checks) - } -} - -impl OnFinalize for MaintenanceHooks { - fn on_finalize(n: BlockNumber) { - AllPalletsWithSystem::on_finalize(n) - } -} - -impl OffchainWorker for MaintenanceHooks { - fn offchain_worker(n: BlockNumber) { - AllPalletsWithSystem::offchain_worker(n) - } -} - impl pallet_maintenance_mode::Config for Runtime { type RuntimeEvent = RuntimeEvent; type NormalCallFilter = NormalFilter; @@ -1416,7 +1370,7 @@ construct_runtime! { Treasury: pallet_treasury::{Pallet, Storage, Config, Event, Call} = 17, AuthorInherent: pallet_author_inherent::{Pallet, Call, Storage, Inherent} = 18, AuthorFilter: pallet_author_slot_filter::{Pallet, Call, Storage, Event, Config} = 19, - CrowdloanRewards: pallet_crowdloan_rewards::{Pallet, Call, Config, Storage, Event} = 20, + CrowdloanRewards: pallet_crowdloan_rewards::{Pallet, Call, Config, Event} = 20, AuthorMapping: pallet_author_mapping::{Pallet, Call, Config, Storage, Event} = 21, Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 22, MaintenanceMode: pallet_maintenance_mode::{Pallet, Call, Config, Storage, Event} = 23, diff --git a/runtime/moonbeam/Cargo.toml b/runtime/moonbeam/Cargo.toml index 4777c107f7..b17dcb8d78 100644 --- a/runtime/moonbeam/Cargo.toml +++ b/runtime/moonbeam/Cargo.toml @@ -352,6 +352,10 @@ runtime-benchmarks = [ ] try-runtime = [ + "cumulus-pallet-parachain-system/try-runtime", + "cumulus-pallet-xcmp-queue/try-runtime", + "cumulus-pallet-xcm/try-runtime", + "cumulus-pallet-dmp-queue/try-runtime", "fp-self-contained/try-runtime", "frame-executive/try-runtime", "frame-system/try-runtime", @@ -374,4 +378,28 @@ try-runtime = [ "pallet-society/try-runtime", "pallet-timestamp/try-runtime", "pallet-whitelist/try-runtime", + "pallet-xcm/try-runtime", + "pallet-message-queue/try-runtime", + "pallet-utility/try-runtime", + "pallet-transaction-payment/try-runtime", + "parachain-info/try-runtime", + "pallet-evm-chain-id/try-runtime", + "parachain-info/try-runtime", + "pallet-evm/try-runtime", + "pallet-ethereum/try-runtime", + "pallet-treasury/try-runtime", + "pallet-author-inherent/try-runtime", + "pallet-crowdloan-rewards/try-runtime", + "pallet-proxy/try-runtime", + "pallet-identity/try-runtime", + "orml-xtokens/try-runtime", + "pallet-assets/try-runtime", + "pallet-xcm-transactor/try-runtime", + "pallet-proxy-genesis-companion/try-runtime", + "pallet-moonbeam-orbiters/try-runtime", + "pallet-ethereum-xcm/try-runtime", + "pallet-randomness/try-runtime", + "pallet-whitelist/try-runtime", + "pallet-erc20-xcm-bridge/try-runtime", + "pallet-multisig/try-runtime", ] diff --git a/runtime/moonbeam/src/lib.rs b/runtime/moonbeam/src/lib.rs index c28affa6cf..23a5241dcc 100644 --- a/runtime/moonbeam/src/lib.rs +++ b/runtime/moonbeam/src/lib.rs @@ -47,8 +47,8 @@ use frame_support::{ tokens::imbalance::ResolveTo, tokens::{PayFromAccount, UnityAssetBalanceConversion}, ConstBool, ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, Contains, EitherOfDiverse, - EqualPrivilegeOnly, Imbalance, InstanceFilter, LinearStoragePrice, OffchainWorker, - OnFinalize, OnIdle, OnInitialize, OnRuntimeUpgrade, OnUnbalanced, + EqualPrivilegeOnly, Imbalance, InstanceFilter, LinearStoragePrice, OnFinalize, + OnUnbalanced, }, weights::{ constants::{RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND}, @@ -81,8 +81,6 @@ use smallvec::smallvec; use sp_api::impl_runtime_apis; use sp_consensus_slots::Slot; use sp_core::{OpaqueMetadata, H160, H256, U256}; -#[cfg(feature = "try-runtime")] -use sp_runtime::TryRuntimeError; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ @@ -1194,50 +1192,6 @@ impl moonkit_xcm_primitives::PauseXcmExecution for XcmExecutionManager { } } -/// The hooks we want to run in Maintenance Mode -pub struct MaintenanceHooks; - -impl OnInitialize for MaintenanceHooks { - fn on_initialize(n: BlockNumber) -> Weight { - AllPalletsWithSystem::on_initialize(n) - } -} - -// return 0 -// For some reason using empty tuple () isnt working -// There exist only two pallets that use onIdle and these are xcmp and dmp queues -// For some reason putting an empty tumple does not work (transaction never finishes) -// We use an empty onIdle, if on the future we want one of the pallets to execute it -// we need to provide it here -impl OnIdle for MaintenanceHooks { - fn on_idle(_n: BlockNumber, _max_weight: Weight) -> Weight { - Weight::zero() - } -} - -impl OnRuntimeUpgrade for MaintenanceHooks { - fn on_runtime_upgrade() -> Weight { - AllPalletsWithSystem::on_runtime_upgrade() - } - - #[cfg(feature = "try-runtime")] - fn try_on_runtime_upgrade(checks: bool) -> Result { - AllPalletsWithSystem::try_on_runtime_upgrade(checks) - } -} - -impl OnFinalize for MaintenanceHooks { - fn on_finalize(n: BlockNumber) { - AllPalletsWithSystem::on_finalize(n) - } -} - -impl OffchainWorker for MaintenanceHooks { - fn offchain_worker(n: BlockNumber) { - AllPalletsWithSystem::offchain_worker(n) - } -} - impl pallet_maintenance_mode::Config for Runtime { type RuntimeEvent = RuntimeEvent; type NormalCallFilter = NormalFilter; diff --git a/runtime/moonriver/Cargo.toml b/runtime/moonriver/Cargo.toml index a592d14185..eeb0bbf980 100644 --- a/runtime/moonriver/Cargo.toml +++ b/runtime/moonriver/Cargo.toml @@ -355,6 +355,10 @@ runtime-benchmarks = [ "xcm-builder/runtime-benchmarks", ] try-runtime = [ + "cumulus-pallet-parachain-system/try-runtime", + "cumulus-pallet-xcmp-queue/try-runtime", + "cumulus-pallet-xcm/try-runtime", + "cumulus-pallet-dmp-queue/try-runtime", "fp-self-contained/try-runtime", "frame-executive/try-runtime", "frame-system/try-runtime", @@ -377,4 +381,29 @@ try-runtime = [ "pallet-society/try-runtime", "pallet-timestamp/try-runtime", "pallet-whitelist/try-runtime", + "pallet-message-queue/try-runtime", + "pallet-xcm/try-runtime", + "pallet-message-queue/try-runtime", + "pallet-utility/try-runtime", + "pallet-transaction-payment/try-runtime", + "parachain-info/try-runtime", + "pallet-evm-chain-id/try-runtime", + "parachain-info/try-runtime", + "pallet-evm/try-runtime", + "pallet-ethereum/try-runtime", + "pallet-treasury/try-runtime", + "pallet-author-inherent/try-runtime", + "pallet-crowdloan-rewards/try-runtime", + "pallet-proxy/try-runtime", + "pallet-identity/try-runtime", + "orml-xtokens/try-runtime", + "pallet-assets/try-runtime", + "pallet-xcm-transactor/try-runtime", + "pallet-proxy-genesis-companion/try-runtime", + "pallet-moonbeam-orbiters/try-runtime", + "pallet-ethereum-xcm/try-runtime", + "pallet-randomness/try-runtime", + "pallet-whitelist/try-runtime", + "pallet-erc20-xcm-bridge/try-runtime", + "pallet-multisig/try-runtime", ] diff --git a/runtime/moonriver/src/lib.rs b/runtime/moonriver/src/lib.rs index e21eace35e..76c68ff20f 100644 --- a/runtime/moonriver/src/lib.rs +++ b/runtime/moonriver/src/lib.rs @@ -48,8 +48,8 @@ use frame_support::{ tokens::imbalance::ResolveTo, tokens::{PayFromAccount, UnityAssetBalanceConversion}, ConstBool, ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, Contains, EitherOfDiverse, - EqualPrivilegeOnly, Imbalance, InstanceFilter, LinearStoragePrice, OffchainWorker, - OnFinalize, OnIdle, OnInitialize, OnRuntimeUpgrade, OnUnbalanced, + EqualPrivilegeOnly, Imbalance, InstanceFilter, LinearStoragePrice, OnFinalize, + OnUnbalanced, }, weights::{ constants::{RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND}, @@ -80,8 +80,6 @@ use scale_info::TypeInfo; use sp_api::impl_runtime_apis; use sp_consensus_slots::Slot; use sp_core::{OpaqueMetadata, H160, H256, U256}; -#[cfg(feature = "try-runtime")] -use sp_runtime::TryRuntimeError; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, serde::{Deserialize, Serialize}, @@ -1197,50 +1195,6 @@ impl moonkit_xcm_primitives::PauseXcmExecution for XcmExecutionManager { } } -/// The hooks we wantt to run in Maintenance Mode -pub struct MaintenanceHooks; - -impl OnInitialize for MaintenanceHooks { - fn on_initialize(n: BlockNumber) -> Weight { - AllPalletsWithSystem::on_initialize(n) - } -} - -// return 0 -// For some reason using empty tuple () isnt working -// There exist only two pallets that use onIdle and these are xcmp and dmp queues -// For some reason putting an empty tumple does not work (transaction never finishes) -// We use an empty onIdle, if on the future we want one of the pallets to execute it -// we need to provide it here -impl OnIdle for MaintenanceHooks { - fn on_idle(_n: BlockNumber, _max_weight: Weight) -> Weight { - Weight::zero() - } -} - -impl OnRuntimeUpgrade for MaintenanceHooks { - fn on_runtime_upgrade() -> Weight { - AllPalletsWithSystem::on_runtime_upgrade() - } - - #[cfg(feature = "try-runtime")] - fn try_on_runtime_upgrade(checks: bool) -> Result { - AllPalletsWithSystem::try_on_runtime_upgrade(checks) - } -} - -impl OnFinalize for MaintenanceHooks { - fn on_finalize(n: BlockNumber) { - AllPalletsWithSystem::on_finalize(n) - } -} - -impl OffchainWorker for MaintenanceHooks { - fn offchain_worker(n: BlockNumber) { - AllPalletsWithSystem::offchain_worker(n) - } -} - impl pallet_maintenance_mode::Config for Runtime { type RuntimeEvent = RuntimeEvent; type NormalCallFilter = NormalFilter; From 40b48c5f77a762a5d738062b2fc0c211981bb261 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 7 Mar 2024 19:03:15 +0000 Subject: [PATCH 21/80] update crowdloan-rewards crate --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 5306fe5947..4f1bdba881 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8355,7 +8355,7 @@ dependencies = [ [[package]] name = "pallet-crowdloan-rewards" version = "0.6.0" -source = "git+https://github.com/moonbeam-foundation/crowdloan-rewards?branch=moonbeam-polkadot-v1.7.2#f398e102dbff742db441bf00502565aa9c863828" +source = "git+https://github.com/moonbeam-foundation/crowdloan-rewards?branch=moonbeam-polkadot-v1.7.2#e5eabcc061a360589534191257b9caf5cd715945" dependencies = [ "ed25519-dalek 1.0.1", "frame-benchmarking", From b802da90f24033277a5ec2aa401195b7fa963ea9 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 7 Mar 2024 20:45:21 +0000 Subject: [PATCH 22/80] revert Xtokens.sol change --- precompiles/xtokens/Xtokens.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/precompiles/xtokens/Xtokens.sol b/precompiles/xtokens/Xtokens.sol index 1d13878833..7aea70e158 100644 --- a/precompiles/xtokens/Xtokens.sol +++ b/precompiles/xtokens/Xtokens.sol @@ -19,7 +19,7 @@ interface Xtokens { } // A Asset is defined by a multilocation and an amount - struct Asset { + struct MultiAsset { Multilocation location; uint256 amount; } @@ -124,7 +124,7 @@ interface Xtokens { /// (uint64::MAX means Unlimited weight) /// @custom:selector 797b45fd function transferMultiAssets( - Asset[] memory assets, + MultiAsset[] memory assets, uint32 feeItem, Multilocation memory destination, uint64 weight From b039d4d120da3d89be9bc262ecdaa3683999499a Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Fri, 8 Mar 2024 08:14:02 +0000 Subject: [PATCH 23/80] remove TODO's --- runtime/moonbase/src/lib.rs | 2 +- runtime/moonbase/src/xcm_config.rs | 15 +++++++++++++-- runtime/moonbeam/src/xcm_config.rs | 15 +++++++++++++-- runtime/moonriver/src/xcm_config.rs | 15 +++++++++++++-- 4 files changed, 40 insertions(+), 7 deletions(-) diff --git a/runtime/moonbase/src/lib.rs b/runtime/moonbase/src/lib.rs index 0d1878d937..7978b49118 100644 --- a/runtime/moonbase/src/lib.rs +++ b/runtime/moonbase/src/lib.rs @@ -983,7 +983,7 @@ impl pallet_evm_precompile_proxy::EvmProxyCallFilter for ProxyType { && match PrecompileName::from_address(call.to.0) { Some( PrecompileName::AuthorMappingPrecompile - //TODO (RODRIGO) | PrecompileName::IdentityPrecompile + | PrecompileName::IdentityPrecompile | PrecompileName::ParachainStakingPrecompile, ) => true, Some(ref precompile) if is_governance_precompile(precompile) => true, diff --git a/runtime/moonbase/src/xcm_config.rs b/runtime/moonbase/src/xcm_config.rs index 2003ef0ccd..54695c9c05 100644 --- a/runtime/moonbase/src/xcm_config.rs +++ b/runtime/moonbase/src/xcm_config.rs @@ -391,11 +391,22 @@ impl cumulus_pallet_dmp_queue::Config for Runtime { } parameter_types! { + /// The amount of weight (if any) which should be provided to the message queue for + /// servicing enqueued items. + /// + /// This may be legitimately `None` in the case that you will call + /// `ServiceQueues::service_queues` manually. pub MessageQueueServiceWeight: Weight = Perbill::from_percent(25) * RuntimeBlockWeights::get().max_block; - // TODO: describe + /// The maximum number of stale pages (i.e. of overweight messages) allowed before culling + /// can happen. Once there are more stale pages than this, then historical pages may be + /// dropped, even if they contain unprocessed overweight messages. pub const MessageQueueMaxStale: u32 = 8; - // TODO: describe + /// The size of the page; this implies the maximum message size which can be sent. + /// + /// A good value depends on the expected message sizes, their weights, the weight that is + /// available for processing them and the maximal needed message size. The maximal message + /// size is slightly lower than this as defined by [`MaxMessageLenOf`]. pub const MessageQueueHeapSize: u32 = 64 * 1024; } diff --git a/runtime/moonbeam/src/xcm_config.rs b/runtime/moonbeam/src/xcm_config.rs index 3586aa3592..4d5a73a997 100644 --- a/runtime/moonbeam/src/xcm_config.rs +++ b/runtime/moonbeam/src/xcm_config.rs @@ -383,11 +383,22 @@ impl cumulus_pallet_dmp_queue::Config for Runtime { } parameter_types! { + /// The amount of weight (if any) which should be provided to the message queue for + /// servicing enqueued items. + /// + /// This may be legitimately `None` in the case that you will call + /// `ServiceQueues::service_queues` manually. pub MessageQueueServiceWeight: Weight = Perbill::from_percent(25) * RuntimeBlockWeights::get().max_block; - // TODO: describe + /// The maximum number of stale pages (i.e. of overweight messages) allowed before culling + /// can happen. Once there are more stale pages than this, then historical pages may be + /// dropped, even if they contain unprocessed overweight messages. pub const MessageQueueMaxStale: u32 = 8; - // TODO: describe + /// The size of the page; this implies the maximum message size which can be sent. + /// + /// A good value depends on the expected message sizes, their weights, the weight that is + /// available for processing them and the maximal needed message size. The maximal message + /// size is slightly lower than this as defined by [`MaxMessageLenOf`]. pub const MessageQueueHeapSize: u32 = 64 * 1024; } diff --git a/runtime/moonriver/src/xcm_config.rs b/runtime/moonriver/src/xcm_config.rs index e4447f5d9f..90204a6d70 100644 --- a/runtime/moonriver/src/xcm_config.rs +++ b/runtime/moonriver/src/xcm_config.rs @@ -391,11 +391,22 @@ impl cumulus_pallet_dmp_queue::Config for Runtime { } parameter_types! { + /// The amount of weight (if any) which should be provided to the message queue for + /// servicing enqueued items. + /// + /// This may be legitimately `None` in the case that you will call + /// `ServiceQueues::service_queues` manually. pub MessageQueueServiceWeight: Weight = Perbill::from_percent(25) * RuntimeBlockWeights::get().max_block; - // TODO: describe + /// The maximum number of stale pages (i.e. of overweight messages) allowed before culling + /// can happen. Once there are more stale pages than this, then historical pages may be + /// dropped, even if they contain unprocessed overweight messages. pub const MessageQueueMaxStale: u32 = 8; - // TODO: describe + /// The size of the page; this implies the maximum message size which can be sent. + /// + /// A good value depends on the expected message sizes, their weights, the weight that is + /// available for processing them and the maximal needed message size. The maximal message + /// size is slightly lower than this as defined by [`MaxMessageLenOf`]. pub const MessageQueueHeapSize: u32 = 64 * 1024; } From 08a3303a2c4fee896b29c782fc7196a9fc16c082 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Mon, 11 Mar 2024 11:20:53 +0000 Subject: [PATCH 24/80] chore update typescript test --- .../test-xcmv3-new-instructions.ts | 225 ++++++++++++------ 1 file changed, 155 insertions(+), 70 deletions(-) diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts index b38abf6cf9..cc16038fea 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts @@ -1,4 +1,4 @@ -import "@moonbeam-network/api-augment"; +import "@moonbeam-network/api-augment/moonbase"; import { beforeAll, describeSuite, expect } from "@moonwall/cli"; import { alith, CHARLETH_ADDRESS } from "@moonwall/util"; @@ -10,6 +10,7 @@ import { XcmFragmentConfig, } from "../../../../helpers/xcm.js"; import { parseEther } from "ethers"; +import { ApiPromise } from "@polkadot/api"; // Here we are testing each allowed instruction to be executed. Even if some of them throw an error, // the important thing (and what we are testing) is that they are @@ -22,17 +23,18 @@ describeSuite({ let dotAsset: XcmFragmentConfig; let amount: bigint; const paraId: number = 888; + let api: ApiPromise; beforeAll(async () => { + api = await context.polkadotJs(); const paraSovereign = sovereignAccountOfSibling(context, paraId); - const metadata = await context.polkadotJs().rpc.state.getMetadata(); + const metadata = await api.rpc.state.getMetadata(); const balancesPalletIndex = metadata.asLatest.pallets .find(({ name }) => name.toString() === "Balances")! .index.toNumber(); // Send some native tokens to the sovereign account of paraId (to pay fees) - await context - .polkadotJs() + await api .tx.balances.transferAllowDeath(paraSovereign, parseEther("1")) .signAndSend(alith); await context.createBlock(); @@ -69,12 +71,18 @@ describeSuite({ type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); + + // Include hrmp message + await context.createBlock(); + // Process the next block await context.createBlock(); // Search for Success - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Success.is(event) - ); + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.Processed.is(event)) + .map(e => e.event.data.toHuman() as { success: boolean }) + .filter(({ success }) => success); + expect(events).to.have.lengthOf(1); }, }); @@ -94,12 +102,18 @@ describeSuite({ type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); + + // Include hrmp message + await context.createBlock(); + // Process the next block await context.createBlock(); // Search for Success - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Success.is(event) - ); + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.Processed.is(event)) + .map(e => e.event.data.toHuman() as { success: boolean }) + .filter(({ success }) => success); + expect(events).to.have.lengthOf(1); }, }); @@ -119,12 +133,18 @@ describeSuite({ type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); + + // Include hrmp message + await context.createBlock(); + // Process the next block await context.createBlock(); // Search for Success - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Success.is(event) - ); + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.Processed.is(event)) + .map(e => e.event.data.toHuman() as { success: boolean }) + .filter(({ success }) => success); + expect(events).to.have.lengthOf(1); }, }); @@ -144,12 +164,18 @@ describeSuite({ type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); + + // Include hrmp message + await context.createBlock(); + // Process the next block await context.createBlock(); // Search for Success - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Success.is(event) - ); + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.Processed.is(event)) + .map(e => e.event.data.toHuman() as { success: boolean }) + .filter(({ success }) => success); + expect(events).to.have.lengthOf(1); }, }); @@ -169,12 +195,18 @@ describeSuite({ type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); + + // Include hrmp message + await context.createBlock(); + // Process the next block await context.createBlock(); // Search for Success - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Success.is(event) - ); + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.Processed.is(event)) + .map(e => e.event.data.toHuman() as { success: boolean }) + .filter(({ success }) => success); + expect(events).to.have.lengthOf(1); }, }); @@ -195,19 +227,25 @@ describeSuite({ type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); + + // Include hrmp message + await context.createBlock(); + // Process the next block await context.createBlock(); // Search for Success - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Success.is(event) - ); + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.Processed.is(event)) + .map(e => e.event.data.toHuman() as { success: boolean }) + .filter(({ success }) => success); + expect(events).to.have.lengthOf(1); }, }); it({ id: "T07", - title: "Should execute ReportHolding (Transport)", + title: "Should fail to execute ReportHolding (Transport)", test: async function () { const xcmMessage = new XcmFragment(dotAsset) .withdraw_asset() @@ -220,20 +258,26 @@ describeSuite({ type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); + + // Include hrmp message + await context.createBlock(); + // Process the next block await context.createBlock(); - // Search for Success - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Fail.is(event) - ); + // Search for failure + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.Processed.is(event)) + .map(e => e.event.data.toHuman() as { success: boolean }) + .filter(({ success }) => !success); + expect(events).to.have.lengthOf(1); - expect(events[0].event.data[2].toString()).equals("Transport"); + //expect(events[0].event.data[2].toString()).equals("Transport"); }, }); it({ id: "T08", - title: "Should execute ExpectAsset (ExpectationFalse)", + title: "Should fail to execute ExpectAsset (ExpectationFalse)", test: async function () { const xcmMessage = new XcmFragment(dotAsset) .withdraw_asset() @@ -246,20 +290,25 @@ describeSuite({ type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); + + // Include hrmp message + await context.createBlock(); + // Process the next block await context.createBlock(); - // Search for Success - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Fail.is(event) - ); + // Search for failure + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.Processed.is(event)) + .map(e => e.event.data.toHuman() as { success: boolean }) + .filter(({ success }) => !success); + expect(events).to.have.lengthOf(1); - expect(events[0].event.data[2].toString()).equals("ExpectationFalse"); }, }); it({ id: "T09", - title: "Should execute ExpectOrigin (ExpectationFalse)", + title: "Should fail to execute ExpectOrigin (ExpectationFalse)", test: async function () { const xcmMessage = new XcmFragment(dotAsset) .withdraw_asset() @@ -272,20 +321,26 @@ describeSuite({ type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); + + // Include hrmp message + await context.createBlock(); + // Process the next block await context.createBlock(); - // Search for Success - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Fail.is(event) - ); + // Search for failure + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.Processed.is(event)) + .map(e => e.event.data.toHuman() as { success: boolean }) + .filter(({ success }) => !success); + expect(events).to.have.lengthOf(1); - expect(events[0].event.data[2].toString()).equals("ExpectationFalse"); + //expect(events[0].event.data[2].toString()).equals("ExpectationFalse"); }, }); it({ id: "T10", - title: "Should execute ExpectError (ExpectationFalse)", + title: "Should fail to execute ExpectError (ExpectationFalse)", test: async function () { const xcmMessage = new XcmFragment(dotAsset) .withdraw_asset() @@ -298,20 +353,26 @@ describeSuite({ type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); + + // Include hrmp message + await context.createBlock(); + // Process the next block await context.createBlock(); - // Search for Success - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Fail.is(event) - ); + // Search for failure + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.Processed.is(event)) + .map(e => e.event.data.toHuman() as { success: boolean }) + .filter(({ success }) => !success); + expect(events).to.have.lengthOf(1); - expect(events[0].event.data[2].toString()).equals("ExpectationFalse"); + //expect(events[0].event.data[2].toString()).equals("ExpectationFalse"); }, }); it({ id: "T11", - title: "Should execute QueryPallet (Transport)", + title: "Should fail to execute QueryPallet (Transport)", test: async function () { const xcmMessage = new XcmFragment(dotAsset) .withdraw_asset() @@ -324,20 +385,26 @@ describeSuite({ type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); + + // Include hrmp message + await context.createBlock(); + // Process the next block await context.createBlock(); - // Search for Success - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Fail.is(event) - ); + // Search for failure + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.Processed.is(event)) + .map(e => e.event.data.toHuman() as { success: boolean }) + .filter(({ success }) => !success); + expect(events).to.have.lengthOf(1); - expect(events[0].event.data[2].toString()).equals("Transport"); + //expect(events[0].event.data[2].toString()).equals("Transport"); }, }); it({ id: "T12", - title: "Should execute ExpectPallet (NameMismatch)", + title: "Should fail to execute ExpectPallet (NameMismatch)", test: async function () { const xcmMessage = new XcmFragment(dotAsset) .withdraw_asset() @@ -350,20 +417,26 @@ describeSuite({ type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); + + // Include hrmp message + await context.createBlock(); + // Process the next block await context.createBlock(); - // Search for Success - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Fail.is(event) - ); + // Search for failure + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.Processed.is(event)) + .map(e => e.event.data.toHuman() as { success: boolean }) + .filter(({ success }) => !success); + expect(events).to.have.lengthOf(1); - expect(events[0].event.data[2].toString()).equals("NameMismatch"); + // expect(events[0].event.data[2].toString()).equals("NameMismatch"); }, }); it({ id: "T13", - title: "Should execute ReportTransactStatus (Transport)", + title: "Should fail to execute ReportTransactStatus (Transport)", test: async function () { const xcmMessage = new XcmFragment(dotAsset) .withdraw_asset() @@ -376,20 +449,26 @@ describeSuite({ type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); + + // Include hrmp message + await context.createBlock(); + // Process the next block await context.createBlock(); - // Search for Success - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Fail.is(event) - ); + // Search for failure + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.Processed.is(event)) + .map(e => e.event.data.toHuman() as { success: boolean }) + .filter(({ success }) => !success); + expect(events).to.have.lengthOf(1); - expect(events[0].event.data[2].toString()).equals("Transport"); + //expect(events[0].event.data[2].toString()).equals("Transport"); }, }); it({ id: "T14", - title: "Should execute UnpaidExecution (BadOrigin)", + title: "Should fail to execute UnpaidExecution (BadOrigin)", test: async function () { const xcmMessage = new XcmFragment(dotAsset) .withdraw_asset() @@ -402,14 +481,20 @@ describeSuite({ type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); + + // Include hrmp message + await context.createBlock(); + // Process the next block await context.createBlock(); - // Search for Success - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Fail.is(event) - ); + // Search for failure + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.Processed.is(event)) + .map(e => e.event.data.toHuman() as { success: boolean }) + .filter(({ success }) => !success); + expect(events).to.have.lengthOf(1); - expect(events[0].event.data[2].toString()).equals("BadOrigin"); + //expect(events[0].event.data[2].toString()).equals("BadOrigin"); }, }); }, From 111eef267aa6eccc04f18be9331cc1c04f8e8512 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 12 Mar 2024 18:59:36 +0000 Subject: [PATCH 25/80] replace NativeElseWasmExecutor with WasmExecutor to fix runtime overrides not being loaded --- node/cli/src/command.rs | 30 +++--- node/service/src/client.rs | 30 ++---- node/service/src/lib.rs | 201 +++++++++++++------------------------ 3 files changed, 96 insertions(+), 165 deletions(-) diff --git a/node/cli/src/command.rs b/node/cli/src/command.rs index 3af554f236..efb5e854ac 100644 --- a/node/cli/src/command.rs +++ b/node/cli/src/command.rs @@ -355,7 +355,7 @@ pub fn run() -> Result<()> { spec if spec.is_moonriver() => runner.async_run(|mut config| { let params = moonbeam_service::new_partial::< moonbeam_service::moonriver_runtime::RuntimeApi, - moonbeam_service::MoonriverExecutor, + moonbeam_service::MoonriverCustomizations, >(&mut config, &rpc_config, false)?; Ok(( @@ -367,7 +367,7 @@ pub fn run() -> Result<()> { spec if spec.is_moonbeam() => runner.async_run(|mut config| { let params = moonbeam_service::new_partial::< moonbeam_service::moonbeam_runtime::RuntimeApi, - moonbeam_service::MoonbeamExecutor, + moonbeam_service::MoonbeamCustomizations, >(&mut config, &rpc_config, false)?; Ok(( @@ -379,7 +379,7 @@ pub fn run() -> Result<()> { _ => runner.async_run(|mut config| { let params = moonbeam_service::new_partial::< moonbeam_service::moonbase_runtime::RuntimeApi, - moonbeam_service::MoonbaseExecutor, + moonbeam_service::MoonbaseCustomizations, >(&mut config, &rpc_config, false)?; Ok(( @@ -532,7 +532,7 @@ pub fn run() -> Result<()> { return runner.sync_run(|mut config| { let params = moonbeam_service::new_partial::< moonbeam_service::moonriver_runtime::RuntimeApi, - moonbeam_service::MoonriverExecutor, + moonbeam_service::MoonriverCustomizations, >(&mut config, &rpc_config, false)?; cmd.run(params.client) @@ -543,7 +543,7 @@ pub fn run() -> Result<()> { return runner.sync_run(|mut config| { let params = moonbeam_service::new_partial::< moonbeam_service::moonbeam_runtime::RuntimeApi, - moonbeam_service::MoonbeamExecutor, + moonbeam_service::MoonbeamCustomizations, >(&mut config, &rpc_config, false)?; cmd.run(params.client) @@ -554,7 +554,7 @@ pub fn run() -> Result<()> { return runner.sync_run(|mut config| { let params = moonbeam_service::new_partial::< moonbeam_service::moonbase_runtime::RuntimeApi, - moonbeam_service::MoonbaseExecutor, + moonbeam_service::MoonbaseCustomizations, >(&mut config, &rpc_config, false)?; cmd.run(params.client) @@ -650,7 +650,7 @@ pub fn run() -> Result<()> { .. } = moonbeam_service::new_partial::< moonbeam_service::moonriver_runtime::RuntimeApi, - moonbeam_service::MoonriverExecutor, + moonbeam_service::MoonriverCustomizations, >(&mut config, &rpc_config, false)?; Ok((cmd.run(backend, config.chain_spec), task_manager)) @@ -663,7 +663,7 @@ pub fn run() -> Result<()> { .. } = moonbeam_service::new_partial::< moonbeam_service::moonbeam_runtime::RuntimeApi, - moonbeam_service::MoonbeamExecutor, + moonbeam_service::MoonbeamCustomizations, >(&mut config, &rpc_config, false)?; Ok((cmd.run(backend, config.chain_spec), task_manager)) @@ -676,7 +676,7 @@ pub fn run() -> Result<()> { .. } = moonbeam_service::new_partial::< moonbeam_service::moonbase_runtime::RuntimeApi, - moonbeam_service::MoonbaseExecutor, + moonbeam_service::MoonbaseCustomizations, >(&mut config, &rpc_config, false)?; Ok((cmd.run(backend, config.chain_spec), task_manager)) @@ -727,21 +727,21 @@ pub fn run() -> Result<()> { #[cfg(feature = "moonriver-native")] spec if spec.is_moonriver() => moonbeam_service::new_dev::< moonbeam_service::moonriver_runtime::RuntimeApi, - moonbeam_service::MoonriverExecutor, + moonbeam_service::MoonriverCustomizations, >(config, author_id, cli.run.sealing, rpc_config, hwbench) .await .map_err(Into::into), #[cfg(feature = "moonbeam-native")] spec if spec.is_moonbeam() => moonbeam_service::new_dev::< moonbeam_service::moonbeam_runtime::RuntimeApi, - moonbeam_service::MoonbeamExecutor, + moonbeam_service::MoonbeamCustomizations, >(config, author_id, cli.run.sealing, rpc_config, hwbench) .await .map_err(Into::into), #[cfg(feature = "moonbase-native")] _ => moonbeam_service::new_dev::< moonbeam_service::moonbase_runtime::RuntimeApi, - moonbeam_service::MoonbaseExecutor, + moonbeam_service::MoonbaseCustomizations, >(config, author_id, cli.run.sealing, rpc_config, hwbench) .await .map_err(Into::into), @@ -787,7 +787,7 @@ pub fn run() -> Result<()> { #[cfg(feature = "moonriver-native")] spec if spec.is_moonriver() => moonbeam_service::start_node::< moonbeam_service::moonriver_runtime::RuntimeApi, - moonbeam_service::MoonriverExecutor, + moonbeam_service::MoonriverCustomizations, >( config, polkadot_config, @@ -803,7 +803,7 @@ pub fn run() -> Result<()> { #[cfg(feature = "moonbeam-native")] spec if spec.is_moonbeam() => moonbeam_service::start_node::< moonbeam_service::moonbeam_runtime::RuntimeApi, - moonbeam_service::MoonbeamExecutor, + moonbeam_service::MoonbeamCustomizations, >( config, polkadot_config, @@ -819,7 +819,7 @@ pub fn run() -> Result<()> { #[cfg(feature = "moonbase-native")] _ => moonbeam_service::start_node::< moonbeam_service::moonbase_runtime::RuntimeApi, - moonbeam_service::MoonbaseExecutor, + moonbeam_service::MoonbaseCustomizations, >( config, polkadot_config, diff --git a/node/service/src/client.rs b/node/service/src/client.rs index d78884f734..bb6d634c97 100644 --- a/node/service/src/client.rs +++ b/node/service/src/client.rs @@ -147,42 +147,30 @@ pub trait ClientHandle { #[derive(Clone)] pub enum Client { #[cfg(feature = "moonbeam-native")] - Moonbeam(Arc>), + Moonbeam(Arc>), #[cfg(feature = "moonriver-native")] - Moonriver(Arc>), + Moonriver(Arc>), #[cfg(feature = "moonbase-native")] - Moonbase(Arc>), + Moonbase(Arc>), } #[cfg(feature = "moonbeam-native")] -impl From>> - for Client -{ - fn from( - client: Arc>, - ) -> Self { +impl From>> for Client { + fn from(client: Arc>) -> Self { Self::Moonbeam(client) } } #[cfg(feature = "moonriver-native")] -impl From>> - for Client -{ - fn from( - client: Arc>, - ) -> Self { +impl From>> for Client { + fn from(client: Arc>) -> Self { Self::Moonriver(client) } } #[cfg(feature = "moonbase-native")] -impl From>> - for Client -{ - fn from( - client: Arc>, - ) -> Self { +impl From>> for Client { + fn from(client: Arc>) -> Self { Self::Moonbase(client) } } diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index 30ac0e2236..f1a358f653 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -58,9 +58,7 @@ use sc_client_api::{ ExecutorProvider, }; use sc_consensus::ImportQueue; -use sc_executor::{ - HeapAllocStrategy, NativeElseWasmExecutor, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY, -}; +use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY}; use sc_network::{config::FullNetworkConfiguration, NetworkBlock}; use sc_service::config::PrometheusConfig; use sc_service::{ @@ -83,30 +81,23 @@ pub use client::*; pub mod chain_spec; mod client; -type FullClient = - TFullClient>; +type FullClient = TFullClient>; type FullBackend = TFullBackend; type MaybeSelectChain = Option>; -type FrontierBlockImport = TFrontierBlockImport< - Block, - Arc>, - FullClient, ->; -type ParachainBlockImport = - TParachainBlockImport, FullBackend>; -type PartialComponentsResult = Result< +type FrontierBlockImport = + TFrontierBlockImport>, FullClient>; +type ParachainBlockImport = + TParachainBlockImport, FullBackend>; +type PartialComponentsResult = Result< PartialComponents< - FullClient, + FullClient, FullBackend, MaybeSelectChain, sc_consensus::DefaultImportQueue, - sc_transaction_pool::FullPool>, + sc_transaction_pool::FullPool>, ( - BlockImportPipeline< - FrontierBlockImport, - ParachainBlockImport, - >, + BlockImportPipeline, ParachainBlockImport>, Option, Option, Option, @@ -117,8 +108,15 @@ type PartialComponentsResult = Result< ServiceError, >; +#[cfg(feature = "runtime-benchmarks")] pub type HostFunctions = ( frame_benchmarking::benchmarking::HostFunctions, + sp_io::SubstrateHostFunctions, + moonbeam_primitives_ext::moonbeam_ext::HostFunctions, +); +#[cfg(not(feature = "runtime-benchmarks"))] +pub type HostFunctions = ( + sp_io::SubstrateHostFunctions, moonbeam_primitives_ext::moonbeam_ext::HostFunctions, ); @@ -136,7 +134,7 @@ pub enum BlockImportPipeline { /// of network. /// For the moment, this feature is only used to specify the first block compatible with /// ed25519-zebra, but it could be used for other things in the future. -pub trait ExecutorT: sc_executor::NativeExecutionDispatch { +pub trait RuntimeCustomizations { /// The host function ed25519_verify has changed its behavior in the substrate history, /// because of the change from lib ed25519-dalek to lib ed25519-zebra. /// Some networks may have old blocks that are not compatible with ed25519-zebra, @@ -149,69 +147,27 @@ pub trait ExecutorT: sc_executor::NativeExecutionDispatch { } #[cfg(feature = "moonbeam-native")] -pub struct MoonbeamExecutor; - -#[cfg(feature = "moonbeam-native")] -impl sc_executor::NativeExecutionDispatch for MoonbeamExecutor { - type ExtendHostFunctions = HostFunctions; - - fn dispatch(method: &str, data: &[u8]) -> Option> { - moonbeam_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - moonbeam_runtime::native_version() - } -} - +pub struct MoonbeamCustomizations; #[cfg(feature = "moonbeam-native")] -impl ExecutorT for MoonbeamExecutor { +impl RuntimeCustomizations for MoonbeamCustomizations { fn first_block_number_compatible_with_ed25519_zebra() -> Option { Some(2_000_000) } } #[cfg(feature = "moonriver-native")] -pub struct MoonriverExecutor; - -#[cfg(feature = "moonriver-native")] -impl sc_executor::NativeExecutionDispatch for MoonriverExecutor { - type ExtendHostFunctions = HostFunctions; - - fn dispatch(method: &str, data: &[u8]) -> Option> { - moonriver_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - moonriver_runtime::native_version() - } -} - +pub struct MoonriverCustomizations; #[cfg(feature = "moonriver-native")] -impl ExecutorT for MoonriverExecutor { +impl RuntimeCustomizations for MoonriverCustomizations { fn first_block_number_compatible_with_ed25519_zebra() -> Option { Some(3_000_000) } } #[cfg(feature = "moonbase-native")] -pub struct MoonbaseExecutor; - -#[cfg(feature = "moonbase-native")] -impl sc_executor::NativeExecutionDispatch for MoonbaseExecutor { - type ExtendHostFunctions = HostFunctions; - - fn dispatch(method: &str, data: &[u8]) -> Option> { - moonbase_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - moonbase_runtime::native_version() - } -} - +pub struct MoonbaseCustomizations; #[cfg(feature = "moonbase-native")] -impl ExecutorT for MoonbaseExecutor { +impl RuntimeCustomizations for MoonbaseCustomizations { fn first_block_number_compatible_with_ed25519_zebra() -> Option { Some(3_000_000) } @@ -381,16 +337,15 @@ pub fn new_chain_ops( #[cfg(feature = "moonriver-native")] spec if spec.is_moonriver() => new_chain_ops_inner::< moonriver_runtime::RuntimeApi, - MoonriverExecutor, + MoonriverCustomizations, >(config, rpc_config), #[cfg(feature = "moonbeam-native")] - spec if spec.is_moonbeam() => { - new_chain_ops_inner::( - config, rpc_config, - ) - } + spec if spec.is_moonbeam() => new_chain_ops_inner::< + moonbeam_runtime::RuntimeApi, + MoonbeamCustomizations, + >(config, rpc_config), #[cfg(feature = "moonbase-native")] - _ => new_chain_ops_inner::( + _ => new_chain_ops_inner::( config, rpc_config, ), #[cfg(not(feature = "moonbase-native"))] @@ -399,7 +354,7 @@ pub fn new_chain_ops( } #[allow(clippy::type_complexity)] -fn new_chain_ops_inner( +fn new_chain_ops_inner( config: &mut Configuration, rpc_config: &RpcConfig, ) -> Result< @@ -412,11 +367,10 @@ fn new_chain_ops_inner( ServiceError, > where - Client: From>>, - RuntimeApi: - ConstructRuntimeApi> + Send + Sync + 'static, + Client: From>>, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - Executor: ExecutorT + 'static, + Customizations: RuntimeCustomizations + 'static, { config.keystore = sc_service::config::KeystoreConfig::InMemory; let PartialComponents { @@ -425,7 +379,7 @@ where import_queue, task_manager, .. - } = new_partial::(config, rpc_config, config.chain_spec.is_dev())?; + } = new_partial::(config, rpc_config, config.chain_spec.is_dev())?; Ok(( Arc::new(Client::from(client)), backend, @@ -460,16 +414,15 @@ fn set_prometheus_registry( /// Use this function if you don't actually need the full service, but just the partial in order to /// be able to perform chain operations. #[allow(clippy::type_complexity)] -pub fn new_partial( +pub fn new_partial( config: &mut Configuration, rpc_config: &RpcConfig, dev_service: bool, -) -> PartialComponentsResult +) -> PartialComponentsResult where - RuntimeApi: - ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - Executor: ExecutorT + 'static, + Customizations: RuntimeCustomizations + 'static, { set_prometheus_registry(config, rpc_config.no_prometheus_prefix)?; @@ -504,9 +457,7 @@ where wasm_builder = wasm_builder.with_wasmtime_precompiled_path(wasmtime_precompiled_path); } - let wasm_executor = wasm_builder.build(); - - let executor = NativeElseWasmExecutor::::new_with_wasm_executor(wasm_executor); + let executor = wasm_builder.build(); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::( @@ -515,7 +466,7 @@ where executor, )?; - if let Some(block_number) = Executor::first_block_number_compatible_with_ed25519_zebra() { + if let Some(block_number) = Customizations::first_block_number_compatible_with_ed25519_zebra() { client .execution_extensions() .set_extensions_factory(sc_client_api::execution_extensions::ExtensionBeforeBlock::< @@ -638,7 +589,7 @@ async fn build_relay_chain_interface( /// /// This is the actual implementation that is abstract over the executor and the runtime api. #[sc_tracing::logging::prefix_logs_with("🌗")] -async fn start_node_impl( +async fn start_node_impl( parachain_config: Configuration, polkadot_config: Configuration, collator_options: CollatorOptions, @@ -646,16 +597,16 @@ async fn start_node_impl( rpc_config: RpcConfig, async_backing: bool, hwbench: Option, -) -> sc_service::error::Result<(TaskManager, Arc>)> +) -> sc_service::error::Result<(TaskManager, Arc>)> where - RuntimeApi: - ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - Executor: ExecutorT + 'static, + Customizations: RuntimeCustomizations + 'static, { let mut parachain_config = prepare_node_config(parachain_config); - let params = new_partial(&mut parachain_config, &rpc_config, false)?; + let params = + new_partial::(&mut parachain_config, &rpc_config, false)?; let ( block_import, filter_pool, @@ -914,7 +865,7 @@ where }; if collator { - start_consensus::( + start_consensus::( async_backing, backend.clone(), client.clone(), @@ -976,16 +927,16 @@ where Ok((task_manager, client)) } -fn start_consensus( +fn start_consensus( async_backing: bool, backend: Arc, - client: Arc>, - block_import: ParachainBlockImport, + client: Arc>, + block_import: ParachainBlockImport, prometheus_registry: Option<&Registry>, telemetry: Option, task_manager: &TaskManager, relay_chain_interface: Arc, - transaction_pool: Arc>>, + transaction_pool: Arc>>, keystore: KeystorePtr, para_id: ParaId, collator_key: CollatorPair, @@ -996,12 +947,10 @@ fn start_consensus( sync_oracle: SO, ) -> Result<(), sc_service::Error> where - RuntimeApi: - ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, sc_client_api::StateBackendFor, Block>: sc_client_api::StateBackend, - Executor: sc_executor::NativeExecutionDispatch + 'static, SO: SyncOracle + Send + Sync + Clone + 'static, { let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( @@ -1035,7 +984,7 @@ where let keystore_clone = keystore.clone(); let maybe_provide_vrf_digest = move |nimbus_id: NimbusId, parent: Hash| -> Option { - moonbeam_vrf::vrf_pre_digest::>( + moonbeam_vrf::vrf_pre_digest::>( &client_clone, &keystore_clone, nimbus_id, @@ -1127,7 +1076,7 @@ where /// Start a normal parachain node. // Rustfmt wants to format the closure with space identation. #[rustfmt::skip] -pub async fn start_node( +pub async fn start_node( parachain_config: Configuration, polkadot_config: Configuration, collator_options: CollatorOptions, @@ -1135,15 +1084,15 @@ pub async fn start_node( rpc_config: RpcConfig, async_backing: bool, hwbench: Option, -) -> sc_service::error::Result<(TaskManager, Arc>)> +) -> sc_service::error::Result<(TaskManager, Arc>)> where RuntimeApi: - ConstructRuntimeApi> + Send + Sync + 'static, + ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - Executor: ExecutorT + 'static, + Customizations: RuntimeCustomizations + 'static, { - start_node_impl( + start_node_impl::( parachain_config, polkadot_config, collator_options, @@ -1157,7 +1106,7 @@ where /// Builds a new development service. This service uses manual seal, and mocks /// the parachain inherent. -pub async fn new_dev( +pub async fn new_dev( mut config: Configuration, _author_id: Option, sealing: moonbeam_cli_opt::Sealing, @@ -1165,10 +1114,9 @@ pub async fn new_dev( hwbench: Option, ) -> Result where - RuntimeApi: - ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - Executor: ExecutorT + 'static, + Customizations: RuntimeCustomizations + 'static, { use async_io::Timer; use futures::Stream; @@ -1191,7 +1139,7 @@ where frontier_backend, fee_history_cache, ), - } = new_partial::(&mut config, &rpc_config, true)?; + } = new_partial::(&mut config, &rpc_config, true)?; let block_import = if let BlockImportPipeline::Dev(block_import) = block_import_pipeline { block_import @@ -1312,7 +1260,7 @@ where let keystore_clone = keystore_container.keystore().clone(); let maybe_provide_vrf_digest = move |nimbus_id: NimbusId, parent: Hash| -> Option { - moonbeam_vrf::vrf_pre_digest::>( + moonbeam_vrf::vrf_pre_digest::>( &client_clone, &keystore_clone, nimbus_id, @@ -1798,34 +1746,29 @@ mod tests { } } -struct PendingConsensusDataProvider +struct PendingConsensusDataProvider where RuntimeApi: Send + Sync, - Executor: ExecutorT + 'static, { - client: Arc>, + client: Arc>, keystore: Arc, } -impl PendingConsensusDataProvider +impl PendingConsensusDataProvider where - RuntimeApi: - ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - Executor: ExecutorT + 'static, { - pub fn new(client: Arc>, keystore: Arc) -> Self { + pub fn new(client: Arc>, keystore: Arc) -> Self { Self { client, keystore } } } -impl fc_rpc::pending::ConsensusDataProvider - for PendingConsensusDataProvider +impl fc_rpc::pending::ConsensusDataProvider + for PendingConsensusDataProvider where - RuntimeApi: - ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - Executor: ExecutorT + 'static, { fn create_digest( &self, From b60e8f1b51baf2ab2c76ae3986f2bb0d914f38e2 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 12 Mar 2024 19:04:10 +0000 Subject: [PATCH 26/80] rename trait --- node/service/src/lib.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index f1a358f653..59c01794d3 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -134,7 +134,7 @@ pub enum BlockImportPipeline { /// of network. /// For the moment, this feature is only used to specify the first block compatible with /// ed25519-zebra, but it could be used for other things in the future. -pub trait RuntimeCustomizations { +pub trait ClientCustomizations { /// The host function ed25519_verify has changed its behavior in the substrate history, /// because of the change from lib ed25519-dalek to lib ed25519-zebra. /// Some networks may have old blocks that are not compatible with ed25519-zebra, @@ -149,7 +149,7 @@ pub trait RuntimeCustomizations { #[cfg(feature = "moonbeam-native")] pub struct MoonbeamCustomizations; #[cfg(feature = "moonbeam-native")] -impl RuntimeCustomizations for MoonbeamCustomizations { +impl ClientCustomizations for MoonbeamCustomizations { fn first_block_number_compatible_with_ed25519_zebra() -> Option { Some(2_000_000) } @@ -158,7 +158,7 @@ impl RuntimeCustomizations for MoonbeamCustomizations { #[cfg(feature = "moonriver-native")] pub struct MoonriverCustomizations; #[cfg(feature = "moonriver-native")] -impl RuntimeCustomizations for MoonriverCustomizations { +impl ClientCustomizations for MoonriverCustomizations { fn first_block_number_compatible_with_ed25519_zebra() -> Option { Some(3_000_000) } @@ -167,7 +167,7 @@ impl RuntimeCustomizations for MoonriverCustomizations { #[cfg(feature = "moonbase-native")] pub struct MoonbaseCustomizations; #[cfg(feature = "moonbase-native")] -impl RuntimeCustomizations for MoonbaseCustomizations { +impl ClientCustomizations for MoonbaseCustomizations { fn first_block_number_compatible_with_ed25519_zebra() -> Option { Some(3_000_000) } @@ -370,7 +370,7 @@ where Client: From>>, RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - Customizations: RuntimeCustomizations + 'static, + Customizations: ClientCustomizations + 'static, { config.keystore = sc_service::config::KeystoreConfig::InMemory; let PartialComponents { @@ -422,7 +422,7 @@ pub fn new_partial( where RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - Customizations: RuntimeCustomizations + 'static, + Customizations: ClientCustomizations + 'static, { set_prometheus_registry(config, rpc_config.no_prometheus_prefix)?; @@ -601,7 +601,7 @@ async fn start_node_impl( where RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - Customizations: RuntimeCustomizations + 'static, + Customizations: ClientCustomizations + 'static, { let mut parachain_config = prepare_node_config(parachain_config); @@ -1090,7 +1090,7 @@ where ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - Customizations: RuntimeCustomizations + 'static, + Customizations: ClientCustomizations + 'static, { start_node_impl::( parachain_config, @@ -1116,7 +1116,7 @@ pub async fn new_dev( where RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - Customizations: RuntimeCustomizations + 'static, + Customizations: ClientCustomizations + 'static, { use async_io::Timer; use futures::Stream; From 7e56168df70979571ee9b80286d5fb1bef9fef58 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 12 Mar 2024 19:12:40 +0000 Subject: [PATCH 27/80] fix benchmarks --- node/cli/src/command.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node/cli/src/command.rs b/node/cli/src/command.rs index efb5e854ac..d1cf4395c5 100644 --- a/node/cli/src/command.rs +++ b/node/cli/src/command.rs @@ -579,7 +579,7 @@ pub fn run() -> Result<()> { return runner.sync_run(|mut config| { let params = moonbeam_service::new_partial::< moonbeam_service::moonriver_runtime::RuntimeApi, - moonbeam_service::MoonriverExecutor, + moonbeam_service::MoonriverCustomizations, >(&mut config, &rpc_config, false)?; let db = params.backend.expose_db(); @@ -593,7 +593,7 @@ pub fn run() -> Result<()> { return runner.sync_run(|mut config| { let params = moonbeam_service::new_partial::< moonbeam_service::moonbeam_runtime::RuntimeApi, - moonbeam_service::MoonbeamExecutor, + moonbeam_service::MoonbeamCustomizations, >(&mut config, &rpc_config, false)?; let db = params.backend.expose_db(); @@ -607,7 +607,7 @@ pub fn run() -> Result<()> { return runner.sync_run(|mut config| { let params = moonbeam_service::new_partial::< moonbeam_service::moonbase_runtime::RuntimeApi, - moonbeam_service::MoonbaseExecutor, + moonbeam_service::MoonbaseCustomizations, >(&mut config, &rpc_config, false)?; let db = params.backend.expose_db(); From de96dabb5f053405a8f5c71b76af0abdad4e562f Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 12 Mar 2024 22:13:19 +0000 Subject: [PATCH 28/80] attempt to fix tracing-tests --- test/suites/tracing-tests/test-trace-erc20-xcm.ts | 3 +++ test/suites/tracing-tests/test-trace-ethereum-xcm-1.ts | 3 +++ test/suites/tracing-tests/test-trace-ethereum-xcm-2.ts | 3 +++ test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts | 4 ++++ 4 files changed, 13 insertions(+) diff --git a/test/suites/tracing-tests/test-trace-erc20-xcm.ts b/test/suites/tracing-tests/test-trace-erc20-xcm.ts index 777baca63e..0db4b8e702 100644 --- a/test/suites/tracing-tests/test-trace-erc20-xcm.ts +++ b/test/suites/tracing-tests/test-trace-erc20-xcm.ts @@ -112,6 +112,9 @@ describeSuite({ payload: xcmMessage, }); + // Create next block + await context.createBlock(); + transactionHash = (await context.viem().getBlock()).transactions[0]; // Erc20 tokens should have been received diff --git a/test/suites/tracing-tests/test-trace-ethereum-xcm-1.ts b/test/suites/tracing-tests/test-trace-ethereum-xcm-1.ts index 300c85cad9..7aa0341d59 100644 --- a/test/suites/tracing-tests/test-trace-ethereum-xcm-1.ts +++ b/test/suites/tracing-tests/test-trace-ethereum-xcm-1.ts @@ -121,6 +121,9 @@ describeSuite({ payload: xcmMessage, } as RawXcmMessage); + // Create next block + await context.createBlock(); + // Retrieve the stored ethereum transaction hash transactionHashes.push( (await context.viem().getBlock({ blockTag: "latest" })).transactions[0] diff --git a/test/suites/tracing-tests/test-trace-ethereum-xcm-2.ts b/test/suites/tracing-tests/test-trace-ethereum-xcm-2.ts index 7073a8f1e9..a1fd0e3bba 100644 --- a/test/suites/tracing-tests/test-trace-ethereum-xcm-2.ts +++ b/test/suites/tracing-tests/test-trace-ethereum-xcm-2.ts @@ -102,6 +102,9 @@ describeSuite({ payload: xcmMessage, } as RawXcmMessage); + // Create a new block to include the xcm message + await context.createBlock(); + // By calling deployContract() a new block will be created, // including the ethereum xcm call + regular ethereum transaction const { contractAddress: eventEmitterAddress } = await context.deployContract!( diff --git a/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts b/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts index 0bf0eebf63..d5c58a08b1 100644 --- a/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts +++ b/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts @@ -112,6 +112,10 @@ describeSuite({ payload: xcmMessage, } as RawXcmMessage); } + + // Create block which includes xcm message + await context.createBlock(); + // Create next block await context.createBlock(); const txHashes = (await context.viem().getBlock({ blockTag: "latest" })).transactions; From d8e66f4ed1d48381e5b22c3235e22f6d986bb8e0 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Wed, 13 Mar 2024 10:45:18 +0000 Subject: [PATCH 29/80] revert change --- runtime/moonbase/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/moonbase/src/lib.rs b/runtime/moonbase/src/lib.rs index 7978b49118..dc9c65265a 100644 --- a/runtime/moonbase/src/lib.rs +++ b/runtime/moonbase/src/lib.rs @@ -1370,7 +1370,7 @@ construct_runtime! { Treasury: pallet_treasury::{Pallet, Storage, Config, Event, Call} = 17, AuthorInherent: pallet_author_inherent::{Pallet, Call, Storage, Inherent} = 18, AuthorFilter: pallet_author_slot_filter::{Pallet, Call, Storage, Event, Config} = 19, - CrowdloanRewards: pallet_crowdloan_rewards::{Pallet, Call, Config, Event} = 20, + CrowdloanRewards: pallet_crowdloan_rewards::{Pallet, Call, Config, Storage, Event} = 20, AuthorMapping: pallet_author_mapping::{Pallet, Call, Config, Storage, Event} = 21, Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 22, MaintenanceMode: pallet_maintenance_mode::{Pallet, Call, Config, Storage, Event} = 23, From 2e5a24e66584221d5f99ba33f5755c960b40f580 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Wed, 13 Mar 2024 12:25:04 +0000 Subject: [PATCH 30/80] set delayed_best_block to true in ParachainBlockImport --- node/service/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index 59c01794d3..2159bf4228 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -524,8 +524,10 @@ where BlockImportPipeline::Dev(frontier_block_import), ) } else { - let parachain_block_import = - ParachainBlockImport::new(frontier_block_import, backend.clone()); + let parachain_block_import = ParachainBlockImport::new_with_delayed_best_block( + frontier_block_import, + backend.clone(), + ); ( nimbus_consensus::import_queue( client.clone(), From ec2dbdaad4a1cbcec1dcc5b5eba8386a046a2b43 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 14 Mar 2024 16:45:12 +0000 Subject: [PATCH 31/80] initialize block inside tracing method in the runtime api --- client/rpc/debug/src/lib.rs | 112 +++++++++++++++++++++----------- client/rpc/trace/src/lib.rs | 33 ++++++++-- primitives/rpc/debug/src/lib.rs | 16 ++++- runtime/common/src/apis.rs | 10 +++ 4 files changed, 128 insertions(+), 43 deletions(-) diff --git a/client/rpc/debug/src/lib.rs b/client/rpc/debug/src/lib.rs index 46d852a2f2..ef92c2ffc9 100644 --- a/client/rpc/debug/src/lib.rs +++ b/client/rpc/debug/src/lib.rs @@ -362,13 +362,35 @@ where .map_err(|e| internal_err(format!("Fail to read blockchain db: {:?}", e)))? .unwrap_or_default(); + // Get DebugRuntimeApi version + let trace_api_version = if let Ok(Some(api_version)) = + api.api_version::>(parent_block_hash) + { + api_version + } else { + return Err(internal_err( + "Runtime api version call failed (trace)".to_string(), + )); + }; + // Trace the block. let f = || -> RpcResult<_> { - api.initialize_block(parent_block_hash, &header) - .map_err(|e| internal_err(format!("Runtime api access error: {:?}", e)))?; + let result = if trace_api_version >= 5 { + // The block is initialized inside "trace_block" + api.trace_block(parent_block_hash, exts, eth_tx_hashes, &header) + } else { + // Pre pallet-message-queue + + // Initialize block: calls the "on_initialize" hook on every pallet + // in AllPalletsWithSystem + api.initialize_block(parent_block_hash, &header) + .map_err(|e| internal_err(format!("Runtime api access error: {:?}", e)))?; + + #[allow(deprecated)] + api.trace_block_before_version_5(parent_block_hash, exts, eth_tx_hashes) + }; - let _result = api - .trace_block(parent_block_hash, exts, eth_tx_hashes) + result .map_err(|e| { internal_err(format!( "Blockchain error when replaying block {} : {:?}", @@ -381,6 +403,7 @@ where reference_id, e )) })?; + Ok(moonbeam_rpc_primitives_debug::Response::Block) }; @@ -502,42 +525,55 @@ where let transactions = block.transactions; if let Some(transaction) = transactions.get(index) { let f = || -> RpcResult<_> { - api.initialize_block(parent_block_hash, &header) - .map_err(|e| internal_err(format!("Runtime api access error: {:?}", e)))?; - - if trace_api_version >= 4 { - let _result = api - .trace_transaction(parent_block_hash, exts, &transaction) - .map_err(|e| { - internal_err(format!( - "Runtime api access error (version {:?}): {:?}", - trace_api_version, e - )) - })? - .map_err(|e| internal_err(format!("DispatchError: {:?}", e)))?; + let result = if trace_api_version >= 5 { + // The block is initialized inside "trace_transaction" + api.trace_transaction(parent_block_hash, exts, &transaction, &header) } else { - // Pre-london update, legacy transactions. - let _result = match transaction { - ethereum::TransactionV2::Legacy(tx) => - { - #[allow(deprecated)] - api.trace_transaction_before_version_4(parent_block_hash, exts, &tx) - .map_err(|e| { - internal_err(format!( - "Runtime api access error (legacy): {:?}", - e - )) - })? - .map_err(|e| internal_err(format!("DispatchError: {:?}", e)))? - } - _ => { - return Err(internal_err( - "Bug: pre-london runtime expects legacy transactions" - .to_string(), - )) + // Initialize block: calls the "on_initialize" hook on every pallet + // in AllPalletsWithSystem + api.initialize_block(parent_block_hash, &header) + .map_err(|e| { + internal_err(format!("Runtime api access error: {:?}", e)) + })?; + + if trace_api_version == 4 { + // Pre pallet-message-queue + #[allow(deprecated)] + api.trace_transaction_before_version_5( + parent_block_hash, + exts, + &transaction, + ) + } else { + // Pre-london update, legacy transactions. + match transaction { + ethereum::TransactionV2::Legacy(tx) => + { + #[allow(deprecated)] + api.trace_transaction_before_version_4( + parent_block_hash, + exts, + &tx, + ) + } + _ => { + return Err(internal_err( + "Bug: pre-london runtime expects legacy transactions" + .to_string(), + )) + } } - }; - } + } + }; + + result + .map_err(|e| { + internal_err(format!( + "Runtime api access error (version {:?}): {:?}", + trace_api_version, e + )) + })? + .map_err(|e| internal_err(format!("DispatchError: {:?}", e)))?; Ok(moonbeam_rpc_primitives_debug::Response::Single) }; diff --git a/client/rpc/trace/src/lib.rs b/client/rpc/trace/src/lib.rs index 3cade6fd6f..ff92574ce4 100644 --- a/client/rpc/trace/src/lib.rs +++ b/client/rpc/trace/src/lib.rs @@ -846,13 +846,37 @@ where })? .ok_or_else(|| format!("Could not find block {} when fetching extrinsics.", height))?; + // Get DebugRuntimeApi version + let trace_api_version = if let Ok(Some(api_version)) = + api.api_version::>(substrate_parent_hash) + { + api_version + } else { + return Err(format!("Runtime api version call failed (trace)")); + }; + // Trace the block. let f = || -> Result<_, String> { - api.initialize_block(substrate_parent_hash, &block_header) - .map_err(|e| format!("Runtime api access error: {:?}", e))?; + let result = if trace_api_version >= 5 { + api.trace_block( + substrate_parent_hash, + extrinsics, + eth_tx_hashes, + &block_header, + ) + } else { + // Pre pallet-message-queue - let _result = api - .trace_block(substrate_parent_hash, extrinsics, eth_tx_hashes) + // Initialize block: calls the "on_initialize" hook on every pallet + // in AllPalletsWithSystem + api.initialize_block(substrate_parent_hash, &block_header) + .map_err(|e| format!("Runtime api access error: {:?}", e))?; + + #[allow(deprecated)] + api.trace_block_before_version_5(substrate_parent_hash, extrinsics, eth_tx_hashes) + }; + + result .map_err(|e| format!("Blockchain error when replaying block {} : {:?}", height, e))? .map_err(|e| { tracing::warn!( @@ -865,6 +889,7 @@ where height, e ) })?; + Ok(moonbeam_rpc_primitives_debug::Response::Block) }; diff --git a/primitives/rpc/debug/src/lib.rs b/primitives/rpc/debug/src/lib.rs index 5e019ea431..c5280eba3d 100644 --- a/primitives/rpc/debug/src/lib.rs +++ b/primitives/rpc/debug/src/lib.rs @@ -30,8 +30,14 @@ sp_api::decl_runtime_apis! { // In order to be able to use ApiExt as part of the RPC handler logic we need to be always // above the version that exists on chain for this Api, even if this Api is only meant // to be used overridden. - #[api_version(4)] + #[api_version(5)] pub trait DebugRuntimeApi { + #[changed_in(5)] + fn trace_transaction( + extrinsics: Vec, + transaction: &Transaction, + ) -> Result<(), sp_runtime::DispatchError>; + #[changed_in(4)] fn trace_transaction( extrinsics: Vec, @@ -41,11 +47,19 @@ sp_api::decl_runtime_apis! { fn trace_transaction( extrinsics: Vec, transaction: &Transaction, + header: &Block::Header, + ) -> Result<(), sp_runtime::DispatchError>; + + #[changed_in(5)] + fn trace_block( + extrinsics: Vec, + known_transactions: Vec, ) -> Result<(), sp_runtime::DispatchError>; fn trace_block( extrinsics: Vec, known_transactions: Vec, + header: &Block::Header, ) -> Result<(), sp_runtime::DispatchError>; } } diff --git a/runtime/common/src/apis.rs b/runtime/common/src/apis.rs index 9b2af4c61a..c72d31267d 100644 --- a/runtime/common/src/apis.rs +++ b/runtime/common/src/apis.rs @@ -109,6 +109,7 @@ macro_rules! impl_runtime_apis_plus_common { fn trace_transaction( extrinsics: Vec<::Extrinsic>, traced_transaction: &EthereumTransaction, + header: &::Header, ) -> Result< (), sp_runtime::DispatchError, @@ -128,6 +129,10 @@ macro_rules! impl_runtime_apis_plus_common { &EthereumXcmTracingStatus::Transaction(traced_transaction.hash()), ); + // Initialize block: calls the "on_initialize" hook on every pallet + // in AllPalletsWithSystem + Executive::initialize_block(header); + // Apply the a subset of extrinsics: all the substrate-specific or ethereum // transactions that preceded the requested transaction. for ext in extrinsics.into_iter() { @@ -161,6 +166,7 @@ macro_rules! impl_runtime_apis_plus_common { fn trace_block( extrinsics: Vec<::Extrinsic>, known_transactions: Vec, + header: &::Header, ) -> Result< (), sp_runtime::DispatchError, @@ -179,6 +185,10 @@ macro_rules! impl_runtime_apis_plus_common { let mut config = ::config().clone(); config.estimate = true; + // Initialize block: calls the "on_initialize" hook on every pallet + // in AllPalletsWithSystem + Executive::initialize_block(header); + // Apply all extrinsics. Ethereum extrinsics are traced. for ext in extrinsics.into_iter() { match &ext.0.function { From 4901b7e78aa783c808175b7f2e4007bc600e93b0 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 14 Mar 2024 16:54:33 +0000 Subject: [PATCH 32/80] fix formatting in typescript tests --- .../test-xcmv3-new-instructions.ts | 75 ++++++++++++------- .../test-trace-ethereum-xcm-3.ts | 2 +- 2 files changed, 51 insertions(+), 26 deletions(-) diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts index cc16038fea..084cc80887 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts @@ -34,9 +34,7 @@ describeSuite({ .index.toNumber(); // Send some native tokens to the sovereign account of paraId (to pay fees) - await api - .tx.balances.transferAllowDeath(paraSovereign, parseEther("1")) - .signAndSend(alith); + await api.tx.balances.transferAllowDeath(paraSovereign, parseEther("1")).signAndSend(alith); await context.createBlock(); amount = 1_000_000_000_000_000n; @@ -71,7 +69,7 @@ describeSuite({ type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - + // Include hrmp message await context.createBlock(); // Process the next block @@ -80,7 +78,7 @@ describeSuite({ // Search for Success const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) - .map(e => e.event.data.toHuman() as { success: boolean }) + .map((e) => e.event.data.toHuman() as { success: boolean }) .filter(({ success }) => success); expect(events).to.have.lengthOf(1); @@ -111,7 +109,7 @@ describeSuite({ // Search for Success const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) - .map(e => e.event.data.toHuman() as { success: boolean }) + .map((e) => e.event.data.toHuman() as { success: boolean }) .filter(({ success }) => success); expect(events).to.have.lengthOf(1); @@ -142,7 +140,7 @@ describeSuite({ // Search for Success const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) - .map(e => e.event.data.toHuman() as { success: boolean }) + .map((e) => e.event.data.toHuman() as { success: boolean }) .filter(({ success }) => success); expect(events).to.have.lengthOf(1); @@ -173,7 +171,7 @@ describeSuite({ // Search for Success const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) - .map(e => e.event.data.toHuman() as { success: boolean }) + .map((e) => e.event.data.toHuman() as { success: boolean }) .filter(({ success }) => success); expect(events).to.have.lengthOf(1); @@ -204,7 +202,7 @@ describeSuite({ // Search for Success const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) - .map(e => e.event.data.toHuman() as { success: boolean }) + .map((e) => e.event.data.toHuman() as { success: boolean }) .filter(({ success }) => success); expect(events).to.have.lengthOf(1); @@ -236,7 +234,7 @@ describeSuite({ // Search for Success const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) - .map(e => e.event.data.toHuman() as { success: boolean }) + .map((e) => e.event.data.toHuman() as { success: boolean }) .filter(({ success }) => success); expect(events).to.have.lengthOf(1); @@ -267,11 +265,14 @@ describeSuite({ // Search for failure const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) - .map(e => e.event.data.toHuman() as { success: boolean }) + .map((e) => e.event.data.toHuman() as { success: boolean }) .filter(({ success }) => !success); expect(events).to.have.lengthOf(1); - //expect(events[0].event.data[2].toString()).equals("Transport"); + // pallet-message-queue does not show an error when "success" is false. + // https://github.com/paritytech/polkadot-sdk/issues/478 + // > + // expect(events[0].event.data[2].toString()).equals("Transport"); }, }); @@ -299,10 +300,14 @@ describeSuite({ // Search for failure const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) - .map(e => e.event.data.toHuman() as { success: boolean }) + .map((e) => e.event.data.toHuman() as { success: boolean }) .filter(({ success }) => !success); expect(events).to.have.lengthOf(1); + // pallet-message-queue does not show an error when "success" is false. + // https://github.com/paritytech/polkadot-sdk/issues/478 + // > + // expect(events[0].event.data[2].toString()).equals("ExpectationFalse"); }, }); @@ -330,11 +335,14 @@ describeSuite({ // Search for failure const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) - .map(e => e.event.data.toHuman() as { success: boolean }) + .map((e) => e.event.data.toHuman() as { success: boolean }) .filter(({ success }) => !success); expect(events).to.have.lengthOf(1); - //expect(events[0].event.data[2].toString()).equals("ExpectationFalse"); + // pallet-message-queue does not show an error when "success" is false. + // https://github.com/paritytech/polkadot-sdk/issues/478 + // > + // expect(events[0].event.data[2].toString()).equals("ExpectationFalse"); }, }); @@ -362,11 +370,14 @@ describeSuite({ // Search for failure const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) - .map(e => e.event.data.toHuman() as { success: boolean }) + .map((e) => e.event.data.toHuman() as { success: boolean }) .filter(({ success }) => !success); - + expect(events).to.have.lengthOf(1); - //expect(events[0].event.data[2].toString()).equals("ExpectationFalse"); + // pallet-message-queue does not show an error when "success" is false. + // https://github.com/paritytech/polkadot-sdk/issues/478 + // > + // expect(events[0].event.data[2].toString()).equals("ExpectationFalse"); }, }); @@ -394,11 +405,14 @@ describeSuite({ // Search for failure const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) - .map(e => e.event.data.toHuman() as { success: boolean }) + .map((e) => e.event.data.toHuman() as { success: boolean }) .filter(({ success }) => !success); expect(events).to.have.lengthOf(1); - //expect(events[0].event.data[2].toString()).equals("Transport"); + // pallet-message-queue does not show an error when "success" is false. + // https://github.com/paritytech/polkadot-sdk/issues/478 + // > + // expect(events[0].event.data[2].toString()).equals("Transport"); }, }); @@ -426,10 +440,13 @@ describeSuite({ // Search for failure const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) - .map(e => e.event.data.toHuman() as { success: boolean }) + .map((e) => e.event.data.toHuman() as { success: boolean }) .filter(({ success }) => !success); expect(events).to.have.lengthOf(1); + // pallet-message-queue does not show an error when "success" is false. + // https://github.com/paritytech/polkadot-sdk/issues/478 + // > // expect(events[0].event.data[2].toString()).equals("NameMismatch"); }, }); @@ -458,11 +475,16 @@ describeSuite({ // Search for failure const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) - .map(e => e.event.data.toHuman() as { success: boolean }) + .map((e) => e.event.data.toHuman() as { success: boolean }) .filter(({ success }) => !success); + await new Promise((r) => setTimeout(r, 120000)); + expect(events).to.have.lengthOf(1); - //expect(events[0].event.data[2].toString()).equals("Transport"); + // pallet-message-queue does not show an error when "success" is false. + // https://github.com/paritytech/polkadot-sdk/issues/478 + // > + // expect(events[0].event.data[2].toString()).equals("Transport"); }, }); @@ -490,11 +512,14 @@ describeSuite({ // Search for failure const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) - .map(e => e.event.data.toHuman() as { success: boolean }) + .map((e) => e.event.data.toHuman() as { success: boolean }) .filter(({ success }) => !success); expect(events).to.have.lengthOf(1); - //expect(events[0].event.data[2].toString()).equals("BadOrigin"); + // pallet-message-queue does not show an error when "success" is false. + // https://github.com/paritytech/polkadot-sdk/issues/478 + // > + // expect(events[0].event.data[2].toString()).equals("BadOrigin"); }, }); }, diff --git a/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts b/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts index d5c58a08b1..bb5e20b549 100644 --- a/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts +++ b/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts @@ -113,7 +113,7 @@ describeSuite({ } as RawXcmMessage); } - // Create block which includes xcm message + // Create a new block to include the xcm message await context.createBlock(); // Create next block await context.createBlock(); From fa5cd6324266c3cce5a1fe3b599cb0b285756542 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 14 Mar 2024 18:35:41 +0000 Subject: [PATCH 33/80] try new runtime-overrides --- scripts/build-last-tracing-runtime.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-last-tracing-runtime.sh b/scripts/build-last-tracing-runtime.sh index 105972ca40..bffa38f86e 100755 --- a/scripts/build-last-tracing-runtime.sh +++ b/scripts/build-last-tracing-runtime.sh @@ -7,7 +7,7 @@ echo ${1:-"$LOCAL_GIT_BRANCH"} rm -rf build/{moonbeam-runtime-overrides,wasm} mkdir -p build/wasm -git clone --depth 1 -b master-without-wasm https://github.com/moonbeam-foundation/moonbeam-runtime-overrides build/moonbeam-runtime-overrides +git clone --depth 1 -b rq/debug_api_version_5 https://github.com/moonbeam-foundation/moonbeam-runtime-overrides build/moonbeam-runtime-overrides cd build/moonbeam-runtime-overrides ./scripts/import-tracing-runtime.sh local ${1:-"$LOCAL_GIT_BRANCH"} From 116b47315c1106b38d42f226c6e1830162867000 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 14 Mar 2024 21:34:32 +0000 Subject: [PATCH 34/80] fix some xcm tests tests --- test/helpers/xcm.ts | 8 + .../test-mock-dmp-asset-transfer.ts | 2 + .../test-mock-dmp-error-and-appendix-1.ts | 2 + .../test-mock-dmp-error-and-appendix-2.ts | 2 + .../test-mock-dmp-error-and-appendix-3.ts | 2 + .../test-mock-dmp-error-and-appendix-4.ts | 2 + .../test-mock-dmp-error-and-appendix-5.ts | 2 + .../test-mock-dmp-error-and-appendix-6.ts | 2 + .../test-xcm-v3/test-mock-dmp-queue.ts | 220 +++--------------- .../test-mock-hrmp-transact-ethereum-12.ts | 4 +- .../test-xcm-erc20-fees-and-trap.ts | 23 +- .../test-xcm-v3/test-xcm-erc20-v3-filter.ts | 10 +- .../test-xcmv3-max-weight-instructions.ts | 96 ++++---- .../test-xcmv3-new-instructions.ts | 98 ++------ 14 files changed, 143 insertions(+), 330 deletions(-) diff --git a/test/helpers/xcm.ts b/test/helpers/xcm.ts index f234597884..75946d2096 100644 --- a/test/helpers/xcm.ts +++ b/test/helpers/xcm.ts @@ -213,6 +213,7 @@ export async function injectHrmpMessageAndSeal( await injectHrmpMessage(context, paraId, message); // Create a block in which the XCM will be executed await context.createBlock(); + await context.createBlock(); } interface Junction { @@ -482,6 +483,13 @@ export class XcmFragment { }; } + /// XCM V4 calls + as_v4(): any { + return { + V4: this.instructions, + }; + } + // Add a `BurnAsset` instruction burn_asset(amount: bigint = 0n): this { this.instructions.push({ diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-asset-transfer.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-asset-transfer.ts index d252d4768d..b19c518d77 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-asset-transfer.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-asset-transfer.ts @@ -38,6 +38,8 @@ describeSuite({ // You can provide a message, but if you don't a downward transfer is the default await customDevRpcRequest("xcm_injectDownwardMessage", [[]]); + // Process the next block + await context.createBlock(); // Create a block in which the XCM will be executed await context.createBlock(); diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-1.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-1.ts index eb81415f75..6a0073269b 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-1.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-1.ts @@ -69,6 +69,8 @@ describeSuite({ // Send RPC call to inject XCM message await customDevRpcRequest("xcm_injectDownwardMessage", [totalMessage]); + // Process the next block + await context.createBlock(); // Create a block in which the XCM will be executed await context.createBlock(); // Make sure ALITH did not reveive anything diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-2.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-2.ts index 9193746a82..69a5cb7fa8 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-2.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-2.ts @@ -69,6 +69,8 @@ describeSuite({ // Send RPC call to inject XCM message await customDevRpcRequest("xcm_injectDownwardMessage", [totalMessage]); + // Process the next block + await context.createBlock(); // Create a block in which the XCM will be executed await context.createBlock(); // Make sure the state has ALITH's to DOT tokens diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-3.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-3.ts index 4fc56f6cc6..6560f9d506 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-3.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-3.ts @@ -66,6 +66,8 @@ describeSuite({ // Send RPC call to inject XCM message await customDevRpcRequest("xcm_injectDownwardMessage", [totalMessage]); + // Process the next block + await context.createBlock(); // Create a block in which the XCM will be executed await context.createBlock(); // Make sure the state has ALITH's to DOT tokens diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-4.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-4.ts index cc0cbcbe01..dc541b6390 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-4.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-4.ts @@ -69,6 +69,8 @@ describeSuite({ // Send RPC call to inject XCM message await customDevRpcRequest("xcm_injectDownwardMessage", [totalMessage]); + // Process the next block + await context.createBlock(); // Create a block in which the XCM will be executed await context.createBlock(); // Make sure the state has ALITH's to DOT tokens diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-5.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-5.ts index 8266370622..add22b03e0 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-5.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-5.ts @@ -69,6 +69,8 @@ describeSuite({ // Send RPC call to inject XCM message await customDevRpcRequest("xcm_injectDownwardMessage", [totalMessage]); + // Process the next block + await context.createBlock(); // Create a block in which the XCM will be executed await context.createBlock(); // Make sure the state has ALITH's to DOT tokens diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-6.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-6.ts index 3b72912181..0afbce06c2 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-6.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-6.ts @@ -109,6 +109,8 @@ describeSuite({ // Send RPC call to inject XCM message await customDevRpcRequest("xcm_injectDownwardMessage", [totalMessage]); + // Process the next block + await context.createBlock(); // Create a block in which the XCM will be executed await context.createBlock(); // Make sure the state has ALITH's to DOT tokens diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-queue.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-queue.ts index f595a51c25..8c58666b14 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-queue.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-queue.ts @@ -7,215 +7,59 @@ import { XcmFragment, weightMessage } from "../../../../helpers"; describeSuite({ id: "D014008", - title: "Mock XCMP - test XCMP execution", + title: "Test DMP migration (This test should be removed in RT3000", foundationMethods: "dev", testCases: ({ context, it, log }) => { it({ id: "T01", - title: "Should test DMP on_initialization and on_idle", + title: "Should test migration to Message Queue", test: async function () { - const metadata = await context.polkadotJs().rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - - // TODO this test mostly changes it's nature due to proof size accounting - // by now we just decrease the number of supported messages from 50 to 20. - const numMsgs = 20; - // let's target half of then being executed - - // xcmp reserved is BLOCK/4 - const totalDmpWeight = - context.polkadotJs().consts.system.blockWeights.maxBlock.refTime.toBigInt() / 4n; - - // we want half of numParaMsgs to be executed. That give us how much each message weights - const weightPerMessage = (totalDmpWeight * BigInt(2)) / BigInt(numMsgs); - - // Now we need to construct the message. This needs to: - // - pass barrier (withdraw + buyExecution + unlimited buyExecution*n) - // we know at least 2 instructions are needed per message (withdrawAsset + buyExecution) - // how many unlimited buyExecutions do we need to append? - - // we will bias this number. The reason is we want to test the decay, and therefore we need - // an unbalanced number of messages executed. We specifically need that at some point - // we get out of the loop of the execution (we reach the threshold limit), to then - // go on idle - - const config = { - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: balancesPalletIndex }, - }, - }, - fungible: 1_000_000_000_000_000n, - }, - ], - }; - - // How much does the withdraw weight? - const withdrawWeight = await weightMessage( - context, - context - .polkadotJs() - .createType("XcmVersionedXcm", new XcmFragment(config).withdraw_asset().as_v3()) - ); + await context.createBlock(); - // How much does the buyExecution weight? - const buyExecutionWeight = await weightMessage( - context, - context - .polkadotJs() - .createType("XcmVersionedXcm", new XcmFragment(config).buy_execution().as_v3()) + let events = (await context.polkadotJs().query.system.events()).filter(({ event }) => + context.polkadotJs().events.dmpQueue.StartedExport.is(event) ); + expect(events).to.have.lengthOf(1); + + // Create new block + await context.createBlock(); - // How much does the refundSurplus weight? - // We use refund surplus because it has 0 pov - // it's easier to focus on reftime - const refundSurplusWeight = await weightMessage( - context, - context - .polkadotJs() - .createType("XcmVersionedXcm", new XcmFragment(config).refund_surplus().as_v3()) + events = (await context.polkadotJs().query.system.events()).filter(({ event }) => + context.polkadotJs().events.dmpQueue.CompletedExport.is(event) ); + expect(events).to.have.lengthOf(1); - const xcmMessage = new XcmFragment(config).withdraw_asset().buy_execution().as_v3(); - - const receivedMessage: XcmVersionedXcm = context - .polkadotJs() - .createType("XcmVersionedXcm", xcmMessage) as any; - - const totalMessage = [...receivedMessage.toU8a()]; - - // We want these isntructions to fail in BuyExecution. That means - // WithdrawAsset needs to work. The only way for this to work - // is to fund each sovereign account - const sovereignAddress = u8aToHex( - new Uint8Array([...new TextEncoder().encode("Parent")]) - ).padEnd(42, "0"); + // Create new block + await context.createBlock(); - // We first fund the parent sovereign account with 1000 - // we will only withdraw 1, so no problem on this - await context.createBlock( - context.polkadotJs().tx.balances.transferAllowDeath(sovereignAddress, 1n * GLMR), - { allowFailures: false } + events = (await context.polkadotJs().query.system.events()).filter(({ event }) => + context.polkadotJs().events.dmpQueue.StartedOverweightExport.is(event) ); + expect(events).to.have.lengthOf(1); - // now we start injecting messages - // several - for (let i = 0; i < numMsgs; i++) { - await customDevRpcRequest("xcm_injectDownwardMessage", [totalMessage]); - } - + // Create new block await context.createBlock(); - const signedBlock = await context.polkadotJs().rpc.chain.getBlock(); - const apiAt = await context.polkadotJs().at(signedBlock.block.header.hash); - const allRecords = await apiAt.query.system.events(); - - // lets grab at which point the dmp queue was exhausted - const exhaustIndex = allRecords.findIndex(({ event }) => - context.polkadotJs().events.dmpQueue.MaxMessagesExhausted.is(event) + events = (await context.polkadotJs().query.system.events()).filter(({ event }) => + context.polkadotJs().events.dmpQueue.CompletedOverweightExport.is(event) ); + expect(events).to.have.lengthOf(1); - expect( - exhaustIndex, - "Index not found where dmpQueue is exhausted" - ).to.be.greaterThanOrEqual(0); - - // OnInitialization - const eventsExecutedOnInitialization = allRecords.filter( - ({ event }, index) => - context.polkadotJs().events.dmpQueue.ExecutedDownward.is(event) && index < exhaustIndex - ); + // Create new block + await context.createBlock(); - // OnIdle - const eventsExecutedOnIdle = allRecords.filter( - ({ event }, index) => - context.polkadotJs().events.dmpQueue.ExecutedDownward.is(event) && index > exhaustIndex + events = (await context.polkadotJs().query.system.events()).filter(({ event }) => + context.polkadotJs().events.dmpQueue.StartedCleanup.is(event) ); + expect(events).to.have.lengthOf(1); - // the test was designed to go half and half - expect(eventsExecutedOnInitialization.length).to.be.eq(10); - expect(eventsExecutedOnIdle.length).to.be.eq(10); - const pageIndex = await apiAt.query.dmpQueue.pageIndex(); - expect(pageIndex.beginUsed.toBigInt()).to.eq(0n); - expect(pageIndex.endUsed.toBigInt()).to.eq(0n); - - // Repeat the test with different parameters - { - const xcmMessage = new XcmFragment(config) - .withdraw_asset() - .buy_execution(0, 5n) - .refund_surplus() - .as_v3(); - - const receivedMessage: XcmVersionedXcm = context - .polkadotJs() - .createType("XcmVersionedXcm", xcmMessage) as any; - - const totalMessage = [...receivedMessage.toU8a()]; - - // We want these isntructions to fail in BuyExecution. That means - // WithdrawAsset needs to work. The only way for this to work - // is to fund each sovereign account - const sovereignAddress = u8aToHex( - new Uint8Array([...new TextEncoder().encode("Parent")]) - ).padEnd(42, "0"); - - // We first fund the parent sovereign account with 1000 - // we will only withdraw 1, so no problem on this - await context.createBlock( - context.polkadotJs().tx.balances.transferAllowDeath(sovereignAddress, 1n * GLMR), - { allowFailures: false } - ); - - // now we start injecting messages - // several - for (let i = 0; i < numMsgs; i++) { - await customDevRpcRequest("xcm_injectDownwardMessage", [totalMessage]); - } - - await context.createBlock(); - - const signedBlock = await context.polkadotJs().rpc.chain.getBlock(); - const apiAt = await context.polkadotJs().at(signedBlock.block.header.hash); - console.log("signedBlock", signedBlock.block.header.hash.toHex()); - const allRecords = await apiAt.query.system.events(); - - // lets grab at which point the dmp queue was exhausted - const exhaustIndex = allRecords.findIndex(({ event }) => - context.polkadotJs().events.dmpQueue.MaxMessagesExhausted.is(event) - ); - - expect( - exhaustIndex, - "Index not found where dmpQueue is exhausted" - ).to.be.greaterThanOrEqual(0); - - // OnInitialization - const eventsExecutedOnInitialization = allRecords.filter( - ({ event }, index) => - context.polkadotJs().events.dmpQueue.ExecutedDownward.is(event) && - index < exhaustIndex - ); - - // OnIdle - const eventsExecutedOnIdle = allRecords.filter( - ({ event }, index) => - context.polkadotJs().events.dmpQueue.ExecutedDownward.is(event) && - index > exhaustIndex - ); + // Create new block + await context.createBlock(); - // the test was designed to go half and half - expect(eventsExecutedOnInitialization.length).to.be.eq(10); - expect(eventsExecutedOnIdle.length).to.be.eq(10); - const pageIndex = await apiAt.query.dmpQueue.pageIndex(); - expect(pageIndex.beginUsed.toBigInt()).to.eq(0n); - expect(pageIndex.endUsed.toBigInt()).to.eq(0n); - } + events = (await context.polkadotJs().query.system.events()).filter(({ event }) => + context.polkadotJs().events.dmpQueue.Completed.is(event) + ); + expect(events).to.have.lengthOf(1); }, }); }, diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-12.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-12.ts index 43d3fac4f7..b0d2468ada 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-12.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-12.ts @@ -149,9 +149,7 @@ describeSuite({ const weightBlock = await context.polkadotJs().query.system.blockWeight(); // Make sure the system block weight corresponds to gas used and not gas limit // It should be sufficient to verify that we used less than what was marked - expect( - 12_500_000_000n + 25_000_000n - weightBlock.mandatory.refTime.toBigInt() - ).toBeGreaterThan(0n); + expect(targetXcmWeight - weightBlock.mandatory.refTime.toBigInt()).toBeGreaterThan(0n); } }, }); diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-fees-and-trap.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-fees-and-trap.ts index c11887789c..f89efc0161 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-fees-and-trap.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-fees-and-trap.ts @@ -6,7 +6,6 @@ import { expectEVMResult } from "../../../../helpers"; import { XcmFragment, XcmFragmentConfig, - expectXcmEventMessage, injectHrmpMessageAndSeal, sovereignAccountOfSibling, weightMessage, @@ -109,7 +108,16 @@ describeSuite({ payload: xcmMessage, }); - expect(await expectXcmEventMessage(context, "TooExpensive")).toBe(true); + const events = (await polkadotJs.query.system.events()) + .filter(({ event }) => polkadotJs.events.messageQueue.Processed.is(event)) + .map((e) => e.event.data.toHuman() as { success: boolean }) + .filter(({ success }) => !success); + + expect(events).to.have.lengthOf(1); + // pallet-message-queue does not show an error when "success" is false. + // https://github.com/paritytech/polkadot-sdk/issues/478 + // > + // expect(await expectXcmEventMessage(context, "TooExpensive")).toBe(true); // Charleth should not receive ERC20 tokens due to failed execution expect( @@ -323,7 +331,16 @@ describeSuite({ payload: xcmMessageFailedClaim, }); - expect(await expectXcmEventMessage(context, "UnknownClaim")).toBe(true); + const events2 = (await context.polkadotJs().query.system.events()) + .filter(({ event }) => context.polkadotJs().events.messageQueue.Processed.is(event)) + .map((e) => e.event.data.toHuman() as { success: boolean }) + .filter(({ success }) => !success); + + expect(events2).to.have.lengthOf(1); + // pallet-message-queue does not show an error when "success" is false. + // https://github.com/paritytech/polkadot-sdk/issues/478 + // > + // expect(await expectXcmEventMessage(context, "UnknownClaim")).toBe(true); // Check the sovereign account has the same initial amount of ERC20 tokens expect( diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-v3-filter.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-v3-filter.ts index 0c4fb559a4..676b466338 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-v3-filter.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-v3-filter.ts @@ -122,12 +122,10 @@ describeSuite({ }); const allRecords = await polkadotJs.query.system.events(); - const [{ event }] = allRecords.filter( - ({ event: { section, method } }) => - section === "xcmpQueue" && method === "OverweightEnqueued" - ); - const [_paraId, _messageId, _weight, proof] = event.data; - return proof.proofSize.toNumber(); + const [{ weightUsed }] = allRecords + .filter(({ event }) => polkadotJs.events.messageQueue.Processed.is(event)) + .map((e) => e.event.data as unknown as { weightUsed: { proofSize: unknown } }); + return Number(weightUsed.proofSize); }; const limit = 64n; diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-max-weight-instructions.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-max-weight-instructions.ts index 7aed369efe..e8156906ae 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-max-weight-instructions.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-max-weight-instructions.ts @@ -8,8 +8,10 @@ import { injectHrmpMessage, sovereignAccountOfSibling, XcmFragmentConfig, + injectHrmpMessageAndSeal, } from "../../../../helpers/xcm.js"; import { parseEther } from "ethers"; +import { ApiPromise } from "@polkadot/api"; describeSuite({ id: "D014039", @@ -19,19 +21,19 @@ describeSuite({ let dotAsset: XcmFragmentConfig; let amount: bigint; const paraId: number = 888; + let api: ApiPromise; beforeAll(async () => { + api = await context.polkadotJs(); + const paraSovereign = sovereignAccountOfSibling(context, paraId); - const metadata = await context.polkadotJs().rpc.state.getMetadata(); + const metadata = await api.rpc.state.getMetadata(); const balancesPalletIndex = metadata.asLatest.pallets .find(({ name }) => name.toString() === "Balances")! .index.toNumber(); // Send some native tokens to the sovereign account of paraId (to pay fees) - await context - .polkadotJs() - .tx.balances.transferAllowDeath(paraSovereign, parseEther("1")) - .signAndSend(alith); + await api.tx.balances.transferAllowDeath(paraSovereign, parseEther("1")).signAndSend(alith); await context.createBlock(); amount = 1_000_000_000_000_000n; @@ -62,18 +64,18 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - await context.createBlock(); // Search for WeightNotComputable error - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Fail.is(event) - ); + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.ProcessingFailed.is(event)) + .map((e) => e.event.data.toHuman() as { error: string }); + expect(events).to.have.lengthOf(1); - expect(events[0].event.data[2].toString()).equals("WeightNotComputable"); + expect(events[0].error).equals("Unsupported"); }, }); @@ -88,18 +90,18 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - await context.createBlock(); // Search for WeightNotComputable error - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Fail.is(event) - ); + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.ProcessingFailed.is(event)) + .map((e) => e.event.data.toHuman() as { error: string }); + expect(events).to.have.lengthOf(1); - expect(events[0].event.data[2].toString()).equals("WeightNotComputable"); + expect(events[0].error).equals("Unsupported"); }, }); @@ -114,18 +116,18 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - await context.createBlock(); // Search for WeightNotComputable error - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Fail.is(event) - ); + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.ProcessingFailed.is(event)) + .map((e) => e.event.data.toHuman() as { error: string }); + expect(events).to.have.lengthOf(1); - expect(events[0].event.data[2].toString()).equals("WeightNotComputable"); + expect(events[0].error).equals("Unsupported"); }, }); @@ -140,18 +142,18 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - await context.createBlock(); // Search for WeightNotComputable error - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Fail.is(event) - ); + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.ProcessingFailed.is(event)) + .map((e) => e.event.data.toHuman() as { error: string }); + expect(events).to.have.lengthOf(1); - expect(events[0].event.data[2].toString()).equals("WeightNotComputable"); + expect(events[0].error).equals("Unsupported"); }, }); @@ -166,18 +168,18 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - await context.createBlock(); // Search for WeightNotComputable error - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Fail.is(event) - ); + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.ProcessingFailed.is(event)) + .map((e) => e.event.data.toHuman() as { error: string }); + expect(events).to.have.lengthOf(1); - expect(events[0].event.data[2].toString()).equals("WeightNotComputable"); + expect(events[0].error).equals("Unsupported"); }, }); @@ -192,18 +194,18 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - await context.createBlock(); // Search for WeightNotComputable error - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Fail.is(event) - ); + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.ProcessingFailed.is(event)) + .map((e) => e.event.data.toHuman() as { error: string }); + expect(events).to.have.lengthOf(1); - expect(events[0].event.data[2].toString()).equals("WeightNotComputable"); + expect(events[0].error).equals("Unsupported"); }, }); @@ -218,18 +220,18 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - await context.createBlock(); // Search for WeightNotComputable error - const events = (await context.polkadotJs().query.system.events()).filter(({ event }) => - context.polkadotJs().events.xcmpQueue.Fail.is(event) - ); + const events = (await api.query.system.events()) + .filter(({ event }) => api.events.messageQueue.ProcessingFailed.is(event)) + .map((e) => e.event.data.toHuman() as { error: string }); + expect(events).to.have.lengthOf(1); - expect(events[0].event.data[2].toString()).equals("WeightNotComputable"); + expect(events[0].error).equals("Unsupported"); }, }); }, diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts index 084cc80887..58edac87f2 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts @@ -8,6 +8,7 @@ import { injectHrmpMessage, sovereignAccountOfSibling, XcmFragmentConfig, + injectHrmpMessageAndSeal, } from "../../../../helpers/xcm.js"; import { parseEther } from "ethers"; import { ApiPromise } from "@polkadot/api"; @@ -65,16 +66,11 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - // Include hrmp message - await context.createBlock(); - // Process the next block - await context.createBlock(); - // Search for Success const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) @@ -96,16 +92,11 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - // Include hrmp message - await context.createBlock(); - // Process the next block - await context.createBlock(); - // Search for Success const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) @@ -127,16 +118,11 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - // Include hrmp message - await context.createBlock(); - // Process the next block - await context.createBlock(); - // Search for Success const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) @@ -158,16 +144,11 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - // Include hrmp message - await context.createBlock(); - // Process the next block - await context.createBlock(); - // Search for Success const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) @@ -189,16 +170,11 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - // Include hrmp message - await context.createBlock(); - // Process the next block - await context.createBlock(); - // Search for Success const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) @@ -221,16 +197,11 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - // Include hrmp message - await context.createBlock(); - // Process the next block - await context.createBlock(); - // Search for Success const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) @@ -252,15 +223,11 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - // Include hrmp message - await context.createBlock(); - // Process the next block - await context.createBlock(); // Search for failure const events = (await api.query.system.events()) @@ -287,16 +254,11 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - // Include hrmp message - await context.createBlock(); - // Process the next block - await context.createBlock(); - // Search for failure const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) @@ -322,16 +284,11 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - // Include hrmp message - await context.createBlock(); - // Process the next block - await context.createBlock(); - // Search for failure const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) @@ -357,16 +314,11 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - // Include hrmp message - await context.createBlock(); - // Process the next block - await context.createBlock(); - // Search for failure const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) @@ -392,16 +344,11 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - // Include hrmp message - await context.createBlock(); - // Process the next block - await context.createBlock(); - // Search for failure const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) @@ -427,16 +374,11 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - // Include hrmp message - await context.createBlock(); - // Process the next block - await context.createBlock(); - // Search for failure const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) @@ -462,16 +404,11 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - // Include hrmp message - await context.createBlock(); - // Process the next block - await context.createBlock(); - // Search for failure const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) @@ -499,16 +436,11 @@ describeSuite({ .as_v3(); // Mock the reception of the xcm message - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); - // Include hrmp message - await context.createBlock(); - // Process the next block - await context.createBlock(); - // Search for failure const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) From 8598662d60709d27b9ea00dbed4b2fd78a264c1e Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Fri, 15 Mar 2024 07:58:20 +0000 Subject: [PATCH 35/80] fix tracing tests --- test/suites/tracing-tests/test-trace-erc20-xcm.ts | 3 --- test/suites/tracing-tests/test-trace-ethereum-xcm-1.ts | 3 --- test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts | 8 ++------ 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/test/suites/tracing-tests/test-trace-erc20-xcm.ts b/test/suites/tracing-tests/test-trace-erc20-xcm.ts index 0db4b8e702..777baca63e 100644 --- a/test/suites/tracing-tests/test-trace-erc20-xcm.ts +++ b/test/suites/tracing-tests/test-trace-erc20-xcm.ts @@ -112,9 +112,6 @@ describeSuite({ payload: xcmMessage, }); - // Create next block - await context.createBlock(); - transactionHash = (await context.viem().getBlock()).transactions[0]; // Erc20 tokens should have been received diff --git a/test/suites/tracing-tests/test-trace-ethereum-xcm-1.ts b/test/suites/tracing-tests/test-trace-ethereum-xcm-1.ts index 7aa0341d59..300c85cad9 100644 --- a/test/suites/tracing-tests/test-trace-ethereum-xcm-1.ts +++ b/test/suites/tracing-tests/test-trace-ethereum-xcm-1.ts @@ -121,9 +121,6 @@ describeSuite({ payload: xcmMessage, } as RawXcmMessage); - // Create next block - await context.createBlock(); - // Retrieve the stored ethereum transaction hash transactionHashes.push( (await context.viem().getBlock({ blockTag: "latest" })).transactions[0] diff --git a/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts b/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts index bb5e20b549..946172eece 100644 --- a/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts +++ b/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts @@ -4,6 +4,7 @@ import { injectHrmpMessage, descendOriginFromAddress20, RawXcmMessage, + injectHrmpMessageAndSeal, } from "../../helpers"; import { hexToNumber, Abi, encodeFunctionData } from "viem"; @@ -107,17 +108,12 @@ describeSuite({ .as_v3(); // Send an XCM and create block to execute it - await injectHrmpMessage(context, paraId, { + await injectHrmpMessageAndSeal(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); } - // Create a new block to include the xcm message - await context.createBlock(); - // Create next block - await context.createBlock(); - const txHashes = (await context.viem().getBlock({ blockTag: "latest" })).transactions; expect(txHashes.length).toBe(2); transactionHashes.push(...txHashes); From 938ea5210244f96f1001df24a27a6f1471340368 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Fri, 15 Mar 2024 08:24:32 +0000 Subject: [PATCH 36/80] fix formatting --- .../dev/moonbase/test-xcm-v3/test-mock-dmp-queue.ts | 8 ++------ .../moonbase/test-xcm-v3/test-xcm-erc20-fees-and-trap.ts | 2 +- .../test-xcm-v3/test-xcmv3-max-weight-instructions.ts | 1 - .../moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts | 2 -- test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts | 8 ++++++-- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-queue.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-queue.ts index 8c58666b14..731ac0a286 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-queue.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-queue.ts @@ -1,9 +1,5 @@ import "@moonbeam-network/api-augment"; -import { customDevRpcRequest, describeSuite, expect } from "@moonwall/cli"; -import { GLMR } from "@moonwall/util"; -import type { XcmVersionedXcm } from "@polkadot/types/lookup"; -import { u8aToHex } from "@polkadot/util"; -import { XcmFragment, weightMessage } from "../../../../helpers"; +import { describeSuite, expect } from "@moonwall/cli"; describeSuite({ id: "D014008", @@ -20,7 +16,7 @@ describeSuite({ context.polkadotJs().events.dmpQueue.StartedExport.is(event) ); expect(events).to.have.lengthOf(1); - + // Create new block await context.createBlock(); diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-fees-and-trap.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-fees-and-trap.ts index f89efc0161..1057caa492 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-fees-and-trap.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-fees-and-trap.ts @@ -336,7 +336,7 @@ describeSuite({ .map((e) => e.event.data.toHuman() as { success: boolean }) .filter(({ success }) => !success); - expect(events2).to.have.lengthOf(1); + expect(events2).to.have.lengthOf(1); // pallet-message-queue does not show an error when "success" is false. // https://github.com/paritytech/polkadot-sdk/issues/478 // > diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-max-weight-instructions.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-max-weight-instructions.ts index e8156906ae..bf62adbf2c 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-max-weight-instructions.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-max-weight-instructions.ts @@ -5,7 +5,6 @@ import { alith, CHARLETH_ADDRESS } from "@moonwall/util"; import { XcmFragment, RawXcmMessage, - injectHrmpMessage, sovereignAccountOfSibling, XcmFragmentConfig, injectHrmpMessageAndSeal, diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts index 58edac87f2..4f1f3417ed 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts @@ -5,7 +5,6 @@ import { alith, CHARLETH_ADDRESS } from "@moonwall/util"; import { XcmFragment, RawXcmMessage, - injectHrmpMessage, sovereignAccountOfSibling, XcmFragmentConfig, injectHrmpMessageAndSeal, @@ -228,7 +227,6 @@ describeSuite({ payload: xcmMessage, } as RawXcmMessage); - // Search for failure const events = (await api.query.system.events()) .filter(({ event }) => api.events.messageQueue.Processed.is(event)) diff --git a/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts b/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts index 946172eece..b6b05beddf 100644 --- a/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts +++ b/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts @@ -4,7 +4,6 @@ import { injectHrmpMessage, descendOriginFromAddress20, RawXcmMessage, - injectHrmpMessageAndSeal, } from "../../helpers"; import { hexToNumber, Abi, encodeFunctionData } from "viem"; @@ -108,12 +107,17 @@ describeSuite({ .as_v3(); // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, paraId, { + await injectHrmpMessage(context, paraId, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); } + // Block that includes the hrmp messages + context.createBlock(); + // Block that processes the hrmp messasges in the message queue + context.createBlock(); + const txHashes = (await context.viem().getBlock({ blockTag: "latest" })).transactions; expect(txHashes.length).toBe(2); transactionHashes.push(...txHashes); From 18080a19ffcd434a4cf80b4ee861205f079d4bd3 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Fri, 15 Mar 2024 08:25:20 +0000 Subject: [PATCH 37/80] fix rust tests --- runtime/moonbase/tests/evm_tracing.rs | 20 ++++++++++++++++++-- runtime/moonbeam/tests/evm_tracing.rs | 20 ++++++++++++++++++-- runtime/moonriver/tests/evm_tracing.rs | 20 ++++++++++++++++++-- 3 files changed, 54 insertions(+), 6 deletions(-) diff --git a/runtime/moonbase/tests/evm_tracing.rs b/runtime/moonbase/tests/evm_tracing.rs index 85fffcbf9e..6c8b4c79c7 100644 --- a/runtime/moonbase/tests/evm_tracing.rs +++ b/runtime/moonbase/tests/evm_tracing.rs @@ -52,9 +52,17 @@ mod tests { ); let transaction = ethereum_transaction(VALID_ETH_TX); let eth_uxt = unchecked_eth_tx(VALID_ETH_TX); + let block = Header { + digest: Default::default(), + extrinsics_root: Default::default(), + number: 1, + parent_hash: Default::default(), + state_root: Default::default(), + }; assert!(Runtime::trace_transaction( vec![non_eth_uxt.clone(), eth_uxt, non_eth_uxt.clone()], - &transaction + &transaction, + &block ) .is_ok()); }); @@ -84,9 +92,17 @@ mod tests { let eth_uxt = unchecked_eth_tx(VALID_ETH_TX); let eth_tx = ethereum_transaction(VALID_ETH_TX); let eth_extrinsic_hash = eth_tx.hash(); + let block = Header { + digest: Default::default(), + extrinsics_root: Default::default(), + number: 1, + parent_hash: Default::default(), + state_root: Default::default(), + }; assert!(Runtime::trace_block( vec![non_eth_uxt.clone(), eth_uxt.clone(), non_eth_uxt, eth_uxt], - vec![eth_extrinsic_hash, eth_extrinsic_hash] + vec![eth_extrinsic_hash, eth_extrinsic_hash], + &block ) .is_ok()); }); diff --git a/runtime/moonbeam/tests/evm_tracing.rs b/runtime/moonbeam/tests/evm_tracing.rs index 5d241a8850..144dae000e 100644 --- a/runtime/moonbeam/tests/evm_tracing.rs +++ b/runtime/moonbeam/tests/evm_tracing.rs @@ -52,9 +52,17 @@ mod tests { ); let transaction = ethereum_transaction(VALID_ETH_TX); let eth_uxt = unchecked_eth_tx(VALID_ETH_TX); + let block = Header { + digest: Default::default(), + extrinsics_root: Default::default(), + number: 1, + parent_hash: Default::default(), + state_root: Default::default(), + }; assert!(Runtime::trace_transaction( vec![non_eth_uxt.clone(), eth_uxt, non_eth_uxt.clone()], - &transaction + &transaction, + &block ) .is_ok()); }); @@ -84,9 +92,17 @@ mod tests { let eth_uxt = unchecked_eth_tx(VALID_ETH_TX); let eth_tx = ethereum_transaction(VALID_ETH_TX); let eth_extrinsic_hash = eth_tx.hash(); + let block = Header { + digest: Default::default(), + extrinsics_root: Default::default(), + number: 1, + parent_hash: Default::default(), + state_root: Default::default(), + }; assert!(Runtime::trace_block( vec![non_eth_uxt.clone(), eth_uxt.clone(), non_eth_uxt, eth_uxt], - vec![eth_extrinsic_hash, eth_extrinsic_hash] + vec![eth_extrinsic_hash, eth_extrinsic_hash], + &block ) .is_ok()); }); diff --git a/runtime/moonriver/tests/evm_tracing.rs b/runtime/moonriver/tests/evm_tracing.rs index c8db27d0ff..86aaab3707 100644 --- a/runtime/moonriver/tests/evm_tracing.rs +++ b/runtime/moonriver/tests/evm_tracing.rs @@ -52,9 +52,17 @@ mod tests { ); let transaction = ethereum_transaction(VALID_ETH_TX); let eth_uxt = unchecked_eth_tx(VALID_ETH_TX); + let block = Header { + digest: Default::default(), + extrinsics_root: Default::default(), + number: 1, + parent_hash: Default::default(), + state_root: Default::default(), + }; assert!(Runtime::trace_transaction( vec![non_eth_uxt.clone(), eth_uxt, non_eth_uxt.clone()], - &transaction + &transaction, + &block ) .is_ok()); }); @@ -84,9 +92,17 @@ mod tests { let eth_uxt = unchecked_eth_tx(VALID_ETH_TX); let eth_tx = ethereum_transaction(VALID_ETH_TX); let eth_extrinsic_hash = eth_tx.hash(); + let block = Header { + digest: Default::default(), + extrinsics_root: Default::default(), + number: 1, + parent_hash: Default::default(), + state_root: Default::default(), + }; assert!(Runtime::trace_block( vec![non_eth_uxt.clone(), eth_uxt.clone(), non_eth_uxt, eth_uxt], - vec![eth_extrinsic_hash, eth_extrinsic_hash] + vec![eth_extrinsic_hash, eth_extrinsic_hash], + &block ) .is_ok()); }); From d0d4e36c87d848722021c8cd7eab9dd792e187e5 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Fri, 15 Mar 2024 10:23:08 +0000 Subject: [PATCH 38/80] Revert "try new runtime-overrides" This reverts commit fa5cd6324266c3cce5a1fe3b599cb0b285756542. --- scripts/build-last-tracing-runtime.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-last-tracing-runtime.sh b/scripts/build-last-tracing-runtime.sh index bffa38f86e..105972ca40 100755 --- a/scripts/build-last-tracing-runtime.sh +++ b/scripts/build-last-tracing-runtime.sh @@ -7,7 +7,7 @@ echo ${1:-"$LOCAL_GIT_BRANCH"} rm -rf build/{moonbeam-runtime-overrides,wasm} mkdir -p build/wasm -git clone --depth 1 -b rq/debug_api_version_5 https://github.com/moonbeam-foundation/moonbeam-runtime-overrides build/moonbeam-runtime-overrides +git clone --depth 1 -b master-without-wasm https://github.com/moonbeam-foundation/moonbeam-runtime-overrides build/moonbeam-runtime-overrides cd build/moonbeam-runtime-overrides ./scripts/import-tracing-runtime.sh local ${1:-"$LOCAL_GIT_BRANCH"} From bd49b4e04e7ba332c4e92159e1ba2a23b9e1ddee Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Fri, 15 Mar 2024 15:07:05 +0000 Subject: [PATCH 39/80] keep using xcm v3 in some places to avoid having many breaking changes --- primitives/xcm/src/asset_id_conversions.rs | 24 ++++++- primitives/xcm/src/fee_handlers.rs | 11 +-- runtime/common/src/migrations.rs | 1 - runtime/moonbase/src/xcm_config.rs | 30 ++++++-- runtime/moonbase/tests/integration_test.rs | 28 ++++---- runtime/moonbase/tests/xcm_mock/parachain.rs | 41 +---------- runtime/moonbase/tests/xcm_tests.rs | 72 ++++++++++++------- runtime/moonbeam/src/xcm_config.rs | 31 ++++++-- runtime/moonbeam/tests/integration_test.rs | 32 ++++----- runtime/moonbeam/tests/xcm_mock/parachain.rs | 41 +---------- runtime/moonbeam/tests/xcm_tests.rs | 64 ++++++++++------- runtime/moonriver/src/xcm_config.rs | 29 ++++++-- runtime/moonriver/tests/integration_test.rs | 32 ++++----- runtime/moonriver/tests/xcm_mock/parachain.rs | 41 +---------- runtime/moonriver/tests/xcm_tests.rs | 72 ++++++++++++------- 15 files changed, 279 insertions(+), 270 deletions(-) diff --git a/primitives/xcm/src/asset_id_conversions.rs b/primitives/xcm/src/asset_id_conversions.rs index f049716545..3b7a5ca932 100644 --- a/primitives/xcm/src/asset_id_conversions.rs +++ b/primitives/xcm/src/asset_id_conversions.rs @@ -16,7 +16,7 @@ use sp_runtime::traits::MaybeEquivalence; use sp_std::marker::PhantomData; -use xcm::latest::Location; +use xcm::v3::Location; use xcm_executor::traits::ConvertLocation; /// Converter struct implementing `AssetIdConversion` converting a numeric asset ID @@ -41,6 +41,23 @@ where AssetIdInfoGetter::get_asset_type(what.clone()).and_then(Into::into) } } +impl MaybeEquivalence + for AsAssetType +where + AssetId: Clone, + AssetType: From + Into> + Clone, + AssetIdInfoGetter: AssetTypeGetter, +{ + fn convert(id: &xcm::v4::Location) -> Option { + let v3_location = xcm_builder::V4V3LocationConverter::convert(id)?; + AssetIdInfoGetter::get_asset_id(v3_location.clone().into()) + } + fn convert_back(what: &AssetId) -> Option { + let v3_location: Location = + AssetIdInfoGetter::get_asset_type(what.clone()).and_then(Into::into)?; + xcm_builder::V4V3LocationConverter::convert_back(&v3_location) + } +} impl ConvertLocation for AsAssetType where @@ -48,8 +65,9 @@ where AssetType: From + Into> + Clone, AssetIdInfoGetter: AssetTypeGetter, { - fn convert_location(id: &Location) -> Option { - AssetIdInfoGetter::get_asset_id(id.clone().into()) + fn convert_location(id: &xcm::v4::Location) -> Option { + let v3_location = xcm_builder::V4V3LocationConverter::convert(id)?; + AssetIdInfoGetter::get_asset_id(v3_location.clone().into()) } } diff --git a/primitives/xcm/src/fee_handlers.rs b/primitives/xcm/src/fee_handlers.rs index ff62a5053c..c496bc37c9 100644 --- a/primitives/xcm/src/fee_handlers.rs +++ b/primitives/xcm/src/fee_handlers.rs @@ -34,7 +34,7 @@ use xcm_builder::TakeRevenue; use xcm_executor::traits::{MatchesFungibles, WeightTrader}; pub struct FirstAssetTrader< - AssetType: From + Clone, + AssetType: TryFrom + Clone, AssetIdInfoGetter: UnitsToWeightRatio, R: TakeRevenue, >( @@ -43,7 +43,7 @@ pub struct FirstAssetTrader< PhantomData<(AssetType, AssetIdInfoGetter, R)>, ); impl< - AssetType: From + Clone, + AssetType: TryFrom + Clone, AssetIdInfoGetter: UnitsToWeightRatio, R: TakeRevenue, > WeightTrader for FirstAssetTrader @@ -74,7 +74,10 @@ impl< // transfers. We will see later if we change this. match (first_asset.id, first_asset.fun) { (xcmAssetId(location), Fungibility::Fungible(_)) => { - let asset_type: AssetType = location.clone().into(); + let asset_type: AssetType = location + .clone() + .try_into() + .map_err(|_| XcmError::InvalidLocation)?; // Shortcut if we know the asset is not supported // This involves the same db read per block, mitigating any attack based on // non-supported assets @@ -139,7 +142,7 @@ impl< /// Deal with spent fees, deposit them as dictated by R impl< - AssetType: From + Clone, + AssetType: TryFrom + Clone, AssetIdInfoGetter: UnitsToWeightRatio, R: TakeRevenue, > Drop for FirstAssetTrader diff --git a/runtime/common/src/migrations.rs b/runtime/common/src/migrations.rs index c693d8b7c5..ac998603bf 100644 --- a/runtime/common/src/migrations.rs +++ b/runtime/common/src/migrations.rs @@ -116,7 +116,6 @@ where Runtime: AuthorSlotFilterConfig, Runtime: pallet_preimage::Config, Runtime: pallet_asset_manager::Config, - ::ForeignAssetType: From, Runtime: pallet_xcm_transactor::Config, Runtime: pallet_moonbeam_orbiters::Config, Runtime: pallet_balances::Config, diff --git a/runtime/moonbase/src/xcm_config.rs b/runtime/moonbase/src/xcm_config.rs index 54695c9c05..f5ed950e19 100644 --- a/runtime/moonbase/src/xcm_config.rs +++ b/runtime/moonbase/src/xcm_config.rs @@ -89,7 +89,7 @@ parameter_types! { // a Location: (Self Balances pallet index) // We use the RELATIVE multilocation pub SelfReserve: Location = Location { - parents:0, + parents: 0, interior: [ PalletInstance(::index() as u8) ].into() @@ -407,7 +407,7 @@ parameter_types! { /// A good value depends on the expected message sizes, their weights, the weight that is /// available for processing them and the maximal needed message size. The maximal message /// size is slightly lower than this as defined by [`MaxMessageLenOf`]. - pub const MessageQueueHeapSize: u32 = 64 * 1024; + pub const MessageQueueHeapSize: u32 = 64 * 2048; } impl pallet_message_queue::Config for Runtime { @@ -433,24 +433,40 @@ impl pallet_message_queue::Config for Runtime { // Our AssetType. For now we only handle Xcm Assets #[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] pub enum AssetType { - Xcm(Location), + Xcm(xcm::v3::Location), } impl Default for AssetType { fn default() -> Self { - Self::Xcm(Location::here()) + Self::Xcm(xcm::v3::Location::here()) } } -impl From for AssetType { - fn from(location: Location) -> Self { +impl From for AssetType { + fn from(location: xcm::v3::Location) -> Self { Self::Xcm(location) } } +// This can be removed once we fully adopt xcm::v4 everywhere +impl TryFrom for AssetType { + type Error = (); + fn try_from(location: Location) -> Result { + Ok(Self::Xcm(location.try_into()?)) + } +} + +impl Into> for AssetType { + fn into(self) -> Option { + match self { + Self::Xcm(location) => Some(location), + } + } +} + impl Into> for AssetType { fn into(self) -> Option { match self { - Self::Xcm(location) => Some(location), + Self::Xcm(location) => xcm_builder::V4V3LocationConverter::convert_back(&location), } } } diff --git a/runtime/moonbase/tests/integration_test.rs b/runtime/moonbase/tests/integration_test.rs index 117853a51f..2947dee799 100644 --- a/runtime/moonbase/tests/integration_test.rs +++ b/runtime/moonbase/tests/integration_test.rs @@ -1242,7 +1242,7 @@ fn update_reward_address_via_precompile() { #[test] fn asset_can_be_registered() { ExtBuilder::default().build().execute_with(|| { - let source_location = AssetType::Xcm(Location::parent()); + let source_location = AssetType::Xcm(xcm::v3::Location::parent()); let source_id: moonbase_runtime::AssetId = source_location.clone().into(); let asset_metadata = AssetRegistrarMetadata { name: b"RelayToken".to_vec(), @@ -1265,7 +1265,7 @@ fn asset_can_be_registered() { fn xcm_asset_erc20_precompiles_supply_and_balance() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1282,7 +1282,7 @@ fn xcm_asset_erc20_precompiles_supply_and_balance() { .build() .execute_with(|| { // We have the assetId that corresponds to the relay chain registered - let relay_asset_id: AssetId = AssetType::Xcm(Location::parent()).into(); + let relay_asset_id: AssetId = AssetType::Xcm(xcm::v3::Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1323,7 +1323,7 @@ fn xcm_asset_erc20_precompiles_supply_and_balance() { fn xcm_asset_erc20_precompiles_transfer() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1340,7 +1340,7 @@ fn xcm_asset_erc20_precompiles_transfer() { .build() .execute_with(|| { // We have the assetId that corresponds to the relay chain registered - let relay_asset_id: AssetId = AssetType::Xcm(Location::parent()).into(); + let relay_asset_id: AssetId = AssetType::Xcm(xcm::v3::Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1387,7 +1387,7 @@ fn xcm_asset_erc20_precompiles_transfer() { fn xcm_asset_erc20_precompiles_approve() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1404,7 +1404,7 @@ fn xcm_asset_erc20_precompiles_approve() { .build() .execute_with(|| { // We have the assetId that corresponds to the relay chain registered - let relay_asset_id: AssetId = AssetType::Xcm(Location::parent()).into(); + let relay_asset_id: AssetId = AssetType::Xcm(xcm::v3::Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1472,7 +1472,7 @@ fn xcm_asset_erc20_precompiles_approve() { fn xtokens_precompiles_transfer() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1492,7 +1492,7 @@ fn xtokens_precompiles_transfer() { let xtokens_precompile_address = H160::from_low_u64_be(2052); // We have the assetId that corresponds to the relay chain registered - let relay_asset_id: AssetId = AssetType::Xcm(Location::parent()).into(); + let relay_asset_id: AssetId = AssetType::Xcm(xcm::v3::Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1531,7 +1531,7 @@ fn xtokens_precompiles_transfer() { fn xtokens_precompiles_transfer_multiasset() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1927,7 +1927,7 @@ fn root_can_change_default_xcm_vers() { (AccountId::from(BOB), 1_000 * UNIT), ]) .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1939,7 +1939,7 @@ fn root_can_change_default_xcm_vers() { }]) .build() .execute_with(|| { - let source_location = AssetType::Xcm(Location::parent()); + let source_location = AssetType::Xcm(xcm::v3::Location::parent()); let dest = Location { parents: 1, interior: [AccountId32 { @@ -1987,7 +1987,7 @@ fn transactor_cannot_use_more_than_max_weight() { (AccountId::from(BOB), 1_000 * UNIT), ]) .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1999,7 +1999,7 @@ fn transactor_cannot_use_more_than_max_weight() { }]) .build() .execute_with(|| { - let source_location = AssetType::Xcm(Location::parent()); + let source_location = AssetType::Xcm(xcm::v3::Location::parent()); let source_id: moonbase_runtime::AssetId = source_location.clone().into(); assert_ok!(XcmTransactor::register( root_origin(), diff --git a/runtime/moonbase/tests/xcm_mock/parachain.rs b/runtime/moonbase/tests/xcm_mock/parachain.rs index 2b807765fa..10c384737e 100644 --- a/runtime/moonbase/tests/xcm_mock/parachain.rs +++ b/runtime/moonbase/tests/xcm_mock/parachain.rs @@ -58,6 +58,7 @@ use xcm_builder::{ }; use xcm_executor::{traits::JustTry, Config, XcmExecutor}; +pub use moonbase_runtime::xcm_config::AssetType; #[cfg(feature = "runtime-benchmarks")] use moonbeam_runtime_common::benchmarking::BenchmarkHelper as ArgumentsBenchmarkHelper; use scale_info::TypeInfo; @@ -750,46 +751,6 @@ impl pallet_xcm::Config for Runtime { type AdminOrigin = frame_system::EnsureRoot; } -// Our AssetType. For now we only handle Xcm Assets -#[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] -pub enum AssetType { - Xcm(Location), -} -impl Default for AssetType { - fn default() -> Self { - Self::Xcm(Location::here()) - } -} - -impl From for AssetType { - fn from(location: Location) -> Self { - Self::Xcm(location) - } -} - -impl Into> for AssetType { - fn into(self) -> Option { - match self { - Self::Xcm(location) => Some(location), - } - } -} - -// Implementation on how to retrieve the AssetId from an AssetType -// We simply hash the AssetType and take the lowest 128 bits -impl From for AssetId { - fn from(asset: AssetType) -> AssetId { - match asset { - AssetType::Xcm(id) => { - let mut result: [u8; 16] = [0u8; 16]; - let hash: H256 = id.using_encoded(::Hashing::hash); - result.copy_from_slice(&hash.as_fixed_bytes()[0..16]); - u128::from_le_bytes(result) - } - } - } -} - // We instruct how to register the Assets // In this case, we tell it to Create an Asset in pallet-assets pub struct AssetRegistrar; diff --git a/runtime/moonbase/tests/xcm_tests.rs b/runtime/moonbase/tests/xcm_tests.rs index f75daefb4e..eca9ba91dd 100644 --- a/runtime/moonbase/tests/xcm_tests.rs +++ b/runtime/moonbase/tests/xcm_tests.rs @@ -27,6 +27,7 @@ use frame_support::{ use pallet_xcm_transactor::{ Currency, CurrencyPayment, HrmpInitParams, HrmpOperation, TransactWeights, }; +use sp_runtime::traits::MaybeEquivalence; use sp_std::boxed::Box; use xcm::latest::prelude::{ AccountId32, AccountKey20, All, BuyExecution, ClearOrigin, DepositAsset, GeneralIndex, @@ -45,7 +46,7 @@ use cumulus_primitives_core::relay_chain::HrmpChannelId; fn receive_relay_asset_from_relay() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -97,7 +98,7 @@ fn receive_relay_asset_from_relay() { fn send_relay_asset_to_relay() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -189,7 +190,7 @@ fn send_relay_asset_to_relay() { fn send_relay_asset_to_para_b() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -293,7 +294,9 @@ fn send_para_a_asset_to_para_b() { // this represents the asset in paraA let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -363,7 +366,9 @@ fn send_para_a_asset_from_para_b_to_para_c() { // Represents para A asset let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -477,7 +482,9 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { // Para A asset let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -574,7 +581,9 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { MockNet::reset(); let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -684,7 +693,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { fn receive_relay_asset_with_trader() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -746,7 +755,9 @@ fn send_para_a_asset_to_para_b_with_trader() { MockNet::reset(); let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -821,7 +832,9 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { MockNet::reset(); let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -889,7 +902,7 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { fn error_when_not_paying_enough() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -945,7 +958,7 @@ fn error_when_not_paying_enough() { fn transact_through_derivative_multilocation() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1114,7 +1127,7 @@ fn transact_through_derivative_multilocation() { fn transact_through_derivative_with_custom_fee_weight() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1269,7 +1282,7 @@ fn transact_through_derivative_with_custom_fee_weight() { fn transact_through_derivative_with_custom_fee_weight_refund() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1423,7 +1436,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { fn transact_through_sovereign() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1590,7 +1603,7 @@ fn transact_through_sovereign() { fn transact_through_sovereign_with_custom_fee_weight() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1743,7 +1756,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { fn transact_through_sovereign_with_custom_fee_weight_refund() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1897,7 +1910,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { fn test_automatic_versioning_on_runtime_upgrade_with_relay() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -2028,7 +2041,9 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { MockNet::reset(); let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -2181,7 +2196,7 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { MockNet::reset(); let fresh_account = [2u8; 20]; - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -2259,7 +2274,7 @@ fn receive_assets_with_sufficients_true_allows_non_funded_account_to_receive_ass MockNet::reset(); let fresh_account = [2u8; 20]; - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -2320,7 +2335,7 @@ fn evm_account_receiving_assets_should_handle_sufficients_ref_count() { assert_eq!(parachain::System::account(evm_account_id).sufficients, 1); }); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -2388,7 +2403,7 @@ fn empty_account_should_not_be_reset() { let evm_account_id = parachain::AccountId::from(sufficient_account); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -2500,7 +2515,10 @@ fn test_statemint_like() { xcm::latest::prelude::GeneralIndex(0u128), ], ); - let source_location = parachain::AssetType::Xcm(statemint_asset_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(&statemint_asset_a_balances) + .expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -2589,7 +2607,7 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { MockNet::reset(); // Relay asset - let relay_location = parachain::AssetType::Xcm(Location::parent()); + let relay_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_relay_id: parachain::AssetId = relay_location.clone().into(); let relay_asset_metadata = parachain::AssetMetadata { @@ -2603,7 +2621,9 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { 1, [Parachain(4u32), PalletInstance(5u8), GeneralIndex(10u128)], ); - let statemint_location_asset = parachain::AssetType::Xcm(statemint_asset); + let statemint_location_asset = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(&statemint_asset).expect("convert to v3"), + ); let source_statemint_asset_id: parachain::AssetId = statemint_location_asset.clone().into(); let asset_metadata_statemint_asset = parachain::AssetMetadata { diff --git a/runtime/moonbeam/src/xcm_config.rs b/runtime/moonbeam/src/xcm_config.rs index 4d5a73a997..d5bd740e69 100644 --- a/runtime/moonbeam/src/xcm_config.rs +++ b/runtime/moonbeam/src/xcm_config.rs @@ -30,7 +30,7 @@ use frame_support::{ use moonbeam_runtime_common::weights as moonbeam_weights; use pallet_evm_precompileset_assets_erc20::AccountIdAssetIdConversion; use sp_runtime::{ - traits::{Hash as THash, PostDispatchInfoOf}, + traits::{Hash as THash, MaybeEquivalence, PostDispatchInfoOf}, DispatchErrorWithPostInfo, }; use sp_weights::Weight; @@ -399,7 +399,7 @@ parameter_types! { /// A good value depends on the expected message sizes, their weights, the weight that is /// available for processing them and the maximal needed message size. The maximal message /// size is slightly lower than this as defined by [`MaxMessageLenOf`]. - pub const MessageQueueHeapSize: u32 = 64 * 1024; + pub const MessageQueueHeapSize: u32 = 64 * 2048; } impl pallet_message_queue::Config for Runtime { @@ -425,23 +425,40 @@ impl pallet_message_queue::Config for Runtime { // Our AssetType. For now we only handle Xcm Assets #[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] pub enum AssetType { - Xcm(Location), + Xcm(xcm::v3::Location), } impl Default for AssetType { fn default() -> Self { - Self::Xcm(Location::here()) + Self::Xcm(xcm::v3::Location::here()) } } -impl From for AssetType { - fn from(location: Location) -> Self { +impl From for AssetType { + fn from(location: xcm::v3::Location) -> Self { Self::Xcm(location) } } + +// This can be removed once we fully adopt xcm::v4 everywhere +impl TryFrom for AssetType { + type Error = (); + fn try_from(location: Location) -> Result { + Ok(Self::Xcm(location.try_into()?)) + } +} + +impl Into> for AssetType { + fn into(self) -> Option { + match self { + Self::Xcm(location) => Some(location), + } + } +} + impl Into> for AssetType { fn into(self) -> Option { match self { - Self::Xcm(location) => Some(location), + Self::Xcm(location) => xcm_builder::V4V3LocationConverter::convert_back(&location), } } } diff --git a/runtime/moonbeam/tests/integration_test.rs b/runtime/moonbeam/tests/integration_test.rs index dfe1b74357..6f78558bb4 100644 --- a/runtime/moonbeam/tests/integration_test.rs +++ b/runtime/moonbeam/tests/integration_test.rs @@ -1576,7 +1576,7 @@ fn root_can_change_default_xcm_vers() { (AccountId::from(BOB), 1_000 * GLMR), ]) .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1588,7 +1588,7 @@ fn root_can_change_default_xcm_vers() { }]) .build() .execute_with(|| { - let source_location = AssetType::Xcm(Location::parent()); + let source_location = AssetType::Xcm(xcm::v3::Location::parent()); let dest = Location { parents: 1, interior: [AccountId32 { @@ -1631,7 +1631,7 @@ fn root_can_change_default_xcm_vers() { #[test] fn asset_can_be_registered() { ExtBuilder::default().build().execute_with(|| { - let source_location = AssetType::Xcm(Location::parent()); + let source_location = AssetType::Xcm(xcm::v3::Location::parent()); let source_id: moonbeam_runtime::AssetId = source_location.clone().into(); let asset_metadata = AssetRegistrarMetadata { name: b"RelayToken".to_vec(), @@ -1654,7 +1654,7 @@ fn asset_can_be_registered() { fn xcm_asset_erc20_precompiles_supply_and_balance() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1672,7 +1672,7 @@ fn xcm_asset_erc20_precompiles_supply_and_balance() { .execute_with(|| { // We have the assetId that corresponds to the relay chain registered let relay_asset_id: moonbeam_runtime::AssetId = - AssetType::Xcm(Location::parent()).into(); + AssetType::Xcm(xcm::v3::Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1716,7 +1716,7 @@ fn xcm_asset_erc20_precompiles_supply_and_balance() { fn xcm_asset_erc20_precompiles_transfer() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1734,7 +1734,7 @@ fn xcm_asset_erc20_precompiles_transfer() { .execute_with(|| { // We have the assetId that corresponds to the relay chain registered let relay_asset_id: moonbeam_runtime::AssetId = - AssetType::Xcm(Location::parent()).into(); + AssetType::Xcm(xcm::v3::Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1781,7 +1781,7 @@ fn xcm_asset_erc20_precompiles_transfer() { fn xcm_asset_erc20_precompiles_approve() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1799,7 +1799,7 @@ fn xcm_asset_erc20_precompiles_approve() { .execute_with(|| { // We have the assetId that corresponds to the relay chain registered let relay_asset_id: moonbeam_runtime::AssetId = - AssetType::Xcm(Location::parent()).into(); + AssetType::Xcm(xcm::v3::Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1867,7 +1867,7 @@ fn xcm_asset_erc20_precompiles_approve() { fn xtokens_precompile_transfer() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1888,7 +1888,7 @@ fn xtokens_precompile_transfer() { // We have the assetId that corresponds to the relay chain registered let relay_asset_id: moonbeam_runtime::AssetId = - AssetType::Xcm(Location::parent()).into(); + AssetType::Xcm(xcm::v3::Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1927,7 +1927,7 @@ fn xtokens_precompile_transfer() { fn xtokens_precompile_transfer_multiasset() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -2177,7 +2177,7 @@ fn transactor_cannot_use_more_than_max_weight() { (AccountId::from(BOB), 1_000 * GLMR), ]) .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -2189,7 +2189,7 @@ fn transactor_cannot_use_more_than_max_weight() { }]) .build() .execute_with(|| { - let source_location = AssetType::Xcm(Location::parent()); + let source_location = AssetType::Xcm(xcm::v3::Location::parent()); let source_id: moonbeam_runtime::AssetId = source_location.clone().into(); assert_ok!(XcmTransactor::register( root_origin(), @@ -2266,7 +2266,7 @@ fn call_xtokens_with_fee() { ]) .with_safe_xcm_version(2) .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -2278,7 +2278,7 @@ fn call_xtokens_with_fee() { }]) .build() .execute_with(|| { - let source_location = AssetType::Xcm(Location::parent()); + let source_location = AssetType::Xcm(xcm::v3::Location::parent()); let dest = Location { parents: 1, interior: [AccountId32 { diff --git a/runtime/moonbeam/tests/xcm_mock/parachain.rs b/runtime/moonbeam/tests/xcm_mock/parachain.rs index 075a5a8c8c..bff719f23c 100644 --- a/runtime/moonbeam/tests/xcm_mock/parachain.rs +++ b/runtime/moonbeam/tests/xcm_mock/parachain.rs @@ -26,6 +26,7 @@ use frame_support::{ weights::Weight, PalletId, }; +pub use moonbeam_runtime::xcm_config::AssetType; use frame_system::{pallet_prelude::BlockNumberFor, EnsureNever, EnsureRoot}; use pallet_xcm::migration::v1::VersionUncheckedMigrateToV1; @@ -710,46 +711,6 @@ impl pallet_xcm::Config for Runtime { type AdminOrigin = frame_system::EnsureRoot; } -// Our AssetType. For now we only handle Xcm Assets -#[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] -pub enum AssetType { - Xcm(Location), -} -impl Default for AssetType { - fn default() -> Self { - Self::Xcm(Location::here()) - } -} - -impl From for AssetType { - fn from(location: Location) -> Self { - Self::Xcm(location) - } -} - -impl Into> for AssetType { - fn into(self) -> Option { - match self { - Self::Xcm(location) => Some(location), - } - } -} - -// Implementation on how to retrieve the AssetId from an AssetType -// We simply hash the AssetType and take the lowest 128 bits -impl From for AssetId { - fn from(asset: AssetType) -> AssetId { - match asset { - AssetType::Xcm(id) => { - let mut result: [u8; 16] = [0u8; 16]; - let hash: H256 = id.using_encoded(::Hashing::hash); - result.copy_from_slice(&hash.as_fixed_bytes()[0..16]); - u128::from_le_bytes(result) - } - } - } -} - // We instruct how to register the Assets // In this case, we tell it to Create an Asset in pallet-assets pub struct AssetRegistrar; diff --git a/runtime/moonbeam/tests/xcm_tests.rs b/runtime/moonbeam/tests/xcm_tests.rs index 3c95016de8..92a36fec77 100644 --- a/runtime/moonbeam/tests/xcm_tests.rs +++ b/runtime/moonbeam/tests/xcm_tests.rs @@ -29,6 +29,7 @@ use pallet_xcm_transactor::{ Currency, CurrencyPayment, HrmpInitParams, HrmpOperation, TransactWeights, }; use sp_core::ConstU32; +use sp_runtime::traits::MaybeEquivalence; use xcm::latest::prelude::{ AccountId32, AccountKey20, GeneralIndex, Junction, Junctions, Limited, Location, OriginKind, PalletInstance, Parachain, QueryResponse, Reanchorable, Response, WeightLimit, Xcm, @@ -46,7 +47,7 @@ use xcm_simulator::TestExt; fn receive_relay_asset_from_relay() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -101,7 +102,7 @@ fn receive_relay_asset_from_relay() { fn send_relay_asset_to_relay() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -192,7 +193,7 @@ fn send_relay_asset_to_relay() { fn send_relay_asset_to_para_b() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -295,7 +296,9 @@ fn send_para_a_asset_to_para_b() { // This represents the asset in paraA let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -366,7 +369,9 @@ fn send_para_a_asset_from_para_b_to_para_c() { // Represents para A asset let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -478,7 +483,9 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { // para A asset let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -575,7 +582,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { fn receive_relay_asset_with_trader() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -637,7 +644,9 @@ fn send_para_a_asset_to_para_b_with_trader() { MockNet::reset(); let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -712,7 +721,9 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { MockNet::reset(); let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -780,7 +791,7 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { fn error_when_not_paying_enough() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -836,7 +847,7 @@ fn error_when_not_paying_enough() { fn transact_through_derivative_multilocation() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -995,7 +1006,7 @@ fn transact_through_derivative_multilocation() { fn transact_through_derivative_with_custom_fee_weight() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1150,7 +1161,7 @@ fn transact_through_derivative_with_custom_fee_weight() { fn transact_through_derivative_with_custom_fee_weight_refund() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1304,7 +1315,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { fn transact_through_sovereign() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1471,7 +1482,7 @@ fn transact_through_sovereign() { fn transact_through_sovereign_with_custom_fee_weight() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1624,7 +1635,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { fn transact_through_sovereign_with_custom_fee_weight_refund() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1778,7 +1789,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { fn test_automatic_versioning_on_runtime_upgrade_with_relay() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1909,7 +1920,7 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { MockNet::reset(); let fresh_account = [2u8; 20]; - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -1987,7 +1998,7 @@ fn receive_assets_with_sufficients_true_allows_non_funded_account_to_receive_ass MockNet::reset(); let fresh_account = [2u8; 20]; - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -2048,7 +2059,7 @@ fn evm_account_receiving_assets_should_handle_sufficients_ref_count() { assert_eq!(parachain::System::account(evm_account_id).sufficients, 1); }); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -2116,7 +2127,7 @@ fn empty_account_should_not_be_reset() { let evm_account_id = parachain::AccountId::from(sufficient_account); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -2230,7 +2241,10 @@ fn test_statemint_like() { xcm::latest::prelude::GeneralIndex(0u128), ], ); - let source_location = parachain::AssetType::Xcm(statemint_asset_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(&statemint_asset_a_balances) + .expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -2320,7 +2334,7 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { MockNet::reset(); // Relay asset - let relay_location = parachain::AssetType::Xcm(Location::parent()); + let relay_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_relay_id: parachain::AssetId = relay_location.clone().into(); let relay_asset_metadata = parachain::AssetMetadata { @@ -2334,7 +2348,9 @@ fn send_statemint_asset_from_para_a_to_statemint_with_relay_fee() { 1, [Parachain(4u32), PalletInstance(5u8), GeneralIndex(10u128)], ); - let statemint_location_asset = parachain::AssetType::Xcm(statemint_asset); + let statemint_location_asset = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(&statemint_asset).expect("convert to v3"), + ); let source_statemint_asset_id: parachain::AssetId = statemint_location_asset.clone().into(); let asset_metadata_statemint_asset = parachain::AssetMetadata { diff --git a/runtime/moonriver/src/xcm_config.rs b/runtime/moonriver/src/xcm_config.rs index 90204a6d70..cefb0db481 100644 --- a/runtime/moonriver/src/xcm_config.rs +++ b/runtime/moonriver/src/xcm_config.rs @@ -407,7 +407,7 @@ parameter_types! { /// A good value depends on the expected message sizes, their weights, the weight that is /// available for processing them and the maximal needed message size. The maximal message /// size is slightly lower than this as defined by [`MaxMessageLenOf`]. - pub const MessageQueueHeapSize: u32 = 64 * 1024; + pub const MessageQueueHeapSize: u32 = 64 * 2048; } impl pallet_message_queue::Config for Runtime { @@ -433,23 +433,40 @@ impl pallet_message_queue::Config for Runtime { // Our AssetType. For now we only handle Xcm Assets #[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] pub enum AssetType { - Xcm(Location), + Xcm(xcm::v3::Location), } impl Default for AssetType { fn default() -> Self { - Self::Xcm(Location::here()) + Self::Xcm(xcm::v3::Location::here()) } } -impl From for AssetType { - fn from(location: Location) -> Self { +impl From for AssetType { + fn from(location: xcm::v3::Location) -> Self { Self::Xcm(location) } } + +// This can be removed once we fully adopt xcm::v4 everywhere +impl TryFrom for AssetType { + type Error = (); + fn try_from(location: Location) -> Result { + Ok(Self::Xcm(location.try_into()?)) + } +} + +impl Into> for AssetType { + fn into(self) -> Option { + match self { + Self::Xcm(location) => Some(location), + } + } +} + impl Into> for AssetType { fn into(self) -> Option { match self { - Self::Xcm(location) => Some(location), + Self::Xcm(location) => xcm_builder::V4V3LocationConverter::convert_back(&location), } } } diff --git a/runtime/moonriver/tests/integration_test.rs b/runtime/moonriver/tests/integration_test.rs index e0ff65eb0a..48d84eaae4 100644 --- a/runtime/moonriver/tests/integration_test.rs +++ b/runtime/moonriver/tests/integration_test.rs @@ -1553,7 +1553,7 @@ fn root_can_change_default_xcm_vers() { (AccountId::from(BOB), 1_000 * MOVR), ]) .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1565,7 +1565,7 @@ fn root_can_change_default_xcm_vers() { }]) .build() .execute_with(|| { - let source_location = AssetType::Xcm(Location::parent()); + let source_location = AssetType::Xcm(xcm::v3::Location::parent()); let dest = Location { parents: 1, interior: [AccountId32 { @@ -1608,7 +1608,7 @@ fn root_can_change_default_xcm_vers() { #[test] fn asset_can_be_registered() { ExtBuilder::default().build().execute_with(|| { - let source_location = AssetType::Xcm(Location::parent()); + let source_location = AssetType::Xcm(xcm::v3::Location::parent()); let source_id: moonriver_runtime::AssetId = source_location.clone().into(); let asset_metadata = AssetRegistrarMetadata { name: b"RelayToken".to_vec(), @@ -1631,7 +1631,7 @@ fn asset_can_be_registered() { fn xcm_asset_erc20_precompiles_supply_and_balance() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1648,7 +1648,7 @@ fn xcm_asset_erc20_precompiles_supply_and_balance() { .build() .execute_with(|| { // We have the assetId that corresponds to the relay chain registered - let relay_asset_id: AssetId = AssetType::Xcm(Location::parent()).into(); + let relay_asset_id: AssetId = AssetType::Xcm(xcm::v3::Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1692,7 +1692,7 @@ fn xcm_asset_erc20_precompiles_supply_and_balance() { fn xcm_asset_erc20_precompiles_transfer() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1709,7 +1709,7 @@ fn xcm_asset_erc20_precompiles_transfer() { .build() .execute_with(|| { // We have the assetId that corresponds to the relay chain registered - let relay_asset_id: AssetId = AssetType::Xcm(Location::parent()).into(); + let relay_asset_id: AssetId = AssetType::Xcm(xcm::v3::Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1756,7 +1756,7 @@ fn xcm_asset_erc20_precompiles_transfer() { fn xcm_asset_erc20_precompiles_approve() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1773,7 +1773,7 @@ fn xcm_asset_erc20_precompiles_approve() { .build() .execute_with(|| { // We have the assetId that corresponds to the relay chain registered - let relay_asset_id: AssetId = AssetType::Xcm(Location::parent()).into(); + let relay_asset_id: AssetId = AssetType::Xcm(xcm::v3::Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1841,7 +1841,7 @@ fn xcm_asset_erc20_precompiles_approve() { fn xtokens_precompiles_transfer() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -1862,7 +1862,7 @@ fn xtokens_precompiles_transfer() { // We have the assetId that corresponds to the relay chain registered let relay_asset_id: moonriver_runtime::AssetId = - AssetType::Xcm(Location::parent()).into(); + AssetType::Xcm(xcm::v3::Location::parent()).into(); // Its address is let asset_precompile_address = Runtime::asset_id_to_account( @@ -1901,7 +1901,7 @@ fn xtokens_precompiles_transfer() { fn xtokens_precompiles_transfer_multiasset() { ExtBuilder::default() .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -2000,7 +2000,7 @@ fn transactor_cannot_use_more_than_max_weight() { (AccountId::from(BOB), 1_000 * MOVR), ]) .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -2012,7 +2012,7 @@ fn transactor_cannot_use_more_than_max_weight() { }]) .build() .execute_with(|| { - let source_location = AssetType::Xcm(Location::parent()); + let source_location = AssetType::Xcm(xcm::v3::Location::parent()); let source_id: moonriver_runtime::AssetId = source_location.clone().into(); assert_ok!(XcmTransactor::register( root_origin(), @@ -2172,7 +2172,7 @@ fn call_xtokens_with_fee() { ]) .with_safe_xcm_version(2) .with_xcm_assets(vec![XcmAssetInitialization { - asset_type: AssetType::Xcm(Location::parent()), + asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -2184,7 +2184,7 @@ fn call_xtokens_with_fee() { }]) .build() .execute_with(|| { - let source_location = AssetType::Xcm(Location::parent()); + let source_location = AssetType::Xcm(xcm::v3::Location::parent()); let dest = Location { parents: 1, interior: [AccountId32 { diff --git a/runtime/moonriver/tests/xcm_mock/parachain.rs b/runtime/moonriver/tests/xcm_mock/parachain.rs index 2b3e11a9ac..32666e5be7 100644 --- a/runtime/moonriver/tests/xcm_mock/parachain.rs +++ b/runtime/moonriver/tests/xcm_mock/parachain.rs @@ -59,6 +59,7 @@ use xcm_executor::{traits::JustTry, Config, XcmExecutor}; #[cfg(feature = "runtime-benchmarks")] use moonbeam_runtime_common::benchmarking::BenchmarkHelper as ArgumentsBenchmarkHelper; +pub use moonriver_runtime::xcm_config::AssetType; use scale_info::TypeInfo; use xcm_simulator::{ DmpMessageHandlerT as DmpMessageHandler, XcmpMessageFormat, @@ -715,46 +716,6 @@ impl pallet_xcm::Config for Runtime { type AdminOrigin = frame_system::EnsureRoot; } -// Our AssetType. For now we only handle Xcm Assets -#[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] -pub enum AssetType { - Xcm(Location), -} -impl Default for AssetType { - fn default() -> Self { - Self::Xcm(Location::here()) - } -} - -impl From for AssetType { - fn from(location: Location) -> Self { - Self::Xcm(location) - } -} - -impl Into> for AssetType { - fn into(self) -> Option { - match self { - Self::Xcm(location) => Some(location), - } - } -} - -// Implementation on how to retrieve the AssetId from an AssetType -// We simply hash the AssetType and take the lowest 128 bits -impl From for AssetId { - fn from(asset: AssetType) -> AssetId { - match asset { - AssetType::Xcm(id) => { - let mut result: [u8; 16] = [0u8; 16]; - let hash: H256 = id.using_encoded(::Hashing::hash); - result.copy_from_slice(&hash.as_fixed_bytes()[0..16]); - u128::from_le_bytes(result) - } - } - } -} - // We instruct how to register the Assets // In this case, we tell it to Create an Asset in pallet-assets pub struct AssetRegistrar; diff --git a/runtime/moonriver/tests/xcm_tests.rs b/runtime/moonriver/tests/xcm_tests.rs index 6a282df7ac..f2ec871857 100644 --- a/runtime/moonriver/tests/xcm_tests.rs +++ b/runtime/moonriver/tests/xcm_tests.rs @@ -24,6 +24,7 @@ use frame_support::{ BoundedVec, }; use sp_core::ConstU32; +use sp_runtime::traits::MaybeEquivalence; use xcm::latest::prelude::{ AccountId32, AccountKey20, All, BuyExecution, ClearOrigin, DepositAsset, GeneralIndex, Junction, Junctions, Limited, Location, OriginKind, PalletInstance, Parachain, QueryResponse, @@ -47,7 +48,7 @@ use xcm_primitives::{UtilityEncodeCall, DEFAULT_PROOF_SIZE}; fn receive_relay_asset_from_relay() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -99,7 +100,7 @@ fn receive_relay_asset_from_relay() { fn send_relay_asset_to_relay() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -189,7 +190,7 @@ fn send_relay_asset_to_relay() { fn send_relay_asset_to_para_b() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -292,7 +293,9 @@ fn send_para_a_asset_to_para_b() { // This represents the asset in paraA let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -363,7 +366,9 @@ fn send_para_a_asset_from_para_b_to_para_c() { // Represents para A asset let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -477,7 +482,9 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a() { // Para A asset let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -575,7 +582,9 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { MockNet::reset(); let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -728,7 +737,7 @@ fn send_para_a_asset_to_para_b_and_back_to_para_a_with_new_reanchoring() { fn receive_relay_asset_with_trader() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -790,7 +799,9 @@ fn send_para_a_asset_to_para_b_with_trader() { MockNet::reset(); let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -865,7 +876,9 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { MockNet::reset(); let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -933,7 +946,7 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { fn error_when_not_paying_enough() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -989,7 +1002,7 @@ fn error_when_not_paying_enough() { fn transact_through_derivative_multilocation() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1148,7 +1161,7 @@ fn transact_through_derivative_multilocation() { fn transact_through_derivative_with_custom_fee_weight() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1303,7 +1316,7 @@ fn transact_through_derivative_with_custom_fee_weight() { fn transact_through_derivative_with_custom_fee_weight_refund() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1457,7 +1470,7 @@ fn transact_through_derivative_with_custom_fee_weight_refund() { fn transact_through_sovereign() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1624,7 +1637,7 @@ fn transact_through_sovereign() { fn transact_through_sovereign_with_custom_fee_weight() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1777,7 +1790,7 @@ fn transact_through_sovereign_with_custom_fee_weight() { fn transact_through_sovereign_with_custom_fee_weight_refund() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -1931,7 +1944,7 @@ fn transact_through_sovereign_with_custom_fee_weight_refund() { fn test_automatic_versioning_on_runtime_upgrade_with_relay() { MockNet::reset(); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -2062,7 +2075,9 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { MockNet::reset(); let para_a_balances = Location::new(1, [Parachain(1), PalletInstance(1u8)]); - let source_location = parachain::AssetType::Xcm(para_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(¶_a_balances).expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -2215,7 +2230,7 @@ fn receive_asset_with_no_sufficients_not_possible_if_non_existent_account() { MockNet::reset(); let fresh_account = [2u8; 20]; - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -2293,7 +2308,7 @@ fn receive_assets_with_sufficients_true_allows_non_funded_account_to_receive_ass MockNet::reset(); let fresh_account = [2u8; 20]; - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -2354,7 +2369,7 @@ fn evm_account_receiving_assets_should_handle_sufficients_ref_count() { assert_eq!(parachain::System::account(evm_account_id).sufficients, 1); }); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), symbol: b"Relay".to_vec(), @@ -2422,7 +2437,7 @@ fn empty_account_should_not_be_reset() { let evm_account_id = parachain::AccountId::from(sufficient_account); - let source_location = parachain::AssetType::Xcm(Location::parent()); + let source_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { name: b"RelayToken".to_vec(), @@ -2536,7 +2551,10 @@ fn test_statemine_like() { xcm::latest::prelude::GeneralIndex(0u128), ], ); - let source_location = parachain::AssetType::Xcm(statemine_asset_a_balances); + let source_location = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(&statemine_asset_a_balances) + .expect("convert to v3"), + ); let source_id: parachain::AssetId = source_location.clone().into(); let asset_metadata = parachain::AssetMetadata { @@ -2625,7 +2643,7 @@ fn send_statemint_asset_from_para_a_to_statemine_with_relay_fee() { MockNet::reset(); // Relay asset - let relay_location = parachain::AssetType::Xcm(Location::parent()); + let relay_location = parachain::AssetType::Xcm(xcm::v3::Location::parent()); let source_relay_id: parachain::AssetId = relay_location.clone().into(); let relay_asset_metadata = parachain::AssetMetadata { @@ -2639,7 +2657,9 @@ fn send_statemint_asset_from_para_a_to_statemine_with_relay_fee() { 1, [Parachain(4u32), PalletInstance(5u8), GeneralIndex(10u128)], ); - let statemine_location_asset = parachain::AssetType::Xcm(statemine_asset); + let statemine_location_asset = parachain::AssetType::Xcm( + xcm_builder::V4V3LocationConverter::convert(&statemine_asset).expect("convert to v3"), + ); let source_statemine_asset_id: parachain::AssetId = statemine_location_asset.clone().into(); let asset_metadata_statemine_asset = parachain::AssetMetadata { From c31a6b8bc417ab77b7bb04dbca9197627bbe7898 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Fri, 15 Mar 2024 17:06:11 +0000 Subject: [PATCH 40/80] fix benchmarks --- pallets/asset-manager/src/benchmarks.rs | 18 +++++++++--------- pallets/asset-manager/src/mock.rs | 2 +- runtime/common/src/apis.rs | 4 ++-- runtime/moonbase/src/xcm_config.rs | 6 ++++-- runtime/moonbeam/src/xcm_config.rs | 5 ++++- runtime/moonriver/src/xcm_config.rs | 5 ++++- 6 files changed, 24 insertions(+), 16 deletions(-) diff --git a/pallets/asset-manager/src/benchmarks.rs b/pallets/asset-manager/src/benchmarks.rs index c9de54ee07..c3ca585faf 100644 --- a/pallets/asset-manager/src/benchmarks.rs +++ b/pallets/asset-manager/src/benchmarks.rs @@ -20,7 +20,7 @@ use crate::{pallet::LocalAssetIdCreator, Call, Config, DepositBalanceOf, Pallet} use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite}; use frame_support::traits::{Currency, Get}; use frame_system::RawOrigin; -use xcm::latest::prelude::*; +use xcm::v3::prelude::*; ///RLocal asset deposit amount fn min_candidate_stk() -> DepositBalanceOf { @@ -62,9 +62,9 @@ benchmarks! { // We make it dependent on the number of existing assets already let x in 5..100; for i in 0..x { - let asset_type: T::ForeignAssetType = Location::new( + let asset_type: T::ForeignAssetType = Location::new( 0, - [(GeneralIndex(i as u128))] + X1(GeneralIndex(i as u128)) ).into(); let metadata = T::AssetRegistrarMetadata::default(); let amount = 1u32.into(); @@ -101,7 +101,7 @@ benchmarks! { // We make it dependent on the number of existing assets already let x in 5..100; for i in 0..x { - let asset_type: T::ForeignAssetType = Location::new(0, [GeneralIndex(i as u128)]).into(); + let asset_type: T::ForeignAssetType = Location::new(0, X1(GeneralIndex(i as u128))).into(); let metadata = T::AssetRegistrarMetadata::default(); let amount = 1u32.into(); Pallet::::register_foreign_asset( @@ -117,7 +117,7 @@ benchmarks! { let new_asset_type = T::ForeignAssetType::default(); let asset_type_to_be_changed: T::ForeignAssetType = Location::new( 0, - [(GeneralIndex((x-1) as u128))] + X1(GeneralIndex((x-1) as u128)) ).into(); let asset_id_to_be_changed = asset_type_to_be_changed.into(); }: _(RawOrigin::Root, asset_id_to_be_changed, new_asset_type.clone(), x) @@ -131,7 +131,7 @@ benchmarks! { // We make it dependent on the number of existing assets already let x in 5..100; for i in 0..x { - let asset_type: T::ForeignAssetType = Location::new(0, [GeneralIndex(i as u128)]).into(); + let asset_type: T::ForeignAssetType = Location::new(0, X1(GeneralIndex(i as u128))).into(); let metadata = T::AssetRegistrarMetadata::default(); let amount = 1u32.into(); Pallet::::register_foreign_asset( @@ -145,7 +145,7 @@ benchmarks! { } let asset_type_to_be_removed: T::ForeignAssetType = Location::new( 0, - [(GeneralIndex((x-1) as u128))] + X1(GeneralIndex((x-1) as u128)) ).into(); // We try to remove the last asset type }: _(RawOrigin::Root, asset_type_to_be_removed.clone(), x) @@ -179,7 +179,7 @@ benchmarks! { // Worst case is we need to remove it from SupportedAAssetsFeePayment too let x in 5..100; for i in 0..x { - let asset_type: T::ForeignAssetType = Location::new(0, [GeneralIndex(i as u128)]).into(); + let asset_type: T::ForeignAssetType = Location::new(0, X1(GeneralIndex(i as u128))).into(); let metadata = T::AssetRegistrarMetadata::default(); let amount = 1u32.into(); Pallet::::register_foreign_asset( @@ -194,7 +194,7 @@ benchmarks! { let asset_type_to_be_removed: T::ForeignAssetType = Location::new( 0, - [(GeneralIndex((x-1) as u128))] + X1(GeneralIndex((x-1) as u128)) ).into(); let asset_id: T::AssetId = asset_type_to_be_removed.clone().into(); }: _(RawOrigin::Root, asset_id, x) diff --git a/pallets/asset-manager/src/mock.rs b/pallets/asset-manager/src/mock.rs index 99496fa74d..c324c480ad 100644 --- a/pallets/asset-manager/src/mock.rs +++ b/pallets/asset-manager/src/mock.rs @@ -25,7 +25,7 @@ use sp_core::{RuntimeDebug, H256}; use sp_runtime::traits::Hash as THash; use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; use sp_runtime::{BuildStorage, DispatchError}; -use xcm::latest::prelude::*; +use xcm::v3::prelude::*; type Block = frame_system::mocking::MockBlock; diff --git a/runtime/common/src/apis.rs b/runtime/common/src/apis.rs index c72d31267d..27d619e3d9 100644 --- a/runtime/common/src/apis.rs +++ b/runtime/common/src/apis.rs @@ -711,14 +711,14 @@ macro_rules! impl_runtime_apis_plus_common { ::AssetId, ::ForeignAssetType> >::set_asset_type_asset_id( - location.clone().into(), + location.clone().try_into().expect("convert to v3"), i as u128 ); // set 1-1 ::ForeignAssetType> >::set_units_per_second( - location.clone().into(), + location.clone().try_into().expect("convert to v3"), 1_000_000_000_000u128 ); } diff --git a/runtime/moonbase/src/xcm_config.rs b/runtime/moonbase/src/xcm_config.rs index f5ed950e19..6f27dcff21 100644 --- a/runtime/moonbase/src/xcm_config.rs +++ b/runtime/moonbase/src/xcm_config.rs @@ -692,7 +692,7 @@ impl pallet_erc20_xcm_bridge::Config for Runtime { #[cfg(feature = "runtime-benchmarks")] mod testing { use super::*; - use xcm_executor::traits::ConvertLocation; + use xcm_builder::V4V3LocationConverter; /// This From exists for benchmarking purposes. It has the potential side-effect of calling /// AssetManager::set_asset_type_asset_id() and should NOT be used in any production code. @@ -706,7 +706,9 @@ mod testing { { asset_id } else { - let asset_type = AssetType::Xcm(location); + let asset_type = AssetType::Xcm( + V4V3LocationConverter::convert(&location).expect("convert to v3"), + ); let asset_id: AssetId = asset_type.clone().into(); AssetManager::set_asset_type_asset_id(asset_type, asset_id); asset_id diff --git a/runtime/moonbeam/src/xcm_config.rs b/runtime/moonbeam/src/xcm_config.rs index d5bd740e69..64fd5fb109 100644 --- a/runtime/moonbeam/src/xcm_config.rs +++ b/runtime/moonbeam/src/xcm_config.rs @@ -683,6 +683,7 @@ impl pallet_erc20_xcm_bridge::Config for Runtime { #[cfg(feature = "runtime-benchmarks")] mod testing { use super::*; + use xcm_builder::V4V3LocationConverter; /// This From exists for benchmarking purposes. It has the potential side-effect of calling /// AssetManager::set_asset_type_asset_id() and should NOT be used in any production code. @@ -696,7 +697,9 @@ mod testing { { asset_id } else { - let asset_type = AssetType::Xcm(location); + let asset_type = AssetType::Xcm( + V4V3LocationConverter::convert(&location).expect("convert to v3"), + ); let asset_id: AssetId = asset_type.clone().into(); AssetManager::set_asset_type_asset_id(asset_type, asset_id); asset_id diff --git a/runtime/moonriver/src/xcm_config.rs b/runtime/moonriver/src/xcm_config.rs index cefb0db481..25013f6677 100644 --- a/runtime/moonriver/src/xcm_config.rs +++ b/runtime/moonriver/src/xcm_config.rs @@ -696,6 +696,7 @@ impl pallet_erc20_xcm_bridge::Config for Runtime { #[cfg(feature = "runtime-benchmarks")] mod testing { use super::*; + use xcm_builder::V4V3LocationConverter; /// This From exists for benchmarking purposes. It has the potential side-effect of calling /// AssetManager::set_asset_type_asset_id() and should NOT be used in any production code. @@ -709,7 +710,9 @@ mod testing { { asset_id } else { - let asset_type = AssetType::Xcm(location); + let asset_type = AssetType::Xcm( + V4V3LocationConverter::convert(&location).expect("convert to v3"), + ); let asset_id: AssetId = asset_type.clone().into(); AssetManager::set_asset_type_asset_id(asset_type, asset_id); asset_id From 72c957815aac5e1adb48d034e40ed72be0f8a5a4 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Fri, 15 Mar 2024 21:46:59 +0000 Subject: [PATCH 41/80] fix tracing tests --- test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts b/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts index b6b05beddf..0da8a27216 100644 --- a/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts +++ b/test/suites/tracing-tests/test-trace-ethereum-xcm-3.ts @@ -114,9 +114,9 @@ describeSuite({ } // Block that includes the hrmp messages - context.createBlock(); + await context.createBlock(); // Block that processes the hrmp messasges in the message queue - context.createBlock(); + await context.createBlock(); const txHashes = (await context.viem().getBlock({ blockTag: "latest" })).transactions; expect(txHashes.length).toBe(2); From 541c416ccbf4ee33b0491e85db4aa062b2dc6065 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Sun, 17 Mar 2024 22:44:46 +0000 Subject: [PATCH 42/80] fix typescript tests --- test/helpers/xcm.ts | 8 ++++++-- .../moonbase/test-precompile/test-precompile-identity.ts | 2 +- .../moonbase/test-precompile/test-precompile-identity2.ts | 2 +- .../moonbase/test-precompile/test-precompile-identity4.ts | 2 +- .../moonbase/test-precompile/test-precompile-identity5.ts | 2 +- .../moonbase/test-precompile/test-precompile-identity6.ts | 4 ++-- .../test-staking/test-rewards-auto-compound-pov.ts | 2 +- .../test-xcm-v3/test-mock-dmp-error-and-appendix-6.ts | 2 ++ .../test-xcm-v3/test-mock-hrmp-asset-transfer-1.ts | 3 ++- 9 files changed, 17 insertions(+), 10 deletions(-) diff --git a/test/helpers/xcm.ts b/test/helpers/xcm.ts index 75946d2096..7e360162a6 100644 --- a/test/helpers/xcm.ts +++ b/test/helpers/xcm.ts @@ -185,7 +185,10 @@ export async function injectEncodedHrmpMessageAndSeal( ) { // Send RPC call to inject XCM message await customDevRpcRequest("xcm_injectHrmpMessage", [paraId, message]); - return await context.createBlock(); + // Create a block in which the XCM will be executed + await context.createBlock(); + // The next block will process the hrmp message in the message queue + return context.createBlock(); } // Weight a particular message using the xcm utils precompile @@ -213,6 +216,7 @@ export async function injectHrmpMessageAndSeal( await injectHrmpMessage(context, paraId, message); // Create a block in which the XCM will be executed await context.createBlock(); + // The next block will process the hrmp message in the message queue await context.createBlock(); } @@ -347,7 +351,7 @@ export class XcmFragment { // Ticket seems to indicate the version of the assets ticket: { parents: 0, - interior: { X1: { GeneralIndex: 3 } }, + interior: { X1: { GeneralIndex: 4 } }, }, }, }); diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity.ts index f7715c6e04..f8a7d87c0f 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity.ts @@ -90,7 +90,7 @@ describeSuite({ expect(identity.isValid).to.be.true; expect(identity.judgements).to.be.empty; - expect(identity.deposit).to.equal(1032400000000000000n); + expect(identity.deposit).to.equal(1034200000000000000n); expect(identity.info.additional.length).to.equal(1); expect(identity.info.additional[0].key.hasData).to.be.true; expect(identity.info.additional[0].key.value).to.equal(toHex("discord")); diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity2.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity2.ts index 722f512fe0..23a899fa24 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity2.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity2.ts @@ -68,7 +68,7 @@ describeSuite({ expect(identity.isValid).to.be.true; expect(identity.judgements).to.be.empty; - expect(identity.deposit).to.equal(1032400000000000000n); + expect(identity.deposit).to.equal(1034200000000000000n); expect(identity.info.additional.length).to.equal(1); expect(identity.info.additional[0].key.hasData).to.be.true; expect(identity.info.additional[0].key.value).to.equal(toHex("discord")); diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity4.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity4.ts index c0b2996324..b0d8f98f34 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity4.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity4.ts @@ -69,7 +69,7 @@ describeSuite({ expect(identity.judgements[0].registrarIndex).to.equal(0); expect(identity.judgements[0].judgement.isFeePaid).to.be.true; expect(identity.judgements[0].judgement.feePaidDeposit).to.equal(100n); - expect(identity.deposit).to.equal(1025800000000000000n); + expect(identity.deposit).to.equal(1027400000000000000n); expect(identity.info.display.hasData).to.be.true; expect(identity.info.display.value).to.equal(toHex("display")); }, diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity5.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity5.ts index 305afaa9bc..7afb5b9f62 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity5.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity5.ts @@ -69,7 +69,7 @@ describeSuite({ expect(identity.isValid).to.be.true; expect(identity.judgements).to.be.empty; - expect(identity.deposit).to.equal(1025800000000000000n); + expect(identity.deposit).to.equal(1027400000000000000n); expect(identity.info.display.hasData).to.be.true; expect(identity.info.display.value).to.equal(toHex("display")); }, diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity6.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity6.ts index 276574ded7..e32bf12496 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity6.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity6.ts @@ -32,7 +32,7 @@ describeSuite({ const identityHash = context .polkadotJs() - .registry.createType("PalletIdentitySimpleIdentityInfo", identityData) + .registry.createType("PalletIdentityLegacyIdentityInfo", identityData) .hash.toHex(); const block = await context.createBlock( await context.writeContract!({ @@ -85,7 +85,7 @@ describeSuite({ expect(identity.isValid).to.be.true; expect(identity.judgements).to.have.length(1); expect(identity.judgements[0].judgement.isKnownGood).to.be.true; - expect(identity.deposit).to.equal(1025800000000000000n); + expect(identity.deposit).to.equal(1027400000000000000n); expect(identity.info.display.hasData).to.be.true; expect(identity.info.display.value).to.equal(toHex("display")); }, diff --git a/test/suites/dev/moonbase/test-staking/test-rewards-auto-compound-pov.ts b/test/suites/dev/moonbase/test-staking/test-rewards-auto-compound-pov.ts index ed641c8a0e..34d4d09d8a 100644 --- a/test/suites/dev/moonbase/test-staking/test-rewards-auto-compound-pov.ts +++ b/test/suites/dev/moonbase/test-staking/test-rewards-auto-compound-pov.ts @@ -98,7 +98,7 @@ describeSuite({ expect( weights.mandatory.proofSize.toNumber(), "proofSize is too high, this might lead to empty block" - ).to.be.at.most(2_500_000); + ).to.be.at.most(2_600_000); // block could support ~500ms refTime but we consider it safer to error when reaching // over 200ms for the payout diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-6.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-6.ts index 0afbce06c2..fcc3c0e570 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-6.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-6.ts @@ -62,6 +62,8 @@ describeSuite({ // Send RPC call to inject XCM message await customDevRpcRequest("xcm_injectDownwardMessage", [totalMessage]); + // Process the next block + await context.createBlock(); // Create a block in which the XCM will be executed await context.createBlock(); diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-1.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-1.ts index fd717981c6..7ac66223e6 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-1.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-1.ts @@ -41,9 +41,10 @@ describeSuite({ // You can provide a message, but if you don't a horizontal transfer is the default await customDevRpcRequest("xcm_injectHrmpMessage", [foreign_para_id, []]); + // Process the next block + await context.createBlock(); // Create a block in which the XCM will be executed await context.createBlock(); - // Make sure the state has ALITH's foreign parachain tokens const alith_dot_balance = ( await context.polkadotJs().query.assets.account(assetId, alith.address) From d19e6ce4d48e4fa9a3455a6056893c9b5ccdda60 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Mon, 18 Mar 2024 07:53:11 +0000 Subject: [PATCH 43/80] revert removal of RewardDestination::Controller --- precompiles/relay-encoder/src/lib.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/precompiles/relay-encoder/src/lib.rs b/precompiles/relay-encoder/src/lib.rs index d9cffee46d..ea06db0f9b 100644 --- a/precompiles/relay-encoder/src/lib.rs +++ b/precompiles/relay-encoder/src/lib.rs @@ -418,10 +418,8 @@ impl solidity::Codec for RewardDestinationWrapper { 0u8 => Ok(RewardDestinationWrapper(RewardDestination::Staked)), 1u8 => Ok(RewardDestinationWrapper(RewardDestination::Stash)), // Deprecated in https://github.com/paritytech/polkadot-sdk/pull/2380 - 2u8 => Err(RevertReason::custom( - "`Controller` was deprecated. Use `Account(controller)` instead.", - ) - .into()), + #[allow(deprecated)] + 2u8 => Ok(RewardDestinationWrapper(RewardDestination::Controller)), 3u8 => { let address = encoded_reward_destination.read::()?; Ok(RewardDestinationWrapper(RewardDestination::Account( From 2615ca55d19a210b470fffec4f058fc8be268f8d Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Mon, 18 Mar 2024 08:08:12 +0000 Subject: [PATCH 44/80] fix tests in test-proxy --- test/suites/dev/moonbase/test-proxy/test-proxy-identity.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/suites/dev/moonbase/test-proxy/test-proxy-identity.ts b/test/suites/dev/moonbase/test-proxy/test-proxy-identity.ts index e8f168982f..ddc377339c 100644 --- a/test/suites/dev/moonbase/test-proxy/test-proxy-identity.ts +++ b/test/suites/dev/moonbase/test-proxy/test-proxy-identity.ts @@ -22,7 +22,7 @@ describeSuite({ }; const identity = context .polkadotJs() - .registry.createType("PalletIdentitySimpleIdentityInfo", identityData); + .registry.createType("PalletIdentityLegacyIdentityInfo", identityData); identityHash = identity.hash.toHex(); const block = await context.createBlock([ @@ -37,7 +37,7 @@ describeSuite({ }); const identityOf = await context.polkadotJs().query.identity.identityOf(signer.address); - expect(identityOf.unwrap().info.hash.toHex(), "Identity hash should match").to.equal( + expect(identityOf.unwrap()[0].info.hash.toHex(), "Identity hash should match").to.equal( identityHash ); }); @@ -148,7 +148,7 @@ describeSuite({ // }; // const identity = context // .polkadotJs() -// .registry.createType("PalletIdentitySimpleIdentityInfo", identityData); +// .registry.createType("PalletIdentityLegacyIdentityInfo", identityData); // identityHash = identity.hash.toHex(); // const block = await context.createBlock([ // context From 5f5d08b0f7f4b222b9eedfb0fe5b43f40a4bb459 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Mon, 18 Mar 2024 08:26:02 +0000 Subject: [PATCH 45/80] fix tests in test-precompile-wormhole.ts --- .../test-precompile/test-precompile-wormhole.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-wormhole.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-wormhole.ts index c5e69da0e3..fe1af3f6fd 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-wormhole.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-wormhole.ts @@ -339,7 +339,7 @@ describeSuite({ const block = await context.createBlock(rawTx); expectEVMResult(block.result!.events, "Succeed", "Returned"); - const events = expectSubstrateEvents(block, "xTokens", "TransferredMultiAssets"); + const events = expectSubstrateEvents(block, "xTokens", "TransferredAssets"); const transferFungible = events[0].data[1][0].fun; expect(transferFungible.isFungible); const transferAmount = transferFungible.asFungible.toBigInt(); @@ -381,7 +381,7 @@ describeSuite({ const block = await context.createBlock(rawTx); expectEVMResult(block.result!.events, "Succeed", "Returned"); - const events = expectSubstrateEvents(block, "xTokens", "TransferredMultiAssets"); + const events = expectSubstrateEvents(block, "xTokens", "TransferredAssets"); const transferFungible = events[0].data[1][0].fun; expect(transferFungible.isFungible); const transferAmount = transferFungible.asFungible.toBigInt(); @@ -427,7 +427,7 @@ describeSuite({ expectEVMResult(block.result!.events, "Succeed", "Returned"); // there should be no xTokens TransferredMultiAssets event since fee >= amount sent - const events = expectSubstrateEvents(block!, "xTokens", "TransferredMultiAssets"); + const events = expectSubstrateEvents(block!, "xTokens", "TransferredAssets"); expect(events.length).to.eq(0); // TODO: isn't expectSubstrateEvents supposed to expect > 0? const alithWHTokenAfter = await whWethContract.balanceOf(ALITH_ADDRESS); @@ -469,7 +469,7 @@ describeSuite({ const block = await context.createBlock(rawTx); expectEVMResult(block.result!.events, "Succeed", "Returned"); - const events = expectSubstrateEvents(block, "xTokens", "TransferredMultiAssets"); + const events = expectSubstrateEvents(block, "xTokens", "TransferredAssets"); const transferFungible = events[0].data[1][0].fun; expect(transferFungible.isFungible); const transferAmount = transferFungible.asFungible.toBigInt(); @@ -566,7 +566,7 @@ describeSuite({ const result = await context.createBlock(rawTx); expectEVMResult(result.result.events, "Succeed", "Returned"); - const events = expectSubstrateEvents(result, "xTokens", "TransferredMultiAssets"); + const events = expectSubstrateEvents(result, "xTokens", "TransferredAssets"); const transferFungible = events[0].data[1][0].fun; expect(transferFungible.isFungible); const transferAmount = transferFungible.asFungible.toBigInt(); From 46a9db27afa0eea4feb1659866cfc47b3e5e57b9 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Mon, 18 Mar 2024 08:30:47 +0000 Subject: [PATCH 46/80] fix test-pov tests --- test/suites/dev/moonbase/test-pov/test-xcm-to-evm-pov.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/suites/dev/moonbase/test-pov/test-xcm-to-evm-pov.ts b/test/suites/dev/moonbase/test-pov/test-xcm-to-evm-pov.ts index 3de5cb64bd..a6a5b5c576 100644 --- a/test/suites/dev/moonbase/test-pov/test-xcm-to-evm-pov.ts +++ b/test/suites/dev/moonbase/test-pov/test-xcm-to-evm-pov.ts @@ -138,6 +138,8 @@ describeSuite({ type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); + await context.createBlock(); + // This block is the one that processes the xcm messages const { result, block } = await context.createBlock(); // With 500k gas we are allowed to use ~150k of POV, so verify the range. @@ -238,6 +240,8 @@ describeSuite({ type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); + context.createBlock(); + // This block is the one that processes the xcm messages const { result, block } = await context.createBlock(); expect(block.proofSize).to.be.at.least(EXPECTED_POV_ROUGH / 1.1); From bdc84827dfa9d793f30a575beefd0e649eb41f06 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Mon, 18 Mar 2024 10:19:42 +0000 Subject: [PATCH 47/80] fix dmp queue tests --- .../test-mock-dmp-error-and-appendix-1.ts | 1 + .../test-mock-dmp-error-and-appendix-2.ts | 1 + .../test-mock-dmp-error-and-appendix-3.ts | 1 + .../test-mock-dmp-error-and-appendix-4.ts | 1 + .../test-mock-dmp-error-and-appendix-5.ts | 1 + .../test-mock-dmp-error-and-appendix-6.ts | 1 + .../test-xcm-v2/test-mock-dmp-queue.ts | 155 ------------------ 7 files changed, 6 insertions(+), 155 deletions(-) delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-queue.ts diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-1.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-1.ts index 4e3a266637..5f99771e3e 100644 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-1.ts +++ b/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-1.ts @@ -71,6 +71,7 @@ describeSuite({ // Create a block in which the XCM will be executed await context.createBlock(); + await context.createBlock(); // Make sure ALITH did not reveive anything const alith_dot_balance = await context .polkadotJs() diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-2.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-2.ts index ff3f249255..57e3672292 100644 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-2.ts +++ b/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-2.ts @@ -71,6 +71,7 @@ describeSuite({ // Create a block in which the XCM will be executed await context.createBlock(); + await context.createBlock(); // Make sure the state has ALITH's to DOT tokens const alith_dot_balance = ( await context.polkadotJs().query.assets.account(assetId, alith.address) diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-3.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-3.ts index 9eb27e65f8..d54573717a 100644 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-3.ts +++ b/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-3.ts @@ -68,6 +68,7 @@ describeSuite({ // Create a block in which the XCM will be executed await context.createBlock(); + await context.createBlock(); // Make sure the state has ALITH's to DOT tokens const alith_dot_balance = ( await context.polkadotJs().query.assets.account(assetId, alith.address) diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-4.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-4.ts index 2e9bf66a55..9090a47f38 100644 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-4.ts +++ b/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-4.ts @@ -71,6 +71,7 @@ describeSuite({ // Create a block in which the XCM will be executed await context.createBlock(); + await context.createBlock(); // Make sure the state has ALITH's to DOT tokens const alith_dot_balance = ( await context.polkadotJs().query.assets.account(assetId, alith.address) diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-5.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-5.ts index afd0b36304..91bfd1e2cb 100644 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-5.ts +++ b/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-5.ts @@ -71,6 +71,7 @@ describeSuite({ // Create a block in which the XCM will be executed await context.createBlock(); + await context.createBlock(); // Make sure the state has ALITH's to DOT tokens const alith_dot_balance = ( await context.polkadotJs().query.assets.account(assetId, alith.address) diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-6.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-6.ts index c594ac7b8f..59fc24c618 100644 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-6.ts +++ b/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-6.ts @@ -111,6 +111,7 @@ describeSuite({ // Create a block in which the XCM will be executed await context.createBlock(); + await context.createBlock(); // Make sure the state has ALITH's to DOT tokens const alith_dot_balance = ( await context.polkadotJs().query.assets.account(assetId, alith.address) diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-queue.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-queue.ts deleted file mode 100644 index 7a3cc7f1da..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-queue.ts +++ /dev/null @@ -1,155 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { customDevRpcRequest, describeSuite, expect } from "@moonwall/cli"; -import { GLMR } from "@moonwall/util"; -import type { XcmVersionedXcm } from "@polkadot/types/lookup"; -import { u8aToHex } from "@polkadot/util"; -import { XcmFragment, weightMessage } from "../../../../helpers"; - -describeSuite({ - id: "D013907", - title: "Mock XCMP - test XCMP execution", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - it({ - id: "T01", - title: "Should test DMP on_initialization and on_idle", - test: async function () { - const metadata = await context.polkadotJs().rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - - // TODO this test mostly changes it's nature due to proof size accounting - // by now we just decrease the number of supported messages from 50 to 20. - const numMsgs = 20; - // let's target half of then being executed - - // xcmp reserved is BLOCK/4 - const totalDmpWeight = - context.polkadotJs().consts.system.blockWeights.maxBlock.refTime.toBigInt() / 4n; - - // we want half of numParaMsgs to be executed. That give us how much each message weights - const weightPerMessage = (totalDmpWeight * BigInt(2)) / BigInt(numMsgs); - - // Now we need to construct the message. This needs to: - // - pass barrier (withdraw + buyExecution + unlimited buyExecution*n) - // we know at least 2 instructions are needed per message (withdrawAsset + buyExecution) - // how many unlimited buyExecutions do we need to append? - - // we will bias this number. The reason is we want to test the decay, and therefore we need - // an unbalanced number of messages executed. We specifically need that at some point - // we get out of the loop of the execution (we reach the threshold limit), to then - // go on idle - - const config = { - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: balancesPalletIndex }, - }, - }, - fungible: 1_000_000_000_000_000n, - }, - ], - }; - - // How much does the withdraw weight? - const withdrawWeight = await weightMessage( - context, - context - .polkadotJs() - .createType("XcmVersionedXcm", new XcmFragment(config).withdraw_asset().as_v2()) - ); - - // How much does the buyExecution weight? - const buyExecutionWeight = await weightMessage( - context, - context - .polkadotJs() - .createType("XcmVersionedXcm", new XcmFragment(config).buy_execution().as_v2()) - ); - - // How much does the refundSurplus weight? - // We use refund surplus because it has 0 pov - // it's easier to focus on reftime - const refundSurplusWeight = await weightMessage( - context, - context - .polkadotJs() - .createType("XcmVersionedXcm", new XcmFragment(config).refund_surplus().as_v2()) - ); - - const refundSurplusPerMessage = - (weightPerMessage - withdrawWeight - buyExecutionWeight) / refundSurplusWeight; - - const xcmMessage = new XcmFragment(config) - .withdraw_asset() - .buy_execution() - .refund_surplus(refundSurplusPerMessage) - .as_v2(); - - const receivedMessage: XcmVersionedXcm = context - .polkadotJs() - .createType("XcmVersionedXcm", xcmMessage); - - const totalMessage = [...receivedMessage.toU8a()]; - - // We want these isntructions to fail in BuyExecution. That means - // WithdrawAsset needs to work. The only way for this to work - // is to fund each sovereign account - const sovereignAddress = u8aToHex( - new Uint8Array([...new TextEncoder().encode("Parent")]) - ).padEnd(42, "0"); - - // We first fund the parent sovereign account with 1000 - // we will only withdraw 1, so no problem on this - await context.createBlock( - context.polkadotJs().tx.balances.transferAllowDeath(sovereignAddress, 1n * GLMR), - { allowFailures: false } - ); - - // now we start injecting messages - // several - for (let i = 0; i < numMsgs; i++) { - await customDevRpcRequest("xcm_injectDownwardMessage", [totalMessage]); - } - - await context.createBlock(); - - const signedBlock = await context.polkadotJs().rpc.chain.getBlock(); - const apiAt = await context.polkadotJs().at(signedBlock.block.header.hash); - const allRecords = await apiAt.query.system.events(); - // lets grab at which point the dmp queue was exhausted - const exhaustIndex = allRecords.findIndex(({ event }) => - context.polkadotJs().events.dmpQueue.MaxMessagesExhausted.is(event) - ); - - expect( - exhaustIndex, - "Index not found where dmpQueue is exhausted" - ).to.be.greaterThanOrEqual(0); - - // OnInitialization - const eventsExecutedOnInitialization = allRecords.filter( - ({ event }, index) => - context.polkadotJs().events.dmpQueue.ExecutedDownward.is(event) && index < exhaustIndex - ); - - // OnIdle - const eventsExecutedOnIdle = allRecords.filter( - ({ event }, index) => - context.polkadotJs().events.dmpQueue.ExecutedDownward.is(event) && index > exhaustIndex - ); - - // the test was designed to go half and half - expect(eventsExecutedOnInitialization.length).to.be.eq(10); - expect(eventsExecutedOnIdle.length).to.be.eq(10); - const pageIndex = await apiAt.query.dmpQueue.pageIndex(); - expect(pageIndex.beginUsed.toBigInt()).to.eq(0n); - expect(pageIndex.endUsed.toBigInt()).to.eq(0n); - }, - }); - }, -}); From 472bf9f851ae934e5473d601eef7c216df0f7004 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Mon, 18 Mar 2024 16:27:44 +0000 Subject: [PATCH 48/80] fix fee tests and add xcm v4 tests --- runtime/moonbase/src/xcm_config.rs | 2 +- runtime/moonbeam/src/xcm_config.rs | 2 +- runtime/moonriver/src/xcm_config.rs | 2 +- test/helpers/xcm.ts | 25 +- .../test-fees/test-fee-multiplier-max.ts | 2 +- .../test-fees/test-fee-multiplier-xcm.ts | 57 ++-- .../moonbase/test-fees/test-length-fees.ts | 2 +- .../test-mock-hrmp-asset-transfer-1.ts | 100 ------- .../test-mock-hrmp-asset-transfer-2.ts | 108 ------- .../test-mock-hrmp-asset-transfer-3.ts | 98 ------- .../test-mock-hrmp-asset-transfer-4.ts | 107 ------- .../test-mock-hrmp-asset-transfer-5.ts | 135 --------- .../test-mock-hrmp-asset-transfer-6.ts | 94 ------ .../test-xcm-v2/test-mock-hrmp-transact-1.ts | 103 ------- .../test-xcm-v2/test-mock-hrmp-transact-2.ts | 104 ------- .../test-xcm-v2/test-mock-hrmp-transact-3.ts | 102 ------- .../test-xcm-v2/test-mock-hrmp-transact-4.ts | 102 ------- .../test-mock-hrmp-transact-ethereum-1.ts | 156 ---------- .../test-mock-hrmp-transact-ethereum-10.ts | 155 ---------- .../test-mock-hrmp-transact-ethereum-2.ts | 150 ---------- .../test-mock-hrmp-transact-ethereum-3.ts | 239 --------------- .../test-mock-hrmp-transact-ethereum-4.ts | 153 ---------- .../test-mock-hrmp-transact-ethereum-5.ts | 160 ----------- .../test-mock-hrmp-transact-ethereum-6.ts | 197 ------------- .../test-mock-hrmp-transact-ethereum-7.ts | 203 ------------- .../test-mock-hrmp-transact-ethereum-8.ts | 161 ----------- .../test-mock-hrmp-transact-ethereum-9.ts | 40 --- .../test-xcm-erc20-transfer-two-ERC20.ts | 272 ------------------ .../test-xcm-v2/test-xcm-erc20-transfer.ts | 196 ------------- .../test-xcm-v2/test-xcm-ver-conversion-1.ts | 101 ------- .../test-xcm-v2/test-xcm-ver-conversion-2.ts | 102 ------- .../test-mock-dmp-error-and-appendix-1.ts | 4 +- .../test-mock-dmp-error-and-appendix-2.ts | 4 +- .../test-mock-dmp-error-and-appendix-3.ts | 4 +- .../test-mock-dmp-error-and-appendix-4.ts | 4 +- .../test-mock-dmp-error-and-appendix-5.ts | 4 +- .../test-mock-dmp-error-and-appendix-6.ts | 9 +- 37 files changed, 83 insertions(+), 3376 deletions(-) delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-1.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-2.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-3.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-4.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-5.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-6.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-1.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-2.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-3.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-4.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-1.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-10.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-2.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-3.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-4.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-5.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-6.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-7.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-8.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-9.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-xcm-erc20-transfer-two-ERC20.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-xcm-erc20-transfer.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-xcm-ver-conversion-1.ts delete mode 100644 test/suites/dev/moonbase/test-xcm-v2/test-xcm-ver-conversion-2.ts rename test/suites/dev/moonbase/{test-xcm-v2 => test-xcm-v4}/test-mock-dmp-error-and-appendix-1.ts (98%) rename test/suites/dev/moonbase/{test-xcm-v2 => test-xcm-v4}/test-mock-dmp-error-and-appendix-2.ts (98%) rename test/suites/dev/moonbase/{test-xcm-v2 => test-xcm-v4}/test-mock-dmp-error-and-appendix-3.ts (96%) rename test/suites/dev/moonbase/{test-xcm-v2 => test-xcm-v4}/test-mock-dmp-error-and-appendix-4.ts (96%) rename test/suites/dev/moonbase/{test-xcm-v2 => test-xcm-v4}/test-mock-dmp-error-and-appendix-5.ts (96%) rename test/suites/dev/moonbase/{test-xcm-v2 => test-xcm-v4}/test-mock-dmp-error-and-appendix-6.ts (95%) diff --git a/runtime/moonbase/src/xcm_config.rs b/runtime/moonbase/src/xcm_config.rs index 6f27dcff21..11e9276411 100644 --- a/runtime/moonbase/src/xcm_config.rs +++ b/runtime/moonbase/src/xcm_config.rs @@ -407,7 +407,7 @@ parameter_types! { /// A good value depends on the expected message sizes, their weights, the weight that is /// available for processing them and the maximal needed message size. The maximal message /// size is slightly lower than this as defined by [`MaxMessageLenOf`]. - pub const MessageQueueHeapSize: u32 = 64 * 2048; + pub const MessageQueueHeapSize: u32 = 128 * 1048; } impl pallet_message_queue::Config for Runtime { diff --git a/runtime/moonbeam/src/xcm_config.rs b/runtime/moonbeam/src/xcm_config.rs index 64fd5fb109..2e0528997f 100644 --- a/runtime/moonbeam/src/xcm_config.rs +++ b/runtime/moonbeam/src/xcm_config.rs @@ -399,7 +399,7 @@ parameter_types! { /// A good value depends on the expected message sizes, their weights, the weight that is /// available for processing them and the maximal needed message size. The maximal message /// size is slightly lower than this as defined by [`MaxMessageLenOf`]. - pub const MessageQueueHeapSize: u32 = 64 * 2048; + pub const MessageQueueHeapSize: u32 = 128 * 1048; } impl pallet_message_queue::Config for Runtime { diff --git a/runtime/moonriver/src/xcm_config.rs b/runtime/moonriver/src/xcm_config.rs index 25013f6677..9abf6845f6 100644 --- a/runtime/moonriver/src/xcm_config.rs +++ b/runtime/moonriver/src/xcm_config.rs @@ -407,7 +407,7 @@ parameter_types! { /// A good value depends on the expected message sizes, their weights, the weight that is /// available for processing them and the maximal needed message size. The maximal message /// size is slightly lower than this as defined by [`MaxMessageLenOf`]. - pub const MessageQueueHeapSize: u32 = 64 * 2048; + pub const MessageQueueHeapSize: u32 = 128 * 1048; } impl pallet_message_queue::Config for Runtime { diff --git a/test/helpers/xcm.ts b/test/helpers/xcm.ts index 7e360162a6..c2764a27cc 100644 --- a/test/helpers/xcm.ts +++ b/test/helpers/xcm.ts @@ -258,7 +258,12 @@ export interface XcmFragmentConfig { multilocation: MultiLocation; fungible: bigint; }[]; - weight_limit?: BN; + weight_limit?: + | BN + | { + refTime: BN | number | bigint; + proofSize: BN | number | bigint; + }; descend_origin?: string; beneficiary?: string; } @@ -489,8 +494,24 @@ export class XcmFragment { /// XCM V4 calls as_v4(): any { + const patchLocationV4recursively = (value: any) => { + // e.g. Convert this: { X1: { Parachain: 1000 } } to { X1: [ { Parachain: 1000 } ] } + if (value && typeof value == "object") { + Object.keys(value).forEach((k) => { + if (k == "Concrete" || k == "Abstract") { + value = value[k]; + } + if (k.match(/^X\d$/g)) { + value[k] = Object.entries(value[k]).map(([k, v]) => ({ [k]: v })); + } else { + value[k] = patchLocationV4recursively(value[k]); + } + }); + } + return value; + }; return { - V4: this.instructions, + V4: this.instructions.map((inst) => patchLocationV4recursively(inst)), }; } diff --git a/test/suites/dev/moonbase/test-fees/test-fee-multiplier-max.ts b/test/suites/dev/moonbase/test-fees/test-fee-multiplier-max.ts index 8c9b832987..9da791c799 100644 --- a/test/suites/dev/moonbase/test-fees/test-fee-multiplier-max.ts +++ b/test/suites/dev/moonbase/test-fees/test-fee-multiplier-max.ts @@ -84,7 +84,7 @@ describeSuite({ // note that this is not really affected by the high multiplier because most of its fee is // derived from the length_fee, which is not scaled by the multiplier - expect(initialBalance - afterBalance).to.equal(9_231_801_265_723_667_008n); + expect(initialBalance - afterBalance).to.equal(601_486_761_265_723_667_008n); }, }); diff --git a/test/suites/dev/moonbase/test-fees/test-fee-multiplier-xcm.ts b/test/suites/dev/moonbase/test-fees/test-fee-multiplier-xcm.ts index 49baf78bc8..c97aaa3790 100644 --- a/test/suites/dev/moonbase/test-fees/test-fee-multiplier-xcm.ts +++ b/test/suites/dev/moonbase/test-fees/test-fee-multiplier-xcm.ts @@ -1,13 +1,13 @@ import "@moonbeam-network/api-augment/moonbase"; import { beforeAll, beforeEach, describeSuite, expect } from "@moonwall/cli"; import { BALTATHAR_ADDRESS, KeyringPair, alith, generateKeyringPair } from "@moonwall/util"; -import { BN, bnToHex } from "@polkadot/util"; +import { bnToHex } from "@polkadot/util"; import { RawXcmMessage, XcmFragment, descendOriginFromAddress20, expectOk, - injectHrmpMessageAndSeal, + injectHrmpMessage, } from "../../../../helpers"; // Below should be the calculation: @@ -162,7 +162,10 @@ describeSuite({ fungible: transferredBalance / 3n, }, ], - weight_limit: new BN(4000000000), + weight_limit: { + refTime: 4000000000n, + proofSize: 110000n, + }, descend_origin: sendingAddress, }) .descend_origin() @@ -170,30 +173,39 @@ describeSuite({ .buy_execution() .push_any({ Transact: { - originType: "SovereignAccount", - requireWeightAtMost: new BN(1000000000), + originKind: "SovereignAccount", + requireWeightAtMost: { + refTime: 1000000000n, + proofSize: 80000n, + }, call: { encoded: transferCallEncoded, }, }, }) - .as_v2(); + .as_v3(); - await injectHrmpMessageAndSeal(context, 1, { + await injectHrmpMessage(context, 1, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); + // Enqueue XCM message + await context.createBlock(); const postValue = await context.polkadotJs().query.transactionPayment.nextFeeMultiplier(); + expect(initialValue.eq(postValue), "Fee Multiplier has changed between blocks").to.be.true; + + // Process xcm message + await context.createBlock(); + const postBalance = (await context.polkadotJs().query.system.account(random.address)).data .free; const postHeight = ( await context.polkadotJs().rpc.chain.getBlock() ).block.header.number.toNumber(); - expect(initialHeight).to.equal(postHeight - 1); + expect(initialHeight).to.equal(postHeight - 2); expect(initialBalance.lt(postBalance), "Expected balances not updated").to.be.true; - expect(initialValue.eq(postValue), "Fee Multiplier has changed between blocks").to.be.true; }, }); @@ -265,7 +277,10 @@ describeSuite({ fungible: transferredBalance / 3n, }, ], - weight_limit: new BN(4000000000), + weight_limit: { + refTime: 4000000000n, + proofSize: 110000n, + }, descend_origin: sendingAddress, }) .descend_origin() @@ -273,30 +288,38 @@ describeSuite({ .buy_execution() .push_any({ Transact: { - originType: "SovereignAccount", - requireWeightAtMost: new BN(1000000000), + originKind: "SovereignAccount", + requireWeightAtMost: { + refTime: 1000000000n, + proofSize: 80000n, + }, call: { encoded: transferCallEncodedV1, }, }, }) - .as_v2(); + .as_v3(); - await injectHrmpMessageAndSeal(context, 1, { + await injectHrmpMessage(context, 1, { type: "XcmVersionedXcm", payload: xcmMessage, } as RawXcmMessage); + // Enqueue XCM message + await context.createBlock(); const postValue = await context.polkadotJs().query.transactionPayment.nextFeeMultiplier(); + expect(initialValue.eq(postValue), "Fee Multiplier has changed between blocks").to.be.true; + + // Process xcm message + await context.createBlock(); + const postBalance = (await context.polkadotJs().query.system.account(random.address)).data .free; const postHeight = ( await context.polkadotJs().rpc.chain.getBlock() ).block.header.number.toNumber(); - - expect(initialHeight).to.equal(postHeight - 1); + expect(initialHeight).to.equal(postHeight - 2); expect(initialBalance.lt(postBalance), "Expected balances not updated").to.be.true; - expect(initialValue.eq(postValue), "Fee Multiplier has changed between blocks").to.be.true; }, }); }, diff --git a/test/suites/dev/moonbase/test-fees/test-length-fees.ts b/test/suites/dev/moonbase/test-fees/test-length-fees.ts index d5c8ade09f..aeac6d0d26 100644 --- a/test/suites/dev/moonbase/test-fees/test-length-fees.ts +++ b/test/suites/dev/moonbase/test-fees/test-length-fees.ts @@ -22,7 +22,7 @@ describeSuite({ title: "should have expensive runtime-upgrade fees", test: async () => { const fee = await testRuntimeUpgrade(context); - expect(fee).toBeLessThanOrEqual(9226801665723667008n); + expect(fee).toBeLessThanOrEqual(9274087607203200560n); }, }); }, diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-1.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-1.ts deleted file mode 100644 index 1a29a86ed1..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-1.ts +++ /dev/null @@ -1,100 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { alith } from "@moonwall/util"; -import { - registerForeignAsset, - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, -} from "../../../../helpers/xcm.js"; - -const palletId = "0x6D6f646c617373746d6E67720000000000000000"; -const statemint_para_id = 1001; -const statemint_assets_pallet_instance = 50; - -const assetMetadata = { - name: "FOREIGN", - symbol: "FOREIGN", - decimals: 12n, - isFrozen: false, -}; -const STATEMINT_LOCATION = { - Xcm: { - parents: 1, - interior: { - X3: [ - { Parachain: statemint_para_id }, - { PalletInstance: statemint_assets_pallet_instance }, - { GeneralIndex: 0 }, - ], - }, - }, -}; - -describeSuite({ - id: "D013908", - title: "Mock XCM - receive horizontal transfer", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let assetId: string; - - beforeAll(async () => { - // registerForeignAsset - const { registeredAssetId, registeredAsset } = await registerForeignAsset( - context, - STATEMINT_LOCATION, - assetMetadata - ); - assetId = registeredAssetId; - expect(registeredAsset.owner.toHex()).to.eq(palletId.toLowerCase()); - }); - - it({ - id: "T01", - title: "Should NOT receive a 10 Statemine tokens to Alith with old prefix", - test: async function () { - // We are going to test that, using the prefix prior to - // https://github.com/paritytech/cumulus/pull/831 - // we cannot receive the tokens on the assetId registed with the old prefix - - // Old prefix: - // Parachain(Statemint parachain) - // GeneralIndex(assetId being transferred) - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 1, - interior: { X2: [{ Parachain: statemint_para_id }, { GeneralIndex: 0n }] }, - }, - fungible: 10000000000000n, - }, - ], - weight_limit: new BN(4000000000), - beneficiary: alith.address, - }) - .reserve_asset_deposited() - .clear_origin() - .buy_execution() - .deposit_asset() - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, statemint_para_id, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - // Make sure the state has ALITH's foreign parachain tokens - const alith_dot_balance = await context - .polkadotJs() - .query.assets.account(assetId, alith.address); - - // The message execution failed - expect(alith_dot_balance.isNone).to.be.true; - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-2.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-2.ts deleted file mode 100644 index 74620dbb2f..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-2.ts +++ /dev/null @@ -1,108 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { alith } from "@moonwall/util"; -import { - registerForeignAsset, - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, -} from "../../../../helpers/xcm.js"; - -const FOREIGN_TOKEN = 1_000_000_000_000n; - -const palletId = "0x6D6f646c617373746d6E67720000000000000000"; -const statemint_para_id = 1001; -const statemint_assets_pallet_instance = 50; - -const assetMetadata = { - name: "FOREIGN", - symbol: "FOREIGN", - decimals: 12n, - isFrozen: false, -}; -const STATEMINT_LOCATION = { - Xcm: { - parents: 1, - interior: { - X3: [ - { Parachain: statemint_para_id }, - { PalletInstance: statemint_assets_pallet_instance }, - { GeneralIndex: 0 }, - ], - }, - }, -}; - -describeSuite({ - id: "D013909", - title: "Mock XCM - receive horizontal transfer", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let assetId: string; - - beforeAll(async () => { - // registerForeignAsset - const { registeredAssetId, registeredAsset } = await registerForeignAsset( - context, - STATEMINT_LOCATION, - assetMetadata - ); - assetId = registeredAssetId; - expect(registeredAsset.owner.toHex()).to.eq(palletId.toLowerCase()); - }); - - it({ - id: "T01", - title: "Should receive a 10 Statemine tokens to Alith with new prefix", - test: async function () { - // We are going to test that, using the prefix after - // https://github.com/paritytech/cumulus/pull/831 - // we can receive the tokens on the assetId registed with the old prefix - - // New prefix: - // Parachain(Statemint parachain) - // PalletInstance(Statemint assets pallet instance) - // GeneralIndex(assetId being transferred) - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 1, - interior: { - X3: [ - { Parachain: statemint_para_id }, - { PalletInstance: statemint_assets_pallet_instance }, - { GeneralIndex: 0n }, - ], - }, - }, - fungible: 10000000000000n, - }, - ], - weight_limit: new BN(4000000000), - beneficiary: alith.address, - }) - .reserve_asset_deposited() - .clear_origin() - .buy_execution() - .deposit_asset() - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, statemint_para_id, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - // Make sure the state has ALITH's foreign parachain tokens - expect( - (await context.polkadotJs().query.assets.account(assetId, alith.address)) - .unwrap() - .balance.toBigInt() - ).to.eq(10n * FOREIGN_TOKEN); - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-3.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-3.ts deleted file mode 100644 index 6679279391..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-3.ts +++ /dev/null @@ -1,98 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { generateKeyringPair } from "@moonwall/util"; -import { - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, - sovereignAccountOfSibling, -} from "../../../../helpers/xcm.js"; - -const foreign_para_id = 2000; - -describeSuite({ - id: "D013910", - title: "Mock XCM - receive horizontal transfer of DEV", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let random: KeyringPair; - let transferredBalance: bigint; - let sovereignAddress: string; - - beforeAll(async () => { - random = generateKeyringPair(); - sovereignAddress = sovereignAccountOfSibling(context, 2000); - transferredBalance = 100000000000000n; - - // We first fund parachain 2000 sovreign account - await context.createBlock( - context.polkadotJs().tx.balances.transferAllowDeath(sovereignAddress, transferredBalance) - ); - const balance = ( - await context.polkadotJs().query.system.account(sovereignAddress) - ).data.free.toBigInt(); - expect(balance).to.eq(transferredBalance); - }); - - it({ - id: "T01", - title: "Should NOT receive MOVR from para Id 2000 with old reanchor", - test: async function () { - const ownParaId = (await context.polkadotJs().query.parachainInfo.parachainId()).toNumber(); - // Get Pallet balances index - const metadata = await context.polkadotJs().rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - - // We are charging 100_000_000 weight for every XCM instruction - // We are executing 4 instructions - // 100_000_000 * 4 * 50000 = 20000000000000 - // We are charging 20 micro DEV for this operation - // The rest should be going to the deposit account - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 1, - interior: { - X2: [{ Parachain: ownParaId }, { PalletInstance: balancesPalletIndex }], - }, - }, - fungible: transferredBalance, - }, - ], - weight_limit: new BN(4000000000), - beneficiary: random.address, - }) - .withdraw_asset() - .clear_origin() - .buy_execution() - .deposit_asset() - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, foreign_para_id, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - // The message should not have been succesfully executed, since old prefix is not supported - // anymore - const balance = ( - await context.polkadotJs().query.system.account(sovereignAddress) - ).data.free.toBigInt(); - expect(balance.toString()).to.eq(transferredBalance.toString()); - - // the random address does not receive anything - const randomBalance = ( - await context.polkadotJs().query.system.account(random.address) - ).data.free.toBigInt(); - expect(randomBalance).to.eq(0n); - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-4.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-4.ts deleted file mode 100644 index 432596e6aa..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-4.ts +++ /dev/null @@ -1,107 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { generateKeyringPair } from "@moonwall/util"; -import { - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, - weightMessage, - sovereignAccountOfSibling, -} from "../../../../helpers/xcm.js"; - -const foreign_para_id = 2000; - -describeSuite({ - id: "D013911", - title: "Mock XCM - receive horizontal transfer of DEV with new reanchor", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let random: KeyringPair; - let transferredBalance: bigint; - let sovereignAddress: string; - - beforeAll(async () => { - random = generateKeyringPair(); - sovereignAddress = sovereignAccountOfSibling(context, 2000); - - transferredBalance = 100000000000000n; - - // We first fund parachain 2000 sovreign account - await context.createBlock( - context.polkadotJs().tx.balances.transferAllowDeath(sovereignAddress, transferredBalance), - { allowFailures: false } - ); - - const balance = ( - await context.polkadotJs().query.system.account(sovereignAddress) - ).data.free.toBigInt(); - expect(balance).to.eq(transferredBalance); - }); - - it({ - id: "T01", - title: "Should receive MOVR from para Id 2000 with new reanchor logic", - test: async function () { - // Get Pallet balances index - const metadata = await context.polkadotJs().rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - - // The rest should be going to the deposit account - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: balancesPalletIndex }, - }, - }, - fungible: transferredBalance, - }, - ], - weight_limit: new BN(4000000000), - beneficiary: random.address, - }) - .withdraw_asset() - .clear_origin() - .buy_execution() - .deposit_asset() - .as_v2(); - - const chargedWeight = await weightMessage( - context, - context.polkadotJs().createType("XcmVersionedXcm", xcmMessage) - ); - // We are charging chargedWeight - // chargedWeight * 50000 = chargedFee - const chargedFee = chargedWeight * 50000n; - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, foreign_para_id, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - // We should expect sovereign balance to be 0, since we have transferred the full amount - const balance = ( - await context.polkadotJs().query.system.account(sovereignAddress) - ).data.free.toBigInt(); - expect(balance.toString()).to.eq(0n.toString()); - - // In the case of the random address: we have transferred 100000000000000, - // but chargedFee have been deducted - // for weight payment - const randomBalance = ( - await context.polkadotJs().query.system.account(random.address) - ).data.free.toBigInt(); - const expectedRandomBalance = transferredBalance - chargedFee; - expect(randomBalance).to.eq(expectedRandomBalance); - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-5.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-5.ts deleted file mode 100644 index 54a860acff..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-5.ts +++ /dev/null @@ -1,135 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; - -import { alith } from "@moonwall/util"; - -import { - registerForeignAsset, - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, -} from "../../../../helpers/xcm.js"; - -const FOREIGN_TOKEN = 1_000_000_000_000n; - -const palletId = "0x6D6f646c617373746d6E67720000000000000000"; -const statemint_para_id = 1001; -const statemint_assets_pallet_instance = 50; - -const assetMetadata = { - name: "FOREIGN", - symbol: "FOREIGN", - decimals: 12n, - isFrozen: false, -}; -const STATEMINT_LOCATION = { - Xcm: { - parents: 1, - interior: { - X3: [ - { Parachain: statemint_para_id }, - { PalletInstance: statemint_assets_pallet_instance }, - { GeneralIndex: 0 }, - ], - }, - }, -}; -const STATEMINT_ASSET_ONE_LOCATION = { - Xcm: { - parents: 1, - interior: { - X3: [ - { Parachain: statemint_para_id }, - { PalletInstance: statemint_assets_pallet_instance }, - { GeneralIndex: 1 }, - ], - }, - }, -}; - -describeSuite({ - id: "D013912", - title: "Mock XCM - receive horizontal transfer", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let assetIdZero: string; - let assetIdOne: string; - - beforeAll(async () => { - // registerForeignAsset 0 - const { registeredAssetId: registeredAssetIdZero, registeredAsset: registeredAssetZero } = - await registerForeignAsset(context, STATEMINT_LOCATION, assetMetadata); - assetIdZero = registeredAssetIdZero; - // registerForeignAsset 1 - const { registeredAssetId: registeredAssetIdOne, registeredAsset: registeredAssetOne } = - await registerForeignAsset(context, STATEMINT_ASSET_ONE_LOCATION, assetMetadata, 0, 1); - assetIdOne = registeredAssetIdOne; - - expect(registeredAssetZero.owner.toHex()).to.eq(palletId.toLowerCase()); - expect(registeredAssetOne.owner.toHex()).to.eq(palletId.toLowerCase()); - }); - - it({ - id: "T01", - title: "Should receive 10 asset 0 tokens using statemint asset 1 as fee", - test: async function () { - // We are going to test that, using one of them as fee payment (assetOne), - // we can receive the other - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 1, - interior: { - X3: [ - { Parachain: statemint_para_id }, - { PalletInstance: statemint_assets_pallet_instance }, - { GeneralIndex: 0n }, - ], - }, - }, - fungible: 10000000000000n, - }, - { - multilocation: { - parents: 1, - interior: { - X3: [ - { Parachain: statemint_para_id }, - { PalletInstance: statemint_assets_pallet_instance }, - { GeneralIndex: 1n }, - ], - }, - }, - fungible: 10000000000000n, - }, - ], - weight_limit: new BN(4000000000), - beneficiary: alith.address, - }) - .reserve_asset_deposited() - .clear_origin() - .buy_execution(1) // buy execution with asset at index 1 - .deposit_asset(2n) - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, statemint_para_id, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - // Make sure the state has ALITH's foreign parachain tokens - const alithAssetZeroBalance = ( - await context.polkadotJs().query.assets.account(assetIdZero, alith.address) - ) - .unwrap() - .balance.toBigInt(); - - expect(alithAssetZeroBalance).to.eq(10n * FOREIGN_TOKEN); - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-6.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-6.ts deleted file mode 100644 index e1ddcc6480..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-asset-transfer-6.ts +++ /dev/null @@ -1,94 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { alith } from "@moonwall/util"; -import { - registerForeignAsset, - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, -} from "../../../../helpers/xcm.js"; - -const palletId = "0x6D6f646c617373746d6E67720000000000000000"; -const statemint_para_id = 1001; -const statemint_assets_pallet_instance = 50; - -const assetMetadata = { - name: "FOREIGN", - symbol: "FOREIGN", - decimals: 12n, - isFrozen: false, -}; -const STATEMINT_LOCATION = { - Xcm: { - parents: 1, - interior: { - X3: [ - { Parachain: statemint_para_id }, - { PalletInstance: statemint_assets_pallet_instance }, - { GeneralIndex: 0 }, - ], - }, - }, -}; - -describeSuite({ - id: "D013913", - title: "Mock XCM - receive horizontal transfer", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let assetId: string; - - beforeAll(async () => { - // registerForeignAsset - const { registeredAssetId, registeredAsset } = await registerForeignAsset( - context, - STATEMINT_LOCATION, - assetMetadata - ); - assetId = registeredAssetId; - expect(registeredAsset.owner.toHex()).to.eq(palletId.toLowerCase()); - }); - - it({ - id: "T01", - title: "Should not receive 10 asset 0 tokens because fee not supported", - test: async function () { - // We are going to test that, using one of them as fee payment (assetOne), - // we can receive the other - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 1, - interior: { X2: [{ Parachain: statemint_para_id }, { GeneralIndex: 0n }] }, - }, - fungible: 10000000000000n, - }, - ], - weight_limit: new BN(4000000000), - beneficiary: alith.address, - }) - .reserve_asset_deposited() - .clear_origin() - .buy_execution() - .deposit_asset(2n) - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, statemint_para_id, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - // Make sure the state has ALITH's foreign parachain tokens - const alithAssetZeroBalance = await context - .polkadotJs() - .query.assets.account(assetId, alith.address); - - expect(alithAssetZeroBalance.isNone).to.eq(true); - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-1.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-1.ts deleted file mode 100644 index f02c040df3..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-1.ts +++ /dev/null @@ -1,103 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { generateKeyringPair } from "@moonwall/util"; -import { - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, - descendOriginFromAddress20, -} from "../../../../helpers/xcm.js"; - -describeSuite({ - id: "D013914", - title: "Mock XCM - receive horizontal transact", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let transferredBalance: bigint; - let sendingAddress: `0x${string}`; - let random: KeyringPair; - - beforeAll(async () => { - const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); - sendingAddress = originAddress; - random = generateKeyringPair(); - transferredBalance = 10_000_000_000_000_000_000n; - - await context.createBlock( - context - .polkadotJs() - .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), - { allowFailures: false } - ); - - const balance = ( - await context.polkadotJs().query.system.account(descendOriginAddress) - ).data.free.toBigInt(); - expect(balance).to.eq(transferredBalance); - }); - - it({ - id: "T01", - title: "Should receive transact and should be able to execute", - test: async function () { - // Get Pallet balances index - const metadata = await context.polkadotJs().rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - - const transferCall = context - .polkadotJs() - .tx.balances.transferAllowDeath(random.address, transferredBalance / 10n); - const transferCallEncoded = transferCall?.method.toHex(); - - // We are going to test that we can receive a transact operation from parachain 1 - // using descendOrigin first - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: balancesPalletIndex }, - }, - }, - fungible: transferredBalance / 2n, - }, - ], - weight_limit: new BN(4000000000), - descend_origin: sendingAddress, - }) - .descend_origin() - .withdraw_asset() - .buy_execution() - .push_any({ - Transact: { - originType: "SovereignAccount", - requireWeightAtMost: new BN(1000000000), - call: { - encoded: transferCallEncoded, - }, - }, - }) - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, 1, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - // Make sure the state has ALITH's foreign parachain tokens - const testAccountBalance = ( - await context.polkadotJs().query.system.account(random.address) - ).data.free.toBigInt(); - - expect(testAccountBalance).to.eq(transferredBalance / 10n); - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-2.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-2.ts deleted file mode 100644 index a86202a9e0..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-2.ts +++ /dev/null @@ -1,104 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { generateKeyringPair } from "@moonwall/util"; -import { - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, - descendOriginFromAddress20, -} from "../../../../helpers/xcm.js"; - -describeSuite({ - id: "D013915", - title: "Mock XCM - receive horizontal transact with two Descends", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let transferredBalance: bigint; - let sendingAddress: `0x${string}`; - let random: KeyringPair; - - beforeAll(async () => { - const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); - sendingAddress = originAddress; - random = generateKeyringPair(); - transferredBalance = 10_000_000_000_000_000_000n; - - await context.createBlock( - context - .polkadotJs() - .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), - { allowFailures: false } - ); - - const balance = ( - await context.polkadotJs().query.system.account(descendOriginAddress) - ).data.free.toBigInt(); - expect(balance).to.eq(transferredBalance); - }); - - it({ - id: "T01", - title: "Should fail to transact because barrier only allows one descend origin", - test: async function () { - // Get Pallet balances index - const metadata = await context.polkadotJs().rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - - const transferCall = context - .polkadotJs() - .tx.balances.transferAllowDeath(random.address, transferredBalance / 10n); - const transferCallEncoded = transferCall?.method.toHex(); - - // We are going to test that we can receive a transact operation from parachain 1 - // using 2 descendOrigin first - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: balancesPalletIndex }, - }, - }, - fungible: transferredBalance / 2n, - }, - ], - weight_limit: new BN(4000000000), - descend_origin: sendingAddress, - }) - .descend_origin() - .descend_origin() - .withdraw_asset() - .buy_execution() - .push_any({ - Transact: { - originType: "SovereignAccount", - requireWeightAtMost: new BN(1000000000), - call: { - encoded: transferCallEncoded, - }, - }, - }) - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, 1, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - // Make sure testAccount did not receive, because barrier prevented it - const testAccountBalance = ( - await context.polkadotJs().query.system.account(random.address) - ).data.free.toBigInt(); - - expect(testAccountBalance).to.eq(0n); - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-3.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-3.ts deleted file mode 100644 index ec60a3669f..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-3.ts +++ /dev/null @@ -1,102 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { generateKeyringPair } from "@moonwall/util"; -import { - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, - descendOriginFromAddress20, -} from "../../../../helpers/xcm.js"; - -describeSuite({ - id: "D013916", - title: "Mock XCM - receive horizontal transact without withdraw", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let transferredBalance: bigint; - let sendingAddress: `0x${string}`; - let random: KeyringPair; - - beforeAll(async () => { - const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); - sendingAddress = originAddress; - random = generateKeyringPair(); - transferredBalance = 10_000_000_000_000_000_000n; - - await context.createBlock( - context - .polkadotJs() - .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), - { allowFailures: false } - ); - - const balance = ( - await context.polkadotJs().query.system.account(descendOriginAddress) - ).data.free.toBigInt(); - expect(balance).to.eq(transferredBalance); - }); - - it({ - id: "T01", - title: "Should fail to transact because barrier does not pass without withdraw", - test: async function () { - // Get Pallet balances index - const metadata = await context.polkadotJs().rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - - const transferCall = context - .polkadotJs() - .tx.balances.transferAllowDeath(random.address, transferredBalance / 10n); - const transferCallEncoded = transferCall?.method.toHex(); - - // We are going to test that we can receive a transact operation from parachain 1 - // using descendOrigin first but without withdraw - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: balancesPalletIndex }, - }, - }, - fungible: transferredBalance / 2n, - }, - ], - weight_limit: new BN(4000000000), - descend_origin: sendingAddress, - }) - .descend_origin() - .buy_execution() - .push_any({ - Transact: { - originType: "SovereignAccount", - requireWeightAtMost: new BN(1000000000), - call: { - encoded: transferCallEncoded, - }, - }, - }) - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, 1, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - // Make sure testAccount did not receive, because barrier prevented it - const testAccountBalance = ( - await context.polkadotJs().query.system.account(random.address) - ).data.free.toBigInt(); - - expect(testAccountBalance).to.eq(0n); - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-4.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-4.ts deleted file mode 100644 index d67fc00ce9..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-4.ts +++ /dev/null @@ -1,102 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { generateKeyringPair } from "@moonwall/util"; -import { - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, - descendOriginFromAddress20, -} from "../../../../helpers/xcm.js"; - -describeSuite({ - id: "D013917", - title: "Mock XCM - receive horizontal transact without buy execution", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let transferredBalance: bigint; - let sendingAddress: `0x${string}`; - let random: KeyringPair; - - beforeAll(async () => { - const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); - sendingAddress = originAddress; - random = generateKeyringPair(); - transferredBalance = 10_000_000_000_000_000_000n; - - await context.createBlock( - context - .polkadotJs() - .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), - { allowFailures: false } - ); - - const balance = ( - await context.polkadotJs().query.system.account(descendOriginAddress) - ).data.free.toBigInt(); - expect(balance).to.eq(transferredBalance); - }); - - it({ - id: "T01", - title: "Should fail to transact because barrier blocks without buy execution", - test: async function () { - // Get Pallet balances index - const metadata = await context.polkadotJs().rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - - const transferCall = context - .polkadotJs() - .tx.balances.transferAllowDeath(random.address, transferredBalance / 10n); - const transferCallEncoded = transferCall?.method.toHex(); - - // We are going to test that we can receive a transact operation from parachain 1 - // using descendOrigin first but without buy execution - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: balancesPalletIndex }, - }, - }, - fungible: transferredBalance / 2n, - }, - ], - weight_limit: new BN(4000000000), - descend_origin: sendingAddress, - }) - .descend_origin() - .withdraw_asset() - .push_any({ - Transact: { - originType: "SovereignAccount", - requireWeightAtMost: new BN(1000000000), - call: { - encoded: transferCallEncoded, - }, - }, - }) - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, 1, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - // Make sure testAccount did not receive, because barrier prevented it - const testAccountBalance = ( - await context.polkadotJs().query.system.account(random.address) - ).data.free.toBigInt(); - - expect(testAccountBalance).to.eq(0n); - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-1.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-1.ts deleted file mode 100644 index 95017ea2a0..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-1.ts +++ /dev/null @@ -1,156 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { generateKeyringPair } from "@moonwall/util"; -import { - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, - descendOriginFromAddress20, -} from "../../../../helpers/xcm.js"; - -describeSuite({ - id: "D013918", - title: "Mock XCM - receive horizontal transact ETHEREUM (transfer)", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let transferredBalance: bigint; - let sendingAddress: `0x${string}`; - let descendAddress: `0x${string}`; - let random: KeyringPair; - - beforeAll(async () => { - const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); - sendingAddress = originAddress; - descendAddress = descendOriginAddress; - random = generateKeyringPair(); - transferredBalance = 10_000_000_000_000_000_000n; - - // We first fund parachain 2000 sovreign account - await context.createBlock( - context - .polkadotJs() - .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), - { allowFailures: false } - ); - - const balance = ( - await context.polkadotJs().query.system.account(descendOriginAddress) - ).data.free.toBigInt(); - expect(balance).to.eq(transferredBalance); - }); - - it({ - id: "T01", - title: "should receive transact and should be able to execute", - test: async function () { - // Get Pallet balances index - const metadata = await context.polkadotJs().rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - - const amountToTransfer = transferredBalance / 10n; - - const xcmTransactions = [ - { - V1: { - gas_limit: 21000, - fee_payment: { - Auto: { - Low: null, - }, - }, - action: { - Call: random.address, - }, - value: amountToTransfer, - input: [], - access_list: null, - }, - }, - { - V2: { - gas_limit: 21000, - action: { - Call: random.address, - }, - value: amountToTransfer, - input: [], - access_list: null, - }, - }, - ]; - - let expectedTransferredAmount = 0n; - let expectedTransferredAmountPlusFees = 0n; - - const targetXcmWeight = 1_325_000_000n + 25_000_000n; - const targetXcmFee = targetXcmWeight * 50_000n; - - for (const xcmTransaction of xcmTransactions) { - expectedTransferredAmount += amountToTransfer; - expectedTransferredAmountPlusFees += amountToTransfer + targetXcmFee; - // TODO need to update lookup types for xcm ethereum transaction V2 - const transferCall = context.polkadotJs().tx.ethereumXcm.transact(xcmTransaction); - const transferCallEncoded = transferCall?.method.toHex(); - - // We are going to test that we can receive a transact operation from parachain 1 - // using descendOrigin first - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: balancesPalletIndex }, - }, - }, - fungible: targetXcmFee, - }, - ], - weight_limit: new BN(targetXcmWeight.toString()), - descend_origin: sendingAddress, - }) - .descend_origin() - .withdraw_asset() - .buy_execution() - .push_any({ - Transact: { - originType: "SovereignAccount", - // 21_000 gas limit + db read - requireWeightAtMost: 550_000_000n, - call: { - encoded: transferCallEncoded, - }, - }, - }) - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, 1, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - // Make sure the state has ALITH's foreign parachain tokens - const testAccountBalance = ( - await context.polkadotJs().query.system.account(random.address) - ).data.free.toBigInt(); - expect(testAccountBalance).to.eq(expectedTransferredAmount); - - // Make sure descend address has been deducted fees once (in xcm-executor) and balance - // has been transfered through evm. - const descendAccountBalance = await context - .viem() - .getBalance({ address: descendAddress }); - expect(BigInt(descendAccountBalance)).to.eq( - transferredBalance - expectedTransferredAmountPlusFees - ); - } - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-10.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-10.ts deleted file mode 100644 index 657bc324ee..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-10.ts +++ /dev/null @@ -1,155 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { Abi, encodeFunctionData } from "viem"; -import { - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, - descendOriginFromAddress20, -} from "../../../../helpers/xcm.js"; - -describeSuite({ - id: "D013919", - title: "Mock XCM - transact ETHEREUM input size check fails", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let transferredBalance: bigint; - let sendingAddress: `0x${string}`; - let contractDeployed: `0x${string}`; - let contractABI: Abi; - - beforeAll(async () => { - const { contractAddress, abi } = await context.deployContract!("CallForwarder"); - contractDeployed = contractAddress; - contractABI = abi; - - const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); - sendingAddress = originAddress; - transferredBalance = 10_000_000_000_000_000_000n; - - // We first fund parachain 2000 sovreign account - await context.createBlock( - context - .polkadotJs() - .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), - { allowFailures: false } - ); - - const balance = ( - await context.polkadotJs().query.system.account(descendOriginAddress) - ).data.free.toBigInt(); - expect(balance).to.eq(transferredBalance); - }); - - it({ - id: "T01", - title: "should fail to call the contract due to BoundedVec restriction", - test: async function () { - // Get Pallet balances index - const metadata = await context.polkadotJs().rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - - // Matches the BoundedVec limit in the runtime. - const CALL_INPUT_SIZE_LIMIT = Math.pow(2, 16); - - const xcmTransactions = [ - { - V1: { - gas_limit: 1000000, - fee_payment: { - Auto: { - Low: null, - }, - }, - action: { - Call: contractDeployed, - }, - value: 0n, - input: encodeFunctionData({ - abi: contractABI, - functionName: "call", - args: [ - "0x0000000000000000000000000000000000000001", - context - .web3() - .utils.bytesToHex(new Uint8Array(CALL_INPUT_SIZE_LIMIT - 127).fill(0)), - ], - }), - access_list: null, - }, - }, - { - V2: { - gas_limit: 1000000, - action: { - Call: contractDeployed, - }, - value: 0n, - input: encodeFunctionData({ - abi: contractABI, - functionName: "call", - args: [ - "0x0000000000000000000000000000000000000001", - context - .web3() - .utils.bytesToHex(new Uint8Array(CALL_INPUT_SIZE_LIMIT - 127).fill(0)), - ], - }), - access_list: null, - }, - }, - ]; - - for (const xcmTransaction of xcmTransactions) { - const transferCall = context.polkadotJs().tx.ethereumXcm.transact(xcmTransaction as any); - const transferCallEncoded = transferCall?.method.toHex(); - // We are going to test that we can receive a transact operation from parachain 1 - // using descendOrigin first - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: balancesPalletIndex }, - }, - }, - fungible: transferredBalance / 2n, - }, - ], - weight_limit: new BN(40000000000), - descend_origin: sendingAddress, - }) - .descend_origin() - .withdraw_asset() - .buy_execution() - .push_any({ - Transact: { - originType: "SovereignAccount", - requireWeightAtMost: 30000000000n, - call: { - encoded: transferCallEncoded, - }, - }, - }) - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, 1, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - const block = await context.viem().getBlock({ blockTag: "latest" }); - // Input size is invalid by 1 byte, expect block to not include a transaction. - // That means the pallet-ethereum-xcm couldn't decode the provided input to a BoundedVec. - expect(block.transactions.length).to.be.eq(0); - } - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-2.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-2.ts deleted file mode 100644 index 58b350477f..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-2.ts +++ /dev/null @@ -1,150 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { Abi, encodeFunctionData } from "viem"; -import { - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, - descendOriginFromAddress20, -} from "../../../../helpers/xcm.js"; - -describeSuite({ - id: "D013920", - title: "Mock XCM - receive horizontal transact ETHEREUM (call)", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let transferredBalance: bigint; - let sendingAddress: `0x${string}`; - let contractDeployed: `0x${string}`; - let contractABI: Abi; - - beforeAll(async () => { - const { contractAddress, abi } = await context.deployContract!("Incrementor"); - contractDeployed = contractAddress; - contractABI = abi; - - const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); - sendingAddress = originAddress; - transferredBalance = 10_000_000_000_000_000_000n; - - // We first fund parachain 2000 sovreign account - await context.createBlock( - context - .polkadotJs() - .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), - { allowFailures: false } - ); - - const balance = ( - await context.polkadotJs().query.system.account(descendOriginAddress) - ).data.free.toBigInt(); - expect(balance).to.eq(transferredBalance); - }); - - it({ - id: "T01", - title: "should receive transact and should be able to execute", - test: async function () { - // Get Pallet balances index - const metadata = await context.polkadotJs().rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - - const xcmTransactions = [ - { - V1: { - gas_limit: 100000, - fee_payment: { - Auto: { - Low: null, - }, - }, - action: { - Call: contractDeployed, - }, - value: 0n, - input: encodeFunctionData({ - abi: contractABI, - functionName: "incr", - args: [], - }), - access_list: null, - }, - }, - { - V2: { - gas_limit: 100000, - action: { - Call: contractDeployed, - }, - value: 0n, - input: encodeFunctionData({ - abi: contractABI, - functionName: "incr", - args: [], - }), - access_list: null, - }, - }, - ]; - - let expectedCalls = 0n; - - for (const xcmTransaction of xcmTransactions) { - expectedCalls++; - - // TODO need to update lookup types for xcm ethereum transaction V2 - const transferCall = context.polkadotJs().tx.ethereumXcm.transact(xcmTransaction); - const transferCallEncoded = transferCall?.method.toHex(); - // We are going to test that we can receive a transact operation from parachain 1 - // using descendOrigin first - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: balancesPalletIndex }, - }, - }, - fungible: transferredBalance / 2n, - }, - ], - weight_limit: new BN(4000000000), - descend_origin: sendingAddress, - }) - .descend_origin() - .withdraw_asset() - .buy_execution() - .push_any({ - Transact: { - originType: "SovereignAccount", - requireWeightAtMost: 3000000000n, - call: { - encoded: transferCallEncoded, - }, - }, - }) - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, 1, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - const actualCalls = await context.readContract!({ - contractAddress: contractDeployed, - contractName: "Incrementor", - functionName: "count", - }); - - expect(BigInt(actualCalls!.toString())).to.eq(expectedCalls); - } - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-3.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-3.ts deleted file mode 100644 index d59dea9f84..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-3.ts +++ /dev/null @@ -1,239 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { Abi, encodeFunctionData } from "viem"; -import { generateKeyringPair } from "@moonwall/util"; -import { - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, - descendOriginFromAddress20, - MultiLocation, - registerForeignAsset, - weightMessage, -} from "../../../../helpers/xcm.js"; - -describeSuite({ - id: "D013921", - title: "Mock XCM - receive horizontal transact ETHEREUM (asset fee)", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - const assetMetadata = { - name: "FOREIGN", - symbol: "FOREIGN", - decimals: 12n, - isFrozen: false, - }; - const statemint_para_id = 1001; - const statemint_assets_pallet_instance = 50; - const palletId = "0x6D6f646c617373746d6E67720000000000000000"; - - const ASSET_MULTILOCATION: MultiLocation = { - parents: 1, - interior: { - X3: [ - { Parachain: statemint_para_id }, - { PalletInstance: statemint_assets_pallet_instance }, - { GeneralIndex: 0n }, - ], - }, - }; - - const STATEMINT_LOCATION = { - Xcm: ASSET_MULTILOCATION, - }; - - let assetId: string; - let sendingAddress: `0x${string}`; - let descendedAddress: `0x${string}`; - let random: KeyringPair; - let contractDeployed: `0x${string}`; - let contractABI: Abi; - - // Gas limit + one db read - const assetsToTransfer = (3_300_000_000n + 25_000_000n) * 2n; - - beforeAll(async () => { - const { contractAddress, abi } = await context.deployContract!("Incrementor"); - - contractDeployed = contractAddress; - contractABI = abi; - - const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); - sendingAddress = originAddress; - descendedAddress = descendOriginAddress; - random = generateKeyringPair(); - - // registerForeignAsset - const { registeredAssetId, registeredAsset } = await registerForeignAsset( - context, - STATEMINT_LOCATION, - assetMetadata, - 1_000_000_000_000 - ); - assetId = registeredAssetId; - expect(registeredAsset.owner.toHex()).to.eq(palletId.toLowerCase()); - - const config = { - assets: [ - { - multilocation: ASSET_MULTILOCATION, - fungible: 0n, - }, - ], - beneficiary: descendOriginAddress, - }; - - // How much will the message weight? - const chargedWeight = await weightMessage( - context, - context - .polkadotJs() - .createType( - "XcmVersionedXcm", - new XcmFragment(config) - .reserve_asset_deposited() - .clear_origin() - .buy_execution() - .deposit_asset() - .as_v2() - ) - ); - - // we modify the config now: - // we send assetsToTransfer plus whatever we will be charged in weight - config.assets[0].fungible = assetsToTransfer + chargedWeight; - - // Construct the real message - const xcmMessage = new XcmFragment(config) - .reserve_asset_deposited() - .clear_origin() - .buy_execution() - .deposit_asset() - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, statemint_para_id, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - // Make sure descended address has the transferred foreign assets (minus the xcm fees). - expect( - (await context.polkadotJs().query.assets.account(assetId, descendedAddress)) - .unwrap() - .balance.toBigInt() - ).to.eq(assetsToTransfer); - }); - - it({ - id: "T01", - title: "should receive transact and should be able to execute", - test: async function () { - const xcmTransactions = [ - { - V1: { - gas_limit: 100000, - fee_payment: { - Auto: { - Low: null, - }, - }, - action: { - Call: contractDeployed, - }, - value: 0n, - input: encodeFunctionData({ - abi: contractABI, - functionName: "incr", - args: [], - }), - access_list: null, - }, - }, - { - V2: { - gas_limit: 100000, - action: { - Call: contractDeployed, - }, - value: 0n, - input: encodeFunctionData({ - abi: contractABI, - functionName: "incr", - args: [], - }), - access_list: null, - }, - }, - ]; - - let expectedCalls = 0n; - - for (const xcmTransaction of xcmTransactions) { - expectedCalls++; - - // TODO need to update lookup types for xcm ethereum transaction V2 - const transferCall = context.polkadotJs().tx.ethereumXcm.transact(xcmTransaction); - const transferCallEncoded = transferCall?.method.toHex(); - - // We are going to test that we can receive a transact operation from parachain 1 - // using descendOrigin first - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: ASSET_MULTILOCATION, - fungible: assetsToTransfer / 2n, - }, - ], - weight_limit: new BN((assetsToTransfer / 2n).toString()), - descend_origin: sendingAddress, - }) - .descend_origin() - .withdraw_asset() - .buy_execution() - .push_any({ - Transact: { - originType: "SovereignAccount", - // 100_000 gas + 1 db read - requireWeightAtMost: 2_525_000_000n, - call: { - encoded: transferCallEncoded, - }, - }, - }) - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, 1, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - const actualCalls = ( - await context.viem().call({ - to: contractDeployed, - data: encodeFunctionData({ abi: contractABI, functionName: "count" }), - }) - ).data; - - expect(BigInt(actualCalls!.toString())).to.eq(expectedCalls); - } - // Make sure descended address went below existential deposit and was killed - expect((await context.polkadotJs().query.assets.account(assetId, descendedAddress)).isNone) - .to.be.true; - // Even if the account does not exist in assets aymore, we still have a nonce 1. Reason is: - // - First transact withdrew 1/2 of assets, nonce was increased to 1. - // - Second transact withdrew the last 1/2 of assets, account was reaped and zeroed. - // - The subsequent evm execution increased the nonce to 1, even without sufficient - // references. - // We can expect this to be the behaviour on any xcm fragment that completely drains an - // account to transact ethereum-xcm after. - const nonce = await context.viem().getTransactionCount({ address: descendedAddress }); - expect(nonce).to.be.eq(1); - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-4.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-4.ts deleted file mode 100644 index 8d82c157dc..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-4.ts +++ /dev/null @@ -1,153 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { generateKeyringPair } from "@moonwall/util"; -import { - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, - descendOriginFromAddress20, -} from "../../../../helpers/xcm.js"; - -describeSuite({ - id: "D013922", - title: "Mock XCM - receive horizontal transact ETHEREUM (proxy)", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let transferredBalance: bigint; - let sendingAddress: `0x${string}`; - let descendAddress: `0x${string}`; - let random: KeyringPair; - - beforeAll(async () => { - const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); - sendingAddress = originAddress; - descendAddress = descendOriginAddress; - random = generateKeyringPair(); - transferredBalance = 10_000_000_000_000_000_000n; - - // We first fund the descend origin derivated address - await context.createBlock( - context - .polkadotJs() - .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), - { allowFailures: false } - ); - - const balance = ( - await context.polkadotJs().query.system.account(descendOriginAddress) - ).data.free.toBigInt(); - expect(balance).to.eq(transferredBalance); - }); - - it({ - id: "T01", - title: "should fail to transact_through_proxy without proxy", - test: async function () { - // Get Pallet balances index - const metadata = await context.polkadotJs().rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - - const amountToTransfer = transferredBalance / 10n; - - const xcmTransactions = [ - { - V1: { - gas_limit: 21000, - fee_payment: { - Auto: { - Low: null, - }, - }, - action: { - Call: random.address, - }, - value: amountToTransfer, - input: [], - access_list: null, - }, - }, - { - V2: { - gas_limit: 21000, - action: { - Call: random.address, - }, - value: amountToTransfer, - input: [], - access_list: null, - }, - }, - ]; - - let feeAmount = 0n; - - // Gas limit + 2 db reads - const targetXcmWeight = 1_325_000_000n + 100_000_000n; - const targetXcmFee = targetXcmWeight * 50_000n; - - for (const xcmTransaction of xcmTransactions) { - feeAmount += targetXcmFee; - // TODO need to update lookup types for xcm ethereum transaction V2 - const transferCall = context - .polkadotJs() - .tx.ethereumXcm.transactThroughProxy(sendingAddress, xcmTransaction); - const transferCallEncoded = transferCall?.method.toHex(); - - // We are going to test that we can receive a transact operation from parachain 1 - // using descendOrigin first - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: balancesPalletIndex }, - }, - }, - fungible: targetXcmFee, - }, - ], - weight_limit: new BN(targetXcmWeight.toString()), - descend_origin: sendingAddress, - }) - .descend_origin() - .withdraw_asset() - .buy_execution() - .push_any({ - Transact: { - originType: "SovereignAccount", - // 100_000 gas + 2 db read - requireWeightAtMost: 575_000_000n, - call: { - encoded: transferCallEncoded, - }, - }, - }) - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, 1, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - // Make sure the state for the transfer recipient didn't change - const testAccountBalance = ( - await context.polkadotJs().query.system.account(random.address) - ).data.free.toBigInt(); - expect(testAccountBalance).to.eq(0n); - - // Make sure the descended address has been deducted fees once (in xcm-executor) but - // transfered nothing. - const descendOriginBalance = await context.viem().getBalance({ address: descendAddress }); - expect(BigInt(descendOriginBalance)).to.eq(transferredBalance - feeAmount); - } - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-5.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-5.ts deleted file mode 100644 index f54cc964de..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-5.ts +++ /dev/null @@ -1,160 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { generateKeyringPair, charleth } from "@moonwall/util"; -import { - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, - descendOriginFromAddress20, -} from "../../../../helpers/xcm.js"; - -describeSuite({ - id: "D013923", - title: "Mock XCM - receive horizontal transact ETHEREUM (proxy)", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let transferredBalance: bigint; - let sendingAddress: `0x${string}`; - let descendAddress: `0x${string}`; - let random: KeyringPair; - - beforeAll(async () => { - const { originAddress, descendOriginAddress } = descendOriginFromAddress20( - context, - charleth.address as `0x${string}` - ); - sendingAddress = originAddress; - descendAddress = descendOriginAddress; - random = generateKeyringPair(); - transferredBalance = 10_000_000_000_000_000_000n; - - // We first fund the descend origin derivated address - await context.createBlock( - context - .polkadotJs() - .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), - { allowFailures: false } - ); - - const balance = ( - await context.polkadotJs().query.system.account(descendOriginAddress) - ).data.free.toBigInt(); - expect(balance).to.eq(transferredBalance); - - // Add proxy with delay 1 - await context.createBlock( - context.polkadotJs().tx.proxy.addProxy(descendAddress, "Any", 1).signAsync(charleth) - ); - }); - - it({ - id: "T01", - title: "should fail to transact_through_proxy with non-zero delay proxy", - test: async function () { - // Get Pallet balances index - const metadata = await context.polkadotJs().rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - - const amountToTransfer = transferredBalance / 10n; - - const xcmTransactions = [ - { - V1: { - gas_limit: 21000, - fee_payment: { - Auto: { - Low: null, - }, - }, - action: { - Call: random.address, - }, - value: amountToTransfer, - input: [], - access_list: null, - }, - }, - { - V2: { - gas_limit: 21000, - action: { - Call: random.address, - }, - value: amountToTransfer, - input: [], - access_list: null, - }, - }, - ]; - - let feeAmount = 0n; - - const targetXcmWeight = 1_325_000_000n + 100_000_000n; - const targetXcmFee = targetXcmWeight * 50_000n; - - for (const xcmTransaction of xcmTransactions) { - feeAmount += targetXcmFee; - // TODO need to update lookup types for xcm ethereum transaction V2 - const transferCall = context - .polkadotJs() - .tx.ethereumXcm.transactThroughProxy(sendingAddress, xcmTransaction); - const transferCallEncoded = transferCall?.method.toHex(); - - // We are going to test that we can receive a transact operation from parachain 1 - // using descendOrigin first - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: balancesPalletIndex }, - }, - }, - fungible: targetXcmFee, - }, - ], - weight_limit: new BN(targetXcmWeight.toString()), - descend_origin: sendingAddress, - }) - .descend_origin() - .withdraw_asset() - .buy_execution() - .push_any({ - Transact: { - originType: "SovereignAccount", - // 100_000 gas + 2 reads - requireWeightAtMost: 575_000_000n, - call: { - encoded: transferCallEncoded, - }, - }, - }) - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, 1, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - // Make sure the state for the transfer recipient didn't change - const testAccountBalance = ( - await context.polkadotJs().query.system.account(random.address) - ).data.free.toBigInt(); - expect(testAccountBalance).to.eq(0n); - - // Make sure the descended address has been deducted fees once (in xcm-executor) but - // transfered nothing. - const descendOriginBalance = await context.viem().getBalance({ address: descendAddress }); - expect(BigInt(descendOriginBalance)).to.eq(transferredBalance - feeAmount); - } - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-6.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-6.ts deleted file mode 100644 index 30974e4072..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-6.ts +++ /dev/null @@ -1,197 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { generateKeyringPair, charleth } from "@moonwall/util"; -import { - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, - descendOriginFromAddress20, -} from "../../../../helpers/xcm.js"; - -describeSuite({ - id: "D013924", - title: "Mock XCM - receive horizontal transact ETHEREUM (proxy)", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let charlethBalance: bigint; - let charlethNonce: number; - let transferredBalance: bigint; - let sendingAddress: `0x${string}`; - let descendAddress: `0x${string}`; - let random: KeyringPair; - - beforeAll(async () => { - const { originAddress, descendOriginAddress } = descendOriginFromAddress20( - context, - charleth.address as `0x${string}` - ); - sendingAddress = originAddress; - descendAddress = descendOriginAddress; - random = generateKeyringPair(); - transferredBalance = 10_000_000_000_000_000_000n; - - // We fund the Delegatee, which will send the xcm and pay fees - await context.createBlock( - context.polkadotJs().tx.balances.transferAllowDeath(descendAddress, transferredBalance), - { allowFailures: false } - ); - - // Ensure funded - const balance_delegatee = ( - await context.polkadotJs().query.system.account(descendAddress) - ).data.free.toBigInt(); - expect(balance_delegatee).to.eq(transferredBalance); - - // Add proxy - await context.createBlock( - context.polkadotJs().tx.proxy.addProxy(descendAddress, "Any", 0).signAsync(charleth) - ); - - // Charleth balance after creating the proxy - charlethBalance = ( - await context.polkadotJs().query.system.account(sendingAddress) - ).data.free.toBigInt(); - - // Charleth nonce - charlethNonce = parseInt( - (await context.polkadotJs().query.system.account(sendingAddress)).nonce.toString() - ); - }); - - it({ - id: "T01", - title: "should succeed to transact_through_proxy with proxy", - test: async function () { - // Get Pallet balances index - const metadata = await context.polkadotJs().rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - - const amountToTransfer = transferredBalance / 10n; - - const xcmTransactions = [ - { - V1: { - gas_limit: 21000, - fee_payment: { - Auto: { - Low: null, - }, - }, - action: { - Call: random.address, - }, - value: amountToTransfer, - input: [], - access_list: null, - }, - }, - { - V2: { - gas_limit: 21000, - action: { - Call: random.address, - }, - value: amountToTransfer, - input: [], - access_list: null, - }, - }, - ]; - - let expectedTransferredAmount = 0n; - let expectedTransferredAmountPlusFees = 0n; - - const targetXcmWeight = 1_325_000_000n + 100_000_000n; - const targetXcmFee = targetXcmWeight * 50_000n; - - for (const xcmTransaction of xcmTransactions) { - expectedTransferredAmount += amountToTransfer; - expectedTransferredAmountPlusFees += amountToTransfer + targetXcmFee; - // TODO need to update lookup types for xcm ethereum transaction V2 - const transferCall = context - .polkadotJs() - .tx.ethereumXcm.transactThroughProxy(sendingAddress, xcmTransaction); - const transferCallEncoded = transferCall?.method.toHex(); - - // We are going to test that we can receive a transact operation from parachain 1 - // using descendOrigin first - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: balancesPalletIndex }, - }, - }, - fungible: targetXcmFee, - }, - ], - weight_limit: new BN(targetXcmWeight.toString()), - descend_origin: sendingAddress, - }) - .descend_origin() - .withdraw_asset() - .buy_execution() - .push_any({ - Transact: { - originType: "SovereignAccount", - // 100_000 gas + 2db reads - requireWeightAtMost: 575_000_000n, - call: { - encoded: transferCallEncoded, - }, - }, - }) - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, 1, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - // The transfer destination - // Make sure the destination address received the funds - const testAccountBalance = ( - await context.polkadotJs().query.system.account(random.address) - ).data.free.toBigInt(); - expect(testAccountBalance).to.eq(expectedTransferredAmount); - - // The EVM caller (proxy delegator) - // Make sure CHARLETH called the evm on behalf DESCENDED, and CHARLETH balance was - // deducted. - const charlethAccountBalance = await context - .viem() - .getBalance({ address: sendingAddress }); - expect(BigInt(charlethAccountBalance)).to.eq(charlethBalance - expectedTransferredAmount); - // Make sure CHARLETH nonce was increased, as EVM caller. - const charlethAccountNonce = await context - .viem() - .getTransactionCount({ address: sendingAddress }); - expect(charlethAccountNonce).to.eq(charlethNonce + 1); - charlethNonce++; - - // The XCM sender (proxy delegatee) - // Make sure derived / descended account paid the xcm fees only. - const derivedAccountBalance = await context - .viem() - .getBalance({ address: descendAddress }); - expect(BigInt(derivedAccountBalance)).to.eq( - transferredBalance - (expectedTransferredAmountPlusFees - expectedTransferredAmount) - ); - // Make sure derived / descended account nonce still zero. - const derivedAccountNonce = await context - .viem() - .getTransactionCount({ address: descendAddress }); - expect(derivedAccountNonce).to.eq(0); - } - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-7.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-7.ts deleted file mode 100644 index 8a97553c87..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-7.ts +++ /dev/null @@ -1,203 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { generateKeyringPair, charleth, alith } from "@moonwall/util"; -import { - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, - descendOriginFromAddress20, -} from "../../../../helpers/xcm.js"; - -describeSuite({ - id: "D013925", - title: "Mock XCM - transact ETHEREUM (proxy) disabled switch", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let charlethBalance: bigint; - let charlethNonce: number; - let transferredBalance: bigint; - let sendingAddress: `0x${string}`; - let descendAddress: `0x${string}`; - let random: KeyringPair; - - beforeAll(async () => { - const { originAddress, descendOriginAddress } = descendOriginFromAddress20( - context, - charleth.address as `0x${string}` - ); - sendingAddress = originAddress; - descendAddress = descendOriginAddress; - random = generateKeyringPair(); - transferredBalance = 10_000_000_000_000_000_000n; - - // We fund the Delegatee, which will send the xcm and pay fees - await context.createBlock( - context.polkadotJs().tx.balances.transferAllowDeath(descendAddress, transferredBalance), - { allowFailures: false } - ); - - // Ensure funded - const balance_delegatee = ( - await context.polkadotJs().query.system.account(descendAddress) - ).data.free.toBigInt(); - expect(balance_delegatee).to.eq(transferredBalance); - - // Add proxy - await context.createBlock( - context.polkadotJs().tx.proxy.addProxy(descendAddress, "Any", 0).signAsync(charleth) - ); - - // Charleth balance after creating the proxy - charlethBalance = ( - await context.polkadotJs().query.system.account(sendingAddress) - ).data.free.toBigInt(); - - // Charleth nonce - charlethNonce = parseInt( - (await context.polkadotJs().query.system.account(sendingAddress)).nonce.toString() - ); - - // We activate the suspension switch - await context.createBlock( - context - .polkadotJs() - .tx.sudo.sudo(context.polkadotJs().tx.ethereumXcm.suspendEthereumXcmExecution()) - .signAsync(alith) - ); - }); - - it({ - id: "T01", - title: "should fail to transact_through_proxy with proxy when disabled", - test: async function () { - // Get Pallet balances index - const metadata = await context.polkadotJs().rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - - const amountToTransfer = transferredBalance / 10n; - - const xcmTransactions = [ - { - V1: { - gas_limit: 21000, - fee_payment: { - Auto: { - Low: null, - }, - }, - action: { - Call: random.address, - }, - value: amountToTransfer, - input: [], - access_list: null, - }, - }, - { - V2: { - gas_limit: 21000, - action: { - Call: random.address, - }, - value: amountToTransfer, - input: [], - access_list: null, - }, - }, - ]; - - let expectedTransferredAmount = 0n; - let expectedTransferredAmountPlusFees = 0n; - - const targetXcmWeight = 1_325_000_000n + 100_000_000n; - const targetXcmFee = targetXcmWeight * 50_000n; - - for (const xcmTransaction of xcmTransactions) { - expectedTransferredAmount += amountToTransfer; - expectedTransferredAmountPlusFees += amountToTransfer + targetXcmFee; - // TODO need to update lookup types for xcm ethereum transaction V2 - const transferCall = context - .polkadotJs() - .tx.ethereumXcm.transactThroughProxy(sendingAddress, xcmTransaction); - const transferCallEncoded = transferCall?.method.toHex(); - - // We are going to test that we can receive a transact operation from parachain 1 - // using descendOrigin first - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: balancesPalletIndex }, - }, - }, - fungible: targetXcmFee, - }, - ], - weight_limit: new BN(targetXcmWeight.toString()), - descend_origin: sendingAddress, - }) - .descend_origin() - .withdraw_asset() - .buy_execution() - .push_any({ - Transact: { - originType: "SovereignAccount", - // 100_000 gas + 2db reads - requireWeightAtMost: 575_000_000n, - call: { - encoded: transferCallEncoded, - }, - }, - }) - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, 1, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - // The transfer destination - // Make sure the destination address did not receive the funds - const testAccountBalance = ( - await context.polkadotJs().query.system.account(random.address) - ).data.free.toBigInt(); - expect(testAccountBalance).to.eq(0n); - - // The EVM caller (proxy delegator) - // Make sure CHARLETH balance was not deducted. - const charlethAccountBalance = await context - .viem() - .getBalance({ address: sendingAddress }); - expect(BigInt(charlethAccountBalance)).to.eq(charlethBalance); - // Make sure CHARLETH nonce did not increase. - const charlethAccountNonce = await context - .viem() - .getTransactionCount({ address: sendingAddress }); - expect(charlethAccountNonce).to.eq(charlethNonce); - - // The XCM sender (proxy delegatee) - // Make sure derived / descended account paid the xcm fees only. - const derivedAccountBalance = await context - .viem() - .getBalance({ address: descendAddress }); - expect(BigInt(derivedAccountBalance)).to.eq( - transferredBalance - (expectedTransferredAmountPlusFees - expectedTransferredAmount) - ); - // Make sure derived / descended account nonce still zero. - const derivedAccountNonce = await context - .viem() - .getTransactionCount({ address: descendAddress }); - expect(derivedAccountNonce).to.eq(0); - } - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-8.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-8.ts deleted file mode 100644 index a7b6d0cd90..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-8.ts +++ /dev/null @@ -1,161 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { generateKeyringPair, alith } from "@moonwall/util"; -import { - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, - descendOriginFromAddress20, -} from "../../../../helpers/xcm.js"; - -describeSuite({ - id: "D013926", - title: "Mock XCM - transact ETHEREUM (non-proxy) disabled switch", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let transferredBalance: bigint; - let sendingAddress: `0x${string}`; - let descendAddress: `0x${string}`; - let random: KeyringPair; - - beforeAll(async () => { - const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); - sendingAddress = originAddress; - descendAddress = descendOriginAddress; - random = generateKeyringPair(); - transferredBalance = 10_000_000_000_000_000_000n; - - // We first fund parachain 2000 sovreign account - await context.createBlock( - context - .polkadotJs() - .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), - { allowFailures: false } - ); - - const balance = ( - await context.polkadotJs().query.system.account(descendOriginAddress) - ).data.free.toBigInt(); - expect(balance).to.eq(transferredBalance); - - // We activate the suspension switch - await context.createBlock( - context - .polkadotJs() - .tx.sudo.sudo(context.polkadotJs().tx.ethereumXcm.suspendEthereumXcmExecution()) - .signAsync(alith) - ); - }); - - it({ - id: "T01", - title: "should receive transact and should not be able to execute", - test: async function () { - // Get Pallet balances index - const metadata = await context.polkadotJs().rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - - const amountToTransfer = transferredBalance / 10n; - - const xcmTransactions = [ - { - V1: { - gas_limit: 21000, - fee_payment: { - Auto: { - Low: null, - }, - }, - action: { - Call: random.address, - }, - value: amountToTransfer, - input: [], - access_list: null, - }, - }, - { - V2: { - gas_limit: 21000, - action: { - Call: random.address, - }, - value: amountToTransfer, - input: [], - access_list: null, - }, - }, - ]; - - let expectedTransferredAmountPlusFees = 0n; - - const targetXcmWeight = 1_325_000_000n + 25_000_000n; - const targetXcmFee = targetXcmWeight * 50_000n; - - for (const xcmTransaction of xcmTransactions) { - expectedTransferredAmountPlusFees += targetXcmFee; - // TODO need to update lookup types for xcm ethereum transaction V2 - const transferCall = context.polkadotJs().tx.ethereumXcm.transact(xcmTransaction); - const transferCallEncoded = transferCall?.method.toHex(); - - // We are going to test that we can receive a transact operation from parachain 1 - // using descendOrigin first - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: balancesPalletIndex }, - }, - }, - fungible: targetXcmFee, - }, - ], - weight_limit: new BN(targetXcmWeight.toString()), - descend_origin: sendingAddress, - }) - .descend_origin() - .withdraw_asset() - .buy_execution() - .push_any({ - Transact: { - originType: "SovereignAccount", - // 21_000 gas limit + db read - requireWeightAtMost: 575_000_000n, - call: { - encoded: transferCallEncoded, - }, - }, - }) - .as_v2(); - - // Send an XCM and create block to execute it - await injectHrmpMessageAndSeal(context, 1, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - // Make sure tokens have not bein transferred - const testAccountBalance = ( - await context.polkadotJs().query.system.account(random.address) - ).data.free.toBigInt(); - expect(testAccountBalance).to.eq(0n); - - // Make sure descend address has been deducted fees once (in xcm-executor) - const descendAddressBalance = await context - .viem() - .getBalance({ address: descendAddress }); - expect(BigInt(descendAddressBalance)).to.eq( - transferredBalance - expectedTransferredAmountPlusFees - ); - } - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-9.ts b/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-9.ts deleted file mode 100644 index d094a008e8..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-hrmp-transact-ethereum-9.ts +++ /dev/null @@ -1,40 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { describeSuite, expect } from "@moonwall/cli"; -import { alith } from "@moonwall/util"; - -describeSuite({ - id: "D013927", - title: "Mock XCM - EthereumXcm only disable by root", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - it({ - id: "T01", - title: "should check suspend ethereum xcm only callable by root", - test: async function () { - let suspended = await context.polkadotJs().query.ethereumXcm.ethereumXcmSuspended(); - // should be not suspended by default - expect(suspended.toHuman()).to.be.false; - - // We try to activate without sudo - await context.createBlock( - context.polkadotJs().tx.ethereumXcm.suspendEthereumXcmExecution().signAsync(alith) - ); - suspended = await context.polkadotJs().query.ethereumXcm.ethereumXcmSuspended(); - // should not have worked, and should still not be suspended - expect(suspended.toHuman()).to.be.false; - - // Now with sudo - await context.createBlock( - context - .polkadotJs() - .tx.sudo.sudo(context.polkadotJs().tx.ethereumXcm.suspendEthereumXcmExecution()) - .signAsync(alith) - ); - - suspended = await context.polkadotJs().query.ethereumXcm.ethereumXcmSuspended(); - // should have worked, and should now be suspended - expect(suspended.toHuman()).to.be.true; - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-xcm-erc20-transfer-two-ERC20.ts b/test/suites/dev/moonbase/test-xcm-v2/test-xcm-erc20-transfer-two-ERC20.ts deleted file mode 100644 index c14ca6450a..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-xcm-erc20-transfer-two-ERC20.ts +++ /dev/null @@ -1,272 +0,0 @@ -import { beforeEach, describeSuite, expect } from "@moonwall/cli"; -import { ALITH_ADDRESS, BALTATHAR_ADDRESS, CHARLETH_ADDRESS, alith } from "@moonwall/util"; -import { ApiPromise } from "@polkadot/api"; -import { parseEther } from "ethers"; -import { expectEVMResult, getTransactionFees } from "../../../../helpers"; -import { - XcmFragment, - XcmFragmentConfig, - injectHrmpMessageAndSeal, - sovereignAccountOfSibling, -} from "../../../../helpers/xcm.js"; - -export const ERC20_TOTAL_SUPPLY = 1_000_000_000n; - -describeSuite({ - id: "D013928", - title: "Mock XCM - Send two local ERC20", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let erc20ContractAddress1: string; - let erc20ContractAddress2: string; - - let polkadotJs: ApiPromise; - - beforeEach(async function () { - polkadotJs = context.polkadotJs(); - - // Deploy first contract - const contract1 = await context.deployContract!("ERC20WithInitialSupply", { - args: ["First", "FIR", ALITH_ADDRESS, ERC20_TOTAL_SUPPLY], - }); - erc20ContractAddress1 = contract1.contractAddress; - expect(contract1.status).eq("success"); - - // Deploy second contract - const contract2 = await context.deployContract!("ERC20WithInitialSupply", { - args: ["Second", "SEC", ALITH_ADDRESS, ERC20_TOTAL_SUPPLY], - }); - erc20ContractAddress2 = contract2.contractAddress; - expect(contract2.status).eq("success"); - }); - - it({ - id: "T01", - title: "Should be able to transfer two ERC20 tokens through xtokens precompile", - test: async function () { - const amountTransferred = 1000n; - - const balanceBefore = ( - await polkadotJs.query.system.account(ALITH_ADDRESS) - ).data.free.toBigInt(); - - // Destination as multilocation - const destination = [ - // one parent - 1, - // This represents X1(AccountKey20(BALTATHAR_ADDRESS, NetworkAny)) - // AccountKey20 variant (03) + the 20 bytes account + Any network variant (00) - ["0x03" + BALTATHAR_ADDRESS.slice(2) + "00"], - ]; - - const currency1 = [erc20ContractAddress1, amountTransferred]; - const currency2 = [erc20ContractAddress2, amountTransferred]; - - const rawTx = await context.writePrecompile!({ - precompileName: "Xtokens", - functionName: "transferMultiCurrencies", - args: [ - // address of the multiassets - [currency1, currency2], - // index fee - 1n, - // Destination as multilocation - destination, - // weight - 500_000_000n, - ], - rawTxOnly: true, - }); - - const { result } = await context.createBlock(rawTx); - expectEVMResult(result!.events, "Succeed"); - - const fees = await getTransactionFees(context, result!.hash); - - const balanceAfter = ( - await polkadotJs.query.system.account(ALITH_ADDRESS) - ).data.free.toBigInt(); - - // Fees should have been spent - expect(balanceAfter).to.equal(balanceBefore - fees); - - // Erc20 tokens of the first contract should have been spent - expect( - await context.readContract!({ - contractName: "ERC20WithInitialSupply", - contractAddress: erc20ContractAddress1 as `0x${string}`, - functionName: "balanceOf", - args: [ALITH_ADDRESS], - }) - ).equals(ERC20_TOTAL_SUPPLY - amountTransferred); - - // Erc20 tokens of the second contract should have been spent - expect( - await context.readContract!({ - contractName: "ERC20WithInitialSupply", - contractAddress: erc20ContractAddress2 as `0x${string}`, - functionName: "balanceOf", - args: [ALITH_ADDRESS], - }) - ).equals(ERC20_TOTAL_SUPPLY - amountTransferred); - }, - }); - it({ - id: "T02", - title: "Should not be able to transfer two ERC20 through incoming XCM message", - test: async function () { - const paraId = 888; - const paraSovereign = sovereignAccountOfSibling(context, paraId); - const amountTransferredOf1 = 1_000_000n; - const amountTransferredOf2 = 2_000_000n; - - // Get pallet indices - const metadata = await polkadotJs.rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - const erc20XcmPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Erc20XcmBridge")! - .index.toNumber(); - - // Send some native tokens to the sovereign account of paraId (to pay fees) - await polkadotJs.tx.balances - .transferAllowDeath(paraSovereign, parseEther("1")) - .signAndSend(alith); - await context.createBlock(); - - // Send some erc20 tokens (of first contract) to the sovereign account of paraId - const rawTx = await context.writeContract!({ - contractName: "ERC20WithInitialSupply", - contractAddress: erc20ContractAddress1 as `0x${string}`, - functionName: "transfer", - args: [paraSovereign, amountTransferredOf1], - rawTxOnly: true, - }); - - const { result } = await context.createBlock(rawTx); - expectEVMResult(result!.events, "Succeed"); - - // Check the sovereign account has received ERC20 tokens (of first contract) - expect( - await context.readContract!({ - contractName: "ERC20WithInitialSupply", - contractAddress: erc20ContractAddress1 as `0x${string}`, - functionName: "balanceOf", - args: [paraSovereign], - }) - ).equals(amountTransferredOf1); - - // Send some ERC20 tokens (of second contract) to the sovereign account of paraId - const rawTx2 = await context.writeContract!({ - contractName: "ERC20WithInitialSupply", - contractAddress: erc20ContractAddress2 as `0x${string}`, - functionName: "transfer", - args: [paraSovereign, amountTransferredOf2], - rawTxOnly: true, - }); - - const { result: result2 } = await context.createBlock(rawTx2); - expectEVMResult(result2!.events, "Succeed"); - - // Check the sovereign account has received ERC20 tokens (of second contract) - expect( - await context.readContract!({ - contractName: "ERC20WithInitialSupply", - contractAddress: erc20ContractAddress2 as `0x${string}`, - functionName: "balanceOf", - args: [paraSovereign], - }) - ).equals(amountTransferredOf2); - - // Create the xcm message to send ERC20s to Charleth - const config: XcmFragmentConfig = { - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: balancesPalletIndex }, - }, - }, - fungible: 1_000_000_000_000_000n, - }, - { - multilocation: { - parents: 0, - interior: { - X2: [ - { - PalletInstance: erc20XcmPalletIndex, - }, - { - AccountKey20: { - network: "Any", - key: erc20ContractAddress2, - }, - }, - ], - }, - }, - fungible: amountTransferredOf2, - }, - { - multilocation: { - parents: 0, - interior: { - X2: [ - { - PalletInstance: erc20XcmPalletIndex, - }, - { - AccountKey20: { - network: "Any", - key: erc20ContractAddress1, - }, - }, - ], - }, - }, - fungible: amountTransferredOf1, - }, - ], - beneficiary: CHARLETH_ADDRESS, - }; - - // Build the xcm message - const xcmMessage = new XcmFragment(config) - .withdraw_asset() - .clear_origin() - .buy_execution() - .deposit_asset(3n) - .as_v2(); - - // Mock the reception of the xcm message - await injectHrmpMessageAndSeal(context, paraId, { - type: "XcmVersionedXcm", - payload: xcmMessage, - }); - - // Erc20 tokens (of first contract) should have been received in Charleth's address - expect( - await context.readContract!({ - contractName: "ERC20WithInitialSupply", - contractAddress: erc20ContractAddress1 as `0x${string}`, - functionName: "balanceOf", - args: [CHARLETH_ADDRESS], - }) - ).equals(0n); - - // Erc20 tokens (of second contract) should have been received in Charleth's address - expect( - await context.readContract!({ - contractName: "ERC20WithInitialSupply", - contractAddress: erc20ContractAddress2 as `0x${string}`, - functionName: "balanceOf", - args: [CHARLETH_ADDRESS], - }) - ).equals(0n); - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-xcm-erc20-transfer.ts b/test/suites/dev/moonbase/test-xcm-v2/test-xcm-erc20-transfer.ts deleted file mode 100644 index 9936583f18..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-xcm-erc20-transfer.ts +++ /dev/null @@ -1,196 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeEach, describeSuite, expect } from "@moonwall/cli"; -import { ALITH_ADDRESS, BALTATHAR_ADDRESS, CHARLETH_ADDRESS, alith } from "@moonwall/util"; -import { ApiPromise } from "@polkadot/api"; -import { parseEther } from "ethers"; -import { expectEVMResult, getTransactionFees } from "../../../../helpers"; -import { - XcmFragment, - XcmFragmentConfig, - injectHrmpMessageAndSeal, - sovereignAccountOfSibling, -} from "../../../../helpers/xcm.js"; - -export const ERC20_TOTAL_SUPPLY = 1_000_000_000n; - -describeSuite({ - id: "D013929", - title: "Mock XCM - Send local erc20", - foundationMethods: "dev", - testCases: ({ context, it }) => { - let erc20ContractAddress: string; - let polkadotJs: ApiPromise; - - beforeEach(async function () { - polkadotJs = context.polkadotJs(); - - const { contractAddress, status } = await context.deployContract!("ERC20WithInitialSupply", { - args: ["ERC20", "20S", ALITH_ADDRESS, ERC20_TOTAL_SUPPLY], - }); - erc20ContractAddress = contractAddress; - expect(status).eq("success"); - }); - - it({ - id: "T01", - title: "Should be able to transfer ERC20 token through xcm with xtokens precompile", - test: async function () { - const amountTransferred = 10n; - - // Destination as multilocation - const destination = [ - // one parent - 1, - // This represents X1(AccountKey20(BALTATHAR_ADDRESS, NetworkAny)) - // AccountKey20 variant (03) + the 20 bytes account + Any network variant (00) - ["0x03" + BALTATHAR_ADDRESS.slice(2) + "00"], - ]; - - const balanceBefore = ( - await polkadotJs.query.system.account(ALITH_ADDRESS) - ).data.free.toBigInt(); - - const rawTx = await context.writePrecompile!({ - precompileName: "Xtokens", - functionName: "transfer", - args: [ - // address of the multiasset - erc20ContractAddress, - // amount - amountTransferred, - // Destination as multilocation - destination, - // weight - 500_000n, - ], - gas: 500_000n, - rawTxOnly: true, - }); - - const { result } = await context.createBlock(rawTx); - expectEVMResult(result!.events, "Succeed"); - - const balanceAfter = ( - await polkadotJs.query.system.account(ALITH_ADDRESS) - ).data.free.toBigInt(); - - const fees = await getTransactionFees(context, result!.hash); - - // Fees should have been spent - expect(balanceAfter).to.equal(balanceBefore - fees); - - expect( - await context.readContract!({ - contractName: "ERC20WithInitialSupply", - contractAddress: erc20ContractAddress as `0x${string}`, - functionName: "balanceOf", - args: [ALITH_ADDRESS], - }) - ).equals(ERC20_TOTAL_SUPPLY - amountTransferred); - }, - }); - - it({ - id: "T02", - title: "Mock XCM - Receive back erc20", - test: async function () { - const paraId = 888; - const paraSovereign = sovereignAccountOfSibling(context, paraId); - const amountTransferred = 1_000n; - - // Get pallet indices - const metadata = await polkadotJs.rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - const erc20XcmPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Erc20XcmBridge")! - .index.toNumber(); - - // Send some native tokens to the sovereign account of paraId (to pay fees) - await polkadotJs.tx.balances - .transferAllowDeath(paraSovereign, parseEther("1")) - .signAndSend(alith); - await context.createBlock(); - - // Send some erc20 tokens to the sovereign account of paraId - const rawTx = await context.writeContract!({ - contractName: "ERC20WithInitialSupply", - contractAddress: erc20ContractAddress as `0x${string}`, - functionName: "transfer", - args: [paraSovereign, amountTransferred], - rawTxOnly: true, - }); - - const { result } = await context.createBlock(rawTx); - expectEVMResult(result!.events, "Succeed"); - - expect( - await context.readContract!({ - contractName: "ERC20WithInitialSupply", - contractAddress: erc20ContractAddress as `0x${string}`, - functionName: "balanceOf", - args: [paraSovereign], - }) - ).equals(amountTransferred); - - // Create the incoming xcm message - const config: XcmFragmentConfig = { - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: Number(balancesPalletIndex) }, - }, - }, - fungible: 100_000_000_000_000_000n, - }, - { - multilocation: { - parents: 0, - interior: { - X2: [ - { - PalletInstance: erc20XcmPalletIndex, - }, - { - AccountKey20: { - network: "Any", - key: erc20ContractAddress, - }, - }, - ], - }, - }, - fungible: amountTransferred, - }, - ], - beneficiary: CHARLETH_ADDRESS, - }; - - const xcmMessage = new XcmFragment(config) - .withdraw_asset() - .clear_origin() - .buy_execution() - .deposit_asset(2n) - .as_v2(); - - // Mock the reception of the xcm message - await injectHrmpMessageAndSeal(context, paraId, { - type: "XcmVersionedXcm", - payload: xcmMessage, - }); - - expect( - await context.readContract!({ - contractName: "ERC20WithInitialSupply", - contractAddress: erc20ContractAddress as `0x${string}`, - functionName: "balanceOf", - args: [CHARLETH_ADDRESS], - }) - ).equals(amountTransferred); - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-xcm-ver-conversion-1.ts b/test/suites/dev/moonbase/test-xcm-v2/test-xcm-ver-conversion-1.ts deleted file mode 100644 index 11df63b990..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-xcm-ver-conversion-1.ts +++ /dev/null @@ -1,101 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { generateKeyringPair } from "@moonwall/util"; -import { - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, - weightMessage, - sovereignAccountOfSibling, -} from "../../../../helpers/xcm.js"; - -const foreign_para_id = 2000; - -describeSuite({ - id: "D013930", - title: "XCM Moonbase: version compatibility", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let transferredBalance: bigint; - let sovereignAddress: string; - let random: KeyringPair; - - beforeAll(async () => { - random = generateKeyringPair(); - sovereignAddress = sovereignAccountOfSibling(context, 2000); - transferredBalance = 100000000000000n; - - await context.createBlock( - context.polkadotJs().tx.balances.transferAllowDeath(sovereignAddress, transferredBalance), - { allowFailures: false } - ); - - const balance = ( - await context.polkadotJs().query.system.account(sovereignAddress) - ).data.free.toBigInt(); - expect(balance).to.eq(transferredBalance); - }); - - it({ - id: "T01", - title: "Should execute v2 message", - test: async function () { - const metadata = await context.polkadotJs().rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: balancesPalletIndex }, - }, - }, - fungible: transferredBalance, - }, - ], - weight_limit: new BN(8000000000), - beneficiary: random.address, - }) - .withdraw_asset() - .clear_origin() - .buy_execution() - .deposit_asset() - .as_v2(); - - const chargedWeight = await weightMessage( - context, - context.polkadotJs().createType("XcmVersionedXcm", xcmMessage) - ); - - const chargedFee = chargedWeight * 50000n; - - await injectHrmpMessageAndSeal(context, foreign_para_id, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - const balance = ( - await context.polkadotJs().query.system.account(sovereignAddress) - ).data.free.toBigInt(); - expect(balance.toString(), "Sovereign account not empty, transfer has failed").to.eq( - 0n.toString() - ); - - const randomBalance = ( - await context.polkadotJs().query.system.account(random.address) - ).data.free.toBigInt(); - const expectedRandomBalance = transferredBalance - chargedFee; - expect(randomBalance, "Balance not increased, transfer has failed").to.eq( - expectedRandomBalance - ); - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-xcm-ver-conversion-2.ts b/test/suites/dev/moonbase/test-xcm-v2/test-xcm-ver-conversion-2.ts deleted file mode 100644 index 4b0c206afd..0000000000 --- a/test/suites/dev/moonbase/test-xcm-v2/test-xcm-ver-conversion-2.ts +++ /dev/null @@ -1,102 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - -import { BN } from "@polkadot/util"; -import { KeyringPair } from "@polkadot/keyring/types"; -import { generateKeyringPair } from "@moonwall/util"; -import { - XcmFragment, - RawXcmMessage, - injectHrmpMessageAndSeal, - weightMessage, - sovereignAccountOfSibling, -} from "../../../../helpers/xcm.js"; - -const foreign_para_id = 2000; - -describeSuite({ - id: "D013931", - title: "XCM Moonriver: version compatibility", - foundationMethods: "dev", - chainType: "moonriver", - testCases: ({ context, it, log }) => { - let transferredBalance: bigint; - let sovereignAddress: string; - let random: KeyringPair; - - beforeAll(async () => { - random = generateKeyringPair(); - sovereignAddress = sovereignAccountOfSibling(context, 2000); - transferredBalance = 100000000000000n; - - await context.createBlock( - context.polkadotJs().tx.balances.transferAllowDeath(sovereignAddress, transferredBalance), - { allowFailures: false } - ); - - const balance = ( - await context.polkadotJs().query.system.account(sovereignAddress) - ).data.free.toBigInt(); - expect(balance).to.eq(transferredBalance); - }); - - it({ - id: "T01", - title: "Should execute v2 message", - test: async function () { - const metadata = await context.polkadotJs().rpc.state.getMetadata(); - const balancesPalletIndex = metadata.asLatest.pallets - .find(({ name }) => name.toString() == "Balances")! - .index.toNumber(); - - const xcmMessage = new XcmFragment({ - assets: [ - { - multilocation: { - parents: 0, - interior: { - X1: { PalletInstance: balancesPalletIndex }, - }, - }, - fungible: transferredBalance, - }, - ], - weight_limit: new BN(8000000000), - beneficiary: random.address, - }) - .withdraw_asset() - .clear_origin() - .buy_execution() - .deposit_asset() - .as_v2(); - - const chargedWeight = await weightMessage( - context, - context.polkadotJs().createType("XcmVersionedXcm", xcmMessage) - ); - - const chargedFee = chargedWeight * 50000n; - - await injectHrmpMessageAndSeal(context, foreign_para_id, { - type: "XcmVersionedXcm", - payload: xcmMessage, - } as RawXcmMessage); - - const balance = ( - await context.polkadotJs().query.system.account(sovereignAddress) - ).data.free.toBigInt(); - expect(balance.toString(), "Sovereign account not empty, transfer has failed").to.eq( - 0n.toString() - ); - - const randomBalance = ( - await context.polkadotJs().query.system.account(random.address) - ).data.free.toBigInt(); - const expectedRandomBalance = transferredBalance - chargedFee; - expect(randomBalance, "Balance not increased, transfer has failed").to.eq( - expectedRandomBalance - ); - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-1.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-1.ts similarity index 98% rename from test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-1.ts rename to test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-1.ts index 5f99771e3e..e63c020800 100644 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-1.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-1.ts @@ -56,10 +56,10 @@ describeSuite({ // But since there is no error, and the deposit is on the error handler, the assets // will be trapped .with(function () { - return this.set_error_handler_with([this.deposit_asset]); + return this.set_error_handler_with([this.deposit_asset_v3]); }) .clear_origin() - .as_v2(); + .as_v4(); const receivedMessage: XcmVersionedXcm = context .polkadotJs() diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-2.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-2.ts similarity index 98% rename from test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-2.ts rename to test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-2.ts index 57e3672292..0a7bd16858 100644 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-2.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-2.ts @@ -55,10 +55,10 @@ describeSuite({ // BuyExecution does not charge for fees because we registered it for not doing so // As a consequence the trapped assets will be entirely credited .with(function () { - return this.set_error_handler_with([this.deposit_asset]); + return this.set_error_handler_with([this.deposit_asset_v3]); }) .trap() - .as_v2(); + .as_v4(); const receivedMessage: XcmVersionedXcm = context .polkadotJs() diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-3.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-3.ts similarity index 96% rename from test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-3.ts rename to test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-3.ts index d54573717a..79a773038a 100644 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-3.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-3.ts @@ -54,9 +54,9 @@ describeSuite({ .buy_execution() // Set an appendix to be executed after the XCM message is executed. No matter if errors .with(function () { - return this.set_appendix_with([this.deposit_asset]); + return this.set_appendix_with([this.deposit_asset_v3]); }) - .as_v2(); + .as_v4(); const receivedMessage: XcmVersionedXcm = context .polkadotJs() diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-4.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-4.ts similarity index 96% rename from test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-4.ts rename to test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-4.ts index 9090a47f38..0a30b28735 100644 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-4.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-4.ts @@ -56,10 +56,10 @@ describeSuite({ // As a consequence the trapped assets will be entirely credited // The goal is to show appendix runs even if there is an error .with(function () { - return this.set_appendix_with([this.deposit_asset]); + return this.set_appendix_with([this.deposit_asset_v3]); }) .trap() - .as_v2(); + .as_v4(); const receivedMessage: XcmVersionedXcm = context .polkadotJs() diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-5.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-5.ts similarity index 96% rename from test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-5.ts rename to test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-5.ts index 91bfd1e2cb..8ada70133c 100644 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-5.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-5.ts @@ -56,10 +56,10 @@ describeSuite({ // As a consequence the trapped assets will be entirely credited // The goal is to show appendix runs even if there is an error .with(function () { - return this.set_appendix_with([this.deposit_asset]); + return this.set_appendix_with([this.deposit_asset_v3]); }) .trap() - .as_v2(); + .as_v4(); const receivedMessage: XcmVersionedXcm = context .polkadotJs() diff --git a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-6.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-6.ts similarity index 95% rename from test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-6.ts rename to test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-6.ts index 59fc24c618..079925e042 100644 --- a/test/suites/dev/moonbase/test-xcm-v2/test-mock-dmp-error-and-appendix-6.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-6.ts @@ -34,7 +34,7 @@ describeSuite({ // BuyExecution does not charge for fees because we registered it for not doing so // But since there is no error, and the deposit is on the error handler, the assets // will be trapped. - // Goal is to trapp assets, so that later can be claimed + // Goal is to trap assets, so that later can be claimed // Since we only BuyExecution, but we do not do anything with the assets after that, // they are trapped const xcmMessage = new XcmFragment({ @@ -52,7 +52,7 @@ describeSuite({ }) .reserve_asset_deposited() .buy_execution() - .as_v2(); + .as_v4(); const receivedMessage: XcmVersionedXcm = context .polkadotJs() @@ -64,6 +64,7 @@ describeSuite({ // Create a block in which the XCM will be executed await context.createBlock(); + await context.createBlock(); // Make sure ALITH did not reveive anything const alith_dot_balance = await context @@ -97,8 +98,8 @@ describeSuite({ .claim_asset() .buy_execution() // Deposit assets, this time correctly, on Alith - .deposit_asset() - .as_v2(); + .deposit_asset_v3() + .as_v4(); const receivedMessage: XcmVersionedXcm = context .polkadotJs() From 6e2c17e85772e80451754bfaf45c9ac9d55d890c Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Mon, 18 Mar 2024 20:01:20 +0000 Subject: [PATCH 49/80] add xcm v4 tests --- test/helpers/xcm.ts | 17 +- .../test-xcmv3-new-instructions.ts | 2 - .../test-mock-hrmp-asset-transfer-1.ts | 100 +++++++ .../test-mock-hrmp-asset-transfer-2.ts | 110 +++++++ .../test-mock-hrmp-asset-transfer-3.ts | 100 +++++++ .../test-mock-hrmp-asset-transfer-4.ts | 109 +++++++ .../test-mock-hrmp-asset-transfer-5.ts | 137 +++++++++ .../test-mock-hrmp-asset-transfer-6.ts | 96 +++++++ .../test-xcm-v4/test-mock-hrmp-transact-1.ts | 108 +++++++ .../test-xcm-v4/test-mock-hrmp-transact-2.ts | 109 +++++++ .../test-xcm-v4/test-mock-hrmp-transact-3.ts | 107 +++++++ .../test-xcm-v4/test-mock-hrmp-transact-4.ts | 107 +++++++ .../test-mock-hrmp-transact-ethereum-1.ts | 161 +++++++++++ .../test-mock-hrmp-transact-ethereum-10.ts | 160 +++++++++++ .../test-mock-hrmp-transact-ethereum-2.ts | 155 ++++++++++ .../test-mock-hrmp-transact-ethereum-4.ts | 158 ++++++++++ .../test-mock-hrmp-transact-ethereum-5.ts | 165 +++++++++++ .../test-mock-hrmp-transact-ethereum-6.ts | 202 +++++++++++++ .../test-mock-hrmp-transact-ethereum-7.ts | 208 ++++++++++++++ .../test-mock-hrmp-transact-ethereum-8.ts | 166 +++++++++++ .../test-mock-hrmp-transact-ethereum-9.ts | 40 +++ .../test-xcm-erc20-transfer-two-ERC20.ts | 272 ++++++++++++++++++ .../test-xcm-v4/test-xcm-erc20-transfer.ts | 196 +++++++++++++ .../test-xcm-v4/test-xcm-ver-conversion-1.ts | 103 +++++++ .../test-xcm-v4/test-xcm-ver-conversion-2.ts | 103 +++++++ 25 files changed, 3183 insertions(+), 8 deletions(-) create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-1.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-2.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-3.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-4.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-5.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-6.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-1.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-2.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-3.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-4.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-1.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-10.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-2.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-4.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-5.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-6.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-7.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-8.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-9.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-xcm-erc20-transfer-two-ERC20.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-xcm-erc20-transfer.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-xcm-ver-conversion-1.ts create mode 100644 test/suites/dev/moonbase/test-xcm-v4/test-xcm-ver-conversion-2.ts diff --git a/test/helpers/xcm.ts b/test/helpers/xcm.ts index c2764a27cc..c509b36d49 100644 --- a/test/helpers/xcm.ts +++ b/test/helpers/xcm.ts @@ -497,16 +497,21 @@ export class XcmFragment { const patchLocationV4recursively = (value: any) => { // e.g. Convert this: { X1: { Parachain: 1000 } } to { X1: [ { Parachain: 1000 } ] } if (value && typeof value == "object") { - Object.keys(value).forEach((k) => { - if (k == "Concrete" || k == "Abstract") { - value = value[k]; + if (Array.isArray(value)) { + return value.map(patchLocationV4recursively); + } + for (const k of Object.keys(value)) { + if (k === "Concrete" || k === "Abstract") { + return patchLocationV4recursively(value[k]); } - if (k.match(/^X\d$/g)) { - value[k] = Object.entries(value[k]).map(([k, v]) => ({ [k]: v })); + if (k.match(/^X\d$/g) && !Array.isArray(value[k])) { + value[k] = Object.entries(value[k]).map(([k, v]) => ({ + [k]: patchLocationV4recursively(v), + })); } else { value[k] = patchLocationV4recursively(value[k]); } - }); + } } return value; }; diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts index 4f1f3417ed..89b018a2d5 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts @@ -413,8 +413,6 @@ describeSuite({ .map((e) => e.event.data.toHuman() as { success: boolean }) .filter(({ success }) => !success); - await new Promise((r) => setTimeout(r, 120000)); - expect(events).to.have.lengthOf(1); // pallet-message-queue does not show an error when "success" is false. // https://github.com/paritytech/polkadot-sdk/issues/478 diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-1.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-1.ts new file mode 100644 index 0000000000..428181e1de --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-1.ts @@ -0,0 +1,100 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { BN } from "@polkadot/util"; +import { alith } from "@moonwall/util"; +import { + registerForeignAsset, + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, +} from "../../../../helpers/xcm.js"; + +const palletId = "0x6D6f646c617373746d6E67720000000000000000"; +const statemint_para_id = 1001; +const statemint_assets_pallet_instance = 50; + +const assetMetadata = { + name: "FOREIGN", + symbol: "FOREIGN", + decimals: 12n, + isFrozen: false, +}; +const STATEMINT_LOCATION = { + Xcm: { + parents: 1, + interior: { + X3: [ + { Parachain: statemint_para_id }, + { PalletInstance: statemint_assets_pallet_instance }, + { GeneralIndex: 0 }, + ], + }, + }, +}; + +describeSuite({ + id: "D013908", + title: "Mock XCM - receive horizontal transfer", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let assetId: string; + + beforeAll(async () => { + // registerForeignAsset + const { registeredAssetId, registeredAsset } = await registerForeignAsset( + context, + STATEMINT_LOCATION, + assetMetadata + ); + assetId = registeredAssetId; + expect(registeredAsset.owner.toHex()).to.eq(palletId.toLowerCase()); + }); + + it({ + id: "T01", + title: "Should NOT receive a 10 Statemine tokens to Alith with old prefix", + test: async function () { + // We are going to test that, using the prefix prior to + // https://github.com/paritytech/cumulus/pull/831 + // we cannot receive the tokens on the assetId registed with the old prefix + + // Old prefix: + // Parachain(Statemint parachain) + // GeneralIndex(assetId being transferred) + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 1, + interior: { X2: [{ Parachain: statemint_para_id }, { GeneralIndex: 0n }] }, + }, + fungible: 10000000000000n, + }, + ], + weight_limit: new BN(4000000000), + beneficiary: alith.address, + }) + .reserve_asset_deposited() + .clear_origin() + .buy_execution() + .deposit_asset_v3() + .as_v4(); + + // Send an XCM and create block to execute it + await injectHrmpMessageAndSeal(context, statemint_para_id, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + // Make sure the state has ALITH's foreign parachain tokens + const alith_dot_balance = await context + .polkadotJs() + .query.assets.account(assetId, alith.address); + + // The message execution failed + expect(alith_dot_balance.isNone).to.be.true; + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-2.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-2.ts new file mode 100644 index 0000000000..bb8f38b0fe --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-2.ts @@ -0,0 +1,110 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { alith } from "@moonwall/util"; +import { + registerForeignAsset, + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, +} from "../../../../helpers/xcm.js"; + +const FOREIGN_TOKEN = 1_000_000_000_000n; + +const palletId = "0x6D6f646c617373746d6E67720000000000000000"; +const statemint_para_id = 1001; +const statemint_assets_pallet_instance = 50; + +const assetMetadata = { + name: "FOREIGN", + symbol: "FOREIGN", + decimals: 12n, + isFrozen: false, +}; +const STATEMINT_LOCATION = { + Xcm: { + parents: 1, + interior: { + X3: [ + { Parachain: statemint_para_id }, + { PalletInstance: statemint_assets_pallet_instance }, + { GeneralIndex: 0 }, + ], + }, + }, +}; + +describeSuite({ + id: "D013909", + title: "Mock XCM - receive horizontal transfer", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let assetId: string; + + beforeAll(async () => { + // registerForeignAsset + const { registeredAssetId, registeredAsset } = await registerForeignAsset( + context, + STATEMINT_LOCATION, + assetMetadata + ); + assetId = registeredAssetId; + expect(registeredAsset.owner.toHex()).to.eq(palletId.toLowerCase()); + }); + + it({ + id: "T01", + title: "Should receive a 10 Statemine tokens to Alith with new prefix", + test: async function () { + // We are going to test that, using the prefix after + // https://github.com/paritytech/cumulus/pull/831 + // we can receive the tokens on the assetId registed with the old prefix + + // New prefix: + // Parachain(Statemint parachain) + // PalletInstance(Statemint assets pallet instance) + // GeneralIndex(assetId being transferred) + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 1, + interior: { + X3: [ + { Parachain: statemint_para_id }, + { PalletInstance: statemint_assets_pallet_instance }, + { GeneralIndex: 0n }, + ], + }, + }, + fungible: 10000000000000n, + }, + ], + weight_limit: { + refTime: 40000000000n, + proofSize: 110000n, + }, + beneficiary: alith.address, + }) + .reserve_asset_deposited() + .clear_origin() + .buy_execution() + .deposit_asset_v3() + .as_v4(); + + // Send an XCM and create block to execute it + await injectHrmpMessageAndSeal(context, statemint_para_id, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + // Make sure the state has ALITH's foreign parachain tokens + expect( + (await context.polkadotJs().query.assets.account(assetId, alith.address)) + .unwrap() + .balance.toBigInt() + ).to.eq(10n * FOREIGN_TOKEN); + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-3.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-3.ts new file mode 100644 index 0000000000..4dbe3290ec --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-3.ts @@ -0,0 +1,100 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { KeyringPair } from "@polkadot/keyring/types"; +import { generateKeyringPair } from "@moonwall/util"; +import { + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, + sovereignAccountOfSibling, +} from "../../../../helpers/xcm.js"; + +const foreign_para_id = 2000; + +describeSuite({ + id: "D013910", + title: "Mock XCM - receive horizontal transfer of DEV", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let random: KeyringPair; + let transferredBalance: bigint; + let sovereignAddress: string; + + beforeAll(async () => { + random = generateKeyringPair(); + sovereignAddress = sovereignAccountOfSibling(context, 2000); + transferredBalance = 100000000000000n; + + // We first fund parachain 2000 sovreign account + await context.createBlock( + context.polkadotJs().tx.balances.transferAllowDeath(sovereignAddress, transferredBalance) + ); + const balance = ( + await context.polkadotJs().query.system.account(sovereignAddress) + ).data.free.toBigInt(); + expect(balance).to.eq(transferredBalance); + }); + + it({ + id: "T01", + title: "Should NOT receive MOVR from para Id 2000 with old reanchor", + test: async function () { + const ownParaId = (await context.polkadotJs().query.parachainInfo.parachainId()).toNumber(); + // Get Pallet balances index + const metadata = await context.polkadotJs().rpc.state.getMetadata(); + const balancesPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Balances")! + .index.toNumber(); + + // We are charging 100_000_000 weight for every XCM instruction + // We are executing 4 instructions + // 100_000_000 * 4 * 50000 = 20000000000000 + // We are charging 20 micro DEV for this operation + // The rest should be going to the deposit account + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 1, + interior: { + X2: [{ Parachain: ownParaId }, { PalletInstance: balancesPalletIndex }], + }, + }, + fungible: transferredBalance, + }, + ], + weight_limit: { + refTime: 40000000000n, + proofSize: 110000n, + }, + beneficiary: random.address, + }) + .withdraw_asset() + .clear_origin() + .buy_execution() + .deposit_asset_v3() + .as_v4(); + + // Send an XCM and create block to execute it + await injectHrmpMessageAndSeal(context, foreign_para_id, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + // The message should not have been succesfully executed, since old prefix is not supported + // anymore + const balance = ( + await context.polkadotJs().query.system.account(sovereignAddress) + ).data.free.toBigInt(); + expect(balance.toString()).to.eq(transferredBalance.toString()); + + // the random address does not receive anything + const randomBalance = ( + await context.polkadotJs().query.system.account(random.address) + ).data.free.toBigInt(); + expect(randomBalance).to.eq(0n); + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-4.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-4.ts new file mode 100644 index 0000000000..837fe8d71f --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-4.ts @@ -0,0 +1,109 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { KeyringPair } from "@polkadot/keyring/types"; +import { generateKeyringPair } from "@moonwall/util"; +import { + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, + weightMessage, + sovereignAccountOfSibling, +} from "../../../../helpers/xcm.js"; + +const foreign_para_id = 2000; + +describeSuite({ + id: "D013911", + title: "Mock XCM - receive horizontal transfer of DEV with new reanchor", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let random: KeyringPair; + let transferredBalance: bigint; + let sovereignAddress: string; + + beforeAll(async () => { + random = generateKeyringPair(); + sovereignAddress = sovereignAccountOfSibling(context, 2000); + + transferredBalance = 100000000000000n; + + // We first fund parachain 2000 sovreign account + await context.createBlock( + context.polkadotJs().tx.balances.transferAllowDeath(sovereignAddress, transferredBalance), + { allowFailures: false } + ); + + const balance = ( + await context.polkadotJs().query.system.account(sovereignAddress) + ).data.free.toBigInt(); + expect(balance).to.eq(transferredBalance); + }); + + it({ + id: "T01", + title: "Should receive MOVR from para Id 2000 with new reanchor logic", + test: async function () { + // Get Pallet balances index + const metadata = await context.polkadotJs().rpc.state.getMetadata(); + const balancesPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Balances")! + .index.toNumber(); + + // The rest should be going to the deposit account + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 0, + interior: { + X1: { PalletInstance: balancesPalletIndex }, + }, + }, + fungible: transferredBalance, + }, + ], + weight_limit: { + refTime: 40000000000n, + proofSize: 110000n, + }, + beneficiary: random.address, + }) + .withdraw_asset() + .clear_origin() + .buy_execution() + .deposit_asset_v3() + .as_v4(); + + const chargedWeight = await weightMessage( + context, + context.polkadotJs().createType("XcmVersionedXcm", xcmMessage) + ); + // We are charging chargedWeight + // chargedWeight * 50000 = chargedFee + const chargedFee = chargedWeight * 50000n; + + // Send an XCM and create block to execute it + await injectHrmpMessageAndSeal(context, foreign_para_id, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + // We should expect sovereign balance to be 0, since we have transferred the full amount + const balance = ( + await context.polkadotJs().query.system.account(sovereignAddress) + ).data.free.toBigInt(); + expect(balance.toString()).to.eq(0n.toString()); + + // In the case of the random address: we have transferred 100000000000000, + // but chargedFee have been deducted + // for weight payment + const randomBalance = ( + await context.polkadotJs().query.system.account(random.address) + ).data.free.toBigInt(); + const expectedRandomBalance = transferredBalance - chargedFee; + expect(randomBalance).to.eq(expectedRandomBalance); + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-5.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-5.ts new file mode 100644 index 0000000000..b9ab6809bd --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-5.ts @@ -0,0 +1,137 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + + +import { alith } from "@moonwall/util"; + +import { + registerForeignAsset, + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, +} from "../../../../helpers/xcm.js"; + +const FOREIGN_TOKEN = 1_000_000_000_000n; + +const palletId = "0x6D6f646c617373746d6E67720000000000000000"; +const statemint_para_id = 1001; +const statemint_assets_pallet_instance = 50; + +const assetMetadata = { + name: "FOREIGN", + symbol: "FOREIGN", + decimals: 12n, + isFrozen: false, +}; +const STATEMINT_LOCATION = { + Xcm: { + parents: 1, + interior: { + X3: [ + { Parachain: statemint_para_id }, + { PalletInstance: statemint_assets_pallet_instance }, + { GeneralIndex: 0 }, + ], + }, + }, +}; +const STATEMINT_ASSET_ONE_LOCATION = { + Xcm: { + parents: 1, + interior: { + X3: [ + { Parachain: statemint_para_id }, + { PalletInstance: statemint_assets_pallet_instance }, + { GeneralIndex: 1 }, + ], + }, + }, +}; + +describeSuite({ + id: "D013912", + title: "Mock XCM - receive horizontal transfer", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let assetIdZero: string; + let assetIdOne: string; + + beforeAll(async () => { + // registerForeignAsset 0 + const { registeredAssetId: registeredAssetIdZero, registeredAsset: registeredAssetZero } = + await registerForeignAsset(context, STATEMINT_LOCATION, assetMetadata); + assetIdZero = registeredAssetIdZero; + // registerForeignAsset 1 + const { registeredAssetId: registeredAssetIdOne, registeredAsset: registeredAssetOne } = + await registerForeignAsset(context, STATEMINT_ASSET_ONE_LOCATION, assetMetadata, 0, 1); + assetIdOne = registeredAssetIdOne; + + expect(registeredAssetZero.owner.toHex()).to.eq(palletId.toLowerCase()); + expect(registeredAssetOne.owner.toHex()).to.eq(palletId.toLowerCase()); + }); + + it({ + id: "T01", + title: "Should receive 10 asset 0 tokens using statemint asset 1 as fee", + test: async function () { + // We are going to test that, using one of them as fee payment (assetOne), + // we can receive the other + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 1, + interior: { + X3: [ + { Parachain: statemint_para_id }, + { PalletInstance: statemint_assets_pallet_instance }, + { GeneralIndex: 0n }, + ], + }, + }, + fungible: 10000000000000n, + }, + { + multilocation: { + parents: 1, + interior: { + X3: [ + { Parachain: statemint_para_id }, + { PalletInstance: statemint_assets_pallet_instance }, + { GeneralIndex: 1n }, + ], + }, + }, + fungible: 10000000000000n, + }, + ], + weight_limit: { + refTime: 40000000000n, + proofSize: 110000n, + }, + beneficiary: alith.address, + }) + .reserve_asset_deposited() + .clear_origin() + .buy_execution(1) // buy execution with asset at index 1 + .deposit_asset_v3(2n) + .as_v4(); + + // Send an XCM and create block to execute it + await injectHrmpMessageAndSeal(context, statemint_para_id, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + // Make sure the state has ALITH's foreign parachain tokens + const alithAssetZeroBalance = ( + await context.polkadotJs().query.assets.account(assetIdZero, alith.address) + ) + .unwrap() + .balance.toBigInt(); + + expect(alithAssetZeroBalance).to.eq(10n * FOREIGN_TOKEN); + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-6.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-6.ts new file mode 100644 index 0000000000..8014f0d342 --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-6.ts @@ -0,0 +1,96 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { alith } from "@moonwall/util"; +import { + registerForeignAsset, + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, +} from "../../../../helpers/xcm.js"; + +const palletId = "0x6D6f646c617373746d6E67720000000000000000"; +const statemint_para_id = 1001; +const statemint_assets_pallet_instance = 50; + +const assetMetadata = { + name: "FOREIGN", + symbol: "FOREIGN", + decimals: 12n, + isFrozen: false, +}; +const STATEMINT_LOCATION = { + Xcm: { + parents: 1, + interior: { + X3: [ + { Parachain: statemint_para_id }, + { PalletInstance: statemint_assets_pallet_instance }, + { GeneralIndex: 0 }, + ], + }, + }, +}; + +describeSuite({ + id: "D013913", + title: "Mock XCM - receive horizontal transfer", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let assetId: string; + + beforeAll(async () => { + // registerForeignAsset + const { registeredAssetId, registeredAsset } = await registerForeignAsset( + context, + STATEMINT_LOCATION, + assetMetadata + ); + assetId = registeredAssetId; + expect(registeredAsset.owner.toHex()).to.eq(palletId.toLowerCase()); + }); + + it({ + id: "T01", + title: "Should not receive 10 asset 0 tokens because fee not supported", + test: async function () { + // We are going to test that, using one of them as fee payment (assetOne), + // we can receive the other + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 1, + interior: { X2: [{ Parachain: statemint_para_id }, { GeneralIndex: 0n }] }, + }, + fungible: 10000000000000n, + }, + ], + weight_limit: { + refTime: 40000000000n, + proofSize: 110000n, + }, + beneficiary: alith.address, + }) + .reserve_asset_deposited() + .clear_origin() + .buy_execution() + .deposit_asset_v3(2n) + .as_v4(); + + // Send an XCM and create block to execute it + await injectHrmpMessageAndSeal(context, statemint_para_id, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + // Make sure the state has ALITH's foreign parachain tokens + const alithAssetZeroBalance = await context + .polkadotJs() + .query.assets.account(assetId, alith.address); + + expect(alithAssetZeroBalance.isNone).to.eq(true); + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-1.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-1.ts new file mode 100644 index 0000000000..dc57e1a24e --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-1.ts @@ -0,0 +1,108 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { KeyringPair } from "@polkadot/keyring/types"; +import { generateKeyringPair } from "@moonwall/util"; +import { + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, + descendOriginFromAddress20, +} from "../../../../helpers/xcm.js"; + +describeSuite({ + id: "D013914", + title: "Mock XCM - receive horizontal transact", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let transferredBalance: bigint; + let sendingAddress: `0x${string}`; + let random: KeyringPair; + + beforeAll(async () => { + const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); + sendingAddress = originAddress; + random = generateKeyringPair(); + transferredBalance = 10_000_000_000_000_000_000n; + + await context.createBlock( + context + .polkadotJs() + .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), + { allowFailures: false } + ); + + const balance = ( + await context.polkadotJs().query.system.account(descendOriginAddress) + ).data.free.toBigInt(); + expect(balance).to.eq(transferredBalance); + }); + + it({ + id: "T01", + title: "Should receive transact and should be able to execute", + test: async function () { + // Get Pallet balances index + const metadata = await context.polkadotJs().rpc.state.getMetadata(); + const balancesPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Balances")! + .index.toNumber(); + + const transferCall = context + .polkadotJs() + .tx.balances.transferAllowDeath(random.address, transferredBalance / 10n); + const transferCallEncoded = transferCall?.method.toHex(); + + // We are going to test that we can receive a transact operation from parachain 1 + // using descendOrigin first + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 0, + interior: { + X1: { PalletInstance: balancesPalletIndex }, + }, + }, + fungible: transferredBalance / 2n, + }, + ], + weight_limit: { + refTime: 40000000000n, + proofSize: 110000n, + }, + descend_origin: sendingAddress, + }) + .descend_origin() + .withdraw_asset() + .buy_execution() + .push_any({ + Transact: { + originKind: "SovereignAccount", + requireWeightAtMost: { + refTime: 1000000000n, + proofSize: 80000n, + }, + call: { + encoded: transferCallEncoded, + }, + }, + }) + .as_v4(); + + // Send an XCM and create block to execute it + await injectHrmpMessageAndSeal(context, 1, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + // Make sure the state has ALITH's foreign parachain tokens + const testAccountBalance = ( + await context.polkadotJs().query.system.account(random.address) + ).data.free.toBigInt(); + + expect(testAccountBalance).to.eq(transferredBalance / 10n); + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-2.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-2.ts new file mode 100644 index 0000000000..ee1bb28c89 --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-2.ts @@ -0,0 +1,109 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { KeyringPair } from "@polkadot/keyring/types"; +import { generateKeyringPair } from "@moonwall/util"; +import { + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, + descendOriginFromAddress20, +} from "../../../../helpers/xcm.js"; + +describeSuite({ + id: "D013915", + title: "Mock XCM - receive horizontal transact with two Descends", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let transferredBalance: bigint; + let sendingAddress: `0x${string}`; + let random: KeyringPair; + + beforeAll(async () => { + const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); + sendingAddress = originAddress; + random = generateKeyringPair(); + transferredBalance = 10_000_000_000_000_000_000n; + + await context.createBlock( + context + .polkadotJs() + .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), + { allowFailures: false } + ); + + const balance = ( + await context.polkadotJs().query.system.account(descendOriginAddress) + ).data.free.toBigInt(); + expect(balance).to.eq(transferredBalance); + }); + + it({ + id: "T01", + title: "Should fail to transact because barrier only allows one descend origin", + test: async function () { + // Get Pallet balances index + const metadata = await context.polkadotJs().rpc.state.getMetadata(); + const balancesPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Balances")! + .index.toNumber(); + + const transferCall = context + .polkadotJs() + .tx.balances.transferAllowDeath(random.address, transferredBalance / 10n); + const transferCallEncoded = transferCall?.method.toHex(); + + // We are going to test that we can receive a transact operation from parachain 1 + // using 2 descendOrigin first + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 0, + interior: { + X1: { PalletInstance: balancesPalletIndex }, + }, + }, + fungible: transferredBalance / 2n, + }, + ], + weight_limit: { + refTime: 40000000000n, + proofSize: 110000n, + }, + descend_origin: sendingAddress, + }) + .descend_origin() + .descend_origin() + .withdraw_asset() + .buy_execution() + .push_any({ + Transact: { + originKind: "SovereignAccount", + requireWeightAtMost: { + refTime: 1000000000n, + proofSize: 80000n, + }, + call: { + encoded: transferCallEncoded, + }, + }, + }) + .as_v4(); + + // Send an XCM and create block to execute it + await injectHrmpMessageAndSeal(context, 1, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + // Make sure testAccount did not receive, because barrier prevented it + const testAccountBalance = ( + await context.polkadotJs().query.system.account(random.address) + ).data.free.toBigInt(); + + expect(testAccountBalance).to.eq(0n); + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-3.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-3.ts new file mode 100644 index 0000000000..117e92e2a6 --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-3.ts @@ -0,0 +1,107 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { KeyringPair } from "@polkadot/keyring/types"; +import { generateKeyringPair } from "@moonwall/util"; +import { + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, + descendOriginFromAddress20, +} from "../../../../helpers/xcm.js"; + +describeSuite({ + id: "D013916", + title: "Mock XCM - receive horizontal transact without withdraw", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let transferredBalance: bigint; + let sendingAddress: `0x${string}`; + let random: KeyringPair; + + beforeAll(async () => { + const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); + sendingAddress = originAddress; + random = generateKeyringPair(); + transferredBalance = 10_000_000_000_000_000_000n; + + await context.createBlock( + context + .polkadotJs() + .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), + { allowFailures: false } + ); + + const balance = ( + await context.polkadotJs().query.system.account(descendOriginAddress) + ).data.free.toBigInt(); + expect(balance).to.eq(transferredBalance); + }); + + it({ + id: "T01", + title: "Should fail to transact because barrier does not pass without withdraw", + test: async function () { + // Get Pallet balances index + const metadata = await context.polkadotJs().rpc.state.getMetadata(); + const balancesPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Balances")! + .index.toNumber(); + + const transferCall = context + .polkadotJs() + .tx.balances.transferAllowDeath(random.address, transferredBalance / 10n); + const transferCallEncoded = transferCall?.method.toHex(); + + // We are going to test that we can receive a transact operation from parachain 1 + // using descendOrigin first but without withdraw + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 0, + interior: { + X1: { PalletInstance: balancesPalletIndex }, + }, + }, + fungible: transferredBalance / 2n, + }, + ], + weight_limit: { + refTime: 40000000000n, + proofSize: 110000n, + }, + descend_origin: sendingAddress, + }) + .descend_origin() + .buy_execution() + .push_any({ + Transact: { + originKind: "SovereignAccount", + requireWeightAtMost: { + refTime: 1000000000n, + proofSize: 80000n, + }, + call: { + encoded: transferCallEncoded, + }, + }, + }) + .as_v4(); + + // Send an XCM and create block to execute it + await injectHrmpMessageAndSeal(context, 1, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + // Make sure testAccount did not receive, because barrier prevented it + const testAccountBalance = ( + await context.polkadotJs().query.system.account(random.address) + ).data.free.toBigInt(); + + expect(testAccountBalance).to.eq(0n); + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-4.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-4.ts new file mode 100644 index 0000000000..a113443a2f --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-4.ts @@ -0,0 +1,107 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { KeyringPair } from "@polkadot/keyring/types"; +import { generateKeyringPair } from "@moonwall/util"; +import { + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, + descendOriginFromAddress20, +} from "../../../../helpers/xcm.js"; + +describeSuite({ + id: "D013917", + title: "Mock XCM - receive horizontal transact without buy execution", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let transferredBalance: bigint; + let sendingAddress: `0x${string}`; + let random: KeyringPair; + + beforeAll(async () => { + const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); + sendingAddress = originAddress; + random = generateKeyringPair(); + transferredBalance = 10_000_000_000_000_000_000n; + + await context.createBlock( + context + .polkadotJs() + .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), + { allowFailures: false } + ); + + const balance = ( + await context.polkadotJs().query.system.account(descendOriginAddress) + ).data.free.toBigInt(); + expect(balance).to.eq(transferredBalance); + }); + + it({ + id: "T01", + title: "Should fail to transact because barrier blocks without buy execution", + test: async function () { + // Get Pallet balances index + const metadata = await context.polkadotJs().rpc.state.getMetadata(); + const balancesPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Balances")! + .index.toNumber(); + + const transferCall = context + .polkadotJs() + .tx.balances.transferAllowDeath(random.address, transferredBalance / 10n); + const transferCallEncoded = transferCall?.method.toHex(); + + // We are going to test that we can receive a transact operation from parachain 1 + // using descendOrigin first but without buy execution + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 0, + interior: { + X1: { PalletInstance: balancesPalletIndex }, + }, + }, + fungible: transferredBalance / 2n, + }, + ], + weight_limit: { + refTime: 40000000000n, + proofSize: 110000n, + }, + descend_origin: sendingAddress, + }) + .descend_origin() + .withdraw_asset() + .push_any({ + Transact: { + originKind: "SovereignAccount", + requireWeightAtMost: { + refTime: 1000000000n, + proofSize: 80000n, + }, + call: { + encoded: transferCallEncoded, + }, + }, + }) + .as_v4(); + + // Send an XCM and create block to execute it + await injectHrmpMessageAndSeal(context, 1, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + // Make sure testAccount did not receive, because barrier prevented it + const testAccountBalance = ( + await context.polkadotJs().query.system.account(random.address) + ).data.free.toBigInt(); + + expect(testAccountBalance).to.eq(0n); + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-1.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-1.ts new file mode 100644 index 0000000000..c6416d781f --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-1.ts @@ -0,0 +1,161 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { KeyringPair } from "@polkadot/keyring/types"; +import { generateKeyringPair } from "@moonwall/util"; +import { + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, + descendOriginFromAddress20, +} from "../../../../helpers/xcm.js"; + +describeSuite({ + id: "D013918", + title: "Mock XCM - receive horizontal transact ETHEREUM (transfer)", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let transferredBalance: bigint; + let sendingAddress: `0x${string}`; + let descendAddress: `0x${string}`; + let random: KeyringPair; + + beforeAll(async () => { + const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); + sendingAddress = originAddress; + descendAddress = descendOriginAddress; + random = generateKeyringPair(); + transferredBalance = 10_000_000_000_000_000_000n; + + // We first fund parachain 2000 sovreign account + await context.createBlock( + context + .polkadotJs() + .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), + { allowFailures: false } + ); + + const balance = ( + await context.polkadotJs().query.system.account(descendOriginAddress) + ).data.free.toBigInt(); + expect(balance).to.eq(transferredBalance); + }); + + it({ + id: "T01", + title: "should receive transact and should be able to execute", + test: async function () { + // Get Pallet balances index + const metadata = await context.polkadotJs().rpc.state.getMetadata(); + const balancesPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Balances")! + .index.toNumber(); + + const amountToTransfer = transferredBalance / 10n; + + const xcmTransactions = [ + { + V1: { + gas_limit: 21000, + fee_payment: { + Auto: { + Low: null, + }, + }, + action: { + Call: random.address, + }, + value: amountToTransfer, + input: [], + access_list: null, + }, + }, + { + V2: { + gas_limit: 21000, + action: { + Call: random.address, + }, + value: amountToTransfer, + input: [], + access_list: null, + }, + }, + ]; + + let expectedTransferredAmount = 0n; + let expectedTransferredAmountPlusFees = 0n; + + const targetXcmWeight = 1_325_000_000n + 25_000_000n; + const targetXcmFee = targetXcmWeight * 50_000n; + + for (const xcmTransaction of xcmTransactions) { + expectedTransferredAmount += amountToTransfer; + expectedTransferredAmountPlusFees += amountToTransfer + targetXcmFee; + // TODO need to update lookup types for xcm ethereum transaction V2 + const transferCall = context.polkadotJs().tx.ethereumXcm.transact(xcmTransaction); + const transferCallEncoded = transferCall?.method.toHex(); + + // We are going to test that we can receive a transact operation from parachain 1 + // using descendOrigin first + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 0, + interior: { + X1: { PalletInstance: balancesPalletIndex }, + }, + }, + fungible: targetXcmFee, + }, + ], + weight_limit: { + refTime: targetXcmWeight, + proofSize: 110000n, + }, + descend_origin: sendingAddress, + }) + .descend_origin() + .withdraw_asset() + .buy_execution() + .push_any({ + Transact: { + originKind: "SovereignAccount", + // 21_000 gas limit + db read + requireWeightAtMost: { + refTime: 550_000_000n, + proofSize: 80000n, + }, + call: { + encoded: transferCallEncoded, + }, + }, + }) + .as_v4(); + + // Send an XCM and create block to execute it + await injectHrmpMessageAndSeal(context, 1, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + // Make sure the state has ALITH's foreign parachain tokens + const testAccountBalance = ( + await context.polkadotJs().query.system.account(random.address) + ).data.free.toBigInt(); + expect(testAccountBalance).to.eq(expectedTransferredAmount); + + // Make sure descend address has been deducted fees once (in xcm-executor) and balance + // has been transfered through evm. + const descendAccountBalance = await context + .viem() + .getBalance({ address: descendAddress }); + expect(BigInt(descendAccountBalance)).to.eq( + transferredBalance - expectedTransferredAmountPlusFees + ); + } + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-10.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-10.ts new file mode 100644 index 0000000000..b6126257d7 --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-10.ts @@ -0,0 +1,160 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { Abi, encodeFunctionData } from "viem"; +import { + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, + descendOriginFromAddress20, +} from "../../../../helpers/xcm.js"; + +describeSuite({ + id: "D013919", + title: "Mock XCM - transact ETHEREUM input size check fails", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let transferredBalance: bigint; + let sendingAddress: `0x${string}`; + let contractDeployed: `0x${string}`; + let contractABI: Abi; + + beforeAll(async () => { + const { contractAddress, abi } = await context.deployContract!("CallForwarder"); + contractDeployed = contractAddress; + contractABI = abi; + + const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); + sendingAddress = originAddress; + transferredBalance = 10_000_000_000_000_000_000n; + + // We first fund parachain 2000 sovreign account + await context.createBlock( + context + .polkadotJs() + .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), + { allowFailures: false } + ); + + const balance = ( + await context.polkadotJs().query.system.account(descendOriginAddress) + ).data.free.toBigInt(); + expect(balance).to.eq(transferredBalance); + }); + + it({ + id: "T01", + title: "should fail to call the contract due to BoundedVec restriction", + test: async function () { + // Get Pallet balances index + const metadata = await context.polkadotJs().rpc.state.getMetadata(); + const balancesPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Balances")! + .index.toNumber(); + + // Matches the BoundedVec limit in the runtime. + const CALL_INPUT_SIZE_LIMIT = Math.pow(2, 16); + + const xcmTransactions = [ + { + V1: { + gas_limit: 1000000, + fee_payment: { + Auto: { + Low: null, + }, + }, + action: { + Call: contractDeployed, + }, + value: 0n, + input: encodeFunctionData({ + abi: contractABI, + functionName: "call", + args: [ + "0x0000000000000000000000000000000000000001", + context + .web3() + .utils.bytesToHex(new Uint8Array(CALL_INPUT_SIZE_LIMIT - 127).fill(0)), + ], + }), + access_list: null, + }, + }, + { + V2: { + gas_limit: 1000000, + action: { + Call: contractDeployed, + }, + value: 0n, + input: encodeFunctionData({ + abi: contractABI, + functionName: "call", + args: [ + "0x0000000000000000000000000000000000000001", + context + .web3() + .utils.bytesToHex(new Uint8Array(CALL_INPUT_SIZE_LIMIT - 127).fill(0)), + ], + }), + access_list: null, + }, + }, + ]; + + for (const xcmTransaction of xcmTransactions) { + const transferCall = context.polkadotJs().tx.ethereumXcm.transact(xcmTransaction as any); + const transferCallEncoded = transferCall?.method.toHex(); + // We are going to test that we can receive a transact operation from parachain 1 + // using descendOrigin first + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 0, + interior: { + X1: { PalletInstance: balancesPalletIndex }, + }, + }, + fungible: transferredBalance / 2n, + }, + ], + weight_limit: { + refTime: 40000000000n, + proofSize: 110000n, + }, + descend_origin: sendingAddress, + }) + .descend_origin() + .withdraw_asset() + .buy_execution() + .push_any({ + Transact: { + originKind: "SovereignAccount", + requireWeightAtMost: { + refTime: 30000000000n, + proofSize: 80000n, + }, + call: { + encoded: transferCallEncoded, + }, + }, + }) + .as_v4(); + + // Send an XCM and create block to execute it + await injectHrmpMessageAndSeal(context, 1, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + const block = await context.viem().getBlock({ blockTag: "latest" }); + // Input size is invalid by 1 byte, expect block to not include a transaction. + // That means the pallet-ethereum-xcm couldn't decode the provided input to a BoundedVec. + expect(block.transactions.length).to.be.eq(0); + } + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-2.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-2.ts new file mode 100644 index 0000000000..fc05b22e8a --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-2.ts @@ -0,0 +1,155 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { Abi, encodeFunctionData } from "viem"; +import { + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, + descendOriginFromAddress20, +} from "../../../../helpers/xcm.js"; + +describeSuite({ + id: "D013920", + title: "Mock XCM - receive horizontal transact ETHEREUM (call)", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let transferredBalance: bigint; + let sendingAddress: `0x${string}`; + let contractDeployed: `0x${string}`; + let contractABI: Abi; + + beforeAll(async () => { + const { contractAddress, abi } = await context.deployContract!("Incrementor"); + contractDeployed = contractAddress; + contractABI = abi; + + const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); + sendingAddress = originAddress; + transferredBalance = 10_000_000_000_000_000_000n; + + // We first fund parachain 2000 sovreign account + await context.createBlock( + context + .polkadotJs() + .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), + { allowFailures: false } + ); + + const balance = ( + await context.polkadotJs().query.system.account(descendOriginAddress) + ).data.free.toBigInt(); + expect(balance).to.eq(transferredBalance); + }); + + it({ + id: "T01", + title: "should receive transact and should be able to execute", + test: async function () { + // Get Pallet balances index + const metadata = await context.polkadotJs().rpc.state.getMetadata(); + const balancesPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Balances")! + .index.toNumber(); + + const xcmTransactions = [ + { + V1: { + gas_limit: 100000, + fee_payment: { + Auto: { + Low: null, + }, + }, + action: { + Call: contractDeployed, + }, + value: 0n, + input: encodeFunctionData({ + abi: contractABI, + functionName: "incr", + args: [], + }), + access_list: null, + }, + }, + { + V2: { + gas_limit: 100000, + action: { + Call: contractDeployed, + }, + value: 0n, + input: encodeFunctionData({ + abi: contractABI, + functionName: "incr", + args: [], + }), + access_list: null, + }, + }, + ]; + + let expectedCalls = 0n; + + for (const xcmTransaction of xcmTransactions) { + expectedCalls++; + + // TODO need to update lookup types for xcm ethereum transaction V2 + const transferCall = context.polkadotJs().tx.ethereumXcm.transact(xcmTransaction); + const transferCallEncoded = transferCall?.method.toHex(); + // We are going to test that we can receive a transact operation from parachain 1 + // using descendOrigin first + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 0, + interior: { + X1: { PalletInstance: balancesPalletIndex }, + }, + }, + fungible: transferredBalance / 2n, + }, + ], + weight_limit: { + refTime: 40000000000n, + proofSize: 110000n, + }, + descend_origin: sendingAddress, + }) + .descend_origin() + .withdraw_asset() + .buy_execution() + .push_any({ + Transact: { + originKind: "SovereignAccount", + requireWeightAtMost: { + refTime: 3000000000n, + proofSize: 80000n, + }, + call: { + encoded: transferCallEncoded, + }, + }, + }) + .as_v4(); + + // Send an XCM and create block to execute it + await injectHrmpMessageAndSeal(context, 1, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + const actualCalls = await context.readContract!({ + contractAddress: contractDeployed, + contractName: "Incrementor", + functionName: "count", + }); + + expect(BigInt(actualCalls!.toString())).to.eq(expectedCalls); + } + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-4.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-4.ts new file mode 100644 index 0000000000..a04e281a61 --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-4.ts @@ -0,0 +1,158 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { KeyringPair } from "@polkadot/keyring/types"; +import { generateKeyringPair } from "@moonwall/util"; +import { + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, + descendOriginFromAddress20, +} from "../../../../helpers/xcm.js"; + +describeSuite({ + id: "D013922", + title: "Mock XCM - receive horizontal transact ETHEREUM (proxy)", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let transferredBalance: bigint; + let sendingAddress: `0x${string}`; + let descendAddress: `0x${string}`; + let random: KeyringPair; + + beforeAll(async () => { + const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); + sendingAddress = originAddress; + descendAddress = descendOriginAddress; + random = generateKeyringPair(); + transferredBalance = 10_000_000_000_000_000_000n; + + // We first fund the descend origin derivated address + await context.createBlock( + context + .polkadotJs() + .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), + { allowFailures: false } + ); + + const balance = ( + await context.polkadotJs().query.system.account(descendOriginAddress) + ).data.free.toBigInt(); + expect(balance).to.eq(transferredBalance); + }); + + it({ + id: "T01", + title: "should fail to transact_through_proxy without proxy", + test: async function () { + // Get Pallet balances index + const metadata = await context.polkadotJs().rpc.state.getMetadata(); + const balancesPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Balances")! + .index.toNumber(); + + const amountToTransfer = transferredBalance / 10n; + + const xcmTransactions = [ + { + V1: { + gas_limit: 21000, + fee_payment: { + Auto: { + Low: null, + }, + }, + action: { + Call: random.address, + }, + value: amountToTransfer, + input: [], + access_list: null, + }, + }, + { + V2: { + gas_limit: 21000, + action: { + Call: random.address, + }, + value: amountToTransfer, + input: [], + access_list: null, + }, + }, + ]; + + let feeAmount = 0n; + + // Gas limit + 2 db reads + const targetXcmWeight = 1_325_000_000n + 100_000_000n; + const targetXcmFee = targetXcmWeight * 50_000n; + + for (const xcmTransaction of xcmTransactions) { + feeAmount += targetXcmFee; + // TODO need to update lookup types for xcm ethereum transaction V2 + const transferCall = context + .polkadotJs() + .tx.ethereumXcm.transactThroughProxy(sendingAddress, xcmTransaction); + const transferCallEncoded = transferCall?.method.toHex(); + + // We are going to test that we can receive a transact operation from parachain 1 + // using descendOrigin first + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 0, + interior: { + X1: { PalletInstance: balancesPalletIndex }, + }, + }, + fungible: targetXcmFee, + }, + ], + weight_limit: { + refTime: targetXcmWeight, + proofSize: 110000n, + }, + descend_origin: sendingAddress, + }) + .descend_origin() + .withdraw_asset() + .buy_execution() + .push_any({ + Transact: { + originKind: "SovereignAccount", + // 100_000 gas + 2 db read + requireWeightAtMost: { + refTime: 575_000_000n, + proofSize: 80000n, + }, + call: { + encoded: transferCallEncoded, + }, + }, + }) + .as_v4(); + + // Send an XCM and create block to execute it + await injectHrmpMessageAndSeal(context, 1, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + // Make sure the state for the transfer recipient didn't change + const testAccountBalance = ( + await context.polkadotJs().query.system.account(random.address) + ).data.free.toBigInt(); + expect(testAccountBalance).to.eq(0n); + + // Make sure the descended address has been deducted fees once (in xcm-executor) but + // transfered nothing. + const descendOriginBalance = await context.viem().getBalance({ address: descendAddress }); + expect(BigInt(descendOriginBalance)).to.eq(transferredBalance - feeAmount); + } + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-5.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-5.ts new file mode 100644 index 0000000000..ce17721f4d --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-5.ts @@ -0,0 +1,165 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { KeyringPair } from "@polkadot/keyring/types"; +import { generateKeyringPair, charleth } from "@moonwall/util"; +import { + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, + descendOriginFromAddress20, +} from "../../../../helpers/xcm.js"; + +describeSuite({ + id: "D013923", + title: "Mock XCM - receive horizontal transact ETHEREUM (proxy)", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let transferredBalance: bigint; + let sendingAddress: `0x${string}`; + let descendAddress: `0x${string}`; + let random: KeyringPair; + + beforeAll(async () => { + const { originAddress, descendOriginAddress } = descendOriginFromAddress20( + context, + charleth.address as `0x${string}` + ); + sendingAddress = originAddress; + descendAddress = descendOriginAddress; + random = generateKeyringPair(); + transferredBalance = 10_000_000_000_000_000_000n; + + // We first fund the descend origin derivated address + await context.createBlock( + context + .polkadotJs() + .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), + { allowFailures: false } + ); + + const balance = ( + await context.polkadotJs().query.system.account(descendOriginAddress) + ).data.free.toBigInt(); + expect(balance).to.eq(transferredBalance); + + // Add proxy with delay 1 + await context.createBlock( + context.polkadotJs().tx.proxy.addProxy(descendAddress, "Any", 1).signAsync(charleth) + ); + }); + + it({ + id: "T01", + title: "should fail to transact_through_proxy with non-zero delay proxy", + test: async function () { + // Get Pallet balances index + const metadata = await context.polkadotJs().rpc.state.getMetadata(); + const balancesPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Balances")! + .index.toNumber(); + + const amountToTransfer = transferredBalance / 10n; + + const xcmTransactions = [ + { + V1: { + gas_limit: 21000, + fee_payment: { + Auto: { + Low: null, + }, + }, + action: { + Call: random.address, + }, + value: amountToTransfer, + input: [], + access_list: null, + }, + }, + { + V2: { + gas_limit: 21000, + action: { + Call: random.address, + }, + value: amountToTransfer, + input: [], + access_list: null, + }, + }, + ]; + + let feeAmount = 0n; + + const targetXcmWeight = 1_325_000_000n + 100_000_000n; + const targetXcmFee = targetXcmWeight * 50_000n; + + for (const xcmTransaction of xcmTransactions) { + feeAmount += targetXcmFee; + // TODO need to update lookup types for xcm ethereum transaction V2 + const transferCall = context + .polkadotJs() + .tx.ethereumXcm.transactThroughProxy(sendingAddress, xcmTransaction); + const transferCallEncoded = transferCall?.method.toHex(); + + // We are going to test that we can receive a transact operation from parachain 1 + // using descendOrigin first + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 0, + interior: { + X1: { PalletInstance: balancesPalletIndex }, + }, + }, + fungible: targetXcmFee, + }, + ], + weight_limit: { + refTime: targetXcmWeight, + proofSize: 110000n, + }, + descend_origin: sendingAddress, + }) + .descend_origin() + .withdraw_asset() + .buy_execution() + .push_any({ + Transact: { + originKind: "SovereignAccount", + // 100_000 gas + 2 reads + requireWeightAtMost: { + refTime: 575_000_000n, + proofSize: 80000n, + }, + call: { + encoded: transferCallEncoded, + }, + }, + }) + .as_v4(); + + // Send an XCM and create block to execute it + await injectHrmpMessageAndSeal(context, 1, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + // Make sure the state for the transfer recipient didn't change + const testAccountBalance = ( + await context.polkadotJs().query.system.account(random.address) + ).data.free.toBigInt(); + expect(testAccountBalance).to.eq(0n); + + // Make sure the descended address has been deducted fees once (in xcm-executor) but + // transfered nothing. + const descendOriginBalance = await context.viem().getBalance({ address: descendAddress }); + expect(BigInt(descendOriginBalance)).to.eq(transferredBalance - feeAmount); + } + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-6.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-6.ts new file mode 100644 index 0000000000..de18b34214 --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-6.ts @@ -0,0 +1,202 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { KeyringPair } from "@polkadot/keyring/types"; +import { generateKeyringPair, charleth } from "@moonwall/util"; +import { + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, + descendOriginFromAddress20, +} from "../../../../helpers/xcm.js"; + +describeSuite({ + id: "D013924", + title: "Mock XCM - receive horizontal transact ETHEREUM (proxy)", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let charlethBalance: bigint; + let charlethNonce: number; + let transferredBalance: bigint; + let sendingAddress: `0x${string}`; + let descendAddress: `0x${string}`; + let random: KeyringPair; + + beforeAll(async () => { + const { originAddress, descendOriginAddress } = descendOriginFromAddress20( + context, + charleth.address as `0x${string}` + ); + sendingAddress = originAddress; + descendAddress = descendOriginAddress; + random = generateKeyringPair(); + transferredBalance = 10_000_000_000_000_000_000n; + + // We fund the Delegatee, which will send the xcm and pay fees + await context.createBlock( + context.polkadotJs().tx.balances.transferAllowDeath(descendAddress, transferredBalance), + { allowFailures: false } + ); + + // Ensure funded + const balance_delegatee = ( + await context.polkadotJs().query.system.account(descendAddress) + ).data.free.toBigInt(); + expect(balance_delegatee).to.eq(transferredBalance); + + // Add proxy + await context.createBlock( + context.polkadotJs().tx.proxy.addProxy(descendAddress, "Any", 0).signAsync(charleth) + ); + + // Charleth balance after creating the proxy + charlethBalance = ( + await context.polkadotJs().query.system.account(sendingAddress) + ).data.free.toBigInt(); + + // Charleth nonce + charlethNonce = parseInt( + (await context.polkadotJs().query.system.account(sendingAddress)).nonce.toString() + ); + }); + + it({ + id: "T01", + title: "should succeed to transact_through_proxy with proxy", + test: async function () { + // Get Pallet balances index + const metadata = await context.polkadotJs().rpc.state.getMetadata(); + const balancesPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Balances")! + .index.toNumber(); + + const amountToTransfer = transferredBalance / 10n; + + const xcmTransactions = [ + { + V1: { + gas_limit: 21000, + fee_payment: { + Auto: { + Low: null, + }, + }, + action: { + Call: random.address, + }, + value: amountToTransfer, + input: [], + access_list: null, + }, + }, + { + V2: { + gas_limit: 21000, + action: { + Call: random.address, + }, + value: amountToTransfer, + input: [], + access_list: null, + }, + }, + ]; + + let expectedTransferredAmount = 0n; + let expectedTransferredAmountPlusFees = 0n; + + const targetXcmWeight = 1_325_000_000n + 100_000_000n; + const targetXcmFee = targetXcmWeight * 50_000n; + + for (const xcmTransaction of xcmTransactions) { + expectedTransferredAmount += amountToTransfer; + expectedTransferredAmountPlusFees += amountToTransfer + targetXcmFee; + // TODO need to update lookup types for xcm ethereum transaction V2 + const transferCall = context + .polkadotJs() + .tx.ethereumXcm.transactThroughProxy(sendingAddress, xcmTransaction); + const transferCallEncoded = transferCall?.method.toHex(); + + // We are going to test that we can receive a transact operation from parachain 1 + // using descendOrigin first + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 0, + interior: { + X1: { PalletInstance: balancesPalletIndex }, + }, + }, + fungible: targetXcmFee, + }, + ], + weight_limit: { + refTime: targetXcmWeight, + proofSize: 110000n, + }, + descend_origin: sendingAddress, + }) + .descend_origin() + .withdraw_asset() + .buy_execution() + .push_any({ + Transact: { + originKind: "SovereignAccount", + // 100_000 gas + 2db reads + requireWeightAtMost: { + refTime: 575_000_000n, + proofSize: 80000n, + }, + call: { + encoded: transferCallEncoded, + }, + }, + }) + .as_v4(); + + // Send an XCM and create block to execute it + await injectHrmpMessageAndSeal(context, 1, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + // The transfer destination + // Make sure the destination address received the funds + const testAccountBalance = ( + await context.polkadotJs().query.system.account(random.address) + ).data.free.toBigInt(); + expect(testAccountBalance).to.eq(expectedTransferredAmount); + + // The EVM caller (proxy delegator) + // Make sure CHARLETH called the evm on behalf DESCENDED, and CHARLETH balance was + // deducted. + const charlethAccountBalance = await context + .viem() + .getBalance({ address: sendingAddress }); + expect(BigInt(charlethAccountBalance)).to.eq(charlethBalance - expectedTransferredAmount); + // Make sure CHARLETH nonce was increased, as EVM caller. + const charlethAccountNonce = await context + .viem() + .getTransactionCount({ address: sendingAddress }); + expect(charlethAccountNonce).to.eq(charlethNonce + 1); + charlethNonce++; + + // The XCM sender (proxy delegatee) + // Make sure derived / descended account paid the xcm fees only. + const derivedAccountBalance = await context + .viem() + .getBalance({ address: descendAddress }); + expect(BigInt(derivedAccountBalance)).to.eq( + transferredBalance - (expectedTransferredAmountPlusFees - expectedTransferredAmount) + ); + // Make sure derived / descended account nonce still zero. + const derivedAccountNonce = await context + .viem() + .getTransactionCount({ address: descendAddress }); + expect(derivedAccountNonce).to.eq(0); + } + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-7.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-7.ts new file mode 100644 index 0000000000..698966c59b --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-7.ts @@ -0,0 +1,208 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { KeyringPair } from "@polkadot/keyring/types"; +import { generateKeyringPair, charleth, alith } from "@moonwall/util"; +import { + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, + descendOriginFromAddress20, +} from "../../../../helpers/xcm.js"; + +describeSuite({ + id: "D013925", + title: "Mock XCM - transact ETHEREUM (proxy) disabled switch", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let charlethBalance: bigint; + let charlethNonce: number; + let transferredBalance: bigint; + let sendingAddress: `0x${string}`; + let descendAddress: `0x${string}`; + let random: KeyringPair; + + beforeAll(async () => { + const { originAddress, descendOriginAddress } = descendOriginFromAddress20( + context, + charleth.address as `0x${string}` + ); + sendingAddress = originAddress; + descendAddress = descendOriginAddress; + random = generateKeyringPair(); + transferredBalance = 10_000_000_000_000_000_000n; + + // We fund the Delegatee, which will send the xcm and pay fees + await context.createBlock( + context.polkadotJs().tx.balances.transferAllowDeath(descendAddress, transferredBalance), + { allowFailures: false } + ); + + // Ensure funded + const balance_delegatee = ( + await context.polkadotJs().query.system.account(descendAddress) + ).data.free.toBigInt(); + expect(balance_delegatee).to.eq(transferredBalance); + + // Add proxy + await context.createBlock( + context.polkadotJs().tx.proxy.addProxy(descendAddress, "Any", 0).signAsync(charleth) + ); + + // Charleth balance after creating the proxy + charlethBalance = ( + await context.polkadotJs().query.system.account(sendingAddress) + ).data.free.toBigInt(); + + // Charleth nonce + charlethNonce = parseInt( + (await context.polkadotJs().query.system.account(sendingAddress)).nonce.toString() + ); + + // We activate the suspension switch + await context.createBlock( + context + .polkadotJs() + .tx.sudo.sudo(context.polkadotJs().tx.ethereumXcm.suspendEthereumXcmExecution()) + .signAsync(alith) + ); + }); + + it({ + id: "T01", + title: "should fail to transact_through_proxy with proxy when disabled", + test: async function () { + // Get Pallet balances index + const metadata = await context.polkadotJs().rpc.state.getMetadata(); + const balancesPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Balances")! + .index.toNumber(); + + const amountToTransfer = transferredBalance / 10n; + + const xcmTransactions = [ + { + V1: { + gas_limit: 21000, + fee_payment: { + Auto: { + Low: null, + }, + }, + action: { + Call: random.address, + }, + value: amountToTransfer, + input: [], + access_list: null, + }, + }, + { + V2: { + gas_limit: 21000, + action: { + Call: random.address, + }, + value: amountToTransfer, + input: [], + access_list: null, + }, + }, + ]; + + let expectedTransferredAmount = 0n; + let expectedTransferredAmountPlusFees = 0n; + + const targetXcmWeight = 1_325_000_000n + 100_000_000n; + const targetXcmFee = targetXcmWeight * 50_000n; + + for (const xcmTransaction of xcmTransactions) { + expectedTransferredAmount += amountToTransfer; + expectedTransferredAmountPlusFees += amountToTransfer + targetXcmFee; + // TODO need to update lookup types for xcm ethereum transaction V2 + const transferCall = context + .polkadotJs() + .tx.ethereumXcm.transactThroughProxy(sendingAddress, xcmTransaction); + const transferCallEncoded = transferCall?.method.toHex(); + + // We are going to test that we can receive a transact operation from parachain 1 + // using descendOrigin first + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 0, + interior: { + X1: { PalletInstance: balancesPalletIndex }, + }, + }, + fungible: targetXcmFee, + }, + ], + weight_limit: { + refTime: targetXcmWeight, + proofSize: 110000n, + }, + descend_origin: sendingAddress, + }) + .descend_origin() + .withdraw_asset() + .buy_execution() + .push_any({ + Transact: { + originKind: "SovereignAccount", + // 100_000 gas + 2db reads + requireWeightAtMost: { + refTime: 575_000_000n, + proofSize: 80000n, + }, + call: { + encoded: transferCallEncoded, + }, + }, + }) + .as_v4(); + + // Send an XCM and create block to execute it + await injectHrmpMessageAndSeal(context, 1, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + // The transfer destination + // Make sure the destination address did not receive the funds + const testAccountBalance = ( + await context.polkadotJs().query.system.account(random.address) + ).data.free.toBigInt(); + expect(testAccountBalance).to.eq(0n); + + // The EVM caller (proxy delegator) + // Make sure CHARLETH balance was not deducted. + const charlethAccountBalance = await context + .viem() + .getBalance({ address: sendingAddress }); + expect(BigInt(charlethAccountBalance)).to.eq(charlethBalance); + // Make sure CHARLETH nonce did not increase. + const charlethAccountNonce = await context + .viem() + .getTransactionCount({ address: sendingAddress }); + expect(charlethAccountNonce).to.eq(charlethNonce); + + // The XCM sender (proxy delegatee) + // Make sure derived / descended account paid the xcm fees only. + const derivedAccountBalance = await context + .viem() + .getBalance({ address: descendAddress }); + expect(BigInt(derivedAccountBalance)).to.eq( + transferredBalance - (expectedTransferredAmountPlusFees - expectedTransferredAmount) + ); + // Make sure derived / descended account nonce still zero. + const derivedAccountNonce = await context + .viem() + .getTransactionCount({ address: descendAddress }); + expect(derivedAccountNonce).to.eq(0); + } + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-8.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-8.ts new file mode 100644 index 0000000000..f9d15cd09c --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-8.ts @@ -0,0 +1,166 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { KeyringPair } from "@polkadot/keyring/types"; +import { generateKeyringPair, alith } from "@moonwall/util"; +import { + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, + descendOriginFromAddress20, +} from "../../../../helpers/xcm.js"; + +describeSuite({ + id: "D013926", + title: "Mock XCM - transact ETHEREUM (non-proxy) disabled switch", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let transferredBalance: bigint; + let sendingAddress: `0x${string}`; + let descendAddress: `0x${string}`; + let random: KeyringPair; + + beforeAll(async () => { + const { originAddress, descendOriginAddress } = descendOriginFromAddress20(context); + sendingAddress = originAddress; + descendAddress = descendOriginAddress; + random = generateKeyringPair(); + transferredBalance = 10_000_000_000_000_000_000n; + + // We first fund parachain 2000 sovreign account + await context.createBlock( + context + .polkadotJs() + .tx.balances.transferAllowDeath(descendOriginAddress, transferredBalance), + { allowFailures: false } + ); + + const balance = ( + await context.polkadotJs().query.system.account(descendOriginAddress) + ).data.free.toBigInt(); + expect(balance).to.eq(transferredBalance); + + // We activate the suspension switch + await context.createBlock( + context + .polkadotJs() + .tx.sudo.sudo(context.polkadotJs().tx.ethereumXcm.suspendEthereumXcmExecution()) + .signAsync(alith) + ); + }); + + it({ + id: "T01", + title: "should receive transact and should not be able to execute", + test: async function () { + // Get Pallet balances index + const metadata = await context.polkadotJs().rpc.state.getMetadata(); + const balancesPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Balances")! + .index.toNumber(); + + const amountToTransfer = transferredBalance / 10n; + + const xcmTransactions = [ + { + V1: { + gas_limit: 21000, + fee_payment: { + Auto: { + Low: null, + }, + }, + action: { + Call: random.address, + }, + value: amountToTransfer, + input: [], + access_list: null, + }, + }, + { + V2: { + gas_limit: 21000, + action: { + Call: random.address, + }, + value: amountToTransfer, + input: [], + access_list: null, + }, + }, + ]; + + let expectedTransferredAmountPlusFees = 0n; + + const targetXcmWeight = 1_325_000_000n + 25_000_000n; + const targetXcmFee = targetXcmWeight * 50_000n; + + for (const xcmTransaction of xcmTransactions) { + expectedTransferredAmountPlusFees += targetXcmFee; + // TODO need to update lookup types for xcm ethereum transaction V2 + const transferCall = context.polkadotJs().tx.ethereumXcm.transact(xcmTransaction); + const transferCallEncoded = transferCall?.method.toHex(); + + // We are going to test that we can receive a transact operation from parachain 1 + // using descendOrigin first + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 0, + interior: { + X1: { PalletInstance: balancesPalletIndex }, + }, + }, + fungible: targetXcmFee, + }, + ], + weight_limit: { + refTime: targetXcmWeight, + proofSize: 110000n, + }, + descend_origin: sendingAddress, + }) + .descend_origin() + .withdraw_asset() + .buy_execution() + .push_any({ + Transact: { + originKind: "SovereignAccount", + // 21_000 gas limit + db read + requireWeightAtMost: { + refTime: 575_000_000n, + proofSize: 80000n, + }, + call: { + encoded: transferCallEncoded, + }, + }, + }) + .as_v4(); + + // Send an XCM and create block to execute it + await injectHrmpMessageAndSeal(context, 1, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + // Make sure tokens have not bein transferred + const testAccountBalance = ( + await context.polkadotJs().query.system.account(random.address) + ).data.free.toBigInt(); + expect(testAccountBalance).to.eq(0n); + + // Make sure descend address has been deducted fees once (in xcm-executor) + const descendAddressBalance = await context + .viem() + .getBalance({ address: descendAddress }); + expect(BigInt(descendAddressBalance)).to.eq( + transferredBalance - expectedTransferredAmountPlusFees + ); + } + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-9.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-9.ts new file mode 100644 index 0000000000..d094a008e8 --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-9.ts @@ -0,0 +1,40 @@ +import "@moonbeam-network/api-augment"; +import { describeSuite, expect } from "@moonwall/cli"; +import { alith } from "@moonwall/util"; + +describeSuite({ + id: "D013927", + title: "Mock XCM - EthereumXcm only disable by root", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + it({ + id: "T01", + title: "should check suspend ethereum xcm only callable by root", + test: async function () { + let suspended = await context.polkadotJs().query.ethereumXcm.ethereumXcmSuspended(); + // should be not suspended by default + expect(suspended.toHuman()).to.be.false; + + // We try to activate without sudo + await context.createBlock( + context.polkadotJs().tx.ethereumXcm.suspendEthereumXcmExecution().signAsync(alith) + ); + suspended = await context.polkadotJs().query.ethereumXcm.ethereumXcmSuspended(); + // should not have worked, and should still not be suspended + expect(suspended.toHuman()).to.be.false; + + // Now with sudo + await context.createBlock( + context + .polkadotJs() + .tx.sudo.sudo(context.polkadotJs().tx.ethereumXcm.suspendEthereumXcmExecution()) + .signAsync(alith) + ); + + suspended = await context.polkadotJs().query.ethereumXcm.ethereumXcmSuspended(); + // should have worked, and should now be suspended + expect(suspended.toHuman()).to.be.true; + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-xcm-erc20-transfer-two-ERC20.ts b/test/suites/dev/moonbase/test-xcm-v4/test-xcm-erc20-transfer-two-ERC20.ts new file mode 100644 index 0000000000..5526dbe280 --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-xcm-erc20-transfer-two-ERC20.ts @@ -0,0 +1,272 @@ +import { beforeEach, describeSuite, expect } from "@moonwall/cli"; +import { ALITH_ADDRESS, BALTATHAR_ADDRESS, CHARLETH_ADDRESS, alith } from "@moonwall/util"; +import { ApiPromise } from "@polkadot/api"; +import { parseEther } from "ethers"; +import { expectEVMResult, getTransactionFees } from "../../../../helpers"; +import { + XcmFragment, + XcmFragmentConfig, + injectHrmpMessageAndSeal, + sovereignAccountOfSibling, +} from "../../../../helpers/xcm.js"; + +export const ERC20_TOTAL_SUPPLY = 1_000_000_000n; + +describeSuite({ + id: "D013928", + title: "Mock XCM - Send two local ERC20", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let erc20ContractAddress1: string; + let erc20ContractAddress2: string; + + let polkadotJs: ApiPromise; + + beforeEach(async function () { + polkadotJs = context.polkadotJs(); + + // Deploy first contract + const contract1 = await context.deployContract!("ERC20WithInitialSupply", { + args: ["First", "FIR", ALITH_ADDRESS, ERC20_TOTAL_SUPPLY], + }); + erc20ContractAddress1 = contract1.contractAddress; + expect(contract1.status).eq("success"); + + // Deploy second contract + const contract2 = await context.deployContract!("ERC20WithInitialSupply", { + args: ["Second", "SEC", ALITH_ADDRESS, ERC20_TOTAL_SUPPLY], + }); + erc20ContractAddress2 = contract2.contractAddress; + expect(contract2.status).eq("success"); + }); + + it({ + id: "T01", + title: "Should be able to transfer two ERC20 tokens through xtokens precompile", + test: async function () { + const amountTransferred = 1000n; + + const balanceBefore = ( + await polkadotJs.query.system.account(ALITH_ADDRESS) + ).data.free.toBigInt(); + + // Destination as multilocation + const destination = [ + // one parent + 1, + // This represents X1(AccountKey20(BALTATHAR_ADDRESS, NetworkAny)) + // AccountKey20 variant (03) + the 20 bytes account + Any network variant (00) + ["0x03" + BALTATHAR_ADDRESS.slice(2) + "00"], + ]; + + const currency1 = [erc20ContractAddress1, amountTransferred]; + const currency2 = [erc20ContractAddress2, amountTransferred]; + + const rawTx = await context.writePrecompile!({ + precompileName: "Xtokens", + functionName: "transferMultiCurrencies", + args: [ + // address of the multiassets + [currency1, currency2], + // index fee + 1n, + // Destination as multilocation + destination, + // weight + 500_000_000n, + ], + rawTxOnly: true, + }); + + const { result } = await context.createBlock(rawTx); + expectEVMResult(result!.events, "Succeed"); + + const fees = await getTransactionFees(context, result!.hash); + + const balanceAfter = ( + await polkadotJs.query.system.account(ALITH_ADDRESS) + ).data.free.toBigInt(); + + // Fees should have been spent + expect(balanceAfter).to.equal(balanceBefore - fees); + + // Erc20 tokens of the first contract should have been spent + expect( + await context.readContract!({ + contractName: "ERC20WithInitialSupply", + contractAddress: erc20ContractAddress1 as `0x${string}`, + functionName: "balanceOf", + args: [ALITH_ADDRESS], + }) + ).equals(ERC20_TOTAL_SUPPLY - amountTransferred); + + // Erc20 tokens of the second contract should have been spent + expect( + await context.readContract!({ + contractName: "ERC20WithInitialSupply", + contractAddress: erc20ContractAddress2 as `0x${string}`, + functionName: "balanceOf", + args: [ALITH_ADDRESS], + }) + ).equals(ERC20_TOTAL_SUPPLY - amountTransferred); + }, + }); + it({ + id: "T02", + title: "Should not be able to transfer two ERC20 through incoming XCM message", + test: async function () { + const paraId = 888; + const paraSovereign = sovereignAccountOfSibling(context, paraId); + const amountTransferredOf1 = 1_000_000n; + const amountTransferredOf2 = 2_000_000n; + + // Get pallet indices + const metadata = await polkadotJs.rpc.state.getMetadata(); + const balancesPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Balances")! + .index.toNumber(); + const erc20XcmPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Erc20XcmBridge")! + .index.toNumber(); + + // Send some native tokens to the sovereign account of paraId (to pay fees) + await polkadotJs.tx.balances + .transferAllowDeath(paraSovereign, parseEther("1")) + .signAndSend(alith); + await context.createBlock(); + + // Send some erc20 tokens (of first contract) to the sovereign account of paraId + const rawTx = await context.writeContract!({ + contractName: "ERC20WithInitialSupply", + contractAddress: erc20ContractAddress1 as `0x${string}`, + functionName: "transfer", + args: [paraSovereign, amountTransferredOf1], + rawTxOnly: true, + }); + + const { result } = await context.createBlock(rawTx); + expectEVMResult(result!.events, "Succeed"); + + // Check the sovereign account has received ERC20 tokens (of first contract) + expect( + await context.readContract!({ + contractName: "ERC20WithInitialSupply", + contractAddress: erc20ContractAddress1 as `0x${string}`, + functionName: "balanceOf", + args: [paraSovereign], + }) + ).equals(amountTransferredOf1); + + // Send some ERC20 tokens (of second contract) to the sovereign account of paraId + const rawTx2 = await context.writeContract!({ + contractName: "ERC20WithInitialSupply", + contractAddress: erc20ContractAddress2 as `0x${string}`, + functionName: "transfer", + args: [paraSovereign, amountTransferredOf2], + rawTxOnly: true, + }); + + const { result: result2 } = await context.createBlock(rawTx2); + expectEVMResult(result2!.events, "Succeed"); + + // Check the sovereign account has received ERC20 tokens (of second contract) + expect( + await context.readContract!({ + contractName: "ERC20WithInitialSupply", + contractAddress: erc20ContractAddress2 as `0x${string}`, + functionName: "balanceOf", + args: [paraSovereign], + }) + ).equals(amountTransferredOf2); + + // Create the xcm message to send ERC20s to Charleth + const config: XcmFragmentConfig = { + assets: [ + { + multilocation: { + parents: 0, + interior: { + X1: { PalletInstance: balancesPalletIndex }, + }, + }, + fungible: 1_000_000_000_000_000n, + }, + { + multilocation: { + parents: 0, + interior: { + X2: [ + { + PalletInstance: erc20XcmPalletIndex, + }, + { + AccountKey20: { + network: null, + key: erc20ContractAddress2, + }, + }, + ], + }, + }, + fungible: amountTransferredOf2, + }, + { + multilocation: { + parents: 0, + interior: { + X2: [ + { + PalletInstance: erc20XcmPalletIndex, + }, + { + AccountKey20: { + network: null, + key: erc20ContractAddress1, + }, + }, + ], + }, + }, + fungible: amountTransferredOf1, + }, + ], + beneficiary: CHARLETH_ADDRESS, + }; + + // Build the xcm message + const xcmMessage = new XcmFragment(config) + .withdraw_asset() + .clear_origin() + .buy_execution() + .deposit_asset_v3(3n) + .as_v4(); + + // Mock the reception of the xcm message + await injectHrmpMessageAndSeal(context, paraId, { + type: "XcmVersionedXcm", + payload: xcmMessage, + }); + + // Erc20 tokens (of first contract) should have been received in Charleth's address + expect( + await context.readContract!({ + contractName: "ERC20WithInitialSupply", + contractAddress: erc20ContractAddress1 as `0x${string}`, + functionName: "balanceOf", + args: [CHARLETH_ADDRESS], + }) + ).equals(0n); + + // Erc20 tokens (of second contract) should have been received in Charleth's address + expect( + await context.readContract!({ + contractName: "ERC20WithInitialSupply", + contractAddress: erc20ContractAddress2 as `0x${string}`, + functionName: "balanceOf", + args: [CHARLETH_ADDRESS], + }) + ).equals(0n); + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-xcm-erc20-transfer.ts b/test/suites/dev/moonbase/test-xcm-v4/test-xcm-erc20-transfer.ts new file mode 100644 index 0000000000..11426c9fee --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-xcm-erc20-transfer.ts @@ -0,0 +1,196 @@ +import "@moonbeam-network/api-augment"; +import { beforeEach, describeSuite, expect } from "@moonwall/cli"; +import { ALITH_ADDRESS, BALTATHAR_ADDRESS, CHARLETH_ADDRESS, alith } from "@moonwall/util"; +import { ApiPromise } from "@polkadot/api"; +import { parseEther } from "ethers"; +import { expectEVMResult, getTransactionFees } from "../../../../helpers"; +import { + XcmFragment, + XcmFragmentConfig, + injectHrmpMessageAndSeal, + sovereignAccountOfSibling, +} from "../../../../helpers/xcm.js"; + +export const ERC20_TOTAL_SUPPLY = 1_000_000_000n; + +describeSuite({ + id: "D013929", + title: "Mock XCM - Send local erc20", + foundationMethods: "dev", + testCases: ({ context, it }) => { + let erc20ContractAddress: string; + let polkadotJs: ApiPromise; + + beforeEach(async function () { + polkadotJs = context.polkadotJs(); + + const { contractAddress, status } = await context.deployContract!("ERC20WithInitialSupply", { + args: ["ERC20", "20S", ALITH_ADDRESS, ERC20_TOTAL_SUPPLY], + }); + erc20ContractAddress = contractAddress; + expect(status).eq("success"); + }); + + it({ + id: "T01", + title: "Should be able to transfer ERC20 token through xcm with xtokens precompile", + test: async function () { + const amountTransferred = 10n; + + // Destination as multilocation + const destination = [ + // one parent + 1, + // This represents X1(AccountKey20(BALTATHAR_ADDRESS, NetworkAny)) + // AccountKey20 variant (03) + the 20 bytes account + Any network variant (00) + ["0x03" + BALTATHAR_ADDRESS.slice(2) + "00"], + ]; + + const balanceBefore = ( + await polkadotJs.query.system.account(ALITH_ADDRESS) + ).data.free.toBigInt(); + + const rawTx = await context.writePrecompile!({ + precompileName: "Xtokens", + functionName: "transfer", + args: [ + // address of the multiasset + erc20ContractAddress, + // amount + amountTransferred, + // Destination as multilocation + destination, + // weight + 500_000n, + ], + gas: 500_000n, + rawTxOnly: true, + }); + + const { result } = await context.createBlock(rawTx); + expectEVMResult(result!.events, "Succeed"); + + const balanceAfter = ( + await polkadotJs.query.system.account(ALITH_ADDRESS) + ).data.free.toBigInt(); + + const fees = await getTransactionFees(context, result!.hash); + + // Fees should have been spent + expect(balanceAfter).to.equal(balanceBefore - fees); + + expect( + await context.readContract!({ + contractName: "ERC20WithInitialSupply", + contractAddress: erc20ContractAddress as `0x${string}`, + functionName: "balanceOf", + args: [ALITH_ADDRESS], + }) + ).equals(ERC20_TOTAL_SUPPLY - amountTransferred); + }, + }); + + it({ + id: "T02", + title: "Mock XCM - Receive back erc20", + test: async function () { + const paraId = 888; + const paraSovereign = sovereignAccountOfSibling(context, paraId); + const amountTransferred = 1_000n; + + // Get pallet indices + const metadata = await polkadotJs.rpc.state.getMetadata(); + const balancesPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Balances")! + .index.toNumber(); + const erc20XcmPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Erc20XcmBridge")! + .index.toNumber(); + + // Send some native tokens to the sovereign account of paraId (to pay fees) + await polkadotJs.tx.balances + .transferAllowDeath(paraSovereign, parseEther("1")) + .signAndSend(alith); + await context.createBlock(); + + // Send some erc20 tokens to the sovereign account of paraId + const rawTx = await context.writeContract!({ + contractName: "ERC20WithInitialSupply", + contractAddress: erc20ContractAddress as `0x${string}`, + functionName: "transfer", + args: [paraSovereign, amountTransferred], + rawTxOnly: true, + }); + + const { result } = await context.createBlock(rawTx); + expectEVMResult(result!.events, "Succeed"); + + expect( + await context.readContract!({ + contractName: "ERC20WithInitialSupply", + contractAddress: erc20ContractAddress as `0x${string}`, + functionName: "balanceOf", + args: [paraSovereign], + }) + ).equals(amountTransferred); + + // Create the incoming xcm message + const config: XcmFragmentConfig = { + assets: [ + { + multilocation: { + parents: 0, + interior: { + X1: { PalletInstance: Number(balancesPalletIndex) }, + }, + }, + fungible: 100_000_000_000_000_000n, + }, + { + multilocation: { + parents: 0, + interior: { + X2: [ + { + PalletInstance: erc20XcmPalletIndex, + }, + { + AccountKey20: { + network: null, + key: erc20ContractAddress, + }, + }, + ], + }, + }, + fungible: amountTransferred, + }, + ], + beneficiary: CHARLETH_ADDRESS, + }; + + const xcmMessage = new XcmFragment(config) + .withdraw_asset() + .clear_origin() + .buy_execution() + .deposit_asset_v3(2n) + .as_v4(); + + // Mock the reception of the xcm message + await injectHrmpMessageAndSeal(context, paraId, { + type: "XcmVersionedXcm", + payload: xcmMessage, + }); + + expect( + await context.readContract!({ + contractName: "ERC20WithInitialSupply", + contractAddress: erc20ContractAddress as `0x${string}`, + functionName: "balanceOf", + args: [CHARLETH_ADDRESS], + }) + ).equals(amountTransferred); + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-xcm-ver-conversion-1.ts b/test/suites/dev/moonbase/test-xcm-v4/test-xcm-ver-conversion-1.ts new file mode 100644 index 0000000000..956fc7414b --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-xcm-ver-conversion-1.ts @@ -0,0 +1,103 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { KeyringPair } from "@polkadot/keyring/types"; +import { generateKeyringPair } from "@moonwall/util"; +import { + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, + weightMessage, + sovereignAccountOfSibling, +} from "../../../../helpers/xcm.js"; + +const foreign_para_id = 2000; + +describeSuite({ + id: "D013930", + title: "XCM Moonbase: version compatibility", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let transferredBalance: bigint; + let sovereignAddress: string; + let random: KeyringPair; + + beforeAll(async () => { + random = generateKeyringPair(); + sovereignAddress = sovereignAccountOfSibling(context, 2000); + transferredBalance = 100000000000000n; + + await context.createBlock( + context.polkadotJs().tx.balances.transferAllowDeath(sovereignAddress, transferredBalance), + { allowFailures: false } + ); + + const balance = ( + await context.polkadotJs().query.system.account(sovereignAddress) + ).data.free.toBigInt(); + expect(balance).to.eq(transferredBalance); + }); + + it({ + id: "T01", + title: "Should execute v4 message", + test: async function () { + const metadata = await context.polkadotJs().rpc.state.getMetadata(); + const balancesPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Balances")! + .index.toNumber(); + + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 0, + interior: { + X1: { PalletInstance: balancesPalletIndex }, + }, + }, + fungible: transferredBalance, + }, + ], + weight_limit: { + refTime: 8000000000, + proofSize: 110000n, + }, + beneficiary: random.address, + }) + .withdraw_asset() + .clear_origin() + .buy_execution() + .deposit_asset_v3() + .as_v4(); + + const chargedWeight = await weightMessage( + context, + context.polkadotJs().createType("XcmVersionedXcm", xcmMessage) + ); + + const chargedFee = chargedWeight * 50000n; + + await injectHrmpMessageAndSeal(context, foreign_para_id, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + const balance = ( + await context.polkadotJs().query.system.account(sovereignAddress) + ).data.free.toBigInt(); + expect(balance.toString(), "Sovereign account not empty, transfer has failed").to.eq( + 0n.toString() + ); + + const randomBalance = ( + await context.polkadotJs().query.system.account(random.address) + ).data.free.toBigInt(); + const expectedRandomBalance = transferredBalance - chargedFee; + expect(randomBalance, "Balance not increased, transfer has failed").to.eq( + expectedRandomBalance + ); + }, + }); + }, +}); diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-xcm-ver-conversion-2.ts b/test/suites/dev/moonbase/test-xcm-v4/test-xcm-ver-conversion-2.ts new file mode 100644 index 0000000000..acee2b408d --- /dev/null +++ b/test/suites/dev/moonbase/test-xcm-v4/test-xcm-ver-conversion-2.ts @@ -0,0 +1,103 @@ +import "@moonbeam-network/api-augment"; +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; + +import { KeyringPair } from "@polkadot/keyring/types"; +import { generateKeyringPair } from "@moonwall/util"; +import { + XcmFragment, + RawXcmMessage, + injectHrmpMessageAndSeal, + weightMessage, + sovereignAccountOfSibling, +} from "../../../../helpers/xcm.js"; + +const foreign_para_id = 2000; + +describeSuite({ + id: "D013931", + title: "XCM Moonriver: version compatibility", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let transferredBalance: bigint; + let sovereignAddress: string; + let random: KeyringPair; + + beforeAll(async () => { + random = generateKeyringPair(); + sovereignAddress = sovereignAccountOfSibling(context, 2000); + transferredBalance = 100000000000000n; + + await context.createBlock( + context.polkadotJs().tx.balances.transferAllowDeath(sovereignAddress, transferredBalance), + { allowFailures: false } + ); + + const balance = ( + await context.polkadotJs().query.system.account(sovereignAddress) + ).data.free.toBigInt(); + expect(balance).to.eq(transferredBalance); + }); + + it({ + id: "T01", + title: "Should execute v4 message", + test: async function () { + const metadata = await context.polkadotJs().rpc.state.getMetadata(); + const balancesPalletIndex = metadata.asLatest.pallets + .find(({ name }) => name.toString() == "Balances")! + .index.toNumber(); + + const xcmMessage = new XcmFragment({ + assets: [ + { + multilocation: { + parents: 0, + interior: { + X1: { PalletInstance: balancesPalletIndex }, + }, + }, + fungible: transferredBalance, + }, + ], + weight_limit: { + refTime: 8000000000, + proofSize: 110000n, + }, + beneficiary: random.address, + }) + .withdraw_asset() + .clear_origin() + .buy_execution() + .deposit_asset_v3() + .as_v4(); + + const chargedWeight = await weightMessage( + context, + context.polkadotJs().createType("XcmVersionedXcm", xcmMessage) + ); + + const chargedFee = chargedWeight * 50000n; + + await injectHrmpMessageAndSeal(context, foreign_para_id, { + type: "XcmVersionedXcm", + payload: xcmMessage, + } as RawXcmMessage); + + const balance = ( + await context.polkadotJs().query.system.account(sovereignAddress) + ).data.free.toBigInt(); + expect(balance.toString(), "Sovereign account not empty, transfer has failed").to.eq( + 0n.toString() + ); + + const randomBalance = ( + await context.polkadotJs().query.system.account(random.address) + ).data.free.toBigInt(); + const expectedRandomBalance = transferredBalance - chargedFee; + expect(randomBalance, "Balance not increased, transfer has failed").to.eq( + expectedRandomBalance + ); + }, + }); + }, +}); From b15a5c293536e244d40585d4d31f73afbac73e22 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Mon, 18 Mar 2024 21:08:43 +0000 Subject: [PATCH 50/80] fix fmt --- .../dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-5.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-5.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-5.ts index b9ab6809bd..a27dfde186 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-5.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-5.ts @@ -1,7 +1,6 @@ import "@moonbeam-network/api-augment"; import { beforeAll, describeSuite, expect } from "@moonwall/cli"; - import { alith } from "@moonwall/util"; import { From 31ead3df067b3e8340881fd1dd715d086bc87d1d Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Mon, 18 Mar 2024 22:06:23 +0000 Subject: [PATCH 51/80] update moonkit dependency branch --- Cargo.lock | 300 ++++++++++++++++++++++++++--------------------------- Cargo.toml | 26 ++--- 2 files changed, 159 insertions(+), 167 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4790b2b4ac..ec1653eba1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,7 +243,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -629,7 +629,7 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-backing-primitives" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.7.2#8e4c4df71e15b9c8e1324795c711ddb126f4e28a" dependencies = [ "sp-api", "sp-consensus-slots", @@ -669,7 +669,7 @@ dependencies = [ "async-task", "concurrent-queue", "fastrand 2.0.1", - "futures-lite 2.2.0", + "futures-lite 2.3.0", "slab", ] @@ -715,7 +715,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.2.0", + "futures-lite 2.3.0", "parking", "polling 3.5.0", "rustix 0.38.31", @@ -798,13 +798,13 @@ checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -849,7 +849,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -926,15 +926,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "basic-toml" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8" -dependencies = [ - "serde", -] - [[package]] name = "beef" version = "0.5.2" @@ -980,7 +971,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1139,7 +1130,7 @@ dependencies = [ "async-task", "fastrand 2.0.1", "futures-io", - "futures-lite 2.2.0", + "futures-lite 2.3.0", "piper", "tracing", ] @@ -1243,9 +1234,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.14.3" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef034f05691a48569bd920a96c81b9d91bbad1ab5ac7c4616c1f6ef36cb79f" +checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" [[package]] name = "byteorder" @@ -1461,9 +1452,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.2" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b230ab84b0ffdf890d5a10abdbc8b83ae1c4918275daea1ab8801f71536b2651" +checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813" dependencies = [ "clap_builder", "clap_derive", @@ -1484,14 +1475,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.0" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" +checksum = "90239a040c80f5e14809ca132ddc4176ab33d5e17e49691793296e3fcb34d72f" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2189,7 +2180,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2483,7 +2474,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2523,7 +2514,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2540,7 +2531,7 @@ checksum = "70b5b86cf65fa0626d85720619d80b288013477a91a0389fa8bc716bf4903ad1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2729,7 +2720,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2775,9 +2766,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.52", + "syn 2.0.53", "termcolor", - "toml 0.8.11", + "toml 0.8.12", "walkdir", ] @@ -2962,7 +2953,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "syn 1.0.109", @@ -2985,7 +2976,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2996,7 +2987,7 @@ checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3241,7 +3232,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3299,7 +3290,7 @@ dependencies = [ [[package]] name = "fc-api" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "async-trait", "fp-storage", @@ -3311,7 +3302,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "async-trait", "fp-consensus", @@ -3327,7 +3318,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "async-trait", "ethereum", @@ -3358,7 +3349,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "fc-db", "fc-storage", @@ -3381,7 +3372,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "ethereum", "ethereum-types", @@ -3436,7 +3427,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "ethereum", "ethereum-types", @@ -3451,7 +3442,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "ethereum", "ethereum-types", @@ -3646,7 +3637,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "hex", "impl-serde 0.4.0", @@ -3665,7 +3656,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "ethereum", "parity-scale-codec", @@ -3677,7 +3668,7 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "ethereum", "ethereum-types", @@ -3690,7 +3681,7 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "evm", "frame-support", @@ -3706,7 +3697,7 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "ethereum", "ethereum-types", @@ -3723,7 +3714,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "frame-support", "parity-scale-codec", @@ -3735,7 +3726,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "parity-scale-codec", "serde", @@ -3828,7 +3819,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3957,7 +3948,7 @@ dependencies = [ "proc-macro2", "quote", "sp-crypto-hashing", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3969,7 +3960,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3979,7 +3970,7 @@ source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbea dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -4156,9 +4147,9 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ "fastrand 2.0.1", "futures-core", @@ -4175,7 +4166,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -4347,9 +4338,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" dependencies = [ "bytes", "fnv", @@ -4446,6 +4437,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.3.9" @@ -5033,7 +5030,7 @@ version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29110019693a4fa2dbda04876499d098fa16d70eba06b1e6e2b3f1b251419515" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro-crate 1.3.1", "proc-macro2", "quote", @@ -5506,7 +5503,7 @@ version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f" dependencies = [ - "heck", + "heck 0.4.1", "quote", "syn 1.0.109", ] @@ -5829,7 +5826,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -5843,7 +5840,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -5854,7 +5851,7 @@ checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -5865,7 +5862,7 @@ checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -7441,7 +7438,7 @@ dependencies = [ [[package]] name = "nimbus-consensus" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.7.2#8e4c4df71e15b9c8e1324795c711ddb126f4e28a" dependencies = [ "async-backing-primitives", "async-trait", @@ -7481,7 +7478,7 @@ dependencies = [ [[package]] name = "nimbus-primitives" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.7.2#8e4c4df71e15b9c8e1324795c711ddb126f4e28a" dependencies = [ "async-trait", "frame-benchmarking", @@ -7705,7 +7702,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -7785,7 +7782,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -8014,7 +8011,7 @@ dependencies = [ [[package]] name = "pallet-async-backing" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.7.2#8e4c4df71e15b9c8e1324795c711ddb126f4e28a" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", @@ -8034,7 +8031,7 @@ dependencies = [ [[package]] name = "pallet-author-inherent" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.7.2#8e4c4df71e15b9c8e1324795c711ddb126f4e28a" dependencies = [ "frame-benchmarking", "frame-support", @@ -8053,7 +8050,7 @@ dependencies = [ [[package]] name = "pallet-author-mapping" version = "2.0.5" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.7.2#8e4c4df71e15b9c8e1324795c711ddb126f4e28a" dependencies = [ "frame-benchmarking", "frame-support", @@ -8071,7 +8068,7 @@ dependencies = [ [[package]] name = "pallet-author-slot-filter" version = "0.9.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.7.2#8e4c4df71e15b9c8e1324795c711ddb126f4e28a" dependencies = [ "frame-benchmarking", "frame-support", @@ -8452,7 +8449,7 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "environmental", "ethereum", @@ -8508,7 +8505,7 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "environmental", "evm", @@ -8534,7 +8531,7 @@ dependencies = [ [[package]] name = "pallet-evm-chain-id" version = "1.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "frame-support", "frame-system", @@ -8628,7 +8625,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "fp-evm", ] @@ -8636,7 +8633,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-bn128" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "fp-evm", "sp-core", @@ -8766,7 +8763,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-dispatch" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "fp-evm", "frame-support", @@ -8842,7 +8839,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "fp-evm", "num", @@ -9076,7 +9073,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "fp-evm", "tiny-keccak", @@ -9085,7 +9082,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#2f9e56585d75a87926c222b32d1107d9ce56d934" +source = "git+https://github.com/moonbeam-foundation/frontier?branch=moonbeam-polkadot-v1.7.2#58e15d000360c0ebecc201c8c56fd4768b350510" dependencies = [ "fp-evm", "ripemd", @@ -9320,7 +9317,7 @@ dependencies = [ [[package]] name = "pallet-maintenance-mode" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.7.2#8e4c4df71e15b9c8e1324795c711ddb126f4e28a" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -9373,7 +9370,7 @@ dependencies = [ [[package]] name = "pallet-migrations" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.7.2#8e4c4df71e15b9c8e1324795c711ddb126f4e28a" dependencies = [ "frame-benchmarking", "frame-support", @@ -9660,7 +9657,7 @@ dependencies = [ [[package]] name = "pallet-randomness" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.7.2#8e4c4df71e15b9c8e1324795c711ddb126f4e28a" dependencies = [ "environmental", "frame-benchmarking", @@ -9737,7 +9734,7 @@ dependencies = [ [[package]] name = "pallet-relay-storage-roots" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.7.2#8e4c4df71e15b9c8e1324795c711ddb126f4e28a" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", @@ -9878,7 +9875,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -10386,7 +10383,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -10427,7 +10424,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -11577,7 +11574,7 @@ dependencies = [ "polkavm-common", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -11587,7 +11584,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429" dependencies = [ "polkavm-derive-impl", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -11795,7 +11792,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ "proc-macro2", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -11888,7 +11885,7 @@ checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -11934,7 +11931,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -11964,7 +11961,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", - "heck", + "heck 0.4.1", "itertools 0.10.5", "lazy_static", "log", @@ -12002,7 +11999,7 @@ dependencies = [ "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -12281,7 +12278,7 @@ checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -12896,7 +12893,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -13912,7 +13909,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -14199,7 +14196,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -14225,7 +14222,7 @@ dependencies = [ [[package]] name = "session-keys-primitives" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.7.2#8e4c4df71e15b9c8e1324795c711ddb126f4e28a" dependencies = [ "async-trait", "frame-support", @@ -14637,7 +14634,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -14885,7 +14882,7 @@ dependencies = [ [[package]] name = "sp-crypto-ec-utils" version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1ead59773e2dab336d2b54295419bbc3fe7c687f" +source = "git+https://github.com/paritytech/polkadot-sdk#610987a19da816a76c296c99f311ce8f6e9ab3d8" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -14900,7 +14897,6 @@ dependencies = [ "ark-ed-on-bls12-381-bandersnatch-ext", "ark-scale", "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", ] [[package]] @@ -14923,7 +14919,7 @@ source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbea dependencies = [ "quote", "sp-crypto-hashing", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -14942,17 +14938,17 @@ source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbea dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1ead59773e2dab336d2b54295419bbc3fe7c687f" +source = "git+https://github.com/paritytech/polkadot-sdk#610987a19da816a76c296c99f311ce8f6e9ab3d8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -14969,11 +14965,10 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.25.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1ead59773e2dab336d2b54295419bbc3fe7c687f" +source = "git+https://github.com/paritytech/polkadot-sdk#610987a19da816a76c296c99f311ce8f6e9ab3d8" dependencies = [ "environmental", "parity-scale-codec", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk)", ] @@ -15188,7 +15183,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1ead59773e2dab336d2b54295419bbc3fe7c687f" +source = "git+https://github.com/paritytech/polkadot-sdk#610987a19da816a76c296c99f311ce8f6e9ab3d8" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -15214,20 +15209,20 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] name = "sp-runtime-interface-proc-macro" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1ead59773e2dab336d2b54295419bbc3fe7c687f" +source = "git+https://github.com/paritytech/polkadot-sdk#610987a19da816a76c296c99f311ce8f6e9ab3d8" dependencies = [ "Inflector", "expander 2.0.0", "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -15313,7 +15308,7 @@ source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbea [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1ead59773e2dab336d2b54295419bbc3fe7c687f" +source = "git+https://github.com/paritytech/polkadot-sdk#610987a19da816a76c296c99f311ce8f6e9ab3d8" [[package]] name = "sp-storage" @@ -15331,14 +15326,13 @@ dependencies = [ [[package]] name = "sp-storage" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1ead59773e2dab336d2b54295419bbc3fe7c687f" +source = "git+https://github.com/paritytech/polkadot-sdk#610987a19da816a76c296c99f311ce8f6e9ab3d8" dependencies = [ "impl-serde 0.4.0", "parity-scale-codec", "ref-cast", "serde", "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", ] [[package]] @@ -15369,10 +15363,9 @@ dependencies = [ [[package]] name = "sp-tracing" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1ead59773e2dab336d2b54295419bbc3fe7c687f" +source = "git+https://github.com/paritytech/polkadot-sdk#610987a19da816a76c296c99f311ce8f6e9ab3d8" dependencies = [ "parity-scale-codec", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "tracing", "tracing-core", "tracing-subscriber", @@ -15451,7 +15444,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -15470,13 +15463,12 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1ead59773e2dab336d2b54295419bbc3fe7c687f" +source = "git+https://github.com/paritytech/polkadot-sdk#610987a19da816a76c296c99f311ce8f6e9ab3d8" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "wasmtime", ] @@ -15613,7 +15605,7 @@ checksum = "5833ef53aaa16d860e92123292f1f6a3d53c34ba8b1969f152ef1a7bb803f3c8" dependencies = [ "dotenvy", "either", - "heck", + "heck 0.4.1", "hex", "once_cell", "proc-macro2", @@ -15654,9 +15646,9 @@ dependencies = [ [[package]] name = "ss58-registry" -version = "1.46.0" +version = "1.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1114ee5900b8569bbc8b1a014a942f937b752af4b44f4607430b5f86cedaac0" +checksum = "4743ce898933fbff7bbf414f497c459a782d496269644b3d650a398ae6a487ba" dependencies = [ "Inflector", "num-format", @@ -15837,7 +15829,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", @@ -15850,11 +15842,11 @@ version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -16069,7 +16061,7 @@ dependencies = [ "sp-maybe-compressed-blob", "strum 0.24.1", "tempfile", - "toml 0.8.11", + "toml 0.8.12", "walkdir", "wasm-opt", ] @@ -16117,9 +16109,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" dependencies = [ "proc-macro2", "quote", @@ -16234,7 +16226,7 @@ checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -16245,7 +16237,7 @@ checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -16408,7 +16400,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -16434,9 +16426,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", "pin-project-lite 0.2.13", @@ -16470,14 +16462,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af06656561d28735e9c1cd63dfd57132c8155426aa6af24f36a00a351f88c48e" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.7", + "toml_edit 0.22.8", ] [[package]] @@ -16524,9 +16516,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.7" +version = "0.22.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18769cd1cec395d70860ceb4d932812a0b4d06b1a4bb336745a4d21b9496e992" +checksum = "c12219811e0c1ba077867254e5ad62ee2c9c190b0d957110750ac0cda1ae96cd" dependencies = [ "indexmap 2.2.5", "serde", @@ -16600,7 +16592,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -16643,7 +16635,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -16811,17 +16803,17 @@ dependencies = [ [[package]] name = "trybuild" -version = "1.0.89" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9d3ba662913483d6722303f619e75ea10b7855b0f8e0d72799cf8621bb488f" +checksum = "2aa6f84ec205ebf87fb7a0abdbcd1467fa5af0e86878eb6d888b78ecbb10b6d5" dependencies = [ - "basic-toml", "glob", "once_cell", "serde", "serde_derive", "serde_json", "termcolor", + "toml 0.8.12", ] [[package]] @@ -17092,7 +17084,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "wasm-bindgen-shared", ] @@ -17126,7 +17118,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -17963,7 +17955,7 @@ dependencies = [ [[package]] name = "xcm-primitives" version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/moonkit?branch=rq/moonbeam-polkadot-v1.7.2#65586d76d5fe36885466b30f13e2dceb8288594d" +source = "git+https://github.com/Moonsong-Labs/moonkit?branch=moonbeam-polkadot-v1.7.2#8e4c4df71e15b9c8e1324795c711ddb126f4e28a" dependencies = [ "sp-runtime", ] @@ -18004,7 +17996,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -18065,7 +18057,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -18085,7 +18077,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index ce4e9f0f9c..87930c5f0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -316,21 +316,21 @@ westend-runtime = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", xcm-simulator = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } # Moonkit (wasm) -async-backing-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } -moonkit-xcm-primitives = { package = "xcm-primitives", git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } -nimbus-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } -pallet-async-backing = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } -pallet-author-inherent = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } -pallet-author-mapping = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } -pallet-author-slot-filter = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } -pallet-maintenance-mode = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } -pallet-migrations = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } -pallet-randomness = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } -pallet-relay-storage-roots = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } -session-keys-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2", default-features = false } +async-backing-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +moonkit-xcm-primitives = { package = "xcm-primitives", git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +nimbus-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-async-backing = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-author-inherent = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-author-mapping = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-author-slot-filter = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-maintenance-mode = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-migrations = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-randomness = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +pallet-relay-storage-roots = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.7.2", default-features = false } +session-keys-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.7.2", default-features = false } # Moonkit (client) -nimbus-consensus = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "rq/moonbeam-polkadot-v1.7.2" } +nimbus-consensus = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.7.2" } # Other (wasm) affix = "0.1.2" From ba61606668d2cec64c9088672d315a8adac5a31a Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 19 Mar 2024 08:06:31 +0000 Subject: [PATCH 52/80] add new type parameter to pallet async-backing config --- runtime/moonbase/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/moonbase/src/lib.rs b/runtime/moonbase/src/lib.rs index dc9c65265a..991cd97683 100644 --- a/runtime/moonbase/src/lib.rs +++ b/runtime/moonbase/src/lib.rs @@ -878,6 +878,7 @@ impl pallet_author_slot_filter::Config for Runtime { impl pallet_async_backing::Config for Runtime { type AllowMultipleBlocksPerSlot = ConstBool; type GetAndVerifySlot = pallet_async_backing::RelaySlot; + type ExpectedBlockTime = ConstU64<6>; } parameter_types! { From 915b9ef45c45b52f1dd1a99b7aeed947375c54bf Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 19 Mar 2024 10:04:57 +0000 Subject: [PATCH 53/80] fix coverage job --- .github/workflow-templates/rust-toolchain/action.yml | 2 +- .github/workflows/version-bump.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflow-templates/rust-toolchain/action.yml b/.github/workflow-templates/rust-toolchain/action.yml index 12d873f57f..1fee4278c8 100644 --- a/.github/workflow-templates/rust-toolchain/action.yml +++ b/.github/workflow-templates/rust-toolchain/action.yml @@ -9,7 +9,7 @@ runs: with: toolchain: 1.74.0 override: true - components: rust-src, rustfmt, clippy + components: rust-src, rustfmt, clippy, llvm-tools-preview - name: Install components and targets shell: bash run: | diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index 186d0ce251..2aea198f98 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -3,10 +3,10 @@ on: workflow_dispatch: inputs: from: - description: "Polkadot version to bump from (ex: v0.9.40)" + description: "Polkadot version to bump from (ex: v1.3.0)" required: true to: - description: "Polkadot version to bump to (ex: v0.9.42)" + description: "Polkadot version to bump to (ex: v1.7.2)" required: true jobs: @@ -29,7 +29,7 @@ jobs: - name: Create version bump issue uses: peter-evans/create-issue-from-file@v3 with: - title: Update substrate/polkadot/cumulus from ${{ github.event.inputs.from }} to ${{ github.event.inputs.to }} + title: Update polkadot-sdk from ${{ github.event.inputs.from }} to ${{ github.event.inputs.to }} content-filepath: ./version-bump.md labels: | automated issue From d3afb949d88b187db917d4074385a0ab4fded17e Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 19 Mar 2024 10:54:05 +0000 Subject: [PATCH 54/80] update github jobs --- .github/workflow-templates/cargo-build/action.yml | 4 ++-- .github/workflow-templates/rust-toolchain/action.yml | 4 ++-- .github/workflows/coverage.yml | 2 ++ .github/workflows/docs.yml | 2 +- .github/workflows/prepare-binary.yml | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflow-templates/cargo-build/action.yml b/.github/workflow-templates/cargo-build/action.yml index 1a88ba2e96..2bb0c9e0a0 100644 --- a/.github/workflow-templates/cargo-build/action.yml +++ b/.github/workflow-templates/cargo-build/action.yml @@ -13,8 +13,6 @@ runs: steps: - name: Run sccache-cache uses: mozilla-actions/sccache-action@v0.0.3 - - name: Install Rust Toolchain - uses: ./.github/workflow-templates/rust-toolchain - name: Setup Variables shell: bash run: | @@ -30,6 +28,8 @@ runs: run: | mkdir -p mold curl -L --retry 10 --silent --show-error https://github.com/rui314/mold/releases/download/v1.1.1/mold-1.1.1-$(uname -m)-linux.tar.gz | tar -C $(realpath mold) --strip-components=1 -xzf - + - name: Install Rust Toolchain + uses: ./.github/workflow-templates/rust-toolchain - name: Build Node shell: bash run: | diff --git a/.github/workflow-templates/rust-toolchain/action.yml b/.github/workflow-templates/rust-toolchain/action.yml index 1fee4278c8..c764eadc69 100644 --- a/.github/workflow-templates/rust-toolchain/action.yml +++ b/.github/workflow-templates/rust-toolchain/action.yml @@ -9,8 +9,8 @@ runs: with: toolchain: 1.74.0 override: true - components: rust-src, rustfmt, clippy, llvm-tools-preview - - name: Install components and targets + components: rust-src, rustfmt, clippy + - name: Install targets shell: bash run: | rustup target add wasm32-unknown-unknown diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index b0965c8104..a9edafe991 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -113,6 +113,8 @@ jobs: wget https://github.com/mozilla/grcov/releases/download/v${{ env.GRCOV_VERSION }}/grcov-x86_64-unknown-linux-gnu.tar.bz2 tar xvf grcov-x86_64-unknown-linux-gnu.tar.bz2 chmod +x grcov + - name: Install llvm tools + run: rustup component add llvm-tools-preview - name: Cargo build uses: ./.github/workflow-templates/cargo-build - name: Enable coverage gathering diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a59cbed291..8fd302450c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -19,7 +19,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Cargo build + - name: Setup Rust toolchain uses: ./.github/workflow-templates/rust-toolchain - uses: actions/cache@v3 diff --git a/.github/workflows/prepare-binary.yml b/.github/workflows/prepare-binary.yml index 54be5e4317..ea44c504af 100644 --- a/.github/workflows/prepare-binary.yml +++ b/.github/workflows/prepare-binary.yml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.sha }} - - name: Cargo build + - name: Setup Rust toolchain uses: ./.github/workflow-templates/rust-toolchain - name: Build Node run: cargo build --profile=production --all From 74711dc741944f164eded00629f31cb3106dbf40 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 19 Mar 2024 11:48:56 +0000 Subject: [PATCH 55/80] derive new test id's --- .../moonbase/test-precompile/test-precompile-dummy-bytecode.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-ecpairing.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-ecrecover.ts | 2 +- .../moonbase/test-precompile/test-precompile-erc20-overflow.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-erc20.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-identity.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-identity10.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-identity11.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-identity12.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-identity13.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-identity14.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-identity2.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-identity3.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-identity4.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-identity5.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-identity6.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-identity7.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-identity8.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-identity9.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-modexp.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-preimage.ts | 2 +- .../test-precompile/test-precompile-proxy-author-mapping.ts | 2 +- .../test-precompile/test-precompile-proxy-governance.ts | 2 +- .../test-precompile/test-precompile-proxy-leader-demo.ts | 2 +- .../test-precompile/test-precompile-proxy-leader-demo2.ts | 2 +- .../test-precompile/test-precompile-proxy-leader-demo3.ts | 2 +- .../test-precompile/test-precompile-proxy-non-transfer.ts | 2 +- .../test-precompile/test-precompile-proxy-staking-demo.ts | 2 +- .../test-precompile/test-precompile-proxy-staking-demo2.ts | 2 +- .../test-precompile/test-precompile-proxy-staking-demo3.ts | 2 +- .../test-precompile/test-precompile-proxy-staking-demo4.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-proxy.ts | 2 +- .../moonbase/test-precompile/test-precompile-referenda-demo.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-referenda.ts | 2 +- .../moonbase/test-precompile/test-precompile-relay-encoder.ts | 2 +- .../moonbase/test-precompile/test-precompile-relay-verifier.ts | 2 +- .../moonbase/test-precompile/test-precompile-revert-attack.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-ripemd160.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-sha3fips.ts | 2 +- .../test-precompile/test-precompile-smart-contract-call.ts | 2 +- .../test-precompile/test-precompile-smart-contract-call2.ts | 2 +- .../test-precompile/test-precompile-smart-contract-call3.ts | 2 +- .../test-precompile/test-precompile-smart-contract-call4.ts | 2 +- .../test-precompile/test-precompile-smart-contract-call5.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-staking.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-staking2.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-staking3.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-staking4.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-staking5.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-staking6.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-wormhole.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-wormhole2.ts | 2 +- .../moonbase/test-precompile/test-precompile-xcm-transactor.ts | 2 +- .../test-precompile/test-precompile-xcm-transactor10.ts | 2 +- .../test-precompile/test-precompile-xcm-transactor11.ts | 2 +- .../test-precompile/test-precompile-xcm-transactor12.ts | 2 +- .../moonbase/test-precompile/test-precompile-xcm-transactor2.ts | 2 +- .../moonbase/test-precompile/test-precompile-xcm-transactor3.ts | 2 +- .../moonbase/test-precompile/test-precompile-xcm-transactor4.ts | 2 +- .../moonbase/test-precompile/test-precompile-xcm-transactor5.ts | 2 +- .../moonbase/test-precompile/test-precompile-xcm-transactor6.ts | 2 +- .../moonbase/test-precompile/test-precompile-xcm-transactor7.ts | 2 +- .../moonbase/test-precompile/test-precompile-xcm-transactor8.ts | 2 +- .../moonbase/test-precompile/test-precompile-xcm-transactor9.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-xcm-utils.ts | 2 +- .../dev/moonbase/test-precompile/test-precompile-xtokens.ts | 2 +- .../dev/moonbase/test-xcm-v3/test-mock-dmp-asset-transfer.ts | 2 +- .../moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-1.ts | 2 +- .../moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-2.ts | 2 +- .../moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-3.ts | 2 +- .../moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-4.ts | 2 +- .../moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-5.ts | 2 +- .../moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-6.ts | 2 +- test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-queue.ts | 2 +- .../dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-1.ts | 2 +- .../dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-2.ts | 2 +- .../dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-3.ts | 2 +- .../dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-4.ts | 2 +- .../dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-5.ts | 2 +- .../dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-6.ts | 2 +- .../dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-8.ts | 2 +- .../dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-1.ts | 2 +- .../dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-2.ts | 2 +- .../dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-3.ts | 2 +- .../dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-4.ts | 2 +- .../moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-1.ts | 2 +- .../moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-10.ts | 2 +- .../moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-11.ts | 2 +- .../moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-12.ts | 2 +- .../moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-2.ts | 2 +- .../moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-3.ts | 2 +- .../moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-4.ts | 2 +- .../moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-5.ts | 2 +- .../moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-6.ts | 2 +- .../moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-7.ts | 2 +- .../moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-8.ts | 2 +- .../moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-9.ts | 2 +- .../dev/moonbase/test-xcm-v3/test-xcm-erc20-data-field-size.ts | 2 +- .../dev/moonbase/test-xcm-v3/test-xcm-erc20-excess-gas.ts | 2 +- .../dev/moonbase/test-xcm-v3/test-xcm-erc20-fees-and-trap.ts | 2 +- .../suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-v3-filter.ts | 2 +- test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-v3.ts | 2 +- test/suites/dev/moonbase/test-xcm-v3/test-xcm-transactor-1.ts | 2 +- test/suites/dev/moonbase/test-xcm-v3/test-xcm-transactor-2.ts | 2 +- .../moonbase/test-xcm-v3/test-xcmv3-max-weight-instructions.ts | 2 +- .../dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts | 2 +- .../moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-1.ts | 2 +- .../moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-2.ts | 2 +- .../moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-3.ts | 2 +- .../moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-4.ts | 2 +- .../moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-5.ts | 2 +- .../moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-6.ts | 2 +- .../dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-1.ts | 2 +- .../dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-2.ts | 2 +- .../dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-3.ts | 2 +- .../dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-4.ts | 2 +- .../dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-5.ts | 2 +- .../dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-6.ts | 2 +- .../dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-1.ts | 2 +- .../dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-2.ts | 2 +- .../dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-3.ts | 2 +- .../dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-4.ts | 2 +- .../moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-1.ts | 2 +- .../moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-10.ts | 2 +- .../moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-2.ts | 2 +- .../moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-4.ts | 2 +- .../moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-5.ts | 2 +- .../moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-6.ts | 2 +- .../moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-7.ts | 2 +- .../moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-8.ts | 2 +- .../moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-9.ts | 2 +- .../moonbase/test-xcm-v4/test-xcm-erc20-transfer-two-ERC20.ts | 2 +- test/suites/dev/moonbase/test-xcm-v4/test-xcm-erc20-transfer.ts | 2 +- .../dev/moonbase/test-xcm-v4/test-xcm-ver-conversion-1.ts | 2 +- .../dev/moonbase/test-xcm-v4/test-xcm-ver-conversion-2.ts | 2 +- 135 files changed, 135 insertions(+), 135 deletions(-) diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-dummy-bytecode.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-dummy-bytecode.ts index d6f93d674d..26fb9d38ed 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-dummy-bytecode.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-dummy-bytecode.ts @@ -20,7 +20,7 @@ import { keccak256 } from "viem"; const INIT_CODE = "0x600580600B6000396000F360006000fd"; describeSuite({ - id: "D012939", + id: "D012938", title: "Precompiles - precompiles dummy bytecode", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-ecpairing.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-ecpairing.ts index 8b1eeebea0..d944589fb7 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-ecpairing.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-ecpairing.ts @@ -3,7 +3,7 @@ import { describeSuite, expect, beforeEach } from "@moonwall/cli"; import { u8aToHex } from "@polkadot/util"; describeSuite({ - id: "D012940", + id: "D012939", title: "Precompiles - ecPairing", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-ecrecover.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-ecrecover.ts index 36ef104963..70bef38e56 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-ecrecover.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-ecrecover.ts @@ -3,7 +3,7 @@ import { beforeAll, describeSuite, expect } from "@moonwall/cli"; import { ALITH_ADDRESS, ALITH_PRIVATE_KEY } from "@moonwall/util"; describeSuite({ - id: "D012941", + id: "D012940", title: "Precompiles - ecrecover", foundationMethods: "dev", testCases: ({ context, log, it }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-erc20-overflow.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-erc20-overflow.ts index 37923b3b23..8d374e482d 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-erc20-overflow.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-erc20-overflow.ts @@ -3,7 +3,7 @@ import { describeSuite, expect } from "@moonwall/cli"; import { generateKeyringPair } from "@moonwall/util"; describeSuite({ - id: "D012942", + id: "D012941", title: "Precompile ERC20 - Transfering through precompile", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-erc20.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-erc20.ts index ff9ce66448..fab4148853 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-erc20.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-erc20.ts @@ -28,7 +28,7 @@ import { ALITH_GENESIS_TRANSFERABLE_BALANCE } from "../../../../helpers"; const ABI_REVERT_SELECTOR = "0x08c379a0"; describeSuite({ - id: "D012943", + id: "D012942", title: "Precompiles - ERC20 Native", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity.ts index f8a7d87c0f..36f16266ba 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity.ts @@ -5,7 +5,7 @@ import { toHex } from "viem"; import { PRECOMPILE_IDENTITY_ADDRESS } from "../../../../helpers"; describeSuite({ - id: "D012944", + id: "D012943", title: "Precompiles - Identity precompile", foundationMethods: "dev", testCases: ({ it, log, context }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity10.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity10.ts index 08c13b7c83..7be05ebdf7 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity10.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity10.ts @@ -4,7 +4,7 @@ import { alith, charleth } from "@moonwall/util"; import { expectEVMResult, PRECOMPILE_IDENTITY_ADDRESS } from "../../../../helpers"; describeSuite({ - id: "D012945", + id: "D012944", title: "Precompiles - Identity precompile - set account id", foundationMethods: "dev", testCases: ({ it, log, context }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity11.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity11.ts index b01681412c..e60d8496e3 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity11.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity11.ts @@ -9,7 +9,7 @@ import { } from "../../../../helpers"; describeSuite({ - id: "D012946", + id: "D012945", title: "Precompiles - Identity precompile - add sub", foundationMethods: "dev", testCases: ({ it, log, context }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity12.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity12.ts index 66c3b56f0c..ebe615b190 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity12.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity12.ts @@ -5,7 +5,7 @@ import { toHex } from "viem"; import { PRECOMPILE_IDENTITY_ADDRESS, expectEVMResult } from "../../../../helpers"; describeSuite({ - id: "D012947", + id: "D012946", title: "Precompiles - Identity precompile - rename sub", foundationMethods: "dev", testCases: ({ it, log, context }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity13.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity13.ts index 1ca76e2680..e2ddd7165e 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity13.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity13.ts @@ -9,7 +9,7 @@ import { } from "../../../../helpers"; describeSuite({ - id: "D012948", + id: "D012947", title: "Precompiles - Identity precompile - remove sub", foundationMethods: "dev", testCases: ({ it, log, context }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity14.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity14.ts index f83ed7d0c3..307b649f3c 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity14.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity14.ts @@ -9,7 +9,7 @@ import { } from "../../../../helpers"; describeSuite({ - id: "D012949", + id: "D012948", title: "Precompiles - Identity precompile - quit sub", foundationMethods: "dev", testCases: ({ it, log, context }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity2.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity2.ts index 23a899fa24..8db5eb8f49 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity2.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity2.ts @@ -9,7 +9,7 @@ import { } from "../../../../helpers"; describeSuite({ - id: "D012950", + id: "D012949", title: "Precompiles - Identity precompile - set identity", foundationMethods: "dev", testCases: ({ it, log, context }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity3.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity3.ts index 4690d88c2a..b118079c53 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity3.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity3.ts @@ -9,7 +9,7 @@ import { } from "../../../../helpers"; describeSuite({ - id: "D012951", + id: "D012950", title: "Precompiles - Identity precompile - clear identity", foundationMethods: "dev", testCases: ({ it, log, context }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity4.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity4.ts index b0d8f98f34..1ed86cbd33 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity4.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity4.ts @@ -9,7 +9,7 @@ import { } from "../../../../helpers"; describeSuite({ - id: "D012952", + id: "D012951", title: "Precompiles - Identity precompile - request judgement", foundationMethods: "dev", testCases: ({ it, log, context }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity5.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity5.ts index 7afb5b9f62..f349f710f9 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity5.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity5.ts @@ -9,7 +9,7 @@ import { } from "../../../../helpers"; describeSuite({ - id: "D012953", + id: "D012952", title: "Precompiles - Identity precompile - cancel requested judgement", foundationMethods: "dev", testCases: ({ it, log, context }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity6.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity6.ts index e32bf12496..6ae8e205b8 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity6.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity6.ts @@ -9,7 +9,7 @@ import { } from "../../../../helpers"; describeSuite({ - id: "D012954", + id: "D012953", title: "Precompiles - Identity precompile - provide judgement", foundationMethods: "dev", testCases: ({ it, log, context }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity7.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity7.ts index 4eed4dce8d..bb873cdfb9 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity7.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity7.ts @@ -5,7 +5,7 @@ import { toHex } from "viem"; import { PRECOMPILE_IDENTITY_ADDRESS, expectEVMResult } from "../../../../helpers"; describeSuite({ - id: "D012955", + id: "D012954", title: "Precompiles - Identity precompile - set subs", foundationMethods: "dev", testCases: ({ it, log, context }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity8.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity8.ts index 9b39f2f78a..727e4169ae 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity8.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity8.ts @@ -4,7 +4,7 @@ import { alith } from "@moonwall/util"; import { expectEVMResult, PRECOMPILE_IDENTITY_ADDRESS } from "../../../../helpers"; describeSuite({ - id: "D012956", + id: "D012955", title: "Precompiles - Identity precompile - set fee", foundationMethods: "dev", testCases: ({ it, log, context }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-identity9.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-identity9.ts index 1bbe4e6648..b282eec082 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-identity9.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-identity9.ts @@ -4,7 +4,7 @@ import { alith } from "@moonwall/util"; import { expectEVMResult, PRECOMPILE_IDENTITY_ADDRESS } from "../../../../helpers"; describeSuite({ - id: "D012957", + id: "D012956", title: "Precompiles - Identity precompile - set fields", foundationMethods: "dev", testCases: ({ it, log, context }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts index 86c5beb114..83c29980f3 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-modexp.ts @@ -7,7 +7,7 @@ import { expectEVMResult, testVectors } from "../../../../helpers"; const MODEXP_PRECOMPILE_ADDRESS = "0x0000000000000000000000000000000000000005"; describeSuite({ - id: "D012958", + id: "D012957", title: "Precompiles - modexp", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-preimage.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-preimage.ts index 9eb56d998f..4927889c60 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-preimage.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-preimage.ts @@ -6,7 +6,7 @@ import { Preimage, expectEVMResult, expectSubstrateEvent } from "../../../../hel // Each test is instantiating a new proposal (Not ideal for isolation but easier to write) // Be careful to not reach the maximum number of proposals. describeSuite({ - id: "D012959", + id: "D012958", title: "Precompiles - Preimage precompile", foundationMethods: "dev", testCases: ({ it, log, context }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-author-mapping.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-author-mapping.ts index 4691d5cd5b..c11d0ab61d 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-author-mapping.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-author-mapping.ts @@ -12,7 +12,7 @@ import { encodeFunctionData } from "viem"; import { expectEVMResult, getAuthorMappingInfo } from "../../../../helpers"; describeSuite({ - id: "D012960", + id: "D012959", title: "Proxy : Author Mapping - simple association", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-governance.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-governance.ts index bf6b67b73a..9167c88163 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-governance.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-governance.ts @@ -23,7 +23,7 @@ import { expectEVMResult } from "../../../../helpers"; const proposalHash = "0xf3d039875302d49d52fb1af6877a2c46bc55b004afb8130f94dd9d0489ca3185"; describeSuite({ - id: "D012961", + id: "D012960", title: "Proxing governance (through proxy precompile)", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-leader-demo.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-leader-demo.ts index 500d73d8fd..103e1e0deb 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-leader-demo.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-leader-demo.ts @@ -4,7 +4,7 @@ import { BALTATHAR_ADDRESS, CHARLETH_ADDRESS, DOROTHY_ADDRESS, GLMR } from "@moo import { setupPoolWithParticipants } from "../../../../helpers"; describeSuite({ - id: "D012962", + id: "D012961", title: "Proxy Leader Demo - Preparing Participation Pool", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-leader-demo2.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-leader-demo2.ts index 025d678868..3bcb00557f 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-leader-demo2.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-leader-demo2.ts @@ -3,7 +3,7 @@ import { beforeAll, describeSuite, expect } from "@moonwall/cli"; import { expectEVMResult, setupPoolWithParticipants } from "../../../../helpers"; describeSuite({ - id: "D012963", + id: "D012962", title: "Proxy Leader Demo - Start Voting", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-leader-demo3.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-leader-demo3.ts index 28c99baf54..4e1f67bc78 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-leader-demo3.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-leader-demo3.ts @@ -10,7 +10,7 @@ import { import { setupPoolWithParticipants, expectEVMResult } from "../../../../helpers"; describeSuite({ - id: "D012964", + id: "D012963", title: "Proxy Leader Demo - Vote", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-non-transfer.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-non-transfer.ts index 8a3656956c..4c8a82a79e 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-non-transfer.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-non-transfer.ts @@ -18,7 +18,7 @@ import { encodeFunctionData } from "viem"; import { expectEVMResult, getAuthorMappingInfo } from "../../../../helpers"; describeSuite({ - id: "D012965", + id: "D012964", title: "Proxy : Non transfer - Evm transfer", foundationMethods: "dev", testCases: ({ it, log, context }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-staking-demo.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-staking-demo.ts index 23c79ed4fd..fc28217fdf 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-staking-demo.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-staking-demo.ts @@ -13,7 +13,7 @@ import { nToHex } from "@polkadot/util"; import { setupWithParticipants } from "../../../../helpers"; describeSuite({ - id: "D012966", + id: "D012965", title: "Proxy Call Staking Demo - Register Candidate", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-staking-demo2.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-staking-demo2.ts index b1de9c15f3..97f290de72 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-staking-demo2.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-staking-demo2.ts @@ -16,7 +16,7 @@ import { nToHex } from "@polkadot/util"; import { setupWithParticipants } from "../../../../helpers"; describeSuite({ - id: "D012967", + id: "D012966", title: "Proxy Call Staking Demo - New Participant", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-staking-demo3.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-staking-demo3.ts index 8140812990..62282abe3c 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-staking-demo3.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-staking-demo3.ts @@ -14,7 +14,7 @@ import { nToHex } from "@polkadot/util"; import { setupWithParticipants } from "../../../../helpers"; describeSuite({ - id: "D012968", + id: "D012967", title: "Proxy Call Staking Demo - Leave Participant", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-staking-demo4.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-staking-demo4.ts index 4a62246840..6149187009 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-staking-demo4.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy-staking-demo4.ts @@ -13,7 +13,7 @@ import { nToHex } from "@polkadot/util"; import { setupWithParticipants } from "../../../../helpers"; describeSuite({ - id: "D012969", + id: "D012968", title: "Proxy Call Staking Demo - Unregister Candidate", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts index fc73c62105..482f713a3d 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-proxy.ts @@ -23,7 +23,7 @@ import { generatePrivateKey, privateKeyToAccount } from "viem/accounts"; import { expectEVMResult } from "../../../../helpers"; describeSuite({ - id: "D012970", + id: "D012969", title: "Precompile - Proxy", foundationMethods: "dev", testCases: ({ it, log, context }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-referenda-demo.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-referenda-demo.ts index 68b8f97d21..1aa36e18bc 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-referenda-demo.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-referenda-demo.ts @@ -15,7 +15,7 @@ import { } from "../../../../helpers"; describeSuite({ - id: "D012971", + id: "D012970", title: "Precompiles - Referenda Auto Upgrade Demo", foundationMethods: "dev", testCases: ({ it, log, context }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-referenda.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-referenda.ts index 5cc5e56e70..89ab2070ef 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-referenda.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-referenda.ts @@ -11,7 +11,7 @@ import { // Each test is instantiating a new proposal (Not ideal for isolation but easier to write) describeSuite({ - id: "D012972", + id: "D012971", title: "Precompiles - Referenda precompile", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-relay-encoder.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-relay-encoder.ts index 4fd9414c65..c0db1fb41e 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-relay-encoder.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-relay-encoder.ts @@ -3,7 +3,7 @@ import { describeSuite, expect } from "@moonwall/cli"; import { ALITH_SESSION_ADDRESS, BALTATHAR_SESSION_ADDRESS } from "@moonwall/util"; describeSuite({ - id: "D012973", + id: "D012972", title: "Precompiles - relay-encoder", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-relay-verifier.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-relay-verifier.ts index 22e99d2835..3a29be83a3 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-relay-verifier.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-relay-verifier.ts @@ -3,7 +3,7 @@ import { beforeAll, describeSuite, expect } from "@moonwall/cli"; import { PRECOMPILE_RELAY_DATA_VERIFIER_ADDRESS } from "../../../../helpers"; describeSuite({ - id: "D012974", + id: "D012973", title: "Precompiles - relay-verifier", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-revert-attack.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-revert-attack.ts index 3189517aab..ea0e511bd6 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-revert-attack.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-revert-attack.ts @@ -10,7 +10,7 @@ import { ALITH_ADDRESS, MIN_GLMR_STAKING } from "@moonwall/util"; // We have to make sure that's not possible describeSuite({ - id: "D012975", + id: "D012974", title: "Precompiles - Reverting Staking precompile", foundationMethods: "dev", testCases: ({ context, log, it }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-ripemd160.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-ripemd160.ts index 116ad83451..ba50c678ae 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-ripemd160.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-ripemd160.ts @@ -4,7 +4,7 @@ import { toHex } from "viem"; import { expectEVMResult } from "../../../../helpers"; describeSuite({ - id: "D012976", + id: "D012975", title: "Precompiles - ripemd160 ", foundationMethods: "dev", testCases: ({ context, log, it }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-sha3fips.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-sha3fips.ts index 83e577acc6..51964c78ab 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-sha3fips.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-sha3fips.ts @@ -2,7 +2,7 @@ import "@moonbeam-network/api-augment"; import { describeSuite, expect } from "@moonwall/cli"; describeSuite({ - id: "D012977", + id: "D012976", title: "Precompiles - sha3fips", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call.ts index d8a0f2d2bb..fdd8a424cc 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call.ts @@ -12,7 +12,7 @@ import { encodeFunctionData } from "viem"; import { expectEVMResult } from "../../../../helpers"; describeSuite({ - id: "D012978", + id: "D012977", title: "Smart Contract Precompile Call - AddProxy Staking", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call2.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call2.ts index 76542dedf8..97c5f6097e 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call2.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call2.ts @@ -12,7 +12,7 @@ import { encodeFunctionData } from "viem"; import { expectEVMResult } from "../../../../helpers"; describeSuite({ - id: "D012979", + id: "D012978", title: "Smart Contract Precompile Call - Proxy - Any Proxy Type", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call3.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call3.ts index 50ff2a3b43..a460b787c1 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call3.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call3.ts @@ -11,7 +11,7 @@ import { encodeFunctionData } from "viem"; import { expectEVMResult } from "../../../../helpers"; describeSuite({ - id: "D012980", + id: "D012979", title: "Smart Contract Precompile Call - Proxy - Any Proxy Type", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call4.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call4.ts index fbc6bd459c..951b851b8c 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call4.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call4.ts @@ -5,7 +5,7 @@ import { encodeFunctionData } from "viem"; import { expectEVMResult } from "../../../../helpers"; describeSuite({ - id: "D012981", + id: "D012980", title: "Smart Contract Precompile Call - Proxy - Real Account", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call5.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call5.ts index f5d984971d..5dc81758dd 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call5.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-smart-contract-call5.ts @@ -4,7 +4,7 @@ import { encodeFunctionData } from "viem"; import { expectEVMResult } from "../../../../helpers"; describeSuite({ - id: "D012982", + id: "D012981", title: "Smart Contract Precompile Call - Proxy - Real Account", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-staking.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-staking.ts index 62f5bb51fb..fbe4657523 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-staking.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-staking.ts @@ -3,7 +3,7 @@ import { describeSuite, expect } from "@moonwall/cli"; import { ALITH_ADDRESS } from "@moonwall/util"; describeSuite({ - id: "D012983", + id: "D012982", title: "Precompiles - Staking - Genesis", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-staking2.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-staking2.ts index 198b896217..6165ccbb1e 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-staking2.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-staking2.ts @@ -4,7 +4,7 @@ import { ALITH_ADDRESS, ETHAN_ADDRESS, ETHAN_PRIVATE_KEY, MIN_GLMR_STAKING } fro import { verifyLatestBlockFees } from "../../../../helpers"; describeSuite({ - id: "D012984", + id: "D012983", title: "Precompiles - Staking - Join Candidates", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-staking3.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-staking3.ts index d665610917..e7cbb51979 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-staking3.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-staking3.ts @@ -3,7 +3,7 @@ import { beforeAll, describeSuite, expect } from "@moonwall/cli"; import { ETHAN_ADDRESS, ETHAN_PRIVATE_KEY, MIN_GLMR_STAKING } from "@moonwall/util"; describeSuite({ - id: "D012985", + id: "D012984", title: "Precompiles - Staking - Collator Leaving", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-staking4.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-staking4.ts index cb9daa51f8..a663b9aa38 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-staking4.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-staking4.ts @@ -3,7 +3,7 @@ import { beforeAll, describeSuite, expect } from "@moonwall/cli"; import { ALITH_ADDRESS, ETHAN_ADDRESS, ETHAN_PRIVATE_KEY, MIN_GLMR_STAKING } from "@moonwall/util"; describeSuite({ - id: "D012986", + id: "D012985", title: "Precompiles - Staking - Join Delegators", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-staking5.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-staking5.ts index ea6ce4ac18..a01fc4c8d0 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-staking5.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-staking5.ts @@ -9,7 +9,7 @@ import { } from "@moonwall/util"; describeSuite({ - id: "D012987", + id: "D012986", title: "Precompiles - Staking - Join Delegators", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-staking6.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-staking6.ts index d1f5b9f419..8052fbee09 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-staking6.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-staking6.ts @@ -3,7 +3,7 @@ import { beforeAll, describeSuite, expect } from "@moonwall/cli"; import { ALITH_ADDRESS, ETHAN_ADDRESS } from "@moonwall/util"; describeSuite({ - id: "D012988", + id: "D012987", title: "Precompiles - Staking - AwardedPoints", foundationMethods: "dev", testCases: ({ context, it }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-wormhole.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-wormhole.ts index fe1af3f6fd..ada88a50f9 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-wormhole.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-wormhole.ts @@ -50,7 +50,7 @@ const WH_IMPLICIT_DECIMALS = 18n; const WH_IMPLICIT_MULTIPLIER = 10n ** WH_IMPLICIT_DECIMALS; describeSuite({ - id: "D012989", + id: "D012988", title: "Test local Wormhole", foundationMethods: "dev", diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-wormhole2.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-wormhole2.ts index 27993946cc..0250737e96 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-wormhole2.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-wormhole2.ts @@ -3,7 +3,7 @@ import { describeSuite, expect } from "@moonwall/cli"; import { expectEVMResult, extractRevertReason } from "../../../../helpers"; describeSuite({ - id: "D012990", + id: "D012989", title: "Test GMP Killswitch", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor.ts index 6c9fa9505a..269fbccc4d 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor.ts @@ -10,7 +10,7 @@ import { } from "../../../../helpers"; describeSuite({ - id: "D012991", + id: "D012990", title: "Precompiles - xcm transactor", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor10.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor10.ts index cebf35c747..c64c5468c8 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor10.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor10.ts @@ -15,7 +15,7 @@ import { const ADDRESS_RELAY_ASSETS = "0xffffffff1fcacbd218edc0eba20fc2308c778080"; describeSuite({ - id: "D012992", + id: "D012991", title: "Precompiles - xcm transactor V3", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor11.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor11.ts index 4ea2f25fb5..01dacfb9be 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor11.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor11.ts @@ -12,7 +12,7 @@ import { } from "../../../../helpers"; describeSuite({ - id: "D012993", + id: "D012992", title: "Precompiles - xcm transactor V3", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor12.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor12.ts index f6a637c531..3e66d16029 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor12.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor12.ts @@ -14,7 +14,7 @@ import { const ADDRESS_RELAY_ASSETS = "0xffffffff1fcacbd218edc0eba20fc2308c778080"; describeSuite({ - id: "D012994", + id: "D012993", title: "Precompiles - xcm transactor V3", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor2.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor2.ts index b005d5ab8b..fc14698706 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor2.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor2.ts @@ -13,7 +13,7 @@ import { const ADDRESS_RELAY_ASSETS = "0xffffffff1fcacbd218edc0eba20fc2308c778080"; describeSuite({ - id: "D012995", + id: "D012994", title: "Precompiles - xcm transactor", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor3.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor3.ts index 5d0dcd5da3..c8b0720446 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor3.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor3.ts @@ -13,7 +13,7 @@ import { const ADDRESS_RELAY_ASSETS = "0xffffffff1fcacbd218edc0eba20fc2308c778080"; describeSuite({ - id: "D012996", + id: "D012995", title: "Precompiles - xcm transactor", foundationMethods: "dev", testCases: ({ context, it }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor4.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor4.ts index f219476d8c..b84ffe746c 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor4.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor4.ts @@ -8,7 +8,7 @@ import { } from "../../../../helpers"; describeSuite({ - id: "D012997", + id: "D012996", title: "Precompiles - xcm transactor", foundationMethods: "dev", testCases: ({ context, it }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor5.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor5.ts index 1ada2d7e6b..25d5165d5f 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor5.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor5.ts @@ -8,7 +8,7 @@ import { } from "../../../../helpers"; describeSuite({ - id: "D012998", + id: "D012997", title: "Precompiles - xcm transactor V2", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor6.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor6.ts index 8068db4ed9..f67cb49aac 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor6.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor6.ts @@ -13,7 +13,7 @@ import { const ADDRESS_RELAY_ASSETS = "0xffffffff1fcacbd218edc0eba20fc2308c778080"; describeSuite({ - id: "D012999", + id: "D012998", title: "Precompiles - xcm transactor V2", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor7.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor7.ts index 14ddadbf42..d3179a4c32 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor7.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor7.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers"; describeSuite({ - id: "D012900", + id: "D012999", title: "Precompiles - xcm transactor V2", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor8.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor8.ts index d13bdc3ee6..0d8923f5bd 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor8.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor8.ts @@ -13,7 +13,7 @@ import { const ADDRESS_RELAY_ASSETS = "0xffffffff1fcacbd218edc0eba20fc2308c778080"; describeSuite({ - id: "D012901", + id: "D012900", title: "Precompiles - xcm transactor V2", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor9.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor9.ts index 0d6bf21c6a..623eb3c130 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor9.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-transactor9.ts @@ -10,7 +10,7 @@ import { } from "../../../../helpers"; describeSuite({ - id: "D012902", + id: "D012901", title: "Precompiles - xcm transactor V3", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-utils.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-utils.ts index db1308db0f..d8fe184460 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-utils.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-xcm-utils.ts @@ -8,7 +8,7 @@ import { expectEVMResult, descendOriginFromAddress20 } from "../../../../helpers export const CLEAR_ORIGIN_WEIGHT = 5_194_000n; describeSuite({ - id: "D012903", + id: "D012902", title: "Precompiles - xcm utils", foundationMethods: "dev", testCases: ({ context, it }) => { diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-xtokens.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-xtokens.ts index a62a286305..5fc9d6dcbc 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-xtokens.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-xtokens.ts @@ -8,7 +8,7 @@ import { } from "../../../../helpers"; describeSuite({ - id: "D012904", + id: "D012903", title: "Precompiles - xtokens", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-asset-transfer.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-asset-transfer.ts index b19c518d77..936be085b3 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-asset-transfer.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-asset-transfer.ts @@ -13,7 +13,7 @@ const RELAY_TOKEN = 1_000_000_000_000n; const palletId = "0x6D6f646c617373746d6E67720000000000000000"; describeSuite({ - id: "D014001", + id: "D013901", title: "Mock XCM - receive downward transfer", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-1.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-1.ts index 6a0073269b..0ee47b330b 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-1.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-1.ts @@ -15,7 +15,7 @@ const RELAY_TOKEN = 1_000_000_000_000n; const palletId = "0x6D6f646c617373746d6E67720000000000000000"; describeSuite({ - id: "D014002", + id: "D013902", title: "Mock XCM V3 - downward transfer with non-triggered error handler", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-2.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-2.ts index 69a5cb7fa8..cdc74b05b9 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-2.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-2.ts @@ -15,7 +15,7 @@ const RELAY_TOKEN = 1_000_000_000_000n; const palletId = "0x6D6f646c617373746d6E67720000000000000000"; describeSuite({ - id: "D014003", + id: "D013903", title: "Mock XCM V3 - downward transfer with triggered error handler", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-3.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-3.ts index 6560f9d506..3af041dbff 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-3.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-3.ts @@ -15,7 +15,7 @@ const RELAY_TOKEN = 1_000_000_000_000n; const palletId = "0x6D6f646c617373746d6E67720000000000000000"; describeSuite({ - id: "D014004", + id: "D013904", title: "Mock XCM V3 - downward transfer with always triggered appendix", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-4.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-4.ts index dc541b6390..3b7dc73950 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-4.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-4.ts @@ -15,7 +15,7 @@ const RELAY_TOKEN = 1_000_000_000_000n; const palletId = "0x6D6f646c617373746d6E67720000000000000000"; describeSuite({ - id: "D014005", + id: "D013905", title: "Mock XCM V3 - downward transfer with always triggered appendix", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-5.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-5.ts index add22b03e0..9e5b759a07 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-5.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-5.ts @@ -15,7 +15,7 @@ const RELAY_TOKEN = 1_000_000_000_000n; const palletId = "0x6D6f646c617373746d6E67720000000000000000"; describeSuite({ - id: "D014006", + id: "D013906", title: "Mock XCM V3 - downward transfer with always triggered appendix", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-6.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-6.ts index fcc3c0e570..88f16d2ad9 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-6.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-error-and-appendix-6.ts @@ -15,7 +15,7 @@ const RELAY_TOKEN = 1_000_000_000_000n; const palletId = "0x6D6f646c617373746d6E67720000000000000000"; describeSuite({ - id: "D014007", + id: "D013907", title: "Mock XCM V3 - downward transfer claim trapped assets", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-queue.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-queue.ts index 731ac0a286..3dd92ab08e 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-queue.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-dmp-queue.ts @@ -2,7 +2,7 @@ import "@moonbeam-network/api-augment"; import { describeSuite, expect } from "@moonwall/cli"; describeSuite({ - id: "D014008", + id: "D013908", title: "Test DMP migration (This test should be removed in RT3000", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-1.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-1.ts index 7ac66223e6..ef7143b891 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-1.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-1.ts @@ -16,7 +16,7 @@ const assetMetadata = { }; describeSuite({ - id: "D014009", + id: "D013909", title: "Mock XCM - receive horizontal transfer", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-2.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-2.ts index 97c05976b0..159a0dcb76 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-2.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-2.ts @@ -34,7 +34,7 @@ const STATEMINT_LOCATION = { }; describeSuite({ - id: "D014010", + id: "D013910", title: "Mock XCM - receive horizontal transfer", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-3.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-3.ts index e83956a551..396738ca1c 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-3.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-3.ts @@ -35,7 +35,7 @@ const STATEMINT_LOCATION = { }; describeSuite({ - id: "D014011", + id: "D013911", title: "Mock XCM - receive horizontal transfer", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-4.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-4.ts index 535d3fa45a..6e1cc18cc9 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-4.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-4.ts @@ -13,7 +13,7 @@ import { const foreign_para_id = 2000; describeSuite({ - id: "D014012", + id: "D013912", title: "Mock XCM - receive horizontal transfer of DEV", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-5.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-5.ts index a21e96f9dc..d906c73f63 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-5.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-5.ts @@ -14,7 +14,7 @@ import { const foreign_para_id = 2000; describeSuite({ - id: "D014013", + id: "D013913", title: "Mock XCM - receive horizontal transfer of DEV with new reanchor", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-6.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-6.ts index 9545f22386..dccbf7144b 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-6.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-6.ts @@ -48,7 +48,7 @@ const STATEMINT_ASSET_ONE_LOCATION = { }; describeSuite({ - id: "D014014", + id: "D013914", title: "Mock XCM - receive horizontal transfer", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-8.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-8.ts index 2ac2355a7f..7b34ede26e 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-8.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-asset-transfer-8.ts @@ -33,7 +33,7 @@ const STATEMINT_LOCATION = { }; describeSuite({ - id: "D014015", + id: "D013915", title: "Mock XCM - receive horizontal transfer", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-1.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-1.ts index c61b66f624..bbbc3b3244 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-1.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-1.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D014016", + id: "D013916", title: "Mock XCM - receive horizontal transact", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-2.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-2.ts index cb72164599..5d2a7626a7 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-2.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-2.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D014017", + id: "D013917", title: "Mock XCM - receive horizontal transact with two Descends", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-3.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-3.ts index b9ea91155d..28fb0ff56f 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-3.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-3.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D014018", + id: "D013918", title: "Mock XCM - receive horizontal transact without withdraw", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-4.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-4.ts index ac87273503..63c77cb791 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-4.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-4.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D014019", + id: "D013919", title: "Mock XCM - receive horizontal transact without buy execution", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-1.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-1.ts index 8d25f0ba70..d0b1583355 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-1.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-1.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D014020", + id: "D013920", title: "Mock XCM - receive horizontal transact ETHEREUM (transfer)", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-10.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-10.ts index 912615496d..504fafdb5a 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-10.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-10.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D014021", + id: "D013921", title: "Mock XCM - transact ETHEREUM input size check succeeds", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-11.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-11.ts index 912c37c04a..3b7739bc1b 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-11.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-11.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D014022", + id: "D013922", title: "Mock XCM - transact ETHEREUM input size check fails", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-12.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-12.ts index b0d2468ada..1b7844926b 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-12.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-12.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D014023", + id: "D013923", title: "Mock XCM - receive horizontal transact ETHEREUM (transfer)", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-2.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-2.ts index 29a70f1a48..96708a9450 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-2.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-2.ts @@ -12,7 +12,7 @@ import { import { GAS_LIMIT_POV_RATIO } from "@moonwall/util"; describeSuite({ - id: "D014024", + id: "D013924", title: "Mock XCM - receive horizontal transact ETHEREUM (call)", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-3.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-3.ts index e73671a4c3..edb066299c 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-3.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-3.ts @@ -16,7 +16,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D014025", + id: "D013925", title: "Mock XCM - receive horizontal transact ETHEREUM (asset fee)", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-4.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-4.ts index a83eb0efde..34409abc95 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-4.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-4.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D014026", + id: "D013926", title: "Mock XCM - receive horizontal transact ETHEREUM (proxy)", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-5.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-5.ts index 642927dbd2..349c060501 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-5.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-5.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D014027", + id: "D013927", title: "Mock XCM - receive horizontal transact ETHEREUM (proxy)", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-6.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-6.ts index 90ee12553f..adb18dcffe 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-6.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-6.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D014028", + id: "D013928", title: "Mock XCM - receive horizontal transact ETHEREUM (proxy)", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-7.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-7.ts index 0947a33195..dfca714d97 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-7.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-7.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D014029", + id: "D013929", title: "Mock XCM - transact ETHEREUM (proxy) disabled switch", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-8.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-8.ts index 762cb8a157..4ac342b227 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-8.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-8.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D014030", + id: "D013930", title: "Mock XCM - transact ETHEREUM (non-proxy) disabled switch", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-9.ts b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-9.ts index ed980bdcab..9a9235230f 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-9.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-mock-hrmp-transact-ethereum-9.ts @@ -3,7 +3,7 @@ import { describeSuite, expect } from "@moonwall/cli"; import { alith } from "@moonwall/util"; describeSuite({ - id: "D014031", + id: "D013931", title: "Mock XCM - EthereumXcm only disable by root", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-data-field-size.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-data-field-size.ts index 6261801365..1b753559c9 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-data-field-size.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-data-field-size.ts @@ -11,7 +11,7 @@ import { parseEther } from "ethers"; export const ERC20_TOTAL_SUPPLY = 1_000_000_000n; describeSuite({ - id: "D014032", + id: "D013932", title: "Mock ERC20 <> XCM - Test wrong size of GeneralKey data field", foundationMethods: "dev", testCases: ({ context, it }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-excess-gas.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-excess-gas.ts index 3c95fc41c3..0ebef78224 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-excess-gas.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-excess-gas.ts @@ -14,7 +14,7 @@ import { export const ERC20_TOTAL_SUPPLY = 1_000_000_000n; describeSuite({ - id: "D014033", + id: "D013933", title: "Mock XCM - Test bad contract with excess gas usage", foundationMethods: "dev", testCases: ({ context, it }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-fees-and-trap.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-fees-and-trap.ts index 1057caa492..cfdd3966aa 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-fees-and-trap.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-fees-and-trap.ts @@ -14,7 +14,7 @@ import { export const ERC20_TOTAL_SUPPLY = 1_000_000_000n; describeSuite({ - id: "D014034", + id: "D013934", title: "Mock XCM - Fails trying to pay fees with ERC20", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-v3-filter.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-v3-filter.ts index 676b466338..ae924ab780 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-v3-filter.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-v3-filter.ts @@ -13,7 +13,7 @@ import { export const ERC20_TOTAL_SUPPLY = 1_000_000_000n; describeSuite({ - id: "D014035", + id: "D013935", title: "Mock XCM V3 - XCM Weight Limit", foundationMethods: "dev", testCases: ({ context, it }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-v3.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-v3.ts index f35905ce6c..e0be375669 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-v3.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-erc20-v3.ts @@ -13,7 +13,7 @@ import { export const ERC20_TOTAL_SUPPLY = 1_000_000_000n; describeSuite({ - id: "D014036", + id: "D013936", title: "Mock XCM V3 - Receive erc20 via XCM", foundationMethods: "dev", testCases: ({ context, it }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-transactor-1.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-transactor-1.ts index 92e234cd20..fbee46a97c 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-transactor-1.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-transactor-1.ts @@ -3,7 +3,7 @@ import { beforeAll, describeSuite, expect } from "@moonwall/cli"; import { alith } from "@moonwall/util"; describeSuite({ - id: "D014037", + id: "D013937", title: "Precompiles - xcm transactor", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-transactor-2.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-transactor-2.ts index e732c2c753..59ffe53f99 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcm-transactor-2.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcm-transactor-2.ts @@ -2,7 +2,7 @@ import "@moonbeam-network/api-augment"; import { describeSuite, expect, dispatchAsGeneralAdmin } from "@moonwall/cli"; describeSuite({ - id: "D014038", + id: "D013938", title: "Precompiles - xcm transactor", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-max-weight-instructions.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-max-weight-instructions.ts index bf62adbf2c..1a7d4f7df9 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-max-weight-instructions.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-max-weight-instructions.ts @@ -13,7 +13,7 @@ import { parseEther } from "ethers"; import { ApiPromise } from "@polkadot/api"; describeSuite({ - id: "D014039", + id: "D013939", title: "XCM V3 - Max Weight Instructions", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts b/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts index 89b018a2d5..17a9c7ceb3 100644 --- a/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts +++ b/test/suites/dev/moonbase/test-xcm-v3/test-xcmv3-new-instructions.ts @@ -16,7 +16,7 @@ import { ApiPromise } from "@polkadot/api"; // the important thing (and what we are testing) is that they are // executed and are not blocked with 'WeightNotComputable' due to using max weight. describeSuite({ - id: "D014040", + id: "D013940", title: "XCM V3 - Max Weight Instructions", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-1.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-1.ts index e63c020800..db313dd93e 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-1.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-1.ts @@ -15,7 +15,7 @@ const RELAY_TOKEN = 1_000_000_000_000n; const palletId = "0x6D6f646c617373746d6E67720000000000000000"; describeSuite({ - id: "D013901", + id: "D014001", title: "Mock XCM V3 - downward transfer with non-triggered error handler", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-2.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-2.ts index 0a7bd16858..85ec0e1280 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-2.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-2.ts @@ -15,7 +15,7 @@ const RELAY_TOKEN = 1_000_000_000_000n; const palletId = "0x6D6f646c617373746d6E67720000000000000000"; describeSuite({ - id: "D013902", + id: "D014002", title: "Mock XCM V3 - downward transfer with triggered error handler", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-3.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-3.ts index 79a773038a..b5dee2ffe8 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-3.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-3.ts @@ -15,7 +15,7 @@ const RELAY_TOKEN = 1_000_000_000_000n; const palletId = "0x6D6f646c617373746d6E67720000000000000000"; describeSuite({ - id: "D013903", + id: "D014003", title: "Mock XCM V3 - downward transfer with always triggered appendix", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-4.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-4.ts index 0a30b28735..8293e70f81 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-4.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-4.ts @@ -15,7 +15,7 @@ const RELAY_TOKEN = 1_000_000_000_000n; const palletId = "0x6D6f646c617373746d6E67720000000000000000"; describeSuite({ - id: "D013904", + id: "D014004", title: "Mock XCM V3 - downward transfer with always triggered appendix", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-5.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-5.ts index 8ada70133c..86fce6e905 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-5.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-5.ts @@ -15,7 +15,7 @@ const RELAY_TOKEN = 1_000_000_000_000n; const palletId = "0x6D6f646c617373746d6E67720000000000000000"; describeSuite({ - id: "D013905", + id: "D014005", title: "Mock XCM V3 - downward transfer with always triggered appendix", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-6.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-6.ts index 079925e042..3f30d44db2 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-6.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-dmp-error-and-appendix-6.ts @@ -15,7 +15,7 @@ const RELAY_TOKEN = 1_000_000_000_000n; const palletId = "0x6D6f646c617373746d6E67720000000000000000"; describeSuite({ - id: "D013906", + id: "D014006", title: "Mock XCM V3 - downward transfer claim trapped assets", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-1.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-1.ts index 428181e1de..cfe9400920 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-1.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-1.ts @@ -34,7 +34,7 @@ const STATEMINT_LOCATION = { }; describeSuite({ - id: "D013908", + id: "D014007", title: "Mock XCM - receive horizontal transfer", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-2.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-2.ts index bb8f38b0fe..347bace758 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-2.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-2.ts @@ -35,7 +35,7 @@ const STATEMINT_LOCATION = { }; describeSuite({ - id: "D013909", + id: "D014008", title: "Mock XCM - receive horizontal transfer", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-3.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-3.ts index 4dbe3290ec..b825c6394b 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-3.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-3.ts @@ -13,7 +13,7 @@ import { const foreign_para_id = 2000; describeSuite({ - id: "D013910", + id: "D014009", title: "Mock XCM - receive horizontal transfer of DEV", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-4.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-4.ts index 837fe8d71f..c9fa11a199 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-4.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-4.ts @@ -14,7 +14,7 @@ import { const foreign_para_id = 2000; describeSuite({ - id: "D013911", + id: "D014010", title: "Mock XCM - receive horizontal transfer of DEV with new reanchor", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-5.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-5.ts index a27dfde186..d553611eda 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-5.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-5.ts @@ -48,7 +48,7 @@ const STATEMINT_ASSET_ONE_LOCATION = { }; describeSuite({ - id: "D013912", + id: "D014011", title: "Mock XCM - receive horizontal transfer", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-6.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-6.ts index 8014f0d342..99244c31ab 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-6.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-asset-transfer-6.ts @@ -33,7 +33,7 @@ const STATEMINT_LOCATION = { }; describeSuite({ - id: "D013913", + id: "D014012", title: "Mock XCM - receive horizontal transfer", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-1.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-1.ts index dc57e1a24e..6377fa5761 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-1.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-1.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D013914", + id: "D014013", title: "Mock XCM - receive horizontal transact", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-2.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-2.ts index ee1bb28c89..5490d45a1b 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-2.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-2.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D013915", + id: "D014014", title: "Mock XCM - receive horizontal transact with two Descends", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-3.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-3.ts index 117e92e2a6..d5266ed9da 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-3.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-3.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D013916", + id: "D014015", title: "Mock XCM - receive horizontal transact without withdraw", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-4.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-4.ts index a113443a2f..26a99d5c4b 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-4.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-4.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D013917", + id: "D014016", title: "Mock XCM - receive horizontal transact without buy execution", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-1.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-1.ts index c6416d781f..5b7132b64c 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-1.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-1.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D013918", + id: "D014017", title: "Mock XCM - receive horizontal transact ETHEREUM (transfer)", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-10.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-10.ts index b6126257d7..9bad6f19cc 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-10.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-10.ts @@ -10,7 +10,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D013919", + id: "D014018", title: "Mock XCM - transact ETHEREUM input size check fails", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-2.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-2.ts index fc05b22e8a..ac09844399 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-2.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-2.ts @@ -10,7 +10,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D013920", + id: "D014019", title: "Mock XCM - receive horizontal transact ETHEREUM (call)", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-4.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-4.ts index a04e281a61..0e5aaa1a3e 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-4.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-4.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D013922", + id: "D014020", title: "Mock XCM - receive horizontal transact ETHEREUM (proxy)", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-5.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-5.ts index ce17721f4d..b183f3d533 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-5.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-5.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D013923", + id: "D014021", title: "Mock XCM - receive horizontal transact ETHEREUM (proxy)", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-6.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-6.ts index de18b34214..ae62a155f3 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-6.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-6.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D013924", + id: "D014022", title: "Mock XCM - receive horizontal transact ETHEREUM (proxy)", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-7.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-7.ts index 698966c59b..c97e96f6a8 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-7.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-7.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D013925", + id: "D014023", title: "Mock XCM - transact ETHEREUM (proxy) disabled switch", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-8.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-8.ts index f9d15cd09c..4619d094ce 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-8.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-8.ts @@ -11,7 +11,7 @@ import { } from "../../../../helpers/xcm.js"; describeSuite({ - id: "D013926", + id: "D014024", title: "Mock XCM - transact ETHEREUM (non-proxy) disabled switch", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-9.ts b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-9.ts index d094a008e8..b5a46192d6 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-9.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-mock-hrmp-transact-ethereum-9.ts @@ -3,7 +3,7 @@ import { describeSuite, expect } from "@moonwall/cli"; import { alith } from "@moonwall/util"; describeSuite({ - id: "D013927", + id: "D014025", title: "Mock XCM - EthereumXcm only disable by root", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-xcm-erc20-transfer-two-ERC20.ts b/test/suites/dev/moonbase/test-xcm-v4/test-xcm-erc20-transfer-two-ERC20.ts index 5526dbe280..1dde002dea 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-xcm-erc20-transfer-two-ERC20.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-xcm-erc20-transfer-two-ERC20.ts @@ -13,7 +13,7 @@ import { export const ERC20_TOTAL_SUPPLY = 1_000_000_000n; describeSuite({ - id: "D013928", + id: "D014026", title: "Mock XCM - Send two local ERC20", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-xcm-erc20-transfer.ts b/test/suites/dev/moonbase/test-xcm-v4/test-xcm-erc20-transfer.ts index 11426c9fee..45b4023240 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-xcm-erc20-transfer.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-xcm-erc20-transfer.ts @@ -14,7 +14,7 @@ import { export const ERC20_TOTAL_SUPPLY = 1_000_000_000n; describeSuite({ - id: "D013929", + id: "D014027", title: "Mock XCM - Send local erc20", foundationMethods: "dev", testCases: ({ context, it }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-xcm-ver-conversion-1.ts b/test/suites/dev/moonbase/test-xcm-v4/test-xcm-ver-conversion-1.ts index 956fc7414b..49ed9aed72 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-xcm-ver-conversion-1.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-xcm-ver-conversion-1.ts @@ -14,7 +14,7 @@ import { const foreign_para_id = 2000; describeSuite({ - id: "D013930", + id: "D014028", title: "XCM Moonbase: version compatibility", foundationMethods: "dev", testCases: ({ context, it, log }) => { diff --git a/test/suites/dev/moonbase/test-xcm-v4/test-xcm-ver-conversion-2.ts b/test/suites/dev/moonbase/test-xcm-v4/test-xcm-ver-conversion-2.ts index acee2b408d..20e74b7f73 100644 --- a/test/suites/dev/moonbase/test-xcm-v4/test-xcm-ver-conversion-2.ts +++ b/test/suites/dev/moonbase/test-xcm-v4/test-xcm-ver-conversion-2.ts @@ -14,7 +14,7 @@ import { const foreign_para_id = 2000; describeSuite({ - id: "D013931", + id: "D014029", title: "XCM Moonriver: version compatibility", foundationMethods: "dev", testCases: ({ context, it, log }) => { From b93ea02a5954d9c5db3a8b26a01be81552f90fda Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 19 Mar 2024 12:52:44 +0000 Subject: [PATCH 56/80] update rustc to version 1.75 --- .github/workflow-templates/rust-toolchain/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow-templates/rust-toolchain/action.yml b/.github/workflow-templates/rust-toolchain/action.yml index c764eadc69..6d7330c0f7 100644 --- a/.github/workflow-templates/rust-toolchain/action.yml +++ b/.github/workflow-templates/rust-toolchain/action.yml @@ -7,7 +7,7 @@ runs: - name: Install Rust toolchain uses: actions-rs/toolchain@v1 with: - toolchain: 1.74.0 + toolchain: 1.75.0 override: true components: rust-src, rustfmt, clippy - name: Install targets From 5b90e070f1622f410426b8f08b104800c83ade60 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 19 Mar 2024 16:52:21 +0000 Subject: [PATCH 57/80] Revert "update rustc to version 1.75" This reverts commit b93ea02a5954d9c5db3a8b26a01be81552f90fda. --- .github/workflow-templates/rust-toolchain/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow-templates/rust-toolchain/action.yml b/.github/workflow-templates/rust-toolchain/action.yml index 6d7330c0f7..c764eadc69 100644 --- a/.github/workflow-templates/rust-toolchain/action.yml +++ b/.github/workflow-templates/rust-toolchain/action.yml @@ -7,7 +7,7 @@ runs: - name: Install Rust toolchain uses: actions-rs/toolchain@v1 with: - toolchain: 1.75.0 + toolchain: 1.74.0 override: true components: rust-src, rustfmt, clippy - name: Install targets From 806425846c4c2afe28c7b2c4fb779e20fcb0baaf Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 19 Mar 2024 17:36:30 +0000 Subject: [PATCH 58/80] update Cargo.lock --- Cargo.lock | 1296 +++++++++++++++++++++++++++------------------------- 1 file changed, 666 insertions(+), 630 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ec1653eba1..7e95b2fbb6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -47,7 +47,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli 0.28.1", + "gimli 0.28.0", ] [[package]] @@ -68,9 +68,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if", "cipher 0.4.4", @@ -88,7 +88,7 @@ dependencies = [ "cipher 0.4.4", "ctr", "ghash", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] @@ -106,19 +106,19 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.11", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.11" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +checksum = "8b79b82693f705137f8fb9b37871d99e4f9a7df12b917eed79c3d3954830a60b" dependencies = [ "cfg-if", - "getrandom 0.2.12", + "getrandom 0.2.11", "once_cell", "version_check", "zerocopy", @@ -185,43 +185,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.48.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.48.0", ] [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "approx" @@ -541,9 +541,9 @@ checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" [[package]] name = "array-bytes" -version = "6.2.2" +version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f840fb7195bcfc5e17ea40c26e5ce6d5b9ce5d584466e17703209657e459ae0" +checksum = "de17a919934ad8c5cc99a1a74de4e2dab95d6121a8f27f94755ff525b630382c" [[package]] name = "arrayref" @@ -560,6 +560,12 @@ dependencies = [ "nodrop", ] +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + [[package]] name = "arrayvec" version = "0.7.4" @@ -607,14 +613,14 @@ dependencies = [ [[package]] name = "assert_cmd" -version = "2.0.14" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed72493ac66d5804837f480ab3766c72bdfab91a65e565fc54fa9e42db0073a8" +checksum = "88903cb14723e4d4003335bb7f8a14f27691649105346a0f0957466c096adfe6" dependencies = [ "anstyle", - "bstr 1.9.1", + "bstr 1.8.0", "doc-comment", - "predicates 3.1.0", + "predicates 3.0.4", "predicates-core", "predicates-tree", "wait-timeout", @@ -648,28 +654,28 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.2.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" +checksum = "d37875bd9915b7d67c2f117ea2c30a0989874d0b2cb694fe25403c85763c0c9e" dependencies = [ "concurrent-queue", - "event-listener 5.2.0", - "event-listener-strategy 0.5.0", + "event-listener 3.1.0", + "event-listener-strategy", "futures-core", "pin-project-lite 0.2.13", ] [[package]] name = "async-executor" -version = "1.8.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +checksum = "4b0c4a4f319e45986f347ee47fef8bf5e81c9abc3f6f58dc2391439f30df65f0" dependencies = [ - "async-lock 3.3.0", + "async-lock 2.8.0", "async-task", "concurrent-queue", "fastrand 2.0.1", - "futures-lite 2.3.0", + "futures-lite 1.13.0", "slab", ] @@ -707,21 +713,22 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" +checksum = "41ed9d5715c2d329bf1b4da8d60455b99b187f27ba726df2883799af9af60997" dependencies = [ - "async-lock 3.3.0", + "async-lock 3.1.0", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.3.0", + "futures-lite 2.0.1", "parking", - "polling 3.5.0", - "rustix 0.38.31", + "polling 3.3.0", + "rustix 0.38.24", "slab", "tracing", - "windows-sys 0.52.0", + "waker-fn", + "windows-sys 0.48.0", ] [[package]] @@ -735,12 +742,12 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.3.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +checksum = "deb2ab2aa8a746e221ab826c73f48bc6ba41be6763f0855cb249eb6d154cf1d7" dependencies = [ - "event-listener 4.0.3", - "event-listener-strategy 0.4.0", + "event-listener 3.1.0", + "event-listener-strategy", "pin-project-lite 0.2.13", ] @@ -768,7 +775,7 @@ dependencies = [ "cfg-if", "event-listener 3.1.0", "futures-lite 1.13.0", - "rustix 0.38.31", + "rustix 0.38.24", "windows-sys 0.48.0", ] @@ -778,13 +785,13 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" dependencies = [ - "async-io 2.3.2", + "async-io 2.2.0", "async-lock 2.8.0", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.31", + "rustix 0.38.24", "signal-hook-registry", "slab", "windows-sys 0.48.0", @@ -792,15 +799,15 @@ dependencies = [ [[package]] name = "async-task" -version = "4.7.0" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" +checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" [[package]] name = "async-trait" -version = "0.1.78" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", @@ -843,13 +850,14 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "auto_impl" -version = "1.2.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" dependencies = [ + "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.53", + "syn 1.0.109", ] [[package]] @@ -869,7 +877,7 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", - "object 0.32.2", + "object 0.32.1", "rustc-demangle", ] @@ -886,7 +894,7 @@ dependencies = [ "ark-std", "dleq_vrf", "fflonk", - "merlin", + "merlin 3.0.0", "rand_chacha 0.3.1", "rand_core 0.6.4", "ring 0.1.0", @@ -916,9 +924,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.7" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "base64ct" @@ -926,6 +934,15 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "basic-toml" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f2139706359229bfa8f19142ac1155b4b80beafb7a60471ac5dd109d4a19778" +dependencies = [ + "serde", +] + [[package]] name = "beef" version = "0.5.2" @@ -965,7 +982,7 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "prettyplease 0.2.16", + "prettyplease 0.2.15", "proc-macro2", "quote", "regex", @@ -987,7 +1004,7 @@ dependencies = [ "rand_core 0.6.4", "ripemd", "sha2 0.10.8", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] @@ -1018,9 +1035,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "bitvec" @@ -1090,9 +1107,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.5.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" dependencies = [ "arrayref", "arrayvec 0.7.4", @@ -1101,6 +1118,18 @@ dependencies = [ "constant_time_eq 0.3.0", ] +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding", + "byte-tools", + "byteorder", + "generic-array 0.12.4", +] + [[package]] name = "block-buffer" version = "0.9.0" @@ -1119,18 +1148,27 @@ dependencies = [ "generic-array 0.14.7", ] +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", +] + [[package]] name = "blocking" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ - "async-channel 2.2.0", - "async-lock 3.3.0", + "async-channel 2.1.0", + "async-lock 3.1.0", "async-task", "fastrand 2.0.1", "futures-io", - "futures-lite 2.3.0", + "futures-lite 2.0.1", "piper", "tracing", ] @@ -1196,12 +1234,12 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" dependencies = [ "memchr", - "regex-automata 0.4.6", + "regex-automata 0.4.3", "serde", ] @@ -1216,9 +1254,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byte-slice-cast" @@ -1234,9 +1272,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.15.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" [[package]] name = "byteorder" @@ -1282,9 +1320,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.7" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "694c8807f2ae16faecc43dc17d74b3eb042482789fd0eb64b39a2e04e087053f" +checksum = "12024c4645c97566567129c204f65d5815a8c9aecf30fcbe682b2fe034996d36" dependencies = [ "serde", ] @@ -1297,7 +1335,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.22", + "semver 1.0.20", "serde", "serde_json", "thiserror", @@ -1311,9 +1349,9 @@ checksum = "fd6c0e7b807d60291f42f33f58480c0bfafe28ed08286446f45e463728cf9c1c" [[package]] name = "cc" -version = "1.0.90" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", "libc", @@ -1330,9 +1368,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.7" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa50868b64a9a6fda9d593ce778849ea8715cd2a3d2cc17ffdb4a2f2f2f1961d" +checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" dependencies = [ "smallvec", ] @@ -1385,16 +1423,16 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.35" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.4", + "windows-targets 0.48.5", ] [[package]] @@ -1441,9 +1479,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.7.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" dependencies = [ "glob", "libc", @@ -1493,12 +1531,13 @@ checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "coarsetime" -version = "0.1.34" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13b3839cf01bb7960114be3ccf2340f541b6d0c81f8690b007b2b39f750f7e5d" +checksum = "71367d3385c716342014ad17e3d19f7788ae514885a1f4c24f500260fb365e1a" dependencies = [ "libc", - "wasix", + "once_cell", + "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", ] @@ -1541,7 +1580,7 @@ dependencies = [ "ark-std", "fflonk", "getrandom_or_panic", - "merlin", + "merlin 3.0.0", "rand_chacha 0.3.1", ] @@ -1553,9 +1592,9 @@ checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" [[package]] name = "concurrent-queue" -version = "2.4.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" dependencies = [ "crossbeam-utils", ] @@ -1575,15 +1614,15 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.6" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "const-random" -version = "0.1.18" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a" dependencies = [ "const-random-macro", ] @@ -1594,7 +1633,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.11", "once_cell", "tiny-keccak", ] @@ -1631,9 +1670,9 @@ checksum = "fb4a24b1aaf0fd0ce8b45161144d6f42cd91677fd5940fd431183eb023b3a2b8" [[package]] name = "core-foundation" -version = "0.9.4" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ "core-foundation-sys", "libc", @@ -1641,9 +1680,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "core2" @@ -1675,9 +1714,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] @@ -1797,46 +1836,55 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ + "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.18" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ + "autocfg", + "cfg-if", "crossbeam-utils", + "memoffset 0.9.0", + "scopeguard", ] [[package]] name = "crossbeam-queue" -version = "0.3.11" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" dependencies = [ + "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if", +] [[package]] name = "crunchy" @@ -1846,13 +1894,13 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.5.5" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +checksum = "28f85c3514d2a6e64160359b45a3918c3b4178bcbf4ae5d03ab2d02e521c479a" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] @@ -1884,17 +1932,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.7", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] name = "crypto-mac" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" +checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ "generic-array 0.14.7", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] @@ -2347,7 +2395,7 @@ name = "cumulus-relay-chain-minimal-node" version = "0.7.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.2", + "array-bytes 6.2.0", "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", @@ -2436,6 +2484,19 @@ dependencies = [ "sp-trie", ] +[[package]] +name = "curve25519-dalek" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" +dependencies = [ + "byteorder", + "digest 0.8.1", + "rand_core 0.5.1", + "subtle 2.4.1", + "zeroize", +] + [[package]] name = "curve25519-dalek" version = "3.2.0" @@ -2445,7 +2506,7 @@ dependencies = [ "byteorder", "digest 0.9.0", "rand_core 0.5.1", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] @@ -2462,7 +2523,7 @@ dependencies = [ "fiat-crypto", "platforms", "rustc_version", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] @@ -2492,9 +2553,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.119" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "635179be18797d7e10edb9cd06c859580237750c7351f39ed9b298bfc17544ad" +checksum = "7129e341034ecb940c9072817cd9007974ea696844fc4dd582dc1653a7fbe2e8" dependencies = [ "cc", "cxxbridge-flags", @@ -2504,9 +2565,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.119" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9324397d262f63ef77eb795d900c0d682a34a43ac0932bec049ed73055d52f63" +checksum = "a2a24f3f5f8eed71936f21e570436f024f5c2e25628f7496aa7ccd03b90109d5" dependencies = [ "cc", "codespan-reporting", @@ -2519,15 +2580,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.119" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a87ff7342ffaa54b7c61618e0ce2bbcf827eba6d55b923b83d82551acbbecfe5" +checksum = "06fdd177fc61050d63f67f5bd6351fac6ab5526694ea8e359cd9cd3b75857f44" [[package]] name = "cxxbridge-macro" -version = "1.0.119" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70b5b86cf65fa0626d85720619d80b288013477a91a0389fa8bc716bf4903ad1" +checksum = "587663dd5fb3d10932c8aecfe7c844db1bcf0aee93eeab08fac13dc1212c2e7f" dependencies = [ "proc-macro2", "quote", @@ -2536,15 +2597,15 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.5.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] name = "data-encoding-macro" -version = "0.1.14" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c01c06f5f429efdf2bae21eb67c28b3df3cf85b7dd2d8ef09c0838dac5d33e" +checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99" dependencies = [ "data-encoding", "data-encoding-macro-internal", @@ -2552,9 +2613,9 @@ dependencies = [ [[package]] name = "data-encoding-macro-internal" -version = "0.1.12" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0047d07f2c89b17dd631c80450d69841a6b5d7fb17278cbc43d7e4cfcf2576f3" +checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772" dependencies = [ "data-encoding", "syn 1.0.109", @@ -2586,9 +2647,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.11" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" dependencies = [ "powerfmt", ] @@ -2667,7 +2728,7 @@ dependencies = [ "block-buffer 0.10.4", "const-oid", "crypto-common", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] @@ -2819,9 +2880,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.17" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "ecdsa" @@ -2871,16 +2932,16 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.1.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ "curve25519-dalek 4.1.2", "ed25519 2.2.3", "rand_core 0.6.4", "serde", "sha2 0.10.8", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] @@ -2906,7 +2967,7 @@ checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ "curve25519-dalek 4.1.2", "ed25519 2.2.3", - "hashbrown 0.14.3", + "hashbrown 0.14.2", "hex", "rand_core 0.6.4", "sha2 0.10.8", @@ -2915,18 +2976,18 @@ dependencies = [ [[package]] name = "either" -version = "1.10.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" dependencies = [ "serde", ] [[package]] name = "elliptic-curve" -version = "0.13.8" +version = "0.13.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +checksum = "e9775b22bc152ad86a0cf23f0f348b884b26add12bf741e7ffc4d4ab2ab4d205" dependencies = [ "base16ct", "crypto-bigint", @@ -2937,7 +2998,7 @@ dependencies = [ "pkcs8", "rand_core 0.6.4", "sec1", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] @@ -2961,18 +3022,18 @@ dependencies = [ [[package]] name = "enumflags2" -version = "0.7.9" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d" +checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.9" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" +checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", @@ -2981,9 +3042,9 @@ dependencies = [ [[package]] name = "enumn" -version = "0.1.13" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" +checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", @@ -2992,9 +3053,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.2" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" dependencies = [ "humantime", "is-terminal", @@ -3017,12 +3078,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.48.0", ] [[package]] @@ -3091,45 +3152,13 @@ dependencies = [ "pin-project-lite 0.2.13", ] -[[package]] -name = "event-listener" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite 0.2.13", -] - -[[package]] -name = "event-listener" -version = "5.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite 0.2.13", -] - [[package]] name = "event-listener-strategy" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" -dependencies = [ - "event-listener 4.0.3", - "pin-project-lite 0.2.13", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" +checksum = "d96b852f1345da36d551b9473fa1e2b1eb5c5195585c6c018118bc92a8d91160" dependencies = [ - "event-listener 5.2.0", + "event-listener 3.1.0", "pin-project-lite 0.2.13", ] @@ -3235,6 +3264,12 @@ dependencies = [ "syn 2.0.53", ] +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + [[package]] name = "fallible-iterator" version = "0.2.0" @@ -3474,7 +3509,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] @@ -3487,14 +3522,14 @@ dependencies = [ "ark-poly", "ark-serialize", "ark-std", - "merlin", + "merlin 3.0.0", ] [[package]] name = "fiat-crypto" -version = "0.2.6" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" [[package]] name = "file-per-thread-logger" @@ -3508,14 +3543,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "redox_syscall 0.3.5", + "windows-sys 0.48.0", ] [[package]] @@ -3627,9 +3662,9 @@ dependencies = [ [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -3769,7 +3804,7 @@ version = "32.0.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "Inflector", - "array-bytes 6.2.2", + "array-bytes 6.2.0", "chrono", "clap", "comfy-table", @@ -3897,7 +3932,7 @@ version = "28.0.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "aquamarine", - "array-bytes 6.2.2", + "array-bytes 6.2.0", "bitflags 1.3.2", "docify", "environmental", @@ -4031,9 +4066,9 @@ dependencies = [ [[package]] name = "fs-err" -version = "2.11.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +checksum = "fb5fd9bcbe8b1087cbd395b51498c01bc997cef73e778a80b77a811af5e2d29f" dependencies = [ "autocfg", ] @@ -4054,7 +4089,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29f9df8a11882c4e3335eb2d18a0137c505d9ca927470b0cac9c6f0ae07d28f7" dependencies = [ - "rustix 0.38.31", + "rustix 0.38.24", "windows-sys 0.48.0", ] @@ -4147,14 +4182,11 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.3.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +checksum = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb" dependencies = [ - "fastrand 2.0.1", "futures-core", - "futures-io", - "parking", "pin-project-lite 0.2.13", ] @@ -4194,9 +4226,9 @@ checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" -version = "3.0.3" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" @@ -4271,9 +4303,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "js-sys", @@ -4294,11 +4326,11 @@ dependencies = [ [[package]] name = "ghash" -version = "0.5.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" dependencies = [ - "opaque-debug 0.3.1", + "opaque-debug 0.3.0", "polyval", ] @@ -4315,9 +4347,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "glob" @@ -4333,14 +4365,14 @@ checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", "rand_core 0.6.4", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] name = "h2" -version = "0.3.25" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ "bytes", "fnv", @@ -4348,7 +4380,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.5", + "indexmap 2.1.0", "slab", "tokio", "tokio-util", @@ -4405,16 +4437,16 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.10", ] [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.10", "allocator-api2", "serde", ] @@ -4425,7 +4457,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.3", + "hashbrown 0.14.2", ] [[package]] @@ -4445,9 +4477,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.3.9" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -4472,9 +4504,9 @@ checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "hkdf" -version = "0.12.4" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" dependencies = [ "hmac 0.12.1", ] @@ -4495,7 +4527,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" dependencies = [ - "crypto-mac 0.11.0", + "crypto-mac 0.11.1", "digest 0.9.0", ] @@ -4521,11 +4553,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.9" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.48.0", ] [[package]] @@ -4541,9 +4573,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.12" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -4552,9 +4584,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.6" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", @@ -4587,9 +4619,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -4602,7 +4634,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite 0.2.13", - "socket2 0.5.6", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -4619,7 +4651,7 @@ dependencies = [ "http", "hyper", "log", - "rustls 0.21.10", + "rustls 0.21.9", "rustls-native-certs", "tokio", "tokio-rustls", @@ -4627,16 +4659,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core 0.52.0", + "windows-core", ] [[package]] @@ -4661,9 +4693,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.5.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -4671,21 +4703,21 @@ dependencies = [ [[package]] name = "if-addrs" -version = "0.10.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cabb0019d51a643781ff15c9c8a3e5dedc365c47211270f4e8f82812fedd8f0a" +checksum = "cbc0fa01ffc752e9dbc72818cdb072cd028b86be5e09dd04c5a643704fe101a9" dependencies = [ "libc", - "windows-sys 0.48.0", + "winapi", ] [[package]] name = "if-watch" -version = "3.2.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" +checksum = "bbb892e5777fe09e16f3d44de7802f4daa7267ecbe8c466f19d94e25bb0c303e" dependencies = [ - "async-io 2.3.2", + "async-io 1.13.0", "core-foundation", "fnv", "futures 0.3.30", @@ -4777,12 +4809,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.5" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.14.2", ] [[package]] @@ -4793,9 +4825,9 @@ checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" [[package]] name = "indicatif" -version = "0.17.8" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" dependencies = [ "console", "instant", @@ -4860,7 +4892,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.6", + "socket2 0.5.5", "widestring", "windows-sys 0.48.0", "winreg", @@ -4874,13 +4906,13 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "libc", - "windows-sys 0.52.0", + "rustix 0.38.24", + "windows-sys 0.48.0", ] [[package]] @@ -4910,35 +4942,26 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" -version = "0.1.28" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" dependencies = [ "wasm-bindgen", ] @@ -5089,9 +5112,9 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.3" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" dependencies = [ "cfg-if", "ecdsa", @@ -5102,9 +5125,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.5" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" dependencies = [ "cpufeatures", ] @@ -5182,12 +5205,12 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libloading" -version = "0.8.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ "cfg-if", - "windows-targets 0.52.4", + "winapi", ] [[package]] @@ -5205,7 +5228,7 @@ dependencies = [ "bytes", "futures 0.3.30", "futures-timer", - "getrandom 0.2.12", + "getrandom 0.2.11", "instant", "libp2p-allow-block-list", "libp2p-connection-limits", @@ -5324,7 +5347,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ "bs58 0.4.0", - "ed25519-dalek 2.1.1", + "ed25519-dalek 2.1.0", "log", "multiaddr", "multihash 0.17.0", @@ -5595,7 +5618,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.4.1", "libc", "redox_syscall 0.4.1", ] @@ -5642,7 +5665,7 @@ checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" dependencies = [ "crunchy", "digest 0.9.0", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] @@ -5676,9 +5699,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.15" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037731f5d3aaa87a5675e895b63ddff1a87624bc29f77004ea829809654e48f6" +checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" dependencies = [ "cc", "pkg-config", @@ -5732,9 +5755,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" [[package]] name = "lioness" @@ -5934,9 +5957,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.1" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memfd" @@ -5944,7 +5967,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.31", + "rustix 0.38.24", ] [[package]] @@ -5983,6 +6006,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + [[package]] name = "memory-db" version = "0.32.0" @@ -5992,6 +6024,18 @@ dependencies = [ "hash-db 0.16.0", ] +[[package]] +name = "merlin" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.5.1", + "zeroize", +] + [[package]] name = "merlin" version = "3.0.0" @@ -6023,18 +6067,18 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.11" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -6061,7 +6105,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rand_distr", - "subtle 2.5.0", + "subtle 2.4.1", "thiserror", "zeroize", ] @@ -7308,9 +7352,9 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.32.4" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4541eb06dce09c0241ebbaab7102f0a01a0c8994afed2e5d0d66775016e25ac2" +checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" dependencies = [ "approx", "matrixmultiply", @@ -7348,7 +7392,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.11", ] [[package]] @@ -7523,7 +7567,7 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.4.1", "cfg-if", "libc", ] @@ -7589,19 +7633,13 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.5" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" dependencies = [ "num-traits", ] -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - [[package]] name = "num-format" version = "0.4.4" @@ -7614,18 +7652,19 @@ dependencies = [ [[package]] name = "num-integer" -version = "0.1.46" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ + "autocfg", "num-traits", ] [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" dependencies = [ "autocfg", "num-integer", @@ -7646,9 +7685,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", "libm", @@ -7699,7 +7738,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.53", @@ -7725,9 +7764,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] @@ -7743,9 +7782,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -7755,17 +7794,17 @@ checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] name = "opaque-debug" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.4.1", "cfg-if", "foreign-types", "libc", @@ -7793,9 +7832,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.101" +version = "0.9.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" +checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9" dependencies = [ "cc", "libc", @@ -7833,7 +7872,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eedb646674596266dc9bb2b5c7eea7c36b32ecc7777eba0d510196972d72c4fd" dependencies = [ "expander 2.0.0", - "indexmap 2.2.5", + "indexmap 2.1.0", "itertools 0.11.0", "petgraph", "proc-macro-crate 1.3.1", @@ -8200,7 +8239,7 @@ name = "pallet-beefy-mmr" version = "28.0.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.2", + "array-bytes 6.2.0", "binary-merkle-tree", "frame-support", "frame-system", @@ -10179,9 +10218,9 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.4.13" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "592a28a24b09c9dc20ac8afaa6839abc417c720afe42c12e1e4a9d6aa2508d2e" +checksum = "59e9ab494af9e6e813c72170f0d3c1de1500990d62c97cc05cc7576f91aa402f" dependencies = [ "blake2 0.10.6", "crc32fast", @@ -10195,14 +10234,13 @@ dependencies = [ "rand 0.8.5", "siphasher", "snap", - "winapi", ] [[package]] name = "parity-scale-codec" -version = "3.6.9" +version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -10215,11 +10253,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.9" +version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" dependencies = [ - "proc-macro-crate 2.0.0", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -10318,7 +10356,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ - "crypto-mac 0.11.0", + "crypto-mac 0.11.1", ] [[package]] @@ -10348,15 +10386,15 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.7.8" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f8023d0fb78c8e03784ea1c7f3fa36e68a723138990b8d5a47d916b651e7a8" +checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" dependencies = [ "memchr", "thiserror", @@ -10365,9 +10403,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.8" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0d24f72393fd16ab6ac5738bc33cdb6a9aa73f8b902e8fe29cf4e67d7dd1026" +checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2" dependencies = [ "pest", "pest_generator", @@ -10375,9 +10413,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.8" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc17e2a6c7d0a492f0158d7a4bd66cc17280308bbaff78d5bef566dca35ab80" +checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227" dependencies = [ "pest", "pest_meta", @@ -10388,9 +10426,9 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.7.8" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934cd7631c050f4674352a6e835d5f6711ffbfb9345c2fc0107155ac495ae293" +checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" dependencies = [ "once_cell", "pest", @@ -10404,23 +10442,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.2.5", + "indexmap 2.1.0", ] [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", @@ -10468,15 +10506,15 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "platforms" -version = "3.3.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" +checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] name = "polkadot-approval-distribution" @@ -10631,7 +10669,7 @@ dependencies = [ "fatality", "futures 0.3.30", "futures-timer", - "indexmap 2.2.5", + "indexmap 2.1.0", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -10735,7 +10773,7 @@ dependencies = [ "futures-timer", "itertools 0.10.5", "kvdb", - "merlin", + "merlin 3.0.0", "parity-scale-codec", "polkadot-node-jaeger", "polkadot-node-primitives", @@ -10942,7 +10980,7 @@ version = "7.0.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "always-assert", - "array-bytes 6.2.2", + "array-bytes 6.2.0", "blake3", "cfg-if", "futures 0.3.30", @@ -11526,7 +11564,7 @@ dependencies = [ "fatality", "futures 0.3.30", "futures-timer", - "indexmap 2.2.5", + "indexmap 2.1.0", "parity-scale-codec", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -11605,16 +11643,16 @@ dependencies = [ [[package]] name = "polling" -version = "3.5.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24f040dee2588b4963afb4e420540439d126f73fdacf4a9c486a96d840bac3c9" +checksum = "e53b6af1f60f36f8c2ac2aad5459d75a5a9b4be1e8cdd40264f315d78193e531" dependencies = [ "cfg-if", "concurrent-queue", "pin-project-lite 0.2.13", - "rustix 0.38.31", + "rustix 0.38.24", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.48.0", ] [[package]] @@ -11624,27 +11662,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ "cpufeatures", - "opaque-debug 0.3.1", + "opaque-debug 0.3.0", "universal-hash", ] [[package]] name = "polyval" -version = "0.6.2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" dependencies = [ "cfg-if", "cpufeatures", - "opaque-debug 0.3.1", + "opaque-debug 0.3.0", "universal-hash", ] [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "3bccab0e7fd7cc19f820a1c8c91720af652d0c88dc9664dd72aef2614f04af3b" [[package]] name = "powerfmt" @@ -11750,12 +11788,13 @@ dependencies = [ [[package]] name = "predicates" -version = "3.1.0" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" +checksum = "6dfc28575c2e3f19cb3c73b93af36460ae898d426eba6fc15b9bd2a5220758a0" dependencies = [ "anstyle", "difflib", + "itertools 0.11.0", "predicates-core", ] @@ -11787,9 +11826,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.16" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", "syn 2.0.53", @@ -11835,15 +11874,6 @@ dependencies = [ "toml_edit 0.19.15", ] -[[package]] -name = "proc-macro-crate" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" -dependencies = [ - "toml_edit 0.20.7", -] - [[package]] name = "proc-macro-crate" version = "3.1.0" @@ -11879,9 +11909,9 @@ dependencies = [ [[package]] name = "proc-macro-warning" -version = "1.0.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca" +checksum = "9b698b0b09d40e9b7c1a47b132d66a8b54bcd20583d9b6d06e4535e383b4405c" dependencies = [ "proc-macro2", "quote", @@ -12151,7 +12181,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.11", ] [[package]] @@ -12190,9 +12220,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.9.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -12200,9 +12230,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -12229,6 +12259,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_syscall" version = "0.4.1" @@ -12244,7 +12283,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.11", "libredox", "thiserror", ] @@ -12263,18 +12302,18 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.22" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4846d4c50d1721b1a3bef8af76924eef20d5e723647333798c1b519b3a9473f" +checksum = "acde58d073e9c79da00f2b5b84eed919c8326832648a5b109b3fce1bb1175280" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.22" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" +checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", @@ -12295,13 +12334,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", + "regex-automata 0.4.3", "regex-syntax 0.8.2", ] @@ -12316,9 +12355,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", @@ -12354,7 +12393,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ "hmac 0.12.1", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] @@ -12370,7 +12409,7 @@ dependencies = [ "blake2 0.10.6", "common", "fflonk", - "merlin", + "merlin 3.0.0", ] [[package]] @@ -12390,17 +12429,16 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.8" +version = "0.17.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" dependencies = [ "cc", - "cfg-if", - "getrandom 0.2.12", + "getrandom 0.2.11", "libc", "spin 0.9.8", "untrusted 0.9.0", - "windows-sys 0.52.0", + "windows-sys 0.48.0", ] [[package]] @@ -12622,7 +12660,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.22", + "semver 1.0.20", ] [[package]] @@ -12664,15 +12702,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "9ad981d6c340a49cdc40a1028d9c6084ec7e9fa33fcb839cab656a267071e234" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.4.1", "errno", "libc", - "linux-raw-sys 0.4.13", - "windows-sys 0.52.0", + "linux-raw-sys 0.4.11", + "windows-sys 0.48.0", ] [[package]] @@ -12689,12 +12727,12 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" dependencies = [ "log", - "ring 0.17.8", + "ring 0.17.5", "rustls-webpki", "sct", ] @@ -12717,7 +12755,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.7", + "base64 0.21.5", ] [[package]] @@ -12726,7 +12764,7 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.8", + "ring 0.17.5", "untrusted 0.9.0", ] @@ -12760,9 +12798,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safe_arch" @@ -12864,7 +12902,7 @@ name = "sc-chain-spec" version = "27.0.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.2", + "array-bytes 6.2.0", "docify", "log", "memmap2 0.9.4", @@ -12901,7 +12939,7 @@ name = "sc-cli" version = "0.36.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.2", + "array-bytes 6.2.0", "bip39", "chrono", "clap", @@ -13110,7 +13148,7 @@ name = "sc-consensus-beefy" version = "13.0.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.2", + "array-bytes 6.2.0", "async-channel 1.9.0", "async-trait", "fnv", @@ -13178,8 +13216,8 @@ name = "sc-consensus-grandpa" version = "0.19.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "ahash 0.8.11", - "array-bytes 6.2.2", + "ahash 0.8.10", + "array-bytes 6.2.0", "async-trait", "dyn-clone", "finality-grandpa", @@ -13372,7 +13410,7 @@ name = "sc-keystore" version = "25.0.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.2", + "array-bytes 6.2.0", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -13415,7 +13453,7 @@ name = "sc-network" version = "0.34.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.2", + "array-bytes 6.2.0", "async-channel 1.9.0", "async-trait", "asynchronous-codec", @@ -13495,7 +13533,7 @@ name = "sc-network-gossip" version = "0.34.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.10", "futures 0.3.30", "futures-timer", "libp2p", @@ -13514,7 +13552,7 @@ name = "sc-network-light" version = "0.33.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.2", + "array-bytes 6.2.0", "async-channel 1.9.0", "futures 0.3.30", "libp2p-identity", @@ -13535,7 +13573,7 @@ name = "sc-network-sync" version = "0.33.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.2", + "array-bytes 6.2.0", "async-channel 1.9.0", "async-trait", "fork-tree", @@ -13571,7 +13609,7 @@ name = "sc-network-transactions" version = "0.33.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.2", + "array-bytes 6.2.0", "futures 0.3.30", "libp2p", "log", @@ -13590,7 +13628,7 @@ name = "sc-offchain" version = "29.0.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.2", + "array-bytes 6.2.0", "bytes", "fnv", "futures 0.3.30", @@ -13700,7 +13738,7 @@ name = "sc-rpc-spec-v2" version = "0.34.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.2", + "array-bytes 6.2.0", "futures 0.3.30", "futures-util", "hex", @@ -13972,9 +14010,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.11.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ef2175c2907e7c8bc0a9c3f86aeb5ec1f3b275300ad58a44d0c3ae379a5e52e" +checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" dependencies = [ "bitvec", "cfg-if", @@ -13986,9 +14024,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.11.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b8eb8fd61c5cdd3390d9b2132300a7e7618955b98b8416f118c1b4e144f" +checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -13998,11 +14036,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.48.0", ] [[package]] @@ -14011,11 +14049,27 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.10", "cfg-if", "hashbrown 0.13.2", ] +[[package]] +name = "schnorrkel" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" +dependencies = [ + "arrayref", + "arrayvec 0.5.2", + "curve25519-dalek 2.1.3", + "merlin 2.0.1", + "rand_core 0.5.1", + "sha2 0.8.2", + "subtle 2.4.1", + "zeroize", +] + [[package]] name = "schnorrkel" version = "0.10.2" @@ -14025,7 +14079,7 @@ dependencies = [ "arrayref", "arrayvec 0.7.4", "curve25519-dalek-ng", - "merlin", + "merlin 3.0.0", "rand_core 0.6.4", "sha2 0.9.9", "subtle-ng", @@ -14043,11 +14097,11 @@ dependencies = [ "arrayvec 0.7.4", "curve25519-dalek 4.1.2", "getrandom_or_panic", - "merlin", + "merlin 3.0.0", "rand_core 0.6.4", "serde_bytes", "sha2 0.10.8", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] @@ -14069,7 +14123,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.8", + "ring 0.17.5", "untrusted 0.9.0", ] @@ -14083,7 +14137,7 @@ dependencies = [ "der", "generic-array 0.14.7", "pkcs8", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] @@ -14157,9 +14211,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" dependencies = [ "serde", ] @@ -14249,7 +14303,7 @@ dependencies = [ "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.1", + "opaque-debug 0.3.0", ] [[package]] @@ -14263,6 +14317,18 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "sha2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +dependencies = [ + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug 0.2.3", +] + [[package]] name = "sha2" version = "0.9.9" @@ -14273,7 +14339,7 @@ dependencies = [ "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.1", + "opaque-debug 0.3.0", ] [[package]] @@ -14308,9 +14374,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.3.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" [[package]] name = "signal-hook-registry" @@ -14352,9 +14418,9 @@ dependencies = [ [[package]] name = "similar" -version = "2.4.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32fea41aca09ee824cc9724996433064c89f7777e60762749a4170a14abbfa21" +checksum = "2aeaf503862c419d66959f5d7ca015337d864e9c49485d771b732e2a20453597" dependencies = [ "bstr 0.2.17", "unicode-segmentation", @@ -14422,9 +14488,9 @@ dependencies = [ [[package]] name = "slotmap" -version = "1.0.7" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" dependencies = [ "version_check", ] @@ -14461,7 +14527,7 @@ dependencies = [ "arrayvec 0.7.4", "async-lock 2.8.0", "atomic-take", - "base64 0.21.7", + "base64 0.21.5", "bip39", "blake2-rfc", "bs58 0.5.0", @@ -14474,12 +14540,12 @@ dependencies = [ "fnv", "futures-lite 1.13.0", "futures-util", - "hashbrown 0.14.3", + "hashbrown 0.14.2", "hex", "hmac 0.12.1", "itertools 0.11.0", "libsecp256k1", - "merlin", + "merlin 3.0.0", "no-std-net", "nom", "num-bigint", @@ -14502,7 +14568,7 @@ dependencies = [ "soketto", "twox-hash", "wasmi", - "x25519-dalek 2.0.1", + "x25519-dalek 2.0.0", "zeroize", ] @@ -14514,7 +14580,7 @@ checksum = "256b5bad1d6b49045e95fe87492ce73d5af81545d8b4d8318a872d2007024c33" dependencies = [ "async-channel 1.9.0", "async-lock 2.8.0", - "base64 0.21.7", + "base64 0.21.5", "blake2-rfc", "derive_more", "either", @@ -14523,7 +14589,7 @@ dependencies = [ "futures-channel", "futures-lite 1.13.0", "futures-util", - "hashbrown 0.14.3", + "hashbrown 0.14.2", "hex", "itertools 0.11.0", "log", @@ -14544,25 +14610,25 @@ dependencies = [ [[package]] name = "snap" -version = "1.1.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" +checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" [[package]] name = "snow" -version = "0.9.6" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "850948bee068e713b8ab860fe1adc4d109676ab4c3b621fd8147f06b261f2f85" +checksum = "58021967fd0a5eeeb23b08df6cc244a4d4a5b4aec1d27c9e02fad1a58b4cd74e" dependencies = [ "aes-gcm", "blake2 0.10.6", "chacha20poly1305", "curve25519-dalek 4.1.2", "rand_core 0.6.4", - "ring 0.17.8", + "ring 0.17.5", "rustc_version", "sha2 0.10.8", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] @@ -14577,12 +14643,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.48.0", ] [[package]] @@ -14830,7 +14896,7 @@ name = "sp-core" version = "28.0.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.2", + "array-bytes 6.2.0", "bandersnatch_vrfs", "bip39", "bitflags 1.3.2", @@ -14846,7 +14912,7 @@ dependencies = [ "itertools 0.10.5", "libsecp256k1", "log", - "merlin", + "merlin 3.0.0", "parity-scale-codec", "parking_lot 0.12.1", "paste", @@ -14882,7 +14948,7 @@ dependencies = [ [[package]] name = "sp-crypto-ec-utils" version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk#610987a19da816a76c296c99f311ce8f6e9ab3d8" +source = "git+https://github.com/paritytech/polkadot-sdk#1e9fd237768a404e40f1332b217f638dd7e3d917" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -14944,7 +15010,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#610987a19da816a76c296c99f311ce8f6e9ab3d8" +source = "git+https://github.com/paritytech/polkadot-sdk#1e9fd237768a404e40f1332b217f638dd7e3d917" dependencies = [ "proc-macro2", "quote", @@ -14965,7 +15031,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.25.0" -source = "git+https://github.com/paritytech/polkadot-sdk#610987a19da816a76c296c99f311ce8f6e9ab3d8" +source = "git+https://github.com/paritytech/polkadot-sdk#1e9fd237768a404e40f1332b217f638dd7e3d917" dependencies = [ "environmental", "parity-scale-codec", @@ -15003,7 +15069,7 @@ version = "30.0.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "bytes", - "ed25519-dalek 2.1.1", + "ed25519-dalek 2.1.0", "libsecp256k1", "log", "parity-scale-codec", @@ -15183,7 +15249,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#610987a19da816a76c296c99f311ce8f6e9ab3d8" +source = "git+https://github.com/paritytech/polkadot-sdk#1e9fd237768a404e40f1332b217f638dd7e3d917" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -15215,7 +15281,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#610987a19da816a76c296c99f311ce8f6e9ab3d8" +source = "git+https://github.com/paritytech/polkadot-sdk#1e9fd237768a404e40f1332b217f638dd7e3d917" dependencies = [ "Inflector", "expander 2.0.0", @@ -15282,7 +15348,7 @@ source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbea dependencies = [ "aes-gcm", "curve25519-dalek 4.1.2", - "ed25519-dalek 2.1.1", + "ed25519-dalek 2.1.0", "hkdf", "parity-scale-codec", "rand 0.8.5", @@ -15297,7 +15363,7 @@ dependencies = [ "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", "thiserror", - "x25519-dalek 2.0.1", + "x25519-dalek 2.0.0", ] [[package]] @@ -15308,7 +15374,7 @@ source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbea [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#610987a19da816a76c296c99f311ce8f6e9ab3d8" +source = "git+https://github.com/paritytech/polkadot-sdk#1e9fd237768a404e40f1332b217f638dd7e3d917" [[package]] name = "sp-storage" @@ -15326,7 +15392,7 @@ dependencies = [ [[package]] name = "sp-storage" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#610987a19da816a76c296c99f311ce8f6e9ab3d8" +source = "git+https://github.com/paritytech/polkadot-sdk#1e9fd237768a404e40f1332b217f638dd7e3d917" dependencies = [ "impl-serde 0.4.0", "parity-scale-codec", @@ -15363,7 +15429,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#610987a19da816a76c296c99f311ce8f6e9ab3d8" +source = "git+https://github.com/paritytech/polkadot-sdk#1e9fd237768a404e40f1332b217f638dd7e3d917" dependencies = [ "parity-scale-codec", "tracing", @@ -15400,7 +15466,7 @@ name = "sp-trie" version = "29.0.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.10", "hash-db 0.16.0", "lazy_static", "memory-db", @@ -15463,7 +15529,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#610987a19da816a76c296c99f311ce8f6e9ab3d8" +source = "git+https://github.com/paritytech/polkadot-sdk#1e9fd237768a404e40f1332b217f638dd7e3d917" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -15504,9 +15570,9 @@ dependencies = [ [[package]] name = "spinners" -version = "4.1.1" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0ef947f358b9c238923f764c72a4a9d42f2d637c46e059dbd319d6e7cfb4f82" +checksum = "08615eea740067d9899969bc2891c68a19c315cb1f66640af9a9ecb91b13bcab" dependencies = [ "lazy_static", "maplit", @@ -15515,9 +15581,9 @@ dependencies = [ [[package]] name = "spki" -version = "0.7.3" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", "der", @@ -15525,11 +15591,11 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.3" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" +checksum = "6b7b278788e7be4d0d29c0f39497a0eef3fba6bbc8e70d8bf7fde46edeaa9e85" dependencies = [ - "itertools 0.12.1", + "itertools 0.11.0", "nom", "unicode_categories", ] @@ -15551,7 +15617,7 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24ba59a9342a3d9bab6c56c118be528b27c9b60e490080e9711a04dccac83ef6" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.10", "atoi", "byteorder", "bytes", @@ -15566,7 +15632,7 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap 2.2.5", + "indexmap 2.1.0", "log", "memchr", "native-tls", @@ -15646,9 +15712,9 @@ dependencies = [ [[package]] name = "ss58-registry" -version = "1.47.0" +version = "1.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4743ce898933fbff7bbf414f497c459a782d496269644b3d650a398ae6a487ba" +checksum = "35935738370302d5e33963665b77541e4b990a3e919ec904c837a56cfc891de1" dependencies = [ "Inflector", "num-format", @@ -15684,7 +15750,7 @@ name = "staging-xcm" version = "7.0.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.2", + "array-bytes 6.2.0", "bounded-collections", "derivative", "environmental", @@ -15798,7 +15864,7 @@ dependencies = [ "bitflags 1.3.2", "byteorder", "keccak", - "subtle 2.5.0", + "subtle 2.4.1", "zeroize", ] @@ -15851,13 +15917,13 @@ dependencies = [ [[package]] name = "substrate-bip39" -version = "0.4.6" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a7590dc041b9bc2825e52ce5af8416c73dbe9d0654402bfd4b4941938b94d8f" +checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", - "schnorrkel 0.11.4", + "schnorrkel 0.9.1", "sha2 0.9.9", "zeroize", ] @@ -15883,7 +15949,7 @@ source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbea [[package]] name = "substrate-fixed" version = "0.5.9" -source = "git+https://github.com/encointer/substrate-fixed#879c58bcc6fd676a74315dcd38b598f28708b0b5" +source = "git+https://github.com/encointer/substrate-fixed#a75f3ba3f7c7893fb420500639cc055f964b1b88" dependencies = [ "parity-scale-codec", "scale-info", @@ -15956,7 +16022,7 @@ name = "substrate-test-client" version = "2.0.1" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.2", + "array-bytes 6.2.0", "async-trait", "futures 0.3.30", "parity-scale-codec", @@ -15983,7 +16049,7 @@ name = "substrate-test-runtime" version = "2.0.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "array-bytes 6.2.2", + "array-bytes 6.2.0", "frame-executive", "frame-support", "frame-system", @@ -16074,9 +16140,9 @@ checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" [[package]] name = "subtle" -version = "2.5.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "subtle-ng" @@ -16159,27 +16225,28 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.14" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" +checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if", "fastrand 2.0.1", - "rustix 0.38.31", - "windows-sys 0.52.0", + "redox_syscall 0.4.1", + "rustix 0.38.24", + "windows-sys 0.48.0", ] [[package]] name = "termcolor" -version = "1.4.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] @@ -16190,7 +16257,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ - "rustix 0.38.31", + "rustix 0.38.24", "windows-sys 0.48.0", ] @@ -16202,38 +16269,38 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-core" -version = "1.0.50" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c001ee18b7e5e3f62cbf58c7fe220119e68d902bb7443179c0c8aef30090e999" +checksum = "0d97345f6437bb2004cd58819d8a9ef8e36cdd7661c2abc4bbde0a7c40d9f497" dependencies = [ "thiserror-core-impl", ] [[package]] name = "thiserror-core-impl" -version = "1.0.50" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" +checksum = "10ac1c5050e43014d16b2f94d0d2ce79e65ffdd8b38d8048f9c8f6a8a6da62ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 1.0.109", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", @@ -16248,9 +16315,9 @@ checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" [[package]] name = "thread_local" -version = "1.1.8" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ "cfg-if", "once_cell", @@ -16301,13 +16368,12 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "itoa", - "num-conv", "powerfmt", "serde", "time-core", @@ -16322,11 +16388,10 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ - "num-conv", "time-core", ] @@ -16387,7 +16452,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project-lite 0.2.13", "signal-hook-registry", - "socket2 0.5.6", + "socket2 0.5.5", "tokio-macros", "windows-sys 0.48.0", ] @@ -16420,15 +16485,15 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.10", + "rustls 0.21.9", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite 0.2.13", @@ -16487,20 +16552,9 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.5", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.20.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" -dependencies = [ - "indexmap 2.2.5", + "indexmap 2.1.0", "toml_datetime", - "winnow 0.5.40", + "winnow 0.5.19", ] [[package]] @@ -16509,9 +16563,9 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.1.0", "toml_datetime", - "winnow 0.5.40", + "winnow 0.5.19", ] [[package]] @@ -16520,7 +16574,7 @@ version = "0.22.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c12219811e0c1ba077867254e5ad62ee2c9c190b0d957110750ac0cda1ae96cd" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.1.0", "serde", "serde_spanned", "toml_datetime", @@ -16548,7 +16602,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.4.1", "bytes", "futures-core", "futures-util", @@ -16761,9 +16815,9 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.5" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" @@ -16803,17 +16857,17 @@ dependencies = [ [[package]] name = "trybuild" -version = "1.0.90" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aa6f84ec205ebf87fb7a0abdbcd1467fa5af0e86878eb6d888b78ecbb10b6d5" +checksum = "196a58260a906cedb9bf6d8034b6379d0c11f552416960452f267402ceeddff1" dependencies = [ + "basic-toml", "glob", "once_cell", "serde", "serde_derive", "serde_json", "termcolor", - "toml 0.8.12", ] [[package]] @@ -16860,9 +16914,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" @@ -16881,9 +16935,9 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" @@ -16910,7 +16964,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", - "subtle 2.5.0", + "subtle 2.4.1", ] [[package]] @@ -16939,12 +16993,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", - "idna 0.5.0", + "idna 0.4.0", "percent-encoding", ] @@ -17025,9 +17079,9 @@ checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "walkdir" -version = "2.5.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -17054,20 +17108,11 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "wasix" -version = "0.12.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1fbb4ef9bbca0c1170e0b00dd28abc9e3b68669821600cad1caaed606583c6d" -dependencies = [ - "wasi 0.11.0+wasi-snapshot-preview1", -] - [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -17075,9 +17120,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" dependencies = [ "bumpalo", "log", @@ -17090,9 +17135,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" dependencies = [ "cfg-if", "js-sys", @@ -17102,9 +17147,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -17112,9 +17157,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" dependencies = [ "proc-macro2", "quote", @@ -17125,9 +17170,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" [[package]] name = "wasm-instrument" @@ -17195,9 +17240,9 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.31.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8281d1d660cdf54c76a3efa9ddd0c270cada1383a995db3ccb43d166456c7" +checksum = "1f341edb80021141d4ae6468cbeefc50798716a347d4085c3811900049ea8945" dependencies = [ "smallvec", "spin 0.9.8", @@ -17208,9 +17253,9 @@ dependencies = [ [[package]] name = "wasmi_arena" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "104a7f73be44570cac297b3035d76b169d6599637631cf37a1703326a0727073" +checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468" [[package]] name = "wasmi_core" @@ -17287,7 +17332,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.21.7", + "base64 0.21.5", "bincode", "directories-next", "file-per-thread-logger", @@ -17440,9 +17485,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" dependencies = [ "js-sys", "wasm-bindgen", @@ -17454,7 +17499,7 @@ version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.17.8", + "ring 0.17.5", "untrusted 0.9.0", ] @@ -17598,14 +17643,14 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.31", + "rustix 0.38.24", ] [[package]] name = "wide" -version = "0.7.15" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89beec544f246e679fc25490e3f8e08003bc4bf612068f325120dad4cea02c1c" +checksum = "c68938b57b33da363195412cfc5fc37c9ed49aa9cfe2156fde64b8d2c9498242" dependencies = [ "bytemuck", "safe_arch", @@ -17654,7 +17699,7 @@ version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows-core 0.51.1", + "windows-core", "windows-targets 0.48.5", ] @@ -17667,15 +17712,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.4", -] - [[package]] name = "windows-sys" version = "0.45.0" @@ -17876,9 +17912,9 @@ checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" [[package]] name = "winnow" -version = "0.5.40" +version = "0.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" dependencies = [ "memchr", ] @@ -17924,9 +17960,9 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "2.0.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" +checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ "curve25519-dalek 4.1.2", "rand_core 0.6.4", From 1a3aea596c2ac982ca974cfd8eaa59d52f6b557c Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 19 Mar 2024 18:09:14 +0000 Subject: [PATCH 59/80] revert changes to .gihub folder --- .../workflow-templates/cargo-build/action.yml | 14 ++++++-- .../rust-toolchain/action.yml | 19 ----------- .github/workflows/build.yml | 33 ++++++++++++------- .github/workflows/check-licenses.yml | 7 ++-- .github/workflows/docs.yml | 4 ++- .github/workflows/prepare-binary.yml | 2 +- 6 files changed, 42 insertions(+), 37 deletions(-) delete mode 100644 .github/workflow-templates/rust-toolchain/action.yml diff --git a/.github/workflow-templates/cargo-build/action.yml b/.github/workflow-templates/cargo-build/action.yml index 2bb0c9e0a0..bcf80429e3 100644 --- a/.github/workflow-templates/cargo-build/action.yml +++ b/.github/workflow-templates/cargo-build/action.yml @@ -28,8 +28,16 @@ runs: run: | mkdir -p mold curl -L --retry 10 --silent --show-error https://github.com/rui314/mold/releases/download/v1.1.1/mold-1.1.1-$(uname -m)-linux.tar.gz | tar -C $(realpath mold) --strip-components=1 -xzf - - - name: Install Rust Toolchain - uses: ./.github/workflow-templates/rust-toolchain + # With rustup's nice new toml format, we just need to run rustup show to install the toolchain + # https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659 + - name: Setup Rust toolchain + shell: bash + run: | + if ! which "rustup" > /dev/null; then + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + fi + rustup show + rustup target add wasm32-unknown-unknown - name: Build Node shell: bash run: | @@ -62,4 +70,4 @@ runs: shell: bash run: | mkdir -p build - cp target/release/moonbeam build/moonbeam; + cp target/release/moonbeam build/moonbeam; \ No newline at end of file diff --git a/.github/workflow-templates/rust-toolchain/action.yml b/.github/workflow-templates/rust-toolchain/action.yml deleted file mode 100644 index c764eadc69..0000000000 --- a/.github/workflow-templates/rust-toolchain/action.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Rust Toolchain -description: Install Rust toolchain - -runs: - using: "composite" - steps: - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.74.0 - override: true - components: rust-src, rustfmt, clippy - - name: Install targets - shell: bash - run: | - rustup target add wasm32-unknown-unknown - - name: Shows the name of the active toolchain and the version of `rustc` - shell: bash - run: rustup show diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3143447167..f6a32b4993 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -223,8 +223,10 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ needs.set-tags.outputs.git_ref }} - - name: Install Rust Toolchain - uses: ./.github/workflow-templates/rust-toolchain + # With rustup's nice new toml format, we just need to run rustup show to install the toolchain + # https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659 + - name: Setup Rust toolchain + run: rustup show - name: Check Cargo.toml files format with toml_sort run: ./scripts/check-cargo-toml-files-format.sh @@ -237,8 +239,8 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ needs.set-tags.outputs.git_ref }} - - name: Install Rust Toolchain - uses: ./.github/workflow-templates/rust-toolchain + - name: Setup Rust toolchain + run: rustup show - name: Verifies all 'pallet-evm/ethereum' use 'forbid-evm-reentrancy' feature run: ./scripts/check-forbid-evm-reentrancy.sh @@ -251,8 +253,10 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ needs.set-tags.outputs.git_ref }} - - name: Install Rust Toolchain - uses: ./.github/workflow-templates/rust-toolchain + # With rustup's nice new toml format, we just need to run rustup show to install the toolchain + # https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659 + - name: Setup Rust toolchain + run: rustup show - name: Format code with rustfmt run: cargo fmt -- --check @@ -267,10 +271,10 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ needs.set-tags.outputs.git_ref }} - - name: Install Rust Toolchain - uses: ./.github/workflow-templates/rust-toolchain - name: Install Protoc uses: arduino/setup-protoc@v1 + - name: Setup Rust toolchain + run: rustup show # Development branch clippy check - name: Clippy (dev) if: github.ref != 'refs/heads/master' && !startsWith(github.ref, 'perm-') @@ -327,8 +331,15 @@ jobs: run: | mkdir -p mold curl -L --retry 10 --silent --show-error https://github.com/rui314/mold/releases/download/v1.1.1/mold-1.1.1-$(uname -m)-linux.tar.gz | tar -C $(realpath mold) --strip-components=1 -xzf - - - name: Install Rust Toolchain - uses: ./.github/workflow-templates/rust-toolchain + # With rustup's nice new toml format, we just need to run rustup show to install the toolchain + # https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659 + - name: Setup Rust toolchain + run: | + if ! which "rustup" > /dev/null; then + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + fi + rustup show + rustup target add wasm32-unknown-unknown # Checks are run after uploading artifacts since they are modified by the tests - name: Unit tests run: | @@ -647,4 +658,4 @@ jobs: if: failure() with: name: failed-node-logs - path: ${{ env.NODE_LOGS_ZIP }} + path: ${{ env.NODE_LOGS_ZIP }} \ No newline at end of file diff --git a/.github/workflows/check-licenses.yml b/.github/workflows/check-licenses.yml index fa2ebb759a..3c53edb1b8 100644 --- a/.github/workflows/check-licenses.yml +++ b/.github/workflows/check-licenses.yml @@ -9,8 +9,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Install Rust Toolchain - uses: ./.github/workflow-templates/rust-toolchain + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: 1.74.0 + override: true - name: Verify Licenses run: | cargo install cargo-license diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8fd302450c..b41d593e24 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -19,8 +19,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + # With rustup's nice new toml format, we just need to run rustup show to install the toolchain + # https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659 - name: Setup Rust toolchain - uses: ./.github/workflow-templates/rust-toolchain + run: rustup show - uses: actions/cache@v3 with: diff --git a/.github/workflows/prepare-binary.yml b/.github/workflows/prepare-binary.yml index ea44c504af..addf99115f 100644 --- a/.github/workflows/prepare-binary.yml +++ b/.github/workflows/prepare-binary.yml @@ -24,7 +24,7 @@ jobs: with: ref: ${{ github.event.inputs.sha }} - name: Setup Rust toolchain - uses: ./.github/workflow-templates/rust-toolchain + run: rustup show - name: Build Node run: cargo build --profile=production --all - name: Save parachain binary From 52bea1f7bcc688f21c73263f1112de7e5253a89a Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 19 Mar 2024 18:14:23 +0000 Subject: [PATCH 60/80] fix formatting --- .github/workflow-templates/cargo-build/action.yml | 2 +- .github/workflows/build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflow-templates/cargo-build/action.yml b/.github/workflow-templates/cargo-build/action.yml index bcf80429e3..339b492665 100644 --- a/.github/workflow-templates/cargo-build/action.yml +++ b/.github/workflow-templates/cargo-build/action.yml @@ -70,4 +70,4 @@ runs: shell: bash run: | mkdir -p build - cp target/release/moonbeam build/moonbeam; \ No newline at end of file + cp target/release/moonbeam build/moonbeam; diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f6a32b4993..1199a77e5c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -658,4 +658,4 @@ jobs: if: failure() with: name: failed-node-logs - path: ${{ env.NODE_LOGS_ZIP }} \ No newline at end of file + path: ${{ env.NODE_LOGS_ZIP }} From aee9b698872bf1aac05319dbfabd4361c4cd1fd9 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 19 Mar 2024 18:34:46 +0000 Subject: [PATCH 61/80] removed unused script --- scripts/run-zombie-moonbeam.sh | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100755 scripts/run-zombie-moonbeam.sh diff --git a/scripts/run-zombie-moonbeam.sh b/scripts/run-zombie-moonbeam.sh deleted file mode 100755 index eeecc40c3f..0000000000 --- a/scripts/run-zombie-moonbeam.sh +++ /dev/null @@ -1,24 +0,0 @@ -mkdir -p target/release/wbuild/moonbase-runtime/ -mkdir -p test/tmp - -# When we remove this step, re-add "runScripts": ["download-polkadot.sh"]," to moonwall config -cd test/tmp -wget https://opslayer-dev-artifacts.s3.us-east-2.amazonaws.com/bins/moonbeam/polkadot/1.3.0/polkadot -wget https://opslayer-dev-artifacts.s3.us-east-2.amazonaws.com/bins/moonbeam/polkadot/1.3.0/polkadot-execute-worker -wget https://opslayer-dev-artifacts.s3.us-east-2.amazonaws.com/bins/moonbeam/polkadot/1.3.0/polkadot-prepare-worker - -chmod +x polkadot -chmod +x polkadot-execute-worker -chmod +x polkadot-prepare-worker - -cd .. -pnpm install - -## Generate old spec using latest published node, modify it, and generate raw spec -chmod uog+x tmp/moonbeam_rt -chmod uog+x ../target/release/moonbeam -tmp/moonbeam_rt build-spec --chain moonbase-local > tmp/moonbase-plain-spec.json -pnpm tsx scripts/modify-plain-specs.ts process tmp/moonbase-plain-spec.json tmp/moonbase-modified-spec.json -tmp/moonbeam_rt build-spec --chain tmp/moonbase-modified-spec.json --raw > tmp/moonbase-raw-spec.json -pnpm tsx scripts/preapprove-rt-rawspec.ts process tmp/moonbase-raw-spec.json tmp/moonbase-modified-raw-spec.json ../target/release/wbuild/moonbase-runtime/moonbase_runtime.compact.compressed.wasm - \ No newline at end of file From b3a4287cce98ea40841efc9e252d630afbc48560 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 19 Mar 2024 19:40:50 +0000 Subject: [PATCH 62/80] try disabling coverage --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index a9edafe991..dd433d8c49 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -105,7 +105,7 @@ jobs: - name: Setup Variables shell: bash run: | - echo "RUSTFLAGS=-C opt-level=3 -D warnings -C instrument-coverage -C linker=clang -C link-arg=-fuse-ld=$(pwd)/mold/bin/mold" >> $GITHUB_ENV + # echo "RUSTFLAGS=-C opt-level=3 -D warnings -C instrument-coverage -C linker=clang -C link-arg=-fuse-ld=$(pwd)/mold/bin/mold" >> $GITHUB_ENV # Disable coverage when building echo "LLVM_PROFILE_FILE=/dev/null" >> $GITHUB_ENV - name: Setup grcov From 9b0962daf5ce1e81f2e92adeffbf62de6cc03acf Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 19 Mar 2024 20:15:07 +0000 Subject: [PATCH 63/80] Revert "try disabling coverage" This reverts commit b3a4287cce98ea40841efc9e252d630afbc48560. --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index dd433d8c49..a9edafe991 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -105,7 +105,7 @@ jobs: - name: Setup Variables shell: bash run: | - # echo "RUSTFLAGS=-C opt-level=3 -D warnings -C instrument-coverage -C linker=clang -C link-arg=-fuse-ld=$(pwd)/mold/bin/mold" >> $GITHUB_ENV + echo "RUSTFLAGS=-C opt-level=3 -D warnings -C instrument-coverage -C linker=clang -C link-arg=-fuse-ld=$(pwd)/mold/bin/mold" >> $GITHUB_ENV # Disable coverage when building echo "LLVM_PROFILE_FILE=/dev/null" >> $GITHUB_ENV - name: Setup grcov From 1397d9cbf4e2a3f3ea4268852dda3d0246c13e06 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 19 Mar 2024 20:15:58 +0000 Subject: [PATCH 64/80] update mold linker --- .github/workflow-templates/cargo-build/action.yml | 2 +- .github/workflows/build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflow-templates/cargo-build/action.yml b/.github/workflow-templates/cargo-build/action.yml index 339b492665..efcb65a71b 100644 --- a/.github/workflow-templates/cargo-build/action.yml +++ b/.github/workflow-templates/cargo-build/action.yml @@ -27,7 +27,7 @@ runs: shell: bash run: | mkdir -p mold - curl -L --retry 10 --silent --show-error https://github.com/rui314/mold/releases/download/v1.1.1/mold-1.1.1-$(uname -m)-linux.tar.gz | tar -C $(realpath mold) --strip-components=1 -xzf - + curl -L --retry 10 --silent --show-error https://github.com/rui314/mold/releases/download/v2.30.0/mold-2.30.0-$(uname -m)-linux.tar.gz | tar -C $(realpath mold) --strip-components=1 -xzf - # With rustup's nice new toml format, we just need to run rustup show to install the toolchain # https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659 - name: Setup Rust toolchain diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1199a77e5c..89b4263679 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -330,7 +330,7 @@ jobs: shell: bash run: | mkdir -p mold - curl -L --retry 10 --silent --show-error https://github.com/rui314/mold/releases/download/v1.1.1/mold-1.1.1-$(uname -m)-linux.tar.gz | tar -C $(realpath mold) --strip-components=1 -xzf - + curl -L --retry 10 --silent --show-error https://github.com/rui314/mold/releases/download/v2.30.0/mold-2.30.0-$(uname -m)-linux.tar.gz | tar -C $(realpath mold) --strip-components=1 -xzf - # With rustup's nice new toml format, we just need to run rustup show to install the toolchain # https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659 - name: Setup Rust toolchain From d5b049b835df9f79ed18aee482c8280172cec609 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 19 Mar 2024 20:58:15 +0000 Subject: [PATCH 65/80] use default linker --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index a9edafe991..e3d28de9da 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -105,7 +105,7 @@ jobs: - name: Setup Variables shell: bash run: | - echo "RUSTFLAGS=-C opt-level=3 -D warnings -C instrument-coverage -C linker=clang -C link-arg=-fuse-ld=$(pwd)/mold/bin/mold" >> $GITHUB_ENV + echo "RUSTFLAGS=-C opt-level=3 -D warnings -C instrument-coverage" >> $GITHUB_ENV # Disable coverage when building echo "LLVM_PROFILE_FILE=/dev/null" >> $GITHUB_ENV - name: Setup grcov From 9de07031782275f736cc1890a6a15f5dabb7a503 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 19 Mar 2024 21:45:52 +0000 Subject: [PATCH 66/80] Revert "use default linker" This reverts commit d5b049b835df9f79ed18aee482c8280172cec609. --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index e3d28de9da..a9edafe991 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -105,7 +105,7 @@ jobs: - name: Setup Variables shell: bash run: | - echo "RUSTFLAGS=-C opt-level=3 -D warnings -C instrument-coverage" >> $GITHUB_ENV + echo "RUSTFLAGS=-C opt-level=3 -D warnings -C instrument-coverage -C linker=clang -C link-arg=-fuse-ld=$(pwd)/mold/bin/mold" >> $GITHUB_ENV # Disable coverage when building echo "LLVM_PROFILE_FILE=/dev/null" >> $GITHUB_ENV - name: Setup grcov From f5d2287489a177b186571c7d91fd46cc74de08ef Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 19 Mar 2024 21:49:56 +0000 Subject: [PATCH 67/80] fix leaked dependencies --- Cargo.lock | 678 ++++++++++++++++++++++------------------------------- Cargo.toml | 3 + 2 files changed, 278 insertions(+), 403 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7e95b2fbb6..7fb490b76c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,8 +28,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-runtime-interface", + "sp-std", ] [[package]] @@ -2102,8 +2102,8 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", + "sp-storage", "sp-trie", "tracing", ] @@ -2182,7 +2182,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", ] @@ -2208,12 +2208,12 @@ dependencies = [ "polkadot-runtime-parachains", "scale-info", "sp-core", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities", "sp-inherents", "sp-io", "sp-runtime", "sp-state-machine", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-trie", "sp-version", "staging-xcm", @@ -2243,7 +2243,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", ] @@ -2267,7 +2267,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", "staging-xcm-executor", ] @@ -2284,7 +2284,7 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-trie", "staging-xcm", ] @@ -2300,7 +2300,7 @@ dependencies = [ "scale-info", "sp-core", "sp-inherents", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-trie", ] @@ -2309,8 +2309,8 @@ name = "cumulus-primitives-proof-size-hostfunction" version = "0.2.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities", + "sp-runtime-interface", "sp-trie", ] @@ -2323,7 +2323,7 @@ dependencies = [ "futures 0.3.30", "parity-scale-codec", "sp-inherents", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-timestamp", ] @@ -2342,7 +2342,7 @@ dependencies = [ "polkadot-runtime-parachains", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -2461,7 +2461,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-storage", "sp-version", "thiserror", "tokio", @@ -2480,7 +2480,7 @@ dependencies = [ "polkadot-primitives", "sp-runtime", "sp-state-machine", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-trie", ] @@ -3227,7 +3227,7 @@ dependencies = [ "evm-gasometer", "evm-runtime", "parity-scale-codec", - "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-runtime-interface", ] [[package]] @@ -3376,7 +3376,7 @@ dependencies = [ "sp-core", "sp-database", "sp-runtime", - "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-storage", "sqlx", "tokio", ] @@ -3447,12 +3447,12 @@ dependencies = [ "sp-consensus", "sp-consensus-aura", "sp-core", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities", "sp-inherents", "sp-io", "sp-runtime", "sp-state-machine", - "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-storage", "sp-timestamp", "substrate-prometheus-endpoint", "thiserror", @@ -3489,7 +3489,7 @@ dependencies = [ "sp-blockchain", "sp-io", "sp-runtime", - "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-storage", ] [[package]] @@ -3684,8 +3684,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-runtime-interface", + "sp-std", ] [[package]] @@ -3697,7 +3697,7 @@ dependencies = [ "parity-scale-codec", "sp-core", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -3710,7 +3710,7 @@ dependencies = [ "fp-evm", "frame-support", "parity-scale-codec", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -3726,7 +3726,7 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -3743,7 +3743,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -3792,9 +3792,9 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-runtime-interface", + "sp-std", + "sp-storage", "static_assertions", ] @@ -3833,15 +3833,15 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-database", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities", "sp-inherents", "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-storage", "sp-trie", - "sp-wasm-interface 20.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-wasm-interface", "thiserror", "thousands", ] @@ -3871,7 +3871,7 @@ dependencies = [ "sp-core", "sp-npos-elections", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -3888,8 +3888,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", + "sp-tracing", ] [[package]] @@ -3952,7 +3952,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-crypto-hashing-proc-macro", - "sp-debug-derive 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-debug-derive", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -3960,8 +3960,8 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", + "sp-tracing", "sp-weights", "static_assertions", "tt-call", @@ -4023,7 +4023,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-version", "sp-weights", ] @@ -4040,7 +4040,7 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -4061,7 +4061,7 @@ dependencies = [ "parity-scale-codec", "sp-api", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -6301,14 +6301,14 @@ dependencies = [ "sp-block-builder", "sp-consensus-slots", "sp-core", - "sp-debug-derive 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-debug-derive", "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", "sp-runtime", "sp-session", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-timestamp", "sp-transaction-pool", "sp-version", @@ -6372,7 +6372,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-wasm-interface 20.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-wasm-interface", "substrate-build-script-utils", "substrate-prometheus-endpoint", "try-runtime-cli", @@ -6405,7 +6405,7 @@ dependencies = [ "serde", "serde_json", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -6435,7 +6435,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -6462,9 +6462,9 @@ dependencies = [ "ethereum-types", "evm-tracing-events", "parity-scale-codec", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities", + "sp-runtime-interface", + "sp-std", ] [[package]] @@ -6487,7 +6487,7 @@ dependencies = [ "rococo-runtime", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", "westend-runtime", "xcm-primitives 0.1.1", @@ -6585,7 +6585,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -6598,7 +6598,7 @@ dependencies = [ "sp-api", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -6629,7 +6629,7 @@ dependencies = [ "sp-blockchain", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-transaction-pool", "substrate-prometheus-endpoint", "tokio", @@ -6655,7 +6655,7 @@ dependencies = [ "sp-blockchain", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -6789,7 +6789,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-transaction-pool", "sp-version", "sp-weights", @@ -6862,7 +6862,7 @@ dependencies = [ "sp-core", "sp-genesis-builder", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -6988,7 +6988,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-storage", "sp-timestamp", "sp-transaction-pool", "sp-trie", @@ -7038,7 +7038,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -7178,14 +7178,14 @@ dependencies = [ "sp-block-builder", "sp-consensus-slots", "sp-core", - "sp-debug-derive 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-debug-derive", "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", "sp-runtime", "sp-session", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-transaction-pool", "sp-version", "sp-weights", @@ -7534,7 +7534,7 @@ dependencies = [ "sp-application-crypto", "sp-inherents", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -7906,7 +7906,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", ] @@ -7922,7 +7922,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -7934,7 +7934,7 @@ dependencies = [ "orml-traits", "parity-scale-codec", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", "staging-xcm-executor", ] @@ -7955,7 +7955,7 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", "staging-xcm-executor", ] @@ -7975,7 +7975,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -7993,7 +7993,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", "xcm-primitives 0.1.1", ] @@ -8010,7 +8010,7 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8028,7 +8028,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8044,7 +8044,7 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8064,7 +8064,7 @@ dependencies = [ "sp-consensus-slots", "sp-core", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8083,7 +8083,7 @@ dependencies = [ "sp-application-crypto", "sp-inherents", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8101,7 +8101,7 @@ dependencies = [ "serde", "session-keys-primitives", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8119,7 +8119,7 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8135,7 +8135,7 @@ dependencies = [ "sp-application-crypto", "sp-authority-discovery", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8149,7 +8149,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8173,7 +8173,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8194,8 +8194,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", + "sp-tracing", ] [[package]] @@ -8211,7 +8211,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8231,7 +8231,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8256,7 +8256,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8274,7 +8274,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8291,7 +8291,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8310,7 +8310,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8329,7 +8329,7 @@ dependencies = [ "scale-info", "sp-runtime", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8346,7 +8346,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8363,7 +8363,7 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8384,7 +8384,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-trie", ] @@ -8403,7 +8403,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8425,7 +8425,7 @@ dependencies = [ "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "strum 0.24.1", ] @@ -8440,7 +8440,7 @@ dependencies = [ "parity-scale-codec", "sp-npos-elections", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8459,7 +8459,7 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8480,7 +8480,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", "staging-xcm-executor", ] @@ -8506,7 +8506,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8537,7 +8537,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "xcm-primitives 0.1.1", ] @@ -8564,7 +8564,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8602,7 +8602,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8630,7 +8630,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8658,7 +8658,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8705,7 +8705,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8736,7 +8736,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "xcm-primitives 0.1.1", ] @@ -8764,7 +8764,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8796,7 +8796,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8841,7 +8841,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -8872,7 +8872,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8908,7 +8908,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8935,7 +8935,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8963,7 +8963,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -8991,7 +8991,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9020,7 +9020,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9044,7 +9044,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9076,7 +9076,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -9105,7 +9105,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "storage-proof-primitives", ] @@ -9155,7 +9155,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-weights", "staging-xcm", "staging-xcm-builder", @@ -9187,7 +9187,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-weights", "staging-xcm", "staging-xcm-builder", @@ -9221,7 +9221,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-weights", "staging-xcm", "staging-xcm-builder", @@ -9254,7 +9254,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9273,7 +9273,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9296,7 +9296,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9313,7 +9313,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9333,7 +9333,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9350,7 +9350,7 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9365,7 +9365,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "xcm-primitives 0.1.0", ] @@ -9383,7 +9383,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9402,7 +9402,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-weights", ] @@ -9421,7 +9421,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "xcm-primitives 0.1.0", ] @@ -9440,7 +9440,7 @@ dependencies = [ "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9461,7 +9461,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9479,7 +9479,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9495,7 +9495,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9511,7 +9511,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9529,8 +9529,8 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", + "sp-tracing", ] [[package]] @@ -9548,9 +9548,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-runtime-interface", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9561,7 +9561,7 @@ dependencies = [ "pallet-nomination-pools", "parity-scale-codec", "sp-api", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9578,7 +9578,7 @@ dependencies = [ "serde", "sp-runtime", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9602,7 +9602,7 @@ dependencies = [ "scale-info", "sp-runtime", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9623,7 +9623,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "substrate-fixed", ] @@ -9639,7 +9639,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "storage-proof-primitives", ] @@ -9657,7 +9657,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9672,7 +9672,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9690,7 +9690,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9714,7 +9714,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9733,7 +9733,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9748,7 +9748,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9767,7 +9767,7 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9790,7 +9790,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9805,7 +9805,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9822,7 +9822,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-weights", ] @@ -9844,7 +9844,7 @@ dependencies = [ "sp-session", "sp-staking", "sp-state-machine", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-trie", ] @@ -9862,7 +9862,7 @@ dependencies = [ "rand 0.8.5", "sp-runtime", "sp-session", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9880,7 +9880,7 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9903,7 +9903,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9950,7 +9950,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9966,7 +9966,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -9984,8 +9984,8 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", + "sp-storage", "sp-timestamp", ] @@ -10005,7 +10005,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -10021,7 +10021,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -10068,7 +10068,7 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -10084,7 +10084,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -10099,7 +10099,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -10114,7 +10114,7 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -10134,7 +10134,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -10153,7 +10153,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -10178,7 +10178,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -10209,7 +10209,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-parachain-info", "staging-xcm", "staging-xcm-executor", @@ -10657,7 +10657,7 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -11000,7 +11000,7 @@ dependencies = [ "slotmap", "sp-core", "sp-maybe-compressed-blob", - "sp-wasm-interface 20.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-wasm-interface", "tempfile", "thiserror", "tokio", @@ -11043,9 +11043,9 @@ dependencies = [ "seccompiler", "sp-core", "sp-crypto-hashing", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities", "sp-io", - "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-tracing", "thiserror", "tracing-gum", ] @@ -11257,7 +11257,7 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-weights", ] @@ -11285,7 +11285,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -11366,7 +11366,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -11382,8 +11382,8 @@ dependencies = [ "frame-benchmarking", "parity-scale-codec", "polkadot-primitives", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", + "sp-tracing", ] [[package]] @@ -11429,7 +11429,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", "staging-xcm-executor", "static_assertions", @@ -11542,7 +11542,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-storage", "sp-timestamp", "sp-transaction-pool", "sp-version", @@ -11588,43 +11588,6 @@ dependencies = [ "tracing-gum", ] -[[package]] -name = "polkavm-common" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d9428a5cfcc85c5d7b9fc4b6a18c4b802d0173d768182a51cc7751640f08b92" - -[[package]] -name = "polkavm-derive" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8c4bea6f3e11cd89bb18bcdddac10bd9a24015399bd1c485ad68a985a19606" -dependencies = [ - "polkavm-derive-impl-macro", -] - -[[package]] -name = "polkavm-derive-impl" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c4fdfc49717fb9a196e74a5d28e0bc764eb394a2c803eb11133a31ac996c60c" -dependencies = [ - "polkavm-common", - "proc-macro2", - "quote", - "syn 2.0.53", -] - -[[package]] -name = "polkavm-derive-impl-macro" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429" -dependencies = [ - "polkavm-derive-impl", - "syn 2.0.53", -] - [[package]] name = "polling" version = "2.8.0" @@ -11723,7 +11686,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-weights", "staging-xcm", ] @@ -11743,7 +11706,7 @@ dependencies = [ "quote", "sha3", "sp-core", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "syn 1.0.109", "trybuild", ] @@ -11769,7 +11732,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -12567,8 +12530,8 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "staging-xcm", @@ -12827,7 +12790,7 @@ source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbea dependencies = [ "log", "sp-core", - "sp-wasm-interface 20.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-wasm-interface", "thiserror", ] @@ -12972,7 +12935,7 @@ dependencies = [ "sp-panic-handler", "sp-runtime", "sp-state-machine", - "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-storage", "sp-version", "thiserror", "tokio", @@ -12996,11 +12959,11 @@ dependencies = [ "sp-consensus", "sp-core", "sp-database", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities", "sp-runtime", "sp-state-machine", "sp-statement-store", - "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-storage", "sp-trie", "substrate-prometheus-endpoint", ] @@ -13345,13 +13308,13 @@ dependencies = [ "schnellru", "sp-api", "sp-core", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities", "sp-io", "sp-panic-handler", - "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-runtime-interface", "sp-trie", "sp-version", - "sp-wasm-interface 20.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-wasm-interface", "tracing", ] @@ -13363,7 +13326,7 @@ dependencies = [ "parity-scale-codec", "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface 20.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-wasm-interface", "thiserror", "wasm-instrument", ] @@ -13383,8 +13346,8 @@ dependencies = [ "sc-allocator", "sc-executor-common", "sp-core", - "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-wasm-interface 20.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-runtime-interface", + "sp-wasm-interface", "wasmtime", ] @@ -13649,7 +13612,7 @@ dependencies = [ "sc-utils", "sp-api", "sp-core", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities", "sp-keystore", "sp-offchain", "sp-runtime", @@ -13807,12 +13770,12 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities", "sp-keystore", "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-storage", "sp-transaction-pool", "sp-transaction-storage-proof", "sp-trie", @@ -13887,7 +13850,7 @@ dependencies = [ "sp-core", "sp-crypto-hashing", "sp-io", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -13932,7 +13895,7 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-tracing", "thiserror", "tracing", "tracing-log", @@ -13971,7 +13934,7 @@ dependencies = [ "sp-core", "sp-crypto-hashing", "sp-runtime", - "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-tracing", "sp-transaction-pool", "substrate-prometheus-endpoint", "thiserror", @@ -14290,7 +14253,7 @@ dependencies = [ "sp-inherents", "sp-keystore", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -14483,7 +14446,7 @@ dependencies = [ "parity-scale-codec", "paste", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -14679,11 +14642,11 @@ dependencies = [ "scale-info", "sp-api-proc-macro", "sp-core", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities", "sp-metadata-ir", "sp-runtime", "sp-state-machine", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-trie", "sp-version", "thiserror", @@ -14713,7 +14676,7 @@ dependencies = [ "serde", "sp-core", "sp-io", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -14726,7 +14689,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "static_assertions", ] @@ -14758,7 +14721,7 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -14769,7 +14732,7 @@ dependencies = [ "sp-api", "sp-inherents", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -14818,7 +14781,7 @@ dependencies = [ "sp-consensus-slots", "sp-inherents", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-timestamp", ] @@ -14837,7 +14800,7 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-timestamp", ] @@ -14857,7 +14820,7 @@ dependencies = [ "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "strum 0.24.1", ] @@ -14876,7 +14839,7 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -14887,7 +14850,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-timestamp", ] @@ -14924,11 +14887,11 @@ dependencies = [ "secrecy", "serde", "sp-crypto-hashing", - "sp-debug-derive 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", "ss58-registry", "substrate-bip39", "thiserror", @@ -14948,7 +14911,7 @@ dependencies = [ [[package]] name = "sp-crypto-ec-utils" version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1e9fd237768a404e40f1332b217f638dd7e3d917" +source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -14962,7 +14925,8 @@ dependencies = [ "ark-ed-on-bls12-381-bandersnatch", "ark-ed-on-bls12-381-bandersnatch-ext", "ark-scale", - "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-runtime-interface", + "sp-std", ] [[package]] @@ -15007,16 +14971,6 @@ dependencies = [ "syn 2.0.53", ] -[[package]] -name = "sp-debug-derive" -version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1e9fd237768a404e40f1332b217f638dd7e3d917" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.53", -] - [[package]] name = "sp-externalities" version = "0.25.0" @@ -15024,18 +14978,8 @@ source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbea dependencies = [ "environmental", "parity-scale-codec", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", -] - -[[package]] -name = "sp-externalities" -version = "0.25.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1e9fd237768a404e40f1332b217f638dd7e3d917" -dependencies = [ - "environmental", - "parity-scale-codec", - "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std", + "sp-storage", ] [[package]] @@ -15046,7 +14990,7 @@ dependencies = [ "serde_json", "sp-api", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -15059,7 +15003,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "thiserror", ] @@ -15077,12 +15021,12 @@ dependencies = [ "secp256k1", "sp-core", "sp-crypto-hashing", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities", "sp-keystore", - "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-runtime-interface", "sp-state-machine", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", + "sp-tracing", "sp-trie", "tracing", "tracing-core", @@ -15106,7 +15050,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "sp-core", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities", "thiserror", ] @@ -15127,7 +15071,7 @@ dependencies = [ "frame-metadata", "parity-scale-codec", "scale-info", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -15139,7 +15083,7 @@ dependencies = [ "scale-info", "sp-api", "sp-application-crypto", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -15154,9 +15098,9 @@ dependencies = [ "serde", "sp-api", "sp-core", - "sp-debug-derive 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-debug-derive", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "thiserror", ] @@ -15171,7 +15115,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -15224,7 +15168,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-io", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-weights", ] @@ -15237,31 +15181,12 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-runtime-interface-proc-macro 17.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-tracing 16.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-wasm-interface 20.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "static_assertions", -] - -[[package]] -name = "sp-runtime-interface" -version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1e9fd237768a404e40f1332b217f638dd7e3d917" -dependencies = [ - "bytes", - "impl-trait-for-tuples", - "parity-scale-codec", - "polkavm-derive", - "primitive-types", - "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-runtime-interface-proc-macro 17.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", "static_assertions", ] @@ -15278,19 +15203,6 @@ dependencies = [ "syn 2.0.53", ] -[[package]] -name = "sp-runtime-interface-proc-macro" -version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1e9fd237768a404e40f1332b217f638dd7e3d917" -dependencies = [ - "Inflector", - "expander 2.0.0", - "proc-macro-crate 3.1.0", - "proc-macro2", - "quote", - "syn 2.0.53", -] - [[package]] name = "sp-session" version = "27.0.0" @@ -15303,7 +15215,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -15317,7 +15229,7 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -15332,9 +15244,9 @@ dependencies = [ "rand 0.8.5", "smallvec", "sp-core", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities", "sp-panic-handler", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-trie", "thiserror", "tracing", @@ -15358,10 +15270,10 @@ dependencies = [ "sp-application-crypto", "sp-core", "sp-crypto-hashing", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities", "sp-runtime", - "sp-runtime-interface 24.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-runtime-interface", + "sp-std", "thiserror", "x25519-dalek 2.0.0", ] @@ -15371,11 +15283,6 @@ name = "sp-std" version = "14.0.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" -[[package]] -name = "sp-std" -version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1e9fd237768a404e40f1332b217f638dd7e3d917" - [[package]] name = "sp-storage" version = "19.0.0" @@ -15385,20 +15292,8 @@ dependencies = [ "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", -] - -[[package]] -name = "sp-storage" -version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1e9fd237768a404e40f1332b217f638dd7e3d917" -dependencies = [ - "impl-serde 0.4.0", - "parity-scale-codec", - "ref-cast", - "serde", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-debug-derive", + "sp-std", ] [[package]] @@ -15410,7 +15305,7 @@ dependencies = [ "parity-scale-codec", "sp-inherents", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "thiserror", ] @@ -15420,18 +15315,7 @@ version = "16.0.0" source = "git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2#b1a8ee89b52c15f3a8835d49232291b25c74e3f0" dependencies = [ "parity-scale-codec", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "tracing", - "tracing-core", - "tracing-subscriber", -] - -[[package]] -name = "sp-tracing" -version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1e9fd237768a404e40f1332b217f638dd7e3d917" -dependencies = [ - "parity-scale-codec", + "sp-std", "tracing", "tracing-core", "tracing-subscriber", @@ -15457,7 +15341,7 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-trie", ] @@ -15477,8 +15361,8 @@ dependencies = [ "scale-info", "schnellru", "sp-core", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities", + "sp-std", "thiserror", "tracing", "trie-db", @@ -15497,7 +15381,7 @@ dependencies = [ "serde", "sp-crypto-hashing-proc-macro", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-version-proc-macro", "thiserror", ] @@ -15522,19 +15406,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "wasmtime", -] - -[[package]] -name = "sp-wasm-interface" -version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1e9fd237768a404e40f1332b217f638dd7e3d917" -dependencies = [ - "anyhow", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", + "sp-std", "wasmtime", ] @@ -15549,8 +15421,8 @@ dependencies = [ "serde", "smallvec", "sp-arithmetic", - "sp-debug-derive 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-debug-derive", + "sp-std", ] [[package]] @@ -15742,7 +15614,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", ] [[package]] @@ -15779,7 +15651,7 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-weights", "staging-xcm", "staging-xcm-executor", @@ -15801,7 +15673,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-weights", "staging-xcm", ] @@ -15851,7 +15723,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-trie", ] @@ -16069,7 +15941,7 @@ dependencies = [ "sp-consensus-grandpa", "sp-core", "sp-crypto-hashing", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-externalities", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -16078,7 +15950,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-state-machine", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "sp-transaction-pool", "sp-trie", "sp-version", @@ -16839,8 +16711,8 @@ dependencies = [ "sp-consensus-aura", "sp-consensus-babe", "sp-core", - "sp-debug-derive 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-externalities 0.25.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-debug-derive", + "sp-externalities", "sp-inherents", "sp-io", "sp-keystore", @@ -17607,8 +17479,8 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", - "sp-storage 19.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "staging-xcm", @@ -18018,7 +17890,7 @@ dependencies = [ "sha3", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -18047,7 +17919,7 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-runtime-parachains", "sp-io", - "sp-std 14.0.0 (git+https://github.com/moonbeam-foundation/polkadot-sdk?branch=moonbeam-polkadot-v1.7.2)", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", diff --git a/Cargo.toml b/Cargo.toml index 87930c5f0d..4c5bc7b44f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -470,3 +470,6 @@ debug = 1 # debug symbols are useful for profilers debug-assertions = true # Enable debug-assert! for non-production profiles inherits = "release" overflow-checks = true + +[patch."https://github.com/paritytech/polkadot-sdk"] +sp-crypto-ec-utils = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.7.2" } From a850bc8c8f8c1278843b63831a9ecb4b1cd6783d Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Wed, 20 Mar 2024 08:39:04 +0000 Subject: [PATCH 68/80] apply suggestions from reviews --- client/rpc/debug/src/lib.rs | 6 ++++++ client/rpc/trace/src/lib.rs | 3 +++ precompiles/xcm-utils/XcmUtils.sol | 2 +- precompiles/xtokens/Xtokens.sol | 6 +++--- primitives/rpc/debug/src/lib.rs | 2 +- runtime/common/src/apis.rs | 10 ++++++++-- runtime/moonbase/src/xcm_config.rs | 2 +- runtime/moonbeam/src/xcm_config.rs | 2 +- runtime/moonriver/src/xcm_config.rs | 2 +- test/helpers/xcm.ts | 4 ++-- 10 files changed, 27 insertions(+), 12 deletions(-) diff --git a/client/rpc/debug/src/lib.rs b/client/rpc/debug/src/lib.rs index ef92c2ffc9..b5008fe650 100644 --- a/client/rpc/debug/src/lib.rs +++ b/client/rpc/debug/src/lib.rs @@ -383,6 +383,9 @@ where // Initialize block: calls the "on_initialize" hook on every pallet // in AllPalletsWithSystem + // This was fine before pallet-message-queue because the XCM messages + // were processed by the "setValidationData" inherent call and not on an + // "on_initialize" hook, which runs before enabling XCM tracing api.initialize_block(parent_block_hash, &header) .map_err(|e| internal_err(format!("Runtime api access error: {:?}", e)))?; @@ -531,6 +534,9 @@ where } else { // Initialize block: calls the "on_initialize" hook on every pallet // in AllPalletsWithSystem + // This was fine before pallet-message-queue because the XCM messages + // were processed by the "setValidationData" inherent call and not on an + // "on_initialize" hook, which runs before enabling XCM tracing api.initialize_block(parent_block_hash, &header) .map_err(|e| { internal_err(format!("Runtime api access error: {:?}", e)) diff --git a/client/rpc/trace/src/lib.rs b/client/rpc/trace/src/lib.rs index ff92574ce4..b7ccc00ecd 100644 --- a/client/rpc/trace/src/lib.rs +++ b/client/rpc/trace/src/lib.rs @@ -869,6 +869,9 @@ where // Initialize block: calls the "on_initialize" hook on every pallet // in AllPalletsWithSystem + // This was fine before pallet-message-queue because the XCM messages + // were processed by the "setValidationData" inherent call and not on an + // "on_initialize" hook, which runs before enabling XCM tracing api.initialize_block(substrate_parent_hash, &block_header) .map_err(|e| format!("Runtime api access error: {:?}", e))?; diff --git a/precompiles/xcm-utils/XcmUtils.sol b/precompiles/xcm-utils/XcmUtils.sol index a222277939..791525c288 100644 --- a/precompiles/xcm-utils/XcmUtils.sol +++ b/precompiles/xcm-utils/XcmUtils.sol @@ -18,7 +18,7 @@ interface XcmUtils { bytes[] interior; } - /// Get retrieve the account associated to a given Location + /// Get retrieve the account associated to a given MultiLocation /// @custom:selector 343b3e00 /// @param multilocation The multilocation that we want to know to which account maps to /// @return account The account the multilocation maps to in this chain diff --git a/precompiles/xtokens/Xtokens.sol b/precompiles/xtokens/Xtokens.sol index 7aea70e158..50194e20cc 100644 --- a/precompiles/xtokens/Xtokens.sol +++ b/precompiles/xtokens/Xtokens.sol @@ -18,7 +18,7 @@ interface Xtokens { bytes[] interior; } - // A Asset is defined by a multilocation and an amount + // A MultiAsset is defined by a multilocation and an amount struct MultiAsset { Multilocation location; uint256 amount; @@ -63,7 +63,7 @@ interface Xtokens { uint64 weight ) external; - /// Transfer a token through XCM based on its Location + /// Transfer a token through XCM based on its MultiLocation /// /// @dev The token transfer burns/transfers the corresponding amount before sending /// @param asset The asset we want to transfer, defined by its multilocation. @@ -80,7 +80,7 @@ interface Xtokens { uint64 weight ) external; - /// Transfer a token through XCM based on its Location specifying fee + /// Transfer a token through XCM based on its MultiLocation specifying fee /// /// @dev The token transfer burns/transfers the corresponding amount before sending /// @param asset The asset we want to transfer, defined by its multilocation. diff --git a/primitives/rpc/debug/src/lib.rs b/primitives/rpc/debug/src/lib.rs index c5280eba3d..abc4c19314 100644 --- a/primitives/rpc/debug/src/lib.rs +++ b/primitives/rpc/debug/src/lib.rs @@ -22,7 +22,7 @@ use parity_scale_codec::{Decode, Encode}; use sp_std::vec::Vec; sp_api::decl_runtime_apis! { - // Api version is virtually 4. + // Api version is virtually 5. // // We realized that even using runtime overrides, using the ApiExt interface reads the api // versions from the state runtime, meaning we cannot just reset the versioning as we see fit. diff --git a/runtime/common/src/apis.rs b/runtime/common/src/apis.rs index 27d619e3d9..0d74707b8e 100644 --- a/runtime/common/src/apis.rs +++ b/runtime/common/src/apis.rs @@ -130,7 +130,10 @@ macro_rules! impl_runtime_apis_plus_common { ); // Initialize block: calls the "on_initialize" hook on every pallet - // in AllPalletsWithSystem + // in AllPalletsWithSystem. + // After pallet message queue was introduced, this must be done only after + // enabling XCM tracing by setting ETHEREUM_XCM_TRACING_STORAGE_KEY + // in the storage Executive::initialize_block(header); // Apply the a subset of extrinsics: all the substrate-specific or ethereum @@ -186,7 +189,10 @@ macro_rules! impl_runtime_apis_plus_common { config.estimate = true; // Initialize block: calls the "on_initialize" hook on every pallet - // in AllPalletsWithSystem + // in AllPalletsWithSystem. + // After pallet message queue was introduced, this must be done only after + // enabling XCM tracing by setting ETHEREUM_XCM_TRACING_STORAGE_KEY + // in the storage Executive::initialize_block(header); // Apply all extrinsics. Ethereum extrinsics are traced. diff --git a/runtime/moonbase/src/xcm_config.rs b/runtime/moonbase/src/xcm_config.rs index 11e9276411..fd34bd6d8c 100644 --- a/runtime/moonbase/src/xcm_config.rs +++ b/runtime/moonbase/src/xcm_config.rs @@ -425,7 +425,7 @@ impl pallet_message_queue::Config for Runtime { type ServiceWeight = MessageQueueServiceWeight; // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: type QueueChangeHandler = NarrowOriginToSibling; - // NarrowOriginToSibling calls XcmpQueue's is_pause if Origin is sibling. Allows all other origins + // NarrowOriginToSibling calls XcmpQueue's is_paused if Origin is sibling. Allows all other origins type QueuePausedQuery = (MaintenanceMode, NarrowOriginToSibling); type WeightInfo = pallet_message_queue::weights::SubstrateWeight; } diff --git a/runtime/moonbeam/src/xcm_config.rs b/runtime/moonbeam/src/xcm_config.rs index 2e0528997f..6325b3ba87 100644 --- a/runtime/moonbeam/src/xcm_config.rs +++ b/runtime/moonbeam/src/xcm_config.rs @@ -417,7 +417,7 @@ impl pallet_message_queue::Config for Runtime { type ServiceWeight = MessageQueueServiceWeight; // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: type QueueChangeHandler = NarrowOriginToSibling; - // NarrowOriginToSibling calls XcmpQueue's is_pause if Origin is sibling. Allows all other origins + // NarrowOriginToSibling calls XcmpQueue's is_paused if Origin is sibling. Allows all other origins type QueuePausedQuery = (MaintenanceMode, NarrowOriginToSibling); type WeightInfo = pallet_message_queue::weights::SubstrateWeight; } diff --git a/runtime/moonriver/src/xcm_config.rs b/runtime/moonriver/src/xcm_config.rs index 9abf6845f6..1cec5c258b 100644 --- a/runtime/moonriver/src/xcm_config.rs +++ b/runtime/moonriver/src/xcm_config.rs @@ -425,7 +425,7 @@ impl pallet_message_queue::Config for Runtime { type ServiceWeight = MessageQueueServiceWeight; // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: type QueueChangeHandler = NarrowOriginToSibling; - // NarrowOriginToSibling calls XcmpQueue's is_pause if Origin is sibling. Allows all other origins + // NarrowOriginToSibling calls XcmpQueue's is_paused if Origin is sibling. Allows all other origins type QueuePausedQuery = (MaintenanceMode, NarrowOriginToSibling); type WeightInfo = pallet_message_queue::weights::SubstrateWeight; } diff --git a/test/helpers/xcm.ts b/test/helpers/xcm.ts index c509b36d49..994dfdaf7c 100644 --- a/test/helpers/xcm.ts +++ b/test/helpers/xcm.ts @@ -185,7 +185,7 @@ export async function injectEncodedHrmpMessageAndSeal( ) { // Send RPC call to inject XCM message await customDevRpcRequest("xcm_injectHrmpMessage", [paraId, message]); - // Create a block in which the XCM will be executed + // Create a block in which the XCM will be enqueued await context.createBlock(); // The next block will process the hrmp message in the message queue return context.createBlock(); @@ -214,7 +214,7 @@ export async function injectHrmpMessageAndSeal( message?: RawXcmMessage ) { await injectHrmpMessage(context, paraId, message); - // Create a block in which the XCM will be executed + // Create a block in which the XCM will be enqueued await context.createBlock(); // The next block will process the hrmp message in the message queue await context.createBlock(); From e389a709853913f20201e3fe213475a6e6f9352e Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Wed, 20 Mar 2024 08:48:20 +0000 Subject: [PATCH 69/80] Revert "Revert "use default linker"" This reverts commit 9de07031782275f736cc1890a6a15f5dabb7a503. --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index a9edafe991..e3d28de9da 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -105,7 +105,7 @@ jobs: - name: Setup Variables shell: bash run: | - echo "RUSTFLAGS=-C opt-level=3 -D warnings -C instrument-coverage -C linker=clang -C link-arg=-fuse-ld=$(pwd)/mold/bin/mold" >> $GITHUB_ENV + echo "RUSTFLAGS=-C opt-level=3 -D warnings -C instrument-coverage" >> $GITHUB_ENV # Disable coverage when building echo "LLVM_PROFILE_FILE=/dev/null" >> $GITHUB_ENV - name: Setup grcov From 4301affbc9269b727493846de8902273fe3a6178 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Wed, 20 Mar 2024 08:53:28 +0000 Subject: [PATCH 70/80] Revert "Revert "Revert "use default linker""" This reverts commit e389a709853913f20201e3fe213475a6e6f9352e. --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index e3d28de9da..a9edafe991 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -105,7 +105,7 @@ jobs: - name: Setup Variables shell: bash run: | - echo "RUSTFLAGS=-C opt-level=3 -D warnings -C instrument-coverage" >> $GITHUB_ENV + echo "RUSTFLAGS=-C opt-level=3 -D warnings -C instrument-coverage -C linker=clang -C link-arg=-fuse-ld=$(pwd)/mold/bin/mold" >> $GITHUB_ENV # Disable coverage when building echo "LLVM_PROFILE_FILE=/dev/null" >> $GITHUB_ENV - name: Setup grcov From c7c7a37f9f1875fd24665c401feca902f8411b2d Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Wed, 20 Mar 2024 09:14:42 +0000 Subject: [PATCH 71/80] increase timeout for coverage job --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index a9edafe991..d41ac3ac6a 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -91,7 +91,7 @@ jobs: labels: bare-metal needs: ["set-tags"] if: ${{ !github.event.pull_request.head.repo.fork }} - timeout-minutes: 60 + timeout-minutes: 240 env: RUSTC_WRAPPER: "sccache" CARGO_INCREMENTAL: "0" From e93eb9fc8e49ddd9d71193eab85ca9033d2f60fd Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 21 Mar 2024 17:35:02 +0000 Subject: [PATCH 72/80] use pre-generated chain spec in dev-tests (avoid compiling wasm on every startup) --- test/moonwall.config.json | 6 ++--- test/scripts/compile-wasm.ts | 46 +++++++++++++++++++++++++++++++++--- 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/test/moonwall.config.json b/test/moonwall.config.json index bb4cf9874c..fd0e9254d9 100644 --- a/test/moonwall.config.json +++ b/test/moonwall.config.json @@ -379,7 +379,7 @@ "--force-authoring", "--rpc-cors=all", "--alice", - "--chain=moonbeam-dev", + "--chain=tmp/moonbeam-dev-raw.json", "--sealing=manual", "--tmp" ] @@ -421,7 +421,7 @@ "--force-authoring", "--rpc-cors=all", "--alice", - "--chain=moonbase-dev", + "--chain=tmp/moonbase-dev-raw.json", "--sealing=manual", "--tmp" ] @@ -459,7 +459,7 @@ "--force-authoring", "--rpc-cors=all", "--alice", - "--chain=moonbase-dev", + "--chain=tmp/moonbase-dev-raw.json", "--sealing=manual", "--tmp", "--wasm-runtime-overrides=moonbase-overrides", diff --git a/test/scripts/compile-wasm.ts b/test/scripts/compile-wasm.ts index 788002df98..bd6734eb9e 100644 --- a/test/scripts/compile-wasm.ts +++ b/test/scripts/compile-wasm.ts @@ -38,6 +38,34 @@ yargs(hideBin(process.argv)) }) .parse(); +async function spawn(cmd: string) { + return new Promise((resolve, reject) => { + var spawned = child_process.spawn(cmd, { shell: true }); + + let errData = ""; + let outData = ""; + spawned.stdout.on("data", (chunk) => { + outData += chunk.toString(); + }); + + spawned.stderr.on("data", (chunk) => { + errData += chunk.toString(); + }); + + spawned.on("close", function (code) { + if (code && code > 0) { + return reject(new Error(errData)); + } + + resolve(outData); + }); + + spawned.on("error", function (err) { + reject(err); + }); + }); +} + async function main(args: any) { const outputDirectory = path.join(process.cwd(), args.argv.OutputDirectory); const binaryPath = args.argv.Binary; @@ -50,12 +78,24 @@ async function main(args: any) { await fs.mkdir("tmp", { recursive: true }); const tmpDir = await fs.mkdtemp("tmp/base-path"); try { + // Generate plain chain spec + const generateChainSpecCmd = `${binaryPath} build-spec --chain ${args.argv.Chain} > tmp/${args.argv.Chain}.json`; + console.log(`🗃️ ${generateChainSpecCmd}`); + await spawn(generateChainSpecCmd); + + // Generate raw chain spec + const generateRawChainSpecCmd = + `${binaryPath} build-spec --chain tmp/${args.argv.Chain}.json ` + + `--raw > tmp/${args.argv.Chain}-raw.json`; + console.log(`🗃️ ${generateRawChainSpecCmd}`); + await spawn(generateRawChainSpecCmd); + + // Generate precompiled wasm const command = `${binaryPath} precompile-wasm --log=wasmtime-runtime --base-path=${tmpDir} ` + - `--chain ${args.argv.Chain} ${outputDirectory}`; + `--chain tmp/${args.argv.Chain}-raw.json ${outputDirectory}`; console.log(`🗃️ ${command}`); - - child_process.execSync(`${command}`); + await spawn(command); } finally { if ((await fs.stat(tmpDir)).isDirectory()) { await fs.rm(tmpDir, { recursive: true, force: true }); From 83c5ca2b0e1ddc6b16fe8525c9388be50dd674ad Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 21 Mar 2024 17:44:49 +0000 Subject: [PATCH 73/80] fix line lint --- test/scripts/compile-wasm.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/scripts/compile-wasm.ts b/test/scripts/compile-wasm.ts index bd6734eb9e..15eb83998b 100644 --- a/test/scripts/compile-wasm.ts +++ b/test/scripts/compile-wasm.ts @@ -79,7 +79,8 @@ async function main(args: any) { const tmpDir = await fs.mkdtemp("tmp/base-path"); try { // Generate plain chain spec - const generateChainSpecCmd = `${binaryPath} build-spec --chain ${args.argv.Chain} > tmp/${args.argv.Chain}.json`; + const generateChainSpecCmd = + `${binaryPath} build-spec` + `--chain ${args.argv.Chain} > tmp/${args.argv.Chain}.json`; console.log(`🗃️ ${generateChainSpecCmd}`); await spawn(generateChainSpecCmd); From fde57bb2c5e76e9d8f6cf06f64e8666af3b78bc9 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Thu, 21 Mar 2024 18:18:45 +0000 Subject: [PATCH 74/80] fix tests --- runtime/common/src/apis.rs | 1 + test/scripts/compile-wasm.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/common/src/apis.rs b/runtime/common/src/apis.rs index c4b25eaa05..eef538c2b0 100644 --- a/runtime/common/src/apis.rs +++ b/runtime/common/src/apis.rs @@ -27,6 +27,7 @@ macro_rules! impl_runtime_apis_plus_common { // to replay only on_idle, so we need to copy here some code inside frame executive. fn replay_on_idle() { use frame_system::pallet_prelude::BlockNumberFor; + use frame_support::traits::OnIdle; let weight = >::block_weight(); let max_weight = < diff --git a/test/scripts/compile-wasm.ts b/test/scripts/compile-wasm.ts index 15eb83998b..5091123d60 100644 --- a/test/scripts/compile-wasm.ts +++ b/test/scripts/compile-wasm.ts @@ -80,7 +80,7 @@ async function main(args: any) { try { // Generate plain chain spec const generateChainSpecCmd = - `${binaryPath} build-spec` + `--chain ${args.argv.Chain} > tmp/${args.argv.Chain}.json`; + `${binaryPath} build-spec` + ` --chain ${args.argv.Chain} > tmp/${args.argv.Chain}.json`; console.log(`🗃️ ${generateChainSpecCmd}`); await spawn(generateChainSpecCmd); From 918aab57ec0629721f6eff1cf1dc446bdc3794dc Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Fri, 22 Mar 2024 09:02:35 +0000 Subject: [PATCH 75/80] Revert "increase timeout for coverage job" This reverts commit c7c7a37f9f1875fd24665c401feca902f8411b2d. --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 5d5873f3de..7e72ece033 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -91,7 +91,7 @@ jobs: labels: bare-metal needs: ["set-tags"] if: ${{ !github.event.pull_request.head.repo.fork }} - timeout-minutes: 240 + timeout-minutes: 60 env: RUSTC_WRAPPER: "sccache" CARGO_INCREMENTAL: "0" From fccb45f24b2cb9a279f60a34f275b4f448258c3d Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Fri, 22 Mar 2024 09:16:47 +0000 Subject: [PATCH 76/80] add HostFunctions to ChainSpec --- node/service/src/chain_spec/moonbase.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node/service/src/chain_spec/moonbase.rs b/node/service/src/chain_spec/moonbase.rs index e94b6f4d1d..4a4e86b537 100644 --- a/node/service/src/chain_spec/moonbase.rs +++ b/node/service/src/chain_spec/moonbase.rs @@ -41,7 +41,8 @@ use sp_core::ecdsa; use sp_runtime::{traits::One, Perbill, Percent}; /// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type. -pub type ChainSpec = sc_service::GenericChainSpec; +pub type ChainSpec = + sc_service::GenericChainSpec; /// Generate a chain spec for use with the development service. pub fn development_chain_spec(mnemonic: Option, num_accounts: Option) -> ChainSpec { From 4936313f99bcddb78fa3ae6feda6b62017054c4b Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Fri, 22 Mar 2024 11:01:53 +0000 Subject: [PATCH 77/80] add common migration MigrateToLatestXcmVersion --- runtime/common/src/migrations.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/runtime/common/src/migrations.rs b/runtime/common/src/migrations.rs index ac998603bf..a9b4c4197d 100644 --- a/runtime/common/src/migrations.rs +++ b/runtime/common/src/migrations.rs @@ -106,6 +106,30 @@ where } } +pub struct MigrateToLatestXcmVersion(PhantomData); +impl Migration for MigrateToLatestXcmVersion +where + pallet_xcm::migration::MigrateToLatestXcmVersion: OnRuntimeUpgrade, +{ + fn friendly_name(&self) -> &str { + "MM_MigrateToLatestXcmVersion" + } + + fn migrate(&self, _available_weight: Weight) -> Weight { + pallet_xcm::migration::MigrateToLatestXcmVersion::::on_runtime_upgrade() + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade(&self) -> Result, sp_runtime::DispatchError> { + pallet_xcm::migration::MigrateToLatestXcmVersion::::pre_upgrade() + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(&self, _state: Vec) -> Result<(), sp_runtime::DispatchError> { + pallet_xcm::migration::MigrateToLatestXcmVersion::::post_upgrade() + } +} + pub struct CommonMigrations(PhantomData); impl GetMigrations for CommonMigrations @@ -120,6 +144,7 @@ where Runtime: pallet_moonbeam_orbiters::Config, Runtime: pallet_balances::Config, Runtime: pallet_referenda::Config, + Runtime: pallet_xcm::Config, Runtime::AccountId: Default, BlockNumberFor: Into, { @@ -259,6 +284,8 @@ where // Box::new(pallet_collective_drop_gov_v1_collectives), // completed in runtime 2900 Box::new(remove_pallet_democracy), + // permanent migrations + Box::new(MigrateToLatestXcmVersion::(Default::default())), ] } } From d97ffc8f6990ce9fa1941fbe9188c3fbbb1b20a1 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Fri, 22 Mar 2024 13:29:09 +0000 Subject: [PATCH 78/80] fix migration --- runtime/common/src/migrations.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/common/src/migrations.rs b/runtime/common/src/migrations.rs index a9b4c4197d..46cc6a4b28 100644 --- a/runtime/common/src/migrations.rs +++ b/runtime/common/src/migrations.rs @@ -125,8 +125,8 @@ where } #[cfg(feature = "try-runtime")] - fn post_upgrade(&self, _state: Vec) -> Result<(), sp_runtime::DispatchError> { - pallet_xcm::migration::MigrateToLatestXcmVersion::::post_upgrade() + fn post_upgrade(&self, state: Vec) -> Result<(), sp_runtime::DispatchError> { + pallet_xcm::migration::MigrateToLatestXcmVersion::::post_upgrade(state) } } From a04afbabe1ef04881c92949f81e005fb94babc69 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Fri, 22 Mar 2024 14:00:00 +0000 Subject: [PATCH 79/80] add runtime-2900 feature to moonbeam-rpc-primitives-debug --- Cargo.toml | 4 +++- primitives/rpc/debug/Cargo.toml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 4c5bc7b44f..49701f69dc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,7 +58,9 @@ account = { path = "primitives/account", default-features = false } evm-tracing-events = { path = "primitives/rpc/evm-tracing-events", default-features = false } moonbeam-core-primitives = { path = "core-primitives", default-features = false } moonbeam-primitives-ext = { path = "primitives/ext", default-features = false } -moonbeam-rpc-primitives-debug = { path = "primitives/rpc/debug", default-features = false } +moonbeam-rpc-primitives-debug = { path = "primitives/rpc/debug", default-features = false, features = [ + "runtime-2900", +] } moonbeam-rpc-primitives-txpool = { path = "primitives/rpc/txpool", default-features = false } storage-proof-primitives = { path = "primitives/storage-proof", default-features = false } diff --git a/primitives/rpc/debug/Cargo.toml b/primitives/rpc/debug/Cargo.toml index a7f36de138..4c27999b32 100644 --- a/primitives/rpc/debug/Cargo.toml +++ b/primitives/rpc/debug/Cargo.toml @@ -37,3 +37,4 @@ std = [ "sp-runtime/std", "sp-std/std", ] +runtime-2900 = [] From 3b40b35c5289714aeaa6adfaeeb0caa47ef99b02 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Mon, 25 Mar 2024 10:58:49 +0000 Subject: [PATCH 80/80] update benchmarks --- runtime/common/src/weights/pallet_xcm.rs | 36 ++++++++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/runtime/common/src/weights/pallet_xcm.rs b/runtime/common/src/weights/pallet_xcm.rs index a555ca1b1c..80d9f5f9c8 100644 --- a/runtime/common/src/weights/pallet_xcm.rs +++ b/runtime/common/src/weights/pallet_xcm.rs @@ -279,16 +279,40 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } - + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn transfer_assets() -> Weight { - todo!() + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - + /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) + /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::Queries` (r:0 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn new_query() -> Weight { - todo!() + // Proof Size summary in bytes: + // Measured: `69` + // Estimated: `1554` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(0, 1554)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - + /// Storage: `PolkadotXcm::Queries` (r:1 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn take_response() -> Weight { - todo!() + // Proof Size summary in bytes: + // Measured: `7706` + // Estimated: `11171` + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(31_000_000, 0) + .saturating_add(Weight::from_parts(0, 11171)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } }