From c1cec9511e17a38e13a179be80c19c249ac94ca3 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 9 Jan 2024 12:18:28 +0100 Subject: [PATCH 001/316] Upgrade to latest: `cargo upgrade -v --pinned --incompatible` --- Cargo.lock | 10319 ++++++++++------ .../assets/asset-hub-kusama/Cargo.toml | 28 +- .../assets/asset-hub-polkadot/Cargo.toml | 28 +- integration-tests/emulated/common/Cargo.toml | 62 +- relay/kusama/Cargo.toml | 206 +- relay/kusama/constants/Cargo.toml | 16 +- relay/polkadot/Cargo.toml | 198 +- relay/polkadot/constants/Cargo.toml | 16 +- .../asset-hubs/asset-hub-kusama/Cargo.toml | 134 +- .../asset-hub-kusama/primitives/Cargo.toml | 12 +- .../asset-hubs/asset-hub-polkadot/Cargo.toml | 126 +- .../asset-hub-polkadot/primitives/Cargo.toml | 12 +- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 140 +- .../bridge-hub-kusama/primitives/Cargo.toml | 14 +- .../bridge-hub-polkadot/Cargo.toml | 140 +- .../bridge-hub-polkadot/primitives/Cargo.toml | 14 +- .../collectives-polkadot/Cargo.toml | 126 +- system-parachains/constants/Cargo.toml | 12 +- .../gluttons/glutton-kusama/Cargo.toml | 64 +- 19 files changed, 6927 insertions(+), 4740 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 794b45dc8a..e32f6a0447 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,7 +27,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]] @@ -36,25 +36,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" @@ -65,29 +46,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[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" @@ -101,80 +59,47 @@ dependencies = [ [[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.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" +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]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.12", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ "cfg-if", - "getrandom 0.2.10", + "getrandom 0.2.12", "once_cell", "version_check", + "zerocopy", ] [[package]] name = "aho-corasick" -version = "1.0.4" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -225,26 +150,26 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +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]] @@ -259,9 +184,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "approx" @@ -286,12 +211,6 @@ dependencies = [ "syn 1.0.109", ] -[[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" @@ -429,9 +348,9 @@ checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" [[package]] name = "array-bytes" -version = "6.1.0" +version = "6.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b1c5a481ec30a5abd8dfbd94ab5cf1bb4e9a66be7f1b3b322f2f1170c200fd" +checksum = "6f840fb7195bcfc5e17ea40c26e5ce6d5b9ce5d584466e17703209657e459ae0" [[package]] name = "arrayref" @@ -451,48 +370,20 @@ 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 0.3.27", -] - [[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", "num-traits", "rusticata-macros", "thiserror", - "time 0.3.27", -] - -[[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", + "time", ] [[package]] @@ -530,20 +421,20 @@ version = "1.0.0" dependencies = [ "assert_matches", "asset-hub-kusama-runtime", - "frame-support", - "frame-system", + "frame-support 27.0.0", + "frame-system 27.0.0", "integration-tests-common", "pallet-asset-conversion", - "pallet-assets", - "pallet-balances", - "pallet-xcm", - "parachains-common", - "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime-parachains", - "sp-runtime", - "staging-xcm", + "pallet-assets 28.0.0", + "pallet-balances 27.0.0", + "pallet-xcm 6.0.0", + "parachains-common 6.0.0", + "parity-scale-codec", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", + "polkadot-runtime-parachains 6.0.0", + "sp-runtime 30.0.1", + "staging-xcm 6.0.0", "xcm-emulator", ] @@ -557,76 +448,76 @@ dependencies = [ "bp-asset-hub-polkadot", "bp-bridge-hub-kusama", "bp-bridge-hub-polkadot", - "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", + "cumulus-pallet-aura-ext 0.6.0", + "cumulus-pallet-dmp-queue 0.6.0", + "cumulus-pallet-parachain-system 0.6.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-utility", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "cumulus-pallet-xcm 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-utility 0.6.0", + "frame-benchmarking 27.0.0", + "frame-executive 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-system-benchmarking 27.0.0", + "frame-system-rpc-runtime-api 25.0.0", + "frame-try-runtime 0.33.0", "hex-literal", "kusama-runtime-constants", "log", "pallet-asset-conversion", "pallet-asset-conversion-tx-payment", - "pallet-assets", - "pallet-aura", - "pallet-authorship", - "pallet-balances", - "pallet-collator-selection", + "pallet-assets 28.0.0", + "pallet-aura 26.0.0", + "pallet-authorship 27.0.0", + "pallet-balances 27.0.0", + "pallet-collator-selection 8.0.0", "pallet-multisig", "pallet-nft-fractionalization", "pallet-nfts", "pallet-nfts-runtime-api", - "pallet-proxy", - "pallet-session", + "pallet-proxy 27.0.0", + "pallet-session 27.0.0", "pallet-state-trie-migration", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", + "pallet-timestamp 26.0.0", + "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment-rpc-runtime-api 27.0.0", "pallet-uniques", - "pallet-utility", - "pallet-xcm", - "pallet-xcm-benchmarks", + "pallet-utility 27.0.0", + "pallet-xcm 6.0.0", + "pallet-xcm-benchmarks 6.0.0", "pallet-xcm-bridge-hub-router", - "parachains-common", + "parachains-common 6.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime-common", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", + "polkadot-runtime-common 6.0.0", "polkadot-runtime-constants", "primitive-types", "scale-info", "smallvec", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "sp-weights", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", + "sp-api 25.0.0", + "sp-block-builder 25.0.0", + "sp-consensus-aura 0.31.0", + "sp-core 27.0.0", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-offchain 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-transaction-pool 25.0.0", + "sp-version 28.0.0", + "sp-weights 26.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", + "staging-xcm-executor 6.0.0", + "substrate-wasm-builder 16.0.0", "system-parachains-constants", ] @@ -634,20 +525,20 @@ dependencies = [ name = "asset-hub-polkadot-integration-tests" version = "1.0.0" dependencies = [ - "frame-support", - "frame-system", + "frame-support 27.0.0", + "frame-system 27.0.0", "integration-tests-common", "pallet-asset-conversion", - "pallet-assets", - "pallet-balances", - "pallet-xcm", - "parachains-common", - "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime-parachains", - "sp-runtime", - "staging-xcm", + "pallet-assets 28.0.0", + "pallet-balances 27.0.0", + "pallet-xcm 6.0.0", + "parachains-common 6.0.0", + "parity-scale-codec", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", + "polkadot-runtime-parachains 6.0.0", + "sp-runtime 30.0.1", + "staging-xcm 6.0.0", "xcm-emulator", ] @@ -661,135 +552,134 @@ dependencies = [ "bp-asset-hub-polkadot", "bp-bridge-hub-kusama", "bp-bridge-hub-polkadot", - "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", + "cumulus-pallet-aura-ext 0.6.0", + "cumulus-pallet-dmp-queue 0.6.0", + "cumulus-pallet-parachain-system 0.6.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-utility", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "cumulus-pallet-xcm 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-utility 0.6.0", + "frame-benchmarking 27.0.0", + "frame-executive 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-system-benchmarking 27.0.0", + "frame-system-rpc-runtime-api 25.0.0", + "frame-try-runtime 0.33.0", "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-tx-payment", - "pallet-assets", - "pallet-aura", - "pallet-authorship", - "pallet-balances", - "pallet-collator-selection", + "pallet-asset-tx-payment 27.0.0", + "pallet-assets 28.0.0", + "pallet-aura 26.0.0", + "pallet-authorship 27.0.0", + "pallet-balances 27.0.0", + "pallet-collator-selection 8.0.0", "pallet-multisig", "pallet-nfts", "pallet-nfts-runtime-api", - "pallet-proxy", - "pallet-session", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", + "pallet-proxy 27.0.0", + "pallet-session 27.0.0", + "pallet-timestamp 26.0.0", + "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment-rpc-runtime-api 27.0.0", "pallet-uniques", - "pallet-utility", - "pallet-xcm", - "pallet-xcm-benchmarks", + "pallet-utility 27.0.0", + "pallet-xcm 6.0.0", + "pallet-xcm-benchmarks 6.0.0", "pallet-xcm-bridge-hub-router", - "parachains-common", + "parachains-common 6.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime-common", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", + "polkadot-runtime-common 6.0.0", "polkadot-runtime-constants", "scale-info", "smallvec", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "sp-weights", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", + "sp-api 25.0.0", + "sp-block-builder 25.0.0", + "sp-consensus-aura 0.31.0", + "sp-core 27.0.0", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-offchain 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-transaction-pool 25.0.0", + "sp-version 28.0.0", + "sp-weights 26.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", + "staging-xcm-executor 6.0.0", + "substrate-wasm-builder 16.0.0", "system-parachains-constants", ] [[package]] name = "asset-test-utils" -version = "4.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de674aa0b8f0c31a00fd99a4003751c788c7023ed62527097a1286dd530fbe60" +checksum = "2e667143b26882e0f67cf028814d46f92671655085e47604cc0e0b62579fee24" dependencies = [ "assets-common", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", - "cumulus-test-relay-sproof-builder", - "frame-support", - "frame-system", - "pallet-assets", - "pallet-balances", - "pallet-collator-selection", - "pallet-session", - "pallet-xcm", + "cumulus-pallet-parachain-system 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-parachain-inherent 0.6.0", + "cumulus-test-relay-sproof-builder 0.6.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "pallet-assets 28.0.0", + "pallet-balances 27.0.0", + "pallet-collator-selection 8.0.0", + "pallet-session 27.0.0", + "pallet-xcm 6.0.0", "pallet-xcm-bridge-hub-router", - "parachains-common", + "parachains-common 6.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-parachain-primitives", - "sp-consensus-aura", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", + "polkadot-parachain-primitives 5.0.0", + "sp-consensus-aura 0.31.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", + "staging-xcm-executor 6.0.0", + "substrate-wasm-builder 16.0.0", ] [[package]] name = "assets-common" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b8aa1c485e12af4a0a2b48402fa85d382ab4962731e71f5edc0f85c4cba28c" +checksum = "c3eefe3c913d16da32e39ad87edcbe7c6d94c34a33b7fdc08763247d69b516b5" dependencies = [ - "cumulus-primitives-core", - "frame-support", + "cumulus-primitives-core 0.6.0", + "frame-support 27.0.0", "impl-trait-for-tuples", "log", "pallet-asset-conversion", - "pallet-asset-tx-payment", - "pallet-xcm", - "parachains-common", + "pallet-asset-tx-payment 27.0.0", + "pallet-xcm 6.0.0", + "parachains-common 6.0.0", "parity-scale-codec", "scale-info", - "sp-api", - "sp-runtime", - "sp-std", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", + "sp-api 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", + "staging-xcm-executor 6.0.0", + "substrate-wasm-builder 16.0.0", ] [[package]] @@ -799,28 +689,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener 2.5.3", "futures-core", ] [[package]] name = "async-io" -version = "1.13.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +checksum = "d6d3b15875ba253d1110c740755e246537483f152fa334f91abd7fe84c88b3ff" dependencies = [ - "async-lock", - "autocfg", + "async-lock 3.2.0", "cfg-if", "concurrent-queue", + "futures-io", "futures-lite", - "log", "parking", "polling", - "rustix 0.37.23", + "rustix 0.38.28", "slab", - "socket2 0.4.9", - "waker-fn", + "tracing", + "windows-sys 0.52.0", ] [[package]] @@ -829,14 +718,25 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ - "event-listener", + "event-listener 2.5.3", +] + +[[package]] +name = "async-lock" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" +dependencies = [ + "event-listener 4.0.0", + "event-listener-strategy", + "pin-project-lite 0.2.13", ] [[package]] name = "async-trait" -version = "0.1.73" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", @@ -853,15 +753,9 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", ] -[[package]] -name = "atomic-waker" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" - [[package]] name = "atty" version = "0.2.14" @@ -890,7 +784,7 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", - "object 0.32.0", + "object 0.32.2", "rustc-demangle", ] @@ -900,12 +794,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" @@ -920,9 +808,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "c79fed4cdb43e993fcdadc7e58a09fd0e3e649c4436fa11da71c9f1f3ee7feb9" [[package]] name = "base64ct" @@ -941,9 +829,9 @@ dependencies = [ [[package]] name = "binary-merkle-tree" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a399848a68a5196a04c19db5bfc4dca3cd0989a3165150f06c1ad1bc8882aa34" +checksum = "6c2839a4cb8e9e2c1f2cadb92de7a151c68de424a2e6433ced90e4d67c2ace0b" dependencies = [ "hash-db", "log", @@ -970,7 +858,7 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "prettyplease 0.2.12", + "prettyplease 0.2.15", "proc-macro2", "quote", "regex", @@ -979,6 +867,25 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "bip39" +version = "2.0.0" +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]] +name = "bitcoin_hashes" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" + [[package]] name = "bitflags" version = "1.3.2" @@ -987,9 +894,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "bitvec" @@ -999,6 +906,7 @@ checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ "funty", "radium", + "serde", "tap", "wyz", ] @@ -1026,38 +934,37 @@ dependencies = [ [[package]] name = "blake2b_simd" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq 0.2.6", + "constant_time_eq", ] [[package]] name = "blake2s_simd" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6637f448b9e61dfadbdcbae9a885fadee1f3eaffb1f8d3c1965d3ade8bdfd44f" +checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq 0.2.6", + "constant_time_eq", ] [[package]] name = "blake3" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" dependencies = [ "arrayref", "arrayvec 0.7.4", "cc", "cfg-if", - "constant_time_eq 0.3.0", - "digest 0.10.7", + "constant_time_eq", ] [[package]] @@ -1066,7 +973,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "block-padding 0.1.5", + "block-padding", "byte-tools", "byteorder", "generic-array 0.12.4", @@ -1090,16 +997,6 @@ 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" @@ -1109,17 +1006,11 @@ 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 = "bounded-collections" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b05133427c07c4776906f673ccf36c21b102c9829c641a5b56bd151d44fd6" +checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd" dependencies = [ "log", "parity-scale-codec", @@ -1140,40 +1031,40 @@ dependencies = [ name = "bp-asset-hub-kusama" version = "1.0.0" dependencies = [ - "bp-xcm-bridge-hub-router", - "frame-support", + "bp-xcm-bridge-hub-router 0.5.0", + "frame-support 27.0.0", "parity-scale-codec", "scale-info", - "sp-std", - "staging-xcm", + "sp-std 13.0.0", + "staging-xcm 6.0.0", ] [[package]] name = "bp-asset-hub-polkadot" version = "1.0.0" dependencies = [ - "bp-xcm-bridge-hub-router", - "frame-support", + "bp-xcm-bridge-hub-router 0.5.0", + "frame-support 27.0.0", "parity-scale-codec", "scale-info", - "sp-std", - "staging-xcm", + "sp-std 13.0.0", + "staging-xcm 6.0.0", ] [[package]] name = "bp-bridge-hub-cumulus" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b18aaf9ed9ecffade4d56bb1a63cd70b9e61ea4ef69023f2dcd0fd54d18f280" +checksum = "4d76abad1eafb53d1377365c3004456bb61abb5795d06498323770c5647290a2" dependencies = [ "bp-messages", "bp-polkadot-core", "bp-runtime", - "frame-support", - "frame-system", - "polkadot-primitives", - "sp-api", - "sp-std", + "frame-support 27.0.0", + "frame-system 27.0.0", + "polkadot-primitives 6.0.0", + "sp-api 25.0.0", + "sp-std 13.0.0", ] [[package]] @@ -1183,12 +1074,12 @@ dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", "bp-runtime", - "frame-support", + "frame-support 27.0.0", "kusama-runtime-constants", "polkadot-runtime-constants", - "sp-api", - "sp-runtime", - "sp-std", + "sp-api 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -1198,166 +1089,136 @@ dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", "bp-runtime", - "frame-support", + "frame-support 27.0.0", "kusama-runtime-constants", "polkadot-runtime-constants", - "sp-api", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "bp-bridge-hub-rococo" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcb3425030c446f51c0d9bc71605b42dc96acff94b2feff51cd09a5e58dc0dd" -dependencies = [ - "bp-bridge-hub-cumulus", - "bp-messages", - "bp-runtime", - "frame-support", - "sp-api", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "bp-bridge-hub-wococo" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ecd2e53fcb7b489a544e27474839586b662bd0c5eea0a9bd21d5eaeae8e6b0b" -dependencies = [ - "bp-bridge-hub-cumulus", - "bp-messages", - "bp-runtime", - "frame-support", - "sp-api", - "sp-runtime", - "sp-std", + "sp-api 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "bp-header-chain" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb057324305f7cacce9d87a82d0e6e8de8ec2ff40fd2df707f97f74ddd0631f9" +checksum = "a0135eafdf5d8ee896e875c7f403417b7e8c1a60794daa03ea8d4614ad11bc2e" dependencies = [ "bp-runtime", "finality-grandpa", - "frame-support", + "frame-support 27.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-consensus-grandpa", - "sp-core", - "sp-runtime", - "sp-std", + "sp-consensus-grandpa 12.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "bp-kusama" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d69f61df356df3dbedf2dfbfec65ce673ff80121ad7eb319b84a093ebc24aaf9" +checksum = "f8c318068ab7f4d07cf122d4227a7951be7007b70029f160885b86527d3c1d64" dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", - "frame-support", - "sp-api", - "sp-std", + "frame-support 27.0.0", + "sp-api 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "bp-messages" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4df7b23c2c5cdfb7260c0c88835e554f857b0a80e4c1cfa48dd1194e6fb6c6d" +checksum = "8ba0e3d7c760f6121f93286f4cbee7fa50c86a6b5a230b3b357bc81e5c1826d9" dependencies = [ "bp-header-chain", "bp-runtime", - "frame-support", + "frame-support 27.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-std", + "sp-core 27.0.0", + "sp-std 13.0.0", ] [[package]] name = "bp-parachains" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16a644c3fa5ac2233dd2de94ebe2a4aa98c7cca36b34d96e6604f4d34b0758b4" +checksum = "b615d01bc99346daa91aea18c18bb7edfca5d29ab5730d04060753d5b59afc73" dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", - "frame-support", + "frame-support 27.0.0", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "bp-polkadot" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2643dd8c1c9f82517cb0f438bb66533e8f0b54d8c4b063d24f835aa620e4034" +checksum = "d1af8ed56bc7dddc4a3b30ca1568cf406df77ed0b883e0c55e21917b2396460e" dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", - "frame-support", - "sp-api", - "sp-std", + "frame-support 27.0.0", + "sp-api 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "bp-polkadot-core" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34f0342d051a3b07fecbcabc7efca35880865ede7ef5b2b49ca323c94bdb6d53" +checksum = "eca2fa4991db1c5bf9f8ec4c5e0e320a19e76cfe197f850d353f3abae84ae98a" dependencies = [ "bp-messages", "bp-runtime", - "frame-support", - "frame-system", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "parity-util-mem", "scale-info", "serde", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "bp-relayers" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11ea832eedd3bb19a13f77474b4eced1782914527fc54404a423d6259095bdb" +checksum = "4736fdf102aca9ff3e656905557427668e0f339d8b0702b245d354eba63c7186" dependencies = [ "bp-messages", "bp-runtime", - "frame-support", + "frame-support 27.0.0", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "bp-runtime" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c4fd30d6814b73c245c40c760ffbadec3f834865ddd681161ef33672a766e50" +checksum = "426e8c3390a33f7ebd7c009b33278c8f4c42d6be008264387efcb1dee80af96b" dependencies = [ - "frame-support", - "frame-system", + "frame-support 27.0.0", + "frame-system 27.0.0", "hash-db", "impl-trait-for-tuples", "log", @@ -1365,20 +1226,20 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-trie", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "sp-std 13.0.0", + "sp-trie 28.0.0", "trie-db", ] [[package]] name = "bp-test-utils" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e625f0def0740566ca053a7b7076c301992eed132b3821a07e835bb8062fb79a" +checksum = "382a1045b3a21ce3e9becc3bcf95a3c92519b48e405c39dfdf85f43cdf7906b9" dependencies = [ "bp-header-chain", "bp-parachains", @@ -1387,12 +1248,21 @@ dependencies = [ "ed25519-dalek", "finality-grandpa", "parity-scale-codec", - "sp-application-crypto", - "sp-consensus-grandpa", - "sp-core", - "sp-runtime", - "sp-std", - "sp-trie", + "sp-application-crypto 29.0.0", + "sp-consensus-grandpa 12.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-trie 28.0.0", +] + +[[package]] +name = "bp-xcm-bridge-hub" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "118842d57deb8d54e2288595a33689fc364ffbf5877648e84940b2cf4b4dd4a6" +dependencies = [ + "sp-std 13.0.0", ] [[package]] @@ -1403,8 +1273,20 @@ checksum = "be3b4fafc31f17da1b4ea403c4118e4f4f1d9a5a696729b374551d582e48633b" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 25.0.0", + "sp-runtime 28.0.0", +] + +[[package]] +name = "bp-xcm-bridge-hub-router" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98f3ee360878f0cebae637b8584d9425609176ae93e10c8e05ffff544948db19" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core 27.0.0", + "sp-runtime 30.0.1", ] [[package]] @@ -1425,69 +1307,69 @@ dependencies = [ "bp-runtime", "bridge-hub-test-utils", "bridge-runtime-common", - "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", + "cumulus-pallet-aura-ext 0.6.0", + "cumulus-pallet-dmp-queue 0.6.0", + "cumulus-pallet-parachain-system 0.6.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-utility", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "cumulus-pallet-xcm 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-utility 0.6.0", + "frame-benchmarking 27.0.0", + "frame-executive 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-system-benchmarking 27.0.0", + "frame-system-rpc-runtime-api 25.0.0", + "frame-try-runtime 0.33.0", "hex-literal", "kusama-runtime-constants", "log", - "pallet-aura", - "pallet-authorship", - "pallet-balances", + "pallet-aura 26.0.0", + "pallet-authorship 27.0.0", + "pallet-balances 27.0.0", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-collator-selection", + "pallet-collator-selection 8.0.0", "pallet-multisig", - "pallet-session", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-utility", - "pallet-xcm", - "pallet-xcm-benchmarks", - "parachains-common", + "pallet-session 27.0.0", + "pallet-timestamp 26.0.0", + "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment-rpc-runtime-api 27.0.0", + "pallet-utility 27.0.0", + "pallet-xcm 6.0.0", + "pallet-xcm-benchmarks 6.0.0", + "parachains-common 6.0.0", "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime-common", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", + "polkadot-runtime-common 6.0.0", "scale-info", "serde", "smallvec", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-keyring", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", + "sp-api 25.0.0", + "sp-block-builder 25.0.0", + "sp-consensus-aura 0.31.0", + "sp-core 27.0.0", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-keyring 30.0.0", + "sp-offchain 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-transaction-pool 25.0.0", + "sp-version 28.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", + "staging-xcm-executor 6.0.0", "static_assertions", - "substrate-wasm-builder", + "substrate-wasm-builder 16.0.0", "system-parachains-constants", ] @@ -1509,81 +1391,79 @@ dependencies = [ "bp-runtime", "bridge-hub-test-utils", "bridge-runtime-common", - "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", + "cumulus-pallet-aura-ext 0.6.0", + "cumulus-pallet-dmp-queue 0.6.0", + "cumulus-pallet-parachain-system 0.6.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-utility", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "cumulus-pallet-xcm 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-utility 0.6.0", + "frame-benchmarking 27.0.0", + "frame-executive 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-system-benchmarking 27.0.0", + "frame-system-rpc-runtime-api 25.0.0", + "frame-try-runtime 0.33.0", "hex-literal", "log", - "pallet-aura", - "pallet-authorship", - "pallet-balances", + "pallet-aura 26.0.0", + "pallet-authorship 27.0.0", + "pallet-balances 27.0.0", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-collator-selection", + "pallet-collator-selection 8.0.0", "pallet-multisig", - "pallet-session", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-utility", - "pallet-xcm", - "pallet-xcm-benchmarks", - "parachains-common", - "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime-common", + "pallet-session 27.0.0", + "pallet-timestamp 26.0.0", + "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment-rpc-runtime-api 27.0.0", + "pallet-utility 27.0.0", + "pallet-xcm 6.0.0", + "pallet-xcm-benchmarks 6.0.0", + "parachains-common 6.0.0", + "parity-scale-codec", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", + "polkadot-runtime-common 6.0.0", "polkadot-runtime-constants", "scale-info", "serde", "smallvec", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-keyring", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", + "sp-api 25.0.0", + "sp-block-builder 25.0.0", + "sp-consensus-aura 0.31.0", + "sp-core 27.0.0", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-keyring 30.0.0", + "sp-offchain 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-transaction-pool 25.0.0", + "sp-version 28.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", + "staging-xcm-executor 6.0.0", "static_assertions", - "substrate-wasm-builder", + "substrate-wasm-builder 16.0.0", "system-parachains-constants", ] [[package]] name = "bridge-hub-test-utils" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3598ffa3d0c5f5651dee8aea016b69c5a3be48ab01fb83f773c93af0cf77c68" +checksum = "2d744617b60464166d7d4fbe859164f8dc4f22e096ce386d37afcc3fe157e4a9" dependencies = [ "asset-test-utils", - "bp-bridge-hub-rococo", - "bp-bridge-hub-wococo", "bp-header-chain", "bp-messages", "bp-parachains", @@ -1592,43 +1472,42 @@ dependencies = [ "bp-runtime", "bp-test-utils", "bridge-runtime-common", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", - "cumulus-pallet-xcmp-queue", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "log", - "pallet-balances", + "cumulus-pallet-parachain-system 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "frame-benchmarking 27.0.0", + "frame-executive 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "log", + "pallet-balances 27.0.0", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-collator-selection", - "pallet-session", - "pallet-utility", - "pallet-xcm", - "pallet-xcm-benchmarks", - "parachains-common", + "pallet-collator-selection 8.0.0", + "pallet-session 27.0.0", + "pallet-utility 27.0.0", + "pallet-xcm 6.0.0", + "pallet-xcm-benchmarks 6.0.0", + "parachains-common 6.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "sp-core", - "sp-io", - "sp-keyring", - "sp-runtime", - "sp-tracing", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-keyring 30.0.0", + "sp-runtime 30.0.1", + "sp-tracing 15.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", + "staging-xcm-executor 6.0.0", ] [[package]] name = "bridge-runtime-common" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a585d0a58356e3a6131a2cb77a69af5580af278075cac46a85d54e5f6ea1b982" +checksum = "eb844adfe3e4d866e77f535d2d6e19bbc0b733c8cb1f317f42ebe798cd14309e" dependencies = [ "bp-header-chain", "bp-messages", @@ -1636,27 +1515,28 @@ dependencies = [ "bp-polkadot-core", "bp-relayers", "bp-runtime", - "bp-xcm-bridge-hub-router", - "frame-support", - "frame-system", + "bp-xcm-bridge-hub", + "bp-xcm-bridge-hub-router 0.5.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "hash-db", "log", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-transaction-payment", - "pallet-utility", - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-trie", - "staging-xcm", - "staging-xcm-builder", + "pallet-transaction-payment 27.0.0", + "pallet-utility 27.0.0", + "parity-scale-codec", + "scale-info", + "sp-api 25.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-trie 28.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", "static_assertions", ] @@ -1677,9 +1557,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" +checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" dependencies = [ "memchr", "serde", @@ -1696,9 +1576,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byte-slice-cast" @@ -1714,21 +1594,21 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "bzip2-sys" @@ -1762,9 +1642,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" +checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" dependencies = [ "serde", ] @@ -1793,17 +1673,6 @@ dependencies = [ "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" @@ -1846,25 +1715,24 @@ dependencies = [ [[package]] name = "chacha20" -version = "0.8.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ "cfg-if", - "cipher 0.3.0", + "cipher 0.4.4", "cpufeatures", - "zeroize", ] [[package]] name = "chacha20poly1305" -version = "0.9.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ - "aead 0.4.3", + "aead", "chacha20", - "cipher 0.3.0", + "cipher 0.4.4", "poly1305", "zeroize", ] @@ -1879,42 +1747,41 @@ dependencies = [ "bridge-hub-polkadot-runtime", "clap", "collectives-polkadot-runtime", - "cumulus-primitives-core", + "cumulus-primitives-core 0.4.0", "encointer-kusama-runtime", "glutton-kusama-runtime", "hex-literal", "kusama-runtime-constants", - "pallet-im-online", - "pallet-staking", - "parachains-common", - "polkadot-primitives", + "pallet-im-online 24.0.0", + "pallet-staking 25.0.0", + "parachains-common 4.0.0", + "polkadot-primitives 4.0.0", "polkadot-runtime", "polkadot-runtime-constants", - "polkadot-runtime-parachains", - "sc-chain-spec", + "polkadot-runtime-parachains 4.0.0", + "sc-chain-spec 24.0.0", "sc-consensus-grandpa", "serde", "serde_json", - "sp-authority-discovery", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-core", - "sp-runtime", + "sp-authority-discovery 23.0.0", + "sp-consensus-babe 0.29.0", + "sp-consensus-beefy 10.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", "staging-kusama-runtime", - "staging-xcm", + "staging-xcm 4.0.0", ] [[package]] name = "chrono" -version = "0.4.27" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56b4c72906975ca04becb8a30e102dfecddd0c06181e3e95ddc444be28881f8" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", - "time 0.1.45", "wasm-bindgen", "windows-targets 0.48.5", ] @@ -1927,7 +1794,7 @@ checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" dependencies = [ "core2", "multibase", - "multihash", + "multihash 0.17.0", "serde", "unsigned-varint", ] @@ -1941,15 +1808,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" @@ -1958,6 +1816,7 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", + "zeroize", ] [[package]] @@ -1982,9 +1841,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.11" +version = "4.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" +checksum = "33e92c5c1a78c62968ec57dbc2440366a2d6e5a23faf829970ff1585dc6b18e2" dependencies = [ "clap_builder", "clap_derive", @@ -1992,14 +1851,15 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.11" +version = "4.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" +checksum = "f4323769dc8a61e2c39ad7dc26f6f2800524691a44d74fe3d1071a5c24db6370" dependencies = [ "anstream", "anstyle", "clap_lex", "strsim", + "terminal_size", ] [[package]] @@ -2022,9 +1882,9 @@ checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "coarsetime" -version = "0.1.23" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a90d114103adbc625300f346d4d09dfb4ab1c4a8df6868435dd903392ecf4354" +checksum = "71367d3385c716342014ad17e3d19f7788ae514885a1f4c24f500260fb365e1a" dependencies = [ "libc", "once_cell", @@ -2046,72 +1906,72 @@ dependencies = [ name = "collectives-polkadot-runtime" version = "1.0.0" dependencies = [ - "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", + "cumulus-pallet-aura-ext 0.6.0", + "cumulus-pallet-dmp-queue 0.6.0", + "cumulus-pallet-parachain-system 0.6.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-utility", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "cumulus-pallet-xcm 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-utility 0.6.0", + "frame-benchmarking 27.0.0", + "frame-executive 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-system-benchmarking 27.0.0", + "frame-system-rpc-runtime-api 25.0.0", + "frame-try-runtime 0.33.0", "hex-literal", "log", "pallet-alliance", - "pallet-asset-rate", - "pallet-aura", - "pallet-authorship", - "pallet-balances", - "pallet-collator-selection", - "pallet-collective", + "pallet-asset-rate 6.0.0", + "pallet-aura 26.0.0", + "pallet-authorship 27.0.0", + "pallet-balances 27.0.0", + "pallet-collator-selection 8.0.0", + "pallet-collective 27.0.0", "pallet-core-fellowship", "pallet-multisig", "pallet-preimage", - "pallet-proxy", + "pallet-proxy 27.0.0", "pallet-ranked-collective", "pallet-referenda", "pallet-salary", - "pallet-scheduler", - "pallet-session", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-xcm", - "parachains-common", - "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime-common", + "pallet-scheduler 28.0.0", + "pallet-session 27.0.0", + "pallet-timestamp 26.0.0", + "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment-rpc-runtime-api 27.0.0", + "pallet-treasury 26.0.0", + "pallet-utility 27.0.0", + "pallet-xcm 6.0.0", + "parachains-common 6.0.0", + "parity-scale-codec", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", + "polkadot-runtime-common 6.0.0", "polkadot-runtime-constants", "scale-info", "smallvec", - "sp-api", - "sp-arithmetic", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", + "sp-api 25.0.0", + "sp-arithmetic 22.0.0", + "sp-block-builder 25.0.0", + "sp-consensus-aura 0.31.0", + "sp-core 27.0.0", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-offchain 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-transaction-pool 25.0.0", + "sp-version 28.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", + "staging-xcm-executor 6.0.0", + "substrate-wasm-builder 16.0.0", "system-parachains-constants", ] @@ -2129,9 +1989,9 @@ checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] @@ -2157,32 +2017,24 @@ checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "const-random" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368a7a772ead6ce7e1de82bfb04c485f3db8ec744f72925af5735e29a22cc18e" +checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a" dependencies = [ "const-random-macro", - "proc-macro-hack", ] [[package]] name = "const-random-macro" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.12", "once_cell", - "proc-macro-hack", "tiny-keccak", ] -[[package]] -name = "constant_time_eq" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" - [[package]] name = "constant_time_eq" version = "0.3.0" @@ -2203,9 +2055,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[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", @@ -2213,9 +2065,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" @@ -2237,9 +2089,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] @@ -2348,16 +2200,7 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" dependencies = [ - "crc-catalog 1.1.1", -] - -[[package]] -name = "crc" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" -dependencies = [ - "crc-catalog 2.2.0", + "crc-catalog", ] [[package]] @@ -2366,12 +2209,6 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" -[[package]] -name = "crc-catalog" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" - [[package]] name = "crc32fast" version = "1.3.2" @@ -2381,38 +2218,23 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - [[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]] @@ -2427,12 +2249,9 @@ dependencies = [ [[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" @@ -2442,25 +2261,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.2" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] @@ -2492,26 +2299,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]] @@ -2529,17 +2327,36 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071cdddd31e2b0d47a74249675de828857f61eb5f6afa36cfcf63ea6ee2b60f2" dependencies = [ - "cumulus-pallet-parachain-system", - "frame-support", - "frame-system", - "pallet-aura", - "pallet-timestamp", + "cumulus-pallet-parachain-system 0.4.1", + "frame-support 25.0.0", + "frame-system 25.0.0", + "pallet-aura 24.0.0", + "pallet-timestamp 24.0.0", + "parity-scale-codec", + "scale-info", + "sp-application-crypto 27.0.0", + "sp-consensus-aura 0.29.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "cumulus-pallet-aura-ext" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0976731a7fdc209cf677e660dcabd60bd101c9d326a9b105bb4dfc2f588591d" +dependencies = [ + "cumulus-pallet-parachain-system 0.6.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "pallet-aura 26.0.0", + "pallet-timestamp 26.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-consensus-aura", - "sp-runtime", - "sp-std", + "sp-application-crypto 29.0.0", + "sp-consensus-aura 0.31.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -2548,16 +2365,35 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d1cb9d43cdfeedea19b4f6b8386e5b6264a97938b29f5c711a84e9dc7105ff7" dependencies = [ - "cumulus-primitives-core", - "frame-support", - "frame-system", + "cumulus-primitives-core 0.4.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "staging-xcm 4.0.0", +] + +[[package]] +name = "cumulus-pallet-dmp-queue" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e14d2bfe35cd9fd86302c575b42d7f2e8510b6cdbb1e0730ad5b31da9caa60" +dependencies = [ + "cumulus-primitives-core 0.6.0", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", - "staging-xcm", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-xcm 6.0.0", ] [[package]] @@ -2567,28 +2403,63 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d20d2280051998fcf113f04d25d4b39f27b449570b6350fdfb7e92541cb0aae7" dependencies = [ "bytes", - "cumulus-pallet-parachain-system-proc-macro", - "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", + "cumulus-pallet-parachain-system-proc-macro 0.4.0", + "cumulus-primitives-core 0.4.0", + "cumulus-primitives-parachain-inherent 0.4.0", + "environmental", + "frame-support 25.0.0", + "frame-system 25.0.0", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "polkadot-parachain-primitives 3.0.0", + "polkadot-runtime-parachains 4.0.0", + "scale-info", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-inherents 23.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "sp-std 12.0.0", + "sp-trie 26.0.0", + "sp-version 26.0.0", + "staging-xcm 4.0.0", + "trie-db", +] + +[[package]] +name = "cumulus-pallet-parachain-system" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0980004d033c8e160148a6ae82423a7fff02455f7d6bccba2b16e87ef4a53b76" +dependencies = [ + "bytes", + "cumulus-pallet-parachain-system-proc-macro 0.5.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-parachain-inherent 0.6.0", + "cumulus-primitives-proof-size-hostfunction", "environmental", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "impl-trait-for-tuples", "log", + "pallet-message-queue 30.0.0", "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-runtime-parachains", + "polkadot-parachain-primitives 5.0.0", + "polkadot-runtime-parachains 6.0.0", "scale-info", - "sp-core", - "sp-externalities", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-trie", - "sp-version", - "staging-xcm", + "sp-core 27.0.0", + "sp-externalities 0.24.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "sp-std 13.0.0", + "sp-trie 28.0.0", + "sp-version 28.0.0", + "staging-xcm 6.0.0", "trie-db", ] @@ -2604,19 +2475,31 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "cumulus-pallet-parachain-system-proc-macro" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc86fdc17ef11f9adcd7565a4238107a3538426990fa4ffed8e6dc1d40582a2" +dependencies = [ + "proc-macro-crate 2.0.1", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "cumulus-pallet-session-benchmarking" -version = "6.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf9aaa60ed60ee9cbfc55535a6e2a01353c8308135e24d6c50ba989e518f17d" +checksum = "fec7368454572169916c9b0621bc1da04774260e32486fd1d2f58dbb21a7b85d" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "pallet-session", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "pallet-session 27.0.0", "parity-scale-codec", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -2625,15 +2508,32 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ff03e14a0f5847bdee67a673ee945d3acd5c1d7238d46993208dcbfb774e27f" dependencies = [ - "cumulus-primitives-core", - "frame-support", - "frame-system", + "cumulus-primitives-core 0.4.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "parity-scale-codec", + "scale-info", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "staging-xcm 4.0.0", +] + +[[package]] +name = "cumulus-pallet-xcm" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04efb075677bd1c54934294049f7264ef58dec22d18614c59ea76c99275b0ba7" +dependencies = [ + "cumulus-primitives-core 0.6.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", - "staging-xcm", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-xcm 6.0.0", ] [[package]] @@ -2642,23 +2542,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6af9816dd6564149729ba133c2c984c88fb15c4a2cb66f57be06b9147744e51" dependencies = [ - "bp-xcm-bridge-hub-router", - "cumulus-primitives-core", - "frame-benchmarking", - "frame-support", - "frame-system", + "bp-xcm-bridge-hub-router 0.3.0", + "cumulus-primitives-core 0.4.0", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", "parity-scale-codec", - "polkadot-runtime-common", - "polkadot-runtime-parachains", + "polkadot-runtime-common 4.0.0", + "polkadot-runtime-parachains 4.0.0", "rand_chacha 0.3.1", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "staging-xcm", - "staging-xcm-executor", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "staging-xcm 4.0.0", + "staging-xcm-executor 4.0.0", +] + +[[package]] +name = "cumulus-pallet-xcmp-queue" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eda7f0f2644ef02fa18054a483650dfd7085caad7137221cbc05747c13ad7d7" +dependencies = [ + "bounded-collections", + "bp-xcm-bridge-hub-router 0.5.0", + "cumulus-primitives-core 0.6.0", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "log", + "pallet-message-queue 30.0.0", + "parity-scale-codec", + "polkadot-runtime-common 6.0.0", + "polkadot-runtime-parachains 6.0.0", + "scale-info", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-xcm 6.0.0", + "staging-xcm-executor 6.0.0", ] [[package]] @@ -2668,15 +2594,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d40f62add2352287be4cb58b0017a91f61d953e2c6d2777c20d93185558196e1" dependencies = [ "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-primitives", + "polkadot-core-primitives 4.0.0", + "polkadot-parachain-primitives 3.0.0", + "polkadot-primitives 4.0.0", + "scale-info", + "sp-api 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-trie 26.0.0", + "staging-xcm 4.0.0", +] + +[[package]] +name = "cumulus-primitives-core" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "475c9928839e4ff8c168dc1eb4e31dc53e3b6380b85b5cdc1965da96026ec025" +dependencies = [ + "parity-scale-codec", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", + "polkadot-primitives 6.0.0", "scale-info", - "sp-api", - "sp-runtime", - "sp-std", - "sp-trie", - "staging-xcm", + "sp-api 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-trie 28.0.0", + "staging-xcm 6.0.0", ] [[package]] @@ -2686,35 +2630,70 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d0b1e0e6dcf393dbf05b31122a8c4739acf407a96ec8fd707886f36ee95c355" 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-trie", + "cumulus-primitives-core 0.4.0", + "cumulus-relay-chain-interface 0.4.0", + "cumulus-test-relay-sproof-builder 0.4.0", + "parity-scale-codec", + "sc-client-api 25.0.0", + "scale-info", + "sp-api 23.0.0", + "sp-core 25.0.0", + "sp-inherents 23.0.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "sp-std 12.0.0", + "sp-storage 17.0.0", + "sp-trie 26.0.0", + "tracing", +] + +[[package]] +name = "cumulus-primitives-parachain-inherent" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe636dcb0964587379b82af2856d1c174267e477a64229e878aed4150a813089" +dependencies = [ + "async-trait", + "cumulus-primitives-core 0.6.0", + "cumulus-relay-chain-interface 0.6.0", + "cumulus-test-relay-sproof-builder 0.6.0", + "parity-scale-codec", + "sc-client-api 27.0.0", + "scale-info", + "sp-api 25.0.0", + "sp-core 27.0.0", + "sp-inherents 25.0.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-trie 28.0.0", "tracing", ] +[[package]] +name = "cumulus-primitives-proof-size-hostfunction" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d8668bb256b32b5fd5a1226811b3d763bd463f3200effee810c7a6f77feef30" +dependencies = [ + "sp-externalities 0.24.0", + "sp-runtime-interface 23.0.0", + "sp-trie 28.0.0", +] + [[package]] name = "cumulus-primitives-timestamp" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771ef4a34f7bcd4e8782f73d8dbd0df031b1c1c82e54b06af69f88df2cddc316" dependencies = [ - "cumulus-primitives-core", + "cumulus-primitives-core 0.4.0", "futures", "parity-scale-codec", - "sp-inherents", - "sp-std", - "sp-timestamp", + "sp-inherents 23.0.0", + "sp-std 12.0.0", + "sp-timestamp 23.0.0", ] [[package]] @@ -2723,19 +2702,40 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4ef704f5a346711d0448f82e57dc5784b186f4bf5e3efbbca0df814b203539" dependencies = [ - "cumulus-primitives-core", - "frame-support", + "cumulus-primitives-core 0.4.0", + "frame-support 25.0.0", + "log", + "pallet-xcm-benchmarks 4.0.0", + "parity-scale-codec", + "polkadot-runtime-common 4.0.0", + "polkadot-runtime-parachains 4.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "staging-xcm 4.0.0", + "staging-xcm-builder 4.0.0", + "staging-xcm-executor 4.0.0", +] + +[[package]] +name = "cumulus-primitives-utility" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21cf332f275e5dcfc08cafc043bc37bfcf3989f3a39ffe1c840d44f568edb877" +dependencies = [ + "cumulus-primitives-core 0.6.0", + "frame-support 27.0.0", "log", - "pallet-xcm-benchmarks", + "pallet-xcm-benchmarks 6.0.0", "parity-scale-codec", - "polkadot-runtime-common", - "polkadot-runtime-parachains", - "sp-io", - "sp-runtime", - "sp-std", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", + "polkadot-runtime-common 6.0.0", + "polkadot-runtime-parachains 6.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", + "staging-xcm-executor 6.0.0", ] [[package]] @@ -2745,15 +2745,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af081ef8885042e7ae96e9d1cf32ec6f0616fe4cb78f0325ed7c5accded687fb" dependencies = [ "async-trait", - "cumulus-primitives-core", + "cumulus-primitives-core 0.4.0", + "futures", + "jsonrpsee-core", + "parity-scale-codec", + "polkadot-overseer 4.0.0", + "sc-client-api 25.0.0", + "sp-api 23.0.0", + "sp-blockchain 25.0.0", + "sp-state-machine 0.32.0", + "thiserror", +] + +[[package]] +name = "cumulus-relay-chain-interface" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a42b67dc400ff5f9dc07aedb8602f5deac2f2ac2290fd5529e4eb1345a3202a" +dependencies = [ + "async-trait", + "cumulus-primitives-core 0.6.0", "futures", "jsonrpsee-core", "parity-scale-codec", - "polkadot-overseer", - "sc-client-api", - "sp-api", - "sp-blockchain", - "sp-state-machine", + "polkadot-overseer 6.0.0", + "sc-client-api 27.0.0", + "sp-api 25.0.0", + "sp-blockchain 27.0.0", + "sp-state-machine 0.34.0", "thiserror", ] @@ -2763,13 +2782,28 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59b921a9cb6758faa1c739f135fd87aa1e10a4e86a1c1db3119b396a62287cf2" dependencies = [ - "cumulus-primitives-core", + "cumulus-primitives-core 0.4.0", + "parity-scale-codec", + "polkadot-primitives 4.0.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "sp-std 12.0.0", + "sp-trie 26.0.0", +] + +[[package]] +name = "cumulus-test-relay-sproof-builder" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c66e3ae7ba8cc8ac846c421bb01869fa516c9a1d490fb711d94a793dc5ab178" +dependencies = [ + "cumulus-primitives-core 0.6.0", "parity-scale-codec", - "polkadot-primitives", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-trie", + "polkadot-primitives 6.0.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "sp-std 13.0.0", + "sp-trie 28.0.0", ] [[package]] @@ -2781,7 +2815,7 @@ dependencies = [ "byteorder", "digest 0.8.1", "rand_core 0.5.1", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] @@ -2794,7 +2828,7 @@ dependencies = [ "byteorder", "digest 0.9.0", "rand_core 0.5.1", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] @@ -2811,15 +2845,15 @@ dependencies = [ "fiat-crypto", "platforms", "rustc_version 0.4.0", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] [[package]] name = "curve25519-dalek-derive" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", @@ -2828,9 +2862,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.106" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28403c86fc49e3401fdf45499ba37fad6493d9329449d6449d7f0e10f4654d28" +checksum = "7129e341034ecb940c9072817cd9007974ea696844fc4dd582dc1653a7fbe2e8" dependencies = [ "cc", "cxxbridge-flags", @@ -2840,9 +2874,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.106" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78da94fef01786dc3e0c76eafcd187abcaa9972c78e05ff4041e24fdf059c285" +checksum = "a2a24f3f5f8eed71936f21e570436f024f5c2e25628f7496aa7ccd03b90109d5" dependencies = [ "cc", "codespan-reporting", @@ -2855,67 +2889,32 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.106" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2a6f5e1dfb4b34292ad4ea1facbfdaa1824705b231610087b00b17008641809" +checksum = "06fdd177fc61050d63f67f5bd6351fac6ab5526694ea8e359cd9cd3b75857f44" [[package]] name = "cxxbridge-macro" -version = "1.0.106" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c49547d73ba8dcfd4ad7325d64c6d5391ff4224d498fc39a6f3f49825a530d" +checksum = "587663dd5fb3d10932c8aecfe7c844db1bcf0aee93eeab08fac13dc1212c2e7f" dependencies = [ "proc-macro2", "quote", "syn 2.0.48", ] -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" -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", -] - [[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", @@ -2923,25 +2922,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" @@ -2952,27 +2940,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", @@ -2982,9 +2956,12 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +dependencies = [ + "powerfmt", +] [[package]] name = "derivative" @@ -3008,37 +2985,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" @@ -3085,7 +3031,7 @@ dependencies = [ "block-buffer 0.10.4", "const-oid", "crypto-common", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] @@ -3203,57 +3149,46 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.13" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[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.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" -dependencies = [ - "der 0.7.8", + "der", "digest 0.10.7", - "elliptic-curve 0.13.5", - "rfc6979 0.4.0", - "signature 2.1.0", - "spki 0.7.2", + "elliptic-curve", + "rfc6979", + "signature", + "spki", ] [[package]] name = "ed25519" -version = "2.2.2" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ - "pkcs8 0.10.2", - "signature 2.1.0", + "pkcs8", + "signature", ] [[package]] name = "ed25519-dalek" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" +checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ "curve25519-dalek 4.0.0", "ed25519", "rand_core 0.6.4", "serde", - "sha2 0.10.7", + "sha2 0.10.8", + "subtle 2.5.0", "zeroize", ] @@ -3279,42 +3214,20 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[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.5" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ - "base16ct 0.2.0", - "crypto-bigint 0.5.2", + "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", ] @@ -3331,14 +3244,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "574a256785661fe0353b6664a896b03eaac804e01de3b7146a1e68bea23823c6" dependencies = [ "encointer-primitives", - "frame-support", - "frame-system", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", - "pallet-asset-tx-payment", + "pallet-asset-tx-payment 25.0.0", "pallet-encointer-balances", "pallet-encointer-ceremonies", - "pallet-transaction-payment", - "sp-runtime", + "pallet-transaction-payment 25.0.0", + "sp-runtime 28.0.0", ] [[package]] @@ -3348,11 +3261,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cc19094858c453d1622fee74cd5ac4aeafc5afcc1695c442361528604f3a3cd" dependencies = [ "encointer-primitives", - "frame-support", + "frame-support 25.0.0", "parity-scale-codec", "scale-info", - "sp-api", - "sp-std", + "sp-api 23.0.0", + "sp-std 12.0.0", ] [[package]] @@ -3362,38 +3275,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0e915dfb90455b04de86863d5e8c28727b88a5e79035d1592f5340befc2d31a" dependencies = [ "encointer-primitives", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] name = "encointer-kusama-runtime" version = "1.0.0" dependencies = [ - "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", + "cumulus-pallet-aura-ext 0.4.0", + "cumulus-pallet-dmp-queue 0.4.0", + "cumulus-pallet-parachain-system 0.4.1", + "cumulus-pallet-xcm 0.4.0", + "cumulus-pallet-xcmp-queue 0.4.0", + "cumulus-primitives-core 0.4.0", "cumulus-primitives-timestamp", - "cumulus-primitives-utility", + "cumulus-primitives-utility 0.4.0", "encointer-balances-tx-payment", "encointer-balances-tx-payment-rpc-runtime-api", "encointer-primitives", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "frame-benchmarking 25.0.0", + "frame-executive 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "frame-system-benchmarking 25.0.0", + "frame-system-rpc-runtime-api 23.0.0", + "frame-try-runtime 0.31.0", "hex-literal", "log", - "pallet-asset-tx-payment", - "pallet-aura", - "pallet-balances", - "pallet-collective", + "pallet-asset-tx-payment 25.0.0", + "pallet-aura 24.0.0", + "pallet-balances 25.0.0", + "pallet-collective 25.0.0", "pallet-encointer-balances", "pallet-encointer-bazaar", "pallet-encointer-bazaar-rpc-runtime-api", @@ -3405,37 +3318,37 @@ dependencies = [ "pallet-encointer-reputation-commitments", "pallet-encointer-scheduler", "pallet-insecure-randomness-collective-flip", - "pallet-membership", - "pallet-proxy", - "pallet-scheduler", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-xcm", - "parachains-common", - "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-runtime-common", - "scale-info", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-transaction-pool", - "sp-version", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", + "pallet-membership 25.0.0", + "pallet-proxy 25.0.0", + "pallet-scheduler 26.0.0", + "pallet-timestamp 24.0.0", + "pallet-transaction-payment 25.0.0", + "pallet-transaction-payment-rpc-runtime-api 25.0.0", + "pallet-treasury 24.0.0", + "pallet-utility 25.0.0", + "pallet-xcm 4.0.0", + "parachains-common 4.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 3.0.0", + "polkadot-runtime-common 4.0.0", + "scale-info", + "sp-api 23.0.0", + "sp-block-builder 23.0.0", + "sp-consensus-aura 0.29.0", + "sp-core 25.0.0", + "sp-genesis-builder 0.4.0", + "sp-inherents 23.0.0", + "sp-offchain 23.0.0", + "sp-runtime 28.0.0", + "sp-session 24.0.0", + "sp-std 12.0.0", + "sp-transaction-pool 23.0.0", + "sp-version 26.0.0", + "staging-parachain-info 0.4.0", + "staging-xcm 4.0.0", + "staging-xcm-builder 4.0.0", + "staging-xcm-executor 4.0.0", + "substrate-wasm-builder 14.0.0", ] [[package]] @@ -3448,8 +3361,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] @@ -3459,17 +3372,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "306cf10a0e74f42080c064fdc1d827b5c3fd6e0c40ee5f4e36bb2f5ee76c51dc" dependencies = [ "bs58 0.4.0", - "crc 2.1.0", + "crc", "ep-core", - "frame-support", + "frame-support 25.0.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", "substrate-geohash", ] @@ -3487,18 +3400,18 @@ dependencies = [ [[package]] name = "enumflags2" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", @@ -3518,9 +3431,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" dependencies = [ "humantime", "is-terminal", @@ -3541,15 +3454,15 @@ version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edfa4c3869cba69547a6cf0b80faf892822cee70027f86439ea7d145286fc6ba" dependencies = [ - "array-bytes 6.1.0", + "array-bytes 6.2.2", "impl-serde", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-core", - "sp-runtime", - "sp-std", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", "substrate-fixed", ] @@ -3561,23 +3474,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "cc", "libc", + "windows-sys 0.52.0", ] [[package]] @@ -3613,6 +3515,27 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "event-listener" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "770d968249b5d99410d61f5bf89057f3199a077a04d087092f58e7d10692baae" +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.0", + "pin-project-lite 0.2.13", +] + [[package]] name = "exit-future" version = "0.2.0" @@ -3661,18 +3584,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - -[[package]] -name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fatality" @@ -3709,13 +3623,13 @@ dependencies = [ ] [[package]] -name = "ff" -version = "0.12.1" +name = "fdlimit" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +checksum = "e182f7dbc2ef73d9ef67351c5fbbea084729c48362d3ce9dd44c28e32e277fe5" dependencies = [ - "rand_core 0.6.4", - "subtle 2.4.1", + "libc", + "thiserror", ] [[package]] @@ -3725,7 +3639,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]] @@ -3746,14 +3660,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]] @@ -3792,9 +3706,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "libz-sys", @@ -3827,9 +3741,9 @@ dependencies = [ [[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", ] @@ -3846,23 +3760,49 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dd4946d63eab00d899f08a7e74e965cc6785c2298efaea6a2752905f4810407" dependencies = [ - "frame-support", - "frame-support-procedural", - "frame-system", + "frame-support 25.0.0", + "frame-support-procedural 20.0.0", + "frame-system 25.0.0", + "linregress", + "log", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-runtime-interface 21.0.0", + "sp-std 12.0.0", + "sp-storage 17.0.0", + "static_assertions", +] + +[[package]] +name = "frame-benchmarking" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f99ad86e915f3a57b4a1b56a296e9e3f5bb5aec44189e6d85a773398c6ce614b" +dependencies = [ + "frame-support 27.0.0", + "frame-support-procedural 22.0.0", + "frame-system 27.0.0", "linregress", "log", "parity-scale-codec", "paste", "scale-info", "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-runtime-interface 23.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", "static_assertions", ] @@ -3885,15 +3825,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebad507fb038db2f7ce982d30bd9828a59785c9a4780348d59cd6cceaee80d1a" dependencies = [ "frame-election-provider-solution-type", - "frame-support", - "frame-system", + "frame-support 25.0.0", + "frame-system 25.0.0", + "parity-scale-codec", + "scale-info", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-npos-elections 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "frame-election-provider-support" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26d8dabf04394bb59a44e41664984289c2b5b28d565193fac49695db846f167" +dependencies = [ + "frame-election-provider-solution-type", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-npos-elections", - "sp-runtime", - "sp-std", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-npos-elections 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -3902,17 +3860,36 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dda2c20ea3267ee20c9a5482f320236510c4ade6aec1dd930cb57dc5651c64f" dependencies = [ - "frame-support", - "frame-system", - "frame-try-runtime", + "frame-support 25.0.0", + "frame-system 25.0.0", + "frame-try-runtime 0.31.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-tracing 14.0.0", +] + +[[package]] +name = "frame-executive" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da9af388ae194ff65aba5c7cd7afe9fdaea6a021a06417efc6e4aebd996e7a3" +dependencies = [ + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-try-runtime 0.33.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-tracing", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-tracing 15.0.0", ] [[package]] @@ -3929,9 +3906,9 @@ dependencies = [ [[package]] name = "frame-remote-externalities" -version = "0.32.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a30013df51f4d4e58472c4fecdbfeb141234ece5f6355e5b3a3e51d3f87d452d" +checksum = "3fce6dcbe54a14394ba471f8f1c38a9b7b9bbccda9c23ef04de74403527ef4bf" dependencies = [ "futures", "indicatif", @@ -3939,10 +3916,10 @@ dependencies = [ "log", "parity-scale-codec", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", "spinners", "substrate-rpc-client", "tokio", @@ -3960,7 +3937,49 @@ dependencies = [ "docify", "environmental", "frame-metadata", - "frame-support-procedural", + "frame-support-procedural 20.0.0", + "impl-trait-for-tuples", + "k256", + "log", + "macro_magic", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "serde_json", + "smallvec", + "sp-api 23.0.0", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-core-hashing-proc-macro 13.0.0", + "sp-debug-derive 12.0.0", + "sp-genesis-builder 0.4.0", + "sp-inherents 23.0.0", + "sp-io 27.0.0", + "sp-metadata-ir 0.4.0", + "sp-runtime 28.0.0", + "sp-staking 23.0.0", + "sp-state-machine 0.32.0", + "sp-std 12.0.0", + "sp-tracing 14.0.0", + "sp-weights 24.0.0", + "static_assertions", + "tt-call", +] + +[[package]] +name = "frame-support" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "654f8001ac929387a460ed2b1dd9ef70af81221ef2b3519bf4c91ecef88f68e4" +dependencies = [ + "aquamarine", + "array-bytes 6.2.2", + "bitflags 1.3.2", + "docify", + "environmental", + "frame-metadata", + "frame-support-procedural 22.0.0", "impl-trait-for-tuples", "k256", "log", @@ -3971,21 +3990,21 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-api", - "sp-arithmetic", - "sp-core", - "sp-core-hashing-proc-macro", - "sp-debug-derive", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-metadata-ir", - "sp-runtime", - "sp-staking", - "sp-state-machine", - "sp-std", - "sp-tracing", - "sp-weights", + "sp-api 25.0.0", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-core-hashing-proc-macro 14.0.0", + "sp-debug-derive 13.0.0", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-metadata-ir 0.5.0", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-state-machine 0.34.0", + "sp-std 13.0.0", + "sp-tracing 15.0.0", + "sp-weights 26.0.0", "static_assertions", "tt-call", ] @@ -4006,7 +4025,27 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "sp-core-hashing", + "sp-core-hashing 13.0.0", + "syn 2.0.48", +] + +[[package]] +name = "frame-support-procedural" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef13774b6423deb98878e75cd7d22e3bd1ed60c216b000d000a8549de402fcd2" +dependencies = [ + "Inflector", + "cfg-expr", + "derive-syn-parse", + "expander 2.0.0", + "frame-support-procedural-tools", + "itertools 0.10.5", + "macro_magic", + "proc-macro-warning", + "proc-macro2", + "quote", + "sp-core-hashing 14.0.0", "syn 2.0.48", ] @@ -4041,17 +4080,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57e316407c45a5093c833966a906301aa0dcbd05048061cd9cde2548d017bfd9" dependencies = [ "cfg-if", - "frame-support", + "frame-support 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-version 26.0.0", + "sp-weights 24.0.0", +] + +[[package]] +name = "frame-system" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93a51b0fc4d1f35cc4e56c356738ce0e3d1f8483062d9243653b91fd2d20b083" +dependencies = [ + "cfg-if", + "docify", + "frame-support 27.0.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-version", - "sp-weights", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-version 28.0.0", + "sp-weights 26.0.0", ] [[package]] @@ -4060,14 +4120,30 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5b1388055d29a7a1c4d41b1623d3fcbc9d7f31d17abe04500b270b26901d926" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "parity-scale-codec", + "scale-info", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "frame-system-benchmarking" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "398ca6909232d9e4a2686e862e49bd68314f1ee9796ba0ec29d55300523bf89f" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -4077,7 +4153,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17572a34fd866ad6cab6977a2c30b38645e0a499b3486de00ae9103f7002d6d3" dependencies = [ "parity-scale-codec", - "sp-api", + "sp-api 23.0.0", +] + +[[package]] +name = "frame-system-rpc-runtime-api" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ce3dd1fb4ac9a390ebac1744bbb368fcf457a3fda0df2d788c535a3ef5819e1" +dependencies = [ + "parity-scale-codec", + "sp-api 25.0.0", ] [[package]] @@ -4086,18 +4172,34 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f082e770275f9b46ddf46b09bc7a993f84db691c39d9e4d038ac07443cb17a18" dependencies = [ - "frame-support", + "frame-support 25.0.0", + "parity-scale-codec", + "sp-api 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "frame-try-runtime" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5edad06e1918b138964e0fee7d7b6d248e7d23e7946f868b165723564ba01b09" +dependencies = [ + "frame-support 27.0.0", "parity-scale-codec", - "sp-api", - "sp-runtime", - "sp-std", + "sp-api 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "fs-err" -version = "2.9.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +dependencies = [ + "autocfg", +] [[package]] name = "fs2" @@ -4117,9 +4219,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -4132,9 +4234,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -4142,15 +4244,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -4160,30 +4262,25 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-lite" -version = "1.13.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" dependencies = [ - "fastrand 1.9.0", "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite 0.2.12", - "waker-fn", + "pin-project-lite 0.2.13", ] [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", @@ -4197,21 +4294,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ "futures-io", - "rustls 0.20.8", - "webpki 0.22.0", + "rustls 0.20.9", + "webpki", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-timer" @@ -4221,9 +4318,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures-channel", "futures-core", @@ -4232,7 +4329,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "pin-utils", "slab", ] @@ -4279,25 +4376,15 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] -[[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" @@ -4305,7 +4392,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" dependencies = [ "opaque-debug 0.3.0", - "polyval 0.6.1", + "polyval", ] [[package]] @@ -4321,9 +4408,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" @@ -4333,83 +4420,72 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" dependencies = [ "aho-corasick", "bstr", - "fnv", "log", - "regex", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] name = "glutton-kusama-runtime" version = "1.0.0" dependencies = [ - "cumulus-pallet-parachain-system", - "cumulus-pallet-xcm", - "cumulus-primitives-core", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "cumulus-pallet-parachain-system 0.6.0", + "cumulus-pallet-xcm 0.6.0", + "cumulus-primitives-core 0.6.0", + "frame-benchmarking 27.0.0", + "frame-executive 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-system-benchmarking 27.0.0", + "frame-system-rpc-runtime-api 25.0.0", + "frame-try-runtime 0.33.0", "pallet-glutton", "pallet-sudo", - "parachains-common", - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-block-builder", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", + "parachains-common 6.0.0", + "parity-scale-codec", + "scale-info", + "sp-api 25.0.0", + "sp-block-builder 25.0.0", + "sp-core 27.0.0", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-offchain 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-transaction-pool 25.0.0", + "sp-version 28.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", + "staging-xcm-executor 6.0.0", + "substrate-wasm-builder 16.0.0", "system-parachains-constants", ] -[[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.21" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ "bytes", "fnv", @@ -4417,7 +4493,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap 2.1.0", "slab", "tokio", "tokio-util", @@ -4445,7 +4521,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.7", ] [[package]] @@ -4454,16 +4530,16 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.7", ] [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.7", "allocator-api2", ] @@ -4473,7 +4549,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.0", + "hashbrown 0.14.3", ] [[package]] @@ -4493,9 +4569,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -4534,7 +4610,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", ] @@ -4558,6 +4634,15 @@ dependencies = [ "hmac 0.8.1", ] +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "hostname" version = "0.3.1" @@ -4571,9 +4656,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -4588,7 +4673,7 @@ checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", ] [[package]] @@ -4631,8 +4716,8 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project-lite 0.2.12", - "socket2 0.4.9", + "pin-project-lite 0.2.13", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -4641,33 +4726,33 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http", "hyper", "log", - "rustls 0.21.6", + "rustls 0.21.10", "rustls-native-certs", "tokio", "tokio-rustls", - "webpki-roots 0.23.1", + "webpki-roots 0.25.3", ] [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows 0.48.0", + "windows-core", ] [[package]] @@ -4679,12 +4764,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" @@ -4698,9 +4777,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", @@ -4708,19 +4787,19 @@ 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.0.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9465340214b296cd17a0009acdb890d6160010b8adf8f78a00d0d7ab270f79f" +checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ "async-io", "core-foundation", @@ -4732,7 +4811,7 @@ dependencies = [ "rtnetlink", "system-configuration", "tokio", - "windows 0.34.0", + "windows", ] [[package]] @@ -4816,19 +4895,19 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.3", ] [[package]] name = "indicatif" -version = "0.17.6" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b297dc40733f23a0e52728a58fa9489a5b7638a324932de16b41adc3ef80730" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" dependencies = [ "console", "instant", @@ -4882,67 +4961,48 @@ dependencies = [ "bridge-hub-polkadot-runtime", "bridge-runtime-common", "collectives-polkadot-runtime", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "frame-support", + "cumulus-pallet-dmp-queue 0.6.0", + "cumulus-pallet-parachain-system 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "frame-support 27.0.0", "kusama-runtime-constants", - "pallet-assets", - "pallet-balances", + "pallet-assets 28.0.0", + "pallet-balances 27.0.0", "pallet-bridge-messages", - "pallet-im-online", - "pallet-message-queue", - "pallet-staking", - "pallet-xcm", - "parachains-common", + "pallet-im-online 26.0.0", + "pallet-message-queue 30.0.0", + "pallet-staking 27.0.0", + "pallet-xcm 6.0.0", + "parachains-common 6.0.0", "parity-scale-codec", "paste", "penpal-runtime", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-primitives", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", + "polkadot-primitives 6.0.0", "polkadot-runtime", "polkadot-runtime-constants", - "polkadot-runtime-parachains", + "polkadot-runtime-parachains 6.0.0", "serde_json", - "sp-authority-discovery", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-consensus-grandpa", - "sp-core", - "sp-runtime", + "sp-authority-discovery 25.0.0", + "sp-consensus-babe 0.31.0", + "sp-consensus-beefy 12.0.0", + "sp-consensus-grandpa 12.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", "staging-kusama-runtime", - "staging-xcm", + "staging-xcm 6.0.0", "xcm-emulator", ] -[[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.2", + "hermit-abi 0.3.3", "libc", "windows-sys 0.48.0", ] @@ -4959,7 +5019,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.3", + "socket2 0.5.5", "widestring", "windows-sys 0.48.0", "winreg", @@ -4967,9 +5027,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" @@ -4977,8 +5037,8 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.2", - "rustix 0.38.8", + "hermit-abi 0.3.3", + "rustix 0.38.28", "windows-sys 0.48.0", ] @@ -5002,24 +5062,24 @@ dependencies = [ [[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.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] @@ -5057,7 +5117,7 @@ dependencies = [ "tokio-rustls", "tokio-util", "tracing", - "webpki-roots 0.25.2", + "webpki-roots 0.25.3", ] [[package]] @@ -5068,7 +5128,7 @@ checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" dependencies = [ "anyhow", "arrayvec 0.7.4", - "async-lock", + "async-lock 2.8.0", "async-trait", "beef", "futures-channel", @@ -5170,15 +5230,15 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" dependencies = [ "cfg-if", - "ecdsa 0.16.8", - "elliptic-curve 0.13.5", + "ecdsa", + "elliptic-curve", "once_cell", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -5200,14 +5260,14 @@ checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" name = "kusama-runtime-constants" version = "1.0.0" dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", + "frame-support 27.0.0", + "polkadot-primitives 6.0.0", + "polkadot-runtime-common 6.0.0", "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", - "staging-xcm", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-weights 26.0.0", + "staging-xcm 6.0.0", ] [[package]] @@ -5257,9 +5317,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] name = "libloading" @@ -5279,14 +5339,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", "futures-timer", - "getrandom 0.2.10", + "getrandom 0.2.12", "instant", "libp2p-allow-block-list", "libp2p-connection-limits", @@ -5304,7 +5364,6 @@ dependencies = [ "libp2p-swarm", "libp2p-tcp", "libp2p-wasm-ext", - "libp2p-webrtc", "libp2p-websocket", "libp2p-yamux", "multiaddr", @@ -5349,7 +5408,7 @@ dependencies = [ "libp2p-identity", "log", "multiaddr", - "multihash", + "multihash 0.17.0", "multistream-select", "once_cell", "parking_lot 0.12.1", @@ -5409,10 +5468,10 @@ dependencies = [ "ed25519-dalek", "log", "multiaddr", - "multihash", + "multihash 0.17.0", "quick-protobuf", "rand 0.8.5", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", "zeroize", ] @@ -5437,7 +5496,7 @@ dependencies = [ "log", "quick-protobuf", "rand 0.8.5", - "sha2 0.10.7", + "sha2 0.10.8", "smallvec", "thiserror", "uint", @@ -5460,7 +5519,7 @@ dependencies = [ "log", "rand 0.8.5", "smallvec", - "socket2 0.4.9", + "socket2 0.4.10", "tokio", "trust-dns-proto", "void", @@ -5495,7 +5554,7 @@ dependencies = [ "once_cell", "quick-protobuf", "rand 0.8.5", - "sha2 0.10.7", + "sha2 0.10.8", "snow", "static_assertions", "thiserror", @@ -5537,7 +5596,7 @@ dependencies = [ "parking_lot 0.12.1", "quinn-proto", "rand 0.8.5", - "rustls 0.20.8", + "rustls 0.20.9", "thiserror", "tokio", ] @@ -5602,7 +5661,7 @@ dependencies = [ "libc", "libp2p-core", "log", - "socket2 0.4.9", + "socket2 0.4.10", "tokio", ] @@ -5616,12 +5675,12 @@ dependencies = [ "futures-rustls", "libp2p-core", "libp2p-identity", - "rcgen 0.10.0", - "ring", - "rustls 0.20.8", + "rcgen", + "ring 0.16.20", + "rustls 0.20.9", "thiserror", - "webpki 0.22.0", - "x509-parser 0.14.0", + "webpki", + "x509-parser", "yasna", ] @@ -5639,37 +5698,6 @@ dependencies = [ "wasm-bindgen-futures", ] -[[package]] -name = "libp2p-webrtc" -version = "0.4.0-alpha.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba48592edbc2f60b4bc7c10d65445b0c3964c07df26fdf493b6880d33be36f8" -dependencies = [ - "async-trait", - "asynchronous-codec", - "bytes", - "futures", - "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" @@ -5702,6 +5730,17 @@ dependencies = [ "yamux", ] +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] + [[package]] name = "librocksdb-sys" version = "0.11.0+8.1.1" @@ -5744,7 +5783,7 @@ checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" dependencies = [ "crunchy", "digest 0.9.0", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] @@ -5767,9 +5806,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.12" +version = "1.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" +checksum = "295c17e837573c8c821dbaeb3cceb3d745ad082f7572191409e69cbc1b3fd050" dependencies = [ "cc", "pkg-config", @@ -5802,9 +5841,9 @@ dependencies = [ [[package]] name = "linregress" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4de0b5f52a9f84544d268f5fabb71b38962d6aa3c6600b8bcd27d44ccf9c9c45" +checksum = "4de04dcecc58d366391f9920245b85ffa684558a5ef6e7736e754347c3aea9c2" dependencies = [ "nalgebra", ] @@ -5817,15 +5856,9 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "lioness" @@ -5841,9 +5874,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -5988,36 +6021,27 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matrixmultiply" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" +checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" dependencies = [ "autocfg", "rawpointer", ] -[[package]] -name = "md-5" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" -dependencies = [ - "digest 0.10.7", -] - [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memfd" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" +checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.37.23", + "rustix 0.38.28", ] [[package]] @@ -6029,15 +6053,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.8.0" @@ -6047,15 +6062,6 @@ 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" @@ -6105,9 +6111,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -6134,7 +6140,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rand_distr", - "subtle 2.4.1", + "subtle 2.5.0", "thiserror", "zeroize", ] @@ -6177,7 +6183,7 @@ dependencies = [ "data-encoding", "log", "multibase", - "multihash", + "multihash 0.17.0", "percent-encoding", "serde", "static_assertions", @@ -6207,12 +6213,55 @@ dependencies = [ "blake3", "core2", "digest 0.10.7", - "multihash-derive", - "sha2 0.10.7", + "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" @@ -6227,6 +6276,31 @@ dependencies = [ "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", + "syn 1.0.109", + "synstructure", +] + [[package]] name = "multimap" version = "0.8.3" @@ -6364,7 +6438,6 @@ dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", - "memoffset 0.6.5", ] [[package]] @@ -6442,9 +6515,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", "libm", @@ -6456,7 +6529,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi 0.3.3", "libc", ] @@ -6480,36 +6553,27 @@ dependencies = [ [[package]] name = "object" -version = "0.32.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" +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" @@ -6559,7 +6623,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d035b1f968d91a826f2e34a9d6d02cb2af5aa7ca39ebd27922d850ab4b2dd2c6" dependencies = [ "expander 2.0.0", - "indexmap 2.0.0", + "indexmap 2.1.0", "itertools 0.11.0", "petgraph", "proc-macro-crate 1.3.1", @@ -6577,83 +6641,61 @@ dependencies = [ "num-traits", ] -[[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.7", -] - -[[package]] -name = "p384" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" -dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.7", -] - [[package]] name = "pallet-alliance" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3526a94a8aca9d98f06eb8ee76e1bf65f80fd23c278b25e6537a23b51392a85" +checksum = "cf8ceda912ff13d75e4144724daec0b0829ccf7a518b672e91d027f431d3d327" dependencies = [ - "array-bytes 6.1.0", - "frame-benchmarking", - "frame-support", - "frame-system", + "array-bytes 6.2.2", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-collective", + "pallet-collective 27.0.0", "pallet-identity", "parity-scale-codec", "scale-info", - "sp-core", - "sp-core-hashing", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-core-hashing 14.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-asset-conversion" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7f0ae643c877d9a36d7335bcda6614861b846a60f448da8cf3276d4042ef33" +checksum = "e4b91839d5d00be65483a80964eb9c6f60e59bfcc3dbafc2899c46b0465ebecb" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-api", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-api 25.0.0", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-asset-conversion-tx-payment" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64952179a5a409dead964a387c86a29d16d40a34cf54bf88e4d74ffdcdddf7a6" +checksum = "80810624ea3a3bab34568a45c7abca5777d60ed6312e271d04893ee5e69e002e" dependencies = [ - "frame-support", - "frame-system", + "frame-support 27.0.0", + "frame-system 27.0.0", "pallet-asset-conversion", - "pallet-transaction-payment", + "pallet-transaction-payment 27.0.0", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -6662,14 +6704,30 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "740aebbcfefe8528f56ff8a339f810520a28df3ec159d016ef719aaa9f131af4" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "parity-scale-codec", + "scale-info", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-asset-rate" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "094849e7310c9ad5d7dabf20ec8792c61812af32d4cc96b4319b973d320863fd" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -6678,17 +6736,36 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "028e30633114612160fc4e7add46504790abb3780db79eae1efae98c034dca0b" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "pallet-transaction-payment", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "pallet-transaction-payment 25.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-asset-tx-payment" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3855550f4440a6e7ed47b23945473d708bb76e6a3c41f1a132514e0ed91349" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "pallet-transaction-payment 27.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -6697,15 +6774,32 @@ version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09b91035c82dc9e64eaf52f3f6a39f4674bcb56333553882d6ff5d12500a9182" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-assets" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0394a32537f67d6f2d0b5642be44bcd2e3ffd44ba458ea4b756dd6e9168cd90" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -6714,16 +6808,34 @@ version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04fbef67cf62445b7fd8e68241e6b71d9fb8c77abb3d52259eebf525a4cd5586" dependencies = [ - "frame-support", - "frame-system", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "pallet-timestamp 24.0.0", + "parity-scale-codec", + "scale-info", + "sp-application-crypto 27.0.0", + "sp-consensus-aura 0.29.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-aura" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "796c9823f84c4fc3b92b170ef9339bad67f9376a16d8df943331b72809dade39" +dependencies = [ + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-timestamp", + "pallet-timestamp 26.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-consensus-aura", - "sp-runtime", - "sp-std", + "sp-application-crypto 29.0.0", + "sp-consensus-aura 0.31.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -6732,15 +6844,32 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fda272a66bbf1602579efcede67606ac43cda6d462ad551c527d8cadc871813d" dependencies = [ - "frame-support", - "frame-system", - "pallet-session", + "frame-support 25.0.0", + "frame-system 25.0.0", + "pallet-session 25.0.0", + "parity-scale-codec", + "scale-info", + "sp-application-crypto 27.0.0", + "sp-authority-discovery 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-authority-discovery" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "361a82bd3370cef45db42171bb335c124ce19d577d6b3af22b3956d57aec631f" +dependencies = [ + "frame-support 27.0.0", + "frame-system 27.0.0", + "pallet-session 27.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-authority-discovery", - "sp-runtime", - "sp-std", + "sp-application-crypto 29.0.0", + "sp-authority-discovery 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -6749,13 +6878,28 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d38eab59f7d15fe43c81fc3cd92f4c1f895ca6d0efb74fc2a6d6d7d3d34d413" dependencies = [ - "frame-support", - "frame-system", + "frame-support 25.0.0", + "frame-system 25.0.0", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-authorship" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37359c9f33c8f660126390b42281c0c1c6736ff2f7e1f1361299234f43fd3de8" +dependencies = [ + "frame-support 27.0.0", + "frame-system 27.0.0", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -6764,46 +6908,71 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b12430ca4b79b27231acb1ff3f99d33d6503fbeba40bfc8380e42d59b6d52b0" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", - "pallet-authorship", - "pallet-session", - "pallet-timestamp", + "pallet-authorship 25.0.0", + "pallet-session 25.0.0", + "pallet-timestamp 24.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-consensus-babe", - "sp-core", - "sp-io", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", + "sp-application-crypto 27.0.0", + "sp-consensus-babe 0.29.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-session 24.0.0", + "sp-staking 23.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-babe" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3ef6815dbc5ceb3f036e7b4037a6a37876df8817cec07637f269f79879430d2" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "log", + "pallet-authorship 27.0.0", + "pallet-session 27.0.0", + "pallet-timestamp 26.0.0", + "parity-scale-codec", + "scale-info", + "sp-application-crypto 29.0.0", + "sp-consensus-babe 0.31.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-bags-list" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d49c4448e51a5c64d63a4263aebeb2dfb90dabb48746e178b337fb7f533d45f" +checksum = "46d48f60b6da70607edc794cc05e72ae70ea532ec539094ffcc4c7c9250a453b" dependencies = [ "aquamarine", "docify", - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-balances", + "pallet-balances 27.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-tracing", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-tracing 15.0.0", ] [[package]] @@ -6812,185 +6981,200 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9de2915b425ae77d63ba25c194780599b7be25307454a138cfb316c16d001e68" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-balances" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "919a13c14461ab698c59aadd80d23694c98a17ed6c2dd7c8cc974577738f1836" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-beefy" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8563fce9fdb0e557015c0b58ed7ea7d5c1a4a1ddb1d27bf56e040d6bbf5c79e9" +checksum = "24b6a09b8f3cc9dcc2edac7319ffc4f74ada08d570eb3fb23aed00b49b4c437f" dependencies = [ - "frame-support", - "frame-system", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-authorship", - "pallet-session", + "pallet-authorship 27.0.0", + "pallet-session 27.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-consensus-beefy", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", + "sp-consensus-beefy 12.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-beefy-mmr" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee3ed75c348ba23064cea40dab623719ef348bfe67ea39f195f82e2e7a7d0115" +checksum = "e959c1126a433a8a6e756c8e85081e727a60c75353785a2b805ea25d2f7ff5fd" dependencies = [ - "array-bytes 6.1.0", + "array-bytes 6.2.2", "binary-merkle-tree", - "frame-support", - "frame-system", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "pallet-beefy", "pallet-mmr", - "pallet-session", + "pallet-session 27.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-api", - "sp-consensus-beefy", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", - "sp-std", + "sp-api 25.0.0", + "sp-consensus-beefy 12.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-bounties" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74c0fb83c88f217e5bfe07a69a6d8a6c32d01241159ab81705ba5d4c3e24aaab" +checksum = "9982eb7f49564bd1815c804a1ca73a15f7d021a70d36cfb35c1e2f5dffb7c739" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-treasury", + "pallet-treasury 26.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-bridge-grandpa" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc5083b92333f5ad64eb97d7e54978bd53c9ac8de8ac3c4056585fd236254d0" +checksum = "17d6a612927f39c3a92a426fe0d226cc17b2bc8b60122e767d186d5e210ed12a" dependencies = [ "bp-header-chain", "bp-runtime", "bp-test-utils", "finality-grandpa", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-consensus-grandpa", - "sp-runtime", - "sp-std", - "sp-trie", + "sp-consensus-grandpa 12.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-trie 28.0.0", ] [[package]] name = "pallet-bridge-messages" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e61922a3b67f17508e27ab2bba9dd03d4b2e6878d8c0819f7e155544443cfd" +checksum = "69cfc14baf0e65041a2cf9874c08d3e82212fe5d10f6a3ac1d0f40fcffac188f" dependencies = [ "bp-messages", "bp-runtime", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "num-traits", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-bridge-parachains" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88703f22433e3bc5ba69f89b6002fd28c74753a1ab425117f103e91fec05696a" +checksum = "80f4ab34d6a2c3bf8f72a3c1dc8bab5c0097e8d9ce27083f69b4d1c7d619ec61" dependencies = [ "bp-header-chain", "bp-parachains", "bp-polkadot-core", "bp-runtime", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "pallet-bridge-grandpa", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", - "sp-trie", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-trie 28.0.0", ] [[package]] name = "pallet-bridge-relayers" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04af803c4fb3e48a83325bb4781505fc5268e364f488116cf6718ddbbe57937d" +checksum = "273095478c3a09de73b7a01db3b2f938070621bc47e92cbbdadd31b7ba73f94c" dependencies = [ "bp-messages", "bp-relayers", "bp-runtime", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-runtime", - "sp-std", + "sp-arithmetic 22.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-child-bounties" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2246ce705aee37f9b6ad818e3646910d31ef4191e1c234bff054a710ef8d8a38" +checksum = "4a27dfd21f4b038b534376d289954dc2fe735101b5d07ed6356f8578a1e134d2" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "pallet-bounties", - "pallet-treasury", + "pallet-treasury 26.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -6999,18 +7183,38 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66c093c8867dbdb540da33076566605320b2eda78da5062d3d954f05862db18d" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "pallet-authorship 25.0.0", + "pallet-session 25.0.0", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sp-runtime 28.0.0", + "sp-staking 23.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-collator-selection" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c352469427fb52314865ec220c8b83d05457de6c99f746b497575bb5c224682" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-authorship", - "pallet-session", + "pallet-authorship 27.0.0", + "pallet-session 27.0.0", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] @@ -7019,72 +7223,90 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dddb120b5ee520146617a8c49b4d4c980ba9188918d43085539bf78815e7ec1d" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-collective" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e45e487c9ff2e3d36265f4cd2ead2721f9881670417c767fd95081d28bb2c890" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-conviction-voting" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c8ff7512a377b708f71772e5169550cebc8f74bc8c26553015698eaa0975356" +checksum = "d93572f2a2e85e419bcd13ed65093eef677d7001616c7ba078fa05106dae11a1" dependencies = [ "assert_matches", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-core-fellowship" -version = "9.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c52f9f5ce35127f55972845c49604309e8df81facbc34560abc680df5515383" +checksum = "6d8c79b5837a1ba4b1803e2b03ccbc761deb5f84589227faa3995e20e7d7afdf" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-democracy" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9f24ad18db2eeae0f03ba1743a82aaf300e0bbd6cdcb1119b0da93eef3d77f" +checksum = "9e0aa3ee4c1c4b530b9d6a1dfdfbac69b64a9bad3d2fdd4748b961a4ec0962c2" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -7093,21 +7315,45 @@ version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "481178ef558a9409d9c12fc01279b517e3a0a7797664e89761447dba3a182ce6" dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-election-provider-support 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", - "pallet-election-provider-support-benchmarking", + "pallet-election-provider-support-benchmarking 24.0.0", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-npos-elections", - "sp-runtime", - "sp-std", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-npos-elections 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "strum", +] + +[[package]] +name = "pallet-election-provider-multi-phase" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3f6303bbd336414959861b9a530f53e295d66f8d27dd8bd626daaf8fa051a1f" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "log", + "pallet-election-provider-support-benchmarking 26.0.0", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-npos-elections 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", "strum", ] @@ -7117,33 +7363,48 @@ version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5ab6413ec88b64acf849a202795c67940dc3bcc846ce03bd0893b90e2119ecf" dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-election-provider-support 25.0.0", + "frame-system 25.0.0", "parity-scale-codec", - "sp-npos-elections", - "sp-runtime", - "sp-std", + "sp-npos-elections 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] -name = "pallet-elections-phragmen" +name = "pallet-election-provider-support-benchmarking" version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "021da1d28b604b3654f895987dcb1ccb47d73102b31bc84c8f784bed261f01d8" +checksum = "baa4d9a426c024e1aa3bb6adbb03aa3b6887be8775e3fba0abda48ca9b17c864" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-system 27.0.0", + "parity-scale-codec", + "sp-npos-elections 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", +] + +[[package]] +name = "pallet-elections-phragmen" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a9f5a24ff9e46113edc57dfc1be6343652fac6dd967662cdc82b194aa38be9e" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-npos-elections", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-npos-elections 25.0.0", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] @@ -7154,16 +7415,16 @@ checksum = "32a2ea2b74c36582daf64b632064b3525da8aa2cdced57581272264ebd811a7a" dependencies = [ "approx", "encointer-primitives", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", - "pallet-asset-tx-payment", - "pallet-transaction-payment", + "pallet-asset-tx-payment 25.0.0", + "pallet-transaction-payment 25.0.0", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7173,15 +7434,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0858d85b205d1026ccfc7e617d0028357efcfdaa9918e6ad4896f93eda3bc960" dependencies = [ "encointer-primitives", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", "pallet-encointer-communities", "parity-scale-codec", "scale-info", - "sp-core", - "sp-std", + "sp-core 25.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7191,9 +7452,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6471fa29e940363ff8090bb620ad82564286f955bfaa33a15147190438542aa6" dependencies = [ "encointer-primitives", - "frame-support", - "sp-api", - "sp-std", + "frame-support 25.0.0", + "sp-api 23.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7205,21 +7466,21 @@ dependencies = [ "encointer-ceremonies-assignment", "encointer-meetup-validation", "encointer-primitives", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", "pallet-encointer-balances", "pallet-encointer-communities", "pallet-encointer-scheduler", - "pallet-timestamp", + "pallet-timestamp 24.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-application-crypto 27.0.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7229,9 +7490,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af85c19a7b83a255348a95ee0b691810088320c36319eb4446eb527f0e854a04" dependencies = [ "encointer-primitives", - "frame-support", - "sp-api", - "sp-std", + "frame-support 25.0.0", + "sp-api 23.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7241,17 +7502,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b78031c09e3adc31ba279bb18186e379222a7b54a14d59288040dc205621e49" dependencies = [ "encointer-primitives", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", "pallet-encointer-balances", "pallet-encointer-scheduler", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7261,8 +7522,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1808d7908167315f12204db923a35f4af851e7c53b73351ed7d1b9e53a8c948d" dependencies = [ "encointer-primitives", - "sp-api", - "sp-std", + "sp-api 23.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7273,18 +7534,18 @@ checksum = "64fdd1b8885dfb83e249af6a8914a38e3d5ea5f01d196ae35ec1420e502a54ef" dependencies = [ "approx", "encointer-primitives", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", "pallet-encointer-communities", "pallet-encointer-reputation-commitments", - "pallet-treasury", + "pallet-treasury 24.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7295,19 +7556,19 @@ checksum = "27da548ae6f6070797c3270160cc0c76d4ddc20575d63e5a615d6f28d99c7cb5" dependencies = [ "approx", "encointer-primitives", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", "pallet-encointer-ceremonies", "pallet-encointer-communities", "pallet-encointer-scheduler", - "pallet-timestamp", + "pallet-timestamp 24.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7317,16 +7578,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ffe4e1efc5084466c4c0ae1d835651a29ab3ee8fc68933ae14df00d0875441b" dependencies = [ "encointer-primitives", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "impl-trait-for-tuples", "log", - "pallet-timestamp", + "pallet-timestamp 24.0.0", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7336,77 +7597,97 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05634a197738c999a3032393916182fedccce13cb063fc330ee9bf810cd53b49" dependencies = [ "docify", - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-election-provider-support 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-staking 23.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-fast-unstake" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9186636e923b4be260d4a9cfff2aabb2620c6d0c755396ab31b0c74f1883891b" +dependencies = [ + "docify", + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-glutton" -version = "11.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3686506ac15f9b0442f5dffe496b68fca391116acfb6baef65524bb08c94f4" +checksum = "26571660041ba596c43ee71992be20950e80d71f4199dfa8e57691a6757e20e9" dependencies = [ "blake2 0.10.6", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-grandpa" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b87c7f4cd94a526054dfebf7a84fbcaf6385033defa246ad83e321e71f8c5a92" +checksum = "a8127d9f60e5b5e88014ee9423245503704fd188a972be2a02cb921a470db762" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-authorship", - "pallet-session", + "pallet-authorship 27.0.0", + "pallet-session 27.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-consensus-grandpa", - "sp-core", - "sp-io", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", + "sp-application-crypto 29.0.0", + "sp-consensus-grandpa 12.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-identity" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "735bf6c19d30299e2d448797170a67d41c6a8ba593fb3a71ce4e11d3b85c60e9" +checksum = "b094c99305f6b61b6aead5b8fbfa44dafa002696dd5c663336a7eb3b68950c46" dependencies = [ "enumflags2", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -7415,37 +7696,58 @@ version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59eb1c68cc6b4700ad1d2a81ba847ff7b37406aa0326b7716825155d3f985762" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "pallet-authorship 25.0.0", + "parity-scale-codec", + "scale-info", + "sp-application-crypto 27.0.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-staking 23.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-im-online" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "273b6bd0c0f098b935714a59f9487e64382e87de49a7cf6d6dd8cdeb63be0aed" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-authorship", + "pallet-authorship 27.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-application-crypto 29.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-indices" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0893ae7f2211010e92bf57fe31f18e2223a2f97f6d6393aa7192e283ec520beb" +checksum = "81e5eeda9acaed9968ebe2221f8f18fcee7103b7f1f739ef6c20f73e5e3bf447" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-keyring", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-keyring 30.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -7454,13 +7756,13 @@ version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df4d7fab2948940925d4c0076ec542b2c67b37a5332449f102241993d31a8b41" dependencies = [ - "frame-support", - "frame-system", + "frame-support 25.0.0", + "frame-system 25.0.0", "parity-scale-codec", "safe-mix", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7469,16 +7771,34 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e1504034588eb733f8ce98b77757e9a7390662313aa133ef1e3b9fbb94359c7" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-membership" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d662c6cdf6c2ead71ba1d2dbf1c0fef0fa9edbfdcc05377c2db056fe00a9f1da" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -7487,233 +7807,254 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0776bf51d03bd746159063fa1357234feb85114273d40ef3aa3efba65d091eb4" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-weights 24.0.0", +] + +[[package]] +name = "pallet-message-queue" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8290ebbf3fafdd90f7db6a249101c3bcc6428e089476d6ac237e2339da97401" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-weights 26.0.0", ] [[package]] name = "pallet-mmr" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b9789cac80b48e9427724d0b400f984fb844fc711fc2dd2d0cdccdedda7169" +checksum = "ac6e31cef5ee5cc094a3ffbb7fc5a1424a5a4c877143541dbf51a29724d6d4cb" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-mmr-primitives", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-mmr-primitives 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-multisig" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea2785a0bfb1884a8283bf65010bb7189c8fce958ced9947a8c71c148ef199f" +checksum = "d97de91a840d8fa4f2eb0dea5de7dd06221b39dd0955c3065ae4a10f63a0ba2c" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-nft-fractionalization" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "959fb2e68e4421650538d9b64a3243f0a0cdc8962f35f749af18bf9b70f7253d" +checksum = "e19791a4d82d7d23a0bcf2ce93b9317915d1979c9be817171655ce6e992c40f3" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-assets", + "pallet-assets 28.0.0", "pallet-nfts", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-nfts" -version = "19.0.0" +version = "21.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "999a30c5861a83a6ab38a564df99f976f0bc6bf54b03620abc568bba5f7b4834" +checksum = "86d848b63485ca0877e5a6e407cf67d54acb35591db455a6b3151fa105d0c7de" dependencies = [ "enumflags2", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-nfts-runtime-api" -version = "11.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a64c725e28fdf7d2512c1ce8eab8ba05fc7211fb864ee6c3d2300a2b3bd381" +checksum = "9d0b15d938dd4d0d40f95721d9bc0f93e8bc2de01b91432cd8abce7f3348bf2d" dependencies = [ "pallet-nfts", "parity-scale-codec", - "sp-api", + "sp-api 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-nis" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aa7ec891b7f1801a405095a2ad2c70eef94d2abe86792eee54794de23cbd035" +checksum = "0aeb66fc313fa20704203134b93f2df3b9470a56021a3a2e31a28668cc29293b" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-runtime", - "sp-std", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-nomination-pools" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1896f33fff0c41934532fb492078d78b784f301ddd81e5041dd8e8279e652c49" +checksum = "fdcf958a1c1f516adad578c697907bd03a9f4a94533100fb788bea7566b9745d" dependencies = [ - "frame-support", - "frame-system", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-balances", + "pallet-balances 27.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", - "sp-tracing", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", + "sp-tracing 15.0.0", ] [[package]] name = "pallet-nomination-pools-benchmarking" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b27cbf4a47cc79862d254f16b38c68fd2dda087ce58e7c0021859d89718e865a" +checksum = "fb69a53b558f5382eba0bb875f03823ec105300a40738ae16b64eca748249a4c" dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "pallet-bags-list", "pallet-nomination-pools", - "pallet-staking", + "pallet-staking 27.0.0", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-runtime-interface", - "sp-staking", - "sp-std", + "sp-runtime 30.0.1", + "sp-runtime-interface 23.0.0", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-nomination-pools-runtime-api" -version = "20.0.0" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65c256cc530a19ff614f2af9b5c95ae9aa777a2bf1542aa455ae65e842f8c924" +checksum = "1a586ad28735a59b0a74a5aeee43820911f2a384b8f5321f5a4b8f8a026f3173" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", - "sp-api", - "sp-std", + "sp-api 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-offences" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3fd14c02ed4b689652826aa93284aada5a2cf859df3cc34ad88b2fd410a8c50" +checksum = "c77352f9a1afcde5d36395c9847e14c75d73c379e4f9ff7643f5d64741f20587" dependencies = [ - "frame-support", - "frame-system", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-balances", + "pallet-balances 27.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-offences-benchmarking" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1b3ae77cfb16f0495372853d42a44e34ab7b183bd8996a8cee91715f783ff49" +checksum = "fb14e278769dba2a6ebcced6fd565015f09f7f9366add0ff10156744e551c8d3" dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-babe", - "pallet-balances", + "pallet-babe 27.0.0", + "pallet-balances 27.0.0", "pallet-grandpa", - "pallet-im-online", + "pallet-im-online 26.0.0", "pallet-offences", - "pallet-session", - "pallet-staking", + "pallet-session 27.0.0", + "pallet-staking 27.0.0", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-preimage" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed40405c758b52375cfc75aac74f10ff9bb9480569e5cfca42682e2db6c387" +checksum = "74e6ef7cdf7de30219789470d3c6d1606a10e34cad4891738033ae1a1fe92e30" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -7722,88 +8063,104 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fbc0b550f5cbbad51f9daf795cc7046d40bbff256dae8d6072fd710ab40fd3a" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "parity-scale-codec", + "scale-info", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-proxy" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f1e89e043a6059fc19ada02364da3f20570f18b5eefdb6b20332e495218acb1" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-ranked-collective" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8181da7fd6b9adf4f8641c5bcb156cd209e3226eea87ee9f9b1ac41f8e37c714" +checksum = "f613ea43dcad3cb29f948e4889aace0a604495360cad32297a4b0c4591615dfb" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-recovery" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "889fddd16cfdea09c2ae4dc8e9f67a1ec4b8ac680412cffb772fa572489ec687" +checksum = "30b5e90c670d6275b77ef12ecf794a799020815a03d5dfe1b98288772ff14b7f" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-referenda" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "592ff9873af379bf55e835072afd787cd6435204213ac484e86345b026f4ae4e" +checksum = "6c91a148d8fa3e11738ccc650fdfaf1f055b1283099b12b8dc430b39a7fb3988" dependencies = [ "assert_matches", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-io", - "sp-runtime", - "sp-std", + "sp-arithmetic 22.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-salary" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ac035a8cccd7297ad03ad8ebe372b01f451aaafa9b243f5ce59b061d0806b1" +checksum = "86997dc4190bc440a8954c297ce03a14286cd57c1d778824d3686c7289b8b31c" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -7813,16 +8170,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3508a51d359c6640577feead9dc00667f38cec385baad77b636c61ff746ffe24" dependencies = [ "docify", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-weights 24.0.0", +] + +[[package]] +name = "pallet-scheduler" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6261d6f18bb2ed22451a87aac91f40e6d9753249827235fbc2aa1ccfe576c594" +dependencies = [ + "docify", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-weights 26.0.0", ] [[package]] @@ -7831,58 +8206,81 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "768a6fb5333efc2bd2a3538c1d6ffa4178398660d4e3be89f2eb82d4e9088ae6" dependencies = [ - "frame-support", - "frame-system", + "frame-support 25.0.0", + "frame-system 25.0.0", + "impl-trait-for-tuples", + "log", + "pallet-timestamp 24.0.0", + "parity-scale-codec", + "scale-info", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-session 24.0.0", + "sp-staking 23.0.0", + "sp-state-machine 0.32.0", + "sp-std 12.0.0", + "sp-trie 26.0.0", +] + +[[package]] +name = "pallet-session" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d08a1fd9bcdead33c7d8b3a483241084575e19943c0f806194b96d731cf7a80b" +dependencies = [ + "frame-support 27.0.0", + "frame-system 27.0.0", "impl-trait-for-tuples", "log", - "pallet-timestamp", + "pallet-timestamp 26.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-state-machine", - "sp-std", - "sp-trie", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-staking 25.0.0", + "sp-state-machine 0.34.0", + "sp-std 13.0.0", + "sp-trie 28.0.0", ] [[package]] name = "pallet-session-benchmarking" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5401cee669394e86a15851ace4ad60ef1b4d656f11ff22c83d8004051279ea59" +checksum = "08c8a1fe52d8f2fc79e4784f8c96f3e3bed6da5d343bedaa4237c5641563f8cc" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "pallet-session", - "pallet-staking", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "pallet-session 27.0.0", + "pallet-staking 27.0.0", "parity-scale-codec", "rand 0.8.5", - "sp-runtime", - "sp-session", - "sp-std", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-society" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36959be2c7f810ba6b8ece8cfe2ee515774c1c776f1ed0bebf3b9e8068f6a435" +checksum = "0dcf8c3ee3e104d3c069af9c261e3a84b57e74622ac98630f5925c1ad9ffaeb5" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", - "sp-arithmetic", - "sp-io", - "sp-runtime", - "sp-std", + "sp-arithmetic 22.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -7891,22 +8289,46 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bed335abd32d357dd9750dae7fb87b01dfd8fe69faadcb94a6e0e0a43057d923" dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-election-provider-support 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "pallet-authorship 25.0.0", + "pallet-session 25.0.0", + "parity-scale-codec", + "rand_chacha 0.2.2", + "scale-info", + "serde", + "sp-application-crypto 27.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-staking 23.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-staking" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "721324165298bdc5f3dc8838a0e94d7ca1e471a702185dfbbafff84d89945e4e" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-authorship", - "pallet-session", + "pallet-authorship 27.0.0", + "pallet-session 27.0.0", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", "serde", - "sp-application-crypto", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-application-crypto 29.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] @@ -7928,52 +8350,63 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45b6f832653badb5f70bdfecc1ded64b02b8159b27f18515af03f8b80f1b023b" dependencies = [ "log", - "sp-arithmetic", + "sp-arithmetic 20.0.0", +] + +[[package]] +name = "pallet-staking-reward-fn" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f5b0d52306a74510f730567ed9543b7e4eac9043fd519cdc94ba5b3850befa" +dependencies = [ + "log", + "sp-arithmetic 22.0.0", ] [[package]] name = "pallet-staking-runtime-api" -version = "11.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773c0d24ad4da4b505e47b43e91c8c0af4e835f16104bc770732a4796c174748" +checksum = "4ce19dffced5c3455016a3f80f33f92aba903675d09c3c81a2919abc4cf78725" dependencies = [ "parity-scale-codec", - "sp-api", + "sp-api 25.0.0", + "sp-staking 25.0.0", ] [[package]] name = "pallet-state-trie-migration" -version = "26.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "550292d79f281fd1bfbbf2643f10cef3d67068075d46374295f2efe7f7113da0" +checksum = "61bfbf58d5c787a4e25d1bb2ac29c9a86c31f9e82e129f624e5fd0e71bc8476e" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-sudo" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcec9f73ecb8d0439a13043a253a9fd90aa6bf5aece6470194bbfc7f79256d88" +checksum = "1273597599b58a462454f8ce626b517183b7008a438dbbcc8989ea6980a10c6f" dependencies = [ "docify", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -7983,38 +8416,59 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b25ec8749cf3f481b5e5199be701bac0dea835851b83fc7c455192762711858d" dependencies = [ "docify", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-inherents 23.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-storage 17.0.0", + "sp-timestamp 23.0.0", +] + +[[package]] +name = "pallet-timestamp" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33e72c2e35a574dff24f58ff8a1d19cd997858600a1cf608c3a28477fb9bfed3" +dependencies = [ + "docify", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-std", - "sp-storage", - "sp-timestamp", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-timestamp 25.0.0", ] [[package]] name = "pallet-tips" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b17cf8b964e5533f1f5ac1f087f3f69adfead754cb5dd25abe395ec1e7abc9" +checksum = "2943d26f89e3bf74c95634ca31a8f62e743dc4dc9fbb7323fd4799e5cf722c10" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-treasury", + "pallet-treasury 26.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -8023,15 +8477,32 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87ef7ceaac786e41613731e3bc48284f1aa3ec260934abda2daed949de6e5ada" dependencies = [ - "frame-support", - "frame-system", + "frame-support 25.0.0", + "frame-system 25.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-transaction-payment" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fdf0cba2fe991bd14562b3e6504fa78eaf079e5b84ff6747edfe50049366aa1" +dependencies = [ + "frame-support 27.0.0", + "frame-system 27.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -8040,11 +8511,24 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07d87fdc4028155367c6ea98143054a6c00b38bfd77ec08681e289e429e35505" dependencies = [ - "pallet-transaction-payment", + "pallet-transaction-payment 25.0.0", + "parity-scale-codec", + "sp-api 23.0.0", + "sp-runtime 28.0.0", + "sp-weights 24.0.0", +] + +[[package]] +name = "pallet-transaction-payment-rpc-runtime-api" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12eb6403383c384bb922392292d20dad26d95f44292f08d4444ef4a16f892671" +dependencies = [ + "pallet-transaction-payment 27.0.0", "parity-scale-codec", - "sp-api", - "sp-runtime", - "sp-weights", + "sp-api 25.0.0", + "sp-runtime 30.0.1", + "sp-weights 26.0.0", ] [[package]] @@ -8054,33 +8538,53 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8dd462af11574485864023849e0622916b611dbc88111192fb39b1e6d7e666ba" dependencies = [ "docify", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "impl-trait-for-tuples", + "pallet-balances 25.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-treasury" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b173de5886d221ab2be524b29d2febb0f5f8f57a47bb0152a8a153a7ab573f1" +dependencies = [ + "docify", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "impl-trait-for-tuples", - "pallet-balances", + "pallet-balances 27.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-uniques" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8010c79bac1b78fb35b3ee17b40469dec3fcf2eaa6fd863c5be5d96f2ad46bfd" +checksum = "04892f18f0efe31883af1f0998827a08c0b55eb65d8e3818c5a14965dc6ee27f" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -8089,15 +8593,32 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85a8a6941da32837e4297e0d8abe0a5c94f348a119cccbf27b0f99ee01246c0e" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-utility" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae212409d911bfd5c3cfe078afc71375431547cf0b24f222741c4dc6a6327683" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "parity-scale-codec", + "scale-info", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -8106,52 +8627,92 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd29411ef24eb6a856adf1bc33b37ead4835a25dafb1c4c8c95b13fa5247748f" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] -name = "pallet-whitelist" -version = "24.0.0" +name = "pallet-vesting" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37304829099cfec7d17df70cfe11ccf6cb7bd624eab80e8e79e895859454540" +checksum = "9efa19c0258d21cda531b7e81532ce6fb28c10f99f406c051852ed51f28dcefd" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "log", "parity-scale-codec", "scale-info", - "sp-api", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] -name = "pallet-xcm" -version = "4.0.0" +name = "pallet-whitelist" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a9943df0e695f0b1719e9d559ab08fbded03a443e270e48b11bee56f209a2d7" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "parity-scale-codec", + "scale-info", + "sp-api 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", +] + +[[package]] +name = "pallet-xcm" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04d5e5404d9dadb39390949aadc2c641c16ce4cb0f47ed7a7ff584ab914c2984" dependencies = [ "bounded-collections", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "staging-xcm 4.0.0", + "staging-xcm-executor 4.0.0", +] + +[[package]] +name = "pallet-xcm" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76c4eb9211a13bffe31ba0555c382b2e377213ccf7bfd800b115e222cb349142" +dependencies = [ + "bounded-collections", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", + "pallet-balances 27.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "staging-xcm", - "staging-xcm-executor", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", + "staging-xcm-executor 6.0.0", ] [[package]] @@ -8160,38 +8721,58 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6bfdc94e39541b111db7d2c2a95a18a3c3bb42dd37c20b8705727e617ce00c9" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "staging-xcm 4.0.0", + "staging-xcm-builder 4.0.0", + "staging-xcm-executor 4.0.0", +] + +[[package]] +name = "pallet-xcm-benchmarks" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57fd71243da6203b60fd89640aa58c5cd9f03a9d2cb1c83d10d7b60360f1326f" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", + "staging-xcm-executor 6.0.0", ] [[package]] name = "pallet-xcm-bridge-hub-router" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e2d8a783510d2fb4c0e81f591baad76fa8ebbed0f77852bf23720b299539b61" +checksum = "4b36a67b5b0755e616fa0f5c0874ff5f83ba66eb0f7c4ec98166b95d6915c291" dependencies = [ - "bp-xcm-bridge-hub-router", - "frame-benchmarking", - "frame-support", - "frame-system", + "bp-xcm-bridge-hub-router 0.5.0", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", - "staging-xcm", - "staging-xcm-builder", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", ] [[package]] @@ -8200,75 +8781,110 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7ab598917585ae55b892dbfb6fa5073eb40454c47504a0d0db2634505538632" dependencies = [ - "cumulus-primitives-core", - "cumulus-primitives-utility", - "frame-support", - "frame-system", + "cumulus-primitives-core 0.4.0", + "cumulus-primitives-utility 0.4.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "num-traits", + "pallet-asset-tx-payment 25.0.0", + "pallet-assets 26.0.0", + "pallet-authorship 25.0.0", + "pallet-balances 25.0.0", + "pallet-collator-selection 6.0.0", + "parity-scale-codec", + "polkadot-core-primitives 4.0.0", + "polkadot-primitives 4.0.0", + "rococo-runtime-constants 4.0.0", + "scale-info", + "smallvec", + "sp-consensus-aura 0.29.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "staging-parachain-info 0.4.0", + "staging-xcm 4.0.0", + "staging-xcm-builder 4.0.0", + "substrate-wasm-builder 14.0.0", + "westend-runtime-constants 4.0.0", +] + +[[package]] +name = "parachains-common" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95c5d3cd2e1516fad507855309237b6a6f8fe778819ce5583ce48970c524101a" +dependencies = [ + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-utility 0.6.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "num-traits", - "pallet-asset-tx-payment", - "pallet-assets", - "pallet-authorship", - "pallet-balances", - "pallet-collator-selection", + "pallet-asset-tx-payment 27.0.0", + "pallet-assets 28.0.0", + "pallet-authorship 27.0.0", + "pallet-balances 27.0.0", + "pallet-collator-selection 8.0.0", + "pallet-message-queue 30.0.0", "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-primitives", - "rococo-runtime-constants", + "polkadot-core-primitives 6.0.0", + "polkadot-primitives 6.0.0", + "rococo-runtime-constants 6.0.0", "scale-info", "smallvec", - "sp-consensus-aura", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "substrate-wasm-builder", - "westend-runtime-constants", + "sp-consensus-aura 0.31.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", + "substrate-wasm-builder 16.0.0", + "westend-runtime-constants 6.0.0", ] [[package]] name = "parachains-runtimes-test-utils" -version = "4.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4473cc6319cada74f52b4c0b35a7a8b248e0db661aed4e65bd3a4cf676c9d4ff" +checksum = "34682787ee935f35aa45044637f9557c0b313d91453b41016724574e6193f493" dependencies = [ "assets-common", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", - "cumulus-test-relay-sproof-builder", - "frame-support", - "frame-system", - "pallet-assets", - "pallet-balances", - "pallet-collator-selection", - "pallet-session", - "pallet-xcm", - "parachains-common", - "parity-scale-codec", - "polkadot-parachain-primitives", - "sp-consensus-aura", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-tracing", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-executor", - "substrate-wasm-builder", + "cumulus-pallet-parachain-system 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-parachain-inherent 0.6.0", + "cumulus-test-relay-sproof-builder 0.6.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "pallet-assets 28.0.0", + "pallet-balances 27.0.0", + "pallet-collator-selection 8.0.0", + "pallet-session 27.0.0", + "pallet-xcm 6.0.0", + "parachains-common 6.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 5.0.0", + "sp-consensus-aura 0.31.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-tracing 15.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-executor 6.0.0", + "substrate-wasm-builder 16.0.0", ] [[package]] name = "parity-db" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78f19d20a0d2cc52327a88d131fa1c4ea81ea4a04714aedcfeca2dd410049cf8" +checksum = "592a28a24b09c9dc20ac8afaa6839abc417c720afe42c12e1e4a9d6aa2508d2e" dependencies = [ "blake2 0.10.6", "crc32fast", @@ -8282,6 +8898,7 @@ dependencies = [ "rand 0.8.5", "siphasher", "snap", + "winapi", ] [[package]] @@ -8354,9 +8971,9 @@ checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" @@ -8376,7 +8993,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.8", + "parking_lot_core 0.9.9", ] [[package]] @@ -8395,13 +9012,13 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "smallvec", "windows-targets 0.48.5", ] @@ -8424,7 +9041,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ - "crypto-mac 0.11.1", + "crypto-mac 0.11.0", ] [[package]] @@ -8451,82 +9068,74 @@ 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 = "penpal-runtime" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63d1c2aa2cbc5012e6af2781ff7fb0bf7188ff4d25643a0f36a44f327b779fb4" +checksum = "81b8a9b83c66de6015d3185bff94cd3a0d192f6f3421580165b1d6f74ef1b376" dependencies = [ - "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", + "cumulus-pallet-aura-ext 0.6.0", + "cumulus-pallet-dmp-queue 0.6.0", + "cumulus-pallet-parachain-system 0.6.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-utility", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "cumulus-pallet-xcm 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-utility 0.6.0", + "frame-benchmarking 27.0.0", + "frame-executive 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-system-benchmarking 27.0.0", + "frame-system-rpc-runtime-api 25.0.0", + "frame-try-runtime 0.33.0", "hex-literal", "log", - "pallet-asset-tx-payment", - "pallet-assets", - "pallet-aura", - "pallet-authorship", - "pallet-balances", - "pallet-collator-selection", - "pallet-session", + "pallet-asset-tx-payment 27.0.0", + "pallet-assets 28.0.0", + "pallet-aura 26.0.0", + "pallet-authorship 27.0.0", + "pallet-balances 27.0.0", + "pallet-collator-selection 8.0.0", + "pallet-message-queue 30.0.0", + "pallet-session 27.0.0", "pallet-sudo", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-xcm", - "parachains-common", + "pallet-timestamp 26.0.0", + "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment-rpc-runtime-api 27.0.0", + "pallet-xcm 6.0.0", + "parachains-common 6.0.0", "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-primitives", - "polkadot-runtime-common", + "polkadot-parachain-primitives 5.0.0", + "polkadot-primitives 6.0.0", + "polkadot-runtime-common 6.0.0", "scale-info", "smallvec", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", + "sp-api 25.0.0", + "sp-block-builder 25.0.0", + "sp-consensus-aura 0.31.0", + "sp-core 27.0.0", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-offchain 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-transaction-pool 25.0.0", + "sp-version 28.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", + "staging-xcm-executor 6.0.0", + "substrate-wasm-builder 16.0.0", ] [[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 = "petgraph" @@ -8535,7 +9144,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.0.0", + "indexmap 2.1.0", ] [[package]] @@ -8566,9 +9175,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -8576,37 +9185,27 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[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.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" [[package]] name = "platforms" -version = "3.0.2" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" +checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] name = "polkadot-core-primitives" @@ -8616,9 +9215,22 @@ checksum = "b08d1d6ca24e1b13f8069e015cfab794344212dd7436aadd61de8086a82664ef" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "polkadot-core-primitives" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a185e7c80e3a42c681f02afe39c0d6a3f0eb5eef0b740afd592b3234aa462b1f" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -8632,10 +9244,29 @@ dependencies = [ "mick-jaeger", "parity-scale-codec", "parking_lot 0.12.1", - "polkadot-node-primitives", - "polkadot-primitives", - "sc-network", - "sp-core", + "polkadot-node-primitives 4.0.0", + "polkadot-primitives 4.0.0", + "sc-network 0.31.0", + "sp-core 25.0.0", + "thiserror", + "tokio", +] + +[[package]] +name = "polkadot-node-jaeger" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08be78960db8b91245b08813ad8261a3f9ae15d3dba194ff88b65a3971a16141" +dependencies = [ + "lazy_static", + "log", + "mick-jaeger", + "parity-scale-codec", + "parking_lot 0.12.1", + "polkadot-node-primitives 6.0.0", + "polkadot-primitives 6.0.0", + "sc-network 0.33.0", + "sp-core 27.0.0", "thiserror", "tokio", ] @@ -8651,13 +9282,33 @@ dependencies = [ "futures-timer", "log", "parity-scale-codec", - "polkadot-primitives", + "polkadot-primitives 4.0.0", + "prioritized-metered-channel", + "sc-cli 0.33.0", + "sc-service 0.32.0", + "sc-tracing 25.0.0", + "substrate-prometheus-endpoint", + "tracing-gum 4.0.0", +] + +[[package]] +name = "polkadot-node-metrics" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3aac00c8be626db8de37699d3a66f109ad5399ee03122a670b12eb6cf21359" +dependencies = [ + "bs58 0.5.0", + "futures", + "futures-timer", + "log", + "parity-scale-codec", + "polkadot-primitives 6.0.0", "prioritized-metered-channel", - "sc-cli", - "sc-service", - "sc-tracing", + "sc-cli 0.35.0", + "sc-service 0.34.0", + "sc-tracing 27.0.0", "substrate-prometheus-endpoint", - "tracing-gum", + "tracing-gum 6.0.0", ] [[package]] @@ -8674,15 +9325,40 @@ dependencies = [ "futures", "hex", "parity-scale-codec", - "polkadot-node-jaeger", - "polkadot-node-primitives", - "polkadot-primitives", + "polkadot-node-jaeger 4.0.0", + "polkadot-node-primitives 4.0.0", + "polkadot-primitives 4.0.0", + "rand 0.8.5", + "sc-authority-discovery 0.31.0", + "sc-network 0.31.0", + "strum", + "thiserror", + "tracing-gum 4.0.0", +] + +[[package]] +name = "polkadot-node-network-protocol" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c53384d262771317827b8839d9b2eff81a9e3d66c815211dcf8312d20ab72c9" +dependencies = [ + "async-channel", + "async-trait", + "bitvec", + "derive_more", + "fatality", + "futures", + "hex", + "parity-scale-codec", + "polkadot-node-jaeger 6.0.0", + "polkadot-node-primitives 6.0.0", + "polkadot-primitives 6.0.0", "rand 0.8.5", - "sc-authority-discovery", - "sc-network", + "sc-authority-discovery 0.33.0", + "sc-network 0.33.0", "strum", "thiserror", - "tracing-gum", + "tracing-gum 6.0.0", ] [[package]] @@ -8694,16 +9370,40 @@ dependencies = [ "bounded-vec", "futures", "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-primitives", + "polkadot-parachain-primitives 3.0.0", + "polkadot-primitives 4.0.0", + "schnorrkel", + "serde", + "sp-application-crypto 27.0.0", + "sp-consensus-babe 0.29.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-maybe-compressed-blob 9.0.0", + "sp-runtime 28.0.0", + "thiserror", + "zstd 0.12.4", +] + +[[package]] +name = "polkadot-node-primitives" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90d056deb074d6a97be279fac580210ee847a1d09d9115ad094f83a86c2b6a91" +dependencies = [ + "bitvec", + "bounded-vec", + "futures", + "parity-scale-codec", + "polkadot-parachain-primitives 5.0.0", + "polkadot-primitives 6.0.0", "schnorrkel", "serde", - "sp-application-crypto", - "sp-consensus-babe", - "sp-core", - "sp-keystore", - "sp-maybe-compressed-blob", - "sp-runtime", + "sp-application-crypto 29.0.0", + "sp-consensus-babe 0.31.0", + "sp-core 27.0.0", + "sp-keystore 0.33.0", + "sp-maybe-compressed-blob 10.0.0", + "sp-runtime 30.0.1", "thiserror", "zstd 0.12.4", ] @@ -8718,18 +9418,47 @@ dependencies = [ "derive_more", "futures", "orchestra", - "polkadot-node-jaeger", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-primitives", - "polkadot-statement-table", - "sc-client-api", - "sc-network", - "sc-transaction-pool-api", + "polkadot-node-jaeger 4.0.0", + "polkadot-node-network-protocol 4.0.0", + "polkadot-node-primitives 4.0.0", + "polkadot-primitives 4.0.0", + "polkadot-statement-table 4.0.0", + "sc-client-api 25.0.0", + "sc-network 0.31.0", + "sc-transaction-pool-api 25.0.0", + "smallvec", + "sp-api 23.0.0", + "sp-authority-discovery 23.0.0", + "sp-consensus-babe 0.29.0", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "polkadot-node-subsystem-types" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f64090deea91a0cefce3f378fa6a1e901b48852f3ed18ab622271f241fefe1d" +dependencies = [ + "async-trait", + "bitvec", + "derive_more", + "futures", + "orchestra", + "polkadot-node-jaeger 6.0.0", + "polkadot-node-network-protocol 6.0.0", + "polkadot-node-primitives 6.0.0", + "polkadot-primitives 6.0.0", + "polkadot-statement-table 6.0.0", + "sc-client-api 27.0.0", + "sc-network 0.33.0", + "sc-transaction-pool-api 27.0.0", "smallvec", - "sp-api", - "sp-authority-discovery", - "sp-consensus-babe", + "sp-api 25.0.0", + "sp-authority-discovery 25.0.0", + "sp-blockchain 27.0.0", + "sp-consensus-babe 0.31.0", + "sp-runtime 30.0.1", "substrate-prometheus-endpoint", "thiserror", ] @@ -8745,16 +9474,39 @@ dependencies = [ "futures-timer", "orchestra", "parking_lot 0.12.1", - "polkadot-node-metrics", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem-types", - "polkadot-primitives", - "sc-client-api", - "sp-api", - "sp-core", + "polkadot-node-metrics 4.0.0", + "polkadot-node-network-protocol 4.0.0", + "polkadot-node-primitives 4.0.0", + "polkadot-node-subsystem-types 4.0.0", + "polkadot-primitives 4.0.0", + "sc-client-api 25.0.0", + "sp-api 23.0.0", + "sp-core 25.0.0", + "tikv-jemalloc-ctl", + "tracing-gum 4.0.0", +] + +[[package]] +name = "polkadot-overseer" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830258b62d41bdf9cee96bd8377be0697639d766f527af6d8bf507f5ee2db59c" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "orchestra", + "parking_lot 0.12.1", + "polkadot-node-metrics 6.0.0", + "polkadot-node-network-protocol 6.0.0", + "polkadot-node-primitives 6.0.0", + "polkadot-node-subsystem-types 6.0.0", + "polkadot-primitives 6.0.0", + "sc-client-api 27.0.0", + "sp-api 25.0.0", + "sp-core 27.0.0", "tikv-jemalloc-ctl", - "tracing-gum", + "tracing-gum 6.0.0", ] [[package]] @@ -8765,14 +9517,32 @@ checksum = "42265630c0c48e25d7ee5a9f4bdcafd003be65c0a44deeb6541620ca169fa519" dependencies = [ "bounded-collections", "derive_more", - "frame-support", + "frame-support 25.0.0", "parity-scale-codec", - "polkadot-core-primitives", + "polkadot-core-primitives 4.0.0", "scale-info", "serde", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "polkadot-parachain-primitives" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b0b8521215ec97799c75a7531c2ac0627fa2b8916fde2bdc6c79bf05b93645" +dependencies = [ + "bounded-collections", + "derive_more", + "parity-scale-codec", + "polkadot-core-primitives 6.0.0", + "scale-info", + "serde", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-weights 26.0.0", ] [[package]] @@ -8784,22 +9554,49 @@ dependencies = [ "bitvec", "hex-literal", "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", + "polkadot-core-primitives 4.0.0", + "polkadot-parachain-primitives 3.0.0", + "scale-info", + "serde", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-arithmetic 20.0.0", + "sp-authority-discovery 23.0.0", + "sp-consensus-slots 0.29.0", + "sp-core 25.0.0", + "sp-inherents 23.0.0", + "sp-io 27.0.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", + "sp-staking 23.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "polkadot-primitives" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6b60b3e37d83b42f483b2ec9a2a195d83dc7fbfaa57ba1ca9142eec6bf276f" +dependencies = [ + "bitvec", + "hex-literal", + "parity-scale-codec", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", "scale-info", "serde", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-authority-discovery", - "sp-consensus-slots", - "sp-core", - "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-arithmetic 22.0.0", + "sp-authority-discovery 25.0.0", + "sp-consensus-slots 0.31.0", + "sp-core 27.0.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-keystore 0.33.0", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] @@ -8808,40 +9605,40 @@ version = "1.0.0" dependencies = [ "binary-merkle-tree", "bitvec", - "frame-benchmarking", - "frame-election-provider-support", - "frame-executive", + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-executive 27.0.0", "frame-remote-externalities", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-system-benchmarking 27.0.0", + "frame-system-rpc-runtime-api 25.0.0", + "frame-try-runtime 0.33.0", "hex-literal", "log", - "pallet-asset-rate", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", + "pallet-asset-rate 6.0.0", + "pallet-authority-discovery 27.0.0", + "pallet-authorship 27.0.0", + "pallet-babe 27.0.0", "pallet-bags-list", - "pallet-balances", + "pallet-balances 27.0.0", "pallet-beefy", "pallet-beefy-mmr", "pallet-bounties", "pallet-child-bounties", - "pallet-collective", + "pallet-collective 27.0.0", "pallet-conviction-voting", "pallet-democracy", - "pallet-election-provider-multi-phase", - "pallet-election-provider-support-benchmarking", + "pallet-election-provider-multi-phase 26.0.0", + "pallet-election-provider-support-benchmarking 26.0.0", "pallet-elections-phragmen", - "pallet-fast-unstake", + "pallet-fast-unstake 26.0.0", "pallet-grandpa", "pallet-identity", - "pallet-im-online", + "pallet-im-online 26.0.0", "pallet-indices", - "pallet-membership", - "pallet-message-queue", + "pallet-membership 27.0.0", + "pallet-message-queue 30.0.0", "pallet-mmr", "pallet-multisig", "pallet-nomination-pools", @@ -8850,30 +9647,30 @@ dependencies = [ "pallet-offences", "pallet-offences-benchmarking", "pallet-preimage", - "pallet-proxy", + "pallet-proxy 27.0.0", "pallet-referenda", - "pallet-scheduler", - "pallet-session", + "pallet-scheduler 28.0.0", + "pallet-session 27.0.0", "pallet-session-benchmarking", - "pallet-staking", + "pallet-staking 27.0.0", "pallet-staking-reward-curve", - "pallet-staking-reward-fn", + "pallet-staking-reward-fn 18.0.0", "pallet-staking-runtime-api", - "pallet-timestamp", + "pallet-timestamp 26.0.0", "pallet-tips", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-vesting", + "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment-rpc-runtime-api 27.0.0", + "pallet-treasury 26.0.0", + "pallet-utility 27.0.0", + "pallet-vesting 27.0.0", "pallet-whitelist", - "pallet-xcm", - "pallet-xcm-benchmarks", + "pallet-xcm 6.0.0", + "pallet-xcm-benchmarks 6.0.0", "parity-scale-codec", - "polkadot-primitives", - "polkadot-runtime-common", + "polkadot-primitives 6.0.0", + "polkadot-runtime-common 6.0.0", "polkadot-runtime-constants", - "polkadot-runtime-parachains", + "polkadot-runtime-parachains 6.0.0", "rustc-hex", "scale-info", "separator", @@ -8881,35 +9678,35 @@ dependencies = [ "serde_derive", "serde_json", "smallvec", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-authority-discovery", - "sp-block-builder", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-keyring", - "sp-mmr-primitives", - "sp-npos-elections", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-transaction-pool", - "sp-trie", - "sp-version", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-arithmetic 22.0.0", + "sp-authority-discovery 25.0.0", + "sp-block-builder 25.0.0", + "sp-consensus-babe 0.31.0", + "sp-consensus-beefy 12.0.0", + "sp-core 27.0.0", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-keyring 30.0.0", + "sp-mmr-primitives 25.0.0", + "sp-npos-elections 25.0.0", + "sp-offchain 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-staking 25.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-tracing 15.0.0", + "sp-transaction-pool 25.0.0", + "sp-trie 28.0.0", + "sp-version 28.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", + "staging-xcm-executor 6.0.0", "static_assertions", - "substrate-wasm-builder", + "substrate-wasm-builder 16.0.0", "tiny-keccak", "tokio", ] @@ -8921,47 +9718,99 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a788f8ed8b33262c33f72d78e3416c5991e40d333178ae43000a92181ee44bca" dependencies = [ "bitvec", - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-election-provider-support 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "impl-trait-for-tuples", + "libsecp256k1", + "log", + "pallet-asset-rate 4.0.0", + "pallet-authorship 25.0.0", + "pallet-babe 25.0.0", + "pallet-balances 25.0.0", + "pallet-election-provider-multi-phase 24.0.0", + "pallet-fast-unstake 24.0.0", + "pallet-session 25.0.0", + "pallet-staking 25.0.0", + "pallet-staking-reward-fn 16.0.0", + "pallet-timestamp 24.0.0", + "pallet-transaction-payment 25.0.0", + "pallet-treasury 24.0.0", + "pallet-vesting 25.0.0", + "pallet-xcm-benchmarks 4.0.0", + "parity-scale-codec", + "polkadot-primitives 4.0.0", + "polkadot-runtime-parachains 4.0.0", + "rustc-hex", + "scale-info", + "serde", + "serde_derive", + "slot-range-helper 4.0.0", + "sp-api 23.0.0", + "sp-core 25.0.0", + "sp-inherents 23.0.0", + "sp-io 27.0.0", + "sp-npos-elections 23.0.0", + "sp-runtime 28.0.0", + "sp-session 24.0.0", + "sp-staking 23.0.0", + "sp-std 12.0.0", + "staging-xcm 4.0.0", + "staging-xcm-builder 4.0.0", + "staging-xcm-executor 4.0.0", + "static_assertions", +] + +[[package]] +name = "polkadot-runtime-common" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96287e584d1f6a25a9b435d1334287d13da294d85d339ededc7715ce6d5be686" +dependencies = [ + "bitvec", + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "impl-trait-for-tuples", "libsecp256k1", "log", - "pallet-asset-rate", - "pallet-authorship", - "pallet-babe", - "pallet-balances", - "pallet-election-provider-multi-phase", - "pallet-fast-unstake", - "pallet-session", - "pallet-staking", - "pallet-staking-reward-fn", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-treasury", - "pallet-vesting", - "pallet-xcm-benchmarks", - "parity-scale-codec", - "polkadot-primitives", - "polkadot-runtime-parachains", + "pallet-asset-rate 6.0.0", + "pallet-authorship 27.0.0", + "pallet-babe 27.0.0", + "pallet-balances 27.0.0", + "pallet-election-provider-multi-phase 26.0.0", + "pallet-fast-unstake 26.0.0", + "pallet-identity", + "pallet-session 27.0.0", + "pallet-staking 27.0.0", + "pallet-staking-reward-fn 18.0.0", + "pallet-timestamp 26.0.0", + "pallet-transaction-payment 27.0.0", + "pallet-treasury 26.0.0", + "pallet-vesting 27.0.0", + "pallet-xcm-benchmarks 6.0.0", + "parity-scale-codec", + "polkadot-primitives 6.0.0", + "polkadot-runtime-parachains 6.0.0", "rustc-hex", "scale-info", "serde", "serde_derive", - "slot-range-helper", - "sp-api", - "sp-core", - "sp-inherents", - "sp-io", - "sp-npos-elections", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", + "slot-range-helper 6.0.0", + "sp-api 25.0.0", + "sp-core 27.0.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-npos-elections 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-staking 25.0.0", + "sp-std 13.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", + "staging-xcm-executor 6.0.0", "static_assertions", ] @@ -8969,14 +9818,14 @@ dependencies = [ name = "polkadot-runtime-constants" version = "1.0.0" dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", + "frame-support 27.0.0", + "polkadot-primitives 6.0.0", + "polkadot-runtime-common 6.0.0", "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", - "staging-xcm", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-weights 26.0.0", + "staging-xcm 6.0.0", ] [[package]] @@ -8986,11 +9835,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfe45b01d9d621174c9c0eef0871aeead5986393838206fe58df3ae414bcb8d2" dependencies = [ "bs58 0.5.0", - "frame-benchmarking", + "frame-benchmarking 25.0.0", + "parity-scale-codec", + "polkadot-primitives 4.0.0", + "sp-std 12.0.0", + "sp-tracing 14.0.0", +] + +[[package]] +name = "polkadot-runtime-metrics" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "416d2a4a0c3792669984484d5fe831f20dea9ab734b00befbb0250f992144be6" +dependencies = [ + "bs58 0.5.0", + "frame-benchmarking 27.0.0", "parity-scale-codec", - "polkadot-primitives", - "sp-std", - "sp-tracing", + "polkadot-primitives 6.0.0", + "sp-std 13.0.0", + "sp-tracing 15.0.0", ] [[package]] @@ -9002,43 +9865,91 @@ dependencies = [ "bitflags 1.3.2", "bitvec", "derive_more", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "impl-trait-for-tuples", + "log", + "pallet-authority-discovery 25.0.0", + "pallet-authorship 25.0.0", + "pallet-babe 25.0.0", + "pallet-balances 25.0.0", + "pallet-message-queue 28.0.0", + "pallet-session 25.0.0", + "pallet-staking 25.0.0", + "pallet-timestamp 24.0.0", + "pallet-vesting 25.0.0", + "parity-scale-codec", + "polkadot-core-primitives 4.0.0", + "polkadot-parachain-primitives 3.0.0", + "polkadot-primitives 4.0.0", + "polkadot-runtime-metrics 4.0.0", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rustc-hex", + "scale-info", + "serde", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-core 25.0.0", + "sp-inherents 23.0.0", + "sp-io 27.0.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", + "sp-session 24.0.0", + "sp-staking 23.0.0", + "sp-std 12.0.0", + "staging-xcm 4.0.0", + "staging-xcm-executor 4.0.0", + "static_assertions", +] + +[[package]] +name = "polkadot-runtime-parachains" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c00498f856712916e54ef1c214fa8fa6cab193497b0ab99f2a79eff6525596" +dependencies = [ + "bitflags 1.3.2", + "bitvec", + "derive_more", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "impl-trait-for-tuples", "log", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-balances", - "pallet-message-queue", - "pallet-session", - "pallet-staking", - "pallet-timestamp", - "pallet-vesting", - "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-primitives", - "polkadot-runtime-metrics", + "pallet-authority-discovery 27.0.0", + "pallet-authorship 27.0.0", + "pallet-babe 27.0.0", + "pallet-balances 27.0.0", + "pallet-message-queue 30.0.0", + "pallet-session 27.0.0", + "pallet-staking 27.0.0", + "pallet-timestamp 26.0.0", + "pallet-vesting 27.0.0", + "parity-scale-codec", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", + "polkadot-primitives 6.0.0", + "polkadot-runtime-metrics 6.0.0", "rand 0.8.5", "rand_chacha 0.3.1", "rustc-hex", "scale-info", "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "sp-tracing", - "staging-xcm", - "staging-xcm-executor", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-core 27.0.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-keystore 0.33.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-staking 25.0.0", + "sp-std 13.0.0", + "sp-tracing 15.0.0", + "staging-xcm 6.0.0", + "staging-xcm-executor 6.0.0", "static_assertions", ] @@ -9049,47 +9960,44 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22b2a11cb8871f7e30a8f5e455c92d19a186065644ee00f9acda550ff89dacce" dependencies = [ "parity-scale-codec", - "polkadot-primitives", - "sp-core", + "polkadot-primitives 4.0.0", + "sp-core 25.0.0", +] + +[[package]] +name = "polkadot-statement-table" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e90105dd6e7a739ba7a91d26156daa143b99c058dd4df101664ea77ced14faf" +dependencies = [ + "parity-scale-codec", + "polkadot-primitives 6.0.0", + "sp-core 27.0.0", ] [[package]] name = "polling" -version = "2.8.0" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" dependencies = [ - "autocfg", - "bitflags 1.3.2", "cfg-if", "concurrent-queue", - "libc", - "log", - "pin-project-lite 0.2.12", - "windows-sys 0.48.0", + "pin-project-lite 0.2.13", + "rustix 0.38.28", + "tracing", + "windows-sys 0.52.0", ] [[package]] name = "poly1305" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" -dependencies = [ - "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash 0.4.1", -] - -[[package]] -name = "polyval" -version = "0.5.3" +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", + "universal-hash", ] [[package]] @@ -9101,14 +10009,20 @@ dependencies = [ "cfg-if", "cpufeatures", "opaque-debug 0.3.0", - "universal-hash 0.5.1", + "universal-hash", ] [[package]] name = "portable-atomic" -version = "1.4.2" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[package]] +name = "powerfmt" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f32154ba0af3a075eefa1eda8bb414ee928f62303a54ea85b8d6638ff1a6ee9e" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" @@ -9158,9 +10072,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", "syn 2.0.48", @@ -9204,7 +10118,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit 0.19.14", + "toml_edit 0.19.15", ] [[package]] @@ -9241,12 +10155,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro-warning" version = "1.0.0" @@ -9408,20 +10316,20 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31999cfc7927c4e212e60fd50934ab40e8e8bfd2d493d6095d2d306bc0764d9" +checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" dependencies = [ "bytes", "rand 0.8.5", - "ring", + "ring 0.16.20", "rustc-hash", - "rustls 0.20.8", + "rustls 0.20.9", "slab", "thiserror", "tinyvec", "tracing", - "webpki 0.22.0", + "webpki", ] [[package]] @@ -9498,7 +10406,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.12", ] [[package]] @@ -9537,9 +10445,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -9547,27 +10455,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", -] - -[[package]] -name = "rcgen" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" -dependencies = [ - "pem", - "ring", - "time 0.3.27", - "x509-parser 0.13.2", - "yasna", ] [[package]] @@ -9577,8 +10470,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", - "ring", - "time 0.3.27", + "ring 0.16.20", + "time", "yasna", ] @@ -9593,21 +10486,21 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.10", - "redox_syscall 0.2.16", + "getrandom 0.2.12", + "libredox", "thiserror", ] @@ -9645,14 +10538,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.3" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.6", - "regex-syntax 0.7.4", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -9666,13 +10559,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.6" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.4", + "regex-syntax 0.8.2", ] [[package]] @@ -9683,9 +10576,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "resolv-conf" @@ -9697,17 +10590,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" @@ -9715,7 +10597,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]] @@ -9727,12 +10609,35 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", - "untrusted", + "spin 0.5.2", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom 0.2.12", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "rlp" version = "0.5.2" @@ -9759,36 +10664,41 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "272eaa4f1b4b5357d89d1f8f504cb5ee81a105bf7e5c295f053c6e521f2a199b" dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", + "frame-support 25.0.0", + "polkadot-primitives 4.0.0", + "polkadot-runtime-common 4.0.0", "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", - "staging-xcm", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-weights 24.0.0", + "staging-xcm 4.0.0", ] [[package]] -name = "rpassword" -version = "7.2.0" +name = "rococo-runtime-constants" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6678cf63ab3491898c0d021b493c94c9b221d91295294a2a5746eacbe5928322" +checksum = "96315fe3c89019f13bf11c438bafd4bb96b510945cea5342267c4498633b4387" dependencies = [ - "libc", - "rtoolbox", - "winapi", + "frame-support 27.0.0", + "polkadot-primitives 6.0.0", + "polkadot-runtime-common 6.0.0", + "smallvec", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-weights 26.0.0", + "staging-xcm 6.0.0", ] [[package]] -name = "rtcp" -version = "0.7.2" +name = "rpassword" +version = "7.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1919efd6d4a6a85d13388f9487549bb8e359f17198cc03ffd72f79b553873691" +checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" dependencies = [ - "bytes", - "thiserror", - "webrtc-util", + "libc", + "rtoolbox", + "windows-sys 0.48.0", ] [[package]] @@ -9808,26 +10718,12 @@ dependencies = [ [[package]] name = "rtoolbox" -version = "0.0.1" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" +checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" dependencies = [ "libc", - "winapi", -] - -[[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", + "windows-sys 0.48.0", ] [[package]] @@ -9877,9 +10773,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.15" +version = "0.36.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c37f1bd5ef1b5422177b7646cba67430579cfe2ace80f284fee876bca52ad941" +checksum = "305efbd14fde4139eb501df5f136994bb520b033fa9fbdce287507dc23b8c7ed" dependencies = [ "bitflags 1.3.2", "errno", @@ -9891,66 +10787,39 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.8" +version = "0.38.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "errno", "libc", - "linux-raw-sys 0.4.5", - "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", - "sct 0.6.1", - "webpki 0.21.4", + "linux-raw-sys 0.4.12", + "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", - "ring", - "sct 0.7.0", - "webpki 0.22.0", + "ring 0.16.20", + "sct", + "webpki", ] [[package]] name = "rustls" -version = "0.21.6" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1feddffcfcc0b33f5c6ce9a29e341e4cd59c3f78e7ee45f4a40c038b1d6cbb" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring", - "rustls-webpki 0.101.4", - "sct 0.7.0", + "ring 0.17.7", + "rustls-webpki", + "sct", ] [[package]] @@ -9967,31 +10836,21 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" -dependencies = [ - "base64 0.21.2", -] - -[[package]] -name = "rustls-webpki" -version = "0.100.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "ring", - "untrusted", + "base64 0.21.6", ] [[package]] name = "rustls-webpki" -version = "0.101.4" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring", - "untrusted", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] @@ -10013,9 +10872,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "safe-mix" @@ -10051,8 +10910,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66b4c5976a9cff7fcf24c946276a62ea7837862b6f3bf9f8011f08faf4f08474" dependencies = [ "log", - "sp-core", - "sp-wasm-interface", + "sp-core 25.0.0", + "sp-wasm-interface 18.0.0", + "thiserror", +] + +[[package]] +name = "sc-allocator" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79ad8791d398db62202f541849b3260ad5c9cf20a1982e3f4ad92f9a629ade76" +dependencies = [ + "log", + "sp-core 27.0.0", + "sp-wasm-interface 19.0.0", "thiserror", ] @@ -10068,19 +10939,49 @@ dependencies = [ "ip_network", "libp2p", "log", - "multihash", + "multihash 0.17.0", + "parity-scale-codec", + "prost", + "prost-build", + "rand 0.8.5", + "sc-client-api 25.0.0", + "sc-network 0.31.0", + "sp-api 23.0.0", + "sp-authority-discovery 23.0.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "sc-authority-discovery" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e563c043124ee28a6723ac320a1aba80283932e8ba34faa7ef427331961780" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "ip_network", + "libp2p", + "log", + "multihash 0.18.1", + "multihash-codetable", "parity-scale-codec", "prost", "prost-build", "rand 0.8.5", - "sc-client-api", - "sc-network", - "sp-api", - "sp-authority-discovery", - "sp-blockchain", - "sp-core", - "sp-keystore", - "sp-runtime", + "sc-client-api 27.0.0", + "sc-network 0.33.0", + "sp-api 25.0.0", + "sp-authority-discovery 25.0.0", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-keystore 0.33.0", + "sp-runtime 30.0.1", "substrate-prometheus-endpoint", "thiserror", ] @@ -10092,13 +10993,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d3999b9b758c09a6c1155e481b683ee87712f071cc5a0679f9ee4906a14a404" dependencies = [ "parity-scale-codec", - "sc-client-api", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-core", - "sp-inherents", - "sp-runtime", + "sc-client-api 25.0.0", + "sp-api 23.0.0", + "sp-block-builder 23.0.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-inherents 23.0.0", + "sp-runtime 28.0.0", +] + +[[package]] +name = "sc-block-builder" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b900efcf276c61da505e20ac275b2bae8f03b8ceba20dc7e276edec12ca49355" +dependencies = [ + "parity-scale-codec", + "sp-api 25.0.0", + "sp-block-builder 25.0.0", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-inherents 25.0.0", + "sp-runtime 30.0.1", + "sp-trie 28.0.0", ] [[package]] @@ -10109,16 +11026,42 @@ checksum = "ec7e711ea9870d3fb8e2a3ea5b601a9e20c63d0d2f457f40146407721e246a77" dependencies = [ "memmap2", "sc-chain-spec-derive", - "sc-client-api", - "sc-executor", - "sc-network", - "sc-telemetry", + "sc-client-api 25.0.0", + "sc-executor 0.29.0", + "sc-network 0.31.0", + "sc-telemetry 12.0.0", + "serde", + "serde_json", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", +] + +[[package]] +name = "sc-chain-spec" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31471216bdcef2195151d1e3324ec6fd09a6d87b306a15fae4590c0675f0d4c1" +dependencies = [ + "array-bytes 6.2.2", + "docify", + "log", + "memmap2", + "parity-scale-codec", + "sc-chain-spec-derive", + "sc-client-api 27.0.0", + "sc-executor 0.31.0", + "sc-network 0.33.0", + "sc-telemetry 14.0.0", "serde", "serde_json", - "sp-blockchain", - "sp-core", - "sp-runtime", - "sp-state-machine", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-genesis-builder 0.6.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", ] [[package]] @@ -10139,10 +11082,10 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22c61058223f80c1f961b03f7737529609a3283eef91129e971a1966101c18ea" dependencies = [ - "array-bytes 6.1.0", + "array-bytes 6.2.2", "chrono", "clap", - "fdlimit", + "fdlimit 0.2.1", "futures", "libp2p-identity", "log", @@ -10151,29 +11094,71 @@ dependencies = [ "rand 0.8.5", "regex", "rpassword", - "sc-client-api", - "sc-client-db", - "sc-keystore", - "sc-mixnet", - "sc-network", - "sc-service", - "sc-telemetry", - "sc-tracing", - "sc-utils", + "sc-client-api 25.0.0", + "sc-client-db 0.32.0", + "sc-keystore 22.0.0", + "sc-mixnet 0.1.0", + "sc-network 0.31.0", + "sc-service 0.32.0", + "sc-telemetry 12.0.0", + "sc-tracing 25.0.0", + "sc-utils 11.0.0", "serde", "serde_json", - "sp-blockchain", - "sp-core", - "sp-keyring", - "sp-keystore", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-keyring 28.0.0", + "sp-keystore 0.31.0", "sp-panic-handler", - "sp-runtime", - "sp-version", + "sp-runtime 28.0.0", + "sp-version 26.0.0", "thiserror", "tiny-bip39", "tokio", ] +[[package]] +name = "sc-cli" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e59c23e005876d2eca1e90ae2deaf85b4c78861f21b9fc3caf6535ca19f6ad9" +dependencies = [ + "array-bytes 6.2.2", + "bip39", + "chrono", + "clap", + "fdlimit 0.3.0", + "futures", + "itertools 0.10.5", + "libp2p-identity", + "log", + "names", + "parity-scale-codec", + "rand 0.8.5", + "regex", + "rpassword", + "sc-client-api 27.0.0", + "sc-client-db 0.34.0", + "sc-keystore 24.0.0", + "sc-mixnet 0.3.0", + "sc-network 0.33.0", + "sc-service 0.34.0", + "sc-telemetry 14.0.0", + "sc-tracing 27.0.0", + "sc-utils 13.0.0", + "serde", + "serde_json", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-keyring 30.0.0", + "sp-keystore 0.33.0", + "sp-panic-handler", + "sp-runtime 30.0.1", + "sp-version 28.0.0", + "thiserror", + "tokio", +] + [[package]] name = "sc-client-api" version = "25.0.0" @@ -10185,20 +11170,48 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sc-executor", - "sc-transaction-pool-api", - "sc-utils", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", + "sc-executor 0.29.0", + "sc-transaction-pool-api 25.0.0", + "sc-utils 11.0.0", + "sp-api 23.0.0", + "sp-blockchain 25.0.0", + "sp-consensus 0.29.0", + "sp-core 25.0.0", "sp-database", - "sp-externalities", - "sp-runtime", - "sp-state-machine", - "sp-statement-store", - "sp-storage", - "sp-trie", + "sp-externalities 0.23.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "sp-statement-store 7.0.0", + "sp-storage 17.0.0", + "sp-trie 26.0.0", + "substrate-prometheus-endpoint", +] + +[[package]] +name = "sc-client-api" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9eb785ab5be9a6cacc3cebf137539d66cd9fb05d5472d4aa4aa83f65004c799" +dependencies = [ + "fnv", + "futures", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-executor 0.31.0", + "sc-transaction-pool-api 27.0.0", + "sc-utils 13.0.0", + "sp-api 25.0.0", + "sp-blockchain 27.0.0", + "sp-consensus 0.31.0", + "sp-core 27.0.0", + "sp-database", + "sp-externalities 0.24.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "sp-statement-store 9.0.0", + "sp-storage 18.0.0", + "sp-trie 28.0.0", "substrate-prometheus-endpoint", ] @@ -10217,16 +11230,43 @@ dependencies = [ "parity-db", "parity-scale-codec", "parking_lot 0.12.1", - "sc-client-api", - "sc-state-db", + "sc-client-api 25.0.0", + "sc-state-db 0.27.0", + "schnellru", + "sp-arithmetic 20.0.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-database", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "sp-trie 26.0.0", +] + +[[package]] +name = "sc-client-db" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2ca0a8a26eeb09988245f44c78552e0dc5b2f3945d1495ee711bbbf71bc2d2a" +dependencies = [ + "hash-db", + "kvdb", + "kvdb-memorydb", + "kvdb-rocksdb", + "linked-hash-map", + "log", + "parity-db", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api 27.0.0", + "sc-state-db 0.29.0", "schnellru", - "sp-arithmetic", - "sp-blockchain", - "sp-core", + "sp-arithmetic 22.0.0", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", "sp-database", - "sp-runtime", - "sp-state-machine", - "sp-trie", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "sp-trie 28.0.0", ] [[package]] @@ -10242,57 +11282,83 @@ dependencies = [ "log", "mockall", "parking_lot 0.12.1", - "sc-client-api", - "sc-utils", - "serde", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-runtime", - "sp-state-machine", + "sc-client-api 25.0.0", + "sc-utils 11.0.0", + "serde", + "sp-api 23.0.0", + "sp-blockchain 25.0.0", + "sp-consensus 0.29.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", "substrate-prometheus-endpoint", "thiserror", ] [[package]] -name = "sc-consensus-grandpa" -version = "0.16.0" +name = "sc-consensus" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cbc5db21ea2c4ba65b23315e73e69e8155630fb47c84b93d40b0e759c9d86d" +checksum = "fe8204108702ac2f35ed3a541e00aae4656c7591cad6fff33bcc6e7774fc9607" dependencies = [ - "ahash 0.8.3", - "array-bytes 6.1.0", "async-trait", - "dyn-clone", - "finality-grandpa", - "fork-tree", "futures", "futures-timer", + "libp2p-identity", "log", - "parity-scale-codec", + "mockall", "parking_lot 0.12.1", - "rand 0.8.5", - "sc-block-builder", - "sc-chain-spec", - "sc-client-api", - "sc-consensus", - "sc-network", - "sc-network-common", - "sc-network-gossip", - "sc-telemetry", - "sc-transaction-pool-api", - "sc-utils", - "serde_json", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", - "sp-consensus-grandpa", - "sp-core", - "sp-keystore", - "sp-runtime", + "sc-client-api 27.0.0", + "sc-utils 13.0.0", + "serde", + "sp-api 25.0.0", + "sp-blockchain 27.0.0", + "sp-consensus 0.31.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "sc-consensus-grandpa" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cbc5db21ea2c4ba65b23315e73e69e8155630fb47c84b93d40b0e759c9d86d" +dependencies = [ + "ahash 0.8.7", + "array-bytes 6.2.2", + "async-trait", + "dyn-clone", + "finality-grandpa", + "fork-tree", + "futures", + "futures-timer", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "sc-block-builder 0.30.0", + "sc-chain-spec 24.0.0", + "sc-client-api 25.0.0", + "sc-consensus 0.30.0", + "sc-network 0.31.0", + "sc-network-common 0.30.0", + "sc-network-gossip", + "sc-telemetry 12.0.0", + "sc-transaction-pool-api 25.0.0", + "sc-utils 11.0.0", + "serde_json", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-arithmetic 20.0.0", + "sp-blockchain 25.0.0", + "sp-consensus 0.29.0", + "sp-consensus-grandpa 10.0.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -10305,18 +11371,41 @@ checksum = "225f2ad733bc7234a6638d5203624194824b2f78ab631bc911223f536a66b9c8" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "sc-executor-common", - "sc-executor-wasmtime", + "sc-executor-common 0.26.0", + "sc-executor-wasmtime 0.26.0", "schnellru", - "sp-api", - "sp-core", - "sp-externalities", - "sp-io", + "sp-api 23.0.0", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-io 27.0.0", "sp-panic-handler", - "sp-runtime-interface", - "sp-trie", - "sp-version", - "sp-wasm-interface", + "sp-runtime-interface 21.0.0", + "sp-trie 26.0.0", + "sp-version 26.0.0", + "sp-wasm-interface 18.0.0", + "tracing", +] + +[[package]] +name = "sc-executor" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eea713755b62067b9c223cef0525b6a88336ca6658fe0ed38340d8cad4963af5" +dependencies = [ + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-executor-common 0.28.0", + "sc-executor-wasmtime 0.28.0", + "schnellru", + "sp-api 25.0.0", + "sp-core 27.0.0", + "sp-externalities 0.24.0", + "sp-io 29.0.0", + "sp-panic-handler", + "sp-runtime-interface 23.0.0", + "sp-trie 28.0.0", + "sp-version 28.0.0", + "sp-wasm-interface 19.0.0", "tracing", ] @@ -10326,9 +11415,22 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "169c1cfe81ba0e0d44ab4ada1600e30b6a9de588c792db73e32a854a6e3e1a87" dependencies = [ - "sc-allocator", - "sp-maybe-compressed-blob", - "sp-wasm-interface", + "sc-allocator 20.0.0", + "sp-maybe-compressed-blob 9.0.0", + "sp-wasm-interface 18.0.0", + "thiserror", + "wasm-instrument", +] + +[[package]] +name = "sc-executor-common" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40d0fdbc88edc041b64891c7162e02f062baa699212395db0615bd9bdcda0dd7" +dependencies = [ + "sc-allocator 22.0.0", + "sp-maybe-compressed-blob 10.0.0", + "sp-wasm-interface 19.0.0", "thiserror", "wasm-instrument", ] @@ -10344,11 +11446,30 @@ dependencies = [ "libc", "log", "parking_lot 0.12.1", - "rustix 0.36.15", - "sc-allocator", - "sc-executor-common", - "sp-runtime-interface", - "sp-wasm-interface", + "rustix 0.36.17", + "sc-allocator 20.0.0", + "sc-executor-common 0.26.0", + "sp-runtime-interface 21.0.0", + "sp-wasm-interface 18.0.0", + "wasmtime", +] + +[[package]] +name = "sc-executor-wasmtime" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13a935fc2a7e8e7a7fb4fe7bc15d5be9b52a101f921867703c81a7d02a821f86" +dependencies = [ + "anyhow", + "cfg-if", + "libc", + "log", + "parking_lot 0.12.1", + "rustix 0.36.17", + "sc-allocator 22.0.0", + "sc-executor-common 0.28.0", + "sp-runtime-interface 23.0.0", + "sp-wasm-interface 19.0.0", "wasmtime", ] @@ -10362,11 +11483,29 @@ dependencies = [ "futures", "futures-timer", "log", - "sc-client-api", - "sc-network", - "sc-network-common", - "sp-blockchain", - "sp-runtime", + "sc-client-api 25.0.0", + "sc-network 0.31.0", + "sc-network-common 0.30.0", + "sp-blockchain 25.0.0", + "sp-runtime 28.0.0", +] + +[[package]] +name = "sc-informant" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fd39dfdb19ade5fd05d0646adc4cbadc3c89fbe270dcc7d33b7d496366cd784" +dependencies = [ + "ansi_term", + "futures", + "futures-timer", + "log", + "sc-client-api 27.0.0", + "sc-network 0.33.0", + "sc-network-common 0.32.0", + "sc-network-sync 0.32.0", + "sp-blockchain 27.0.0", + "sp-runtime 30.0.1", ] [[package]] @@ -10375,12 +11514,27 @@ version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abecdf9778fccc254c0b5e227ea8b90fd59247044a30ad293a068b180427d244" dependencies = [ - "array-bytes 6.1.0", + "array-bytes 6.2.2", "parking_lot 0.12.1", "serde_json", - "sp-application-crypto", - "sp-core", - "sp-keystore", + "sp-application-crypto 27.0.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "thiserror", +] + +[[package]] +name = "sc-keystore" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efa306595e3491e73d9b8291c2e3a6c8ea06fe05d1bacd29365fcbd2e9430ad" +dependencies = [ + "array-bytes 6.2.2", + "parking_lot 0.12.1", + "serde_json", + "sp-application-crypto 29.0.0", + "sp-core 27.0.0", + "sp-keystore 0.33.0", "thiserror", ] @@ -10401,15 +11555,45 @@ dependencies = [ "multiaddr", "parity-scale-codec", "parking_lot 0.12.1", - "sc-client-api", - "sc-network", - "sc-transaction-pool-api", - "sp-api", - "sp-consensus", - "sp-core", - "sp-keystore", - "sp-mixnet", - "sp-runtime", + "sc-client-api 25.0.0", + "sc-network 0.31.0", + "sc-transaction-pool-api 25.0.0", + "sp-api 23.0.0", + "sp-consensus 0.29.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-mixnet 0.1.0", + "sp-runtime 28.0.0", + "thiserror", +] + +[[package]] +name = "sc-mixnet" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df018e1c19855361b958d205cf075b8093f394a67cd337eb4413989d8766abe4" +dependencies = [ + "array-bytes 4.2.0", + "arrayvec 0.7.4", + "blake2 0.10.6", + "bytes", + "futures", + "futures-timer", + "libp2p-identity", + "log", + "mixnet", + "multiaddr", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api 27.0.0", + "sc-network 0.33.0", + "sc-transaction-pool-api 27.0.0", + "sp-api 25.0.0", + "sp-consensus 0.31.0", + "sp-core 27.0.0", + "sp-keystore 0.33.0", + "sp-mixnet 0.3.0", + "sp-runtime 30.0.1", "thiserror", ] @@ -10419,7 +11603,7 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01f519592a971199c486d412dbf38ba54096857080bf4b9d29c9ffabcfee3745" dependencies = [ - "array-bytes 6.1.0", + "array-bytes 6.2.2", "async-channel", "async-trait", "asynchronous-codec", @@ -10438,16 +11622,16 @@ dependencies = [ "partial_sort", "pin-project", "rand 0.8.5", - "sc-client-api", - "sc-network-common", - "sc-utils", + "sc-client-api 25.0.0", + "sc-network-common 0.30.0", + "sc-utils 11.0.0", "serde", "serde_json", "smallvec", - "sp-arithmetic", - "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-arithmetic 20.0.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint", @@ -10455,6 +11639,50 @@ dependencies = [ "zeroize", ] +[[package]] +name = "sc-network" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abc4093ac710df0daa0dde6ea3613ecf391695e321923c9bb270eebd5c070bf2" +dependencies = [ + "array-bytes 6.2.2", + "async-channel", + "async-trait", + "asynchronous-codec", + "bytes", + "either", + "fnv", + "futures", + "futures-timer", + "ip_network", + "libp2p", + "linked_hash_set", + "log", + "mockall", + "parity-scale-codec", + "parking_lot 0.12.1", + "partial_sort", + "pin-project", + "rand 0.8.5", + "sc-client-api 27.0.0", + "sc-network-common 0.32.0", + "sc-utils 13.0.0", + "serde", + "serde_json", + "smallvec", + "sp-arithmetic 22.0.0", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "substrate-prometheus-endpoint", + "thiserror", + "tokio", + "tokio-stream", + "unsigned-varint", + "wasm-timer", + "zeroize", +] + [[package]] name = "sc-network-bitswap" version = "0.30.0" @@ -10468,10 +11696,31 @@ dependencies = [ "log", "prost", "prost-build", - "sc-client-api", - "sc-network", - "sp-blockchain", - "sp-runtime", + "sc-client-api 25.0.0", + "sc-network 0.31.0", + "sp-blockchain 25.0.0", + "sp-runtime 28.0.0", + "thiserror", + "unsigned-varint", +] + +[[package]] +name = "sc-network-bitswap" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae68646fa90d2b93bd02be2e16eb46673e6cc863c83ebe04be54a10cf0c7cb6" +dependencies = [ + "async-channel", + "cid", + "futures", + "libp2p-identity", + "log", + "prost", + "prost-build", + "sc-client-api 27.0.0", + "sc-network 0.33.0", + "sp-blockchain 27.0.0", + "sp-runtime 30.0.1", "thiserror", "unsigned-varint", ] @@ -10488,10 +11737,28 @@ dependencies = [ "libp2p-identity", "parity-scale-codec", "prost-build", - "sc-consensus", - "sp-consensus", - "sp-consensus-grandpa", - "sp-runtime", + "sc-consensus 0.30.0", + "sp-consensus 0.29.0", + "sp-consensus-grandpa 10.0.0", + "sp-runtime 28.0.0", +] + +[[package]] +name = "sc-network-common" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d62375edb2146c538166886ae09662b62b7205085826f276da49a11be278d905" +dependencies = [ + "async-trait", + "bitflags 1.3.2", + "futures", + "libp2p-identity", + "parity-scale-codec", + "prost-build", + "sc-consensus 0.32.0", + "sp-consensus 0.31.0", + "sp-consensus-grandpa 12.0.0", + "sp-runtime 30.0.1", ] [[package]] @@ -10500,15 +11767,15 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b884a9f7cd348c4c1899c0bbf95237e39dffba4baec48d4b98c1046f6bb04fa5" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.7", "futures", "futures-timer", "libp2p", "log", - "sc-network", - "sc-network-common", + "sc-network 0.31.0", + "sc-network-common 0.30.0", "schnellru", - "sp-runtime", + "sp-runtime 28.0.0", "substrate-prometheus-endpoint", "tracing", ] @@ -10519,7 +11786,29 @@ version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aac888fd720ef8bb2ff7d2b7f7b2e54d17bb85a417cf1e1b6f0f64f7e644936d" dependencies = [ - "array-bytes 6.1.0", + "array-bytes 6.2.2", + "async-channel", + "futures", + "libp2p-identity", + "log", + "parity-scale-codec", + "prost", + "prost-build", + "sc-client-api 25.0.0", + "sc-network 0.31.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "thiserror", +] + +[[package]] +name = "sc-network-light" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a97885f6b4b2b5b01c47061c0e8cca10bd20599e6fd48f28044792077e82a7" +dependencies = [ + "array-bytes 6.2.2", "async-channel", "futures", "libp2p-identity", @@ -10527,11 +11816,11 @@ dependencies = [ "parity-scale-codec", "prost", "prost-build", - "sc-client-api", - "sc-network", - "sp-blockchain", - "sp-core", - "sp-runtime", + "sc-client-api 27.0.0", + "sc-network 0.33.0", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", "thiserror", ] @@ -10541,7 +11830,43 @@ version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10c697aa8f52cf194b9f00113a7d0d3ce5d1456bedd6169a9caae10737f02907" dependencies = [ - "array-bytes 6.1.0", + "array-bytes 6.2.2", + "async-channel", + "async-trait", + "fork-tree", + "futures", + "futures-timer", + "libp2p", + "log", + "mockall", + "parity-scale-codec", + "prost", + "prost-build", + "sc-client-api 25.0.0", + "sc-consensus 0.30.0", + "sc-network 0.31.0", + "sc-network-common 0.30.0", + "sc-utils 11.0.0", + "schnellru", + "smallvec", + "sp-arithmetic 20.0.0", + "sp-blockchain 25.0.0", + "sp-consensus 0.29.0", + "sp-consensus-grandpa 10.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "substrate-prometheus-endpoint", + "thiserror", + "tokio-stream", +] + +[[package]] +name = "sc-network-sync" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd7645483f69449667520359d6518320a2a938d7ef9f03037486b489cc597896" +dependencies = [ + "array-bytes 6.2.2", "async-channel", "async-trait", "fork-tree", @@ -10553,21 +11878,22 @@ dependencies = [ "parity-scale-codec", "prost", "prost-build", - "sc-client-api", - "sc-consensus", - "sc-network", - "sc-network-common", - "sc-utils", + "sc-client-api 27.0.0", + "sc-consensus 0.32.0", + "sc-network 0.33.0", + "sc-network-common 0.32.0", + "sc-utils 13.0.0", "schnellru", "smallvec", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", - "sp-consensus-grandpa", - "sp-core", - "sp-runtime", + "sp-arithmetic 22.0.0", + "sp-blockchain 27.0.0", + "sp-consensus 0.31.0", + "sp-consensus-grandpa 12.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", "substrate-prometheus-endpoint", "thiserror", + "tokio", "tokio-stream", ] @@ -10577,16 +11903,36 @@ version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb7c9bfc7b58ce229d1512158b8f13dc849ec24857d1c29a41a867fb8afb5c09" dependencies = [ - "array-bytes 6.1.0", + "array-bytes 6.2.2", "futures", "libp2p", "log", "parity-scale-codec", - "sc-network", - "sc-network-common", - "sc-utils", - "sp-consensus", - "sp-runtime", + "sc-network 0.31.0", + "sc-network-common 0.30.0", + "sc-utils 11.0.0", + "sp-consensus 0.29.0", + "sp-runtime 28.0.0", + "substrate-prometheus-endpoint", +] + +[[package]] +name = "sc-network-transactions" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b9a513f519b781ec238a7f33b4f71ca6333c9d3f175ca7b7850fb8ab266869" +dependencies = [ + "array-bytes 6.2.2", + "futures", + "libp2p", + "log", + "parity-scale-codec", + "sc-network 0.33.0", + "sc-network-common 0.32.0", + "sc-network-sync 0.32.0", + "sc-utils 13.0.0", + "sp-consensus 0.31.0", + "sp-runtime 30.0.1", "substrate-prometheus-endpoint", ] @@ -10601,25 +11947,58 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sc-block-builder", - "sc-chain-spec", - "sc-client-api", - "sc-mixnet", - "sc-rpc-api", - "sc-tracing", - "sc-transaction-pool-api", - "sc-utils", + "sc-block-builder 0.30.0", + "sc-chain-spec 24.0.0", + "sc-client-api 25.0.0", + "sc-mixnet 0.1.0", + "sc-rpc-api 0.30.0", + "sc-tracing 25.0.0", + "sc-transaction-pool-api 25.0.0", + "sc-utils 11.0.0", "serde_json", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-keystore", - "sp-offchain", - "sp-rpc", - "sp-runtime", - "sp-session", - "sp-statement-store", - "sp-version", + "sp-api 23.0.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-offchain 23.0.0", + "sp-rpc 23.0.0", + "sp-runtime 28.0.0", + "sp-session 24.0.0", + "sp-statement-store 7.0.0", + "sp-version 26.0.0", + "tokio", +] + +[[package]] +name = "sc-rpc" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a1251123e0fad557607750da1b000c062ee193fad86369e6a90ab2e6e0b4e13" +dependencies = [ + "futures", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-block-builder 0.32.0", + "sc-chain-spec 26.0.0", + "sc-client-api 27.0.0", + "sc-mixnet 0.3.0", + "sc-rpc-api 0.32.0", + "sc-tracing 27.0.0", + "sc-transaction-pool-api 27.0.0", + "sc-utils 13.0.0", + "serde_json", + "sp-api 25.0.0", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-keystore 0.33.0", + "sp-offchain 25.0.0", + "sp-rpc 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-statement-store 9.0.0", + "sp-version 28.0.0", "tokio", ] @@ -10631,16 +12010,37 @@ checksum = "def499ac717db8442fe18543e52330d5f105027b666df73c0b38e81e9105078b" dependencies = [ "jsonrpsee", "parity-scale-codec", - "sc-chain-spec", - "sc-mixnet", - "sc-transaction-pool-api", + "sc-chain-spec 24.0.0", + "sc-mixnet 0.1.0", + "sc-transaction-pool-api 25.0.0", "scale-info", "serde", "serde_json", - "sp-core", - "sp-rpc", - "sp-runtime", - "sp-version", + "sp-core 25.0.0", + "sp-rpc 23.0.0", + "sp-runtime 28.0.0", + "sp-version 26.0.0", + "thiserror", +] + +[[package]] +name = "sc-rpc-api" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ceef96e1df9b6f2db3d5ff8703dd79ce96bf0aa6d53b17fb1ee774a73e88ba" +dependencies = [ + "jsonrpsee", + "parity-scale-codec", + "sc-chain-spec 26.0.0", + "sc-mixnet 0.3.0", + "sc-transaction-pool-api 27.0.0", + "scale-info", + "serde", + "serde_json", + "sp-core 27.0.0", + "sp-rpc 25.0.0", + "sp-runtime 30.0.1", + "sp-version 28.0.0", "thiserror", ] @@ -10666,7 +12066,36 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "198ea9287111b4060ce1d70dce99804b99d1a92b5fb23a79d94bf0cb460ca3ce" dependencies = [ - "array-bytes 6.1.0", + "array-bytes 6.2.2", + "futures", + "futures-util", + "hex", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-chain-spec 24.0.0", + "sc-client-api 25.0.0", + "sc-transaction-pool-api 25.0.0", + "sc-utils 11.0.0", + "serde", + "sp-api 23.0.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-version 26.0.0", + "thiserror", + "tokio", + "tokio-stream", +] + +[[package]] +name = "sc-rpc-spec-v2" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9112cc7f746672f8080bafcb34c970e36db765f852f449b1e1640d44fe5fdc7d" +dependencies = [ + "array-bytes 6.2.2", "futures", "futures-util", "hex", @@ -10674,16 +12103,17 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sc-chain-spec", - "sc-client-api", - "sc-transaction-pool-api", - "sc-utils", - "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-runtime", - "sp-version", + "sc-chain-spec 26.0.0", + "sc-client-api 27.0.0", + "sc-transaction-pool-api 27.0.0", + "sc-utils 13.0.0", + "serde", + "sp-api 25.0.0", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-rpc 25.0.0", + "sp-runtime 30.0.1", + "sp-version 28.0.0", "thiserror", "tokio", "tokio-stream", @@ -10706,45 +12136,109 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "rand 0.8.5", - "sc-block-builder", - "sc-chain-spec", - "sc-client-api", - "sc-client-db", - "sc-consensus", - "sc-executor", - "sc-informant", - "sc-keystore", - "sc-network", - "sc-network-bitswap", - "sc-network-common", - "sc-network-light", - "sc-network-sync", - "sc-network-transactions", - "sc-rpc", + "sc-block-builder 0.30.0", + "sc-chain-spec 24.0.0", + "sc-client-api 25.0.0", + "sc-client-db 0.32.0", + "sc-consensus 0.30.0", + "sc-executor 0.29.0", + "sc-informant 0.30.0", + "sc-keystore 22.0.0", + "sc-network 0.31.0", + "sc-network-bitswap 0.30.0", + "sc-network-common 0.30.0", + "sc-network-light 0.30.0", + "sc-network-sync 0.30.0", + "sc-network-transactions 0.30.0", + "sc-rpc 26.0.0", + "sc-rpc-server", + "sc-rpc-spec-v2 0.31.0", + "sc-sysinfo 24.0.0", + "sc-telemetry 12.0.0", + "sc-tracing 25.0.0", + "sc-transaction-pool 25.0.0", + "sc-transaction-pool-api 25.0.0", + "sc-utils 11.0.0", + "serde", + "serde_json", + "sp-api 23.0.0", + "sp-blockchain 25.0.0", + "sp-consensus 0.29.0", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", + "sp-session 24.0.0", + "sp-state-machine 0.32.0", + "sp-storage 17.0.0", + "sp-transaction-pool 23.0.0", + "sp-transaction-storage-proof 23.0.0", + "sp-trie 26.0.0", + "sp-version 26.0.0", + "static_init", + "substrate-prometheus-endpoint", + "tempfile", + "thiserror", + "tokio", + "tracing", + "tracing-futures", +] + +[[package]] +name = "sc-service" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e21ba254620ee66bec56f2e7e93f4ed2a492da50009a09e524bfd21a5fdcb30" +dependencies = [ + "async-trait", + "directories", + "exit-future", + "futures", + "futures-timer", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "pin-project", + "rand 0.8.5", + "sc-chain-spec 26.0.0", + "sc-client-api 27.0.0", + "sc-client-db 0.34.0", + "sc-consensus 0.32.0", + "sc-executor 0.31.0", + "sc-informant 0.32.0", + "sc-keystore 24.0.0", + "sc-network 0.33.0", + "sc-network-bitswap 0.32.0", + "sc-network-common 0.32.0", + "sc-network-light 0.32.0", + "sc-network-sync 0.32.0", + "sc-network-transactions 0.32.0", + "sc-rpc 28.0.0", "sc-rpc-server", - "sc-rpc-spec-v2", - "sc-sysinfo", - "sc-telemetry", - "sc-tracing", - "sc-transaction-pool", - "sc-transaction-pool-api", - "sc-utils", + "sc-rpc-spec-v2 0.33.0", + "sc-sysinfo 26.0.0", + "sc-telemetry 14.0.0", + "sc-tracing 27.0.0", + "sc-transaction-pool 27.0.0", + "sc-transaction-pool-api 27.0.0", + "sc-utils 13.0.0", "serde", "serde_json", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-externalities", - "sp-keystore", - "sp-runtime", - "sp-session", - "sp-state-machine", - "sp-storage", - "sp-transaction-pool", - "sp-transaction-storage-proof", - "sp-trie", - "sp-version", + "sp-api 25.0.0", + "sp-blockchain 27.0.0", + "sp-consensus 0.31.0", + "sp-core 27.0.0", + "sp-externalities 0.24.0", + "sp-keystore 0.33.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-state-machine 0.34.0", + "sp-storage 18.0.0", + "sp-transaction-pool 25.0.0", + "sp-transaction-storage-proof 25.0.0", + "sp-trie 28.0.0", + "sp-version 28.0.0", "static_init", "substrate-prometheus-endpoint", "tempfile", @@ -10763,7 +12257,19 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sp-core", + "sp-core 25.0.0", +] + +[[package]] +name = "sc-state-db" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d20aeec62d91b8e8f0f7497bd147d427332a76c9b054e50973c3d289685808ee" +dependencies = [ + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sp-core 27.0.0", ] [[package]] @@ -10778,12 +12284,33 @@ dependencies = [ "rand 0.8.5", "rand_pcg", "regex", - "sc-telemetry", + "sc-telemetry 12.0.0", + "serde", + "serde_json", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sc-sysinfo" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a028b0b37acaa1394b6abc8344dbb4a9c26c3631b26db0e277b1c1772c73a867" +dependencies = [ + "derive_more", + "futures", + "libc", + "log", + "rand 0.8.5", + "rand_pcg", + "regex", + "sc-telemetry 14.0.0", "serde", "serde_json", - "sp-core", - "sp-io", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-std 13.0.0", ] [[package]] @@ -10799,7 +12326,27 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "rand 0.8.5", - "sc-utils", + "sc-utils 11.0.0", + "serde", + "serde_json", + "thiserror", + "wasm-timer", +] + +[[package]] +name = "sc-telemetry" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc5a1c7282f7f56b4caaed8ebb9d723cee92ebbdd0585e6e0e8e57a9fdcc590d" +dependencies = [ + "chrono", + "futures", + "libp2p", + "log", + "parking_lot 0.12.1", + "pin-project", + "rand 0.8.5", + "sc-utils 13.0.0", "serde", "serde_json", "thiserror", @@ -10821,15 +12368,46 @@ dependencies = [ "parking_lot 0.12.1", "regex", "rustc-hash", - "sc-client-api", + "sc-client-api 25.0.0", + "sc-tracing-proc-macro", + "serde", + "sp-api 23.0.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-rpc 23.0.0", + "sp-runtime 28.0.0", + "sp-tracing 14.0.0", + "thiserror", + "tracing", + "tracing-log", + "tracing-subscriber", +] + +[[package]] +name = "sc-tracing" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44a512ed582251b8605cfa0245787f60434e241666298bd4dd5f206d6c0814d0" +dependencies = [ + "ansi_term", + "atty", + "chrono", + "lazy_static", + "libc", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "regex", + "rustc-hash", + "sc-client-api 27.0.0", "sc-tracing-proc-macro", "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-rpc", - "sp-runtime", - "sp-tracing", + "sp-api 25.0.0", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-rpc 25.0.0", + "sp-runtime 30.0.1", + "sp-tracing 15.0.0", "thiserror", "tracing", "tracing-log", @@ -10861,16 +12439,43 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sc-client-api", - "sc-transaction-pool-api", - "sc-utils", - "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-runtime", - "sp-tracing", - "sp-transaction-pool", + "sc-client-api 25.0.0", + "sc-transaction-pool-api 25.0.0", + "sc-utils 11.0.0", + "serde", + "sp-api 23.0.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-tracing 14.0.0", + "sp-transaction-pool 23.0.0", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "sc-transaction-pool" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28627585ac5e3d8095067f5052d4b98fb5d2d61d819e8f27a7057750a03984f" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "linked-hash-map", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api 27.0.0", + "sc-transaction-pool-api 27.0.0", + "sc-utils 13.0.0", + "serde", + "sp-api 25.0.0", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-tracing 15.0.0", + "sp-transaction-pool 25.0.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -10886,9 +12491,26 @@ dependencies = [ "log", "parity-scale-codec", "serde", - "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "thiserror", +] + +[[package]] +name = "sc-transaction-pool-api" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99b8e2122ec55f2e7d14fcfad524e278e4ba7dc5f398f32e32e17c31ee519c72" +dependencies = [ + "async-trait", + "futures", + "log", + "parity-scale-codec", + "serde", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", "thiserror", ] @@ -10905,7 +12527,23 @@ dependencies = [ "log", "parking_lot 0.12.1", "prometheus", - "sp-arithmetic", + "sp-arithmetic 20.0.0", +] + +[[package]] +name = "sc-utils" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6921990b07ea392b5cea4fae2153bac23cea983c09e5a6716bcae59340e9150d" +dependencies = [ + "async-channel", + "futures", + "futures-timer", + "lazy_static", + "log", + "parking_lot 0.12.1", + "prometheus", + "sp-arithmetic 22.0.0", ] [[package]] @@ -10949,7 +12587,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.7", "cfg-if", "hashbrown 0.13.2", ] @@ -10968,7 +12606,7 @@ dependencies = [ "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] @@ -10986,78 +12624,60 @@ checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" [[package]] name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring", - "untrusted", + "ring 0.17.7", + "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", + "base16ct", + "der", + "generic-array 0.14.7", + "pkcs8", + "subtle 2.5.0", + "zeroize", ] [[package]] -name = "sec1" -version = "0.3.0" +name = "secp256k1" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" dependencies = [ - "base16ct 0.1.1", - "der 0.6.1", - "generic-array 0.14.7", - "pkcs8 0.9.0", - "subtle 2.4.1", - "zeroize", + "secp256k1-sys 0.6.1", ] [[package]] -name = "sec1" -version = "0.7.3" +name = "secp256k1" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +checksum = "3f622567e3b4b38154fb8190bcf6b160d7a4301d70595a49195b48c116007a27" dependencies = [ - "base16ct 0.2.0", - "der 0.7.8", - "generic-array 0.14.7", - "pkcs8 0.10.2", - "subtle 2.4.1", - "zeroize", + "secp256k1-sys 0.9.2", ] [[package]] -name = "secp256k1" -version = "0.24.3" +name = "secp256k1-sys" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" +checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" dependencies = [ - "secp256k1-sys", + "cc", ] [[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", ] @@ -11155,9 +12775,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.109" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0652c533506ad7a2e353cce269330d6afd8bdfb6d75e0ace5b35aacbd7b9e9" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ "itoa", "ryu", @@ -11166,9 +12786,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -11188,9 +12808,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -11224,9 +12844,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -11245,18 +12865,18 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] [[package]] name = "shlex" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" [[package]] name = "signal-hook-registry" @@ -11269,19 +12889,9 @@ dependencies = [ [[package]] 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" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", "rand_core 0.6.4", @@ -11300,6 +12910,12 @@ dependencies = [ "wide", ] +[[package]] +name = "simple-mermaid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9292312e0707d1308f09befeb8d2a1fcadd590d0985a617edc8a381ef8f9424" + [[package]] name = "siphasher" version = "0.3.11" @@ -11330,8 +12946,21 @@ dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "slot-range-helper" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4976dad61a607ef0b19e0cf9afb94846be96e1ac817e664dc71f67de3d7704a2" +dependencies = [ + "enumn", + "parity-scale-codec", + "paste", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -11342,32 +12971,32 @@ checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" [[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.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9d1425eb528a21de2755c75af4c9b5d57f50a0d4c3b7f1828a4cd03f8ba155" +checksum = "58021967fd0a5eeeb23b08df6cc244a4d4a5b4aec1d27c9e02fad1a58b4cd74e" dependencies = [ - "aes-gcm 0.9.4", + "aes-gcm", "blake2 0.10.6", "chacha20poly1305", "curve25519-dalek 4.0.0", "rand_core 0.6.4", - "ring", + "ring 0.17.7", "rustc_version 0.4.0", - "sha2 0.10.7", - "subtle 2.4.1", + "sha2 0.10.8", + "subtle 2.5.0", ] [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", @@ -11375,9 +13004,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", "windows-sys 0.48.0", @@ -11410,15 +13039,37 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-api-proc-macro", - "sp-core", - "sp-externalities", - "sp-metadata-ir", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-trie", - "sp-version", + "sp-api-proc-macro 12.0.0", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-metadata-ir 0.4.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "sp-std 12.0.0", + "sp-trie 26.0.0", + "sp-version 26.0.0", + "thiserror", +] + +[[package]] +name = "sp-api" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7f4202d58db32c71adb23be744f7b0c93a8063ad9b17b9b4f81d3fc4633ae6" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "scale-info", + "sp-api-proc-macro 14.0.0", + "sp-core 27.0.0", + "sp-externalities 0.24.0", + "sp-metadata-ir 0.5.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "sp-std 13.0.0", + "sp-trie 28.0.0", + "sp-version 28.0.0", "thiserror", ] @@ -11437,6 +13088,21 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "sp-api-proc-macro" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f19a8b3ebe748e59c5a679bb7510251b9c96873c0f4dc7669030c8254598716" +dependencies = [ + "Inflector", + "blake2 0.10.6", + "expander 2.0.0", + "proc-macro-crate 2.0.1", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "sp-application-crypto" version = "27.0.0" @@ -11446,9 +13112,23 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-std", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-application-crypto" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd703034c3f4f34fa4965e0d4d773f50d0f56256b1759b36016b3b1baba147d8" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-std 13.0.0", ] [[package]] @@ -11462,7 +13142,22 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 12.0.0", + "static_assertions", +] + +[[package]] +name = "sp-arithmetic" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dec3290d64ec9994457abe974f82fe7260c9cc32e920e4cf20611346ca7464" +dependencies = [ + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-std 13.0.0", "static_assertions", ] @@ -11474,10 +13169,24 @@ checksum = "e204d85bad6f02a5ae8fbba83c365e20459e979fd69db5575ba4b3ea1025ab3c" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api", - "sp-application-crypto", - "sp-runtime", - "sp-std", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-authority-discovery" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d626bc6b32b0defc2b7bdb5899c8f4ca86e9646e0cba80d09e9c263fd74fe39" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -11486,10 +13195,22 @@ version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6cd16df3d1cdad862d3e764f10f7675876b011e032907423fdfa377ae2ec8575" dependencies = [ - "sp-api", - "sp-inherents", - "sp-runtime", - "sp-std", + "sp-api 23.0.0", + "sp-inherents 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-block-builder" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64475dafccb351ea025f06f40b205aae8de16563347622d513a0a7767090ca4d" +dependencies = [ + "sp-api 25.0.0", + "sp-inherents 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -11503,11 +13224,30 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "schnellru", - "sp-api", - "sp-consensus", + "sp-api 23.0.0", + "sp-consensus 0.29.0", + "sp-database", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "thiserror", +] + +[[package]] +name = "sp-blockchain" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97252dce922ebb4239e52173d9d67957892da74196372e52d05f44ff68f887a2" +dependencies = [ + "futures", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "schnellru", + "sp-api 25.0.0", + "sp-consensus 0.31.0", "sp-database", - "sp-runtime", - "sp-state-machine", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", "thiserror", ] @@ -11520,10 +13260,26 @@ dependencies = [ "async-trait", "futures", "log", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", + "sp-core 25.0.0", + "sp-inherents 23.0.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "thiserror", +] + +[[package]] +name = "sp-consensus" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae7acf47fab76b2929ca26f679f1b94e66c03ae1f68637878fe6f18bc4dd160" +dependencies = [ + "async-trait", + "futures", + "log", + "sp-core 27.0.0", + "sp-inherents 25.0.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", "thiserror", ] @@ -11536,13 +13292,31 @@ dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-api", - "sp-application-crypto", - "sp-consensus-slots", - "sp-inherents", - "sp-runtime", - "sp-std", - "sp-timestamp", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-consensus-slots 0.29.0", + "sp-inherents 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-timestamp 23.0.0", +] + +[[package]] +name = "sp-consensus-aura" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "237ffe23611f0f1e152b09e513090227752652eab2f10965825865102a86bfcc" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-consensus-slots 0.31.0", + "sp-inherents 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-timestamp 25.0.0", ] [[package]] @@ -11555,14 +13329,34 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api", - "sp-application-crypto", - "sp-consensus-slots", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-std", - "sp-timestamp", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-consensus-slots 0.29.0", + "sp-core 25.0.0", + "sp-inherents 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-timestamp 23.0.0", +] + +[[package]] +name = "sp-consensus-babe" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d248658f288676d2c814bcf79577a5bd0b9f386bfae5c4860bfed6ca71ab973b" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-consensus-slots 0.31.0", + "sp-core 27.0.0", + "sp-inherents 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-timestamp 25.0.0", ] [[package]] @@ -11575,13 +13369,33 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-mmr-primitives", - "sp-runtime", - "sp-std", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-mmr-primitives 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "strum", +] + +[[package]] +name = "sp-consensus-beefy" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9b2a4f6aac1f224dd3c4cdb2637c3c1a1c518a5af816fd87b4978c5a61a4cf" +dependencies = [ + "lazy_static", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-mmr-primitives 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", "strum", ] @@ -11596,12 +13410,31 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-keystore", - "sp-runtime", - "sp-std", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-consensus-grandpa" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c01ae3526e29cc2c54daa6c55cb84911d89642f49cc6b2e49a6103f611c05a8" +dependencies = [ + "finality-grandpa", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-core 27.0.0", + "sp-keystore 0.33.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -11613,8 +13446,21 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", - "sp-timestamp", + "sp-std 12.0.0", + "sp-timestamp 23.0.0", +] + +[[package]] +name = "sp-consensus-slots" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4627b5d9a9991438c42944fb704315092d6c07967469aafa135328be2f9f412" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-std 13.0.0", + "sp-timestamp 25.0.0", ] [[package]] @@ -11623,7 +13469,7 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9ebb090ead698a6df04347c86a31ba91a387edb8a58534ec70c4f977d1e1e87" dependencies = [ - "array-bytes 6.1.0", + "array-bytes 6.2.2", "bitflags 1.3.2", "blake2 0.10.6", "bounded-collections", @@ -11646,15 +13492,15 @@ dependencies = [ "regex", "scale-info", "schnorrkel", - "secp256k1", + "secp256k1 0.24.3", "secrecy", "serde", - "sp-core-hashing", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-core-hashing 13.0.0", + "sp-debug-derive 12.0.0", + "sp-externalities 0.23.0", + "sp-runtime-interface 21.0.0", + "sp-std 12.0.0", + "sp-storage 17.0.0", "ss58-registry", "substrate-bip39", "thiserror", @@ -11664,6 +13510,52 @@ dependencies = [ "zeroize", ] +[[package]] +name = "sp-core" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d92c65ecfdb86fa1c4809b06a2a83d6f3bdb1ef4fe4c5a4f6df19229030d5283" +dependencies = [ + "array-bytes 6.2.2", + "bip39", + "bitflags 1.3.2", + "blake2 0.10.6", + "bounded-collections", + "bs58 0.5.0", + "dyn-clonable", + "ed25519-zebra", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "itertools 0.10.5", + "libsecp256k1", + "log", + "merlin", + "parity-scale-codec", + "parking_lot 0.12.1", + "paste", + "primitive-types", + "rand 0.8.5", + "scale-info", + "schnorrkel", + "secp256k1 0.28.1", + "secrecy", + "serde", + "sp-core-hashing 14.0.0", + "sp-debug-derive 13.0.0", + "sp-externalities 0.24.0", + "sp-runtime-interface 23.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "ss58-registry", + "substrate-bip39", + "thiserror", + "tracing", + "w3f-bls", + "zeroize", +] + [[package]] name = "sp-core-hashing" version = "13.0.0" @@ -11673,7 +13565,21 @@ dependencies = [ "blake2b_simd", "byteorder", "digest 0.10.7", - "sha2 0.10.7", + "sha2 0.10.8", + "sha3", + "twox-hash", +] + +[[package]] +name = "sp-core-hashing" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1936171e56a51272757760cc50883d2a8c37c650b3602a0aeed05b0c4fffc5f1" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.8", "sha3", "twox-hash", ] @@ -11685,7 +13591,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ce3e6931303769197da81facefa86159fa1085dcd96ecb7e7407b5b93582a0" dependencies = [ "quote", - "sp-core-hashing", + "sp-core-hashing 13.0.0", + "syn 2.0.48", +] + +[[package]] +name = "sp-core-hashing-proc-macro" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8497dc98fc204ba9c09abb99840d64964de1925fbd9ff74cc01aa18492c19bd8" +dependencies = [ + "quote", + "sp-core-hashing 14.0.0", "syn 2.0.48", ] @@ -11695,15 +13612,26 @@ version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c6e8c710d6a71512af6f42d9dba9c3d1f6ad793846480babf459bbde3d60a94" dependencies = [ - "kvdb", - "parking_lot 0.12.1", + "kvdb", + "parking_lot 0.12.1", +] + +[[package]] +name = "sp-debug-derive" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50535e1a5708d3ba5c1195b59ebefac61cc8679c2c24716b87a86e8b7ed2e4a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", ] [[package]] name = "sp-debug-derive" -version = "12.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50535e1a5708d3ba5c1195b59ebefac61cc8679c2c24716b87a86e8b7ed2e4a1" +checksum = "90fd2c660c3e940df93f4920b183cc103443d66503f68189fa7e4b3f09996a18" dependencies = [ "proc-macro2", "quote", @@ -11718,8 +13646,20 @@ checksum = "884d05160bc89d0943d1c9fb8006c3d44b80f37f8af607aeff8d4d9cc82e279a" dependencies = [ "environmental", "parity-scale-codec", - "sp-std", - "sp-storage", + "sp-std 12.0.0", + "sp-storage 17.0.0", +] + +[[package]] +name = "sp-externalities" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac0a1df458d0bba69bc011a3b0197049396272e497b207ad161289e7518b74bf" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 13.0.0", + "sp-storage 18.0.0", ] [[package]] @@ -11729,9 +13669,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0cb71d40ad47e40bdcce5ae5531c7d7ba579cd495a0e0413642fb063fa66f84" dependencies = [ "serde_json", - "sp-api", - "sp-runtime", - "sp-std", + "sp-api 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-genesis-builder" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8152be87c61e6d74f491d05b67086408462ab0593b2340311a91a2d3d246f03" +dependencies = [ + "serde_json", + "sp-api 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -11744,8 +13696,23 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "thiserror", +] + +[[package]] +name = "sp-inherents" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7089c364b99df5ce82c1cedcaba56f574ff06e403d9f8640bee33f87750566a2" +dependencies = [ + "async-trait", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime 30.0.1", + "sp-std 13.0.0", "thiserror", ] @@ -11761,15 +13728,40 @@ dependencies = [ "log", "parity-scale-codec", "rustversion", - "secp256k1", - "sp-core", - "sp-externalities", - "sp-keystore", - "sp-runtime-interface", - "sp-state-machine", - "sp-std", - "sp-tracing", - "sp-trie", + "secp256k1 0.24.3", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-keystore 0.31.0", + "sp-runtime-interface 21.0.0", + "sp-state-machine 0.32.0", + "sp-std 12.0.0", + "sp-tracing 14.0.0", + "sp-trie 26.0.0", + "tracing", + "tracing-core", +] + +[[package]] +name = "sp-io" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c600c911757504c43f8c354edd1b0d327a1c2abfe947e490a6b62d8f1543d96" +dependencies = [ + "bytes", + "ed25519-dalek", + "libsecp256k1", + "log", + "parity-scale-codec", + "rustversion", + "secp256k1 0.28.1", + "sp-core 27.0.0", + "sp-externalities 0.24.0", + "sp-keystore 0.33.0", + "sp-runtime-interface 23.0.0", + "sp-state-machine 0.34.0", + "sp-std 13.0.0", + "sp-tracing 15.0.0", + "sp-trie 28.0.0", "tracing", "tracing-core", ] @@ -11781,8 +13773,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "655ec0b35cb9cb9029fb323aa676b07d58deb872cecc7566e50278409a00ee95" dependencies = [ "lazy_static", - "sp-core", - "sp-runtime", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "strum", +] + +[[package]] +name = "sp-keyring" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245dfdf093568086ba7e3099319998a37d5ccf6b9faab45f170c766fc1122c37" +dependencies = [ + "lazy_static", + "sp-core 27.0.0", + "sp-runtime 30.0.1", "strum", ] @@ -11794,8 +13798,21 @@ checksum = "8b8ec5ebbba70bee83d79c3fe5e49f12df0a4bb6029858ddf9a15eea7539a592" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "sp-core", - "sp-externalities", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "thiserror", +] + +[[package]] +name = "sp-keystore" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b955546b815ace30f63542efda71ce4e010444596cd8316f7ef49a26fb971709" +dependencies = [ + "parity-scale-codec", + "parking_lot 0.12.1", + "sp-core 27.0.0", + "sp-externalities 0.24.0", "thiserror", ] @@ -11809,6 +13826,16 @@ dependencies = [ "zstd 0.12.4", ] +[[package]] +name = "sp-maybe-compressed-blob" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0950218edb5c5fb4867e28814d7b13c13a3c80ea37f356dc410437105a07cff8" +dependencies = [ + "thiserror", + "zstd 0.12.4", +] + [[package]] name = "sp-metadata-ir" version = "0.4.0" @@ -11818,7 +13845,19 @@ dependencies = [ "frame-metadata", "parity-scale-codec", "scale-info", - "sp-std", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-metadata-ir" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97cacf4a5b315d8709b5a29ad8e736c0ad5b719e70d02aca0c29c7e3dca4a6e2" +dependencies = [ + "frame-metadata", + "parity-scale-codec", + "scale-info", + "sp-std 13.0.0", ] [[package]] @@ -11829,9 +13868,22 @@ checksum = "bdf61f28ca97aab6c21a3c6e0ed496e60d505e5de1f43fd4ba748c9afaa4fc85" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api", - "sp-application-crypto", - "sp-std", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-mixnet" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19bd1dca687e8b360ea48c6e7351c175c8c2ca4d7f0cc0ec88274ef8519c507f" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-std 13.0.0", ] [[package]] @@ -11845,11 +13897,30 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api", - "sp-core", - "sp-debug-derive", - "sp-runtime", - "sp-std", + "sp-api 23.0.0", + "sp-core 25.0.0", + "sp-debug-derive 12.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "thiserror", +] + +[[package]] +name = "sp-mmr-primitives" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84b6fad7c530c463057d68d465aff08e5fff068c3c6827ff64fbd1ee34d3f2a5" +dependencies = [ + "ckb-merkle-mountain-range", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api 25.0.0", + "sp-core 27.0.0", + "sp-debug-derive 13.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", "thiserror", ] @@ -11862,10 +13933,25 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-core", - "sp-runtime", - "sp-std", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-npos-elections" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d56d158aed198ec52dc04ee64e6be8dd1bb42e6837c80aa5aa8c058479afa8" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -11874,9 +13960,20 @@ version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9310227f043ed99877b0449a683025a7461431a00995dcd6ef423a273d0fd85d" dependencies = [ - "sp-api", - "sp-core", - "sp-runtime", + "sp-api 23.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", +] + +[[package]] +name = "sp-offchain" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5016e6a6cb55aa55f290abe5c5f5efc35defa9eeb996a21667d18ae256c45d5c" +dependencies = [ + "sp-api 25.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", ] [[package]] @@ -11898,7 +13995,18 @@ checksum = "51867fea921f54bbaa2bf505f373559b5f3b80e8d7f38ecb9677f0d3795a3e6a" dependencies = [ "rustc-hash", "serde", - "sp-core", + "sp-core 25.0.0", +] + +[[package]] +name = "sp-rpc" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3921819bed23ddf4ad6bf402b596a6950255b91f9b58fee88b454dd988d938d6" +dependencies = [ + "rustc-hash", + "serde", + "sp-core 27.0.0", ] [[package]] @@ -11916,12 +14024,37 @@ dependencies = [ "rand 0.8.5", "scale-info", "serde", - "sp-application-crypto", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-std", - "sp-weights", + "sp-application-crypto 27.0.0", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-std 12.0.0", + "sp-weights 24.0.0", +] + +[[package]] +name = "sp-runtime" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee4bb0ddcc4e26cc6c770b49149e1a07ad6b34ab22d3da94330994b7145a025f" +dependencies = [ + "docify", + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "paste", + "rand 0.8.5", + "scale-info", + "serde", + "simple-mermaid", + "sp-application-crypto 29.0.0", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-std 13.0.0", + "sp-weights 26.0.0", ] [[package]] @@ -11934,12 +14067,31 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities", - "sp-runtime-interface-proc-macro", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "sp-externalities 0.23.0", + "sp-runtime-interface-proc-macro 15.0.0", + "sp-std 12.0.0", + "sp-storage 17.0.0", + "sp-tracing 14.0.0", + "sp-wasm-interface 18.0.0", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "23.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0093f419cb2ef80c8ecb583ac54e05d1105710eb84add7f9483c8ea882cbaff" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.24.0", + "sp-runtime-interface-proc-macro 16.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-tracing 15.0.0", + "sp-wasm-interface 19.0.0", "static_assertions", ] @@ -11956,6 +14108,20 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ebdb4aff8286f5095871b2f950037d690edb0fed0590af5f6735352533a53b6" +dependencies = [ + "Inflector", + "expander 2.0.0", + "proc-macro-crate 2.0.1", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "sp-session" version = "24.0.0" @@ -11964,12 +14130,28 @@ checksum = "248dd8f49aa96b56bf0a7d513691ddb4194f9359fdb93e94397eabdef1036085" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api", - "sp-core", - "sp-keystore", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-api 23.0.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", + "sp-staking 23.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-session" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cdec3cb1c7f0900cfaec5de83f00841d99f2c2fbd32d44931601b43ba6d5bfa" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api 25.0.0", + "sp-core 27.0.0", + "sp-keystore 0.33.0", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] @@ -11982,9 +14164,24 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-staking" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15411bbc26ca6d9b14d44698ef19243c8875fa7cc3260621ba28b3241c477c" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -11999,11 +14196,33 @@ dependencies = [ "parking_lot 0.12.1", "rand 0.8.5", "smallvec", - "sp-core", - "sp-externalities", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-panic-handler", + "sp-std 12.0.0", + "sp-trie 26.0.0", + "thiserror", + "tracing", + "trie-db", +] + +[[package]] +name = "sp-state-machine" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f5027dceaa62f3c18f40593ee6a898df69c70e84e01450a17293511c4f3c46c" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "smallvec", + "sp-core 27.0.0", + "sp-externalities 0.24.0", "sp-panic-handler", - "sp-std", - "sp-trie", + "sp-std 13.0.0", + "sp-trie 28.0.0", "thiserror", "tracing", "trie-db", @@ -12015,21 +14234,46 @@ version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b8654bcd37602b1811414050d34d14f543873bd4e64e50d210a0116b660c600" dependencies = [ - "aes-gcm 0.10.2", + "aes-gcm", + "curve25519-dalek 4.0.0", + "ed25519-dalek", + "hkdf", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sha2 0.10.8", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-runtime 28.0.0", + "sp-runtime-interface 21.0.0", + "sp-std 12.0.0", + "thiserror", + "x25519-dalek 2.0.0", +] + +[[package]] +name = "sp-statement-store" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66ce852bff3c772be9646cc3491ee7dc8db47a3fb860659b5258c585a730013" +dependencies = [ + "aes-gcm", "curve25519-dalek 4.0.0", "ed25519-dalek", "hkdf", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sha2 0.10.7", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-externalities", - "sp-runtime", - "sp-runtime-interface", - "sp-std", + "sha2 0.10.8", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-core 27.0.0", + "sp-externalities 0.24.0", + "sp-runtime 30.0.1", + "sp-runtime-interface 23.0.0", + "sp-std 13.0.0", "thiserror", "x25519-dalek 2.0.0", ] @@ -12040,6 +14284,12 @@ version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54c78c5a66682568cc7b153603c5d01a2cc8f5c221c7b1e921517a0eef18ae05" +[[package]] +name = "sp-std" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71323a3b5f189085d11123ce397b3cdfaec4437071243b51f68a38a4833fbaa7" + [[package]] name = "sp-storage" version = "17.0.0" @@ -12050,21 +14300,49 @@ dependencies = [ "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 12.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-storage" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5300c9012180259489a97167f4c45cf3362446e5f0d0c66b6e9342968be8f22" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 13.0.0", + "sp-std 13.0.0", ] [[package]] name = "sp-timestamp" version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004a7f453240db80b2967c0e1c6411836efc7daa7afae98fd16202caa51460e0" +checksum = "004a7f453240db80b2967c0e1c6411836efc7daa7afae98fd16202caa51460e0" +dependencies = [ + "async-trait", + "parity-scale-codec", + "sp-inherents 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "thiserror", +] + +[[package]] +name = "sp-timestamp" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c6c12bc3bce3f785984843ea997e7f3da9c43ee392bf8c6f9ab183976c0cbf" dependencies = [ "async-trait", "parity-scale-codec", - "sp-inherents", - "sp-runtime", - "sp-std", + "sp-inherents 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", "thiserror", ] @@ -12075,7 +14353,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d727cb5265641ffbb7d4e42c18b63e29f6cfdbd240aae3bcf093c3d6eb29a19" dependencies = [ "parity-scale-codec", - "sp-std", + "sp-std 12.0.0", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-tracing" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b63d14c3214b8b5fe35b67bd61124b5f080cc9d1312b227e0c6cc2a198461e" +dependencies = [ + "parity-scale-codec", + "sp-std 13.0.0", "tracing", "tracing-core", "tracing-subscriber", @@ -12087,8 +14378,18 @@ version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7cd2afe89c474339d15d06e73639171ebe4d280be6904d9349072103da21427" dependencies = [ - "sp-api", - "sp-runtime", + "sp-api 23.0.0", + "sp-runtime 28.0.0", +] + +[[package]] +name = "sp-transaction-pool" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3927edc3371ad785725b3e50edf6769097ba64b193fc4779ec6e047f0d106dd0" +dependencies = [ + "sp-api 25.0.0", + "sp-runtime 30.0.1", ] [[package]] @@ -12100,11 +14401,27 @@ dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-std", - "sp-trie", + "sp-core 25.0.0", + "sp-inherents 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-trie 26.0.0", +] + +[[package]] +name = "sp-transaction-storage-proof" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c58c860d7e2e7dc267fa0d8bcf451816d9a0e387c4fcefafb15412aa7fd97fa" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "sp-core 27.0.0", + "sp-inherents 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-trie 28.0.0", ] [[package]] @@ -12113,7 +14430,32 @@ version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e359b358263cc322c3f678c272a3a519621d9853dcfa1374dfcbdb5f54c6f85" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.7", + "hash-db", + "hashbrown 0.13.2", + "lazy_static", + "memory-db", + "nohash-hasher", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "scale-info", + "schnellru", + "sp-core 25.0.0", + "sp-std 12.0.0", + "thiserror", + "tracing", + "trie-db", + "trie-root", +] + +[[package]] +name = "sp-trie" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cbc3ad723c9addc4b7aafbe8bfabf638c39be3c911e11f58e924e17554003ac" +dependencies = [ + "ahash 0.8.7", "hash-db", "hashbrown 0.13.2", "lazy_static", @@ -12124,8 +14466,9 @@ dependencies = [ "rand 0.8.5", "scale-info", "schnellru", - "sp-core", - "sp-std", + "sp-core 27.0.0", + "sp-externalities 0.24.0", + "sp-std 13.0.0", "thiserror", "tracing", "trie-db", @@ -12143,9 +14486,27 @@ dependencies = [ "parity-wasm", "scale-info", "serde", - "sp-core-hashing-proc-macro", - "sp-runtime", - "sp-std", + "sp-core-hashing-proc-macro 13.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-version-proc-macro", + "thiserror", +] + +[[package]] +name = "sp-version" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f18671744ee3af2a325daa257cc7aba2c464b36cca165d61bec72ed1ddcbb51" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "parity-wasm", + "scale-info", + "serde", + "sp-core-hashing-proc-macro 14.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", "sp-version-proc-macro", "thiserror", ] @@ -12172,7 +14533,21 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std", + "sp-std 12.0.0", + "wasmtime", +] + +[[package]] +name = "sp-wasm-interface" +version = "19.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4ef2e859d3cde7294c3bf691f8f64244a6a9bb67e53c65729b129318757070e" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std 13.0.0", "wasmtime", ] @@ -12186,10 +14561,26 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-arithmetic", - "sp-core", - "sp-debug-derive", - "sp-std", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-debug-derive 12.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-weights" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8813a9942a3b900d5ce109875b91ff8ae7eb5849545ebb6464c22aa21e42622e" +dependencies = [ + "bounded-collections", + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic 22.0.0", + "sp-debug-derive 13.0.0", + "sp-std 13.0.0", ] [[package]] @@ -12198,11 +14589,17 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[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", @@ -12211,29 +14608,19 @@ 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 = "ss58-registry" -version = "1.43.0" +version = "1.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6915280e2d0db8911e5032a5c275571af6bdded2916abd691a659be25d3439" +checksum = "35935738370302d5e33963665b77541e4b990a3e919ec904c837a56cfc891de1" dependencies = [ "Inflector", "num-format", @@ -12256,41 +14643,41 @@ version = "1.0.0" dependencies = [ "binary-merkle-tree", "bitvec", - "frame-benchmarking", - "frame-election-provider-support", - "frame-executive", + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-executive 27.0.0", "frame-remote-externalities", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-system-benchmarking 27.0.0", + "frame-system-rpc-runtime-api 25.0.0", + "frame-try-runtime 0.33.0", "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-rate", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", + "pallet-asset-rate 6.0.0", + "pallet-authority-discovery 27.0.0", + "pallet-authorship 27.0.0", + "pallet-babe 27.0.0", "pallet-bags-list", - "pallet-balances", + "pallet-balances 27.0.0", "pallet-beefy", "pallet-beefy-mmr", "pallet-bounties", "pallet-child-bounties", - "pallet-collective", + "pallet-collective 27.0.0", "pallet-conviction-voting", "pallet-democracy", - "pallet-election-provider-multi-phase", - "pallet-election-provider-support-benchmarking", + "pallet-election-provider-multi-phase 26.0.0", + "pallet-election-provider-support-benchmarking 26.0.0", "pallet-elections-phragmen", - "pallet-fast-unstake", + "pallet-fast-unstake 26.0.0", "pallet-grandpa", "pallet-identity", - "pallet-im-online", + "pallet-im-online 26.0.0", "pallet-indices", - "pallet-membership", - "pallet-message-queue", + "pallet-membership 27.0.0", + "pallet-message-queue 30.0.0", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -12300,31 +14687,31 @@ dependencies = [ "pallet-offences", "pallet-offences-benchmarking", "pallet-preimage", - "pallet-proxy", + "pallet-proxy 27.0.0", "pallet-ranked-collective", "pallet-recovery", "pallet-referenda", - "pallet-scheduler", - "pallet-session", + "pallet-scheduler 28.0.0", + "pallet-session 27.0.0", "pallet-session-benchmarking", "pallet-society", - "pallet-staking", + "pallet-staking 27.0.0", "pallet-staking-runtime-api", "pallet-state-trie-migration", - "pallet-timestamp", + "pallet-timestamp 26.0.0", "pallet-tips", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-vesting", + "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment-rpc-runtime-api 27.0.0", + "pallet-treasury 26.0.0", + "pallet-utility 27.0.0", + "pallet-vesting 27.0.0", "pallet-whitelist", - "pallet-xcm", - "pallet-xcm-benchmarks", + "pallet-xcm 6.0.0", + "pallet-xcm-benchmarks 6.0.0", "parity-scale-codec", - "polkadot-primitives", - "polkadot-runtime-common", - "polkadot-runtime-parachains", + "polkadot-primitives 6.0.0", + "polkadot-runtime-common 6.0.0", + "polkadot-runtime-parachains 6.0.0", "rustc-hex", "scale-info", "separator", @@ -12332,35 +14719,35 @@ dependencies = [ "serde_derive", "serde_json", "smallvec", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-authority-discovery", - "sp-block-builder", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-keyring", - "sp-mmr-primitives", - "sp-npos-elections", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-transaction-pool", - "sp-trie", - "sp-version", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-arithmetic 22.0.0", + "sp-authority-discovery 25.0.0", + "sp-block-builder 25.0.0", + "sp-consensus-babe 0.31.0", + "sp-consensus-beefy 12.0.0", + "sp-core 27.0.0", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-keyring 30.0.0", + "sp-mmr-primitives 25.0.0", + "sp-npos-elections 25.0.0", + "sp-offchain 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-staking 25.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-tracing 15.0.0", + "sp-transaction-pool 25.0.0", + "sp-trie 28.0.0", + "sp-version 28.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", + "staging-xcm-executor 6.0.0", "static_assertions", - "substrate-wasm-builder", + "substrate-wasm-builder 16.0.0", "tiny-keccak", "tokio", ] @@ -12371,13 +14758,28 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a1bcf863664ca5708d92894fc30d2c6606c7dbb7d7cfcf43b9ae69d5b83f4fb" dependencies = [ - "cumulus-primitives-core", - "frame-support", - "frame-system", + "cumulus-primitives-core 0.4.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "parity-scale-codec", + "scale-info", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "staging-parachain-info" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02fd981bfbcb9a942de6cf79555d510fcec0d1b255b74303daf0182ab69a495f" +dependencies = [ + "cumulus-primitives-core 0.6.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -12394,8 +14796,26 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-weights", - "xcm-procedural", + "sp-weights 24.0.0", + "xcm-procedural 4.0.0", +] + +[[package]] +name = "staging-xcm" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "407cc6e4b9cd1b62df9270d921d94ed375e697d65a782975d5e5a5f85bbeafb5" +dependencies = [ + "bounded-collections", + "derivative", + "environmental", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-weights 26.0.0", + "xcm-procedural 6.0.0", ] [[package]] @@ -12404,21 +14824,44 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa3b14246daaf0301dd35d698bac570d82ba0c6c6c1d3e149b93bcf377b2fc6b" dependencies = [ - "frame-support", - "frame-system", + "frame-support 25.0.0", + "frame-system 25.0.0", "impl-trait-for-tuples", "log", - "pallet-transaction-payment", + "pallet-transaction-payment 25.0.0", "parity-scale-codec", - "polkadot-parachain-primitives", + "polkadot-parachain-primitives 3.0.0", "scale-info", - "sp-arithmetic", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", - "staging-xcm", - "staging-xcm-executor", + "sp-arithmetic 20.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-weights 24.0.0", + "staging-xcm 4.0.0", + "staging-xcm-executor 4.0.0", +] + +[[package]] +name = "staging-xcm-builder" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6be7cc419a631fac2daa752fba1f730f7cf53b7490438342f67790de0b961508" +dependencies = [ + "frame-support 27.0.0", + "frame-system 27.0.0", + "impl-trait-for-tuples", + "log", + "pallet-transaction-payment 27.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 5.0.0", + "scale-info", + "sp-arithmetic 22.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-weights 26.0.0", + "staging-xcm 6.0.0", + "staging-xcm-executor 6.0.0", ] [[package]] @@ -12428,18 +14871,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a85a421053f810f3ed988ba3cc39d926c95f70f1ae73282aa8cd5c50072173b" dependencies = [ "environmental", - "frame-benchmarking", - "frame-support", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-weights 24.0.0", + "staging-xcm 4.0.0", +] + +[[package]] +name = "staging-xcm-executor" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19dfe56ba656b1cdb8886289618ed1d70fb5d7279cbd32c42bc2f0ce6b27845f" +dependencies = [ + "environmental", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", - "staging-xcm", + "scale-info", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-weights 26.0.0", + "staging-xcm 6.0.0", ] [[package]] @@ -12476,6 +14941,19 @@ dependencies = [ "syn 1.0.109", ] +[[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" @@ -12504,30 +14982,11 @@ dependencies = [ "syn 1.0.109", ] -[[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 3.0.1", - "lazy_static", - "md-5", - "rand 0.8.5", - "ring", - "subtle 2.4.1", - "thiserror", - "tokio", - "url", - "webrtc-util", -] - [[package]] name = "substrate-bip39" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" +checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", @@ -12574,16 +15033,16 @@ dependencies = [ [[package]] name = "substrate-rpc-client" -version = "0.30.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5575c2bef89385e5406565b8fe5620856d414e3846c60927a78f0788cb288c8c" +checksum = "7fa0743d9665e00acaed5800e605ee7c977eafbb2dfa86cbceda2708fe8d6ac3" dependencies = [ "async-trait", "jsonrpsee", "log", - "sc-rpc-api", + "sc-rpc-api 0.32.0", "serde", - "sp-runtime", + "sp-runtime 30.0.1", ] [[package]] @@ -12607,21 +15066,31 @@ dependencies = [ "cargo_metadata", "filetime", "parity-wasm", - "sp-maybe-compressed-blob", + "sp-maybe-compressed-blob 9.0.0", "strum", "tempfile", - "toml 0.7.6", + "toml 0.7.8", "walkdir", "wasm-opt", ] [[package]] -name = "substring" -version = "1.4.5" +name = "substrate-wasm-builder" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86" +checksum = "cc8166be0b5e24dc91209ec92869bfa6e0fbe07e64ebc7e92242121c04a83e2d" dependencies = [ - "autocfg", + "ansi_term", + "build-helper", + "cargo_metadata", + "filetime", + "parity-wasm", + "sp-maybe-compressed-blob 10.0.0", + "strum", + "tempfile", + "toml 0.7.8", + "walkdir", + "wasm-opt", ] [[package]] @@ -12632,9 +15101,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 = "syn" @@ -12695,14 +15164,14 @@ dependencies = [ name = "system-parachains-constants" version = "1.0.0" dependencies = [ - "frame-support", + "frame-support 27.0.0", "kusama-runtime-constants", - "parachains-common", - "polkadot-core-primitives", - "polkadot-primitives", + "parachains-common 6.0.0", + "polkadot-core-primitives 6.0.0", + "polkadot-primitives 6.0.0", "polkadot-runtime-constants", "smallvec", - "sp-runtime", + "sp-runtime 30.0.1", ] [[package]] @@ -12713,32 +15182,42 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.11" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" +checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] name = "tempfile" -version = "3.8.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if", - "fastrand 2.0.0", - "redox_syscall 0.3.5", - "rustix 0.38.8", + "fastrand", + "redox_syscall 0.4.1", + "rustix 0.38.28", "windows-sys 0.48.0", ] [[package]] name = "termcolor" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" 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.28", + "windows-sys 0.48.0", +] + [[package]] name = "termtree" version = "0.4.1" @@ -12747,18 +15226,18 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.48" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.48" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", @@ -12820,23 +15299,13 @@ dependencies = [ [[package]] name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "time" -version = "0.3.27" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb39ee79a6d8de55f48f2293a830e040392f1c5f16e336bdd1788cd0aadce07" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "itoa", + "powerfmt", "serde", "time-core", "time-macros", @@ -12844,15 +15313,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.13" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733d258752e9303d392b94b75230d07b0b9c489350c69b851fc6c065fde3e8f9" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -12869,7 +15338,7 @@ dependencies = [ "pbkdf2 0.11.0", "rand 0.8.5", "rustc-hash", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", "unicode-normalization", "wasm-bindgen", @@ -12885,16 +15354,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" @@ -12912,9 +15371,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.32.0" +version = "1.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ "backtrace", "bytes", @@ -12922,18 +15381,18 @@ dependencies = [ "mio", "num_cpus", "parking_lot 0.12.1", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "signal-hook-registry", - "socket2 0.5.3", + "socket2 0.5.5", "tokio-macros", "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", @@ -12957,7 +15416,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.6", + "rustls 0.21.10", "tokio", ] @@ -12968,22 +15427,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "tokio", "tokio-util", ] [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "tokio", "tracing", ] @@ -12999,14 +15458,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.19.14", + "toml_edit 0.19.15", ] [[package]] @@ -13032,11 +15491,11 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.1.0", "serde", "serde_spanned", "toml_datetime", @@ -13049,7 +15508,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.1.0", "serde", "serde_spanned", "toml_datetime", @@ -13069,18 +15528,18 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" +checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "bytes", "futures-core", "futures-util", "http", "http-body", "http-range-header", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "tower-layer", "tower-service", ] @@ -13099,22 +15558,21 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "log", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "tracing-attributes", "tracing-core", ] [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", @@ -13123,9 +15581,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -13148,8 +15606,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32c0555bd635d9adbf8dec0bf45f7c2aef7541121d648ba37f5f792a211077b6" dependencies = [ "coarsetime", - "polkadot-node-jaeger", - "polkadot-primitives", + "polkadot-node-jaeger 4.0.0", + "polkadot-primitives 4.0.0", + "tracing", + "tracing-gum-proc-macro", +] + +[[package]] +name = "tracing-gum" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11fe5d66dd9124c5b7a7f891b411ed7b98d06645fd61ca8b4895c2ad7fabd876" +dependencies = [ + "coarsetime", + "polkadot-primitives 6.0.0", "tracing", "tracing-gum-proc-macro", ] @@ -13169,12 +15639,12 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] @@ -13251,7 +15721,7 @@ dependencies = [ "lazy_static", "rand 0.8.5", "smallvec", - "socket2 0.4.9", + "socket2 0.4.10", "thiserror", "tinyvec", "tokio", @@ -13291,25 +15761,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", - "log", - "md-5", - "rand 0.8.5", - "ring", - "stun", - "thiserror", - "tokio", - "webrtc-util", -] - [[package]] name = "twox-hash" version = "1.6.3" @@ -13324,9 +15775,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "uint" @@ -13342,15 +15793,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -13363,9 +15814,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -13373,16 +15824,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" -[[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" @@ -13390,14 +15831,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] name = "unsigned-varint" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836" +checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" dependencies = [ "asynchronous-codec", "bytes", @@ -13411,14 +15852,20 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna 0.5.0", "percent-encoding", ] @@ -13428,15 +15875,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" -[[package]] -name = "uuid" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" -dependencies = [ - "getrandom 0.2.10", -] - [[package]] name = "valuable" version = "0.1.0" @@ -13479,32 +15917,17 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rand_core 0.6.4", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", "thiserror", "zeroize", ] -[[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" - [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -13525,12 +15948,6 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -13539,9 +15956,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -13549,9 +15966,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", "log", @@ -13564,9 +15981,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" dependencies = [ "cfg-if", "js-sys", @@ -13576,9 +15993,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -13586,9 +16003,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", @@ -13599,9 +16016,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "wasm-instrument" @@ -13721,14 +16138,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.21.2", + "base64 0.21.6", "bincode", "directories-next", "file-per-thread-logger", "log", - "rustix 0.36.15", + "rustix 0.36.17", "serde", - "sha2 0.10.7", + "sha2 0.10.8", "toml 0.5.11", "windows-sys 0.45.0", "zstd 0.11.2+zstd.1.5.2", @@ -13822,7 +16239,7 @@ checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" dependencies = [ "object 0.30.4", "once_cell", - "rustix 0.36.15", + "rustix 0.36.17", ] [[package]] @@ -13850,10 +16267,10 @@ dependencies = [ "log", "mach", "memfd", - "memoffset 0.8.0", + "memoffset", "paste", "rand 0.8.5", - "rustix 0.36.15", + "rustix 0.36.17", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", @@ -13874,9 +16291,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" dependencies = [ "js-sys", "wasm-bindgen", @@ -13884,22 +16301,12 @@ dependencies = [ [[package]] name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki" -version = "0.22.0" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring", - "untrusted", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] @@ -13908,264 +16315,64 @@ version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ - "webpki 0.22.0", + "webpki", ] [[package]] name = "webpki-roots" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" -dependencies = [ - "rustls-webpki 0.100.2", -] - -[[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", - "rtcp", - "rtp", - "rustls 0.19.1", - "sdp", - "serde", - "serde_json", - "sha2 0.10.7", - "stun", - "thiserror", - "time 0.3.27", - "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.2", - "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", - "rustls 0.19.1", - "sec1 0.3.0", - "serde", - "sha1", - "sha2 0.10.7", - "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 3.0.1", - "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.9", - "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 3.0.1", - "log", - "rand 0.8.5", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-srtp" -version = "0.9.1" +version = "0.25.3" 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", -] +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] -name = "webrtc-util" -version = "0.7.0" +name = "westend-runtime-constants" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f1db1727772c05cf7a2cfece52c3aca8045ca1e176cd517d323489aa3c6d87" +checksum = "682c32c5f5e6d51c431bf66c33fc502c66e7b25488c0bd92f5ee020c329f2beb" dependencies = [ - "async-trait", - "bitflags 1.3.2", - "bytes", - "cc", - "ipnet", - "lazy_static", - "libc", - "log", - "nix", - "rand 0.8.5", - "thiserror", - "tokio", - "winapi", + "frame-support 25.0.0", + "polkadot-primitives 4.0.0", + "polkadot-runtime-common 4.0.0", + "smallvec", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-weights 24.0.0", + "staging-xcm 4.0.0", ] [[package]] name = "westend-runtime-constants" -version = "4.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "682c32c5f5e6d51c431bf66c33fc502c66e7b25488c0bd92f5ee020c329f2beb" +checksum = "116510890fa55b4c21f10691872dadd912be73ac444edd3df60c6237a65c5b4e" dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", + "frame-support 27.0.0", + "polkadot-primitives 6.0.0", + "polkadot-runtime-common 6.0.0", "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", - "staging-xcm", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-weights 26.0.0", + "staging-xcm 6.0.0", ] [[package]] name = "which" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "libc", + "home", "once_cell", + "rustix 0.38.28", ] [[package]] name = "wide" -version = "0.7.11" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa469ffa65ef7e0ba0f164183697b89b854253fd31aeb92358b7b6155177d62f" +checksum = "c68938b57b33da363195412cfc5fc37c9ed49aa9cfe2156fde64b8d2c9498242" dependencies = [ "bytemuck", "safe_arch", @@ -14195,9 +16402,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -14210,22 +16417,19 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.34.0" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45296b64204227616fdbf2614cefa4c236b98ee64dfaaaa435207ed99fe7829f" +checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows_aarch64_msvc 0.34.0", - "windows_i686_gnu 0.34.0", - "windows_i686_msvc 0.34.0", - "windows_x86_64_gnu 0.34.0", - "windows_x86_64_msvc 0.34.0", + "windows-core", + "windows-targets 0.48.5", ] [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ "windows-targets 0.48.5", ] @@ -14320,12 +16524,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" -[[package]] -name = "windows_aarch64_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -14344,12 +16542,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" -[[package]] -name = "windows_i686_gnu" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -14368,12 +16560,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" -[[package]] -name = "windows_i686_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -14392,12 +16578,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" -[[package]] -name = "windows_x86_64_gnu" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -14434,12 +16614,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" -[[package]] -name = "windows_x86_64_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -14460,9 +16634,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.15" +version = "0.5.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +checksum = "b7520bbdec7211caa7c4e682eb1fbe07abe20cee6756b6e00f537c82c11816aa" dependencies = [ "memchr", ] @@ -14509,74 +16683,56 @@ dependencies = [ "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", - "rusticata-macros", - "thiserror", - "time 0.3.27", -] - [[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 0.3.27", + "time", ] [[package]] name = "xcm-emulator" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd344ca12e6217fbbc6ee27bedb01113357ea31bea198e74b76f618102b6f06c" +checksum = "0347ee7c717126822e99192e15dee53ff439ad88ac3181af7b2d4aa52b5539c9" dependencies = [ - "cumulus-pallet-parachain-system", - "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", - "cumulus-test-relay-sproof-builder", - "frame-support", - "frame-system", + "cumulus-pallet-parachain-system 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-parachain-inherent 0.6.0", + "cumulus-test-relay-sproof-builder 0.6.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "impl-trait-for-tuples", "lazy_static", "log", - "pallet-balances", - "pallet-message-queue", - "parachains-common", + "pallet-balances 27.0.0", + "pallet-message-queue 30.0.0", + "parachains-common 6.0.0", "parity-scale-codec", "paste", - "polkadot-parachain-primitives", - "polkadot-primitives", - "polkadot-runtime-parachains", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-tracing", - "staging-xcm", - "staging-xcm-executor", + "polkadot-parachain-primitives 5.0.0", + "polkadot-primitives 6.0.0", + "polkadot-runtime-parachains 6.0.0", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-tracing 15.0.0", + "staging-xcm 6.0.0", + "staging-xcm-executor 6.0.0", ] [[package]] @@ -14591,6 +16747,18 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "xcm-procedural" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37861444391815dfe05f3ee1039d19e7c82db319976832e8233729bd355de223" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "yamux" version = "0.10.2" @@ -14611,14 +16779,34 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.27", + "time", +] + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", ] [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ "zeroize_derive", ] @@ -14674,11 +16862,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", - "libc", "pkg-config", ] diff --git a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml index 4b61aa5b12..287a2ed8ed 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml @@ -8,27 +8,27 @@ description = "Asset Hub Kusama runtime integration tests with xcm-emulator" publish = false [dependencies] -codec = { package = "parity-scale-codec", version = "3.4.0" } +codec = { package = "parity-scale-codec", version = "3.6.9" } assert_matches = "1.5.0" # Substrate -sp-runtime = { version = "28.0.0" } -frame-support = { version = "25.0.0" } -frame-system = { version = "25.0.0" } -pallet-assets = { version = "26.0.0" } -pallet-balances = { version = "25.0.0" } -pallet-asset-conversion = { version = "7.0.0" } +sp-runtime = { version = "30.0.1" } +frame-support = { version = "27.0.0" } +frame-system = { version = "27.0.0" } +pallet-assets = { version = "28.0.0" } +pallet-balances = { version = "27.0.0" } +pallet-asset-conversion = { version = "9.0.0" } # Polkadot -polkadot-core-primitives = { version = "4.0.0" } -polkadot-parachain-primitives = { version = "3.0.0" } -polkadot-runtime-parachains = { version = "4.0.0" } -xcm = { package = "staging-xcm", version = "4.0.0" } -pallet-xcm = { version = "4.0.0" } +polkadot-core-primitives = { version = "6.0.0" } +polkadot-parachain-primitives = { version = "5.0.0" } +polkadot-runtime-parachains = { version = "6.0.0" } +xcm = { package = "staging-xcm", version = "6.0.0" } +pallet-xcm = { version = "6.0.0" } # Cumulus -parachains-common = { version = "4.0.0" } -xcm-emulator = { version = "0.2.0" } +parachains-common = { version = "6.0.0" } +xcm-emulator = { version = "0.4.0" } asset-hub-kusama-runtime = { path = "../../../../system-parachains/asset-hubs/asset-hub-kusama" } # Local diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml index eb01b282b8..16b14f0e7d 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml @@ -8,26 +8,26 @@ description = "Asset Hub Polkadot runtime integration tests with xcm-emulator" publish = false [dependencies] -codec = { package = "parity-scale-codec", version = "3.4.0" } +codec = { package = "parity-scale-codec", version = "3.6.9" } # Substrate -sp-runtime = { version = "28.0.0" } -frame-support = { version = "25.0.0" } -frame-system = { version = "25.0.0" } -pallet-assets = { version = "26.0.0" } -pallet-balances = { version = "25.0.0" } -pallet-asset-conversion = { version = "7.0.0" } +sp-runtime = { version = "30.0.1" } +frame-support = { version = "27.0.0" } +frame-system = { version = "27.0.0" } +pallet-assets = { version = "28.0.0" } +pallet-balances = { version = "27.0.0" } +pallet-asset-conversion = { version = "9.0.0" } # Polkadot -polkadot-core-primitives = { version = "4.0.0" } -polkadot-parachain-primitives = { version = "3.0.0" } -polkadot-runtime-parachains = { version = "4.0.0" } -xcm = { package = "staging-xcm", version = "4.0.0" } -pallet-xcm = { version = "4.0.0" } +polkadot-core-primitives = { version = "6.0.0" } +polkadot-parachain-primitives = { version = "5.0.0" } +polkadot-runtime-parachains = { version = "6.0.0" } +xcm = { package = "staging-xcm", version = "6.0.0" } +pallet-xcm = { version = "6.0.0" } # Cumulus -parachains-common = { version = "4.0.0" } -xcm-emulator = { version = "0.2.0" } +parachains-common = { version = "6.0.0" } +xcm-emulator = { version = "0.4.0" } # Local integration-tests-common = { path = "../../common" } diff --git a/integration-tests/emulated/common/Cargo.toml b/integration-tests/emulated/common/Cargo.toml index bd52994ceb..ff465e9a2f 100644 --- a/integration-tests/emulated/common/Cargo.toml +++ b/integration-tests/emulated/common/Cargo.toml @@ -7,41 +7,41 @@ license = "Apache-2.0" description = "Common resources for integration testing with xcm-emulator" [dependencies] -codec = { package = "parity-scale-codec", version = "3.4.0" } +codec = { package = "parity-scale-codec", version = "3.6.9" } paste = "1.0.14" -serde_json = "1.0.108" +serde_json = "1.0.111" # Substrate -grandpa-primitives = { package = "sp-consensus-grandpa", version = "10.0.0" } -sp-authority-discovery = { version = "23.0.0" } -sp-runtime = { version = "28.0.0" } -frame-support = { version = "25.0.0" } -sp-core = { version = "25.0.0" } -sp-consensus-babe = { version = "0.29.0" } -pallet-assets = { version = "26.0.0" } -pallet-balances = { version = "25.0.0" } -pallet-message-queue = { version = "28.0.0" } -pallet-im-online = { version = "24.0.0" } -pallet-staking = { version = "25.0.0" } -beefy-primitives = { package = "sp-consensus-beefy", version = "10.0.0" } +grandpa-primitives = { package = "sp-consensus-grandpa", version = "12.0.0" } +sp-authority-discovery = { version = "25.0.0" } +sp-runtime = { version = "30.0.1" } +frame-support = { version = "27.0.0" } +sp-core = { version = "27.0.0" } +sp-consensus-babe = { version = "0.31.0" } +pallet-assets = { version = "28.0.0" } +pallet-balances = { version = "27.0.0" } +pallet-message-queue = { version = "30.0.0" } +pallet-im-online = { version = "26.0.0" } +pallet-staking = { version = "27.0.0" } +beefy-primitives = { package = "sp-consensus-beefy", version = "12.0.0" } # Polkadot -polkadot-primitives = { version = "4.0.0" } -polkadot-runtime-parachains = { version = "4.0.0" } -xcm = { package = "staging-xcm", version = "4.0.0" } -pallet-xcm = { version = "4.0.0" } -polkadot-core-primitives = { version = "4.0.0" } -polkadot-parachain-primitives = { version = "3.0.0" } +polkadot-primitives = { version = "6.0.0" } +polkadot-runtime-parachains = { version = "6.0.0" } +xcm = { package = "staging-xcm", version = "6.0.0" } +pallet-xcm = { version = "6.0.0" } +polkadot-core-primitives = { version = "6.0.0" } +polkadot-parachain-primitives = { version = "5.0.0" } # Cumulus -parachains-common = { version = "4.0.0" } -cumulus-primitives-core = { version = "0.4.0" } -xcm-emulator = { version = "0.2.0" } -cumulus-pallet-xcmp-queue = { version = "0.4.0" } -cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook",] , version = "0.4.0" } -asset-test-utils = { version = "4.0.0" } -cumulus-pallet-dmp-queue = { version = "0.4.0" } -penpal-runtime = { version = "0.11.0" } +parachains-common = { version = "6.0.0" } +cumulus-primitives-core = { version = "0.6.0" } +xcm-emulator = { version = "0.4.0" } +cumulus-pallet-xcmp-queue = { version = "0.6.0" } +cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook",] , version = "0.6.0" } +asset-test-utils = { version = "6.0.0" } +cumulus-pallet-dmp-queue = { version = "0.6.0" } +penpal-runtime = { version = "0.13.0" } # Local runtimes kusama-runtime = { package = "staging-kusama-runtime", path = "../../../relay/kusama" } @@ -55,9 +55,9 @@ bridge-hub-polkadot-runtime = { path = "../../../system-parachains/bridge-hubs/b bridge-hub-kusama-runtime = { path = "../../../system-parachains/bridge-hubs/bridge-hub-kusama" } # Bridges -bp-messages = { version = "0.4.0" } -pallet-bridge-messages = { version = "0.4.0" } -bridge-runtime-common = { version = "0.4.0" } +bp-messages = { version = "0.6.0" } +pallet-bridge-messages = { version = "0.6.0" } +bridge-runtime-common = { version = "0.6.0" } [features] runtime-benchmarks = [ diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index 1c64e40858..4019ff4e42 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -9,124 +9,124 @@ repository.workspace = true version.workspace = true [dependencies] -bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } -parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive", "max-encoded-len"] } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -log = { version = "0.4.17", default-features = false } +bitvec = { version = "1.0.1", default-features = false, features = ["alloc"] } +parity-scale-codec = { version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +log = { version = "0.4.20", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } -serde = { version = "1.0.188", default-features = false } -serde_derive = { version = "1.0.117", optional = true } +serde = { version = "1.0.195", default-features = false } +serde_derive = { version = "1.0.195", optional = true } static_assertions = "1.1.0" -smallvec = "1.8.0" +smallvec = "1.11.2" -authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "23.0.0" } -babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.29.0" } -beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "10.0.0" } -binary-merkle-tree = { default-features = false , version = "10.0.0" } +authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "25.0.0" } +babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.31.0" } +beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "12.0.0" } +binary-merkle-tree = { default-features = false , version = "12.0.0" } kusama-runtime-constants = { package = "kusama-runtime-constants", path = "constants", default-features = false } -sp-api = { default-features = false , version = "23.0.0" } -inherents = { package = "sp-inherents", default-features = false , version = "23.0.0" } -offchain-primitives = { package = "sp-offchain", default-features = false , version = "23.0.0" } -sp-std = { package = "sp-std", default-features = false , version = "12.0.0" } -sp-application-crypto = { default-features = false , version = "27.0.0" } -sp-arithmetic = { default-features = false , version = "20.0.0" } -sp-genesis-builder = { default-features = false , version = "0.4.0" } -sp-io = { default-features = false , version = "27.0.0" } -sp-mmr-primitives = { default-features = false , version = "23.0.0" } -sp-runtime = { default-features = false , version = "28.0.0" } -sp-staking = { default-features = false , version = "23.0.0" } -sp-core = { default-features = false , version = "25.0.0" } -sp-session = { default-features = false , version = "24.0.0" } -sp-storage = { default-features = false , version = "17.0.0" } -sp-version = { default-features = false , version = "26.0.0" } -tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "23.0.0" } -block-builder-api = { package = "sp-block-builder", default-features = false , version = "23.0.0" } -sp-npos-elections = { default-features = false , version = "23.0.0" } +sp-api = { default-features = false , version = "25.0.0" } +inherents = { package = "sp-inherents", default-features = false , version = "25.0.0" } +offchain-primitives = { package = "sp-offchain", default-features = false , version = "25.0.0" } +sp-std = { package = "sp-std", default-features = false , version = "13.0.0" } +sp-application-crypto = { default-features = false , version = "29.0.0" } +sp-arithmetic = { default-features = false , version = "22.0.0" } +sp-genesis-builder = { default-features = false , version = "0.6.0" } +sp-io = { default-features = false , version = "29.0.0" } +sp-mmr-primitives = { default-features = false , version = "25.0.0" } +sp-runtime = { default-features = false , version = "30.0.1" } +sp-staking = { default-features = false , version = "25.0.0" } +sp-core = { default-features = false , version = "27.0.0" } +sp-session = { default-features = false , version = "26.0.0" } +sp-storage = { default-features = false , version = "18.0.0" } +sp-version = { default-features = false , version = "28.0.0" } +tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "25.0.0" } +block-builder-api = { package = "sp-block-builder", default-features = false , version = "25.0.0" } +sp-npos-elections = { default-features = false , version = "25.0.0" } -pallet-asset-rate = { default-features = false , version = "4.0.0" } -pallet-authority-discovery = { default-features = false , version = "25.0.0" } -pallet-authorship = { default-features = false , version = "25.0.0" } -pallet-babe = { default-features = false , version = "25.0.0" } -pallet-bags-list = { default-features = false , version = "24.0.0" } -pallet-balances = { default-features = false , version = "25.0.0" } -pallet-beefy = { default-features = false , version = "25.0.0" } -pallet-beefy-mmr = { default-features = false , version = "25.0.0" } -pallet-bounties = { default-features = false , version = "24.0.0" } -pallet-child-bounties = { default-features = false , version = "24.0.0" } -pallet-transaction-payment = { default-features = false , version = "25.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "25.0.0" } -pallet-nomination-pools-runtime-api = { default-features = false , version = "20.0.0" } -pallet-collective = { default-features = false , version = "25.0.0" } -pallet-conviction-voting = { default-features = false , version = "25.0.0" } -pallet-democracy = { default-features = false , version = "25.0.0" } -pallet-elections-phragmen = { default-features = false , version = "26.0.0" } -pallet-election-provider-multi-phase = { default-features = false , version = "24.0.0" } -pallet-fast-unstake = { default-features = false , version = "24.0.0" } -frame-executive = { default-features = false , version = "25.0.0" } -pallet-grandpa = { default-features = false , version = "25.0.0" } -pallet-nis = { default-features = false , version = "25.0.0" } -pallet-identity = { default-features = false , version = "25.0.0" } -pallet-im-online = { default-features = false , version = "24.0.0" } -pallet-indices = { default-features = false , version = "25.0.0" } -pallet-membership = { default-features = false , version = "25.0.0" } -pallet-message-queue = { default-features = false , version = "28.0.0" } -pallet-mmr = { default-features = false , version = "24.0.0" } -pallet-multisig = { default-features = false , version = "25.0.0" } -pallet-nomination-pools = { default-features = false , version = "22.0.0" } -pallet-offences = { default-features = false , version = "24.0.0" } -pallet-preimage = { default-features = false , version = "25.0.0" } -pallet-proxy = { default-features = false , version = "25.0.0" } -pallet-ranked-collective = { default-features = false , version = "25.0.0" } -pallet-recovery = { default-features = false , version = "25.0.0" } -pallet-referenda = { default-features = false , version = "25.0.0" } -pallet-scheduler = { default-features = false , version = "26.0.0" } -pallet-session = { default-features = false , version = "25.0.0" } -pallet-society = { default-features = false, version = "25.0.0" } -frame-support = { default-features = false , version = "25.0.0" } -pallet-staking = { default-features = false , version = "25.0.0" } -pallet-state-trie-migration = { default-features = false , version = "26.0.0" } -pallet-staking-runtime-api = { default-features = false , version = "11.0.0" } -frame-system = { default-features = false , version = "25.0.0" } -frame-system-rpc-runtime-api = { default-features = false , version = "23.0.0" } -pallet-timestamp = { default-features = false , version = "24.0.0" } -pallet-tips = { default-features = false , version = "24.0.0" } -pallet-treasury = { default-features = false , version = "24.0.0" } -pallet-utility = { default-features = false , version = "25.0.0" } -pallet-vesting = { default-features = false , version = "25.0.0" } -pallet-whitelist = { default-features = false , version = "24.0.0" } -pallet-xcm = { default-features = false , version = "4.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } -frame-election-provider-support = { default-features = false , version = "25.0.0" } +pallet-asset-rate = { default-features = false , version = "6.0.0" } +pallet-authority-discovery = { default-features = false , version = "27.0.0" } +pallet-authorship = { default-features = false , version = "27.0.0" } +pallet-babe = { default-features = false , version = "27.0.0" } +pallet-bags-list = { default-features = false , version = "26.0.0" } +pallet-balances = { default-features = false , version = "27.0.0" } +pallet-beefy = { default-features = false , version = "27.0.0" } +pallet-beefy-mmr = { default-features = false , version = "27.0.0" } +pallet-bounties = { default-features = false , version = "26.0.0" } +pallet-child-bounties = { default-features = false , version = "26.0.0" } +pallet-transaction-payment = { default-features = false , version = "27.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "27.0.0" } +pallet-nomination-pools-runtime-api = { default-features = false , version = "22.0.0" } +pallet-collective = { default-features = false , version = "27.0.0" } +pallet-conviction-voting = { default-features = false , version = "27.0.0" } +pallet-democracy = { default-features = false , version = "27.0.0" } +pallet-elections-phragmen = { default-features = false , version = "28.0.0" } +pallet-election-provider-multi-phase = { default-features = false , version = "26.0.0" } +pallet-fast-unstake = { default-features = false , version = "26.0.0" } +frame-executive = { default-features = false , version = "27.0.0" } +pallet-grandpa = { default-features = false , version = "27.0.0" } +pallet-nis = { default-features = false , version = "27.0.0" } +pallet-identity = { default-features = false , version = "27.0.0" } +pallet-im-online = { default-features = false , version = "26.0.0" } +pallet-indices = { default-features = false , version = "27.0.0" } +pallet-membership = { default-features = false , version = "27.0.0" } +pallet-message-queue = { default-features = false , version = "30.0.0" } +pallet-mmr = { default-features = false , version = "26.0.0" } +pallet-multisig = { default-features = false , version = "27.0.0" } +pallet-nomination-pools = { default-features = false , version = "24.0.0" } +pallet-offences = { default-features = false , version = "26.0.0" } +pallet-preimage = { default-features = false , version = "27.0.0" } +pallet-proxy = { default-features = false , version = "27.0.0" } +pallet-ranked-collective = { default-features = false , version = "27.0.0" } +pallet-recovery = { default-features = false , version = "27.0.0" } +pallet-referenda = { default-features = false , version = "27.0.0" } +pallet-scheduler = { default-features = false , version = "28.0.0" } +pallet-session = { default-features = false , version = "27.0.0" } +pallet-society = { default-features = false, version = "27.0.0" } +frame-support = { default-features = false , version = "27.0.0" } +pallet-staking = { default-features = false , version = "27.0.0" } +pallet-state-trie-migration = { default-features = false , version = "28.0.0" } +pallet-staking-runtime-api = { default-features = false , version = "13.0.0" } +frame-system = { default-features = false , version = "27.0.0" } +frame-system-rpc-runtime-api = { default-features = false , version = "25.0.0" } +pallet-timestamp = { default-features = false , version = "26.0.0" } +pallet-tips = { default-features = false , version = "26.0.0" } +pallet-treasury = { default-features = false , version = "26.0.0" } +pallet-utility = { default-features = false , version = "27.0.0" } +pallet-vesting = { default-features = false , version = "27.0.0" } +pallet-whitelist = { default-features = false , version = "26.0.0" } +pallet-xcm = { default-features = false , version = "6.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } +frame-election-provider-support = { default-features = false , version = "27.0.0" } -frame-benchmarking = { default-features = false, optional = true , version = "25.0.0" } -frame-try-runtime = { default-features = false, optional = true , version = "0.31.0" } -pallet-offences-benchmarking = { default-features = false, optional = true , version = "25.0.0" } -pallet-session-benchmarking = { default-features = false, optional = true , version = "25.0.0" } -pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "23.0.0" } -frame-system-benchmarking = { default-features = false, optional = true , version = "25.0.0" } -pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "24.0.0" } +frame-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +frame-try-runtime = { default-features = false, optional = true , version = "0.33.0" } +pallet-offences-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +pallet-session-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "25.0.0" } +frame-system-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "26.0.0" } hex-literal = "0.4.1" -runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "4.0.0" } -runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "4.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "4.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "6.0.0" } +runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "6.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "6.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "4.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "4.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "4.0.0" } +xcm = { package = "staging-xcm", default-features = false , version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "6.0.0" } [dev-dependencies] tiny-keccak = { version = "2.0.2", features = ["keccak"] } -keyring = { package = "sp-keyring", version = "28.0.0" } -sp-trie = { version = "26.0.0" } +keyring = { package = "sp-keyring", version = "30.0.0" } +sp-trie = { version = "28.0.0" } separator = "0.4.1" -serde_json = "1.0.96" -remote-externalities = { package = "frame-remote-externalities" , version = "0.32.0" } -tokio = { version = "1.24.2", features = ["macros"] } -sp-tracing = { default-features = false , version = "14.0.0" } +serde_json = "1.0.111" +remote-externalities = { package = "frame-remote-externalities" , version = "0.34.0" } +tokio = { version = "1.35.1", features = ["macros"] } +sp-tracing = { default-features = false , version = "15.0.0" } [build-dependencies] -substrate-wasm-builder = { version = "14.0.0" } +substrate-wasm-builder = { version = "16.0.0" } [features] default = [ "std" ] diff --git a/relay/kusama/constants/Cargo.toml b/relay/kusama/constants/Cargo.toml index 9127334bdc..b560f49ae0 100644 --- a/relay/kusama/constants/Cargo.toml +++ b/relay/kusama/constants/Cargo.toml @@ -7,16 +7,16 @@ edition.workspace = true license.workspace = true [dependencies] -smallvec = "1.8.0" +smallvec = "1.11.2" -frame-support = { default-features = false , version = "25.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "4.0.0" } -runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "4.0.0" } -sp-runtime = { default-features = false , version = "28.0.0" } -sp-weights = { default-features = false , version = "24.0.0" } -sp-core = { default-features = false , version = "25.0.0" } +frame-support = { default-features = false , version = "27.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "6.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "6.0.0" } +sp-runtime = { default-features = false , version = "30.0.1" } +sp-weights = { default-features = false , version = "26.0.0" } +sp-core = { default-features = false , version = "27.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "4.0.0" } +xcm = { package = "staging-xcm", default-features = false , version = "6.0.0" } [features] default = [ "std" ] diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index 22c318aab3..7b098a82fd 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -8,122 +8,122 @@ edition.workspace = true license.workspace = true [dependencies] -bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } -parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive", "max-encoded-len"] } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -log = { version = "0.4.17", default-features = false } +bitvec = { version = "1.0.1", default-features = false, features = ["alloc"] } +parity-scale-codec = { version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +log = { version = "0.4.20", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } -serde = { version = "1.0.188", default-features = false } -serde_derive = { version = "1.0.117", optional = true } +serde = { version = "1.0.195", default-features = false } +serde_derive = { version = "1.0.195", optional = true } static_assertions = "1.1.0" -smallvec = "1.8.0" +smallvec = "1.11.2" -authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "23.0.0" } -babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.29.0" } -beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "10.0.0" } -binary-merkle-tree = { default-features = false , version = "10.0.0" } -block-builder-api = { package = "sp-block-builder", default-features = false , version = "23.0.0" } -inherents = { package = "sp-inherents", default-features = false , version = "23.0.0" } -offchain-primitives = { package = "sp-offchain", default-features = false , version = "23.0.0" } -tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "23.0.0" } -sp-arithmetic = { default-features = false , version = "20.0.0" } -sp-api = { default-features = false , version = "23.0.0" } -sp-genesis-builder = { default-features = false , version = "0.4.0" } -sp-std = { default-features = false , version = "12.0.0" } -sp-application-crypto = { default-features = false , version = "27.0.0" } -sp-io = { default-features = false , version = "27.0.0" } -sp-mmr-primitives = { default-features = false , version = "23.0.0" } -sp-runtime = { default-features = false , version = "28.0.0" } -sp-staking = { default-features = false , version = "23.0.0" } -sp-core = { default-features = false , version = "25.0.0" } -sp-session = { default-features = false , version = "24.0.0" } -sp-storage = { default-features = false , version = "17.0.0" } -sp-version = { default-features = false , version = "26.0.0" } -sp-npos-elections = { default-features = false , version = "23.0.0" } +authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "25.0.0" } +babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.31.0" } +beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "12.0.0" } +binary-merkle-tree = { default-features = false , version = "12.0.0" } +block-builder-api = { package = "sp-block-builder", default-features = false , version = "25.0.0" } +inherents = { package = "sp-inherents", default-features = false , version = "25.0.0" } +offchain-primitives = { package = "sp-offchain", default-features = false , version = "25.0.0" } +tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "25.0.0" } +sp-arithmetic = { default-features = false , version = "22.0.0" } +sp-api = { default-features = false , version = "25.0.0" } +sp-genesis-builder = { default-features = false , version = "0.6.0" } +sp-std = { default-features = false , version = "13.0.0" } +sp-application-crypto = { default-features = false , version = "29.0.0" } +sp-io = { default-features = false , version = "29.0.0" } +sp-mmr-primitives = { default-features = false , version = "25.0.0" } +sp-runtime = { default-features = false , version = "30.0.1" } +sp-staking = { default-features = false , version = "25.0.0" } +sp-core = { default-features = false , version = "27.0.0" } +sp-session = { default-features = false , version = "26.0.0" } +sp-storage = { default-features = false , version = "18.0.0" } +sp-version = { default-features = false , version = "28.0.0" } +sp-npos-elections = { default-features = false , version = "25.0.0" } -pallet-asset-rate = { default-features = false , version = "4.0.0" } -pallet-authority-discovery = { default-features = false , version = "25.0.0" } -pallet-authorship = { default-features = false , version = "25.0.0" } -pallet-babe = { default-features = false , version = "25.0.0" } -pallet-bags-list = { default-features = false , version = "24.0.0" } -pallet-balances = { default-features = false , version = "25.0.0" } -pallet-beefy = { default-features = false , version = "25.0.0" } -pallet-beefy-mmr = { default-features = false , version = "25.0.0" } -pallet-bounties = { default-features = false , version = "24.0.0" } -pallet-child-bounties = { default-features = false , version = "24.0.0" } -pallet-transaction-payment = { default-features = false , version = "25.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "25.0.0" } -pallet-collective = { default-features = false , version = "25.0.0" } -pallet-conviction-voting = { default-features = false , version = "25.0.0" } -pallet-democracy = { default-features = false , version = "25.0.0" } -pallet-elections-phragmen = { default-features = false , version = "26.0.0" } -pallet-election-provider-multi-phase = { default-features = false , version = "24.0.0" } -pallet-fast-unstake = { default-features = false , version = "24.0.0" } -frame-executive = { default-features = false , version = "25.0.0" } -pallet-grandpa = { default-features = false , version = "25.0.0" } -pallet-identity = { default-features = false , version = "25.0.0" } -pallet-im-online = { default-features = false , version = "24.0.0" } -pallet-indices = { default-features = false , version = "25.0.0" } -pallet-membership = { default-features = false , version = "25.0.0" } -pallet-message-queue = { default-features = false , version = "28.0.0" } -pallet-mmr = { default-features = false , version = "24.0.0" } -pallet-multisig = { default-features = false , version = "25.0.0" } -pallet-nomination-pools = { default-features = false , version = "22.0.0" } -pallet-nomination-pools-runtime-api = { default-features = false , version = "20.0.0" } -pallet-offences = { default-features = false , version = "24.0.0" } -pallet-preimage = { default-features = false , version = "25.0.0" } -pallet-proxy = { default-features = false , version = "25.0.0" } -pallet-referenda = { default-features = false , version = "25.0.0" } -pallet-scheduler = { default-features = false , version = "26.0.0" } -pallet-session = { default-features = false , version = "25.0.0" } -frame-support = { default-features = false , version = "25.0.0" } -pallet-staking = { default-features = false , version = "25.0.0" } -pallet-staking-reward-fn = { default-features = false, version = "16.0.0" } +pallet-asset-rate = { default-features = false , version = "6.0.0" } +pallet-authority-discovery = { default-features = false , version = "27.0.0" } +pallet-authorship = { default-features = false , version = "27.0.0" } +pallet-babe = { default-features = false , version = "27.0.0" } +pallet-bags-list = { default-features = false , version = "26.0.0" } +pallet-balances = { default-features = false , version = "27.0.0" } +pallet-beefy = { default-features = false , version = "27.0.0" } +pallet-beefy-mmr = { default-features = false , version = "27.0.0" } +pallet-bounties = { default-features = false , version = "26.0.0" } +pallet-child-bounties = { default-features = false , version = "26.0.0" } +pallet-transaction-payment = { default-features = false , version = "27.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "27.0.0" } +pallet-collective = { default-features = false , version = "27.0.0" } +pallet-conviction-voting = { default-features = false , version = "27.0.0" } +pallet-democracy = { default-features = false , version = "27.0.0" } +pallet-elections-phragmen = { default-features = false , version = "28.0.0" } +pallet-election-provider-multi-phase = { default-features = false , version = "26.0.0" } +pallet-fast-unstake = { default-features = false , version = "26.0.0" } +frame-executive = { default-features = false , version = "27.0.0" } +pallet-grandpa = { default-features = false , version = "27.0.0" } +pallet-identity = { default-features = false , version = "27.0.0" } +pallet-im-online = { default-features = false , version = "26.0.0" } +pallet-indices = { default-features = false , version = "27.0.0" } +pallet-membership = { default-features = false , version = "27.0.0" } +pallet-message-queue = { default-features = false , version = "30.0.0" } +pallet-mmr = { default-features = false , version = "26.0.0" } +pallet-multisig = { default-features = false , version = "27.0.0" } +pallet-nomination-pools = { default-features = false , version = "24.0.0" } +pallet-nomination-pools-runtime-api = { default-features = false , version = "22.0.0" } +pallet-offences = { default-features = false , version = "26.0.0" } +pallet-preimage = { default-features = false , version = "27.0.0" } +pallet-proxy = { default-features = false , version = "27.0.0" } +pallet-referenda = { default-features = false , version = "27.0.0" } +pallet-scheduler = { default-features = false , version = "28.0.0" } +pallet-session = { default-features = false , version = "27.0.0" } +frame-support = { default-features = false , version = "27.0.0" } +pallet-staking = { default-features = false , version = "27.0.0" } +pallet-staking-reward-fn = { default-features = false, version = "18.0.0" } pallet-staking-reward-curve = { version = "10.0.0" } -pallet-staking-runtime-api = { default-features = false , version = "11.0.0" } -frame-system = { default-features = false , version = "25.0.0" } -frame-system-rpc-runtime-api = { default-features = false , version = "23.0.0" } +pallet-staking-runtime-api = { default-features = false , version = "13.0.0" } +frame-system = { default-features = false , version = "27.0.0" } +frame-system-rpc-runtime-api = { default-features = false , version = "25.0.0" } polkadot-runtime-constants = { package = "polkadot-runtime-constants", path = "constants", default-features = false } -pallet-timestamp = { default-features = false , version = "24.0.0" } -pallet-tips = { default-features = false , version = "24.0.0" } -pallet-treasury = { default-features = false , version = "24.0.0" } -pallet-whitelist = { default-features = false , version = "24.0.0" } -pallet-vesting = { default-features = false , version = "25.0.0" } -pallet-utility = { default-features = false , version = "25.0.0" } -frame-election-provider-support = { default-features = false , version = "25.0.0" } -pallet-xcm = { default-features = false, version = "4.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } +pallet-timestamp = { default-features = false , version = "26.0.0" } +pallet-tips = { default-features = false , version = "26.0.0" } +pallet-treasury = { default-features = false , version = "26.0.0" } +pallet-whitelist = { default-features = false , version = "26.0.0" } +pallet-vesting = { default-features = false , version = "27.0.0" } +pallet-utility = { default-features = false , version = "27.0.0" } +frame-election-provider-support = { default-features = false , version = "27.0.0" } +pallet-xcm = { default-features = false, version = "6.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } -frame-benchmarking = { default-features = false, optional = true , version = "25.0.0" } -frame-try-runtime = { default-features = false, optional = true , version = "0.31.0" } -frame-system-benchmarking = { default-features = false, optional = true , version = "25.0.0" } -pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "24.0.0" } -pallet-offences-benchmarking = { default-features = false, optional = true , version = "25.0.0" } -pallet-session-benchmarking = { default-features = false, optional = true , version = "25.0.0" } -pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "23.0.0" } +frame-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +frame-try-runtime = { default-features = false, optional = true , version = "0.33.0" } +frame-system-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "26.0.0" } +pallet-offences-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +pallet-session-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "25.0.0" } hex-literal = { version = "0.4.1", optional = true } -runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "4.0.0" } -runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "4.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "4.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "6.0.0" } +runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "6.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "6.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "4.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "4.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "4.0.0" } +xcm = { package = "staging-xcm", default-features = false , version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "6.0.0" } [dev-dependencies] hex-literal = "0.4.1" tiny-keccak = { version = "2.0.2", features = ["keccak"] } -keyring = { package = "sp-keyring", version = "28.0.0" } -sp-trie = { version = "26.0.0" } -serde_json = "1.0.96" +keyring = { package = "sp-keyring", version = "30.0.0" } +sp-trie = { version = "28.0.0" } +serde_json = "1.0.111" separator = "0.4.1" -remote-externalities = { package = "frame-remote-externalities" , version = "0.32.0" } -tokio = { version = "1.24.2", features = ["macros"] } -sp-tracing = { default-features = false , version = "14.0.0" } +remote-externalities = { package = "frame-remote-externalities" , version = "0.34.0" } +tokio = { version = "1.35.1", features = ["macros"] } +sp-tracing = { default-features = false , version = "15.0.0" } [build-dependencies] -substrate-wasm-builder = { version = "14.0.0" } +substrate-wasm-builder = { version = "16.0.0" } [features] default = [ "std" ] diff --git a/relay/polkadot/constants/Cargo.toml b/relay/polkadot/constants/Cargo.toml index 706b43261e..1c6ad326da 100644 --- a/relay/polkadot/constants/Cargo.toml +++ b/relay/polkadot/constants/Cargo.toml @@ -7,16 +7,16 @@ edition.workspace = true license.workspace = true [dependencies] -smallvec = "1.8.0" +smallvec = "1.11.2" -frame-support = { default-features = false , version = "25.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "4.0.0" } -runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "4.0.0" } -sp-runtime = { default-features = false , version = "28.0.0" } -sp-weights = { default-features = false , version = "24.0.0" } -sp-core = { default-features = false , version = "25.0.0" } +frame-support = { default-features = false , version = "27.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "6.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "6.0.0" } +sp-runtime = { default-features = false , version = "30.0.1" } +sp-weights = { default-features = false , version = "26.0.0" } +sp-core = { default-features = false , version = "27.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "4.0.0" } +xcm = { package = "staging-xcm", default-features = false , version = "6.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index e2cdc68b85..de5c3ea742 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -9,11 +9,11 @@ repository.workspace = true version.workspace = true [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] } +codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } hex-literal = { version = "0.4.1" } log = { version = "0.4.20", default-features = false } -scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } -smallvec = "1.11.0" +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +smallvec = "1.11.2" # Local bp-asset-hub-kusama = { path = "./primitives", default-features = false} @@ -24,83 +24,83 @@ kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-f polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-executive = { default-features = false, version = "25.0.0" } -frame-support = { default-features = false, version = "25.0.0" } -frame-system = { default-features = false, version = "25.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } -pallet-asset-conversion-tx-payment = { default-features = false, version = "7.0.0" } -pallet-assets = { default-features = false, version = "26.0.0" } -pallet-asset-conversion = { default-features = false, version = "7.0.0" } -pallet-aura = { default-features = false, version = "24.0.0" } -pallet-authorship = { default-features = false, version = "25.0.0" } -pallet-balances = { default-features = false, version = "25.0.0" } -pallet-multisig = { default-features = false, version = "25.0.0" } -pallet-nft-fractionalization = { default-features = false, version = "7.0.0" } -pallet-nfts = { default-features = false, version = "19.0.0" } -pallet-nfts-runtime-api = { default-features = false, version = "11.0.0" } -pallet-proxy = { default-features = false, version = "25.0.0" } -pallet-session = { default-features = false, version = "25.0.0" } -pallet-state-trie-migration = { default-features = false, optional = true , version = "26.0.0" } -pallet-timestamp = { default-features = false, version = "24.0.0" } -pallet-transaction-payment = { default-features = false, version = "25.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" } -pallet-uniques = { default-features = false, version = "25.0.0" } -pallet-utility = { default-features = false, version = "25.0.0" } -sp-api = { default-features = false, version = "23.0.0" } -sp-block-builder = { default-features = false, version = "23.0.0" } -sp-consensus-aura = { default-features = false, version = "0.29.0" } -sp-core = { default-features = false, version = "25.0.0" } -sp-genesis-builder = { default-features = false , version = "0.4.0" } -sp-inherents = { default-features = false, version = "23.0.0" } -sp-offchain = { default-features = false, version = "23.0.0" } -sp-runtime = { default-features = false, version = "28.0.0" } -sp-session = { default-features = false, version = "24.0.0" } -sp-std = { default-features = false, version = "12.0.0" } -sp-storage = { default-features = false, version = "17.0.0" } -sp-transaction-pool = { default-features = false, version = "23.0.0" } -sp-version = { default-features = false, version = "26.0.0" } -sp-weights = { default-features = false, version = "24.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-executive = { default-features = false, version = "27.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +frame-system = { default-features = false, version = "27.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } +pallet-asset-conversion-tx-payment = { default-features = false, version = "9.0.0" } +pallet-assets = { default-features = false, version = "28.0.0" } +pallet-asset-conversion = { default-features = false, version = "9.0.0" } +pallet-aura = { default-features = false, version = "26.0.0" } +pallet-authorship = { default-features = false, version = "27.0.0" } +pallet-balances = { default-features = false, version = "27.0.0" } +pallet-multisig = { default-features = false, version = "27.0.0" } +pallet-nft-fractionalization = { default-features = false, version = "9.0.0" } +pallet-nfts = { default-features = false, version = "21.0.0" } +pallet-nfts-runtime-api = { default-features = false, version = "13.0.0" } +pallet-proxy = { default-features = false, version = "27.0.0" } +pallet-session = { default-features = false, version = "27.0.0" } +pallet-state-trie-migration = { default-features = false, optional = true , version = "28.0.0" } +pallet-timestamp = { default-features = false, version = "26.0.0" } +pallet-transaction-payment = { default-features = false, version = "27.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "27.0.0" } +pallet-uniques = { default-features = false, version = "27.0.0" } +pallet-utility = { default-features = false, version = "27.0.0" } +sp-api = { default-features = false, version = "25.0.0" } +sp-block-builder = { default-features = false, version = "25.0.0" } +sp-consensus-aura = { default-features = false, version = "0.31.0" } +sp-core = { default-features = false, version = "27.0.0" } +sp-genesis-builder = { default-features = false , version = "0.6.0" } +sp-inherents = { default-features = false, version = "25.0.0" } +sp-offchain = { default-features = false, version = "25.0.0" } +sp-runtime = { default-features = false, version = "30.0.1" } +sp-session = { default-features = false, version = "26.0.0" } +sp-std = { default-features = false, version = "13.0.0" } +sp-storage = { default-features = false, version = "18.0.0" } +sp-transaction-pool = { default-features = false, version = "25.0.0" } +sp-version = { default-features = false, version = "28.0.0" } +sp-weights = { default-features = false, version = "26.0.0" } # num-traits feature needed for dex integer sq root: primitive-types = { version = "0.12.2", default-features = false, features = ["codec", "scale-info", "num-traits"] } # Polkadot -pallet-xcm = { default-features = false, version = "4.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } -polkadot-core-primitives = { default-features = false, version = "4.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "3.0.0" } -polkadot-runtime-common = { default-features = false, version = "4.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.0" } +pallet-xcm = { default-features = false, version = "6.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } +polkadot-core-primitives = { default-features = false, version = "6.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } +polkadot-runtime-common = { default-features = false, version = "6.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } -cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.4.0" } -cumulus-primitives-core = { default-features = false , version = "0.4.0" } -cumulus-primitives-utility = { default-features = false , version = "0.4.0" } -pallet-collator-selection = { default-features = false , version = "6.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } -parachains-common = { default-features = false , version = "4.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.6.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.6.0" } +cumulus-primitives-core = { default-features = false , version = "0.6.0" } +cumulus-primitives-utility = { default-features = false , version = "0.6.0" } +pallet-collator-selection = { default-features = false , version = "8.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } +parachains-common = { default-features = false , version = "6.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } -assets-common = { default-features = false , version = "0.4.0" } +assets-common = { default-features = false , version = "0.6.0" } # Bridges -pallet-xcm-bridge-hub-router = { default-features = false , version = "0.2.0" } +pallet-xcm-bridge-hub-router = { default-features = false , version = "0.4.0" } [dev-dependencies] -asset-test-utils = { version = "4.0.0" } -parachains-runtimes-test-utils = { version = "4.0.0" } -sp-io = { version = "27.0.0" } +asset-test-utils = { version = "6.0.0" } +parachains-runtimes-test-utils = { version = "6.0.0" } +sp-io = { version = "29.0.0" } [build-dependencies] -substrate-wasm-builder = { optional = true , version = "14.0.0" } +substrate-wasm-builder = { optional = true , version = "16.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml index b8eab108b7..2382481ca3 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml @@ -8,18 +8,18 @@ edition.workspace = true license.workspace = true [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] } -scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # Bridge Dependencies -bp-xcm-bridge-hub-router = { default-features = false , version = "0.3.0" } +bp-xcm-bridge-hub-router = { default-features = false , version = "0.5.0" } # Substrate Based Dependencies -frame-support = { default-features = false, version = "25.0.0" } -sp-std = { default-features = false, version = "12.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +sp-std = { default-features = false, version = "13.0.0" } # Polkadot -xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 2af6758a65..4261f7fb76 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -9,11 +9,11 @@ repository.workspace = true version.workspace = true [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] } +codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } hex-literal = { version = "0.4.1", optional = true } log = { version = "0.4.20", default-features = false } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } -smallvec = "1.11.1" +smallvec = "1.11.2" # Local bp-asset-hub-kusama = { path = "../asset-hub-kusama/primitives", default-features = false} @@ -24,79 +24,79 @@ kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-f polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-executive = { default-features = false, version = "25.0.0" } -frame-support = { default-features = false, version = "25.0.0" } -frame-system = { default-features = false, version = "25.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } -pallet-asset-tx-payment = { default-features = false , version = "25.0.0" } -pallet-assets = { default-features = false, version = "26.0.0" } -pallet-aura = { default-features = false, version = "24.0.0" } -pallet-authorship = { default-features = false, version = "25.0.0" } -pallet-balances = { default-features = false, version = "25.0.0" } -pallet-multisig = { default-features = false, version = "25.0.0" } -pallet-nfts = { default-features = false, version = "19.0.0" } -pallet-nfts-runtime-api = { default-features = false, version = "11.0.0" } -pallet-proxy = { default-features = false, version = "25.0.0" } -pallet-session = { default-features = false, version = "25.0.0" } -pallet-timestamp = { default-features = false, version = "24.0.0" } -pallet-transaction-payment = { default-features = false, version = "25.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" } -pallet-uniques = { default-features = false, version = "25.0.0" } -pallet-utility = { default-features = false, version = "25.0.0" } -sp-api = { default-features = false, version = "23.0.0" } -sp-block-builder = { default-features = false, version = "23.0.0" } -sp-consensus-aura = { default-features = false, version = "0.29.0" } -sp-core = { default-features = false, version = "25.0.0" } -sp-genesis-builder = { default-features = false , version = "0.4.0" } -sp-inherents = { default-features = false, version = "23.0.0" } -sp-offchain = { default-features = false, version = "23.0.0" } -sp-runtime = { default-features = false, version = "28.0.0" } -sp-session = { default-features = false, version = "24.0.0" } -sp-std = { default-features = false, version = "12.0.0" } -sp-storage = { default-features = false, version = "17.0.0" } -sp-transaction-pool = { default-features = false, version = "23.0.0" } -sp-version = { default-features = false, version = "26.0.0" } -sp-weights = { default-features = false, version = "24.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-executive = { default-features = false, version = "27.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +frame-system = { default-features = false, version = "27.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } +pallet-asset-tx-payment = { default-features = false , version = "27.0.0" } +pallet-assets = { default-features = false, version = "28.0.0" } +pallet-aura = { default-features = false, version = "26.0.0" } +pallet-authorship = { default-features = false, version = "27.0.0" } +pallet-balances = { default-features = false, version = "27.0.0" } +pallet-multisig = { default-features = false, version = "27.0.0" } +pallet-nfts = { default-features = false, version = "21.0.0" } +pallet-nfts-runtime-api = { default-features = false, version = "13.0.0" } +pallet-proxy = { default-features = false, version = "27.0.0" } +pallet-session = { default-features = false, version = "27.0.0" } +pallet-timestamp = { default-features = false, version = "26.0.0" } +pallet-transaction-payment = { default-features = false, version = "27.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "27.0.0" } +pallet-uniques = { default-features = false, version = "27.0.0" } +pallet-utility = { default-features = false, version = "27.0.0" } +sp-api = { default-features = false, version = "25.0.0" } +sp-block-builder = { default-features = false, version = "25.0.0" } +sp-consensus-aura = { default-features = false, version = "0.31.0" } +sp-core = { default-features = false, version = "27.0.0" } +sp-genesis-builder = { default-features = false , version = "0.6.0" } +sp-inherents = { default-features = false, version = "25.0.0" } +sp-offchain = { default-features = false, version = "25.0.0" } +sp-runtime = { default-features = false, version = "30.0.1" } +sp-session = { default-features = false, version = "26.0.0" } +sp-std = { default-features = false, version = "13.0.0" } +sp-storage = { default-features = false, version = "18.0.0" } +sp-transaction-pool = { default-features = false, version = "25.0.0" } +sp-version = { default-features = false, version = "28.0.0" } +sp-weights = { default-features = false, version = "26.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "4.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } -polkadot-core-primitives = { default-features = false, version = "4.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "3.0.0" } -polkadot-runtime-common = { default-features = false, version = "4.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.0" } +pallet-xcm = { default-features = false, version = "6.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } +polkadot-core-primitives = { default-features = false, version = "6.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } +polkadot-runtime-common = { default-features = false, version = "6.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } -cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.4.0" } -cumulus-primitives-core = { default-features = false , version = "0.4.0" } -cumulus-primitives-utility = { default-features = false , version = "0.4.0" } -pallet-collator-selection = { default-features = false , version = "6.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } -parachains-common = { default-features = false , version = "4.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.6.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.6.0" } +cumulus-primitives-core = { default-features = false , version = "0.6.0" } +cumulus-primitives-utility = { default-features = false , version = "0.6.0" } +pallet-collator-selection = { default-features = false , version = "8.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } +parachains-common = { default-features = false , version = "6.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } -assets-common = { default-features = false , version = "0.4.0" } +assets-common = { default-features = false , version = "0.6.0" } # Bridges -pallet-xcm-bridge-hub-router = { default-features = false , version = "0.2.0" } +pallet-xcm-bridge-hub-router = { default-features = false , version = "0.4.0" } [dev-dependencies] hex-literal = "0.4.1" -asset-test-utils = { version = "4.0.0" } -parachains-runtimes-test-utils = { version = "4.0.0" } -sp-io = { version = "27.0.0" } +asset-test-utils = { version = "6.0.0" } +parachains-runtimes-test-utils = { version = "6.0.0" } +sp-io = { version = "29.0.0" } [build-dependencies] -substrate-wasm-builder = { optional = true , version = "14.0.0" } +substrate-wasm-builder = { optional = true , version = "16.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml index 939fb36e34..f881bbcde7 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml @@ -8,18 +8,18 @@ edition.workspace = true license.workspace = true [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] } -scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # Bridge Dependencies -bp-xcm-bridge-hub-router = { default-features = false , version = "0.3.0" } +bp-xcm-bridge-hub-router = { default-features = false , version = "0.5.0" } # Substrate Based Dependencies -frame-support = { default-features = false, version = "25.0.0" } -sp-std = { default-features = false, version = "12.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +sp-std = { default-features = false, version = "13.0.0" } # Polkadot -xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 38b43df99c..215e263248 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -9,15 +9,15 @@ repository.workspace = true version.workspace = true [build-dependencies] -substrate-wasm-builder = { optional = true , version = "14.0.0" } +substrate-wasm-builder = { optional = true , version = "16.0.0" } [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive"] } hex-literal = { version = "0.4.1" } log = { version = "0.4.20", default-features = false } -scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.188", optional = true, features = ["derive"] } -smallvec = "1.11.0" +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +serde = { version = "1.0.195", optional = true, features = ["derive"] } +smallvec = "1.11.2" # Local bp-asset-hub-kusama = { path = "../../asset-hubs/asset-hub-kusama/primitives", default-features = false} @@ -27,80 +27,80 @@ bp-bridge-hub-polkadot = { path = "../bridge-hub-polkadot/primitives", default-f kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-features = false} # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-executive = { default-features = false, version = "25.0.0" } -frame-support = { default-features = false, version = "25.0.0" } -frame-system = { default-features = false, version = "25.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } -pallet-aura = { default-features = false, version = "24.0.0" } -pallet-authorship = { default-features = false, version = "25.0.0" } -pallet-balances = { default-features = false, version = "25.0.0" } -pallet-multisig = { default-features = false, version = "25.0.0" } -pallet-session = { default-features = false, version = "25.0.0" } -pallet-timestamp = { default-features = false, version = "24.0.0" } -pallet-transaction-payment = { default-features = false, version = "25.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" } -pallet-utility = { default-features = false, version = "25.0.0" } -sp-api = { default-features = false, version = "23.0.0" } -sp-block-builder = { default-features = false, version = "23.0.0" } -sp-consensus-aura = { default-features = false, version = "0.29.0" } -sp-core = { default-features = false, version = "25.0.0" } -sp-genesis-builder = { default-features = false , version = "0.4.0" } -sp-inherents = { default-features = false, version = "23.0.0" } -sp-io = { default-features = false, version = "27.0.0" } -sp-offchain = { default-features = false, version = "23.0.0" } -sp-runtime = { default-features = false, version = "28.0.0" } -sp-session = { default-features = false, version = "24.0.0" } -sp-std = { default-features = false, version = "12.0.0" } -sp-storage = { default-features = false, version = "17.0.0" } -sp-transaction-pool = { default-features = false, version = "23.0.0" } -sp-version = { default-features = false, version = "26.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-executive = { default-features = false, version = "27.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +frame-system = { default-features = false, version = "27.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } +pallet-aura = { default-features = false, version = "26.0.0" } +pallet-authorship = { default-features = false, version = "27.0.0" } +pallet-balances = { default-features = false, version = "27.0.0" } +pallet-multisig = { default-features = false, version = "27.0.0" } +pallet-session = { default-features = false, version = "27.0.0" } +pallet-timestamp = { default-features = false, version = "26.0.0" } +pallet-transaction-payment = { default-features = false, version = "27.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "27.0.0" } +pallet-utility = { default-features = false, version = "27.0.0" } +sp-api = { default-features = false, version = "25.0.0" } +sp-block-builder = { default-features = false, version = "25.0.0" } +sp-consensus-aura = { default-features = false, version = "0.31.0" } +sp-core = { default-features = false, version = "27.0.0" } +sp-genesis-builder = { default-features = false , version = "0.6.0" } +sp-inherents = { default-features = false, version = "25.0.0" } +sp-io = { default-features = false, version = "29.0.0" } +sp-offchain = { default-features = false, version = "25.0.0" } +sp-runtime = { default-features = false, version = "30.0.1" } +sp-session = { default-features = false, version = "26.0.0" } +sp-std = { default-features = false, version = "13.0.0" } +sp-storage = { default-features = false, version = "18.0.0" } +sp-transaction-pool = { default-features = false, version = "25.0.0" } +sp-version = { default-features = false, version = "28.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "4.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } -polkadot-core-primitives = { default-features = false, version = "4.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "3.0.0" } -polkadot-runtime-common = { default-features = false, version = "4.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.0" } +pallet-xcm = { default-features = false, version = "6.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } +polkadot-core-primitives = { default-features = false, version = "6.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } +polkadot-runtime-common = { default-features = false, version = "6.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } -cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.4.0" } -cumulus-primitives-core = { default-features = false , version = "0.4.0" } -cumulus-primitives-utility = { default-features = false , version = "0.4.0" } -pallet-collator-selection = { default-features = false , version = "6.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } -parachains-common = { default-features = false , version = "4.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.6.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.6.0" } +cumulus-primitives-core = { default-features = false , version = "0.6.0" } +cumulus-primitives-utility = { default-features = false , version = "0.6.0" } +pallet-collator-selection = { default-features = false , version = "8.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } +parachains-common = { default-features = false , version = "6.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } # Bridges -bp-header-chain = { default-features = false , version = "0.4.0" } -bp-messages = { default-features = false , version = "0.4.0" } -bp-parachains = { default-features = false , version = "0.4.0" } -bp-polkadot-core = { default-features = false , version = "0.4.0" } -bp-relayers = { default-features = false , version = "0.4.0" } -bp-runtime = { default-features = false , version = "0.4.0" } -bp-kusama = { default-features = false , version = "0.2.0" } -bp-polkadot = { default-features = false , version = "0.2.0" } -bridge-runtime-common = { default-features = false , version = "0.4.0" } -pallet-bridge-grandpa = { default-features = false , version = "0.4.0" } -pallet-bridge-messages = { default-features = false , version = "0.4.0" } -pallet-bridge-parachains = { default-features = false , version = "0.4.0" } -pallet-bridge-relayers = { default-features = false , version = "0.4.0" } +bp-header-chain = { default-features = false , version = "0.6.0" } +bp-messages = { default-features = false , version = "0.6.0" } +bp-parachains = { default-features = false , version = "0.6.0" } +bp-polkadot-core = { default-features = false , version = "0.6.0" } +bp-relayers = { default-features = false , version = "0.6.0" } +bp-runtime = { default-features = false , version = "0.6.0" } +bp-kusama = { default-features = false , version = "0.4.0" } +bp-polkadot = { default-features = false , version = "0.4.0" } +bridge-runtime-common = { default-features = false , version = "0.6.0" } +pallet-bridge-grandpa = { default-features = false , version = "0.6.0" } +pallet-bridge-messages = { default-features = false , version = "0.6.0" } +pallet-bridge-parachains = { default-features = false , version = "0.6.0" } +pallet-bridge-relayers = { default-features = false , version = "0.6.0" } [dev-dependencies] -bridge-hub-test-utils = { version = "0.4.0" } -bridge-runtime-common = { version = "0.4.0", features = ["integrity-test"] } -sp-keyring = { version = "28.0.0" } +bridge-hub-test-utils = { version = "0.6.0" } +bridge-runtime-common = { version = "0.6.0", features = ["integrity-test"] } +sp-keyring = { version = "30.0.0" } static_assertions = { version = "1.1.0" } [features] diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml index 3f53e6c7f0..fe96ffdfbe 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml @@ -14,15 +14,15 @@ kusama-runtime-constants = { path = "../../../../relay/kusama/constants", defaul polkadot-runtime-constants = { path = "../../../../relay/polkadot/constants", default-features = false} # Bridge Dependencies -bp-bridge-hub-cumulus = { default-features = false , version = "0.4.0" } -bp-runtime = { default-features = false , version = "0.4.0" } -bp-messages = { default-features = false , version = "0.4.0" } +bp-bridge-hub-cumulus = { default-features = false , version = "0.6.0" } +bp-runtime = { default-features = false , version = "0.6.0" } +bp-messages = { default-features = false , version = "0.6.0" } # Substrate Based Dependencies -frame-support = { default-features = false, version = "25.0.0" } -sp-api = { default-features = false, version = "23.0.0" } -sp-runtime = { default-features = false, version = "28.0.0" } -sp-std = { default-features = false , version = "12.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +sp-api = { default-features = false, version = "25.0.0" } +sp-runtime = { default-features = false, version = "30.0.1" } +sp-std = { default-features = false , version = "13.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index ab0af45c83..a33fc53dad 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -9,15 +9,15 @@ repository.workspace = true version.workspace = true [build-dependencies] -substrate-wasm-builder = { optional = true , version = "14.0.0" } +substrate-wasm-builder = { optional = true , version = "16.0.0" } [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive"] } hex-literal = { version = "0.4.1" } log = { version = "0.4.20", default-features = false } -scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.188", optional = true, features = ["derive"] } -smallvec = "1.11.0" +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +serde = { version = "1.0.195", optional = true, features = ["derive"] } +smallvec = "1.11.2" # Local bp-asset-hub-kusama = { path = "../../asset-hubs/asset-hub-kusama/primitives", default-features = false} @@ -27,80 +27,80 @@ bp-bridge-hub-polkadot = { path = "../bridge-hub-polkadot/primitives", default-f polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-executive = { default-features = false, version = "25.0.0" } -frame-support = { default-features = false, version = "25.0.0" } -frame-system = { default-features = false, version = "25.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } -pallet-aura = { default-features = false, version = "24.0.0" } -pallet-authorship = { default-features = false, version = "25.0.0" } -pallet-balances = { default-features = false, version = "25.0.0" } -pallet-multisig = { default-features = false, version = "25.0.0" } -pallet-session = { default-features = false, version = "25.0.0" } -pallet-timestamp = { default-features = false, version = "24.0.0" } -pallet-transaction-payment = { default-features = false, version = "25.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" } -pallet-utility = { default-features = false, version = "25.0.0" } -sp-api = { default-features = false, version = "23.0.0" } -sp-block-builder = { default-features = false, version = "23.0.0" } -sp-consensus-aura = { default-features = false, version = "0.29.0" } -sp-core = { default-features = false, version = "25.0.0" } -sp-genesis-builder = { default-features = false , version = "0.4.0" } -sp-inherents = { default-features = false, version = "23.0.0" } -sp-io = { default-features = false, version = "27.0.0" } -sp-offchain = { default-features = false, version = "23.0.0" } -sp-runtime = { default-features = false, version = "28.0.0" } -sp-session = { default-features = false, version = "24.0.0" } -sp-std = { default-features = false, version = "12.0.0" } -sp-storage = { default-features = false, version = "17.0.0" } -sp-transaction-pool = { default-features = false, version = "23.0.0" } -sp-version = { default-features = false, version = "26.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-executive = { default-features = false, version = "27.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +frame-system = { default-features = false, version = "27.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } +pallet-aura = { default-features = false, version = "26.0.0" } +pallet-authorship = { default-features = false, version = "27.0.0" } +pallet-balances = { default-features = false, version = "27.0.0" } +pallet-multisig = { default-features = false, version = "27.0.0" } +pallet-session = { default-features = false, version = "27.0.0" } +pallet-timestamp = { default-features = false, version = "26.0.0" } +pallet-transaction-payment = { default-features = false, version = "27.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "27.0.0" } +pallet-utility = { default-features = false, version = "27.0.0" } +sp-api = { default-features = false, version = "25.0.0" } +sp-block-builder = { default-features = false, version = "25.0.0" } +sp-consensus-aura = { default-features = false, version = "0.31.0" } +sp-core = { default-features = false, version = "27.0.0" } +sp-genesis-builder = { default-features = false , version = "0.6.0" } +sp-inherents = { default-features = false, version = "25.0.0" } +sp-io = { default-features = false, version = "29.0.0" } +sp-offchain = { default-features = false, version = "25.0.0" } +sp-runtime = { default-features = false, version = "30.0.1" } +sp-session = { default-features = false, version = "26.0.0" } +sp-std = { default-features = false, version = "13.0.0" } +sp-storage = { default-features = false, version = "18.0.0" } +sp-transaction-pool = { default-features = false, version = "25.0.0" } +sp-version = { default-features = false, version = "28.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "4.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } -polkadot-core-primitives = { default-features = false, version = "4.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "3.0.0" } -polkadot-runtime-common = { default-features = false, version = "4.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.0" } +pallet-xcm = { default-features = false, version = "6.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } +polkadot-core-primitives = { default-features = false, version = "6.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } +polkadot-runtime-common = { default-features = false, version = "6.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } -cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.4.0" } -cumulus-primitives-core = { default-features = false , version = "0.4.0" } -cumulus-primitives-utility = { default-features = false , version = "0.4.0" } -pallet-collator-selection = { default-features = false , version = "6.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } -parachains-common = { default-features = false , version = "4.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.6.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.6.0" } +cumulus-primitives-core = { default-features = false , version = "0.6.0" } +cumulus-primitives-utility = { default-features = false , version = "0.6.0" } +pallet-collator-selection = { default-features = false , version = "8.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } +parachains-common = { default-features = false , version = "6.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } # Bridges -bp-header-chain = { default-features = false , version = "0.4.0" } -bp-messages = { default-features = false , version = "0.4.0" } -bp-parachains = { default-features = false , version = "0.4.0" } -bp-polkadot-core = { default-features = false , version = "0.4.0" } -bp-relayers = { default-features = false , version = "0.4.0" } -bp-runtime = { default-features = false , version = "0.4.0" } -bp-kusama = { default-features = false , version = "0.2.0" } -bp-polkadot = { default-features = false , version = "0.2.0" } -bridge-runtime-common = { default-features = false , version = "0.4.0" } -pallet-bridge-grandpa = { default-features = false , version = "0.4.0" } -pallet-bridge-messages = { default-features = false , version = "0.4.0" } -pallet-bridge-parachains = { default-features = false , version = "0.4.0" } -pallet-bridge-relayers = { default-features = false , version = "0.4.0" } +bp-header-chain = { default-features = false , version = "0.6.0" } +bp-messages = { default-features = false , version = "0.6.0" } +bp-parachains = { default-features = false , version = "0.6.0" } +bp-polkadot-core = { default-features = false , version = "0.6.0" } +bp-relayers = { default-features = false , version = "0.6.0" } +bp-runtime = { default-features = false , version = "0.6.0" } +bp-kusama = { default-features = false , version = "0.4.0" } +bp-polkadot = { default-features = false , version = "0.4.0" } +bridge-runtime-common = { default-features = false , version = "0.6.0" } +pallet-bridge-grandpa = { default-features = false , version = "0.6.0" } +pallet-bridge-messages = { default-features = false , version = "0.6.0" } +pallet-bridge-parachains = { default-features = false , version = "0.6.0" } +pallet-bridge-relayers = { default-features = false , version = "0.6.0" } [dev-dependencies] -bridge-hub-test-utils = { version = "0.4.0" } -bridge-runtime-common = { version = "0.4.0", features = ["integrity-test"] } -sp-keyring = { version = "28.0.0" } +bridge-hub-test-utils = { version = "0.6.0" } +bridge-runtime-common = { version = "0.6.0", features = ["integrity-test"] } +sp-keyring = { version = "30.0.0" } static_assertions = { version = "1.1.0" } [features] diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml index 614216ff78..717310b606 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml @@ -14,15 +14,15 @@ kusama-runtime-constants = { path = "../../../../relay/kusama/constants", defaul polkadot-runtime-constants = { path = "../../../../relay/polkadot/constants", default-features = false} # Bridge Dependencies -bp-bridge-hub-cumulus = { default-features = false , version = "0.4.0" } -bp-runtime = { default-features = false , version = "0.4.0" } -bp-messages = { default-features = false , version = "0.4.0" } +bp-bridge-hub-cumulus = { default-features = false , version = "0.6.0" } +bp-runtime = { default-features = false , version = "0.6.0" } +bp-messages = { default-features = false , version = "0.6.0" } # Substrate Based Dependencies -frame-support = { default-features = false, version = "25.0.0" } -sp-api = { default-features = false, version = "23.0.0" } -sp-runtime = { default-features = false, version = "28.0.0" } -sp-std = { default-features = false , version = "12.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +sp-api = { default-features = false, version = "25.0.0" } +sp-runtime = { default-features = false, version = "30.0.1" } +sp-std = { default-features = false , version = "13.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index bd53424767..35103ed880 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -9,81 +9,81 @@ repository.workspace = true version.workspace = true [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] } +codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } hex-literal = { version = "0.4.1" } log = { version = "0.4.20", default-features = false } -scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } -smallvec = "1.11.0" +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +smallvec = "1.11.2" # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-executive = { default-features = false, version = "25.0.0" } -frame-support = { default-features = false, version = "25.0.0" } -frame-system = { default-features = false, version = "25.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } -pallet-asset-rate = { default-features = false , version = "4.0.0" } -pallet-alliance = { default-features = false, version = "24.0.0" } -pallet-aura = { default-features = false, version = "24.0.0" } -pallet-authorship = { default-features = false, version = "25.0.0" } -pallet-balances = { default-features = false, version = "25.0.0" } -pallet-collective = { default-features = false, version = "25.0.0" } -pallet-multisig = { default-features = false, version = "25.0.0" } -pallet-preimage = { default-features = false , version = "25.0.0" } -pallet-proxy = { default-features = false, version = "25.0.0" } -pallet-scheduler = { default-features = false , version = "26.0.0" } -pallet-session = { default-features = false, version = "25.0.0" } -pallet-timestamp = { default-features = false, version = "24.0.0" } -pallet-transaction-payment = { default-features = false, version = "25.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" } -pallet-treasury = { default-features = false , version = "24.0.0" } -pallet-utility = { default-features = false, version = "25.0.0" } -pallet-referenda = { default-features = false, version = "25.0.0" } -pallet-ranked-collective = { default-features = false, version = "25.0.0" } -pallet-core-fellowship = { default-features = false, version = "9.0.0" } -pallet-salary = { default-features = false, version = "10.0.0" } -sp-api = { default-features = false, version = "23.0.0" } -sp-arithmetic = { default-features = false , version = "20.0.0" } -sp-block-builder = { default-features = false, version = "23.0.0" } -sp-consensus-aura = { default-features = false, version = "0.29.0" } -sp-core = { default-features = false, version = "25.0.0" } -sp-genesis-builder = { default-features = false , version = "0.4.0" } -sp-inherents = { default-features = false, version = "23.0.0" } -sp-offchain = { default-features = false, version = "23.0.0" } -sp-runtime = { default-features = false, version = "28.0.0" } -sp-session = { default-features = false, version = "24.0.0" } -sp-std = { default-features = false, version = "12.0.0" } -sp-storage = { default-features = false, version = "17.0.0" } -sp-transaction-pool = { default-features = false, version = "23.0.0" } -sp-version = { default-features = false, version = "26.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-executive = { default-features = false, version = "27.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +frame-system = { default-features = false, version = "27.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } +pallet-asset-rate = { default-features = false , version = "6.0.0" } +pallet-alliance = { default-features = false, version = "26.0.0" } +pallet-aura = { default-features = false, version = "26.0.0" } +pallet-authorship = { default-features = false, version = "27.0.0" } +pallet-balances = { default-features = false, version = "27.0.0" } +pallet-collective = { default-features = false, version = "27.0.0" } +pallet-multisig = { default-features = false, version = "27.0.0" } +pallet-preimage = { default-features = false , version = "27.0.0" } +pallet-proxy = { default-features = false, version = "27.0.0" } +pallet-scheduler = { default-features = false , version = "28.0.0" } +pallet-session = { default-features = false, version = "27.0.0" } +pallet-timestamp = { default-features = false, version = "26.0.0" } +pallet-transaction-payment = { default-features = false, version = "27.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "27.0.0" } +pallet-treasury = { default-features = false , version = "26.0.0" } +pallet-utility = { default-features = false, version = "27.0.0" } +pallet-referenda = { default-features = false, version = "27.0.0" } +pallet-ranked-collective = { default-features = false, version = "27.0.0" } +pallet-core-fellowship = { default-features = false, version = "11.0.0" } +pallet-salary = { default-features = false, version = "12.0.0" } +sp-api = { default-features = false, version = "25.0.0" } +sp-arithmetic = { default-features = false , version = "22.0.0" } +sp-block-builder = { default-features = false, version = "25.0.0" } +sp-consensus-aura = { default-features = false, version = "0.31.0" } +sp-core = { default-features = false, version = "27.0.0" } +sp-genesis-builder = { default-features = false , version = "0.6.0" } +sp-inherents = { default-features = false, version = "25.0.0" } +sp-offchain = { default-features = false, version = "25.0.0" } +sp-runtime = { default-features = false, version = "30.0.1" } +sp-session = { default-features = false, version = "26.0.0" } +sp-std = { default-features = false, version = "13.0.0" } +sp-storage = { default-features = false, version = "18.0.0" } +sp-transaction-pool = { default-features = false, version = "25.0.0" } +sp-version = { default-features = false, version = "28.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "4.0.0" } -polkadot-core-primitives = { default-features = false, version = "4.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "3.0.0" } -polkadot-runtime-common = { default-features = false, version = "4.0.0" } +pallet-xcm = { default-features = false, version = "6.0.0" } +polkadot-core-primitives = { default-features = false, version = "6.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } +polkadot-runtime-common = { default-features = false, version = "6.0.0" } polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} -xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } -cumulus-pallet-xcmp-queue = { default-features = false , version = "0.4.0" } -cumulus-primitives-core = { default-features = false , version = "0.4.0" } -cumulus-primitives-utility = { default-features = false , version = "0.4.0" } -pallet-collator-selection = { default-features = false , version = "6.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } -parachains-common = { default-features = false , version = "4.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.6.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } +cumulus-pallet-xcmp-queue = { default-features = false , version = "0.6.0" } +cumulus-primitives-core = { default-features = false , version = "0.6.0" } +cumulus-primitives-utility = { default-features = false , version = "0.6.0" } +pallet-collator-selection = { default-features = false , version = "8.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } +parachains-common = { default-features = false , version = "6.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } [build-dependencies] -substrate-wasm-builder = { optional = true , version = "14.0.0" } +substrate-wasm-builder = { optional = true , version = "16.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/constants/Cargo.toml b/system-parachains/constants/Cargo.toml index 20bd904bf3..d8c079192c 100644 --- a/system-parachains/constants/Cargo.toml +++ b/system-parachains/constants/Cargo.toml @@ -8,15 +8,15 @@ edition.workspace = true license.workspace = true [dependencies] -smallvec = "1.8.0" +smallvec = "1.11.2" -frame-support = { default-features = false , version = "25.0.0" } +frame-support = { default-features = false , version = "27.0.0" } kusama-runtime-constants = { path = "../../relay/kusama/constants", default-features = false} -parachains-common = { default-features = false , version = "4.0.0" } -polkadot-core-primitives = { default-features = false, version = "4.0.0"} -polkadot-primitives = { default-features = false , version = "4.0.0" } +parachains-common = { default-features = false , version = "6.0.0" } +polkadot-core-primitives = { default-features = false, version = "6.0.0"} +polkadot-primitives = { default-features = false , version = "6.0.0" } polkadot-runtime-constants = { path = "../../relay/polkadot/constants", default-features = false} -sp-runtime = { default-features = false , version = "28.0.0" } +sp-runtime = { default-features = false , version = "30.0.1" } [features] default = [ "std" ] diff --git a/system-parachains/gluttons/glutton-kusama/Cargo.toml b/system-parachains/gluttons/glutton-kusama/Cargo.toml index 745a9b8d12..e72a2ec7d8 100644 --- a/system-parachains/gluttons/glutton-kusama/Cargo.toml +++ b/system-parachains/gluttons/glutton-kusama/Cargo.toml @@ -9,47 +9,47 @@ repository.workspace = true version.workspace = true [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-executive = { default-features = false, version = "25.0.0" } -frame-support = { default-features = false, version = "25.0.0" } -frame-system = { default-features = false, version = "25.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } -pallet-glutton = { default-features = false, optional = true, version = "11.0.0" } -pallet-sudo = { default-features = false, optional = true, version = "25.0.0" } -sp-api = { default-features = false, version = "23.0.0" } -sp-block-builder = { default-features = false, version = "23.0.0" } -sp-core = { default-features = false, version = "25.0.0" } -sp-genesis-builder = { default-features = false , version = "0.4.0" } -sp-inherents = { default-features = false, version = "23.0.0" } -sp-offchain = { default-features = false, version = "23.0.0" } -sp-runtime = { default-features = false, version = "28.0.0" } -sp-session = { default-features = false, version = "24.0.0" } -sp-std = { default-features = false, version = "12.0.0" } -sp-storage = { default-features = false, version = "17.0.0" } -sp-transaction-pool = { default-features = false, version = "23.0.0" } -sp-version = { default-features = false, version = "26.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-executive = { default-features = false, version = "27.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +frame-system = { default-features = false, version = "27.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } +pallet-glutton = { default-features = false, optional = true, version = "13.0.0" } +pallet-sudo = { default-features = false, optional = true, version = "27.0.0" } +sp-api = { default-features = false, version = "25.0.0" } +sp-block-builder = { default-features = false, version = "25.0.0" } +sp-core = { default-features = false, version = "27.0.0" } +sp-genesis-builder = { default-features = false , version = "0.6.0" } +sp-inherents = { default-features = false, version = "25.0.0" } +sp-offchain = { default-features = false, version = "25.0.0" } +sp-runtime = { default-features = false, version = "30.0.1" } +sp-session = { default-features = false, version = "26.0.0" } +sp-std = { default-features = false, version = "13.0.0" } +sp-storage = { default-features = false, version = "18.0.0" } +sp-transaction-pool = { default-features = false, version = "25.0.0" } +sp-version = { default-features = false, version = "28.0.0" } # Polkadot -xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } # Cumulus -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } -cumulus-primitives-core = { default-features = false , version = "0.4.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } -parachains-common = { default-features = false , version = "4.0.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } +cumulus-primitives-core = { default-features = false , version = "0.6.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } +parachains-common = { default-features = false , version = "6.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } [build-dependencies] -substrate-wasm-builder = { version = "14.0.0" } +substrate-wasm-builder = { version = "16.0.0" } [features] default = [ "std" ] From 93f136b9fcbcf7d3ca0543d4c197e21d347db2a4 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 9 Jan 2024 14:33:50 +0100 Subject: [PATCH 002/316] [FeeManager] fix for XcmFeesToAccount --- relay/kusama/src/xcm_config.rs | 7 +++++-- relay/polkadot/src/xcm_config.rs | 7 +++++-- .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 9 ++++++--- .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 9 ++++++--- .../bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 9 ++++++--- .../bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs | 9 ++++++--- .../collectives/collectives-polkadot/src/xcm_config.rs | 9 ++++++--- 7 files changed, 40 insertions(+), 19 deletions(-) diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index 75eb39ab69..7a0239ffd6 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -42,7 +42,7 @@ use xcm_builder::{ DescribeFamily, HashedDescription, IsChildSystemParachain, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, - WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::traits::WithOriginFilter; @@ -355,7 +355,10 @@ impl xcm_executor::Config for XcmConfig { type SubscriptionService = XcmPallet; type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; - type FeeManager = XcmFeesToAccount; + type FeeManager = XcmFeeManagerFromComponents< + WaivedLocations, + XcmFeeToAccount, + >; // No bridges yet... type MessageExporter = (); type UniversalAliases = Nothing; diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index e019879b36..4ac4bcdc56 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -47,7 +47,7 @@ use xcm_builder::{ DescribeFamily, HashedDescription, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeesToAccount, + XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::traits::WithOriginFilter; @@ -359,7 +359,10 @@ impl xcm_executor::Config for XcmConfig { type SubscriptionService = XcmPallet; type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; - type FeeManager = XcmFeesToAccount; + type FeeManager = XcmFeeManagerFromComponents< + WaivedLocations, + XcmFeeToAccount, + >; // No bridges yet... type MessageExporter = (); type UniversalAliases = Nothing; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 489e38458a..e0f7f3d04d 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -51,7 +51,7 @@ use xcm_builder::{ SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, - WithUniqueTopic, XcmFeesToAccount, + WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -75,7 +75,7 @@ parameter_types! { pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); pub const FellowshipLocation: MultiLocation = MultiLocation::parent(); pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(kusama_runtime_constants::TREASURY_PALLET_ID)).into(); - pub TreasuryAccount: Option = Some(TREASURY_PALLET_ID.into_account_truncating()); + pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -595,7 +595,10 @@ impl xcm_executor::Config for XcmConfig { type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); - type FeeManager = XcmFeesToAccount; + type FeeManager = XcmFeeManagerFromComponents< + WaivedLocations, + XcmFeeToAccount, + >; type MessageExporter = (); type UniversalAliases = bridging::to_polkadot::UniversalAliases; type CallDispatcher = WithOriginFilter; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 4f6393a35f..904b56f6fc 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -48,7 +48,7 @@ use xcm_builder::{ SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, - WithUniqueTopic, XcmFeesToAccount, + WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -65,7 +65,7 @@ parameter_types! { pub FellowshipLocation: MultiLocation = MultiLocation::new(1, Parachain(1001)); pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); - pub TreasuryAccount: Option = Some(TREASURY_PALLET_ID.into_account_truncating()); + pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -517,7 +517,10 @@ impl xcm_executor::Config for XcmConfig { type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); - type FeeManager = XcmFeesToAccount; + type FeeManager = XcmFeeManagerFromComponents< + WaivedLocations, + XcmFeeToAccount, + >; type MessageExporter = (); type UniversalAliases = bridging::to_kusama::UniversalAliases; type CallDispatcher = WithOriginFilter; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 023ddc7e4a..0fd4c61631 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -45,7 +45,7 @@ use xcm_builder::{ RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeesToAccount, + XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -60,7 +60,7 @@ parameter_types! { pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); pub const FellowshipLocation: MultiLocation = MultiLocation::parent(); pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(kusama_runtime_constants::TREASURY_PALLET_ID)).into(); - pub TreasuryAccount: Option = Some(TREASURY_PALLET_ID.into_account_truncating()); + pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -275,7 +275,10 @@ impl xcm_executor::Config for XcmConfig { type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); - type FeeManager = XcmFeesToAccount; + type FeeManager = XcmFeeManagerFromComponents< + WaivedLocations, + XcmFeeToAccount, + >; type MessageExporter = ToBridgeHubPolkadotHaulBlobExporter; type UniversalAliases = Nothing; type CallDispatcher = WithOriginFilter; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 59a3890e02..59fec511f5 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -45,7 +45,7 @@ use xcm_builder::{ RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeesToAccount, + XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -60,7 +60,7 @@ parameter_types! { pub FellowshipLocation: MultiLocation = MultiLocation::new(1, Parachain(1001)); pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); - pub TreasuryAccount: Option = Some(TREASURY_PALLET_ID.into_account_truncating()); + pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -282,7 +282,10 @@ impl xcm_executor::Config for XcmConfig { type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); - type FeeManager = XcmFeesToAccount; + type FeeManager = XcmFeeManagerFromComponents< + WaivedLocations, + XcmFeeToAccount, + >; type MessageExporter = ToBridgeHubKusamaHaulBlobExporter; type UniversalAliases = Nothing; type CallDispatcher = WithOriginFilter; diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index c336764488..2ad50d1356 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -42,7 +42,7 @@ use xcm_builder::{ OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, - UsingComponents, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, + UsingComponents, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -56,7 +56,7 @@ parameter_types! { pub CheckingAccount: AccountId = PolkadotXcm::check_account(); pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); - pub TreasuryAccount: Option = Some(TREASURY_PALLET_ID.into_account_truncating()); + pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); pub const TreasurerBodyId: BodyId = BodyId::Index(xcm_constants::body::TREASURER_INDEX); } @@ -301,7 +301,10 @@ impl xcm_executor::Config for XcmConfig { type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); - type FeeManager = XcmFeesToAccount; + type FeeManager = XcmFeeManagerFromComponents< + WaivedLocations, + XcmFeeToAccount, + >; type MessageExporter = (); type UniversalAliases = Nothing; type CallDispatcher = WithOriginFilter; From 3c887196f97483a0455931c3a27c1418a92c1fb7 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 9 Jan 2024 14:34:37 +0100 Subject: [PATCH 003/316] [pallet_identity] adapt https://github.com/paritytech/polkadot-sdk/pull/2048 [pallet_identity] removed `FieldDeposit`, `MaxAdditionalFields`, added `ByteDeposit` fix import `simple` -> `legacy` --- relay/kusama/src/lib.rs | 8 +++---- relay/kusama/src/weights/pallet_identity.rs | 24 +++++-------------- relay/polkadot/src/lib.rs | 8 +++---- relay/polkadot/src/weights/pallet_identity.rs | 24 +++++-------------- 4 files changed, 20 insertions(+), 44 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index f1db72848f..6cbb7b9278 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -80,7 +80,7 @@ use frame_support::{ }; use frame_system::EnsureRoot; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; -use pallet_identity::simple::IdentityInfo; +use pallet_identity::legacy::IdentityInfo; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use pallet_session::historical as session_historical; use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo}; @@ -922,7 +922,8 @@ impl claims::Config for Runtime { parameter_types! { // Minimum 100 bytes/KSM deposited (1 CENT/byte) pub const BasicDeposit: Balance = 1000 * CENTS; // 258 bytes on-chain - pub const FieldDeposit: Balance = 250 * CENTS; // 66 bytes on-chain + // TODO:(PR#137) - check ByteDeposit? + pub const ByteDeposit: Balance = deposit(0, 1); pub const SubAccountDeposit: Balance = 200 * CENTS; // 53 bytes on-chain pub const MaxSubAccounts: u32 = 100; pub const MaxAdditionalFields: u32 = 100; @@ -933,10 +934,9 @@ 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 = Treasury; diff --git a/relay/kusama/src/weights/pallet_identity.rs b/relay/kusama/src/weights/pallet_identity.rs index 46ec51a056..c160e50c64 100644 --- a/relay/kusama/src/weights/pallet_identity.rs +++ b/relay/kusama/src/weights/pallet_identity.rs @@ -70,7 +70,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, 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: `442 + r * (5 ±0)` // Estimated: `11003` @@ -79,8 +79,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 11003)) // Standard Error: 3_669 .saturating_add(Weight::from_parts(145_207, 0).saturating_mul(r.into())) - // Standard Error: 716 - .saturating_add(Weight::from_parts(451_168, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -135,7 +133,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: `469 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11003` @@ -146,8 +144,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(178_396, 0).saturating_mul(r.into())) // Standard Error: 1_860 .saturating_add(Weight::from_parts(1_315_185, 0).saturating_mul(s.into())) - // Standard Error: 1_860 - .saturating_add(Weight::from_parts(262_283, 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()))) @@ -158,7 +154,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, 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: `367 + r * (57 ±0) + x * (66 ±0)` // Estimated: `11003` @@ -167,8 +163,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 11003)) // Standard Error: 4_038 .saturating_add(Weight::from_parts(140_007, 0).saturating_mul(r.into())) - // Standard Error: 788 - .saturating_add(Weight::from_parts(476_213, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -176,7 +170,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, 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: `398 + x * (66 ±0)` // Estimated: `11003` @@ -185,8 +179,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 11003)) // Standard Error: 4_050 .saturating_add(Weight::from_parts(119_572, 0).saturating_mul(r.into())) - // Standard Error: 790 - .saturating_add(Weight::from_parts(470_950, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -241,7 +233,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, 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: `445 + r * (57 ±0) + x * (66 ±0)` // Estimated: `11003` @@ -250,8 +242,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 11003)) // Standard Error: 3_622 .saturating_add(Weight::from_parts(111_414, 0).saturating_mul(r.into())) - // Standard Error: 670 - .saturating_add(Weight::from_parts(753_154, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -266,7 +256,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: `676 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11003` @@ -277,8 +267,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(219_037, 0).saturating_mul(r.into())) // Standard Error: 6_824 .saturating_add(Weight::from_parts(1_337_803, 0).saturating_mul(s.into())) - // Standard Error: 6_824 - .saturating_add(Weight::from_parts(285_260, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 7835ff0f82..bdfa70884f 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -66,7 +66,7 @@ use frame_support::{ }; use frame_system::EnsureRoot; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; -use pallet_identity::simple::IdentityInfo; +use pallet_identity::legacy::IdentityInfo; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use pallet_session::historical as session_historical; use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo}; @@ -795,7 +795,8 @@ impl pallet_fast_unstake::Config for Runtime { parameter_types! { // Minimum 4 CENTS/byte pub const BasicDeposit: Balance = deposit(1, 258); - pub const FieldDeposit: Balance = deposit(0, 66); + // TODO:(PR#137) - check ByteDeposit? + pub const ByteDeposit: Balance = deposit(0, 1); pub const SubAccountDeposit: Balance = deposit(1, 53); pub const MaxSubAccounts: u32 = 100; pub const MaxAdditionalFields: u32 = 100; @@ -806,10 +807,9 @@ 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 = Treasury; diff --git a/relay/polkadot/src/weights/pallet_identity.rs b/relay/polkadot/src/weights/pallet_identity.rs index 758715c6eb..087cdb708c 100644 --- a/relay/polkadot/src/weights/pallet_identity.rs +++ b/relay/polkadot/src/weights/pallet_identity.rs @@ -70,7 +70,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, 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: `442 + r * (5 ±0)` // Estimated: `11003` @@ -79,8 +79,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 11003)) // Standard Error: 3_842 .saturating_add(Weight::from_parts(168_829, 0).saturating_mul(r.into())) - // Standard Error: 749 - .saturating_add(Weight::from_parts(461_025, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -135,7 +133,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: `469 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11003` @@ -146,8 +144,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(134_695, 0).saturating_mul(r.into())) // Standard Error: 2_134 .saturating_add(Weight::from_parts(1_291_235, 0).saturating_mul(s.into())) - // Standard Error: 2_134 - .saturating_add(Weight::from_parts(259_478, 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()))) @@ -158,7 +154,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, 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: `367 + r * (57 ±0) + x * (66 ±0)` // Estimated: `11003` @@ -167,8 +163,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 11003)) // Standard Error: 3_649 .saturating_add(Weight::from_parts(157_213, 0).saturating_mul(r.into())) - // Standard Error: 712 - .saturating_add(Weight::from_parts(495_951, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -176,7 +170,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, 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: `398 + x * (66 ±0)` // Estimated: `11003` @@ -185,8 +179,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 11003)) // Standard Error: 2_838 .saturating_add(Weight::from_parts(91_214, 0).saturating_mul(r.into())) - // Standard Error: 553 - .saturating_add(Weight::from_parts(472_533, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -241,7 +233,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, 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: `445 + r * (57 ±0) + x * (66 ±0)` // Estimated: `11003` @@ -250,8 +242,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 11003)) // Standard Error: 4_288 .saturating_add(Weight::from_parts(128_899, 0).saturating_mul(r.into())) - // Standard Error: 793 - .saturating_add(Weight::from_parts(761_648, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -266,7 +256,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: `676 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11003` @@ -277,8 +267,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(238_248, 0).saturating_mul(r.into())) // Standard Error: 2_670 .saturating_add(Weight::from_parts(1_322_628, 0).saturating_mul(s.into())) - // Standard Error: 2_670 - .saturating_add(Weight::from_parts(294_550, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) From fd6bffa70c1dcff79b4301b1021519e434c5c553 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 9 Jan 2024 14:35:12 +0100 Subject: [PATCH 004/316] [pallet_staking] removed benchmark `payout_stakers_dead_controller` --- relay/kusama/src/weights/pallet_staking.rs | 38 -------------------- relay/polkadot/src/weights/pallet_staking.rs | 38 -------------------- 2 files changed, 76 deletions(-) diff --git a/relay/kusama/src/weights/pallet_staking.rs b/relay/kusama/src/weights/pallet_staking.rs index a2c992d8cc..a6be62de0a 100644 --- a/relay/kusama/src/weights/pallet_staking.rs +++ b/relay/kusama/src/weights/pallet_staking.rs @@ -453,44 +453,6 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `Staking::ErasValidatorReward` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `Staking::Bonded` (r:513 w:0) /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) - /// Storage: `Staking::Ledger` (r:1 w:1) - /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) - /// Storage: `Staking::ErasStakersClipped` (r:1 w:0) - /// Proof: `Staking::ErasStakersClipped` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:1 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:514 w:514) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Staking::ErasRewardPoints` (r:1 w:0) - /// Proof: `Staking::ErasRewardPoints` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Staking::ErasValidatorPrefs` (r:1 w:0) - /// Proof: `Staking::ErasValidatorPrefs` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`) - /// Storage: `Staking::Payee` (r:513 w:0) - /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) - /// The range of component `n` is `[0, 512]`. - fn payout_stakers_dead_controller(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `36208 + n * (159 ±0)` - // Estimated: `34669 + n * (2603 ±0)` - // Minimum execution time: 131_091_000 picoseconds. - Weight::from_parts(169_654_528, 0) - .saturating_add(Weight::from_parts(0, 34669)) - // Standard Error: 38_361 - .saturating_add(Weight::from_parts(27_033_943, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(12)) - .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into())) - } - /// Storage: `Staking::CurrentEra` (r:1 w:0) - /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Staking::ErasValidatorReward` (r:1 w:0) - /// Proof: `Staking::ErasValidatorReward` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) - /// Storage: `Staking::Bonded` (r:513 w:0) - /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Staking::Ledger` (r:513 w:513) /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::ErasStakersClipped` (r:1 w:0) diff --git a/relay/polkadot/src/weights/pallet_staking.rs b/relay/polkadot/src/weights/pallet_staking.rs index 8eca02acc4..eea33b1a18 100644 --- a/relay/polkadot/src/weights/pallet_staking.rs +++ b/relay/polkadot/src/weights/pallet_staking.rs @@ -453,44 +453,6 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `Staking::ErasValidatorReward` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `Staking::Bonded` (r:513 w:0) /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) - /// Storage: `Staking::Ledger` (r:1 w:1) - /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) - /// Storage: `Staking::ErasStakersClipped` (r:1 w:0) - /// Proof: `Staking::ErasStakersClipped` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:1 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:514 w:514) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Staking::ErasRewardPoints` (r:1 w:0) - /// Proof: `Staking::ErasRewardPoints` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Staking::ErasValidatorPrefs` (r:1 w:0) - /// Proof: `Staking::ErasValidatorPrefs` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`) - /// Storage: `Staking::Payee` (r:513 w:0) - /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) - /// The range of component `n` is `[0, 512]`. - fn payout_stakers_dead_controller(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `36212 + n * (160 ±0)` - // Estimated: `34673 + n * (2603 ±1)` - // Minimum execution time: 121_546_000 picoseconds. - Weight::from_parts(176_075_574, 0) - .saturating_add(Weight::from_parts(0, 34673)) - // Standard Error: 38_394 - .saturating_add(Weight::from_parts(27_529_654, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(12)) - .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into())) - } - /// Storage: `Staking::CurrentEra` (r:1 w:0) - /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Staking::ErasValidatorReward` (r:1 w:0) - /// Proof: `Staking::ErasValidatorReward` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) - /// Storage: `Staking::Bonded` (r:513 w:0) - /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Staking::Ledger` (r:513 w:513) /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::ErasStakersClipped` (r:1 w:0) From 41fd521d4db4fd58a8b5b3fe29cb840b102adcb5 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 9 Jan 2024 14:56:51 +0100 Subject: [PATCH 005/316] [pallet_nomination_pools] change import `versioned_migrations` to `versioned` --- relay/kusama/src/lib.rs | 4 ++-- relay/polkadot/src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 6cbb7b9278..f826574de4 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1682,8 +1682,8 @@ pub mod migrations { /// Unreleased migrations. Add new ones here: pub type Unreleased = ( - pallet_nomination_pools::migration::versioned_migrations::V5toV6, - pallet_nomination_pools::migration::versioned_migrations::V6ToV7, + pallet_nomination_pools::migration::versioned::V5toV6, + pallet_nomination_pools::migration::versioned::V6ToV7, ); } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index bdfa70884f..38167bf57b 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1703,8 +1703,8 @@ pub mod migrations { pub type Unreleased = ( // Upgrade SessionKeys to include BEEFY key UpgradeSessionKeys, - pallet_nomination_pools::migration::versioned_migrations::V5toV6, - pallet_nomination_pools::migration::versioned_migrations::V6ToV7, + pallet_nomination_pools::migration::versioned::V5toV6, + pallet_nomination_pools::migration::versioned::V6ToV7, ); } From aef83c96c4eaeaa3e7e2b66e2be4376c53a1be36 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 9 Jan 2024 15:31:06 +0100 Subject: [PATCH 006/316] [pallet_staking] adapt https://github.com/paritytech/polkadot-sdk/pull/1189 --- relay/kusama/src/lib.rs | 24 ++++++++++++++++-------- relay/kusama/src/tests.rs | 2 +- relay/polkadot/src/lib.rs | 26 +++++++++++++++++--------- 3 files changed, 34 insertions(+), 18 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index f826574de4..f58075fe5e 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -299,7 +299,7 @@ impl pallet_babe::Config for Runtime { type WeightInfo = (); type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; + type MaxNominators = MaxNominators; } parameter_types! { @@ -344,7 +344,7 @@ parameter_types! { impl pallet_beefy::Config for Runtime { type BeefyId = BeefyId; type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; + type MaxNominators = MaxNominators; type MaxSetIdSessionEntries = BeefySetIdSessionEntries; type OnNewValidatorSet = BeefyMmrLeaf; type WeightInfo = (); @@ -657,7 +657,12 @@ parameter_types! { 27, "DOT_SLASH_DEFER_DURATION" ); - pub const MaxNominatorRewardedPerValidator: u32 = 512; + // TODO:(PR#137) - check MaxExposurePageSize/MaxNominators 512? + pub const MaxExposurePageSize: u32 = 512; + // Note: this is not really correct as Max Nominators is (MaxExposurePageSize * page_count) but + // this is an unbounded number. We just set it to a reasonably high value, 1 full page + // of nominators. + pub const MaxNominators: u32 = 512; pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); // 24 pub const MaxNominations: u32 = ::LIMIT as u32; @@ -681,7 +686,7 @@ impl pallet_staking::Config for Runtime { type SessionInterface = Self; type EraPayout = EraPayout; type NextNewSession = Session; - type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; + type MaxExposurePageSize = MaxExposurePageSize; type OffendingValidatorsThreshold = OffendingValidatorsThreshold; type VoterList = VoterList; type TargetList = UseValidatorsMap; @@ -701,8 +706,6 @@ impl pallet_fast_unstake::Config for Runtime { type ControlOrigin = EnsureRoot; type Staking = Staking; type MaxErasToCheckPerBlock = ConstU32<1>; - #[cfg(feature = "runtime-benchmarks")] - type MaxBackersPerValidator = MaxNominatorRewardedPerValidator; type WeightInfo = weights::pallet_fast_unstake::WeightInfo; } @@ -837,7 +840,7 @@ impl pallet_grandpa::Config for Runtime { type WeightInfo = (); type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; + type MaxNominators = MaxNominators; type MaxSetIdSessionEntries = MaxSetIdSessionEntries; type KeyOwnerProof = >::Proof; @@ -1684,6 +1687,7 @@ pub mod migrations { pub type Unreleased = ( pallet_nomination_pools::migration::versioned::V5toV6, pallet_nomination_pools::migration::versioned::V6ToV7, + pallet_staking::migrations::v14::MigrateToV14, ); } @@ -2234,10 +2238,14 @@ sp_api::impl_runtime_apis! { } } - impl pallet_staking_runtime_api::StakingApi for Runtime { + impl pallet_staking_runtime_api::StakingApi for Runtime { fn nominations_quota(balance: Balance) -> u32 { Staking::api_nominations_quota(balance) } + + fn eras_stakers_page_count(era: sp_staking::EraIndex, account: AccountId) -> sp_staking::Page { + Staking::api_eras_stakers_page_count(era, account) + } } impl sp_genesis_builder::GenesisBuilder for Runtime { diff --git a/relay/kusama/src/tests.rs b/relay/kusama/src/tests.rs index e096a19cc5..e6e248a8e9 100644 --- a/relay/kusama/src/tests.rs +++ b/relay/kusama/src/tests.rs @@ -59,7 +59,7 @@ fn payout_weight_portion() { use pallet_staking::WeightInfo; let payout_weight = ::WeightInfo::payout_stakers_alive_staked( - MaxNominatorRewardedPerValidator::get(), + MaxNominators::get(), ) .ref_time() as f64; let block_weight = BlockWeights::get().max_block.ref_time() as f64; diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 38167bf57b..03703456e0 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -279,7 +279,7 @@ impl pallet_babe::Config for Runtime { type WeightInfo = (); type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; + type MaxNominators = MaxNominators; type KeyOwnerProof = >::Proof; @@ -330,7 +330,7 @@ parameter_types! { impl pallet_beefy::Config for Runtime { type BeefyId = BeefyId; type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; + type MaxNominators = MaxNominators; type MaxSetIdSessionEntries = BeefySetIdSessionEntries; type OnNewValidatorSet = BeefyMmrLeaf; type WeightInfo = (); @@ -667,7 +667,12 @@ parameter_types! { "DOT_SLASH_DEFER_DURATION" ); pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE; - pub const MaxNominatorRewardedPerValidator: u32 = 512; + // TODO:(PR#137) - check MaxExposurePageSize/MaxNominators 512? + pub const MaxExposurePageSize: u32 = 512; + // Note: this is not really correct as Max Nominators is (MaxExposurePageSize * page_count) but + // this is an unbounded number. We just set it to a reasonably high value, 1 full page + // of nominators. + pub const MaxNominators: u32 = 512; pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); // 16 pub const MaxNominations: u32 = ::LIMIT as u32; @@ -764,7 +769,7 @@ impl pallet_staking::Config for Runtime { type AdminOrigin = EitherOf, StakingAdmin>; type SessionInterface = Self; type EraPayout = EraPayout; - type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; + type MaxExposurePageSize = MaxExposurePageSize; type OffendingValidatorsThreshold = OffendingValidatorsThreshold; type NextNewSession = Session; type ElectionProvider = ElectionProviderMultiPhase; @@ -787,8 +792,6 @@ impl pallet_fast_unstake::Config for Runtime { type ControlOrigin = EnsureRoot; type Staking = Staking; type MaxErasToCheckPerBlock = ConstU32<1>; - #[cfg(feature = "runtime-benchmarks")] - type MaxBackersPerValidator = MaxNominatorRewardedPerValidator; type WeightInfo = weights::pallet_fast_unstake::WeightInfo; } @@ -953,7 +956,7 @@ impl pallet_grandpa::Config for Runtime { type WeightInfo = (); type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; + type MaxNominators = MaxNominators; type MaxSetIdSessionEntries = MaxSetIdSessionEntries; type KeyOwnerProof = >::Proof; @@ -1705,6 +1708,7 @@ pub mod migrations { UpgradeSessionKeys, pallet_nomination_pools::migration::versioned::V5toV6, pallet_nomination_pools::migration::versioned::V6ToV7, + pallet_staking::migrations::v14::MigrateToV14, ); } @@ -1848,10 +1852,14 @@ sp_api::impl_runtime_apis! { } } - impl pallet_staking_runtime_api::StakingApi for Runtime { + impl pallet_staking_runtime_api::StakingApi for Runtime { fn nominations_quota(balance: Balance) -> u32 { Staking::api_nominations_quota(balance) } + + fn eras_stakers_page_count(era: sp_staking::EraIndex, account: AccountId) -> sp_staking::Page { + Staking::api_eras_stakers_page_count(era, account) + } } impl tx_pool_api::runtime_api::TaggedTransactionQueue for Runtime { @@ -2449,7 +2457,7 @@ mod test_fees { use pallet_staking::WeightInfo; let payout_weight = ::WeightInfo::payout_stakers_alive_staked( - MaxNominatorRewardedPerValidator::get(), + MaxNominators::get(), ) .ref_time() as f64; let block_weight = BlockWeights::get().max_block.ref_time() as f64; From 53f6f9e64c94e61ff858e17ca5d37cead93e4836 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 10 Jan 2024 12:06:27 +0100 Subject: [PATCH 007/316] [pallet-staking] adapt https://github.com/paritytech/polkadot-sdk/pull/2380 --- relay/kusama/src/weights/pallet_staking.rs | 16 ++++++++++++++++ relay/polkadot/src/weights/pallet_staking.rs | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/relay/kusama/src/weights/pallet_staking.rs b/relay/kusama/src/weights/pallet_staking.rs index a6be62de0a..356b94047c 100644 --- a/relay/kusama/src/weights/pallet_staking.rs +++ b/relay/kusama/src/weights/pallet_staking.rs @@ -317,6 +317,22 @@ impl pallet_staking::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Staking::Ledger` (r:1 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) + /// Storage: `Staking::Payee` (r:1 w:1) + /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + fn update_payee() -> Weight { + // Proof Size summary in bytes: + // Measured: `932` + // Estimated: `4556` + // Minimum execution time: 21_695_000 picoseconds. + Weight::from_parts(22_351_000, 0) + .saturating_add(Weight::from_parts(0, 4556)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } /// Storage: `Staking::Bonded` (r:1 w:1) /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Staking::Ledger` (r:1 w:2) diff --git a/relay/polkadot/src/weights/pallet_staking.rs b/relay/polkadot/src/weights/pallet_staking.rs index eea33b1a18..80359106f4 100644 --- a/relay/polkadot/src/weights/pallet_staking.rs +++ b/relay/polkadot/src/weights/pallet_staking.rs @@ -317,6 +317,22 @@ impl pallet_staking::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Staking::Ledger` (r:1 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) + /// Storage: `Staking::Payee` (r:1 w:1) + /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + fn update_payee() -> Weight { + // Proof Size summary in bytes: + // Measured: `932` + // Estimated: `4556` + // Minimum execution time: 21_695_000 picoseconds. + Weight::from_parts(22_351_000, 0) + .saturating_add(Weight::from_parts(0, 4556)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } /// Storage: `Staking::Bonded` (r:1 w:1) /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Staking::Ledger` (r:1 w:2) From 68f77f8f537461c8e45c0f1a535517f06a5afc96 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 9 Jan 2024 16:02:43 +0100 Subject: [PATCH 008/316] [runtime_api::ParachainHost] removed `Hash, BlockNumber` types --- relay/kusama/src/lib.rs | 2 +- relay/polkadot/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index f58075fe5e..2e097478a0 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1835,7 +1835,7 @@ sp_api::impl_runtime_apis! { } #[api_version(8)] - impl primitives::runtime_api::ParachainHost for Runtime { + impl primitives::runtime_api::ParachainHost for Runtime { fn validators() -> Vec { parachains_runtime_api_impl::validators::() } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 03703456e0..24ba0b65e7 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1878,7 +1878,7 @@ sp_api::impl_runtime_apis! { } } - impl primitives::runtime_api::ParachainHost for Runtime { + impl primitives::runtime_api::ParachainHost for Runtime { fn validators() -> Vec { parachains_runtime_api_impl::validators::() } From e23218f2a6b806c50d55936530b574062ca8dd16 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 10 Jan 2024 11:57:52 +0100 Subject: [PATCH 009/316] [pallet_nomination_pools] adapt https://github.com/paritytech/polkadot-sdk/pull/2474 (missing `set_commission_claim_permission`) --- relay/kusama/src/weights/pallet_nomination_pools.rs | 12 ++++++++++++ .../polkadot/src/weights/pallet_nomination_pools.rs | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/relay/kusama/src/weights/pallet_nomination_pools.rs b/relay/kusama/src/weights/pallet_nomination_pools.rs index e5a345b377..e67353f3bd 100644 --- a/relay/kusama/src/weights/pallet_nomination_pools.rs +++ b/relay/kusama/src/weights/pallet_nomination_pools.rs @@ -583,6 +583,18 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `NominationPools::BondedPools` (r:1 w:1) + /// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`) + fn set_commission_claim_permission() -> Weight { + // Proof Size summary in bytes: + // Measured: `498` + // Estimated: `3719` + // Minimum execution time: 14_965_000 picoseconds. + Weight::from_parts(15_548_000, 0) + .saturating_add(Weight::from_parts(0, 3719)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } /// Storage: `NominationPools::PoolMembers` (r:1 w:0) /// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`) /// Storage: `NominationPools::ClaimPermissions` (r:1 w:1) diff --git a/relay/polkadot/src/weights/pallet_nomination_pools.rs b/relay/polkadot/src/weights/pallet_nomination_pools.rs index 7dc54be883..5192762d7f 100644 --- a/relay/polkadot/src/weights/pallet_nomination_pools.rs +++ b/relay/polkadot/src/weights/pallet_nomination_pools.rs @@ -583,6 +583,18 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `NominationPools::BondedPools` (r:1 w:1) + /// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`) + fn set_commission_claim_permission() -> Weight { + // Proof Size summary in bytes: + // Measured: `498` + // Estimated: `3719` + // Minimum execution time: 14_965_000 picoseconds. + Weight::from_parts(15_548_000, 0) + .saturating_add(Weight::from_parts(0, 3719)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } /// Storage: `NominationPools::PoolMembers` (r:1 w:0) /// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`) /// Storage: `NominationPools::ClaimPermissions` (r:1 w:1) From 045decae44c22b77c4101b07bff7e14585f9dcac Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 10 Jan 2024 12:10:47 +0100 Subject: [PATCH 010/316] [pallet-vesting] adapt https://github.com/paritytech/polkadot-sdk/pull/1982 --- relay/kusama/src/weights/pallet_vesting.rs | 23 ++++++++++++++++++++ relay/polkadot/src/weights/pallet_vesting.rs | 23 ++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/relay/kusama/src/weights/pallet_vesting.rs b/relay/kusama/src/weights/pallet_vesting.rs index 98b46c786e..fc70b06965 100644 --- a/relay/kusama/src/weights/pallet_vesting.rs +++ b/relay/kusama/src/weights/pallet_vesting.rs @@ -196,6 +196,29 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[2, 28]`. + fn force_remove_vesting_schedule(l: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `555 + l * (25 ±0) + s * (36 ±0)` + // Estimated: `4764` + // Minimum execution time: 41_497_000 picoseconds. + Weight::from_parts(38_763_834, 4764) + // Standard Error: 2_030 + .saturating_add(Weight::from_parts(99_580, 0).saturating_mul(l.into())) + // Standard Error: 3_750 + .saturating_add(Weight::from_parts(132_188, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) diff --git a/relay/polkadot/src/weights/pallet_vesting.rs b/relay/polkadot/src/weights/pallet_vesting.rs index 41831b8f30..e45912940b 100644 --- a/relay/polkadot/src/weights/pallet_vesting.rs +++ b/relay/polkadot/src/weights/pallet_vesting.rs @@ -196,6 +196,29 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[2, 28]`. + fn force_remove_vesting_schedule(l: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `555 + l * (25 ±0) + s * (36 ±0)` + // Estimated: `4764` + // Minimum execution time: 41_497_000 picoseconds. + Weight::from_parts(38_763_834, 4764) + // Standard Error: 2_030 + .saturating_add(Weight::from_parts(99_580, 0).saturating_mul(l.into())) + // Standard Error: 3_750 + .saturating_add(Weight::from_parts(132_188, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) From 0e32f9f89001cd94b7fbaf0a955c28ff12c707f9 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 10 Jan 2024 12:26:41 +0100 Subject: [PATCH 011/316] [ParachainHost] adapt https://github.com/paritytech/polkadot-sdk/pull/2177 --- relay/kusama/src/lib.rs | 3 ++- .../weights/runtime_parachains_configuration.rs | 16 ++++++++++++++++ relay/polkadot/src/lib.rs | 1 + .../weights/runtime_parachains_configuration.rs | 16 ++++++++++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 2e097478a0..657a80ff5a 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1681,13 +1681,14 @@ pub type Migrations = migrations::Unreleased; /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { - use super::Runtime; + use super::{Runtime, parachains_configuration}; /// Unreleased migrations. Add new ones here: pub type Unreleased = ( pallet_nomination_pools::migration::versioned::V5toV6, pallet_nomination_pools::migration::versioned::V6ToV7, pallet_staking::migrations::v14::MigrateToV14, + parachains_configuration::migration::v10::MigrateToV10, ); } diff --git a/relay/kusama/src/weights/runtime_parachains_configuration.rs b/relay/kusama/src/weights/runtime_parachains_configuration.rs index fd409cd3c4..bd5c71c868 100644 --- a/relay/kusama/src/weights/runtime_parachains_configuration.rs +++ b/relay/kusama/src/weights/runtime_parachains_configuration.rs @@ -157,4 +157,20 @@ impl runtime_parachains::configuration::WeightInfo for .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Configuration::PendingConfigs` (r:1 w:1) + /// Proof: `Configuration::PendingConfigs` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Configuration::BypassConsistencyCheck` (r:1 w:0) + /// Proof: `Configuration::BypassConsistencyCheck` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0) + /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_node_feature() -> Weight { + // Proof Size summary in bytes: + // Measured: `151` + // Estimated: `1636` + // Minimum execution time: 10_158_000 picoseconds. + Weight::from_parts(10_430_000, 0) + .saturating_add(Weight::from_parts(0, 1636)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 24ba0b65e7..1aba06dc78 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1709,6 +1709,7 @@ pub mod migrations { pallet_nomination_pools::migration::versioned::V5toV6, pallet_nomination_pools::migration::versioned::V6ToV7, pallet_staking::migrations::v14::MigrateToV14, + parachains_configuration::migration::v10::MigrateToV10, ); } diff --git a/relay/polkadot/src/weights/runtime_parachains_configuration.rs b/relay/polkadot/src/weights/runtime_parachains_configuration.rs index c35f14898d..d9bbc5d897 100644 --- a/relay/polkadot/src/weights/runtime_parachains_configuration.rs +++ b/relay/polkadot/src/weights/runtime_parachains_configuration.rs @@ -157,4 +157,20 @@ impl runtime_parachains::configuration::WeightInfo for .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Configuration::PendingConfigs` (r:1 w:1) + /// Proof: `Configuration::PendingConfigs` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Configuration::BypassConsistencyCheck` (r:1 w:0) + /// Proof: `Configuration::BypassConsistencyCheck` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0) + /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_node_feature() -> Weight { + // Proof Size summary in bytes: + // Measured: `151` + // Estimated: `1636` + // Minimum execution time: 10_158_000 picoseconds. + Weight::from_parts(10_430_000, 0) + .saturating_add(Weight::from_parts(0, 1636)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } } From 3e19b99a6318b612218eeb3e8798ced95567996f Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 10 Jan 2024 13:44:49 +0100 Subject: [PATCH 012/316] [pallet_xcm] adapt https://github.com/paritytech/polkadot-sdk/pull/2086 (weights: `new_query` / `take_response`) --- relay/kusama/src/weights/pallet_xcm.rs | 26 +++++++++++++++++++ relay/polkadot/src/weights/pallet_xcm.rs | 26 +++++++++++++++++++ .../src/weights/pallet_xcm.rs | 26 +++++++++++++++++++ .../src/weights/pallet_xcm.rs | 26 +++++++++++++++++++ .../src/weights/pallet_xcm.rs | 26 +++++++++++++++++++ .../src/weights/pallet_xcm.rs | 26 +++++++++++++++++++ .../src/weights/pallet_xcm.rs | 26 +++++++++++++++++++ 7 files changed, 182 insertions(+) diff --git a/relay/kusama/src/weights/pallet_xcm.rs b/relay/kusama/src/weights/pallet_xcm.rs index fa98b4a911..9ba23c89b1 100644 --- a/relay/kusama/src/weights/pallet_xcm.rs +++ b/relay/kusama/src/weights/pallet_xcm.rs @@ -267,4 +267,30 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) } + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 2_947_000 picoseconds. + Weight::from_parts(3_117_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7576` + // Estimated: `11041` + // Minimum execution time: 24_595_000 picoseconds. + Weight::from_parts(24_907_000, 0) + .saturating_add(Weight::from_parts(0, 11041)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/relay/polkadot/src/weights/pallet_xcm.rs b/relay/polkadot/src/weights/pallet_xcm.rs index 6296c77af7..44ee22176c 100644 --- a/relay/polkadot/src/weights/pallet_xcm.rs +++ b/relay/polkadot/src/weights/pallet_xcm.rs @@ -269,4 +269,30 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) } + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 2_947_000 picoseconds. + Weight::from_parts(3_117_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7576` + // Estimated: `11041` + // Minimum execution time: 24_595_000 picoseconds. + Weight::from_parts(24_907_000, 0) + .saturating_add(Weight::from_parts(0, 11041)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs index 7d39d91318..268a81df63 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs @@ -294,4 +294,30 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(4)) } + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 2_947_000 picoseconds. + Weight::from_parts(3_117_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7576` + // Estimated: `11041` + // Minimum execution time: 24_595_000 picoseconds. + Weight::from_parts(24_907_000, 0) + .saturating_add(Weight::from_parts(0, 11041)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs index 1d0adf15d7..18e20d33a5 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs @@ -294,4 +294,30 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(4)) } + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 2_947_000 picoseconds. + Weight::from_parts(3_117_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7576` + // Estimated: `11041` + // Minimum execution time: 24_595_000 picoseconds. + Weight::from_parts(24_907_000, 0) + .saturating_add(Weight::from_parts(0, 11041)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs index e6f0e1b16c..a039b7ef19 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs @@ -293,4 +293,30 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(4)) } + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 2_947_000 picoseconds. + Weight::from_parts(3_117_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7576` + // Estimated: `11041` + // Minimum execution time: 24_595_000 picoseconds. + Weight::from_parts(24_907_000, 0) + .saturating_add(Weight::from_parts(0, 11041)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs index 1a19b58e03..033e89c0b1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs @@ -293,4 +293,30 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(4)) } + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 2_947_000 picoseconds. + Weight::from_parts(3_117_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7576` + // Estimated: `11041` + // Minimum execution time: 24_595_000 picoseconds. + Weight::from_parts(24_907_000, 0) + .saturating_add(Weight::from_parts(0, 11041)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs index 12083d380a..54825fb335 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs @@ -293,4 +293,30 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(4)) } + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 2_947_000 picoseconds. + Weight::from_parts(3_117_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7576` + // Estimated: `11041` + // Minimum execution time: 24_595_000 picoseconds. + Weight::from_parts(24_907_000, 0) + .saturating_add(Weight::from_parts(0, 11041)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } From a78ffe88921280ee79eaf9354313a6954241abd2 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 10 Jan 2024 14:45:13 +0100 Subject: [PATCH 013/316] [pallet_xcm] adapt https://github.com/paritytech/polkadot-sdk/pull/1672 (new `reserve_transfer_assets`) --- relay/kusama/src/lib.rs | 29 ++++++++++++++- relay/kusama/src/xcm_config.rs | 7 ---- relay/polkadot/src/lib.rs | 35 +++++++++++++++--- relay/polkadot/src/xcm_config.rs | 7 ---- .../asset-hubs/asset-hub-kusama/src/lib.rs | 36 ++++++++++++++++++- .../asset-hub-kusama/src/xcm_config.rs | 7 ---- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 36 ++++++++++++++++++- .../asset-hub-polkadot/src/xcm_config.rs | 7 ---- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 26 +++++++++++++- .../bridge-hub-kusama/src/xcm_config.rs | 7 ---- .../bridge-hub-polkadot/src/lib.rs | 26 +++++++++++++- .../bridge-hub-polkadot/src/xcm_config.rs | 7 ---- .../collectives-polkadot/src/lib.rs | 28 ++++++++++++++- .../collectives-polkadot/src/xcm_config.rs | 7 ---- 14 files changed, 206 insertions(+), 59 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 657a80ff5a..378ca3daa9 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1763,7 +1763,7 @@ mod benches { [pallet_whitelist, Whitelist] [pallet_asset_rate, AssetRate] // XCM - [pallet_xcm, XcmPallet] + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] [pallet_xcm_benchmarks::fungible, pallet_xcm_benchmarks::fungible::Pallet::] [pallet_xcm_benchmarks::generic, pallet_xcm_benchmarks::generic::Pallet::] ); @@ -2291,6 +2291,7 @@ sp_api::impl_runtime_apis! { use pallet_session_benchmarking::Pallet as SessionBench; use pallet_offences_benchmarking::Pallet as OffencesBench; use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; use frame_system_benchmarking::Pallet as SystemBench; use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench; use frame_benchmarking::baseline::Pallet as Baseline; @@ -2339,6 +2340,32 @@ sp_api::impl_runtime_apis! { impl pallet_nomination_pools_benchmarking::Config for Runtime {} impl runtime_parachains::disputes::slashing::benchmarking::Config for Runtime {} + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime { + fn reachable_dest() -> Option { + Some(crate::xcm_config::AssetHubLocation::get()) + } + + fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Relay/native token can be teleported to/from AH. + Some(( + MultiAsset { fun: Fungible(EXISTENTIAL_DEPOSIT), id: Concrete(Here.into()) }, + crate::xcm_config::AssetHubLocation::get(), + )) + } + + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Relay can reserve transfer native token to some random parachain. + Some(( + MultiAsset { + fun: Fungible(EXISTENTIAL_DEPOSIT), + id: Concrete(Here.into()) + }, + crate::Junction::Parachain(43211234).into(), + )) + } + } + parameter_types! { pub ExistentialDepositMultiAsset: Option = Some(( TokenLocation::get(), diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index 7a0239ffd6..59a2c583b2 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -374,11 +374,6 @@ parameter_types! { pub const FellowsBodyId: BodyId = BodyId::Technical; } -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parachain(1000).into()); -} - /// Type to convert an `Origin` type value into a `MultiLocation` value which represents an interior /// location of this chain. pub type LocalOriginToLocation = ( @@ -438,8 +433,6 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); type WeightInfo = crate::weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 1aba06dc78..ad1a115e6d 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1779,7 +1779,7 @@ mod benches { [pallet_whitelist, Whitelist] [pallet_asset_rate, AssetRate] // XCM - [pallet_xcm, XcmPallet] + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] [pallet_xcm_benchmarks::fungible, pallet_xcm_benchmarks::fungible::Pallet::] [pallet_xcm_benchmarks::generic, pallet_xcm_benchmarks::generic::Pallet::] ); @@ -2291,6 +2291,7 @@ sp_api::impl_runtime_apis! { use pallet_offences_benchmarking::Pallet as OffencesBench; use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench; use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; use frame_system_benchmarking::Pallet as SystemBench; use frame_benchmarking::baseline::Pallet as Baseline; @@ -2329,9 +2330,31 @@ sp_api::impl_runtime_apis! { impl pallet_nomination_pools_benchmarking::Config for Runtime {} impl runtime_parachains::disputes::slashing::benchmarking::Config for Runtime {} - let mut whitelist: Vec = AllPalletsWithSystem::whitelisted_storage_keys(); - let treasury_key = frame_system::Account::::hashed_key_for(Treasury::account_id()); - whitelist.push(treasury_key.to_vec().into()); + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime { + fn reachable_dest() -> Option { + Some(crate::xcm_config::AssetHubLocation::get()) + } + + fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Relay/native token can be teleported to/from AH. + Some(( + MultiAsset { fun: Fungible(EXISTENTIAL_DEPOSIT), id: Concrete(Here.into()) }, + crate::xcm_config::AssetHubLocation::get(), + )) + } + + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Relay can reserve transfer native token to some random parachain. + Some(( + MultiAsset { + fun: Fungible(EXISTENTIAL_DEPOSIT), + id: Concrete(Here.into()) + }, + crate::Junction::Parachain(43211234).into(), + )) + } + } parameter_types! { pub ExistentialDepositMultiAsset: Option = Some(( @@ -2433,6 +2456,10 @@ sp_api::impl_runtime_apis! { } } + let mut whitelist: Vec = AllPalletsWithSystem::whitelisted_storage_keys(); + let treasury_key = frame_system::Account::::hashed_key_for(Treasury::account_id()); + whitelist.push(treasury_key.to_vec().into()); + let mut batches = Vec::::new(); let params = (&config, &whitelist); diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index 4ac4bcdc56..c8abc86edc 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -382,11 +382,6 @@ parameter_types! { pub const TreasurerBodyId: BodyId = BodyId::Index(TREASURER_INDEX); } -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parachain(1000).into()); -} - /// Type to convert the `GeneralAdmin` origin to a Plurality `MultiLocation` value. pub type GeneralAdminToPlurality = OriginToPluralityVoice; @@ -454,7 +449,5 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); type WeightInfo = crate::weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 22ae002c53..6327062f2f 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -974,7 +974,7 @@ mod benches { [pallet_collator_selection, CollatorSelection] [cumulus_pallet_xcmp_queue, XcmpQueue] // XCM - [pallet_xcm, PolkadotXcm] + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] // Bridges [pallet_xcm_bridge_hub_router, ToPolkadot] // NOTE: Make sure you point to the individual modules below. @@ -1222,6 +1222,7 @@ impl_runtime_apis! { ) { use frame_benchmarking::{Benchmarking, BenchmarkList}; use frame_support::traits::StorageInfoTrait; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; use frame_system_benchmarking::Pallet as SystemBench; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; use pallet_xcm_bridge_hub_router::benchmarking::Pallet as XcmBridgeHubRouterBench; @@ -1274,6 +1275,39 @@ impl_runtime_apis! { use xcm_config::{KsmLocation, MaxAssetsIntoHolding}; use pallet_xcm_benchmarks::asset_instance_from; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime { + fn reachable_dest() -> Option { + Some(Parent.into()) + } + + fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Relay/native token can be teleported between AH and Relay. + Some(( + MultiAsset { + fun: Fungible(EXISTENTIAL_DEPOSIT), + id: Concrete(Parent.into()) + }, + Parent.into(), + )) + } + + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // AH can reserve transfer native token to some random parachain. + let random_para_id = 43211234; + ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests( + random_para_id.into() + ); + Some(( + MultiAsset { + fun: Fungible(EXISTENTIAL_DEPOSIT), + id: Concrete(Parent.into()) + }, + ParentThen(Parachain(random_para_id).into()).into(), + )) + } + } + parameter_types! { pub ExistentialDepositMultiAsset: Option = Some(( KsmLocation::get(), diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index e0f7f3d04d..9217ce70f9 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -629,11 +629,6 @@ pub type XcmRouter = WithUniqueTopic<( ToPolkadotXcmRouter, )>; -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; // We want to disallow users sending (arbitrary) XCMs from this chain. @@ -663,8 +658,6 @@ impl pallet_xcm::Config for Runtime { type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; type WeightInfo = crate::weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 4638d8e6b0..ade2351bcc 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -890,7 +890,7 @@ mod benches { [pallet_collator_selection, CollatorSelection] [cumulus_pallet_xcmp_queue, XcmpQueue] // XCM - [pallet_xcm, PolkadotXcm] + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] // Bridges [pallet_xcm_bridge_hub_router, ToKusama] // NOTE: Make sure you point to the individual modules below. @@ -1114,6 +1114,7 @@ impl_runtime_apis! { ) { use frame_benchmarking::{Benchmarking, BenchmarkList}; use frame_support::traits::StorageInfoTrait; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; use frame_system_benchmarking::Pallet as SystemBench; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; use pallet_xcm_bridge_hub_router::benchmarking::Pallet as XcmBridgeHubRouterBench; @@ -1165,6 +1166,39 @@ impl_runtime_apis! { use xcm_config::{DotLocation, MaxAssetsIntoHolding}; use pallet_xcm_benchmarks::asset_instance_from; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime { + fn reachable_dest() -> Option { + Some(Parent.into()) + } + + fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Relay/native token can be teleported between AH and Relay. + Some(( + MultiAsset { + fun: Fungible(EXISTENTIAL_DEPOSIT), + id: Concrete(Parent.into()) + }, + Parent.into(), + )) + } + + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // AH can reserve transfer native token to some random parachain. + let random_para_id = 43211234; + ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests( + random_para_id.into() + ); + Some(( + MultiAsset { + fun: Fungible(EXISTENTIAL_DEPOSIT), + id: Concrete(Parent.into()) + }, + ParentThen(Parachain(random_para_id).into()).into(), + )) + } + } + parameter_types! { pub ExistentialDepositMultiAsset: Option = Some(( DotLocation::get(), diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 904b56f6fc..9754c43b7b 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -551,11 +551,6 @@ pub type XcmRouter = WithUniqueTopic<( ToKusamaXcmRouter, )>; -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; // We want to disallow users sending (arbitrary) XCMs from this chain. @@ -585,8 +580,6 @@ impl pallet_xcm::Config for Runtime { type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; type WeightInfo = crate::weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index ce74c1bd35..b086bb66a2 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -490,7 +490,7 @@ mod benches { [pallet_collator_selection, CollatorSelection] [cumulus_pallet_xcmp_queue, XcmpQueue] // XCM - [pallet_xcm, PolkadotXcm] + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] // NOTE: Make sure you point to the individual modules below. [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] @@ -728,6 +728,7 @@ impl_runtime_apis! { ) { use frame_benchmarking::{Benchmarking, BenchmarkList}; use frame_support::traits::StorageInfoTrait; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; use frame_system_benchmarking::Pallet as SystemBench; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; @@ -773,6 +774,29 @@ impl_runtime_apis! { use xcm::latest::prelude::*; use xcm_config::KsmRelayLocation; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime { + fn reachable_dest() -> Option { + Some(Parent.into()) + } + + fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Relay/native token can be teleported between BH and Relay. + Some(( + MultiAsset { + fun: Fungible(EXISTENTIAL_DEPOSIT), + id: Concrete(Parent.into()) + }, + Parent.into(), + )) + } + + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Reserve transfers are disabled on BH. + None + } + } + parameter_types! { pub ExistentialDepositMultiAsset: Option = Some(( KsmRelayLocation::get(), diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 0fd4c61631..56735c63c2 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -299,11 +299,6 @@ pub type XcmRouter = WithUniqueTopic<( XcmpQueue, )>; -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; // We want to disallow users sending (arbitrary) XCMs from this chain. @@ -332,8 +327,6 @@ impl pallet_xcm::Config for Runtime { type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; type WeightInfo = crate::weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 08d5d2706e..8baab8f3b7 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -490,7 +490,7 @@ mod benches { [pallet_collator_selection, CollatorSelection] [cumulus_pallet_xcmp_queue, XcmpQueue] // XCM - [pallet_xcm, PolkadotXcm] + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] // NOTE: Make sure you point to the individual modules below. [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] @@ -728,6 +728,7 @@ impl_runtime_apis! { ) { use frame_benchmarking::{Benchmarking, BenchmarkList}; use frame_support::traits::StorageInfoTrait; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; use frame_system_benchmarking::Pallet as SystemBench; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; @@ -773,6 +774,29 @@ impl_runtime_apis! { use xcm::latest::prelude::*; use xcm_config::DotRelayLocation; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime { + fn reachable_dest() -> Option { + Some(Parent.into()) + } + + fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Relay/native token can be teleported between BH and Relay. + Some(( + MultiAsset { + fun: Fungible(EXISTENTIAL_DEPOSIT), + id: Concrete(Parent.into()) + }, + Parent.into(), + )) + } + + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Reserve transfers are disabled on BH. + None + } + } + parameter_types! { pub ExistentialDepositMultiAsset: Option = Some(( DotRelayLocation::get(), diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 59fec511f5..75703de185 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -306,11 +306,6 @@ pub type XcmRouter = WithUniqueTopic<( XcmpQueue, )>; -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; // We want to disallow users sending (arbitrary) XCMs from this chain. @@ -339,8 +334,6 @@ impl pallet_xcm::Config for Runtime { type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; type WeightInfo = crate::weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index b75545c4fd..1b5b9bd701 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -709,7 +709,7 @@ mod benches { [cumulus_pallet_xcmp_queue, XcmpQueue] [pallet_alliance, Alliance] [pallet_collective, AllianceMotion] - [pallet_xcm, PolkadotXcm] + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] [pallet_preimage, Preimage] [pallet_scheduler, Scheduler] [pallet_referenda, FellowshipReferenda] @@ -902,6 +902,7 @@ impl_runtime_apis! { ) { use frame_benchmarking::{Benchmarking, BenchmarkList}; use frame_support::traits::StorageInfoTrait; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; use frame_system_benchmarking::Pallet as SystemBench; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; @@ -933,6 +934,31 @@ impl_runtime_apis! { use cumulus_pallet_session_benchmarking::Pallet as SessionBench; impl cumulus_pallet_session_benchmarking::Config for Runtime {} + use xcm::latest::prelude::*; + + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime { + fn reachable_dest() -> Option { + Some(Parent.into()) + } + + fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Relay/native token can be teleported between Collectives and Relay. + Some(( + MultiAsset { + fun: Fungible(EXISTENTIAL_DEPOSIT), + id: Concrete(Parent.into()) + }.into(), + Parent.into(), + )) + } + + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Reserve transfers are disabled on Collectives. + None + } + } + let whitelist: Vec = vec![ // Block Number hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 2ad50d1356..693271e097 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -325,11 +325,6 @@ pub type XcmRouter = WithUniqueTopic<( XcmpQueue, )>; -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - /// Type to convert the Fellows origin to a Plurality `MultiLocation` value. pub type FellowsToPlurality = OriginToPluralityVoice; @@ -357,8 +352,6 @@ impl pallet_xcm::Config for Runtime { type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; type WeightInfo = crate::weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); From 3449ef8ca974c9b584b8a9513a8fb2c4fe714eb8 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 10 Jan 2024 15:09:46 +0100 Subject: [PATCH 014/316] [pallet_xcm] adapt https://github.com/paritytech/polkadot-sdk/pull/2388 (new `transfer_assets`) --- relay/kusama/src/lib.rs | 14 ++++++ relay/kusama/src/weights/pallet_xcm.rs | 26 ++++++++++ relay/polkadot/src/lib.rs | 14 ++++++ relay/polkadot/src/weights/pallet_xcm.rs | 26 ++++++++++ .../asset-hubs/asset-hub-kusama/src/lib.rs | 49 +++++++++++++++++++ .../src/weights/pallet_xcm.rs | 30 ++++++++++++ .../asset-hubs/asset-hub-polkadot/src/lib.rs | 49 +++++++++++++++++++ .../src/weights/pallet_xcm.rs | 30 ++++++++++++ .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 12 +++++ .../src/weights/pallet_xcm.rs | 26 ++++++++++ .../bridge-hub-polkadot/src/lib.rs | 12 +++++ .../src/weights/pallet_xcm.rs | 26 ++++++++++ .../collectives-polkadot/src/lib.rs | 12 +++++ .../src/weights/pallet_xcm.rs | 26 ++++++++++ 14 files changed, 352 insertions(+) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 378ca3daa9..7c0163278d 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -2364,6 +2364,20 @@ sp_api::impl_runtime_apis! { crate::Junction::Parachain(43211234).into(), )) } + + fn set_up_complex_asset_transfer( + ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + // Relay supports only native token, either reserve transfer it to non-system parachains, + // or teleport it to system parachain. Use the teleport case for benchmarking as it's + // slightly heavier. + // Relay/native token can be teleported to/from AH. + let native_location = Here.into(); + let dest = crate::xcm_config::AssetHubLocation::get(); + pallet_xcm::benchmarking::helpers::native_teleport_as_asset_transfer::( + native_location, + dest + ) + } } parameter_types! { diff --git a/relay/kusama/src/weights/pallet_xcm.rs b/relay/kusama/src/weights/pallet_xcm.rs index 9ba23c89b1..027570ad3e 100644 --- a/relay/kusama/src/weights/pallet_xcm.rs +++ b/relay/kusama/src/weights/pallet_xcm.rs @@ -85,6 +85,32 @@ impl pallet_xcm::WeightInfo for WeightInfo { Weight::from_parts(17_284_000, 0) .saturating_add(Weight::from_parts(0, 0)) } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3593` + // Minimum execution time: 91_890_000 picoseconds. + Weight::from_parts(93_460_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(3)) + } fn execute() -> Weight { // Proof Size summary in bytes: // Measured: `0` diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index ad1a115e6d..523c8b20df 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -2354,6 +2354,20 @@ sp_api::impl_runtime_apis! { crate::Junction::Parachain(43211234).into(), )) } + + fn set_up_complex_asset_transfer( + ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + // Relay supports only native token, either reserve transfer it to non-system parachains, + // or teleport it to system parachain. Use the teleport case for benchmarking as it's + // slightly heavier. + // Relay/native token can be teleported to/from AH. + let native_location = Here.into(); + let dest = crate::xcm_config::AssetHubLocation::get(); + pallet_xcm::benchmarking::helpers::native_teleport_as_asset_transfer::( + native_location, + dest + ) + } } parameter_types! { diff --git a/relay/polkadot/src/weights/pallet_xcm.rs b/relay/polkadot/src/weights/pallet_xcm.rs index 44ee22176c..3e82626c00 100644 --- a/relay/polkadot/src/weights/pallet_xcm.rs +++ b/relay/polkadot/src/weights/pallet_xcm.rs @@ -85,6 +85,32 @@ impl pallet_xcm::WeightInfo for WeightInfo { Weight::from_parts(17_260_000, 0) .saturating_add(Weight::from_parts(0, 0)) } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3593` + // Minimum execution time: 91_890_000 picoseconds. + Weight::from_parts(93_460_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(3)) + } /// Storage: `Benchmark::Override` (r:0 w:0) /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute() -> Weight { diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 6327062f2f..762a0c8be0 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -1306,6 +1306,55 @@ impl_runtime_apis! { ParentThen(Parachain(random_para_id).into()).into(), )) } + + fn set_up_complex_asset_transfer( + ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + // Transfer to Relay some local AH asset (local-reserve-transfer) while paying + // fees using teleported native token. + // (We don't care that Relay doesn't accept incoming unknown AH local asset) + let dest = Parent.into(); + + let fee_amount = EXISTENTIAL_DEPOSIT; + let fee_asset: MultiAsset = (MultiLocation::parent(), fee_amount).into(); + + let who = frame_benchmarking::whitelisted_caller(); + // Give some multiple of the existential deposit + let balance = fee_amount + EXISTENTIAL_DEPOSIT * 1000; + let _ = >::make_free_balance_be( + &who, balance, + ); + // verify initial balance + assert_eq!(Balances::free_balance(&who), balance); + + // set up local asset + let asset_amount = 10u128; + let initial_asset_amount = asset_amount * 10; + let (asset_id, _, _) = pallet_assets::benchmarking::create_default_minted_asset::< + Runtime, + pallet_assets::Instance1 + >(true, initial_asset_amount); + let asset_location = MultiLocation::new( + 0, + X2(PalletInstance(50), GeneralIndex(u32::from(asset_id).into())) + ); + let transfer_asset: MultiAsset = (asset_location, asset_amount).into(); + + let assets: MultiAssets = vec![fee_asset.clone(), transfer_asset].into(); + let fee_index = if assets.get(0).unwrap().eq(&fee_asset) { 0 } else { 1 }; + + // verify transferred successfully + let verify = Box::new(move || { + // verify native balance after transfer, decreased by transferred fee amount + // (plus transport fees) + assert!(Balances::free_balance(&who) <= balance - fee_amount); + // verify asset balance decreased by exactly transferred amount + assert_eq!( + Assets::balance(asset_id.into(), &who), + initial_asset_amount - asset_amount, + ); + }); + Some((assets, fee_index as u32, dest, verify)) + } } parameter_types! { diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs index 268a81df63..8832066a4c 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs @@ -91,6 +91,36 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `496` + // Estimated: `6208` + // Minimum execution time: 146_932_000 picoseconds. + Weight::from_parts(153_200_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(7)) + } /// Storage: `Benchmark::Override` (r:0 w:0) /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute() -> Weight { diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index ade2351bcc..7e713b68f1 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -1197,6 +1197,55 @@ impl_runtime_apis! { ParentThen(Parachain(random_para_id).into()).into(), )) } + + fn set_up_complex_asset_transfer( + ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + // Transfer to Relay some local AH asset (local-reserve-transfer) while paying + // fees using teleported native token. + // (We don't care that Relay doesn't accept incoming unknown AH local asset) + let dest = Parent.into(); + + let fee_amount = EXISTENTIAL_DEPOSIT; + let fee_asset: MultiAsset = (MultiLocation::parent(), fee_amount).into(); + + let who = frame_benchmarking::whitelisted_caller(); + // Give some multiple of the existential deposit + let balance = fee_amount + EXISTENTIAL_DEPOSIT * 1000; + let _ = >::make_free_balance_be( + &who, balance, + ); + // verify initial balance + assert_eq!(Balances::free_balance(&who), balance); + + // set up local asset + let asset_amount = 10u128; + let initial_asset_amount = asset_amount * 10; + let (asset_id, _, _) = pallet_assets::benchmarking::create_default_minted_asset::< + Runtime, + pallet_assets::Instance1 + >(true, initial_asset_amount); + let asset_location = MultiLocation::new( + 0, + X2(PalletInstance(50), GeneralIndex(u32::from(asset_id).into())) + ); + let transfer_asset: MultiAsset = (asset_location, asset_amount).into(); + + let assets: MultiAssets = vec![fee_asset.clone(), transfer_asset].into(); + let fee_index = if assets.get(0).unwrap().eq(&fee_asset) { 0 } else { 1 }; + + // verify transferred successfully + let verify = Box::new(move || { + // verify native balance after transfer, decreased by transferred fee amount + // (plus transport fees) + assert!(Balances::free_balance(&who) <= balance - fee_amount); + // verify asset balance decreased by exactly transferred amount + assert_eq!( + Assets::balance(asset_id.into(), &who), + initial_asset_amount - asset_amount, + ); + }); + Some((assets, fee_index as u32, dest, verify)) + } } parameter_types! { diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs index 18e20d33a5..8cbf8e7f4f 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs @@ -91,6 +91,36 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `496` + // Estimated: `6208` + // Minimum execution time: 146_932_000 picoseconds. + Weight::from_parts(153_200_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(7)) + } /// Storage: `Benchmark::Override` (r:0 w:0) /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute() -> Weight { diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index b086bb66a2..4944f2ef02 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -795,6 +795,18 @@ impl_runtime_apis! { // Reserve transfers are disabled on BH. None } + + fn set_up_complex_asset_transfer( + ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + // BH only supports teleports to system parachain. + // Relay/native token can be teleported between BH and Relay. + let native_location = Parent.into(); + let dest = Parent.into(); + pallet_xcm::benchmarking::helpers::native_teleport_as_asset_transfer::( + native_location, + dest + ) + } } parameter_types! { diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs index a039b7ef19..82bed2b1fb 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs @@ -90,6 +90,32 @@ impl pallet_xcm::WeightInfo for WeightInfo { Weight::from_parts(18_446_744_073_709_551_000, 0) .saturating_add(Weight::from_parts(0, 0)) } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3593` + // Minimum execution time: 91_890_000 picoseconds. + Weight::from_parts(93_460_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(3)) + } /// Storage: `Benchmark::Override` (r:0 w:0) /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute() -> Weight { diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 8baab8f3b7..b8807b8e32 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -795,6 +795,18 @@ impl_runtime_apis! { // Reserve transfers are disabled on BH. None } + + fn set_up_complex_asset_transfer( + ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + // BH only supports teleports to system parachain. + // Relay/native token can be teleported between BH and Relay. + let native_location = Parent.into(); + let dest = Parent.into(); + pallet_xcm::benchmarking::helpers::native_teleport_as_asset_transfer::( + native_location, + dest + ) + } } parameter_types! { diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs index 033e89c0b1..abdccc9ca0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs @@ -90,6 +90,32 @@ impl pallet_xcm::WeightInfo for WeightInfo { Weight::from_parts(18_446_744_073_709_551_000, 0) .saturating_add(Weight::from_parts(0, 0)) } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3593` + // Minimum execution time: 91_890_000 picoseconds. + Weight::from_parts(93_460_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(3)) + } /// Storage: `Benchmark::Override` (r:0 w:0) /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute() -> Weight { diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 1b5b9bd701..2bb101224d 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -957,6 +957,18 @@ impl_runtime_apis! { // Reserve transfers are disabled on Collectives. None } + + fn set_up_complex_asset_transfer( + ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + // Collectives only supports teleports to system parachain. + // Relay/native token can be teleported between Collectives and Relay. + let native_location = Parent.into(); + let dest = Parent.into(); + pallet_xcm::benchmarking::helpers::native_teleport_as_asset_transfer::( + native_location, + dest + ) + } } let whitelist: Vec = vec![ diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs index 54825fb335..96a89b0292 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs @@ -90,6 +90,32 @@ impl pallet_xcm::WeightInfo for WeightInfo { Weight::from_parts(18_446_744_073_709_551_000, 0) .saturating_add(Weight::from_parts(0, 0)) } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `214` + // Estimated: `3679` + // Minimum execution time: 87_915_000 picoseconds. + Weight::from_parts(90_219_000, 0) + .saturating_add(Weight::from_parts(0, 3679)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(3)) + } /// Storage: `Benchmark::Override` (r:0 w:0) /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute() -> Weight { From 739170a72012235dadfdf6a04e7a8db6668d89fc Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 10 Jan 2024 15:25:15 +0100 Subject: [PATCH 015/316] [pallet_collator_selection] adapt https://github.com/paritytech/polkadot-sdk/pull/1340 --- .../src/weights/pallet_collator_selection.rs | 26 ++++++++++++++++++- .../src/weights/pallet_collator_selection.rs | 26 ++++++++++++++++++- .../src/weights/pallet_collator_selection.rs | 26 ++++++++++++++++++- .../src/weights/pallet_collator_selection.rs | 26 ++++++++++++++++++- .../src/weights/pallet_collator_selection.rs | 26 ++++++++++++++++++- 5 files changed, 125 insertions(+), 5 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_collator_selection.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_collator_selection.rs index cc84617335..b39704b77b 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_collator_selection.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_collator_selection.rs @@ -121,7 +121,7 @@ impl pallet_collator_selection::WeightInfo for WeightIn } /// Storage: `CollatorSelection::CandidacyBond` (r:0 w:1) /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - fn set_candidacy_bond() -> Weight { + fn set_candidacy_bond(_c: u32, _k: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -175,6 +175,30 @@ impl pallet_collator_selection::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } + fn update_bond(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + fn take_candidate_slot(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `System::BlockWeight` (r:1 w:1) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_collator_selection.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_collator_selection.rs index 05c0b6d805..b24f90bda4 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_collator_selection.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_collator_selection.rs @@ -121,7 +121,7 @@ impl pallet_collator_selection::WeightInfo for WeightIn } /// Storage: `CollatorSelection::CandidacyBond` (r:0 w:1) /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - fn set_candidacy_bond() -> Weight { + fn set_candidacy_bond(_c: u32, _k: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -175,6 +175,30 @@ impl pallet_collator_selection::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } + fn update_bond(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + fn take_candidate_slot(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `System::BlockWeight` (r:1 w:1) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_collator_selection.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_collator_selection.rs index 1bb957240c..f7883aa3b8 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_collator_selection.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_collator_selection.rs @@ -121,7 +121,7 @@ impl pallet_collator_selection::WeightInfo for WeightIn } /// Storage: `CollatorSelection::CandidacyBond` (r:0 w:1) /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - fn set_candidacy_bond() -> Weight { + fn set_candidacy_bond(_c: u32, _k: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -175,6 +175,30 @@ impl pallet_collator_selection::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } + fn update_bond(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + fn take_candidate_slot(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `System::BlockWeight` (r:1 w:1) diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_collator_selection.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_collator_selection.rs index 0df4684175..70eadb7b79 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_collator_selection.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_collator_selection.rs @@ -121,7 +121,7 @@ impl pallet_collator_selection::WeightInfo for WeightIn } /// Storage: `CollatorSelection::CandidacyBond` (r:0 w:1) /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - fn set_candidacy_bond() -> Weight { + fn set_candidacy_bond(_c: u32, _k: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -175,6 +175,30 @@ impl pallet_collator_selection::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } + fn update_bond(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + fn take_candidate_slot(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `System::BlockWeight` (r:1 w:1) diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs index 195b664455..03d43423f1 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs @@ -121,7 +121,7 @@ impl pallet_collator_selection::WeightInfo for WeightIn } /// Storage: `CollatorSelection::CandidacyBond` (r:0 w:1) /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - fn set_candidacy_bond() -> Weight { + fn set_candidacy_bond(_c: u32, _k: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -175,6 +175,30 @@ impl pallet_collator_selection::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } + fn update_bond(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + fn take_candidate_slot(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `System::BlockWeight` (r:1 w:1) From a7a1cfc869d5a0e2db2c4ddc3f4e58eb6a8a5a38 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 11 Jan 2024 12:25:31 +0100 Subject: [PATCH 016/316] [dmp,xcmp,message_queue] adapt https://github.com/paritytech/polkadot-sdk/pull/1246 --- Cargo.lock | 6 + .../asset-hubs/asset-hub-kusama/Cargo.toml | 5 + .../asset-hubs/asset-hub-kusama/src/lib.rs | 54 +++++- .../src/weights/cumulus_pallet_dmp_queue.rs | 131 +++++++++++++ .../cumulus_pallet_parachain_system.rs | 80 ++++++++ .../src/weights/cumulus_pallet_xcmp_queue.rs | 84 +++++++- .../asset-hub-kusama/src/weights/mod.rs | 3 + .../src/weights/pallet_message_queue.rs | 179 ++++++++++++++++++ .../asset-hubs/asset-hub-polkadot/Cargo.toml | 5 + .../asset-hubs/asset-hub-polkadot/src/lib.rs | 54 +++++- .../src/weights/cumulus_pallet_dmp_queue.rs | 131 +++++++++++++ .../cumulus_pallet_parachain_system.rs | 80 ++++++++ .../src/weights/cumulus_pallet_xcmp_queue.rs | 84 +++++++- .../asset-hub-polkadot/src/weights/mod.rs | 3 + .../src/weights/pallet_message_queue.rs | 179 ++++++++++++++++++ .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 5 + .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 52 ++++- .../src/weights/cumulus_pallet_dmp_queue.rs | 131 +++++++++++++ .../cumulus_pallet_parachain_system.rs | 80 ++++++++ .../src/weights/cumulus_pallet_xcmp_queue.rs | 84 +++++++- .../bridge-hub-kusama/src/weights/mod.rs | 3 + .../src/weights/pallet_message_queue.rs | 179 ++++++++++++++++++ .../bridge-hub-polkadot/Cargo.toml | 5 + .../bridge-hub-polkadot/src/lib.rs | 52 ++++- .../src/weights/cumulus_pallet_dmp_queue.rs | 131 +++++++++++++ .../cumulus_pallet_parachain_system.rs | 80 ++++++++ .../src/weights/cumulus_pallet_xcmp_queue.rs | 84 +++++++- .../bridge-hub-polkadot/src/weights/mod.rs | 3 + .../src/weights/pallet_message_queue.rs | 179 ++++++++++++++++++ .../collectives-polkadot/Cargo.toml | 5 + .../collectives-polkadot/src/lib.rs | 52 ++++- .../src/weights/cumulus_pallet_dmp_queue.rs | 131 +++++++++++++ .../cumulus_pallet_parachain_system.rs | 80 ++++++++ .../src/weights/cumulus_pallet_xcmp_queue.rs | 90 ++++++++- .../collectives-polkadot/src/weights/mod.rs | 3 + .../src/weights/pallet_message_queue.rs | 179 ++++++++++++++++++ .../gluttons/glutton-kusama/Cargo.toml | 4 + .../gluttons/glutton-kusama/src/lib.rs | 34 +++- .../cumulus_pallet_parachain_system.rs | 80 ++++++++ .../glutton-kusama/src/weights/mod.rs | 2 + .../src/weights/pallet_message_queue.rs | 179 ++++++++++++++++++ 41 files changed, 2914 insertions(+), 71 deletions(-) create mode 100644 system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_dmp_queue.rs create mode 100644 system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_parachain_system.rs create mode 100644 system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_message_queue.rs create mode 100644 system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_dmp_queue.rs create mode 100644 system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_parachain_system.rs create mode 100644 system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_message_queue.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_dmp_queue.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_parachain_system.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_message_queue.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_dmp_queue.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_parachain_system.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_message_queue.rs create mode 100644 system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_dmp_queue.rs create mode 100644 system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_parachain_system.rs create mode 100644 system-parachains/collectives/collectives-polkadot/src/weights/pallet_message_queue.rs create mode 100644 system-parachains/gluttons/glutton-kusama/src/weights/cumulus_pallet_parachain_system.rs create mode 100644 system-parachains/gluttons/glutton-kusama/src/weights/pallet_message_queue.rs diff --git a/Cargo.lock b/Cargo.lock index e32f6a0447..70e5fb2bae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -473,6 +473,7 @@ dependencies = [ "pallet-authorship 27.0.0", "pallet-balances 27.0.0", "pallet-collator-selection 8.0.0", + "pallet-message-queue 30.0.0", "pallet-multisig", "pallet-nft-fractionalization", "pallet-nfts", @@ -576,6 +577,7 @@ dependencies = [ "pallet-authorship 27.0.0", "pallet-balances 27.0.0", "pallet-collator-selection 8.0.0", + "pallet-message-queue 30.0.0", "pallet-multisig", "pallet-nfts", "pallet-nfts-runtime-api", @@ -1333,6 +1335,7 @@ dependencies = [ "pallet-bridge-parachains", "pallet-bridge-relayers", "pallet-collator-selection 8.0.0", + "pallet-message-queue 30.0.0", "pallet-multisig", "pallet-session 27.0.0", "pallet-timestamp 26.0.0", @@ -1416,6 +1419,7 @@ dependencies = [ "pallet-bridge-parachains", "pallet-bridge-relayers", "pallet-collator-selection 8.0.0", + "pallet-message-queue 30.0.0", "pallet-multisig", "pallet-session 27.0.0", "pallet-timestamp 26.0.0", @@ -1931,6 +1935,7 @@ dependencies = [ "pallet-collator-selection 8.0.0", "pallet-collective 27.0.0", "pallet-core-fellowship", + "pallet-message-queue 30.0.0", "pallet-multisig", "pallet-preimage", "pallet-proxy 27.0.0", @@ -4446,6 +4451,7 @@ dependencies = [ "frame-system-rpc-runtime-api 25.0.0", "frame-try-runtime 0.33.0", "pallet-glutton", + "pallet-message-queue 30.0.0", "pallet-sudo", "parachains-common 6.0.0", "parity-scale-codec", diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index de5c3ea742..0c06f9e777 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -37,6 +37,7 @@ pallet-asset-conversion = { default-features = false, version = "9.0.0" } pallet-aura = { default-features = false, version = "26.0.0" } pallet-authorship = { default-features = false, version = "27.0.0" } pallet-balances = { default-features = false, version = "27.0.0" } +pallet-message-queue = { default-features = false , version = "30.0.0" } pallet-multisig = { default-features = false, version = "27.0.0" } pallet-nft-fractionalization = { default-features = false, version = "9.0.0" } pallet-nfts = { default-features = false, version = "21.0.0" } @@ -114,6 +115,7 @@ default = [ "std" ] state-trie-version-1 = [ "pallet-state-trie-migration" ] runtime-benchmarks = [ "assets-common/runtime-benchmarks", + "cumulus-pallet-dmp-queue/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", @@ -126,6 +128,7 @@ runtime-benchmarks = [ "pallet-assets/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-collator-selection/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-nft-fractionalization/runtime-benchmarks", "pallet-nfts/runtime-benchmarks", @@ -160,6 +163,7 @@ try-runtime = [ "pallet-authorship/try-runtime", "pallet-balances/try-runtime", "pallet-collator-selection/try-runtime", + "pallet-message-queue/try-runtime", "pallet-multisig/try-runtime", "pallet-nft-fractionalization/try-runtime", "pallet-nfts/try-runtime", @@ -207,6 +211,7 @@ std = [ "pallet-authorship/std", "pallet-balances/std", "pallet-collator-selection/std", + "pallet-message-queue/std", "pallet-multisig/std", "pallet-nft-fractionalization/std", "pallet-nfts-runtime-api/std", diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 762a0c8be0..3849c22e3e 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -34,13 +34,14 @@ use assets_common::{ AssetIdForTrustBackedAssetsConvert, MultiLocationForAssetId, }; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, Verify}, transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, Permill, + ApplyExtrinsicResult, Perbill, Permill, }; use sp_std::prelude::*; @@ -56,7 +57,7 @@ use frame_support::{ ord_parameter_types, parameter_types, traits::{ AsEnsureOriginWithArg, ConstBool, ConstU128, ConstU32, ConstU64, ConstU8, EitherOfDiverse, - Equals, InstanceFilter, + Equals, InstanceFilter, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, BoundedVec, PalletId, @@ -69,7 +70,7 @@ use pallet_asset_conversion_tx_payment::AssetConversionAdapter; use pallet_nfts::PalletFeatures; use parachains_common::{ impls::DealWithFees, AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, BlockNumber, - Hash, Header, Nonce, Signature, + Hash, Header, Nonce, Signature, message_queue::*, }; use sp_runtime::RuntimeDebug; use system_parachains_constants::{ @@ -80,7 +81,7 @@ use system_parachains_constants::{ use xcm::opaque::v3::MultiLocation; use xcm_config::{ FellowshipLocation, ForeignAssetsConvertedConcreteId, GovernanceLocation, KsmLocation, - PoolAssetsConvertedConcreteId, TrustBackedAssetsConvertedConcreteId, XcmConfig, + PoolAssetsConvertedConcreteId, TrustBackedAssetsConvertedConcreteId, }; #[cfg(any(feature = "std", test))] @@ -90,7 +91,6 @@ pub use sp_runtime::BuildStorage; use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use xcm::prelude::*; -use xcm_executor::XcmExecutor; use crate::xcm_config::{ ForeignCreatorsSovereignAccountOf, LocalAndForeignAssetsMultiLocationMatcher, @@ -606,13 +606,14 @@ impl pallet_proxy::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 = parachain_info::Pallet; - type DmpMessageHandler = DmpQueue; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type ReservedDmpWeight = ReservedDmpWeight; type OutboundXcmpMessageSource = XcmpQueue; type XcmpMessageHandler = XcmpQueue; @@ -624,10 +625,37 @@ impl cumulus_pallet_parachain_system::Config for Runtime { BLOCK_PROCESSING_VELOCITY, UNINCLUDED_SEGMENT_CAPACITY, >; + type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; } impl parachain_info::Config for Runtime {} +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_message_queue::WeightInfo; + #[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< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >; + type Size = u32; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; +} + impl cumulus_pallet_aura_ext::Config for Runtime {} parameter_types! { @@ -655,10 +683,11 @@ pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::Exponenti impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRoot; + // Enqueue XCMP messages from siblings for later processing. + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = EitherOfDiverse< EnsureRoot, EnsureXcm>, @@ -669,9 +698,9 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { } impl cumulus_pallet_dmp_queue::Config for Runtime { + type WeightInfo = weights::cumulus_pallet_dmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRoot; + type DmpSink = frame_support::traits::EnqueueWithOrigin; } parameter_types! { @@ -896,8 +925,10 @@ construct_runtime!( XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, + // Temporary to migrate the remaining DMP messages: DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 33, ToPolkadotXcmRouter: pallet_xcm_bridge_hub_router::::{Pallet, Storage, Call} = 34, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 35, // Handy utilities. Utility: pallet_utility::{Pallet, Call, Event} = 40, @@ -963,6 +994,7 @@ mod benches { [pallet_assets, Pool] [pallet_asset_conversion, AssetConversion] [pallet_balances, Balances] + [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] [pallet_nft_fractionalization, NftFractionalization] [pallet_nfts, Nfts] @@ -972,7 +1004,9 @@ mod benches { [pallet_utility, Utility] [pallet_timestamp, Timestamp] [pallet_collator_selection, CollatorSelection] + [cumulus_pallet_parachain_system, ParachainSystem] [cumulus_pallet_xcmp_queue, XcmpQueue] + [cumulus_pallet_dmp_queue, DmpQueue] // XCM [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] // Bridges diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_dmp_queue.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_dmp_queue.rs new file mode 100644 index 0000000000..cc41dcd6cb --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_dmp_queue.rs @@ -0,0 +1,131 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +//! Autogenerated weights for `cumulus_pallet_dmp_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-kusama-dev")`, DB CACHE: 1024 + +// Executed Command: +// target/production/polkadot-parachain +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json +// --pallet=cumulus_pallet_dmp_queue +// --chain=asset-hub-kusama-dev +// --header=./cumulus/file_header.txt +// --output=./cumulus/parachains/runtimes/assets/asset-hub-kusama/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_dmp_queue`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_dmp_queue::WeightInfo for WeightInfo { + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (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: `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 { + // Proof Size summary in bytes: + // Measured: `65696` + // Estimated: `69161` + // Minimum execution time: 124_651_000 picoseconds. + Weight::from_parts(127_857_000, 0) + .saturating_add(Weight::from_parts(0, 69161)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65659` + // Estimated: `69124` + // Minimum execution time: 65_684_000 picoseconds. + Weight::from_parts(68_039_000, 0) + .saturating_add(Weight::from_parts(0, 69124)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (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: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn on_idle_overweight_good_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65726` + // Estimated: `69191` + // Minimum execution time: 117_657_000 picoseconds. + Weight::from_parts(122_035_000, 0) + .saturating_add(Weight::from_parts(0, 69191)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + fn on_idle_overweight_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65689` + // Estimated: `69154` + // Minimum execution time: 59_799_000 picoseconds. + Weight::from_parts(61_354_000, 0) + .saturating_add(Weight::from_parts(0, 69154)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_parachain_system.rs new file mode 100644 index 0000000000..c1e5c6a742 --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_parachain_system.rs @@ -0,0 +1,80 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `cumulus_pallet_parachain_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// cumulus_pallet_parachain_system +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights +// --steps +// 50 +// --repeat +// 20 + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_parachain_system`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_parachain_system::WeightInfo for WeightInfo { + /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1) + /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0) + /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (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: ParachainSystem ProcessedDownwardMessages (r:0 w:1) + /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: MessageQueue Pages (r:0 w:16) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `12` + // Estimated: `8013` + // Minimum execution time: 1_622_000 picoseconds. + Weight::from_parts(1_709_000, 0) + .saturating_add(Weight::from_parts(0, 8013)) + // Standard Error: 22_138 + .saturating_add(Weight::from_parts(23_923_169, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs index 1b6672d584..d669fa0489 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs @@ -59,16 +59,92 @@ 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) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_config_with_weight() -> Weight { + /// 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 { + // Proof Size summary in bytes: + // Measured: `118` + // Estimated: `3517` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_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 { // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 4_918_000 picoseconds. - Weight::from_parts(5_123_000, 0) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .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 { + // Proof Size summary in bytes: + // Measured: `111` + // Estimated: `1596` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(0, 1596)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn take_first_concatenated_xcm() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 44_000_000 picoseconds. + Weight::from_parts(45_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: `XcmpQueue::InboundXcmpMessages` (r:1 w:1) + /// Proof: `XcmpQueue::InboundXcmpMessages` (`max_values`: None, `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::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 { + // Proof Size summary in bytes: + // Measured: `65747` + // Estimated: `69212` + // Minimum execution time: 62_000_000 picoseconds. + Weight::from_parts(66_000_000, 0) + .saturating_add(Weight::from_parts(0, 69212)) + .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) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65710` + // Estimated: `69175` + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(43_000_000, 0) + .saturating_add(Weight::from_parts(0, 69175)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs index 0295549956..de9efc9df7 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs @@ -15,6 +15,8 @@ // along with Cumulus. If not, see . pub mod block_weights; +pub mod cumulus_pallet_dmp_queue; +pub mod cumulus_pallet_parachain_system; pub mod cumulus_pallet_xcmp_queue; pub mod extrinsic_weights; pub mod frame_system; @@ -24,6 +26,7 @@ pub mod pallet_assets_local; pub mod pallet_assets_pool; pub mod pallet_balances; pub mod pallet_collator_selection; +pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_nft_fractionalization; pub mod pallet_nfts; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_message_queue.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_message_queue.rs new file mode 100644 index 0000000000..45531ccfa7 --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_message_queue.rs @@ -0,0 +1,179 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-24, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// pallet_message_queue +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `189` + // Estimated: `7534` + // Minimum execution time: 13_668_000 picoseconds. + Weight::from_parts(13_668_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// 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) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `184` + // Estimated: `7534` + // Minimum execution time: 11_106_000 picoseconds. + Weight::from_parts(11_106_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3517` + // Minimum execution time: 4_921_000 picoseconds. + Weight::from_parts(4_921_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 6_879_000 picoseconds. + Weight::from_parts(6_879_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 7_564_000 picoseconds. + Weight::from_parts(7_564_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 59_963_000 picoseconds. + Weight::from_parts(59_963_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:0) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `99` + // Estimated: `5007` + // Minimum execution time: 7_200_000 picoseconds. + Weight::from_parts(7_200_000, 0) + .saturating_add(Weight::from_parts(0, 5007)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 41_366_000 picoseconds. + Weight::from_parts(41_366_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 60_538_000 picoseconds. + Weight::from_parts(60_538_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 73_665_000 picoseconds. + Weight::from_parts(73_665_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 4261f7fb76..d42990ea55 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -36,6 +36,7 @@ pallet-assets = { default-features = false, version = "28.0.0" } pallet-aura = { default-features = false, version = "26.0.0" } pallet-authorship = { default-features = false, version = "27.0.0" } pallet-balances = { default-features = false, version = "27.0.0" } +pallet-message-queue = { default-features = false , version = "30.0.0" } pallet-multisig = { default-features = false, version = "27.0.0" } pallet-nfts = { default-features = false, version = "21.0.0" } pallet-nfts-runtime-api = { default-features = false, version = "13.0.0" } @@ -102,6 +103,7 @@ substrate-wasm-builder = { optional = true , version = "16.0.0" } default = [ "std" ] runtime-benchmarks = [ "assets-common/runtime-benchmarks", + "cumulus-pallet-dmp-queue/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", @@ -115,6 +117,7 @@ runtime-benchmarks = [ "pallet-assets/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-collator-selection/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-nfts/runtime-benchmarks", "pallet-proxy/runtime-benchmarks", @@ -146,6 +149,7 @@ try-runtime = [ "pallet-authorship/try-runtime", "pallet-balances/try-runtime", "pallet-collator-selection/try-runtime", + "pallet-message-queue/try-runtime", "pallet-multisig/try-runtime", "pallet-nfts/try-runtime", "pallet-proxy/try-runtime", @@ -190,6 +194,7 @@ std = [ "pallet-authorship/std", "pallet-balances/std", "pallet-collator-selection/std", + "pallet-message-queue/std", "pallet-multisig/std", "pallet-nfts-runtime-api/std", "pallet-nfts/std", diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 7e713b68f1..13f5790fd3 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -66,13 +66,14 @@ use assets_common::{ foreign_creators::ForeignCreators, matching::FromSiblingParachain, MultiLocationForAssetId, }; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, Verify}, transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, + ApplyExtrinsicResult, Perbill, }; use sp_std::prelude::*; @@ -88,7 +89,7 @@ use frame_support::{ parameter_types, traits::{ AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Equals, - InstanceFilter, OnRuntimeUpgrade, + InstanceFilter, OnRuntimeUpgrade, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -101,7 +102,7 @@ use pallet_nfts::PalletFeatures; use parachains_common::{ impls::{AssetsToBlockAuthor, DealWithFees}, AccountId, AssetHubPolkadotAuraId as AuraId, AssetIdForTrustBackedAssets, Balance, BlockNumber, - Hash, Header, Nonce, Signature, + Hash, Header, Nonce, Signature, message_queue::*, }; use sp_runtime::RuntimeDebug; @@ -112,7 +113,7 @@ use system_parachains_constants::{ }; use xcm_config::{ DotLocation, FellowshipLocation, ForeignAssetsConvertedConcreteId, GovernanceLocation, - TrustBackedAssetsConvertedConcreteId, XcmConfig, XcmOriginToTransactDispatchOrigin, + TrustBackedAssetsConvertedConcreteId, XcmOriginToTransactDispatchOrigin, }; #[cfg(any(feature = "std", test))] @@ -122,7 +123,6 @@ pub use sp_runtime::BuildStorage; use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use xcm::prelude::*; -use xcm_executor::XcmExecutor; use crate::xcm_config::ForeignCreatorsSovereignAccountOf; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; @@ -544,13 +544,14 @@ impl pallet_proxy::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 = parachain_info::Pallet; - type DmpMessageHandler = DmpQueue; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type ReservedDmpWeight = ReservedDmpWeight; type OutboundXcmpMessageSource = XcmpQueue; type XcmpMessageHandler = XcmpQueue; @@ -562,10 +563,37 @@ impl cumulus_pallet_parachain_system::Config for Runtime { BLOCK_PROCESSING_VELOCITY, UNINCLUDED_SEGMENT_CAPACITY, >; + type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; } impl parachain_info::Config for Runtime {} +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_message_queue::WeightInfo; + #[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< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >; + type Size = u32; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; +} + impl cumulus_pallet_aura_ext::Config for Runtime {} parameter_types! { @@ -594,10 +622,11 @@ pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::Exponenti impl cumulus_pallet_xcmp_queue::Config for Runtime { type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRoot; + // Enqueue XCMP messages from siblings for later processing. + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = EitherOfDiverse< EnsureRoot, EnsureXcm>, @@ -607,9 +636,9 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { } impl cumulus_pallet_dmp_queue::Config for Runtime { + type WeightInfo = weights::cumulus_pallet_dmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRoot; + type DmpSink = frame_support::traits::EnqueueWithOrigin; } parameter_types! { @@ -812,8 +841,10 @@ construct_runtime!( XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, + // Temporary to migrate the remaining DMP messages: DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 33, ToKusamaXcmRouter: pallet_xcm_bridge_hub_router::::{Pallet, Storage, Call} = 34, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 35, // Handy utilities. Utility: pallet_utility::{Pallet, Call, Event} = 40, @@ -880,6 +911,7 @@ mod benches { [pallet_assets, Local] [pallet_assets, Foreign] [pallet_balances, Balances] + [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] [pallet_nfts, Nfts] [pallet_proxy, Proxy] @@ -888,7 +920,9 @@ mod benches { [pallet_utility, Utility] [pallet_timestamp, Timestamp] [pallet_collator_selection, CollatorSelection] + [cumulus_pallet_parachain_system, ParachainSystem] [cumulus_pallet_xcmp_queue, XcmpQueue] + [cumulus_pallet_dmp_queue, DmpQueue] // XCM [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] // Bridges diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_dmp_queue.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_dmp_queue.rs new file mode 100644 index 0000000000..cc41dcd6cb --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_dmp_queue.rs @@ -0,0 +1,131 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +//! Autogenerated weights for `cumulus_pallet_dmp_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-kusama-dev")`, DB CACHE: 1024 + +// Executed Command: +// target/production/polkadot-parachain +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json +// --pallet=cumulus_pallet_dmp_queue +// --chain=asset-hub-kusama-dev +// --header=./cumulus/file_header.txt +// --output=./cumulus/parachains/runtimes/assets/asset-hub-kusama/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_dmp_queue`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_dmp_queue::WeightInfo for WeightInfo { + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (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: `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 { + // Proof Size summary in bytes: + // Measured: `65696` + // Estimated: `69161` + // Minimum execution time: 124_651_000 picoseconds. + Weight::from_parts(127_857_000, 0) + .saturating_add(Weight::from_parts(0, 69161)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65659` + // Estimated: `69124` + // Minimum execution time: 65_684_000 picoseconds. + Weight::from_parts(68_039_000, 0) + .saturating_add(Weight::from_parts(0, 69124)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (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: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn on_idle_overweight_good_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65726` + // Estimated: `69191` + // Minimum execution time: 117_657_000 picoseconds. + Weight::from_parts(122_035_000, 0) + .saturating_add(Weight::from_parts(0, 69191)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + fn on_idle_overweight_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65689` + // Estimated: `69154` + // Minimum execution time: 59_799_000 picoseconds. + Weight::from_parts(61_354_000, 0) + .saturating_add(Weight::from_parts(0, 69154)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_parachain_system.rs new file mode 100644 index 0000000000..c1e5c6a742 --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_parachain_system.rs @@ -0,0 +1,80 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `cumulus_pallet_parachain_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// cumulus_pallet_parachain_system +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights +// --steps +// 50 +// --repeat +// 20 + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_parachain_system`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_parachain_system::WeightInfo for WeightInfo { + /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1) + /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0) + /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (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: ParachainSystem ProcessedDownwardMessages (r:0 w:1) + /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: MessageQueue Pages (r:0 w:16) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `12` + // Estimated: `8013` + // Minimum execution time: 1_622_000 picoseconds. + Weight::from_parts(1_709_000, 0) + .saturating_add(Weight::from_parts(0, 8013)) + // Standard Error: 22_138 + .saturating_add(Weight::from_parts(23_923_169, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs index db77d8f6ac..76e231a3ce 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs @@ -59,16 +59,92 @@ 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) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_config_with_weight() -> Weight { + /// 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 { + // Proof Size summary in bytes: + // Measured: `118` + // Estimated: `3517` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_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 { // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 4_977_000 picoseconds. - Weight::from_parts(5_242_000, 0) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .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 { + // Proof Size summary in bytes: + // Measured: `111` + // Estimated: `1596` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(0, 1596)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn take_first_concatenated_xcm() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 44_000_000 picoseconds. + Weight::from_parts(45_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: `XcmpQueue::InboundXcmpMessages` (r:1 w:1) + /// Proof: `XcmpQueue::InboundXcmpMessages` (`max_values`: None, `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::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 { + // Proof Size summary in bytes: + // Measured: `65747` + // Estimated: `69212` + // Minimum execution time: 62_000_000 picoseconds. + Weight::from_parts(66_000_000, 0) + .saturating_add(Weight::from_parts(0, 69212)) + .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) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65710` + // Estimated: `69175` + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(43_000_000, 0) + .saturating_add(Weight::from_parts(0, 69175)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs index ae08c4f1f4..58477b320a 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs @@ -15,6 +15,8 @@ // along with Cumulus. If not, see . pub mod block_weights; +pub mod cumulus_pallet_dmp_queue; +pub mod cumulus_pallet_parachain_system; pub mod cumulus_pallet_xcmp_queue; pub mod extrinsic_weights; pub mod frame_system; @@ -22,6 +24,7 @@ pub mod pallet_assets_foreign; pub mod pallet_assets_local; pub mod pallet_balances; pub mod pallet_collator_selection; +pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_nfts; pub mod pallet_proxy; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_message_queue.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_message_queue.rs new file mode 100644 index 0000000000..45531ccfa7 --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_message_queue.rs @@ -0,0 +1,179 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-24, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// pallet_message_queue +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `189` + // Estimated: `7534` + // Minimum execution time: 13_668_000 picoseconds. + Weight::from_parts(13_668_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// 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) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `184` + // Estimated: `7534` + // Minimum execution time: 11_106_000 picoseconds. + Weight::from_parts(11_106_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3517` + // Minimum execution time: 4_921_000 picoseconds. + Weight::from_parts(4_921_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 6_879_000 picoseconds. + Weight::from_parts(6_879_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 7_564_000 picoseconds. + Weight::from_parts(7_564_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 59_963_000 picoseconds. + Weight::from_parts(59_963_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:0) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `99` + // Estimated: `5007` + // Minimum execution time: 7_200_000 picoseconds. + Weight::from_parts(7_200_000, 0) + .saturating_add(Weight::from_parts(0, 5007)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 41_366_000 picoseconds. + Weight::from_parts(41_366_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 60_538_000 picoseconds. + Weight::from_parts(60_538_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 73_665_000 picoseconds. + Weight::from_parts(73_665_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 215e263248..3757049be3 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -37,6 +37,7 @@ frame-try-runtime = { default-features = false, optional = true, version = "0.33 pallet-aura = { default-features = false, version = "26.0.0" } pallet-authorship = { default-features = false, version = "27.0.0" } pallet-balances = { default-features = false, version = "27.0.0" } +pallet-message-queue = { default-features = false , version = "30.0.0" } pallet-multisig = { default-features = false, version = "27.0.0" } pallet-session = { default-features = false, version = "27.0.0" } pallet-timestamp = { default-features = false, version = "26.0.0" } @@ -145,6 +146,7 @@ std = [ "pallet-bridge-parachains/std", "pallet-bridge-relayers/std", "pallet-collator-selection/std", + "pallet-message-queue/std", "pallet-multisig/std", "pallet-session/std", "pallet-timestamp/std", @@ -183,6 +185,7 @@ std = [ runtime-benchmarks = [ "bridge-runtime-common/runtime-benchmarks", + "cumulus-pallet-dmp-queue/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", @@ -197,6 +200,7 @@ runtime-benchmarks = [ "pallet-bridge-parachains/runtime-benchmarks", "pallet-bridge-relayers/runtime-benchmarks", "pallet-collator-selection/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-utility/runtime-benchmarks", @@ -228,6 +232,7 @@ try-runtime = [ "pallet-bridge-parachains/try-runtime", "pallet-bridge-relayers/try-runtime", "pallet-collator-selection/try-runtime", + "pallet-message-queue/try-runtime", "pallet-multisig/try-runtime", "pallet-session/try-runtime", "pallet-timestamp/try-runtime", diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 4944f2ef02..e36a3b8730 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -27,6 +27,7 @@ mod weights; pub mod xcm_config; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ @@ -46,7 +47,7 @@ use frame_support::{ dispatch::DispatchClass, genesis_builder_helper::{build_config, create_default_config}, parameter_types, - traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything}, + traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, TransformOrigin}, weights::{ConstantMultiplier, Weight}, PalletId, }; @@ -58,7 +59,7 @@ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; use xcm_config::{ - FellowshipLocation, GovernanceLocation, XcmConfig, XcmOriginToTransactDispatchOrigin, + FellowshipLocation, GovernanceLocation, XcmOriginToTransactDispatchOrigin, }; #[cfg(any(feature = "std", test))] @@ -69,7 +70,7 @@ use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use parachains_common::{ - impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, + impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, message_queue::*, }; use system_parachains_constants::{ kusama::{consensus::*, currency::*, fee::WeightToFee}, @@ -78,7 +79,6 @@ use system_parachains_constants::{ // XCM Imports use xcm::prelude::*; -use xcm_executor::XcmExecutor; /// The address format for describing accounts. pub type Address = MultiAddress; @@ -285,6 +285,7 @@ impl pallet_transaction_payment::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 { @@ -292,7 +293,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type OnSystemEvent = (); type SelfParaId = parachain_info::Pallet; type OutboundXcmpMessageSource = XcmpQueue; - type DmpMessageHandler = DmpQueue; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type ReservedDmpWeight = ReservedDmpWeight; type XcmpMessageHandler = XcmpQueue; type ReservedXcmpWeight = ReservedXcmpWeight; @@ -303,10 +304,37 @@ impl cumulus_pallet_parachain_system::Config for Runtime { BLOCK_PROCESSING_VELOCITY, UNINCLUDED_SEGMENT_CAPACITY, >; + type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; } impl parachain_info::Config for Runtime {} +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_message_queue::WeightInfo; + #[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< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >; + type Size = u32; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; +} + impl cumulus_pallet_aura_ext::Config for Runtime {} parameter_types! { @@ -340,10 +368,11 @@ pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::Exponenti impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRoot; + // Enqueue XCMP messages from siblings for later processing. + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = RootOrFellows; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; @@ -351,9 +380,9 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { } impl cumulus_pallet_dmp_queue::Config for Runtime { + type WeightInfo = weights::cumulus_pallet_dmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRoot; + type DmpSink = frame_support::traits::EnqueueWithOrigin; } pub const PERIOD: u32 = 6 * HOURS; @@ -462,7 +491,9 @@ construct_runtime!( XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, + // Temporary to migrate the remaining DMP messages: DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 33, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 34, // Handy utilities. Utility: pallet_utility::{Pallet, Call, Event} = 40, @@ -483,12 +514,15 @@ mod benches { frame_benchmarking::define_benchmarks!( [frame_system, SystemBench::] [pallet_balances, Balances] + [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] [pallet_session, SessionBench::] [pallet_utility, Utility] [pallet_timestamp, Timestamp] [pallet_collator_selection, CollatorSelection] + [cumulus_pallet_parachain_system, ParachainSystem] [cumulus_pallet_xcmp_queue, XcmpQueue] + [cumulus_pallet_dmp_queue, DmpQueue] // XCM [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] // NOTE: Make sure you point to the individual modules below. diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_dmp_queue.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_dmp_queue.rs new file mode 100644 index 0000000000..cc41dcd6cb --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_dmp_queue.rs @@ -0,0 +1,131 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +//! Autogenerated weights for `cumulus_pallet_dmp_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-kusama-dev")`, DB CACHE: 1024 + +// Executed Command: +// target/production/polkadot-parachain +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json +// --pallet=cumulus_pallet_dmp_queue +// --chain=asset-hub-kusama-dev +// --header=./cumulus/file_header.txt +// --output=./cumulus/parachains/runtimes/assets/asset-hub-kusama/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_dmp_queue`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_dmp_queue::WeightInfo for WeightInfo { + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (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: `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 { + // Proof Size summary in bytes: + // Measured: `65696` + // Estimated: `69161` + // Minimum execution time: 124_651_000 picoseconds. + Weight::from_parts(127_857_000, 0) + .saturating_add(Weight::from_parts(0, 69161)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65659` + // Estimated: `69124` + // Minimum execution time: 65_684_000 picoseconds. + Weight::from_parts(68_039_000, 0) + .saturating_add(Weight::from_parts(0, 69124)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (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: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn on_idle_overweight_good_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65726` + // Estimated: `69191` + // Minimum execution time: 117_657_000 picoseconds. + Weight::from_parts(122_035_000, 0) + .saturating_add(Weight::from_parts(0, 69191)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + fn on_idle_overweight_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65689` + // Estimated: `69154` + // Minimum execution time: 59_799_000 picoseconds. + Weight::from_parts(61_354_000, 0) + .saturating_add(Weight::from_parts(0, 69154)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_parachain_system.rs new file mode 100644 index 0000000000..c1e5c6a742 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_parachain_system.rs @@ -0,0 +1,80 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `cumulus_pallet_parachain_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// cumulus_pallet_parachain_system +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights +// --steps +// 50 +// --repeat +// 20 + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_parachain_system`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_parachain_system::WeightInfo for WeightInfo { + /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1) + /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0) + /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (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: ParachainSystem ProcessedDownwardMessages (r:0 w:1) + /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: MessageQueue Pages (r:0 w:16) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `12` + // Estimated: `8013` + // Minimum execution time: 1_622_000 picoseconds. + Weight::from_parts(1_709_000, 0) + .saturating_add(Weight::from_parts(0, 8013)) + // Standard Error: 22_138 + .saturating_add(Weight::from_parts(23_923_169, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs index 7285ac453e..6b53cf6ed3 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs @@ -59,16 +59,92 @@ 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) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_config_with_weight() -> Weight { + /// 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 { + // Proof Size summary in bytes: + // Measured: `118` + // Estimated: `3517` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_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 { // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 4_062_000 picoseconds. - Weight::from_parts(4_278_000, 0) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .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 { + // Proof Size summary in bytes: + // Measured: `111` + // Estimated: `1596` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(0, 1596)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn take_first_concatenated_xcm() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 44_000_000 picoseconds. + Weight::from_parts(45_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: `XcmpQueue::InboundXcmpMessages` (r:1 w:1) + /// Proof: `XcmpQueue::InboundXcmpMessages` (`max_values`: None, `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::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 { + // Proof Size summary in bytes: + // Measured: `65747` + // Estimated: `69212` + // Minimum execution time: 62_000_000 picoseconds. + Weight::from_parts(66_000_000, 0) + .saturating_add(Weight::from_parts(0, 69212)) + .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) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65710` + // Estimated: `69175` + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(43_000_000, 0) + .saturating_add(Weight::from_parts(0, 69175)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs index a65be4f0d7..163b47d14b 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs @@ -24,6 +24,8 @@ use ::pallet_bridge_relayers::WeightInfoExt as _; use frame_support::weights::Weight; pub mod block_weights; +pub mod cumulus_pallet_dmp_queue; +pub mod cumulus_pallet_parachain_system; pub mod cumulus_pallet_xcmp_queue; pub mod extrinsic_weights; pub mod frame_system; @@ -33,6 +35,7 @@ pub mod pallet_bridge_messages; pub mod pallet_bridge_parachains; pub mod pallet_bridge_relayers; pub mod pallet_collator_selection; +pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_session; pub mod pallet_timestamp; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_message_queue.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_message_queue.rs new file mode 100644 index 0000000000..45531ccfa7 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_message_queue.rs @@ -0,0 +1,179 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-24, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// pallet_message_queue +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `189` + // Estimated: `7534` + // Minimum execution time: 13_668_000 picoseconds. + Weight::from_parts(13_668_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// 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) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `184` + // Estimated: `7534` + // Minimum execution time: 11_106_000 picoseconds. + Weight::from_parts(11_106_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3517` + // Minimum execution time: 4_921_000 picoseconds. + Weight::from_parts(4_921_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 6_879_000 picoseconds. + Weight::from_parts(6_879_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 7_564_000 picoseconds. + Weight::from_parts(7_564_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 59_963_000 picoseconds. + Weight::from_parts(59_963_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:0) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `99` + // Estimated: `5007` + // Minimum execution time: 7_200_000 picoseconds. + Weight::from_parts(7_200_000, 0) + .saturating_add(Weight::from_parts(0, 5007)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 41_366_000 picoseconds. + Weight::from_parts(41_366_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 60_538_000 picoseconds. + Weight::from_parts(60_538_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 73_665_000 picoseconds. + Weight::from_parts(73_665_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index a33fc53dad..6017d26b95 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -37,6 +37,7 @@ frame-try-runtime = { default-features = false, optional = true, version = "0.33 pallet-aura = { default-features = false, version = "26.0.0" } pallet-authorship = { default-features = false, version = "27.0.0" } pallet-balances = { default-features = false, version = "27.0.0" } +pallet-message-queue = { default-features = false , version = "30.0.0" } pallet-multisig = { default-features = false, version = "27.0.0" } pallet-session = { default-features = false, version = "27.0.0" } pallet-timestamp = { default-features = false, version = "26.0.0" } @@ -144,6 +145,7 @@ std = [ "pallet-bridge-parachains/std", "pallet-bridge-relayers/std", "pallet-collator-selection/std", + "pallet-message-queue/std", "pallet-multisig/std", "pallet-session/std", "pallet-timestamp/std", @@ -183,6 +185,7 @@ std = [ runtime-benchmarks = [ "bridge-runtime-common/runtime-benchmarks", + "cumulus-pallet-dmp-queue/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", @@ -197,6 +200,7 @@ runtime-benchmarks = [ "pallet-bridge-parachains/runtime-benchmarks", "pallet-bridge-relayers/runtime-benchmarks", "pallet-collator-selection/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-utility/runtime-benchmarks", @@ -227,6 +231,7 @@ try-runtime = [ "pallet-bridge-parachains/try-runtime", "pallet-bridge-relayers/try-runtime", "pallet-collator-selection/try-runtime", + "pallet-message-queue/try-runtime", "pallet-multisig/try-runtime", "pallet-session/try-runtime", "pallet-timestamp/try-runtime", diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index b8807b8e32..76c0e2e3a4 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -27,6 +27,7 @@ mod weights; pub mod xcm_config; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ @@ -46,7 +47,7 @@ use frame_support::{ dispatch::DispatchClass, genesis_builder_helper::{build_config, create_default_config}, parameter_types, - traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything}, + traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, TransformOrigin}, weights::{ConstantMultiplier, Weight}, PalletId, }; @@ -58,7 +59,7 @@ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; use xcm_config::{ - FellowshipLocation, GovernanceLocation, XcmConfig, XcmOriginToTransactDispatchOrigin, + FellowshipLocation, GovernanceLocation, XcmOriginToTransactDispatchOrigin, }; #[cfg(any(feature = "std", test))] @@ -70,7 +71,7 @@ use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use parachains_common::{ - impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, + impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, message_queue::*, }; use system_parachains_constants::{ polkadot::{consensus::*, currency::*, fee::WeightToFee}, @@ -78,7 +79,6 @@ use system_parachains_constants::{ }; // XCM Imports use xcm::prelude::*; -use xcm_executor::XcmExecutor; /// The address format for describing accounts. pub type Address = MultiAddress; @@ -285,6 +285,7 @@ impl pallet_transaction_payment::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 { @@ -292,7 +293,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type OnSystemEvent = (); type SelfParaId = parachain_info::Pallet; type OutboundXcmpMessageSource = XcmpQueue; - type DmpMessageHandler = DmpQueue; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type ReservedDmpWeight = ReservedDmpWeight; type XcmpMessageHandler = XcmpQueue; type ReservedXcmpWeight = ReservedXcmpWeight; @@ -303,10 +304,37 @@ impl cumulus_pallet_parachain_system::Config for Runtime { BLOCK_PROCESSING_VELOCITY, UNINCLUDED_SEGMENT_CAPACITY, >; + type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; } impl parachain_info::Config for Runtime {} +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_message_queue::WeightInfo; + #[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< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >; + type Size = u32; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; +} + impl cumulus_pallet_aura_ext::Config for Runtime {} parameter_types! { @@ -340,10 +368,11 @@ pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::Exponenti impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRoot; + // Enqueue XCMP messages from siblings for later processing. + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = RootOrFellows; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; @@ -351,9 +380,9 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { } impl cumulus_pallet_dmp_queue::Config for Runtime { + type WeightInfo = weights::cumulus_pallet_dmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRoot; + type DmpSink = frame_support::traits::EnqueueWithOrigin; } pub const PERIOD: u32 = 6 * HOURS; @@ -462,7 +491,9 @@ construct_runtime!( XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, + // Temporary to migrate the remaining DMP messages: DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 33, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 34, // Handy utilities. Utility: pallet_utility::{Pallet, Call, Event} = 40, @@ -483,12 +514,15 @@ mod benches { frame_benchmarking::define_benchmarks!( [frame_system, SystemBench::] [pallet_balances, Balances] + [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] [pallet_session, SessionBench::] [pallet_utility, Utility] [pallet_timestamp, Timestamp] [pallet_collator_selection, CollatorSelection] + [cumulus_pallet_parachain_system, ParachainSystem] [cumulus_pallet_xcmp_queue, XcmpQueue] + [cumulus_pallet_dmp_queue, DmpQueue] // XCM [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] // NOTE: Make sure you point to the individual modules below. diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_dmp_queue.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_dmp_queue.rs new file mode 100644 index 0000000000..cc41dcd6cb --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_dmp_queue.rs @@ -0,0 +1,131 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +//! Autogenerated weights for `cumulus_pallet_dmp_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-kusama-dev")`, DB CACHE: 1024 + +// Executed Command: +// target/production/polkadot-parachain +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json +// --pallet=cumulus_pallet_dmp_queue +// --chain=asset-hub-kusama-dev +// --header=./cumulus/file_header.txt +// --output=./cumulus/parachains/runtimes/assets/asset-hub-kusama/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_dmp_queue`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_dmp_queue::WeightInfo for WeightInfo { + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (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: `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 { + // Proof Size summary in bytes: + // Measured: `65696` + // Estimated: `69161` + // Minimum execution time: 124_651_000 picoseconds. + Weight::from_parts(127_857_000, 0) + .saturating_add(Weight::from_parts(0, 69161)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65659` + // Estimated: `69124` + // Minimum execution time: 65_684_000 picoseconds. + Weight::from_parts(68_039_000, 0) + .saturating_add(Weight::from_parts(0, 69124)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (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: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn on_idle_overweight_good_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65726` + // Estimated: `69191` + // Minimum execution time: 117_657_000 picoseconds. + Weight::from_parts(122_035_000, 0) + .saturating_add(Weight::from_parts(0, 69191)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + fn on_idle_overweight_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65689` + // Estimated: `69154` + // Minimum execution time: 59_799_000 picoseconds. + Weight::from_parts(61_354_000, 0) + .saturating_add(Weight::from_parts(0, 69154)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_parachain_system.rs new file mode 100644 index 0000000000..c1e5c6a742 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_parachain_system.rs @@ -0,0 +1,80 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `cumulus_pallet_parachain_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// cumulus_pallet_parachain_system +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights +// --steps +// 50 +// --repeat +// 20 + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_parachain_system`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_parachain_system::WeightInfo for WeightInfo { + /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1) + /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0) + /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (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: ParachainSystem ProcessedDownwardMessages (r:0 w:1) + /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: MessageQueue Pages (r:0 w:16) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `12` + // Estimated: `8013` + // Minimum execution time: 1_622_000 picoseconds. + Weight::from_parts(1_709_000, 0) + .saturating_add(Weight::from_parts(0, 8013)) + // Standard Error: 22_138 + .saturating_add(Weight::from_parts(23_923_169, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs index 27f640dbaf..333147913f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs @@ -59,16 +59,92 @@ 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) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_config_with_weight() -> Weight { + /// 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 { + // Proof Size summary in bytes: + // Measured: `118` + // Estimated: `3517` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_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 { // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 3_995_000 picoseconds. - Weight::from_parts(4_256_000, 0) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .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 { + // Proof Size summary in bytes: + // Measured: `111` + // Estimated: `1596` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(0, 1596)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn take_first_concatenated_xcm() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 44_000_000 picoseconds. + Weight::from_parts(45_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: `XcmpQueue::InboundXcmpMessages` (r:1 w:1) + /// Proof: `XcmpQueue::InboundXcmpMessages` (`max_values`: None, `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::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 { + // Proof Size summary in bytes: + // Measured: `65747` + // Estimated: `69212` + // Minimum execution time: 62_000_000 picoseconds. + Weight::from_parts(66_000_000, 0) + .saturating_add(Weight::from_parts(0, 69212)) + .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) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65710` + // Estimated: `69175` + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(43_000_000, 0) + .saturating_add(Weight::from_parts(0, 69175)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs index 951cab5546..e56ad7c2cc 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs @@ -24,6 +24,8 @@ use ::pallet_bridge_relayers::WeightInfoExt as _; use frame_support::weights::Weight; pub mod block_weights; +pub mod cumulus_pallet_dmp_queue; +pub mod cumulus_pallet_parachain_system; pub mod cumulus_pallet_xcmp_queue; pub mod extrinsic_weights; pub mod frame_system; @@ -33,6 +35,7 @@ pub mod pallet_bridge_messages; pub mod pallet_bridge_parachains; pub mod pallet_bridge_relayers; pub mod pallet_collator_selection; +pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_session; pub mod pallet_timestamp; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_message_queue.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_message_queue.rs new file mode 100644 index 0000000000..45531ccfa7 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_message_queue.rs @@ -0,0 +1,179 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-24, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// pallet_message_queue +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `189` + // Estimated: `7534` + // Minimum execution time: 13_668_000 picoseconds. + Weight::from_parts(13_668_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// 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) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `184` + // Estimated: `7534` + // Minimum execution time: 11_106_000 picoseconds. + Weight::from_parts(11_106_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3517` + // Minimum execution time: 4_921_000 picoseconds. + Weight::from_parts(4_921_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 6_879_000 picoseconds. + Weight::from_parts(6_879_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 7_564_000 picoseconds. + Weight::from_parts(7_564_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 59_963_000 picoseconds. + Weight::from_parts(59_963_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:0) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `99` + // Estimated: `5007` + // Minimum execution time: 7_200_000 picoseconds. + Weight::from_parts(7_200_000, 0) + .saturating_add(Weight::from_parts(0, 5007)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 41_366_000 picoseconds. + Weight::from_parts(41_366_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 60_538_000 picoseconds. + Weight::from_parts(60_538_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 73_665_000 picoseconds. + Weight::from_parts(73_665_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index 35103ed880..d40600153e 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -29,6 +29,7 @@ pallet-aura = { default-features = false, version = "26.0.0" } pallet-authorship = { default-features = false, version = "27.0.0" } pallet-balances = { default-features = false, version = "27.0.0" } pallet-collective = { default-features = false, version = "27.0.0" } +pallet-message-queue = { default-features = false , version = "30.0.0" } pallet-multisig = { default-features = false, version = "27.0.0" } pallet-preimage = { default-features = false , version = "27.0.0" } pallet-proxy = { default-features = false, version = "27.0.0" } @@ -88,6 +89,7 @@ substrate-wasm-builder = { optional = true , version = "16.0.0" } [features] default = [ "std" ] runtime-benchmarks = [ + "cumulus-pallet-dmp-queue/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", @@ -101,6 +103,7 @@ runtime-benchmarks = [ "pallet-collator-selection/runtime-benchmarks", "pallet-collective/runtime-benchmarks", "pallet-core-fellowship/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-preimage/runtime-benchmarks", "pallet-proxy/runtime-benchmarks", @@ -136,6 +139,7 @@ try-runtime = [ "pallet-collator-selection/try-runtime", "pallet-collective/try-runtime", "pallet-core-fellowship/try-runtime", + "pallet-message-queue/try-runtime", "pallet-multisig/try-runtime", "pallet-preimage/try-runtime", "pallet-proxy/try-runtime", @@ -179,6 +183,7 @@ std = [ "pallet-collator-selection/std", "pallet-collective/std", "pallet-core-fellowship/std", + "pallet-message-queue/std", "pallet-multisig/std", "pallet-preimage/std", "pallet-proxy/std", diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 2bb101224d..063af636cd 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -43,6 +43,7 @@ pub mod xcm_config; pub mod fellowship; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use fellowship::{pallet_fellowship_origins, Fellows}; use impls::{AllianceProposalProvider, EqualOrGreatestRootCmp, ToParentTreasury}; use polkadot_runtime_common::impls::VersionedLocatableAsset; @@ -68,7 +69,7 @@ use frame_support::{ parameter_types, traits::{ fungible::HoldConsideration, ConstBool, ConstU16, ConstU32, ConstU64, ConstU8, - EitherOfDiverse, InstanceFilter, LinearStoragePrice, + EitherOfDiverse, InstanceFilter, LinearStoragePrice, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -78,7 +79,7 @@ use frame_system::{ EnsureRoot, }; use parachains_common::{ - impls::DealWithFees, AccountId, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature, + impls::DealWithFees, AccountId, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature, message_queue::*, }; use sp_runtime::RuntimeDebug; use system_parachains_constants::{ @@ -87,7 +88,7 @@ use system_parachains_constants::{ SLOT_DURATION, }; use xcm_config::{ - GovernanceLocation, LocationToAccountId, TreasurerBodyId, XcmConfig, + GovernanceLocation, LocationToAccountId, TreasurerBodyId, XcmOriginToTransactDispatchOrigin, }; @@ -98,7 +99,6 @@ pub use sp_runtime::BuildStorage; use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use xcm::prelude::*; -use xcm_executor::XcmExecutor; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; @@ -363,13 +363,14 @@ impl pallet_proxy::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 = parachain_info::Pallet; - type DmpMessageHandler = DmpQueue; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type ReservedDmpWeight = ReservedDmpWeight; type OutboundXcmpMessageSource = XcmpQueue; type XcmpMessageHandler = XcmpQueue; @@ -381,10 +382,37 @@ impl cumulus_pallet_parachain_system::Config for Runtime { BLOCK_PROCESSING_VELOCITY, UNINCLUDED_SEGMENT_CAPACITY, >; + type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; } impl parachain_info::Config for Runtime {} +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_message_queue::WeightInfo; + #[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< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >; + type Size = u32; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; +} + impl cumulus_pallet_aura_ext::Config for Runtime {} parameter_types! { @@ -411,10 +439,11 @@ pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::Exponenti impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRoot; + // Enqueue XCMP messages from siblings for later processing. + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = EitherOfDiverse, Fellows>; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; @@ -422,9 +451,9 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { } impl cumulus_pallet_dmp_queue::Config for Runtime { + type WeightInfo = weights::cumulus_pallet_dmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRoot; + type DmpSink = frame_support::traits::EnqueueWithOrigin; } pub const PERIOD: u32 = 6 * HOURS; @@ -629,7 +658,9 @@ construct_runtime!( XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, + // Temporary to migrate the remaining DMP messages: DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 33, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 34, // Handy utilities. Utility: pallet_utility::{Pallet, Call, Event} = 40, @@ -700,13 +731,16 @@ mod benches { frame_benchmarking::define_benchmarks!( [frame_system, SystemBench::] [pallet_balances, Balances] + [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] [pallet_proxy, Proxy] [pallet_session, SessionBench::] [pallet_utility, Utility] [pallet_timestamp, Timestamp] [pallet_collator_selection, CollatorSelection] + [cumulus_pallet_parachain_system, ParachainSystem] [cumulus_pallet_xcmp_queue, XcmpQueue] + [cumulus_pallet_dmp_queue, DmpQueue] [pallet_alliance, Alliance] [pallet_collective, AllianceMotion] [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_dmp_queue.rs b/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_dmp_queue.rs new file mode 100644 index 0000000000..cc41dcd6cb --- /dev/null +++ b/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_dmp_queue.rs @@ -0,0 +1,131 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +//! Autogenerated weights for `cumulus_pallet_dmp_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-kusama-dev")`, DB CACHE: 1024 + +// Executed Command: +// target/production/polkadot-parachain +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json +// --pallet=cumulus_pallet_dmp_queue +// --chain=asset-hub-kusama-dev +// --header=./cumulus/file_header.txt +// --output=./cumulus/parachains/runtimes/assets/asset-hub-kusama/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_dmp_queue`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_dmp_queue::WeightInfo for WeightInfo { + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (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: `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 { + // Proof Size summary in bytes: + // Measured: `65696` + // Estimated: `69161` + // Minimum execution time: 124_651_000 picoseconds. + Weight::from_parts(127_857_000, 0) + .saturating_add(Weight::from_parts(0, 69161)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65659` + // Estimated: `69124` + // Minimum execution time: 65_684_000 picoseconds. + Weight::from_parts(68_039_000, 0) + .saturating_add(Weight::from_parts(0, 69124)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (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: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn on_idle_overweight_good_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65726` + // Estimated: `69191` + // Minimum execution time: 117_657_000 picoseconds. + Weight::from_parts(122_035_000, 0) + .saturating_add(Weight::from_parts(0, 69191)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + fn on_idle_overweight_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65689` + // Estimated: `69154` + // Minimum execution time: 59_799_000 picoseconds. + Weight::from_parts(61_354_000, 0) + .saturating_add(Weight::from_parts(0, 69154)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_parachain_system.rs new file mode 100644 index 0000000000..c1e5c6a742 --- /dev/null +++ b/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_parachain_system.rs @@ -0,0 +1,80 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `cumulus_pallet_parachain_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// cumulus_pallet_parachain_system +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights +// --steps +// 50 +// --repeat +// 20 + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_parachain_system`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_parachain_system::WeightInfo for WeightInfo { + /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1) + /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0) + /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (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: ParachainSystem ProcessedDownwardMessages (r:0 w:1) + /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: MessageQueue Pages (r:0 w:16) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `12` + // Estimated: `8013` + // Minimum execution time: 1_622_000 picoseconds. + Weight::from_parts(1_709_000, 0) + .saturating_add(Weight::from_parts(0, 8013)) + // Standard Error: 22_138 + .saturating_add(Weight::from_parts(23_923_169, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs index d8834a7ca3..014219aff9 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs @@ -59,16 +59,92 @@ 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) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_config_with_weight() -> Weight { + /// 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 { // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `1627` - // Minimum execution time: 4_125_000 picoseconds. - Weight::from_parts(4_325_000, 0) - .saturating_add(Weight::from_parts(0, 1627)) + // Measured: `118` + // Estimated: `3517` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_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 { + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `1561` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) + .saturating_add(Weight::from_parts(0, 1561)) .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 { + // Proof Size summary in bytes: + // Measured: `111` + // Estimated: `1596` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(0, 1596)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn take_first_concatenated_xcm() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 44_000_000 picoseconds. + Weight::from_parts(45_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: `XcmpQueue::InboundXcmpMessages` (r:1 w:1) + /// Proof: `XcmpQueue::InboundXcmpMessages` (`max_values`: None, `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::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 { + // Proof Size summary in bytes: + // Measured: `65747` + // Estimated: `69212` + // Minimum execution time: 62_000_000 picoseconds. + Weight::from_parts(66_000_000, 0) + .saturating_add(Weight::from_parts(0, 69212)) + .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) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65710` + // Estimated: `69175` + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(43_000_000, 0) + .saturating_add(Weight::from_parts(0, 69175)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs b/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs index 187daf121b..55b60b10e0 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs @@ -15,6 +15,8 @@ // along with Cumulus. If not, see . pub mod block_weights; +pub mod cumulus_pallet_dmp_queue; +pub mod cumulus_pallet_parachain_system; pub mod cumulus_pallet_xcmp_queue; pub mod extrinsic_weights; pub mod frame_system; @@ -24,6 +26,7 @@ pub mod pallet_balances; pub mod pallet_collator_selection; pub mod pallet_collective; pub mod pallet_core_fellowship; +pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_preimage; pub mod pallet_proxy; diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_message_queue.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_message_queue.rs new file mode 100644 index 0000000000..45531ccfa7 --- /dev/null +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_message_queue.rs @@ -0,0 +1,179 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-24, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// pallet_message_queue +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `189` + // Estimated: `7534` + // Minimum execution time: 13_668_000 picoseconds. + Weight::from_parts(13_668_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// 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) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `184` + // Estimated: `7534` + // Minimum execution time: 11_106_000 picoseconds. + Weight::from_parts(11_106_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3517` + // Minimum execution time: 4_921_000 picoseconds. + Weight::from_parts(4_921_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 6_879_000 picoseconds. + Weight::from_parts(6_879_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 7_564_000 picoseconds. + Weight::from_parts(7_564_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 59_963_000 picoseconds. + Weight::from_parts(59_963_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:0) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `99` + // Estimated: `5007` + // Minimum execution time: 7_200_000 picoseconds. + Weight::from_parts(7_200_000, 0) + .saturating_add(Weight::from_parts(0, 5007)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 41_366_000 picoseconds. + Weight::from_parts(41_366_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 60_538_000 picoseconds. + Weight::from_parts(60_538_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 73_665_000 picoseconds. + Weight::from_parts(73_665_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/gluttons/glutton-kusama/Cargo.toml b/system-parachains/gluttons/glutton-kusama/Cargo.toml index e72a2ec7d8..ba5845c74d 100644 --- a/system-parachains/gluttons/glutton-kusama/Cargo.toml +++ b/system-parachains/gluttons/glutton-kusama/Cargo.toml @@ -21,6 +21,7 @@ frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } pallet-glutton = { default-features = false, optional = true, version = "13.0.0" } +pallet-message-queue = { default-features = false , version = "30.0.0" } pallet-sudo = { default-features = false, optional = true, version = "27.0.0" } sp-api = { default-features = false, version = "25.0.0" } sp-block-builder = { default-features = false, version = "25.0.0" } @@ -60,6 +61,7 @@ runtime-benchmarks = [ "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-glutton/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-sudo?/runtime-benchmarks", "parachains-common/runtime-benchmarks", "sp-runtime/runtime-benchmarks", @@ -79,6 +81,7 @@ std = [ "frame-system/std", "frame-try-runtime?/std", "pallet-glutton/std", + "pallet-message-queue/std", "pallet-sudo/std", "parachain-info/std", "parachains-common/std", @@ -108,6 +111,7 @@ try-runtime = [ "frame-system/try-runtime", "frame-try-runtime/try-runtime", "pallet-glutton/try-runtime", + "pallet-message-queue/try-runtime", "pallet-sudo/try-runtime", "parachain-info/try-runtime", "sp-runtime/try-runtime", diff --git a/system-parachains/gluttons/glutton-kusama/src/lib.rs b/system-parachains/gluttons/glutton-kusama/src/lib.rs index c245d04e7d..c5d4a31a78 100644 --- a/system-parachains/gluttons/glutton-kusama/src/lib.rs +++ b/system-parachains/gluttons/glutton-kusama/src/lib.rs @@ -47,6 +47,7 @@ pub mod weights; pub mod xcm_config; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_primitives_core::AggregateMessageOrigin; use sp_api::impl_runtime_apis; use sp_core::OpaqueMetadata; use sp_runtime::{ @@ -168,6 +169,7 @@ impl frame_system::Config for Runtime { parameter_types! { // We do anything the parent chain tells us in this runtime. pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(2); + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; } impl cumulus_pallet_parachain_system::Config for Runtime { @@ -175,16 +177,42 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type OnSystemEvent = (); type SelfParaId = parachain_info::Pallet; type OutboundXcmpMessageSource = (); - type DmpMessageHandler = cumulus_pallet_xcm::UnlimitedDmpExecution; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type ReservedDmpWeight = ReservedDmpWeight; type XcmpMessageHandler = (); type ReservedXcmpWeight = (); type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases; type ConsensusHook = cumulus_pallet_parachain_system::consensus_hook::ExpectParentIncluded; + type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; } impl parachain_info::Config for Runtime {} +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_message_queue::WeightInfo; + #[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< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >; + type Size = u32; + type QueueChangeHandler = (); + type QueuePausedQuery = (); // No XCMP queue pallet deployed. + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; +} + impl pallet_glutton::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_glutton::WeightInfo; @@ -206,8 +234,10 @@ construct_runtime! { } = 1, ParachainInfo: parachain_info::{Pallet, Storage, Config} = 2, + // TODO:(PR#137) - do we still need this? // DMP handler. CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Storage, Event, Origin} = 10, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 11, // The main stage. Glutton: pallet_glutton::{Pallet, Call, Storage, Event, Config} = 20, @@ -260,6 +290,8 @@ mod benches { frame_benchmarking::define_benchmarks!( [frame_system, SystemBench::] [pallet_glutton, Glutton] + [pallet_message_queue, MessageQueue] + [cumulus_pallet_parachain_system, ParachainSystem] ); } diff --git a/system-parachains/gluttons/glutton-kusama/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/gluttons/glutton-kusama/src/weights/cumulus_pallet_parachain_system.rs new file mode 100644 index 0000000000..c1e5c6a742 --- /dev/null +++ b/system-parachains/gluttons/glutton-kusama/src/weights/cumulus_pallet_parachain_system.rs @@ -0,0 +1,80 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `cumulus_pallet_parachain_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// cumulus_pallet_parachain_system +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights +// --steps +// 50 +// --repeat +// 20 + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_parachain_system`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_parachain_system::WeightInfo for WeightInfo { + /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1) + /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0) + /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (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: ParachainSystem ProcessedDownwardMessages (r:0 w:1) + /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: MessageQueue Pages (r:0 w:16) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `12` + // Estimated: `8013` + // Minimum execution time: 1_622_000 picoseconds. + Weight::from_parts(1_709_000, 0) + .saturating_add(Weight::from_parts(0, 8013)) + // Standard Error: 22_138 + .saturating_add(Weight::from_parts(23_923_169, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/gluttons/glutton-kusama/src/weights/mod.rs b/system-parachains/gluttons/glutton-kusama/src/weights/mod.rs index 990558538a..01562897d3 100644 --- a/system-parachains/gluttons/glutton-kusama/src/weights/mod.rs +++ b/system-parachains/gluttons/glutton-kusama/src/weights/mod.rs @@ -14,4 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . +pub mod cumulus_pallet_parachain_system; pub mod pallet_glutton; +pub mod pallet_message_queue; diff --git a/system-parachains/gluttons/glutton-kusama/src/weights/pallet_message_queue.rs b/system-parachains/gluttons/glutton-kusama/src/weights/pallet_message_queue.rs new file mode 100644 index 0000000000..45531ccfa7 --- /dev/null +++ b/system-parachains/gluttons/glutton-kusama/src/weights/pallet_message_queue.rs @@ -0,0 +1,179 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-24, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// pallet_message_queue +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `189` + // Estimated: `7534` + // Minimum execution time: 13_668_000 picoseconds. + Weight::from_parts(13_668_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// 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) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `184` + // Estimated: `7534` + // Minimum execution time: 11_106_000 picoseconds. + Weight::from_parts(11_106_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3517` + // Minimum execution time: 4_921_000 picoseconds. + Weight::from_parts(4_921_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 6_879_000 picoseconds. + Weight::from_parts(6_879_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 7_564_000 picoseconds. + Weight::from_parts(7_564_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 59_963_000 picoseconds. + Weight::from_parts(59_963_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:0) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `99` + // Estimated: `5007` + // Minimum execution time: 7_200_000 picoseconds. + Weight::from_parts(7_200_000, 0) + .saturating_add(Weight::from_parts(0, 5007)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 41_366_000 picoseconds. + Weight::from_parts(41_366_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 60_538_000 picoseconds. + Weight::from_parts(60_538_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 73_665_000 picoseconds. + Weight::from_parts(73_665_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} From f7a557ef868d9b5e2f06c5c71d40d7ac1a2cd808 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 11 Jan 2024 14:49:26 +0100 Subject: [PATCH 017/316] [simple-mermaid] bump --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 70e5fb2bae..39b6e4eb0e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12918,9 +12918,9 @@ dependencies = [ [[package]] name = "simple-mermaid" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9292312e0707d1308f09befeb8d2a1fcadd590d0985a617edc8a381ef8f9424" +checksum = "620a1d43d70e142b1d46a929af51d44f383db9c7a2ec122de2cd992ccfcf3c18" [[package]] name = "siphasher" From cb2467466895fa8f981b61741abebbccac5cab3d Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 11 Jan 2024 15:06:34 +0100 Subject: [PATCH 018/316] [bridges] adapt https://github.com/paritytech/polkadot-sdk/pull/2602 --- Cargo.lock | 28 ++ .../asset-hub-kusama/tests/tests.rs | 464 +----------------- .../asset-hub-polkadot/tests/tests.rs | 464 +----------------- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 6 + .../src/bridge_to_polkadot_config.rs | 49 +- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 9 +- .../bridge-hub-kusama/tests/tests.rs | 10 +- .../bridge-hub-polkadot/Cargo.toml | 6 + .../src/bridge_to_kusama_config.rs | 49 +- .../bridge-hub-polkadot/src/lib.rs | 9 +- .../bridge-hub-polkadot/tests/tests.rs | 10 +- 11 files changed, 132 insertions(+), 972 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 39b6e4eb0e..4b992dc4de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1344,11 +1344,13 @@ dependencies = [ "pallet-utility 27.0.0", "pallet-xcm 6.0.0", "pallet-xcm-benchmarks 6.0.0", + "pallet-xcm-bridge-hub", "parachains-common 6.0.0", "parity-scale-codec", "polkadot-core-primitives 6.0.0", "polkadot-parachain-primitives 5.0.0", "polkadot-runtime-common 6.0.0", + "polkadot-runtime-constants", "scale-info", "serde", "smallvec", @@ -1410,6 +1412,7 @@ dependencies = [ "frame-system-rpc-runtime-api 25.0.0", "frame-try-runtime 0.33.0", "hex-literal", + "kusama-runtime-constants", "log", "pallet-aura 26.0.0", "pallet-authorship 27.0.0", @@ -1428,6 +1431,7 @@ dependencies = [ "pallet-utility 27.0.0", "pallet-xcm 6.0.0", "pallet-xcm-benchmarks 6.0.0", + "pallet-xcm-bridge-hub", "parachains-common 6.0.0", "parity-scale-codec", "polkadot-core-primitives 6.0.0", @@ -8761,6 +8765,30 @@ dependencies = [ "staging-xcm-executor 6.0.0", ] +[[package]] +name = "pallet-xcm-bridge-hub" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ac06adbe492bda1c840e3a775b69d619391fe1a631cebd76010dc8394fed75f" +dependencies = [ + "bp-messages", + "bp-runtime", + "bp-xcm-bridge-hub", + "bridge-runtime-common", + "frame-support 27.0.0", + "frame-system 27.0.0", + "log", + "pallet-bridge-messages", + "parity-scale-codec", + "scale-info", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.0", + "staging-xcm-executor 6.0.0", +] + [[package]] name = "pallet-xcm-bridge-hub-router" version = "0.4.0" diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index a70901b5b4..a499e97c10 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -530,12 +530,6 @@ asset_test_utils::include_teleports_for_native_asset_works!( _ => None, } }), - Box::new(|runtime_event_encoded: Vec| { - match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { - Ok(RuntimeEvent::XcmpQueue(event)) => Some(event), - _ => None, - } - }), 1000 ); @@ -656,7 +650,7 @@ fn bridging_to_asset_hub_polkadot() -> TestBridgingConfig { #[test] fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_polkadot_works() { - missing_asset_test_utils_test_cases_over_bridge::limited_reserve_transfer_assets_for_native_asset_works::< + asset_test_utils::test_cases_over_bridge::limited_reserve_transfer_assets_for_native_asset_works::< Runtime, AllPalletsWithoutSystem, XcmConfig, @@ -682,7 +676,7 @@ fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_polkadot_works( bridging_to_asset_hub_polkadot, WeightLimit::Unlimited, Some(XcmBridgeHubRouterFeeAssetId::get()), - TreasuryAccount::get(), + Some(TreasuryAccount::get()), ) } @@ -713,7 +707,7 @@ fn receive_reserve_asset_deposited_roc_from_asset_hub_polkadot_works() { #[test] fn report_bridge_status_from_xcm_bridge_router_for_polkadot_works() { - missing_asset_test_utils_test_cases_over_bridge::report_bridge_status_from_xcm_bridge_router_works::< + asset_test_utils::test_cases_over_bridge::report_bridge_status_from_xcm_bridge_router_works::< Runtime, AllPalletsWithoutSystem, XcmConfig, @@ -791,455 +785,3 @@ fn change_xcm_bridge_hub_router_byte_fee_by_governance_works() { }, ) } - -// missing stuff from asset_test_utils::test_cases_over_bridge -// TODO: replace me with direct usages of `asset_test_utils` after deps are bumped to (at least) 1.4 -mod missing_asset_test_utils_test_cases_over_bridge { - use asset_test_utils::test_cases_over_bridge::TestBridgingConfig; - use codec::Encode; - use cumulus_primitives_core::XcmpMessageSource; - use frame_support::{ - assert_ok, - traits::{Currency, Get, OnFinalize, OnInitialize, OriginTrait, ProcessMessageError}, - }; - use frame_system::pallet_prelude::BlockNumberFor; - use parachains_common::{AccountId, Balance}; - use parachains_runtimes_test_utils::{ - mock_open_hrmp_channel, AccountIdOf, BalanceOf, CollatorSessionKeys, ExtBuilder, - RuntimeHelper, ValidatorIdOf, XcmReceivedFrom, - }; - use sp_runtime::{traits::StaticLookup, Saturating}; - use xcm::{latest::prelude::*, VersionedMultiAssets}; - use xcm_builder::{CreateMatcher, MatchXcm}; - use xcm_executor::{ - traits::{ConvertLocation, TransactAsset}, - XcmExecutor, - }; - - /// Helper function to verify `xcm` contains all relevant instructions expected on destination - /// chain as part of a reserve-asset-transfer. - fn assert_matches_reserve_asset_deposited_instructions( - xcm: &mut Xcm, - expected_reserve_assets_deposited: &MultiAssets, - expected_beneficiary: &MultiLocation, - ) { - let _ = xcm - .0 - .matcher() - .skip_inst_while(|inst| !matches!(inst, ReserveAssetDeposited(..))) - .expect("no instruction ReserveAssetDeposited?") - .match_next_inst(|instr| match instr { - ReserveAssetDeposited(reserve_assets) => { - assert_eq!(reserve_assets, expected_reserve_assets_deposited); - Ok(()) - }, - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("expected instruction ReserveAssetDeposited") - .match_next_inst(|instr| match instr { - ClearOrigin => Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("expected instruction ClearOrigin") - .match_next_inst(|instr| match instr { - BuyExecution { .. } => Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("expected instruction BuyExecution") - .match_next_inst(|instr| match instr { - DepositAsset { assets: _, beneficiary } if beneficiary == expected_beneficiary => - Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("expected instruction DepositAsset"); - } - - pub fn limited_reserve_transfer_assets_for_native_asset_works< - Runtime, - AllPalletsWithoutSystem, - XcmConfig, - HrmpChannelOpener, - HrmpChannelSource, - LocationToAccountId, - >( - collator_session_keys: CollatorSessionKeys, - existential_deposit: BalanceOf, - alice_account: AccountIdOf, - unwrap_pallet_xcm_event: Box) -> Option>>, - unwrap_xcmp_queue_event: Box< - dyn Fn(Vec) -> Option>, - >, - prepare_configuration: fn() -> TestBridgingConfig, - weight_limit: WeightLimit, - maybe_paid_export_message: Option, - delivery_fees_account: Option>, - ) where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + cumulus_pallet_parachain_system::Config - + cumulus_pallet_xcmp_queue::Config, - AllPalletsWithoutSystem: - OnInitialize> + OnFinalize>, - AccountIdOf: Into<[u8; 32]>, - ValidatorIdOf: From>, - BalanceOf: From, - ::Balance: From + Into, - XcmConfig: xcm_executor::Config, - LocationToAccountId: ConvertLocation>, - ::AccountId: - Into<<::RuntimeOrigin as OriginTrait>::AccountId>, - <::Lookup as StaticLookup>::Source: - From<::AccountId>, - ::AccountId: From, - HrmpChannelOpener: frame_support::inherent::ProvideInherent< - Call = cumulus_pallet_parachain_system::Call, - >, - HrmpChannelSource: XcmpMessageSource, - { - let runtime_para_id = 1000; - ExtBuilder::::default() - .with_collators(collator_session_keys.collators()) - .with_session_keys(collator_session_keys.session_keys()) - .with_tracing() - .with_safe_xcm_version(3) - .with_para_id(runtime_para_id.into()) - .build() - .execute_with(|| { - let mut alice = [0u8; 32]; - alice[0] = 1; - let included_head = RuntimeHelper::::run_to_block( - 2, - AccountId::from(alice).into(), - ); - - // prepare bridge config - let TestBridgingConfig { - bridged_network, - local_bridge_hub_para_id, - bridged_target_location: target_location_from_different_consensus, - .. - } = prepare_configuration(); - - let reserve_account = LocationToAccountId::convert_location( - &target_location_from_different_consensus, - ) - .expect("Sovereign account for reserves"); - let balance_to_transfer = 1_000_000_000_000_u128; - let native_asset = MultiLocation::parent(); - - // open HRMP to bridge hub - mock_open_hrmp_channel::( - runtime_para_id.into(), - local_bridge_hub_para_id.into(), - included_head, - &alice, - ); - - // drip ED to account - let alice_account_init_balance = existential_deposit + balance_to_transfer.into(); - let _ = >::deposit_creating( - &alice_account, - alice_account_init_balance, - ); - // SA of target location needs to have at least ED, otherwise making reserve fails - let _ = >::deposit_creating( - &reserve_account, - existential_deposit, - ); - - // we just check here, that user retains enough balance after withdrawal - // and also we check if `balance_to_transfer` is more than `existential_deposit`, - assert!( - (>::free_balance(&alice_account) - - balance_to_transfer.into()) >= - existential_deposit - ); - // SA has just ED - assert_eq!( - >::free_balance(&reserve_account), - existential_deposit - ); - - let delivery_fees_account_balance_before = delivery_fees_account - .as_ref() - .map(|dfa| >::free_balance(dfa)) - .unwrap_or(0.into()); - - // local native asset (pallet_balances) - let asset_to_transfer = MultiAsset { - fun: Fungible(balance_to_transfer.into()), - id: Concrete(native_asset), - }; - - // destination is (some) account relative to the destination different consensus - let target_destination_account = MultiLocation { - parents: 0, - interior: X1(AccountId32 { - network: Some(bridged_network), - id: sp_runtime::AccountId32::new([3; 32]).into(), - }), - }; - - let assets_to_transfer = MultiAssets::from(asset_to_transfer); - let mut expected_assets = assets_to_transfer.clone(); - let context = XcmConfig::UniversalLocation::get(); - expected_assets - .reanchor(&target_location_from_different_consensus, context) - .unwrap(); - - let expected_beneficiary = target_destination_account; - - // Make sure sender has enough funds for paying delivery fees - let handling_delivery_fees = { - // Probable XCM with `ReserveAssetDeposited`. - let mut expected_reserve_asset_deposited_message = Xcm(vec![ - ReserveAssetDeposited(MultiAssets::from(expected_assets.clone())), - ClearOrigin, - BuyExecution { - fees: MultiAsset { - id: Concrete(Default::default()), - fun: Fungible(balance_to_transfer), - }, - weight_limit: Unlimited, - }, - DepositAsset { - assets: Wild(AllCounted(1)), - beneficiary: expected_beneficiary, - }, - SetTopic([ - 220, 188, 144, 32, 213, 83, 111, 175, 44, 210, 111, 19, 90, 165, 191, - 112, 140, 247, 192, 124, 42, 17, 153, 141, 114, 34, 189, 20, 83, 69, - 237, 173, - ]), - ]); - assert_matches_reserve_asset_deposited_instructions( - &mut expected_reserve_asset_deposited_message, - &expected_assets, - &expected_beneficiary, - ); - - // Call `SendXcm::validate` to get delivery fees. - let (_, delivery_fees): (_, MultiAssets) = XcmConfig::XcmSender::validate( - &mut Some(target_location_from_different_consensus), - &mut Some(expected_reserve_asset_deposited_message), - ) - .expect("validate passes"); - // Drip delivery fee to Alice account. - let mut delivery_fees_added = false; - for delivery_fee in delivery_fees.inner() { - assert_ok!(::deposit_asset( - &delivery_fee, - &MultiLocation { - parents: 0, - interior: X1(AccountId32 { - network: None, - id: alice_account.clone().into(), - }), - }, - None, - )); - delivery_fees_added = true; - } - delivery_fees_added - }; - - // do pallet_xcm call reserve transfer - assert_ok!(>::limited_reserve_transfer_assets( - RuntimeHelper::::origin_of( - alice_account.clone() - ), - Box::new(target_location_from_different_consensus.into_versioned()), - Box::new(target_destination_account.into_versioned()), - Box::new(VersionedMultiAssets::from(assets_to_transfer)), - 0, - weight_limit, - )); - - // check events - // check pallet_xcm attempted - RuntimeHelper::::assert_pallet_xcm_event_outcome( - &unwrap_pallet_xcm_event, - |outcome| { - assert_ok!(outcome.ensure_complete()); - }, - ); - - // check that xcm was sent - let xcm_sent_message_hash = >::events() - .into_iter() - .filter_map(|e| unwrap_xcmp_queue_event(e.event.encode())) - .find_map(|e| match e { - cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { message_hash } => - Some(message_hash), - _ => None, - }); - - // read xcm - let xcm_sent = - RuntimeHelper::::take_xcm( - local_bridge_hub_para_id.into(), - ) - .unwrap(); - assert_eq!( - xcm_sent_message_hash, - Some(xcm_sent.using_encoded(sp_io::hashing::blake2_256)) - ); - let mut xcm_sent: Xcm<()> = xcm_sent.try_into().expect("versioned xcm"); - - // check sent XCM ExportMessage to BridgeHub - - // 1. check paid or unpaid - if let Some(expected_fee_asset_id) = maybe_paid_export_message { - xcm_sent - .0 - .matcher() - .match_next_inst(|instr| match instr { - WithdrawAsset(_) => Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("contains WithdrawAsset") - .match_next_inst(|instr| match instr { - BuyExecution { fees, .. } if fees.id.eq(&expected_fee_asset_id) => - Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("contains BuyExecution") - } else { - xcm_sent - .0 - .matcher() - .match_next_inst(|instr| match instr { - // first instruction could be UnpaidExecution (because we could have - // explicit unpaid execution on BridgeHub) - UnpaidExecution { weight_limit, check_origin } - if weight_limit == &Unlimited && check_origin.is_none() => - Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("contains UnpaidExecution") - } - // 2. check ExportMessage - .match_next_inst(|instr| match instr { - // next instruction is ExportMessage - ExportMessage { network, destination, xcm: inner_xcm } => { - assert_eq!(network, &bridged_network); - let (_, target_location_junctions_without_global_consensus) = - target_location_from_different_consensus - .interior - .split_global() - .expect("split works"); - assert_eq!( - destination, - &target_location_junctions_without_global_consensus - ); - assert_matches_reserve_asset_deposited_instructions( - inner_xcm, - &expected_assets, - &expected_beneficiary, - ); - Ok(()) - }, - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("contains ExportMessage"); - - // check alice account decreased by balance_to_transfer - assert_eq!( - >::free_balance(&alice_account), - alice_account_init_balance - .saturating_sub(existential_deposit) - .saturating_sub(balance_to_transfer.into()) - ); - - // check reserve account increased by balance_to_transfer - assert_eq!( - >::free_balance(&reserve_account), - existential_deposit + balance_to_transfer.into() - ); - - // check dedicated account increased by delivery fees (if configured) - if handling_delivery_fees { - if let Some(delivery_fees_account) = delivery_fees_account { - let delivery_fees_account_balance_after = - >::free_balance( - &delivery_fees_account, - ); - assert!( - delivery_fees_account_balance_after > - delivery_fees_account_balance_before - ); - } - } - }) - } - - pub fn report_bridge_status_from_xcm_bridge_router_works< - Runtime, - AllPalletsWithoutSystem, - XcmConfig, - LocationToAccountId, - XcmBridgeHubRouterInstance, - >( - collator_session_keys: CollatorSessionKeys, - prepare_configuration: fn() -> TestBridgingConfig, - congested_message: fn() -> Xcm, - uncongested_message: fn() -> Xcm, - ) where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + cumulus_pallet_parachain_system::Config - + cumulus_pallet_xcmp_queue::Config - + pallet_xcm_bridge_hub_router::Config, - AllPalletsWithoutSystem: - OnInitialize> + OnFinalize>, - AccountIdOf: Into<[u8; 32]>, - ValidatorIdOf: From>, - BalanceOf: From, - ::Balance: From + Into, - XcmConfig: xcm_executor::Config, - LocationToAccountId: ConvertLocation>, - ::AccountId: - Into<<::RuntimeOrigin as OriginTrait>::AccountId>, - <::Lookup as StaticLookup>::Source: - From<::AccountId>, - ::AccountId: From, - XcmBridgeHubRouterInstance: 'static, - { - ExtBuilder::::default() - .with_collators(collator_session_keys.collators()) - .with_session_keys(collator_session_keys.session_keys()) - .with_tracing() - .build() - .execute_with(|| { - let report_bridge_status = |is_congested: bool| { - // prepare bridge config - let TestBridgingConfig { local_bridge_hub_location, .. } = prepare_configuration(); - - // Call received XCM execution - let xcm = if is_congested { congested_message() } else { uncongested_message() }; - let hash = xcm.using_encoded(sp_io::hashing::blake2_256); - - // execute xcm as XcmpQueue would do - let outcome = XcmExecutor::::execute_xcm( - local_bridge_hub_location, - xcm, - hash, - RuntimeHelper::::xcm_max_weight(XcmReceivedFrom::Sibling), - ); - assert_eq!(outcome.ensure_complete(), Ok(())); - assert_eq!(is_congested, pallet_xcm_bridge_hub_router::Pallet::::bridge().is_congested); - }; - - report_bridge_status(true); - report_bridge_status(false); - }) - } -} diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index e5c53f39b2..66fc1fa067 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -544,12 +544,6 @@ asset_test_utils::include_teleports_for_native_asset_works!( _ => None, } }), - Box::new(|runtime_event_encoded: Vec| { - match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { - Ok(RuntimeEvent::XcmpQueue(event)) => Some(event), - _ => None, - } - }), 1000 ); @@ -682,7 +676,7 @@ fn bridging_to_asset_hub_kusama() -> TestBridgingConfig { #[test] fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_kusama_works() { - missing_asset_test_utils_test_cases_over_bridge::limited_reserve_transfer_assets_for_native_asset_works::< + asset_test_utils::test_cases_over_bridge::limited_reserve_transfer_assets_for_native_asset_works::< Runtime, AllPalletsWithoutSystem, XcmConfig, @@ -708,7 +702,7 @@ fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_kusama_works() bridging_to_asset_hub_kusama, WeightLimit::Unlimited, Some(XcmBridgeHubRouterFeeAssetId::get()), - TreasuryAccount::get(), + Some(TreasuryAccount::get()), ) } #[test] @@ -737,7 +731,7 @@ fn receive_reserve_asset_deposited_roc_from_asset_hub_kusama_works() { } #[test] fn report_bridge_status_from_xcm_bridge_router_for_kusama_works() { - missing_asset_test_utils_test_cases_over_bridge::report_bridge_status_from_xcm_bridge_router_works::< + asset_test_utils::test_cases_over_bridge::report_bridge_status_from_xcm_bridge_router_works::< Runtime, AllPalletsWithoutSystem, XcmConfig, @@ -816,455 +810,3 @@ fn change_xcm_bridge_hub_router_byte_fee_by_governance_works() { }, ) } - -// missing stuff from asset_test_utils::test_cases_over_bridge -// TODO: replace me with direct usages of `asset_test_utils` after deps are bumped to (at least) 1.4 -mod missing_asset_test_utils_test_cases_over_bridge { - use asset_test_utils::test_cases_over_bridge::TestBridgingConfig; - use codec::Encode; - use cumulus_primitives_core::XcmpMessageSource; - use frame_support::{ - assert_ok, - traits::{Currency, Get, OnFinalize, OnInitialize, OriginTrait, ProcessMessageError}, - }; - use frame_system::pallet_prelude::BlockNumberFor; - use parachains_common::{AccountId, Balance}; - use parachains_runtimes_test_utils::{ - mock_open_hrmp_channel, AccountIdOf, BalanceOf, CollatorSessionKeys, ExtBuilder, - RuntimeHelper, ValidatorIdOf, XcmReceivedFrom, - }; - use sp_runtime::{traits::StaticLookup, Saturating}; - use xcm::{latest::prelude::*, VersionedMultiAssets}; - use xcm_builder::{CreateMatcher, MatchXcm}; - use xcm_executor::{ - traits::{ConvertLocation, TransactAsset}, - XcmExecutor, - }; - - /// Helper function to verify `xcm` contains all relevant instructions expected on destination - /// chain as part of a reserve-asset-transfer. - fn assert_matches_reserve_asset_deposited_instructions( - xcm: &mut Xcm, - expected_reserve_assets_deposited: &MultiAssets, - expected_beneficiary: &MultiLocation, - ) { - let _ = xcm - .0 - .matcher() - .skip_inst_while(|inst| !matches!(inst, ReserveAssetDeposited(..))) - .expect("no instruction ReserveAssetDeposited?") - .match_next_inst(|instr| match instr { - ReserveAssetDeposited(reserve_assets) => { - assert_eq!(reserve_assets, expected_reserve_assets_deposited); - Ok(()) - }, - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("expected instruction ReserveAssetDeposited") - .match_next_inst(|instr| match instr { - ClearOrigin => Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("expected instruction ClearOrigin") - .match_next_inst(|instr| match instr { - BuyExecution { .. } => Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("expected instruction BuyExecution") - .match_next_inst(|instr| match instr { - DepositAsset { assets: _, beneficiary } if beneficiary == expected_beneficiary => - Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("expected instruction DepositAsset"); - } - - pub fn limited_reserve_transfer_assets_for_native_asset_works< - Runtime, - AllPalletsWithoutSystem, - XcmConfig, - HrmpChannelOpener, - HrmpChannelSource, - LocationToAccountId, - >( - collator_session_keys: CollatorSessionKeys, - existential_deposit: BalanceOf, - alice_account: AccountIdOf, - unwrap_pallet_xcm_event: Box) -> Option>>, - unwrap_xcmp_queue_event: Box< - dyn Fn(Vec) -> Option>, - >, - prepare_configuration: fn() -> TestBridgingConfig, - weight_limit: WeightLimit, - maybe_paid_export_message: Option, - delivery_fees_account: Option>, - ) where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + cumulus_pallet_parachain_system::Config - + cumulus_pallet_xcmp_queue::Config, - AllPalletsWithoutSystem: - OnInitialize> + OnFinalize>, - AccountIdOf: Into<[u8; 32]>, - ValidatorIdOf: From>, - BalanceOf: From, - ::Balance: From + Into, - XcmConfig: xcm_executor::Config, - LocationToAccountId: ConvertLocation>, - ::AccountId: - Into<<::RuntimeOrigin as OriginTrait>::AccountId>, - <::Lookup as StaticLookup>::Source: - From<::AccountId>, - ::AccountId: From, - HrmpChannelOpener: frame_support::inherent::ProvideInherent< - Call = cumulus_pallet_parachain_system::Call, - >, - HrmpChannelSource: XcmpMessageSource, - { - let runtime_para_id = 1000; - ExtBuilder::::default() - .with_collators(collator_session_keys.collators()) - .with_session_keys(collator_session_keys.session_keys()) - .with_tracing() - .with_safe_xcm_version(3) - .with_para_id(runtime_para_id.into()) - .build() - .execute_with(|| { - let mut alice = [0u8; 32]; - alice[0] = 1; - let included_head = RuntimeHelper::::run_to_block( - 2, - AccountId::from(alice).into(), - ); - - // prepare bridge config - let TestBridgingConfig { - bridged_network, - local_bridge_hub_para_id, - bridged_target_location: target_location_from_different_consensus, - .. - } = prepare_configuration(); - - let reserve_account = LocationToAccountId::convert_location( - &target_location_from_different_consensus, - ) - .expect("Sovereign account for reserves"); - let balance_to_transfer = 1_000_000_000_000_u128; - let native_asset = MultiLocation::parent(); - - // open HRMP to bridge hub - mock_open_hrmp_channel::( - runtime_para_id.into(), - local_bridge_hub_para_id.into(), - included_head, - &alice, - ); - - // drip ED to account - let alice_account_init_balance = existential_deposit + balance_to_transfer.into(); - let _ = >::deposit_creating( - &alice_account, - alice_account_init_balance, - ); - // SA of target location needs to have at least ED, otherwise making reserve fails - let _ = >::deposit_creating( - &reserve_account, - existential_deposit, - ); - - // we just check here, that user retains enough balance after withdrawal - // and also we check if `balance_to_transfer` is more than `existential_deposit`, - assert!( - (>::free_balance(&alice_account) - - balance_to_transfer.into()) >= - existential_deposit - ); - // SA has just ED - assert_eq!( - >::free_balance(&reserve_account), - existential_deposit - ); - - let delivery_fees_account_balance_before = delivery_fees_account - .as_ref() - .map(|dfa| >::free_balance(dfa)) - .unwrap_or(0.into()); - - // local native asset (pallet_balances) - let asset_to_transfer = MultiAsset { - fun: Fungible(balance_to_transfer.into()), - id: Concrete(native_asset), - }; - - // destination is (some) account relative to the destination different consensus - let target_destination_account = MultiLocation { - parents: 0, - interior: X1(AccountId32 { - network: Some(bridged_network), - id: sp_runtime::AccountId32::new([3; 32]).into(), - }), - }; - - let assets_to_transfer = MultiAssets::from(asset_to_transfer); - let mut expected_assets = assets_to_transfer.clone(); - let context = XcmConfig::UniversalLocation::get(); - expected_assets - .reanchor(&target_location_from_different_consensus, context) - .unwrap(); - - let expected_beneficiary = target_destination_account; - - // Make sure sender has enough funds for paying delivery fees - let handling_delivery_fees = { - // Probable XCM with `ReserveAssetDeposited`. - let mut expected_reserve_asset_deposited_message = Xcm(vec![ - ReserveAssetDeposited(MultiAssets::from(expected_assets.clone())), - ClearOrigin, - BuyExecution { - fees: MultiAsset { - id: Concrete(Default::default()), - fun: Fungible(balance_to_transfer), - }, - weight_limit: Unlimited, - }, - DepositAsset { - assets: Wild(AllCounted(1)), - beneficiary: expected_beneficiary, - }, - SetTopic([ - 220, 188, 144, 32, 213, 83, 111, 175, 44, 210, 111, 19, 90, 165, 191, - 112, 140, 247, 192, 124, 42, 17, 153, 141, 114, 34, 189, 20, 83, 69, - 237, 173, - ]), - ]); - assert_matches_reserve_asset_deposited_instructions( - &mut expected_reserve_asset_deposited_message, - &expected_assets, - &expected_beneficiary, - ); - - // Call `SendXcm::validate` to get delivery fees. - let (_, delivery_fees): (_, MultiAssets) = XcmConfig::XcmSender::validate( - &mut Some(target_location_from_different_consensus), - &mut Some(expected_reserve_asset_deposited_message), - ) - .expect("validate passes"); - // Drip delivery fee to Alice account. - let mut delivery_fees_added = false; - for delivery_fee in delivery_fees.inner() { - assert_ok!(::deposit_asset( - &delivery_fee, - &MultiLocation { - parents: 0, - interior: X1(AccountId32 { - network: None, - id: alice_account.clone().into(), - }), - }, - None, - )); - delivery_fees_added = true; - } - delivery_fees_added - }; - - // do pallet_xcm call reserve transfer - assert_ok!(>::limited_reserve_transfer_assets( - RuntimeHelper::::origin_of( - alice_account.clone() - ), - Box::new(target_location_from_different_consensus.into_versioned()), - Box::new(target_destination_account.into_versioned()), - Box::new(VersionedMultiAssets::from(assets_to_transfer)), - 0, - weight_limit, - )); - - // check events - // check pallet_xcm attempted - RuntimeHelper::::assert_pallet_xcm_event_outcome( - &unwrap_pallet_xcm_event, - |outcome| { - assert_ok!(outcome.ensure_complete()); - }, - ); - - // check that xcm was sent - let xcm_sent_message_hash = >::events() - .into_iter() - .filter_map(|e| unwrap_xcmp_queue_event(e.event.encode())) - .find_map(|e| match e { - cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { message_hash } => - Some(message_hash), - _ => None, - }); - - // read xcm - let xcm_sent = - RuntimeHelper::::take_xcm( - local_bridge_hub_para_id.into(), - ) - .unwrap(); - assert_eq!( - xcm_sent_message_hash, - Some(xcm_sent.using_encoded(sp_io::hashing::blake2_256)) - ); - let mut xcm_sent: Xcm<()> = xcm_sent.try_into().expect("versioned xcm"); - - // check sent XCM ExportMessage to BridgeHub - - // 1. check paid or unpaid - if let Some(expected_fee_asset_id) = maybe_paid_export_message { - xcm_sent - .0 - .matcher() - .match_next_inst(|instr| match instr { - WithdrawAsset(_) => Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("contains WithdrawAsset") - .match_next_inst(|instr| match instr { - BuyExecution { fees, .. } if fees.id.eq(&expected_fee_asset_id) => - Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("contains BuyExecution") - } else { - xcm_sent - .0 - .matcher() - .match_next_inst(|instr| match instr { - // first instruction could be UnpaidExecution (because we could have - // explicit unpaid execution on BridgeHub) - UnpaidExecution { weight_limit, check_origin } - if weight_limit == &Unlimited && check_origin.is_none() => - Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("contains UnpaidExecution") - } - // 2. check ExportMessage - .match_next_inst(|instr| match instr { - // next instruction is ExportMessage - ExportMessage { network, destination, xcm: inner_xcm } => { - assert_eq!(network, &bridged_network); - let (_, target_location_junctions_without_global_consensus) = - target_location_from_different_consensus - .interior - .split_global() - .expect("split works"); - assert_eq!( - destination, - &target_location_junctions_without_global_consensus - ); - assert_matches_reserve_asset_deposited_instructions( - inner_xcm, - &expected_assets, - &expected_beneficiary, - ); - Ok(()) - }, - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("contains ExportMessage"); - - // check alice account decreased by balance_to_transfer - assert_eq!( - >::free_balance(&alice_account), - alice_account_init_balance - .saturating_sub(existential_deposit) - .saturating_sub(balance_to_transfer.into()) - ); - - // check reserve account increased by balance_to_transfer - assert_eq!( - >::free_balance(&reserve_account), - existential_deposit + balance_to_transfer.into() - ); - - // check dedicated account increased by delivery fees (if configured) - if handling_delivery_fees { - if let Some(delivery_fees_account) = delivery_fees_account { - let delivery_fees_account_balance_after = - >::free_balance( - &delivery_fees_account, - ); - assert!( - delivery_fees_account_balance_after > - delivery_fees_account_balance_before - ); - } - } - }) - } - - pub fn report_bridge_status_from_xcm_bridge_router_works< - Runtime, - AllPalletsWithoutSystem, - XcmConfig, - LocationToAccountId, - XcmBridgeHubRouterInstance, - >( - collator_session_keys: CollatorSessionKeys, - prepare_configuration: fn() -> TestBridgingConfig, - congested_message: fn() -> Xcm, - uncongested_message: fn() -> Xcm, - ) where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + cumulus_pallet_parachain_system::Config - + cumulus_pallet_xcmp_queue::Config - + pallet_xcm_bridge_hub_router::Config, - AllPalletsWithoutSystem: - OnInitialize> + OnFinalize>, - AccountIdOf: Into<[u8; 32]>, - ValidatorIdOf: From>, - BalanceOf: From, - ::Balance: From + Into, - XcmConfig: xcm_executor::Config, - LocationToAccountId: ConvertLocation>, - ::AccountId: - Into<<::RuntimeOrigin as OriginTrait>::AccountId>, - <::Lookup as StaticLookup>::Source: - From<::AccountId>, - ::AccountId: From, - XcmBridgeHubRouterInstance: 'static, - { - ExtBuilder::::default() - .with_collators(collator_session_keys.collators()) - .with_session_keys(collator_session_keys.session_keys()) - .with_tracing() - .build() - .execute_with(|| { - let report_bridge_status = |is_congested: bool| { - // prepare bridge config - let TestBridgingConfig { local_bridge_hub_location, .. } = prepare_configuration(); - - // Call received XCM execution - let xcm = if is_congested { congested_message() } else { uncongested_message() }; - let hash = xcm.using_encoded(sp_io::hashing::blake2_256); - - // execute xcm as XcmpQueue would do - let outcome = XcmExecutor::::execute_xcm( - local_bridge_hub_location, - xcm, - hash, - RuntimeHelper::::xcm_max_weight(XcmReceivedFrom::Sibling), - ); - assert_eq!(outcome.ensure_complete(), Ok(())); - assert_eq!(is_congested, pallet_xcm_bridge_hub_router::Pallet::::bridge().is_congested); - }; - - report_bridge_status(true); - report_bridge_status(false); - }) - } -} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 3757049be3..fb3255908a 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -25,6 +25,7 @@ bp-asset-hub-polkadot = { path = "../../asset-hubs/asset-hub-polkadot/primitives bp-bridge-hub-kusama = { path = "./primitives", default-features = false} bp-bridge-hub-polkadot = { path = "../bridge-hub-polkadot/primitives", default-features = false} kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-features = false} +polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } @@ -97,6 +98,7 @@ pallet-bridge-grandpa = { default-features = false , version = "0.6.0" } pallet-bridge-messages = { default-features = false , version = "0.6.0" } pallet-bridge-parachains = { default-features = false , version = "0.6.0" } pallet-bridge-relayers = { default-features = false , version = "0.6.0" } +pallet-xcm-bridge-hub = { default-features = false , version = "0.1.0" } [dev-dependencies] bridge-hub-test-utils = { version = "0.6.0" } @@ -154,12 +156,14 @@ std = [ "pallet-transaction-payment/std", "pallet-utility/std", "pallet-xcm-benchmarks?/std", + "pallet-xcm-bridge-hub/std", "pallet-xcm/std", "parachain-info/std", "parachains-common/std", "polkadot-core-primitives/std", "polkadot-parachain-primitives/std", "polkadot-runtime-common/std", + "polkadot-runtime-constants/std", "scale-info/std", "serde", "sp-api/std", @@ -205,6 +209,7 @@ runtime-benchmarks = [ "pallet-timestamp/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks", + "pallet-xcm-bridge-hub/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "parachains-common/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", @@ -238,6 +243,7 @@ try-runtime = [ "pallet-timestamp/try-runtime", "pallet-transaction-payment/try-runtime", "pallet-utility/try-runtime", + "pallet-xcm-bridge-hub/try-runtime", "pallet-xcm/try-runtime", "parachain-info/try-runtime", "polkadot-runtime-common/try-runtime", diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs index 7379898b60..90642c0fee 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs @@ -20,7 +20,7 @@ use crate::{ weights, xcm_config::{UniversalLocation, XcmRouter}, AccountId, Balance, Balances, BlockNumber, BridgePolkadotMessages, Runtime, RuntimeEvent, - RuntimeOrigin, + RuntimeOrigin, XcmOverBridgeHubPolkadot, }; use bp_messages::LaneId; use bp_parachains::SingleParaStoredHeaderDataBuilder; @@ -48,7 +48,7 @@ use xcm::{ latest::prelude::*, prelude::{InteriorMultiLocation, NetworkId}, }; -use xcm_builder::{BridgeBlobDispatcher, HaulBlobExporter}; +use xcm_builder::BridgeBlobDispatcher; /// Lane identifier, used to connect Kusama Asset Hub and Polkadot Asset Hub. pub const XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT: LaneId = LaneId([0, 0, 0, 1]); @@ -82,12 +82,30 @@ parameter_types! { /// Identifier of the sibling Kusama Asset Hub parachain. pub AssetHubKusamaParaId: cumulus_primitives_core::ParaId = kusama_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + /// Identifier of the bridged Polkadot Asset Hub parachain. + pub AssetHubPolkadotParaId: cumulus_primitives_core::ParaId = polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + /// A route (XCM location and bridge lane) that the Kusama Asset Hub -> Polkadot Asset Hub /// message is following. pub FromAssetHubKusamaToAssetHubPolkadotRoute: SenderAndLane = SenderAndLane::new( ParentThen(X1(Parachain(AssetHubKusamaParaId::get().into()))).into(), XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, ); + + /// Lane identifier, used to connect Kusama Asset Hub and Polkadot Asset Hub. + pub const AssetHubKusamaToAssetHubPolkadotMessagesLane: bp_messages::LaneId + = XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT; + /// All active lanes that the current bridge supports. + pub ActiveOutboundLanesToBridgeHubPolkadot: &'static [bp_messages::LaneId] + = &[XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT]; + + /// Lanes + pub ActiveLanes: sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorMultiLocation))> = sp_std::vec![ + ( + FromAssetHubKusamaToAssetHubPolkadotRoute::get(), + (PolkadotGlobalConsensusNetwork::get(), X1(Parachain(AssetHubPolkadotParaId::get().into()))) + ) + ]; } // Parameters, used by bridge transport code. @@ -120,13 +138,6 @@ parameter_types! { pub const MaxUnconfirmedMessagesAtInboundLane: bp_messages::MessageNonce = bp_bridge_hub_polkadot::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; - /// Lane identifier, used to connect Kusama Asset Hub and Polkadot Asset Hub. - pub const AssetHubKusamaToAssetHubPolkadotMessagesLane: bp_messages::LaneId - = XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT; - /// All active lanes that the current bridge supports. - pub ActiveOutboundLanesToBridgeHubPolkadot: &'static [bp_messages::LaneId] - = &[XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT]; - /// Reserve identifier, used by the `pallet_bridge_relayers` to hold funds of registered relayer. pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs"; /// Minimal period of relayer registration. Roughly, it is the 1 hour of real time. @@ -231,24 +242,30 @@ type FromPolkadotMessageBlobDispatcher = BridgeBlobDispatcher< >; /// Export XCM messages to be relayed to the other side -pub type ToBridgeHubPolkadotHaulBlobExporter = HaulBlobExporter< - XcmBlobHaulerAdapter, - PolkadotGlobalConsensusNetwork, - (), ->; +pub type ToBridgeHubPolkadotHaulBlobExporter = XcmOverBridgeHubPolkadot; pub struct ToBridgeHubPolkadotXcmBlobHauler; impl XcmBlobHauler for ToBridgeHubPolkadotXcmBlobHauler { type Runtime = Runtime; type MessagesInstance = WithBridgeHubPolkadotMessagesInstance; - type SenderAndLane = FromAssetHubKusamaToAssetHubPolkadotRoute; type ToSourceChainSender = XcmRouter; type CongestedMessage = bp_asset_hub_kusama::CongestedMessage; type UncongestedMessage = bp_asset_hub_kusama::UncongestedMessage; } +/// Add support for the export and dispatch of XCM programs. +pub type XcmOverBridgeHubPolkadotInstance = pallet_xcm_bridge_hub::Instance1; +impl pallet_xcm_bridge_hub::Config for Runtime { + type UniversalLocation = UniversalLocation; + type BridgedNetworkId = PolkadotGlobalConsensusNetwork; + type BridgeMessagesPalletInstance = WithBridgeHubPolkadotMessagesInstance; + type MessageExportPrice = (); + type Lanes = ActiveLanes; + type LanesSupport = ToBridgeHubPolkadotXcmBlobHauler; +} + /// On messages delivered callback. -type OnMessagesDeliveredFromPolkadot = XcmBlobHaulerAdapter; +type OnMessagesDeliveredFromPolkadot = XcmBlobHaulerAdapter; /// Messaging Bridge configuration for BridgeHubKusama -> BridgeHubPolkadot pub struct WithBridgeHubPolkadotMessageBridge; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index e36a3b8730..0d29533973 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -506,6 +506,7 @@ construct_runtime!( BridgePolkadotGrandpa: pallet_bridge_grandpa::::{Pallet, Call, Storage, Event, Config} = 51, BridgePolkadotParachains: pallet_bridge_parachains::::{Pallet, Call, Storage, Event} = 52, BridgePolkadotMessages: pallet_bridge_messages::::{Pallet, Call, Storage, Event, Config} = 53, + XcmOverBridgeHubPolkadot: pallet_xcm_bridge_hub::::{Pallet} = 54, } ); @@ -934,7 +935,13 @@ impl_runtime_apis! { fn export_message_origin_and_destination( ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { - Ok((KsmRelayLocation::get(), NetworkId::Polkadot, X1(Parachain(1000)))) + Ok( + ( + bridge_to_polkadot_config::FromAssetHubKusamaToAssetHubPolkadotRoute::get().location, + NetworkId::Polkadot, + X1(Parachain(bridge_to_polkadot_config::AssetHubPolkadotParaId::get().into())) + ) + ) } fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index 54a4192851..c015e573a3 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -17,7 +17,7 @@ use bp_polkadot_core::Signature; use bridge_hub_kusama_runtime::{ bridge_to_polkadot_config::{ - BridgeGrandpaPolkadotInstance, BridgeHubPolkadotChainId, BridgeParachainPolkadotInstance, + AssetHubPolkadotParaId, BridgeGrandpaPolkadotInstance, BridgeHubPolkadotChainId, BridgeParachainPolkadotInstance, DeliveryRewardInBalance, PolkadotGlobalConsensusNetwork, RefundBridgeHubPolkadotMessages, RequiredStakeForStakeAndSlash, WithBridgeHubPolkadotMessageBridge, WithBridgeHubPolkadotMessagesInstance, XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, @@ -114,12 +114,6 @@ bridge_hub_test_utils::test_cases::include_teleports_for_native_asset_works!( _ => None, } }), - Box::new(|runtime_event_encoded: Vec| { - match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { - Ok(RuntimeEvent::XcmpQueue(event)) => Some(event), - _ => None, - } - }), 1002 ); @@ -181,7 +175,7 @@ fn handle_export_message_from_system_parachain_add_to_outbound_queue_works() { _ => None, } }), - || ExportMessage { network: Polkadot, destination: X1(Parachain(4321)), xcm: Xcm(vec![]) }, + || ExportMessage { network: Polkadot, destination: X1(Parachain(AssetHubPolkadotParaId::get().into())), xcm: Xcm(vec![]) }, XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, Some((KsmRelayLocation::get(), ExistentialDeposit::get()).into()), // value should be >= than value generated by `can_calculate_weight_for_paid_export_message_with_reserve_transfer` diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 6017d26b95..8998059db7 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -24,6 +24,7 @@ bp-asset-hub-kusama = { path = "../../asset-hubs/asset-hub-kusama/primitives", d bp-asset-hub-polkadot = { path = "../../asset-hubs/asset-hub-polkadot/primitives", default-features = false} bp-bridge-hub-kusama = { path = "../bridge-hub-kusama/primitives", default-features = false} bp-bridge-hub-polkadot = { path = "../bridge-hub-polkadot/primitives", default-features = false} +kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-features = false} polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate @@ -97,6 +98,7 @@ pallet-bridge-grandpa = { default-features = false , version = "0.6.0" } pallet-bridge-messages = { default-features = false , version = "0.6.0" } pallet-bridge-parachains = { default-features = false , version = "0.6.0" } pallet-bridge-relayers = { default-features = false , version = "0.6.0" } +pallet-xcm-bridge-hub = { default-features = false , version = "0.1.0" } [dev-dependencies] bridge-hub-test-utils = { version = "0.6.0" } @@ -137,6 +139,7 @@ std = [ "frame-system/std", "frame-try-runtime?/std", "log/std", + "kusama-runtime-constants/std", "pallet-aura/std", "pallet-authorship/std", "pallet-balances/std", @@ -153,6 +156,7 @@ std = [ "pallet-transaction-payment/std", "pallet-utility/std", "pallet-xcm-benchmarks?/std", + "pallet-xcm-bridge-hub/std", "pallet-xcm/std", "parachain-info/std", "parachains-common/std", @@ -205,6 +209,7 @@ runtime-benchmarks = [ "pallet-timestamp/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks", + "pallet-xcm-bridge-hub/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", @@ -237,6 +242,7 @@ try-runtime = [ "pallet-timestamp/try-runtime", "pallet-transaction-payment/try-runtime", "pallet-utility/try-runtime", + "pallet-xcm-bridge-hub/try-runtime", "pallet-xcm/try-runtime", "parachain-info/try-runtime", "polkadot-runtime-common/try-runtime", diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs index 4911e3444f..9a592445e4 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs @@ -20,7 +20,7 @@ use crate::{ weights, xcm_config::{UniversalLocation, XcmRouter}, AccountId, Balance, Balances, BlockNumber, BridgeKusamaMessages, Runtime, RuntimeEvent, - RuntimeOrigin, + RuntimeOrigin, XcmOverBridgeHubKusama, }; use bp_messages::LaneId; use bp_parachains::SingleParaStoredHeaderDataBuilder; @@ -48,7 +48,7 @@ use xcm::{ latest::prelude::*, prelude::{InteriorMultiLocation, NetworkId}, }; -use xcm_builder::{BridgeBlobDispatcher, HaulBlobExporter}; +use xcm_builder::BridgeBlobDispatcher; /// Lane identifier, used to connect Polkadot Asset Hub and Kusama Asset Hub. pub const XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA: LaneId = LaneId([0, 0, 0, 1]); @@ -82,12 +82,30 @@ parameter_types! { /// Identifier of the sibling Polkadot Asset Hub parachain. pub AssetHubPolkadotParaId: cumulus_primitives_core::ParaId = polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + /// Identifier of the bridged Kusama Asset Hub parachain. + pub AssetHubKusamaParaId: cumulus_primitives_core::ParaId = kusama_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + /// A route (XCM location and bridge lane) that the Polkadot Asset Hub -> Kusama Asset Hub /// message is following. pub FromAssetHubPolkadotToAssetHubKusamaRoute: SenderAndLane = SenderAndLane::new( ParentThen(X1(Parachain(AssetHubPolkadotParaId::get().into()))).into(), XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, ); + + /// Lane identifier, used to connect Polkadot Asset Hub and Kusama Asset Hub. + pub const AssetHubPolkadotToAssetHubKusamaMessagesLane: bp_messages::LaneId + = XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA; + /// All active lanes that the current bridge supports. + pub ActiveOutboundLanesToBridgeHubKusama: &'static [bp_messages::LaneId] + = &[XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA]; + + /// Lanes + pub ActiveLanes: sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorMultiLocation))> = sp_std::vec![ + ( + FromAssetHubPolkadotToAssetHubKusamaRoute::get(), + (KusamaGlobalConsensusNetwork::get(), X1(Parachain(AssetHubKusamaParaId::get().into()))) + ) + ]; } // Parameters, used by bridge transport code. @@ -120,13 +138,6 @@ parameter_types! { pub const MaxUnconfirmedMessagesAtInboundLane: bp_messages::MessageNonce = bp_bridge_hub_kusama::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; - /// Lane identifier, used to connect Polkadot Asset Hub and Kusama Asset Hub. - pub const AssetHubPolkadotToAssetHubKusamaMessagesLane: bp_messages::LaneId - = XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA; - /// All active lanes that the current bridge supports. - pub ActiveOutboundLanesToBridgeHubKusama: &'static [bp_messages::LaneId] - = &[XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA]; - /// Reserve identifier, used by the `pallet_bridge_relayers` to hold funds of registered relayer. pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs"; /// Minimal period of relayer registration. Roughly, it is the 1 hour of real time. @@ -231,24 +242,30 @@ type FromKusamaMessageBlobDispatcher = BridgeBlobDispatcher< >; /// Export XCM messages to be relayed to the other side -pub type ToBridgeHubKusamaHaulBlobExporter = HaulBlobExporter< - XcmBlobHaulerAdapter, - KusamaGlobalConsensusNetwork, - (), ->; +pub type ToBridgeHubKusamaHaulBlobExporter = XcmOverBridgeHubKusama; pub struct ToBridgeHubKusamaXcmBlobHauler; impl XcmBlobHauler for ToBridgeHubKusamaXcmBlobHauler { type Runtime = Runtime; type MessagesInstance = WithBridgeHubKusamaMessagesInstance; - type SenderAndLane = FromAssetHubPolkadotToAssetHubKusamaRoute; type ToSourceChainSender = XcmRouter; type CongestedMessage = bp_asset_hub_polkadot::CongestedMessage; type UncongestedMessage = bp_asset_hub_polkadot::UncongestedMessage; } +/// Add support for the export and dispatch of XCM programs. +pub type XcmOverBridgeHubKusamaInstance = pallet_xcm_bridge_hub::Instance1; +impl pallet_xcm_bridge_hub::Config for Runtime { + type UniversalLocation = UniversalLocation; + type BridgedNetworkId = KusamaGlobalConsensusNetwork; + type BridgeMessagesPalletInstance = WithBridgeHubKusamaMessagesInstance; + type MessageExportPrice = (); + type Lanes = ActiveLanes; + type LanesSupport = ToBridgeHubKusamaXcmBlobHauler; +} + /// On messages delivered callback. -type OnMessagesDeliveredFromKusama = XcmBlobHaulerAdapter; +type OnMessagesDeliveredFromKusama = XcmBlobHaulerAdapter; /// Messaging Bridge configuration for BridgeHubPolkadot -> BridgeHubKusama pub struct WithBridgeHubKusamaMessageBridge; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 76c0e2e3a4..e10b8a6e70 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -506,6 +506,7 @@ construct_runtime!( BridgeKusamaGrandpa: pallet_bridge_grandpa::::{Pallet, Call, Storage, Event, Config} = 51, BridgeKusamaParachains: pallet_bridge_parachains::::{Pallet, Call, Storage, Event} = 52, BridgeKusamaMessages: pallet_bridge_messages::::{Pallet, Call, Storage, Event, Config} = 53, + XcmOverBridgeHubKusama: pallet_xcm_bridge_hub::::{Pallet} = 54, } ); @@ -934,7 +935,13 @@ impl_runtime_apis! { fn export_message_origin_and_destination( ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { - Ok((DotRelayLocation::get(), NetworkId::Kusama, X1(Parachain(1000)))) + Ok( + ( + bridge_to_kusama_config::FromAssetHubPolkadotToAssetHubKusamaRoute::get().location, + NetworkId::Kusama, + X1(Parachain(bridge_to_kusama_config::AssetHubKusamaParaId::get().into())) + ) + ) } fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index b5682ec790..aee5508371 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -17,7 +17,7 @@ use bp_polkadot_core::Signature; use bridge_hub_polkadot_runtime::{ bridge_to_kusama_config::{ - BridgeGrandpaKusamaInstance, BridgeHubKusamaChainId, BridgeParachainKusamaInstance, + AssetHubKusamaParaId, BridgeGrandpaKusamaInstance, BridgeHubKusamaChainId, BridgeParachainKusamaInstance, DeliveryRewardInBalance, KusamaGlobalConsensusNetwork, RefundBridgeHubKusamaMessages, RequiredStakeForStakeAndSlash, WithBridgeHubKusamaMessageBridge, WithBridgeHubKusamaMessagesInstance, XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, @@ -114,12 +114,6 @@ bridge_hub_test_utils::test_cases::include_teleports_for_native_asset_works!( _ => None, } }), - Box::new(|runtime_event_encoded: Vec| { - match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { - Ok(RuntimeEvent::XcmpQueue(event)) => Some(event), - _ => None, - } - }), 1002 ); @@ -181,7 +175,7 @@ fn handle_export_message_from_system_parachain_add_to_outbound_queue_works() { _ => None, } }), - || ExportMessage { network: Kusama, destination: X1(Parachain(4321)), xcm: Xcm(vec![]) }, + || ExportMessage { network: Kusama, destination: X1(Parachain(AssetHubKusamaParaId::get().into())), xcm: Xcm(vec![]) }, XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, Some((DotRelayLocation::get(), ExistentialDeposit::get()).into()), // value should be >= than value generated by `can_calculate_weight_for_paid_export_message_with_reserve_transfer` From ee13de85b1c3bcb6ff35adb0b386fbf5ea7c9302 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 12 Jan 2024 14:50:18 +0100 Subject: [PATCH 019/316] [integration-tests] align integration tests with latest vogue + split: `common` to `common` and `chains` chore: remove unneeded deps with `cargo machete` for integration tests --- .gitignore | 1 + Cargo.lock | 65 ++- Cargo.toml | 2 + .../assets/asset-hub-kusama/Cargo.toml | 15 +- .../assets/asset-hub-kusama/src/lib.rs | 51 +- .../src/tests/hrmp_channels.rs | 196 ------- .../assets/asset-hub-kusama/src/tests/mod.rs | 11 +- .../src/tests/reserve_transfer.rs | 417 +++++++++++--- .../assets/asset-hub-kusama/src/tests/send.rs | 114 +--- .../src/tests/set_xcm_versions.rs | 40 +- .../assets/asset-hub-kusama/src/tests/swap.rs | 162 ++---- .../asset-hub-kusama/src/tests/teleport.rs | 545 +++++++++++++++++- .../assets/asset-hub-polkadot/Cargo.toml | 15 +- .../assets/asset-hub-polkadot/src/lib.rs | 51 +- .../src/tests/hrmp_channels.rs | 190 ------ .../asset-hub-polkadot/src/tests/mod.rs | 11 +- .../src/tests/reserve_transfer.rs | 418 +++++++++++--- .../asset-hub-polkadot/src/tests/send.rs | 117 +--- .../src/tests/set_xcm_versions.rs | 40 +- .../asset-hub-polkadot/src/tests/teleport.rs | 541 ++++++++++++++++- integration-tests/emulated/chains/Cargo.toml | 48 ++ .../constants.rs => chains/src/genesis.rs} | 188 +----- integration-tests/emulated/chains/src/lib.rs | 341 +++++++++++ integration-tests/emulated/common/Cargo.toml | 21 - .../emulated/common/src/impls.rs | 267 +++++++-- integration-tests/emulated/common/src/lib.rs | 415 ++++--------- .../emulated/common/src/macros.rs | 150 ++++- .../emulated/common/src/xcm_helpers.rs | 22 +- 28 files changed, 2822 insertions(+), 1632 deletions(-) delete mode 100644 integration-tests/emulated/assets/asset-hub-kusama/src/tests/hrmp_channels.rs delete mode 100644 integration-tests/emulated/assets/asset-hub-polkadot/src/tests/hrmp_channels.rs create mode 100644 integration-tests/emulated/chains/Cargo.toml rename integration-tests/emulated/{common/src/constants.rs => chains/src/genesis.rs} (77%) create mode 100644 integration-tests/emulated/chains/src/lib.rs diff --git a/.gitignore b/.gitignore index 35e02e706b..4c9006e4e5 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ **/.criterion/ **/*.rs.bk **/chains/ +!integration-tests/emulated/chains **/hfuzz_target/ **/hfuzz_workspace/ **/node_modules diff --git a/Cargo.lock b/Cargo.lock index 4b992dc4de..487665bdd9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -421,20 +421,21 @@ version = "1.0.0" dependencies = [ "assert_matches", "asset-hub-kusama-runtime", + "asset-test-utils", + "emulated-chains", "frame-support 27.0.0", - "frame-system 27.0.0", "integration-tests-common", "pallet-asset-conversion", "pallet-assets 28.0.0", "pallet-balances 27.0.0", + "pallet-message-queue 30.0.0", "pallet-xcm 6.0.0", "parachains-common 6.0.0", "parity-scale-codec", - "polkadot-core-primitives 6.0.0", - "polkadot-parachain-primitives 5.0.0", - "polkadot-runtime-parachains 6.0.0", "sp-runtime 30.0.1", + "staging-kusama-runtime", "staging-xcm 6.0.0", + "staging-xcm-executor 6.0.0", "xcm-emulator", ] @@ -526,20 +527,21 @@ dependencies = [ name = "asset-hub-polkadot-integration-tests" version = "1.0.0" dependencies = [ + "asset-hub-polkadot-runtime", + "asset-test-utils", + "emulated-chains", "frame-support 27.0.0", - "frame-system 27.0.0", "integration-tests-common", - "pallet-asset-conversion", "pallet-assets 28.0.0", "pallet-balances 27.0.0", + "pallet-message-queue 30.0.0", "pallet-xcm 6.0.0", "parachains-common 6.0.0", "parity-scale-codec", - "polkadot-core-primitives 6.0.0", - "polkadot-parachain-primitives 5.0.0", - "polkadot-runtime-parachains 6.0.0", + "polkadot-runtime", "sp-runtime 30.0.1", "staging-xcm 6.0.0", + "staging-xcm-executor 6.0.0", "xcm-emulator", ] @@ -3240,6 +3242,37 @@ dependencies = [ "zeroize", ] +[[package]] +name = "emulated-chains" +version = "1.0.0" +dependencies = [ + "asset-hub-kusama-runtime", + "asset-hub-polkadot-runtime", + "bridge-hub-kusama-runtime", + "bridge-hub-polkadot-runtime", + "collectives-polkadot-runtime", + "frame-support 27.0.0", + "integration-tests-common", + "kusama-runtime-constants", + "pallet-im-online", + "pallet-staking 27.0.0", + "parachains-common 6.0.0", + "penpal-runtime", + "polkadot-parachain-primitives 5.0.0", + "polkadot-primitives 6.0.0", + "polkadot-runtime", + "polkadot-runtime-constants", + "polkadot-runtime-parachains 6.0.0", + "sp-authority-discovery 25.0.0", + "sp-consensus-babe 0.31.0", + "sp-consensus-beefy", + "sp-consensus-grandpa 12.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "staging-kusama-runtime", + "xcm-emulator", +] + [[package]] name = "encode_unicode" version = "0.3.6" @@ -4963,45 +4996,31 @@ dependencies = [ name = "integration-tests-common" version = "1.0.0" dependencies = [ - "asset-hub-kusama-runtime", - "asset-hub-polkadot-runtime", "asset-test-utils", "bp-messages", - "bridge-hub-kusama-runtime", - "bridge-hub-polkadot-runtime", "bridge-runtime-common", - "collectives-polkadot-runtime", "cumulus-pallet-dmp-queue 0.6.0", "cumulus-pallet-parachain-system 0.6.0", "cumulus-pallet-xcmp-queue 0.6.0", "cumulus-primitives-core 0.6.0", "frame-support 27.0.0", - "kusama-runtime-constants", "pallet-assets 28.0.0", "pallet-balances 27.0.0", "pallet-bridge-messages", "pallet-im-online 26.0.0", "pallet-message-queue 30.0.0", - "pallet-staking 27.0.0", "pallet-xcm 6.0.0", "parachains-common 6.0.0", "parity-scale-codec", "paste", - "penpal-runtime", - "polkadot-core-primitives 6.0.0", - "polkadot-parachain-primitives 5.0.0", "polkadot-primitives 6.0.0", - "polkadot-runtime", - "polkadot-runtime-constants", "polkadot-runtime-parachains 6.0.0", - "serde_json", "sp-authority-discovery 25.0.0", "sp-consensus-babe 0.31.0", "sp-consensus-beefy 12.0.0", "sp-consensus-grandpa 12.0.0", "sp-core 27.0.0", "sp-runtime 30.0.1", - "staging-kusama-runtime", "staging-xcm 6.0.0", "xcm-emulator", ] diff --git a/Cargo.toml b/Cargo.toml index d27df9f555..01efeb50b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,6 +28,8 @@ members = [ "system-parachains/gluttons/glutton-kusama", "integration-tests/emulated/assets/asset-hub-kusama", "integration-tests/emulated/assets/asset-hub-polkadot", + "integration-tests/emulated/chains", + "integration-tests/emulated/common", ] [profile.release] diff --git a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml index 287a2ed8ed..8e88b5b843 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml @@ -14,27 +14,26 @@ assert_matches = "1.5.0" # Substrate sp-runtime = { version = "30.0.1" } frame-support = { version = "27.0.0" } -frame-system = { version = "27.0.0" } pallet-assets = { version = "28.0.0" } pallet-balances = { version = "27.0.0" } pallet-asset-conversion = { version = "9.0.0" } +pallet-message-queue = { version = "30.0.0" } # Polkadot -polkadot-core-primitives = { version = "6.0.0" } -polkadot-parachain-primitives = { version = "5.0.0" } -polkadot-runtime-parachains = { version = "6.0.0" } xcm = { package = "staging-xcm", version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } pallet-xcm = { version = "6.0.0" } # Cumulus parachains-common = { version = "6.0.0" } xcm-emulator = { version = "0.4.0" } -asset-hub-kusama-runtime = { path = "../../../../system-parachains/asset-hubs/asset-hub-kusama" } +asset-test-utils = { version = "6.0.0" } # Local +emulated-chains = { path = "../../chains" } integration-tests-common = { path = "../../common" } +asset-hub-kusama-runtime = { path = "../../../../system-parachains/asset-hubs/asset-hub-kusama" } +kusama-runtime = { package = "staging-kusama-runtime", path = "../../../../relay/kusama" } [features] -runtime-benchmarks = [ - "integration-tests-common/runtime-benchmarks" -] +runtime-benchmarks = [] \ No newline at end of file diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs index 60c4551459..c0d8309201 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs @@ -13,9 +13,26 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Disable tests when `runtime-benchmarks` is enabled, because of `type MessageProcessor = +// pallet_message_queue::mock_helpers::NoopMessageProcessor`. #![cfg(not(feature = "runtime-benchmarks"))] +pub use asset_test_utils::xcm_helpers; pub use codec::Encode; +pub use emulated_chains::{ + asset_hub_kusama::ED as ASSET_HUB_KUSAMA_ED, kusama::ED as KUSAMA_ED, + AssetHubKusamaPara as AssetHubKusama, AssetHubKusamaParaPallet as AssetHubKusamaPallet, + AssetHubKusamaParaReceiver as AssetHubKusamaReceiver, + AssetHubKusamaParaSender as AssetHubKusamaSender, BridgeHubKusamaPara as BridgeHubKusama, + BridgeHubKusamaParaReceiver as BridgeHubKusamaReceiver, KusamaRelay as Kusama, + KusamaRelayPallet as KusamaPallet, KusamaRelayReceiver as KusamaReceiver, + KusamaRelaySender as KusamaSender, PenpalKusamaAPara as PenpalKusamaA, + PenpalKusamaAParaPallet as PenpalKusamaAPallet, + PenpalKusamaAParaReceiver as PenpalKusamaAReceiver, + PenpalKusamaAParaSender as PenpalKusamaASender, PenpalKusamaBPara as PenpalKusamaB, + PenpalKusamaBParaPallet as PenpalKusamaBPallet, PenpalLocalTeleportableToAssetHub, + PenpalXcmConfig, +}; pub use frame_support::{ assert_err, assert_ok, pallet_prelude::Weight, @@ -23,14 +40,9 @@ pub use frame_support::{ traits::fungibles::Inspect, }; pub use integration_tests_common::{ - constants::{ - asset_hub_kusama::ED as ASSET_HUB_KUSAMA_ED, kusama::ED as KUSAMA_ED, PROOF_SIZE_THRESHOLD, - REF_TIME_THRESHOLD, XCM_V3, - }, - xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, - AssetHubKusama, AssetHubKusamaPallet, AssetHubKusamaReceiver, AssetHubKusamaSender, Kusama, - KusamaPallet, KusamaReceiver, KusamaSender, PenpalKusamaA, PenpalKusamaAPallet, - PenpalKusamaAReceiver, PenpalKusamaASender, PenpalKusamaB, PenpalKusamaBPallet, + test_parachain_is_trusted_teleporter, + xcm_helpers::{non_fee_asset, xcm_transact_paid_execution, xcm_transact_unpaid_execution}, + PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, }; pub use parachains_common::{AccountId, Balance}; pub use xcm::{ @@ -48,18 +60,20 @@ pub const ASSET_MIN_BALANCE: u128 = 1000; pub const ASSETS_PALLET_ID: u8 = 50; pub type RelayToSystemParaTest = Test; +pub type RelayToParaTest = Test; pub type SystemParaToRelayTest = Test; pub type SystemParaToParaTest = Test; +pub type ParaToSystemParaTest = Test; /// Returns a `TestArgs` instance to be used for the Relay Chain across integration tests -pub fn relay_test_args(amount: Balance) -> TestArgs { +pub fn relay_test_args( + dest: MultiLocation, + beneficiary_id: AccountId32, + amount: Balance, +) -> TestArgs { TestArgs { - dest: Kusama::child_location_of(AssetHubKusama::para_id()), - beneficiary: AccountId32Junction { - network: None, - id: AssetHubKusamaReceiver::get().into(), - } - .into(), + dest, + beneficiary: AccountId32Junction { network: None, id: beneficiary_id.into() }.into(), amount, assets: (Here, amount).into(), asset_id: None, @@ -68,13 +82,14 @@ pub fn relay_test_args(amount: Balance) -> TestArgs { } } -/// Returns a `TestArgs` instance to be used for the System Parachain across integration tests -pub fn system_para_test_args( +/// Returns a `TestArgs` instance to be used by parachains across integration tests +pub fn para_test_args( dest: MultiLocation, beneficiary_id: AccountId32, amount: Balance, assets: MultiAssets, asset_id: Option, + fee_asset_item: u32, ) -> TestArgs { TestArgs { dest, @@ -82,7 +97,7 @@ pub fn system_para_test_args( amount, assets, asset_id, - fee_asset_item: 0, + fee_asset_item, weight_limit: WeightLimit::Unlimited, } } diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/hrmp_channels.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/hrmp_channels.rs deleted file mode 100644 index f930e3182c..0000000000 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/hrmp_channels.rs +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -use crate::*; - -const MAX_CAPACITY: u32 = 8; -const MAX_MESSAGE_SIZE: u32 = 8192; - -/// Opening HRMP channels between Parachains should work -#[test] -fn open_hrmp_channel_between_paras_works() { - // Parchain A init values - let para_a_id = PenpalKusamaA::para_id(); - let para_a_root_origin = ::RuntimeOrigin::root(); - - // Parachain B init values - let para_b_id = PenpalKusamaB::para_id(); - let para_b_root_origin = ::RuntimeOrigin::root(); - - let fee_amount = KUSAMA_ED * 1000; - let fund_amount = KUSAMA_ED * 1000_000_000; - - // Fund Parachain's Sovereign accounts to be able to reserve the deposit - let para_a_sovereign_account = Kusama::fund_para_sovereign(fund_amount, para_a_id); - let para_b_sovereign_account = Kusama::fund_para_sovereign(fund_amount, para_b_id); - - let relay_destination: VersionedMultiLocation = PenpalKusamaA::parent_location().into(); - - // ---- Init Open channel from Parachain to System Parachain - let mut call = Kusama::init_open_channel_call(para_b_id, MAX_CAPACITY, MAX_MESSAGE_SIZE); - let origin_kind = OriginKind::Native; - let native_asset: MultiAsset = (Here, fee_amount).into(); - let beneficiary = Kusama::sovereign_account_id_of_child_para(para_a_id); - - let mut xcm = xcm_transact_paid_execution(call, origin_kind, native_asset.clone(), beneficiary); - - PenpalKusamaA::execute_with(|| { - assert_ok!(::PolkadotXcm::send( - para_a_root_origin, - bx!(relay_destination.clone()), - bx!(xcm), - )); - - PenpalKusamaA::assert_xcm_pallet_sent(); - }); - - Kusama::execute_with(|| { - type RuntimeEvent = ::RuntimeEvent; - - Kusama::assert_ump_queue_processed( - true, - Some(para_a_id), - Some(Weight::from_parts(1_300_000_000, 200000)), - ); - - assert_expected_events!( - Kusama, - vec![ - // Parachain's Sovereign account balance is withdrawn to pay XCM fees - RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { - who: *who == para_a_sovereign_account.clone(), - amount: *amount == fee_amount, - }, - // Sender deposit is reserved for Parachain's Sovereign account - RuntimeEvent::Balances(pallet_balances::Event::Reserved { who, .. }) =>{ - who: *who == para_a_sovereign_account, - }, - // Open channel requested from Para A to Para B - RuntimeEvent::Hrmp( - polkadot_runtime_parachains::hrmp::Event::OpenChannelRequested { - sender, - recipient, - proposed_max_capacity: max_capacity, - proposed_max_message_size: max_message_size - } - ) => { - sender: *sender == para_a_id.into(), - recipient: *recipient == para_b_id.into(), - max_capacity: *max_capacity == MAX_CAPACITY, - max_message_size: *max_message_size == MAX_MESSAGE_SIZE, - }, - ] - ); - }); - - // ---- Accept Open channel from Parachain to System Parachain - call = Kusama::accept_open_channel_call(para_a_id); - let beneficiary = Kusama::sovereign_account_id_of_child_para(para_b_id); - - xcm = xcm_transact_paid_execution(call, origin_kind, native_asset, beneficiary); - - PenpalKusamaB::execute_with(|| { - assert_ok!(::PolkadotXcm::send( - para_b_root_origin, - bx!(relay_destination), - bx!(xcm), - )); - - PenpalKusamaB::assert_xcm_pallet_sent(); - }); - - PenpalKusamaB::execute_with(|| {}); - - Kusama::execute_with(|| { - type RuntimeEvent = ::RuntimeEvent; - - Kusama::assert_ump_queue_processed( - true, - Some(para_b_id), - Some(Weight::from_parts(1_300_000_000, 200_000)), - ); - - assert_expected_events!( - Kusama, - vec![ - // Parachain's Sovereign account balance is withdrawn to pay XCM fees - RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { - who: *who == para_b_sovereign_account.clone(), - amount: *amount == fee_amount, - }, - // Sender deposit is reserved for Parachain's Sovereign account - RuntimeEvent::Balances(pallet_balances::Event::Reserved { who, .. }) =>{ - who: *who == para_b_sovereign_account, - }, - // Open channel accepted for Para A to Para B - RuntimeEvent::Hrmp( - polkadot_runtime_parachains::hrmp::Event::OpenChannelAccepted { - sender, recipient - } - ) => { - sender: *sender == para_a_id.into(), - recipient: *recipient == para_b_id.into(), - }, - ] - ); - }); - - Kusama::force_process_hrmp_open(para_a_id, para_b_id); -} - -/// Opening HRMP channels between System Parachains and Parachains should work -#[test] -fn force_open_hrmp_channel_for_system_para_works() { - // Relay Chain init values - let relay_root_origin = ::RuntimeOrigin::root(); - - // System Para init values - let system_para_id = AssetHubKusama::para_id(); - - // Parachain A init values - let para_a_id = PenpalKusamaA::para_id(); - - Kusama::execute_with(|| { - assert_ok!(::Hrmp::force_open_hrmp_channel( - relay_root_origin, - system_para_id, - para_a_id, - MAX_CAPACITY, - MAX_MESSAGE_SIZE - )); - - type RuntimeEvent = ::RuntimeEvent; - - assert_expected_events!( - Kusama, - vec![ - // HRMP channel forced opened - RuntimeEvent::Hrmp( - polkadot_runtime_parachains::hrmp::Event::HrmpChannelForceOpened { - sender, - recipient, - proposed_max_capacity: max_capacity, - proposed_max_message_size: max_message_size - } - ) => { - sender: *sender == system_para_id.into(), - recipient: *recipient == para_a_id.into(), - max_capacity: *max_capacity == MAX_CAPACITY, - max_message_size: *max_message_size == MAX_MESSAGE_SIZE, - }, - ] - ); - }); -} diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs index ac0b92004e..fa908d196c 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs @@ -13,11 +13,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![cfg(not(feature = "runtime-benchmarks"))] - -mod hrmp_channels; mod reserve_transfer; mod send; mod set_xcm_versions; mod swap; mod teleport; + +use crate::*; +integration_tests_common::include_penpal_create_foreign_asset_on_asset_hub!( + PenpalKusamaA, + AssetHubKusama, + KUSAMA_ED, + parachains_common::kusama::fee::WeightToFee +); diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs index cc2e7a66b3..8dabfba5b5 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs @@ -14,47 +14,39 @@ // limitations under the License. use crate::*; +use asset_hub_kusama_runtime::xcm_config::XcmConfig as AssetHubKusamaXcmConfig; +use kusama_runtime::xcm_config::XcmConfig as KusamaXcmConfig; -fn relay_origin_assertions(t: RelayToSystemParaTest) { +fn relay_to_para_sender_assertions(t: RelayToParaTest) { type RuntimeEvent = ::RuntimeEvent; - - Kusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(630_000_000, 6_000))); - + Kusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(864_610_000, 8_799))); assert_expected_events!( Kusama, vec![ - // Amount to reserve transfer is transferred to System Parachain's Sovereign account - RuntimeEvent::Balances(pallet_balances::Event::Transfer { from, to, amount }) => { + // Amount to reserve transfer is transferred to Parachain's Sovereign account + RuntimeEvent::Balances( + pallet_balances::Event::Transfer { from, to, amount } + ) => { from: *from == t.sender.account_id, to: *to == Kusama::sovereign_account_id_of( t.args.dest ), - amount: *amount == t.args.amount, + amount: *amount == t.args.amount, }, ] ); } -fn system_para_dest_assertions_incomplete(_t: RelayToSystemParaTest) { - AssetHubKusama::assert_dmp_queue_incomplete(None, Some(Error::UntrustedReserveLocation)); -} - -fn system_para_to_relay_assertions(_t: SystemParaToRelayTest) { - AssetHubKusama::assert_xcm_pallet_attempted_error(Some(XcmError::Barrier)) -} - -fn system_para_to_para_assertions(t: SystemParaToParaTest) { +fn system_para_to_para_sender_assertions(t: SystemParaToParaTest) { type RuntimeEvent = ::RuntimeEvent; - AssetHubKusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 630_000_000, - 6_000, + 864_610_000, + 8_799, ))); - assert_expected_events!( AssetHubKusama, vec![ - // Amount to reserve transfer is transferred to Parachain's Sovereing account + // Amount to reserve transfer is transferred to Parachain's Sovereign account RuntimeEvent::Balances( pallet_balances::Event::Transfer { from, to, amount } ) => { @@ -68,18 +60,72 @@ fn system_para_to_para_assertions(t: SystemParaToParaTest) { ); } -fn system_para_to_para_assets_assertions(t: SystemParaToParaTest) { +fn para_receiver_assertions(_: Test) { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + PenpalKusamaA, + vec![ + RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + +fn para_to_system_para_sender_assertions(t: ParaToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + PenpalKusamaA::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( + 864_610_000, + 8_799, + ))); + assert_expected_events!( + PenpalKusamaA, + vec![ + // Amount to reserve transfer is transferred to Parachain's Sovereign account + RuntimeEvent::Balances( + pallet_balances::Event::Withdraw { who, amount } + ) => { + who: *who == t.sender.account_id, + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn para_to_system_para_receiver_assertions(t: ParaToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; + let sov_penpal_on_ahr = AssetHubKusama::sovereign_account_id_of( + AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()), + ); + assert_expected_events!( + AssetHubKusama, + vec![ + // Amount to reserve transfer is withdrawn from Parachain's Sovereign account + RuntimeEvent::Balances( + pallet_balances::Event::Withdraw { who, amount } + ) => { + who: *who == sov_penpal_on_ahr.clone().into(), + amount: *amount == t.args.amount, + }, + RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} +fn system_para_to_para_assets_sender_assertions(t: SystemParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; AssetHubKusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 680_000_000, - 6000, + 864_610_000, + 8799, ))); - assert_expected_events!( AssetHubKusama, vec![ - // Amount to reserve transfer is transferred to Parachain's Sovereing account + // Amount to reserve transfer is transferred to Parachain's Sovereign account RuntimeEvent::Assets( pallet_assets::Event::Transferred { asset_id, from, to, amount } ) => { @@ -94,7 +140,21 @@ fn system_para_to_para_assets_assertions(t: SystemParaToParaTest) { ); } -fn relay_limited_reserve_transfer_assets(t: RelayToSystemParaTest) -> DispatchResult { +fn system_para_to_para_assets_receiver_assertions(_: Test) { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + PenpalKusamaA, + vec![ + RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::Assets(pallet_assets::Event::Issued { .. }) => {}, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + +fn relay_to_para_reserve_transfer_assets(t: RelayToParaTest) -> DispatchResult { ::XcmPallet::limited_reserve_transfer_assets( t.signed_origin, bx!(t.args.dest.into()), @@ -105,7 +165,7 @@ fn relay_limited_reserve_transfer_assets(t: RelayToSystemParaTest) -> DispatchRe ) } -fn system_para_limited_reserve_transfer_assets(t: SystemParaToRelayTest) -> DispatchResult { +fn system_para_to_para_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { ::PolkadotXcm::limited_reserve_transfer_assets( t.signed_origin, bx!(t.args.dest.into()), @@ -116,8 +176,8 @@ fn system_para_limited_reserve_transfer_assets(t: SystemParaToRelayTest) -> Disp ) } -fn system_para_to_para_limited_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { - ::PolkadotXcm::limited_reserve_transfer_assets( +fn para_to_system_para_reserve_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { + ::PolkadotXcm::limited_reserve_transfer_assets( t.signed_origin, bx!(t.args.dest.into()), bx!(t.args.beneficiary.into()), @@ -127,129 +187,312 @@ fn system_para_to_para_limited_reserve_transfer_assets(t: SystemParaToParaTest) ) } -/// Limited Reserve Transfers of native asset from Relay Chain to the System Parachain shouldn't -/// work +/// Reserve Transfers of native asset from Relay Chain to the System Parachain shouldn't work #[test] -fn limited_reserve_transfer_native_asset_from_relay_to_system_para_fails() { - // Init values for Relay Chain +fn reserve_transfer_native_asset_from_relay_to_system_para_fails() { + let signed_origin = ::RuntimeOrigin::signed(KusamaSender::get().into()); + let destination = Kusama::child_location_of(AssetHubKusama::para_id()); + let beneficiary: MultiLocation = + AccountId32Junction { network: None, id: AssetHubKusamaReceiver::get().into() }.into(); let amount_to_send: Balance = KUSAMA_ED * 1000; + let assets: MultiAssets = (Here, amount_to_send).into(); + let fee_asset_item = 0; + + // this should fail + Kusama::execute_with(|| { + let result = ::XcmPallet::limited_reserve_transfer_assets( + signed_origin, + bx!(destination.into()), + bx!(beneficiary.into()), + bx!(assets.into()), + fee_asset_item, + WeightLimit::Unlimited, + ); + assert_err!( + result, + DispatchError::Module(sp_runtime::ModuleError { + index: 99, + error: [2, 0, 0, 0], + message: Some("Filtered") + }) + ); + }); +} + +/// Reserve Transfers of native asset from System Parachain to Relay Chain shouldn't work +#[test] +fn reserve_transfer_native_asset_from_system_para_to_relay_fails() { + // Init values for System Parachain + let signed_origin = + ::RuntimeOrigin::signed(AssetHubKusamaSender::get().into()); + let destination = AssetHubKusama::parent_location(); + let beneficiary_id = KusamaReceiver::get(); + let beneficiary: MultiLocation = + AccountId32Junction { network: None, id: beneficiary_id.into() }.into(); + let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; + + let assets: MultiAssets = (Parent, amount_to_send).into(); + let fee_asset_item = 0; + + // this should fail + AssetHubKusama::execute_with(|| { + let result = + ::PolkadotXcm::limited_reserve_transfer_assets( + signed_origin, + bx!(destination.into()), + bx!(beneficiary.into()), + bx!(assets.into()), + fee_asset_item, + WeightLimit::Unlimited, + ); + assert_err!( + result, + DispatchError::Module(sp_runtime::ModuleError { + index: 31, + error: [2, 0, 0, 0], + message: Some("Filtered") + }) + ); + }); +} + +/// Reserve Transfers of native asset from Relay to Parachain should work +#[test] +fn reserve_transfer_native_asset_from_relay_to_para() { + // Init values for Relay + let destination = Kusama::child_location_of(PenpalKusamaA::para_id()); + let beneficiary_id = PenpalKusamaAReceiver::get(); + let amount_to_send: Balance = KUSAMA_ED * 1000; + let test_args = TestContext { sender: KusamaSender::get(), - receiver: AssetHubKusamaReceiver::get(), - args: relay_test_args(amount_to_send), + receiver: PenpalKusamaAReceiver::get(), + args: relay_test_args(destination, beneficiary_id, amount_to_send), }; - let mut test = RelayToSystemParaTest::new(test_args); + let mut test = RelayToParaTest::new(test_args); let sender_balance_before = test.sender.balance; let receiver_balance_before = test.receiver.balance; - test.set_assertion::(relay_origin_assertions); - test.set_assertion::(system_para_dest_assertions_incomplete); - test.set_dispatchable::(relay_limited_reserve_transfer_assets); + test.set_assertion::(relay_to_para_sender_assertions); + test.set_assertion::(para_receiver_assertions); + test.set_dispatchable::(relay_to_para_reserve_transfer_assets); test.assert(); + let delivery_fees = Kusama::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; - assert!(sender_balance_before - amount_to_send >= sender_balance_after); - assert_eq!(receiver_balance_before, receiver_balance_after); + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_balance_after < receiver_balance_before + amount_to_send); } -/// Limited Reserve Transfers of native asset from System Parachain to Relay Chain shoudln't work +/// Reserve Transfers of native asset from System Parachain to Parachain should work #[test] -fn limited_reserve_transfer_native_asset_from_system_para_to_relay_fails() { +fn reserve_transfer_native_asset_from_system_para_to_para() { // Init values for System Parachain - let destination = AssetHubKusama::parent_location(); - let beneficiary_id = KusamaReceiver::get(); + let destination = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); + let beneficiary_id = PenpalKusamaAReceiver::get(); let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; let assets = (Parent, amount_to_send).into(); let test_args = TestContext { sender: AssetHubKusamaSender::get(), - receiver: KusamaReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + receiver: PenpalKusamaAReceiver::get(), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), }; - let mut test = SystemParaToRelayTest::new(test_args); + let mut test = SystemParaToParaTest::new(test_args); let sender_balance_before = test.sender.balance; let receiver_balance_before = test.receiver.balance; - test.set_assertion::(system_para_to_relay_assertions); - test.set_dispatchable::(system_para_limited_reserve_transfer_assets); + test.set_assertion::(system_para_to_para_sender_assertions); + test.set_assertion::(para_receiver_assertions); + test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); test.assert(); let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; - assert_eq!(sender_balance_before, sender_balance_after); - assert_eq!(receiver_balance_before, receiver_balance_after); + let delivery_fees = AssetHubKusama::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_balance_after < receiver_balance_before + amount_to_send); } -/// Limited Reserve Transfers of native asset from System Parachain to Parachain should work +/// Reserve Transfers of native asset from Parachain to System Parachain should work #[test] -fn limited_reserve_transfer_native_asset_from_system_para_to_para() { - // Init values for System Parachain - let destination = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); - let beneficiary_id = PenpalKusamaAReceiver::get(); +fn reserve_transfer_native_asset_from_para_to_system_para() { + // Init values for Penpal Parachain + let destination = PenpalKusamaA::sibling_location_of(AssetHubKusama::para_id()); + let beneficiary_id = AssetHubKusamaReceiver::get(); let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; let assets = (Parent, amount_to_send).into(); let test_args = TestContext { - sender: AssetHubKusamaSender::get(), - receiver: PenpalKusamaAReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + sender: PenpalKusamaASender::get(), + receiver: AssetHubKusamaReceiver::get(), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), }; - let mut test = SystemParaToParaTest::new(test_args); + let mut test = ParaToSystemParaTest::new(test_args); let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + let penpal_location_as_seen_by_ahr = + AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); + let sov_penpal_on_ahr = AssetHubKusama::sovereign_account_id_of(penpal_location_as_seen_by_ahr); + + // fund the Penpal's SA on AHR with the native tokens held in reserve + AssetHubKusama::fund_accounts(vec![(sov_penpal_on_ahr.into(), amount_to_send * 2)]); - test.set_assertion::(system_para_to_para_assertions); - // TODO: Add assertion for Penpal runtime. Right now message is failing with - // `UntrustedReserveLocation` - test.set_dispatchable::(system_para_to_para_limited_reserve_transfer_assets); + test.set_assertion::(para_to_system_para_sender_assertions); + test.set_assertion::(para_to_system_para_receiver_assertions); + test.set_dispatchable::(para_to_system_para_reserve_transfer_assets); test.assert(); let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; - assert!(sender_balance_before - amount_to_send >= sender_balance_after); - // TODO: Check receiver balance when Penpal runtime is improved to propery handle reserve - // transfers + let delivery_fees = PenpalKusamaA::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_balance_after < receiver_balance_before + amount_to_send); } -/// Limited Reserve Transfers of a local asset from System Parachain to Parachain should work +/// Reserve Transfers of a local asset and native asset from System Parachain to Parachain should +/// work #[test] -fn limited_reserve_transfer_asset_from_system_para_to_para() { - // Force create asset from Relay Chain and mint assets for System Parachain's sender account +fn reserve_transfer_assets_from_system_para_to_para() { + // Force create asset on AssetHubKusama and PenpalKusamaA from Relay Chain AssetHubKusama::force_create_and_mint_asset( ASSET_ID, ASSET_MIN_BALANCE, - true, + false, AssetHubKusamaSender::get(), - ASSET_MIN_BALANCE * 1000000, + Some(Weight::from_parts(1_019_445_000, 200_000)), + ASSET_MIN_BALANCE * 1_000_000, + ); + PenpalKusamaA::force_create_and_mint_asset( + ASSET_ID, + ASSET_MIN_BALANCE, + false, + PenpalKusamaASender::get(), + None, + 0, ); // Init values for System Parachain let destination = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); let beneficiary_id = PenpalKusamaAReceiver::get(); - let amount_to_send = ASSET_MIN_BALANCE * 1000; - let assets = - (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), amount_to_send) - .into(); - - let system_para_test_args = TestContext { + let fee_amount_to_send = ASSET_HUB_KUSAMA_ED * 1000; + let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; + let assets: MultiAssets = vec![ + (Parent, fee_amount_to_send).into(), + (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), asset_amount_to_send) + .into(), + ] + .into(); + let fee_asset_index = assets + .inner() + .iter() + .position(|r| r == &(Parent, fee_amount_to_send).into()) + .unwrap() as u32; + + let para_test_args = TestContext { sender: AssetHubKusamaSender::get(), receiver: PenpalKusamaAReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + args: para_test_args( + destination, + beneficiary_id, + asset_amount_to_send, + assets, + None, + fee_asset_index, + ), }; - let mut system_para_test = SystemParaToParaTest::new(system_para_test_args); + let mut test = SystemParaToParaTest::new(para_test_args); + + // Create SA-of-Penpal-on-AHR with ED. + let penpal_location = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); + let sov_penpal_on_ahr = AssetHubKusama::sovereign_account_id_of(penpal_location); + AssetHubKusama::fund_accounts(vec![(sov_penpal_on_ahr.into(), KUSAMA_ED)]); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + let sender_assets_before = AssetHubKusama::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &AssetHubKusamaSender::get()) + }); + let receiver_assets_before = PenpalKusamaA::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &PenpalKusamaAReceiver::get()) + }); + + test.set_assertion::(system_para_to_para_assets_sender_assertions); + test.set_assertion::(system_para_to_para_assets_receiver_assertions); + test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; - system_para_test.set_assertion::(system_para_to_para_assets_assertions); - // TODO: Add assertions when Penpal is able to manage assets - system_para_test - .set_dispatchable::(system_para_to_para_limited_reserve_transfer_assets); - system_para_test.assert(); + // Sender's balance is reduced + assert!(sender_balance_after < sender_balance_before); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_balance_after < receiver_balance_before + fee_amount_to_send); + + let sender_assets_after = AssetHubKusama::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &AssetHubKusamaSender::get()) + }); + let receiver_assets_after = PenpalKusamaA::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &PenpalKusamaAReceiver::get()) + }); + + // Sender's balance is reduced by exact amount + assert_eq!(sender_assets_before - asset_amount_to_send, sender_assets_after); + // Receiver's balance is increased by exact amount + assert_eq!(receiver_assets_after, receiver_assets_before + asset_amount_to_send); } diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/send.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/send.rs index face60a3a5..1b9a79f8c2 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/send.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/send.rs @@ -16,110 +16,16 @@ use crate::*; /// Relay Chain should be able to execute `Transact` instructions in System Parachain -/// when `OriginKind::Superuser` and signer is `sudo` +/// when `OriginKind::Superuser`. #[test] -fn send_transact_sudo_from_relay_to_system_para_works() { - // Init tests variables - let root_origin = ::RuntimeOrigin::root(); - let system_para_destination = Kusama::child_location_of(AssetHubKusama::para_id()).into(); - let asset_owner: AccountId = AssetHubKusamaSender::get().into(); - let xcm = AssetHubKusama::force_create_asset_xcm( - OriginKind::Superuser, +fn send_transact_as_superuser_from_relay_to_system_para_works() { + AssetHubKusama::force_create_asset_from_relay_as_root( ASSET_ID, - asset_owner.clone(), - true, - 1000, - ); - // Send XCM message from Relay Chain - Kusama::execute_with(|| { - assert_ok!(::XcmPallet::send( - root_origin, - bx!(system_para_destination), - bx!(xcm), - )); - - Kusama::assert_xcm_pallet_sent(); - }); - - // Receive XCM message in Assets Parachain - AssetHubKusama::execute_with(|| { - type RuntimeEvent = ::RuntimeEvent; - - AssetHubKusama::assert_dmp_queue_complete(Some(Weight::from_parts(1_020_000_000, 200_000))); - - assert_expected_events!( - AssetHubKusama, - vec![ - RuntimeEvent::Assets(pallet_assets::Event::ForceCreated { asset_id, owner }) => { - asset_id: *asset_id == ASSET_ID, - owner: *owner == asset_owner, - }, - ] - ); - - assert!(::Assets::asset_exists(ASSET_ID)); - }); -} - -/// Relay Chain shouldn't be able to execute `Transact` instructions in System Parachain -/// when `OriginKind::Native` -#[test] -fn send_transact_native_from_relay_to_system_para_fails() { - // Init tests variables - let signed_origin = ::RuntimeOrigin::signed(KusamaSender::get().into()); - let system_para_destination = Kusama::child_location_of(AssetHubKusama::para_id()).into(); - let asset_owner = AssetHubKusamaSender::get().into(); - let xcm = AssetHubKusama::force_create_asset_xcm( - OriginKind::Native, - ASSET_ID, - asset_owner, + ASSET_MIN_BALANCE, true, - 1000, - ); - - // Send XCM message from Relay Chain - Kusama::execute_with(|| { - assert_err!( - ::XcmPallet::send( - signed_origin, - bx!(system_para_destination), - bx!(xcm) - ), - DispatchError::BadOrigin - ); - }); -} - -/// System Parachain shouldn't be able to execute `Transact` instructions in Relay Chain -/// when `OriginKind::Native` -#[test] -fn send_transact_native_from_system_para_to_relay_fails() { - // Init tests variables - let signed_origin = - ::RuntimeOrigin::signed(AssetHubKusamaSender::get().into()); - let relay_destination = AssetHubKusama::parent_location().into(); - let call = ::RuntimeCall::System(frame_system::Call::< - ::Runtime, - >::remark_with_event { - remark: vec![0, 1, 2, 3], - }) - .encode() - .into(); - let origin_kind = OriginKind::Native; - - let xcm = xcm_transact_unpaid_execution(call, origin_kind); - - // Send XCM message from Relay Chain - AssetHubKusama::execute_with(|| { - assert_err!( - ::PolkadotXcm::send( - signed_origin, - bx!(relay_destination), - bx!(xcm) - ), - DispatchError::BadOrigin - ); - }); + AssetHubKusamaSender::get().into(), + Some(Weight::from_parts(1_019_445_000, 200_000)), + ) } /// Parachain should be able to send XCM paying its fee with sufficient asset @@ -136,6 +42,7 @@ fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() { ASSET_MIN_BALANCE, true, para_sovereign_account.clone(), + Some(Weight::from_parts(1_019_445_000, 200_000)), ASSET_MIN_BALANCE * 1000000000, ); @@ -176,7 +83,10 @@ fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() { AssetHubKusama::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; - AssetHubKusama::assert_xcmp_queue_success(None); + AssetHubKusama::assert_xcmp_queue_success(Some(Weight::from_parts( + 15_594_564_000, + 562_893, + ))); assert_expected_events!( AssetHubKusama, diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs index 4b2716e90f..9b914622ba 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs @@ -47,38 +47,28 @@ fn relay_sets_system_para_xcm_supported_version() { #[test] fn system_para_sets_relay_xcm_supported_version() { // Init test variables - let sudo_origin = ::RuntimeOrigin::root(); let parent_location = AssetHubKusama::parent_location(); - let system_para_destination: VersionedMultiLocation = - Kusama::child_location_of(AssetHubKusama::para_id()).into(); - let call = ::RuntimeCall::PolkadotXcm(pallet_xcm::Call::< - ::Runtime, - >::force_xcm_version { - location: bx!(parent_location), - version: XCM_V3, - }) - .encode() - .into(); - let origin_kind = OriginKind::Superuser; - - let xcm = xcm_transact_unpaid_execution(call, origin_kind); - - // System Parachain sets supported version for Relay Chain throught it - Kusama::execute_with(|| { - assert_ok!(::XcmPallet::send( - sudo_origin, - bx!(system_para_destination), - bx!(xcm), - )); + let force_xcm_version_call = + ::RuntimeCall::PolkadotXcm(pallet_xcm::Call::< + ::Runtime, + >::force_xcm_version { + location: bx!(parent_location), + version: XCM_V3, + }) + .encode() + .into(); - Kusama::assert_xcm_pallet_sent(); - }); + // System Parachain sets supported version for Relay Chain through it + Kusama::send_unpaid_transact_to_parachain_as_root( + AssetHubKusama::para_id(), + force_xcm_version_call, + ); // System Parachain receive the XCM message AssetHubKusama::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; - AssetHubKusama::assert_dmp_queue_complete(Some(Weight::from_parts(1_020_000_000, 200_000))); + AssetHubKusama::assert_dmp_queue_complete(Some(Weight::from_parts(1_019_210_000, 200_000))); assert_expected_events!( AssetHubKusama, diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs index 3a67b54358..e94352e5ee 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs @@ -14,9 +14,9 @@ // limitations under the License. use crate::*; -use frame_support::{instances::Instance2, BoundedVec}; +use frame_support::BoundedVec; use parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; -use sp_runtime::{DispatchError, ModuleError}; +use sp_runtime::ModuleError; #[test] fn swap_locally_on_chain_using_local_assets() { @@ -44,12 +44,6 @@ fn swap_locally_on_chain_using_local_assets() { 100_000_000_000_000, )); - assert_ok!(::Balances::force_set_balance( - ::RuntimeOrigin::root(), - AssetHubKusamaSender::get().into(), - 100_000_000_000_000, - )); - assert_ok!(::AssetConversion::create_pool( ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), asset_native.clone(), @@ -118,114 +112,37 @@ fn swap_locally_on_chain_using_local_assets() { #[test] fn swap_locally_on_chain_using_foreign_assets() { - use frame_support::weights::WeightToFee; - let asset_native = Box::new(asset_hub_kusama_runtime::xcm_config::KsmLocation::get()); + let ah_as_seen_by_penpal = PenpalKusamaA::sibling_location_of(AssetHubKusama::para_id()); + let asset_location_on_penpal = PenpalLocalTeleportableToAssetHub::get(); + let asset_id_on_penpal = match asset_location_on_penpal.last() { + Some(GeneralIndex(id)) => *id as u32, + _ => unreachable!(), + }; + let asset_owner_on_penpal = PenpalKusamaASender::get(); + let foreign_asset_at_asset_hub_kusama = + MultiLocation { parents: 1, interior: X1(Parachain(PenpalKusamaA::para_id().into())) } + .appended_with(asset_location_on_penpal) + .unwrap(); + + // 1. Create asset on penpal and, 2. Create foreign asset on asset_hub_kusama + super::penpal_create_foreign_asset_on_asset_hub( + asset_id_on_penpal, + foreign_asset_at_asset_hub_kusama, + ah_as_seen_by_penpal, + true, + asset_owner_on_penpal, + ASSET_MIN_BALANCE * 1_000_000, + ); - let foreign_asset1_at_asset_hub_kusama = Box::new(MultiLocation { - parents: 1, - interior: X3( - Parachain(PenpalKusamaA::para_id().into()), - PalletInstance(ASSETS_PALLET_ID), - GeneralIndex(ASSET_ID.into()), - ), - }); - - let assets_para_destination: VersionedMultiLocation = - MultiLocation { parents: 1, interior: X1(Parachain(AssetHubKusama::para_id().into())) } - .into(); - - let penpal_location = - MultiLocation { parents: 1, interior: X1(Parachain(PenpalKusamaA::para_id().into())) }; - - // 1. Create asset on penpal: - PenpalKusamaA::execute_with(|| { - assert_ok!(::Assets::create( - ::RuntimeOrigin::signed(PenpalKusamaASender::get()), - ASSET_ID.into(), - PenpalKusamaASender::get().into(), - 1000, - )); - - assert!(::Assets::asset_exists(ASSET_ID)); - }); - - // 2. Create foreign asset on asset_hub_kusama: - - let require_weight_at_most = Weight::from_parts(1_100_000_000_000, 30_000); - let origin_kind = OriginKind::Xcm; - let sov_penpal_on_asset_hub_kusama = AssetHubKusama::sovereign_account_id_of(penpal_location); - + let penpal_as_seen_by_ah = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); + let sov_penpal_on_ahr = AssetHubKusama::sovereign_account_id_of(penpal_as_seen_by_ah); AssetHubKusama::fund_accounts(vec![ (AssetHubKusamaSender::get().into(), 5_000_000 * KUSAMA_ED), /* An account to swap dot * for something else. */ - (sov_penpal_on_asset_hub_kusama.clone().into(), 1000_000_000_000_000_000 * KUSAMA_ED), ]); - let sov_penpal_on_asset_hub_kusama_as_location: MultiLocation = MultiLocation { - parents: 0, - interior: X1(AccountId32Junction { - network: None, - id: sov_penpal_on_asset_hub_kusama.clone().into(), - }), - }; - - let call_foreign_assets_create = - ::RuntimeCall::ForeignAssets(pallet_assets::Call::< - ::Runtime, - Instance2, - >::create { - id: *foreign_asset1_at_asset_hub_kusama, - min_balance: 1000, - admin: sov_penpal_on_asset_hub_kusama.clone().into(), - }) - .encode() - .into(); - - let buy_execution_fee_amount = parachains_common::kusama::fee::WeightToFee::weight_to_fee( - &Weight::from_parts(10_100_000_000_000, 300_000), - ); - let buy_execution_fee = MultiAsset { - id: Concrete(MultiLocation { parents: 1, interior: Here }), - fun: Fungible(buy_execution_fee_amount), - }; - - let xcm = VersionedXcm::from(Xcm(vec![ - WithdrawAsset { 0: vec![buy_execution_fee.clone()].into() }, - BuyExecution { fees: buy_execution_fee.clone(), weight_limit: Unlimited }, - Transact { require_weight_at_most, origin_kind, call: call_foreign_assets_create }, - RefundSurplus, - DepositAsset { - assets: All.into(), - beneficiary: sov_penpal_on_asset_hub_kusama_as_location, - }, - ])); - - // Send XCM message from penpal => asset_hub_kusama - let sudo_penpal_origin = ::RuntimeOrigin::root(); - PenpalKusamaA::execute_with(|| { - assert_ok!(::PolkadotXcm::send( - sudo_penpal_origin.clone(), - bx!(assets_para_destination.clone()), - bx!(xcm), - )); - - type RuntimeEvent = ::RuntimeEvent; - - assert_expected_events!( - PenpalKusamaA, - vec![ - RuntimeEvent::PolkadotXcm(pallet_xcm::Event::Sent { .. }) => {}, - ] - ); - }); - - // Receive XCM message in Assets Parachain AssetHubKusama::execute_with(|| { - assert!(::ForeignAssets::asset_exists( - *foreign_asset1_at_asset_hub_kusama - )); - // 3: Mint foreign asset on asset_hub_kusama: // // (While it might be nice to use batch, @@ -234,11 +151,9 @@ fn swap_locally_on_chain_using_foreign_assets() { type RuntimeEvent = ::RuntimeEvent; // 3. Mint foreign asset (in reality this should be a teleport or some such) assert_ok!(::ForeignAssets::mint( - ::RuntimeOrigin::signed( - sov_penpal_on_asset_hub_kusama.clone().into() - ), - *foreign_asset1_at_asset_hub_kusama, - sov_penpal_on_asset_hub_kusama.clone().into(), + ::RuntimeOrigin::signed(sov_penpal_on_ahr.clone().into()), + foreign_asset_at_asset_hub_kusama, + sov_penpal_on_ahr.clone().into(), 3_000_000_000_000, )); @@ -249,11 +164,12 @@ fn swap_locally_on_chain_using_foreign_assets() { ] ); + let foreign_asset_at_asset_hub_kusama = Box::new(foreign_asset_at_asset_hub_kusama); // 4. Create pool: assert_ok!(::AssetConversion::create_pool( ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), asset_native.clone(), - foreign_asset1_at_asset_hub_kusama.clone(), + foreign_asset_at_asset_hub_kusama.clone(), )); assert_expected_events!( @@ -265,16 +181,14 @@ fn swap_locally_on_chain_using_foreign_assets() { // 5. Add liquidity: assert_ok!(::AssetConversion::add_liquidity( - ::RuntimeOrigin::signed( - sov_penpal_on_asset_hub_kusama.clone() - ), + ::RuntimeOrigin::signed(sov_penpal_on_ahr.clone()), asset_native.clone(), - foreign_asset1_at_asset_hub_kusama.clone(), + foreign_asset_at_asset_hub_kusama.clone(), 1_000_000_000_000, 2_000_000_000_000, 0, 0, - sov_penpal_on_asset_hub_kusama.clone().into() + sov_penpal_on_ahr.clone().into() )); assert_expected_events!( @@ -289,7 +203,7 @@ fn swap_locally_on_chain_using_foreign_assets() { // 6. Swap! let path = BoundedVec::<_, _>::truncate_from(vec![ asset_native.clone(), - foreign_asset1_at_asset_hub_kusama.clone(), + foreign_asset_at_asset_hub_kusama.clone(), ]); assert_ok!( @@ -315,15 +229,13 @@ fn swap_locally_on_chain_using_foreign_assets() { // 7. Remove liquidity assert_ok!(::AssetConversion::remove_liquidity( - ::RuntimeOrigin::signed( - sov_penpal_on_asset_hub_kusama.clone() - ), + ::RuntimeOrigin::signed(sov_penpal_on_ahr.clone()), asset_native, - foreign_asset1_at_asset_hub_kusama, + foreign_asset_at_asset_hub_kusama, 1414213562273 - 2_000_000_000, // all but the 2 EDs can't be retrieved. 0, 0, - sov_penpal_on_asset_hub_kusama.clone().into(), + sov_penpal_on_ahr.clone().into(), )); }); } diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs index b0d2712046..fdd6ed9081 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs @@ -13,14 +13,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![allow(dead_code)] // - use crate::*; +use asset_hub_kusama_runtime::xcm_config::XcmConfig as AssetHubKusamaXcmConfig; +use kusama_runtime::xcm_config::XcmConfig as KusamaXcmConfig; fn relay_origin_assertions(t: RelayToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; - Kusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(630_000_000, 7_000))); + Kusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(631_531_000, 7_186))); assert_expected_events!( Kusama, @@ -45,13 +45,13 @@ fn relay_dest_assertions(t: SystemParaToRelayTest) { Kusama::assert_ump_queue_processed( true, Some(AssetHubKusama::para_id()), - Some(Weight::from_parts(310_000_000, 7_000)), + Some(Weight::from_parts(307_225_000, 7_186)), ); assert_expected_events!( Kusama, vec![ - // Amount is witdrawn from Relay Chain's `CheckAccount` + // Amount is withdrawn from Relay Chain's `CheckAccount` RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { who: *who == ::XcmPallet::check_account(), amount: *amount == t.args.amount, @@ -68,7 +68,7 @@ fn relay_dest_assertions_fail(_t: SystemParaToRelayTest) { Kusama::assert_ump_queue_processed( false, Some(AssetHubKusama::para_id()), - Some(Weight::from_parts(150_000_000, 3_500)), + Some(Weight::from_parts(157_718_000, 3_593)), ); } @@ -76,8 +76,8 @@ fn para_origin_assertions(t: SystemParaToRelayTest) { type RuntimeEvent = ::RuntimeEvent; AssetHubKusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 535_000_000, - 7_000, + 720_053_000, + 7_203, ))); AssetHubKusama::assert_parachain_system_ump_sent(); @@ -97,7 +97,7 @@ fn para_origin_assertions(t: SystemParaToRelayTest) { fn para_dest_assertions(t: RelayToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; - AssetHubKusama::assert_dmp_queue_complete(None); + AssetHubKusama::assert_dmp_queue_complete(Some(Weight::from_parts(157_718_000, 3593))); assert_expected_events!( AssetHubKusama, @@ -110,6 +110,123 @@ fn para_dest_assertions(t: RelayToSystemParaTest) { ); } +fn penpal_to_ah_foreign_assets_sender_assertions(t: ParaToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + PenpalKusamaA::assert_xcm_pallet_attempted_complete(None); + let expected_asset_id = t.args.asset_id.unwrap(); + let (_, expected_asset_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + assert_expected_events!( + PenpalKusamaA, + vec![ + RuntimeEvent::Balances( + pallet_balances::Event::Withdraw { who, amount } + ) => { + who: *who == t.sender.account_id, + amount: *amount == t.args.amount, + }, + RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { + asset_id: *asset_id == expected_asset_id, + owner: *owner == t.sender.account_id, + balance: *balance == expected_asset_amount, + }, + ] + ); +} + +fn penpal_to_ah_foreign_assets_receiver_assertions(t: ParaToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + let sov_penpal_on_ahr = AssetHubKusama::sovereign_account_id_of( + AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()), + ); + let (expected_foreign_asset_id, expected_foreign_asset_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + assert_expected_events!( + AssetHubKusama, + vec![ + // native asset reserve transfer for paying fees, withdrawn from Penpal's sov account + RuntimeEvent::Balances( + pallet_balances::Event::Withdraw { who, amount } + ) => { + who: *who == sov_penpal_on_ahr.clone().into(), + amount: *amount == t.args.amount, + }, + RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { + who: *who == t.receiver.account_id, + }, + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, amount }) => { + asset_id: *asset_id == expected_foreign_asset_id, + owner: *owner == t.receiver.account_id, + amount: *amount == expected_foreign_asset_amount, + }, + RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + +fn ah_to_penpal_foreign_assets_sender_assertions(t: SystemParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + AssetHubKusama::assert_xcm_pallet_attempted_complete(None); + let (expected_foreign_asset_id, expected_foreign_asset_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + assert_expected_events!( + AssetHubKusama, + vec![ + // native asset used for fees is transferred to Parachain's Sovereign account as reserve + RuntimeEvent::Balances( + pallet_balances::Event::Transfer { from, to, amount } + ) => { + from: *from == t.sender.account_id, + to: *to == AssetHubKusama::sovereign_account_id_of( + t.args.dest + ), + amount: *amount == t.args.amount, + }, + // foreign asset is burned locally as part of teleportation + RuntimeEvent::ForeignAssets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { + asset_id: *asset_id == expected_foreign_asset_id, + owner: *owner == t.sender.account_id, + balance: *balance == expected_foreign_asset_amount, + }, + ] + ); +} + +fn ah_to_penpal_foreign_assets_receiver_assertions(t: SystemParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + let expected_asset_id = t.args.asset_id.unwrap(); + let (_, expected_asset_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + let checking_account = ::PolkadotXcm::check_account(); + assert_expected_events!( + PenpalKusamaA, + vec![ + // checking account burns local asset as part of incoming teleport + RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { + asset_id: *asset_id == expected_asset_id, + owner: *owner == checking_account, + balance: *balance == expected_asset_amount, + }, + // local asset is teleported into account of receiver + RuntimeEvent::Assets(pallet_assets::Event::Issued { asset_id, owner, amount }) => { + asset_id: *asset_id == expected_asset_id, + owner: *owner == t.receiver.account_id, + amount: *amount == expected_asset_amount, + }, + // native asset for fee is deposited to receiver + RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { + who: *who == t.receiver.account_id, + }, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + fn relay_limited_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { ::XcmPallet::limited_teleport_assets( t.signed_origin, @@ -121,6 +238,16 @@ fn relay_limited_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { ) } +fn relay_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { + ::XcmPallet::teleport_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + ) +} + fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult { ::PolkadotXcm::limited_teleport_assets( t.signed_origin, @@ -132,15 +259,49 @@ fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResu ) } +fn system_para_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult { + ::PolkadotXcm::teleport_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + ) +} + +fn para_to_system_para_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { + ::PolkadotXcm::transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +fn system_para_to_para_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { + ::PolkadotXcm::transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + /// Limited Teleport of native asset from Relay Chain to the System Parachain should work #[test] fn limited_teleport_native_assets_from_relay_to_system_para_works() { // Init values for Relay Chain let amount_to_send: Balance = KUSAMA_ED * 1000; + let dest = Kusama::child_location_of(AssetHubKusama::para_id()); + let beneficiary_id = AssetHubKusamaReceiver::get(); let test_args = TestContext { sender: KusamaSender::get(), receiver: AssetHubKusamaReceiver::get(), - args: relay_test_args(amount_to_send), + args: relay_test_args(dest, beneficiary_id, amount_to_send), }; let mut test = RelayToSystemParaTest::new(test_args); @@ -153,11 +314,17 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() { test.set_dispatchable::(relay_limited_teleport_assets); test.assert(); + let delivery_fees = Kusama::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; // Sender's balance is reduced - assert!(sender_balance_before - amount_to_send >= sender_balance_after); + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); // Receiver's balance is increased assert!(receiver_balance_after > receiver_balance_before); } @@ -178,7 +345,7 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() { let test_args = TestContext { sender: AssetHubKusamaSender::get(), receiver: KusamaReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = SystemParaToRelayTest::new(test_args); @@ -194,14 +361,20 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() { let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; + let delivery_fees = AssetHubKusama::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + // Sender's balance is reduced - assert!(sender_balance_before - amount_to_send >= sender_balance_after); + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); // Receiver's balance is increased assert!(receiver_balance_after > receiver_balance_before); } /// Limited Teleport of native asset from System Parachain to Relay Chain -/// shouldn't work when there is not enough balance in Relay Chain's `CheckAccount` +/// should't work when there is not enough balance in Relay Chain's `CheckAccount` #[test] fn limited_teleport_native_assets_from_system_para_to_relay_fails() { // Init values for Relay Chain @@ -213,7 +386,7 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() { let test_args = TestContext { sender: AssetHubKusamaSender::get(), receiver: KusamaReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = SystemParaToRelayTest::new(test_args); @@ -229,8 +402,346 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() { let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; - // Sender's balance is reduced by amount to send (+ delivery fees) - assert!(sender_balance_before - amount_to_send >= sender_balance_after); + let delivery_fees = AssetHubKusama::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); // Receiver's balance does not change assert_eq!(receiver_balance_after, receiver_balance_before); } + +/// Teleport of native asset from Relay Chain to the System Parachain should work +#[test] +fn teleport_native_assets_from_relay_to_system_para_works() { + // Init values for Relay Chain + let amount_to_send: Balance = KUSAMA_ED * 1000; + let dest = Kusama::child_location_of(AssetHubKusama::para_id()); + let beneficiary_id = AssetHubKusamaReceiver::get(); + let test_args = TestContext { + sender: KusamaSender::get(), + receiver: AssetHubKusamaReceiver::get(), + args: relay_test_args(dest, beneficiary_id, amount_to_send), + }; + + let mut test = RelayToSystemParaTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(relay_origin_assertions); + test.set_assertion::(para_dest_assertions); + test.set_dispatchable::(relay_teleport_assets); + test.assert(); + + let delivery_fees = Kusama::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); +} + +/// Teleport of native asset from System Parachains to the Relay Chain +/// should work when there is enough balance in Relay Chain's `CheckAccount` +#[test] +fn teleport_native_assets_back_from_system_para_to_relay_works() { + // Dependency - Relay Chain's `CheckAccount` should have enough balance + teleport_native_assets_from_relay_to_system_para_works(); + + // Init values for Relay Chain + let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; + let destination = AssetHubKusama::parent_location(); + let beneficiary_id = KusamaReceiver::get(); + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubKusamaSender::get(), + receiver: KusamaReceiver::get(), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + }; + + let mut test = SystemParaToRelayTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(para_origin_assertions); + test.set_assertion::(relay_dest_assertions); + test.set_dispatchable::(system_para_teleport_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + let delivery_fees = AssetHubKusama::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); +} + +/// Teleport of native asset from System Parachain to Relay Chain +/// shouldn't work when there is not enough balance in Relay Chain's `CheckAccount` +#[test] +fn teleport_native_assets_from_system_para_to_relay_fails() { + // Init values for Relay Chain + let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; + let destination = AssetHubKusama::parent_location(); + let beneficiary_id = KusamaReceiver::get(); + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubKusamaSender::get(), + receiver: KusamaReceiver::get(), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + }; + + let mut test = SystemParaToRelayTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(para_origin_assertions); + test.set_assertion::(relay_dest_assertions_fail); + test.set_dispatchable::(system_para_teleport_assets); + test.assert(); + + let delivery_fees = AssetHubKusama::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance does not change + assert_eq!(receiver_balance_after, receiver_balance_before); +} + +#[test] +fn teleport_to_other_system_parachains_works() { + let amount = ASSET_HUB_KUSAMA_ED * 100; + let native_asset: MultiAssets = (Parent, amount).into(); + + test_parachain_is_trusted_teleporter!( + AssetHubKusama, // Origin + AssetHubKusamaXcmConfig, // XCM Configuration + vec![BridgeHubKusama], // Destinations + (native_asset, amount) + ); +} + +/// Bidirectional teleports of local Penpal assets to Asset Hub as foreign assets should work +/// (using native reserve-based transfer for fees) +#[test] +fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { + let ah_as_seen_by_penpal = PenpalKusamaA::sibling_location_of(AssetHubKusama::para_id()); + let asset_location_on_penpal = PenpalLocalTeleportableToAssetHub::get(); + let asset_id_on_penpal = match asset_location_on_penpal.last() { + Some(GeneralIndex(id)) => *id as u32, + _ => unreachable!(), + }; + let asset_owner_on_penpal = PenpalKusamaASender::get(); + let foreign_asset_at_asset_hub_kusama = + MultiLocation { parents: 1, interior: X1(Parachain(PenpalKusamaA::para_id().into())) } + .appended_with(asset_location_on_penpal) + .unwrap(); + super::penpal_create_foreign_asset_on_asset_hub( + asset_id_on_penpal, + foreign_asset_at_asset_hub_kusama, + ah_as_seen_by_penpal, + false, + asset_owner_on_penpal, + ASSET_MIN_BALANCE * 1_000_000, + ); + let penpal_to_ah_beneficiary_id = AssetHubKusamaReceiver::get(); + + let fee_amount_to_send = ASSET_HUB_KUSAMA_ED * 10_000; + let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; + + let penpal_assets: MultiAssets = vec![ + (Parent, fee_amount_to_send).into(), + (asset_location_on_penpal, asset_amount_to_send).into(), + ] + .into(); + let fee_asset_index = penpal_assets + .inner() + .iter() + .position(|r| r == &(Parent, fee_amount_to_send).into()) + .unwrap() as u32; + + // Penpal to AH test args + let penpal_to_ah_test_args = TestContext { + sender: PenpalKusamaASender::get(), + receiver: AssetHubKusamaReceiver::get(), + args: para_test_args( + ah_as_seen_by_penpal, + penpal_to_ah_beneficiary_id, + asset_amount_to_send, + penpal_assets, + Some(asset_id_on_penpal), + fee_asset_index, + ), + }; + let mut penpal_to_ah = ParaToSystemParaTest::new(penpal_to_ah_test_args); + + let penpal_sender_balance_before = penpal_to_ah.sender.balance; + let ah_receiver_balance_before = penpal_to_ah.receiver.balance; + + let penpal_sender_assets_before = PenpalKusamaA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalKusamaASender::get()) + }); + let ah_receiver_assets_before = AssetHubKusama::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance( + foreign_asset_at_asset_hub_kusama, + &AssetHubKusamaReceiver::get(), + ) + }); + + penpal_to_ah.set_assertion::(penpal_to_ah_foreign_assets_sender_assertions); + penpal_to_ah.set_assertion::(penpal_to_ah_foreign_assets_receiver_assertions); + penpal_to_ah.set_dispatchable::(para_to_system_para_transfer_assets); + penpal_to_ah.assert(); + + let penpal_sender_balance_after = penpal_to_ah.sender.balance; + let ah_receiver_balance_after = penpal_to_ah.receiver.balance; + + let penpal_sender_assets_after = PenpalKusamaA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalKusamaASender::get()) + }); + let ah_receiver_assets_after = AssetHubKusama::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance( + foreign_asset_at_asset_hub_kusama, + &AssetHubKusamaReceiver::get(), + ) + }); + + // Sender's balance is reduced + assert!(penpal_sender_balance_after < penpal_sender_balance_before); + // Receiver's balance is increased + assert!(ah_receiver_balance_after > ah_receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(ah_receiver_balance_after < ah_receiver_balance_before + fee_amount_to_send); + + // Sender's balance is reduced by exact amount + assert_eq!(penpal_sender_assets_before - asset_amount_to_send, penpal_sender_assets_after); + // Receiver's balance is increased by exact amount + assert_eq!(ah_receiver_assets_after, ah_receiver_assets_before + asset_amount_to_send); + + /////////////////////////////////////////////////////////////////////// + // Now test transferring foreign assets back from AssetHub to Penpal // + /////////////////////////////////////////////////////////////////////// + + // Move funds on AH from AHReceiver to AHSender + AssetHubKusama::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + assert_ok!(ForeignAssets::transfer( + ::RuntimeOrigin::signed(AssetHubKusamaReceiver::get()), + foreign_asset_at_asset_hub_kusama, + AssetHubKusamaSender::get().into(), + asset_amount_to_send, + )); + }); + + let ah_to_penpal_beneficiary_id = PenpalKusamaAReceiver::get(); + let penpal_as_seen_by_ah = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); + let ah_assets: MultiAssets = vec![ + (Parent, fee_amount_to_send).into(), + (foreign_asset_at_asset_hub_kusama, asset_amount_to_send).into(), + ] + .into(); + let fee_asset_index = ah_assets + .inner() + .iter() + .position(|r| r == &(Parent, fee_amount_to_send).into()) + .unwrap() as u32; + + // AH to Penpal test args + let ah_to_penpal_test_args = TestContext { + sender: AssetHubKusamaSender::get(), + receiver: PenpalKusamaAReceiver::get(), + args: para_test_args( + penpal_as_seen_by_ah, + ah_to_penpal_beneficiary_id, + asset_amount_to_send, + ah_assets, + Some(asset_id_on_penpal), + fee_asset_index, + ), + }; + let mut ah_to_penpal = SystemParaToParaTest::new(ah_to_penpal_test_args); + + let ah_sender_balance_before = ah_to_penpal.sender.balance; + let penpal_receiver_balance_before = ah_to_penpal.receiver.balance; + + let ah_sender_assets_before = AssetHubKusama::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + foreign_asset_at_asset_hub_kusama, + &AssetHubKusamaSender::get(), + ) + }); + let penpal_receiver_assets_before = PenpalKusamaA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalKusamaAReceiver::get()) + }); + + ah_to_penpal.set_assertion::(ah_to_penpal_foreign_assets_sender_assertions); + ah_to_penpal.set_assertion::(ah_to_penpal_foreign_assets_receiver_assertions); + ah_to_penpal.set_dispatchable::(system_para_to_para_transfer_assets); + ah_to_penpal.assert(); + + let ah_sender_balance_after = ah_to_penpal.sender.balance; + let penpal_receiver_balance_after = ah_to_penpal.receiver.balance; + + let ah_sender_assets_after = AssetHubKusama::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + foreign_asset_at_asset_hub_kusama, + &AssetHubKusamaSender::get(), + ) + }); + let penpal_receiver_assets_after = PenpalKusamaA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalKusamaAReceiver::get()) + }); + + // Sender's balance is reduced + assert!(ah_sender_balance_after < ah_sender_balance_before); + // Receiver's balance is increased + assert!(penpal_receiver_balance_after > penpal_receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(penpal_receiver_balance_after < penpal_receiver_balance_before + fee_amount_to_send); + + // Sender's balance is reduced by exact amount + assert_eq!(ah_sender_assets_before - asset_amount_to_send, ah_sender_assets_after); + // Receiver's balance is increased by exact amount + assert_eq!(penpal_receiver_assets_after, penpal_receiver_assets_before + asset_amount_to_send); +} diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml index 16b14f0e7d..54656c75d0 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml @@ -13,26 +13,25 @@ codec = { package = "parity-scale-codec", version = "3.6.9" } # Substrate sp-runtime = { version = "30.0.1" } frame-support = { version = "27.0.0" } -frame-system = { version = "27.0.0" } pallet-assets = { version = "28.0.0" } pallet-balances = { version = "27.0.0" } -pallet-asset-conversion = { version = "9.0.0" } +pallet-message-queue = { version = "30.0.0" } # Polkadot -polkadot-core-primitives = { version = "6.0.0" } -polkadot-parachain-primitives = { version = "5.0.0" } -polkadot-runtime-parachains = { version = "6.0.0" } xcm = { package = "staging-xcm", version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } pallet-xcm = { version = "6.0.0" } # Cumulus parachains-common = { version = "6.0.0" } xcm-emulator = { version = "0.4.0" } +asset-test-utils = { version = "6.0.0" } # Local +emulated-chains = { path = "../../chains" } integration-tests-common = { path = "../../common" } +asset-hub-polkadot-runtime = { path = "../../../../system-parachains/asset-hubs/asset-hub-polkadot" } +polkadot-runtime = { path = "../../../../relay/polkadot" } [features] -runtime-benchmarks = [ - "integration-tests-common/runtime-benchmarks" -] +runtime-benchmarks = [] \ No newline at end of file diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs index 8daf8c81e7..f006fc54b3 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs @@ -13,9 +13,26 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Disable tests when `runtime-benchmarks` is enabled, because of `type MessageProcessor = +// pallet_message_queue::mock_helpers::NoopMessageProcessor`. #![cfg(not(feature = "runtime-benchmarks"))] +pub use asset_test_utils::xcm_helpers; pub use codec::Encode; +pub use emulated_chains::{ + asset_hub_polkadot::ED as ASSET_HUB_POLKADOT_ED, polkadot::ED as POLKADOT_ED, + AssetHubPolkadotPara as AssetHubPolkadot, AssetHubPolkadotParaPallet as AssetHubPolkadotPallet, + AssetHubPolkadotParaReceiver as AssetHubPolkadotReceiver, + AssetHubPolkadotParaSender as AssetHubPolkadotSender, + BridgeHubPolkadotPara as BridgeHubPolkadot, + BridgeHubPolkadotParaReceiver as BridgeHubPolkadotReceiver, PenpalLocalTeleportableToAssetHub, + PenpalPolkadotAPara as PenpalPolkadotA, PenpalPolkadotAParaPallet as PenpalPolkadotAPallet, + PenpalPolkadotAParaReceiver as PenpalPolkadotAReceiver, + PenpalPolkadotAParaSender as PenpalPolkadotASender, PenpalPolkadotBPara as PenpalPolkadotB, + PenpalPolkadotBParaPallet as PenpalPolkadotBPallet, PenpalXcmConfig, PolkadotRelay as Polkadot, + PolkadotRelayPallet as PolkadotPallet, PolkadotRelayReceiver as PolkadotReceiver, + PolkadotRelaySender as PolkadotSender, +}; pub use frame_support::{ assert_err, assert_ok, pallet_prelude::Weight, @@ -23,14 +40,9 @@ pub use frame_support::{ traits::fungibles::Inspect, }; pub use integration_tests_common::{ - constants::{ - asset_hub_polkadot::ED as ASSET_HUB_POLKADOT_ED, polkadot::ED as POLKADOT_ED, - PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, - }, - xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, - AssetHubPolkadot, AssetHubPolkadotPallet, AssetHubPolkadotReceiver, AssetHubPolkadotSender, - PenpalPolkadotA, PenpalPolkadotAPallet, PenpalPolkadotAReceiver, PenpalPolkadotB, - PenpalPolkadotBPallet, Polkadot, PolkadotPallet, PolkadotReceiver, PolkadotSender, + test_parachain_is_trusted_teleporter, + xcm_helpers::{non_fee_asset, xcm_transact_paid_execution, xcm_transact_unpaid_execution}, + PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, }; pub use parachains_common::{AccountId, Balance}; pub use xcm::{ @@ -48,18 +60,20 @@ pub const ASSET_MIN_BALANCE: u128 = 1000; pub const ASSETS_PALLET_ID: u8 = 50; pub type RelayToSystemParaTest = Test; +pub type RelayToParaTest = Test; pub type SystemParaToRelayTest = Test; pub type SystemParaToParaTest = Test; +pub type ParaToSystemParaTest = Test; /// Returns a `TestArgs` instance to be used for the Relay Chain across integration tests -pub fn relay_test_args(amount: Balance) -> TestArgs { +pub fn relay_test_args( + dest: MultiLocation, + beneficiary_id: AccountId32, + amount: Balance, +) -> TestArgs { TestArgs { - dest: Polkadot::child_location_of(AssetHubPolkadot::para_id()), - beneficiary: AccountId32Junction { - network: None, - id: AssetHubPolkadotReceiver::get().into(), - } - .into(), + dest, + beneficiary: AccountId32Junction { network: None, id: beneficiary_id.into() }.into(), amount, assets: (Here, amount).into(), asset_id: None, @@ -68,13 +82,14 @@ pub fn relay_test_args(amount: Balance) -> TestArgs { } } -/// Returns a `TestArgs` instance to be used for the System Parachain across integration tests -pub fn system_para_test_args( +/// Returns a `TestArgs` instance to be used by parachains across integration tests +pub fn para_test_args( dest: MultiLocation, beneficiary_id: AccountId32, amount: Balance, assets: MultiAssets, asset_id: Option, + fee_asset_item: u32, ) -> TestArgs { TestArgs { dest, @@ -82,7 +97,7 @@ pub fn system_para_test_args( amount, assets, asset_id, - fee_asset_item: 0, + fee_asset_item, weight_limit: WeightLimit::Unlimited, } } diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/hrmp_channels.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/hrmp_channels.rs deleted file mode 100644 index 731e601aea..0000000000 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/hrmp_channels.rs +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -use crate::*; - -const MAX_CAPACITY: u32 = 8; -const MAX_MESSAGE_SIZE: u32 = 8192; - -/// Opening HRMP channels between Parachains should work -#[test] -fn open_hrmp_channel_between_paras_works() { - // Parchain A init values - let para_a_id = PenpalPolkadotA::para_id(); - let para_a_root_origin = ::RuntimeOrigin::root(); - - // Parachain B init values - let para_b_id = PenpalPolkadotB::para_id(); - let para_b_root_origin = ::RuntimeOrigin::root(); - - let fee_amount = POLKADOT_ED * 1000; - let fund_amount = POLKADOT_ED * 1000_000_000; - - // Fund Parachain's Sovereign accounts to be able to reserve the deposit - let para_a_sovereign_account = Polkadot::fund_para_sovereign(fund_amount, para_a_id); - let para_b_sovereign_account = Polkadot::fund_para_sovereign(fund_amount, para_b_id); - - let relay_destination: VersionedMultiLocation = PenpalPolkadotA::parent_location().into(); - - // ---- Init Open channel from Parachain to System Parachain - let mut call = Polkadot::init_open_channel_call(para_b_id, MAX_CAPACITY, MAX_MESSAGE_SIZE); - let origin_kind = OriginKind::Native; - let native_asset: MultiAsset = (Here, fee_amount).into(); - let beneficiary = Polkadot::sovereign_account_id_of_child_para(para_a_id); - - let mut xcm = xcm_transact_paid_execution(call, origin_kind, native_asset.clone(), beneficiary); - - PenpalPolkadotA::execute_with(|| { - assert_ok!(::PolkadotXcm::send( - para_a_root_origin, - bx!(relay_destination.clone()), - bx!(xcm), - )); - - PenpalPolkadotA::assert_xcm_pallet_sent(); - }); - - Polkadot::execute_with(|| { - type RuntimeEvent = ::RuntimeEvent; - - Polkadot::assert_ump_queue_processed( - true, - Some(para_a_id), - Some(Weight::from_parts(1_300_000_000, 207_000)), - ); - - assert_expected_events!( - Polkadot, - vec![ - // Parachain's Sovereign account balance is withdrawn to pay XCM fees - RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { - who: *who == para_a_sovereign_account.clone(), - amount: *amount == fee_amount, - }, - // Sender deposit is reserved for Parachain's Sovereign account - RuntimeEvent::Balances(pallet_balances::Event::Reserved { who, .. }) =>{ - who: *who == para_a_sovereign_account, - }, - // Open channel requested from Para A to Para B - RuntimeEvent::Hrmp( - polkadot_runtime_parachains::hrmp::Event::OpenChannelRequested { - sender, recipient, proposed_max_capacity: max_capacity, proposed_max_message_size: max_message_size - } - ) => { - sender: *sender == para_a_id.into(), - recipient: *recipient == para_b_id.into(), - max_capacity: *max_capacity == MAX_CAPACITY, - max_message_size: *max_message_size == MAX_MESSAGE_SIZE, - }, - ] - ); - }); - - // ---- Accept Open channel from Parachain to System Parachain - call = Polkadot::accept_open_channel_call(para_a_id); - let beneficiary = Polkadot::sovereign_account_id_of_child_para(para_b_id); - - xcm = xcm_transact_paid_execution(call, origin_kind, native_asset, beneficiary); - - PenpalPolkadotB::execute_with(|| { - assert_ok!(::PolkadotXcm::send( - para_b_root_origin, - bx!(relay_destination), - bx!(xcm), - )); - - PenpalPolkadotB::assert_xcm_pallet_sent(); - }); - - PenpalPolkadotB::execute_with(|| {}); - - Polkadot::execute_with(|| { - type RuntimeEvent = ::RuntimeEvent; - - Polkadot::assert_ump_queue_processed( - true, - Some(para_b_id), - Some(Weight::from_parts(1_300_000_000, 207_000)), - ); - - assert_expected_events!( - Polkadot, - vec![ - // Parachain's Sovereign account balance is withdrawn to pay XCM fees - RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { - who: *who == para_b_sovereign_account.clone(), - amount: *amount == fee_amount, - }, - // Sender deposit is reserved for Parachain's Sovereign account - RuntimeEvent::Balances(pallet_balances::Event::Reserved { who, .. }) =>{ - who: *who == para_b_sovereign_account, - }, - // Open channel accepted for Para A to Para B - RuntimeEvent::Hrmp( - polkadot_runtime_parachains::hrmp::Event::OpenChannelAccepted { - sender, recipient - } - ) => { - sender: *sender == para_a_id.into(), - recipient: *recipient == para_b_id.into(), - }, - ] - ); - }); - - Polkadot::force_process_hrmp_open(para_a_id, para_b_id); -} - -/// Opening HRMP channels between System Parachains and Parachains should work -#[test] -fn force_open_hrmp_channel_for_system_para_works() { - // Relay Chain init values - let relay_root_origin = ::RuntimeOrigin::root(); - - // System Para init values - let system_para_id = AssetHubPolkadot::para_id(); - - // Parachain A init values - let para_a_id = PenpalPolkadotA::para_id(); - - Polkadot::execute_with(|| { - assert_ok!(::Hrmp::force_open_hrmp_channel( - relay_root_origin, - system_para_id, - para_a_id, - MAX_CAPACITY, - MAX_MESSAGE_SIZE - )); - - type RuntimeEvent = ::RuntimeEvent; - - assert_expected_events!( - Polkadot, - vec![ - // HRMP channel forced opened - RuntimeEvent::Hrmp( - polkadot_runtime_parachains::hrmp::Event::HrmpChannelForceOpened { - sender, recipient, proposed_max_capacity: max_capacity, proposed_max_message_size: max_message_size - } - ) => { - sender: *sender == system_para_id.into(), - recipient: *recipient == para_a_id.into(), - max_capacity: *max_capacity == MAX_CAPACITY, - max_message_size: *max_message_size == MAX_MESSAGE_SIZE, - }, - ] - ); - }); -} diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs index 27c92c543b..5f8e0a9b63 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs @@ -13,10 +13,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![cfg(not(feature = "runtime-benchmarks"))] - -mod hrmp_channels; mod reserve_transfer; mod send; mod set_xcm_versions; mod teleport; + +use crate::*; +integration_tests_common::include_penpal_create_foreign_asset_on_asset_hub!( + PenpalPolkadotA, + AssetHubPolkadot, + POLKADOT_ED, + parachains_common::polkadot::fee::WeightToFee +); diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs index 96c4358abd..89f79f9c96 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs @@ -14,47 +14,39 @@ // limitations under the License. use crate::*; +use asset_hub_polkadot_runtime::xcm_config::XcmConfig as AssetHubPolkadotXcmConfig; +use polkadot_runtime::xcm_config::XcmConfig as PolkadotXcmConfig; -fn relay_origin_assertions(t: RelayToSystemParaTest) { +fn relay_to_para_sender_assertions(t: RelayToParaTest) { type RuntimeEvent = ::RuntimeEvent; - - Polkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(630_000_000, 6_000))); - + Polkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(864_610_000, 8_799))); assert_expected_events!( Polkadot, vec![ - // Amount to reserve transfer is transferred to System Parachain's Sovereign account - RuntimeEvent::Balances(pallet_balances::Event::Transfer { from, to, amount }) => { + // Amount to reserve transfer is transferred to Parachain's Sovereign account + RuntimeEvent::Balances( + pallet_balances::Event::Transfer { from, to, amount } + ) => { from: *from == t.sender.account_id, to: *to == Polkadot::sovereign_account_id_of( t.args.dest ), - amount: *amount == t.args.amount, + amount: *amount == t.args.amount, }, ] ); } -fn system_para_dest_assertions_incomplete(_t: RelayToSystemParaTest) { - AssetHubPolkadot::assert_dmp_queue_incomplete(None, Some(Error::UntrustedReserveLocation)); -} - -fn system_para_to_relay_assertions(_t: SystemParaToRelayTest) { - AssetHubPolkadot::assert_xcm_pallet_attempted_error(Some(XcmError::Barrier)) -} - -fn system_para_to_para_assertions(t: SystemParaToParaTest) { +fn system_para_to_para_sender_assertions(t: SystemParaToParaTest) { type RuntimeEvent = ::RuntimeEvent; - AssetHubPolkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 680_000_000, - 6000, + 864_610_000, + 8_799, ))); - assert_expected_events!( AssetHubPolkadot, vec![ - // Amount to reserve transfer is transferred to Parachain's Sovereing account + // Amount to reserve transfer is transferred to Parachain's Sovereign account RuntimeEvent::Balances( pallet_balances::Event::Transfer { from, to, amount } ) => { @@ -68,18 +60,72 @@ fn system_para_to_para_assertions(t: SystemParaToParaTest) { ); } -fn system_para_to_para_assets_assertions(t: SystemParaToParaTest) { +fn para_receiver_assertions(_: Test) { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + PenpalPolkadotA, + vec![ + RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + +fn para_to_system_para_sender_assertions(t: ParaToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + PenpalPolkadotA::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( + 864_610_000, + 8_799, + ))); + assert_expected_events!( + PenpalPolkadotA, + vec![ + // Amount to reserve transfer is transferred to Parachain's Sovereign account + RuntimeEvent::Balances( + pallet_balances::Event::Withdraw { who, amount } + ) => { + who: *who == t.sender.account_id, + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn para_to_system_para_receiver_assertions(t: ParaToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; + let sov_penpal_on_ahr = AssetHubPolkadot::sovereign_account_id_of( + AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()), + ); + assert_expected_events!( + AssetHubPolkadot, + vec![ + // Amount to reserve transfer is withdrawn from Parachain's Sovereign account + RuntimeEvent::Balances( + pallet_balances::Event::Withdraw { who, amount } + ) => { + who: *who == sov_penpal_on_ahr.clone().into(), + amount: *amount == t.args.amount, + }, + RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} +fn system_para_to_para_assets_sender_assertions(t: SystemParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; AssetHubPolkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 680_000_000, - 6000, + 864_610_000, + 8799, ))); - assert_expected_events!( AssetHubPolkadot, vec![ - // Amount to reserve transfer is transferred to Parachain's Sovereing account + // Amount to reserve transfer is transferred to Parachain's Sovereign account RuntimeEvent::Assets( pallet_assets::Event::Transferred { asset_id, from, to, amount } ) => { @@ -94,7 +140,21 @@ fn system_para_to_para_assets_assertions(t: SystemParaToParaTest) { ); } -fn relay_limited_reserve_transfer_assets(t: RelayToSystemParaTest) -> DispatchResult { +fn system_para_to_para_assets_receiver_assertions(_: Test) { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + PenpalPolkadotA, + vec![ + RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::Assets(pallet_assets::Event::Issued { .. }) => {}, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + +fn relay_to_para_reserve_transfer_assets(t: RelayToParaTest) -> DispatchResult { ::XcmPallet::limited_reserve_transfer_assets( t.signed_origin, bx!(t.args.dest.into()), @@ -105,7 +165,7 @@ fn relay_limited_reserve_transfer_assets(t: RelayToSystemParaTest) -> DispatchRe ) } -fn system_para_limited_reserve_transfer_assets(t: SystemParaToRelayTest) -> DispatchResult { +fn system_para_to_para_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { ::PolkadotXcm::limited_reserve_transfer_assets( t.signed_origin, bx!(t.args.dest.into()), @@ -116,8 +176,8 @@ fn system_para_limited_reserve_transfer_assets(t: SystemParaToRelayTest) -> Disp ) } -fn system_para_to_para_limited_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { - ::PolkadotXcm::limited_reserve_transfer_assets( +fn para_to_system_para_reserve_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { + ::PolkadotXcm::limited_reserve_transfer_assets( t.signed_origin, bx!(t.args.dest.into()), bx!(t.args.beneficiary.into()), @@ -127,129 +187,313 @@ fn system_para_to_para_limited_reserve_transfer_assets(t: SystemParaToParaTest) ) } -/// Limited Reserve Transfers of native asset from Relay Chain to the System Parachain shouldn't -/// work +/// Reserve Transfers of native asset from Relay Chain to the System Parachain shouldn't work #[test] -fn limited_reserve_transfer_native_asset_from_relay_to_system_para_fails() { - // Init values for Relay Chain +fn reserve_transfer_native_asset_from_relay_to_system_para_fails() { + let signed_origin = ::RuntimeOrigin::signed(PolkadotSender::get().into()); + let destination = Polkadot::child_location_of(AssetHubPolkadot::para_id()); + let beneficiary: MultiLocation = + AccountId32Junction { network: None, id: AssetHubPolkadotReceiver::get().into() }.into(); let amount_to_send: Balance = POLKADOT_ED * 1000; + let assets: MultiAssets = (Here, amount_to_send).into(); + let fee_asset_item = 0; + + // this should fail + Polkadot::execute_with(|| { + let result = ::XcmPallet::limited_reserve_transfer_assets( + signed_origin, + bx!(destination.into()), + bx!(beneficiary.into()), + bx!(assets.into()), + fee_asset_item, + WeightLimit::Unlimited, + ); + assert_err!( + result, + DispatchError::Module(sp_runtime::ModuleError { + index: 99, + error: [2, 0, 0, 0], + message: Some("Filtered") + }) + ); + }); +} + +/// Reserve Transfers of native asset from System Parachain to Relay Chain shouldn't work +#[test] +fn reserve_transfer_native_asset_from_system_para_to_relay_fails() { + // Init values for System Parachain + let signed_origin = + ::RuntimeOrigin::signed(AssetHubPolkadotSender::get().into()); + let destination = AssetHubPolkadot::parent_location(); + let beneficiary_id = PolkadotReceiver::get(); + let beneficiary: MultiLocation = + AccountId32Junction { network: None, id: beneficiary_id.into() }.into(); + let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; + + let assets: MultiAssets = (Parent, amount_to_send).into(); + let fee_asset_item = 0; + + // this should fail + AssetHubPolkadot::execute_with(|| { + let result = + ::PolkadotXcm::limited_reserve_transfer_assets( + signed_origin, + bx!(destination.into()), + bx!(beneficiary.into()), + bx!(assets.into()), + fee_asset_item, + WeightLimit::Unlimited, + ); + assert_err!( + result, + DispatchError::Module(sp_runtime::ModuleError { + index: 31, + error: [2, 0, 0, 0], + message: Some("Filtered") + }) + ); + }); +} + +/// Reserve Transfers of native asset from Relay to Parachain should work +#[test] +fn reserve_transfer_native_asset_from_relay_to_para() { + // Init values for Relay + let destination = Polkadot::child_location_of(PenpalPolkadotA::para_id()); + let beneficiary_id = PenpalPolkadotAReceiver::get(); + let amount_to_send: Balance = POLKADOT_ED * 1000; + let test_args = TestContext { sender: PolkadotSender::get(), - receiver: AssetHubPolkadotReceiver::get(), - args: relay_test_args(amount_to_send), + receiver: PenpalPolkadotAReceiver::get(), + args: relay_test_args(destination, beneficiary_id, amount_to_send), }; - let mut test = RelayToSystemParaTest::new(test_args); + let mut test = RelayToParaTest::new(test_args); let sender_balance_before = test.sender.balance; let receiver_balance_before = test.receiver.balance; - test.set_assertion::(relay_origin_assertions); - test.set_assertion::(system_para_dest_assertions_incomplete); - test.set_dispatchable::(relay_limited_reserve_transfer_assets); + test.set_assertion::(relay_to_para_sender_assertions); + test.set_assertion::(para_receiver_assertions); + test.set_dispatchable::(relay_to_para_reserve_transfer_assets); test.assert(); + let delivery_fees = Polkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; - assert!(sender_balance_before - amount_to_send >= sender_balance_after); - assert_eq!(receiver_balance_before, receiver_balance_after); + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_balance_after < receiver_balance_before + amount_to_send); } -/// Limited Reserve Transfers of native asset from System Parachain to Relay Chain shoudln't work +/// Reserve Transfers of native asset from System Parachain to Parachain should work #[test] -fn limited_reserve_transfer_native_asset_from_system_para_to_relay_fails() { +fn reserve_transfer_native_asset_from_system_para_to_para() { // Init values for System Parachain - let destination = AssetHubPolkadot::parent_location(); - let beneficiary_id = PolkadotReceiver::get(); + let destination = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); + let beneficiary_id = PenpalPolkadotAReceiver::get(); let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; let assets = (Parent, amount_to_send).into(); let test_args = TestContext { sender: AssetHubPolkadotSender::get(), - receiver: PolkadotReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + receiver: PenpalPolkadotAReceiver::get(), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), }; - let mut test = SystemParaToRelayTest::new(test_args); + let mut test = SystemParaToParaTest::new(test_args); let sender_balance_before = test.sender.balance; let receiver_balance_before = test.receiver.balance; - test.set_assertion::(system_para_to_relay_assertions); - test.set_dispatchable::(system_para_limited_reserve_transfer_assets); + test.set_assertion::(system_para_to_para_sender_assertions); + test.set_assertion::(para_receiver_assertions); + test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); test.assert(); let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; - assert_eq!(sender_balance_before, sender_balance_after); - assert_eq!(receiver_balance_before, receiver_balance_after); + let delivery_fees = AssetHubPolkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_balance_after < receiver_balance_before + amount_to_send); } -/// Limited Reserve Transfers of native asset from System Parachain to Parachain should work +/// Reserve Transfers of native asset from Parachain to System Parachain should work #[test] -fn limited_reserve_transfer_native_asset_from_system_para_to_para() { - // Init values for System Parachain - let destination = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); - let beneficiary_id = PenpalPolkadotAReceiver::get(); +fn reserve_transfer_native_asset_from_para_to_system_para() { + // Init values for Penpal Parachain + let destination = PenpalPolkadotA::sibling_location_of(AssetHubPolkadot::para_id()); + let beneficiary_id = AssetHubPolkadotReceiver::get(); let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; let assets = (Parent, amount_to_send).into(); let test_args = TestContext { - sender: AssetHubPolkadotSender::get(), - receiver: PenpalPolkadotAReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + sender: PenpalPolkadotASender::get(), + receiver: AssetHubPolkadotReceiver::get(), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), }; - let mut test = SystemParaToParaTest::new(test_args); + let mut test = ParaToSystemParaTest::new(test_args); let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + let penpal_location_as_seen_by_ahr = + AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); + let sov_penpal_on_ahr = + AssetHubPolkadot::sovereign_account_id_of(penpal_location_as_seen_by_ahr); + + // fund the Penpal's SA on AHR with the native tokens held in reserve + AssetHubPolkadot::fund_accounts(vec![(sov_penpal_on_ahr.into(), amount_to_send * 2)]); - test.set_assertion::(system_para_to_para_assertions); - // TODO: Add assertion for Penpal runtime. Right now message is failing with - // `UntrustedReserveLocation` - test.set_dispatchable::(system_para_to_para_limited_reserve_transfer_assets); + test.set_assertion::(para_to_system_para_sender_assertions); + test.set_assertion::(para_to_system_para_receiver_assertions); + test.set_dispatchable::(para_to_system_para_reserve_transfer_assets); test.assert(); let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; - assert!(sender_balance_before - amount_to_send >= sender_balance_after); - // TODO: Check receiver balance when Penpal runtime is improved to propery handle reserve - // transfers + let delivery_fees = PenpalPolkadotA::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_balance_after < receiver_balance_before + amount_to_send); } -/// Limited Reserve Transfers of a local asset from System Parachain to Parachain should work +/// Reserve Transfers of a local asset and native asset from System Parachain to Parachain should +/// work #[test] -fn limited_reserve_transfer_asset_from_system_para_to_para() { - // Force create asset from Relay Chain and mint assets for System Parachain's sender account +fn reserve_transfer_assets_from_system_para_to_para() { + // Force create asset on AssetHubPolkadot and PenpalPolkadotA from Relay Chain AssetHubPolkadot::force_create_and_mint_asset( ASSET_ID, ASSET_MIN_BALANCE, - true, + false, AssetHubPolkadotSender::get(), - ASSET_MIN_BALANCE * 1000000, + Some(Weight::from_parts(1_019_445_000, 200_000)), + ASSET_MIN_BALANCE * 1_000_000, + ); + PenpalPolkadotA::force_create_and_mint_asset( + ASSET_ID, + ASSET_MIN_BALANCE, + false, + PenpalPolkadotASender::get(), + None, + 0, ); // Init values for System Parachain let destination = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); let beneficiary_id = PenpalPolkadotAReceiver::get(); - let amount_to_send = ASSET_MIN_BALANCE * 1000; - let assets = - (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), amount_to_send) - .into(); - - let system_para_test_args = TestContext { + let fee_amount_to_send = ASSET_HUB_POLKADOT_ED * 1000; + let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; + let assets: MultiAssets = vec![ + (Parent, fee_amount_to_send).into(), + (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), asset_amount_to_send) + .into(), + ] + .into(); + let fee_asset_index = assets + .inner() + .iter() + .position(|r| r == &(Parent, fee_amount_to_send).into()) + .unwrap() as u32; + + let para_test_args = TestContext { sender: AssetHubPolkadotSender::get(), receiver: PenpalPolkadotAReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + args: para_test_args( + destination, + beneficiary_id, + asset_amount_to_send, + assets, + None, + fee_asset_index, + ), }; - let mut system_para_test = SystemParaToParaTest::new(system_para_test_args); + let mut test = SystemParaToParaTest::new(para_test_args); + + // Create SA-of-Penpal-on-AHR with ED. + let penpal_location = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); + let sov_penpal_on_ahr = AssetHubPolkadot::sovereign_account_id_of(penpal_location); + AssetHubPolkadot::fund_accounts(vec![(sov_penpal_on_ahr.into(), POLKADOT_ED)]); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + let sender_assets_before = AssetHubPolkadot::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &AssetHubPolkadotSender::get()) + }); + let receiver_assets_before = PenpalPolkadotA::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &PenpalPolkadotAReceiver::get()) + }); + + test.set_assertion::(system_para_to_para_assets_sender_assertions); + test.set_assertion::(system_para_to_para_assets_receiver_assertions); + test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; - system_para_test.set_assertion::(system_para_to_para_assets_assertions); - // TODO: Add assertions when Penpal is able to manage assets - system_para_test - .set_dispatchable::(system_para_to_para_limited_reserve_transfer_assets); - system_para_test.assert(); + // Sender's balance is reduced + assert!(sender_balance_after < sender_balance_before); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_balance_after < receiver_balance_before + fee_amount_to_send); + + let sender_assets_after = AssetHubPolkadot::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &AssetHubPolkadotSender::get()) + }); + let receiver_assets_after = PenpalPolkadotA::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &PenpalPolkadotAReceiver::get()) + }); + + // Sender's balance is reduced by exact amount + assert_eq!(sender_assets_before - asset_amount_to_send, sender_assets_after); + // Receiver's balance is increased by exact amount + assert_eq!(receiver_assets_after, receiver_assets_before + asset_amount_to_send); } diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/send.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/send.rs index 86ee5838b4..adbb28f024 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/send.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/send.rs @@ -16,113 +16,16 @@ use crate::*; /// Relay Chain should be able to execute `Transact` instructions in System Parachain -/// when `OriginKind::Superuser` and signer is `sudo` +/// when `OriginKind::Superuser`. #[test] -fn send_transact_sudo_from_relay_to_system_para_works() { - // Init tests variables - let root_origin = ::RuntimeOrigin::root(); - let system_para_destination = Polkadot::child_location_of(AssetHubPolkadot::para_id()).into(); - let asset_owner: AccountId = AssetHubPolkadotSender::get().into(); - let xcm = AssetHubPolkadot::force_create_asset_xcm( - OriginKind::Superuser, +fn send_transact_as_superuser_from_relay_to_system_para_works() { + AssetHubPolkadot::force_create_asset_from_relay_as_root( ASSET_ID, - asset_owner.clone(), - true, - 1000, - ); - // Send XCM message from Relay Chain - Polkadot::execute_with(|| { - assert_ok!(::XcmPallet::send( - root_origin, - bx!(system_para_destination), - bx!(xcm), - )); - - Polkadot::assert_xcm_pallet_sent(); - }); - - // Receive XCM message in Assets Parachain - AssetHubPolkadot::execute_with(|| { - type RuntimeEvent = ::RuntimeEvent; - - AssetHubPolkadot::assert_dmp_queue_complete(Some(Weight::from_parts( - 1_020_000_000, - 200_000, - ))); - - assert_expected_events!( - AssetHubPolkadot, - vec![ - RuntimeEvent::Assets(pallet_assets::Event::ForceCreated { asset_id, owner }) => { - asset_id: *asset_id == ASSET_ID, - owner: *owner == asset_owner, - }, - ] - ); - - assert!(::Assets::asset_exists(ASSET_ID)); - }); -} - -/// Relay Chain shouldn't be able to execute `Transact` instructions in System Parachain -/// when `OriginKind::Native` -#[test] -fn send_transact_native_from_relay_to_system_para_fails() { - // Init tests variables - let signed_origin = ::RuntimeOrigin::signed(PolkadotSender::get().into()); - let system_para_destination = Polkadot::child_location_of(AssetHubPolkadot::para_id()).into(); - let asset_owner = AssetHubPolkadotSender::get().into(); - let xcm = AssetHubPolkadot::force_create_asset_xcm( - OriginKind::Native, - ASSET_ID, - asset_owner, + ASSET_MIN_BALANCE, true, - 1000, - ); - - // Send XCM message from Relay Chain - Polkadot::execute_with(|| { - assert_err!( - ::XcmPallet::send( - signed_origin, - bx!(system_para_destination), - bx!(xcm) - ), - DispatchError::BadOrigin - ); - }); -} - -/// System Parachain shouldn't be able to execute `Transact` instructions in Relay Chain -/// when `OriginKind::Native` -#[test] -fn send_transact_native_from_system_para_to_relay_fails() { - // Init tests variables - let signed_origin = - ::RuntimeOrigin::signed(AssetHubPolkadotSender::get().into()); - let relay_destination = AssetHubPolkadot::parent_location().into(); - let call = ::RuntimeCall::System(frame_system::Call::< - ::Runtime, - >::remark_with_event { - remark: vec![0, 1, 2, 3], - }) - .encode() - .into(); - let origin_kind = OriginKind::Native; - - let xcm = xcm_transact_unpaid_execution(call, origin_kind); - - // Send XCM message from Relay Chain - AssetHubPolkadot::execute_with(|| { - assert_err!( - ::PolkadotXcm::send( - signed_origin, - bx!(relay_destination), - bx!(xcm) - ), - DispatchError::BadOrigin - ); - }); + AssetHubPolkadotSender::get().into(), + Some(Weight::from_parts(1_019_445_000, 200_000)), + ) } /// Parachain should be able to send XCM paying its fee with sufficient asset @@ -139,6 +42,7 @@ fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() { ASSET_MIN_BALANCE, true, para_sovereign_account.clone(), + Some(Weight::from_parts(1_019_445_000, 200_000)), ASSET_MIN_BALANCE * 1000000000, ); @@ -179,7 +83,10 @@ fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() { AssetHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; - AssetHubPolkadot::assert_xcmp_queue_success(None); + AssetHubPolkadot::assert_xcmp_queue_success(Some(Weight::from_parts( + 15_594_564_000, + 562_893, + ))); assert_expected_events!( AssetHubPolkadot, diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs index 8ec3ab4426..e7b752ad4f 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs @@ -47,39 +47,29 @@ fn relay_sets_system_para_xcm_supported_version() { #[test] fn system_para_sets_relay_xcm_supported_version() { // Init test variables - let sudo_origin = ::RuntimeOrigin::root(); let parent_location = AssetHubPolkadot::parent_location(); - let system_para_destination: VersionedMultiLocation = - Polkadot::child_location_of(AssetHubPolkadot::para_id()).into(); - let call = ::RuntimeCall::PolkadotXcm(pallet_xcm::Call::< - ::Runtime, - >::force_xcm_version { - location: bx!(parent_location), - version: XCM_V3, - }) - .encode() - .into(); - let origin_kind = OriginKind::Superuser; - - let xcm = xcm_transact_unpaid_execution(call, origin_kind); - - // System Parachain sets supported version for Relay Chain throught it - Polkadot::execute_with(|| { - assert_ok!(::XcmPallet::send( - sudo_origin, - bx!(system_para_destination), - bx!(xcm), - )); + let force_xcm_version_call = + ::RuntimeCall::PolkadotXcm(pallet_xcm::Call::< + ::Runtime, + >::force_xcm_version { + location: bx!(parent_location), + version: XCM_V3, + }) + .encode() + .into(); - Polkadot::assert_xcm_pallet_sent(); - }); + // System Parachain sets supported version for Relay Chain through it + Polkadot::send_unpaid_transact_to_parachain_as_root( + AssetHubPolkadot::para_id(), + force_xcm_version_call, + ); // System Parachain receive the XCM message AssetHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; AssetHubPolkadot::assert_dmp_queue_complete(Some(Weight::from_parts( - 1_020_000_000, + 1_019_210_000, 200_000, ))); diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs index aadf41f823..69d7ffe7b9 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs @@ -13,14 +13,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![allow(dead_code)] // - use crate::*; +use asset_hub_polkadot_runtime::xcm_config::XcmConfig as AssetHubPolkadotXcmConfig; +use polkadot_runtime::xcm_config::XcmConfig as PolkadotXcmConfig; fn relay_origin_assertions(t: RelayToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; - Polkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(635_000_000, 7_000))); + Polkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(631_531_000, 7_186))); assert_expected_events!( Polkadot, @@ -45,13 +45,13 @@ fn relay_dest_assertions(t: SystemParaToRelayTest) { Polkadot::assert_ump_queue_processed( true, Some(AssetHubPolkadot::para_id()), - Some(Weight::from_parts(254_182_000, 7_186)), + Some(Weight::from_parts(307_225_000, 7_186)), ); assert_expected_events!( Polkadot, vec![ - // Amount is witdrawn from Relay Chain's `CheckAccount` + // Amount is withdrawn from Relay Chain's `CheckAccount` RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { who: *who == ::XcmPallet::check_account(), amount: *amount == t.args.amount, @@ -68,7 +68,7 @@ fn relay_dest_assertions_fail(_t: SystemParaToRelayTest) { Polkadot::assert_ump_queue_processed( false, Some(AssetHubPolkadot::para_id()), - Some(Weight::from_parts(122_581_000, 3_593)), + Some(Weight::from_parts(157_718_000, 3_593)), ); } @@ -76,8 +76,8 @@ fn para_origin_assertions(t: SystemParaToRelayTest) { type RuntimeEvent = ::RuntimeEvent; AssetHubPolkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 635_000_000, - 7_000, + 720_053_000, + 7_203, ))); AssetHubPolkadot::assert_parachain_system_ump_sent(); @@ -97,7 +97,7 @@ fn para_origin_assertions(t: SystemParaToRelayTest) { fn para_dest_assertions(t: RelayToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; - AssetHubPolkadot::assert_dmp_queue_complete(None); + AssetHubPolkadot::assert_dmp_queue_complete(Some(Weight::from_parts(157_718_000, 3593))); assert_expected_events!( AssetHubPolkadot, @@ -110,6 +110,123 @@ fn para_dest_assertions(t: RelayToSystemParaTest) { ); } +fn penpal_to_ah_foreign_assets_sender_assertions(t: ParaToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + PenpalPolkadotA::assert_xcm_pallet_attempted_complete(None); + let expected_asset_id = t.args.asset_id.unwrap(); + let (_, expected_asset_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + assert_expected_events!( + PenpalPolkadotA, + vec![ + RuntimeEvent::Balances( + pallet_balances::Event::Withdraw { who, amount } + ) => { + who: *who == t.sender.account_id, + amount: *amount == t.args.amount, + }, + RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { + asset_id: *asset_id == expected_asset_id, + owner: *owner == t.sender.account_id, + balance: *balance == expected_asset_amount, + }, + ] + ); +} + +fn penpal_to_ah_foreign_assets_receiver_assertions(t: ParaToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + let sov_penpal_on_ahr = AssetHubPolkadot::sovereign_account_id_of( + AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()), + ); + let (expected_foreign_asset_id, expected_foreign_asset_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + assert_expected_events!( + AssetHubPolkadot, + vec![ + // native asset reserve transfer for paying fees, withdrawn from Penpal's sov account + RuntimeEvent::Balances( + pallet_balances::Event::Withdraw { who, amount } + ) => { + who: *who == sov_penpal_on_ahr.clone().into(), + amount: *amount == t.args.amount, + }, + RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { + who: *who == t.receiver.account_id, + }, + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, amount }) => { + asset_id: *asset_id == expected_foreign_asset_id, + owner: *owner == t.receiver.account_id, + amount: *amount == expected_foreign_asset_amount, + }, + RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + +fn ah_to_penpal_foreign_assets_sender_assertions(t: SystemParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + AssetHubPolkadot::assert_xcm_pallet_attempted_complete(None); + let (expected_foreign_asset_id, expected_foreign_asset_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + assert_expected_events!( + AssetHubPolkadot, + vec![ + // native asset used for fees is transferred to Parachain's Sovereign account as reserve + RuntimeEvent::Balances( + pallet_balances::Event::Transfer { from, to, amount } + ) => { + from: *from == t.sender.account_id, + to: *to == AssetHubPolkadot::sovereign_account_id_of( + t.args.dest + ), + amount: *amount == t.args.amount, + }, + // foreign asset is burned locally as part of teleportation + RuntimeEvent::ForeignAssets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { + asset_id: *asset_id == expected_foreign_asset_id, + owner: *owner == t.sender.account_id, + balance: *balance == expected_foreign_asset_amount, + }, + ] + ); +} + +fn ah_to_penpal_foreign_assets_receiver_assertions(t: SystemParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + let expected_asset_id = t.args.asset_id.unwrap(); + let (_, expected_asset_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + let checking_account = ::PolkadotXcm::check_account(); + assert_expected_events!( + PenpalPolkadotA, + vec![ + // checking account burns local asset as part of incoming teleport + RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { + asset_id: *asset_id == expected_asset_id, + owner: *owner == checking_account, + balance: *balance == expected_asset_amount, + }, + // local asset is teleported into account of receiver + RuntimeEvent::Assets(pallet_assets::Event::Issued { asset_id, owner, amount }) => { + asset_id: *asset_id == expected_asset_id, + owner: *owner == t.receiver.account_id, + amount: *amount == expected_asset_amount, + }, + // native asset for fee is deposited to receiver + RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { + who: *who == t.receiver.account_id, + }, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + fn relay_limited_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { ::XcmPallet::limited_teleport_assets( t.signed_origin, @@ -121,6 +238,16 @@ fn relay_limited_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { ) } +fn relay_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { + ::XcmPallet::teleport_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + ) +} + fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult { ::PolkadotXcm::limited_teleport_assets( t.signed_origin, @@ -132,15 +259,49 @@ fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResu ) } +fn system_para_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult { + ::PolkadotXcm::teleport_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + ) +} + +fn para_to_system_para_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { + ::PolkadotXcm::transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +fn system_para_to_para_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { + ::PolkadotXcm::transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + /// Limited Teleport of native asset from Relay Chain to the System Parachain should work #[test] fn limited_teleport_native_assets_from_relay_to_system_para_works() { // Init values for Relay Chain let amount_to_send: Balance = POLKADOT_ED * 1000; + let dest = Polkadot::child_location_of(AssetHubPolkadot::para_id()); + let beneficiary_id = AssetHubPolkadotReceiver::get(); let test_args = TestContext { sender: PolkadotSender::get(), receiver: AssetHubPolkadotReceiver::get(), - args: relay_test_args(amount_to_send), + args: relay_test_args(dest, beneficiary_id, amount_to_send), }; let mut test = RelayToSystemParaTest::new(test_args); @@ -153,11 +314,17 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() { test.set_dispatchable::(relay_limited_teleport_assets); test.assert(); + let delivery_fees = Polkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; // Sender's balance is reduced - assert!(sender_balance_before - amount_to_send >= sender_balance_after); + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); // Receiver's balance is increased assert!(receiver_balance_after > receiver_balance_before); } @@ -178,7 +345,7 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() { let test_args = TestContext { sender: AssetHubPolkadotSender::get(), receiver: PolkadotReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = SystemParaToRelayTest::new(test_args); @@ -194,8 +361,14 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() { let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; + let delivery_fees = AssetHubPolkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + // Sender's balance is reduced - assert!(sender_balance_before - amount_to_send >= sender_balance_after); + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); // Receiver's balance is increased assert!(receiver_balance_after > receiver_balance_before); } @@ -213,7 +386,7 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() { let test_args = TestContext { sender: AssetHubPolkadotSender::get(), receiver: PolkadotReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = SystemParaToRelayTest::new(test_args); @@ -229,8 +402,346 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() { let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; + let delivery_fees = AssetHubPolkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance does not change + assert_eq!(receiver_balance_after, receiver_balance_before); +} + +/// Teleport of native asset from Relay Chain to the System Parachain should work +#[test] +fn teleport_native_assets_from_relay_to_system_para_works() { + // Init values for Relay Chain + let amount_to_send: Balance = POLKADOT_ED * 1000; + let dest = Polkadot::child_location_of(AssetHubPolkadot::para_id()); + let beneficiary_id = AssetHubPolkadotReceiver::get(); + let test_args = TestContext { + sender: PolkadotSender::get(), + receiver: AssetHubPolkadotReceiver::get(), + args: relay_test_args(dest, beneficiary_id, amount_to_send), + }; + + let mut test = RelayToSystemParaTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(relay_origin_assertions); + test.set_assertion::(para_dest_assertions); + test.set_dispatchable::(relay_teleport_assets); + test.assert(); + + let delivery_fees = Polkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + // Sender's balance is reduced - assert!(sender_balance_before - amount_to_send >= sender_balance_after); + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); +} + +/// Teleport of native asset from System Parachains to the Relay Chain +/// should work when there is enough balance in Relay Chain's `CheckAccount` +#[test] +fn teleport_native_assets_back_from_system_para_to_relay_works() { + // Dependency - Relay Chain's `CheckAccount` should have enough balance + teleport_native_assets_from_relay_to_system_para_works(); + + // Init values for Relay Chain + let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; + let destination = AssetHubPolkadot::parent_location(); + let beneficiary_id = PolkadotReceiver::get(); + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubPolkadotSender::get(), + receiver: PolkadotReceiver::get(), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + }; + + let mut test = SystemParaToRelayTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(para_origin_assertions); + test.set_assertion::(relay_dest_assertions); + test.set_dispatchable::(system_para_teleport_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + let delivery_fees = AssetHubPolkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); +} + +/// Teleport of native asset from System Parachain to Relay Chain +/// shouldn't work when there is not enough balance in Relay Chain's `CheckAccount` +#[test] +fn teleport_native_assets_from_system_para_to_relay_fails() { + // Init values for Relay Chain + let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; + let destination = AssetHubPolkadot::parent_location(); + let beneficiary_id = PolkadotReceiver::get(); + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubPolkadotSender::get(), + receiver: PolkadotReceiver::get(), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + }; + + let mut test = SystemParaToRelayTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(para_origin_assertions); + test.set_assertion::(relay_dest_assertions_fail); + test.set_dispatchable::(system_para_teleport_assets); + test.assert(); + + let delivery_fees = AssetHubPolkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); // Receiver's balance does not change assert_eq!(receiver_balance_after, receiver_balance_before); } + +#[test] +fn teleport_to_other_system_parachains_works() { + let amount = ASSET_HUB_POLKADOT_ED * 100; + let native_asset: MultiAssets = (Parent, amount).into(); + + test_parachain_is_trusted_teleporter!( + AssetHubPolkadot, // Origin + AssetHubPolkadotXcmConfig, // XCM Configuration + vec![BridgeHubPolkadot], // Destinations + (native_asset, amount) + ); +} + +/// Bidirectional teleports of local Penpal assets to Asset Hub as foreign assets should work +/// (using native reserve-based transfer for fees) +#[test] +fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { + let ah_as_seen_by_penpal = PenpalPolkadotA::sibling_location_of(AssetHubPolkadot::para_id()); + let asset_location_on_penpal = PenpalLocalTeleportableToAssetHub::get(); + let asset_id_on_penpal = match asset_location_on_penpal.last() { + Some(GeneralIndex(id)) => *id as u32, + _ => unreachable!(), + }; + let asset_owner_on_penpal = PenpalPolkadotASender::get(); + let foreign_asset_at_asset_hub_polkadot = + MultiLocation { parents: 1, interior: X1(Parachain(PenpalPolkadotA::para_id().into())) } + .appended_with(asset_location_on_penpal) + .unwrap(); + super::penpal_create_foreign_asset_on_asset_hub( + asset_id_on_penpal, + foreign_asset_at_asset_hub_polkadot, + ah_as_seen_by_penpal, + false, + asset_owner_on_penpal, + ASSET_MIN_BALANCE * 1_000_000, + ); + let penpal_to_ah_beneficiary_id = AssetHubPolkadotReceiver::get(); + + let fee_amount_to_send = ASSET_HUB_POLKADOT_ED * 10_000; + let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; + + let penpal_assets: MultiAssets = vec![ + (Parent, fee_amount_to_send).into(), + (asset_location_on_penpal, asset_amount_to_send).into(), + ] + .into(); + let fee_asset_index = penpal_assets + .inner() + .iter() + .position(|r| r == &(Parent, fee_amount_to_send).into()) + .unwrap() as u32; + + // Penpal to AH test args + let penpal_to_ah_test_args = TestContext { + sender: PenpalPolkadotASender::get(), + receiver: AssetHubPolkadotReceiver::get(), + args: para_test_args( + ah_as_seen_by_penpal, + penpal_to_ah_beneficiary_id, + asset_amount_to_send, + penpal_assets, + Some(asset_id_on_penpal), + fee_asset_index, + ), + }; + let mut penpal_to_ah = ParaToSystemParaTest::new(penpal_to_ah_test_args); + + let penpal_sender_balance_before = penpal_to_ah.sender.balance; + let ah_receiver_balance_before = penpal_to_ah.receiver.balance; + + let penpal_sender_assets_before = PenpalPolkadotA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalPolkadotASender::get()) + }); + let ah_receiver_assets_before = AssetHubPolkadot::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance( + foreign_asset_at_asset_hub_polkadot, + &AssetHubPolkadotReceiver::get(), + ) + }); + + penpal_to_ah.set_assertion::(penpal_to_ah_foreign_assets_sender_assertions); + penpal_to_ah.set_assertion::(penpal_to_ah_foreign_assets_receiver_assertions); + penpal_to_ah.set_dispatchable::(para_to_system_para_transfer_assets); + penpal_to_ah.assert(); + + let penpal_sender_balance_after = penpal_to_ah.sender.balance; + let ah_receiver_balance_after = penpal_to_ah.receiver.balance; + + let penpal_sender_assets_after = PenpalPolkadotA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalPolkadotASender::get()) + }); + let ah_receiver_assets_after = AssetHubPolkadot::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance( + foreign_asset_at_asset_hub_polkadot, + &AssetHubPolkadotReceiver::get(), + ) + }); + + // Sender's balance is reduced + assert!(penpal_sender_balance_after < penpal_sender_balance_before); + // Receiver's balance is increased + assert!(ah_receiver_balance_after > ah_receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(ah_receiver_balance_after < ah_receiver_balance_before + fee_amount_to_send); + + // Sender's balance is reduced by exact amount + assert_eq!(penpal_sender_assets_before - asset_amount_to_send, penpal_sender_assets_after); + // Receiver's balance is increased by exact amount + assert_eq!(ah_receiver_assets_after, ah_receiver_assets_before + asset_amount_to_send); + + /////////////////////////////////////////////////////////////////////// + // Now test transferring foreign assets back from AssetHub to Penpal // + /////////////////////////////////////////////////////////////////////// + + // Move funds on AH from AHReceiver to AHSender + AssetHubPolkadot::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + assert_ok!(ForeignAssets::transfer( + ::RuntimeOrigin::signed(AssetHubPolkadotReceiver::get()), + foreign_asset_at_asset_hub_polkadot, + AssetHubPolkadotSender::get().into(), + asset_amount_to_send, + )); + }); + + let ah_to_penpal_beneficiary_id = PenpalPolkadotAReceiver::get(); + let penpal_as_seen_by_ah = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); + let ah_assets: MultiAssets = vec![ + (Parent, fee_amount_to_send).into(), + (foreign_asset_at_asset_hub_polkadot, asset_amount_to_send).into(), + ] + .into(); + let fee_asset_index = ah_assets + .inner() + .iter() + .position(|r| r == &(Parent, fee_amount_to_send).into()) + .unwrap() as u32; + + // AH to Penpal test args + let ah_to_penpal_test_args = TestContext { + sender: AssetHubPolkadotSender::get(), + receiver: PenpalPolkadotAReceiver::get(), + args: para_test_args( + penpal_as_seen_by_ah, + ah_to_penpal_beneficiary_id, + asset_amount_to_send, + ah_assets, + Some(asset_id_on_penpal), + fee_asset_index, + ), + }; + let mut ah_to_penpal = SystemParaToParaTest::new(ah_to_penpal_test_args); + + let ah_sender_balance_before = ah_to_penpal.sender.balance; + let penpal_receiver_balance_before = ah_to_penpal.receiver.balance; + + let ah_sender_assets_before = AssetHubPolkadot::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + foreign_asset_at_asset_hub_polkadot, + &AssetHubPolkadotSender::get(), + ) + }); + let penpal_receiver_assets_before = PenpalPolkadotA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalPolkadotAReceiver::get()) + }); + + ah_to_penpal.set_assertion::(ah_to_penpal_foreign_assets_sender_assertions); + ah_to_penpal.set_assertion::(ah_to_penpal_foreign_assets_receiver_assertions); + ah_to_penpal.set_dispatchable::(system_para_to_para_transfer_assets); + ah_to_penpal.assert(); + + let ah_sender_balance_after = ah_to_penpal.sender.balance; + let penpal_receiver_balance_after = ah_to_penpal.receiver.balance; + + let ah_sender_assets_after = AssetHubPolkadot::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + foreign_asset_at_asset_hub_polkadot, + &AssetHubPolkadotSender::get(), + ) + }); + let penpal_receiver_assets_after = PenpalPolkadotA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalPolkadotAReceiver::get()) + }); + + // Sender's balance is reduced + assert!(ah_sender_balance_after < ah_sender_balance_before); + // Receiver's balance is increased + assert!(penpal_receiver_balance_after > penpal_receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(penpal_receiver_balance_after < penpal_receiver_balance_before + fee_amount_to_send); + + // Sender's balance is reduced by exact amount + assert_eq!(ah_sender_assets_before - asset_amount_to_send, ah_sender_assets_after); + // Receiver's balance is increased by exact amount + assert_eq!(penpal_receiver_assets_after, penpal_receiver_assets_before + asset_amount_to_send); +} diff --git a/integration-tests/emulated/chains/Cargo.toml b/integration-tests/emulated/chains/Cargo.toml new file mode 100644 index 0000000000..9d2df663dc --- /dev/null +++ b/integration-tests/emulated/chains/Cargo.toml @@ -0,0 +1,48 @@ +[package] +name = "emulated-chains" +version = "1.0.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Definitions of the fellows emulated relay+para runtimes" + +[dependencies] + +# Substrate +grandpa-primitives = { package = "sp-consensus-grandpa", version = "12.0.0" } +sp-authority-discovery = { version = "25.0.0" } +sp-runtime = { version = "30.0.1" } +frame-support = { version = "27.0.0" } +sp-core = { version = "27.0.0" } +sp-consensus-babe = { version = "0.31.0" } +pallet-im-online = { version = "26.0.0" } +pallet-staking = { version = "27.0.0" } +beefy-primitives = { package = "sp-consensus-beefy", version = "12.0.0" } + +# Polkadot +polkadot-primitives = { version = "6.0.0" } +polkadot-runtime-parachains = { version = "6.0.0" } +polkadot-parachain-primitives = { version = "5.0.0" } + +# Cumulus +parachains-common = { version = "6.0.0" } +xcm-emulator = { version = "0.4.0" } +penpal-runtime = { version = "0.13.0" } + +# Local runtimes +kusama-runtime = { package = "staging-kusama-runtime", path = "../../../relay/kusama" } +kusama-runtime-constants = { path = "../../../relay/kusama/constants" } +polkadot-runtime = { path = "../../../relay/polkadot" } +polkadot-runtime-constants = { path = "../../../relay/polkadot/constants" } +asset-hub-polkadot-runtime = { path = "../../../system-parachains/asset-hubs/asset-hub-polkadot" } +asset-hub-kusama-runtime = { path = "../../../system-parachains/asset-hubs/asset-hub-kusama" } +collectives-polkadot-runtime = { path = "../../../system-parachains/collectives/collectives-polkadot" } +bridge-hub-polkadot-runtime = { path = "../../../system-parachains/bridge-hubs/bridge-hub-polkadot" } +bridge-hub-kusama-runtime = { path = "../../../system-parachains/bridge-hubs/bridge-hub-kusama" } +# TODO: replace with `emulated-integration-tests-common@X.Y.Z` from `polkadot-sdk` +integration-tests-common = { path = "../common" } + +[features] +runtime-benchmarks = [ + "penpal-runtime/runtime-benchmarks", +] \ No newline at end of file diff --git a/integration-tests/emulated/common/src/constants.rs b/integration-tests/emulated/chains/src/genesis.rs similarity index 77% rename from integration-tests/emulated/common/src/constants.rs rename to integration-tests/emulated/chains/src/genesis.rs index e0cfb9f658..9e6eb1533b 100644 --- a/integration-tests/emulated/common/src/constants.rs +++ b/integration-tests/emulated/chains/src/genesis.rs @@ -13,143 +13,27 @@ // See the License for the specific language governing permissions and // limitations under the License. +use integration_tests_common::{ + accounts, collators, get_account_id_from_seed, validators, SAFE_XCM_VERSION, +}; + // Substrate use beefy_primitives::ecdsa_crypto::AuthorityId as BeefyId; use grandpa_primitives::AuthorityId as GrandpaId; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; use sp_consensus_babe::AuthorityId as BabeId; -use sp_core::{sr25519, storage::Storage, Pair, Public}; -use sp_runtime::{ - traits::{IdentifyAccount, Verify}, - BuildStorage, MultiSignature, Perbill, -}; +use sp_core::{sr25519, storage::Storage}; +use sp_runtime::{BuildStorage, Perbill}; // Cumulus -use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId, Balance, BlockNumber}; +use parachains_common::{AccountId, Balance, BlockNumber}; use polkadot_parachain_primitives::primitives::{HeadData, ValidationCode}; use polkadot_primitives::{AssignmentId, ValidatorId}; use polkadot_runtime_parachains::{ configuration::HostConfiguration, paras::{ParaGenesisArgs, ParaKind}, }; -use xcm; - -pub const XCM_V2: u32 = 3; -pub const XCM_V3: u32 = 2; -pub const REF_TIME_THRESHOLD: u64 = 33; -pub const PROOF_SIZE_THRESHOLD: u64 = 33; - -type AccountPublic = ::Signer; - -/// Helper function to generate a crypto pair from seed -fn get_from_seed(seed: &str) -> ::Public { - TPublic::Pair::from_string(&format!("//{}", seed), None) - .expect("static values are valid; qed") - .public() -} - -/// Helper function to generate an account ID from seed. -fn get_account_id_from_seed(seed: &str) -> AccountId -where - AccountPublic: From<::Public>, -{ - AccountPublic::from(get_from_seed::(seed)).into_account() -} - -pub mod accounts { - use super::*; - pub const ALICE: &str = "Alice"; - pub const BOB: &str = "Bob"; - pub const CHARLIE: &str = "Charlie"; - pub const DAVE: &str = "Dave"; - pub const EVE: &str = "Eve"; - pub const FERDIE: &str = "Ferdei"; - pub const ALICE_STASH: &str = "Alice//stash"; - pub const BOB_STASH: &str = "Bob//stash"; - pub const CHARLIE_STASH: &str = "Charlie//stash"; - pub const DAVE_STASH: &str = "Dave//stash"; - pub const EVE_STASH: &str = "Eve//stash"; - pub const FERDIE_STASH: &str = "Ferdie//stash"; - pub const FERDIE_BEEFY: &str = "Ferdie//stash"; - - pub fn init_balances() -> Vec { - vec![ - get_account_id_from_seed::(ALICE), - get_account_id_from_seed::(BOB), - get_account_id_from_seed::(CHARLIE), - get_account_id_from_seed::(DAVE), - get_account_id_from_seed::(EVE), - get_account_id_from_seed::(FERDIE), - get_account_id_from_seed::(ALICE_STASH), - get_account_id_from_seed::(BOB_STASH), - get_account_id_from_seed::(CHARLIE_STASH), - get_account_id_from_seed::(DAVE_STASH), - get_account_id_from_seed::(EVE_STASH), - get_account_id_from_seed::(FERDIE_STASH), - ] - } -} - -pub mod collators { - use super::*; - - pub fn invulnerables_asset_hub_polkadot() -> Vec<(AccountId, AssetHubPolkadotAuraId)> { - vec![ - ( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - ), - ( - get_account_id_from_seed::("Bob"), - get_from_seed::("Bob"), - ), - ] - } - - pub fn invulnerables() -> Vec<(AccountId, AuraId)> { - vec![ - ( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - ), - (get_account_id_from_seed::("Bob"), get_from_seed::("Bob")), - ] - } -} - -pub mod validators { - use super::*; - - pub fn initial_authorities() -> Vec<( - AccountId, - AccountId, - BabeId, - GrandpaId, - ImOnlineId, - ValidatorId, - AssignmentId, - AuthorityDiscoveryId, - BeefyId, - )> { - let seed = "Alice"; - vec![( - get_account_id_from_seed::(&format!("{}//stash", seed)), - get_account_id_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - )] - } -} - -/// The default XCM version to set in genesis config. -const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; - // Polkadot pub mod polkadot { use super::*; @@ -196,10 +80,7 @@ pub mod polkadot { pub fn genesis() -> Storage { let genesis_config = polkadot_runtime::RuntimeGenesisConfig { - system: polkadot_runtime::SystemConfig { - code: polkadot_runtime::WASM_BINARY.unwrap().to_vec(), - ..Default::default() - }, + system: polkadot_runtime::SystemConfig::default(), balances: polkadot_runtime::BalancesConfig { balances: accounts::init_balances() .iter() @@ -350,10 +231,7 @@ pub mod kusama { pub fn genesis() -> Storage { let genesis_config = kusama_runtime::RuntimeGenesisConfig { - system: kusama_runtime::SystemConfig { - code: kusama_runtime::WASM_BINARY.unwrap().to_vec(), - ..Default::default() - }, + system: kusama_runtime::SystemConfig::default(), balances: kusama_runtime::BalancesConfig { balances: accounts::init_balances() .iter() @@ -463,17 +341,12 @@ pub mod asset_hub_polkadot { pub fn genesis() -> Storage { let genesis_config = asset_hub_polkadot_runtime::RuntimeGenesisConfig { - system: asset_hub_polkadot_runtime::SystemConfig { - code: asset_hub_polkadot_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, + system: asset_hub_polkadot_runtime::SystemConfig::default(), balances: asset_hub_polkadot_runtime::BalancesConfig { balances: accounts::init_balances() .iter() .cloned() - .map(|k| (k, ED * 4096)) + .map(|k| (k, ED * 4096 * 4096)) .collect(), }, parachain_info: asset_hub_polkadot_runtime::ParachainInfoConfig { @@ -520,17 +393,12 @@ pub mod asset_hub_kusama { pub fn genesis() -> Storage { let genesis_config = asset_hub_kusama_runtime::RuntimeGenesisConfig { - system: asset_hub_kusama_runtime::SystemConfig { - code: asset_hub_kusama_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, + system: asset_hub_kusama_runtime::SystemConfig::default(), balances: asset_hub_kusama_runtime::BalancesConfig { balances: accounts::init_balances() .iter() .cloned() - .map(|k| (k, ED * 4096)) + .map(|k| (k, ED * 4096 * 4096)) .collect(), }, parachain_info: asset_hub_kusama_runtime::ParachainInfoConfig { @@ -577,12 +445,7 @@ pub mod bridge_hub_polkadot { pub fn genesis() -> Storage { let genesis_config = bridge_hub_polkadot_runtime::RuntimeGenesisConfig { - system: bridge_hub_polkadot_runtime::SystemConfig { - code: bridge_hub_polkadot_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, + system: bridge_hub_polkadot_runtime::SystemConfig::default(), balances: bridge_hub_polkadot_runtime::BalancesConfig { balances: accounts::init_balances() .iter() @@ -634,12 +497,7 @@ pub mod bridge_hub_kusama { pub fn genesis() -> Storage { let genesis_config = bridge_hub_kusama_runtime::RuntimeGenesisConfig { - system: bridge_hub_kusama_runtime::SystemConfig { - code: bridge_hub_kusama_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, + system: bridge_hub_kusama_runtime::SystemConfig::default(), balances: bridge_hub_kusama_runtime::BalancesConfig { balances: accounts::init_balances() .iter() @@ -691,12 +549,7 @@ pub mod collectives { pub fn genesis() -> Storage { let genesis_config = collectives_polkadot_runtime::RuntimeGenesisConfig { - system: collectives_polkadot_runtime::SystemConfig { - code: collectives_polkadot_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, + system: collectives_polkadot_runtime::SystemConfig::default(), balances: collectives_polkadot_runtime::BalancesConfig { balances: accounts::init_balances() .iter() @@ -749,17 +602,12 @@ pub mod penpal { pub fn genesis(para_id: u32) -> Storage { let genesis_config = penpal_runtime::RuntimeGenesisConfig { - system: penpal_runtime::SystemConfig { - code: penpal_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, + system: penpal_runtime::SystemConfig::default(), balances: penpal_runtime::BalancesConfig { balances: accounts::init_balances() .iter() .cloned() - .map(|k| (k, ED * 4096)) + .map(|k| (k, ED * 4096 * 4096)) .collect(), }, parachain_info: penpal_runtime::ParachainInfoConfig { diff --git a/integration-tests/emulated/chains/src/lib.rs b/integration-tests/emulated/chains/src/lib.rs new file mode 100644 index 0000000000..84a3c8e5b4 --- /dev/null +++ b/integration-tests/emulated/chains/src/lib.rs @@ -0,0 +1,341 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod genesis; + +pub use genesis::{ + asset_hub_kusama, asset_hub_polkadot, bridge_hub_kusama, bridge_hub_polkadot, collectives, + kusama, penpal, polkadot, +}; + +use integration_tests_common::{ + accounts::{ALICE, BOB}, + impl_accounts_helpers_for_parachain, impl_accounts_helpers_for_relay_chain, + impl_assert_events_helpers_for_parachain, impl_assert_events_helpers_for_relay_chain, + impl_assets_helpers_for_parachain, impl_foreign_assets_helpers_for_parachain, + impl_hrmp_channels_helpers_for_relay_chain, impl_send_transact_helpers_for_relay_chain, + impls::Parachain, +}; + +// Substrate +use frame_support::traits::OnInitialize; + +// Cumulus +use xcm_emulator::{ + // decl_test_bridges, + decl_test_networks, + decl_test_parachains, + decl_test_relay_chains, + decl_test_sender_receiver_accounts_parameter_types, +}; + +use polkadot_primitives::runtime_api::runtime_decl_for_parachain_host::ParachainHostV7; + +decl_test_relay_chains! { + #[api_version(5)] + pub struct Polkadot { + genesis = polkadot::genesis(), + on_init = (), + runtime = polkadot_runtime, + core = { + SovereignAccountOf: polkadot_runtime::xcm_config::SovereignAccountOf, + }, + pallets = { + XcmPallet: polkadot_runtime::XcmPallet, + Balances: polkadot_runtime::Balances, + Hrmp: polkadot_runtime::Hrmp, + } + }, + #[api_version(5)] + pub struct Kusama { + genesis = kusama::genesis(), + on_init = (), + runtime = kusama_runtime, + core = { + SovereignAccountOf: kusama_runtime::xcm_config::SovereignAccountOf, + }, + pallets = { + XcmPallet: kusama_runtime::XcmPallet, + Balances: kusama_runtime::Balances, + Hrmp: kusama_runtime::Hrmp, + } + }, +} + +decl_test_parachains! { + // Polkadot Parachains + pub struct AssetHubPolkadot { + genesis = asset_hub_polkadot::genesis(), + on_init = { + asset_hub_polkadot_runtime::AuraExt::on_initialize(1); + }, + runtime = asset_hub_polkadot_runtime, + core = { + XcmpMessageHandler: asset_hub_polkadot_runtime::XcmpQueue, + LocationToAccountId: asset_hub_polkadot_runtime::xcm_config::LocationToAccountId, + ParachainInfo: asset_hub_polkadot_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: asset_hub_polkadot_runtime::PolkadotXcm, + Assets: asset_hub_polkadot_runtime::Assets, + ForeignAssets: asset_hub_polkadot_runtime::ForeignAssets, + Balances: asset_hub_polkadot_runtime::Balances, + } + }, + pub struct Collectives { + genesis = collectives::genesis(), + on_init = { + collectives_polkadot_runtime::AuraExt::on_initialize(1); + }, + runtime = collectives_polkadot_runtime, + core = { + XcmpMessageHandler: collectives_polkadot_runtime::XcmpQueue, + LocationToAccountId: collectives_polkadot_runtime::xcm_config::LocationToAccountId, + ParachainInfo: collectives_polkadot_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: collectives_polkadot_runtime::PolkadotXcm, + Balances: collectives_polkadot_runtime::Balances, + } + }, + pub struct BridgeHubPolkadot { + genesis = bridge_hub_polkadot::genesis(), + on_init = { + bridge_hub_polkadot_runtime::AuraExt::on_initialize(1); + }, + runtime = bridge_hub_polkadot_runtime, + core = { + XcmpMessageHandler: bridge_hub_polkadot_runtime::XcmpQueue, + LocationToAccountId: bridge_hub_polkadot_runtime::xcm_config::LocationToAccountId, + ParachainInfo: bridge_hub_polkadot_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: bridge_hub_polkadot_runtime::PolkadotXcm, + } + }, + pub struct PenpalPolkadotA { + genesis = penpal::genesis(penpal::PARA_ID_A), + on_init = { + penpal_runtime::AuraExt::on_initialize(1); + }, + runtime = penpal_runtime, + core = { + XcmpMessageHandler: penpal_runtime::XcmpQueue, + LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, + ParachainInfo: penpal_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: penpal_runtime::PolkadotXcm, + Assets: penpal_runtime::Assets, + Balances: penpal_runtime::Balances, + } + }, + pub struct PenpalPolkadotB { + genesis = penpal::genesis(penpal::PARA_ID_B), + on_init = { + penpal_runtime::AuraExt::on_initialize(1); + }, + runtime = penpal_runtime, + core = { + XcmpMessageHandler: penpal_runtime::XcmpQueue, + LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, + ParachainInfo: penpal_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: penpal_runtime::PolkadotXcm, + Assets: penpal_runtime::Assets, + Balances: penpal_runtime::Balances, + } + }, + // Kusama Parachains + pub struct AssetHubKusama { + genesis = asset_hub_kusama::genesis(), + on_init = { + asset_hub_kusama_runtime::AuraExt::on_initialize(1); + }, + runtime = asset_hub_kusama_runtime, + core = { + XcmpMessageHandler: asset_hub_kusama_runtime::XcmpQueue, + LocationToAccountId: asset_hub_kusama_runtime::xcm_config::LocationToAccountId, + ParachainInfo: asset_hub_kusama_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: asset_hub_kusama_runtime::PolkadotXcm, + Assets: asset_hub_kusama_runtime::Assets, + ForeignAssets: asset_hub_kusama_runtime::ForeignAssets, + PoolAssets: asset_hub_kusama_runtime::PoolAssets, + AssetConversion: asset_hub_kusama_runtime::AssetConversion, + Balances: asset_hub_kusama_runtime::Balances, + } + }, + pub struct BridgeHubKusama { + genesis = bridge_hub_kusama::genesis(), + on_init = { + bridge_hub_kusama_runtime::AuraExt::on_initialize(1); + }, + runtime = bridge_hub_kusama_runtime, + core = { + XcmpMessageHandler: bridge_hub_kusama_runtime::XcmpQueue, + LocationToAccountId: bridge_hub_kusama_runtime::xcm_config::LocationToAccountId, + ParachainInfo: bridge_hub_kusama_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: bridge_hub_kusama_runtime::PolkadotXcm, + } + }, + pub struct PenpalKusamaA { + genesis = penpal::genesis(penpal::PARA_ID_A), + on_init = { + penpal_runtime::AuraExt::on_initialize(1); + }, + runtime = penpal_runtime, + core = { + XcmpMessageHandler: penpal_runtime::XcmpQueue, + LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, + ParachainInfo: penpal_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: penpal_runtime::PolkadotXcm, + Assets: penpal_runtime::Assets, + Balances: penpal_runtime::Balances, + } + }, + pub struct PenpalKusamaB { + genesis = penpal::genesis(penpal::PARA_ID_B), + on_init = { + penpal_runtime::AuraExt::on_initialize(1); + }, + runtime = penpal_runtime, + core = { + XcmpMessageHandler: penpal_runtime::XcmpQueue, + LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, + ParachainInfo: penpal_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: penpal_runtime::PolkadotXcm, + Assets: penpal_runtime::Assets, + Balances: penpal_runtime::Balances, + } + }, +} + +decl_test_networks! { + pub struct PolkadotMockNet { + relay_chain = Polkadot, + parachains = vec![ + AssetHubPolkadot, + Collectives, + BridgeHubPolkadot, + PenpalPolkadotA, + PenpalPolkadotB, + ], + // TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged + // bridge = PolkadotKusamaMockBridge + bridge = () + }, + pub struct KusamaMockNet { + relay_chain = Kusama, + parachains = vec![ + AssetHubKusama, + BridgeHubKusama, + PenpalKusamaA, + PenpalKusamaB, + ], + // TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged + // bridge = KusamaPolkadotMockBridge + bridge = () + }, +} + +// TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged +// decl_test_bridges! { +// pub struct PolkadotKusamaMockBridge { +// source = BridgeHubPolkadot, +// target = BridgeHubKusama, +// handler = PolkadotKusamaMessageHandler +// }, +// pub struct KusamaPolkadotMockBridge { +// source = BridgeHubKusama, +// target = BridgeHubPolkadot, +// handler = KusamaPolkadotMessageHandler +// } +// } + +// Polkadot implementation +impl_accounts_helpers_for_relay_chain!(Polkadot); +impl_assert_events_helpers_for_relay_chain!(Polkadot); +impl_hrmp_channels_helpers_for_relay_chain!(Polkadot); +impl_send_transact_helpers_for_relay_chain!(Polkadot); + +// Kusama implementation +impl_accounts_helpers_for_relay_chain!(Kusama); +impl_assert_events_helpers_for_relay_chain!(Kusama); +impl_hrmp_channels_helpers_for_relay_chain!(Kusama); +impl_send_transact_helpers_for_relay_chain!(Kusama); + +// AssetHubPolkadot implementation +impl_accounts_helpers_for_parachain!(AssetHubPolkadot); +impl_assets_helpers_for_parachain!(AssetHubPolkadot, Polkadot); +impl_assert_events_helpers_for_parachain!(AssetHubPolkadot); +impl_foreign_assets_helpers_for_parachain!(AssetHubPolkadot, Polkadot); + +// AssetHubKusama implementation +impl_accounts_helpers_for_parachain!(AssetHubKusama); +impl_assets_helpers_for_parachain!(AssetHubKusama, Kusama); +impl_assert_events_helpers_for_parachain!(AssetHubKusama); +impl_foreign_assets_helpers_for_parachain!(AssetHubKusama, Kusama); + +// PenpalPolkadot implementations +impl_accounts_helpers_for_parachain!(PenpalPolkadotA); +impl_accounts_helpers_for_parachain!(PenpalPolkadotB); +impl_assets_helpers_for_parachain!(PenpalPolkadotA, Polkadot); +impl_assets_helpers_for_parachain!(PenpalPolkadotB, Polkadot); +impl_assert_events_helpers_for_parachain!(PenpalPolkadotA); +impl_assert_events_helpers_for_parachain!(PenpalPolkadotB); + +// PenpalKusama implementations +impl_accounts_helpers_for_parachain!(PenpalKusamaA); +impl_accounts_helpers_for_parachain!(PenpalKusamaB); +impl_assets_helpers_for_parachain!(PenpalKusamaA, Kusama); +impl_assets_helpers_for_parachain!(PenpalKusamaB, Kusama); +impl_assert_events_helpers_for_parachain!(PenpalKusamaA); +impl_assert_events_helpers_for_parachain!(PenpalKusamaB); + +// Collectives implementation +impl_accounts_helpers_for_parachain!(Collectives); +impl_assert_events_helpers_for_parachain!(Collectives); + +decl_test_sender_receiver_accounts_parameter_types! { + // Relays + PolkadotRelay { sender: ALICE, receiver: BOB }, + KusamaRelay { sender: ALICE, receiver: BOB }, + // Asset Hubs + AssetHubPolkadotPara { sender: ALICE, receiver: BOB }, + AssetHubKusamaPara { sender: ALICE, receiver: BOB }, + // Collectives + CollectivesPara { sender: ALICE, receiver: BOB }, + // Bridged Hubs + BridgeHubPolkadotPara { sender: ALICE, receiver: BOB }, + BridgeHubKusamaPara { sender: ALICE, receiver: BOB }, + // Penpals + PenpalPolkadotAPara { sender: ALICE, receiver: BOB }, + PenpalPolkadotBPara { sender: ALICE, receiver: BOB }, + PenpalKusamaAPara { sender: ALICE, receiver: BOB }, + PenpalKusamaBPara { sender: ALICE, receiver: BOB } +} + +pub type PenpalLocalTeleportableToAssetHub = + penpal_runtime::xcm_config::LocalTeleportableToAssetHub; +pub type PenpalXcmConfig = penpal_runtime::xcm_config::XcmConfig; diff --git a/integration-tests/emulated/common/Cargo.toml b/integration-tests/emulated/common/Cargo.toml index ff465e9a2f..e1c9c700b2 100644 --- a/integration-tests/emulated/common/Cargo.toml +++ b/integration-tests/emulated/common/Cargo.toml @@ -9,7 +9,6 @@ description = "Common resources for integration testing with xcm-emulator" [dependencies] codec = { package = "parity-scale-codec", version = "3.6.9" } paste = "1.0.14" -serde_json = "1.0.111" # Substrate grandpa-primitives = { package = "sp-consensus-grandpa", version = "12.0.0" } @@ -22,7 +21,6 @@ pallet-assets = { version = "28.0.0" } pallet-balances = { version = "27.0.0" } pallet-message-queue = { version = "30.0.0" } pallet-im-online = { version = "26.0.0" } -pallet-staking = { version = "27.0.0" } beefy-primitives = { package = "sp-consensus-beefy", version = "12.0.0" } # Polkadot @@ -30,8 +28,6 @@ polkadot-primitives = { version = "6.0.0" } polkadot-runtime-parachains = { version = "6.0.0" } xcm = { package = "staging-xcm", version = "6.0.0" } pallet-xcm = { version = "6.0.0" } -polkadot-core-primitives = { version = "6.0.0" } -polkadot-parachain-primitives = { version = "5.0.0" } # Cumulus parachains-common = { version = "6.0.0" } @@ -41,25 +37,8 @@ cumulus-pallet-xcmp-queue = { version = "0.6.0" } cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook",] , version = "0.6.0" } asset-test-utils = { version = "6.0.0" } cumulus-pallet-dmp-queue = { version = "0.6.0" } -penpal-runtime = { version = "0.13.0" } - -# Local runtimes -kusama-runtime = { package = "staging-kusama-runtime", path = "../../../relay/kusama" } -kusama-runtime-constants = { path = "../../../relay/kusama/constants" } -polkadot-runtime = { path = "../../../relay/polkadot" } -polkadot-runtime-constants = { path = "../../../relay/polkadot/constants" } -asset-hub-polkadot-runtime = { path = "../../../system-parachains/asset-hubs/asset-hub-polkadot" } -asset-hub-kusama-runtime = { path = "../../../system-parachains/asset-hubs/asset-hub-kusama" } -collectives-polkadot-runtime = { path = "../../../system-parachains/collectives/collectives-polkadot" } -bridge-hub-polkadot-runtime = { path = "../../../system-parachains/bridge-hubs/bridge-hub-polkadot" } -bridge-hub-kusama-runtime = { path = "../../../system-parachains/bridge-hubs/bridge-hub-kusama" } # Bridges bp-messages = { version = "0.6.0" } pallet-bridge-messages = { version = "0.6.0" } bridge-runtime-common = { version = "0.6.0" } - -[features] -runtime-benchmarks = [ - "penpal-runtime/runtime-benchmarks" -] diff --git a/integration-tests/emulated/common/src/impls.rs b/integration-tests/emulated/common/src/impls.rs index 5969b8ac84..076e8d7e7a 100644 --- a/integration-tests/emulated/common/src/impls.rs +++ b/integration-tests/emulated/common/src/impls.rs @@ -17,12 +17,16 @@ pub use codec::{Decode, Encode}; pub use paste; pub use crate::{ - constants::{PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD}, - xcm_helpers::xcm_transact_unpaid_execution, + xcm_helpers::xcm_transact_unpaid_execution, PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, }; // Substrate -pub use frame_support::{assert_ok, traits::fungibles::Inspect}; +pub use frame_support::{ + assert_ok, + sp_runtime::AccountId32, + traits::fungibles::Inspect, + weights::{Weight, WeightMeter}, +}; pub use pallet_assets; pub use pallet_message_queue; use sp_core::Get; @@ -43,7 +47,8 @@ use pallet_bridge_messages::{Config, Instance1, OutboundLanes, Pallet}; pub use parachains_common::{AccountId, Balance}; pub use xcm_emulator::{ assert_expected_events, bx, helpers::weight_within_threshold, BridgeMessage, - BridgeMessageDispatchError, BridgeMessageHandler, Chain, Parachain, RelayChain, TestExt, + BridgeMessageDispatchError, BridgeMessageHandler, Chain, Network, Parachain, RelayChain, + TestExt, }; // Polkadot @@ -53,7 +58,7 @@ pub use polkadot_runtime_parachains::{ inclusion::{AggregateMessageOrigin, UmpQueueId}, }; pub use xcm::{ - prelude::{OriginKind, Outcome, VersionedXcm, Weight}, + prelude::{Junction, Junctions, MultiLocation, NetworkId, OriginKind, Outcome, VersionedXcm}, v3::Error, DoubleEncoded, }; @@ -169,12 +174,12 @@ where macro_rules! impl_accounts_helpers_for_relay_chain { ( $chain:ident ) => { $crate::impls::paste::paste! { - impl $chain { + impl $chain { /// Fund a set of accounts with a balance pub fn fund_accounts(accounts: Vec<($crate::impls::AccountId, $crate::impls::Balance)>) { ::execute_with(|| { for account in accounts { - $crate::impls::assert_ok!(]>::Balances::force_set_balance( + $crate::impls::assert_ok!(]>::Balances::force_set_balance( ::RuntimeOrigin::root(), account.0.into(), account.1, @@ -183,7 +188,7 @@ macro_rules! impl_accounts_helpers_for_relay_chain { }); } /// Fund a sovereign account based on its Parachain Id - pub fn fund_para_sovereign(amount: $crate::impls::Balance, para_id: $crate::impls::ParaId) -> sp_runtime::AccountId32 { + pub fn fund_para_sovereign(amount: $crate::impls::Balance, para_id: $crate::impls::ParaId) -> $crate::impls::AccountId32 { let sovereign_account = ::sovereign_account_id_of_child_para(para_id); Self::fund_accounts(vec![(sovereign_account.clone(), amount)]); sovereign_account @@ -197,15 +202,15 @@ macro_rules! impl_accounts_helpers_for_relay_chain { macro_rules! impl_assert_events_helpers_for_relay_chain { ( $chain:ident ) => { $crate::impls::paste::paste! { - type [<$chain RuntimeEvent>] = <$chain as $crate::impls::Chain>::RuntimeEvent; + type [<$chain RuntimeEvent>] = <$chain as $crate::impls::Chain>::RuntimeEvent; - impl $chain { + impl $chain { /// Asserts a dispatchable is completely executed and XCM sent pub fn assert_xcm_pallet_attempted_complete(expected_weight: Option<$crate::impls::Weight>) { $crate::impls::assert_expected_events!( Self, vec![ - [<$chain RuntimeEvent>]::XcmPallet( + [<$chain RuntimeEvent>]::::XcmPallet( $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Complete(weight) } ) => { weight: $crate::impls::weight_within_threshold( @@ -227,7 +232,7 @@ macro_rules! impl_assert_events_helpers_for_relay_chain { Self, vec![ // Dispatchable is properly executed and XCM message sent - [<$chain RuntimeEvent>]::XcmPallet( + [<$chain RuntimeEvent>]::::XcmPallet( $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Incomplete(weight, error) } ) => { weight: $crate::impls::weight_within_threshold( @@ -246,7 +251,7 @@ macro_rules! impl_assert_events_helpers_for_relay_chain { $crate::impls::assert_expected_events!( Self, vec![ - [<$chain RuntimeEvent>]::XcmPallet($crate::impls::pallet_xcm::Event::Sent { .. }) => {}, + [<$chain RuntimeEvent>]::::XcmPallet($crate::impls::pallet_xcm::Event::Sent { .. }) => {}, ] ); } @@ -261,7 +266,7 @@ macro_rules! impl_assert_events_helpers_for_relay_chain { Self, vec![ // XCM is succesfully received and proccessed - [<$chain RuntimeEvent>]::MessageQueue($crate::impls::pallet_message_queue::Event::Processed { + [<$chain RuntimeEvent>]::::MessageQueue($crate::impls::pallet_message_queue::Event::Processed { origin: $crate::impls::AggregateMessageOrigin::Ump($crate::impls::UmpQueueId::Para(id)), weight_used, success, @@ -287,7 +292,7 @@ macro_rules! impl_assert_events_helpers_for_relay_chain { macro_rules! impl_hrmp_channels_helpers_for_relay_chain { ( $chain:ident ) => { $crate::impls::paste::paste! { - impl $chain { + impl $chain { /// Init open channel request with another Parachain pub fn init_open_channel_call( recipient_para_id: $crate::impls::ParaId, @@ -327,9 +332,9 @@ macro_rules! impl_hrmp_channels_helpers_for_relay_chain { let relay_root_origin = ::RuntimeOrigin::root(); // Force process HRMP open channel requests without waiting for the next session - $crate::impls::assert_ok!(]>::Hrmp::force_process_hrmp_open( + $crate::impls::assert_ok!(]>::Hrmp::force_process_hrmp_open( relay_root_origin, - u32::MAX, + 0 )); let channel_id = $crate::impls::HrmpChannelId { sender, recipient }; @@ -338,7 +343,7 @@ macro_rules! impl_hrmp_channels_helpers_for_relay_chain { ::Runtime, >::contains_key(&channel_id); - // Check the HRMP channel has been successfully registered + // Check the HRMP channel has been successfully registrered assert!(hrmp_channel_exist) }); } @@ -347,16 +352,47 @@ macro_rules! impl_hrmp_channels_helpers_for_relay_chain { }; } +#[macro_export] +macro_rules! impl_send_transact_helpers_for_relay_chain { + ( $chain:ident ) => { + $crate::impls::paste::paste! { + impl $chain { + /// A root origin (as governance) sends `xcm::Transact` with `UnpaidExecution` and encoded `call` to child parachain. + pub fn send_unpaid_transact_to_parachain_as_root( + recipient: $crate::impls::ParaId, + call: $crate::impls::DoubleEncoded<()> + ) { + use $crate::impls::{bx, Chain, RelayChain}; + + ::execute_with(|| { + let root_origin = ::RuntimeOrigin::root(); + let destination: $crate::impls::MultiLocation = ::child_location_of(recipient); + let xcm = $crate::impls::xcm_transact_unpaid_execution(call, $crate::impls::OriginKind::Superuser); + + // Send XCM `Transact` + $crate::impls::assert_ok!(]>::XcmPallet::send( + root_origin, + bx!(destination.into()), + bx!(xcm), + )); + Self::assert_xcm_pallet_sent(); + }); + } + } + } + }; +} + #[macro_export] macro_rules! impl_accounts_helpers_for_parachain { ( $chain:ident ) => { $crate::impls::paste::paste! { - impl $chain { + impl $chain { /// Fund a set of accounts with a balance pub fn fund_accounts(accounts: Vec<($crate::impls::AccountId, $crate::impls::Balance)>) { ::execute_with(|| { for account in accounts { - $crate::impls::assert_ok!(]>::Balances::force_set_balance( + $crate::impls::assert_ok!(]>::Balances::force_set_balance( ::RuntimeOrigin::root(), account.0.into(), account.1, @@ -364,6 +400,23 @@ macro_rules! impl_accounts_helpers_for_parachain { } }); } + + /// Return local sovereign account of `para_id` on other `network_id` + pub fn sovereign_account_of_parachain_on_other_global_consensus( + network_id: $crate::impls::NetworkId, + para_id: $crate::impls::ParaId, + ) -> $crate::impls::AccountId { + let remote_location = $crate::impls::MultiLocation { + parents: 2, + interior: $crate::impls::Junctions::X2( + $crate::impls::Junction::GlobalConsensus(network_id), + $crate::impls::Junction::Parachain(para_id.into()), + ), + }; + ::execute_with(|| { + Self::sovereign_account_id_of(remote_location) + }) + } } } }; @@ -373,15 +426,15 @@ macro_rules! impl_accounts_helpers_for_parachain { macro_rules! impl_assert_events_helpers_for_parachain { ( $chain:ident ) => { $crate::impls::paste::paste! { - type [<$chain RuntimeEvent>] = <$chain as $crate::impls::Chain>::RuntimeEvent; + type [<$chain RuntimeEvent>] = <$chain as $crate::impls::Chain>::RuntimeEvent; - impl $chain { + impl $chain { /// Asserts a dispatchable is completely executed and XCM sent pub fn assert_xcm_pallet_attempted_complete(expected_weight: Option<$crate::impls::Weight>) { $crate::impls::assert_expected_events!( Self, vec![ - [<$chain RuntimeEvent>]::PolkadotXcm( + [<$chain RuntimeEvent>]::::PolkadotXcm( $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Complete(weight) } ) => { weight: $crate::impls::weight_within_threshold( @@ -403,7 +456,7 @@ macro_rules! impl_assert_events_helpers_for_parachain { Self, vec![ // Dispatchable is properly executed and XCM message sent - [<$chain RuntimeEvent>]::PolkadotXcm( + [<$chain RuntimeEvent>]::::PolkadotXcm( $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Incomplete(weight, error) } ) => { weight: $crate::impls::weight_within_threshold( @@ -423,7 +476,7 @@ macro_rules! impl_assert_events_helpers_for_parachain { Self, vec![ // Execution fails in the origin with `Barrier` - [<$chain RuntimeEvent>]::PolkadotXcm( + [<$chain RuntimeEvent>]::::PolkadotXcm( $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Error(error) } ) => { error: *error == expected_error.unwrap_or(*error), @@ -437,7 +490,7 @@ macro_rules! impl_assert_events_helpers_for_parachain { $crate::impls::assert_expected_events!( Self, vec![ - [<$chain RuntimeEvent>]::PolkadotXcm($crate::impls::pallet_xcm::Event::Sent { .. }) => {}, + [<$chain RuntimeEvent>]::::PolkadotXcm($crate::impls::pallet_xcm::Event::Sent { .. }) => {}, ] ); } @@ -447,7 +500,7 @@ macro_rules! impl_assert_events_helpers_for_parachain { $crate::impls::assert_expected_events!( Self, vec![ - [<$chain RuntimeEvent>]::ParachainSystem( + [<$chain RuntimeEvent>]::::ParachainSystem( $crate::impls::cumulus_pallet_parachain_system::Event::UpwardMessageSent { .. } ) => {}, ] @@ -459,8 +512,8 @@ macro_rules! impl_assert_events_helpers_for_parachain { $crate::impls::assert_expected_events!( Self, vec![ - [<$chain RuntimeEvent>]::DmpQueue($crate::impls::cumulus_pallet_dmp_queue::Event::ExecutedDownward { - outcome: $crate::impls::Outcome::Complete(weight), .. + [<$chain RuntimeEvent>]::::MessageQueue($crate::impls::pallet_message_queue::Event::Processed { + success: true, weight_used: weight, .. }) => { weight: $crate::impls::weight_within_threshold( ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), @@ -480,15 +533,14 @@ macro_rules! impl_assert_events_helpers_for_parachain { $crate::impls::assert_expected_events!( Self, vec![ - [<$chain RuntimeEvent>]::DmpQueue($crate::impls::cumulus_pallet_dmp_queue::Event::ExecutedDownward { - outcome: $crate::impls::Outcome::Incomplete(weight, error), .. + [<$chain RuntimeEvent>]::::MessageQueue($crate::impls::pallet_message_queue::Event::Processed { + success: false, weight_used: weight, .. }) => { weight: $crate::impls::weight_within_threshold( ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), expected_weight.unwrap_or(*weight), *weight ), - error: *error == expected_error.unwrap_or(*error), }, ] ); @@ -499,8 +551,8 @@ macro_rules! impl_assert_events_helpers_for_parachain { $crate::impls::assert_expected_events!( Self, vec![ - [<$chain RuntimeEvent>]::XcmpQueue( - $crate::impls::cumulus_pallet_xcmp_queue::Event::Success { weight, .. } + [<$chain RuntimeEvent>]::::MessageQueue($crate::impls::pallet_message_queue::Event::Processed { success: true, weight_used: weight, .. } + ) => { weight: $crate::impls::weight_within_threshold( ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), @@ -520,7 +572,7 @@ macro_rules! impl_assert_events_helpers_for_parachain { macro_rules! impl_assets_helpers_for_parachain { ( $chain:ident, $relay_chain:ident ) => { $crate::impls::paste::paste! { - impl $chain { + impl $chain { /// Returns the encoded call for `force_create` from the assets pallet pub fn force_create_asset_call( asset_id: u32, @@ -563,19 +615,21 @@ macro_rules! impl_assets_helpers_for_parachain { amount_to_mint: u128, ) { ::execute_with(|| { - $crate::impls::assert_ok!(]>::Assets::mint( + $crate::impls::assert_ok!(]>::Assets::mint( signed_origin, id.into(), beneficiary.clone().into(), amount_to_mint )); - type RuntimeEvent = <$chain as $crate::impls::Chain>::RuntimeEvent; + type RuntimeEvent = <$chain as $crate::impls::Chain>::RuntimeEvent; $crate::impls::assert_expected_events!( Self, vec![ - RuntimeEvent::Assets($crate::impls::pallet_assets::Event::Issued { asset_id, owner, amount }) => { + RuntimeEvent::::Assets( + $crate::impls::pallet_assets::Event::Issued { asset_id, owner, amount } + ) => { asset_id: *asset_id == id, owner: *owner == beneficiary.clone().into(), amount: *amount == amount_to_mint, @@ -591,53 +645,140 @@ macro_rules! impl_assets_helpers_for_parachain { min_balance: u128, is_sufficient: bool, asset_owner: $crate::impls::AccountId, + dmp_weight_threshold: Option<$crate::impls::Weight>, amount_to_mint: u128, ) { - use $crate::impls::{bx, Chain, RelayChain, Parachain, Inspect, TestExt}; - // Init values for Relay Chain - let root_origin = <$relay_chain as Chain>::RuntimeOrigin::root(); - let destination = <$relay_chain>::child_location_of(<$chain>::para_id()); - let xcm = Self::force_create_asset_xcm( - $crate::impls::OriginKind::Superuser, + use $crate::impls::Chain; + + // Force create asset + Self::force_create_asset_from_relay_as_root( id, - asset_owner.clone(), - is_sufficient, min_balance, + is_sufficient, + asset_owner.clone(), + dmp_weight_threshold ); - <$relay_chain>::execute_with(|| { - $crate::impls::assert_ok!(<$relay_chain as [<$relay_chain Pallet>]>::XcmPallet::send( - root_origin, - bx!(destination.into()), - bx!(xcm), - )); + // Mint asset for System Parachain's sender + let signed_origin = ::RuntimeOrigin::signed(asset_owner.clone()); + Self::mint_asset(signed_origin, id, asset_owner, amount_to_mint); + } - <$relay_chain>::assert_xcm_pallet_sent(); - }); + /// Relay Chain sends `Transact` instruction with `force_create_asset` to Parachain with `Assets` instance of `pallet_assets` . + pub fn force_create_asset_from_relay_as_root( + id: u32, + min_balance: u128, + is_sufficient: bool, + asset_owner: $crate::impls::AccountId, + dmp_weight_threshold: Option<$crate::impls::Weight>, + ) { + use $crate::impls::{Parachain, Inspect, TestExt}; + + <$relay_chain>::send_unpaid_transact_to_parachain_as_root( + Self::para_id(), + Self::force_create_asset_call(id, asset_owner.clone(), is_sufficient, min_balance), + ); + // Receive XCM message in Assets Parachain Self::execute_with(|| { - Self::assert_dmp_queue_complete(Some($crate::impls::Weight::from_parts(1_020_000_000, 200_000))); + type RuntimeEvent = <$chain as $crate::impls::Chain>::RuntimeEvent; - type RuntimeEvent = <$chain as $crate::impls::Chain>::RuntimeEvent; + Self::assert_dmp_queue_complete(dmp_weight_threshold); $crate::impls::assert_expected_events!( Self, vec![ - // Asset has been created - RuntimeEvent::Assets($crate::impls::pallet_assets::Event::ForceCreated { asset_id, owner }) => { + RuntimeEvent::::Assets($crate::impls::pallet_assets::Event::ForceCreated { asset_id, owner }) => { asset_id: *asset_id == id, - owner: *owner == asset_owner.clone(), + owner: *owner == asset_owner, }, ] ); - assert!(]>::Assets::asset_exists(id.into())); + assert!(]>::Assets::asset_exists(id.into())); }); + } + } + } + }; +} - let signed_origin = ::RuntimeOrigin::signed(asset_owner.clone()); +#[macro_export] +macro_rules! impl_foreign_assets_helpers_for_parachain { + ( $chain:ident, $relay_chain:ident ) => { + $crate::impls::paste::paste! { + impl $chain { + /// Create foreign assets using sudo `ForeignAssets::force_create()` + pub fn force_create_foreign_asset( + id: $crate::impls::MultiLocation, + owner: $crate::impls::AccountId, + is_sufficient: bool, + min_balance: u128, + prefund_accounts: Vec<($crate::impls::AccountId, u128)>, + ) { + use $crate::impls::Inspect; + let sudo_origin = <$chain as $crate::impls::Chain>::RuntimeOrigin::root(); + ::execute_with(|| { + $crate::impls::assert_ok!( + ]>::ForeignAssets::force_create( + sudo_origin, + id, + owner.clone().into(), + is_sufficient, + min_balance, + ) + ); + assert!(]>::ForeignAssets::asset_exists(id)); + type RuntimeEvent = <$chain as $crate::impls::Chain>::RuntimeEvent; + $crate::impls::assert_expected_events!( + Self, + vec![ + RuntimeEvent::::ForeignAssets( + $crate::impls::pallet_assets::Event::ForceCreated { + asset_id, + .. + } + ) => { asset_id: *asset_id == id, }, + ] + ); + }); + for (beneficiary, amount) in prefund_accounts.into_iter() { + let signed_origin = + <$chain as $crate::impls::Chain>::RuntimeOrigin::signed(owner.clone()); + Self::mint_foreign_asset(signed_origin, id, beneficiary, amount); + } + } - // Mint asset for System Parachain's sender - Self::mint_asset(signed_origin, id, asset_owner, amount_to_mint); + /// Mint assets making use of the ForeignAssets pallet-assets instance + pub fn mint_foreign_asset( + signed_origin: ::RuntimeOrigin, + id: $crate::impls::MultiLocation, + beneficiary: $crate::impls::AccountId, + amount_to_mint: u128, + ) { + ::execute_with(|| { + $crate::impls::assert_ok!(]>::ForeignAssets::mint( + signed_origin, + id.into(), + beneficiary.clone().into(), + amount_to_mint + )); + + type RuntimeEvent = <$chain as $crate::impls::Chain>::RuntimeEvent; + + $crate::impls::assert_expected_events!( + Self, + vec![ + RuntimeEvent::::ForeignAssets( + $crate::impls::pallet_assets::Event::Issued { asset_id, owner, amount } + ) => { + asset_id: *asset_id == id, + owner: *owner == beneficiary.clone().into(), + amount: *amount == amount_to_mint, + }, + ] + ); + }); } } } diff --git a/integration-tests/emulated/common/src/lib.rs b/integration-tests/emulated/common/src/lib.rs index 11e6ef5921..8058f88b58 100644 --- a/integration-tests/emulated/common/src/lib.rs +++ b/integration-tests/emulated/common/src/lib.rs @@ -13,316 +13,137 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![cfg(not(feature = "runtime-benchmarks"))] - -pub mod constants; pub mod impls; +pub mod macros; pub mod xcm_helpers; -use constants::{ - accounts::{ALICE, BOB}, - asset_hub_kusama, asset_hub_polkadot, bridge_hub_kusama, bridge_hub_polkadot, collectives, - kusama, penpal, polkadot, -}; - // Substrate -use frame_support::traits::OnInitialize; +use beefy_primitives::ecdsa_crypto::AuthorityId as BeefyId; +use grandpa_primitives::AuthorityId as GrandpaId; +use pallet_im_online::sr25519::AuthorityId as ImOnlineId; +use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; +use sp_consensus_babe::AuthorityId as BabeId; +use sp_core::{sr25519, Pair, Public}; +use sp_runtime::{ + traits::{IdentifyAccount, Verify}, + MultiSignature, +}; // Cumulus -use xcm_emulator::{ - // decl_test_bridges, - decl_test_networks, - decl_test_parachains, - decl_test_relay_chains, - decl_test_sender_receiver_accounts_parameter_types, - DefaultMessageProcessor, -}; +use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId}; +use polkadot_primitives::{AssignmentId, ValidatorId}; -use polkadot_primitives::runtime_api::runtime_decl_for_parachain_host::ParachainHostV8; +/// The default XCM version to set in genesis config. +pub const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; -decl_test_relay_chains! { - #[api_version(5)] - pub struct Polkadot { - genesis = polkadot::genesis(), - on_init = (), - runtime = polkadot_runtime, - core = { - MessageProcessor: DefaultMessageProcessor, - SovereignAccountOf: polkadot_runtime::xcm_config::SovereignAccountOf, - }, - pallets = { - XcmPallet: polkadot_runtime::XcmPallet, - Balances: polkadot_runtime::Balances, - Hrmp: polkadot_runtime::Hrmp, - } - }, - #[api_version(5)] - pub struct Kusama { - genesis = kusama::genesis(), - on_init = (), - runtime = kusama_runtime, - core = { - MessageProcessor: DefaultMessageProcessor, - SovereignAccountOf: kusama_runtime::xcm_config::SovereignAccountOf, - }, - pallets = { - XcmPallet: kusama_runtime::XcmPallet, - Balances: kusama_runtime::Balances, - Hrmp: kusama_runtime::Hrmp, - } - }, -} +pub const XCM_V2: u32 = 3; +pub const XCM_V3: u32 = 2; +pub const REF_TIME_THRESHOLD: u64 = 33; +pub const PROOF_SIZE_THRESHOLD: u64 = 33; -decl_test_parachains! { - // Polkadot Parachains - pub struct AssetHubPolkadot { - genesis = asset_hub_polkadot::genesis(), - on_init = { - asset_hub_polkadot_runtime::AuraExt::on_initialize(1); - }, - runtime = asset_hub_polkadot_runtime, - core = { - XcmpMessageHandler: asset_hub_polkadot_runtime::XcmpQueue, - DmpMessageHandler: asset_hub_polkadot_runtime::DmpQueue, - LocationToAccountId: asset_hub_polkadot_runtime::xcm_config::LocationToAccountId, - ParachainInfo: asset_hub_polkadot_runtime::ParachainInfo, - }, - pallets = { - PolkadotXcm: asset_hub_polkadot_runtime::PolkadotXcm, - Assets: asset_hub_polkadot_runtime::Assets, - Balances: asset_hub_polkadot_runtime::Balances, - } - }, - pub struct Collectives { - genesis = collectives::genesis(), - on_init = { - collectives_polkadot_runtime::AuraExt::on_initialize(1); - }, - runtime = collectives_polkadot_runtime, - core = { - XcmpMessageHandler: collectives_polkadot_runtime::XcmpQueue, - DmpMessageHandler: collectives_polkadot_runtime::DmpQueue, - LocationToAccountId: collectives_polkadot_runtime::xcm_config::LocationToAccountId, - ParachainInfo: collectives_polkadot_runtime::ParachainInfo, - }, - pallets = { - PolkadotXcm: collectives_polkadot_runtime::PolkadotXcm, - Balances: collectives_polkadot_runtime::Balances, - } - }, - pub struct BridgeHubPolkadot { - genesis = bridge_hub_polkadot::genesis(), - on_init = { - bridge_hub_polkadot_runtime::AuraExt::on_initialize(1); - }, - runtime = bridge_hub_polkadot_runtime, - core = { - XcmpMessageHandler: bridge_hub_polkadot_runtime::XcmpQueue, - DmpMessageHandler: bridge_hub_polkadot_runtime::DmpQueue, - LocationToAccountId: bridge_hub_polkadot_runtime::xcm_config::LocationToAccountId, - ParachainInfo: bridge_hub_polkadot_runtime::ParachainInfo, - }, - pallets = { - PolkadotXcm: bridge_hub_polkadot_runtime::PolkadotXcm, - } - }, - pub struct PenpalPolkadotA { - genesis = penpal::genesis(penpal::PARA_ID_A), - on_init = { - penpal_runtime::AuraExt::on_initialize(1); - }, - runtime = penpal_runtime, - core = { - XcmpMessageHandler: penpal_runtime::XcmpQueue, - DmpMessageHandler: penpal_runtime::DmpQueue, - LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, - ParachainInfo: penpal_runtime::ParachainInfo, - }, - pallets = { - PolkadotXcm: penpal_runtime::PolkadotXcm, - Assets: penpal_runtime::Assets, - } - }, - pub struct PenpalPolkadotB { - genesis = penpal::genesis(penpal::PARA_ID_B), - on_init = { - penpal_runtime::AuraExt::on_initialize(1); - }, - runtime = penpal_runtime, - core = { - XcmpMessageHandler: penpal_runtime::XcmpQueue, - DmpMessageHandler: penpal_runtime::DmpQueue, - LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, - ParachainInfo: penpal_runtime::ParachainInfo, - }, - pallets = { - PolkadotXcm: penpal_runtime::PolkadotXcm, - Assets: penpal_runtime::Assets, - } - }, - // Kusama Parachains - pub struct AssetHubKusama { - genesis = asset_hub_kusama::genesis(), - on_init = { - asset_hub_kusama_runtime::AuraExt::on_initialize(1); - }, - runtime = asset_hub_kusama_runtime, - core = { - XcmpMessageHandler: asset_hub_kusama_runtime::XcmpQueue, - DmpMessageHandler: asset_hub_kusama_runtime::DmpQueue, - LocationToAccountId: asset_hub_kusama_runtime::xcm_config::LocationToAccountId, - ParachainInfo: asset_hub_kusama_runtime::ParachainInfo, - }, - pallets = { - PolkadotXcm: asset_hub_kusama_runtime::PolkadotXcm, - Assets: asset_hub_kusama_runtime::Assets, - ForeignAssets: asset_hub_kusama_runtime::ForeignAssets, - PoolAssets: asset_hub_kusama_runtime::PoolAssets, - AssetConversion: asset_hub_kusama_runtime::AssetConversion, - Balances: asset_hub_kusama_runtime::Balances, - } - }, - pub struct BridgeHubKusama { - genesis = bridge_hub_kusama::genesis(), - on_init = { - bridge_hub_kusama_runtime::AuraExt::on_initialize(1); - }, - runtime = bridge_hub_kusama_runtime, - core = { - XcmpMessageHandler: bridge_hub_kusama_runtime::XcmpQueue, - DmpMessageHandler: bridge_hub_kusama_runtime::DmpQueue, - LocationToAccountId: bridge_hub_kusama_runtime::xcm_config::LocationToAccountId, - ParachainInfo: bridge_hub_kusama_runtime::ParachainInfo, - }, - pallets = { - PolkadotXcm: bridge_hub_kusama_runtime::PolkadotXcm, - } - }, - pub struct PenpalKusamaA { - genesis = penpal::genesis(penpal::PARA_ID_A), - on_init = { - penpal_runtime::AuraExt::on_initialize(1); - }, - runtime = penpal_runtime, - core = { - XcmpMessageHandler: penpal_runtime::XcmpQueue, - DmpMessageHandler: penpal_runtime::DmpQueue, - LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, - ParachainInfo: penpal_runtime::ParachainInfo, - }, - pallets = { - PolkadotXcm: penpal_runtime::PolkadotXcm, - Assets: penpal_runtime::Assets, - } - }, - pub struct PenpalKusamaB { - genesis = penpal::genesis(penpal::PARA_ID_B), - on_init = { - penpal_runtime::AuraExt::on_initialize(1); - }, - runtime = penpal_runtime, - core = { - XcmpMessageHandler: penpal_runtime::XcmpQueue, - DmpMessageHandler: penpal_runtime::DmpQueue, - LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, - ParachainInfo: penpal_runtime::ParachainInfo, - }, - pallets = { - PolkadotXcm: penpal_runtime::PolkadotXcm, - Assets: penpal_runtime::Assets, - } - }, -} +type AccountPublic = ::Signer; -decl_test_networks! { - pub struct PolkadotMockNet { - relay_chain = Polkadot, - parachains = vec![ - AssetHubPolkadot, - Collectives, - BridgeHubPolkadot, - PenpalPolkadotA, - PenpalPolkadotB, - ], - // TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged - // bridge = PolkadotKusamaMockBridge - bridge = () - }, - pub struct KusamaMockNet { - relay_chain = Kusama, - parachains = vec![ - AssetHubKusama, - BridgeHubKusama, - PenpalKusamaA, - PenpalKusamaB, - ], - // TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged - // bridge = KusamaPolkadotMockBridge - bridge = () - }, +/// Helper function to generate a crypto pair from seed +fn get_from_seed(seed: &str) -> ::Public { + TPublic::Pair::from_string(&format!("//{}", seed), None) + .expect("static values are valid; qed") + .public() } -// TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged -// decl_test_bridges! { -// pub struct PolkadotKusamaMockBridge { -// source = BridgeHubPolkadot, -// target = BridgeHubKusama, -// handler = PolkadotKusamaMessageHandler -// }, -// pub struct KusamaPolkadotMockBridge { -// source = BridgeHubKusama, -// target = BridgeHubPolkadot, -// handler = KusamaPolkadotMessageHandler -// } -// } - -// Polkadot implementation -impl_accounts_helpers_for_relay_chain!(Polkadot); -impl_assert_events_helpers_for_relay_chain!(Polkadot); -impl_hrmp_channels_helpers_for_relay_chain!(Polkadot); - -// Kusama implementation -impl_accounts_helpers_for_relay_chain!(Kusama); -impl_assert_events_helpers_for_relay_chain!(Kusama); -impl_hrmp_channels_helpers_for_relay_chain!(Kusama); - -// AssetHubPolkadot implementation -impl_accounts_helpers_for_parachain!(AssetHubPolkadot); -impl_assets_helpers_for_parachain!(AssetHubPolkadot, Polkadot); -impl_assert_events_helpers_for_parachain!(AssetHubPolkadot); - -// AssetHubKusama implementation -impl_accounts_helpers_for_parachain!(AssetHubKusama); -impl_assets_helpers_for_parachain!(AssetHubKusama, Kusama); -impl_assert_events_helpers_for_parachain!(AssetHubKusama); - -// PenpalPolkadot implementations -impl_assert_events_helpers_for_parachain!(PenpalPolkadotA); -impl_assert_events_helpers_for_parachain!(PenpalPolkadotB); +/// Helper function to generate an account ID from seed. +pub fn get_account_id_from_seed(seed: &str) -> AccountId +where + AccountPublic: From<::Public>, +{ + AccountPublic::from(get_from_seed::(seed)).into_account() +} -// PenpalKusama implementations -impl_assert_events_helpers_for_parachain!(PenpalKusamaA); -impl_assert_events_helpers_for_parachain!(PenpalKusamaB); +pub mod accounts { + use super::*; + pub const ALICE: &str = "Alice"; + pub const BOB: &str = "Bob"; + pub const CHARLIE: &str = "Charlie"; + pub const DAVE: &str = "Dave"; + pub const EVE: &str = "Eve"; + pub const FERDIE: &str = "Ferdei"; + pub const ALICE_STASH: &str = "Alice//stash"; + pub const BOB_STASH: &str = "Bob//stash"; + pub const CHARLIE_STASH: &str = "Charlie//stash"; + pub const DAVE_STASH: &str = "Dave//stash"; + pub const EVE_STASH: &str = "Eve//stash"; + pub const FERDIE_STASH: &str = "Ferdie//stash"; + pub const FERDIE_BEEFY: &str = "Ferdie//stash"; + + pub fn init_balances() -> Vec { + vec![ + get_account_id_from_seed::(ALICE), + get_account_id_from_seed::(BOB), + get_account_id_from_seed::(CHARLIE), + get_account_id_from_seed::(DAVE), + get_account_id_from_seed::(EVE), + get_account_id_from_seed::(FERDIE), + get_account_id_from_seed::(ALICE_STASH), + get_account_id_from_seed::(BOB_STASH), + get_account_id_from_seed::(CHARLIE_STASH), + get_account_id_from_seed::(DAVE_STASH), + get_account_id_from_seed::(EVE_STASH), + get_account_id_from_seed::(FERDIE_STASH), + ] + } +} -// Collectives implementation -impl_accounts_helpers_for_parachain!(Collectives); -impl_assert_events_helpers_for_parachain!(Collectives); +pub mod collators { + use super::*; + + pub fn invulnerables_asset_hub_polkadot() -> Vec<(AccountId, AssetHubPolkadotAuraId)> { + vec![ + ( + get_account_id_from_seed::("Alice"), + get_from_seed::("Alice"), + ), + ( + get_account_id_from_seed::("Bob"), + get_from_seed::("Bob"), + ), + ] + } + + pub fn invulnerables() -> Vec<(AccountId, AuraId)> { + vec![ + ( + get_account_id_from_seed::("Alice"), + get_from_seed::("Alice"), + ), + (get_account_id_from_seed::("Bob"), get_from_seed::("Bob")), + ] + } +} -decl_test_sender_receiver_accounts_parameter_types! { - // Relays - Polkadot { sender: ALICE, receiver: BOB }, - Kusama { sender: ALICE, receiver: BOB }, - // Asset Hubs - AssetHubPolkadot { sender: ALICE, receiver: BOB }, - AssetHubKusama { sender: ALICE, receiver: BOB }, - // Collectives - Collectives { sender: ALICE, receiver: BOB }, - // Bridged Hubs - BridgeHubPolkadot { sender: ALICE, receiver: BOB }, - BridgeHubKusama { sender: ALICE, receiver: BOB }, - // Penpals - PenpalPolkadotA { sender: ALICE, receiver: BOB }, - PenpalPolkadotB { sender: ALICE, receiver: BOB }, - PenpalKusamaA { sender: ALICE, receiver: BOB }, - PenpalKusamaB { sender: ALICE, receiver: BOB } +pub mod validators { + use super::*; + + pub fn initial_authorities() -> Vec<( + AccountId, + AccountId, + BabeId, + GrandpaId, + ImOnlineId, + ValidatorId, + AssignmentId, + AuthorityDiscoveryId, + BeefyId, + )> { + let seed = "Alice"; + vec![( + get_account_id_from_seed::(&format!("{}//stash", seed)), + get_account_id_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + )] + } } diff --git a/integration-tests/emulated/common/src/macros.rs b/integration-tests/emulated/common/src/macros.rs index a65b2057af..8718f1e83a 100644 --- a/integration-tests/emulated/common/src/macros.rs +++ b/integration-tests/emulated/common/src/macros.rs @@ -13,28 +13,43 @@ // See the License for the specific language governing permissions and // limitations under the License. +pub use paste; + +// Substrate +pub use pallet_balances; +pub use pallet_message_queue; +pub use pallet_xcm; + +// Polkadot +pub use xcm::prelude::{AccountId32, WeightLimit}; + +// Cumulus +pub use asset_test_utils; +pub use cumulus_pallet_xcmp_queue; +pub use xcm_emulator::Chain; + #[macro_export] macro_rules! test_parachain_is_trusted_teleporter { ( $sender_para:ty, $sender_xcm_config:ty, vec![$( $receiver_para:ty ),+], ($assets:expr, $amount:expr) ) => { - $crate::paste::paste! { + $crate::macros::paste::paste! { // init Origin variables let sender = [<$sender_para Sender>]::get(); let mut para_sender_balance_before = - <$sender_para as $crate::Chain>::account_data_of(sender.clone()).free; - let origin = <$sender_para as $crate::Chain>::RuntimeOrigin::signed(sender.clone()); + <$sender_para as $crate::macros::Chain>::account_data_of(sender.clone()).free; + let origin = <$sender_para as $crate::macros::Chain>::RuntimeOrigin::signed(sender.clone()); let fee_asset_item = 0; - let weight_limit = $crate::WeightLimit::Unlimited; + let weight_limit = $crate::macros::WeightLimit::Unlimited; $( { // init Destination variables let receiver = [<$receiver_para Receiver>]::get(); let para_receiver_balance_before = - <$receiver_para as $crate::Chain>::account_data_of(receiver.clone()).free; + <$receiver_para as $crate::macros::Chain>::account_data_of(receiver.clone()).free; let para_destination = <$sender_para>::sibling_location_of(<$receiver_para>::para_id()); let beneficiary: MultiLocation = - $crate::AccountId32 { network: None, id: receiver.clone().into() }.into(); + $crate::macros::AccountId32 { network: None, id: receiver.clone().into() }.into(); // Send XCM message from Origin Parachain // We are only testing the limited teleport version, which should be ok since success will @@ -49,19 +64,19 @@ macro_rules! test_parachain_is_trusted_teleporter { weight_limit.clone(), )); - type RuntimeEvent = <$sender_para as $crate::Chain>::RuntimeEvent; + type RuntimeEvent = <$sender_para as $crate::macros::Chain>::RuntimeEvent; assert_expected_events!( $sender_para, vec![ RuntimeEvent::PolkadotXcm( - $crate::pallet_xcm::Event::Attempted { outcome: Outcome::Complete { .. } } + $crate::macros::pallet_xcm::Event::Attempted { outcome: Outcome::Complete { .. } } ) => {}, RuntimeEvent::XcmpQueue( - $crate::cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. } + $crate::macros::cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. } ) => {}, RuntimeEvent::Balances( - $crate::pallet_balances::Event::Withdraw { who: sender, amount } + $crate::macros::pallet_balances::Event::Withdraw { who: sender, amount } ) => {}, ] ); @@ -69,16 +84,16 @@ macro_rules! test_parachain_is_trusted_teleporter { // Receive XCM message in Destination Parachain <$receiver_para>::execute_with(|| { - type RuntimeEvent = <$receiver_para as $crate::Chain>::RuntimeEvent; + type RuntimeEvent = <$receiver_para as $crate::macros::Chain>::RuntimeEvent; assert_expected_events!( $receiver_para, vec![ RuntimeEvent::Balances( - $crate::pallet_balances::Event::Deposit { who: receiver, .. } + $crate::macros::pallet_balances::Event::Deposit { who: receiver, .. } ) => {}, - RuntimeEvent::XcmpQueue( - $crate::cumulus_pallet_xcmp_queue::Event::Success { .. } + RuntimeEvent::MessageQueue( + $crate::macros::pallet_message_queue::Event::Processed { success: true, .. } ) => {}, ] ); @@ -86,11 +101,11 @@ macro_rules! test_parachain_is_trusted_teleporter { // Check if balances are updated accordingly in Origin and Destination Parachains let para_sender_balance_after = - <$sender_para as $crate::Chain>::account_data_of(sender.clone()).free; + <$sender_para as $crate::macros::Chain>::account_data_of(sender.clone()).free; let para_receiver_balance_after = - <$receiver_para as $crate::Chain>::account_data_of(receiver.clone()).free; + <$receiver_para as $crate::macros::Chain>::account_data_of(receiver.clone()).free; let delivery_fees = <$sender_para>::execute_with(|| { - asset_test_utils::xcm_helpers::transfer_assets_delivery_fees::< + $crate::macros::asset_test_utils::xcm_helpers::transfer_assets_delivery_fees::< <$sender_xcm_config as xcm_executor::Config>::XcmSender, >($assets.clone(), fee_asset_item, weight_limit.clone(), beneficiary, para_destination) }); @@ -99,9 +114,108 @@ macro_rules! test_parachain_is_trusted_teleporter { assert!(para_receiver_balance_after > para_receiver_balance_before); // Update sender balance - para_sender_balance_before = <$sender_para as $crate::Chain>::account_data_of(sender.clone()).free; + para_sender_balance_before = <$sender_para as $crate::macros::Chain>::account_data_of(sender.clone()).free; } )+ } }; } + +#[macro_export] +macro_rules! include_penpal_create_foreign_asset_on_asset_hub { + ( $penpal:ident, $asset_hub:ident, $relay_ed:expr, $weight_to_fee:expr) => { + $crate::impls::paste::paste! { + pub fn penpal_create_foreign_asset_on_asset_hub( + asset_id_on_penpal: u32, + foreign_asset_at_asset_hub: MultiLocation, + ah_as_seen_by_penpal: MultiLocation, + is_sufficient: bool, + asset_owner: AccountId, + prefund_amount: u128, + ) { + use frame_support::weights::WeightToFee; + let ah_check_account = $asset_hub::execute_with(|| { + <$asset_hub as [<$asset_hub Pallet>]>::PolkadotXcm::check_account() + }); + let penpal_check_account = + $penpal::execute_with(|| <$penpal as [<$penpal Pallet>]>::PolkadotXcm::check_account()); + let penpal_as_seen_by_ah = $asset_hub::sibling_location_of($penpal::para_id()); + + // prefund SA of Penpal on AssetHub with enough native tokens to pay for creating + // new foreign asset, also prefund CheckingAccount with ED, because teleported asset + // itself might not be sufficient and CheckingAccount cannot be created otherwise + let sov_penpal_on_ah = $asset_hub::sovereign_account_id_of(penpal_as_seen_by_ah); + $asset_hub::fund_accounts(vec![ + (sov_penpal_on_ah.clone().into(), $relay_ed * 100_000_000_000), + (ah_check_account.clone().into(), $relay_ed * 1000), + ]); + + // prefund SA of AssetHub on Penpal with native asset + let sov_ah_on_penpal = $penpal::sovereign_account_id_of(ah_as_seen_by_penpal); + $penpal::fund_accounts(vec![ + (sov_ah_on_penpal.into(), $relay_ed * 1_000_000_000), + (penpal_check_account.clone().into(), $relay_ed * 1000), + ]); + + // Force create asset on $penpal and prefund [<$penpal Sender>] + $penpal::force_create_and_mint_asset( + asset_id_on_penpal, + ASSET_MIN_BALANCE, + is_sufficient, + asset_owner, + None, + prefund_amount, + ); + + let require_weight_at_most = Weight::from_parts(1_100_000_000_000, 30_000); + // `OriginKind::Xcm` required by ForeignCreators pallet-assets origin filter + let origin_kind = OriginKind::Xcm; + let call_create_foreign_assets = + <$asset_hub as Chain>::RuntimeCall::ForeignAssets(pallet_assets::Call::< + <$asset_hub as Chain>::Runtime, + pallet_assets::Instance2, + >::create { + id: foreign_asset_at_asset_hub, + min_balance: ASSET_MIN_BALANCE, + admin: sov_penpal_on_ah.into(), + }) + .encode(); + let buy_execution_fee_amount = $weight_to_fee::weight_to_fee( + &Weight::from_parts(10_100_000_000_000, 300_000), + ); + let buy_execution_fee = MultiAsset { + id: Concrete(MultiLocation { parents: 1, interior: Here }), + fun: Fungible(buy_execution_fee_amount), + }; + let xcm = VersionedXcm::from(Xcm(vec![ + WithdrawAsset { 0: vec![buy_execution_fee.clone()].into() }, + BuyExecution { fees: buy_execution_fee.clone(), weight_limit: Unlimited }, + Transact { require_weight_at_most, origin_kind, call: call_create_foreign_assets.into() }, + ExpectTransactStatus(MaybeErrorCode::Success), + RefundSurplus, + DepositAsset { assets: All.into(), beneficiary: penpal_as_seen_by_ah }, + ])); + // Send XCM message from penpal => asset_hub + let sudo_penpal_origin = <$penpal as Chain>::RuntimeOrigin::root(); + $penpal::execute_with(|| { + assert_ok!(<$penpal as [<$penpal Pallet>]>::PolkadotXcm::send( + sudo_penpal_origin.clone(), + bx!(ah_as_seen_by_penpal.into()), + bx!(xcm), + )); + type RuntimeEvent = <$penpal as Chain>::RuntimeEvent; + assert_expected_events!( + $penpal, + vec![ + RuntimeEvent::PolkadotXcm(pallet_xcm::Event::Sent { .. }) => {}, + ] + ); + }); + $asset_hub::execute_with(|| { + type ForeignAssets = <$asset_hub as [<$asset_hub Pallet>]>::ForeignAssets; + assert!(ForeignAssets::asset_exists(foreign_asset_at_asset_hub)); + }); + } + } + }; +} diff --git a/integration-tests/emulated/common/src/xcm_helpers.rs b/integration-tests/emulated/common/src/xcm_helpers.rs index 4096cdbba0..c40f51a440 100644 --- a/integration-tests/emulated/common/src/xcm_helpers.rs +++ b/integration-tests/emulated/common/src/xcm_helpers.rs @@ -15,14 +15,7 @@ // along with Cumulus. If not, see . use parachains_common::AccountId; -use xcm::{ - prelude::{ - AccountId32, All, BuyExecution, DepositAsset, MultiAsset, MultiAssets, MultiLocation, - OriginKind, RefundSurplus, Transact, UnpaidExecution, VersionedXcm, Weight, WeightLimit, - WithdrawAsset, Xcm, X1, - }, - DoubleEncoded, -}; +use xcm::{prelude::*, DoubleEncoded}; /// Helper method to build a XCM with a `Transact` instruction and paying for its execution pub fn xcm_transact_paid_execution( @@ -64,3 +57,16 @@ pub fn xcm_transact_unpaid_execution( Transact { require_weight_at_most, origin_kind, call }, ])) } +/// Helper method to get the non-fee asset used in multiple assets transfer +pub fn non_fee_asset(assets: &MultiAssets, fee_idx: usize) -> Option<(MultiLocation, u128)> { + let asset = assets.inner().into_iter().enumerate().find(|a| a.0 != fee_idx)?.1.clone(); + let asset_id = match asset.id { + Concrete(id) => id, + _ => return None, + }; + let asset_amount = match asset.fun { + Fungible(amount) => amount, + _ => return None, + }; + Some((asset_id, asset_amount)) +} From 1ccd0f7d956c5cb05150937ddb26b5905aa64e99 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 12 Jan 2024 16:04:09 +0100 Subject: [PATCH 020/316] chore: fmt for all --- relay/kusama/src/lib.rs | 2 +- relay/kusama/src/xcm_config.rs | 3 ++- .../asset-hubs/asset-hub-kusama/src/lib.rs | 4 ++-- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 3 ++- .../src/bridge_to_polkadot_config.rs | 3 ++- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 11 ++++++----- .../bridge-hubs/bridge-hub-kusama/tests/tests.rs | 9 +++++---- .../src/bridge_to_kusama_config.rs | 3 ++- .../bridge-hubs/bridge-hub-polkadot/src/lib.rs | 11 ++++++----- .../bridge-hubs/bridge-hub-polkadot/tests/tests.rs | 9 +++++---- .../collectives/collectives-polkadot/src/lib.rs | 6 +++--- .../collectives-polkadot/src/xcm_config.rs | 3 ++- 12 files changed, 38 insertions(+), 29 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 7c0163278d..1772e003de 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1681,7 +1681,7 @@ pub type Migrations = migrations::Unreleased; /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { - use super::{Runtime, parachains_configuration}; + use super::{parachains_configuration, Runtime}; /// Unreleased migrations. Add new ones here: pub type Unreleased = ( diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index 59a2c583b2..30c56a3cdc 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -42,7 +42,8 @@ use xcm_builder::{ DescribeFamily, HashedDescription, IsChildSystemParachain, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, - WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, + XcmFeeToAccount, }; use xcm_executor::traits::WithOriginFilter; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 3849c22e3e..2879f87514 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -69,8 +69,8 @@ use frame_system::{ use pallet_asset_conversion_tx_payment::AssetConversionAdapter; use pallet_nfts::PalletFeatures; use parachains_common::{ - impls::DealWithFees, AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, BlockNumber, - Hash, Header, Nonce, Signature, message_queue::*, + impls::DealWithFees, message_queue::*, AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, + BlockNumber, Hash, Header, Nonce, Signature, }; use sp_runtime::RuntimeDebug; use system_parachains_constants::{ diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 13f5790fd3..e1f2d1ef1b 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -101,8 +101,9 @@ use frame_system::{ use pallet_nfts::PalletFeatures; use parachains_common::{ impls::{AssetsToBlockAuthor, DealWithFees}, + message_queue::*, AccountId, AssetHubPolkadotAuraId as AuraId, AssetIdForTrustBackedAssets, Balance, BlockNumber, - Hash, Header, Nonce, Signature, message_queue::*, + Hash, Header, Nonce, Signature, }; use sp_runtime::RuntimeDebug; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs index 90642c0fee..4d2cab6726 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs @@ -265,7 +265,8 @@ impl pallet_xcm_bridge_hub::Config for Runtime } /// On messages delivered callback. -type OnMessagesDeliveredFromPolkadot = XcmBlobHaulerAdapter; +type OnMessagesDeliveredFromPolkadot = + XcmBlobHaulerAdapter; /// Messaging Bridge configuration for BridgeHubKusama -> BridgeHubPolkadot pub struct WithBridgeHubPolkadotMessageBridge; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 0d29533973..686d6292a1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -47,7 +47,9 @@ use frame_support::{ dispatch::DispatchClass, genesis_builder_helper::{build_config, create_default_config}, parameter_types, - traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, TransformOrigin}, + traits::{ + ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, TransformOrigin, + }, weights::{ConstantMultiplier, Weight}, PalletId, }; @@ -58,9 +60,7 @@ use frame_system::{ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; -use xcm_config::{ - FellowshipLocation, GovernanceLocation, XcmOriginToTransactDispatchOrigin, -}; +use xcm_config::{FellowshipLocation, GovernanceLocation, XcmOriginToTransactDispatchOrigin}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -70,7 +70,8 @@ use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use parachains_common::{ - impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, message_queue::*, + impls::DealWithFees, message_queue::*, AccountId, Balance, BlockNumber, Hash, Header, Nonce, + Signature, }; use system_parachains_constants::{ kusama::{consensus::*, currency::*, fee::WeightToFee}, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index c015e573a3..ff5864d220 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -17,10 +17,11 @@ use bp_polkadot_core::Signature; use bridge_hub_kusama_runtime::{ bridge_to_polkadot_config::{ - AssetHubPolkadotParaId, BridgeGrandpaPolkadotInstance, BridgeHubPolkadotChainId, BridgeParachainPolkadotInstance, - DeliveryRewardInBalance, PolkadotGlobalConsensusNetwork, RefundBridgeHubPolkadotMessages, - RequiredStakeForStakeAndSlash, WithBridgeHubPolkadotMessageBridge, - WithBridgeHubPolkadotMessagesInstance, XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, + AssetHubPolkadotParaId, BridgeGrandpaPolkadotInstance, BridgeHubPolkadotChainId, + BridgeParachainPolkadotInstance, DeliveryRewardInBalance, PolkadotGlobalConsensusNetwork, + RefundBridgeHubPolkadotMessages, RequiredStakeForStakeAndSlash, + WithBridgeHubPolkadotMessageBridge, WithBridgeHubPolkadotMessagesInstance, + XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, }, xcm_config::{KsmRelayLocation, RelayNetwork, XcmConfig}, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs index 9a592445e4..3f43e4c4c3 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs @@ -265,7 +265,8 @@ impl pallet_xcm_bridge_hub::Config for Runtime { } /// On messages delivered callback. -type OnMessagesDeliveredFromKusama = XcmBlobHaulerAdapter; +type OnMessagesDeliveredFromKusama = + XcmBlobHaulerAdapter; /// Messaging Bridge configuration for BridgeHubPolkadot -> BridgeHubKusama pub struct WithBridgeHubKusamaMessageBridge; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index e10b8a6e70..f67f8def71 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -47,7 +47,9 @@ use frame_support::{ dispatch::DispatchClass, genesis_builder_helper::{build_config, create_default_config}, parameter_types, - traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, TransformOrigin}, + traits::{ + ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, TransformOrigin, + }, weights::{ConstantMultiplier, Weight}, PalletId, }; @@ -58,9 +60,7 @@ use frame_system::{ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; -use xcm_config::{ - FellowshipLocation, GovernanceLocation, XcmOriginToTransactDispatchOrigin, -}; +use xcm_config::{FellowshipLocation, GovernanceLocation, XcmOriginToTransactDispatchOrigin}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -71,7 +71,8 @@ use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use parachains_common::{ - impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, message_queue::*, + impls::DealWithFees, message_queue::*, AccountId, Balance, BlockNumber, Hash, Header, Nonce, + Signature, }; use system_parachains_constants::{ polkadot::{consensus::*, currency::*, fee::WeightToFee}, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index aee5508371..933d3f8be9 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -17,10 +17,11 @@ use bp_polkadot_core::Signature; use bridge_hub_polkadot_runtime::{ bridge_to_kusama_config::{ - AssetHubKusamaParaId, BridgeGrandpaKusamaInstance, BridgeHubKusamaChainId, BridgeParachainKusamaInstance, - DeliveryRewardInBalance, KusamaGlobalConsensusNetwork, RefundBridgeHubKusamaMessages, - RequiredStakeForStakeAndSlash, WithBridgeHubKusamaMessageBridge, - WithBridgeHubKusamaMessagesInstance, XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, + AssetHubKusamaParaId, BridgeGrandpaKusamaInstance, BridgeHubKusamaChainId, + BridgeParachainKusamaInstance, DeliveryRewardInBalance, KusamaGlobalConsensusNetwork, + RefundBridgeHubKusamaMessages, RequiredStakeForStakeAndSlash, + WithBridgeHubKusamaMessageBridge, WithBridgeHubKusamaMessagesInstance, + XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, }, xcm_config::{DotRelayLocation, RelayNetwork, XcmConfig}, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 063af636cd..521e12ddde 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -79,7 +79,8 @@ use frame_system::{ EnsureRoot, }; use parachains_common::{ - impls::DealWithFees, AccountId, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature, message_queue::*, + impls::DealWithFees, message_queue::*, AccountId, AuraId, Balance, BlockNumber, Hash, Header, + Nonce, Signature, }; use sp_runtime::RuntimeDebug; use system_parachains_constants::{ @@ -88,8 +89,7 @@ use system_parachains_constants::{ SLOT_DURATION, }; use xcm_config::{ - GovernanceLocation, LocationToAccountId, TreasurerBodyId, - XcmOriginToTransactDispatchOrigin, + GovernanceLocation, LocationToAccountId, TreasurerBodyId, XcmOriginToTransactDispatchOrigin, }; #[cfg(any(feature = "std", test))] diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 693271e097..74904614b4 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -42,7 +42,8 @@ use xcm_builder::{ OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, - UsingComponents, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, + UsingComponents, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, + XcmFeeToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; From ca13c925b126970209effe0e5ba3ed0a0cfa467b Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 12 Jan 2024 23:20:31 +0100 Subject: [PATCH 021/316] fix: "Warning: Error parsing Cargo.toml manifest, fallback to caching entire file: Error: Invalid TOML document: expected key-value, found comma" https://github.com/polkadot-fellows/runtimes/actions/runs/7507624988/job/20441549625?pr=137#step:9:1 --- relay/kusama/Cargo.toml | 2 +- relay/polkadot/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index 4019ff4e42..97e70439db 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -121,7 +121,7 @@ keyring = { package = "sp-keyring", version = "30.0.0" } sp-trie = { version = "28.0.0" } separator = "0.4.1" serde_json = "1.0.111" -remote-externalities = { package = "frame-remote-externalities" , version = "0.34.0" } +remote-externalities = { package = "frame-remote-externalities", version = "0.34.0" } tokio = { version = "1.35.1", features = ["macros"] } sp-tracing = { default-features = false , version = "15.0.0" } diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index 7b098a82fd..2ef3a24b15 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -118,7 +118,7 @@ keyring = { package = "sp-keyring", version = "30.0.0" } sp-trie = { version = "28.0.0" } serde_json = "1.0.111" separator = "0.4.1" -remote-externalities = { package = "frame-remote-externalities" , version = "0.34.0" } +remote-externalities = { package = "frame-remote-externalities", version = "0.34.0" } tokio = { version = "1.35.1", features = ["macros"] } sp-tracing = { default-features = false , version = "15.0.0" } From 4b496df165092c03dda811443d69630a1f7b935c Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 12 Jan 2024 23:41:30 +0100 Subject: [PATCH 022/316] fix: added `rust-src` to the stable toolchain components --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 32259e51c8..5b3b825255 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,6 +42,7 @@ jobs: profile: minimal toolchain: stable target: wasm32-unknown-unknown + components: rust-src - name: Install nightly toolchain uses: actions-rs/toolchain@v1 From e2564afc93e9af29e6b613898ddf485239a50cae Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Sat, 13 Jan 2024 22:49:18 +0100 Subject: [PATCH 023/316] fix: added `rust-src` to check-migrations --- .github/workflows/check-migrations.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/check-migrations.yml b/.github/workflows/check-migrations.yml index 512ab7e5af..bcd5687024 100644 --- a/.github/workflows/check-migrations.yml +++ b/.github/workflows/check-migrations.yml @@ -62,6 +62,9 @@ jobs: - name: Add wasm32-unknown-unknown target run: rustup target add wasm32-unknown-unknown + - name: Add rust-src component + run: rustup component add rust-src + - name: Fetch cache uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 with: From e7c1da1c695b92a45007722652b336e178fa181c Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 15 Jan 2024 15:51:55 +0100 Subject: [PATCH 024/316] [migrations] added `cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4` to SP --- system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs | 5 ++++- system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs | 7 +++++-- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 5 ++++- .../bridge-hubs/bridge-hub-polkadot/src/lib.rs | 5 ++++- .../collectives/collectives-polkadot/src/lib.rs | 5 ++++- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 2879f87514..151f16f8f4 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -973,7 +973,10 @@ pub type SignedExtra = ( pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = (); +pub type Migrations = ( + // unreleased + cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, +); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index e1f2d1ef1b..8989678a3b 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -883,8 +883,11 @@ pub type SignedExtra = ( pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = - frame_support::migrations::VersionedMigration<0, 1, UniquesMigration, Uniques, RocksDbWeight>; +pub type Migrations = ( + frame_support::migrations::VersionedMigration<0, 1, UniquesMigration, Uniques, RocksDbWeight>, + // unreleased + cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, +); /// Migration for Uniques to V1 pub struct UniquesMigration; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 686d6292a1..adabee470f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -122,7 +122,10 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = (); +pub type Migrations = ( + // unreleased + cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, +); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index f67f8def71..f0e25ac372 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -122,7 +122,10 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = (); +pub type Migrations = ( + // unreleased + cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, +); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 521e12ddde..4c8fc97897 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -714,7 +714,10 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// All migrations executed on runtime upgrade as a nested tuple of types implementing /// `OnRuntimeUpgrade`. Included migrations must be idempotent. -type Migrations = (); +type Migrations = ( + // unreleased + cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, +); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< From 200f1540b795fe67b7f59040f0a2f6a393aa1f49 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 15 Jan 2024 16:27:17 +0100 Subject: [PATCH 025/316] [migrations] `pallet_nomination_pools::migration::versioned::V7ToV8` to relays --- relay/kusama/src/lib.rs | 1 + relay/polkadot/src/lib.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 1772e003de..69115d14a8 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1689,6 +1689,7 @@ pub mod migrations { pallet_nomination_pools::migration::versioned::V6ToV7, pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, + pallet_nomination_pools::migration::versioned::V7ToV8, ); } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 523c8b20df..81fa3dc720 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1710,6 +1710,7 @@ pub mod migrations { pallet_nomination_pools::migration::versioned::V6ToV7, pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, + pallet_nomination_pools::migration::versioned::V7ToV8, ); } From 5a13a8cc9696d35fb552cfc419c911b9ac287009 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 16 Jan 2024 16:50:13 +0100 Subject: [PATCH 026/316] WIP: (DNM) Oliver's migration fix for `pallet-nominations-pools` (fix from https://github.com/paritytech/polkadot-sdk/pull/2942) --- relay/kusama/src/lib.rs | 209 ++++++++++++++++++++++++++++++++++++- relay/polkadot/src/lib.rs | 210 +++++++++++++++++++++++++++++++++++++- 2 files changed, 413 insertions(+), 6 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 69115d14a8..327576296f 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1685,11 +1685,15 @@ pub mod migrations { /// Unreleased migrations. Add new ones here: pub type Unreleased = ( - pallet_nomination_pools::migration::versioned::V5toV6, - pallet_nomination_pools::migration::versioned::V6ToV7, pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, - pallet_nomination_pools::migration::versioned::V7ToV8, + pallet_nomination_pools::migration::versioned::V5toV6, + // TODO:(PR#137) - replace with fixed/released version + crate::test_oliverfix_migration::V6ToV7, + // pallet_nomination_pools::migration::versioned::V6ToV7, + // TODO:(PR#137) - replace with fixed/released version + crate::test_oliverfix_migration::V7ToV8, + // pallet_nomination_pools::migration::versioned::V7ToV8, ); } @@ -2781,3 +2785,202 @@ mod init_state_migration { } } } + +// TODO:(PR#137) - replace with fixed/released version +mod test_oliverfix_migration { + use super::*; + use frame_support::{ + traits::OnRuntimeUpgrade, DebugNoBound, RuntimeDebugNoBound, Twox64Concat, + }; + use frame_system::pallet_prelude::BlockNumberFor; + use pallet_nomination_pools::*; + use sp_runtime::Saturating; + + pub type V7ToV8 = frame_support::migrations::VersionedMigration< + 7, + 8, + v8::VersionUncheckedMigrateV7ToV8, + pallet_nomination_pools::pallet::Pallet, + ::DbWeight, + >; + + pub type V6ToV7 = frame_support::migrations::VersionedMigration< + 6, + 7, + v7::VersionUncheckedMigrateV6ToV7, + pallet_nomination_pools::pallet::Pallet, + ::DbWeight, + >; + + pub mod v8 { + use super::*; + + use super::v7::BondedPoolInner as OldBondedPoolInner; + + impl OldBondedPoolInner { + fn migrate_to_v8(self) -> BondedPoolInner { + BondedPoolInner { + commission: Commission { + current: self.commission.current, + max: self.commission.max, + change_rate: self.commission.change_rate, + throttle_from: self.commission.throttle_from, + // `claim_permission` is a new field. + claim_permission: None, + }, + member_counter: self.member_counter, + points: self.points, + roles: self.roles, + state: self.state, + } + } + } + + pub struct VersionUncheckedMigrateV7ToV8(sp_std::marker::PhantomData); + + impl OnRuntimeUpgrade for VersionUncheckedMigrateV7ToV8 { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + Ok(Vec::new()) + } + + fn on_runtime_upgrade() -> Weight { + let mut translated = 0u64; + BondedPools::::translate::, _>(|_key, old_value| { + translated.saturating_inc(); + Some(old_value.migrate_to_v8()) + }); + T::DbWeight::get().reads_writes(translated, translated + 1) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + // Check new `claim_permission` field is present. + frame_support::ensure!( + BondedPools::::iter() + .all(|(_, inner)| inner.commission.claim_permission.is_none()), + "`claim_permission` value has not been set correctly." + ); + Ok(()) + } + } + } + + mod v7 { + use super::*; + + use sp_staking::StakingInterface; + // use frame_support::traits::GetStorageVersion; + + #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] + #[codec(mel_bound(T: Config))] + #[scale_info(skip_type_params(T))] + pub struct Commission { + pub current: Option<(Perbill, T::AccountId)>, + pub max: Option, + pub change_rate: Option>>, + pub throttle_from: Option>, + } + + #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] + #[codec(mel_bound(T: Config))] + #[scale_info(skip_type_params(T))] + pub struct BondedPoolInner { + pub commission: Commission, + pub member_counter: u32, + pub points: BalanceOf, + pub roles: PoolRoles, + pub state: PoolState, + } + + #[derive(RuntimeDebugNoBound)] + #[cfg_attr(feature = "std", derive(Clone, PartialEq))] + pub struct BondedPool { + /// The identifier of the pool. + id: PoolId, + /// The inner fields. + inner: BondedPoolInner, + } + + impl BondedPool { + fn bonded_account(&self) -> T::AccountId { + Pallet::::create_bonded_account(self.id) + } + } + + #[frame_support::storage_alias] + pub type BondedPools = + CountedStorageMap, Twox64Concat, PoolId, BondedPoolInner>; + + pub struct VersionUncheckedMigrateV6ToV7(sp_std::marker::PhantomData); + impl VersionUncheckedMigrateV6ToV7 { + fn calculate_tvl_by_total_stake() -> BalanceOf { + BondedPools::::iter() + .map(|(id, inner)| { + T::Staking::total_stake( + &BondedPool { id, inner: inner.clone() }.bonded_account(), + ) + .unwrap_or_default() + }) + .reduce(|acc, total_balance| acc + total_balance) + .unwrap_or_default() + } + } + + impl OnRuntimeUpgrade for VersionUncheckedMigrateV6ToV7 { + fn on_runtime_upgrade() -> Weight { + let migrated = BondedPools::::count(); + // The TVL should be the sum of all the funds that are actively staked and in the + // unbonding process of the account of each pool. + let tvl: BalanceOf = Self::calculate_tvl_by_total_stake(); + + TotalValueLocked::::set(tvl); + + log!(info, "Upgraded {} pools with a TVL of {:?}", migrated, tvl); + + // reads: migrated * (BondedPools + Staking::total_stake) + count + onchain + // version + // + // writes: current version + TVL + T::DbWeight::get() + .reads_writes(migrated.saturating_mul(2).saturating_add(2).into(), 2) + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + Ok(Vec::new()) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_data: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + // check that the `TotalValueLocked` written is actually the sum of `total_stake` of + // the `BondedPools`` + let tvl: BalanceOf = Self::calculate_tvl_by_total_stake(); + frame_support::ensure!( + TotalValueLocked::::get() == tvl, + "TVL written is not equal to `Staking::total_stake` of all `BondedPools`." + ); + + // TODO: skip for now + // calculate the sum of `total_balance` of all `PoolMember` as the upper bound for + // the `TotalValueLocked`. + // let total_balance_members: BalanceOf = PoolMembers::::iter() + // .map(|(_, member)| member.total_balance()) + // .reduce(|acc, total_balance| acc + total_balance) + // .unwrap_or_default(); + // + // frame_support::ensure!( + // TotalValueLocked::::get() <= total_balance_members, + // "TVL is greater than the balance of all PoolMembers." + // ); + // + // frame_support::ensure!( + // Pallet::::on_chain_storage_version() >= 7, + // "nomination-pools::migration::v7: wrong storage version" + // ); + + Ok(()) + } + } + } +} diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 81fa3dc720..5898bfd7c3 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1706,11 +1706,15 @@ pub mod migrations { pub type Unreleased = ( // Upgrade SessionKeys to include BEEFY key UpgradeSessionKeys, - pallet_nomination_pools::migration::versioned::V5toV6, - pallet_nomination_pools::migration::versioned::V6ToV7, pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, - pallet_nomination_pools::migration::versioned::V7ToV8, + pallet_nomination_pools::migration::versioned::V5toV6, + // TODO:(PR#137) - replace with fixed/released version + crate::test_oliverfix_migration::V6ToV7, + // pallet_nomination_pools::migration::versioned::V6ToV7, + // TODO:(PR#137) - replace with fixed/released version + crate::test_oliverfix_migration::V7ToV8, + // pallet_nomination_pools::migration::versioned::V7ToV8, ); } @@ -2947,3 +2951,203 @@ mod remote_tests { }); } } + +// TODO:(PR#137) - replace with fixed/released version +mod test_oliverfix_migration { + use super::*; + use frame_support::{ + traits::OnRuntimeUpgrade, DebugNoBound, RuntimeDebugNoBound, Twox64Concat, + }; + use frame_system::pallet_prelude::BlockNumberFor; + use pallet_nomination_pools::*; + use sp_runtime::Saturating; + + pub type V7ToV8 = frame_support::migrations::VersionedMigration< + 7, + 8, + v8::VersionUncheckedMigrateV7ToV8, + pallet_nomination_pools::pallet::Pallet, + ::DbWeight, + >; + + pub type V6ToV7 = frame_support::migrations::VersionedMigration< + 6, + 7, + v7::VersionUncheckedMigrateV6ToV7, + pallet_nomination_pools::pallet::Pallet, + ::DbWeight, + >; + + pub mod v8 { + use super::*; + + use super::v7::BondedPoolInner as OldBondedPoolInner; + + impl OldBondedPoolInner { + fn migrate_to_v8(self) -> BondedPoolInner { + BondedPoolInner { + commission: Commission { + current: self.commission.current, + max: self.commission.max, + change_rate: self.commission.change_rate, + throttle_from: self.commission.throttle_from, + // `claim_permission` is a new field. + claim_permission: None, + }, + member_counter: self.member_counter, + points: self.points, + roles: self.roles, + state: self.state, + } + } + } + + pub struct VersionUncheckedMigrateV7ToV8(sp_std::marker::PhantomData); + + impl OnRuntimeUpgrade for VersionUncheckedMigrateV7ToV8 { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + Ok(Vec::new()) + } + + fn on_runtime_upgrade() -> Weight { + let mut translated = 0u64; + BondedPools::::translate::, _>(|_key, old_value| { + translated.saturating_inc(); + Some(old_value.migrate_to_v8()) + }); + T::DbWeight::get().reads_writes(translated, translated + 1) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + // Check new `claim_permission` field is present. + frame_support::ensure!( + BondedPools::::iter() + .all(|(_, inner)| inner.commission.claim_permission.is_none()), + "`claim_permission` value has not been set correctly." + ); + Ok(()) + } + } + } + + mod v7 { + use super::*; + + use scale_info::TypeInfo; + use sp_staking::StakingInterface; + // use frame_support::traits::GetStorageVersion; + + #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] + #[codec(mel_bound(T: Config))] + #[scale_info(skip_type_params(T))] + pub struct Commission { + pub current: Option<(Perbill, T::AccountId)>, + pub max: Option, + pub change_rate: Option>>, + pub throttle_from: Option>, + } + + #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] + #[codec(mel_bound(T: Config))] + #[scale_info(skip_type_params(T))] + pub struct BondedPoolInner { + pub commission: Commission, + pub member_counter: u32, + pub points: BalanceOf, + pub roles: PoolRoles, + pub state: PoolState, + } + + #[derive(RuntimeDebugNoBound)] + #[cfg_attr(feature = "std", derive(Clone, PartialEq))] + pub struct BondedPool { + /// The identifier of the pool. + id: PoolId, + /// The inner fields. + inner: BondedPoolInner, + } + + impl BondedPool { + fn bonded_account(&self) -> T::AccountId { + Pallet::::create_bonded_account(self.id) + } + } + + #[frame_support::storage_alias] + pub type BondedPools = + CountedStorageMap, Twox64Concat, PoolId, BondedPoolInner>; + + pub struct VersionUncheckedMigrateV6ToV7(sp_std::marker::PhantomData); + impl VersionUncheckedMigrateV6ToV7 { + fn calculate_tvl_by_total_stake() -> BalanceOf { + BondedPools::::iter() + .map(|(id, inner)| { + T::Staking::total_stake( + &BondedPool { id, inner: inner.clone() }.bonded_account(), + ) + .unwrap_or_default() + }) + .reduce(|acc, total_balance| acc + total_balance) + .unwrap_or_default() + } + } + + impl OnRuntimeUpgrade for VersionUncheckedMigrateV6ToV7 { + fn on_runtime_upgrade() -> Weight { + let migrated = BondedPools::::count(); + // The TVL should be the sum of all the funds that are actively staked and in the + // unbonding process of the account of each pool. + let tvl: BalanceOf = Self::calculate_tvl_by_total_stake(); + + TotalValueLocked::::set(tvl); + + log!(info, "Upgraded {} pools with a TVL of {:?}", migrated, tvl); + + // reads: migrated * (BondedPools + Staking::total_stake) + count + onchain + // version + // + // writes: current version + TVL + T::DbWeight::get() + .reads_writes(migrated.saturating_mul(2).saturating_add(2).into(), 2) + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + Ok(Vec::new()) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_data: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + // check that the `TotalValueLocked` written is actually the sum of `total_stake` of + // the `BondedPools`` + let tvl: BalanceOf = Self::calculate_tvl_by_total_stake(); + frame_support::ensure!( + TotalValueLocked::::get() == tvl, + "TVL written is not equal to `Staking::total_stake` of all `BondedPools`." + ); + + // TODO: skip for now + // calculate the sum of `total_balance` of all `PoolMember` as the upper bound for + // the `TotalValueLocked`. + // let total_balance_members: BalanceOf = PoolMembers::::iter() + // .map(|(_, member)| member.total_balance()) + // .reduce(|acc, total_balance| acc + total_balance) + // .unwrap_or_default(); + // + // frame_support::ensure!( + // TotalValueLocked::::get() <= total_balance_members, + // "TVL is greater than the balance of all PoolMembers." + // ); + // + // frame_support::ensure!( + // Pallet::::on_chain_storage_version() >= 7, + // "nomination-pools::migration::v7: wrong storage version" + // ); + + Ok(()) + } + } + } +} From 58e3ad8707a54528b01e2ad39221713398eacb0e Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 17 Jan 2024 10:24:17 +0100 Subject: [PATCH 027/316] [migrations] added `pallet_grandpa::migrations::MigrateV4ToV5,` to Kusama/Polkadot --- relay/kusama/src/lib.rs | 1 + relay/polkadot/src/lib.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 327576296f..9c43545d4d 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1687,6 +1687,7 @@ pub mod migrations { pub type Unreleased = ( pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, + pallet_grandpa::migrations::MigrateV4ToV5, pallet_nomination_pools::migration::versioned::V5toV6, // TODO:(PR#137) - replace with fixed/released version crate::test_oliverfix_migration::V6ToV7, diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 5898bfd7c3..e7a77bfcd5 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1708,6 +1708,7 @@ pub mod migrations { UpgradeSessionKeys, pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, + pallet_grandpa::migrations::MigrateV4ToV5, pallet_nomination_pools::migration::versioned::V5toV6, // TODO:(PR#137) - replace with fixed/released version crate::test_oliverfix_migration::V6ToV7, From ab047b07df2dd5a138f46b349ea291962fb95bea Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 19 Jan 2024 15:53:46 +0100 Subject: [PATCH 028/316] fix Cargo.lock after rebase --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 487665bdd9..2fb8fb1473 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3254,7 +3254,7 @@ dependencies = [ "frame-support 27.0.0", "integration-tests-common", "kusama-runtime-constants", - "pallet-im-online", + "pallet-im-online 26.0.0", "pallet-staking 27.0.0", "parachains-common 6.0.0", "penpal-runtime", @@ -3265,7 +3265,7 @@ dependencies = [ "polkadot-runtime-parachains 6.0.0", "sp-authority-discovery 25.0.0", "sp-consensus-babe 0.31.0", - "sp-consensus-beefy", + "sp-consensus-beefy 12.0.0", "sp-consensus-grandpa 12.0.0", "sp-core 27.0.0", "sp-runtime 30.0.1", From ce7edfaa5691b838a71070b4e7f6d4a9d4bdbaa9 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 22 Jan 2024 13:17:51 +0100 Subject: [PATCH 029/316] [chain-specs] Updated relay+paras (except encointer) --- Cargo.lock | 167 +++---- chain-spec-generator/Cargo.toml | 32 +- chain-spec-generator/src/relay_chain_specs.rs | 252 ++++------- .../src/system_parachains_specs.rs | 426 +++++++----------- 4 files changed, 323 insertions(+), 554 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2fb8fb1473..f4f1224951 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1757,29 +1757,30 @@ dependencies = [ "bridge-hub-polkadot-runtime", "clap", "collectives-polkadot-runtime", - "cumulus-primitives-core 0.4.0", + "cumulus-primitives-core 0.6.0", "encointer-kusama-runtime", "glutton-kusama-runtime", "hex-literal", "kusama-runtime-constants", - "pallet-im-online 24.0.0", - "pallet-staking 25.0.0", - "parachains-common 4.0.0", - "polkadot-primitives 4.0.0", + "pallet-im-online", + "pallet-staking 27.0.0", + "parachains-common 6.0.0", + "polkadot-primitives 6.0.0", "polkadot-runtime", "polkadot-runtime-constants", - "polkadot-runtime-parachains 4.0.0", - "sc-chain-spec 24.0.0", + "polkadot-runtime-parachains 6.0.0", + "sc-chain-spec 26.0.0", "sc-consensus-grandpa", "serde", "serde_json", - "sp-authority-discovery 23.0.0", - "sp-consensus-babe 0.29.0", - "sp-consensus-beefy 10.0.0", + "sp-authority-discovery 25.0.0", + "sp-consensus-babe 0.31.0", + "sp-consensus-beefy", "sp-core 25.0.0", - "sp-runtime 28.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", "staging-kusama-runtime", - "staging-xcm 4.0.0", + "staging-xcm 6.0.0", ] [[package]] @@ -3254,7 +3255,7 @@ dependencies = [ "frame-support 27.0.0", "integration-tests-common", "kusama-runtime-constants", - "pallet-im-online 26.0.0", + "pallet-im-online", "pallet-staking 27.0.0", "parachains-common 6.0.0", "penpal-runtime", @@ -3265,7 +3266,7 @@ dependencies = [ "polkadot-runtime-parachains 6.0.0", "sp-authority-discovery 25.0.0", "sp-consensus-babe 0.31.0", - "sp-consensus-beefy 12.0.0", + "sp-consensus-beefy", "sp-consensus-grandpa 12.0.0", "sp-core 27.0.0", "sp-runtime 30.0.1", @@ -5007,7 +5008,7 @@ dependencies = [ "pallet-assets 28.0.0", "pallet-balances 27.0.0", "pallet-bridge-messages", - "pallet-im-online 26.0.0", + "pallet-im-online", "pallet-message-queue 30.0.0", "pallet-xcm 6.0.0", "parachains-common 6.0.0", @@ -5017,7 +5018,7 @@ dependencies = [ "polkadot-runtime-parachains 6.0.0", "sp-authority-discovery 25.0.0", "sp-consensus-babe 0.31.0", - "sp-consensus-beefy 12.0.0", + "sp-consensus-beefy", "sp-consensus-grandpa 12.0.0", "sp-core 27.0.0", "sp-runtime 30.0.1", @@ -7050,7 +7051,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-consensus-beefy 12.0.0", + "sp-consensus-beefy", "sp-runtime 30.0.1", "sp-session 26.0.0", "sp-staking 25.0.0", @@ -7075,7 +7076,7 @@ dependencies = [ "scale-info", "serde", "sp-api 25.0.0", - "sp-consensus-beefy 12.0.0", + "sp-consensus-beefy", "sp-core 27.0.0", "sp-io 29.0.0", "sp-runtime 30.0.1", @@ -7719,27 +7720,6 @@ dependencies = [ "sp-std 13.0.0", ] -[[package]] -name = "pallet-im-online" -version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59eb1c68cc6b4700ad1d2a81ba847ff7b37406aa0326b7716825155d3f985762" -dependencies = [ - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "pallet-authorship 25.0.0", - "parity-scale-codec", - "scale-info", - "sp-application-crypto 27.0.0", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-staking 23.0.0", - "sp-std 12.0.0", -] - [[package]] name = "pallet-im-online" version = "26.0.0" @@ -7884,7 +7864,7 @@ dependencies = [ "scale-info", "sp-core 27.0.0", "sp-io 29.0.0", - "sp-mmr-primitives 25.0.0", + "sp-mmr-primitives", "sp-runtime 30.0.1", "sp-std 13.0.0", ] @@ -8057,7 +8037,7 @@ dependencies = [ "pallet-babe 27.0.0", "pallet-balances 27.0.0", "pallet-grandpa", - "pallet-im-online 26.0.0", + "pallet-im-online", "pallet-offences", "pallet-session 27.0.0", "pallet-staking 27.0.0", @@ -9688,7 +9668,7 @@ dependencies = [ "pallet-fast-unstake 26.0.0", "pallet-grandpa", "pallet-identity", - "pallet-im-online 26.0.0", + "pallet-im-online", "pallet-indices", "pallet-membership 27.0.0", "pallet-message-queue 30.0.0", @@ -9737,13 +9717,13 @@ dependencies = [ "sp-authority-discovery 25.0.0", "sp-block-builder 25.0.0", "sp-consensus-babe 0.31.0", - "sp-consensus-beefy 12.0.0", + "sp-consensus-beefy", "sp-core 27.0.0", "sp-genesis-builder 0.6.0", "sp-inherents 25.0.0", "sp-io 29.0.0", "sp-keyring 30.0.0", - "sp-mmr-primitives 25.0.0", + "sp-mmr-primitives", "sp-npos-elections 25.0.0", "sp-offchain 25.0.0", "sp-runtime 30.0.1", @@ -11376,9 +11356,9 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cbc5db21ea2c4ba65b23315e73e69e8155630fb47c84b93d40b0e759c9d86d" +checksum = "923ca35a57239e8d25f458d8edd075e1c051d64e388963b497fd5d8ab005f2c7" dependencies = [ "ahash 0.8.7", "array-bytes 6.2.2", @@ -11392,26 +11372,27 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "rand 0.8.5", - "sc-block-builder 0.30.0", - "sc-chain-spec 24.0.0", - "sc-client-api 25.0.0", - "sc-consensus 0.30.0", - "sc-network 0.31.0", - "sc-network-common 0.30.0", + "sc-block-builder 0.32.0", + "sc-chain-spec 26.0.0", + "sc-client-api 27.0.0", + "sc-consensus 0.32.0", + "sc-network 0.33.0", + "sc-network-common 0.32.0", "sc-network-gossip", - "sc-telemetry 12.0.0", - "sc-transaction-pool-api 25.0.0", - "sc-utils 11.0.0", + "sc-network-sync 0.32.0", + "sc-telemetry 14.0.0", + "sc-transaction-pool-api 27.0.0", + "sc-utils 13.0.0", "serde_json", - "sp-api 23.0.0", - "sp-application-crypto 27.0.0", - "sp-arithmetic 20.0.0", - "sp-blockchain 25.0.0", - "sp-consensus 0.29.0", - "sp-consensus-grandpa 10.0.0", - "sp-core 25.0.0", - "sp-keystore 0.31.0", - "sp-runtime 28.0.0", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-arithmetic 22.0.0", + "sp-blockchain 27.0.0", + "sp-consensus 0.31.0", + "sp-consensus-grandpa 12.0.0", + "sp-core 27.0.0", + "sp-keystore 0.33.0", + "sp-runtime 30.0.1", "substrate-prometheus-endpoint", "thiserror", ] @@ -11816,19 +11797,20 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.31.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b884a9f7cd348c4c1899c0bbf95237e39dffba4baec48d4b98c1046f6bb04fa5" +checksum = "fc9f9e0267f58062280f7249eea969a0c9f479c9ad08049ffb39a6f88e515a34" dependencies = [ "ahash 0.8.7", "futures", "futures-timer", "libp2p", "log", - "sc-network 0.31.0", - "sc-network-common 0.30.0", + "sc-network 0.33.0", + "sc-network-common 0.32.0", + "sc-network-sync 0.32.0", "schnellru", - "sp-runtime 28.0.0", + "sp-runtime 30.0.1", "substrate-prometheus-endpoint", "tracing", ] @@ -13412,26 +13394,6 @@ dependencies = [ "sp-timestamp 25.0.0", ] -[[package]] -name = "sp-consensus-beefy" -version = "10.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e18fe984ea745727e645c43d6a955bc471b3bcd36aa8d260c3bd0deeada0c5" -dependencies = [ - "lazy_static", - "parity-scale-codec", - "scale-info", - "serde", - "sp-api 23.0.0", - "sp-application-crypto 27.0.0", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-mmr-primitives 23.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "strum", -] - [[package]] name = "sp-consensus-beefy" version = "12.0.0" @@ -13446,7 +13408,7 @@ dependencies = [ "sp-application-crypto 29.0.0", "sp-core 27.0.0", "sp-io 29.0.0", - "sp-mmr-primitives 25.0.0", + "sp-mmr-primitives", "sp-runtime 30.0.1", "sp-std 13.0.0", "strum", @@ -13939,25 +13901,6 @@ dependencies = [ "sp-std 13.0.0", ] -[[package]] -name = "sp-mmr-primitives" -version = "23.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3b33c20a4b1dd5a0069ced6997078a2af5d625f2c53d1b69bef9e131f42d77" -dependencies = [ - "ckb-merkle-mountain-range", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-api 23.0.0", - "sp-core 25.0.0", - "sp-debug-derive 12.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "thiserror", -] - [[package]] name = "sp-mmr-primitives" version = "25.0.0" @@ -14727,7 +14670,7 @@ dependencies = [ "pallet-fast-unstake 26.0.0", "pallet-grandpa", "pallet-identity", - "pallet-im-online 26.0.0", + "pallet-im-online", "pallet-indices", "pallet-membership 27.0.0", "pallet-message-queue 30.0.0", @@ -14778,13 +14721,13 @@ dependencies = [ "sp-authority-discovery 25.0.0", "sp-block-builder 25.0.0", "sp-consensus-babe 0.31.0", - "sp-consensus-beefy 12.0.0", + "sp-consensus-beefy", "sp-core 27.0.0", "sp-genesis-builder 0.6.0", "sp-inherents 25.0.0", "sp-io 29.0.0", "sp-keyring 30.0.0", - "sp-mmr-primitives 25.0.0", + "sp-mmr-primitives", "sp-npos-elections 25.0.0", "sp-offchain 25.0.0", "sp-runtime 30.0.1", diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index c6b5275467..e164eb7545 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -9,28 +9,28 @@ license.workspace = true [dependencies] clap = { version = "4.4.4", features = [ "derive" ] } hex-literal = "0.4.1" -serde_json = "1.0.107" -serde = { version = "1.0.188", features = ["derive"] } +serde_json = "1.0.111" +serde = { version = "1.0.195", features = ["derive"] } polkadot-runtime = { path = "../relay/polkadot" } polkadot-runtime-constants = { path = "../relay/polkadot/constants" } kusama-runtime = { package = "staging-kusama-runtime", path = "../relay/kusama" } kusama-runtime-constants = { path = "../relay/kusama/constants" } -sc-chain-spec = "24.0.0" -polkadot-runtime-parachains = "4.0.0" -polkadot-primitives = "4.0.0" -sp-consensus-babe = "0.29.0" -sp-authority-discovery = "23.0.0" -sp-core = "25.0.0" -pallet-staking = "25.0.0" -sc-consensus-grandpa = "0.16.0" -pallet-im-online = "24.0.0" -sp-runtime = "28.0.0" -sp-consensus-beefy = "10.0.0" -xcm = { package = "staging-xcm", version = "4.0.0" } -parachains-common = { version = "4.0.0" } -cumulus-primitives-core = { version = "0.4.0" } +sc-chain-spec = "26.0.0" +polkadot-runtime-parachains = "6.0.0" +polkadot-primitives = "6.0.0" +sp-consensus-babe = "0.31.0" +sp-authority-discovery = "25.0.0" +sp-core = "27.0.0" +pallet-staking = "27.0.0" +sc-consensus-grandpa = "0.18.0" +pallet-im-online = "26.0.0" +sp-runtime = "30.0.1" +sp-consensus-beefy = "12.0.0" +xcm = { package = "staging-xcm", version = "6.0.0" } +parachains-common = { version = "6.0.0" } +cumulus-primitives-core = { version = "0.6.0" } asset-hub-polkadot-runtime = { path = "../system-parachains/asset-hubs/asset-hub-polkadot" } asset-hub-kusama-runtime = { path = "../system-parachains/asset-hubs/asset-hub-kusama" } diff --git a/chain-spec-generator/src/relay_chain_specs.rs b/chain-spec-generator/src/relay_chain_specs.rs index b6b58ba5d8..075c965762 100644 --- a/chain-spec-generator/src/relay_chain_specs.rs +++ b/chain-spec-generator/src/relay_chain_specs.rs @@ -29,11 +29,9 @@ use sp_consensus_beefy::ecdsa_crypto::AuthorityId as BeefyId; use sp_core::{sr25519, Pair, Public}; use sp_runtime::{traits::IdentifyAccount, Perbill}; -pub type PolkadotChainSpec = - sc_chain_spec::GenericChainSpec; +pub type PolkadotChainSpec = sc_chain_spec::GenericChainSpec<(), NoExtension>; -pub type KusamaChainSpec = - sc_chain_spec::GenericChainSpec; +pub type KusamaChainSpec = sc_chain_spec::GenericChainSpec<(), NoExtension>; const DEFAULT_PROTOCOL_ID: &str = "dot"; @@ -199,7 +197,6 @@ fn testnet_accounts() -> Vec { } pub fn polkadot_testnet_genesis( - wasm_binary: &[u8], initial_authorities: Vec<( AccountId, AccountId, @@ -213,21 +210,18 @@ pub fn polkadot_testnet_genesis( )>, _root_key: AccountId, endowed_accounts: Option>, -) -> polkadot_runtime::RuntimeGenesisConfig { +) -> serde_json::Value { let endowed_accounts: Vec = endowed_accounts.unwrap_or_else(testnet_accounts); const ENDOWMENT: u128 = 1_000_000 * DOT; const STASH: u128 = 100 * DOT; - polkadot_runtime::RuntimeGenesisConfig { - beefy: Default::default(), - system: polkadot_runtime::SystemConfig { code: wasm_binary.to_vec(), ..Default::default() }, - indices: polkadot_runtime::IndicesConfig { indices: vec![] }, - balances: polkadot_runtime::BalancesConfig { - balances: endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect(), + serde_json::json!({ + "balances": { + "balances": endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect::>(), }, - session: polkadot_runtime::SessionConfig { - keys: initial_authorities + "session": { + "keys": initial_authorities .iter() .map(|x| { ( @@ -246,47 +240,27 @@ pub fn polkadot_testnet_genesis( }) .collect::>(), }, - staking: polkadot_runtime::StakingConfig { - minimum_validator_count: 1, - validator_count: initial_authorities.len() as u32, - stakers: initial_authorities + "staking": { + "minimumValidatorCount": 1, + "validatorCount": initial_authorities.len() as u32, + "stakers": initial_authorities .iter() - .map(|x| { - (x.0.clone(), x.0.clone(), STASH, polkadot_runtime::StakerStatus::Validator) - }) - .collect(), - invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(), - force_era: Forcing::NotForcing, - slash_reward_fraction: Perbill::from_percent(10), - ..Default::default() - }, - babe: polkadot_runtime::BabeConfig { - authorities: Default::default(), - epoch_config: Some(polkadot_runtime::BABE_GENESIS_EPOCH_CONFIG), - ..Default::default() + .map(|x| (x.0.clone(), x.0.clone(), STASH, polkadot_runtime::StakerStatus::::Validator)) + .collect::>(), + "invulnerables": initial_authorities.iter().map(|x| x.0.clone()).collect::>(), + "forceEra": Forcing::NotForcing, + "slashRewardFraction": Perbill::from_percent(10), }, - grandpa: Default::default(), - im_online: Default::default(), - authority_discovery: polkadot_runtime::AuthorityDiscoveryConfig { - keys: vec![], - ..Default::default() + "babe": { + "epochConfig": Some(polkadot_runtime::BABE_GENESIS_EPOCH_CONFIG), }, - claims: polkadot_runtime::ClaimsConfig { claims: vec![], vesting: vec![] }, - vesting: polkadot_runtime::VestingConfig { vesting: vec![] }, - treasury: Default::default(), - hrmp: Default::default(), - configuration: polkadot_runtime::ConfigurationConfig { - config: default_parachains_host_configuration(), + "configuration": { + "config": default_parachains_host_configuration(), }, - paras: Default::default(), - xcm_pallet: Default::default(), - nomination_pools: Default::default(), - } + }) } -/// Helper function to create kusama `RuntimeGenesisConfig` for testing pub fn kusama_testnet_genesis( - wasm_binary: &[u8], initial_authorities: Vec<( AccountId, AccountId, @@ -300,21 +274,18 @@ pub fn kusama_testnet_genesis( )>, _root_key: AccountId, endowed_accounts: Option>, -) -> kusama_runtime::RuntimeGenesisConfig { +) -> serde_json::Value { let endowed_accounts: Vec = endowed_accounts.unwrap_or_else(testnet_accounts); const ENDOWMENT: u128 = 1_000_000 * KSM; const STASH: u128 = 100 * KSM; - kusama_runtime::RuntimeGenesisConfig { - system: kusama_runtime::SystemConfig { code: wasm_binary.to_vec(), ..Default::default() }, - indices: kusama_runtime::IndicesConfig { indices: vec![] }, - balances: kusama_runtime::BalancesConfig { - balances: endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect(), + serde_json::json!({ + "balances": { + "balances": endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect::>(), }, - beefy: Default::default(), - session: kusama_runtime::SessionConfig { - keys: initial_authorities + "session": { + "keys": initial_authorities .iter() .map(|x| { ( @@ -333,57 +304,36 @@ pub fn kusama_testnet_genesis( }) .collect::>(), }, - staking: kusama_runtime::StakingConfig { - minimum_validator_count: 1, - validator_count: initial_authorities.len() as u32, - stakers: initial_authorities + "staking": { + "minimumValidatorCount": 1, + "validatorCount": initial_authorities.len() as u32, + "stakers": initial_authorities .iter() - .map(|x| (x.0.clone(), x.0.clone(), STASH, kusama_runtime::StakerStatus::Validator)) - .collect(), - invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(), - force_era: Forcing::NotForcing, - slash_reward_fraction: Perbill::from_percent(10), - ..Default::default() - }, - babe: kusama_runtime::BabeConfig { - authorities: Default::default(), - epoch_config: Some(kusama_runtime::BABE_GENESIS_EPOCH_CONFIG), - ..Default::default() + .map(|x| (x.0.clone(), x.0.clone(), STASH, kusama_runtime::StakerStatus::::Validator)) + .collect::>(), + "invulnerables": initial_authorities.iter().map(|x| x.0.clone()).collect::>(), + "forceEra": Forcing::NotForcing, + "slashRewardFraction": Perbill::from_percent(10), }, - grandpa: Default::default(), - im_online: Default::default(), - authority_discovery: kusama_runtime::AuthorityDiscoveryConfig { - keys: vec![], - ..Default::default() + "babe": { + "epochConfig": Some(kusama_runtime::BABE_GENESIS_EPOCH_CONFIG), }, - claims: kusama_runtime::ClaimsConfig { claims: vec![], vesting: vec![] }, - vesting: kusama_runtime::VestingConfig { vesting: vec![] }, - treasury: Default::default(), - hrmp: Default::default(), - configuration: kusama_runtime::ConfigurationConfig { - config: default_parachains_host_configuration(), + "configuration": { + "config": default_parachains_host_configuration(), }, - paras: Default::default(), - xcm_pallet: Default::default(), - nomination_pools: Default::default(), - nis_counterpart_balances: Default::default(), - } + }) } -fn polkadot_development_config_genesis( - wasm_binary: &[u8], -) -> polkadot_runtime::RuntimeGenesisConfig { +fn polkadot_development_config_genesis() -> serde_json::Value { polkadot_testnet_genesis( - wasm_binary, vec![get_authority_keys_from_seed("Alice")], get_account_id_from_seed::("Alice"), None, ) } -fn kusama_development_config_genesis(wasm_binary: &[u8]) -> kusama_runtime::RuntimeGenesisConfig { +fn kusama_development_config_genesis() -> serde_json::Value { kusama_testnet_genesis( - wasm_binary, vec![get_authority_keys_from_seed("Alice")], get_account_id_from_seed::("Alice"), None, @@ -392,44 +342,39 @@ fn kusama_development_config_genesis(wasm_binary: &[u8]) -> kusama_runtime::Runt /// Polkadot development config (single validator Alice) pub fn polkadot_development_config() -> Result, String> { - let wasm_binary = - polkadot_runtime::WASM_BINARY.ok_or("Polkadot development wasm not available")?; - - Ok(Box::new(PolkadotChainSpec::from_genesis( - "Polakdot Development", - "polkadot-dev", - ChainType::Development, - move || polkadot_development_config_genesis(wasm_binary), - vec![], - None, - Some(DEFAULT_PROTOCOL_ID), - None, - Some(polkadot_chain_spec_properties()), - Default::default(), - ))) + Ok(Box::new( + PolkadotChainSpec::builder( + polkadot_runtime::WASM_BINARY.ok_or("Polkadot development wasm not available")?, + Default::default(), + ) + .with_name("Polakdot Development") + .with_id("polkadot-dev") + .with_chain_type(ChainType::Development) + .with_genesis_config_patch(polkadot_development_config_genesis()) + .with_protocol_id(DEFAULT_PROTOCOL_ID) + .with_properties(polkadot_chain_spec_properties()) + .build(), + )) } /// Kusama development config (single validator Alice) pub fn kusama_development_config() -> Result, String> { - let wasm_binary = kusama_runtime::WASM_BINARY.ok_or("Kusama development wasm not available")?; - - Ok(Box::new(KusamaChainSpec::from_genesis( - "Kusama Development", - "kusama-dev", - ChainType::Development, - move || kusama_development_config_genesis(wasm_binary), - vec![], - None, - Some(DEFAULT_PROTOCOL_ID), - None, - None, - Default::default(), - ))) + Ok(Box::new( + KusamaChainSpec::builder( + kusama_runtime::WASM_BINARY.ok_or("Kusama development wasm not available")?, + Default::default(), + ) + .with_name("Kusama Development") + .with_id("kusama-dev") + .with_chain_type(ChainType::Development) + .with_genesis_config_patch(kusama_development_config_genesis()) + .with_protocol_id(DEFAULT_PROTOCOL_ID) + .build(), + )) } -fn polkadot_local_testnet_genesis(wasm_binary: &[u8]) -> polkadot_runtime::RuntimeGenesisConfig { +fn polkadot_local_testnet_genesis() -> serde_json::Value { polkadot_testnet_genesis( - wasm_binary, vec![get_authority_keys_from_seed("Alice"), get_authority_keys_from_seed("Bob")], get_account_id_from_seed::("Alice"), None, @@ -438,26 +383,23 @@ fn polkadot_local_testnet_genesis(wasm_binary: &[u8]) -> polkadot_runtime::Runti /// Polkadot local testnet config (multivalidator Alice + Bob) pub fn polkadot_local_testnet_config() -> Result, String> { - let wasm_binary = - polkadot_runtime::WASM_BINARY.ok_or("Polkadot development wasm not available")?; - - Ok(Box::new(PolkadotChainSpec::from_genesis( - "Polkadot Local Testnet", - "polkadot-local", - ChainType::Local, - move || polkadot_local_testnet_genesis(wasm_binary), - vec![], - None, - Some(DEFAULT_PROTOCOL_ID), - None, - Some(polkadot_chain_spec_properties()), - Default::default(), - ))) + Ok(Box::new( + PolkadotChainSpec::builder( + polkadot_runtime::WASM_BINARY.ok_or("Polkadot development wasm not available")?, + Default::default(), + ) + .with_name("Polkadot Local Testnet") + .with_id("polkadot-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(polkadot_local_testnet_genesis()) + .with_protocol_id(DEFAULT_PROTOCOL_ID) + .with_properties(polkadot_chain_spec_properties()) + .build(), + )) } -fn kusama_local_testnet_genesis(wasm_binary: &[u8]) -> kusama_runtime::RuntimeGenesisConfig { +fn kusama_local_testnet_genesis() -> serde_json::Value { kusama_testnet_genesis( - wasm_binary, vec![get_authority_keys_from_seed("Alice"), get_authority_keys_from_seed("Bob")], get_account_id_from_seed::("Alice"), None, @@ -466,20 +408,18 @@ fn kusama_local_testnet_genesis(wasm_binary: &[u8]) -> kusama_runtime::RuntimeGe /// Kusama local testnet config (multivalidator Alice + Bob) pub fn kusama_local_testnet_config() -> Result, String> { - let wasm_binary = kusama_runtime::WASM_BINARY.ok_or("Kusama development wasm not available")?; - - Ok(Box::new(KusamaChainSpec::from_genesis( - "Kusama Local Testnet", - "kusama-local", - ChainType::Local, - move || kusama_local_testnet_genesis(wasm_binary), - vec![], - None, - Some(DEFAULT_PROTOCOL_ID), - None, - None, - Default::default(), - ))) + Ok(Box::new( + KusamaChainSpec::builder( + kusama_runtime::WASM_BINARY.ok_or("Kusama development wasm not available")?, + Default::default(), + ) + .with_name("Kusama Local Testnet") + .with_id("kusama-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(kusama_local_testnet_genesis()) + .with_protocol_id(DEFAULT_PROTOCOL_ID) + .build(), + )) } #[cfg(test)] diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 83d7caa0af..d92fac7c27 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -32,23 +32,17 @@ pub struct Extensions { pub para_id: u32, } -pub type AssetHubPolkadotChainSpec = - sc_chain_spec::GenericChainSpec; +pub type AssetHubPolkadotChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; -pub type AssetHubKusamaChainSpec = - sc_chain_spec::GenericChainSpec; +pub type AssetHubKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; -pub type CollectivesPolkadotChainSpec = - sc_chain_spec::GenericChainSpec; +pub type CollectivesPolkadotChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; -pub type BridgeHubPolkadotChainSpec = - sc_chain_spec::GenericChainSpec; +pub type BridgeHubPolkadotChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; -pub type BridgeHubKusamaChainSpec = - sc_chain_spec::GenericChainSpec; +pub type BridgeHubKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; -pub type GluttonKusamaChainSpec = - sc_chain_spec::GenericChainSpec; +pub type GluttonKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; pub type EncointerKusamaChainSpec = sc_chain_spec::GenericChainSpec; @@ -131,33 +125,28 @@ pub fn bridge_hub_kusama_session_keys(keys: AuraId) -> bridge_hub_kusama_runtime // AssetHubPolkadot fn asset_hub_polkadot_genesis( - wasm_binary: &[u8], invulnerables: Vec<(AccountId, AssetHubPolkadotAuraId)>, endowed_accounts: Vec, id: ParaId, -) -> asset_hub_polkadot_runtime::RuntimeGenesisConfig { - asset_hub_polkadot_runtime::RuntimeGenesisConfig { - system: asset_hub_polkadot_runtime::SystemConfig { - code: wasm_binary.to_vec(), - ..Default::default() - }, - balances: asset_hub_polkadot_runtime::BalancesConfig { +) -> serde_json::Value { + serde_json::json!({ + "balances": asset_hub_polkadot_runtime::BalancesConfig { balances: endowed_accounts .iter() .cloned() - .map(|k| (k, ASSET_HUB_POLKADOT_ED * 4096)) + .map(|k| (k, ASSET_HUB_POLKADOT_ED * 4096 * 4096)) .collect(), }, - parachain_info: asset_hub_polkadot_runtime::ParachainInfoConfig { + "parachainInfo": asset_hub_polkadot_runtime::ParachainInfoConfig { parachain_id: id, ..Default::default() }, - collator_selection: asset_hub_polkadot_runtime::CollatorSelectionConfig { + "collatorSelection": asset_hub_polkadot_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), candidacy_bond: ASSET_HUB_POLKADOT_ED * 16, ..Default::default() }, - session: asset_hub_polkadot_runtime::SessionConfig { + "session": asset_hub_polkadot_runtime::SessionConfig { keys: invulnerables .into_iter() .map(|(acc, aura)| { @@ -169,27 +158,20 @@ fn asset_hub_polkadot_genesis( }) .collect(), }, - // no need to pass anything to aura, in fact it will panic if we do. Session will take care - // of this. - aura: Default::default(), - aura_ext: Default::default(), - parachain_system: Default::default(), - polkadot_xcm: asset_hub_polkadot_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - } + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. `aura: Default::default()` + }) } -fn asset_hub_polkadot_local_genesis( - wasm_binary: &[u8], -) -> asset_hub_polkadot_runtime::RuntimeGenesisConfig { +fn asset_hub_polkadot_local_genesis(para_id: ParaId) -> serde_json::Value { asset_hub_polkadot_genesis( // initial collators. - wasm_binary, invulnerables_asset_hub_polkadot(), testnet_accounts(), - 1000.into(), + para_id, ) } @@ -199,54 +181,44 @@ pub fn asset_hub_polkadot_local_testnet_config() -> Result, S properties.insert("tokenSymbol".into(), "DOT".into()); properties.insert("tokenDecimals".into(), 10.into()); - let wasm_binary = - asset_hub_polkadot_runtime::WASM_BINARY.ok_or("AssetHubPolkadot wasm not available")?; - - Ok(Box::new(AssetHubPolkadotChainSpec::from_genesis( - // Name - "Polkadot Asset Hub Local", - // ID - "asset-hub-polkadot-local", - ChainType::Local, - move || asset_hub_polkadot_local_genesis(wasm_binary), - Vec::new(), - None, - None, - None, - Some(properties), - Extensions { relay_chain: "polkadot-local".into(), para_id: 1000 }, - ))) + Ok(Box::new( + AssetHubPolkadotChainSpec::builder( + asset_hub_polkadot_runtime::WASM_BINARY.expect("AssetHubPolkadot wasm not available!"), + Extensions { relay_chain: "polkadot-local".into(), para_id: 1000 }, + ) + .with_name("Polkadot Asset Hub Local") + .with_id("asset-hub-polkadot-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(asset_hub_polkadot_local_genesis(1000.into())) + .with_properties(properties) + .build(), + )) } // AssetHubKusama fn asset_hub_kusama_genesis( - wasm_binary: &[u8], invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, id: ParaId, -) -> asset_hub_kusama_runtime::RuntimeGenesisConfig { - asset_hub_kusama_runtime::RuntimeGenesisConfig { - system: asset_hub_kusama_runtime::SystemConfig { - code: wasm_binary.to_vec(), - ..Default::default() - }, - balances: asset_hub_kusama_runtime::BalancesConfig { +) -> serde_json::Value { + serde_json::json!({ + "balances": asset_hub_kusama_runtime::BalancesConfig { balances: endowed_accounts .iter() .cloned() - .map(|k| (k, ASSET_HUB_KUSAMA_ED * 4096)) + .map(|k| (k, ASSET_HUB_KUSAMA_ED * 4096 * 4096)) .collect(), }, - parachain_info: asset_hub_kusama_runtime::ParachainInfoConfig { + "parachainInfo": asset_hub_kusama_runtime::ParachainInfoConfig { parachain_id: id, ..Default::default() }, - collator_selection: asset_hub_kusama_runtime::CollatorSelectionConfig { + "collatorSelection": asset_hub_kusama_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), candidacy_bond: ASSET_HUB_KUSAMA_ED * 16, ..Default::default() }, - session: asset_hub_kusama_runtime::SessionConfig { + "session": asset_hub_kusama_runtime::SessionConfig { keys: invulnerables .into_iter() .map(|(acc, aura)| { @@ -258,27 +230,20 @@ fn asset_hub_kusama_genesis( }) .collect(), }, - // no need to pass anything to aura, in fact it will panic if we do. Session will take care - // of this. - aura: Default::default(), - aura_ext: Default::default(), - parachain_system: Default::default(), - polkadot_xcm: asset_hub_kusama_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - } + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. `aura: Default::default()` + }) } -fn asset_hub_kusama_local_genesis( - wasm_binary: &[u8], -) -> asset_hub_kusama_runtime::RuntimeGenesisConfig { +fn asset_hub_kusama_local_genesis(para_id: ParaId) -> serde_json::Value { asset_hub_kusama_genesis( // initial collators. - wasm_binary, invulnerables(), testnet_accounts(), - 1000.into(), + para_id, ) } @@ -288,54 +253,44 @@ pub fn asset_hub_kusama_local_testnet_config() -> Result, Str properties.insert("tokenSymbol".into(), "KSM".into()); properties.insert("tokenDecimals".into(), 12.into()); - let wasm_binary = - asset_hub_kusama_runtime::WASM_BINARY.ok_or("AssetHubKusama wasm not available")?; - - Ok(Box::new(AssetHubKusamaChainSpec::from_genesis( - // Name - "Kusama Asset Hub Local", - // ID - "asset-hub-kusama-local", - ChainType::Local, - move || asset_hub_kusama_local_genesis(wasm_binary), - Vec::new(), - None, - None, - None, - Some(properties), - Extensions { relay_chain: "kusama-local".into(), para_id: 1000 }, - ))) + Ok(Box::new( + AssetHubKusamaChainSpec::builder( + asset_hub_kusama_runtime::WASM_BINARY.expect("AssetHubKusama wasm not available!"), + Extensions { relay_chain: "kusama-local".into(), para_id: 1000 }, + ) + .with_name("Kusama Asset Hub Local") + .with_id("asset-hub-kusama-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(asset_hub_kusama_local_genesis(1000.into())) + .with_properties(properties) + .build(), + )) } // CollectivesPolkadot fn collectives_polkadot_genesis( - wasm_binary: &[u8], invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, id: ParaId, -) -> collectives_polkadot_runtime::RuntimeGenesisConfig { - collectives_polkadot_runtime::RuntimeGenesisConfig { - system: collectives_polkadot_runtime::SystemConfig { - code: wasm_binary.to_vec(), - ..Default::default() - }, - balances: collectives_polkadot_runtime::BalancesConfig { +) -> serde_json::Value { + serde_json::json!({ + "balances": collectives_polkadot_runtime::BalancesConfig { balances: endowed_accounts .iter() .cloned() - .map(|k| (k, COLLECTIVES_POLKADOT_ED * 4096)) + .map(|k| (k, COLLECTIVES_POLKADOT_ED * 4096 * 4096)) .collect(), }, - parachain_info: collectives_polkadot_runtime::ParachainInfoConfig { + "parachainInfo": collectives_polkadot_runtime::ParachainInfoConfig { parachain_id: id, ..Default::default() }, - collator_selection: collectives_polkadot_runtime::CollatorSelectionConfig { + "collatorSelection": collectives_polkadot_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), candidacy_bond: COLLECTIVES_POLKADOT_ED * 16, ..Default::default() }, - session: collectives_polkadot_runtime::SessionConfig { + "session": collectives_polkadot_runtime::SessionConfig { keys: invulnerables .into_iter() .map(|(acc, aura)| { @@ -347,29 +302,20 @@ fn collectives_polkadot_genesis( }) .collect(), }, - // no need to pass anything to aura, in fact it will panic if we do. Session will take care - // of this. - aura: Default::default(), - aura_ext: Default::default(), - parachain_system: Default::default(), - polkadot_xcm: collectives_polkadot_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - alliance: Default::default(), - alliance_motion: Default::default(), - } + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. `aura: Default::default()` + }) } -fn collectives_polkadot_local_genesis( - wasm_binary: &[u8], -) -> collectives_polkadot_runtime::RuntimeGenesisConfig { +fn collectives_polkadot_local_genesis(para_id: ParaId) -> serde_json::Value { collectives_polkadot_genesis( // initial collators. - wasm_binary, invulnerables(), testnet_accounts(), - 1001.into(), + para_id, ) } @@ -379,54 +325,45 @@ pub fn collectives_polkadot_local_testnet_config() -> Result, properties.insert("tokenSymbol".into(), "DOT".into()); properties.insert("tokenDecimals".into(), 10.into()); - let wasm_binary = collectives_polkadot_runtime::WASM_BINARY - .ok_or("CollectivesPolkadot wasm not available")?; - - Ok(Box::new(CollectivesPolkadotChainSpec::from_genesis( - // Name - "Polkadot Collectives Local", - // ID - "collectives-polkadot-local", - ChainType::Local, - move || collectives_polkadot_local_genesis(wasm_binary), - Vec::new(), - None, - None, - None, - Some(properties), - Extensions { relay_chain: "polkadot-local".into(), para_id: 1001 }, - ))) + Ok(Box::new( + CollectivesPolkadotChainSpec::builder( + collectives_polkadot_runtime::WASM_BINARY + .expect("CollectivesPolkadot wasm not available!"), + Extensions { relay_chain: "polkadot-local".into(), para_id: 1001 }, + ) + .with_name("Polkadot Collectives Local") + .with_id("collectives-polkadot-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(collectives_polkadot_local_genesis(1001.into())) + .with_properties(properties) + .build(), + )) } // BridgeHubPolkadot fn bridge_hub_polkadot_genesis( - wasm_binary: &[u8], invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, id: ParaId, -) -> bridge_hub_polkadot_runtime::RuntimeGenesisConfig { - bridge_hub_polkadot_runtime::RuntimeGenesisConfig { - system: bridge_hub_polkadot_runtime::SystemConfig { - code: wasm_binary.to_vec(), - ..Default::default() - }, - balances: bridge_hub_polkadot_runtime::BalancesConfig { +) -> serde_json::Value { + serde_json::json!({ + "balances": bridge_hub_polkadot_runtime::BalancesConfig { balances: endowed_accounts .iter() .cloned() - .map(|k| (k, BRIDGE_HUB_POLKADOT_ED * 4096)) + .map(|k| (k, BRIDGE_HUB_POLKADOT_ED * 4096 * 4096)) .collect(), }, - parachain_info: bridge_hub_polkadot_runtime::ParachainInfoConfig { + "parachainInfo": bridge_hub_polkadot_runtime::ParachainInfoConfig { parachain_id: id, ..Default::default() }, - collator_selection: bridge_hub_polkadot_runtime::CollatorSelectionConfig { + "collatorSelection": bridge_hub_polkadot_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), candidacy_bond: BRIDGE_HUB_POLKADOT_ED * 16, ..Default::default() }, - session: bridge_hub_polkadot_runtime::SessionConfig { + "session": bridge_hub_polkadot_runtime::SessionConfig { keys: invulnerables .into_iter() .map(|(acc, aura)| { @@ -438,29 +375,20 @@ fn bridge_hub_polkadot_genesis( }) .collect(), }, - bridge_kusama_grandpa: Default::default(), - bridge_kusama_messages: Default::default(), - // no need to pass anything to aura, in fact it will panic if we do. Session will take care - // of this. - aura: Default::default(), - aura_ext: Default::default(), - parachain_system: Default::default(), - polkadot_xcm: bridge_hub_polkadot_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - } + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. `aura: Default::default()` + }) } -fn bridge_hub_polkadot_local_genesis( - wasm_binary: &[u8], -) -> bridge_hub_polkadot_runtime::RuntimeGenesisConfig { +fn bridge_hub_polkadot_local_genesis(para_id: ParaId) -> serde_json::Value { bridge_hub_polkadot_genesis( // initial collators. - wasm_binary, invulnerables(), testnet_accounts(), - 1002.into(), + para_id, ) } @@ -470,54 +398,45 @@ pub fn bridge_hub_polkadot_local_testnet_config() -> Result, properties.insert("tokenSymbol".into(), "DOT".into()); properties.insert("tokenDecimals".into(), 10.into()); - let wasm_binary = - bridge_hub_polkadot_runtime::WASM_BINARY.ok_or("BridgeHubPolkadot wasm not available")?; - - Ok(Box::new(BridgeHubPolkadotChainSpec::from_genesis( - // Name - "Polkadot Bridge Hub Local", - // ID - "bridge-hub-polkadot-local", - ChainType::Local, - move || bridge_hub_polkadot_local_genesis(wasm_binary), - Vec::new(), - None, - None, - None, - Some(properties), - Extensions { relay_chain: "polkadot-local".into(), para_id: 1002 }, - ))) + Ok(Box::new( + BridgeHubPolkadotChainSpec::builder( + bridge_hub_polkadot_runtime::WASM_BINARY + .expect("BridgeHubPolkadot wasm not available!"), + Extensions { relay_chain: "polkadot-local".into(), para_id: 1002 }, + ) + .with_name("Polkadot Bridge Hub Local") + .with_id("bridge-hub-polkadot-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(bridge_hub_polkadot_local_genesis(1002.into())) + .with_properties(properties) + .build(), + )) } // BridgeHubKusama fn bridge_hub_kusama_genesis( - wasm_binary: &[u8], invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, id: ParaId, -) -> bridge_hub_kusama_runtime::RuntimeGenesisConfig { - bridge_hub_kusama_runtime::RuntimeGenesisConfig { - system: bridge_hub_kusama_runtime::SystemConfig { - code: wasm_binary.to_vec(), - ..Default::default() - }, - balances: bridge_hub_kusama_runtime::BalancesConfig { +) -> serde_json::Value { + serde_json::json!({ + "balances": bridge_hub_kusama_runtime::BalancesConfig { balances: endowed_accounts .iter() .cloned() - .map(|k| (k, BRIDGE_HUB_KUSAMA_ED * 4096)) + .map(|k| (k, BRIDGE_HUB_KUSAMA_ED * 4096 * 4096)) .collect(), }, - parachain_info: bridge_hub_kusama_runtime::ParachainInfoConfig { + "parachainInfo": bridge_hub_kusama_runtime::ParachainInfoConfig { parachain_id: id, ..Default::default() }, - collator_selection: bridge_hub_kusama_runtime::CollatorSelectionConfig { + "collatorSelection": bridge_hub_kusama_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), candidacy_bond: BRIDGE_HUB_KUSAMA_ED * 16, ..Default::default() }, - session: bridge_hub_kusama_runtime::SessionConfig { + "session": bridge_hub_kusama_runtime::SessionConfig { keys: invulnerables .into_iter() .map(|(acc, aura)| { @@ -529,29 +448,20 @@ fn bridge_hub_kusama_genesis( }) .collect(), }, - bridge_polkadot_grandpa: Default::default(), - bridge_polkadot_messages: Default::default(), - // no need to pass anything to aura, in fact it will panic if we do. Session will take care - // of this. - aura: Default::default(), - aura_ext: Default::default(), - parachain_system: Default::default(), - polkadot_xcm: bridge_hub_kusama_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - } + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. `aura: Default::default()` + }) } -fn bridge_hub_kusama_local_genesis( - wasm_binary: &[u8], -) -> bridge_hub_kusama_runtime::RuntimeGenesisConfig { +fn bridge_hub_kusama_local_genesis(para_id: ParaId) -> serde_json::Value { bridge_hub_kusama_genesis( // initial collators. - wasm_binary, invulnerables(), testnet_accounts(), - 1002.into(), + para_id, ) } @@ -561,74 +471,50 @@ pub fn bridge_hub_kusama_local_testnet_config() -> Result, St properties.insert("tokenSymbol".into(), "KSM".into()); properties.insert("tokenDecimals".into(), 12.into()); - let wasm_binary = - bridge_hub_kusama_runtime::WASM_BINARY.ok_or("BridgeHubKusama wasm not available")?; - - Ok(Box::new(BridgeHubKusamaChainSpec::from_genesis( - // Name - "Kusama Bridge Hub Local", - // ID - "bridge-hub-kusama-local", - ChainType::Local, - move || bridge_hub_kusama_local_genesis(wasm_binary), - Vec::new(), - None, - None, - None, - Some(properties), - Extensions { relay_chain: "kusama-local".into(), para_id: 1002 }, - ))) + Ok(Box::new( + BridgeHubKusamaChainSpec::builder( + bridge_hub_kusama_runtime::WASM_BINARY.expect("BridgeHubKusama wasm not available!"), + Extensions { relay_chain: "kusama-local".into(), para_id: 1002 }, + ) + .with_name("Kusama Bridge Hub Local") + .with_id("bridge-hub-kusama-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(bridge_hub_kusama_local_genesis(1002.into())) + .with_properties(properties) + .build(), + )) } // GluttonKusama -fn glutton_kusama_genesis( - wasm_binary: &[u8], - id: ParaId, -) -> glutton_kusama_runtime::RuntimeGenesisConfig { - glutton_kusama_runtime::RuntimeGenesisConfig { - system: glutton_kusama_runtime::SystemConfig { - code: wasm_binary.to_vec(), - ..Default::default() - }, - glutton: Default::default(), - sudo: Default::default(), - parachain_system: Default::default(), - parachain_info: glutton_kusama_runtime::ParachainInfoConfig { +fn glutton_kusama_genesis(id: ParaId) -> serde_json::Value { + serde_json::json!({ + "parachainInfo": glutton_kusama_runtime::ParachainInfoConfig { parachain_id: id, ..Default::default() }, - } + }) } -fn glutton_kusama_local_genesis( - wasm_binary: &[u8], -) -> glutton_kusama_runtime::RuntimeGenesisConfig { - glutton_kusama_genesis(wasm_binary, 1002.into()) +fn glutton_kusama_local_genesis(id: ParaId) -> serde_json::Value { + glutton_kusama_genesis(id) } pub fn glutton_kusama_local_testnet_config() -> Result, String> { let mut properties = sc_chain_spec::Properties::new(); properties.insert("ss58Format".into(), 2.into()); - properties.insert("tokenSymbol".into(), "KSM".into()); - properties.insert("tokenDecimals".into(), 12.into()); - - let wasm_binary = - glutton_kusama_runtime::WASM_BINARY.ok_or("GluttonKusama wasm not available")?; - Ok(Box::new(GluttonKusamaChainSpec::from_genesis( - // Name - "Glutton Kusama Local", - // ID - "glutton-kusama-local", - ChainType::Local, - move || glutton_kusama_local_genesis(wasm_binary), - Vec::new(), - None, - None, - None, - Some(properties), - Extensions { relay_chain: "kusama-local".into(), para_id: 1002 }, - ))) + Ok(Box::new( + GluttonKusamaChainSpec::builder( + glutton_kusama_runtime::WASM_BINARY.expect("GluttonKusama wasm not available!"), + Extensions { relay_chain: "kusama-local".into(), para_id: 1300 }, + ) + .with_name("Kusama Glutton Local") + .with_id("glutton-kusama-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(glutton_kusama_local_genesis(1300.into())) + .with_properties(properties) + .build(), + )) } // EncointerKusama From dcee99c34a208fe95e9bf94265bf9c9e80762a97 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 22 Jan 2024 13:19:20 +0100 Subject: [PATCH 030/316] [chain-specs] Updated encointer to `polkadot-sdk@1.5` --- chain-spec-generator/Cargo.toml | 3 + .../src/system_parachains_specs.rs | 88 ++++++++----------- 2 files changed, 38 insertions(+), 53 deletions(-) diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index e164eb7545..79a4d87cca 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -40,6 +40,9 @@ bridge-hub-kusama-runtime = { path = "../system-parachains/bridge-hubs/bridge-hu encointer-kusama-runtime = { path = "../system-parachains/encointer" } glutton-kusama-runtime = { path = "../system-parachains/gluttons/glutton-kusama" } +# encointer is not migrated to the latest release, so we use compatible deps, when needed +sp-core-encointer-compatible = { package = "sp-core", version = "25.0.0" } + [features] runtime-benchmarks = [ "asset-hub-polkadot-runtime/runtime-benchmarks", diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index d92fac7c27..c3f5ee38fd 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -44,8 +44,7 @@ pub type BridgeHubKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensio pub type GluttonKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; -pub type EncointerKusamaChainSpec = - sc_chain_spec::GenericChainSpec; +pub type EncointerKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; const ASSET_HUB_POLKADOT_ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; @@ -518,55 +517,43 @@ pub fn glutton_kusama_local_testnet_config() -> Result, Strin } // EncointerKusama -fn encointer_kusama_genesis( - wasm_binary: &[u8], - endowed_accounts: Vec, - id: ParaId, -) -> encointer_kusama_runtime::RuntimeGenesisConfig { - encointer_kusama_runtime::RuntimeGenesisConfig { - system: encointer_kusama_runtime::SystemConfig { - code: wasm_binary.to_vec(), - ..Default::default() - }, - balances: encointer_kusama_runtime::BalancesConfig { +fn encointer_kusama_genesis(endowed_accounts: Vec, id: u32) -> serde_json::Value { + // The Encointer may not be migrated to the latest release, so we use compatible dependencies. + fn get_from_seed( + seed: &str, + ) -> ::Public { + use sp_core_encointer_compatible::Pair; + TPublic::Pair::from_string(&format!("//{}", seed), None) + .expect("static values are valid; qed") + .public() + } + + serde_json::json!({ + "balances": asset_hub_kusama_runtime::BalancesConfig { balances: endowed_accounts .iter() .cloned() .map(|k| (k, ENCOINTER_KUSAMA_ED * 4096)) .collect(), }, - parachain_info: encointer_kusama_runtime::ParachainInfoConfig { - parachain_id: id, + "parachainInfo": encointer_kusama_runtime::ParachainInfoConfig { + parachain_id: id.into(), ..Default::default() }, - collective: Default::default(), - encointer_balances: Default::default(), - encointer_ceremonies: Default::default(), - encointer_communities: Default::default(), - encointer_faucet: Default::default(), - encointer_scheduler: Default::default(), - membership: Default::default(), - treasury: Default::default(), - aura: encointer_kusama_runtime::AuraConfig { - authorities: vec![get_from_seed::("Alice").into()], + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - aura_ext: Default::default(), - parachain_system: Default::default(), - polkadot_xcm: encointer_kusama_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() + "aura": encointer_kusama_runtime::AuraConfig { + authorities: vec![get_from_seed::("Alice").into()], }, - } + }) } -fn encointer_kusama_local_genesis( - wasm_binary: &[u8], -) -> encointer_kusama_runtime::RuntimeGenesisConfig { +fn encointer_kusama_local_genesis(para_id: u32) -> serde_json::Value { encointer_kusama_genesis( // initial collators. - wasm_binary, testnet_accounts(), - 1001.into(), + para_id, ) } @@ -576,21 +563,16 @@ pub fn encointer_kusama_local_testnet_config() -> Result, Str properties.insert("tokenSymbol".into(), "KSM".into()); properties.insert("tokenDecimals".into(), 12.into()); - let wasm_binary = - encointer_kusama_runtime::WASM_BINARY.ok_or("EncointerKusama wasm not available")?; - - Ok(Box::new(EncointerKusamaChainSpec::from_genesis( - // Name - "Kusama Encointer Local", - // ID - "encointer-kusama-local", - ChainType::Local, - move || encointer_kusama_local_genesis(wasm_binary), - Vec::new(), - None, - None, - None, - Some(properties), - Extensions { relay_chain: "kusama-local".into(), para_id: 1001 }, - ))) + Ok(Box::new( + EncointerKusamaChainSpec::builder( + encointer_kusama_runtime::WASM_BINARY.expect("EncointerKusama wasm not available!"), + Extensions { relay_chain: "kusama-local".into(), para_id: 1001 }, + ) + .with_name("Kusama Encointer Local") + .with_id("encointer-kusama-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(encointer_kusama_local_genesis(1001)) + .with_properties(properties) + .build(), + )) } From 0196f2818d3bdcb890efb9bba57dbc1e5b817f38 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 22 Jan 2024 16:26:38 +0100 Subject: [PATCH 031/316] Fix tests --- integration-tests/emulated/chains/src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/integration-tests/emulated/chains/src/lib.rs b/integration-tests/emulated/chains/src/lib.rs index 84a3c8e5b4..a4e6f3eed7 100644 --- a/integration-tests/emulated/chains/src/lib.rs +++ b/integration-tests/emulated/chains/src/lib.rs @@ -41,8 +41,6 @@ use xcm_emulator::{ decl_test_sender_receiver_accounts_parameter_types, }; -use polkadot_primitives::runtime_api::runtime_decl_for_parachain_host::ParachainHostV7; - decl_test_relay_chains! { #[api_version(5)] pub struct Polkadot { @@ -58,7 +56,7 @@ decl_test_relay_chains! { Hrmp: polkadot_runtime::Hrmp, } }, - #[api_version(5)] + #[api_version(8)] pub struct Kusama { genesis = kusama::genesis(), on_init = (), From 6423781996047ffc64022fe028729e6acd6d7016 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 22 Jan 2024 23:29:31 +0100 Subject: [PATCH 032/316] Update relay/polkadot/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- relay/polkadot/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index e7a77bfcd5..6d3ef652a4 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -798,7 +798,6 @@ impl pallet_fast_unstake::Config for Runtime { parameter_types! { // Minimum 4 CENTS/byte pub const BasicDeposit: Balance = deposit(1, 258); - // TODO:(PR#137) - check ByteDeposit? pub const ByteDeposit: Balance = deposit(0, 1); pub const SubAccountDeposit: Balance = deposit(1, 53); pub const MaxSubAccounts: u32 = 100; From 70dbf930fe37cfd86fbdb695e3c612397a74931f Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 23 Jan 2024 12:25:54 +0100 Subject: [PATCH 033/316] Added CHANGELOG.md entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4cfde97db..070f768c73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed - Upgrade parachains runtime API from v7 to v8 in Kusama ([polkadot-fellows/runtimes#148](https://github.com/polkadot-fellows/runtimes/pull/148)). Context: https://paritytech.github.io/polkadot-sdk/book/protocol-validator-disabling.html +- Upgrade dependencies to the `polkadot-sdk@1.5.0` release ([polkadot-fellows/runtimes#137](https://github.com/polkadot-fellows/runtimes/pull/137)) ## [1.1.0] 10.01.2024 From 97de24b2072572e0918140a419eca9a6369913e2 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 23 Jan 2024 12:32:02 +0100 Subject: [PATCH 034/316] Removed `TODO:(PR#137)` --- relay/kusama/src/lib.rs | 2 -- relay/polkadot/src/lib.rs | 1 - system-parachains/gluttons/glutton-kusama/src/lib.rs | 1 - 3 files changed, 4 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 9c43545d4d..3048eef3a7 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -657,7 +657,6 @@ parameter_types! { 27, "DOT_SLASH_DEFER_DURATION" ); - // TODO:(PR#137) - check MaxExposurePageSize/MaxNominators 512? pub const MaxExposurePageSize: u32 = 512; // Note: this is not really correct as Max Nominators is (MaxExposurePageSize * page_count) but // this is an unbounded number. We just set it to a reasonably high value, 1 full page @@ -925,7 +924,6 @@ impl claims::Config for Runtime { parameter_types! { // Minimum 100 bytes/KSM deposited (1 CENT/byte) pub const BasicDeposit: Balance = 1000 * CENTS; // 258 bytes on-chain - // TODO:(PR#137) - check ByteDeposit? pub const ByteDeposit: Balance = deposit(0, 1); pub const SubAccountDeposit: Balance = 200 * CENTS; // 53 bytes on-chain pub const MaxSubAccounts: u32 = 100; diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 6d3ef652a4..207163cc2f 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -667,7 +667,6 @@ parameter_types! { "DOT_SLASH_DEFER_DURATION" ); pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE; - // TODO:(PR#137) - check MaxExposurePageSize/MaxNominators 512? pub const MaxExposurePageSize: u32 = 512; // Note: this is not really correct as Max Nominators is (MaxExposurePageSize * page_count) but // this is an unbounded number. We just set it to a reasonably high value, 1 full page diff --git a/system-parachains/gluttons/glutton-kusama/src/lib.rs b/system-parachains/gluttons/glutton-kusama/src/lib.rs index c5d4a31a78..ee89ba4a8f 100644 --- a/system-parachains/gluttons/glutton-kusama/src/lib.rs +++ b/system-parachains/gluttons/glutton-kusama/src/lib.rs @@ -234,7 +234,6 @@ construct_runtime! { } = 1, ParachainInfo: parachain_info::{Pallet, Storage, Config} = 2, - // TODO:(PR#137) - do we still need this? // DMP handler. CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Storage, Event, Origin} = 10, MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 11, From f61c49b972b0b6fec970b8953bca7f838053922e Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 26 Jan 2024 00:26:25 +0100 Subject: [PATCH 035/316] Fix constants stuff after rebase --- Cargo.lock | 9 +- relay/kusama/Cargo.toml | 1 - relay/kusama/constants/Cargo.toml | 2 +- relay/polkadot/Cargo.toml | 1 - relay/polkadot/constants/Cargo.toml | 2 +- .../asset-hubs/asset-hub-kusama/src/lib.rs | 8 +- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 8 +- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 2 +- .../bridge-hub-polkadot/src/lib.rs | 2 +- .../collectives-polkadot/src/lib.rs | 2 +- system-parachains/constants/Cargo.toml | 2 +- system-parachains/encointer/Cargo.toml | 14 +- system-parachains/encointer/src/lib.rs | 165 ++++++++++++++++-- 13 files changed, 179 insertions(+), 39 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 642d9af292..19a9f51be9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3368,9 +3368,12 @@ dependencies = [ "pallet-xcm 4.0.0", "parachains-common 4.0.0", "parity-scale-codec", + "polkadot-core-primitives 4.0.0", "polkadot-parachain-primitives 3.0.0", + "polkadot-primitives 4.0.0", "polkadot-runtime-common 4.0.0", "scale-info", + "smallvec", "sp-api 23.0.0", "sp-block-builder 23.0.0", "sp-consensus-aura 0.29.0", @@ -9706,7 +9709,6 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "smallvec", "sp-api 25.0.0", "sp-application-crypto 29.0.0", "sp-arithmetic 22.0.0", @@ -12996,9 +12998,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.12.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "snap" @@ -14710,7 +14712,6 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "smallvec", "sp-api 25.0.0", "sp-application-crypto 29.0.0", "sp-arithmetic 22.0.0", diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index 97e70439db..76b7b80122 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -17,7 +17,6 @@ rustc-hex = { version = "2.1.0", default-features = false } serde = { version = "1.0.195", default-features = false } serde_derive = { version = "1.0.195", optional = true } static_assertions = "1.1.0" -smallvec = "1.11.2" authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "25.0.0" } babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.31.0" } diff --git a/relay/kusama/constants/Cargo.toml b/relay/kusama/constants/Cargo.toml index b560f49ae0..0d7da2911c 100644 --- a/relay/kusama/constants/Cargo.toml +++ b/relay/kusama/constants/Cargo.toml @@ -7,7 +7,7 @@ edition.workspace = true license.workspace = true [dependencies] -smallvec = "1.11.2" +smallvec = "1.13.1" frame-support = { default-features = false , version = "27.0.0" } primitives = { package = "polkadot-primitives", default-features = false , version = "6.0.0" } diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index 2ef3a24b15..9a137f5504 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -16,7 +16,6 @@ rustc-hex = { version = "2.1.0", default-features = false } serde = { version = "1.0.195", default-features = false } serde_derive = { version = "1.0.195", optional = true } static_assertions = "1.1.0" -smallvec = "1.11.2" authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "25.0.0" } babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.31.0" } diff --git a/relay/polkadot/constants/Cargo.toml b/relay/polkadot/constants/Cargo.toml index 1c6ad326da..bb07bfb6a4 100644 --- a/relay/polkadot/constants/Cargo.toml +++ b/relay/polkadot/constants/Cargo.toml @@ -7,7 +7,7 @@ edition.workspace = true license.workspace = true [dependencies] -smallvec = "1.11.2" +smallvec = "1.13.1" frame-support = { default-features = false , version = "27.0.0" } primitives = { package = "polkadot-primitives", default-features = false , version = "6.0.0" } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 5ec966d62c..b6856b4c8f 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -1322,7 +1322,7 @@ impl_runtime_apis! { // Relay/native token can be teleported between AH and Relay. Some(( MultiAsset { - fun: Fungible(EXISTENTIAL_DEPOSIT), + fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }, Parent.into(), @@ -1337,7 +1337,7 @@ impl_runtime_apis! { ); Some(( MultiAsset { - fun: Fungible(EXISTENTIAL_DEPOSIT), + fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }, ParentThen(Parachain(random_para_id).into()).into(), @@ -1351,12 +1351,12 @@ impl_runtime_apis! { // (We don't care that Relay doesn't accept incoming unknown AH local asset) let dest = Parent.into(); - let fee_amount = EXISTENTIAL_DEPOSIT; + let fee_amount = ExistentialDeposit::get(); let fee_asset: MultiAsset = (MultiLocation::parent(), fee_amount).into(); let who = frame_benchmarking::whitelisted_caller(); // Give some multiple of the existential deposit - let balance = fee_amount + EXISTENTIAL_DEPOSIT * 1000; + let balance = fee_amount + ExistentialDeposit::get() * 1000; let _ = >::make_free_balance_be( &who, balance, ); diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index efe8c29b45..8e09cca04c 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -1214,7 +1214,7 @@ impl_runtime_apis! { // Relay/native token can be teleported between AH and Relay. Some(( MultiAsset { - fun: Fungible(EXISTENTIAL_DEPOSIT), + fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }, Parent.into(), @@ -1229,7 +1229,7 @@ impl_runtime_apis! { ); Some(( MultiAsset { - fun: Fungible(EXISTENTIAL_DEPOSIT), + fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }, ParentThen(Parachain(random_para_id).into()).into(), @@ -1243,12 +1243,12 @@ impl_runtime_apis! { // (We don't care that Relay doesn't accept incoming unknown AH local asset) let dest = Parent.into(); - let fee_amount = EXISTENTIAL_DEPOSIT; + let fee_amount = ExistentialDeposit::get(); let fee_asset: MultiAsset = (MultiLocation::parent(), fee_amount).into(); let who = frame_benchmarking::whitelisted_caller(); // Give some multiple of the existential deposit - let balance = fee_amount + EXISTENTIAL_DEPOSIT * 1000; + let balance = fee_amount + ExistentialDeposit::get() * 1000; let _ = >::make_free_balance_be( &who, balance, ); diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 2ca374d2e1..b36e05afd0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -823,7 +823,7 @@ impl_runtime_apis! { // Relay/native token can be teleported between BH and Relay. Some(( MultiAsset { - fun: Fungible(EXISTENTIAL_DEPOSIT), + fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }, Parent.into(), diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index a8348b935e..83260fe7d7 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -823,7 +823,7 @@ impl_runtime_apis! { // Relay/native token can be teleported between BH and Relay. Some(( MultiAsset { - fun: Fungible(EXISTENTIAL_DEPOSIT), + fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }, Parent.into(), diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 062e4cd063..798446655a 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -983,7 +983,7 @@ impl_runtime_apis! { // Relay/native token can be teleported between Collectives and Relay. Some(( MultiAsset { - fun: Fungible(EXISTENTIAL_DEPOSIT), + fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }.into(), Parent.into(), diff --git a/system-parachains/constants/Cargo.toml b/system-parachains/constants/Cargo.toml index d8c079192c..a414dd6126 100644 --- a/system-parachains/constants/Cargo.toml +++ b/system-parachains/constants/Cargo.toml @@ -8,7 +8,7 @@ edition.workspace = true license.workspace = true [dependencies] -smallvec = "1.11.2" +smallvec = "1.13.1" frame-support = { default-features = false , version = "27.0.0" } kusama-runtime-constants = { path = "../../relay/kusama/constants", default-features = false} diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml index 279f0f53c9..37f7abb7a1 100644 --- a/system-parachains/encointer/Cargo.toml +++ b/system-parachains/encointer/Cargo.toml @@ -17,6 +17,7 @@ log = { version = "0.4.20", default-features = false } scale-info = { version = "2.10.0", default-features = false, features = [ "derive", ] } +smallvec = "1.13.1" # encointer deps encointer-balances-tx-payment = { default-features = false, version = "3.0.2" } @@ -88,10 +89,13 @@ cumulus-primitives-timestamp = { default-features = false, version = "0.4.0" } cumulus-primitives-utility = { default-features = false, version = "0.4.0" } parachain-info = { package = "staging-parachain-info", default-features = false, version = "0.4.0" } parachains-common = { default-features = false, version = "4.0.0" } -system-parachains-constants = { path = "../constants", default-features = false } - -# Used for runtime benchmarking +# TODO:(PR#137) - Encointer pallets do not have compatible `polkadot-sdk` versions with the rest, +# so we need to copy all the stuff from `system-parachains-constants`. +# system-parachains-constants = { path = "../constants", default-features = false } +polkadot-core-primitives = { default-features = false, version = "4.0.0"} +polkadot-primitives = { default-features = false , version = "4.0.0" } +kusama-runtime-constants = { path = "../../relay/kusama/constants", default-features = false} [build-dependencies] substrate-wasm-builder = { optional = true, version = "14.0.0" } @@ -148,6 +152,7 @@ std = [ "frame-system-rpc-runtime-api/std", "frame-system/std", "frame-try-runtime/std", + "kusama-runtime-constants/std", "log/std", "pallet-asset-tx-payment/std", "pallet-aura/std", @@ -174,6 +179,8 @@ std = [ "pallet-xcm/std", "parachain-info/std", "parachains-common/std", + "polkadot-core-primitives/std", + "polkadot-primitives/std", "scale-info/std", "sp-api/std", "sp-block-builder/std", @@ -187,6 +194,7 @@ std = [ "sp-std/std", "sp-transaction-pool/std", "sp-version/std", +# "system-parachains-constants/std", "substrate-wasm-builder", "xcm-builder/std", "xcm-executor/std", diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 36a7f58ede..9ae98817c8 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -93,6 +93,7 @@ use sp_version::RuntimeVersion; use system_parachains_constants::{ kusama::{consensus::*, currency::*, fee::WeightToFee}, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, + SLOT_DURATION, }; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::{ @@ -105,22 +106,6 @@ use xcm_executor::XcmExecutor; /// A type to hold UTC unix epoch [ms] pub type Moment = u64; -pub const ONE_DAY: Moment = 86_400_000; - -/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included -/// into the relay chain. -const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1; -/// How many parachain blocks are processed by the relay chain per parent. Limits the -/// number of blocks authored per slot. -const BLOCK_PROCESSING_VELOCITY: u32 = 1; -/// This determines the average expected block time that we are targeting. -/// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`. -/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked -/// up by `pallet_aura` to implement `fn slot_duration()`. -/// -/// Change this to adjust the block time. -pub const MILLISECS_PER_BLOCK: u64 = 12000; -pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; pub type AssetId = AssetIdOf; pub type AssetBalance = AssetBalanceOf; @@ -1024,3 +1009,151 @@ fn test_ed_is_one_tenth_of_relay() { let encointer_ed = ExistentialDeposit::get(); assert_eq!(relay_ed / 10, encointer_ed); } + +// TODO:(PR#137) - encointer pallets does not have compatible `polkadot-sdk` versions, +// so we cannot easily reuse `system-parachains-constants` module. +mod system_parachains_constants { + use super::*; + use frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND; + + /// This determines the average expected block time that we are targeting. Blocks will be + /// produced at a minimum duration defined by `SLOT_DURATION`. `SLOT_DURATION` is picked up by + /// `pallet_timestamp` which is in turn picked up by `pallet_aura` to implement `fn + /// slot_duration()`. + /// + /// Change this to adjust the block time. + pub const MILLISECS_PER_BLOCK: u64 = 12000; + pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; + + // Time is measured by number of blocks. + pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); + pub const HOURS: BlockNumber = MINUTES * 60; + pub const DAYS: BlockNumber = HOURS * 24; + + /// We assume that ~5% of the block weight is consumed by `on_initialize` handlers. This is + /// used to limit the maximal weight of a single extrinsic. + pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(5); + /// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used by + /// Operational extrinsics. + pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); + + /// We allow for 0.5 seconds of compute with a 6 second average block time. + pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts( + WEIGHT_REF_TIME_PER_SECOND.saturating_div(2), + polkadot_primitives::MAX_POV_SIZE as u64, + ); + + pub(crate) mod kusama { + /// Consensus-related. + pub mod consensus { + /// Maximum number of blocks simultaneously accepted by the Runtime, not yet included + /// into the relay chain. + pub const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1; + /// How many parachain blocks are processed by the relay chain per parent. Limits the + /// number of blocks authored per slot. + pub const BLOCK_PROCESSING_VELOCITY: u32 = 1; + /// Relay chain slot duration, in milliseconds. + pub const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000; + } + + /// Constants relating to KSM. + pub mod currency { + use polkadot_core_primitives::Balance; + + /// The default existential deposit for system chains. 1/10th of the Relay Chain's + /// existential deposit. Individual system parachains may modify this in special cases. + pub const SYSTEM_PARA_EXISTENTIAL_DEPOSIT: Balance = + kusama_runtime_constants::currency::EXISTENTIAL_DEPOSIT / 10; + + /// One "KSM" that a UI would show a user. + pub const UNITS: Balance = 1_000_000_000_000; + pub const QUID: Balance = UNITS / 30; + pub const CENTS: Balance = QUID / 100; + pub const MILLICENTS: Balance = CENTS / 1_000; + + /// Deposit rate for stored data. 1/100th of the Relay Chain's deposit rate. `items` is + /// the number of keys in storage and `bytes` is the size of the value. + pub const fn system_para_deposit(items: u32, bytes: u32) -> Balance { + kusama_runtime_constants::currency::deposit(items, bytes) / 100 + } + } + + /// Constants related to Kusama fee payment. + pub mod fee { + use frame_support::{ + pallet_prelude::Weight, + weights::{ + constants::ExtrinsicBaseWeight, FeePolynomial, WeightToFeeCoefficient, + WeightToFeeCoefficients, WeightToFeePolynomial, + }, + }; + use polkadot_core_primitives::Balance; + use smallvec::smallvec; + pub use sp_runtime::Perbill; + + /// Handles converting a weight scalar to a fee value, based on the scale and + /// granularity of the node's balance type. + /// + /// This should typically create a mapping between the following ranges: + /// - [0, MAXIMUM_BLOCK_WEIGHT] + /// - [Balance::min, Balance::max] + /// + /// Yet, it can be used for any other sort of change to weight-fee. Some examples being: + /// - Setting it to `0` will essentially disable the weight fee. + /// - Setting it to `1` will cause the literal `#[weight = x]` values to be charged. + pub struct WeightToFee; + + impl frame_support::weights::WeightToFee for WeightToFee { + type Balance = Balance; + + fn weight_to_fee(weight: &Weight) -> Self::Balance { + let time_poly: FeePolynomial = RefTimeToFee::polynomial().into(); + let proof_poly: FeePolynomial = ProofSizeToFee::polynomial().into(); + + // Take the maximum instead of the sum to charge by the more scarce resource. + time_poly.eval(weight.ref_time()).max(proof_poly.eval(weight.proof_size())) + } + } + + /// Maps the reference time component of `Weight` to a fee. + pub struct RefTimeToFee; + + impl WeightToFeePolynomial for RefTimeToFee { + type Balance = Balance; + fn polynomial() -> WeightToFeeCoefficients { + // In Kusama, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 + // CENT: The standard system parachain configuration is 1/10 of that, as in + // 1/100 CENT. + let p = super::currency::CENTS; + let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); + + smallvec![WeightToFeeCoefficient { + degree: 1, + negative: false, + coeff_frac: Perbill::from_rational(p % q, q), + coeff_integer: p / q, + }] + } + } + + /// Maps the proof size component of `Weight` to a fee. + pub struct ProofSizeToFee; + + impl WeightToFeePolynomial for ProofSizeToFee { + type Balance = Balance; + fn polynomial() -> WeightToFeeCoefficients { + // Map 10kb proof to 1 CENT. + let p = super::currency::CENTS; + let q = 10_000; + + smallvec![WeightToFeeCoefficient { + degree: 1, + negative: false, + coeff_frac: Perbill::from_rational(p % q, q), + coeff_integer: p / q, + }] + } + } + } + } +} From d1055fbf12388083c26f2cefe20d285b349c57c1 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 26 Jan 2024 10:56:45 +0100 Subject: [PATCH 036/316] WIP: test final version of pallet-nomination-pools migration fix: https://github.com/paritytech/polkadot-sdk/pull/2942 --- relay/kusama/src/lib.rs | 173 +++++++++++++++++++++++++++++-------- relay/polkadot/src/lib.rs | 177 ++++++++++++++++++++++++++++++-------- 2 files changed, 276 insertions(+), 74 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 3048eef3a7..993f408d7e 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1683,9 +1683,6 @@ pub mod migrations { /// Unreleased migrations. Add new ones here: pub type Unreleased = ( - pallet_staking::migrations::v14::MigrateToV14, - parachains_configuration::migration::v10::MigrateToV10, - pallet_grandpa::migrations::MigrateV4ToV5, pallet_nomination_pools::migration::versioned::V5toV6, // TODO:(PR#137) - replace with fixed/released version crate::test_oliverfix_migration::V6ToV7, @@ -1693,6 +1690,9 @@ pub mod migrations { // TODO:(PR#137) - replace with fixed/released version crate::test_oliverfix_migration::V7ToV8, // pallet_nomination_pools::migration::versioned::V7ToV8, + pallet_staking::migrations::v14::MigrateToV14, + parachains_configuration::migration::v10::MigrateToV10, + pallet_grandpa::migrations::MigrateV4ToV5, ); } @@ -2812,11 +2812,9 @@ mod test_oliverfix_migration { >; pub mod v8 { - use super::*; - - use super::v7::BondedPoolInner as OldBondedPoolInner; + use super::{v7::V7BondedPoolInner, *}; - impl OldBondedPoolInner { + impl V7BondedPoolInner { fn migrate_to_v8(self) -> BondedPoolInner { BondedPoolInner { commission: Commission { @@ -2836,7 +2834,6 @@ mod test_oliverfix_migration { } pub struct VersionUncheckedMigrateV7ToV8(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for VersionUncheckedMigrateV7ToV8 { #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { @@ -2845,7 +2842,7 @@ mod test_oliverfix_migration { fn on_runtime_upgrade() -> Weight { let mut translated = 0u64; - BondedPools::::translate::, _>(|_key, old_value| { + BondedPools::::translate::, _>(|_key, old_value| { translated.saturating_inc(); Some(old_value.migrate_to_v8()) }); @@ -2860,21 +2857,30 @@ mod test_oliverfix_migration { .all(|(_, inner)| inner.commission.claim_permission.is_none()), "`claim_permission` value has not been set correctly." ); + use frame_support::traits::GetStorageVersion; + frame_support::ensure!( + Pallet::::on_chain_storage_version() >= 8, + "nomination-pools::migration::v8: wrong storage version" + ); Ok(()) } } } - mod v7 { + /// This migration accumulates and initializes the [`TotalValueLocked`] for all pools. + /// + /// WARNING: This migration works under the assumption that the [`BondedPools`] cannot be + /// inflated arbitrarily. Otherwise this migration could fail due to too high weight. + pub(crate) mod v7 { use super::*; - - use sp_staking::StakingInterface; - // use frame_support::traits::GetStorageVersion; + use frame_support::{BoundedBTreeMap, DefaultNoBound}; + use sp_runtime::traits::{Convert, Zero}; + use sp_staking::EraIndex; #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] #[codec(mel_bound(T: Config))] #[scale_info(skip_type_params(T))] - pub struct Commission { + pub struct V7Commission { pub current: Option<(Perbill, T::AccountId)>, pub max: Option, pub change_rate: Option>>, @@ -2884,40 +2890,49 @@ mod test_oliverfix_migration { #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] #[codec(mel_bound(T: Config))] #[scale_info(skip_type_params(T))] - pub struct BondedPoolInner { - pub commission: Commission, + pub struct V7BondedPoolInner { + pub commission: V7Commission, pub member_counter: u32, pub points: BalanceOf, pub roles: PoolRoles, pub state: PoolState, } + #[allow(dead_code)] #[derive(RuntimeDebugNoBound)] #[cfg_attr(feature = "std", derive(Clone, PartialEq))] - pub struct BondedPool { + pub struct V7BondedPool { /// The identifier of the pool. id: PoolId, /// The inner fields. - inner: BondedPoolInner, + inner: V7BondedPoolInner, } - impl BondedPool { + impl V7BondedPool { fn bonded_account(&self) -> T::AccountId { Pallet::::create_bonded_account(self.id) } + fn points_to_balance(&self, points: BalanceOf) -> BalanceOf { + use sp_staking::StakingInterface; + let bonded_balance = + T::Staking::active_stake(&self.bonded_account()).unwrap_or(Zero::zero()); + point_to_balance::(bonded_balance, self.inner.points, points) + } } + // NOTE: We cannot put a V7 prefix here since that would change the storage key. #[frame_support::storage_alias] pub type BondedPools = - CountedStorageMap, Twox64Concat, PoolId, BondedPoolInner>; + CountedStorageMap, Twox64Concat, PoolId, V7BondedPoolInner>; pub struct VersionUncheckedMigrateV6ToV7(sp_std::marker::PhantomData); impl VersionUncheckedMigrateV6ToV7 { fn calculate_tvl_by_total_stake() -> BalanceOf { + use sp_staking::StakingInterface; BondedPools::::iter() .map(|(id, inner)| { T::Staking::total_stake( - &BondedPool { id, inner: inner.clone() }.bonded_account(), + &V7BondedPool { id, inner: inner.clone() }.bonded_account(), ) .unwrap_or_default() }) @@ -2960,26 +2975,112 @@ mod test_oliverfix_migration { "TVL written is not equal to `Staking::total_stake` of all `BondedPools`." ); - // TODO: skip for now // calculate the sum of `total_balance` of all `PoolMember` as the upper bound for // the `TotalValueLocked`. - // let total_balance_members: BalanceOf = PoolMembers::::iter() - // .map(|(_, member)| member.total_balance()) - // .reduce(|acc, total_balance| acc + total_balance) - // .unwrap_or_default(); - // - // frame_support::ensure!( - // TotalValueLocked::::get() <= total_balance_members, - // "TVL is greater than the balance of all PoolMembers." - // ); - // - // frame_support::ensure!( - // Pallet::::on_chain_storage_version() >= 7, - // "nomination-pools::migration::v7: wrong storage version" - // ); + let total_balance_members: BalanceOf = PoolMembers::::iter() + .map(|(_, member)| total_balance(&member)) + .reduce(|acc, total_balance| acc + total_balance) + .unwrap_or_default(); + + frame_support::ensure!( + TotalValueLocked::::get() <= total_balance_members, + "TVL is greater than the balance of all PoolMembers." + ); + + use frame_support::traits::GetStorageVersion; + frame_support::ensure!( + Pallet::::on_chain_storage_version() >= 7, + "nomination-pools::migration::v7: wrong storage version" + ); Ok(()) } } + + #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, RuntimeDebugNoBound)] + #[cfg_attr(feature = "std", derive(Clone, PartialEq, Eq))] + #[codec(mel_bound(T: Config))] + #[scale_info(skip_type_params(T))] + pub struct UnbondPool { + /// The points in this pool. + points: BalanceOf, + /// The funds in the pool. + balance: BalanceOf, + } + + impl UnbondPool { + fn point_to_balance(&self, points: BalanceOf) -> BalanceOf { + point_to_balance::(self.balance, self.points, points) + } + } + + #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, RuntimeDebugNoBound)] + #[cfg_attr(feature = "std", derive(Clone, PartialEq))] + #[codec(mel_bound(T: Config))] + #[scale_info(skip_type_params(T))] + pub struct SubPools { + /// A general, era agnostic pool of funds that have fully unbonded. The pools + /// of `Self::with_era` will lazily be merged into into this pool if they are + /// older then `current_era - TotalUnbondingPools`. + no_era: UnbondPool, + /// Map of era in which a pool becomes unbonded in => unbond pools. + with_era: BoundedBTreeMap, TotalUnbondingPools>, + } + + #[frame_support::storage_alias] + pub type SubPoolsStorage = + CountedStorageMap, Twox64Concat, PoolId, SubPools>; + + // TODO:(PR#137) - hacky copy of pallet-nomination-pools, because lots of this stuff is + // private there. + fn total_balance(self_as_member: &PoolMember) -> BalanceOf { + // let pool = V7BondedPool::::get(self_as_member.pool_id).unwrap(); + let id = self_as_member.pool_id; + let pool = BondedPools::::try_get(id) + .ok() + .map(|inner| V7BondedPool { id, inner }) + .unwrap(); + let active_balance = pool.points_to_balance(self_as_member.points); + + let sub_pools = match SubPoolsStorage::::get(self_as_member.pool_id) { + Some(sub_pools) => sub_pools, + None => return active_balance, + }; + + let unbonding_balance = self_as_member.unbonding_eras.iter().fold( + BalanceOf::::zero(), + |accumulator, (era, unlocked_points)| { + // if the `SubPools::with_era` has already been merged into the + // `SubPools::no_era` use this pool instead. + let era_pool = sub_pools.with_era.get(era).unwrap_or(&sub_pools.no_era); + accumulator + (era_pool.point_to_balance(*unlocked_points)) + }, + ); + + active_balance + unbonding_balance + } + + fn point_to_balance( + current_balance: BalanceOf, + current_points: BalanceOf, + points: BalanceOf, + ) -> BalanceOf { + let u256 = T::BalanceToU256::convert; + let balance = T::U256ToBalance::convert; + if current_balance.is_zero() || current_points.is_zero() || points.is_zero() { + // There is nothing to unbond + return Zero::zero() + } + + use sp_std::ops::Div; + + // Equivalent of (current_balance / current_points) * points + balance( + u256(current_balance) + .saturating_mul(u256(points)) + // We check for zero above + .div(u256(current_points)), + ) + } } } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 207163cc2f..8a01430ae8 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1704,9 +1704,6 @@ pub mod migrations { pub type Unreleased = ( // Upgrade SessionKeys to include BEEFY key UpgradeSessionKeys, - pallet_staking::migrations::v14::MigrateToV14, - parachains_configuration::migration::v10::MigrateToV10, - pallet_grandpa::migrations::MigrateV4ToV5, pallet_nomination_pools::migration::versioned::V5toV6, // TODO:(PR#137) - replace with fixed/released version crate::test_oliverfix_migration::V6ToV7, @@ -1714,6 +1711,9 @@ pub mod migrations { // TODO:(PR#137) - replace with fixed/released version crate::test_oliverfix_migration::V7ToV8, // pallet_nomination_pools::migration::versioned::V7ToV8, + pallet_staking::migrations::v14::MigrateToV14, + parachains_configuration::migration::v10::MigrateToV10, + pallet_grandpa::migrations::MigrateV4ToV5, ); } @@ -2955,7 +2955,8 @@ mod remote_tests { mod test_oliverfix_migration { use super::*; use frame_support::{ - traits::OnRuntimeUpgrade, DebugNoBound, RuntimeDebugNoBound, Twox64Concat, + pallet_prelude::TypeInfo, traits::OnRuntimeUpgrade, DebugNoBound, RuntimeDebugNoBound, + Twox64Concat, }; use frame_system::pallet_prelude::BlockNumberFor; use pallet_nomination_pools::*; @@ -2978,11 +2979,9 @@ mod test_oliverfix_migration { >; pub mod v8 { - use super::*; - - use super::v7::BondedPoolInner as OldBondedPoolInner; + use super::{v7::V7BondedPoolInner, *}; - impl OldBondedPoolInner { + impl V7BondedPoolInner { fn migrate_to_v8(self) -> BondedPoolInner { BondedPoolInner { commission: Commission { @@ -3002,7 +3001,6 @@ mod test_oliverfix_migration { } pub struct VersionUncheckedMigrateV7ToV8(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for VersionUncheckedMigrateV7ToV8 { #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { @@ -3011,7 +3009,7 @@ mod test_oliverfix_migration { fn on_runtime_upgrade() -> Weight { let mut translated = 0u64; - BondedPools::::translate::, _>(|_key, old_value| { + BondedPools::::translate::, _>(|_key, old_value| { translated.saturating_inc(); Some(old_value.migrate_to_v8()) }); @@ -3026,22 +3024,30 @@ mod test_oliverfix_migration { .all(|(_, inner)| inner.commission.claim_permission.is_none()), "`claim_permission` value has not been set correctly." ); + use frame_support::traits::GetStorageVersion; + frame_support::ensure!( + Pallet::::on_chain_storage_version() >= 8, + "nomination-pools::migration::v8: wrong storage version" + ); Ok(()) } } } - mod v7 { + /// This migration accumulates and initializes the [`TotalValueLocked`] for all pools. + /// + /// WARNING: This migration works under the assumption that the [`BondedPools`] cannot be + /// inflated arbitrarily. Otherwise this migration could fail due to too high weight. + pub(crate) mod v7 { use super::*; - - use scale_info::TypeInfo; - use sp_staking::StakingInterface; - // use frame_support::traits::GetStorageVersion; + use frame_support::{BoundedBTreeMap, DefaultNoBound}; + use sp_runtime::traits::{Convert, Zero}; + use sp_staking::EraIndex; #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] #[codec(mel_bound(T: Config))] #[scale_info(skip_type_params(T))] - pub struct Commission { + pub struct V7Commission { pub current: Option<(Perbill, T::AccountId)>, pub max: Option, pub change_rate: Option>>, @@ -3051,40 +3057,49 @@ mod test_oliverfix_migration { #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] #[codec(mel_bound(T: Config))] #[scale_info(skip_type_params(T))] - pub struct BondedPoolInner { - pub commission: Commission, + pub struct V7BondedPoolInner { + pub commission: V7Commission, pub member_counter: u32, pub points: BalanceOf, pub roles: PoolRoles, pub state: PoolState, } + #[allow(dead_code)] #[derive(RuntimeDebugNoBound)] #[cfg_attr(feature = "std", derive(Clone, PartialEq))] - pub struct BondedPool { + pub struct V7BondedPool { /// The identifier of the pool. id: PoolId, /// The inner fields. - inner: BondedPoolInner, + inner: V7BondedPoolInner, } - impl BondedPool { + impl V7BondedPool { fn bonded_account(&self) -> T::AccountId { Pallet::::create_bonded_account(self.id) } + fn points_to_balance(&self, points: BalanceOf) -> BalanceOf { + use sp_staking::StakingInterface; + let bonded_balance = + T::Staking::active_stake(&self.bonded_account()).unwrap_or(Zero::zero()); + point_to_balance::(bonded_balance, self.inner.points, points) + } } + // NOTE: We cannot put a V7 prefix here since that would change the storage key. #[frame_support::storage_alias] pub type BondedPools = - CountedStorageMap, Twox64Concat, PoolId, BondedPoolInner>; + CountedStorageMap, Twox64Concat, PoolId, V7BondedPoolInner>; pub struct VersionUncheckedMigrateV6ToV7(sp_std::marker::PhantomData); impl VersionUncheckedMigrateV6ToV7 { fn calculate_tvl_by_total_stake() -> BalanceOf { + use sp_staking::StakingInterface; BondedPools::::iter() .map(|(id, inner)| { T::Staking::total_stake( - &BondedPool { id, inner: inner.clone() }.bonded_account(), + &V7BondedPool { id, inner: inner.clone() }.bonded_account(), ) .unwrap_or_default() }) @@ -3127,26 +3142,112 @@ mod test_oliverfix_migration { "TVL written is not equal to `Staking::total_stake` of all `BondedPools`." ); - // TODO: skip for now // calculate the sum of `total_balance` of all `PoolMember` as the upper bound for // the `TotalValueLocked`. - // let total_balance_members: BalanceOf = PoolMembers::::iter() - // .map(|(_, member)| member.total_balance()) - // .reduce(|acc, total_balance| acc + total_balance) - // .unwrap_or_default(); - // - // frame_support::ensure!( - // TotalValueLocked::::get() <= total_balance_members, - // "TVL is greater than the balance of all PoolMembers." - // ); - // - // frame_support::ensure!( - // Pallet::::on_chain_storage_version() >= 7, - // "nomination-pools::migration::v7: wrong storage version" - // ); + let total_balance_members: BalanceOf = PoolMembers::::iter() + .map(|(_, member)| total_balance(&member)) + .reduce(|acc, total_balance| acc + total_balance) + .unwrap_or_default(); + + frame_support::ensure!( + TotalValueLocked::::get() <= total_balance_members, + "TVL is greater than the balance of all PoolMembers." + ); + + use frame_support::traits::GetStorageVersion; + frame_support::ensure!( + Pallet::::on_chain_storage_version() >= 7, + "nomination-pools::migration::v7: wrong storage version" + ); Ok(()) } } + + #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, RuntimeDebugNoBound)] + #[cfg_attr(feature = "std", derive(Clone, PartialEq, Eq))] + #[codec(mel_bound(T: Config))] + #[scale_info(skip_type_params(T))] + pub struct UnbondPool { + /// The points in this pool. + points: BalanceOf, + /// The funds in the pool. + balance: BalanceOf, + } + + impl UnbondPool { + fn point_to_balance(&self, points: BalanceOf) -> BalanceOf { + point_to_balance::(self.balance, self.points, points) + } + } + + #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, RuntimeDebugNoBound)] + #[cfg_attr(feature = "std", derive(Clone, PartialEq))] + #[codec(mel_bound(T: Config))] + #[scale_info(skip_type_params(T))] + pub struct SubPools { + /// A general, era agnostic pool of funds that have fully unbonded. The pools + /// of `Self::with_era` will lazily be merged into into this pool if they are + /// older then `current_era - TotalUnbondingPools`. + no_era: UnbondPool, + /// Map of era in which a pool becomes unbonded in => unbond pools. + with_era: BoundedBTreeMap, TotalUnbondingPools>, + } + + #[frame_support::storage_alias] + pub type SubPoolsStorage = + CountedStorageMap, Twox64Concat, PoolId, SubPools>; + + // TODO:(PR#137) - hacky copy of pallet-nomination-pools, because lots of this stuff is + // private there. + fn total_balance(self_as_member: &PoolMember) -> BalanceOf { + // let pool = V7BondedPool::::get(self_as_member.pool_id).unwrap(); + let id = self_as_member.pool_id; + let pool = BondedPools::::try_get(id) + .ok() + .map(|inner| V7BondedPool { id, inner }) + .unwrap(); + let active_balance = pool.points_to_balance(self_as_member.points); + + let sub_pools = match SubPoolsStorage::::get(self_as_member.pool_id) { + Some(sub_pools) => sub_pools, + None => return active_balance, + }; + + let unbonding_balance = self_as_member.unbonding_eras.iter().fold( + BalanceOf::::zero(), + |accumulator, (era, unlocked_points)| { + // if the `SubPools::with_era` has already been merged into the + // `SubPools::no_era` use this pool instead. + let era_pool = sub_pools.with_era.get(era).unwrap_or(&sub_pools.no_era); + accumulator + (era_pool.point_to_balance(*unlocked_points)) + }, + ); + + active_balance + unbonding_balance + } + + fn point_to_balance( + current_balance: BalanceOf, + current_points: BalanceOf, + points: BalanceOf, + ) -> BalanceOf { + let u256 = T::BalanceToU256::convert; + let balance = T::U256ToBalance::convert; + if current_balance.is_zero() || current_points.is_zero() || points.is_zero() { + // There is nothing to unbond + return Zero::zero() + } + + use sp_std::ops::Div; + + // Equivalent of (current_balance / current_points) * points + balance( + u256(current_balance) + .saturating_mul(u256(points)) + // We check for zero above + .div(u256(current_points)), + ) + } } } From 85a3b8defaae93e3730f90fef3ecf38452c15a73 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 26 Jan 2024 13:56:10 +0100 Subject: [PATCH 037/316] Fix constants stuff for Encointer (not compatible deps) --- Cargo.lock | 1 + system-parachains/constants/src/kusama.rs | 4 ++ system-parachains/encointer/Cargo.toml | 13 ++-- system-parachains/encointer/src/lib.rs | 88 ++++++++++++++++++++++- 4 files changed, 99 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 19a9f51be9..f0c941c537 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3391,6 +3391,7 @@ dependencies = [ "staging-xcm-builder 4.0.0", "staging-xcm-executor 4.0.0", "substrate-wasm-builder 14.0.0", + "system-parachains-constants", ] [[package]] diff --git a/system-parachains/constants/src/kusama.rs b/system-parachains/constants/src/kusama.rs index 04ecbf3e20..428059794b 100644 --- a/system-parachains/constants/src/kusama.rs +++ b/system-parachains/constants/src/kusama.rs @@ -123,4 +123,8 @@ pub mod fee { }] } } + + pub fn calculate_weight_to_fee(weight: &Weight) -> Balance { + ::weight_to_fee(weight) + } } diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml index 37f7abb7a1..a69f016bb3 100644 --- a/system-parachains/encointer/Cargo.toml +++ b/system-parachains/encointer/Cargo.toml @@ -90,18 +90,19 @@ cumulus-primitives-utility = { default-features = false, version = "0.4.0" } parachain-info = { package = "staging-parachain-info", default-features = false, version = "0.4.0" } parachains-common = { default-features = false, version = "4.0.0" } -# TODO:(PR#137) - Encointer pallets do not have compatible `polkadot-sdk` versions with the rest, -# so we need to copy all the stuff from `system-parachains-constants`. -# system-parachains-constants = { path = "../constants", default-features = false } +# TODO: Encointer pallets does not have compatible `polkadot-sdk` versions, +# so we need to copy all the stuff from `system-parachains-constants` and `kusama-runtime-constants`. +#system-parachains-constants = { path = "../constants", default-features = false } +#kusama-runtime-constants = { path = "../../relay/kusama/constants", default-features = false} polkadot-core-primitives = { default-features = false, version = "4.0.0"} polkadot-primitives = { default-features = false , version = "4.0.0" } -kusama-runtime-constants = { path = "../../relay/kusama/constants", default-features = false} [build-dependencies] substrate-wasm-builder = { optional = true, version = "14.0.0" } [dev-dependencies] -kusama-runtime-constants = { path = "../../relay/kusama/constants", default-features = false} +system-parachains-constants = { path = "../constants" } +kusama-runtime-constants = { path = "../../relay/kusama/constants" } [features] default = ["std"] @@ -152,7 +153,7 @@ std = [ "frame-system-rpc-runtime-api/std", "frame-system/std", "frame-try-runtime/std", - "kusama-runtime-constants/std", +# "kusama-runtime-constants/std", "log/std", "pallet-asset-tx-payment/std", "pallet-aura/std", diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 9ae98817c8..4fefc006cd 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -1010,7 +1010,66 @@ fn test_ed_is_one_tenth_of_relay() { assert_eq!(relay_ed / 10, encointer_ed); } -// TODO:(PR#137) - encointer pallets does not have compatible `polkadot-sdk` versions, +#[test] +fn test_constants_compatiblity() { + assert_eq!( + ::kusama_runtime_constants::currency::EXISTENTIAL_DEPOSIT, + system_parachains_constants::kusama_runtime_constants::currency::EXISTENTIAL_DEPOSIT + ); + assert_eq!( + ::kusama_runtime_constants::currency::deposit(5, 3), + system_parachains_constants::kusama_runtime_constants::currency::deposit(5, 3) + ); + assert_eq!( + ::system_parachains_constants::AVERAGE_ON_INITIALIZE_RATIO * 1u32, + system_parachains_constants::AVERAGE_ON_INITIALIZE_RATIO * 1u32 + ); + assert_eq!( + ::system_parachains_constants::NORMAL_DISPATCH_RATIO * 1u32, + system_parachains_constants::NORMAL_DISPATCH_RATIO * 1u32 + ); + assert_eq!( + ::system_parachains_constants::MAXIMUM_BLOCK_WEIGHT.encode(), + system_parachains_constants::MAXIMUM_BLOCK_WEIGHT.encode() + ); + assert_eq!(::system_parachains_constants::MINUTES, system_parachains_constants::MINUTES); + assert_eq!(::system_parachains_constants::HOURS, system_parachains_constants::HOURS); + assert_eq!(::system_parachains_constants::DAYS, system_parachains_constants::DAYS); + assert_eq!( + ::system_parachains_constants::kusama::currency::SYSTEM_PARA_EXISTENTIAL_DEPOSIT, + system_parachains_constants::kusama::currency::SYSTEM_PARA_EXISTENTIAL_DEPOSIT + ); + assert_eq!( + ::system_parachains_constants::kusama::currency::UNITS, + system_parachains_constants::kusama::currency::UNITS + ); + assert_eq!( + ::system_parachains_constants::kusama::currency::QUID, + system_parachains_constants::kusama::currency::QUID + ); + assert_eq!( + ::system_parachains_constants::kusama::currency::CENTS, + system_parachains_constants::kusama::currency::CENTS + ); + assert_eq!( + ::system_parachains_constants::kusama::currency::MILLICENTS, + system_parachains_constants::kusama::currency::MILLICENTS + ); + assert_eq!( + ::system_parachains_constants::kusama::currency::system_para_deposit(5, 3), + system_parachains_constants::kusama::currency::system_para_deposit(5, 3) + ); + assert_eq!( + ::system_parachains_constants::kusama::fee::calculate_weight_to_fee( + &::system_parachains_constants::MAXIMUM_BLOCK_WEIGHT + ), + system_parachains_constants::kusama::fee::calculate_weight_to_fee( + &system_parachains_constants::MAXIMUM_BLOCK_WEIGHT + ) + ); +} + +// TODO: Encointer pallets does not have compatible `polkadot-sdk` versions, // so we cannot easily reuse `system-parachains-constants` module. mod system_parachains_constants { use super::*; @@ -1058,6 +1117,7 @@ mod system_parachains_constants { /// Constants relating to KSM. pub mod currency { + use super::super::kusama_runtime_constants; use polkadot_core_primitives::Balance; /// The default existential deposit for system chains. 1/10th of the Relay Chain's @@ -1154,6 +1214,32 @@ mod system_parachains_constants { }] } } + + #[cfg(test)] + pub fn calculate_weight_to_fee(weight: &Weight) -> Balance { + ::weight_to_fee(weight) + } + } + } + + // TODO: Encointer pallets does not have compatible `polkadot-sdk` versions, + // so we cannot easily reuse `kusama-runtime-constants` module. + pub(crate) mod kusama_runtime_constants { + /// Money matters. + pub mod currency { + use polkadot_primitives::Balance; + + /// The existential deposit. + pub const EXISTENTIAL_DEPOSIT: Balance = 1 * CENTS; + + pub const UNITS: Balance = 1_000_000_000_000; + pub const QUID: Balance = UNITS / 30; + pub const CENTS: Balance = QUID / 100; + pub const MILLICENTS: Balance = CENTS / 1_000; + + pub const fn deposit(items: u32, bytes: u32) -> Balance { + items as Balance * 2_000 * CENTS + (bytes as Balance) * 100 * MILLICENTS + } } } } From 0a77426187b19670468188de8aab176a41f3be45 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 29 Jan 2024 16:38:51 +0100 Subject: [PATCH 038/316] Set the correct EDs of SPs for inegration-tests and chain-spec-builder --- Cargo.lock | 2 ++ chain-spec-generator/src/system_parachains_specs.rs | 13 +++++++------ .../emulated/assets/asset-hub-kusama/Cargo.toml | 1 + .../assets/asset-hub-kusama/src/tests/mod.rs | 2 +- .../assets/asset-hub-kusama/src/tests/swap.rs | 3 +-- .../emulated/assets/asset-hub-polkadot/Cargo.toml | 1 + .../assets/asset-hub-polkadot/src/tests/mod.rs | 2 +- integration-tests/emulated/chains/src/genesis.rs | 10 +++++----- 8 files changed, 19 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9ac1d230a3..1bae12a5fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -436,6 +436,7 @@ dependencies = [ "staging-kusama-runtime", "staging-xcm 6.0.0", "staging-xcm-executor 6.0.0", + "system-parachains-constants", "xcm-emulator", ] @@ -541,6 +542,7 @@ dependencies = [ "sp-runtime 30.0.1", "staging-xcm 6.0.0", "staging-xcm-executor 6.0.0", + "system-parachains-constants", "xcm-emulator", ] diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index c3f5ee38fd..662ba3bbc7 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -21,6 +21,7 @@ use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId, Balance}; use sc_chain_spec::{ChainSpec, ChainSpecExtension, ChainSpecGroup, ChainType}; use serde::{Deserialize, Serialize}; use sp_core::sr25519; +use sp_runtime::traits::Get; /// Generic extensions for Parachain ChainSpecs. #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)] @@ -46,17 +47,17 @@ pub type GluttonKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions pub type EncointerKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; -const ASSET_HUB_POLKADOT_ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; +const ASSET_HUB_POLKADOT_ED: Balance = asset_hub_polkadot_runtime::ExistentialDeposit::get(); -const ASSET_HUB_KUSAMA_ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; +const ASSET_HUB_KUSAMA_ED: Balance = asset_hub_kusama_runtime::ExistentialDeposit::get(); -const COLLECTIVES_POLKADOT_ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; +const COLLECTIVES_POLKADOT_ED: Balance = collectives_polkadot_runtime::ExistentialDeposit::get(); -const BRIDGE_HUB_POLKADOT_ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; +const BRIDGE_HUB_POLKADOT_ED: Balance = bridge_hub_polkadot_runtime::ExistentialDeposit::get(); -const BRIDGE_HUB_KUSAMA_ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; +const BRIDGE_HUB_KUSAMA_ED: Balance = bridge_hub_kusama_runtime::ExistentialDeposit::get(); -const ENCOINTER_KUSAMA_ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; +const ENCOINTER_KUSAMA_ED: Balance = encointer_kusama_runtime::ExistentialDeposit::get(); /// The default XCM version to set in genesis config. const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; diff --git a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml index 8e88b5b843..792f3d8bc4 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml @@ -34,6 +34,7 @@ emulated-chains = { path = "../../chains" } integration-tests-common = { path = "../../common" } asset-hub-kusama-runtime = { path = "../../../../system-parachains/asset-hubs/asset-hub-kusama" } kusama-runtime = { package = "staging-kusama-runtime", path = "../../../../relay/kusama" } +system-parachains-constants = { path = "../../../../system-parachains/constants" } [features] runtime-benchmarks = [] \ No newline at end of file diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs index fa908d196c..c51ed79e71 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs @@ -24,5 +24,5 @@ integration_tests_common::include_penpal_create_foreign_asset_on_asset_hub!( PenpalKusamaA, AssetHubKusama, KUSAMA_ED, - parachains_common::kusama::fee::WeightToFee + system_parachains_constants::kusama::fee::WeightToFee ); diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs index e94352e5ee..02aa5259a2 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs @@ -15,7 +15,6 @@ use crate::*; use frame_support::BoundedVec; -use parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; use sp_runtime::ModuleError; #[test] @@ -102,7 +101,7 @@ fn swap_locally_on_chain_using_local_assets() { ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), asset_native, asset_one, - 1414213562273 - EXISTENTIAL_DEPOSIT * 2, // all but the 2 EDs can't be retrieved. + 1414213562273 - ASSET_HUB_KUSAMA_ED * 2, // all but the 2 EDs can't be retrieved. 0, 0, AssetHubKusamaSender::get().into(), diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml index 54656c75d0..ff2500dd6d 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml @@ -32,6 +32,7 @@ emulated-chains = { path = "../../chains" } integration-tests-common = { path = "../../common" } asset-hub-polkadot-runtime = { path = "../../../../system-parachains/asset-hubs/asset-hub-polkadot" } polkadot-runtime = { path = "../../../../relay/polkadot" } +system-parachains-constants = { path = "../../../../system-parachains/constants" } [features] runtime-benchmarks = [] \ No newline at end of file diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs index 5f8e0a9b63..2b1a263e01 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs @@ -23,5 +23,5 @@ integration_tests_common::include_penpal_create_foreign_asset_on_asset_hub!( PenpalPolkadotA, AssetHubPolkadot, POLKADOT_ED, - parachains_common::polkadot::fee::WeightToFee + system_parachains_constants::polkadot::fee::WeightToFee ); diff --git a/integration-tests/emulated/chains/src/genesis.rs b/integration-tests/emulated/chains/src/genesis.rs index 9e6eb1533b..76b1692605 100644 --- a/integration-tests/emulated/chains/src/genesis.rs +++ b/integration-tests/emulated/chains/src/genesis.rs @@ -337,7 +337,7 @@ pub mod kusama { pub mod asset_hub_polkadot { use super::*; pub const PARA_ID: u32 = 1000; - pub const ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; + pub const ED: Balance = asset_hub_polkadot_runtime::ExistentialDeposit::get(); pub fn genesis() -> Storage { let genesis_config = asset_hub_polkadot_runtime::RuntimeGenesisConfig { @@ -389,7 +389,7 @@ pub mod asset_hub_polkadot { pub mod asset_hub_kusama { use super::*; pub const PARA_ID: u32 = 1000; - pub const ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; + pub const ED: Balance = asset_hub_kusama_runtime::ExistentialDeposit::get(); pub fn genesis() -> Storage { let genesis_config = asset_hub_kusama_runtime::RuntimeGenesisConfig { @@ -441,7 +441,7 @@ pub mod asset_hub_kusama { pub mod bridge_hub_polkadot { use super::*; pub const PARA_ID: u32 = 1002; - pub const ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; + pub const ED: Balance = bridge_hub_polkadot_runtime::ExistentialDeposit::get(); pub fn genesis() -> Storage { let genesis_config = bridge_hub_polkadot_runtime::RuntimeGenesisConfig { @@ -493,7 +493,7 @@ pub mod bridge_hub_polkadot { pub mod bridge_hub_kusama { use super::*; pub const PARA_ID: u32 = 1002; - pub const ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; + pub const ED: Balance = bridge_hub_kusama_runtime::ExistentialDeposit::get(); pub fn genesis() -> Storage { let genesis_config = bridge_hub_kusama_runtime::RuntimeGenesisConfig { @@ -545,7 +545,7 @@ pub mod bridge_hub_kusama { pub mod collectives { use super::*; pub const PARA_ID: u32 = 1001; - pub const ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; + pub const ED: Balance = collectives_polkadot_runtime::ExistentialDeposit::get(); pub fn genesis() -> Storage { let genesis_config = collectives_polkadot_runtime::RuntimeGenesisConfig { From 01ce7072e430cc042b29a4420257285682a01b76 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 30 Jan 2024 10:23:56 +0100 Subject: [PATCH 039/316] Unneeded import --- chain-spec-generator/src/system_parachains_specs.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 662ba3bbc7..fe3659b5ba 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -21,7 +21,6 @@ use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId, Balance}; use sc_chain_spec::{ChainSpec, ChainSpecExtension, ChainSpecGroup, ChainType}; use serde::{Deserialize, Serialize}; use sp_core::sr25519; -use sp_runtime::traits::Get; /// Generic extensions for Parachain ChainSpecs. #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)] From 10883da16316ec1523bc2a9ca63f5bd6b086b369 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 2 Feb 2024 15:32:06 +0100 Subject: [PATCH 040/316] WIP: temporary disabled `TransactionalProcessor` - missing patch for xcm-emulator for 1.5.0 --- relay/kusama/src/xcm_config.rs | 12 +++++++----- relay/polkadot/src/xcm_config.rs | 14 ++++++++------ .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 10 ++++++---- .../asset-hub-polkadot/src/xcm_config.rs | 10 ++++++---- .../bridge-hub-kusama/src/xcm_config.rs | 13 ++++++++----- .../bridge-hub-polkadot/src/xcm_config.rs | 13 ++++++++----- .../collectives-polkadot/src/xcm_config.rs | 7 +++++-- system-parachains/encointer/src/xcm_config.rs | 13 ++++++++----- .../gluttons/glutton-kusama/src/xcm_config.rs | 7 +++++-- 9 files changed, 61 insertions(+), 38 deletions(-) diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index 845b82fbe8..4dc0b745b7 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -39,10 +39,11 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal, - DescribeFamily, FrameTransactionalProcessor, HashedDescription, IsChildSystemParachain, - IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, - UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + DescribeFamily, + /* TODO:(PR#137) - wait for xcm-executor patch FrameTransactionalProcessor, */ + HashedDescription, IsChildSystemParachain, IsConcrete, MintLocation, OriginToPluralityVoice, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::traits::WithOriginFilter; @@ -366,7 +367,8 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - type TransactionalProcessor = FrameTransactionalProcessor; + // TODO:(PR#137) - wait for xcm-executor patch + // type TransactionalProcessor = FrameTransactionalProcessor; } parameter_types! { diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index 05a90904c8..ee82ea3e84 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -44,11 +44,12 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal, - DescribeFamily, FrameTransactionalProcessor, HashedDescription, IsConcrete, MintLocation, - OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, - WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, - XcmFeeToAccount, + DescribeFamily, + /* TODO:(PR#137) - wait for xcm-executor patch FrameTransactionalProcessor, */ + HashedDescription, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, + UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::traits::WithOriginFilter; @@ -370,7 +371,8 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - type TransactionalProcessor = FrameTransactionalProcessor; + // TODO:(PR#137) - wait for xcm-executor patch + // type TransactionalProcessor = FrameTransactionalProcessor; } parameter_types! { diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index dd6535b648..76487e9dc5 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -46,9 +46,10 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - EnsureXcmOrigin, FrameTransactionalProcessor, FungiblesAdapter, - GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, NoChecking, - ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + EnsureXcmOrigin, + /* TODO:(PR#137) - wait for xcm-executor patch FrameTransactionalProcessor, */ + FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, + NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, @@ -605,7 +606,8 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - type TransactionalProcessor = FrameTransactionalProcessor; + // TODO:(PR#137) - wait for xcm-executor patch + // type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 04469b3fcd..b0bcbc55f0 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -43,9 +43,10 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - EnsureXcmOrigin, FrameTransactionalProcessor, FungiblesAdapter, - GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, NoChecking, - ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + EnsureXcmOrigin, + /* TODO:(PR#137) - wait for xcm-executor patch FrameTransactionalProcessor, */ + FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, + NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, @@ -527,7 +528,8 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - type TransactionalProcessor = FrameTransactionalProcessor; + // TODO:(PR#137) - wait for xcm-executor patch + // type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index b73e1c7494..573d182c18 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -41,10 +41,12 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - EnsureXcmOrigin, FrameTransactionalProcessor, HashedDescription, IsConcrete, ParentAsSuperuser, - ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + EnsureXcmOrigin, + /* TODO:(PR#137) - wait for xcm-executor patch FrameTransactionalProcessor, */ + HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, + UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -284,7 +286,8 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - type TransactionalProcessor = FrameTransactionalProcessor; + // TODO:(PR#137) - wait for xcm-executor patch + // type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 9eda62b0bc..4457f29246 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -41,10 +41,12 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - EnsureXcmOrigin, FrameTransactionalProcessor, HashedDescription, IsConcrete, ParentAsSuperuser, - ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + EnsureXcmOrigin, + /* TODO:(PR#137) - wait for xcm-executor patch FrameTransactionalProcessor, */ + HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, + UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -291,7 +293,8 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - type TransactionalProcessor = FrameTransactionalProcessor; + // TODO:(PR#137) - wait for xcm-executor patch + // type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 9112f1265a..da2960ed27 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -38,7 +38,9 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - DescribeTerminus, EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, + DescribeTerminus, EnsureXcmOrigin, + FixedWeightBounds, /* TODO:(PR#137) - wait for xcm-executor patch + * FrameTransactionalProcessor, */ HashedDescription, IsConcrete, OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, @@ -311,7 +313,8 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - type TransactionalProcessor = FrameTransactionalProcessor; + // TODO:(PR#137) - wait for xcm-executor patch + // type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. diff --git a/system-parachains/encointer/src/xcm_config.rs b/system-parachains/encointer/src/xcm_config.rs index 8cb8dd0785..db4d4a1266 100644 --- a/system-parachains/encointer/src/xcm_config.rs +++ b/system-parachains/encointer/src/xcm_config.rs @@ -36,10 +36,12 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeTerminus, EnsureXcmOrigin, - FixedWeightBounds, FrameTransactionalProcessor, HashedDescription, IsConcrete, NativeAsset, - ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + FixedWeightBounds, + /* TODO:(PR#137) - wait for xcm-executor patch FrameTransactionalProcessor, */ + HashedDescription, IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, }; use xcm_executor::XcmExecutor; @@ -179,7 +181,8 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - type TransactionalProcessor = FrameTransactionalProcessor; + // TODO:(PR#137) - wait for xcm-executor patch + // type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. diff --git a/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs b/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs index d278a859cb..011f282360 100644 --- a/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs +++ b/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs @@ -24,7 +24,9 @@ use frame_support::{ }; use xcm::latest::prelude::*; use xcm_builder::{ - AllowExplicitUnpaidExecutionFrom, FixedWeightBounds, FrameTransactionalProcessor, + AllowExplicitUnpaidExecutionFrom, + FixedWeightBounds, /* TODO:(PR#137) - wait for xcm-executor patch + * FrameTransactionalProcessor, */ ParentAsSuperuser, ParentIsPreset, SovereignSignedViaLocation, }; @@ -84,7 +86,8 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; - type TransactionalProcessor = FrameTransactionalProcessor; + // TODO:(PR#137) - wait for xcm-executor patch + // type TransactionalProcessor = FrameTransactionalProcessor; } impl cumulus_pallet_xcm::Config for Runtime { From 2e4a7908f40b5b1044c192fcf790a65c4ece105e Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 2 Feb 2024 15:32:15 +0100 Subject: [PATCH 041/316] nit --- system-parachains/collectives/collectives-polkadot/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index d9d546efa0..98df201fa4 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -658,7 +658,7 @@ construct_runtime!( CumulusXcm: cumulus_pallet_xcm = 32, // Temporary to migrate the remaining DMP messages: DmpQueue: cumulus_pallet_dmp_queue = 33, - MessageQueue: pallet_message_queue = 34 + MessageQueue: pallet_message_queue = 34, // Handy utilities. Utility: pallet_utility = 40, From cbe2e0b9124fa3a401c6c992f8438f0bb4e20637 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 2 Feb 2024 15:44:16 +0100 Subject: [PATCH 042/316] WIP: revert for encointer --- system-parachains/encointer/src/xcm_config.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/system-parachains/encointer/src/xcm_config.rs b/system-parachains/encointer/src/xcm_config.rs index db4d4a1266..8cb8dd0785 100644 --- a/system-parachains/encointer/src/xcm_config.rs +++ b/system-parachains/encointer/src/xcm_config.rs @@ -36,12 +36,10 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeTerminus, EnsureXcmOrigin, - FixedWeightBounds, - /* TODO:(PR#137) - wait for xcm-executor patch FrameTransactionalProcessor, */ - HashedDescription, IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, - RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, + FixedWeightBounds, FrameTransactionalProcessor, HashedDescription, IsConcrete, NativeAsset, + ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, }; use xcm_executor::XcmExecutor; @@ -181,8 +179,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - // TODO:(PR#137) - wait for xcm-executor patch - // type TransactionalProcessor = FrameTransactionalProcessor; + type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. From 7b52a6ee77d3347641e7f4c19b4cff2213344bf1 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 5 Feb 2024 12:21:47 +0100 Subject: [PATCH 043/316] WIP: update TODOs with patch --- relay/kusama/src/lib.rs | 13 +++++++------ relay/kusama/src/xcm_config.rs | 5 +++-- relay/polkadot/src/lib.rs | 13 +++++++------ relay/polkadot/src/xcm_config.rs | 5 +++-- .../asset-hubs/asset-hub-kusama/src/lib.rs | 13 +++++++------ .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 5 +++-- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 13 +++++++------ .../asset-hub-polkadot/src/xcm_config.rs | 5 +++-- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 14 +++++++------- .../bridge-hub-kusama/src/xcm_config.rs | 5 +++-- .../bridge-hubs/bridge-hub-polkadot/src/lib.rs | 13 +++++++------ .../bridge-hub-polkadot/src/xcm_config.rs | 5 +++-- .../collectives-polkadot/src/xcm_config.rs | 4 ++-- .../gluttons/glutton-kusama/src/xcm_config.rs | 4 ++-- 14 files changed, 64 insertions(+), 53 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 0b88d3e12b..f4012a5bda 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -2458,12 +2458,13 @@ sp_api::impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(MultiAsset { - id: Concrete(TokenLocation::get()), - fun: Fungible(1_000_000 * UNITS), - }) - } + // TODO:(PR#137) - revert back with `polkadot-sdk@1.6.0` or `polkadot-sdk@1.7.0` + // fn fee_asset() -> Result { + // Ok(MultiAsset { + // id: Concrete(TokenLocation::get()), + // fun: Fungible(1_000_000 * UNITS), + // }) + // } fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { // Kusama doesn't support asset locking diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index 9c95f8f846..e549d1ba78 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -39,7 +39,8 @@ use xcm_builder::{ AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal, DescribeFamily, - /* TODO:(PR#137) - wait for xcm-executor patch FrameTransactionalProcessor, */ + /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` + * FrameTransactionalProcessor, */ HashedDescription, IsChildSystemParachain, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, @@ -213,7 +214,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; - // TODO:(PR#137) - wait for xcm-executor patch + // TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` // type TransactionalProcessor = FrameTransactionalProcessor; } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index f7006b190d..ad0938887a 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -2457,12 +2457,13 @@ sp_api::impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(MultiAsset { - id: Concrete(TokenLocation::get()), - fun: Fungible(1_000_000 * UNITS), - }) - } + // TODO:(PR#137) - revert back with `polkadot-sdk@1.6.0` or `polkadot-sdk@1.7.0` + // fn fee_asset() -> Result { + // Ok(MultiAsset { + // id: Concrete(TokenLocation::get()), + // fun: Fungible(1_000_000 * UNITS), + // }) + // } fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { // Polkadot doesn't support asset locking diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index 0295fe1b64..d543e9b5be 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -44,7 +44,8 @@ use xcm_builder::{ AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal, DescribeFamily, - /* TODO:(PR#137) - wait for xcm-executor patch FrameTransactionalProcessor, */ + /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` + * FrameTransactionalProcessor, */ HashedDescription, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, @@ -228,7 +229,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; - // TODO:(PR#137) - wait for xcm-executor patch + // TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` // type TransactionalProcessor = FrameTransactionalProcessor; } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 9a7015d49a..89e3bc1074 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -1499,12 +1499,13 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(MultiAsset { - id: Concrete(KsmLocation::get()), - fun: Fungible(1_000_000 * UNITS), - }) - } + // TODO:(PR#137) - revert back with `polkadot-sdk@1.6.0` or `polkadot-sdk@1.7.0` + // fn fee_asset() -> Result { + // Ok(MultiAsset { + // id: Concrete(KsmLocation::get()), + // fun: Fungible(1_000_000 * UNITS), + // }) + // } fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 76487e9dc5..4d6b0676f8 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -47,7 +47,8 @@ use xcm_builder::{ AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, - /* TODO:(PR#137) - wait for xcm-executor patch FrameTransactionalProcessor, */ + /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` + * FrameTransactionalProcessor, */ FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, @@ -606,7 +607,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - // TODO:(PR#137) - wait for xcm-executor patch + // TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` // type TransactionalProcessor = FrameTransactionalProcessor; } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index f1e197dde5..0552811f38 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -1391,12 +1391,13 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(MultiAsset { - id: Concrete(DotLocation::get()), - fun: Fungible(1_000_000 * UNITS), - }) - } + // TODO:(PR#137) - revert back with `polkadot-sdk@1.6.0` or `polkadot-sdk@1.7.0` + // fn fee_asset() -> Result { + // Ok(MultiAsset { + // id: Concrete(DotLocation::get()), + // fun: Fungible(1_000_000 * UNITS), + // }) + // } fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index b0bcbc55f0..c059ecd7ee 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -44,7 +44,8 @@ use xcm_builder::{ AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, - /* TODO:(PR#137) - wait for xcm-executor patch FrameTransactionalProcessor, */ + /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` + * FrameTransactionalProcessor, */ FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, @@ -528,7 +529,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - // TODO:(PR#137) - wait for xcm-executor patch + // TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` // type TransactionalProcessor = FrameTransactionalProcessor; } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 88122c7e6c..09d7637c33 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -931,13 +931,13 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(MultiAsset { - id: Concrete(KsmRelayLocation::get()), - fun: Fungible(1_000_000 * UNITS), - }) - } - + // TODO:(PR#137) - revert back with `polkadot-sdk@1.6.0` or `polkadot-sdk@1.7.0` + // fn fee_asset() -> Result { + // Ok(MultiAsset { + // id: Concrete(KsmRelayLocation::get()), + // fun: Fungible(1_000_000 * UNITS), + // }) + // } fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 573d182c18..1753860967 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -42,7 +42,8 @@ use xcm_builder::{ AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, - /* TODO:(PR#137) - wait for xcm-executor patch FrameTransactionalProcessor, */ + /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` + * FrameTransactionalProcessor, */ HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, @@ -286,7 +287,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - // TODO:(PR#137) - wait for xcm-executor patch + // TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` // type TransactionalProcessor = FrameTransactionalProcessor; } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 0495afc8e4..254b1dcd18 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -931,12 +931,13 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(MultiAsset { - id: Concrete(DotRelayLocation::get()), - fun: Fungible(1_000_000 * UNITS), - }) - } + // TODO:(PR#137) - revert back with `polkadot-sdk@1.6.0` or `polkadot-sdk@1.7.0` + // fn fee_asset() -> Result { + // Ok(MultiAsset { + // id: Concrete(DotRelayLocation::get()), + // fun: Fungible(1_000_000 * UNITS), + // }) + // } fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 4457f29246..9ff8100375 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -42,7 +42,8 @@ use xcm_builder::{ AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, - /* TODO:(PR#137) - wait for xcm-executor patch FrameTransactionalProcessor, */ + /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` + * FrameTransactionalProcessor, */ HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, @@ -293,7 +294,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - // TODO:(PR#137) - wait for xcm-executor patch + // TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` // type TransactionalProcessor = FrameTransactionalProcessor; } diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index da2960ed27..7e6d0bd098 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -39,7 +39,7 @@ use xcm_builder::{ AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, DescribeTerminus, EnsureXcmOrigin, - FixedWeightBounds, /* TODO:(PR#137) - wait for xcm-executor patch + FixedWeightBounds, /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` * FrameTransactionalProcessor, */ HashedDescription, IsConcrete, OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, @@ -313,7 +313,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - // TODO:(PR#137) - wait for xcm-executor patch + // TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` // type TransactionalProcessor = FrameTransactionalProcessor; } diff --git a/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs b/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs index 011f282360..aefe8d9a42 100644 --- a/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs +++ b/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs @@ -25,7 +25,7 @@ use frame_support::{ use xcm::latest::prelude::*; use xcm_builder::{ AllowExplicitUnpaidExecutionFrom, - FixedWeightBounds, /* TODO:(PR#137) - wait for xcm-executor patch + FixedWeightBounds, /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` * FrameTransactionalProcessor, */ ParentAsSuperuser, ParentIsPreset, SovereignSignedViaLocation, }; @@ -86,7 +86,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; - // TODO:(PR#137) - wait for xcm-executor patch + // TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` // type TransactionalProcessor = FrameTransactionalProcessor; } From 1e1fa6776ad461ea3ea0680fa125454e6052554a Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Fri, 26 Jan 2024 14:43:53 +0200 Subject: [PATCH 044/316] adds snowbridge --- relay/kusama/src/xcm_config.rs | 2 +- .../asset-hubs/asset-hub-kusama/Cargo.toml | 6 + .../asset-hubs/asset-hub-kusama/src/lib.rs | 8 +- .../asset-hub-kusama/src/xcm_config.rs | 113 +++++++- .../asset-hub-kusama/tests/tests.rs | 52 ++++ .../asset-hubs/asset-hub-polkadot/Cargo.toml | 2 + .../asset-hubs/asset-hub-polkadot/src/lib.rs | 9 +- .../asset-hub-polkadot/src/xcm_config.rs | 98 ++++++- .../asset-hub-polkadot/tests/tests.rs | 52 ++++ .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 57 ++++ .../src/bridge_to_ethereum_config.rs | 30 ++ .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 213 ++++++++++++++- .../bridge-hub-kusama/src/weights/mod.rs | 4 + .../snowbridge_ethereum_beacon_client.rs | 151 +++++++++++ .../src/weights/snowbridge_inbound_queue.rs | 69 +++++ .../src/weights/snowbridge_outbound_queue.rs | 87 ++++++ .../src/weights/snowbridge_system.rs | 256 ++++++++++++++++++ .../bridge-hub-kusama/src/xcm_config.rs | 83 +++++- .../bridge-hub-kusama/tests/tests.rs | 16 ++ .../bridge-hub-polkadot/Cargo.toml | 63 +++++ .../src/bridge_to_ethereum_config.rs | 30 ++ .../bridge-hub-polkadot/src/lib.rs | 207 +++++++++++++- .../snowbridge_ethereum_beacon_client.rs | 151 +++++++++++ .../src/weights/snowbridge_inbound_queue.rs | 69 +++++ .../src/weights/snowbridge_outbound_queue.rs | 87 ++++++ .../src/weights/snowbridge_system.rs | 256 ++++++++++++++++++ .../bridge-hub-polkadot/src/xcm_config.rs | 83 +++++- 27 files changed, 2215 insertions(+), 39 deletions(-) create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_ethereum_beacon_client.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_inbound_queue.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_outbound_queue.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_system.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_ethereum_beacon_client.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_inbound_queue.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_outbound_queue.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_system.rs diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index a4c846729e..fcc0fb4550 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -135,7 +135,7 @@ parameter_types! { pub const MaxAssetsIntoHolding: u32 = 64; } -/// Kusama Relay recognizes/respects AssetHub, Encointer, and BridgeHub chains as teleporters. +/// Kusama Relay recognizes/respects AssetHub, Encointer and BridgeHub chains as teleporters. pub type TrustedTeleporters = ( xcm_builder::Case, xcm_builder::Case, diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index 28c51dabbc..123c315ab5 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -92,6 +92,8 @@ assets-common = { default-features = false , version = "0.4.0" } # Bridges pallet-xcm-bridge-hub-router = { default-features = false , version = "0.2.0" } +snowbridge-router-primitives = { default-features = false , version = "1.0.0" } #todo publish +snowbridge-kusama-common = { default-features = false , version = "1.0.0" } #todo publish [dev-dependencies] asset-test-utils = { version = "4.0.0" } @@ -138,6 +140,8 @@ runtime-benchmarks = [ "pallet-xcm/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", + "snowbridge-kusama-common/runtime-benchmarks", + "snowbridge-router-primitives/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", @@ -228,6 +232,8 @@ std = [ "polkadot-runtime-common/std", "polkadot-runtime-constants/std", "scale-info/std", + "snowbridge-kusama-common/std", + "snowbridge-router-primitives/std", "sp-api/std", "sp-block-builder/std", "sp-consensus-aura/std", diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index b3f61f5005..00f4c23ecd 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -30,10 +30,11 @@ pub mod xcm_config; use assets_common::{ foreign_creators::ForeignCreators, local_and_foreign_assets::{LocalAndForeignAssets, MultiLocationConverter}, - matching::FromSiblingParachain, + matching::{FromNetwork, FromSiblingParachain}, AssetIdForTrustBackedAssetsConvert, MultiLocationForAssetId, }; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use snowbridge_kusama_common::EthereumNetwork; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ @@ -381,7 +382,10 @@ impl pallet_assets::Config for Runtime { type AssetIdParameter = MultiLocationForAssetId; type Currency = Balances; type CreateOrigin = ForeignCreators< - (FromSiblingParachain>,), + ( + FromSiblingParachain>, + FromNetwork + ), ForeignCreatorsSovereignAccountOf, AccountId, >; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index cb6320c369..f9d8970353 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -22,7 +22,7 @@ use super::{ use crate::{ForeignAssets, ForeignAssetsInstance}; use assets_common::{ local_and_foreign_assets::MatchesLocalAndForeignAssetsMultiLocation, - matching::{FromSiblingParachain, IsForeignConcreteAsset}, + matching::{FromNetwork, FromSiblingParachain, IsForeignConcreteAsset}, }; use frame_support::{ match_types, parameter_types, @@ -39,6 +39,8 @@ use parachains_common::{ }, }; use polkadot_parachain_primitives::primitives::Sibling; +use snowbridge_kusama_common::EthereumNetwork; +use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; @@ -267,8 +269,9 @@ impl Contains for SafeCallFilter { match call { RuntimeCall::System(frame_system::Call::set_storage { items }) if items.iter().all(|(k, _)| { - k.eq(&bridging::XcmBridgeHubRouterBaseFee::key()) || - k.eq(&bridging::XcmBridgeHubRouterByteFee::key()) + k.eq(&bridging::XcmBridgeHubRouterByteFee::key()) | + k.eq(&bridging::XcmBridgeHubRouterBaseFee::key()) | + k.eq(&bridging::to_ethereum::BridgeHubEthereumBaseFee::key()) }) => return true, _ => (), @@ -550,7 +553,10 @@ impl xcm_executor::Config for XcmConfig { // as reserve locations (we trust the Bridge Hub to relay the message that a reserve is being // held). Asset Hub may _act_ as a reserve location for KSM and assets created // under `pallet-assets`. Users must use teleport where allowed (e.g. KSM with the Relay Chain). - type IsReserve = (bridging::to_polkadot::IsTrustedBridgedReserveLocationForConcreteAsset,); + type IsReserve = ( + bridging::to_polkadot::IsTrustedBridgedReserveLocationForConcreteAsset, + bridging::to_ethereum::IsTrustedBridgedReserveLocationForForeignAsset, + ); type IsTeleporter = TrustedTeleporters; type UniversalLocation = UniversalLocation; type Barrier = Barrier; @@ -587,6 +593,19 @@ impl xcm_executor::Config for XcmConfig { XcmAssetFeesReceiver, >, >, + // This trader allows to pay with `is_sufficient=true` "Foreign" assets from dedicated + // `pallet_assets` instance - `ForeignAssets`. + cumulus_primitives_utility::TakeFirstAssetTrader< + AccountId, + ForeignAssetFeeAsExistentialDepositMultiplierFeeCharger, + ForeignAssetsConvertedConcreteId, + ForeignAssets, + cumulus_primitives_utility::XcmFeesTo32ByteAccount< + ForeignFungiblesTransactor, + AccountId, + XcmAssetFeesReceiver, + >, + >, ); type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; @@ -598,7 +617,8 @@ impl xcm_executor::Config for XcmConfig { type AssetExchanger = (); type FeeManager = XcmFeesToAccount; type MessageExporter = (); - type UniversalAliases = bridging::to_polkadot::UniversalAliases; + type UniversalAliases = + (bridging::to_polkadot::UniversalAliases, bridging::to_ethereum::UniversalAliases); type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; @@ -626,6 +646,9 @@ pub type XcmRouter = WithUniqueTopic<( // Router which wraps and sends xcm to BridgeHub to be delivered to the Polkadot // GlobalConsensus ToPolkadotXcmRouter, + // Router which wraps and sends xcm to BridgeHub to be delivered to the Ethereum + // GlobalConsensus + SovereignPaidRemoteExporter, )>; #[cfg(feature = "runtime-benchmarks")] @@ -678,6 +701,7 @@ pub type ForeignCreatorsSovereignAccountOf = ( SiblingParachainConvertsVia, AccountId32Aliases, ParentIsPreset, + GlobalConsensusEthereumConvertsFor, ); /// Simple conversion of `u32` into an `AssetId` for use in benchmarking. @@ -743,10 +767,17 @@ pub mod bridging { sp_std::vec::Vec::new().into_iter() .chain(to_polkadot::BridgeTable::get()) .collect(); + + pub EthereumBridgeTable: sp_std::vec::Vec = + sp_std::vec::Vec::new().into_iter() + .chain(to_ethereum::BridgeTable::get()) + .collect(); } pub type NetworkExportTable = xcm_builder::NetworkExportTable; + pub type EthereumNetworkExportTable = xcm_builder::NetworkExportTable; + pub mod to_polkadot { use super::*; @@ -838,4 +869,76 @@ pub mod bridging { Some(alias.expect("we expect here BridgeHubKusama to Polkadot mapping at least")) } } + + pub mod to_ethereum { + use super::*; + + parameter_types! { + /// User fee for ERC20 token transfer back to Ethereum. + /// (initially was calculated by test `OutboundQueue::calculate_fees` - ETH/ROC 1/400 and fee_per_gas 20 GWEI = 2200698000000 + *25%) + /// Needs to be more than fee calculated from DefaultFeeConfig FeeConfigRecord in snowbridge:parachain/pallets/outbound-queue/src/lib.rs + /// Polkadot uses 10 decimals, Kusama and Rococo 12 decimals. + pub const DefaultBridgeHubEthereumBaseFee: Balance = 2_750_872_500_000; + pub storage BridgeHubEthereumBaseFee: Balance = DefaultBridgeHubEthereumBaseFee::get(); + pub SiblingBridgeHubWithEthereumInboundQueueInstance: MultiLocation = MultiLocation::new( + 1, + X2( + Parachain(SiblingBridgeHubParaId::get()), + PalletInstance(snowbridge_kusama_common::INBOUND_QUEUE_MESSAGES_PALLET_INDEX) + ) + ); + + /// Set up exporters configuration. + /// `Option` represents static "base fee" which is used for total delivery fee calculation. + pub BridgeTable: sp_std::vec::Vec = sp_std::vec![ + NetworkExportTableItem::new( + EthereumNetwork::get(), + Some(sp_std::vec![Junctions::Here]), + SiblingBridgeHub::get(), + Some(( + XcmBridgeHubRouterFeeAssetId::get(), + BridgeHubEthereumBaseFee::get(), + ).into()) + ), + ]; + + /// Universal aliases + pub UniversalAliases: BTreeSet<(MultiLocation, Junction)> = BTreeSet::from_iter( + sp_std::vec![ + (SiblingBridgeHubWithEthereumInboundQueueInstance::get(), GlobalConsensus(EthereumNetwork::get())), + ] + ); + } + + pub type IsTrustedBridgedReserveLocationForForeignAsset = + matching::IsForeignConcreteAsset>; + + impl Contains<(MultiLocation, Junction)> for UniversalAliases { + fn contains(alias: &(MultiLocation, Junction)) -> bool { + UniversalAliases::get().contains(alias) + } + } + } + + /// Benchmarks helper for bridging configuration. + #[cfg(feature = "runtime-benchmarks")] + pub struct BridgingBenchmarksHelper; + + #[cfg(feature = "runtime-benchmarks")] + impl BridgingBenchmarksHelper { + pub fn prepare_universal_alias() -> Option<(MultiLocation, Junction)> { + let alias = to_polkadot::UniversalAliases::get().into_iter().find_map( + |(location, junction)| { + match to_polkadot::SiblingBridgeHubWithBridgeHubPolkadotInstance::get() + .eq(&location) + { + true => Some((location, junction)), + false => None, + } + }, + ); + assert!(alias.is_some(), "we expect here BridgeHubKusama to Polkadot mapping at least"); + Some(alias.unwrap()) + } + } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index 95d2b7e8e5..cd3c06e5a6 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -809,6 +809,58 @@ fn change_xcm_bridge_hub_router_byte_fee_by_governance_works() { ) } +#[test] +fn change_xcm_bridge_hub_router_base_fee_by_governance_works() { + asset_test_utils::test_cases::change_storage_constant_by_governance_works::< + Runtime, + bridging::XcmBridgeHubRouterBaseFee, + Balance, + >( + collator_session_keys(), + 1000, + Box::new(|call| RuntimeCall::System(call).encode()), + || { + ( + bridging::XcmBridgeHubRouterBaseFee::key().to_vec(), + bridging::XcmBridgeHubRouterBaseFee::get(), + ) + }, + |old_value| { + if let Some(new_value) = old_value.checked_add(1) { + new_value + } else { + old_value.checked_sub(1).unwrap() + } + }, + ) +} + +#[test] +fn change_xcm_bridge_hub_ethereum_base_fee_by_governance_works() { + asset_test_utils::test_cases::change_storage_constant_by_governance_works::< + Runtime, + bridging::to_ethereum::BridgeHubEthereumBaseFee, + Balance, + >( + collator_session_keys(), + 1000, + Box::new(|call| RuntimeCall::System(call).encode()), + || { + ( + bridging::to_ethereum::BridgeHubEthereumBaseFee::key().to_vec(), + bridging::to_ethereum::BridgeHubEthereumBaseFee::get(), + ) + }, + |old_value| { + if let Some(new_value) = old_value.checked_add(1) { + new_value + } else { + old_value.checked_sub(1).unwrap() + } + }, + ) +} + // missing stuff from asset_test_utils::test_cases_over_bridge // TODO: replace me with direct usages of `asset_test_utils` after deps are bumped to (at least) 1.4 mod missing_asset_test_utils_test_cases_over_bridge { diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index a22c95ca22..54bd1cdde4 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -87,6 +87,8 @@ assets-common = { default-features = false , version = "0.4.0" } # Bridges pallet-xcm-bridge-hub-router = { default-features = false , version = "0.2.0" } +snowbridge-router-primitives = { default-features = false, version = "1.0.0" } #todo publish +snowbridge-polkadot-common = { default-features = false, version = "1.0.0" } #todo publish [dev-dependencies] hex-literal = "0.4.1" diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 3fd2569b5b..fd8054552b 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -63,9 +63,11 @@ mod weights; pub mod xcm_config; use assets_common::{ - foreign_creators::ForeignCreators, matching::FromSiblingParachain, MultiLocationForAssetId, + foreign_creators::ForeignCreators, matching::{FromNetwork, FromSiblingParachain}, + MultiLocationForAssetId, }; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use snowbridge_polkadot_common::EthereumNetwork; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ @@ -321,7 +323,10 @@ impl pallet_assets::Config for Runtime { type AssetIdParameter = MultiLocationForAssetId; type Currency = Balances; type CreateOrigin = ForeignCreators< - (FromSiblingParachain>,), + ( + FromSiblingParachain>, + FromNetwork + ), ForeignCreatorsSovereignAccountOf, AccountId, >; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 0b6abf5d4b..3852748b32 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -20,7 +20,7 @@ use super::{ WeightToFee, XcmpQueue, }; use crate::ForeignAssetsInstance; -use assets_common::matching::{FromSiblingParachain, IsForeignConcreteAsset}; +use assets_common::matching::{FromNetwork, FromSiblingParachain, IsForeignConcreteAsset}; use frame_support::{ match_types, parameter_types, traits::{ConstU32, Contains, Equals, Everything, Nothing, PalletInfoAccess}, @@ -36,6 +36,8 @@ use parachains_common::{ }; use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_constants::system_parachain; +use snowbridge_polkadot_common::EthereumNetwork; +use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; @@ -84,6 +86,9 @@ pub type LocationToAccountId = ( // Different global consensus parachain sovereign account. // (Used for over-bridge transfers and reserve processing) GlobalConsensusParachainConvertsFor, + // Ethereum contract sovereign account. + // (Used to get convert ethereum contract locations to sovereign account) + GlobalConsensusEthereumConvertsFor, ); /// Means for transacting the native currency on this chain. @@ -225,8 +230,9 @@ impl Contains for SafeCallFilter { match call { RuntimeCall::System(frame_system::Call::set_storage { items }) if items.iter().all(|(k, _)| { - k.eq(&bridging::XcmBridgeHubRouterBaseFee::key()) || - k.eq(&bridging::XcmBridgeHubRouterByteFee::key()) + k.eq(&bridging::XcmBridgeHubRouterByteFee::key()) | + k.eq(&bridging::XcmBridgeHubRouterBaseFee::key()) | + k.eq(&bridging::to_ethereum::BridgeHubEthereumBaseFee::key()) }) => return true, _ => (), @@ -472,7 +478,10 @@ impl xcm_executor::Config for XcmConfig { // as reserve locations (we trust the Bridge Hub to relay the message that a reserve is being // held). Asset Hub may _act_ as a reserve location for DOT and assets created // under `pallet-assets`. Users must use teleport where allowed (e.g. DOT with the Relay Chain). - type IsReserve = (bridging::to_kusama::IsTrustedBridgedReserveLocationForConcreteAsset,); + type IsReserve = ( + bridging::to_kusama::IsTrustedBridgedReserveLocationForConcreteAsset, + bridging::to_ethereum::IsTrustedBridgedReserveLocationForForeignAsset, + ); type IsTeleporter = TrustedTeleporters; type UniversalLocation = UniversalLocation; type Barrier = Barrier; @@ -509,6 +518,19 @@ impl xcm_executor::Config for XcmConfig { XcmAssetFeesReceiver, >, >, + // This trader allows to pay with `is_sufficient=true` "Foreign" assets from dedicated + // `pallet_assets` instance - `ForeignAssets`. + cumulus_primitives_utility::TakeFirstAssetTrader< + AccountId, + ForeignAssetFeeAsExistentialDepositMultiplierFeeCharger, + ForeignAssetsConvertedConcreteId, + ForeignAssets, + cumulus_primitives_utility::XcmFeesTo32ByteAccount< + ForeignFungiblesTransactor, + AccountId, + XcmAssetFeesReceiver, + >, + >, ); type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; @@ -520,7 +542,8 @@ impl xcm_executor::Config for XcmConfig { type AssetExchanger = (); type FeeManager = XcmFeesToAccount; type MessageExporter = (); - type UniversalAliases = bridging::to_kusama::UniversalAliases; + type UniversalAliases = + (bridging::to_kusama::UniversalAliases, bridging::to_ethereum::UniversalAliases); type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; @@ -548,6 +571,9 @@ pub type XcmRouter = WithUniqueTopic<( // Router which wraps and sends xcm to BridgeHub to be delivered to the Kusama // GlobalConsensus ToKusamaXcmRouter, + // Router which wraps and sends xcm to BridgeHub to be delivered to the Ethereum + // GlobalConsensus + SovereignPaidRemoteExporter, )>; #[cfg(feature = "runtime-benchmarks")] @@ -600,6 +626,7 @@ pub type ForeignCreatorsSovereignAccountOf = ( SiblingParachainConvertsVia, AccountId32Aliases, ParentIsPreset, + GlobalConsensusEthereumConvertsFor, ); /// Simple conversion of `u32` into an `AssetId` for use in benchmarking. @@ -638,10 +665,17 @@ pub mod bridging { sp_std::vec::Vec::new().into_iter() .chain(to_kusama::BridgeTable::get()) .collect(); + + pub EthereumBridgeTable: sp_std::vec::Vec = + sp_std::vec::Vec::new().into_iter() + .chain(to_ethereum::BridgeTable::get()) + .collect(); } pub type NetworkExportTable = xcm_builder::NetworkExportTable; + pub type EthereumNetworkExportTable = xcm_builder::NetworkExportTable; + pub mod to_kusama { use super::*; @@ -713,6 +747,56 @@ pub mod bridging { >; } + pub mod to_ethereum { + use super::*; + + parameter_types! { + /// User fee for ERC20 token transfer back to Ethereum. + /// (initially was calculated by test `OutboundQueue::calculate_fees` - ETH/ROC 1/400 and fee_per_gas 20 GWEI = 2200698000000 + *25%) + /// Needs to be more than fee calculated from DefaultFeeConfig FeeConfigRecord in snowbridge:parachain/pallets/outbound-queue/src/lib.rs + /// Polkadot uses 10 decimals, Kusama and Rococo 12 decimals. + pub const DefaultBridgeHubEthereumBaseFee: Balance = 27_508_725_000; + pub storage BridgeHubEthereumBaseFee: Balance = DefaultBridgeHubEthereumBaseFee::get(); + pub SiblingBridgeHubWithEthereumInboundQueueInstance: MultiLocation = MultiLocation::new( + 1, + X2( + Parachain(SiblingBridgeHubParaId::get()), + PalletInstance(snowbridge_polkadot_common::INBOUND_QUEUE_MESSAGES_PALLET_INDEX) + ) + ); + + /// Set up exporters configuration. + /// `Option` represents static "base fee" which is used for total delivery fee calculation. + pub BridgeTable: sp_std::vec::Vec = sp_std::vec![ + NetworkExportTableItem::new( + EthereumNetwork::get(), + Some(sp_std::vec![Junctions::Here]), + SiblingBridgeHub::get(), + Some(( + XcmBridgeHubRouterFeeAssetId::get(), + BridgeHubEthereumBaseFee::get(), + ).into()) + ), + ]; + + /// Universal aliases + pub UniversalAliases: BTreeSet<(MultiLocation, Junction)> = BTreeSet::from_iter( + sp_std::vec![ + (SiblingBridgeHubWithEthereumInboundQueueInstance::get(), GlobalConsensus(EthereumNetwork::get())), + ] + ); + } + + pub type IsTrustedBridgedReserveLocationForForeignAsset = + matching::IsForeignConcreteAsset>; + + impl Contains<(MultiLocation, Junction)> for UniversalAliases { + fn contains(alias: &(MultiLocation, Junction)) -> bool { + UniversalAliases::get().contains(alias) + } + } + } + /// Benchmarks helper for bridging configuration. #[cfg(feature = "runtime-benchmarks")] pub struct BridgingBenchmarksHelper; @@ -729,8 +813,8 @@ pub mod bridging { false => None, } }); - Some(alias.expect("we expect here BridgeHubPolkadot to Kusama mapping at least")) - } + assert!(alias.is_some(), "we expect here BridgeHubPolkadot to Kusama mapping at least"); + Some(alias.unwrap()) } } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index 46354fec17..c203b027a7 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -834,6 +834,58 @@ fn change_xcm_bridge_hub_router_byte_fee_by_governance_works() { ) } +#[test] +fn change_xcm_bridge_hub_router_base_fee_by_governance_works() { + asset_test_utils::test_cases::change_storage_constant_by_governance_works::< + Runtime, + bridging::XcmBridgeHubRouterBaseFee, + Balance, + >( + collator_session_keys(), + 1000, + Box::new(|call| RuntimeCall::System(call).encode()), + || { + ( + bridging::XcmBridgeHubRouterBaseFee::key().to_vec(), + bridging::XcmBridgeHubRouterBaseFee::get(), + ) + }, + |old_value| { + if let Some(new_value) = old_value.checked_add(1) { + new_value + } else { + old_value.checked_sub(1).unwrap() + } + }, + ) +} + +#[test] +fn change_xcm_bridge_hub_ethereum_base_fee_by_governance_works() { + asset_test_utils::test_cases::change_storage_constant_by_governance_works::< + Runtime, + bridging::to_ethereum::BridgeHubEthereumBaseFee, + Balance, + >( + collator_session_keys(), + 1000, + Box::new(|call| RuntimeCall::System(call).encode()), + || { + ( + bridging::to_ethereum::BridgeHubEthereumBaseFee::key().to_vec(), + bridging::to_ethereum::BridgeHubEthereumBaseFee::get(), + ) + }, + |old_value| { + if let Some(new_value) = old_value.checked_add(1) { + new_value + } else { + old_value.checked_sub(1).unwrap() + } + }, + ) +} + // missing stuff from asset_test_utils::test_cases_over_bridge // TODO: replace me with direct usages of `asset_test_utils` after deps are bumped to (at least) 1.4 mod missing_asset_test_utils_test_cases_over_bridge { diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 128422111a..ba2c2452de 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -96,6 +96,35 @@ pallet-bridge-messages = { default-features = false , version = "0.4.0" } pallet-bridge-parachains = { default-features = false , version = "0.4.0" } pallet-bridge-relayers = { default-features = false , version = "0.4.0" } +# Bridges +bp-header-chain = { default-features = false , version = "0.4.0" } +bp-messages = { default-features = false , version = "0.4.0" } +bp-parachains = { default-features = false , version = "0.4.0" } +bp-polkadot-core = { default-features = false , version = "0.4.0" } +bp-relayers = { default-features = false , version = "0.4.0" } +bp-runtime = { default-features = false , version = "0.4.0" } +bp-kusama = { default-features = false , version = "0.2.0" } +bp-polkadot = { default-features = false , version = "0.2.0" } +bridge-hub-common = { default-features = false , version = "0.4.0" } #todo publish +bridge-runtime-common = { default-features = false , version = "0.4.0" } +pallet-bridge-grandpa = { default-features = false , version = "0.4.0" } +pallet-bridge-messages = { default-features = false , version = "0.4.0" } +pallet-bridge-parachains = { default-features = false , version = "0.4.0" } +pallet-bridge-relayers = { default-features = false , version = "0.4.0" } + +# Ethereum Bridge (Snowbridge) +snowbridge-beacon-primitives = { default-features = false , version = "1.0.0" } +snowbridge-system = { default-features = false , version = "1.0.0" } +snowbridge-system-runtime-api = { default-features = false , version = "1.0.0" } +snowbridge-core = { default-features = false , version = "1.0.0" } +snowbridge-ethereum-beacon-client = { default-features = false , version = "1.0.0" } +snowbridge-inbound-queue = { default-features = false , version = "1.0.0" } +snowbridge-outbound-queue = { default-features = false , version = "1.0.0" } +snowbridge-outbound-queue-runtime-api = { default-features = false , version = "1.0.0" } +snowbridge-router-primitives = { default-features = false , version = "1.0.0" } +snowbridge-runtime-common = { default-features = false , version = "1.0.0" } +snowbridge-kusama-common = { default-features = false , version = "1.0.0" } + [dev-dependencies] bridge-hub-test-utils = { version = "0.4.0" } bridge-runtime-common = { version = "0.4.0", features = ["integrity-test"] } @@ -117,6 +146,7 @@ std = [ "bp-runtime/std", "bp-kusama/std", "bp-polkadot/std", + "bridge-hub-common/std", "bridge-runtime-common/std", "codec/std", "cumulus-pallet-aura-ext/std", @@ -159,6 +189,17 @@ std = [ "polkadot-runtime-common/std", "scale-info/std", "serde", + "snowbridge-beacon-primitives/std", + "snowbridge-core/std", + "snowbridge-ethereum-beacon-client/std", + "snowbridge-inbound-queue/std", + "snowbridge-outbound-queue-runtime-api/std", + "snowbridge-outbound-queue/std", + "snowbridge-kusama-common/std", + "snowbridge-router-primitives/std", + "snowbridge-runtime-common/std", + "snowbridge-system-runtime-api/std", + "snowbridge-system/std", "sp-api/std", "sp-block-builder/std", "sp-consensus-aura/std", @@ -181,6 +222,7 @@ std = [ ] runtime-benchmarks = [ + "bridge-hub-common/runtime-benchmarks", "bridge-runtime-common/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", @@ -204,6 +246,14 @@ runtime-benchmarks = [ "parachains-common/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", + "snowbridge-core/runtime-benchmarks", + "snowbridge-ethereum-beacon-client/runtime-benchmarks", + "snowbridge-inbound-queue/runtime-benchmarks", + "snowbridge-outbound-queue/runtime-benchmarks", + "snowbridge-kusama-common/runtime-benchmarks", + "snowbridge-router-primitives/runtime-benchmarks", + "snowbridge-runtime-common/runtime-benchmarks", + "snowbridge-system/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", @@ -235,10 +285,17 @@ try-runtime = [ "pallet-xcm/try-runtime", "parachain-info/try-runtime", "polkadot-runtime-common/try-runtime", + "snowbridge-ethereum-beacon-client/try-runtime", + "snowbridge-inbound-queue/try-runtime", + "snowbridge-outbound-queue/try-runtime", + "snowbridge-system/try-runtime", "sp-runtime/try-runtime", ] experimental = [ "pallet-aura/experimental" ] +beacon-spec-mainnet = [ + "snowbridge-ethereum-beacon-client/beacon-spec-mainnet", +] # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs new file mode 100644 index 0000000000..5ef402c002 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs @@ -0,0 +1,30 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +use crate::{ + xcm_config::UniversalLocation, + Runtime, +}; +use snowbridge_kusama_common::EthereumNetwork; +use snowbridge_router_primitives::outbound::EthereumBlobExporter; + +/// Exports message to the Ethereum Gateway contract. +pub type SnowbridgeExporter = EthereumBlobExporter< + UniversalLocation, + EthereumNetwork, + snowbridge_outbound_queue::Pallet, + snowbridge_core::AgentIdOf, +>; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index ab575a9189..9e85d68fbd 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -22,18 +22,24 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); +pub mod bridge_to_ethereum_config; pub mod bridge_to_polkadot_config; mod weights; pub mod xcm_config; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use snowbridge_beacon_primitives::{Fork, ForkVersions}; +use snowbridge_core::{ + gwei, meth, outbound::Message, AgentId, AllowSiblingsOnly, PricingParameters, Rewards, +}; +use snowbridge_router_primitives::inbound::MessageToXcm; use sp_api::impl_runtime_apis; -use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; +use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H160}; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, - traits::{AccountIdLookup, BlakeTwo256, Block as BlockT}, + traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, Keccak256}, transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, + ApplyExtrinsicResult, FixedU128, }; use sp_std::prelude::*; @@ -41,6 +47,13 @@ use sp_std::prelude::*; use sp_version::NativeVersion; use sp_version::RuntimeVersion; +#[cfg(not(feature = "runtime-benchmarks"))] +use bridge_hub_common::BridgeHubMessageRouter; +use bridge_hub_common::{ + message_queue::{NarrowOriginToSibling, ParaIdToSibling}, + AggregateMessageOrigin, +}; +use cumulus_primitives_core::ParaId; use frame_support::{ construct_runtime, dispatch::DispatchClass, @@ -58,13 +71,15 @@ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; use xcm_config::{ - FellowshipLocation, GovernanceLocation, XcmConfig, XcmOriginToTransactDispatchOrigin, + FellowshipLocation, GovernanceLocation, TreasuryAccount, XcmConfig, + XcmOriginToTransactDispatchOrigin, }; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; +use polkadot_runtime_constants::system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; @@ -80,6 +95,19 @@ use system_parachains_constants::{ use xcm::prelude::*; use xcm_executor::XcmExecutor; +#[cfg(feature = "runtime-benchmarks")] +use crate::xcm_config::benchmark_helpers::DoNothingRouter; +#[cfg(feature = "runtime-benchmarks")] +use snowbridge_beacon_primitives::CompactExecutionHeader; +#[cfg(feature = "runtime-benchmarks")] +use snowbridge_core::RingBufferMap; +#[cfg(feature = "runtime-benchmarks")] +pub use snowbridge_ethereum_beacon_client::ExecutionHeaderBuffer; +#[cfg(feature = "runtime-benchmarks")] +use snowbridge_inbound_queue::BenchmarkHelper; +#[cfg(feature = "runtime-benchmarks")] +use sp_core::H256; + /// The address format for describing accounts. pub type Address = MultiAddress; @@ -309,6 +337,8 @@ impl parachain_info::Config for Runtime {} impl cumulus_pallet_aura_ext::Config for Runtime {} +// todo add message queue pallet config impl pallet_message_queue::Config for Runtime { + parameter_types! { // Fellows pluralistic body. pub const FellowsBodyId: BodyId = BodyId::Technical; @@ -435,6 +465,151 @@ impl pallet_utility::Config for Runtime { type WeightInfo = weights::pallet_utility::WeightInfo; } +// Ethereum Bridge + +#[cfg(not(feature = "runtime-benchmarks"))] +parameter_types! { + pub storage EthereumGatewayAddress: H160 = H160::zero(); +} + +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub storage EthereumGatewayAddress: H160 = H160(hex_literal::hex!("EDa338E4dC46038493b885327842fD3E301CaB39")); +} + +parameter_types! { + pub const CreateAssetCall: [u8;2] = [53, 0]; + pub const CreateAssetDeposit: u128 = (UNITS / 10) + EXISTENTIAL_DEPOSIT; + pub const InboundQueuePalletInstance: u8 = snowbridge_kusama_common::INBOUND_QUEUE_MESSAGES_PALLET_INDEX; + pub Parameters: PricingParameters = PricingParameters { + exchange_rate: FixedU128::from_rational(1, 400), + fee_per_gas: gwei(20), + rewards: Rewards { local: 1 * UNITS, remote: meth(1) } + }; +} + +#[cfg(feature = "runtime-benchmarks")] +impl BenchmarkHelper for Runtime { + fn initialize_storage(block_hash: H256, header: CompactExecutionHeader) { + >::insert(block_hash, header); + } +} + +impl snowbridge_inbound_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Verifier = snowbridge_ethereum_beacon_client::Pallet; + type Token = Balances; + #[cfg(not(feature = "runtime-benchmarks"))] + type XcmSender = XcmRouter; + #[cfg(feature = "runtime-benchmarks")] + type XcmSender = DoNothingRouter; + type ChannelLookup = EthereumSystem; + type GatewayAddress = EthereumGatewayAddress; + #[cfg(feature = "runtime-benchmarks")] + type Helper = Runtime; + type MessageConverter = MessageToXcm< + CreateAssetCall, + CreateAssetDeposit, + InboundQueuePalletInstance, + AccountId, + Balance, + >; + type WeightToFee = WeightToFee; + type LengthToFee = ConstantMultiplier; + type MaxMessageSize = ConstU32<2048>; + type WeightInfo = weights::snowbridge_inbound_queue::WeightInfo; + type PricingParameters = EthereumSystem; +} + +impl snowbridge_outbound_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Hashing = Keccak256; + type MessageQueue = MessageQueue; + type Decimals = ConstU8<12>; + type MaxMessagePayloadSize = ConstU32<2048>; + type MaxMessagesPerBlock = ConstU32<32>; + type GasMeter = snowbridge_core::outbound::ConstantGasMeter; + type Balance = Balance; + type WeightToFee = WeightToFee; + type WeightInfo = weights::snowbridge_outbound_queue::WeightInfo; + type PricingParameters = EthereumSystem; + type Channels = EthereumSystem; +} + +#[cfg(not(feature = "beacon-spec-mainnet"))] +parameter_types! { + pub const ChainForkVersions: ForkVersions = ForkVersions { + genesis: Fork { + version: [0, 0, 0, 1], // 0x00000001 + epoch: 0, + }, + altair: Fork { + version: [1, 0, 0, 1], // 0x01000001 + epoch: 0, + }, + bellatrix: Fork { + version: [2, 0, 0, 1], // 0x02000001 + epoch: 0, + }, + capella: Fork { + version: [3, 0, 0, 1], // 0x03000001 + epoch: 0, + }, + }; + pub const MaxExecutionHeadersToKeep:u32 = 1000; +} + +#[cfg(feature = "beacon-spec-mainnet")] +parameter_types! { + pub const ChainForkVersions: ForkVersions = ForkVersions { + genesis: Fork { + version: [0, 0, 0, 0], // 0x00000000 + epoch: 0, + }, + altair: Fork { + version: [1, 0, 0, 0], // 0x01000000 + epoch: 74240, + }, + bellatrix: Fork { + version: [2, 0, 0, 0], // 0x02000000 + epoch: 144896, + }, + capella: Fork { + version: [3, 0, 0, 0], // 0x03000000 + epoch: 194048, + }, + }; + pub const MaxExecutionHeadersToKeep:u32 = 8192 * 2; +} + +impl snowbridge_ethereum_beacon_client::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ForkVersions = ChainForkVersions; + type MaxExecutionHeadersToKeep = MaxExecutionHeadersToKeep; + type WeightInfo = weights::snowbridge_ethereum_beacon_client::WeightInfo; +} + +#[cfg(feature = "runtime-benchmarks")] +impl snowbridge_system::BenchmarkHelper for () { + fn make_xcm_origin(location: xcm::latest::MultiLocation) -> RuntimeOrigin { + RuntimeOrigin::from(pallet_xcm::Origin::Xcm(location)) + } +} + +impl snowbridge_system::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type OutboundQueue = EthereumOutboundQueue; + type SiblingOrigin = EnsureXcm; + type AgentIdOf = snowbridge_core::AgentIdOf; + type TreasuryAccount = TreasuryAccount; + type Token = Balances; + type WeightInfo = weights::snowbridge_system::WeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type Helper = (); + type DefaultPricingParameters = Parameters; + type InboundDeliveryCost = EthereumInboundQueue; +} + // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime @@ -469,10 +644,17 @@ construct_runtime!( // Pallets that may be used by all bridges. BridgeRelayers: pallet_bridge_relayers = 50, - // Polkadot bridge pallets. + //// todo add message queue pallet BridgePolkadotGrandpa: pallet_bridge_grandpa:: = 51, BridgePolkadotParachains: pallet_bridge_parachains:: = 52, BridgePolkadotMessages: pallet_bridge_messages:: = 53, + + EthereumInboundQueue: snowbridge_inbound_queue = 80, + EthereumOutboundQueue: snowbridge_outbound_queue = 81, + EthereumBeaconClient: snowbridge_ethereum_beacon_client = 82, + EthereumSystem: snowbridge_system = 83, + + } ); @@ -498,6 +680,11 @@ mod benches { [pallet_bridge_grandpa, PolkadotFinality] [pallet_bridge_parachains, PolkadotParachains] [pallet_bridge_messages, PolkadotMessages] + // Ethereum Bridge + [snowbridge_inbound_queue, EthereumInboundQueue] + [snowbridge_outbound_queue, EthereumOutboundQueue] + [snowbridge_system, EthereumSystem] + [snowbridge_ethereum_beacon_client, EthereumBeaconClient] ); } @@ -699,6 +886,22 @@ impl_runtime_apis! { } } + impl snowbridge_outbound_queue_runtime_api::OutboundQueueApi for Runtime { + fn prove_message(leaf_index: u64) -> Option { + snowbridge_outbound_queue::api::prove_message::(leaf_index) + } + + fn calculate_fee(message: Message) -> Option { + snowbridge_outbound_queue::api::calculate_fee::(message) + } + } + + impl snowbridge_system_runtime_api::ControlApi for Runtime { + fn agent_id(location: VersionedMultiLocation) -> Option { + snowbridge_system::api::agent_id::(location) + } + } + #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs index a65be4f0d7..fa86b3ac1b 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs @@ -40,6 +40,10 @@ pub mod pallet_utility; pub mod pallet_xcm; pub mod paritydb_weights; pub mod rocksdb_weights; +pub mod snowbridge_ethereum_beacon_client; +pub mod snowbridge_inbound_queue; +pub mod snowbridge_outbound_queue; +pub mod snowbridge_system; pub mod xcm; pub use block_weights::constants::BlockExecutionWeight; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_ethereum_beacon_client.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_ethereum_beacon_client.rs new file mode 100644 index 0000000000..ffc8446fbd --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_ethereum_beacon_client.rs @@ -0,0 +1,151 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `snowbridge_ethereum_beacon_client` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-06-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ip-172-31-8-124`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-kusama-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/polkadot-parachain +// benchmark +// pallet +// --base-path +// /mnt/scratch/benchmark +// --chain=bridge-hub-kusama-dev +// --pallet=snowbridge_ethereum_beacon_client +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --steps +// 50 +// --repeat +// 20 +// --output +// ./system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_ethereum_beacon_client.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `snowbridge_ethereum_beacon_client`. +pub struct WeightInfo(PhantomData); +impl snowbridge_ethereum_beacon_client::WeightInfo for WeightInfo { + /// Storage: EthereumBeaconClient FinalizedBeaconStateIndex (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconStateIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconStateMapping (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconStateMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient NextSyncCommittee (r:0 w:1) + /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient InitialCheckpointRoot (r:0 w:1) + /// Proof: EthereumBeaconClient InitialCheckpointRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ValidatorsRoot (r:0 w:1) + /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:0 w:1) + /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:0 w:1) + /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestExecutionState (r:0 w:1) + /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconState (r:0 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + fn force_checkpoint() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `3501` + // Minimum execution time: 97_185_781_000 picoseconds. + Weight::from_parts(97_263_571_000, 0) + .saturating_add(Weight::from_parts(0, 3501)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(9)) + } + /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:1) + /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:0) + /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient NextSyncCommittee (r:1 w:0) + /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:1 w:0) + /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) + /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconStateIndex (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconStateIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconStateMapping (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconStateMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) + fn submit() -> Weight { + // Proof Size summary in bytes: + // Measured: `92753` + // Estimated: `93857` + // Minimum execution time: 25_999_968_000 picoseconds. + Weight::from_parts(26_051_019_000, 0) + .saturating_add(Weight::from_parts(0, 93857)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:0) + /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:0) + /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:0) + /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient NextSyncCommittee (r:1 w:1) + /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:1 w:0) + /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) + /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + fn submit_with_sync_committee() -> Weight { + // Proof Size summary in bytes: + // Measured: `92717` + // Estimated: `93857` + // Minimum execution time: 122_354_917_000 picoseconds. + Weight::from_parts(122_461_312_000, 0) + .saturating_add(Weight::from_parts(0, 93857)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:0) + /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:0) + /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:1) + /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ExecutionHeaderIndex (r:1 w:1) + /// Proof: EthereumBeaconClient ExecutionHeaderIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ExecutionHeaderMapping (r:1 w:1) + /// Proof: EthereumBeaconClient ExecutionHeaderMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ExecutionHeaders (r:0 w:1) + /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(136), added: 2611, mode: MaxEncodedLen) + fn submit_execution_header() -> Weight { + // Proof Size summary in bytes: + // Measured: `386` + // Estimated: `3537` + // Minimum execution time: 108_761_000 picoseconds. + Weight::from_parts(113_158_000, 0) + .saturating_add(Weight::from_parts(0, 3537)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_inbound_queue.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_inbound_queue.rs new file mode 100644 index 0000000000..cbadf1ba90 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_inbound_queue.rs @@ -0,0 +1,69 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `snowbridge_inbound_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-09-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `macbook pro 14 m2`, CPU: `m2-arm64` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/polkadot-parachain +// benchmark +// pallet +// --chain=bridge-hub-kusama-dev +// --pallet=snowbridge_inbound_queue +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --steps +// 50 +// --repeat +// 20 +// --output +// ./system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_inbound_queue.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `snowbridge_inbound_queue`. +pub struct WeightInfo(PhantomData); +impl snowbridge_inbound_queue::WeightInfo for WeightInfo { + /// Storage: EthereumInboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumInboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ExecutionHeaders (r:1 w:0) + /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(136), added: 2611, mode: MaxEncodedLen) + /// Storage: EthereumInboundQueue Nonce (r:1 w:1) + /// Proof: EthereumInboundQueue Nonce (max_values: None, max_size: Some(20), added: 2495, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn submit() -> Weight { + // Proof Size summary in bytes: + // Measured: `457` + // Estimated: `3601` + // Minimum execution time: 69_000_000 picoseconds. + Weight::from_parts(70_000_000, 0) + .saturating_add(Weight::from_parts(0, 3601)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_outbound_queue.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_outbound_queue.rs new file mode 100644 index 0000000000..7a6aeaba39 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_outbound_queue.rs @@ -0,0 +1,87 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `snowbridge_outbound_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-20, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `192.168.1.13`, CPU: `` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-kusama-dev"), DB CACHE: 1024 + +// Executed Command: +// ../target/release/polkadot-parachain +// benchmark +// pallet +// --chain=bridge-hub-kusama-dev +// --pallet=snowbridge_outbound_queue +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --output +// ./system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_outbound_queue.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `snowbridge_outbound_queue`. +pub struct WeightInfo(PhantomData); +impl snowbridge_outbound_queue::WeightInfo for WeightInfo { + /// Storage: EthereumOutboundQueue MessageLeaves (r:1 w:1) + /// Proof Skipped: EthereumOutboundQueue MessageLeaves (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: EthereumOutboundQueue PendingHighPriorityMessageCount (r:1 w:1) + /// Proof: EthereumOutboundQueue PendingHighPriorityMessageCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue Nonce (r:1 w:1) + /// Proof: EthereumOutboundQueue Nonce (max_values: None, max_size: Some(20), added: 2495, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue Messages (r:1 w:1) + /// Proof Skipped: EthereumOutboundQueue Messages (max_values: Some(1), max_size: None, mode: Measured) + fn do_process_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `3485` + // Minimum execution time: 39_000_000 picoseconds. + Weight::from_parts(39_000_000, 3485) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + /// Storage: EthereumOutboundQueue MessageLeaves (r:1 w:0) + /// Proof Skipped: EthereumOutboundQueue MessageLeaves (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: System Digest (r:1 w:1) + /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) + fn commit() -> Weight { + // Proof Size summary in bytes: + // Measured: `1094` + // Estimated: `2579` + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(28_000_000, 2579) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + + fn commit_single() -> Weight { + // Proof Size summary in bytes: + // Measured: `1094` + // Estimated: `2579` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_000_000, 1586) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_system.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_system.rs new file mode 100644 index 0000000000..e92074b297 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_system.rs @@ -0,0 +1,256 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `snowbridge_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-09, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `crake.local`, CPU: `` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-kusama-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// bridge-hub-kusama-dev +// --pallet=snowbridge_system +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --output +// ./system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_system.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `snowbridge_system`. +pub struct WeightInfo(PhantomData); +impl snowbridge_system::WeightInfo for WeightInfo { + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `3517` + // Minimum execution time: 47_000_000 picoseconds. + Weight::from_parts(47_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: EthereumSystem Agents (r:1 w:1) + /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn create_agent() -> Weight { + // Proof Size summary in bytes: + // Measured: `187` + // Estimated: `6196` + // Minimum execution time: 87_000_000 picoseconds. + Weight::from_parts(87_000_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: EthereumSystem Agents (r:1 w:0) + /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) + /// Storage: EthereumSystem Channels (r:1 w:1) + /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn create_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `602` + // Estimated: `69050` + // Minimum execution time: 84_000_000 picoseconds. + Weight::from_parts(84_000_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: EthereumSystem Channels (r:1 w:0) + /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn update_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `256` + // Estimated: `6044` + // Minimum execution time: 41_000_000 picoseconds. + Weight::from_parts(41_000_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: EthereumSystem Channels (r:1 w:0) + /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn force_update_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `256` + // Estimated: `6044` + // Minimum execution time: 41_000_000 picoseconds. + Weight::from_parts(41_000_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn set_operating_mode() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `3517` + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(30_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: EthereumSystem Agents (r:1 w:0) + /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn transfer_native_from_agent() -> Weight { + // Proof Size summary in bytes: + // Measured: `252` + // Estimated: `6044` + // Minimum execution time: 43_000_000 picoseconds. + Weight::from_parts(43_000_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: EthereumSystem Agents (r:1 w:0) + /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn force_transfer_native_from_agent() -> Weight { + // Proof Size summary in bytes: + // Measured: `252` + // Estimated: `6044` + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(42_000_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn set_token_transfer_fees() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `3517` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(42_000_000, 3517) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn set_pricing_parameters() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `3517` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(42_000_000, 3517) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 12c5763867..8dd0c9e713 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -18,7 +18,7 @@ use super::{ bridge_to_polkadot_config::{ DeliveryRewardInBalance, RequiredStakeForStakeAndSlash, ToBridgeHubPolkadotHaulBlobExporter, }, - AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, + AccountId, AllPalletsWithSystem, Balances, EthereumGatewayAddress, ParachainInfo, ParachainSystem, PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; @@ -34,7 +34,12 @@ use parachains_common::{ xcm_config::{ConcreteAssetFromSystem, RelayOrOtherSystemParachains}, }; use polkadot_parachain_primitives::primitives::Sibling; +use snowbridge_core::DescribeHere; +use snowbridge_kusama_common::EthereumNetwork; +use snowbridge_runtime_common::XcmExportFeeToSibling; +use sp_core::{Get, H256}; use sp_runtime::traits::AccountIdConversion; +use sp_std::marker::PhantomData; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; use xcm_builder::{ @@ -47,7 +52,8 @@ use xcm_builder::{ TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, }; -use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; +use xcm_executor::{traits::{FeeManager, FeeReason, FeeReason::Export, WithOriginFilter}, + XcmExecutor}; parameter_types! { pub const KsmRelayLocation: MultiLocation = MultiLocation::parent(); @@ -146,8 +152,9 @@ impl Contains for SafeCallFilter { match call { RuntimeCall::System(frame_system::Call::set_storage { items }) if items.iter().all(|(k, _)| { - k.eq(&DeliveryRewardInBalance::key()) || - k.eq(&RequiredStakeForStakeAndSlash::key()) + k.eq(&DeliveryRewardInBalance::key()) || // todo one or two slashes? + k.eq(&RequiredStakeForStakeAndSlash::key()) | + k.eq(&EthereumGatewayAddress::key()) }) => return true, _ => (), @@ -192,7 +199,15 @@ impl Contains for SafeCallFilter { RuntimeCall::BridgePolkadotMessages(pallet_bridge_messages::Call::< Runtime, crate::bridge_to_polkadot_config::WithBridgeHubPolkadotMessagesInstance, - >::set_operating_mode { .. }) + >::set_operating_mode { .. }) | + RuntimeCall::EthereumBeaconClient( + snowbridge_ethereum_beacon_client::Call::force_checkpoint { .. } | + snowbridge_ethereum_beacon_client::Call::set_operating_mode { .. }, + ) | RuntimeCall::EthereumInboundQueue( + snowbridge_inbound_queue::Call::set_operating_mode { .. }, + ) | RuntimeCall::EthereumOutboundQueue( + snowbridge_outbound_queue::Call::set_operating_mode { .. }, + ) | RuntimeCall::EthereumSystem(..) ) } } @@ -275,8 +290,24 @@ impl xcm_executor::Config for XcmConfig { type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); - type FeeManager = XcmFeesToAccount; - type MessageExporter = ToBridgeHubPolkadotHaulBlobExporter; + type FeeManager = XcmFeeManagerFromComponentsBridgeHub< + WaivedLocations, + ( + XcmExportFeeToSibling< + bp_kusama::Balance, + AccountId, + TokenLocation, + EthereumNetwork, + Self::AssetTransactor, + crate::EthereumOutboundQueue, + >, + XcmFeeToAccount, // todo check if right + ), + >; + type MessageExporter = ( + ToBridgeHubPolkadotHaulBlobExporter, + crate::bridge_to_ethereum_config::SnowbridgeExporter + ); type UniversalAliases = Nothing; type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; @@ -341,3 +372,41 @@ impl cumulus_pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } + +pub struct XcmFeeManagerFromComponentsBridgeHub( + PhantomData<(WaivedLocations, HandleFee)>, +); +impl, FeeHandler: HandleFee> FeeManager +for XcmFeeManagerFromComponentsBridgeHub +{ + fn is_waived(origin: Option<&MultiLocation>, fee_reason: FeeReason) -> bool { + let Some(loc) = origin else { return false }; + if let Export { network, destination: Here } = fee_reason { + return !(network == EthereumNetwork::get()) + } + WaivedLocations::contains(loc) + } + + fn handle_fee(fee: MultiAssets, context: Option<&XcmContext>, reason: FeeReason) { + FeeHandler::handle_fee(fee, context, reason); + } +} + +#[cfg(feature = "runtime-benchmarks")] +pub mod benchmark_helpers { + use crate::{MultiAssets, MultiLocation, SendError, SendResult, SendXcm, Xcm, XcmHash}; + + pub struct DoNothingRouter; + impl SendXcm for DoNothingRouter { + type Ticket = (); + fn validate( + _dest: &mut Option, + _msg: &mut Option>, + ) -> SendResult<()> { + Ok(((), MultiAssets::new())) + } + fn deliver(_: ()) -> Result { + Ok([0; 32]) + } + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index c51154b5a7..6671830968 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -31,6 +31,7 @@ use codec::{Decode, Encode}; use frame_support::parameter_types; use frame_system::pallet_prelude::HeaderFor; use parachains_common::{kusama::fee::WeightToFee, AccountId, AuraId, Balance}; +use sp_core::H160; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ generic::{Era, SignedPayload}, @@ -294,6 +295,21 @@ pub fn can_calculate_weight_for_paid_export_message_with_reserve_transfer() { ); } +#[test] +fn change_ethereum_gateway_by_governance_works() { + bridge_hub_test_utils::test_cases::change_storage_constant_by_governance_works::< + Runtime, + EthereumGatewayAddress, + H160, + >( + collator_session_keys(), + bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, + Box::new(|call| RuntimeCall::System(call).encode()), + || (EthereumGatewayAddress::key().to_vec(), EthereumGatewayAddress::get()), + |_| [1; 20].into(), + ) +} + // TODO: replace me with direct usages of `bridge_hub_test_utils` after deps are bumped to (at // least) 1.4 // diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index e56826d70f..e7b9d6c45b 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -25,6 +25,13 @@ bp-bridge-hub-kusama = { path = "../bridge-hub-kusama/primitives", default-featu bp-bridge-hub-polkadot = { path = "../bridge-hub-polkadot/primitives", default-features = false} polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} +# Local +bp-asset-hub-kusama = { path = "../../asset-hubs/asset-hub-kusama/primitives", default-features = false} +bp-asset-hub-polkadot = { path = "../../asset-hubs/asset-hub-polkadot/primitives", default-features = false} +bp-bridge-hub-kusama = { path = "../bridge-hub-kusama/primitives", default-features = false} +bp-bridge-hub-polkadot = { path = "../bridge-hub-polkadot/primitives", default-features = false} +polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} + # Substrate frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } frame-executive = { default-features = false, version = "25.0.0" } @@ -96,6 +103,34 @@ pallet-bridge-messages = { default-features = false , version = "0.4.0" } pallet-bridge-parachains = { default-features = false , version = "0.4.0" } pallet-bridge-relayers = { default-features = false , version = "0.4.0" } +# Bridges +bp-header-chain = { default-features = false , version = "0.4.0" } +bp-messages = { default-features = false , version = "0.4.0" } +bp-parachains = { default-features = false , version = "0.4.0" } +bp-polkadot-core = { default-features = false , version = "0.4.0" } +bp-relayers = { default-features = false , version = "0.4.0" } +bp-runtime = { default-features = false , version = "0.4.0" } +bp-kusama = { default-features = false , version = "0.2.0" } +bp-polkadot = { default-features = false , version = "0.2.0" } +bridge-runtime-common = { default-features = false , version = "0.4.0" } +pallet-bridge-grandpa = { default-features = false , version = "0.4.0" } +pallet-bridge-messages = { default-features = false , version = "0.4.0" } +pallet-bridge-parachains = { default-features = false , version = "0.4.0" } +pallet-bridge-relayers = { default-features = false , version = "0.4.0" } + +# Ethereum Bridge (Snowbridge) +snowbridge-beacon-primitives = { default-features = false , version = "1.0.0" } +snowbridge-system = { default-features = false , version = "1.0.0" } +snowbridge-system-runtime-api = { default-features = false , version = "1.0.0" } +snowbridge-core = { default-features = false , version = "1.0.0" } +snowbridge-ethereum-beacon-client = { default-features = false , version = "1.0.0" } +snowbridge-inbound-queue = { default-features = false , version = "1.0.0" } +snowbridge-outbound-queue = { default-features = false , version = "1.0.0" } +snowbridge-outbound-queue-runtime-api = { default-features = false , version = "1.0.0" } +snowbridge-router-primitives = { default-features = false , version = "1.0.0" } +snowbridge-runtime-common = { default-features = false , version = "1.0.0" } +snowbridge-kusama-common = { default-features = false , version = "1.0.0" } + [dev-dependencies] bridge-hub-test-utils = { version = "0.4.0" } bridge-runtime-common = { version = "0.4.0", features = ["integrity-test"] } @@ -117,6 +152,7 @@ std = [ "bp-runtime/std", "bp-kusama/std", "bp-polkadot/std", + "bridge-hub-common/std", "bridge-runtime-common/std", "codec/std", "cumulus-pallet-aura-ext/std", @@ -159,6 +195,17 @@ std = [ "polkadot-runtime-constants/std", "scale-info/std", "serde", + "snowbridge-beacon-primitives/std", + "snowbridge-core/std", + "snowbridge-ethereum-beacon-client/std", + "snowbridge-inbound-queue/std", + "snowbridge-outbound-queue-runtime-api/std", + "snowbridge-outbound-queue/std", + "snowbridge-kusama-common/std", + "snowbridge-router-primitives/std", + "snowbridge-runtime-common/std", + "snowbridge-system-runtime-api/std", + "snowbridge-system/std", "sp-api/std", "sp-block-builder/std", "sp-consensus-aura/std", @@ -181,6 +228,7 @@ std = [ ] runtime-benchmarks = [ + "bridge-hub-common/runtime-benchmarks", "bridge-runtime-common/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", @@ -203,6 +251,14 @@ runtime-benchmarks = [ "pallet-xcm/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", + "snowbridge-core/runtime-benchmarks", + "snowbridge-ethereum-beacon-client/runtime-benchmarks", + "snowbridge-inbound-queue/runtime-benchmarks", + "snowbridge-outbound-queue/runtime-benchmarks", + "snowbridge-kusama-common/runtime-benchmarks", + "snowbridge-router-primitives/runtime-benchmarks", + "snowbridge-runtime-common/runtime-benchmarks", + "snowbridge-system/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", @@ -234,10 +290,17 @@ try-runtime = [ "pallet-xcm/try-runtime", "parachain-info/try-runtime", "polkadot-runtime-common/try-runtime", + "snowbridge-ethereum-beacon-client/try-runtime", + "snowbridge-inbound-queue/try-runtime", + "snowbridge-outbound-queue/try-runtime", + "snowbridge-system/try-runtime", "sp-runtime/try-runtime", ] experimental = [ "pallet-aura/experimental" ] +beacon-spec-mainnet = [ + "snowbridge-ethereum-beacon-client/beacon-spec-mainnet", +] # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs new file mode 100644 index 0000000000..713af64649 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs @@ -0,0 +1,30 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +use crate::{ + xcm_config::UniversalLocation, + Runtime, +}; +use snowbridge_polkadot_common::EthereumNetwork; +use snowbridge_router_primitives::outbound::EthereumBlobExporter; + +/// Exports message to the Ethereum Gateway contract. +pub type SnowbridgeExporter = EthereumBlobExporter< + UniversalLocation, + EthereumNetwork, + snowbridge_outbound_queue::Pallet, + snowbridge_core::AgentIdOf, +>; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 9b46134056..9421cf4021 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -22,16 +22,22 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); +pub mod bridge_to_ethereum_config; pub mod bridge_to_kusama_config; mod weights; pub mod xcm_config; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use snowbridge_beacon_primitives::{Fork, ForkVersions}; +use snowbridge_core::{ + gwei, meth, outbound::Message, AgentId, AllowSiblingsOnly, PricingParameters, Rewards, +}; +use snowbridge_router_primitives::inbound::MessageToXcm; use sp_api::impl_runtime_apis; -use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; +use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H160}; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, - traits::{AccountIdLookup, BlakeTwo256, Block as BlockT}, + traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, Keccak256}, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, }; @@ -41,6 +47,13 @@ use sp_std::prelude::*; use sp_version::NativeVersion; use sp_version::RuntimeVersion; +#[cfg(not(feature = "runtime-benchmarks"))] +use bridge_hub_common::BridgeHubMessageRouter; +use bridge_hub_common::{ + message_queue::{NarrowOriginToSibling, ParaIdToSibling}, + AggregateMessageOrigin, +}; +use cumulus_primitives_core::ParaId; use frame_support::{ construct_runtime, dispatch::DispatchClass, @@ -58,7 +71,8 @@ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; use xcm_config::{ - FellowshipLocation, GovernanceLocation, XcmConfig, XcmOriginToTransactDispatchOrigin, + FellowshipLocation, GovernanceLocation, XcmConfig, TreasuryAccount, + XcmOriginToTransactDispatchOrigin, }; #[cfg(any(feature = "std", test))] @@ -66,6 +80,7 @@ pub use sp_runtime::BuildStorage; // Polkadot imports use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; +use polkadot_runtime_constants::system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; @@ -80,6 +95,19 @@ use system_parachains_constants::{ use xcm::prelude::*; use xcm_executor::XcmExecutor; +#[cfg(feature = "runtime-benchmarks")] +use crate::xcm_config::benchmark_helpers::DoNothingRouter; +#[cfg(feature = "runtime-benchmarks")] +use snowbridge_beacon_primitives::CompactExecutionHeader; +#[cfg(feature = "runtime-benchmarks")] +use snowbridge_core::RingBufferMap; +#[cfg(feature = "runtime-benchmarks")] +pub use snowbridge_ethereum_beacon_client::ExecutionHeaderBuffer; +#[cfg(feature = "runtime-benchmarks")] +use snowbridge_inbound_queue::BenchmarkHelper; +#[cfg(feature = "runtime-benchmarks")] +use sp_core::H256; + /// The address format for describing accounts. pub type Address = MultiAddress; @@ -309,6 +337,8 @@ impl parachain_info::Config for Runtime {} impl cumulus_pallet_aura_ext::Config for Runtime {} +// todo add message queue pallet config impl pallet_message_queue::Config for Runtime { + parameter_types! { // Fellows pluralistic body. pub const FellowsBodyId: BodyId = BodyId::Technical; @@ -435,6 +465,151 @@ impl pallet_utility::Config for Runtime { type WeightInfo = weights::pallet_utility::WeightInfo; } +// Ethereum Bridge + +#[cfg(not(feature = "runtime-benchmarks"))] +parameter_types! { + pub storage EthereumGatewayAddress: H160 = H160::zero(); +} + +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub storage EthereumGatewayAddress: H160 = H160(hex_literal::hex!("EDa338E4dC46038493b885327842fD3E301CaB39")); +} + +parameter_types! { + pub const CreateAssetCall: [u8;2] = [53, 0]; + pub const CreateAssetDeposit: u128 = (UNITS / 10) + EXISTENTIAL_DEPOSIT; + pub const InboundQueuePalletInstance: u8 = snowbridge_kusama_common::INBOUND_QUEUE_MESSAGES_PALLET_INDEX; + pub Parameters: PricingParameters = PricingParameters { + exchange_rate: FixedU128::from_rational(1, 400), + fee_per_gas: gwei(20), + rewards: Rewards { local: 1 * UNITS, remote: meth(1) } + }; +} + +#[cfg(feature = "runtime-benchmarks")] +impl BenchmarkHelper for Runtime { + fn initialize_storage(block_hash: H256, header: CompactExecutionHeader) { + >::insert(block_hash, header); + } +} + +impl snowbridge_inbound_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Verifier = snowbridge_ethereum_beacon_client::Pallet; + type Token = Balances; + #[cfg(not(feature = "runtime-benchmarks"))] + type XcmSender = XcmRouter; + #[cfg(feature = "runtime-benchmarks")] + type XcmSender = DoNothingRouter; + type ChannelLookup = EthereumSystem; + type GatewayAddress = EthereumGatewayAddress; + #[cfg(feature = "runtime-benchmarks")] + type Helper = Runtime; + type MessageConverter = MessageToXcm< + CreateAssetCall, + CreateAssetDeposit, + InboundQueuePalletInstance, + AccountId, + Balance, + >; + type WeightToFee = WeightToFee; + type LengthToFee = ConstantMultiplier; + type MaxMessageSize = ConstU32<2048>; + type WeightInfo = weights::snowbridge_inbound_queue::WeightInfo; + type PricingParameters = EthereumSystem; +} + +impl snowbridge_outbound_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Hashing = Keccak256; + type MessageQueue = MessageQueue; + type Decimals = ConstU8<12>; + type MaxMessagePayloadSize = ConstU32<2048>; + type MaxMessagesPerBlock = ConstU32<32>; + type GasMeter = snowbridge_core::outbound::ConstantGasMeter; + type Balance = Balance; + type WeightToFee = WeightToFee; + type WeightInfo = weights::snowbridge_outbound_queue::WeightInfo; + type PricingParameters = EthereumSystem; + type Channels = EthereumSystem; +} + +#[cfg(not(feature = "beacon-spec-mainnet"))] +parameter_types! { + pub const ChainForkVersions: ForkVersions = ForkVersions { + genesis: Fork { + version: [0, 0, 0, 1], // 0x00000001 + epoch: 0, + }, + altair: Fork { + version: [1, 0, 0, 1], // 0x01000001 + epoch: 0, + }, + bellatrix: Fork { + version: [2, 0, 0, 1], // 0x02000001 + epoch: 0, + }, + capella: Fork { + version: [3, 0, 0, 1], // 0x03000001 + epoch: 0, + }, + }; + pub const MaxExecutionHeadersToKeep:u32 = 1000; +} + +#[cfg(feature = "beacon-spec-mainnet")] +parameter_types! { + pub const ChainForkVersions: ForkVersions = ForkVersions { + genesis: Fork { + version: [0, 0, 0, 0], // 0x00000000 + epoch: 0, + }, + altair: Fork { + version: [1, 0, 0, 0], // 0x01000000 + epoch: 74240, + }, + bellatrix: Fork { + version: [2, 0, 0, 0], // 0x02000000 + epoch: 144896, + }, + capella: Fork { + version: [3, 0, 0, 0], // 0x03000000 + epoch: 194048, + }, + }; + pub const MaxExecutionHeadersToKeep:u32 = 8192 * 2; +} + +impl snowbridge_ethereum_beacon_client::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ForkVersions = ChainForkVersions; + type MaxExecutionHeadersToKeep = MaxExecutionHeadersToKeep; + type WeightInfo = weights::snowbridge_ethereum_beacon_client::WeightInfo; +} + +#[cfg(feature = "runtime-benchmarks")] +impl snowbridge_system::BenchmarkHelper for () { + fn make_xcm_origin(location: xcm::latest::MultiLocation) -> RuntimeOrigin { + RuntimeOrigin::from(pallet_xcm::Origin::Xcm(location)) + } +} + +impl snowbridge_system::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type OutboundQueue = EthereumOutboundQueue; + type SiblingOrigin = EnsureXcm; + type AgentIdOf = snowbridge_core::AgentIdOf; + type TreasuryAccount = TreasuryAccount; + type Token = Balances; + type WeightInfo = weights::snowbridge_system::WeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type Helper = (); + type DefaultPricingParameters = Parameters; + type InboundDeliveryCost = EthereumInboundQueue; +} + // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime @@ -473,6 +648,11 @@ construct_runtime!( BridgeKusamaGrandpa: pallet_bridge_grandpa:: = 51, BridgeKusamaParachains: pallet_bridge_parachains:: = 52, BridgeKusamaMessages: pallet_bridge_messages:: = 53, + + EthereumInboundQueue: snowbridge_inbound_queue = 80, + EthereumOutboundQueue: snowbridge_outbound_queue = 81, + EthereumBeaconClient: snowbridge_ethereum_beacon_client = 82, + EthereumSystem: snowbridge_system = 83, } ); @@ -498,6 +678,11 @@ mod benches { [pallet_bridge_grandpa, KusamaFinality] [pallet_bridge_parachains, KusamaParachains] [pallet_bridge_messages, KusamaMessages] + // Ethereum Bridge + [snowbridge_inbound_queue, EthereumInboundQueue] + [snowbridge_outbound_queue, EthereumOutboundQueue] + [snowbridge_system, EthereumSystem] + [snowbridge_ethereum_beacon_client, EthereumBeaconClient] ); } @@ -699,6 +884,22 @@ impl_runtime_apis! { } } + impl snowbridge_outbound_queue_runtime_api::OutboundQueueApi for Runtime { + fn prove_message(leaf_index: u64) -> Option { + snowbridge_outbound_queue::api::prove_message::(leaf_index) + } + + fn calculate_fee(message: Message) -> Option { + snowbridge_outbound_queue::api::calculate_fee::(message) + } + } + + impl snowbridge_system_runtime_api::ControlApi for Runtime { + fn agent_id(location: VersionedMultiLocation) -> Option { + snowbridge_system::api::agent_id::(location) + } + } + #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_ethereum_beacon_client.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_ethereum_beacon_client.rs new file mode 100644 index 0000000000..3027708e84 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_ethereum_beacon_client.rs @@ -0,0 +1,151 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `snowbridge_ethereum_beacon_client` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-06-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ip-172-31-8-124`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-polkadot-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/polkadot-parachain +// benchmark +// pallet +// --base-path +// /mnt/scratch/benchmark +// --chain=bridge-hub-polkadot-dev +// --pallet=snowbridge_ethereum_beacon_client +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --steps +// 50 +// --repeat +// 20 +// --output +// ./system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_ethereum_beacon_client.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `snowbridge_ethereum_beacon_client`. +pub struct WeightInfo(PhantomData); +impl snowbridge_ethereum_beacon_client::WeightInfo for WeightInfo { + /// Storage: EthereumBeaconClient FinalizedBeaconStateIndex (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconStateIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconStateMapping (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconStateMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient NextSyncCommittee (r:0 w:1) + /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient InitialCheckpointRoot (r:0 w:1) + /// Proof: EthereumBeaconClient InitialCheckpointRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ValidatorsRoot (r:0 w:1) + /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:0 w:1) + /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:0 w:1) + /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestExecutionState (r:0 w:1) + /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconState (r:0 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + fn force_checkpoint() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `3501` + // Minimum execution time: 97_185_781_000 picoseconds. + Weight::from_parts(97_263_571_000, 0) + .saturating_add(Weight::from_parts(0, 3501)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(9)) + } + /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:1) + /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:0) + /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient NextSyncCommittee (r:1 w:0) + /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:1 w:0) + /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) + /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconStateIndex (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconStateIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconStateMapping (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconStateMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) + fn submit() -> Weight { + // Proof Size summary in bytes: + // Measured: `92753` + // Estimated: `93857` + // Minimum execution time: 25_999_968_000 picoseconds. + Weight::from_parts(26_051_019_000, 0) + .saturating_add(Weight::from_parts(0, 93857)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:0) + /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:0) + /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:0) + /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient NextSyncCommittee (r:1 w:1) + /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:1 w:0) + /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) + /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + fn submit_with_sync_committee() -> Weight { + // Proof Size summary in bytes: + // Measured: `92717` + // Estimated: `93857` + // Minimum execution time: 122_354_917_000 picoseconds. + Weight::from_parts(122_461_312_000, 0) + .saturating_add(Weight::from_parts(0, 93857)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:0) + /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:0) + /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:1) + /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ExecutionHeaderIndex (r:1 w:1) + /// Proof: EthereumBeaconClient ExecutionHeaderIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ExecutionHeaderMapping (r:1 w:1) + /// Proof: EthereumBeaconClient ExecutionHeaderMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ExecutionHeaders (r:0 w:1) + /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(136), added: 2611, mode: MaxEncodedLen) + fn submit_execution_header() -> Weight { + // Proof Size summary in bytes: + // Measured: `386` + // Estimated: `3537` + // Minimum execution time: 108_761_000 picoseconds. + Weight::from_parts(113_158_000, 0) + .saturating_add(Weight::from_parts(0, 3537)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_inbound_queue.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_inbound_queue.rs new file mode 100644 index 0000000000..073efc3866 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_inbound_queue.rs @@ -0,0 +1,69 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `snowbridge_inbound_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-09-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `macbook pro 14 m2`, CPU: `m2-arm64` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/polkadot-parachain +// benchmark +// pallet +// --chain=bridge-hub-polkadot-dev +// --pallet=snowbridge_inbound_queue +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --steps +// 50 +// --repeat +// 20 +// --output +// ./system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_inbound_queue.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `snowbridge_inbound_queue`. +pub struct WeightInfo(PhantomData); +impl snowbridge_inbound_queue::WeightInfo for WeightInfo { + /// Storage: EthereumInboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumInboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ExecutionHeaders (r:1 w:0) + /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(136), added: 2611, mode: MaxEncodedLen) + /// Storage: EthereumInboundQueue Nonce (r:1 w:1) + /// Proof: EthereumInboundQueue Nonce (max_values: None, max_size: Some(20), added: 2495, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn submit() -> Weight { + // Proof Size summary in bytes: + // Measured: `457` + // Estimated: `3601` + // Minimum execution time: 69_000_000 picoseconds. + Weight::from_parts(70_000_000, 0) + .saturating_add(Weight::from_parts(0, 3601)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_outbound_queue.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_outbound_queue.rs new file mode 100644 index 0000000000..b5a9610a9a --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_outbound_queue.rs @@ -0,0 +1,87 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `snowbridge_outbound_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-20, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `192.168.1.13`, CPU: `` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-polkadot-dev"), DB CACHE: 1024 + +// Executed Command: +// ../target/release/polkadot-parachain +// benchmark +// pallet +// --chain=bridge-hub-polkadot-dev +// --pallet=snowbridge_outbound_queue +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --output +// ./system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_outbound_queue.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `snowbridge_outbound_queue`. +pub struct WeightInfo(PhantomData); +impl snowbridge_outbound_queue::WeightInfo for WeightInfo { + /// Storage: EthereumOutboundQueue MessageLeaves (r:1 w:1) + /// Proof Skipped: EthereumOutboundQueue MessageLeaves (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: EthereumOutboundQueue PendingHighPriorityMessageCount (r:1 w:1) + /// Proof: EthereumOutboundQueue PendingHighPriorityMessageCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue Nonce (r:1 w:1) + /// Proof: EthereumOutboundQueue Nonce (max_values: None, max_size: Some(20), added: 2495, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue Messages (r:1 w:1) + /// Proof Skipped: EthereumOutboundQueue Messages (max_values: Some(1), max_size: None, mode: Measured) + fn do_process_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `3485` + // Minimum execution time: 39_000_000 picoseconds. + Weight::from_parts(39_000_000, 3485) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + /// Storage: EthereumOutboundQueue MessageLeaves (r:1 w:0) + /// Proof Skipped: EthereumOutboundQueue MessageLeaves (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: System Digest (r:1 w:1) + /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) + fn commit() -> Weight { + // Proof Size summary in bytes: + // Measured: `1094` + // Estimated: `2579` + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(28_000_000, 2579) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + + fn commit_single() -> Weight { + // Proof Size summary in bytes: + // Measured: `1094` + // Estimated: `2579` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_000_000, 1586) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_system.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_system.rs new file mode 100644 index 0000000000..73b219b800 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_system.rs @@ -0,0 +1,256 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `snowbridge_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-09, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `crake.local`, CPU: `` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-polkadot-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// bridge-hub-polkadot-dev +// --pallet=snowbridge_system +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --output +// ./system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_system.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `snowbridge_system`. +pub struct WeightInfo(PhantomData); +impl snowbridge_system::WeightInfo for WeightInfo { + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `3517` + // Minimum execution time: 47_000_000 picoseconds. + Weight::from_parts(47_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: EthereumSystem Agents (r:1 w:1) + /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn create_agent() -> Weight { + // Proof Size summary in bytes: + // Measured: `187` + // Estimated: `6196` + // Minimum execution time: 87_000_000 picoseconds. + Weight::from_parts(87_000_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: EthereumSystem Agents (r:1 w:0) + /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) + /// Storage: EthereumSystem Channels (r:1 w:1) + /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn create_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `602` + // Estimated: `69050` + // Minimum execution time: 84_000_000 picoseconds. + Weight::from_parts(84_000_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: EthereumSystem Channels (r:1 w:0) + /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn update_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `256` + // Estimated: `6044` + // Minimum execution time: 41_000_000 picoseconds. + Weight::from_parts(41_000_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: EthereumSystem Channels (r:1 w:0) + /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn force_update_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `256` + // Estimated: `6044` + // Minimum execution time: 41_000_000 picoseconds. + Weight::from_parts(41_000_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn set_operating_mode() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `3517` + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(30_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: EthereumSystem Agents (r:1 w:0) + /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn transfer_native_from_agent() -> Weight { + // Proof Size summary in bytes: + // Measured: `252` + // Estimated: `6044` + // Minimum execution time: 43_000_000 picoseconds. + Weight::from_parts(43_000_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: EthereumSystem Agents (r:1 w:0) + /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn force_transfer_native_from_agent() -> Weight { + // Proof Size summary in bytes: + // Measured: `252` + // Estimated: `6044` + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(42_000_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn set_token_transfer_fees() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `3517` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(42_000_000, 3517) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn set_pricing_parameters() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `3517` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(42_000_000, 3517) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index a1963efb02..b0afde0240 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -18,7 +18,7 @@ use super::{ bridge_to_kusama_config::{ DeliveryRewardInBalance, RequiredStakeForStakeAndSlash, ToBridgeHubKusamaHaulBlobExporter, }, - AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, + AccountId, AllPalletsWithSystem, Balances, EthereumGatewayAddress, ParachainInfo, ParachainSystem, PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; @@ -34,8 +34,13 @@ use parachains_common::{ }; use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_constants::system_parachain; +use snowbridge_core::DescribeHere; +use snowbridge_polkadot_common::EthereumNetwork; +use snowbridge_runtime_common::XcmExportFeeToSibling; +use sp_core::{Get, H256}; use sp_runtime::traits::AccountIdConversion; use system_parachains_constants::TREASURY_PALLET_ID; +use sp_std::marker::PhantomData; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, @@ -47,7 +52,8 @@ use xcm_builder::{ TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, }; -use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; +use xcm_executor::{traits::{FeeManager, FeeReason, FeeReason::Export, WithOriginFilter}, + XcmExecutor}; parameter_types! { pub const DotRelayLocation: MultiLocation = MultiLocation::parent(); @@ -149,8 +155,9 @@ impl Contains for SafeCallFilter { match call { RuntimeCall::System(frame_system::Call::set_storage { items }) if items.iter().all(|(k, _)| { - k.eq(&DeliveryRewardInBalance::key()) || - k.eq(&RequiredStakeForStakeAndSlash::key()) + k.eq(&DeliveryRewardInBalance::key()) || // todo one or two slashes? + k.eq(&RequiredStakeForStakeAndSlash::key()) | + k.eq(&EthereumGatewayAddress::key()) }) => return true, _ => (), @@ -195,7 +202,15 @@ impl Contains for SafeCallFilter { RuntimeCall::BridgeKusamaMessages(pallet_bridge_messages::Call::< Runtime, crate::bridge_to_kusama_config::WithBridgeHubKusamaMessagesInstance, - >::set_operating_mode { .. }) + >::set_operating_mode { .. }) | + RuntimeCall::EthereumBeaconClient( + snowbridge_ethereum_beacon_client::Call::force_checkpoint { .. } | + snowbridge_ethereum_beacon_client::Call::set_operating_mode { .. }, + ) | RuntimeCall::EthereumInboundQueue( + snowbridge_inbound_queue::Call::set_operating_mode { .. }, + ) | RuntimeCall::EthereumOutboundQueue( + snowbridge_outbound_queue::Call::set_operating_mode { .. }, + ) | RuntimeCall::EthereumSystem(..) ) } } @@ -282,8 +297,24 @@ impl xcm_executor::Config for XcmConfig { type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); - type FeeManager = XcmFeesToAccount; - type MessageExporter = ToBridgeHubKusamaHaulBlobExporter; + type FeeManager = XcmFeeManagerFromComponentsBridgeHub< + WaivedLocations, + ( + XcmExportFeeToSibling< + bp_polkadot::Balance, + AccountId, + TokenLocation, + EthereumNetwork, + Self::AssetTransactor, + crate::EthereumOutboundQueue, + >, + XcmFeeToAccount, // todo check if right + ), + >; + type MessageExporter = ( + ToBridgeHubKusamaHaulBlobExporter, + crate::bridge_to_ethereum_config::SnowbridgeExporter + ); type UniversalAliases = Nothing; type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; @@ -348,3 +379,41 @@ impl cumulus_pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } + +pub struct XcmFeeManagerFromComponentsBridgeHub( + PhantomData<(WaivedLocations, HandleFee)>, +); +impl, FeeHandler: HandleFee> FeeManager +for XcmFeeManagerFromComponentsBridgeHub +{ + fn is_waived(origin: Option<&MultiLocation>, fee_reason: FeeReason) -> bool { + let Some(loc) = origin else { return false }; + if let Export { network, destination: Here } = fee_reason { + return !(network == EthereumNetwork::get()) + } + WaivedLocations::contains(loc) + } + + fn handle_fee(fee: MultiAssets, context: Option<&XcmContext>, reason: FeeReason) { + FeeHandler::handle_fee(fee, context, reason); + } +} + +#[cfg(feature = "runtime-benchmarks")] +pub mod benchmark_helpers { + use crate::{MultiAssets, MultiLocation, SendError, SendResult, SendXcm, Xcm, XcmHash}; + + pub struct DoNothingRouter; + impl SendXcm for DoNothingRouter { + type Ticket = (); + fn validate( + _dest: &mut Option, + _msg: &mut Option>, + ) -> SendResult<()> { + Ok(((), MultiAssets::new())) + } + fn deliver(_: ()) -> Result { + Ok([0; 32]) + } + } +} From b5304acb9eba222bcec47d152e98619b51a64de0 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 9 Jan 2024 12:18:28 +0100 Subject: [PATCH 045/316] Upgrade to latest: `cargo upgrade -v --pinned --incompatible` --- .../assets/asset-hub-kusama/Cargo.toml | 28 +-- .../assets/asset-hub-polkadot/Cargo.toml | 28 +-- integration-tests/emulated/common/Cargo.toml | 62 +++--- relay/kusama/Cargo.toml | 206 +++++++++--------- relay/kusama/constants/Cargo.toml | 16 +- relay/polkadot/Cargo.toml | 198 ++++++++--------- relay/polkadot/constants/Cargo.toml | 16 +- .../asset-hubs/asset-hub-kusama/Cargo.toml | 134 ++++++------ .../asset-hub-kusama/primitives/Cargo.toml | 12 +- .../asset-hubs/asset-hub-polkadot/Cargo.toml | 125 +++++------ .../asset-hub-polkadot/primitives/Cargo.toml | 12 +- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 139 ++++++------ .../bridge-hub-kusama/primitives/Cargo.toml | 14 +- .../bridge-hub-polkadot/Cargo.toml | 146 ++++++------- .../bridge-hub-polkadot/primitives/Cargo.toml | 14 +- .../collectives-polkadot/Cargo.toml | 125 +++++------ system-parachains/constants/Cargo.toml | 12 +- .../gluttons/glutton-kusama/Cargo.toml | 64 +++--- 18 files changed, 675 insertions(+), 676 deletions(-) diff --git a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml index 4b61aa5b12..287a2ed8ed 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml @@ -8,27 +8,27 @@ description = "Asset Hub Kusama runtime integration tests with xcm-emulator" publish = false [dependencies] -codec = { package = "parity-scale-codec", version = "3.4.0" } +codec = { package = "parity-scale-codec", version = "3.6.9" } assert_matches = "1.5.0" # Substrate -sp-runtime = { version = "28.0.0" } -frame-support = { version = "25.0.0" } -frame-system = { version = "25.0.0" } -pallet-assets = { version = "26.0.0" } -pallet-balances = { version = "25.0.0" } -pallet-asset-conversion = { version = "7.0.0" } +sp-runtime = { version = "30.0.1" } +frame-support = { version = "27.0.0" } +frame-system = { version = "27.0.0" } +pallet-assets = { version = "28.0.0" } +pallet-balances = { version = "27.0.0" } +pallet-asset-conversion = { version = "9.0.0" } # Polkadot -polkadot-core-primitives = { version = "4.0.0" } -polkadot-parachain-primitives = { version = "3.0.0" } -polkadot-runtime-parachains = { version = "4.0.0" } -xcm = { package = "staging-xcm", version = "4.0.0" } -pallet-xcm = { version = "4.0.0" } +polkadot-core-primitives = { version = "6.0.0" } +polkadot-parachain-primitives = { version = "5.0.0" } +polkadot-runtime-parachains = { version = "6.0.0" } +xcm = { package = "staging-xcm", version = "6.0.0" } +pallet-xcm = { version = "6.0.0" } # Cumulus -parachains-common = { version = "4.0.0" } -xcm-emulator = { version = "0.2.0" } +parachains-common = { version = "6.0.0" } +xcm-emulator = { version = "0.4.0" } asset-hub-kusama-runtime = { path = "../../../../system-parachains/asset-hubs/asset-hub-kusama" } # Local diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml index eb01b282b8..16b14f0e7d 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml @@ -8,26 +8,26 @@ description = "Asset Hub Polkadot runtime integration tests with xcm-emulator" publish = false [dependencies] -codec = { package = "parity-scale-codec", version = "3.4.0" } +codec = { package = "parity-scale-codec", version = "3.6.9" } # Substrate -sp-runtime = { version = "28.0.0" } -frame-support = { version = "25.0.0" } -frame-system = { version = "25.0.0" } -pallet-assets = { version = "26.0.0" } -pallet-balances = { version = "25.0.0" } -pallet-asset-conversion = { version = "7.0.0" } +sp-runtime = { version = "30.0.1" } +frame-support = { version = "27.0.0" } +frame-system = { version = "27.0.0" } +pallet-assets = { version = "28.0.0" } +pallet-balances = { version = "27.0.0" } +pallet-asset-conversion = { version = "9.0.0" } # Polkadot -polkadot-core-primitives = { version = "4.0.0" } -polkadot-parachain-primitives = { version = "3.0.0" } -polkadot-runtime-parachains = { version = "4.0.0" } -xcm = { package = "staging-xcm", version = "4.0.0" } -pallet-xcm = { version = "4.0.0" } +polkadot-core-primitives = { version = "6.0.0" } +polkadot-parachain-primitives = { version = "5.0.0" } +polkadot-runtime-parachains = { version = "6.0.0" } +xcm = { package = "staging-xcm", version = "6.0.0" } +pallet-xcm = { version = "6.0.0" } # Cumulus -parachains-common = { version = "4.0.0" } -xcm-emulator = { version = "0.2.0" } +parachains-common = { version = "6.0.0" } +xcm-emulator = { version = "0.4.0" } # Local integration-tests-common = { path = "../../common" } diff --git a/integration-tests/emulated/common/Cargo.toml b/integration-tests/emulated/common/Cargo.toml index 76c6cd0c0e..ff465e9a2f 100644 --- a/integration-tests/emulated/common/Cargo.toml +++ b/integration-tests/emulated/common/Cargo.toml @@ -7,41 +7,41 @@ license = "Apache-2.0" description = "Common resources for integration testing with xcm-emulator" [dependencies] -codec = { package = "parity-scale-codec", version = "3.4.0" } +codec = { package = "parity-scale-codec", version = "3.6.9" } paste = "1.0.14" -serde_json = "1.0.108" +serde_json = "1.0.111" # Substrate -grandpa-primitives = { package = "sp-consensus-grandpa", version = "10.0.0" } -sp-authority-discovery = { version = "23.0.0" } -sp-runtime = { version = "28.0.0" } -frame-support = { version = "25.0.0" } -sp-core = { version = "25.0.0" } -sp-consensus-babe = { version = "0.29.0" } -pallet-assets = { version = "26.0.0" } -pallet-balances = { version = "25.0.0" } -pallet-message-queue = { version = "28.0.0" } -pallet-im-online = { version = "24.0.0" } -pallet-staking = { version = "25.0.0" } -beefy-primitives = { package = "sp-consensus-beefy", version = "10.0.0" } +grandpa-primitives = { package = "sp-consensus-grandpa", version = "12.0.0" } +sp-authority-discovery = { version = "25.0.0" } +sp-runtime = { version = "30.0.1" } +frame-support = { version = "27.0.0" } +sp-core = { version = "27.0.0" } +sp-consensus-babe = { version = "0.31.0" } +pallet-assets = { version = "28.0.0" } +pallet-balances = { version = "27.0.0" } +pallet-message-queue = { version = "30.0.0" } +pallet-im-online = { version = "26.0.0" } +pallet-staking = { version = "27.0.0" } +beefy-primitives = { package = "sp-consensus-beefy", version = "12.0.0" } # Polkadot -polkadot-primitives = { version = "4.0.0" } -polkadot-runtime-parachains = { version = "4.0.0" } -xcm = { package = "staging-xcm", version = "4.0.0" } -pallet-xcm = { version = "4.0.0" } -polkadot-core-primitives = { version = "4.0.0" } -polkadot-parachain-primitives = { version = "3.0.0" } +polkadot-primitives = { version = "6.0.0" } +polkadot-runtime-parachains = { version = "6.0.0" } +xcm = { package = "staging-xcm", version = "6.0.0" } +pallet-xcm = { version = "6.0.0" } +polkadot-core-primitives = { version = "6.0.0" } +polkadot-parachain-primitives = { version = "5.0.0" } # Cumulus -parachains-common = { version = "4.0.0" } -cumulus-primitives-core = { version = "0.4.0" } -xcm-emulator = { version = "0.2.0" } -cumulus-pallet-xcmp-queue = { version = "0.4.0" } -cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook",] , version = "0.4.0" } -asset-test-utils = { version = "4.0.0" } -cumulus-pallet-dmp-queue = { version = "0.4.0" } -penpal-runtime = { version = "0.11.1" } +parachains-common = { version = "6.0.0" } +cumulus-primitives-core = { version = "0.6.0" } +xcm-emulator = { version = "0.4.0" } +cumulus-pallet-xcmp-queue = { version = "0.6.0" } +cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook",] , version = "0.6.0" } +asset-test-utils = { version = "6.0.0" } +cumulus-pallet-dmp-queue = { version = "0.6.0" } +penpal-runtime = { version = "0.13.0" } # Local runtimes kusama-runtime = { package = "staging-kusama-runtime", path = "../../../relay/kusama" } @@ -55,9 +55,9 @@ bridge-hub-polkadot-runtime = { path = "../../../system-parachains/bridge-hubs/b bridge-hub-kusama-runtime = { path = "../../../system-parachains/bridge-hubs/bridge-hub-kusama" } # Bridges -bp-messages = { version = "0.4.0" } -pallet-bridge-messages = { version = "0.4.0" } -bridge-runtime-common = { version = "0.4.0" } +bp-messages = { version = "0.6.0" } +pallet-bridge-messages = { version = "0.6.0" } +bridge-runtime-common = { version = "0.6.0" } [features] runtime-benchmarks = [ diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index 98ca1a3786..e271fa7368 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -9,126 +9,126 @@ repository.workspace = true version.workspace = true [dependencies] -bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } -parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive", "max-encoded-len"] } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -log = { version = "0.4.17", default-features = false } +bitvec = { version = "1.0.1", default-features = false, features = ["alloc"] } +parity-scale-codec = { version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +log = { version = "0.4.20", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } -serde = { version = "1.0.188", default-features = false } -serde_derive = { version = "1.0.117", optional = true } +serde = { version = "1.0.195", default-features = false } +serde_derive = { version = "1.0.195", optional = true } static_assertions = "1.1.0" -smallvec = "1.8.0" +smallvec = "1.11.2" -authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "23.0.0" } -babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.29.0" } -beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "10.0.0" } -binary-merkle-tree = { default-features = false , version = "10.0.0" } +authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "25.0.0" } +babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.31.0" } +beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "12.0.0" } +binary-merkle-tree = { default-features = false , version = "12.0.0" } kusama-runtime-constants = { package = "kusama-runtime-constants", path = "constants", default-features = false } -sp-api = { default-features = false , version = "23.0.0" } -inherents = { package = "sp-inherents", default-features = false , version = "23.0.0" } -offchain-primitives = { package = "sp-offchain", default-features = false , version = "23.0.0" } -sp-std = { package = "sp-std", default-features = false , version = "12.0.0" } -sp-application-crypto = { default-features = false , version = "27.0.0" } -sp-arithmetic = { default-features = false , version = "20.0.0" } -sp-genesis-builder = { default-features = false , version = "0.4.0" } -sp-io = { default-features = false , version = "27.0.0" } -sp-mmr-primitives = { default-features = false , version = "23.0.0" } -sp-runtime = { default-features = false , version = "28.0.0" } -sp-staking = { default-features = false , version = "23.0.0" } -sp-core = { default-features = false , version = "25.0.0" } -sp-session = { default-features = false , version = "24.0.0" } -sp-storage = { default-features = false , version = "17.0.0" } -sp-version = { default-features = false , version = "26.0.0" } -tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "23.0.0" } -block-builder-api = { package = "sp-block-builder", default-features = false , version = "23.0.0" } -sp-npos-elections = { default-features = false , version = "23.0.0" } +sp-api = { default-features = false , version = "25.0.0" } +inherents = { package = "sp-inherents", default-features = false , version = "25.0.0" } +offchain-primitives = { package = "sp-offchain", default-features = false , version = "25.0.0" } +sp-std = { package = "sp-std", default-features = false , version = "13.0.0" } +sp-application-crypto = { default-features = false , version = "29.0.0" } +sp-arithmetic = { default-features = false , version = "22.0.0" } +sp-genesis-builder = { default-features = false , version = "0.6.0" } +sp-io = { default-features = false , version = "29.0.0" } +sp-mmr-primitives = { default-features = false , version = "25.0.0" } +sp-runtime = { default-features = false , version = "30.0.1" } +sp-staking = { default-features = false , version = "25.0.0" } +sp-core = { default-features = false , version = "27.0.0" } +sp-session = { default-features = false , version = "26.0.0" } +sp-storage = { default-features = false , version = "18.0.0" } +sp-version = { default-features = false , version = "28.0.0" } +tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "25.0.0" } +block-builder-api = { package = "sp-block-builder", default-features = false , version = "25.0.0" } +sp-npos-elections = { default-features = false , version = "25.0.0" } -pallet-asset-rate = { default-features = false , version = "4.0.0" } -pallet-authority-discovery = { default-features = false , version = "25.0.0" } -pallet-authorship = { default-features = false , version = "25.0.0" } -pallet-babe = { default-features = false , version = "25.0.0" } -pallet-bags-list = { default-features = false , version = "24.0.0" } -pallet-balances = { default-features = false , version = "25.0.0" } -pallet-beefy = { default-features = false , version = "25.0.0" } -pallet-beefy-mmr = { default-features = false , version = "25.0.0" } -pallet-bounties = { default-features = false , version = "24.0.0" } -pallet-child-bounties = { default-features = false , version = "24.0.0" } -pallet-transaction-payment = { default-features = false , version = "25.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "25.0.0" } -pallet-nomination-pools-runtime-api = { default-features = false , version = "20.0.0" } -pallet-collective = { default-features = false , version = "25.0.0" } -pallet-conviction-voting = { default-features = false , version = "25.0.0" } -pallet-democracy = { default-features = false , version = "25.0.0" } -pallet-elections-phragmen = { default-features = false , version = "26.0.0" } -pallet-election-provider-multi-phase = { default-features = false , version = "24.0.0" } -pallet-fast-unstake = { default-features = false , version = "24.0.0" } -frame-executive = { default-features = false , version = "25.0.0" } -pallet-grandpa = { default-features = false , version = "25.0.0" } -pallet-nis = { default-features = false , version = "25.0.0" } -pallet-identity = { default-features = false , version = "25.0.0" } -pallet-im-online = { default-features = false , version = "24.0.0" } -pallet-indices = { default-features = false , version = "25.0.0" } -pallet-membership = { default-features = false , version = "25.0.0" } -pallet-message-queue = { default-features = false , version = "28.0.0" } -pallet-mmr = { default-features = false , version = "24.0.0" } -pallet-multisig = { default-features = false , version = "25.0.0" } -pallet-nomination-pools = { default-features = false , version = "22.0.2" } -pallet-offences = { default-features = false , version = "24.0.0" } -pallet-preimage = { default-features = false , version = "25.0.0" } -pallet-proxy = { default-features = false , version = "25.0.0" } -pallet-ranked-collective = { default-features = false , version = "25.0.0" } -pallet-recovery = { default-features = false , version = "25.0.0" } -pallet-referenda = { default-features = false , version = "25.0.0" } -pallet-scheduler = { default-features = false , version = "26.0.0" } -pallet-session = { default-features = false , version = "25.0.0" } -pallet-society = { default-features = false, version = "25.0.0" } -frame-support = { default-features = false , version = "25.0.0" } -pallet-staking = { default-features = false , version = "25.0.0" } -pallet-state-trie-migration = { default-features = false , version = "26.0.0" } -pallet-staking-runtime-api = { default-features = false , version = "11.0.0" } -frame-system = { default-features = false , version = "25.0.0" } -frame-system-rpc-runtime-api = { default-features = false , version = "23.0.0" } -pallet-timestamp = { default-features = false , version = "24.0.0" } -pallet-tips = { default-features = false , version = "24.0.0" } -pallet-treasury = { default-features = false , version = "24.0.0" } -pallet-utility = { default-features = false , version = "25.0.0" } -pallet-vesting = { default-features = false , version = "25.0.0" } -pallet-whitelist = { default-features = false , version = "24.0.0" } -pallet-xcm = { default-features = false , version = "4.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } -frame-election-provider-support = { default-features = false , version = "25.0.0" } +pallet-asset-rate = { default-features = false , version = "6.0.0" } +pallet-authority-discovery = { default-features = false , version = "27.0.0" } +pallet-authorship = { default-features = false , version = "27.0.0" } +pallet-babe = { default-features = false , version = "27.0.0" } +pallet-bags-list = { default-features = false , version = "26.0.0" } +pallet-balances = { default-features = false , version = "27.0.0" } +pallet-beefy = { default-features = false , version = "27.0.0" } +pallet-beefy-mmr = { default-features = false , version = "27.0.0" } +pallet-bounties = { default-features = false , version = "26.0.0" } +pallet-child-bounties = { default-features = false , version = "26.0.0" } +pallet-transaction-payment = { default-features = false , version = "27.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "27.0.0" } +pallet-nomination-pools-runtime-api = { default-features = false , version = "22.0.0" } +pallet-collective = { default-features = false , version = "27.0.0" } +pallet-conviction-voting = { default-features = false , version = "27.0.0" } +pallet-democracy = { default-features = false , version = "27.0.0" } +pallet-elections-phragmen = { default-features = false , version = "28.0.0" } +pallet-election-provider-multi-phase = { default-features = false , version = "26.0.0" } +pallet-fast-unstake = { default-features = false , version = "26.0.0" } +frame-executive = { default-features = false , version = "27.0.0" } +pallet-grandpa = { default-features = false , version = "27.0.0" } +pallet-nis = { default-features = false , version = "27.0.0" } +pallet-identity = { default-features = false , version = "27.0.0" } +pallet-im-online = { default-features = false , version = "26.0.0" } +pallet-indices = { default-features = false , version = "27.0.0" } +pallet-membership = { default-features = false , version = "27.0.0" } +pallet-message-queue = { default-features = false , version = "30.0.0" } +pallet-mmr = { default-features = false , version = "26.0.0" } +pallet-multisig = { default-features = false , version = "27.0.0" } +pallet-nomination-pools = { default-features = false , version = "24.0.0" } +pallet-offences = { default-features = false , version = "26.0.0" } +pallet-preimage = { default-features = false , version = "27.0.0" } +pallet-proxy = { default-features = false , version = "27.0.0" } +pallet-ranked-collective = { default-features = false , version = "27.0.0" } +pallet-recovery = { default-features = false , version = "27.0.0" } +pallet-referenda = { default-features = false , version = "27.0.0" } +pallet-scheduler = { default-features = false , version = "28.0.0" } +pallet-session = { default-features = false , version = "27.0.0" } +pallet-society = { default-features = false, version = "27.0.0" } +frame-support = { default-features = false , version = "27.0.0" } +pallet-staking = { default-features = false , version = "27.0.0" } +pallet-state-trie-migration = { default-features = false , version = "28.0.0" } +pallet-staking-runtime-api = { default-features = false , version = "13.0.0" } +frame-system = { default-features = false , version = "27.0.0" } +frame-system-rpc-runtime-api = { default-features = false , version = "25.0.0" } +pallet-timestamp = { default-features = false , version = "26.0.0" } +pallet-tips = { default-features = false , version = "26.0.0" } +pallet-treasury = { default-features = false , version = "26.0.0" } +pallet-utility = { default-features = false , version = "27.0.0" } +pallet-vesting = { default-features = false , version = "27.0.0" } +pallet-whitelist = { default-features = false , version = "26.0.0" } +pallet-xcm = { default-features = false , version = "6.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } +frame-election-provider-support = { default-features = false , version = "27.0.0" } -frame-benchmarking = { default-features = false, optional = true , version = "25.0.0" } -frame-try-runtime = { default-features = false, optional = true , version = "0.31.0" } -pallet-offences-benchmarking = { default-features = false, optional = true , version = "25.0.0" } -pallet-session-benchmarking = { default-features = false, optional = true , version = "25.0.0" } -pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "23.0.0" } -frame-system-benchmarking = { default-features = false, optional = true , version = "25.0.0" } -pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "24.0.0" } +frame-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +frame-try-runtime = { default-features = false, optional = true , version = "0.33.0" } +pallet-offences-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +pallet-session-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "25.0.0" } +frame-system-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "26.0.0" } hex-literal = "0.4.1" -runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "4.0.0" } -runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "4.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "4.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "6.0.0" } +runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "6.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "6.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "4.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "4.0.2" } -xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "4.0.0" } +xcm = { package = "staging-xcm", default-features = false , version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "6.0.0" } sp-debug-derive = { default-features = false, version = "10.0.0" } [dev-dependencies] tiny-keccak = { version = "2.0.2", features = ["keccak"] } -keyring = { package = "sp-keyring", version = "28.0.0" } -sp-trie = { version = "26.0.0" } +keyring = { package = "sp-keyring", version = "30.0.0" } +sp-trie = { version = "28.0.0" } separator = "0.4.1" -serde_json = "1.0.96" -remote-externalities = { package = "frame-remote-externalities" , version = "0.32.0" } -tokio = { version = "1.24.2", features = ["macros"] } -sp-tracing = { default-features = false , version = "14.0.0" } +serde_json = "1.0.111" +remote-externalities = { package = "frame-remote-externalities" , version = "0.34.0" } +tokio = { version = "1.35.1", features = ["macros"] } +sp-tracing = { default-features = false , version = "15.0.0" } [build-dependencies] -substrate-wasm-builder = { version = "14.0.0" } +substrate-wasm-builder = { version = "16.0.0" } [features] default = [ "std" ] diff --git a/relay/kusama/constants/Cargo.toml b/relay/kusama/constants/Cargo.toml index 9127334bdc..b560f49ae0 100644 --- a/relay/kusama/constants/Cargo.toml +++ b/relay/kusama/constants/Cargo.toml @@ -7,16 +7,16 @@ edition.workspace = true license.workspace = true [dependencies] -smallvec = "1.8.0" +smallvec = "1.11.2" -frame-support = { default-features = false , version = "25.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "4.0.0" } -runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "4.0.0" } -sp-runtime = { default-features = false , version = "28.0.0" } -sp-weights = { default-features = false , version = "24.0.0" } -sp-core = { default-features = false , version = "25.0.0" } +frame-support = { default-features = false , version = "27.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "6.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "6.0.0" } +sp-runtime = { default-features = false , version = "30.0.1" } +sp-weights = { default-features = false , version = "26.0.0" } +sp-core = { default-features = false , version = "27.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "4.0.0" } +xcm = { package = "staging-xcm", default-features = false , version = "6.0.0" } [features] default = [ "std" ] diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index bb228447df..40f5f7f32e 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -8,124 +8,124 @@ edition.workspace = true license.workspace = true [dependencies] -bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } -parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive", "max-encoded-len"] } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -log = { version = "0.4.17", default-features = false } +bitvec = { version = "1.0.1", default-features = false, features = ["alloc"] } +parity-scale-codec = { version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +log = { version = "0.4.20", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } -serde = { version = "1.0.188", default-features = false } -serde_derive = { version = "1.0.117", optional = true } +serde = { version = "1.0.195", default-features = false } +serde_derive = { version = "1.0.195", optional = true } static_assertions = "1.1.0" -smallvec = "1.8.0" +smallvec = "1.11.2" -authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "23.0.0" } -babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.29.0" } -beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "10.0.0" } -binary-merkle-tree = { default-features = false , version = "10.0.0" } -block-builder-api = { package = "sp-block-builder", default-features = false , version = "23.0.0" } -inherents = { package = "sp-inherents", default-features = false , version = "23.0.0" } -offchain-primitives = { package = "sp-offchain", default-features = false , version = "23.0.0" } -tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "23.0.0" } -sp-arithmetic = { default-features = false , version = "20.0.0" } -sp-api = { default-features = false , version = "23.0.0" } -sp-genesis-builder = { default-features = false , version = "0.4.0" } -sp-std = { default-features = false , version = "12.0.0" } -sp-application-crypto = { default-features = false , version = "27.0.0" } -sp-io = { default-features = false , version = "27.0.0" } -sp-mmr-primitives = { default-features = false , version = "23.0.0" } -sp-runtime = { default-features = false , version = "28.0.0" } -sp-staking = { default-features = false , version = "23.0.0" } -sp-core = { default-features = false , version = "25.0.0" } -sp-session = { default-features = false , version = "24.0.0" } -sp-storage = { default-features = false , version = "17.0.0" } -sp-version = { default-features = false , version = "26.0.0" } -sp-npos-elections = { default-features = false , version = "23.0.0" } +authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "25.0.0" } +babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.31.0" } +beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "12.0.0" } +binary-merkle-tree = { default-features = false , version = "12.0.0" } +block-builder-api = { package = "sp-block-builder", default-features = false , version = "25.0.0" } +inherents = { package = "sp-inherents", default-features = false , version = "25.0.0" } +offchain-primitives = { package = "sp-offchain", default-features = false , version = "25.0.0" } +tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "25.0.0" } +sp-arithmetic = { default-features = false , version = "22.0.0" } +sp-api = { default-features = false , version = "25.0.0" } +sp-genesis-builder = { default-features = false , version = "0.6.0" } +sp-std = { default-features = false , version = "13.0.0" } +sp-application-crypto = { default-features = false , version = "29.0.0" } +sp-io = { default-features = false , version = "29.0.0" } +sp-mmr-primitives = { default-features = false , version = "25.0.0" } +sp-runtime = { default-features = false , version = "30.0.1" } +sp-staking = { default-features = false , version = "25.0.0" } +sp-core = { default-features = false , version = "27.0.0" } +sp-session = { default-features = false , version = "26.0.0" } +sp-storage = { default-features = false , version = "18.0.0" } +sp-version = { default-features = false , version = "28.0.0" } +sp-npos-elections = { default-features = false , version = "25.0.0" } -pallet-asset-rate = { default-features = false , version = "4.0.0" } -pallet-authority-discovery = { default-features = false , version = "25.0.0" } -pallet-authorship = { default-features = false , version = "25.0.0" } -pallet-babe = { default-features = false , version = "25.0.0" } -pallet-bags-list = { default-features = false , version = "24.0.0" } -pallet-balances = { default-features = false , version = "25.0.0" } -pallet-beefy = { default-features = false , version = "25.0.0" } -pallet-beefy-mmr = { default-features = false , version = "25.0.0" } -pallet-bounties = { default-features = false , version = "24.0.0" } -pallet-child-bounties = { default-features = false , version = "24.0.0" } -pallet-transaction-payment = { default-features = false , version = "25.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "25.0.0" } -pallet-collective = { default-features = false , version = "25.0.0" } -pallet-conviction-voting = { default-features = false , version = "25.0.0" } -pallet-democracy = { default-features = false , version = "25.0.0" } -pallet-elections-phragmen = { default-features = false , version = "26.0.0" } -pallet-election-provider-multi-phase = { default-features = false , version = "24.0.0" } -pallet-fast-unstake = { default-features = false , version = "24.0.0" } -frame-executive = { default-features = false , version = "25.0.0" } -pallet-grandpa = { default-features = false , version = "25.0.0" } -pallet-identity = { default-features = false , version = "25.0.0" } -pallet-im-online = { default-features = false , version = "24.0.0" } -pallet-indices = { default-features = false , version = "25.0.0" } -pallet-membership = { default-features = false , version = "25.0.0" } -pallet-message-queue = { default-features = false , version = "28.0.0" } -pallet-mmr = { default-features = false , version = "24.0.0" } -pallet-multisig = { default-features = false , version = "25.0.0" } -pallet-nomination-pools = { default-features = false , version = "22.0.2" } -pallet-nomination-pools-runtime-api = { default-features = false , version = "20.0.0" } -pallet-offences = { default-features = false , version = "24.0.0" } -pallet-preimage = { default-features = false , version = "25.0.0" } -pallet-proxy = { default-features = false , version = "25.0.0" } -pallet-referenda = { default-features = false , version = "25.0.0" } -pallet-scheduler = { default-features = false , version = "26.0.0" } -pallet-session = { default-features = false , version = "25.0.0" } -frame-support = { default-features = false , version = "25.0.0" } -pallet-staking = { default-features = false , version = "25.0.0" } -pallet-staking-reward-fn = { default-features = false, version = "16.0.0" } +pallet-asset-rate = { default-features = false , version = "6.0.0" } +pallet-authority-discovery = { default-features = false , version = "27.0.0" } +pallet-authorship = { default-features = false , version = "27.0.0" } +pallet-babe = { default-features = false , version = "27.0.0" } +pallet-bags-list = { default-features = false , version = "26.0.0" } +pallet-balances = { default-features = false , version = "27.0.0" } +pallet-beefy = { default-features = false , version = "27.0.0" } +pallet-beefy-mmr = { default-features = false , version = "27.0.0" } +pallet-bounties = { default-features = false , version = "26.0.0" } +pallet-child-bounties = { default-features = false , version = "26.0.0" } +pallet-transaction-payment = { default-features = false , version = "27.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "27.0.0" } +pallet-collective = { default-features = false , version = "27.0.0" } +pallet-conviction-voting = { default-features = false , version = "27.0.0" } +pallet-democracy = { default-features = false , version = "27.0.0" } +pallet-elections-phragmen = { default-features = false , version = "28.0.0" } +pallet-election-provider-multi-phase = { default-features = false , version = "26.0.0" } +pallet-fast-unstake = { default-features = false , version = "26.0.0" } +frame-executive = { default-features = false , version = "27.0.0" } +pallet-grandpa = { default-features = false , version = "27.0.0" } +pallet-identity = { default-features = false , version = "27.0.0" } +pallet-im-online = { default-features = false , version = "26.0.0" } +pallet-indices = { default-features = false , version = "27.0.0" } +pallet-membership = { default-features = false , version = "27.0.0" } +pallet-message-queue = { default-features = false , version = "30.0.0" } +pallet-mmr = { default-features = false , version = "26.0.0" } +pallet-multisig = { default-features = false , version = "27.0.0" } +pallet-nomination-pools = { default-features = false , version = "24.0.0" } +pallet-nomination-pools-runtime-api = { default-features = false , version = "22.0.0" } +pallet-offences = { default-features = false , version = "26.0.0" } +pallet-preimage = { default-features = false , version = "27.0.0" } +pallet-proxy = { default-features = false , version = "27.0.0" } +pallet-referenda = { default-features = false , version = "27.0.0" } +pallet-scheduler = { default-features = false , version = "28.0.0" } +pallet-session = { default-features = false , version = "27.0.0" } +frame-support = { default-features = false , version = "27.0.0" } +pallet-staking = { default-features = false , version = "27.0.0" } +pallet-staking-reward-fn = { default-features = false, version = "18.0.0" } pallet-staking-reward-curve = { version = "10.0.0" } -pallet-staking-runtime-api = { default-features = false , version = "11.0.0" } -frame-system = { default-features = false , version = "25.0.0" } -frame-system-rpc-runtime-api = { default-features = false , version = "23.0.0" } +pallet-staking-runtime-api = { default-features = false , version = "13.0.0" } +frame-system = { default-features = false , version = "27.0.0" } +frame-system-rpc-runtime-api = { default-features = false , version = "25.0.0" } polkadot-runtime-constants = { package = "polkadot-runtime-constants", path = "constants", default-features = false } -pallet-timestamp = { default-features = false , version = "24.0.0" } -pallet-tips = { default-features = false , version = "24.0.0" } -pallet-treasury = { default-features = false , version = "24.0.0" } -pallet-whitelist = { default-features = false , version = "24.0.0" } -pallet-vesting = { default-features = false , version = "25.0.0" } -pallet-utility = { default-features = false , version = "25.0.0" } -frame-election-provider-support = { default-features = false , version = "25.0.0" } -pallet-xcm = { default-features = false, version = "4.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } +pallet-timestamp = { default-features = false , version = "26.0.0" } +pallet-tips = { default-features = false , version = "26.0.0" } +pallet-treasury = { default-features = false , version = "26.0.0" } +pallet-whitelist = { default-features = false , version = "26.0.0" } +pallet-vesting = { default-features = false , version = "27.0.0" } +pallet-utility = { default-features = false , version = "27.0.0" } +frame-election-provider-support = { default-features = false , version = "27.0.0" } +pallet-xcm = { default-features = false, version = "6.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } -frame-benchmarking = { default-features = false, optional = true , version = "25.0.0" } -frame-try-runtime = { default-features = false, optional = true , version = "0.31.0" } -frame-system-benchmarking = { default-features = false, optional = true , version = "25.0.0" } -pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "24.0.0" } -pallet-offences-benchmarking = { default-features = false, optional = true , version = "25.0.0" } -pallet-session-benchmarking = { default-features = false, optional = true , version = "25.0.0" } -pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "23.0.0" } +frame-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +frame-try-runtime = { default-features = false, optional = true , version = "0.33.0" } +frame-system-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "26.0.0" } +pallet-offences-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +pallet-session-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "25.0.0" } hex-literal = { version = "0.4.1", optional = true } -runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "4.0.0" } -runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "4.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "4.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "6.0.0" } +runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "6.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "6.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "4.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "4.0.2" } -xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "4.0.0" } +xcm = { package = "staging-xcm", default-features = false , version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "6.0.0" } sp-debug-derive = { default-features = false, version = "10.0.0" } [dev-dependencies] hex-literal = "0.4.1" tiny-keccak = { version = "2.0.2", features = ["keccak"] } -keyring = { package = "sp-keyring", version = "28.0.0" } -sp-trie = { version = "26.0.0" } -serde_json = "1.0.96" +keyring = { package = "sp-keyring", version = "30.0.0" } +sp-trie = { version = "28.0.0" } +serde_json = "1.0.111" separator = "0.4.1" -remote-externalities = { package = "frame-remote-externalities" , version = "0.32.0" } -tokio = { version = "1.24.2", features = ["macros"] } -sp-tracing = { default-features = false , version = "14.0.0" } +remote-externalities = { package = "frame-remote-externalities" , version = "0.34.0" } +tokio = { version = "1.35.1", features = ["macros"] } +sp-tracing = { default-features = false , version = "15.0.0" } [build-dependencies] -substrate-wasm-builder = { version = "14.0.0" } +substrate-wasm-builder = { version = "16.0.0" } [features] default = [ "std" ] diff --git a/relay/polkadot/constants/Cargo.toml b/relay/polkadot/constants/Cargo.toml index 706b43261e..1c6ad326da 100644 --- a/relay/polkadot/constants/Cargo.toml +++ b/relay/polkadot/constants/Cargo.toml @@ -7,16 +7,16 @@ edition.workspace = true license.workspace = true [dependencies] -smallvec = "1.8.0" +smallvec = "1.11.2" -frame-support = { default-features = false , version = "25.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "4.0.0" } -runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "4.0.0" } -sp-runtime = { default-features = false , version = "28.0.0" } -sp-weights = { default-features = false , version = "24.0.0" } -sp-core = { default-features = false , version = "25.0.0" } +frame-support = { default-features = false , version = "27.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "6.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "6.0.0" } +sp-runtime = { default-features = false , version = "30.0.1" } +sp-weights = { default-features = false , version = "26.0.0" } +sp-core = { default-features = false , version = "27.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "4.0.0" } +xcm = { package = "staging-xcm", default-features = false , version = "6.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index 123c315ab5..5cc3187d7d 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -9,10 +9,11 @@ repository.workspace = true version.workspace = true [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] } +codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } hex-literal = { version = "0.4.1" } log = { version = "0.4.20", default-features = false } -scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +smallvec = "1.11.2" # Local bp-asset-hub-kusama = { path = "./primitives", default-features = false} @@ -23,85 +24,86 @@ kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-f polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-executive = { default-features = false, version = "25.0.0" } -frame-support = { default-features = false, version = "25.0.0" } -frame-system = { default-features = false, version = "25.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } -pallet-asset-conversion-tx-payment = { default-features = false, version = "7.0.0" } -pallet-assets = { default-features = false, version = "26.0.0" } -pallet-asset-conversion = { default-features = false, version = "7.0.0" } -pallet-aura = { default-features = false, version = "24.0.0" } -pallet-authorship = { default-features = false, version = "25.0.0" } -pallet-balances = { default-features = false, version = "25.0.0" } -pallet-multisig = { default-features = false, version = "25.0.0" } -pallet-nft-fractionalization = { default-features = false, version = "7.0.0" } -pallet-nfts = { default-features = false, version = "19.0.0" } -pallet-nfts-runtime-api = { default-features = false, version = "11.0.0" } -pallet-proxy = { default-features = false, version = "25.0.0" } -pallet-session = { default-features = false, version = "25.0.0" } -pallet-state-trie-migration = { default-features = false, optional = true , version = "26.0.0" } -pallet-timestamp = { default-features = false, version = "24.0.0" } -pallet-transaction-payment = { default-features = false, version = "25.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" } -pallet-uniques = { default-features = false, version = "25.0.0" } -pallet-utility = { default-features = false, version = "25.0.0" } -sp-api = { default-features = false, version = "23.0.0" } -sp-block-builder = { default-features = false, version = "23.0.0" } -sp-consensus-aura = { default-features = false, version = "0.29.0" } -sp-core = { default-features = false, version = "25.0.0" } -sp-genesis-builder = { default-features = false , version = "0.4.0" } -sp-inherents = { default-features = false, version = "23.0.0" } -sp-offchain = { default-features = false, version = "23.0.0" } -sp-runtime = { default-features = false, version = "28.0.0" } -sp-session = { default-features = false, version = "24.0.0" } -sp-std = { default-features = false, version = "12.0.0" } -sp-storage = { default-features = false, version = "17.0.0" } -sp-transaction-pool = { default-features = false, version = "23.0.0" } -sp-version = { default-features = false, version = "26.0.0" } -sp-weights = { default-features = false, version = "24.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-executive = { default-features = false, version = "27.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +frame-system = { default-features = false, version = "27.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } +pallet-asset-conversion-tx-payment = { default-features = false, version = "9.0.0" } +pallet-assets = { default-features = false, version = "28.0.0" } +pallet-asset-conversion = { default-features = false, version = "9.0.0" } +pallet-aura = { default-features = false, version = "26.0.0" } +pallet-authorship = { default-features = false, version = "27.0.0" } +pallet-balances = { default-features = false, version = "27.0.0" } +pallet-multisig = { default-features = false, version = "27.0.0" } +pallet-nft-fractionalization = { default-features = false, version = "9.0.0" } +pallet-nfts = { default-features = false, version = "21.0.0" } +pallet-nfts-runtime-api = { default-features = false, version = "13.0.0" } +pallet-proxy = { default-features = false, version = "27.0.0" } +pallet-session = { default-features = false, version = "27.0.0" } +pallet-state-trie-migration = { default-features = false, optional = true , version = "28.0.0" } +pallet-timestamp = { default-features = false, version = "26.0.0" } +pallet-transaction-payment = { default-features = false, version = "27.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "27.0.0" } +pallet-uniques = { default-features = false, version = "27.0.0" } +pallet-utility = { default-features = false, version = "27.0.0" } +sp-api = { default-features = false, version = "25.0.0" } +sp-block-builder = { default-features = false, version = "25.0.0" } +sp-consensus-aura = { default-features = false, version = "0.31.0" } +sp-core = { default-features = false, version = "27.0.0" } +sp-genesis-builder = { default-features = false , version = "0.6.0" } +sp-inherents = { default-features = false, version = "25.0.0" } +sp-offchain = { default-features = false, version = "25.0.0" } +sp-runtime = { default-features = false, version = "30.0.1" } +sp-session = { default-features = false, version = "26.0.0" } +sp-std = { default-features = false, version = "13.0.0" } +sp-storage = { default-features = false, version = "18.0.0" } +sp-transaction-pool = { default-features = false, version = "25.0.0" } +sp-version = { default-features = false, version = "28.0.0" } +sp-weights = { default-features = false, version = "26.0.0" } # num-traits feature needed for dex integer sq root: primitive-types = { version = "0.12.2", default-features = false, features = ["codec", "scale-info", "num-traits"] } # Polkadot -pallet-xcm = { default-features = false, version = "4.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } -polkadot-core-primitives = { default-features = false, version = "4.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "3.0.0" } -polkadot-runtime-common = { default-features = false, version = "4.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.2" } +pallet-xcm = { default-features = false, version = "6.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } +polkadot-core-primitives = { default-features = false, version = "6.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } +polkadot-runtime-common = { default-features = false, version = "6.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } -cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.4.0" } -cumulus-primitives-core = { default-features = false , version = "0.4.0" } -cumulus-primitives-utility = { default-features = false , version = "0.4.0" } -pallet-collator-selection = { default-features = false , version = "6.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } -parachains-common = { default-features = false , version = "4.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.6.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.6.0" } +cumulus-primitives-core = { default-features = false , version = "0.6.0" } +cumulus-primitives-utility = { default-features = false , version = "0.6.0" } +pallet-collator-selection = { default-features = false , version = "8.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } +parachains-common = { default-features = false , version = "6.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } -assets-common = { default-features = false , version = "0.4.0" } +assets-common = { default-features = false , version = "0.6.0" } # Bridges -pallet-xcm-bridge-hub-router = { default-features = false , version = "0.2.0" } +pallet-xcm-bridge-hub-router = { default-features = false , version = "0.4.0" } snowbridge-router-primitives = { default-features = false , version = "1.0.0" } #todo publish snowbridge-kusama-common = { default-features = false , version = "1.0.0" } #todo publish + [dev-dependencies] -asset-test-utils = { version = "4.0.0" } -parachains-runtimes-test-utils = { version = "4.0.0" } -sp-io = { version = "27.0.0" } +asset-test-utils = { version = "6.0.0" } +parachains-runtimes-test-utils = { version = "6.0.0" } +sp-io = { version = "29.0.0" } [build-dependencies] -substrate-wasm-builder = { optional = true , version = "14.0.0" } +substrate-wasm-builder = { optional = true , version = "16.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml index b8eab108b7..2382481ca3 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml @@ -8,18 +8,18 @@ edition.workspace = true license.workspace = true [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] } -scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # Bridge Dependencies -bp-xcm-bridge-hub-router = { default-features = false , version = "0.3.0" } +bp-xcm-bridge-hub-router = { default-features = false , version = "0.5.0" } # Substrate Based Dependencies -frame-support = { default-features = false, version = "25.0.0" } -sp-std = { default-features = false, version = "12.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +sp-std = { default-features = false, version = "13.0.0" } # Polkadot -xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 54bd1cdde4..6aee3fc806 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -9,10 +9,11 @@ repository.workspace = true version.workspace = true [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] } +codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } hex-literal = { version = "0.4.1", optional = true } log = { version = "0.4.20", default-features = false } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +smallvec = "1.11.2" # Local bp-asset-hub-kusama = { path = "../asset-hub-kusama/primitives", default-features = false} @@ -23,81 +24,81 @@ kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-f polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-executive = { default-features = false, version = "25.0.0" } -frame-support = { default-features = false, version = "25.0.0" } -frame-system = { default-features = false, version = "25.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } -pallet-asset-tx-payment = { default-features = false , version = "25.0.0" } -pallet-assets = { default-features = false, version = "26.0.0" } -pallet-aura = { default-features = false, version = "24.0.0" } -pallet-authorship = { default-features = false, version = "25.0.0" } -pallet-balances = { default-features = false, version = "25.0.0" } -pallet-multisig = { default-features = false, version = "25.0.0" } -pallet-nfts = { default-features = false, version = "19.0.0" } -pallet-nfts-runtime-api = { default-features = false, version = "11.0.0" } -pallet-proxy = { default-features = false, version = "25.0.0" } -pallet-session = { default-features = false, version = "25.0.0" } -pallet-timestamp = { default-features = false, version = "24.0.0" } -pallet-transaction-payment = { default-features = false, version = "25.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" } -pallet-uniques = { default-features = false, version = "25.0.0" } -pallet-utility = { default-features = false, version = "25.0.0" } -sp-api = { default-features = false, version = "23.0.0" } -sp-block-builder = { default-features = false, version = "23.0.0" } -sp-consensus-aura = { default-features = false, version = "0.29.0" } -sp-core = { default-features = false, version = "25.0.0" } -sp-genesis-builder = { default-features = false , version = "0.4.0" } -sp-inherents = { default-features = false, version = "23.0.0" } -sp-offchain = { default-features = false, version = "23.0.0" } -sp-runtime = { default-features = false, version = "28.0.0" } -sp-session = { default-features = false, version = "24.0.0" } -sp-std = { default-features = false, version = "12.0.0" } -sp-storage = { default-features = false, version = "17.0.0" } -sp-transaction-pool = { default-features = false, version = "23.0.0" } -sp-version = { default-features = false, version = "26.0.0" } -sp-weights = { default-features = false, version = "24.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-executive = { default-features = false, version = "27.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +frame-system = { default-features = false, version = "27.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } +pallet-asset-tx-payment = { default-features = false , version = "27.0.0" } +pallet-assets = { default-features = false, version = "28.0.0" } +pallet-aura = { default-features = false, version = "26.0.0" } +pallet-authorship = { default-features = false, version = "27.0.0" } +pallet-balances = { default-features = false, version = "27.0.0" } +pallet-multisig = { default-features = false, version = "27.0.0" } +pallet-nfts = { default-features = false, version = "21.0.0" } +pallet-nfts-runtime-api = { default-features = false, version = "13.0.0" } +pallet-proxy = { default-features = false, version = "27.0.0" } +pallet-session = { default-features = false, version = "27.0.0" } +pallet-timestamp = { default-features = false, version = "26.0.0" } +pallet-transaction-payment = { default-features = false, version = "27.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "27.0.0" } +pallet-uniques = { default-features = false, version = "27.0.0" } +pallet-utility = { default-features = false, version = "27.0.0" } +sp-api = { default-features = false, version = "25.0.0" } +sp-block-builder = { default-features = false, version = "25.0.0" } +sp-consensus-aura = { default-features = false, version = "0.31.0" } +sp-core = { default-features = false, version = "27.0.0" } +sp-genesis-builder = { default-features = false , version = "0.6.0" } +sp-inherents = { default-features = false, version = "25.0.0" } +sp-offchain = { default-features = false, version = "25.0.0" } +sp-runtime = { default-features = false, version = "30.0.1" } +sp-session = { default-features = false, version = "26.0.0" } +sp-std = { default-features = false, version = "13.0.0" } +sp-storage = { default-features = false, version = "18.0.0" } +sp-transaction-pool = { default-features = false, version = "25.0.0" } +sp-version = { default-features = false, version = "28.0.0" } +sp-weights = { default-features = false, version = "26.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "4.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } -polkadot-core-primitives = { default-features = false, version = "4.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "3.0.0" } -polkadot-runtime-common = { default-features = false, version = "4.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.2" } +pallet-xcm = { default-features = false, version = "6.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } +polkadot-core-primitives = { default-features = false, version = "6.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } +polkadot-runtime-common = { default-features = false, version = "6.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } -cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.4.0" } -cumulus-primitives-core = { default-features = false , version = "0.4.0" } -cumulus-primitives-utility = { default-features = false , version = "0.4.0" } -pallet-collator-selection = { default-features = false , version = "6.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } -parachains-common = { default-features = false , version = "4.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.6.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.6.0" } +cumulus-primitives-core = { default-features = false , version = "0.6.0" } +cumulus-primitives-utility = { default-features = false , version = "0.6.0" } +pallet-collator-selection = { default-features = false , version = "8.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } +parachains-common = { default-features = false , version = "6.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } -assets-common = { default-features = false , version = "0.4.0" } +assets-common = { default-features = false , version = "0.6.0" } # Bridges -pallet-xcm-bridge-hub-router = { default-features = false , version = "0.2.0" } +pallet-xcm-bridge-hub-router = { default-features = false , version = "0.4.0" } snowbridge-router-primitives = { default-features = false, version = "1.0.0" } #todo publish snowbridge-polkadot-common = { default-features = false, version = "1.0.0" } #todo publish [dev-dependencies] hex-literal = "0.4.1" -asset-test-utils = { version = "4.0.0" } -parachains-runtimes-test-utils = { version = "4.0.0" } -sp-io = { version = "27.0.0" } +asset-test-utils = { version = "6.0.0" } +parachains-runtimes-test-utils = { version = "6.0.0" } +sp-io = { version = "29.0.0" } [build-dependencies] -substrate-wasm-builder = { optional = true , version = "14.0.0" } +substrate-wasm-builder = { optional = true , version = "16.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml index 939fb36e34..f881bbcde7 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml @@ -8,18 +8,18 @@ edition.workspace = true license.workspace = true [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] } -scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # Bridge Dependencies -bp-xcm-bridge-hub-router = { default-features = false , version = "0.3.0" } +bp-xcm-bridge-hub-router = { default-features = false , version = "0.5.0" } # Substrate Based Dependencies -frame-support = { default-features = false, version = "25.0.0" } -sp-std = { default-features = false, version = "12.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +sp-std = { default-features = false, version = "13.0.0" } # Polkadot -xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index ba2c2452de..c45b196c99 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -9,14 +9,15 @@ repository.workspace = true version.workspace = true [build-dependencies] -substrate-wasm-builder = { optional = true , version = "14.0.0" } +substrate-wasm-builder = { optional = true , version = "16.0.0" } [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive"] } hex-literal = { version = "0.4.1" } log = { version = "0.4.20", default-features = false } -scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.188", optional = true, features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +serde = { version = "1.0.195", optional = true, features = ["derive"] } +smallvec = "1.11.2" # Local bp-asset-hub-kusama = { path = "../../asset-hubs/asset-hub-kusama/primitives", default-features = false} @@ -26,75 +27,75 @@ bp-bridge-hub-polkadot = { path = "../bridge-hub-polkadot/primitives", default-f kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-features = false} # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-executive = { default-features = false, version = "25.0.0" } -frame-support = { default-features = false, version = "25.0.0" } -frame-system = { default-features = false, version = "25.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } -pallet-aura = { default-features = false, version = "24.0.0" } -pallet-authorship = { default-features = false, version = "25.0.0" } -pallet-balances = { default-features = false, version = "25.0.0" } -pallet-multisig = { default-features = false, version = "25.0.0" } -pallet-session = { default-features = false, version = "25.0.0" } -pallet-timestamp = { default-features = false, version = "24.0.0" } -pallet-transaction-payment = { default-features = false, version = "25.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" } -pallet-utility = { default-features = false, version = "25.0.0" } -sp-api = { default-features = false, version = "23.0.0" } -sp-block-builder = { default-features = false, version = "23.0.0" } -sp-consensus-aura = { default-features = false, version = "0.29.0" } -sp-core = { default-features = false, version = "25.0.0" } -sp-genesis-builder = { default-features = false , version = "0.4.0" } -sp-inherents = { default-features = false, version = "23.0.0" } -sp-io = { default-features = false, version = "27.0.0" } -sp-offchain = { default-features = false, version = "23.0.0" } -sp-runtime = { default-features = false, version = "28.0.0" } -sp-session = { default-features = false, version = "24.0.0" } -sp-std = { default-features = false, version = "12.0.0" } -sp-storage = { default-features = false, version = "17.0.0" } -sp-transaction-pool = { default-features = false, version = "23.0.0" } -sp-version = { default-features = false, version = "26.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-executive = { default-features = false, version = "27.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +frame-system = { default-features = false, version = "27.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } +pallet-aura = { default-features = false, version = "26.0.0" } +pallet-authorship = { default-features = false, version = "27.0.0" } +pallet-balances = { default-features = false, version = "27.0.0" } +pallet-multisig = { default-features = false, version = "27.0.0" } +pallet-session = { default-features = false, version = "27.0.0" } +pallet-timestamp = { default-features = false, version = "26.0.0" } +pallet-transaction-payment = { default-features = false, version = "27.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "27.0.0" } +pallet-utility = { default-features = false, version = "27.0.0" } +sp-api = { default-features = false, version = "25.0.0" } +sp-block-builder = { default-features = false, version = "25.0.0" } +sp-consensus-aura = { default-features = false, version = "0.31.0" } +sp-core = { default-features = false, version = "27.0.0" } +sp-genesis-builder = { default-features = false , version = "0.6.0" } +sp-inherents = { default-features = false, version = "25.0.0" } +sp-io = { default-features = false, version = "29.0.0" } +sp-offchain = { default-features = false, version = "25.0.0" } +sp-runtime = { default-features = false, version = "30.0.1" } +sp-session = { default-features = false, version = "26.0.0" } +sp-std = { default-features = false, version = "13.0.0" } +sp-storage = { default-features = false, version = "18.0.0" } +sp-transaction-pool = { default-features = false, version = "25.0.0" } +sp-version = { default-features = false, version = "28.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "4.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } -polkadot-core-primitives = { default-features = false, version = "4.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "3.0.0" } -polkadot-runtime-common = { default-features = false, version = "4.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.2" } +pallet-xcm = { default-features = false, version = "6.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } +polkadot-core-primitives = { default-features = false, version = "6.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } +polkadot-runtime-common = { default-features = false, version = "6.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } -cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.4.0" } -cumulus-primitives-core = { default-features = false , version = "0.4.0" } -cumulus-primitives-utility = { default-features = false , version = "0.4.0" } -pallet-collator-selection = { default-features = false , version = "6.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } -parachains-common = { default-features = false , version = "4.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.6.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.6.0" } +cumulus-primitives-core = { default-features = false , version = "0.6.0" } +cumulus-primitives-utility = { default-features = false , version = "0.6.0" } +pallet-collator-selection = { default-features = false , version = "8.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } +parachains-common = { default-features = false , version = "6.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } # Bridges -bp-header-chain = { default-features = false , version = "0.4.0" } -bp-messages = { default-features = false , version = "0.4.0" } -bp-parachains = { default-features = false , version = "0.4.0" } -bp-polkadot-core = { default-features = false , version = "0.4.0" } -bp-relayers = { default-features = false , version = "0.4.0" } -bp-runtime = { default-features = false , version = "0.4.0" } -bp-kusama = { default-features = false , version = "0.2.0" } -bp-polkadot = { default-features = false , version = "0.2.0" } -bridge-runtime-common = { default-features = false , version = "0.4.0" } -pallet-bridge-grandpa = { default-features = false , version = "0.4.0" } -pallet-bridge-messages = { default-features = false , version = "0.4.0" } -pallet-bridge-parachains = { default-features = false , version = "0.4.0" } -pallet-bridge-relayers = { default-features = false , version = "0.4.0" } +bp-header-chain = { default-features = false , version = "0.6.0" } +bp-messages = { default-features = false , version = "0.6.0" } +bp-parachains = { default-features = false , version = "0.6.0" } +bp-polkadot-core = { default-features = false , version = "0.6.0" } +bp-relayers = { default-features = false , version = "0.6.0" } +bp-runtime = { default-features = false , version = "0.6.0" } +bp-kusama = { default-features = false , version = "0.4.0" } +bp-polkadot = { default-features = false , version = "0.4.0" } +bridge-runtime-common = { default-features = false , version = "0.6.0" } +pallet-bridge-grandpa = { default-features = false , version = "0.6.0" } +pallet-bridge-messages = { default-features = false , version = "0.6.0" } +pallet-bridge-parachains = { default-features = false , version = "0.6.0" } +pallet-bridge-relayers = { default-features = false , version = "0.6.0" } # Bridges bp-header-chain = { default-features = false , version = "0.4.0" } @@ -126,9 +127,9 @@ snowbridge-runtime-common = { default-features = false , version = "1.0.0" } snowbridge-kusama-common = { default-features = false , version = "1.0.0" } [dev-dependencies] -bridge-hub-test-utils = { version = "0.4.0" } -bridge-runtime-common = { version = "0.4.0", features = ["integrity-test"] } -sp-keyring = { version = "28.0.0" } +bridge-hub-test-utils = { version = "0.6.0" } +bridge-runtime-common = { version = "0.6.0", features = ["integrity-test"] } +sp-keyring = { version = "30.0.0" } static_assertions = { version = "1.1.0" } [features] diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml index 3f53e6c7f0..fe96ffdfbe 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml @@ -14,15 +14,15 @@ kusama-runtime-constants = { path = "../../../../relay/kusama/constants", defaul polkadot-runtime-constants = { path = "../../../../relay/polkadot/constants", default-features = false} # Bridge Dependencies -bp-bridge-hub-cumulus = { default-features = false , version = "0.4.0" } -bp-runtime = { default-features = false , version = "0.4.0" } -bp-messages = { default-features = false , version = "0.4.0" } +bp-bridge-hub-cumulus = { default-features = false , version = "0.6.0" } +bp-runtime = { default-features = false , version = "0.6.0" } +bp-messages = { default-features = false , version = "0.6.0" } # Substrate Based Dependencies -frame-support = { default-features = false, version = "25.0.0" } -sp-api = { default-features = false, version = "23.0.0" } -sp-runtime = { default-features = false, version = "28.0.0" } -sp-std = { default-features = false , version = "12.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +sp-api = { default-features = false, version = "25.0.0" } +sp-runtime = { default-features = false, version = "30.0.1" } +sp-std = { default-features = false , version = "13.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index e7b9d6c45b..0170ef04e1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -9,21 +9,15 @@ repository.workspace = true version.workspace = true [build-dependencies] -substrate-wasm-builder = { optional = true , version = "14.0.0" } +substrate-wasm-builder = { optional = true , version = "16.0.0" } [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive"] } hex-literal = { version = "0.4.1" } log = { version = "0.4.20", default-features = false } -scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.188", optional = true, features = ["derive"] } - -# Local -bp-asset-hub-kusama = { path = "../../asset-hubs/asset-hub-kusama/primitives", default-features = false} -bp-asset-hub-polkadot = { path = "../../asset-hubs/asset-hub-polkadot/primitives", default-features = false} -bp-bridge-hub-kusama = { path = "../bridge-hub-kusama/primitives", default-features = false} -bp-bridge-hub-polkadot = { path = "../bridge-hub-polkadot/primitives", default-features = false} -polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +serde = { version = "1.0.195", optional = true, features = ["derive"] } +smallvec = "1.11.2" # Local bp-asset-hub-kusama = { path = "../../asset-hubs/asset-hub-kusama/primitives", default-features = false} @@ -33,75 +27,75 @@ bp-bridge-hub-polkadot = { path = "../bridge-hub-polkadot/primitives", default-f polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-executive = { default-features = false, version = "25.0.0" } -frame-support = { default-features = false, version = "25.0.0" } -frame-system = { default-features = false, version = "25.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } -pallet-aura = { default-features = false, version = "24.0.0" } -pallet-authorship = { default-features = false, version = "25.0.0" } -pallet-balances = { default-features = false, version = "25.0.0" } -pallet-multisig = { default-features = false, version = "25.0.0" } -pallet-session = { default-features = false, version = "25.0.0" } -pallet-timestamp = { default-features = false, version = "24.0.0" } -pallet-transaction-payment = { default-features = false, version = "25.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" } -pallet-utility = { default-features = false, version = "25.0.0" } -sp-api = { default-features = false, version = "23.0.0" } -sp-block-builder = { default-features = false, version = "23.0.0" } -sp-consensus-aura = { default-features = false, version = "0.29.0" } -sp-core = { default-features = false, version = "25.0.0" } -sp-genesis-builder = { default-features = false , version = "0.4.0" } -sp-inherents = { default-features = false, version = "23.0.0" } -sp-io = { default-features = false, version = "27.0.0" } -sp-offchain = { default-features = false, version = "23.0.0" } -sp-runtime = { default-features = false, version = "28.0.0" } -sp-session = { default-features = false, version = "24.0.0" } -sp-std = { default-features = false, version = "12.0.0" } -sp-storage = { default-features = false, version = "17.0.0" } -sp-transaction-pool = { default-features = false, version = "23.0.0" } -sp-version = { default-features = false, version = "26.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-executive = { default-features = false, version = "27.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +frame-system = { default-features = false, version = "27.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } +pallet-aura = { default-features = false, version = "26.0.0" } +pallet-authorship = { default-features = false, version = "27.0.0" } +pallet-balances = { default-features = false, version = "27.0.0" } +pallet-multisig = { default-features = false, version = "27.0.0" } +pallet-session = { default-features = false, version = "27.0.0" } +pallet-timestamp = { default-features = false, version = "26.0.0" } +pallet-transaction-payment = { default-features = false, version = "27.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "27.0.0" } +pallet-utility = { default-features = false, version = "27.0.0" } +sp-api = { default-features = false, version = "25.0.0" } +sp-block-builder = { default-features = false, version = "25.0.0" } +sp-consensus-aura = { default-features = false, version = "0.31.0" } +sp-core = { default-features = false, version = "27.0.0" } +sp-genesis-builder = { default-features = false , version = "0.6.0" } +sp-inherents = { default-features = false, version = "25.0.0" } +sp-io = { default-features = false, version = "29.0.0" } +sp-offchain = { default-features = false, version = "25.0.0" } +sp-runtime = { default-features = false, version = "30.0.1" } +sp-session = { default-features = false, version = "26.0.0" } +sp-std = { default-features = false, version = "13.0.0" } +sp-storage = { default-features = false, version = "18.0.0" } +sp-transaction-pool = { default-features = false, version = "25.0.0" } +sp-version = { default-features = false, version = "28.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "4.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" } -polkadot-core-primitives = { default-features = false, version = "4.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "3.0.0" } -polkadot-runtime-common = { default-features = false, version = "4.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.2" } +pallet-xcm = { default-features = false, version = "6.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } +polkadot-core-primitives = { default-features = false, version = "6.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } +polkadot-runtime-common = { default-features = false, version = "6.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } -cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.4.0" } -cumulus-primitives-core = { default-features = false , version = "0.4.0" } -cumulus-primitives-utility = { default-features = false , version = "0.4.0" } -pallet-collator-selection = { default-features = false , version = "6.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } -parachains-common = { default-features = false , version = "4.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.6.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.6.0" } +cumulus-primitives-core = { default-features = false , version = "0.6.0" } +cumulus-primitives-utility = { default-features = false , version = "0.6.0" } +pallet-collator-selection = { default-features = false , version = "8.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } +parachains-common = { default-features = false , version = "6.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } # Bridges -bp-header-chain = { default-features = false , version = "0.4.0" } -bp-messages = { default-features = false , version = "0.4.0" } -bp-parachains = { default-features = false , version = "0.4.0" } -bp-polkadot-core = { default-features = false , version = "0.4.0" } -bp-relayers = { default-features = false , version = "0.4.0" } -bp-runtime = { default-features = false , version = "0.4.0" } -bp-kusama = { default-features = false , version = "0.2.0" } -bp-polkadot = { default-features = false , version = "0.2.0" } -bridge-runtime-common = { default-features = false , version = "0.4.0" } -pallet-bridge-grandpa = { default-features = false , version = "0.4.0" } -pallet-bridge-messages = { default-features = false , version = "0.4.0" } -pallet-bridge-parachains = { default-features = false , version = "0.4.0" } -pallet-bridge-relayers = { default-features = false , version = "0.4.0" } +bp-header-chain = { default-features = false , version = "0.6.0" } +bp-messages = { default-features = false , version = "0.6.0" } +bp-parachains = { default-features = false , version = "0.6.0" } +bp-polkadot-core = { default-features = false , version = "0.6.0" } +bp-relayers = { default-features = false , version = "0.6.0" } +bp-runtime = { default-features = false , version = "0.6.0" } +bp-kusama = { default-features = false , version = "0.4.0" } +bp-polkadot = { default-features = false , version = "0.4.0" } +bridge-runtime-common = { default-features = false , version = "0.6.0" } +pallet-bridge-grandpa = { default-features = false , version = "0.6.0" } +pallet-bridge-messages = { default-features = false , version = "0.6.0" } +pallet-bridge-parachains = { default-features = false , version = "0.6.0" } +pallet-bridge-relayers = { default-features = false , version = "0.6.0" } # Bridges bp-header-chain = { default-features = false , version = "0.4.0" } @@ -132,9 +126,9 @@ snowbridge-runtime-common = { default-features = false , version = "1.0.0" } snowbridge-kusama-common = { default-features = false , version = "1.0.0" } [dev-dependencies] -bridge-hub-test-utils = { version = "0.4.0" } -bridge-runtime-common = { version = "0.4.0", features = ["integrity-test"] } -sp-keyring = { version = "28.0.0" } +bridge-hub-test-utils = { version = "0.6.0" } +bridge-runtime-common = { version = "0.6.0", features = ["integrity-test"] } +sp-keyring = { version = "30.0.0" } static_assertions = { version = "1.1.0" } [features] diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml index 614216ff78..717310b606 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml @@ -14,15 +14,15 @@ kusama-runtime-constants = { path = "../../../../relay/kusama/constants", defaul polkadot-runtime-constants = { path = "../../../../relay/polkadot/constants", default-features = false} # Bridge Dependencies -bp-bridge-hub-cumulus = { default-features = false , version = "0.4.0" } -bp-runtime = { default-features = false , version = "0.4.0" } -bp-messages = { default-features = false , version = "0.4.0" } +bp-bridge-hub-cumulus = { default-features = false , version = "0.6.0" } +bp-runtime = { default-features = false , version = "0.6.0" } +bp-messages = { default-features = false , version = "0.6.0" } # Substrate Based Dependencies -frame-support = { default-features = false, version = "25.0.0" } -sp-api = { default-features = false, version = "23.0.0" } -sp-runtime = { default-features = false, version = "28.0.0" } -sp-std = { default-features = false , version = "12.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +sp-api = { default-features = false, version = "25.0.0" } +sp-runtime = { default-features = false, version = "30.0.1" } +sp-std = { default-features = false , version = "13.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index 18c1706938..35103ed880 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -9,80 +9,81 @@ repository.workspace = true version.workspace = true [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] } +codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } hex-literal = { version = "0.4.1" } log = { version = "0.4.20", default-features = false } -scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +smallvec = "1.11.2" # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-executive = { default-features = false, version = "25.0.0" } -frame-support = { default-features = false, version = "25.0.0" } -frame-system = { default-features = false, version = "25.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } -pallet-asset-rate = { default-features = false , version = "4.0.0" } -pallet-alliance = { default-features = false, version = "24.0.0" } -pallet-aura = { default-features = false, version = "24.0.0" } -pallet-authorship = { default-features = false, version = "25.0.0" } -pallet-balances = { default-features = false, version = "25.0.0" } -pallet-collective = { default-features = false, version = "25.0.0" } -pallet-multisig = { default-features = false, version = "25.0.0" } -pallet-preimage = { default-features = false , version = "25.0.0" } -pallet-proxy = { default-features = false, version = "25.0.0" } -pallet-scheduler = { default-features = false , version = "26.0.0" } -pallet-session = { default-features = false, version = "25.0.0" } -pallet-timestamp = { default-features = false, version = "24.0.0" } -pallet-transaction-payment = { default-features = false, version = "25.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" } -pallet-treasury = { default-features = false , version = "24.0.0" } -pallet-utility = { default-features = false, version = "25.0.0" } -pallet-referenda = { default-features = false, version = "25.0.0" } -pallet-ranked-collective = { default-features = false, version = "25.0.0" } -pallet-core-fellowship = { default-features = false, version = "9.0.0" } -pallet-salary = { default-features = false, version = "10.0.0" } -sp-api = { default-features = false, version = "23.0.0" } -sp-arithmetic = { default-features = false , version = "20.0.0" } -sp-block-builder = { default-features = false, version = "23.0.0" } -sp-consensus-aura = { default-features = false, version = "0.29.0" } -sp-core = { default-features = false, version = "25.0.0" } -sp-genesis-builder = { default-features = false , version = "0.4.0" } -sp-inherents = { default-features = false, version = "23.0.0" } -sp-offchain = { default-features = false, version = "23.0.0" } -sp-runtime = { default-features = false, version = "28.0.0" } -sp-session = { default-features = false, version = "24.0.0" } -sp-std = { default-features = false, version = "12.0.0" } -sp-storage = { default-features = false, version = "17.0.0" } -sp-transaction-pool = { default-features = false, version = "23.0.0" } -sp-version = { default-features = false, version = "26.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-executive = { default-features = false, version = "27.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +frame-system = { default-features = false, version = "27.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } +pallet-asset-rate = { default-features = false , version = "6.0.0" } +pallet-alliance = { default-features = false, version = "26.0.0" } +pallet-aura = { default-features = false, version = "26.0.0" } +pallet-authorship = { default-features = false, version = "27.0.0" } +pallet-balances = { default-features = false, version = "27.0.0" } +pallet-collective = { default-features = false, version = "27.0.0" } +pallet-multisig = { default-features = false, version = "27.0.0" } +pallet-preimage = { default-features = false , version = "27.0.0" } +pallet-proxy = { default-features = false, version = "27.0.0" } +pallet-scheduler = { default-features = false , version = "28.0.0" } +pallet-session = { default-features = false, version = "27.0.0" } +pallet-timestamp = { default-features = false, version = "26.0.0" } +pallet-transaction-payment = { default-features = false, version = "27.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "27.0.0" } +pallet-treasury = { default-features = false , version = "26.0.0" } +pallet-utility = { default-features = false, version = "27.0.0" } +pallet-referenda = { default-features = false, version = "27.0.0" } +pallet-ranked-collective = { default-features = false, version = "27.0.0" } +pallet-core-fellowship = { default-features = false, version = "11.0.0" } +pallet-salary = { default-features = false, version = "12.0.0" } +sp-api = { default-features = false, version = "25.0.0" } +sp-arithmetic = { default-features = false , version = "22.0.0" } +sp-block-builder = { default-features = false, version = "25.0.0" } +sp-consensus-aura = { default-features = false, version = "0.31.0" } +sp-core = { default-features = false, version = "27.0.0" } +sp-genesis-builder = { default-features = false , version = "0.6.0" } +sp-inherents = { default-features = false, version = "25.0.0" } +sp-offchain = { default-features = false, version = "25.0.0" } +sp-runtime = { default-features = false, version = "30.0.1" } +sp-session = { default-features = false, version = "26.0.0" } +sp-std = { default-features = false, version = "13.0.0" } +sp-storage = { default-features = false, version = "18.0.0" } +sp-transaction-pool = { default-features = false, version = "25.0.0" } +sp-version = { default-features = false, version = "28.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "4.0.0" } -polkadot-core-primitives = { default-features = false, version = "4.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "3.0.0" } -polkadot-runtime-common = { default-features = false, version = "4.0.0" } +pallet-xcm = { default-features = false, version = "6.0.0" } +polkadot-core-primitives = { default-features = false, version = "6.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } +polkadot-runtime-common = { default-features = false, version = "6.0.0" } polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} -xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.2" } +xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } -cumulus-pallet-xcmp-queue = { default-features = false , version = "0.4.0" } -cumulus-primitives-core = { default-features = false , version = "0.4.0" } -cumulus-primitives-utility = { default-features = false , version = "0.4.0" } -pallet-collator-selection = { default-features = false , version = "6.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } -parachains-common = { default-features = false , version = "4.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.6.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } +cumulus-pallet-xcmp-queue = { default-features = false , version = "0.6.0" } +cumulus-primitives-core = { default-features = false , version = "0.6.0" } +cumulus-primitives-utility = { default-features = false , version = "0.6.0" } +pallet-collator-selection = { default-features = false , version = "8.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } +parachains-common = { default-features = false , version = "6.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } [build-dependencies] -substrate-wasm-builder = { optional = true , version = "14.0.0" } +substrate-wasm-builder = { optional = true , version = "16.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/constants/Cargo.toml b/system-parachains/constants/Cargo.toml index 20bd904bf3..d8c079192c 100644 --- a/system-parachains/constants/Cargo.toml +++ b/system-parachains/constants/Cargo.toml @@ -8,15 +8,15 @@ edition.workspace = true license.workspace = true [dependencies] -smallvec = "1.8.0" +smallvec = "1.11.2" -frame-support = { default-features = false , version = "25.0.0" } +frame-support = { default-features = false , version = "27.0.0" } kusama-runtime-constants = { path = "../../relay/kusama/constants", default-features = false} -parachains-common = { default-features = false , version = "4.0.0" } -polkadot-core-primitives = { default-features = false, version = "4.0.0"} -polkadot-primitives = { default-features = false , version = "4.0.0" } +parachains-common = { default-features = false , version = "6.0.0" } +polkadot-core-primitives = { default-features = false, version = "6.0.0"} +polkadot-primitives = { default-features = false , version = "6.0.0" } polkadot-runtime-constants = { path = "../../relay/polkadot/constants", default-features = false} -sp-runtime = { default-features = false , version = "28.0.0" } +sp-runtime = { default-features = false , version = "30.0.1" } [features] default = [ "std" ] diff --git a/system-parachains/gluttons/glutton-kusama/Cargo.toml b/system-parachains/gluttons/glutton-kusama/Cargo.toml index 0c7c0d23b1..e72a2ec7d8 100644 --- a/system-parachains/gluttons/glutton-kusama/Cargo.toml +++ b/system-parachains/gluttons/glutton-kusama/Cargo.toml @@ -9,47 +9,47 @@ repository.workspace = true version.workspace = true [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-executive = { default-features = false, version = "25.0.0" } -frame-support = { default-features = false, version = "25.0.0" } -frame-system = { default-features = false, version = "25.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } -pallet-glutton = { default-features = false, optional = true, version = "11.0.0" } -pallet-sudo = { default-features = false, optional = true, version = "25.0.0" } -sp-api = { default-features = false, version = "23.0.0" } -sp-block-builder = { default-features = false, version = "23.0.0" } -sp-core = { default-features = false, version = "25.0.0" } -sp-genesis-builder = { default-features = false , version = "0.4.0" } -sp-inherents = { default-features = false, version = "23.0.0" } -sp-offchain = { default-features = false, version = "23.0.0" } -sp-runtime = { default-features = false, version = "28.0.0" } -sp-session = { default-features = false, version = "24.0.0" } -sp-std = { default-features = false, version = "12.0.0" } -sp-storage = { default-features = false, version = "17.0.0" } -sp-transaction-pool = { default-features = false, version = "23.0.0" } -sp-version = { default-features = false, version = "26.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-executive = { default-features = false, version = "27.0.0" } +frame-support = { default-features = false, version = "27.0.0" } +frame-system = { default-features = false, version = "27.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } +pallet-glutton = { default-features = false, optional = true, version = "13.0.0" } +pallet-sudo = { default-features = false, optional = true, version = "27.0.0" } +sp-api = { default-features = false, version = "25.0.0" } +sp-block-builder = { default-features = false, version = "25.0.0" } +sp-core = { default-features = false, version = "27.0.0" } +sp-genesis-builder = { default-features = false , version = "0.6.0" } +sp-inherents = { default-features = false, version = "25.0.0" } +sp-offchain = { default-features = false, version = "25.0.0" } +sp-runtime = { default-features = false, version = "30.0.1" } +sp-session = { default-features = false, version = "26.0.0" } +sp-std = { default-features = false, version = "13.0.0" } +sp-storage = { default-features = false, version = "18.0.0" } +sp-transaction-pool = { default-features = false, version = "25.0.0" } +sp-version = { default-features = false, version = "28.0.0" } # Polkadot -xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.2" } +xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } # Cumulus -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.4.0" } -cumulus-primitives-core = { default-features = false , version = "0.4.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" } -parachains-common = { default-features = false , version = "4.0.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } +cumulus-primitives-core = { default-features = false , version = "0.6.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } +parachains-common = { default-features = false , version = "6.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } [build-dependencies] -substrate-wasm-builder = { version = "14.0.0" } +substrate-wasm-builder = { version = "16.0.0" } [features] default = [ "std" ] From a6cb81a00c2de758e3865b9a9b11ed3e7d997145 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 9 Jan 2024 14:33:50 +0100 Subject: [PATCH 046/316] [FeeManager] fix for XcmFeesToAccount --- relay/kusama/src/xcm_config.rs | 8 ++++++-- relay/polkadot/src/xcm_config.rs | 8 ++++++-- .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 9 ++++++--- .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 9 ++++++--- .../bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 4 ++-- .../bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs | 4 ++-- .../collectives/collectives-polkadot/src/xcm_config.rs | 10 +++++++--- 7 files changed, 35 insertions(+), 17 deletions(-) diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index fcc0fb4550..2adcf527bd 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -41,7 +41,8 @@ use xcm_builder::{ DescribeFamily, FrameTransactionalProcessor, HashedDescription, IsChildSystemParachain, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, - UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, + UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, + XcmFeesToAccount, }; parameter_types! { @@ -201,7 +202,10 @@ impl xcm_executor::Config for XcmConfig { type SubscriptionService = XcmPallet; type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; - type FeeManager = XcmFeesToAccount; + type FeeManager = XcmFeeManagerFromComponents< + WaivedLocations, + XcmFeeToAccount, + >; // No bridges yet... type MessageExporter = (); type UniversalAliases = Nothing; diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index 6270ff851d..9445b3b3da 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -46,7 +46,8 @@ use xcm_builder::{ DescribeFamily, FrameTransactionalProcessor, HashedDescription, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, - WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, + XcmFeesToAccount, }; parameter_types! { @@ -216,7 +217,10 @@ impl xcm_executor::Config for XcmConfig { type SubscriptionService = XcmPallet; type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; - type FeeManager = XcmFeesToAccount; + type FeeManager = XcmFeeManagerFromComponents< + WaivedLocations, + XcmFeeToAccount, + >; // No bridges yet... type MessageExporter = (); type UniversalAliases = Nothing; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index f9d8970353..ebf85f5736 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -54,7 +54,7 @@ use xcm_builder::{ SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeesToAccount, + XcmFeeManagerFromComponents, XcmFeesToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -78,7 +78,7 @@ parameter_types! { pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); pub const FellowshipLocation: MultiLocation = MultiLocation::parent(); pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(kusama_runtime_constants::TREASURY_PALLET_ID)).into(); - pub TreasuryAccount: Option = Some(TREASURY_PALLET_ID.into_account_truncating()); + pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -615,7 +615,10 @@ impl xcm_executor::Config for XcmConfig { type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); - type FeeManager = XcmFeesToAccount; + type FeeManager = XcmFeeManagerFromComponents< + WaivedLocations, + XcmFeeToAccount, + >; type MessageExporter = (); type UniversalAliases = (bridging::to_polkadot::UniversalAliases, bridging::to_ethereum::UniversalAliases); diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 3852748b32..322ae84524 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -51,7 +51,7 @@ use xcm_builder::{ SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeesToAccount, + XcmFeeManagerFromComponents, XcmFeesToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -68,7 +68,7 @@ parameter_types! { pub FellowshipLocation: MultiLocation = MultiLocation::new(1, Parachain(1001)); pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); - pub TreasuryAccount: Option = Some(TREASURY_PALLET_ID.into_account_truncating()); + pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -540,7 +540,10 @@ impl xcm_executor::Config for XcmConfig { type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); - type FeeManager = XcmFeesToAccount; + type FeeManager = XcmFeeManagerFromComponents< + WaivedLocations, + XcmFeeToAccount, + >; type MessageExporter = (); type UniversalAliases = (bridging::to_kusama::UniversalAliases, bridging::to_ethereum::UniversalAliases); diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 8dd0c9e713..31ae6c2294 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -50,7 +50,7 @@ use xcm_builder::{ ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeesToAccount, + XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::{traits::{FeeManager, FeeReason, FeeReason::Export, WithOriginFilter}, XcmExecutor}; @@ -66,7 +66,7 @@ parameter_types! { pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); pub const FellowshipLocation: MultiLocation = MultiLocation::parent(); pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(kusama_runtime_constants::TREASURY_PALLET_ID)).into(); - pub TreasuryAccount: Option = Some(TREASURY_PALLET_ID.into_account_truncating()); + pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index b0afde0240..bcb31a1ad1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -50,7 +50,7 @@ use xcm_builder::{ ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeesToAccount, + XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::{traits::{FeeManager, FeeReason, FeeReason::Export, WithOriginFilter}, XcmExecutor}; @@ -66,7 +66,7 @@ parameter_types! { pub FellowshipLocation: MultiLocation = MultiLocation::new(1, Parachain(1001)); pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); - pub TreasuryAccount: Option = Some(TREASURY_PALLET_ID.into_account_truncating()); + pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 775ecd643e..b01303f997 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -42,7 +42,8 @@ use xcm_builder::{ HashedDescription, IsConcrete, OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount, + TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic, + XcmFeeManagerFromComponents, XcmFeesToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -56,7 +57,7 @@ parameter_types! { pub CheckingAccount: AccountId = PolkadotXcm::check_account(); pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); - pub TreasuryAccount: Option = Some(TREASURY_PALLET_ID.into_account_truncating()); + pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); pub const TreasurerBodyId: BodyId = BodyId::Index(xcm_constants::body::TREASURER_INDEX); } @@ -301,7 +302,10 @@ impl xcm_executor::Config for XcmConfig { type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); - type FeeManager = XcmFeesToAccount; + type FeeManager = XcmFeeManagerFromComponents< + WaivedLocations, + XcmFeeToAccount, + >; type MessageExporter = (); type UniversalAliases = Nothing; type CallDispatcher = WithOriginFilter; From 8df3a76b17af62d223a74c9a106083cec822c7c9 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 9 Jan 2024 14:34:37 +0100 Subject: [PATCH 047/316] [pallet_identity] adapt https://github.com/paritytech/polkadot-sdk/pull/2048 [pallet_identity] removed `FieldDeposit`, `MaxAdditionalFields`, added `ByteDeposit` fix import `simple` -> `legacy` --- relay/kusama/src/lib.rs | 8 +++---- relay/kusama/src/weights/pallet_identity.rs | 24 +++++-------------- relay/polkadot/src/lib.rs | 8 +++---- relay/polkadot/src/weights/pallet_identity.rs | 24 +++++-------------- 4 files changed, 20 insertions(+), 44 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 4b2fd2aa15..7829ca151e 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -80,7 +80,7 @@ use frame_support::{ }; use frame_system::EnsureRoot; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; -use pallet_identity::simple::IdentityInfo; +use pallet_identity::legacy::IdentityInfo; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use pallet_session::historical as session_historical; use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo}; @@ -914,7 +914,8 @@ impl claims::Config for Runtime { parameter_types! { // Minimum 100 bytes/KSM deposited (1 CENT/byte) pub const BasicDeposit: Balance = 1000 * CENTS; // 258 bytes on-chain - pub const FieldDeposit: Balance = 250 * CENTS; // 66 bytes on-chain + // TODO:(PR#137) - check ByteDeposit? + pub const ByteDeposit: Balance = deposit(0, 1); pub const SubAccountDeposit: Balance = 200 * CENTS; // 53 bytes on-chain pub const MaxSubAccounts: u32 = 100; pub const MaxAdditionalFields: u32 = 100; @@ -925,10 +926,9 @@ 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 = Treasury; diff --git a/relay/kusama/src/weights/pallet_identity.rs b/relay/kusama/src/weights/pallet_identity.rs index 46ec51a056..c160e50c64 100644 --- a/relay/kusama/src/weights/pallet_identity.rs +++ b/relay/kusama/src/weights/pallet_identity.rs @@ -70,7 +70,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, 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: `442 + r * (5 ±0)` // Estimated: `11003` @@ -79,8 +79,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 11003)) // Standard Error: 3_669 .saturating_add(Weight::from_parts(145_207, 0).saturating_mul(r.into())) - // Standard Error: 716 - .saturating_add(Weight::from_parts(451_168, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -135,7 +133,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: `469 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11003` @@ -146,8 +144,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(178_396, 0).saturating_mul(r.into())) // Standard Error: 1_860 .saturating_add(Weight::from_parts(1_315_185, 0).saturating_mul(s.into())) - // Standard Error: 1_860 - .saturating_add(Weight::from_parts(262_283, 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()))) @@ -158,7 +154,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, 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: `367 + r * (57 ±0) + x * (66 ±0)` // Estimated: `11003` @@ -167,8 +163,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 11003)) // Standard Error: 4_038 .saturating_add(Weight::from_parts(140_007, 0).saturating_mul(r.into())) - // Standard Error: 788 - .saturating_add(Weight::from_parts(476_213, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -176,7 +170,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, 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: `398 + x * (66 ±0)` // Estimated: `11003` @@ -185,8 +179,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 11003)) // Standard Error: 4_050 .saturating_add(Weight::from_parts(119_572, 0).saturating_mul(r.into())) - // Standard Error: 790 - .saturating_add(Weight::from_parts(470_950, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -241,7 +233,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, 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: `445 + r * (57 ±0) + x * (66 ±0)` // Estimated: `11003` @@ -250,8 +242,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 11003)) // Standard Error: 3_622 .saturating_add(Weight::from_parts(111_414, 0).saturating_mul(r.into())) - // Standard Error: 670 - .saturating_add(Weight::from_parts(753_154, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -266,7 +256,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: `676 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11003` @@ -277,8 +267,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(219_037, 0).saturating_mul(r.into())) // Standard Error: 6_824 .saturating_add(Weight::from_parts(1_337_803, 0).saturating_mul(s.into())) - // Standard Error: 6_824 - .saturating_add(Weight::from_parts(285_260, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 7b2dba0c2a..95b1cf1e5c 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -66,7 +66,7 @@ use frame_support::{ }; use frame_system::EnsureRoot; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; -use pallet_identity::simple::IdentityInfo; +use pallet_identity::legacy::IdentityInfo; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use pallet_session::historical as session_historical; use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo}; @@ -795,7 +795,8 @@ impl pallet_fast_unstake::Config for Runtime { parameter_types! { // Minimum 4 CENTS/byte pub const BasicDeposit: Balance = deposit(1, 258); - pub const FieldDeposit: Balance = deposit(0, 66); + // TODO:(PR#137) - check ByteDeposit? + pub const ByteDeposit: Balance = deposit(0, 1); pub const SubAccountDeposit: Balance = deposit(1, 53); pub const MaxSubAccounts: u32 = 100; pub const MaxAdditionalFields: u32 = 100; @@ -806,10 +807,9 @@ 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 = Treasury; diff --git a/relay/polkadot/src/weights/pallet_identity.rs b/relay/polkadot/src/weights/pallet_identity.rs index 758715c6eb..087cdb708c 100644 --- a/relay/polkadot/src/weights/pallet_identity.rs +++ b/relay/polkadot/src/weights/pallet_identity.rs @@ -70,7 +70,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, 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: `442 + r * (5 ±0)` // Estimated: `11003` @@ -79,8 +79,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 11003)) // Standard Error: 3_842 .saturating_add(Weight::from_parts(168_829, 0).saturating_mul(r.into())) - // Standard Error: 749 - .saturating_add(Weight::from_parts(461_025, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -135,7 +133,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: `469 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11003` @@ -146,8 +144,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(134_695, 0).saturating_mul(r.into())) // Standard Error: 2_134 .saturating_add(Weight::from_parts(1_291_235, 0).saturating_mul(s.into())) - // Standard Error: 2_134 - .saturating_add(Weight::from_parts(259_478, 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()))) @@ -158,7 +154,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, 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: `367 + r * (57 ±0) + x * (66 ±0)` // Estimated: `11003` @@ -167,8 +163,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 11003)) // Standard Error: 3_649 .saturating_add(Weight::from_parts(157_213, 0).saturating_mul(r.into())) - // Standard Error: 712 - .saturating_add(Weight::from_parts(495_951, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -176,7 +170,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, 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: `398 + x * (66 ±0)` // Estimated: `11003` @@ -185,8 +179,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 11003)) // Standard Error: 2_838 .saturating_add(Weight::from_parts(91_214, 0).saturating_mul(r.into())) - // Standard Error: 553 - .saturating_add(Weight::from_parts(472_533, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -241,7 +233,7 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, 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: `445 + r * (57 ±0) + x * (66 ±0)` // Estimated: `11003` @@ -250,8 +242,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 11003)) // Standard Error: 4_288 .saturating_add(Weight::from_parts(128_899, 0).saturating_mul(r.into())) - // Standard Error: 793 - .saturating_add(Weight::from_parts(761_648, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -266,7 +256,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: `676 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11003` @@ -277,8 +267,6 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(238_248, 0).saturating_mul(r.into())) // Standard Error: 2_670 .saturating_add(Weight::from_parts(1_322_628, 0).saturating_mul(s.into())) - // Standard Error: 2_670 - .saturating_add(Weight::from_parts(294_550, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) From 57ae9adb90c966c5b1f3fd6e94d4bf471b407895 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 9 Jan 2024 14:35:12 +0100 Subject: [PATCH 048/316] [pallet_staking] removed benchmark `payout_stakers_dead_controller` --- relay/kusama/src/weights/pallet_staking.rs | 38 -------------------- relay/polkadot/src/weights/pallet_staking.rs | 38 -------------------- 2 files changed, 76 deletions(-) diff --git a/relay/kusama/src/weights/pallet_staking.rs b/relay/kusama/src/weights/pallet_staking.rs index a2c992d8cc..a6be62de0a 100644 --- a/relay/kusama/src/weights/pallet_staking.rs +++ b/relay/kusama/src/weights/pallet_staking.rs @@ -453,44 +453,6 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `Staking::ErasValidatorReward` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `Staking::Bonded` (r:513 w:0) /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) - /// Storage: `Staking::Ledger` (r:1 w:1) - /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) - /// Storage: `Staking::ErasStakersClipped` (r:1 w:0) - /// Proof: `Staking::ErasStakersClipped` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:1 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:514 w:514) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Staking::ErasRewardPoints` (r:1 w:0) - /// Proof: `Staking::ErasRewardPoints` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Staking::ErasValidatorPrefs` (r:1 w:0) - /// Proof: `Staking::ErasValidatorPrefs` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`) - /// Storage: `Staking::Payee` (r:513 w:0) - /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) - /// The range of component `n` is `[0, 512]`. - fn payout_stakers_dead_controller(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `36208 + n * (159 ±0)` - // Estimated: `34669 + n * (2603 ±0)` - // Minimum execution time: 131_091_000 picoseconds. - Weight::from_parts(169_654_528, 0) - .saturating_add(Weight::from_parts(0, 34669)) - // Standard Error: 38_361 - .saturating_add(Weight::from_parts(27_033_943, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(12)) - .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into())) - } - /// Storage: `Staking::CurrentEra` (r:1 w:0) - /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Staking::ErasValidatorReward` (r:1 w:0) - /// Proof: `Staking::ErasValidatorReward` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) - /// Storage: `Staking::Bonded` (r:513 w:0) - /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Staking::Ledger` (r:513 w:513) /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::ErasStakersClipped` (r:1 w:0) diff --git a/relay/polkadot/src/weights/pallet_staking.rs b/relay/polkadot/src/weights/pallet_staking.rs index 8eca02acc4..eea33b1a18 100644 --- a/relay/polkadot/src/weights/pallet_staking.rs +++ b/relay/polkadot/src/weights/pallet_staking.rs @@ -453,44 +453,6 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Proof: `Staking::ErasValidatorReward` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `Staking::Bonded` (r:513 w:0) /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) - /// Storage: `Staking::Ledger` (r:1 w:1) - /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) - /// Storage: `Staking::ErasStakersClipped` (r:1 w:0) - /// Proof: `Staking::ErasStakersClipped` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:1 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:514 w:514) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Staking::ErasRewardPoints` (r:1 w:0) - /// Proof: `Staking::ErasRewardPoints` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Staking::ErasValidatorPrefs` (r:1 w:0) - /// Proof: `Staking::ErasValidatorPrefs` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`) - /// Storage: `Staking::Payee` (r:513 w:0) - /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) - /// The range of component `n` is `[0, 512]`. - fn payout_stakers_dead_controller(n: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `36212 + n * (160 ±0)` - // Estimated: `34673 + n * (2603 ±1)` - // Minimum execution time: 121_546_000 picoseconds. - Weight::from_parts(176_075_574, 0) - .saturating_add(Weight::from_parts(0, 34673)) - // Standard Error: 38_394 - .saturating_add(Weight::from_parts(27_529_654, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(12)) - .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) - .saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into())) - } - /// Storage: `Staking::CurrentEra` (r:1 w:0) - /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Staking::ErasValidatorReward` (r:1 w:0) - /// Proof: `Staking::ErasValidatorReward` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) - /// Storage: `Staking::Bonded` (r:513 w:0) - /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Staking::Ledger` (r:513 w:513) /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) /// Storage: `Staking::ErasStakersClipped` (r:1 w:0) From cc6aae53414b11c603c7637a7cf9d2ca8c385d40 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 9 Jan 2024 14:56:51 +0100 Subject: [PATCH 049/316] [pallet_nomination_pools] change import `versioned_migrations` to `versioned` --- relay/kusama/src/lib.rs | 4 ++-- relay/polkadot/src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 7829ca151e..b62f183a24 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1670,8 +1670,8 @@ pub mod migrations { /// Unreleased migrations. Add new ones here: pub type Unreleased = ( - pallet_nomination_pools::migration::versioned_migrations::V5toV6, - pallet_nomination_pools::migration::versioned_migrations::V6ToV7, + pallet_nomination_pools::migration::versioned::V5toV6, + pallet_nomination_pools::migration::versioned::V6ToV7, ); } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 95b1cf1e5c..a8adeaea72 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1703,8 +1703,8 @@ pub mod migrations { pub type Unreleased = ( // Upgrade SessionKeys to include BEEFY key UpgradeSessionKeys, - pallet_nomination_pools::migration::versioned_migrations::V5toV6, - pallet_nomination_pools::migration::versioned_migrations::V6ToV7, + pallet_nomination_pools::migration::versioned::V5toV6, + pallet_nomination_pools::migration::versioned::V6ToV7, ); } From 8b11c6ed82a6eb8d552eb3e1427b5678977e9866 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 9 Jan 2024 15:31:06 +0100 Subject: [PATCH 050/316] [pallet_staking] adapt https://github.com/paritytech/polkadot-sdk/pull/1189 --- relay/kusama/src/lib.rs | 24 ++++++++++++++++-------- relay/kusama/src/tests.rs | 2 +- relay/polkadot/src/lib.rs | 26 +++++++++++++++++--------- 3 files changed, 34 insertions(+), 18 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index b62f183a24..fe2452f4dc 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -291,7 +291,7 @@ impl pallet_babe::Config for Runtime { type WeightInfo = (); type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; + type MaxNominators = MaxNominators; } parameter_types! { @@ -336,7 +336,7 @@ parameter_types! { impl pallet_beefy::Config for Runtime { type BeefyId = BeefyId; type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; + type MaxNominators = MaxNominators; type MaxSetIdSessionEntries = BeefySetIdSessionEntries; type OnNewValidatorSet = BeefyMmrLeaf; type WeightInfo = (); @@ -649,7 +649,12 @@ parameter_types! { 27, "DOT_SLASH_DEFER_DURATION" ); - pub const MaxNominatorRewardedPerValidator: u32 = 512; + // TODO:(PR#137) - check MaxExposurePageSize/MaxNominators 512? + pub const MaxExposurePageSize: u32 = 512; + // Note: this is not really correct as Max Nominators is (MaxExposurePageSize * page_count) but + // this is an unbounded number. We just set it to a reasonably high value, 1 full page + // of nominators. + pub const MaxNominators: u32 = 512; pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); // 24 pub const MaxNominations: u32 = ::LIMIT as u32; @@ -673,7 +678,7 @@ impl pallet_staking::Config for Runtime { type SessionInterface = Self; type EraPayout = EraPayout; type NextNewSession = Session; - type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; + type MaxExposurePageSize = MaxExposurePageSize; type OffendingValidatorsThreshold = OffendingValidatorsThreshold; type VoterList = VoterList; type TargetList = UseValidatorsMap; @@ -693,8 +698,6 @@ impl pallet_fast_unstake::Config for Runtime { type ControlOrigin = EnsureRoot; type Staking = Staking; type MaxErasToCheckPerBlock = ConstU32<1>; - #[cfg(feature = "runtime-benchmarks")] - type MaxBackersPerValidator = MaxNominatorRewardedPerValidator; type WeightInfo = weights::pallet_fast_unstake::WeightInfo; } @@ -829,7 +832,7 @@ impl pallet_grandpa::Config for Runtime { type WeightInfo = (); type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; + type MaxNominators = MaxNominators; type MaxSetIdSessionEntries = MaxSetIdSessionEntries; type KeyOwnerProof = >::Proof; @@ -1672,6 +1675,7 @@ pub mod migrations { pub type Unreleased = ( pallet_nomination_pools::migration::versioned::V5toV6, pallet_nomination_pools::migration::versioned::V6ToV7, + pallet_staking::migrations::v14::MigrateToV14, ); } @@ -2222,10 +2226,14 @@ sp_api::impl_runtime_apis! { } } - impl pallet_staking_runtime_api::StakingApi for Runtime { + impl pallet_staking_runtime_api::StakingApi for Runtime { fn nominations_quota(balance: Balance) -> u32 { Staking::api_nominations_quota(balance) } + + fn eras_stakers_page_count(era: sp_staking::EraIndex, account: AccountId) -> sp_staking::Page { + Staking::api_eras_stakers_page_count(era, account) + } } impl sp_genesis_builder::GenesisBuilder for Runtime { diff --git a/relay/kusama/src/tests.rs b/relay/kusama/src/tests.rs index e096a19cc5..e6e248a8e9 100644 --- a/relay/kusama/src/tests.rs +++ b/relay/kusama/src/tests.rs @@ -59,7 +59,7 @@ fn payout_weight_portion() { use pallet_staking::WeightInfo; let payout_weight = ::WeightInfo::payout_stakers_alive_staked( - MaxNominatorRewardedPerValidator::get(), + MaxNominators::get(), ) .ref_time() as f64; let block_weight = BlockWeights::get().max_block.ref_time() as f64; diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index a8adeaea72..8221d3c31e 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -279,7 +279,7 @@ impl pallet_babe::Config for Runtime { type WeightInfo = (); type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; + type MaxNominators = MaxNominators; type KeyOwnerProof = >::Proof; @@ -330,7 +330,7 @@ parameter_types! { impl pallet_beefy::Config for Runtime { type BeefyId = BeefyId; type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; + type MaxNominators = MaxNominators; type MaxSetIdSessionEntries = BeefySetIdSessionEntries; type OnNewValidatorSet = BeefyMmrLeaf; type WeightInfo = (); @@ -667,7 +667,12 @@ parameter_types! { "DOT_SLASH_DEFER_DURATION" ); pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE; - pub const MaxNominatorRewardedPerValidator: u32 = 512; + // TODO:(PR#137) - check MaxExposurePageSize/MaxNominators 512? + pub const MaxExposurePageSize: u32 = 512; + // Note: this is not really correct as Max Nominators is (MaxExposurePageSize * page_count) but + // this is an unbounded number. We just set it to a reasonably high value, 1 full page + // of nominators. + pub const MaxNominators: u32 = 512; pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); // 16 pub const MaxNominations: u32 = ::LIMIT as u32; @@ -764,7 +769,7 @@ impl pallet_staking::Config for Runtime { type AdminOrigin = EitherOf, StakingAdmin>; type SessionInterface = Self; type EraPayout = EraPayout; - type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; + type MaxExposurePageSize = MaxExposurePageSize; type OffendingValidatorsThreshold = OffendingValidatorsThreshold; type NextNewSession = Session; type ElectionProvider = ElectionProviderMultiPhase; @@ -787,8 +792,6 @@ impl pallet_fast_unstake::Config for Runtime { type ControlOrigin = EnsureRoot; type Staking = Staking; type MaxErasToCheckPerBlock = ConstU32<1>; - #[cfg(feature = "runtime-benchmarks")] - type MaxBackersPerValidator = MaxNominatorRewardedPerValidator; type WeightInfo = weights::pallet_fast_unstake::WeightInfo; } @@ -953,7 +956,7 @@ impl pallet_grandpa::Config for Runtime { type WeightInfo = (); type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; + type MaxNominators = MaxNominators; type MaxSetIdSessionEntries = MaxSetIdSessionEntries; type KeyOwnerProof = >::Proof; @@ -1705,6 +1708,7 @@ pub mod migrations { UpgradeSessionKeys, pallet_nomination_pools::migration::versioned::V5toV6, pallet_nomination_pools::migration::versioned::V6ToV7, + pallet_staking::migrations::v14::MigrateToV14, ); } @@ -1848,10 +1852,14 @@ sp_api::impl_runtime_apis! { } } - impl pallet_staking_runtime_api::StakingApi for Runtime { + impl pallet_staking_runtime_api::StakingApi for Runtime { fn nominations_quota(balance: Balance) -> u32 { Staking::api_nominations_quota(balance) } + + fn eras_stakers_page_count(era: sp_staking::EraIndex, account: AccountId) -> sp_staking::Page { + Staking::api_eras_stakers_page_count(era, account) + } } impl tx_pool_api::runtime_api::TaggedTransactionQueue for Runtime { @@ -2456,7 +2464,7 @@ mod test_fees { use pallet_staking::WeightInfo; let payout_weight = ::WeightInfo::payout_stakers_alive_staked( - MaxNominatorRewardedPerValidator::get(), + MaxNominators::get(), ) .ref_time() as f64; let block_weight = BlockWeights::get().max_block.ref_time() as f64; From 1b6e951df6f3c3aa83cc41ead49740c33350ca47 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 10 Jan 2024 12:06:27 +0100 Subject: [PATCH 051/316] [pallet-staking] adapt https://github.com/paritytech/polkadot-sdk/pull/2380 --- relay/kusama/src/weights/pallet_staking.rs | 16 ++++++++++++++++ relay/polkadot/src/weights/pallet_staking.rs | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/relay/kusama/src/weights/pallet_staking.rs b/relay/kusama/src/weights/pallet_staking.rs index a6be62de0a..356b94047c 100644 --- a/relay/kusama/src/weights/pallet_staking.rs +++ b/relay/kusama/src/weights/pallet_staking.rs @@ -317,6 +317,22 @@ impl pallet_staking::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Staking::Ledger` (r:1 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) + /// Storage: `Staking::Payee` (r:1 w:1) + /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + fn update_payee() -> Weight { + // Proof Size summary in bytes: + // Measured: `932` + // Estimated: `4556` + // Minimum execution time: 21_695_000 picoseconds. + Weight::from_parts(22_351_000, 0) + .saturating_add(Weight::from_parts(0, 4556)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } /// Storage: `Staking::Bonded` (r:1 w:1) /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Staking::Ledger` (r:1 w:2) diff --git a/relay/polkadot/src/weights/pallet_staking.rs b/relay/polkadot/src/weights/pallet_staking.rs index eea33b1a18..80359106f4 100644 --- a/relay/polkadot/src/weights/pallet_staking.rs +++ b/relay/polkadot/src/weights/pallet_staking.rs @@ -317,6 +317,22 @@ impl pallet_staking::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Staking::Ledger` (r:1 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) + /// Storage: `Staking::Payee` (r:1 w:1) + /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:1 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + fn update_payee() -> Weight { + // Proof Size summary in bytes: + // Measured: `932` + // Estimated: `4556` + // Minimum execution time: 21_695_000 picoseconds. + Weight::from_parts(22_351_000, 0) + .saturating_add(Weight::from_parts(0, 4556)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } /// Storage: `Staking::Bonded` (r:1 w:1) /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Staking::Ledger` (r:1 w:2) From 396a38008368778bf09a9cc7b6d919c33de925e7 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 9 Jan 2024 16:02:43 +0100 Subject: [PATCH 052/316] [runtime_api::ParachainHost] removed `Hash, BlockNumber` types --- relay/kusama/src/lib.rs | 2 +- relay/polkadot/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index fe2452f4dc..8fc901699e 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1823,7 +1823,7 @@ sp_api::impl_runtime_apis! { } #[api_version(8)] - impl primitives::runtime_api::ParachainHost for Runtime { + impl primitives::runtime_api::ParachainHost for Runtime { fn validators() -> Vec { parachains_runtime_api_impl::validators::() } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 8221d3c31e..00401300f5 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1878,7 +1878,7 @@ sp_api::impl_runtime_apis! { } } - impl primitives::runtime_api::ParachainHost for Runtime { + impl primitives::runtime_api::ParachainHost for Runtime { fn validators() -> Vec { parachains_runtime_api_impl::validators::() } From f37a472c9b2cf4e32c68def0f065df5e2b6ac070 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 10 Jan 2024 11:57:52 +0100 Subject: [PATCH 053/316] [pallet_nomination_pools] adapt https://github.com/paritytech/polkadot-sdk/pull/2474 (missing `set_commission_claim_permission`) --- relay/kusama/src/weights/pallet_nomination_pools.rs | 12 ++++++++++++ .../polkadot/src/weights/pallet_nomination_pools.rs | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/relay/kusama/src/weights/pallet_nomination_pools.rs b/relay/kusama/src/weights/pallet_nomination_pools.rs index e5a345b377..e67353f3bd 100644 --- a/relay/kusama/src/weights/pallet_nomination_pools.rs +++ b/relay/kusama/src/weights/pallet_nomination_pools.rs @@ -583,6 +583,18 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `NominationPools::BondedPools` (r:1 w:1) + /// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`) + fn set_commission_claim_permission() -> Weight { + // Proof Size summary in bytes: + // Measured: `498` + // Estimated: `3719` + // Minimum execution time: 14_965_000 picoseconds. + Weight::from_parts(15_548_000, 0) + .saturating_add(Weight::from_parts(0, 3719)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } /// Storage: `NominationPools::PoolMembers` (r:1 w:0) /// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`) /// Storage: `NominationPools::ClaimPermissions` (r:1 w:1) diff --git a/relay/polkadot/src/weights/pallet_nomination_pools.rs b/relay/polkadot/src/weights/pallet_nomination_pools.rs index 7dc54be883..5192762d7f 100644 --- a/relay/polkadot/src/weights/pallet_nomination_pools.rs +++ b/relay/polkadot/src/weights/pallet_nomination_pools.rs @@ -583,6 +583,18 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `NominationPools::BondedPools` (r:1 w:1) + /// Proof: `NominationPools::BondedPools` (`max_values`: None, `max_size`: Some(254), added: 2729, mode: `MaxEncodedLen`) + fn set_commission_claim_permission() -> Weight { + // Proof Size summary in bytes: + // Measured: `498` + // Estimated: `3719` + // Minimum execution time: 14_965_000 picoseconds. + Weight::from_parts(15_548_000, 0) + .saturating_add(Weight::from_parts(0, 3719)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } /// Storage: `NominationPools::PoolMembers` (r:1 w:0) /// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`) /// Storage: `NominationPools::ClaimPermissions` (r:1 w:1) From 1d7e42de8c885b8ca8ceeffc2d505ca5a557fed6 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 10 Jan 2024 12:10:47 +0100 Subject: [PATCH 054/316] [pallet-vesting] adapt https://github.com/paritytech/polkadot-sdk/pull/1982 --- relay/kusama/src/weights/pallet_vesting.rs | 23 ++++++++++++++++++++ relay/polkadot/src/weights/pallet_vesting.rs | 23 ++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/relay/kusama/src/weights/pallet_vesting.rs b/relay/kusama/src/weights/pallet_vesting.rs index 98b46c786e..fc70b06965 100644 --- a/relay/kusama/src/weights/pallet_vesting.rs +++ b/relay/kusama/src/weights/pallet_vesting.rs @@ -196,6 +196,29 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[2, 28]`. + fn force_remove_vesting_schedule(l: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `555 + l * (25 ±0) + s * (36 ±0)` + // Estimated: `4764` + // Minimum execution time: 41_497_000 picoseconds. + Weight::from_parts(38_763_834, 4764) + // Standard Error: 2_030 + .saturating_add(Weight::from_parts(99_580, 0).saturating_mul(l.into())) + // Standard Error: 3_750 + .saturating_add(Weight::from_parts(132_188, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) diff --git a/relay/polkadot/src/weights/pallet_vesting.rs b/relay/polkadot/src/weights/pallet_vesting.rs index 41831b8f30..e45912940b 100644 --- a/relay/polkadot/src/weights/pallet_vesting.rs +++ b/relay/polkadot/src/weights/pallet_vesting.rs @@ -196,6 +196,29 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Storage: `Balances::Locks` (r:1 w:1) /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `l` is `[0, 49]`. + /// The range of component `s` is `[2, 28]`. + fn force_remove_vesting_schedule(l: u32, s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `555 + l * (25 ±0) + s * (36 ±0)` + // Estimated: `4764` + // Minimum execution time: 41_497_000 picoseconds. + Weight::from_parts(38_763_834, 4764) + // Standard Error: 2_030 + .saturating_add(Weight::from_parts(99_580, 0).saturating_mul(l.into())) + // Standard Error: 3_750 + .saturating_add(Weight::from_parts(132_188, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + /// Storage: `Vesting::Vesting` (r:1 w:1) + /// Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1057), added: 3532, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(193), added: 2668, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) From 56d2f6e050fb3ba4e985afd95d57994159d99c86 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 10 Jan 2024 12:26:41 +0100 Subject: [PATCH 055/316] [ParachainHost] adapt https://github.com/paritytech/polkadot-sdk/pull/2177 --- relay/kusama/src/lib.rs | 3 ++- .../weights/runtime_parachains_configuration.rs | 16 ++++++++++++++++ relay/polkadot/src/lib.rs | 1 + .../weights/runtime_parachains_configuration.rs | 16 ++++++++++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 8fc901699e..1373f6d0c4 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1669,13 +1669,14 @@ pub type Migrations = migrations::Unreleased; /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { - use super::Runtime; + use super::{Runtime, parachains_configuration}; /// Unreleased migrations. Add new ones here: pub type Unreleased = ( pallet_nomination_pools::migration::versioned::V5toV6, pallet_nomination_pools::migration::versioned::V6ToV7, pallet_staking::migrations::v14::MigrateToV14, + parachains_configuration::migration::v10::MigrateToV10, ); } diff --git a/relay/kusama/src/weights/runtime_parachains_configuration.rs b/relay/kusama/src/weights/runtime_parachains_configuration.rs index fd409cd3c4..bd5c71c868 100644 --- a/relay/kusama/src/weights/runtime_parachains_configuration.rs +++ b/relay/kusama/src/weights/runtime_parachains_configuration.rs @@ -157,4 +157,20 @@ impl runtime_parachains::configuration::WeightInfo for .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Configuration::PendingConfigs` (r:1 w:1) + /// Proof: `Configuration::PendingConfigs` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Configuration::BypassConsistencyCheck` (r:1 w:0) + /// Proof: `Configuration::BypassConsistencyCheck` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0) + /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_node_feature() -> Weight { + // Proof Size summary in bytes: + // Measured: `151` + // Estimated: `1636` + // Minimum execution time: 10_158_000 picoseconds. + Weight::from_parts(10_430_000, 0) + .saturating_add(Weight::from_parts(0, 1636)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 00401300f5..22790ad4f1 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1709,6 +1709,7 @@ pub mod migrations { pallet_nomination_pools::migration::versioned::V5toV6, pallet_nomination_pools::migration::versioned::V6ToV7, pallet_staking::migrations::v14::MigrateToV14, + parachains_configuration::migration::v10::MigrateToV10, ); } diff --git a/relay/polkadot/src/weights/runtime_parachains_configuration.rs b/relay/polkadot/src/weights/runtime_parachains_configuration.rs index c35f14898d..d9bbc5d897 100644 --- a/relay/polkadot/src/weights/runtime_parachains_configuration.rs +++ b/relay/polkadot/src/weights/runtime_parachains_configuration.rs @@ -157,4 +157,20 @@ impl runtime_parachains::configuration::WeightInfo for .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Configuration::PendingConfigs` (r:1 w:1) + /// Proof: `Configuration::PendingConfigs` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Configuration::BypassConsistencyCheck` (r:1 w:0) + /// Proof: `Configuration::BypassConsistencyCheck` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0) + /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_node_feature() -> Weight { + // Proof Size summary in bytes: + // Measured: `151` + // Estimated: `1636` + // Minimum execution time: 10_158_000 picoseconds. + Weight::from_parts(10_430_000, 0) + .saturating_add(Weight::from_parts(0, 1636)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } } From e60088e20c61c9989ed1ea1d12c11856b1f0d695 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 10 Jan 2024 13:44:49 +0100 Subject: [PATCH 056/316] [pallet_xcm] adapt https://github.com/paritytech/polkadot-sdk/pull/2086 (weights: `new_query` / `take_response`) --- relay/kusama/src/weights/pallet_xcm.rs | 26 +++++++++++++++++++ relay/polkadot/src/weights/pallet_xcm.rs | 26 +++++++++++++++++++ .../src/weights/pallet_xcm.rs | 26 +++++++++++++++++++ .../src/weights/pallet_xcm.rs | 26 +++++++++++++++++++ .../src/weights/pallet_xcm.rs | 26 +++++++++++++++++++ .../src/weights/pallet_xcm.rs | 26 +++++++++++++++++++ .../src/weights/pallet_xcm.rs | 26 +++++++++++++++++++ 7 files changed, 182 insertions(+) diff --git a/relay/kusama/src/weights/pallet_xcm.rs b/relay/kusama/src/weights/pallet_xcm.rs index fa98b4a911..9ba23c89b1 100644 --- a/relay/kusama/src/weights/pallet_xcm.rs +++ b/relay/kusama/src/weights/pallet_xcm.rs @@ -267,4 +267,30 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) } + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 2_947_000 picoseconds. + Weight::from_parts(3_117_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7576` + // Estimated: `11041` + // Minimum execution time: 24_595_000 picoseconds. + Weight::from_parts(24_907_000, 0) + .saturating_add(Weight::from_parts(0, 11041)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/relay/polkadot/src/weights/pallet_xcm.rs b/relay/polkadot/src/weights/pallet_xcm.rs index 6296c77af7..44ee22176c 100644 --- a/relay/polkadot/src/weights/pallet_xcm.rs +++ b/relay/polkadot/src/weights/pallet_xcm.rs @@ -269,4 +269,30 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) } + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 2_947_000 picoseconds. + Weight::from_parts(3_117_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7576` + // Estimated: `11041` + // Minimum execution time: 24_595_000 picoseconds. + Weight::from_parts(24_907_000, 0) + .saturating_add(Weight::from_parts(0, 11041)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs index 7d39d91318..268a81df63 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs @@ -294,4 +294,30 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(4)) } + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 2_947_000 picoseconds. + Weight::from_parts(3_117_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7576` + // Estimated: `11041` + // Minimum execution time: 24_595_000 picoseconds. + Weight::from_parts(24_907_000, 0) + .saturating_add(Weight::from_parts(0, 11041)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs index 1d0adf15d7..18e20d33a5 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs @@ -294,4 +294,30 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(4)) } + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 2_947_000 picoseconds. + Weight::from_parts(3_117_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7576` + // Estimated: `11041` + // Minimum execution time: 24_595_000 picoseconds. + Weight::from_parts(24_907_000, 0) + .saturating_add(Weight::from_parts(0, 11041)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs index e6f0e1b16c..a039b7ef19 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs @@ -293,4 +293,30 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(4)) } + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 2_947_000 picoseconds. + Weight::from_parts(3_117_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7576` + // Estimated: `11041` + // Minimum execution time: 24_595_000 picoseconds. + Weight::from_parts(24_907_000, 0) + .saturating_add(Weight::from_parts(0, 11041)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs index 1a19b58e03..033e89c0b1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs @@ -293,4 +293,30 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(4)) } + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 2_947_000 picoseconds. + Weight::from_parts(3_117_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7576` + // Estimated: `11041` + // Minimum execution time: 24_595_000 picoseconds. + Weight::from_parts(24_907_000, 0) + .saturating_add(Weight::from_parts(0, 11041)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs index 12083d380a..54825fb335 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs @@ -293,4 +293,30 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(4)) } + /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) + /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmPallet::Queries` (r:0 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 2_947_000 picoseconds. + Weight::from_parts(3_117_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `XcmPallet::Queries` (r:1 w:1) + /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7576` + // Estimated: `11041` + // Minimum execution time: 24_595_000 picoseconds. + Weight::from_parts(24_907_000, 0) + .saturating_add(Weight::from_parts(0, 11041)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } From 70f49b1ef7ec3c1aa27c212557ff8c422dcef78a Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 10 Jan 2024 14:45:13 +0100 Subject: [PATCH 057/316] [pallet_xcm] adapt https://github.com/paritytech/polkadot-sdk/pull/1672 (new `reserve_transfer_assets`) --- relay/kusama/src/lib.rs | 29 ++++++++++++++- relay/kusama/src/xcm_config.rs | 7 ---- relay/polkadot/src/lib.rs | 35 +++++++++++++++--- relay/polkadot/src/xcm_config.rs | 7 ---- .../asset-hubs/asset-hub-kusama/src/lib.rs | 36 ++++++++++++++++++- .../asset-hub-kusama/src/xcm_config.rs | 7 ---- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 36 ++++++++++++++++++- .../asset-hub-polkadot/src/xcm_config.rs | 7 ---- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 26 +++++++++++++- .../bridge-hub-kusama/src/xcm_config.rs | 7 ---- .../bridge-hub-polkadot/src/lib.rs | 26 +++++++++++++- .../bridge-hub-polkadot/src/xcm_config.rs | 7 ---- .../collectives-polkadot/src/lib.rs | 28 ++++++++++++++- .../collectives-polkadot/src/xcm_config.rs | 7 ---- 14 files changed, 206 insertions(+), 59 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 1373f6d0c4..74f5987b33 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1751,7 +1751,7 @@ mod benches { [pallet_whitelist, Whitelist] [pallet_asset_rate, AssetRate] // XCM - [pallet_xcm, XcmPallet] + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] [pallet_xcm_benchmarks::fungible, pallet_xcm_benchmarks::fungible::Pallet::] [pallet_xcm_benchmarks::generic, pallet_xcm_benchmarks::generic::Pallet::] ); @@ -2279,6 +2279,7 @@ sp_api::impl_runtime_apis! { use pallet_session_benchmarking::Pallet as SessionBench; use pallet_offences_benchmarking::Pallet as OffencesBench; use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; use frame_system_benchmarking::Pallet as SystemBench; use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench; use frame_benchmarking::baseline::Pallet as Baseline; @@ -2327,6 +2328,32 @@ sp_api::impl_runtime_apis! { impl pallet_nomination_pools_benchmarking::Config for Runtime {} impl runtime_parachains::disputes::slashing::benchmarking::Config for Runtime {} + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime { + fn reachable_dest() -> Option { + Some(crate::xcm_config::AssetHubLocation::get()) + } + + fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Relay/native token can be teleported to/from AH. + Some(( + MultiAsset { fun: Fungible(EXISTENTIAL_DEPOSIT), id: Concrete(Here.into()) }, + crate::xcm_config::AssetHubLocation::get(), + )) + } + + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Relay can reserve transfer native token to some random parachain. + Some(( + MultiAsset { + fun: Fungible(EXISTENTIAL_DEPOSIT), + id: Concrete(Here.into()) + }, + crate::Junction::Parachain(43211234).into(), + )) + } + } + parameter_types! { pub ExistentialDepositMultiAsset: Option = Some(( TokenLocation::get(), diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index 2adcf527bd..ff6b12390a 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -222,11 +222,6 @@ parameter_types! { pub const FellowsBodyId: BodyId = BodyId::Technical; } -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parachain(1000).into()); -} - /// Type to convert an `Origin` type value into a `MultiLocation` value which represents an interior /// location of this chain. pub type LocalOriginToLocation = ( @@ -286,8 +281,6 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); type WeightInfo = crate::weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 22790ad4f1..8aae4e651f 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1779,7 +1779,7 @@ mod benches { [pallet_whitelist, Whitelist] [pallet_asset_rate, AssetRate] // XCM - [pallet_xcm, XcmPallet] + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] [pallet_xcm_benchmarks::fungible, pallet_xcm_benchmarks::fungible::Pallet::] [pallet_xcm_benchmarks::generic, pallet_xcm_benchmarks::generic::Pallet::] ); @@ -2291,6 +2291,7 @@ sp_api::impl_runtime_apis! { use pallet_offences_benchmarking::Pallet as OffencesBench; use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench; use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; use frame_system_benchmarking::Pallet as SystemBench; use frame_benchmarking::baseline::Pallet as Baseline; @@ -2329,9 +2330,31 @@ sp_api::impl_runtime_apis! { impl pallet_nomination_pools_benchmarking::Config for Runtime {} impl runtime_parachains::disputes::slashing::benchmarking::Config for Runtime {} - let mut whitelist: Vec = AllPalletsWithSystem::whitelisted_storage_keys(); - let treasury_key = frame_system::Account::::hashed_key_for(Treasury::account_id()); - whitelist.push(treasury_key.to_vec().into()); + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime { + fn reachable_dest() -> Option { + Some(crate::xcm_config::AssetHubLocation::get()) + } + + fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Relay/native token can be teleported to/from AH. + Some(( + MultiAsset { fun: Fungible(EXISTENTIAL_DEPOSIT), id: Concrete(Here.into()) }, + crate::xcm_config::AssetHubLocation::get(), + )) + } + + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Relay can reserve transfer native token to some random parachain. + Some(( + MultiAsset { + fun: Fungible(EXISTENTIAL_DEPOSIT), + id: Concrete(Here.into()) + }, + crate::Junction::Parachain(43211234).into(), + )) + } + } parameter_types! { pub ExistentialDepositMultiAsset: Option = Some(( @@ -2440,6 +2463,10 @@ sp_api::impl_runtime_apis! { } } + let mut whitelist: Vec = AllPalletsWithSystem::whitelisted_storage_keys(); + let treasury_key = frame_system::Account::::hashed_key_for(Treasury::account_id()); + whitelist.push(treasury_key.to_vec().into()); + let mut batches = Vec::::new(); let params = (&config, &whitelist); diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index 9445b3b3da..ef1a73d398 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -241,11 +241,6 @@ parameter_types! { pub const TreasurerBodyId: BodyId = BodyId::Index(TREASURER_INDEX); } -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parachain(1000).into()); -} - /// Type to convert the `GeneralAdmin` origin to a Plurality `MultiLocation` value. pub type GeneralAdminToPlurality = OriginToPluralityVoice; @@ -313,7 +308,5 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); type WeightInfo = crate::weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 00f4c23ecd..a93df6130b 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -976,7 +976,7 @@ mod benches { [pallet_collator_selection, CollatorSelection] [cumulus_pallet_xcmp_queue, XcmpQueue] // XCM - [pallet_xcm, PolkadotXcm] + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] // Bridges [pallet_xcm_bridge_hub_router, ToPolkadot] // NOTE: Make sure you point to the individual modules below. @@ -1224,6 +1224,7 @@ impl_runtime_apis! { ) { use frame_benchmarking::{Benchmarking, BenchmarkList}; use frame_support::traits::StorageInfoTrait; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; use frame_system_benchmarking::Pallet as SystemBench; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; use pallet_xcm_bridge_hub_router::benchmarking::Pallet as XcmBridgeHubRouterBench; @@ -1276,6 +1277,39 @@ impl_runtime_apis! { use xcm_config::{KsmLocation, MaxAssetsIntoHolding}; use pallet_xcm_benchmarks::asset_instance_from; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime { + fn reachable_dest() -> Option { + Some(Parent.into()) + } + + fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Relay/native token can be teleported between AH and Relay. + Some(( + MultiAsset { + fun: Fungible(EXISTENTIAL_DEPOSIT), + id: Concrete(Parent.into()) + }, + Parent.into(), + )) + } + + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // AH can reserve transfer native token to some random parachain. + let random_para_id = 43211234; + ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests( + random_para_id.into() + ); + Some(( + MultiAsset { + fun: Fungible(EXISTENTIAL_DEPOSIT), + id: Concrete(Parent.into()) + }, + ParentThen(Parachain(random_para_id).into()).into(), + )) + } + } + parameter_types! { pub ExistentialDepositMultiAsset: Option = Some(( KsmLocation::get(), diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index ebf85f5736..ea4523bac2 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -654,11 +654,6 @@ pub type XcmRouter = WithUniqueTopic<( SovereignPaidRemoteExporter, )>; -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; // We want to disallow users sending (arbitrary) XCMs from this chain. @@ -688,8 +683,6 @@ impl pallet_xcm::Config for Runtime { type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; type WeightInfo = crate::weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index fd8054552b..fb28739650 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -893,7 +893,7 @@ mod benches { [pallet_collator_selection, CollatorSelection] [cumulus_pallet_xcmp_queue, XcmpQueue] // XCM - [pallet_xcm, PolkadotXcm] + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] // Bridges [pallet_xcm_bridge_hub_router, ToKusama] // NOTE: Make sure you point to the individual modules below. @@ -1117,6 +1117,7 @@ impl_runtime_apis! { ) { use frame_benchmarking::{Benchmarking, BenchmarkList}; use frame_support::traits::StorageInfoTrait; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; use frame_system_benchmarking::Pallet as SystemBench; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; use pallet_xcm_bridge_hub_router::benchmarking::Pallet as XcmBridgeHubRouterBench; @@ -1168,6 +1169,39 @@ impl_runtime_apis! { use xcm_config::{DotLocation, MaxAssetsIntoHolding}; use pallet_xcm_benchmarks::asset_instance_from; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime { + fn reachable_dest() -> Option { + Some(Parent.into()) + } + + fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Relay/native token can be teleported between AH and Relay. + Some(( + MultiAsset { + fun: Fungible(EXISTENTIAL_DEPOSIT), + id: Concrete(Parent.into()) + }, + Parent.into(), + )) + } + + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // AH can reserve transfer native token to some random parachain. + let random_para_id = 43211234; + ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests( + random_para_id.into() + ); + Some(( + MultiAsset { + fun: Fungible(EXISTENTIAL_DEPOSIT), + id: Concrete(Parent.into()) + }, + ParentThen(Parachain(random_para_id).into()).into(), + )) + } + } + parameter_types! { pub ExistentialDepositMultiAsset: Option = Some(( DotLocation::get(), diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 322ae84524..2c5ce969d0 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -579,11 +579,6 @@ pub type XcmRouter = WithUniqueTopic<( SovereignPaidRemoteExporter, )>; -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; // We want to disallow users sending (arbitrary) XCMs from this chain. @@ -613,8 +608,6 @@ impl pallet_xcm::Config for Runtime { type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; type WeightInfo = crate::weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 9e85d68fbd..bb44336155 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -670,7 +670,7 @@ mod benches { [pallet_collator_selection, CollatorSelection] [cumulus_pallet_xcmp_queue, XcmpQueue] // XCM - [pallet_xcm, PolkadotXcm] + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] // NOTE: Make sure you point to the individual modules below. [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] @@ -929,6 +929,7 @@ impl_runtime_apis! { ) { use frame_benchmarking::{Benchmarking, BenchmarkList}; use frame_support::traits::StorageInfoTrait; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; use frame_system_benchmarking::Pallet as SystemBench; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; @@ -974,6 +975,29 @@ impl_runtime_apis! { use xcm::latest::prelude::*; use xcm_config::KsmRelayLocation; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime { + fn reachable_dest() -> Option { + Some(Parent.into()) + } + + fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Relay/native token can be teleported between BH and Relay. + Some(( + MultiAsset { + fun: Fungible(EXISTENTIAL_DEPOSIT), + id: Concrete(Parent.into()) + }, + Parent.into(), + )) + } + + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Reserve transfers are disabled on BH. + None + } + } + parameter_types! { pub ExistentialDepositMultiAsset: Option = Some(( KsmRelayLocation::get(), diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 31ae6c2294..b26686db8c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -328,11 +328,6 @@ pub type XcmRouter = WithUniqueTopic<( XcmpQueue, )>; -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; // We want to disallow users sending (arbitrary) XCMs from this chain. @@ -361,8 +356,6 @@ impl pallet_xcm::Config for Runtime { type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; type WeightInfo = crate::weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 9421cf4021..b82a4d1a2f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -668,7 +668,7 @@ mod benches { [pallet_collator_selection, CollatorSelection] [cumulus_pallet_xcmp_queue, XcmpQueue] // XCM - [pallet_xcm, PolkadotXcm] + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] // NOTE: Make sure you point to the individual modules below. [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] @@ -927,6 +927,7 @@ impl_runtime_apis! { ) { use frame_benchmarking::{Benchmarking, BenchmarkList}; use frame_support::traits::StorageInfoTrait; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; use frame_system_benchmarking::Pallet as SystemBench; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; @@ -972,6 +973,29 @@ impl_runtime_apis! { use xcm::latest::prelude::*; use xcm_config::DotRelayLocation; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime { + fn reachable_dest() -> Option { + Some(Parent.into()) + } + + fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Relay/native token can be teleported between BH and Relay. + Some(( + MultiAsset { + fun: Fungible(EXISTENTIAL_DEPOSIT), + id: Concrete(Parent.into()) + }, + Parent.into(), + )) + } + + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Reserve transfers are disabled on BH. + None + } + } + parameter_types! { pub ExistentialDepositMultiAsset: Option = Some(( DotRelayLocation::get(), diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index bcb31a1ad1..a9888646dd 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -335,11 +335,6 @@ pub type XcmRouter = WithUniqueTopic<( XcmpQueue, )>; -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; // We want to disallow users sending (arbitrary) XCMs from this chain. @@ -368,8 +363,6 @@ impl pallet_xcm::Config for Runtime { type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; type WeightInfo = crate::weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 443dd51a94..5e0764d59b 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -707,7 +707,7 @@ mod benches { [cumulus_pallet_xcmp_queue, XcmpQueue] [pallet_alliance, Alliance] [pallet_collective, AllianceMotion] - [pallet_xcm, PolkadotXcm] + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] [pallet_preimage, Preimage] [pallet_scheduler, Scheduler] [pallet_referenda, FellowshipReferenda] @@ -900,6 +900,7 @@ impl_runtime_apis! { ) { use frame_benchmarking::{Benchmarking, BenchmarkList}; use frame_support::traits::StorageInfoTrait; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; use frame_system_benchmarking::Pallet as SystemBench; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; @@ -931,6 +932,31 @@ impl_runtime_apis! { use cumulus_pallet_session_benchmarking::Pallet as SessionBench; impl cumulus_pallet_session_benchmarking::Config for Runtime {} + use xcm::latest::prelude::*; + + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime { + fn reachable_dest() -> Option { + Some(Parent.into()) + } + + fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Relay/native token can be teleported between Collectives and Relay. + Some(( + MultiAsset { + fun: Fungible(EXISTENTIAL_DEPOSIT), + id: Concrete(Parent.into()) + }.into(), + Parent.into(), + )) + } + + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + // Reserve transfers are disabled on Collectives. + None + } + } + let whitelist: Vec = vec![ // Block Number hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index b01303f997..6a140d1d4a 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -327,11 +327,6 @@ pub type XcmRouter = WithUniqueTopic<( XcmpQueue, )>; -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - /// Type to convert the Fellows origin to a Plurality `MultiLocation` value. pub type FellowsToPlurality = OriginToPluralityVoice; @@ -359,8 +354,6 @@ impl pallet_xcm::Config for Runtime { type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; type WeightInfo = crate::weights::pallet_xcm::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); From 20ebb1ae589447b8f0479b5cc4b671a095120e8a Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 10 Jan 2024 15:09:46 +0100 Subject: [PATCH 058/316] [pallet_xcm] adapt https://github.com/paritytech/polkadot-sdk/pull/2388 (new `transfer_assets`) --- relay/kusama/src/lib.rs | 14 ++++++ relay/kusama/src/weights/pallet_xcm.rs | 26 ++++++++++ relay/polkadot/src/lib.rs | 14 ++++++ relay/polkadot/src/weights/pallet_xcm.rs | 26 ++++++++++ .../asset-hubs/asset-hub-kusama/src/lib.rs | 49 +++++++++++++++++++ .../src/weights/pallet_xcm.rs | 30 ++++++++++++ .../asset-hubs/asset-hub-polkadot/src/lib.rs | 49 +++++++++++++++++++ .../src/weights/pallet_xcm.rs | 30 ++++++++++++ .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 12 +++++ .../src/weights/pallet_xcm.rs | 26 ++++++++++ .../bridge-hub-polkadot/src/lib.rs | 12 +++++ .../src/weights/pallet_xcm.rs | 26 ++++++++++ .../collectives-polkadot/src/lib.rs | 12 +++++ .../src/weights/pallet_xcm.rs | 26 ++++++++++ 14 files changed, 352 insertions(+) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 74f5987b33..ed280495f2 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -2352,6 +2352,20 @@ sp_api::impl_runtime_apis! { crate::Junction::Parachain(43211234).into(), )) } + + fn set_up_complex_asset_transfer( + ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + // Relay supports only native token, either reserve transfer it to non-system parachains, + // or teleport it to system parachain. Use the teleport case for benchmarking as it's + // slightly heavier. + // Relay/native token can be teleported to/from AH. + let native_location = Here.into(); + let dest = crate::xcm_config::AssetHubLocation::get(); + pallet_xcm::benchmarking::helpers::native_teleport_as_asset_transfer::( + native_location, + dest + ) + } } parameter_types! { diff --git a/relay/kusama/src/weights/pallet_xcm.rs b/relay/kusama/src/weights/pallet_xcm.rs index 9ba23c89b1..027570ad3e 100644 --- a/relay/kusama/src/weights/pallet_xcm.rs +++ b/relay/kusama/src/weights/pallet_xcm.rs @@ -85,6 +85,32 @@ impl pallet_xcm::WeightInfo for WeightInfo { Weight::from_parts(17_284_000, 0) .saturating_add(Weight::from_parts(0, 0)) } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3593` + // Minimum execution time: 91_890_000 picoseconds. + Weight::from_parts(93_460_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(3)) + } fn execute() -> Weight { // Proof Size summary in bytes: // Measured: `0` diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 8aae4e651f..153082d851 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -2354,6 +2354,20 @@ sp_api::impl_runtime_apis! { crate::Junction::Parachain(43211234).into(), )) } + + fn set_up_complex_asset_transfer( + ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + // Relay supports only native token, either reserve transfer it to non-system parachains, + // or teleport it to system parachain. Use the teleport case for benchmarking as it's + // slightly heavier. + // Relay/native token can be teleported to/from AH. + let native_location = Here.into(); + let dest = crate::xcm_config::AssetHubLocation::get(); + pallet_xcm::benchmarking::helpers::native_teleport_as_asset_transfer::( + native_location, + dest + ) + } } parameter_types! { diff --git a/relay/polkadot/src/weights/pallet_xcm.rs b/relay/polkadot/src/weights/pallet_xcm.rs index 44ee22176c..3e82626c00 100644 --- a/relay/polkadot/src/weights/pallet_xcm.rs +++ b/relay/polkadot/src/weights/pallet_xcm.rs @@ -85,6 +85,32 @@ impl pallet_xcm::WeightInfo for WeightInfo { Weight::from_parts(17_260_000, 0) .saturating_add(Weight::from_parts(0, 0)) } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3593` + // Minimum execution time: 91_890_000 picoseconds. + Weight::from_parts(93_460_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(3)) + } /// Storage: `Benchmark::Override` (r:0 w:0) /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute() -> Weight { diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index a93df6130b..5788ed19c6 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -1308,6 +1308,55 @@ impl_runtime_apis! { ParentThen(Parachain(random_para_id).into()).into(), )) } + + fn set_up_complex_asset_transfer( + ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + // Transfer to Relay some local AH asset (local-reserve-transfer) while paying + // fees using teleported native token. + // (We don't care that Relay doesn't accept incoming unknown AH local asset) + let dest = Parent.into(); + + let fee_amount = EXISTENTIAL_DEPOSIT; + let fee_asset: MultiAsset = (MultiLocation::parent(), fee_amount).into(); + + let who = frame_benchmarking::whitelisted_caller(); + // Give some multiple of the existential deposit + let balance = fee_amount + EXISTENTIAL_DEPOSIT * 1000; + let _ = >::make_free_balance_be( + &who, balance, + ); + // verify initial balance + assert_eq!(Balances::free_balance(&who), balance); + + // set up local asset + let asset_amount = 10u128; + let initial_asset_amount = asset_amount * 10; + let (asset_id, _, _) = pallet_assets::benchmarking::create_default_minted_asset::< + Runtime, + pallet_assets::Instance1 + >(true, initial_asset_amount); + let asset_location = MultiLocation::new( + 0, + X2(PalletInstance(50), GeneralIndex(u32::from(asset_id).into())) + ); + let transfer_asset: MultiAsset = (asset_location, asset_amount).into(); + + let assets: MultiAssets = vec![fee_asset.clone(), transfer_asset].into(); + let fee_index = if assets.get(0).unwrap().eq(&fee_asset) { 0 } else { 1 }; + + // verify transferred successfully + let verify = Box::new(move || { + // verify native balance after transfer, decreased by transferred fee amount + // (plus transport fees) + assert!(Balances::free_balance(&who) <= balance - fee_amount); + // verify asset balance decreased by exactly transferred amount + assert_eq!( + Assets::balance(asset_id.into(), &who), + initial_asset_amount - asset_amount, + ); + }); + Some((assets, fee_index as u32, dest, verify)) + } } parameter_types! { diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs index 268a81df63..8832066a4c 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm.rs @@ -91,6 +91,36 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `496` + // Estimated: `6208` + // Minimum execution time: 146_932_000 picoseconds. + Weight::from_parts(153_200_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(7)) + } /// Storage: `Benchmark::Override` (r:0 w:0) /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute() -> Weight { diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index fb28739650..4c6717c109 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -1200,6 +1200,55 @@ impl_runtime_apis! { ParentThen(Parachain(random_para_id).into()).into(), )) } + + fn set_up_complex_asset_transfer( + ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + // Transfer to Relay some local AH asset (local-reserve-transfer) while paying + // fees using teleported native token. + // (We don't care that Relay doesn't accept incoming unknown AH local asset) + let dest = Parent.into(); + + let fee_amount = EXISTENTIAL_DEPOSIT; + let fee_asset: MultiAsset = (MultiLocation::parent(), fee_amount).into(); + + let who = frame_benchmarking::whitelisted_caller(); + // Give some multiple of the existential deposit + let balance = fee_amount + EXISTENTIAL_DEPOSIT * 1000; + let _ = >::make_free_balance_be( + &who, balance, + ); + // verify initial balance + assert_eq!(Balances::free_balance(&who), balance); + + // set up local asset + let asset_amount = 10u128; + let initial_asset_amount = asset_amount * 10; + let (asset_id, _, _) = pallet_assets::benchmarking::create_default_minted_asset::< + Runtime, + pallet_assets::Instance1 + >(true, initial_asset_amount); + let asset_location = MultiLocation::new( + 0, + X2(PalletInstance(50), GeneralIndex(u32::from(asset_id).into())) + ); + let transfer_asset: MultiAsset = (asset_location, asset_amount).into(); + + let assets: MultiAssets = vec![fee_asset.clone(), transfer_asset].into(); + let fee_index = if assets.get(0).unwrap().eq(&fee_asset) { 0 } else { 1 }; + + // verify transferred successfully + let verify = Box::new(move || { + // verify native balance after transfer, decreased by transferred fee amount + // (plus transport fees) + assert!(Balances::free_balance(&who) <= balance - fee_amount); + // verify asset balance decreased by exactly transferred amount + assert_eq!( + Assets::balance(asset_id.into(), &who), + initial_asset_amount - asset_amount, + ); + }); + Some((assets, fee_index as u32, dest, verify)) + } } parameter_types! { diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs index 18e20d33a5..8cbf8e7f4f 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm.rs @@ -91,6 +91,36 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `496` + // Estimated: `6208` + // Minimum execution time: 146_932_000 picoseconds. + Weight::from_parts(153_200_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(12)) + .saturating_add(T::DbWeight::get().writes(7)) + } /// Storage: `Benchmark::Override` (r:0 w:0) /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute() -> Weight { diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index bb44336155..dc52d7f90c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -996,6 +996,18 @@ impl_runtime_apis! { // Reserve transfers are disabled on BH. None } + + fn set_up_complex_asset_transfer( + ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + // BH only supports teleports to system parachain. + // Relay/native token can be teleported between BH and Relay. + let native_location = Parent.into(); + let dest = Parent.into(); + pallet_xcm::benchmarking::helpers::native_teleport_as_asset_transfer::( + native_location, + dest + ) + } } parameter_types! { diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs index a039b7ef19..82bed2b1fb 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs @@ -90,6 +90,32 @@ impl pallet_xcm::WeightInfo for WeightInfo { Weight::from_parts(18_446_744_073_709_551_000, 0) .saturating_add(Weight::from_parts(0, 0)) } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3593` + // Minimum execution time: 91_890_000 picoseconds. + Weight::from_parts(93_460_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(3)) + } /// Storage: `Benchmark::Override` (r:0 w:0) /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute() -> Weight { diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index b82a4d1a2f..2ccd1c99d4 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -994,6 +994,18 @@ impl_runtime_apis! { // Reserve transfers are disabled on BH. None } + + fn set_up_complex_asset_transfer( + ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + // BH only supports teleports to system parachain. + // Relay/native token can be teleported between BH and Relay. + let native_location = Parent.into(); + let dest = Parent.into(); + pallet_xcm::benchmarking::helpers::native_teleport_as_asset_transfer::( + native_location, + dest + ) + } } parameter_types! { diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs index 033e89c0b1..abdccc9ca0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_xcm.rs @@ -90,6 +90,32 @@ impl pallet_xcm::WeightInfo for WeightInfo { Weight::from_parts(18_446_744_073_709_551_000, 0) .saturating_add(Weight::from_parts(0, 0)) } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3593` + // Minimum execution time: 91_890_000 picoseconds. + Weight::from_parts(93_460_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(3)) + } /// Storage: `Benchmark::Override` (r:0 w:0) /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute() -> Weight { diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 5e0764d59b..f7222aaa30 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -955,6 +955,18 @@ impl_runtime_apis! { // Reserve transfers are disabled on Collectives. None } + + fn set_up_complex_asset_transfer( + ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + // Collectives only supports teleports to system parachain. + // Relay/native token can be teleported between Collectives and Relay. + let native_location = Parent.into(); + let dest = Parent.into(); + pallet_xcm::benchmarking::helpers::native_teleport_as_asset_transfer::( + native_location, + dest + ) + } } let whitelist: Vec = vec![ diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs index 54825fb335..96a89b0292 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs @@ -90,6 +90,32 @@ impl pallet_xcm::WeightInfo for WeightInfo { Weight::from_parts(18_446_744_073_709_551_000, 0) .saturating_add(Weight::from_parts(0, 0)) } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) + /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `214` + // Estimated: `3679` + // Minimum execution time: 87_915_000 picoseconds. + Weight::from_parts(90_219_000, 0) + .saturating_add(Weight::from_parts(0, 3679)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(3)) + } /// Storage: `Benchmark::Override` (r:0 w:0) /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute() -> Weight { From 6ade0bc64e8d1583af07df5a8b5225a4db86f334 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 10 Jan 2024 15:25:15 +0100 Subject: [PATCH 059/316] [pallet_collator_selection] adapt https://github.com/paritytech/polkadot-sdk/pull/1340 --- .../src/weights/pallet_collator_selection.rs | 26 ++++++++++++++++++- .../src/weights/pallet_collator_selection.rs | 26 ++++++++++++++++++- .../src/weights/pallet_collator_selection.rs | 26 ++++++++++++++++++- .../src/weights/pallet_collator_selection.rs | 26 ++++++++++++++++++- .../src/weights/pallet_collator_selection.rs | 26 ++++++++++++++++++- 5 files changed, 125 insertions(+), 5 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_collator_selection.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_collator_selection.rs index cc84617335..b39704b77b 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_collator_selection.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_collator_selection.rs @@ -121,7 +121,7 @@ impl pallet_collator_selection::WeightInfo for WeightIn } /// Storage: `CollatorSelection::CandidacyBond` (r:0 w:1) /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - fn set_candidacy_bond() -> Weight { + fn set_candidacy_bond(_c: u32, _k: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -175,6 +175,30 @@ impl pallet_collator_selection::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } + fn update_bond(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + fn take_candidate_slot(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `System::BlockWeight` (r:1 w:1) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_collator_selection.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_collator_selection.rs index 05c0b6d805..b24f90bda4 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_collator_selection.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_collator_selection.rs @@ -121,7 +121,7 @@ impl pallet_collator_selection::WeightInfo for WeightIn } /// Storage: `CollatorSelection::CandidacyBond` (r:0 w:1) /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - fn set_candidacy_bond() -> Weight { + fn set_candidacy_bond(_c: u32, _k: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -175,6 +175,30 @@ impl pallet_collator_selection::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } + fn update_bond(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + fn take_candidate_slot(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `System::BlockWeight` (r:1 w:1) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_collator_selection.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_collator_selection.rs index 1bb957240c..f7883aa3b8 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_collator_selection.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_collator_selection.rs @@ -121,7 +121,7 @@ impl pallet_collator_selection::WeightInfo for WeightIn } /// Storage: `CollatorSelection::CandidacyBond` (r:0 w:1) /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - fn set_candidacy_bond() -> Weight { + fn set_candidacy_bond(_c: u32, _k: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -175,6 +175,30 @@ impl pallet_collator_selection::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } + fn update_bond(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + fn take_candidate_slot(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `System::BlockWeight` (r:1 w:1) diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_collator_selection.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_collator_selection.rs index 0df4684175..70eadb7b79 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_collator_selection.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_collator_selection.rs @@ -121,7 +121,7 @@ impl pallet_collator_selection::WeightInfo for WeightIn } /// Storage: `CollatorSelection::CandidacyBond` (r:0 w:1) /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - fn set_candidacy_bond() -> Weight { + fn set_candidacy_bond(_c: u32, _k: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -175,6 +175,30 @@ impl pallet_collator_selection::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } + fn update_bond(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + fn take_candidate_slot(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `System::BlockWeight` (r:1 w:1) diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs index 195b664455..03d43423f1 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_collator_selection.rs @@ -121,7 +121,7 @@ impl pallet_collator_selection::WeightInfo for WeightIn } /// Storage: `CollatorSelection::CandidacyBond` (r:0 w:1) /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - fn set_candidacy_bond() -> Weight { + fn set_candidacy_bond(_c: u32, _k: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -175,6 +175,30 @@ impl pallet_collator_selection::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } + fn update_bond(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + fn take_candidate_slot(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `306 + c * (50 ±0)` + // Estimated: `6287` + // Minimum execution time: 34_814_000 picoseconds. + Weight::from_parts(36_371_520, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_391 + .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `System::BlockWeight` (r:1 w:1) From 074d9003c76ddbee29a566807cbe3d901e9b9a0e Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 11 Jan 2024 12:25:31 +0100 Subject: [PATCH 060/316] [dmp,xcmp,message_queue] adapt https://github.com/paritytech/polkadot-sdk/pull/1246 --- .../asset-hubs/asset-hub-kusama/Cargo.toml | 5 + .../asset-hubs/asset-hub-kusama/src/lib.rs | 53 +++++- .../src/weights/cumulus_pallet_dmp_queue.rs | 131 +++++++++++++ .../cumulus_pallet_parachain_system.rs | 80 ++++++++ .../src/weights/cumulus_pallet_xcmp_queue.rs | 84 +++++++- .../asset-hub-kusama/src/weights/mod.rs | 3 + .../src/weights/pallet_message_queue.rs | 179 ++++++++++++++++++ .../asset-hubs/asset-hub-polkadot/Cargo.toml | 5 + .../asset-hubs/asset-hub-polkadot/src/lib.rs | 53 +++++- .../src/weights/cumulus_pallet_dmp_queue.rs | 131 +++++++++++++ .../cumulus_pallet_parachain_system.rs | 80 ++++++++ .../src/weights/cumulus_pallet_xcmp_queue.rs | 84 +++++++- .../asset-hub-polkadot/src/weights/mod.rs | 3 + .../src/weights/pallet_message_queue.rs | 179 ++++++++++++++++++ .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 5 + .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 49 ++++- .../src/weights/cumulus_pallet_dmp_queue.rs | 131 +++++++++++++ .../cumulus_pallet_parachain_system.rs | 80 ++++++++ .../src/weights/cumulus_pallet_xcmp_queue.rs | 84 +++++++- .../bridge-hub-kusama/src/weights/mod.rs | 3 + .../src/weights/pallet_message_queue.rs | 179 ++++++++++++++++++ .../bridge-hub-polkadot/Cargo.toml | 5 + .../bridge-hub-polkadot/src/lib.rs | 49 ++++- .../src/weights/cumulus_pallet_dmp_queue.rs | 131 +++++++++++++ .../cumulus_pallet_parachain_system.rs | 80 ++++++++ .../src/weights/cumulus_pallet_xcmp_queue.rs | 84 +++++++- .../bridge-hub-polkadot/src/weights/mod.rs | 3 + .../src/weights/pallet_message_queue.rs | 179 ++++++++++++++++++ .../collectives-polkadot/Cargo.toml | 5 + .../collectives-polkadot/src/lib.rs | 51 ++++- .../src/weights/cumulus_pallet_dmp_queue.rs | 131 +++++++++++++ .../cumulus_pallet_parachain_system.rs | 80 ++++++++ .../src/weights/cumulus_pallet_xcmp_queue.rs | 90 ++++++++- .../collectives-polkadot/src/weights/mod.rs | 3 + .../src/weights/pallet_message_queue.rs | 179 ++++++++++++++++++ .../gluttons/glutton-kusama/Cargo.toml | 4 + .../gluttons/glutton-kusama/src/lib.rs | 34 +++- .../cumulus_pallet_parachain_system.rs | 80 ++++++++ .../glutton-kusama/src/weights/mod.rs | 2 + .../src/weights/pallet_message_queue.rs | 179 ++++++++++++++++++ 40 files changed, 2901 insertions(+), 69 deletions(-) create mode 100644 system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_dmp_queue.rs create mode 100644 system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_parachain_system.rs create mode 100644 system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_message_queue.rs create mode 100644 system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_dmp_queue.rs create mode 100644 system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_parachain_system.rs create mode 100644 system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_message_queue.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_dmp_queue.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_parachain_system.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_message_queue.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_dmp_queue.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_parachain_system.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_message_queue.rs create mode 100644 system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_dmp_queue.rs create mode 100644 system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_parachain_system.rs create mode 100644 system-parachains/collectives/collectives-polkadot/src/weights/pallet_message_queue.rs create mode 100644 system-parachains/gluttons/glutton-kusama/src/weights/cumulus_pallet_parachain_system.rs create mode 100644 system-parachains/gluttons/glutton-kusama/src/weights/pallet_message_queue.rs diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index 5cc3187d7d..95e858f048 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -37,6 +37,7 @@ pallet-asset-conversion = { default-features = false, version = "9.0.0" } pallet-aura = { default-features = false, version = "26.0.0" } pallet-authorship = { default-features = false, version = "27.0.0" } pallet-balances = { default-features = false, version = "27.0.0" } +pallet-message-queue = { default-features = false , version = "30.0.0" } pallet-multisig = { default-features = false, version = "27.0.0" } pallet-nft-fractionalization = { default-features = false, version = "9.0.0" } pallet-nfts = { default-features = false, version = "21.0.0" } @@ -117,6 +118,7 @@ default = [ "std" ] state-trie-version-1 = [ "pallet-state-trie-migration" ] runtime-benchmarks = [ "assets-common/runtime-benchmarks", + "cumulus-pallet-dmp-queue/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", @@ -129,6 +131,7 @@ runtime-benchmarks = [ "pallet-assets/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-collator-selection/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-nft-fractionalization/runtime-benchmarks", "pallet-nfts/runtime-benchmarks", @@ -165,6 +168,7 @@ try-runtime = [ "pallet-authorship/try-runtime", "pallet-balances/try-runtime", "pallet-collator-selection/try-runtime", + "pallet-message-queue/try-runtime", "pallet-multisig/try-runtime", "pallet-nft-fractionalization/try-runtime", "pallet-nfts/try-runtime", @@ -212,6 +216,7 @@ std = [ "pallet-authorship/std", "pallet-balances/std", "pallet-collator-selection/std", + "pallet-message-queue/std", "pallet-multisig/std", "pallet-nft-fractionalization/std", "pallet-nfts-runtime-api/std", diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 5788ed19c6..b74299072f 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -34,6 +34,7 @@ use assets_common::{ AssetIdForTrustBackedAssetsConvert, MultiLocationForAssetId, }; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use snowbridge_kusama_common::EthereumNetwork; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; @@ -41,7 +42,7 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, Verify}, transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, Permill, + ApplyExtrinsicResult, Perbill, Permill, }; use sp_std::prelude::*; @@ -57,7 +58,7 @@ use frame_support::{ ord_parameter_types, parameter_types, traits::{ AsEnsureOriginWithArg, ConstBool, ConstU128, ConstU32, ConstU64, ConstU8, EitherOfDiverse, - Equals, InstanceFilter, + Equals, InstanceFilter, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, BoundedVec, PalletId, @@ -70,7 +71,7 @@ use pallet_asset_conversion_tx_payment::AssetConversionAdapter; use pallet_nfts::PalletFeatures; use parachains_common::{ impls::DealWithFees, AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, BlockNumber, - Hash, Header, Nonce, Signature, + Hash, Header, Nonce, Signature, message_queue::*, }; use sp_runtime::RuntimeDebug; use system_parachains_constants::{ @@ -81,7 +82,7 @@ use system_parachains_constants::{ use xcm::opaque::v3::MultiLocation; use xcm_config::{ FellowshipLocation, ForeignAssetsConvertedConcreteId, GovernanceLocation, KsmLocation, - PoolAssetsConvertedConcreteId, TrustBackedAssetsConvertedConcreteId, XcmConfig, + PoolAssetsConvertedConcreteId, TrustBackedAssetsConvertedConcreteId, }; #[cfg(any(feature = "std", test))] @@ -91,7 +92,6 @@ pub use sp_runtime::BuildStorage; use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use xcm::prelude::*; -use xcm_executor::XcmExecutor; use crate::xcm_config::{ ForeignCreatorsSovereignAccountOf, LocalAndForeignAssetsMultiLocationMatcher, @@ -610,13 +610,14 @@ impl pallet_proxy::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 = parachain_info::Pallet; - type DmpMessageHandler = DmpQueue; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type ReservedDmpWeight = ReservedDmpWeight; type OutboundXcmpMessageSource = XcmpQueue; type XcmpMessageHandler = XcmpQueue; @@ -628,10 +629,37 @@ impl cumulus_pallet_parachain_system::Config for Runtime { BLOCK_PROCESSING_VELOCITY, UNINCLUDED_SEGMENT_CAPACITY, >; + type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; } impl parachain_info::Config for Runtime {} +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_message_queue::WeightInfo; + #[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< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >; + type Size = u32; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; +} + impl cumulus_pallet_aura_ext::Config for Runtime {} parameter_types! { @@ -659,10 +687,11 @@ pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::Exponenti impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRoot; + // Enqueue XCMP messages from siblings for later processing. + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = EitherOfDiverse< EnsureRoot, EnsureXcm>, @@ -673,9 +702,9 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { } impl cumulus_pallet_dmp_queue::Config for Runtime { + type WeightInfo = weights::cumulus_pallet_dmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRoot; + type DmpSink = frame_support::traits::EnqueueWithOrigin; } parameter_types! { @@ -900,6 +929,7 @@ construct_runtime!( CumulusXcm: cumulus_pallet_xcm = 32, DmpQueue: cumulus_pallet_dmp_queue = 33, ToPolkadotXcmRouter: pallet_xcm_bridge_hub_router:: = 34, + MessageQueue: pallet_message_queue = 35, // Handy utilities. Utility: pallet_utility = 40, @@ -965,6 +995,7 @@ mod benches { [pallet_assets, Pool] [pallet_asset_conversion, AssetConversion] [pallet_balances, Balances] + [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] [pallet_nft_fractionalization, NftFractionalization] [pallet_nfts, Nfts] @@ -974,7 +1005,9 @@ mod benches { [pallet_utility, Utility] [pallet_timestamp, Timestamp] [pallet_collator_selection, CollatorSelection] + [cumulus_pallet_parachain_system, ParachainSystem] [cumulus_pallet_xcmp_queue, XcmpQueue] + [cumulus_pallet_dmp_queue, DmpQueue] // XCM [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] // Bridges diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_dmp_queue.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_dmp_queue.rs new file mode 100644 index 0000000000..cc41dcd6cb --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_dmp_queue.rs @@ -0,0 +1,131 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +//! Autogenerated weights for `cumulus_pallet_dmp_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-kusama-dev")`, DB CACHE: 1024 + +// Executed Command: +// target/production/polkadot-parachain +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json +// --pallet=cumulus_pallet_dmp_queue +// --chain=asset-hub-kusama-dev +// --header=./cumulus/file_header.txt +// --output=./cumulus/parachains/runtimes/assets/asset-hub-kusama/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_dmp_queue`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_dmp_queue::WeightInfo for WeightInfo { + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (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: `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 { + // Proof Size summary in bytes: + // Measured: `65696` + // Estimated: `69161` + // Minimum execution time: 124_651_000 picoseconds. + Weight::from_parts(127_857_000, 0) + .saturating_add(Weight::from_parts(0, 69161)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65659` + // Estimated: `69124` + // Minimum execution time: 65_684_000 picoseconds. + Weight::from_parts(68_039_000, 0) + .saturating_add(Weight::from_parts(0, 69124)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (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: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn on_idle_overweight_good_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65726` + // Estimated: `69191` + // Minimum execution time: 117_657_000 picoseconds. + Weight::from_parts(122_035_000, 0) + .saturating_add(Weight::from_parts(0, 69191)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + fn on_idle_overweight_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65689` + // Estimated: `69154` + // Minimum execution time: 59_799_000 picoseconds. + Weight::from_parts(61_354_000, 0) + .saturating_add(Weight::from_parts(0, 69154)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_parachain_system.rs new file mode 100644 index 0000000000..c1e5c6a742 --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_parachain_system.rs @@ -0,0 +1,80 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `cumulus_pallet_parachain_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// cumulus_pallet_parachain_system +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights +// --steps +// 50 +// --repeat +// 20 + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_parachain_system`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_parachain_system::WeightInfo for WeightInfo { + /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1) + /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0) + /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (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: ParachainSystem ProcessedDownwardMessages (r:0 w:1) + /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: MessageQueue Pages (r:0 w:16) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `12` + // Estimated: `8013` + // Minimum execution time: 1_622_000 picoseconds. + Weight::from_parts(1_709_000, 0) + .saturating_add(Weight::from_parts(0, 8013)) + // Standard Error: 22_138 + .saturating_add(Weight::from_parts(23_923_169, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs index 1b6672d584..d669fa0489 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs @@ -59,16 +59,92 @@ 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) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_config_with_weight() -> Weight { + /// 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 { + // Proof Size summary in bytes: + // Measured: `118` + // Estimated: `3517` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_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 { // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 4_918_000 picoseconds. - Weight::from_parts(5_123_000, 0) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .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 { + // Proof Size summary in bytes: + // Measured: `111` + // Estimated: `1596` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(0, 1596)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn take_first_concatenated_xcm() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 44_000_000 picoseconds. + Weight::from_parts(45_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: `XcmpQueue::InboundXcmpMessages` (r:1 w:1) + /// Proof: `XcmpQueue::InboundXcmpMessages` (`max_values`: None, `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::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 { + // Proof Size summary in bytes: + // Measured: `65747` + // Estimated: `69212` + // Minimum execution time: 62_000_000 picoseconds. + Weight::from_parts(66_000_000, 0) + .saturating_add(Weight::from_parts(0, 69212)) + .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) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65710` + // Estimated: `69175` + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(43_000_000, 0) + .saturating_add(Weight::from_parts(0, 69175)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs index 0295549956..de9efc9df7 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs @@ -15,6 +15,8 @@ // along with Cumulus. If not, see . pub mod block_weights; +pub mod cumulus_pallet_dmp_queue; +pub mod cumulus_pallet_parachain_system; pub mod cumulus_pallet_xcmp_queue; pub mod extrinsic_weights; pub mod frame_system; @@ -24,6 +26,7 @@ pub mod pallet_assets_local; pub mod pallet_assets_pool; pub mod pallet_balances; pub mod pallet_collator_selection; +pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_nft_fractionalization; pub mod pallet_nfts; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_message_queue.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_message_queue.rs new file mode 100644 index 0000000000..45531ccfa7 --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_message_queue.rs @@ -0,0 +1,179 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-24, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// pallet_message_queue +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `189` + // Estimated: `7534` + // Minimum execution time: 13_668_000 picoseconds. + Weight::from_parts(13_668_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// 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) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `184` + // Estimated: `7534` + // Minimum execution time: 11_106_000 picoseconds. + Weight::from_parts(11_106_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3517` + // Minimum execution time: 4_921_000 picoseconds. + Weight::from_parts(4_921_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 6_879_000 picoseconds. + Weight::from_parts(6_879_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 7_564_000 picoseconds. + Weight::from_parts(7_564_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 59_963_000 picoseconds. + Weight::from_parts(59_963_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:0) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `99` + // Estimated: `5007` + // Minimum execution time: 7_200_000 picoseconds. + Weight::from_parts(7_200_000, 0) + .saturating_add(Weight::from_parts(0, 5007)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 41_366_000 picoseconds. + Weight::from_parts(41_366_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 60_538_000 picoseconds. + Weight::from_parts(60_538_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 73_665_000 picoseconds. + Weight::from_parts(73_665_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 6aee3fc806..64373ab8f0 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -36,6 +36,7 @@ pallet-assets = { default-features = false, version = "28.0.0" } pallet-aura = { default-features = false, version = "26.0.0" } pallet-authorship = { default-features = false, version = "27.0.0" } pallet-balances = { default-features = false, version = "27.0.0" } +pallet-message-queue = { default-features = false , version = "30.0.0" } pallet-multisig = { default-features = false, version = "27.0.0" } pallet-nfts = { default-features = false, version = "21.0.0" } pallet-nfts-runtime-api = { default-features = false, version = "13.0.0" } @@ -104,6 +105,7 @@ substrate-wasm-builder = { optional = true , version = "16.0.0" } default = [ "std" ] runtime-benchmarks = [ "assets-common/runtime-benchmarks", + "cumulus-pallet-dmp-queue/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", @@ -117,6 +119,7 @@ runtime-benchmarks = [ "pallet-assets/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-collator-selection/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-nfts/runtime-benchmarks", "pallet-proxy/runtime-benchmarks", @@ -148,6 +151,7 @@ try-runtime = [ "pallet-authorship/try-runtime", "pallet-balances/try-runtime", "pallet-collator-selection/try-runtime", + "pallet-message-queue/try-runtime", "pallet-multisig/try-runtime", "pallet-nfts/try-runtime", "pallet-proxy/try-runtime", @@ -192,6 +196,7 @@ std = [ "pallet-authorship/std", "pallet-balances/std", "pallet-collator-selection/std", + "pallet-message-queue/std", "pallet-multisig/std", "pallet-nfts-runtime-api/std", "pallet-nfts/std", diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 4c6717c109..681a52d3a0 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -68,13 +68,14 @@ use assets_common::{ }; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use snowbridge_polkadot_common::EthereumNetwork; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, Verify}, transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, + ApplyExtrinsicResult, Perbill, }; use sp_std::prelude::*; @@ -90,7 +91,7 @@ use frame_support::{ parameter_types, traits::{ AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Equals, - InstanceFilter, OnRuntimeUpgrade, + InstanceFilter, OnRuntimeUpgrade, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -103,7 +104,7 @@ use pallet_nfts::PalletFeatures; use parachains_common::{ impls::{AssetsToBlockAuthor, DealWithFees}, AccountId, AssetHubPolkadotAuraId as AuraId, AssetIdForTrustBackedAssets, Balance, BlockNumber, - Hash, Header, Nonce, Signature, + Hash, Header, Nonce, Signature, message_queue::*, }; use sp_runtime::RuntimeDebug; @@ -114,7 +115,7 @@ use system_parachains_constants::{ }; use xcm_config::{ DotLocation, FellowshipLocation, ForeignAssetsConvertedConcreteId, GovernanceLocation, - TrustBackedAssetsConvertedConcreteId, XcmConfig, XcmOriginToTransactDispatchOrigin, + TrustBackedAssetsConvertedConcreteId, XcmOriginToTransactDispatchOrigin, }; #[cfg(any(feature = "std", test))] @@ -124,7 +125,6 @@ pub use sp_runtime::BuildStorage; use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use xcm::prelude::*; -use xcm_executor::XcmExecutor; use crate::xcm_config::ForeignCreatorsSovereignAccountOf; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; @@ -549,13 +549,14 @@ impl pallet_proxy::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 = parachain_info::Pallet; - type DmpMessageHandler = DmpQueue; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type ReservedDmpWeight = ReservedDmpWeight; type OutboundXcmpMessageSource = XcmpQueue; type XcmpMessageHandler = XcmpQueue; @@ -567,10 +568,37 @@ impl cumulus_pallet_parachain_system::Config for Runtime { BLOCK_PROCESSING_VELOCITY, UNINCLUDED_SEGMENT_CAPACITY, >; + type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; } impl parachain_info::Config for Runtime {} +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_message_queue::WeightInfo; + #[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< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >; + type Size = u32; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; +} + impl cumulus_pallet_aura_ext::Config for Runtime {} parameter_types! { @@ -599,10 +627,11 @@ pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::Exponenti impl cumulus_pallet_xcmp_queue::Config for Runtime { type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRoot; + // Enqueue XCMP messages from siblings for later processing. + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = EitherOfDiverse< EnsureRoot, EnsureXcm>, @@ -612,9 +641,9 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { } impl cumulus_pallet_dmp_queue::Config for Runtime { + type WeightInfo = weights::cumulus_pallet_dmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRoot; + type DmpSink = frame_support::traits::EnqueueWithOrigin; } parameter_types! { @@ -817,6 +846,7 @@ construct_runtime!( CumulusXcm: cumulus_pallet_xcm = 32, DmpQueue: cumulus_pallet_dmp_queue = 33, ToKusamaXcmRouter: pallet_xcm_bridge_hub_router:: = 34, + MessageQueue: pallet_message_queue = 35, // Handy utilities. Utility: pallet_utility = 40, @@ -883,6 +913,7 @@ mod benches { [pallet_assets, Local] [pallet_assets, Foreign] [pallet_balances, Balances] + [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] [pallet_nfts, Nfts] [pallet_proxy, Proxy] @@ -891,7 +922,9 @@ mod benches { [pallet_utility, Utility] [pallet_timestamp, Timestamp] [pallet_collator_selection, CollatorSelection] + [cumulus_pallet_parachain_system, ParachainSystem] [cumulus_pallet_xcmp_queue, XcmpQueue] + [cumulus_pallet_dmp_queue, DmpQueue] // XCM [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] // Bridges diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_dmp_queue.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_dmp_queue.rs new file mode 100644 index 0000000000..cc41dcd6cb --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_dmp_queue.rs @@ -0,0 +1,131 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +//! Autogenerated weights for `cumulus_pallet_dmp_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-kusama-dev")`, DB CACHE: 1024 + +// Executed Command: +// target/production/polkadot-parachain +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json +// --pallet=cumulus_pallet_dmp_queue +// --chain=asset-hub-kusama-dev +// --header=./cumulus/file_header.txt +// --output=./cumulus/parachains/runtimes/assets/asset-hub-kusama/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_dmp_queue`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_dmp_queue::WeightInfo for WeightInfo { + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (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: `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 { + // Proof Size summary in bytes: + // Measured: `65696` + // Estimated: `69161` + // Minimum execution time: 124_651_000 picoseconds. + Weight::from_parts(127_857_000, 0) + .saturating_add(Weight::from_parts(0, 69161)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65659` + // Estimated: `69124` + // Minimum execution time: 65_684_000 picoseconds. + Weight::from_parts(68_039_000, 0) + .saturating_add(Weight::from_parts(0, 69124)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (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: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn on_idle_overweight_good_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65726` + // Estimated: `69191` + // Minimum execution time: 117_657_000 picoseconds. + Weight::from_parts(122_035_000, 0) + .saturating_add(Weight::from_parts(0, 69191)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + fn on_idle_overweight_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65689` + // Estimated: `69154` + // Minimum execution time: 59_799_000 picoseconds. + Weight::from_parts(61_354_000, 0) + .saturating_add(Weight::from_parts(0, 69154)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_parachain_system.rs new file mode 100644 index 0000000000..c1e5c6a742 --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_parachain_system.rs @@ -0,0 +1,80 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `cumulus_pallet_parachain_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// cumulus_pallet_parachain_system +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights +// --steps +// 50 +// --repeat +// 20 + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_parachain_system`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_parachain_system::WeightInfo for WeightInfo { + /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1) + /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0) + /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (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: ParachainSystem ProcessedDownwardMessages (r:0 w:1) + /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: MessageQueue Pages (r:0 w:16) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `12` + // Estimated: `8013` + // Minimum execution time: 1_622_000 picoseconds. + Weight::from_parts(1_709_000, 0) + .saturating_add(Weight::from_parts(0, 8013)) + // Standard Error: 22_138 + .saturating_add(Weight::from_parts(23_923_169, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs index db77d8f6ac..76e231a3ce 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs @@ -59,16 +59,92 @@ 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) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_config_with_weight() -> Weight { + /// 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 { + // Proof Size summary in bytes: + // Measured: `118` + // Estimated: `3517` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_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 { // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 4_977_000 picoseconds. - Weight::from_parts(5_242_000, 0) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .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 { + // Proof Size summary in bytes: + // Measured: `111` + // Estimated: `1596` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(0, 1596)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn take_first_concatenated_xcm() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 44_000_000 picoseconds. + Weight::from_parts(45_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: `XcmpQueue::InboundXcmpMessages` (r:1 w:1) + /// Proof: `XcmpQueue::InboundXcmpMessages` (`max_values`: None, `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::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 { + // Proof Size summary in bytes: + // Measured: `65747` + // Estimated: `69212` + // Minimum execution time: 62_000_000 picoseconds. + Weight::from_parts(66_000_000, 0) + .saturating_add(Weight::from_parts(0, 69212)) + .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) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65710` + // Estimated: `69175` + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(43_000_000, 0) + .saturating_add(Weight::from_parts(0, 69175)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs index ae08c4f1f4..58477b320a 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs @@ -15,6 +15,8 @@ // along with Cumulus. If not, see . pub mod block_weights; +pub mod cumulus_pallet_dmp_queue; +pub mod cumulus_pallet_parachain_system; pub mod cumulus_pallet_xcmp_queue; pub mod extrinsic_weights; pub mod frame_system; @@ -22,6 +24,7 @@ pub mod pallet_assets_foreign; pub mod pallet_assets_local; pub mod pallet_balances; pub mod pallet_collator_selection; +pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_nfts; pub mod pallet_proxy; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_message_queue.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_message_queue.rs new file mode 100644 index 0000000000..45531ccfa7 --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_message_queue.rs @@ -0,0 +1,179 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-24, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// pallet_message_queue +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `189` + // Estimated: `7534` + // Minimum execution time: 13_668_000 picoseconds. + Weight::from_parts(13_668_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// 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) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `184` + // Estimated: `7534` + // Minimum execution time: 11_106_000 picoseconds. + Weight::from_parts(11_106_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3517` + // Minimum execution time: 4_921_000 picoseconds. + Weight::from_parts(4_921_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 6_879_000 picoseconds. + Weight::from_parts(6_879_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 7_564_000 picoseconds. + Weight::from_parts(7_564_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 59_963_000 picoseconds. + Weight::from_parts(59_963_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:0) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `99` + // Estimated: `5007` + // Minimum execution time: 7_200_000 picoseconds. + Weight::from_parts(7_200_000, 0) + .saturating_add(Weight::from_parts(0, 5007)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 41_366_000 picoseconds. + Weight::from_parts(41_366_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 60_538_000 picoseconds. + Weight::from_parts(60_538_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 73_665_000 picoseconds. + Weight::from_parts(73_665_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index c45b196c99..b85ec0c8f0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -37,6 +37,7 @@ frame-try-runtime = { default-features = false, optional = true, version = "0.33 pallet-aura = { default-features = false, version = "26.0.0" } pallet-authorship = { default-features = false, version = "27.0.0" } pallet-balances = { default-features = false, version = "27.0.0" } +pallet-message-queue = { default-features = false , version = "30.0.0" } pallet-multisig = { default-features = false, version = "27.0.0" } pallet-session = { default-features = false, version = "27.0.0" } pallet-timestamp = { default-features = false, version = "26.0.0" } @@ -175,6 +176,7 @@ std = [ "pallet-bridge-parachains/std", "pallet-bridge-relayers/std", "pallet-collator-selection/std", + "pallet-message-queue/std", "pallet-multisig/std", "pallet-session/std", "pallet-timestamp/std", @@ -225,6 +227,7 @@ std = [ runtime-benchmarks = [ "bridge-hub-common/runtime-benchmarks", "bridge-runtime-common/runtime-benchmarks", + "cumulus-pallet-dmp-queue/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", @@ -239,6 +242,7 @@ runtime-benchmarks = [ "pallet-bridge-parachains/runtime-benchmarks", "pallet-bridge-relayers/runtime-benchmarks", "pallet-collator-selection/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-utility/runtime-benchmarks", @@ -278,6 +282,7 @@ try-runtime = [ "pallet-bridge-parachains/try-runtime", "pallet-bridge-relayers/try-runtime", "pallet-collator-selection/try-runtime", + "pallet-message-queue/try-runtime", "pallet-multisig/try-runtime", "pallet-session/try-runtime", "pallet-timestamp/try-runtime", diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index dc52d7f90c..6232502f26 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -33,6 +33,7 @@ use snowbridge_core::{ gwei, meth, outbound::Message, AgentId, AllowSiblingsOnly, PricingParameters, Rewards, }; use snowbridge_router_primitives::inbound::MessageToXcm; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H160}; use sp_runtime::{ @@ -59,7 +60,7 @@ use frame_support::{ dispatch::DispatchClass, genesis_builder_helper::{build_config, create_default_config}, parameter_types, - traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything}, + traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, TransformOrigin}, weights::{ConstantMultiplier, Weight}, PalletId, }; @@ -84,7 +85,7 @@ use polkadot_runtime_constants::system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use parachains_common::{ - impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, + impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, message_queue::*, }; use system_parachains_constants::{ kusama::{consensus::*, currency::*, fee::WeightToFee}, @@ -93,7 +94,6 @@ use system_parachains_constants::{ // XCM Imports use xcm::prelude::*; -use xcm_executor::XcmExecutor; #[cfg(feature = "runtime-benchmarks")] use crate::xcm_config::benchmark_helpers::DoNothingRouter; @@ -313,6 +313,7 @@ impl pallet_transaction_payment::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 { @@ -320,7 +321,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type OnSystemEvent = (); type SelfParaId = parachain_info::Pallet; type OutboundXcmpMessageSource = XcmpQueue; - type DmpMessageHandler = DmpQueue; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type ReservedDmpWeight = ReservedDmpWeight; type XcmpMessageHandler = XcmpQueue; type ReservedXcmpWeight = ReservedXcmpWeight; @@ -331,10 +332,37 @@ impl cumulus_pallet_parachain_system::Config for Runtime { BLOCK_PROCESSING_VELOCITY, UNINCLUDED_SEGMENT_CAPACITY, >; + type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; } impl parachain_info::Config for Runtime {} +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_message_queue::WeightInfo; + #[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< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >; + type Size = u32; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; +} + impl cumulus_pallet_aura_ext::Config for Runtime {} // todo add message queue pallet config impl pallet_message_queue::Config for Runtime { @@ -370,10 +398,11 @@ pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::Exponenti impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRoot; + // Enqueue XCMP messages from siblings for later processing. + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = RootOrFellows; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; @@ -381,9 +410,9 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { } impl cumulus_pallet_dmp_queue::Config for Runtime { + type WeightInfo = weights::cumulus_pallet_dmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRoot; + type DmpSink = frame_support::traits::EnqueueWithOrigin; } pub const PERIOD: u32 = 6 * HOURS; @@ -636,6 +665,7 @@ construct_runtime!( PolkadotXcm: pallet_xcm = 31, CumulusXcm: cumulus_pallet_xcm = 32, DmpQueue: cumulus_pallet_dmp_queue = 33, + MessageQueue: pallet_message_queue = 34, // Handy utilities. Utility: pallet_utility = 40, @@ -663,12 +693,15 @@ mod benches { frame_benchmarking::define_benchmarks!( [frame_system, SystemBench::] [pallet_balances, Balances] + [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] [pallet_session, SessionBench::] [pallet_utility, Utility] [pallet_timestamp, Timestamp] [pallet_collator_selection, CollatorSelection] + [cumulus_pallet_parachain_system, ParachainSystem] [cumulus_pallet_xcmp_queue, XcmpQueue] + [cumulus_pallet_dmp_queue, DmpQueue] // XCM [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] // NOTE: Make sure you point to the individual modules below. diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_dmp_queue.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_dmp_queue.rs new file mode 100644 index 0000000000..cc41dcd6cb --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_dmp_queue.rs @@ -0,0 +1,131 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +//! Autogenerated weights for `cumulus_pallet_dmp_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-kusama-dev")`, DB CACHE: 1024 + +// Executed Command: +// target/production/polkadot-parachain +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json +// --pallet=cumulus_pallet_dmp_queue +// --chain=asset-hub-kusama-dev +// --header=./cumulus/file_header.txt +// --output=./cumulus/parachains/runtimes/assets/asset-hub-kusama/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_dmp_queue`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_dmp_queue::WeightInfo for WeightInfo { + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (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: `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 { + // Proof Size summary in bytes: + // Measured: `65696` + // Estimated: `69161` + // Minimum execution time: 124_651_000 picoseconds. + Weight::from_parts(127_857_000, 0) + .saturating_add(Weight::from_parts(0, 69161)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65659` + // Estimated: `69124` + // Minimum execution time: 65_684_000 picoseconds. + Weight::from_parts(68_039_000, 0) + .saturating_add(Weight::from_parts(0, 69124)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (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: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn on_idle_overweight_good_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65726` + // Estimated: `69191` + // Minimum execution time: 117_657_000 picoseconds. + Weight::from_parts(122_035_000, 0) + .saturating_add(Weight::from_parts(0, 69191)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + fn on_idle_overweight_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65689` + // Estimated: `69154` + // Minimum execution time: 59_799_000 picoseconds. + Weight::from_parts(61_354_000, 0) + .saturating_add(Weight::from_parts(0, 69154)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_parachain_system.rs new file mode 100644 index 0000000000..c1e5c6a742 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_parachain_system.rs @@ -0,0 +1,80 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `cumulus_pallet_parachain_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// cumulus_pallet_parachain_system +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights +// --steps +// 50 +// --repeat +// 20 + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_parachain_system`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_parachain_system::WeightInfo for WeightInfo { + /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1) + /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0) + /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (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: ParachainSystem ProcessedDownwardMessages (r:0 w:1) + /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: MessageQueue Pages (r:0 w:16) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `12` + // Estimated: `8013` + // Minimum execution time: 1_622_000 picoseconds. + Weight::from_parts(1_709_000, 0) + .saturating_add(Weight::from_parts(0, 8013)) + // Standard Error: 22_138 + .saturating_add(Weight::from_parts(23_923_169, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs index 7285ac453e..6b53cf6ed3 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs @@ -59,16 +59,92 @@ 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) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_config_with_weight() -> Weight { + /// 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 { + // Proof Size summary in bytes: + // Measured: `118` + // Estimated: `3517` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_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 { // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 4_062_000 picoseconds. - Weight::from_parts(4_278_000, 0) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .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 { + // Proof Size summary in bytes: + // Measured: `111` + // Estimated: `1596` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(0, 1596)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn take_first_concatenated_xcm() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 44_000_000 picoseconds. + Weight::from_parts(45_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: `XcmpQueue::InboundXcmpMessages` (r:1 w:1) + /// Proof: `XcmpQueue::InboundXcmpMessages` (`max_values`: None, `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::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 { + // Proof Size summary in bytes: + // Measured: `65747` + // Estimated: `69212` + // Minimum execution time: 62_000_000 picoseconds. + Weight::from_parts(66_000_000, 0) + .saturating_add(Weight::from_parts(0, 69212)) + .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) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65710` + // Estimated: `69175` + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(43_000_000, 0) + .saturating_add(Weight::from_parts(0, 69175)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs index fa86b3ac1b..45d6b9e13f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs @@ -24,6 +24,8 @@ use ::pallet_bridge_relayers::WeightInfoExt as _; use frame_support::weights::Weight; pub mod block_weights; +pub mod cumulus_pallet_dmp_queue; +pub mod cumulus_pallet_parachain_system; pub mod cumulus_pallet_xcmp_queue; pub mod extrinsic_weights; pub mod frame_system; @@ -33,6 +35,7 @@ pub mod pallet_bridge_messages; pub mod pallet_bridge_parachains; pub mod pallet_bridge_relayers; pub mod pallet_collator_selection; +pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_session; pub mod pallet_timestamp; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_message_queue.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_message_queue.rs new file mode 100644 index 0000000000..45531ccfa7 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_message_queue.rs @@ -0,0 +1,179 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-24, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// pallet_message_queue +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `189` + // Estimated: `7534` + // Minimum execution time: 13_668_000 picoseconds. + Weight::from_parts(13_668_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// 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) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `184` + // Estimated: `7534` + // Minimum execution time: 11_106_000 picoseconds. + Weight::from_parts(11_106_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3517` + // Minimum execution time: 4_921_000 picoseconds. + Weight::from_parts(4_921_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 6_879_000 picoseconds. + Weight::from_parts(6_879_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 7_564_000 picoseconds. + Weight::from_parts(7_564_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 59_963_000 picoseconds. + Weight::from_parts(59_963_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:0) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `99` + // Estimated: `5007` + // Minimum execution time: 7_200_000 picoseconds. + Weight::from_parts(7_200_000, 0) + .saturating_add(Weight::from_parts(0, 5007)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 41_366_000 picoseconds. + Weight::from_parts(41_366_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 60_538_000 picoseconds. + Weight::from_parts(60_538_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 73_665_000 picoseconds. + Weight::from_parts(73_665_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 0170ef04e1..784d41f0f4 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -37,6 +37,7 @@ frame-try-runtime = { default-features = false, optional = true, version = "0.33 pallet-aura = { default-features = false, version = "26.0.0" } pallet-authorship = { default-features = false, version = "27.0.0" } pallet-balances = { default-features = false, version = "27.0.0" } +pallet-message-queue = { default-features = false , version = "30.0.0" } pallet-multisig = { default-features = false, version = "27.0.0" } pallet-session = { default-features = false, version = "27.0.0" } pallet-timestamp = { default-features = false, version = "26.0.0" } @@ -173,6 +174,7 @@ std = [ "pallet-bridge-parachains/std", "pallet-bridge-relayers/std", "pallet-collator-selection/std", + "pallet-message-queue/std", "pallet-multisig/std", "pallet-session/std", "pallet-timestamp/std", @@ -224,6 +226,7 @@ std = [ runtime-benchmarks = [ "bridge-hub-common/runtime-benchmarks", "bridge-runtime-common/runtime-benchmarks", + "cumulus-pallet-dmp-queue/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", @@ -238,6 +241,7 @@ runtime-benchmarks = [ "pallet-bridge-parachains/runtime-benchmarks", "pallet-bridge-relayers/runtime-benchmarks", "pallet-collator-selection/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-utility/runtime-benchmarks", @@ -276,6 +280,7 @@ try-runtime = [ "pallet-bridge-parachains/try-runtime", "pallet-bridge-relayers/try-runtime", "pallet-collator-selection/try-runtime", + "pallet-message-queue/try-runtime", "pallet-multisig/try-runtime", "pallet-session/try-runtime", "pallet-timestamp/try-runtime", diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 2ccd1c99d4..d22235a53b 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -33,6 +33,7 @@ use snowbridge_core::{ gwei, meth, outbound::Message, AgentId, AllowSiblingsOnly, PricingParameters, Rewards, }; use snowbridge_router_primitives::inbound::MessageToXcm; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H160}; use sp_runtime::{ @@ -59,7 +60,7 @@ use frame_support::{ dispatch::DispatchClass, genesis_builder_helper::{build_config, create_default_config}, parameter_types, - traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything}, + traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, TransformOrigin}, weights::{ConstantMultiplier, Weight}, PalletId, }; @@ -85,7 +86,7 @@ use polkadot_runtime_constants::system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use parachains_common::{ - impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, + impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, message_queue::*, }; use system_parachains_constants::{ polkadot::{consensus::*, currency::*, fee::WeightToFee}, @@ -93,7 +94,6 @@ use system_parachains_constants::{ }; // XCM Imports use xcm::prelude::*; -use xcm_executor::XcmExecutor; #[cfg(feature = "runtime-benchmarks")] use crate::xcm_config::benchmark_helpers::DoNothingRouter; @@ -313,6 +313,7 @@ impl pallet_transaction_payment::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 { @@ -320,7 +321,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type OnSystemEvent = (); type SelfParaId = parachain_info::Pallet; type OutboundXcmpMessageSource = XcmpQueue; - type DmpMessageHandler = DmpQueue; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type ReservedDmpWeight = ReservedDmpWeight; type XcmpMessageHandler = XcmpQueue; type ReservedXcmpWeight = ReservedXcmpWeight; @@ -331,10 +332,37 @@ impl cumulus_pallet_parachain_system::Config for Runtime { BLOCK_PROCESSING_VELOCITY, UNINCLUDED_SEGMENT_CAPACITY, >; + type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; } impl parachain_info::Config for Runtime {} +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_message_queue::WeightInfo; + #[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< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >; + type Size = u32; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; +} + impl cumulus_pallet_aura_ext::Config for Runtime {} // todo add message queue pallet config impl pallet_message_queue::Config for Runtime { @@ -370,10 +398,11 @@ pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::Exponenti impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRoot; + // Enqueue XCMP messages from siblings for later processing. + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = RootOrFellows; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; @@ -381,9 +410,9 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { } impl cumulus_pallet_dmp_queue::Config for Runtime { + type WeightInfo = weights::cumulus_pallet_dmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRoot; + type DmpSink = frame_support::traits::EnqueueWithOrigin; } pub const PERIOD: u32 = 6 * HOURS; @@ -636,6 +665,7 @@ construct_runtime!( PolkadotXcm: pallet_xcm = 31, CumulusXcm: cumulus_pallet_xcm = 32, DmpQueue: cumulus_pallet_dmp_queue = 33, + MessageQueue: pallet_message_queue = 34, // Handy utilities. Utility: pallet_utility = 40, @@ -661,12 +691,15 @@ mod benches { frame_benchmarking::define_benchmarks!( [frame_system, SystemBench::] [pallet_balances, Balances] + [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] [pallet_session, SessionBench::] [pallet_utility, Utility] [pallet_timestamp, Timestamp] [pallet_collator_selection, CollatorSelection] + [cumulus_pallet_parachain_system, ParachainSystem] [cumulus_pallet_xcmp_queue, XcmpQueue] + [cumulus_pallet_dmp_queue, DmpQueue] // XCM [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] // NOTE: Make sure you point to the individual modules below. diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_dmp_queue.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_dmp_queue.rs new file mode 100644 index 0000000000..cc41dcd6cb --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_dmp_queue.rs @@ -0,0 +1,131 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +//! Autogenerated weights for `cumulus_pallet_dmp_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-kusama-dev")`, DB CACHE: 1024 + +// Executed Command: +// target/production/polkadot-parachain +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json +// --pallet=cumulus_pallet_dmp_queue +// --chain=asset-hub-kusama-dev +// --header=./cumulus/file_header.txt +// --output=./cumulus/parachains/runtimes/assets/asset-hub-kusama/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_dmp_queue`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_dmp_queue::WeightInfo for WeightInfo { + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (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: `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 { + // Proof Size summary in bytes: + // Measured: `65696` + // Estimated: `69161` + // Minimum execution time: 124_651_000 picoseconds. + Weight::from_parts(127_857_000, 0) + .saturating_add(Weight::from_parts(0, 69161)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65659` + // Estimated: `69124` + // Minimum execution time: 65_684_000 picoseconds. + Weight::from_parts(68_039_000, 0) + .saturating_add(Weight::from_parts(0, 69124)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (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: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn on_idle_overweight_good_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65726` + // Estimated: `69191` + // Minimum execution time: 117_657_000 picoseconds. + Weight::from_parts(122_035_000, 0) + .saturating_add(Weight::from_parts(0, 69191)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + fn on_idle_overweight_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65689` + // Estimated: `69154` + // Minimum execution time: 59_799_000 picoseconds. + Weight::from_parts(61_354_000, 0) + .saturating_add(Weight::from_parts(0, 69154)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_parachain_system.rs new file mode 100644 index 0000000000..c1e5c6a742 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_parachain_system.rs @@ -0,0 +1,80 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `cumulus_pallet_parachain_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// cumulus_pallet_parachain_system +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights +// --steps +// 50 +// --repeat +// 20 + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_parachain_system`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_parachain_system::WeightInfo for WeightInfo { + /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1) + /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0) + /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (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: ParachainSystem ProcessedDownwardMessages (r:0 w:1) + /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: MessageQueue Pages (r:0 w:16) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `12` + // Estimated: `8013` + // Minimum execution time: 1_622_000 picoseconds. + Weight::from_parts(1_709_000, 0) + .saturating_add(Weight::from_parts(0, 8013)) + // Standard Error: 22_138 + .saturating_add(Weight::from_parts(23_923_169, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs index 27f640dbaf..333147913f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs @@ -59,16 +59,92 @@ 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) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_config_with_weight() -> Weight { + /// 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 { + // Proof Size summary in bytes: + // Measured: `118` + // Estimated: `3517` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_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 { // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 3_995_000 picoseconds. - Weight::from_parts(4_256_000, 0) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .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 { + // Proof Size summary in bytes: + // Measured: `111` + // Estimated: `1596` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(0, 1596)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn take_first_concatenated_xcm() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 44_000_000 picoseconds. + Weight::from_parts(45_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: `XcmpQueue::InboundXcmpMessages` (r:1 w:1) + /// Proof: `XcmpQueue::InboundXcmpMessages` (`max_values`: None, `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::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 { + // Proof Size summary in bytes: + // Measured: `65747` + // Estimated: `69212` + // Minimum execution time: 62_000_000 picoseconds. + Weight::from_parts(66_000_000, 0) + .saturating_add(Weight::from_parts(0, 69212)) + .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) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65710` + // Estimated: `69175` + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(43_000_000, 0) + .saturating_add(Weight::from_parts(0, 69175)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs index 951cab5546..e56ad7c2cc 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs @@ -24,6 +24,8 @@ use ::pallet_bridge_relayers::WeightInfoExt as _; use frame_support::weights::Weight; pub mod block_weights; +pub mod cumulus_pallet_dmp_queue; +pub mod cumulus_pallet_parachain_system; pub mod cumulus_pallet_xcmp_queue; pub mod extrinsic_weights; pub mod frame_system; @@ -33,6 +35,7 @@ pub mod pallet_bridge_messages; pub mod pallet_bridge_parachains; pub mod pallet_bridge_relayers; pub mod pallet_collator_selection; +pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_session; pub mod pallet_timestamp; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_message_queue.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_message_queue.rs new file mode 100644 index 0000000000..45531ccfa7 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_message_queue.rs @@ -0,0 +1,179 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-24, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// pallet_message_queue +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `189` + // Estimated: `7534` + // Minimum execution time: 13_668_000 picoseconds. + Weight::from_parts(13_668_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// 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) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `184` + // Estimated: `7534` + // Minimum execution time: 11_106_000 picoseconds. + Weight::from_parts(11_106_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3517` + // Minimum execution time: 4_921_000 picoseconds. + Weight::from_parts(4_921_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 6_879_000 picoseconds. + Weight::from_parts(6_879_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 7_564_000 picoseconds. + Weight::from_parts(7_564_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 59_963_000 picoseconds. + Weight::from_parts(59_963_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:0) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `99` + // Estimated: `5007` + // Minimum execution time: 7_200_000 picoseconds. + Weight::from_parts(7_200_000, 0) + .saturating_add(Weight::from_parts(0, 5007)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 41_366_000 picoseconds. + Weight::from_parts(41_366_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 60_538_000 picoseconds. + Weight::from_parts(60_538_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 73_665_000 picoseconds. + Weight::from_parts(73_665_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index 35103ed880..d40600153e 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -29,6 +29,7 @@ pallet-aura = { default-features = false, version = "26.0.0" } pallet-authorship = { default-features = false, version = "27.0.0" } pallet-balances = { default-features = false, version = "27.0.0" } pallet-collective = { default-features = false, version = "27.0.0" } +pallet-message-queue = { default-features = false , version = "30.0.0" } pallet-multisig = { default-features = false, version = "27.0.0" } pallet-preimage = { default-features = false , version = "27.0.0" } pallet-proxy = { default-features = false, version = "27.0.0" } @@ -88,6 +89,7 @@ substrate-wasm-builder = { optional = true , version = "16.0.0" } [features] default = [ "std" ] runtime-benchmarks = [ + "cumulus-pallet-dmp-queue/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", @@ -101,6 +103,7 @@ runtime-benchmarks = [ "pallet-collator-selection/runtime-benchmarks", "pallet-collective/runtime-benchmarks", "pallet-core-fellowship/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-preimage/runtime-benchmarks", "pallet-proxy/runtime-benchmarks", @@ -136,6 +139,7 @@ try-runtime = [ "pallet-collator-selection/try-runtime", "pallet-collective/try-runtime", "pallet-core-fellowship/try-runtime", + "pallet-message-queue/try-runtime", "pallet-multisig/try-runtime", "pallet-preimage/try-runtime", "pallet-proxy/try-runtime", @@ -179,6 +183,7 @@ std = [ "pallet-collator-selection/std", "pallet-collective/std", "pallet-core-fellowship/std", + "pallet-message-queue/std", "pallet-multisig/std", "pallet-preimage/std", "pallet-proxy/std", diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index f7222aaa30..6dfb97a6c9 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -43,6 +43,7 @@ pub mod xcm_config; pub mod fellowship; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use fellowship::{pallet_fellowship_origins, Fellows}; use impls::{AllianceProposalProvider, EqualOrGreatestRootCmp, ToParentTreasury}; use polkadot_runtime_common::impls::VersionedLocatableAsset; @@ -68,7 +69,7 @@ use frame_support::{ parameter_types, traits::{ fungible::HoldConsideration, ConstBool, ConstU16, ConstU32, ConstU64, ConstU8, - EitherOfDiverse, InstanceFilter, LinearStoragePrice, + EitherOfDiverse, InstanceFilter, LinearStoragePrice, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -78,7 +79,7 @@ use frame_system::{ EnsureRoot, }; use parachains_common::{ - impls::DealWithFees, AccountId, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature, + impls::DealWithFees, AccountId, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature, message_queue::*, }; use sp_runtime::RuntimeDebug; use system_parachains_constants::{ @@ -87,7 +88,7 @@ use system_parachains_constants::{ SLOT_DURATION, }; use xcm_config::{ - GovernanceLocation, LocationToAccountId, TreasurerBodyId, XcmConfig, + GovernanceLocation, LocationToAccountId, TreasurerBodyId, XcmOriginToTransactDispatchOrigin, }; @@ -98,7 +99,6 @@ pub use sp_runtime::BuildStorage; use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use xcm::prelude::*; -use xcm_executor::XcmExecutor; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; @@ -363,13 +363,14 @@ impl pallet_proxy::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 = parachain_info::Pallet; - type DmpMessageHandler = DmpQueue; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type ReservedDmpWeight = ReservedDmpWeight; type OutboundXcmpMessageSource = XcmpQueue; type XcmpMessageHandler = XcmpQueue; @@ -381,10 +382,37 @@ impl cumulus_pallet_parachain_system::Config for Runtime { BLOCK_PROCESSING_VELOCITY, UNINCLUDED_SEGMENT_CAPACITY, >; + type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; } impl parachain_info::Config for Runtime {} +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_message_queue::WeightInfo; + #[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< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >; + type Size = u32; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; +} + impl cumulus_pallet_aura_ext::Config for Runtime {} parameter_types! { @@ -411,10 +439,11 @@ pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::Exponenti impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRoot; + // Enqueue XCMP messages from siblings for later processing. + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = EitherOfDiverse, Fellows>; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; @@ -422,9 +451,9 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { } impl cumulus_pallet_dmp_queue::Config for Runtime { + type WeightInfo = weights::cumulus_pallet_dmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRoot; + type DmpSink = frame_support::traits::EnqueueWithOrigin; } pub const PERIOD: u32 = 6 * HOURS; @@ -628,6 +657,7 @@ construct_runtime!( PolkadotXcm: pallet_xcm = 31, CumulusXcm: cumulus_pallet_xcm = 32, DmpQueue: cumulus_pallet_dmp_queue = 33, + MessageQueue: pallet_message_queue = 34, // Handy utilities. Utility: pallet_utility = 40, @@ -698,13 +728,16 @@ mod benches { frame_benchmarking::define_benchmarks!( [frame_system, SystemBench::] [pallet_balances, Balances] + [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] [pallet_proxy, Proxy] [pallet_session, SessionBench::] [pallet_utility, Utility] [pallet_timestamp, Timestamp] [pallet_collator_selection, CollatorSelection] + [cumulus_pallet_parachain_system, ParachainSystem] [cumulus_pallet_xcmp_queue, XcmpQueue] + [cumulus_pallet_dmp_queue, DmpQueue] [pallet_alliance, Alliance] [pallet_collective, AllianceMotion] [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_dmp_queue.rs b/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_dmp_queue.rs new file mode 100644 index 0000000000..cc41dcd6cb --- /dev/null +++ b/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_dmp_queue.rs @@ -0,0 +1,131 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +//! Autogenerated weights for `cumulus_pallet_dmp_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-kusama-dev")`, DB CACHE: 1024 + +// Executed Command: +// target/production/polkadot-parachain +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json +// --pallet=cumulus_pallet_dmp_queue +// --chain=asset-hub-kusama-dev +// --header=./cumulus/file_header.txt +// --output=./cumulus/parachains/runtimes/assets/asset-hub-kusama/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_dmp_queue`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_dmp_queue::WeightInfo for WeightInfo { + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (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: `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 { + // Proof Size summary in bytes: + // Measured: `65696` + // Estimated: `69161` + // Minimum execution time: 124_651_000 picoseconds. + Weight::from_parts(127_857_000, 0) + .saturating_add(Weight::from_parts(0, 69161)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65659` + // Estimated: `69124` + // Minimum execution time: 65_684_000 picoseconds. + Weight::from_parts(68_039_000, 0) + .saturating_add(Weight::from_parts(0, 69124)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (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: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn on_idle_overweight_good_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65726` + // Estimated: `69191` + // Minimum execution time: 117_657_000 picoseconds. + Weight::from_parts(122_035_000, 0) + .saturating_add(Weight::from_parts(0, 69191)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + fn on_idle_overweight_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65689` + // Estimated: `69154` + // Minimum execution time: 59_799_000 picoseconds. + Weight::from_parts(61_354_000, 0) + .saturating_add(Weight::from_parts(0, 69154)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_parachain_system.rs new file mode 100644 index 0000000000..c1e5c6a742 --- /dev/null +++ b/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_parachain_system.rs @@ -0,0 +1,80 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `cumulus_pallet_parachain_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// cumulus_pallet_parachain_system +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights +// --steps +// 50 +// --repeat +// 20 + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_parachain_system`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_parachain_system::WeightInfo for WeightInfo { + /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1) + /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0) + /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (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: ParachainSystem ProcessedDownwardMessages (r:0 w:1) + /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: MessageQueue Pages (r:0 w:16) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `12` + // Estimated: `8013` + // Minimum execution time: 1_622_000 picoseconds. + Weight::from_parts(1_709_000, 0) + .saturating_add(Weight::from_parts(0, 8013)) + // Standard Error: 22_138 + .saturating_add(Weight::from_parts(23_923_169, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs index d8834a7ca3..014219aff9 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs @@ -59,16 +59,92 @@ 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) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_config_with_weight() -> Weight { + /// 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 { // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `1627` - // Minimum execution time: 4_125_000 picoseconds. - Weight::from_parts(4_325_000, 0) - .saturating_add(Weight::from_parts(0, 1627)) + // Measured: `118` + // Estimated: `3517` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_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 { + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `1561` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) + .saturating_add(Weight::from_parts(0, 1561)) .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 { + // Proof Size summary in bytes: + // Measured: `111` + // Estimated: `1596` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(0, 1596)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn take_first_concatenated_xcm() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 44_000_000 picoseconds. + Weight::from_parts(45_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: `XcmpQueue::InboundXcmpMessages` (r:1 w:1) + /// Proof: `XcmpQueue::InboundXcmpMessages` (`max_values`: None, `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::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 { + // Proof Size summary in bytes: + // Measured: `65747` + // Estimated: `69212` + // Minimum execution time: 62_000_000 picoseconds. + Weight::from_parts(66_000_000, 0) + .saturating_add(Weight::from_parts(0, 69212)) + .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) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65710` + // Estimated: `69175` + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(43_000_000, 0) + .saturating_add(Weight::from_parts(0, 69175)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs b/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs index 187daf121b..55b60b10e0 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs @@ -15,6 +15,8 @@ // along with Cumulus. If not, see . pub mod block_weights; +pub mod cumulus_pallet_dmp_queue; +pub mod cumulus_pallet_parachain_system; pub mod cumulus_pallet_xcmp_queue; pub mod extrinsic_weights; pub mod frame_system; @@ -24,6 +26,7 @@ pub mod pallet_balances; pub mod pallet_collator_selection; pub mod pallet_collective; pub mod pallet_core_fellowship; +pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_preimage; pub mod pallet_proxy; diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_message_queue.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_message_queue.rs new file mode 100644 index 0000000000..45531ccfa7 --- /dev/null +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_message_queue.rs @@ -0,0 +1,179 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-24, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// pallet_message_queue +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `189` + // Estimated: `7534` + // Minimum execution time: 13_668_000 picoseconds. + Weight::from_parts(13_668_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// 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) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `184` + // Estimated: `7534` + // Minimum execution time: 11_106_000 picoseconds. + Weight::from_parts(11_106_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3517` + // Minimum execution time: 4_921_000 picoseconds. + Weight::from_parts(4_921_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 6_879_000 picoseconds. + Weight::from_parts(6_879_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 7_564_000 picoseconds. + Weight::from_parts(7_564_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 59_963_000 picoseconds. + Weight::from_parts(59_963_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:0) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `99` + // Estimated: `5007` + // Minimum execution time: 7_200_000 picoseconds. + Weight::from_parts(7_200_000, 0) + .saturating_add(Weight::from_parts(0, 5007)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 41_366_000 picoseconds. + Weight::from_parts(41_366_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 60_538_000 picoseconds. + Weight::from_parts(60_538_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 73_665_000 picoseconds. + Weight::from_parts(73_665_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/gluttons/glutton-kusama/Cargo.toml b/system-parachains/gluttons/glutton-kusama/Cargo.toml index e72a2ec7d8..ba5845c74d 100644 --- a/system-parachains/gluttons/glutton-kusama/Cargo.toml +++ b/system-parachains/gluttons/glutton-kusama/Cargo.toml @@ -21,6 +21,7 @@ frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } pallet-glutton = { default-features = false, optional = true, version = "13.0.0" } +pallet-message-queue = { default-features = false , version = "30.0.0" } pallet-sudo = { default-features = false, optional = true, version = "27.0.0" } sp-api = { default-features = false, version = "25.0.0" } sp-block-builder = { default-features = false, version = "25.0.0" } @@ -60,6 +61,7 @@ runtime-benchmarks = [ "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-glutton/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-sudo?/runtime-benchmarks", "parachains-common/runtime-benchmarks", "sp-runtime/runtime-benchmarks", @@ -79,6 +81,7 @@ std = [ "frame-system/std", "frame-try-runtime?/std", "pallet-glutton/std", + "pallet-message-queue/std", "pallet-sudo/std", "parachain-info/std", "parachains-common/std", @@ -108,6 +111,7 @@ try-runtime = [ "frame-system/try-runtime", "frame-try-runtime/try-runtime", "pallet-glutton/try-runtime", + "pallet-message-queue/try-runtime", "pallet-sudo/try-runtime", "parachain-info/try-runtime", "sp-runtime/try-runtime", diff --git a/system-parachains/gluttons/glutton-kusama/src/lib.rs b/system-parachains/gluttons/glutton-kusama/src/lib.rs index b0f95673fb..1e90e239e4 100644 --- a/system-parachains/gluttons/glutton-kusama/src/lib.rs +++ b/system-parachains/gluttons/glutton-kusama/src/lib.rs @@ -47,6 +47,7 @@ pub mod weights; pub mod xcm_config; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_primitives_core::AggregateMessageOrigin; use sp_api::impl_runtime_apis; use sp_core::OpaqueMetadata; use sp_runtime::{ @@ -168,6 +169,7 @@ impl frame_system::Config for Runtime { parameter_types! { // We do anything the parent chain tells us in this runtime. pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(2); + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; } impl cumulus_pallet_parachain_system::Config for Runtime { @@ -175,16 +177,42 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type OnSystemEvent = (); type SelfParaId = parachain_info::Pallet; type OutboundXcmpMessageSource = (); - type DmpMessageHandler = cumulus_pallet_xcm::UnlimitedDmpExecution; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type ReservedDmpWeight = ReservedDmpWeight; type XcmpMessageHandler = (); type ReservedXcmpWeight = (); type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases; type ConsensusHook = cumulus_pallet_parachain_system::consensus_hook::ExpectParentIncluded; + type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; } impl parachain_info::Config for Runtime {} +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_message_queue::WeightInfo; + #[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< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >; + type Size = u32; + type QueueChangeHandler = (); + type QueuePausedQuery = (); // No XCMP queue pallet deployed. + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; +} + impl pallet_glutton::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_glutton::WeightInfo; @@ -204,8 +232,10 @@ construct_runtime! { ParachainSystem: cumulus_pallet_parachain_system = 1, ParachainInfo: parachain_info = 2, + // TODO:(PR#137) - do we still need this? // DMP handler. CumulusXcm: cumulus_pallet_xcm = 10, + MessageQueue: pallet_message_queue = 11, // The main stage. Glutton: pallet_glutton = 20, @@ -258,6 +288,8 @@ mod benches { frame_benchmarking::define_benchmarks!( [frame_system, SystemBench::] [pallet_glutton, Glutton] + [pallet_message_queue, MessageQueue] + [cumulus_pallet_parachain_system, ParachainSystem] ); } diff --git a/system-parachains/gluttons/glutton-kusama/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/gluttons/glutton-kusama/src/weights/cumulus_pallet_parachain_system.rs new file mode 100644 index 0000000000..c1e5c6a742 --- /dev/null +++ b/system-parachains/gluttons/glutton-kusama/src/weights/cumulus_pallet_parachain_system.rs @@ -0,0 +1,80 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `cumulus_pallet_parachain_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// cumulus_pallet_parachain_system +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights +// --steps +// 50 +// --repeat +// 20 + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_parachain_system`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_parachain_system::WeightInfo for WeightInfo { + /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1) + /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0) + /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (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: ParachainSystem ProcessedDownwardMessages (r:0 w:1) + /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: MessageQueue Pages (r:0 w:16) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `12` + // Estimated: `8013` + // Minimum execution time: 1_622_000 picoseconds. + Weight::from_parts(1_709_000, 0) + .saturating_add(Weight::from_parts(0, 8013)) + // Standard Error: 22_138 + .saturating_add(Weight::from_parts(23_923_169, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/gluttons/glutton-kusama/src/weights/mod.rs b/system-parachains/gluttons/glutton-kusama/src/weights/mod.rs index 990558538a..01562897d3 100644 --- a/system-parachains/gluttons/glutton-kusama/src/weights/mod.rs +++ b/system-parachains/gluttons/glutton-kusama/src/weights/mod.rs @@ -14,4 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . +pub mod cumulus_pallet_parachain_system; pub mod pallet_glutton; +pub mod pallet_message_queue; diff --git a/system-parachains/gluttons/glutton-kusama/src/weights/pallet_message_queue.rs b/system-parachains/gluttons/glutton-kusama/src/weights/pallet_message_queue.rs new file mode 100644 index 0000000000..45531ccfa7 --- /dev/null +++ b/system-parachains/gluttons/glutton-kusama/src/weights/pallet_message_queue.rs @@ -0,0 +1,179 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-24, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// pallet_message_queue +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `189` + // Estimated: `7534` + // Minimum execution time: 13_668_000 picoseconds. + Weight::from_parts(13_668_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// 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) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `184` + // Estimated: `7534` + // Minimum execution time: 11_106_000 picoseconds. + Weight::from_parts(11_106_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3517` + // Minimum execution time: 4_921_000 picoseconds. + Weight::from_parts(4_921_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 6_879_000 picoseconds. + Weight::from_parts(6_879_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 7_564_000 picoseconds. + Weight::from_parts(7_564_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 59_963_000 picoseconds. + Weight::from_parts(59_963_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:0) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `99` + // Estimated: `5007` + // Minimum execution time: 7_200_000 picoseconds. + Weight::from_parts(7_200_000, 0) + .saturating_add(Weight::from_parts(0, 5007)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 41_366_000 picoseconds. + Weight::from_parts(41_366_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 60_538_000 picoseconds. + Weight::from_parts(60_538_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 73_665_000 picoseconds. + Weight::from_parts(73_665_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} From a1fa8d9a0c174ece5d1540863b8854e78c31a75f Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 11 Jan 2024 15:06:34 +0100 Subject: [PATCH 061/316] [bridges] adapt https://github.com/paritytech/polkadot-sdk/pull/2602 --- .../asset-hub-kusama/tests/tests.rs | 464 +----------------- .../asset-hub-polkadot/tests/tests.rs | 464 +----------------- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 6 + .../src/bridge_to_polkadot_config.rs | 49 +- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 13 +- .../bridge-hub-kusama/tests/tests.rs | 10 +- .../bridge-hub-polkadot/Cargo.toml | 6 + .../src/bridge_to_kusama_config.rs | 49 +- .../bridge-hub-polkadot/src/lib.rs | 9 +- .../bridge-hub-polkadot/tests/tests.rs | 10 +- 10 files changed, 105 insertions(+), 975 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index cd3c06e5a6..3c70f6ee4d 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -547,12 +547,6 @@ asset_test_utils::include_teleports_for_native_asset_works!( _ => None, } }), - Box::new(|runtime_event_encoded: Vec| { - match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { - Ok(RuntimeEvent::XcmpQueue(event)) => Some(event), - _ => None, - } - }), 1000 ); @@ -673,7 +667,7 @@ fn bridging_to_asset_hub_polkadot() -> TestBridgingConfig { #[test] fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_polkadot_works() { - missing_asset_test_utils_test_cases_over_bridge::limited_reserve_transfer_assets_for_native_asset_works::< + asset_test_utils::test_cases_over_bridge::limited_reserve_transfer_assets_for_native_asset_works::< Runtime, AllPalletsWithoutSystem, XcmConfig, @@ -699,7 +693,7 @@ fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_polkadot_works( bridging_to_asset_hub_polkadot, WeightLimit::Unlimited, Some(XcmBridgeHubRouterFeeAssetId::get()), - TreasuryAccount::get(), + Some(TreasuryAccount::get()), ) } @@ -730,7 +724,7 @@ fn receive_reserve_asset_deposited_roc_from_asset_hub_polkadot_works() { #[test] fn report_bridge_status_from_xcm_bridge_router_for_polkadot_works() { - missing_asset_test_utils_test_cases_over_bridge::report_bridge_status_from_xcm_bridge_router_works::< + asset_test_utils::test_cases_over_bridge::report_bridge_status_from_xcm_bridge_router_works::< Runtime, AllPalletsWithoutSystem, XcmConfig, @@ -860,455 +854,3 @@ fn change_xcm_bridge_hub_ethereum_base_fee_by_governance_works() { }, ) } - -// missing stuff from asset_test_utils::test_cases_over_bridge -// TODO: replace me with direct usages of `asset_test_utils` after deps are bumped to (at least) 1.4 -mod missing_asset_test_utils_test_cases_over_bridge { - use asset_test_utils::test_cases_over_bridge::TestBridgingConfig; - use codec::Encode; - use cumulus_primitives_core::XcmpMessageSource; - use frame_support::{ - assert_ok, - traits::{Currency, Get, OnFinalize, OnInitialize, OriginTrait, ProcessMessageError}, - }; - use frame_system::pallet_prelude::BlockNumberFor; - use parachains_common::{AccountId, Balance}; - use parachains_runtimes_test_utils::{ - mock_open_hrmp_channel, AccountIdOf, BalanceOf, CollatorSessionKeys, ExtBuilder, - RuntimeHelper, ValidatorIdOf, XcmReceivedFrom, - }; - use sp_runtime::{traits::StaticLookup, Saturating}; - use xcm::{latest::prelude::*, VersionedMultiAssets}; - use xcm_builder::{CreateMatcher, MatchXcm}; - use xcm_executor::{ - traits::{ConvertLocation, TransactAsset}, - XcmExecutor, - }; - - /// Helper function to verify `xcm` contains all relevant instructions expected on destination - /// chain as part of a reserve-asset-transfer. - fn assert_matches_reserve_asset_deposited_instructions( - xcm: &mut Xcm, - expected_reserve_assets_deposited: &MultiAssets, - expected_beneficiary: &MultiLocation, - ) { - let _ = xcm - .0 - .matcher() - .skip_inst_while(|inst| !matches!(inst, ReserveAssetDeposited(..))) - .expect("no instruction ReserveAssetDeposited?") - .match_next_inst(|instr| match instr { - ReserveAssetDeposited(reserve_assets) => { - assert_eq!(reserve_assets, expected_reserve_assets_deposited); - Ok(()) - }, - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("expected instruction ReserveAssetDeposited") - .match_next_inst(|instr| match instr { - ClearOrigin => Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("expected instruction ClearOrigin") - .match_next_inst(|instr| match instr { - BuyExecution { .. } => Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("expected instruction BuyExecution") - .match_next_inst(|instr| match instr { - DepositAsset { assets: _, beneficiary } if beneficiary == expected_beneficiary => - Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("expected instruction DepositAsset"); - } - - pub fn limited_reserve_transfer_assets_for_native_asset_works< - Runtime, - AllPalletsWithoutSystem, - XcmConfig, - HrmpChannelOpener, - HrmpChannelSource, - LocationToAccountId, - >( - collator_session_keys: CollatorSessionKeys, - existential_deposit: BalanceOf, - alice_account: AccountIdOf, - unwrap_pallet_xcm_event: Box) -> Option>>, - unwrap_xcmp_queue_event: Box< - dyn Fn(Vec) -> Option>, - >, - prepare_configuration: fn() -> TestBridgingConfig, - weight_limit: WeightLimit, - maybe_paid_export_message: Option, - delivery_fees_account: Option>, - ) where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + cumulus_pallet_parachain_system::Config - + cumulus_pallet_xcmp_queue::Config, - AllPalletsWithoutSystem: - OnInitialize> + OnFinalize>, - AccountIdOf: Into<[u8; 32]>, - ValidatorIdOf: From>, - BalanceOf: From, - ::Balance: From + Into, - XcmConfig: xcm_executor::Config, - LocationToAccountId: ConvertLocation>, - ::AccountId: - Into<<::RuntimeOrigin as OriginTrait>::AccountId>, - <::Lookup as StaticLookup>::Source: - From<::AccountId>, - ::AccountId: From, - HrmpChannelOpener: frame_support::inherent::ProvideInherent< - Call = cumulus_pallet_parachain_system::Call, - >, - HrmpChannelSource: XcmpMessageSource, - { - let runtime_para_id = 1000; - ExtBuilder::::default() - .with_collators(collator_session_keys.collators()) - .with_session_keys(collator_session_keys.session_keys()) - .with_tracing() - .with_safe_xcm_version(3) - .with_para_id(runtime_para_id.into()) - .build() - .execute_with(|| { - let mut alice = [0u8; 32]; - alice[0] = 1; - let included_head = RuntimeHelper::::run_to_block( - 2, - AccountId::from(alice).into(), - ); - - // prepare bridge config - let TestBridgingConfig { - bridged_network, - local_bridge_hub_para_id, - bridged_target_location: target_location_from_different_consensus, - .. - } = prepare_configuration(); - - let reserve_account = LocationToAccountId::convert_location( - &target_location_from_different_consensus, - ) - .expect("Sovereign account for reserves"); - let balance_to_transfer = 1_000_000_000_000_u128; - let native_asset = MultiLocation::parent(); - - // open HRMP to bridge hub - mock_open_hrmp_channel::( - runtime_para_id.into(), - local_bridge_hub_para_id.into(), - included_head, - &alice, - ); - - // drip ED to account - let alice_account_init_balance = existential_deposit + balance_to_transfer.into(); - let _ = >::deposit_creating( - &alice_account, - alice_account_init_balance, - ); - // SA of target location needs to have at least ED, otherwise making reserve fails - let _ = >::deposit_creating( - &reserve_account, - existential_deposit, - ); - - // we just check here, that user retains enough balance after withdrawal - // and also we check if `balance_to_transfer` is more than `existential_deposit`, - assert!( - (>::free_balance(&alice_account) - - balance_to_transfer.into()) >= - existential_deposit - ); - // SA has just ED - assert_eq!( - >::free_balance(&reserve_account), - existential_deposit - ); - - let delivery_fees_account_balance_before = delivery_fees_account - .as_ref() - .map(|dfa| >::free_balance(dfa)) - .unwrap_or(0.into()); - - // local native asset (pallet_balances) - let asset_to_transfer = MultiAsset { - fun: Fungible(balance_to_transfer.into()), - id: Concrete(native_asset), - }; - - // destination is (some) account relative to the destination different consensus - let target_destination_account = MultiLocation { - parents: 0, - interior: X1(AccountId32 { - network: Some(bridged_network), - id: sp_runtime::AccountId32::new([3; 32]).into(), - }), - }; - - let assets_to_transfer = MultiAssets::from(asset_to_transfer); - let mut expected_assets = assets_to_transfer.clone(); - let context = XcmConfig::UniversalLocation::get(); - expected_assets - .reanchor(&target_location_from_different_consensus, context) - .unwrap(); - - let expected_beneficiary = target_destination_account; - - // Make sure sender has enough funds for paying delivery fees - let handling_delivery_fees = { - // Probable XCM with `ReserveAssetDeposited`. - let mut expected_reserve_asset_deposited_message = Xcm(vec![ - ReserveAssetDeposited(MultiAssets::from(expected_assets.clone())), - ClearOrigin, - BuyExecution { - fees: MultiAsset { - id: Concrete(Default::default()), - fun: Fungible(balance_to_transfer), - }, - weight_limit: Unlimited, - }, - DepositAsset { - assets: Wild(AllCounted(1)), - beneficiary: expected_beneficiary, - }, - SetTopic([ - 220, 188, 144, 32, 213, 83, 111, 175, 44, 210, 111, 19, 90, 165, 191, - 112, 140, 247, 192, 124, 42, 17, 153, 141, 114, 34, 189, 20, 83, 69, - 237, 173, - ]), - ]); - assert_matches_reserve_asset_deposited_instructions( - &mut expected_reserve_asset_deposited_message, - &expected_assets, - &expected_beneficiary, - ); - - // Call `SendXcm::validate` to get delivery fees. - let (_, delivery_fees): (_, MultiAssets) = XcmConfig::XcmSender::validate( - &mut Some(target_location_from_different_consensus), - &mut Some(expected_reserve_asset_deposited_message), - ) - .expect("validate passes"); - // Drip delivery fee to Alice account. - let mut delivery_fees_added = false; - for delivery_fee in delivery_fees.inner() { - assert_ok!(::deposit_asset( - &delivery_fee, - &MultiLocation { - parents: 0, - interior: X1(AccountId32 { - network: None, - id: alice_account.clone().into(), - }), - }, - None, - )); - delivery_fees_added = true; - } - delivery_fees_added - }; - - // do pallet_xcm call reserve transfer - assert_ok!(>::limited_reserve_transfer_assets( - RuntimeHelper::::origin_of( - alice_account.clone() - ), - Box::new(target_location_from_different_consensus.into_versioned()), - Box::new(target_destination_account.into_versioned()), - Box::new(VersionedMultiAssets::from(assets_to_transfer)), - 0, - weight_limit, - )); - - // check events - // check pallet_xcm attempted - RuntimeHelper::::assert_pallet_xcm_event_outcome( - &unwrap_pallet_xcm_event, - |outcome| { - assert_ok!(outcome.ensure_complete()); - }, - ); - - // check that xcm was sent - let xcm_sent_message_hash = >::events() - .into_iter() - .filter_map(|e| unwrap_xcmp_queue_event(e.event.encode())) - .find_map(|e| match e { - cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { message_hash } => - Some(message_hash), - _ => None, - }); - - // read xcm - let xcm_sent = - RuntimeHelper::::take_xcm( - local_bridge_hub_para_id.into(), - ) - .unwrap(); - assert_eq!( - xcm_sent_message_hash, - Some(xcm_sent.using_encoded(sp_io::hashing::blake2_256)) - ); - let mut xcm_sent: Xcm<()> = xcm_sent.try_into().expect("versioned xcm"); - - // check sent XCM ExportMessage to BridgeHub - - // 1. check paid or unpaid - if let Some(expected_fee_asset_id) = maybe_paid_export_message { - xcm_sent - .0 - .matcher() - .match_next_inst(|instr| match instr { - WithdrawAsset(_) => Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("contains WithdrawAsset") - .match_next_inst(|instr| match instr { - BuyExecution { fees, .. } if fees.id.eq(&expected_fee_asset_id) => - Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("contains BuyExecution") - } else { - xcm_sent - .0 - .matcher() - .match_next_inst(|instr| match instr { - // first instruction could be UnpaidExecution (because we could have - // explicit unpaid execution on BridgeHub) - UnpaidExecution { weight_limit, check_origin } - if weight_limit == &Unlimited && check_origin.is_none() => - Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("contains UnpaidExecution") - } - // 2. check ExportMessage - .match_next_inst(|instr| match instr { - // next instruction is ExportMessage - ExportMessage { network, destination, xcm: inner_xcm } => { - assert_eq!(network, &bridged_network); - let (_, target_location_junctions_without_global_consensus) = - target_location_from_different_consensus - .interior - .split_global() - .expect("split works"); - assert_eq!( - destination, - &target_location_junctions_without_global_consensus - ); - assert_matches_reserve_asset_deposited_instructions( - inner_xcm, - &expected_assets, - &expected_beneficiary, - ); - Ok(()) - }, - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("contains ExportMessage"); - - // check alice account decreased by balance_to_transfer - assert_eq!( - >::free_balance(&alice_account), - alice_account_init_balance - .saturating_sub(existential_deposit) - .saturating_sub(balance_to_transfer.into()) - ); - - // check reserve account increased by balance_to_transfer - assert_eq!( - >::free_balance(&reserve_account), - existential_deposit + balance_to_transfer.into() - ); - - // check dedicated account increased by delivery fees (if configured) - if handling_delivery_fees { - if let Some(delivery_fees_account) = delivery_fees_account { - let delivery_fees_account_balance_after = - >::free_balance( - &delivery_fees_account, - ); - assert!( - delivery_fees_account_balance_after > - delivery_fees_account_balance_before - ); - } - } - }) - } - - pub fn report_bridge_status_from_xcm_bridge_router_works< - Runtime, - AllPalletsWithoutSystem, - XcmConfig, - LocationToAccountId, - XcmBridgeHubRouterInstance, - >( - collator_session_keys: CollatorSessionKeys, - prepare_configuration: fn() -> TestBridgingConfig, - congested_message: fn() -> Xcm, - uncongested_message: fn() -> Xcm, - ) where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + cumulus_pallet_parachain_system::Config - + cumulus_pallet_xcmp_queue::Config - + pallet_xcm_bridge_hub_router::Config, - AllPalletsWithoutSystem: - OnInitialize> + OnFinalize>, - AccountIdOf: Into<[u8; 32]>, - ValidatorIdOf: From>, - BalanceOf: From, - ::Balance: From + Into, - XcmConfig: xcm_executor::Config, - LocationToAccountId: ConvertLocation>, - ::AccountId: - Into<<::RuntimeOrigin as OriginTrait>::AccountId>, - <::Lookup as StaticLookup>::Source: - From<::AccountId>, - ::AccountId: From, - XcmBridgeHubRouterInstance: 'static, - { - ExtBuilder::::default() - .with_collators(collator_session_keys.collators()) - .with_session_keys(collator_session_keys.session_keys()) - .with_tracing() - .build() - .execute_with(|| { - let report_bridge_status = |is_congested: bool| { - // prepare bridge config - let TestBridgingConfig { local_bridge_hub_location, .. } = prepare_configuration(); - - // Call received XCM execution - let xcm = if is_congested { congested_message() } else { uncongested_message() }; - let hash = xcm.using_encoded(sp_io::hashing::blake2_256); - - // execute xcm as XcmpQueue would do - let outcome = XcmExecutor::::execute_xcm( - local_bridge_hub_location, - xcm, - hash, - RuntimeHelper::::xcm_max_weight(XcmReceivedFrom::Sibling), - ); - assert_eq!(outcome.ensure_complete(), Ok(())); - assert_eq!(is_congested, pallet_xcm_bridge_hub_router::Pallet::::bridge().is_congested); - }; - - report_bridge_status(true); - report_bridge_status(false); - }) - } -} diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index c203b027a7..bc0970b062 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -561,12 +561,6 @@ asset_test_utils::include_teleports_for_native_asset_works!( _ => None, } }), - Box::new(|runtime_event_encoded: Vec| { - match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { - Ok(RuntimeEvent::XcmpQueue(event)) => Some(event), - _ => None, - } - }), 1000 ); @@ -699,7 +693,7 @@ fn bridging_to_asset_hub_kusama() -> TestBridgingConfig { #[test] fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_kusama_works() { - missing_asset_test_utils_test_cases_over_bridge::limited_reserve_transfer_assets_for_native_asset_works::< + asset_test_utils::test_cases_over_bridge::limited_reserve_transfer_assets_for_native_asset_works::< Runtime, AllPalletsWithoutSystem, XcmConfig, @@ -725,7 +719,7 @@ fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_kusama_works() bridging_to_asset_hub_kusama, WeightLimit::Unlimited, Some(XcmBridgeHubRouterFeeAssetId::get()), - TreasuryAccount::get(), + Some(TreasuryAccount::get()), ) } #[test] @@ -754,7 +748,7 @@ fn receive_reserve_asset_deposited_roc_from_asset_hub_kusama_works() { } #[test] fn report_bridge_status_from_xcm_bridge_router_for_kusama_works() { - missing_asset_test_utils_test_cases_over_bridge::report_bridge_status_from_xcm_bridge_router_works::< + asset_test_utils::test_cases_over_bridge::report_bridge_status_from_xcm_bridge_router_works::< Runtime, AllPalletsWithoutSystem, XcmConfig, @@ -885,455 +879,3 @@ fn change_xcm_bridge_hub_ethereum_base_fee_by_governance_works() { }, ) } - -// missing stuff from asset_test_utils::test_cases_over_bridge -// TODO: replace me with direct usages of `asset_test_utils` after deps are bumped to (at least) 1.4 -mod missing_asset_test_utils_test_cases_over_bridge { - use asset_test_utils::test_cases_over_bridge::TestBridgingConfig; - use codec::Encode; - use cumulus_primitives_core::XcmpMessageSource; - use frame_support::{ - assert_ok, - traits::{Currency, Get, OnFinalize, OnInitialize, OriginTrait, ProcessMessageError}, - }; - use frame_system::pallet_prelude::BlockNumberFor; - use parachains_common::{AccountId, Balance}; - use parachains_runtimes_test_utils::{ - mock_open_hrmp_channel, AccountIdOf, BalanceOf, CollatorSessionKeys, ExtBuilder, - RuntimeHelper, ValidatorIdOf, XcmReceivedFrom, - }; - use sp_runtime::{traits::StaticLookup, Saturating}; - use xcm::{latest::prelude::*, VersionedMultiAssets}; - use xcm_builder::{CreateMatcher, MatchXcm}; - use xcm_executor::{ - traits::{ConvertLocation, TransactAsset}, - XcmExecutor, - }; - - /// Helper function to verify `xcm` contains all relevant instructions expected on destination - /// chain as part of a reserve-asset-transfer. - fn assert_matches_reserve_asset_deposited_instructions( - xcm: &mut Xcm, - expected_reserve_assets_deposited: &MultiAssets, - expected_beneficiary: &MultiLocation, - ) { - let _ = xcm - .0 - .matcher() - .skip_inst_while(|inst| !matches!(inst, ReserveAssetDeposited(..))) - .expect("no instruction ReserveAssetDeposited?") - .match_next_inst(|instr| match instr { - ReserveAssetDeposited(reserve_assets) => { - assert_eq!(reserve_assets, expected_reserve_assets_deposited); - Ok(()) - }, - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("expected instruction ReserveAssetDeposited") - .match_next_inst(|instr| match instr { - ClearOrigin => Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("expected instruction ClearOrigin") - .match_next_inst(|instr| match instr { - BuyExecution { .. } => Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("expected instruction BuyExecution") - .match_next_inst(|instr| match instr { - DepositAsset { assets: _, beneficiary } if beneficiary == expected_beneficiary => - Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("expected instruction DepositAsset"); - } - - pub fn limited_reserve_transfer_assets_for_native_asset_works< - Runtime, - AllPalletsWithoutSystem, - XcmConfig, - HrmpChannelOpener, - HrmpChannelSource, - LocationToAccountId, - >( - collator_session_keys: CollatorSessionKeys, - existential_deposit: BalanceOf, - alice_account: AccountIdOf, - unwrap_pallet_xcm_event: Box) -> Option>>, - unwrap_xcmp_queue_event: Box< - dyn Fn(Vec) -> Option>, - >, - prepare_configuration: fn() -> TestBridgingConfig, - weight_limit: WeightLimit, - maybe_paid_export_message: Option, - delivery_fees_account: Option>, - ) where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + cumulus_pallet_parachain_system::Config - + cumulus_pallet_xcmp_queue::Config, - AllPalletsWithoutSystem: - OnInitialize> + OnFinalize>, - AccountIdOf: Into<[u8; 32]>, - ValidatorIdOf: From>, - BalanceOf: From, - ::Balance: From + Into, - XcmConfig: xcm_executor::Config, - LocationToAccountId: ConvertLocation>, - ::AccountId: - Into<<::RuntimeOrigin as OriginTrait>::AccountId>, - <::Lookup as StaticLookup>::Source: - From<::AccountId>, - ::AccountId: From, - HrmpChannelOpener: frame_support::inherent::ProvideInherent< - Call = cumulus_pallet_parachain_system::Call, - >, - HrmpChannelSource: XcmpMessageSource, - { - let runtime_para_id = 1000; - ExtBuilder::::default() - .with_collators(collator_session_keys.collators()) - .with_session_keys(collator_session_keys.session_keys()) - .with_tracing() - .with_safe_xcm_version(3) - .with_para_id(runtime_para_id.into()) - .build() - .execute_with(|| { - let mut alice = [0u8; 32]; - alice[0] = 1; - let included_head = RuntimeHelper::::run_to_block( - 2, - AccountId::from(alice).into(), - ); - - // prepare bridge config - let TestBridgingConfig { - bridged_network, - local_bridge_hub_para_id, - bridged_target_location: target_location_from_different_consensus, - .. - } = prepare_configuration(); - - let reserve_account = LocationToAccountId::convert_location( - &target_location_from_different_consensus, - ) - .expect("Sovereign account for reserves"); - let balance_to_transfer = 1_000_000_000_000_u128; - let native_asset = MultiLocation::parent(); - - // open HRMP to bridge hub - mock_open_hrmp_channel::( - runtime_para_id.into(), - local_bridge_hub_para_id.into(), - included_head, - &alice, - ); - - // drip ED to account - let alice_account_init_balance = existential_deposit + balance_to_transfer.into(); - let _ = >::deposit_creating( - &alice_account, - alice_account_init_balance, - ); - // SA of target location needs to have at least ED, otherwise making reserve fails - let _ = >::deposit_creating( - &reserve_account, - existential_deposit, - ); - - // we just check here, that user retains enough balance after withdrawal - // and also we check if `balance_to_transfer` is more than `existential_deposit`, - assert!( - (>::free_balance(&alice_account) - - balance_to_transfer.into()) >= - existential_deposit - ); - // SA has just ED - assert_eq!( - >::free_balance(&reserve_account), - existential_deposit - ); - - let delivery_fees_account_balance_before = delivery_fees_account - .as_ref() - .map(|dfa| >::free_balance(dfa)) - .unwrap_or(0.into()); - - // local native asset (pallet_balances) - let asset_to_transfer = MultiAsset { - fun: Fungible(balance_to_transfer.into()), - id: Concrete(native_asset), - }; - - // destination is (some) account relative to the destination different consensus - let target_destination_account = MultiLocation { - parents: 0, - interior: X1(AccountId32 { - network: Some(bridged_network), - id: sp_runtime::AccountId32::new([3; 32]).into(), - }), - }; - - let assets_to_transfer = MultiAssets::from(asset_to_transfer); - let mut expected_assets = assets_to_transfer.clone(); - let context = XcmConfig::UniversalLocation::get(); - expected_assets - .reanchor(&target_location_from_different_consensus, context) - .unwrap(); - - let expected_beneficiary = target_destination_account; - - // Make sure sender has enough funds for paying delivery fees - let handling_delivery_fees = { - // Probable XCM with `ReserveAssetDeposited`. - let mut expected_reserve_asset_deposited_message = Xcm(vec![ - ReserveAssetDeposited(MultiAssets::from(expected_assets.clone())), - ClearOrigin, - BuyExecution { - fees: MultiAsset { - id: Concrete(Default::default()), - fun: Fungible(balance_to_transfer), - }, - weight_limit: Unlimited, - }, - DepositAsset { - assets: Wild(AllCounted(1)), - beneficiary: expected_beneficiary, - }, - SetTopic([ - 220, 188, 144, 32, 213, 83, 111, 175, 44, 210, 111, 19, 90, 165, 191, - 112, 140, 247, 192, 124, 42, 17, 153, 141, 114, 34, 189, 20, 83, 69, - 237, 173, - ]), - ]); - assert_matches_reserve_asset_deposited_instructions( - &mut expected_reserve_asset_deposited_message, - &expected_assets, - &expected_beneficiary, - ); - - // Call `SendXcm::validate` to get delivery fees. - let (_, delivery_fees): (_, MultiAssets) = XcmConfig::XcmSender::validate( - &mut Some(target_location_from_different_consensus), - &mut Some(expected_reserve_asset_deposited_message), - ) - .expect("validate passes"); - // Drip delivery fee to Alice account. - let mut delivery_fees_added = false; - for delivery_fee in delivery_fees.inner() { - assert_ok!(::deposit_asset( - &delivery_fee, - &MultiLocation { - parents: 0, - interior: X1(AccountId32 { - network: None, - id: alice_account.clone().into(), - }), - }, - None, - )); - delivery_fees_added = true; - } - delivery_fees_added - }; - - // do pallet_xcm call reserve transfer - assert_ok!(>::limited_reserve_transfer_assets( - RuntimeHelper::::origin_of( - alice_account.clone() - ), - Box::new(target_location_from_different_consensus.into_versioned()), - Box::new(target_destination_account.into_versioned()), - Box::new(VersionedMultiAssets::from(assets_to_transfer)), - 0, - weight_limit, - )); - - // check events - // check pallet_xcm attempted - RuntimeHelper::::assert_pallet_xcm_event_outcome( - &unwrap_pallet_xcm_event, - |outcome| { - assert_ok!(outcome.ensure_complete()); - }, - ); - - // check that xcm was sent - let xcm_sent_message_hash = >::events() - .into_iter() - .filter_map(|e| unwrap_xcmp_queue_event(e.event.encode())) - .find_map(|e| match e { - cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { message_hash } => - Some(message_hash), - _ => None, - }); - - // read xcm - let xcm_sent = - RuntimeHelper::::take_xcm( - local_bridge_hub_para_id.into(), - ) - .unwrap(); - assert_eq!( - xcm_sent_message_hash, - Some(xcm_sent.using_encoded(sp_io::hashing::blake2_256)) - ); - let mut xcm_sent: Xcm<()> = xcm_sent.try_into().expect("versioned xcm"); - - // check sent XCM ExportMessage to BridgeHub - - // 1. check paid or unpaid - if let Some(expected_fee_asset_id) = maybe_paid_export_message { - xcm_sent - .0 - .matcher() - .match_next_inst(|instr| match instr { - WithdrawAsset(_) => Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("contains WithdrawAsset") - .match_next_inst(|instr| match instr { - BuyExecution { fees, .. } if fees.id.eq(&expected_fee_asset_id) => - Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("contains BuyExecution") - } else { - xcm_sent - .0 - .matcher() - .match_next_inst(|instr| match instr { - // first instruction could be UnpaidExecution (because we could have - // explicit unpaid execution on BridgeHub) - UnpaidExecution { weight_limit, check_origin } - if weight_limit == &Unlimited && check_origin.is_none() => - Ok(()), - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("contains UnpaidExecution") - } - // 2. check ExportMessage - .match_next_inst(|instr| match instr { - // next instruction is ExportMessage - ExportMessage { network, destination, xcm: inner_xcm } => { - assert_eq!(network, &bridged_network); - let (_, target_location_junctions_without_global_consensus) = - target_location_from_different_consensus - .interior - .split_global() - .expect("split works"); - assert_eq!( - destination, - &target_location_junctions_without_global_consensus - ); - assert_matches_reserve_asset_deposited_instructions( - inner_xcm, - &expected_assets, - &expected_beneficiary, - ); - Ok(()) - }, - _ => Err(ProcessMessageError::BadFormat), - }) - .expect("contains ExportMessage"); - - // check alice account decreased by balance_to_transfer - assert_eq!( - >::free_balance(&alice_account), - alice_account_init_balance - .saturating_sub(existential_deposit) - .saturating_sub(balance_to_transfer.into()) - ); - - // check reserve account increased by balance_to_transfer - assert_eq!( - >::free_balance(&reserve_account), - existential_deposit + balance_to_transfer.into() - ); - - // check dedicated account increased by delivery fees (if configured) - if handling_delivery_fees { - if let Some(delivery_fees_account) = delivery_fees_account { - let delivery_fees_account_balance_after = - >::free_balance( - &delivery_fees_account, - ); - assert!( - delivery_fees_account_balance_after > - delivery_fees_account_balance_before - ); - } - } - }) - } - - pub fn report_bridge_status_from_xcm_bridge_router_works< - Runtime, - AllPalletsWithoutSystem, - XcmConfig, - LocationToAccountId, - XcmBridgeHubRouterInstance, - >( - collator_session_keys: CollatorSessionKeys, - prepare_configuration: fn() -> TestBridgingConfig, - congested_message: fn() -> Xcm, - uncongested_message: fn() -> Xcm, - ) where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + cumulus_pallet_parachain_system::Config - + cumulus_pallet_xcmp_queue::Config - + pallet_xcm_bridge_hub_router::Config, - AllPalletsWithoutSystem: - OnInitialize> + OnFinalize>, - AccountIdOf: Into<[u8; 32]>, - ValidatorIdOf: From>, - BalanceOf: From, - ::Balance: From + Into, - XcmConfig: xcm_executor::Config, - LocationToAccountId: ConvertLocation>, - ::AccountId: - Into<<::RuntimeOrigin as OriginTrait>::AccountId>, - <::Lookup as StaticLookup>::Source: - From<::AccountId>, - ::AccountId: From, - XcmBridgeHubRouterInstance: 'static, - { - ExtBuilder::::default() - .with_collators(collator_session_keys.collators()) - .with_session_keys(collator_session_keys.session_keys()) - .with_tracing() - .build() - .execute_with(|| { - let report_bridge_status = |is_congested: bool| { - // prepare bridge config - let TestBridgingConfig { local_bridge_hub_location, .. } = prepare_configuration(); - - // Call received XCM execution - let xcm = if is_congested { congested_message() } else { uncongested_message() }; - let hash = xcm.using_encoded(sp_io::hashing::blake2_256); - - // execute xcm as XcmpQueue would do - let outcome = XcmExecutor::::execute_xcm( - local_bridge_hub_location, - xcm, - hash, - RuntimeHelper::::xcm_max_weight(XcmReceivedFrom::Sibling), - ); - assert_eq!(outcome.ensure_complete(), Ok(())); - assert_eq!(is_congested, pallet_xcm_bridge_hub_router::Pallet::::bridge().is_congested); - }; - - report_bridge_status(true); - report_bridge_status(false); - }) - } -} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index b85ec0c8f0..8b65821222 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -25,6 +25,7 @@ bp-asset-hub-polkadot = { path = "../../asset-hubs/asset-hub-polkadot/primitives bp-bridge-hub-kusama = { path = "./primitives", default-features = false} bp-bridge-hub-polkadot = { path = "../bridge-hub-polkadot/primitives", default-features = false} kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-features = false} +polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } @@ -97,6 +98,7 @@ pallet-bridge-grandpa = { default-features = false , version = "0.6.0" } pallet-bridge-messages = { default-features = false , version = "0.6.0" } pallet-bridge-parachains = { default-features = false , version = "0.6.0" } pallet-bridge-relayers = { default-features = false , version = "0.6.0" } +pallet-xcm-bridge-hub = { default-features = false , version = "0.1.0" } # Bridges bp-header-chain = { default-features = false , version = "0.4.0" } @@ -184,12 +186,14 @@ std = [ "pallet-transaction-payment/std", "pallet-utility/std", "pallet-xcm-benchmarks?/std", + "pallet-xcm-bridge-hub/std", "pallet-xcm/std", "parachain-info/std", "parachains-common/std", "polkadot-core-primitives/std", "polkadot-parachain-primitives/std", "polkadot-runtime-common/std", + "polkadot-runtime-constants/std", "scale-info/std", "serde", "snowbridge-beacon-primitives/std", @@ -247,6 +251,7 @@ runtime-benchmarks = [ "pallet-timestamp/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks", + "pallet-xcm-bridge-hub/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "parachains-common/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", @@ -288,6 +293,7 @@ try-runtime = [ "pallet-timestamp/try-runtime", "pallet-transaction-payment/try-runtime", "pallet-utility/try-runtime", + "pallet-xcm-bridge-hub/try-runtime", "pallet-xcm/try-runtime", "parachain-info/try-runtime", "polkadot-runtime-common/try-runtime", diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs index 7379898b60..90642c0fee 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs @@ -20,7 +20,7 @@ use crate::{ weights, xcm_config::{UniversalLocation, XcmRouter}, AccountId, Balance, Balances, BlockNumber, BridgePolkadotMessages, Runtime, RuntimeEvent, - RuntimeOrigin, + RuntimeOrigin, XcmOverBridgeHubPolkadot, }; use bp_messages::LaneId; use bp_parachains::SingleParaStoredHeaderDataBuilder; @@ -48,7 +48,7 @@ use xcm::{ latest::prelude::*, prelude::{InteriorMultiLocation, NetworkId}, }; -use xcm_builder::{BridgeBlobDispatcher, HaulBlobExporter}; +use xcm_builder::BridgeBlobDispatcher; /// Lane identifier, used to connect Kusama Asset Hub and Polkadot Asset Hub. pub const XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT: LaneId = LaneId([0, 0, 0, 1]); @@ -82,12 +82,30 @@ parameter_types! { /// Identifier of the sibling Kusama Asset Hub parachain. pub AssetHubKusamaParaId: cumulus_primitives_core::ParaId = kusama_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + /// Identifier of the bridged Polkadot Asset Hub parachain. + pub AssetHubPolkadotParaId: cumulus_primitives_core::ParaId = polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + /// A route (XCM location and bridge lane) that the Kusama Asset Hub -> Polkadot Asset Hub /// message is following. pub FromAssetHubKusamaToAssetHubPolkadotRoute: SenderAndLane = SenderAndLane::new( ParentThen(X1(Parachain(AssetHubKusamaParaId::get().into()))).into(), XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, ); + + /// Lane identifier, used to connect Kusama Asset Hub and Polkadot Asset Hub. + pub const AssetHubKusamaToAssetHubPolkadotMessagesLane: bp_messages::LaneId + = XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT; + /// All active lanes that the current bridge supports. + pub ActiveOutboundLanesToBridgeHubPolkadot: &'static [bp_messages::LaneId] + = &[XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT]; + + /// Lanes + pub ActiveLanes: sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorMultiLocation))> = sp_std::vec![ + ( + FromAssetHubKusamaToAssetHubPolkadotRoute::get(), + (PolkadotGlobalConsensusNetwork::get(), X1(Parachain(AssetHubPolkadotParaId::get().into()))) + ) + ]; } // Parameters, used by bridge transport code. @@ -120,13 +138,6 @@ parameter_types! { pub const MaxUnconfirmedMessagesAtInboundLane: bp_messages::MessageNonce = bp_bridge_hub_polkadot::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; - /// Lane identifier, used to connect Kusama Asset Hub and Polkadot Asset Hub. - pub const AssetHubKusamaToAssetHubPolkadotMessagesLane: bp_messages::LaneId - = XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT; - /// All active lanes that the current bridge supports. - pub ActiveOutboundLanesToBridgeHubPolkadot: &'static [bp_messages::LaneId] - = &[XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT]; - /// Reserve identifier, used by the `pallet_bridge_relayers` to hold funds of registered relayer. pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs"; /// Minimal period of relayer registration. Roughly, it is the 1 hour of real time. @@ -231,24 +242,30 @@ type FromPolkadotMessageBlobDispatcher = BridgeBlobDispatcher< >; /// Export XCM messages to be relayed to the other side -pub type ToBridgeHubPolkadotHaulBlobExporter = HaulBlobExporter< - XcmBlobHaulerAdapter, - PolkadotGlobalConsensusNetwork, - (), ->; +pub type ToBridgeHubPolkadotHaulBlobExporter = XcmOverBridgeHubPolkadot; pub struct ToBridgeHubPolkadotXcmBlobHauler; impl XcmBlobHauler for ToBridgeHubPolkadotXcmBlobHauler { type Runtime = Runtime; type MessagesInstance = WithBridgeHubPolkadotMessagesInstance; - type SenderAndLane = FromAssetHubKusamaToAssetHubPolkadotRoute; type ToSourceChainSender = XcmRouter; type CongestedMessage = bp_asset_hub_kusama::CongestedMessage; type UncongestedMessage = bp_asset_hub_kusama::UncongestedMessage; } +/// Add support for the export and dispatch of XCM programs. +pub type XcmOverBridgeHubPolkadotInstance = pallet_xcm_bridge_hub::Instance1; +impl pallet_xcm_bridge_hub::Config for Runtime { + type UniversalLocation = UniversalLocation; + type BridgedNetworkId = PolkadotGlobalConsensusNetwork; + type BridgeMessagesPalletInstance = WithBridgeHubPolkadotMessagesInstance; + type MessageExportPrice = (); + type Lanes = ActiveLanes; + type LanesSupport = ToBridgeHubPolkadotXcmBlobHauler; +} + /// On messages delivered callback. -type OnMessagesDeliveredFromPolkadot = XcmBlobHaulerAdapter; +type OnMessagesDeliveredFromPolkadot = XcmBlobHaulerAdapter; /// Messaging Bridge configuration for BridgeHubKusama -> BridgeHubPolkadot pub struct WithBridgeHubPolkadotMessageBridge; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 6232502f26..d41f76dc19 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -674,17 +674,16 @@ construct_runtime!( // Pallets that may be used by all bridges. BridgeRelayers: pallet_bridge_relayers = 50, - //// todo add message queue pallet + // Polkadot bridge pallets. BridgePolkadotGrandpa: pallet_bridge_grandpa:: = 51, BridgePolkadotParachains: pallet_bridge_parachains:: = 52, BridgePolkadotMessages: pallet_bridge_messages:: = 53, + XcmOverBridgeHubPolkadot: pallet_xcm_bridge_hub:: = 54, EthereumInboundQueue: snowbridge_inbound_queue = 80, EthereumOutboundQueue: snowbridge_outbound_queue = 81, EthereumBeaconClient: snowbridge_ethereum_beacon_client = 82, EthereumSystem: snowbridge_system = 83, - - } ); @@ -1142,7 +1141,13 @@ impl_runtime_apis! { fn export_message_origin_and_destination( ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { - Ok((KsmRelayLocation::get(), NetworkId::Polkadot, X1(Parachain(1000)))) + Ok( + ( + bridge_to_polkadot_config::FromAssetHubKusamaToAssetHubPolkadotRoute::get().location, + NetworkId::Polkadot, + X1(Parachain(bridge_to_polkadot_config::AssetHubPolkadotParaId::get().into())) + ) + ) } fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index 6671830968..bd935645c0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -17,7 +17,7 @@ use bp_polkadot_core::Signature; use bridge_hub_kusama_runtime::{ bridge_to_polkadot_config::{ - BridgeGrandpaPolkadotInstance, BridgeHubPolkadotChainId, BridgeParachainPolkadotInstance, + AssetHubPolkadotParaId, BridgeGrandpaPolkadotInstance, BridgeHubPolkadotChainId, BridgeParachainPolkadotInstance, DeliveryRewardInBalance, PolkadotGlobalConsensusNetwork, RefundBridgeHubPolkadotMessages, RequiredStakeForStakeAndSlash, WithBridgeHubPolkadotMessageBridge, WithBridgeHubPolkadotMessagesInstance, XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, @@ -115,12 +115,6 @@ bridge_hub_test_utils::test_cases::include_teleports_for_native_asset_works!( _ => None, } }), - Box::new(|runtime_event_encoded: Vec| { - match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { - Ok(RuntimeEvent::XcmpQueue(event)) => Some(event), - _ => None, - } - }), 1002 ); @@ -189,7 +183,7 @@ fn handle_export_message_from_system_parachain_add_to_outbound_queue_works() { _ => None, } }), - || ExportMessage { network: Polkadot, destination: X1(Parachain(4321)), xcm: Xcm(vec![]) }, + || ExportMessage { network: Polkadot, destination: X1(Parachain(AssetHubPolkadotParaId::get().into())), xcm: Xcm(vec![]) }, XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, Some((KsmRelayLocation::get(), ExistentialDeposit::get()).into()), // value should be >= than value generated by `can_calculate_weight_for_paid_export_message_with_reserve_transfer` diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 784d41f0f4..09fbe3a36f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -24,6 +24,7 @@ bp-asset-hub-kusama = { path = "../../asset-hubs/asset-hub-kusama/primitives", d bp-asset-hub-polkadot = { path = "../../asset-hubs/asset-hub-polkadot/primitives", default-features = false} bp-bridge-hub-kusama = { path = "../bridge-hub-kusama/primitives", default-features = false} bp-bridge-hub-polkadot = { path = "../bridge-hub-polkadot/primitives", default-features = false} +kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-features = false} polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate @@ -97,6 +98,7 @@ pallet-bridge-grandpa = { default-features = false , version = "0.6.0" } pallet-bridge-messages = { default-features = false , version = "0.6.0" } pallet-bridge-parachains = { default-features = false , version = "0.6.0" } pallet-bridge-relayers = { default-features = false , version = "0.6.0" } +pallet-xcm-bridge-hub = { default-features = false , version = "0.1.0" } # Bridges bp-header-chain = { default-features = false , version = "0.4.0" } @@ -166,6 +168,7 @@ std = [ "frame-system/std", "frame-try-runtime?/std", "log/std", + "kusama-runtime-constants/std", "pallet-aura/std", "pallet-authorship/std", "pallet-balances/std", @@ -182,6 +185,7 @@ std = [ "pallet-transaction-payment/std", "pallet-utility/std", "pallet-xcm-benchmarks?/std", + "pallet-xcm-bridge-hub/std", "pallet-xcm/std", "parachain-info/std", "parachains-common/std", @@ -246,6 +250,7 @@ runtime-benchmarks = [ "pallet-timestamp/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks", + "pallet-xcm-bridge-hub/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", @@ -286,6 +291,7 @@ try-runtime = [ "pallet-timestamp/try-runtime", "pallet-transaction-payment/try-runtime", "pallet-utility/try-runtime", + "pallet-xcm-bridge-hub/try-runtime", "pallet-xcm/try-runtime", "parachain-info/try-runtime", "polkadot-runtime-common/try-runtime", diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs index 4911e3444f..9a592445e4 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs @@ -20,7 +20,7 @@ use crate::{ weights, xcm_config::{UniversalLocation, XcmRouter}, AccountId, Balance, Balances, BlockNumber, BridgeKusamaMessages, Runtime, RuntimeEvent, - RuntimeOrigin, + RuntimeOrigin, XcmOverBridgeHubKusama, }; use bp_messages::LaneId; use bp_parachains::SingleParaStoredHeaderDataBuilder; @@ -48,7 +48,7 @@ use xcm::{ latest::prelude::*, prelude::{InteriorMultiLocation, NetworkId}, }; -use xcm_builder::{BridgeBlobDispatcher, HaulBlobExporter}; +use xcm_builder::BridgeBlobDispatcher; /// Lane identifier, used to connect Polkadot Asset Hub and Kusama Asset Hub. pub const XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA: LaneId = LaneId([0, 0, 0, 1]); @@ -82,12 +82,30 @@ parameter_types! { /// Identifier of the sibling Polkadot Asset Hub parachain. pub AssetHubPolkadotParaId: cumulus_primitives_core::ParaId = polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + /// Identifier of the bridged Kusama Asset Hub parachain. + pub AssetHubKusamaParaId: cumulus_primitives_core::ParaId = kusama_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + /// A route (XCM location and bridge lane) that the Polkadot Asset Hub -> Kusama Asset Hub /// message is following. pub FromAssetHubPolkadotToAssetHubKusamaRoute: SenderAndLane = SenderAndLane::new( ParentThen(X1(Parachain(AssetHubPolkadotParaId::get().into()))).into(), XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, ); + + /// Lane identifier, used to connect Polkadot Asset Hub and Kusama Asset Hub. + pub const AssetHubPolkadotToAssetHubKusamaMessagesLane: bp_messages::LaneId + = XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA; + /// All active lanes that the current bridge supports. + pub ActiveOutboundLanesToBridgeHubKusama: &'static [bp_messages::LaneId] + = &[XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA]; + + /// Lanes + pub ActiveLanes: sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorMultiLocation))> = sp_std::vec![ + ( + FromAssetHubPolkadotToAssetHubKusamaRoute::get(), + (KusamaGlobalConsensusNetwork::get(), X1(Parachain(AssetHubKusamaParaId::get().into()))) + ) + ]; } // Parameters, used by bridge transport code. @@ -120,13 +138,6 @@ parameter_types! { pub const MaxUnconfirmedMessagesAtInboundLane: bp_messages::MessageNonce = bp_bridge_hub_kusama::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; - /// Lane identifier, used to connect Polkadot Asset Hub and Kusama Asset Hub. - pub const AssetHubPolkadotToAssetHubKusamaMessagesLane: bp_messages::LaneId - = XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA; - /// All active lanes that the current bridge supports. - pub ActiveOutboundLanesToBridgeHubKusama: &'static [bp_messages::LaneId] - = &[XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA]; - /// Reserve identifier, used by the `pallet_bridge_relayers` to hold funds of registered relayer. pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs"; /// Minimal period of relayer registration. Roughly, it is the 1 hour of real time. @@ -231,24 +242,30 @@ type FromKusamaMessageBlobDispatcher = BridgeBlobDispatcher< >; /// Export XCM messages to be relayed to the other side -pub type ToBridgeHubKusamaHaulBlobExporter = HaulBlobExporter< - XcmBlobHaulerAdapter, - KusamaGlobalConsensusNetwork, - (), ->; +pub type ToBridgeHubKusamaHaulBlobExporter = XcmOverBridgeHubKusama; pub struct ToBridgeHubKusamaXcmBlobHauler; impl XcmBlobHauler for ToBridgeHubKusamaXcmBlobHauler { type Runtime = Runtime; type MessagesInstance = WithBridgeHubKusamaMessagesInstance; - type SenderAndLane = FromAssetHubPolkadotToAssetHubKusamaRoute; type ToSourceChainSender = XcmRouter; type CongestedMessage = bp_asset_hub_polkadot::CongestedMessage; type UncongestedMessage = bp_asset_hub_polkadot::UncongestedMessage; } +/// Add support for the export and dispatch of XCM programs. +pub type XcmOverBridgeHubKusamaInstance = pallet_xcm_bridge_hub::Instance1; +impl pallet_xcm_bridge_hub::Config for Runtime { + type UniversalLocation = UniversalLocation; + type BridgedNetworkId = KusamaGlobalConsensusNetwork; + type BridgeMessagesPalletInstance = WithBridgeHubKusamaMessagesInstance; + type MessageExportPrice = (); + type Lanes = ActiveLanes; + type LanesSupport = ToBridgeHubKusamaXcmBlobHauler; +} + /// On messages delivered callback. -type OnMessagesDeliveredFromKusama = XcmBlobHaulerAdapter; +type OnMessagesDeliveredFromKusama = XcmBlobHaulerAdapter; /// Messaging Bridge configuration for BridgeHubPolkadot -> BridgeHubKusama pub struct WithBridgeHubKusamaMessageBridge; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index d22235a53b..f2430a515e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -678,6 +678,7 @@ construct_runtime!( BridgeKusamaGrandpa: pallet_bridge_grandpa:: = 51, BridgeKusamaParachains: pallet_bridge_parachains:: = 52, BridgeKusamaMessages: pallet_bridge_messages:: = 53, + XcmOverBridgeHubKusama: pallet_xcm_bridge_hub:: = 54, EthereumInboundQueue: snowbridge_inbound_queue = 80, EthereumOutboundQueue: snowbridge_outbound_queue = 81, @@ -1139,7 +1140,13 @@ impl_runtime_apis! { fn export_message_origin_and_destination( ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { - Ok((DotRelayLocation::get(), NetworkId::Kusama, X1(Parachain(1000)))) + Ok( + ( + bridge_to_kusama_config::FromAssetHubPolkadotToAssetHubKusamaRoute::get().location, + NetworkId::Kusama, + X1(Parachain(bridge_to_kusama_config::AssetHubKusamaParaId::get().into())) + ) + ) } fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index 7a94db6041..1ef6e2585d 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -17,7 +17,7 @@ use bp_polkadot_core::Signature; use bridge_hub_polkadot_runtime::{ bridge_to_kusama_config::{ - BridgeGrandpaKusamaInstance, BridgeHubKusamaChainId, BridgeParachainKusamaInstance, + AssetHubKusamaParaId, BridgeGrandpaKusamaInstance, BridgeHubKusamaChainId, BridgeParachainKusamaInstance, DeliveryRewardInBalance, KusamaGlobalConsensusNetwork, RefundBridgeHubKusamaMessages, RequiredStakeForStakeAndSlash, WithBridgeHubKusamaMessageBridge, WithBridgeHubKusamaMessagesInstance, XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, @@ -114,12 +114,6 @@ bridge_hub_test_utils::test_cases::include_teleports_for_native_asset_works!( _ => None, } }), - Box::new(|runtime_event_encoded: Vec| { - match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { - Ok(RuntimeEvent::XcmpQueue(event)) => Some(event), - _ => None, - } - }), 1002 ); @@ -188,7 +182,7 @@ fn handle_export_message_from_system_parachain_add_to_outbound_queue_works() { _ => None, } }), - || ExportMessage { network: Kusama, destination: X1(Parachain(4321)), xcm: Xcm(vec![]) }, + || ExportMessage { network: Kusama, destination: X1(Parachain(AssetHubKusamaParaId::get().into())), xcm: Xcm(vec![]) }, XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, Some((DotRelayLocation::get(), ExistentialDeposit::get()).into()), // value should be >= than value generated by `can_calculate_weight_for_paid_export_message_with_reserve_transfer` From 89ac735369c72a7745396cdc2c0c26d93101102c Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 12 Jan 2024 14:50:18 +0100 Subject: [PATCH 062/316] [integration-tests] align integration tests with latest vogue + split: `common` to `common` and `chains` chore: remove unneeded deps with `cargo machete` for integration tests --- .gitignore | 1 + Cargo.toml | 2 + .../assets/asset-hub-kusama/Cargo.toml | 15 +- .../assets/asset-hub-kusama/src/lib.rs | 51 +- .../src/tests/hrmp_channels.rs | 196 ------- .../assets/asset-hub-kusama/src/tests/mod.rs | 11 +- .../src/tests/reserve_transfer.rs | 417 +++++++++++--- .../assets/asset-hub-kusama/src/tests/send.rs | 114 +--- .../src/tests/set_xcm_versions.rs | 40 +- .../assets/asset-hub-kusama/src/tests/swap.rs | 162 ++---- .../asset-hub-kusama/src/tests/teleport.rs | 545 +++++++++++++++++- .../assets/asset-hub-polkadot/Cargo.toml | 15 +- .../assets/asset-hub-polkadot/src/lib.rs | 51 +- .../src/tests/hrmp_channels.rs | 190 ------ .../asset-hub-polkadot/src/tests/mod.rs | 11 +- .../src/tests/reserve_transfer.rs | 418 +++++++++++--- .../asset-hub-polkadot/src/tests/send.rs | 117 +--- .../src/tests/set_xcm_versions.rs | 40 +- .../asset-hub-polkadot/src/tests/teleport.rs | 541 ++++++++++++++++- integration-tests/emulated/chains/Cargo.toml | 48 ++ .../constants.rs => chains/src/genesis.rs} | 188 +----- integration-tests/emulated/chains/src/lib.rs | 341 +++++++++++ integration-tests/emulated/common/Cargo.toml | 21 - .../emulated/common/src/impls.rs | 267 +++++++-- integration-tests/emulated/common/src/lib.rs | 415 ++++--------- .../emulated/common/src/macros.rs | 150 ++++- .../emulated/common/src/xcm_helpers.rs | 22 +- 27 files changed, 2780 insertions(+), 1609 deletions(-) delete mode 100644 integration-tests/emulated/assets/asset-hub-kusama/src/tests/hrmp_channels.rs delete mode 100644 integration-tests/emulated/assets/asset-hub-polkadot/src/tests/hrmp_channels.rs create mode 100644 integration-tests/emulated/chains/Cargo.toml rename integration-tests/emulated/{common/src/constants.rs => chains/src/genesis.rs} (77%) create mode 100644 integration-tests/emulated/chains/src/lib.rs diff --git a/.gitignore b/.gitignore index 35e02e706b..4c9006e4e5 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ **/.criterion/ **/*.rs.bk **/chains/ +!integration-tests/emulated/chains **/hfuzz_target/ **/hfuzz_workspace/ **/node_modules diff --git a/Cargo.toml b/Cargo.toml index d27df9f555..01efeb50b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,6 +28,8 @@ members = [ "system-parachains/gluttons/glutton-kusama", "integration-tests/emulated/assets/asset-hub-kusama", "integration-tests/emulated/assets/asset-hub-polkadot", + "integration-tests/emulated/chains", + "integration-tests/emulated/common", ] [profile.release] diff --git a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml index 287a2ed8ed..8e88b5b843 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml @@ -14,27 +14,26 @@ assert_matches = "1.5.0" # Substrate sp-runtime = { version = "30.0.1" } frame-support = { version = "27.0.0" } -frame-system = { version = "27.0.0" } pallet-assets = { version = "28.0.0" } pallet-balances = { version = "27.0.0" } pallet-asset-conversion = { version = "9.0.0" } +pallet-message-queue = { version = "30.0.0" } # Polkadot -polkadot-core-primitives = { version = "6.0.0" } -polkadot-parachain-primitives = { version = "5.0.0" } -polkadot-runtime-parachains = { version = "6.0.0" } xcm = { package = "staging-xcm", version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } pallet-xcm = { version = "6.0.0" } # Cumulus parachains-common = { version = "6.0.0" } xcm-emulator = { version = "0.4.0" } -asset-hub-kusama-runtime = { path = "../../../../system-parachains/asset-hubs/asset-hub-kusama" } +asset-test-utils = { version = "6.0.0" } # Local +emulated-chains = { path = "../../chains" } integration-tests-common = { path = "../../common" } +asset-hub-kusama-runtime = { path = "../../../../system-parachains/asset-hubs/asset-hub-kusama" } +kusama-runtime = { package = "staging-kusama-runtime", path = "../../../../relay/kusama" } [features] -runtime-benchmarks = [ - "integration-tests-common/runtime-benchmarks" -] +runtime-benchmarks = [] \ No newline at end of file diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs index 60c4551459..c0d8309201 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs @@ -13,9 +13,26 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Disable tests when `runtime-benchmarks` is enabled, because of `type MessageProcessor = +// pallet_message_queue::mock_helpers::NoopMessageProcessor`. #![cfg(not(feature = "runtime-benchmarks"))] +pub use asset_test_utils::xcm_helpers; pub use codec::Encode; +pub use emulated_chains::{ + asset_hub_kusama::ED as ASSET_HUB_KUSAMA_ED, kusama::ED as KUSAMA_ED, + AssetHubKusamaPara as AssetHubKusama, AssetHubKusamaParaPallet as AssetHubKusamaPallet, + AssetHubKusamaParaReceiver as AssetHubKusamaReceiver, + AssetHubKusamaParaSender as AssetHubKusamaSender, BridgeHubKusamaPara as BridgeHubKusama, + BridgeHubKusamaParaReceiver as BridgeHubKusamaReceiver, KusamaRelay as Kusama, + KusamaRelayPallet as KusamaPallet, KusamaRelayReceiver as KusamaReceiver, + KusamaRelaySender as KusamaSender, PenpalKusamaAPara as PenpalKusamaA, + PenpalKusamaAParaPallet as PenpalKusamaAPallet, + PenpalKusamaAParaReceiver as PenpalKusamaAReceiver, + PenpalKusamaAParaSender as PenpalKusamaASender, PenpalKusamaBPara as PenpalKusamaB, + PenpalKusamaBParaPallet as PenpalKusamaBPallet, PenpalLocalTeleportableToAssetHub, + PenpalXcmConfig, +}; pub use frame_support::{ assert_err, assert_ok, pallet_prelude::Weight, @@ -23,14 +40,9 @@ pub use frame_support::{ traits::fungibles::Inspect, }; pub use integration_tests_common::{ - constants::{ - asset_hub_kusama::ED as ASSET_HUB_KUSAMA_ED, kusama::ED as KUSAMA_ED, PROOF_SIZE_THRESHOLD, - REF_TIME_THRESHOLD, XCM_V3, - }, - xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, - AssetHubKusama, AssetHubKusamaPallet, AssetHubKusamaReceiver, AssetHubKusamaSender, Kusama, - KusamaPallet, KusamaReceiver, KusamaSender, PenpalKusamaA, PenpalKusamaAPallet, - PenpalKusamaAReceiver, PenpalKusamaASender, PenpalKusamaB, PenpalKusamaBPallet, + test_parachain_is_trusted_teleporter, + xcm_helpers::{non_fee_asset, xcm_transact_paid_execution, xcm_transact_unpaid_execution}, + PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, }; pub use parachains_common::{AccountId, Balance}; pub use xcm::{ @@ -48,18 +60,20 @@ pub const ASSET_MIN_BALANCE: u128 = 1000; pub const ASSETS_PALLET_ID: u8 = 50; pub type RelayToSystemParaTest = Test; +pub type RelayToParaTest = Test; pub type SystemParaToRelayTest = Test; pub type SystemParaToParaTest = Test; +pub type ParaToSystemParaTest = Test; /// Returns a `TestArgs` instance to be used for the Relay Chain across integration tests -pub fn relay_test_args(amount: Balance) -> TestArgs { +pub fn relay_test_args( + dest: MultiLocation, + beneficiary_id: AccountId32, + amount: Balance, +) -> TestArgs { TestArgs { - dest: Kusama::child_location_of(AssetHubKusama::para_id()), - beneficiary: AccountId32Junction { - network: None, - id: AssetHubKusamaReceiver::get().into(), - } - .into(), + dest, + beneficiary: AccountId32Junction { network: None, id: beneficiary_id.into() }.into(), amount, assets: (Here, amount).into(), asset_id: None, @@ -68,13 +82,14 @@ pub fn relay_test_args(amount: Balance) -> TestArgs { } } -/// Returns a `TestArgs` instance to be used for the System Parachain across integration tests -pub fn system_para_test_args( +/// Returns a `TestArgs` instance to be used by parachains across integration tests +pub fn para_test_args( dest: MultiLocation, beneficiary_id: AccountId32, amount: Balance, assets: MultiAssets, asset_id: Option, + fee_asset_item: u32, ) -> TestArgs { TestArgs { dest, @@ -82,7 +97,7 @@ pub fn system_para_test_args( amount, assets, asset_id, - fee_asset_item: 0, + fee_asset_item, weight_limit: WeightLimit::Unlimited, } } diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/hrmp_channels.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/hrmp_channels.rs deleted file mode 100644 index f930e3182c..0000000000 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/hrmp_channels.rs +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -use crate::*; - -const MAX_CAPACITY: u32 = 8; -const MAX_MESSAGE_SIZE: u32 = 8192; - -/// Opening HRMP channels between Parachains should work -#[test] -fn open_hrmp_channel_between_paras_works() { - // Parchain A init values - let para_a_id = PenpalKusamaA::para_id(); - let para_a_root_origin = ::RuntimeOrigin::root(); - - // Parachain B init values - let para_b_id = PenpalKusamaB::para_id(); - let para_b_root_origin = ::RuntimeOrigin::root(); - - let fee_amount = KUSAMA_ED * 1000; - let fund_amount = KUSAMA_ED * 1000_000_000; - - // Fund Parachain's Sovereign accounts to be able to reserve the deposit - let para_a_sovereign_account = Kusama::fund_para_sovereign(fund_amount, para_a_id); - let para_b_sovereign_account = Kusama::fund_para_sovereign(fund_amount, para_b_id); - - let relay_destination: VersionedMultiLocation = PenpalKusamaA::parent_location().into(); - - // ---- Init Open channel from Parachain to System Parachain - let mut call = Kusama::init_open_channel_call(para_b_id, MAX_CAPACITY, MAX_MESSAGE_SIZE); - let origin_kind = OriginKind::Native; - let native_asset: MultiAsset = (Here, fee_amount).into(); - let beneficiary = Kusama::sovereign_account_id_of_child_para(para_a_id); - - let mut xcm = xcm_transact_paid_execution(call, origin_kind, native_asset.clone(), beneficiary); - - PenpalKusamaA::execute_with(|| { - assert_ok!(::PolkadotXcm::send( - para_a_root_origin, - bx!(relay_destination.clone()), - bx!(xcm), - )); - - PenpalKusamaA::assert_xcm_pallet_sent(); - }); - - Kusama::execute_with(|| { - type RuntimeEvent = ::RuntimeEvent; - - Kusama::assert_ump_queue_processed( - true, - Some(para_a_id), - Some(Weight::from_parts(1_300_000_000, 200000)), - ); - - assert_expected_events!( - Kusama, - vec![ - // Parachain's Sovereign account balance is withdrawn to pay XCM fees - RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { - who: *who == para_a_sovereign_account.clone(), - amount: *amount == fee_amount, - }, - // Sender deposit is reserved for Parachain's Sovereign account - RuntimeEvent::Balances(pallet_balances::Event::Reserved { who, .. }) =>{ - who: *who == para_a_sovereign_account, - }, - // Open channel requested from Para A to Para B - RuntimeEvent::Hrmp( - polkadot_runtime_parachains::hrmp::Event::OpenChannelRequested { - sender, - recipient, - proposed_max_capacity: max_capacity, - proposed_max_message_size: max_message_size - } - ) => { - sender: *sender == para_a_id.into(), - recipient: *recipient == para_b_id.into(), - max_capacity: *max_capacity == MAX_CAPACITY, - max_message_size: *max_message_size == MAX_MESSAGE_SIZE, - }, - ] - ); - }); - - // ---- Accept Open channel from Parachain to System Parachain - call = Kusama::accept_open_channel_call(para_a_id); - let beneficiary = Kusama::sovereign_account_id_of_child_para(para_b_id); - - xcm = xcm_transact_paid_execution(call, origin_kind, native_asset, beneficiary); - - PenpalKusamaB::execute_with(|| { - assert_ok!(::PolkadotXcm::send( - para_b_root_origin, - bx!(relay_destination), - bx!(xcm), - )); - - PenpalKusamaB::assert_xcm_pallet_sent(); - }); - - PenpalKusamaB::execute_with(|| {}); - - Kusama::execute_with(|| { - type RuntimeEvent = ::RuntimeEvent; - - Kusama::assert_ump_queue_processed( - true, - Some(para_b_id), - Some(Weight::from_parts(1_300_000_000, 200_000)), - ); - - assert_expected_events!( - Kusama, - vec![ - // Parachain's Sovereign account balance is withdrawn to pay XCM fees - RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { - who: *who == para_b_sovereign_account.clone(), - amount: *amount == fee_amount, - }, - // Sender deposit is reserved for Parachain's Sovereign account - RuntimeEvent::Balances(pallet_balances::Event::Reserved { who, .. }) =>{ - who: *who == para_b_sovereign_account, - }, - // Open channel accepted for Para A to Para B - RuntimeEvent::Hrmp( - polkadot_runtime_parachains::hrmp::Event::OpenChannelAccepted { - sender, recipient - } - ) => { - sender: *sender == para_a_id.into(), - recipient: *recipient == para_b_id.into(), - }, - ] - ); - }); - - Kusama::force_process_hrmp_open(para_a_id, para_b_id); -} - -/// Opening HRMP channels between System Parachains and Parachains should work -#[test] -fn force_open_hrmp_channel_for_system_para_works() { - // Relay Chain init values - let relay_root_origin = ::RuntimeOrigin::root(); - - // System Para init values - let system_para_id = AssetHubKusama::para_id(); - - // Parachain A init values - let para_a_id = PenpalKusamaA::para_id(); - - Kusama::execute_with(|| { - assert_ok!(::Hrmp::force_open_hrmp_channel( - relay_root_origin, - system_para_id, - para_a_id, - MAX_CAPACITY, - MAX_MESSAGE_SIZE - )); - - type RuntimeEvent = ::RuntimeEvent; - - assert_expected_events!( - Kusama, - vec![ - // HRMP channel forced opened - RuntimeEvent::Hrmp( - polkadot_runtime_parachains::hrmp::Event::HrmpChannelForceOpened { - sender, - recipient, - proposed_max_capacity: max_capacity, - proposed_max_message_size: max_message_size - } - ) => { - sender: *sender == system_para_id.into(), - recipient: *recipient == para_a_id.into(), - max_capacity: *max_capacity == MAX_CAPACITY, - max_message_size: *max_message_size == MAX_MESSAGE_SIZE, - }, - ] - ); - }); -} diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs index ac0b92004e..fa908d196c 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs @@ -13,11 +13,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![cfg(not(feature = "runtime-benchmarks"))] - -mod hrmp_channels; mod reserve_transfer; mod send; mod set_xcm_versions; mod swap; mod teleport; + +use crate::*; +integration_tests_common::include_penpal_create_foreign_asset_on_asset_hub!( + PenpalKusamaA, + AssetHubKusama, + KUSAMA_ED, + parachains_common::kusama::fee::WeightToFee +); diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs index cc2e7a66b3..8dabfba5b5 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs @@ -14,47 +14,39 @@ // limitations under the License. use crate::*; +use asset_hub_kusama_runtime::xcm_config::XcmConfig as AssetHubKusamaXcmConfig; +use kusama_runtime::xcm_config::XcmConfig as KusamaXcmConfig; -fn relay_origin_assertions(t: RelayToSystemParaTest) { +fn relay_to_para_sender_assertions(t: RelayToParaTest) { type RuntimeEvent = ::RuntimeEvent; - - Kusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(630_000_000, 6_000))); - + Kusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(864_610_000, 8_799))); assert_expected_events!( Kusama, vec![ - // Amount to reserve transfer is transferred to System Parachain's Sovereign account - RuntimeEvent::Balances(pallet_balances::Event::Transfer { from, to, amount }) => { + // Amount to reserve transfer is transferred to Parachain's Sovereign account + RuntimeEvent::Balances( + pallet_balances::Event::Transfer { from, to, amount } + ) => { from: *from == t.sender.account_id, to: *to == Kusama::sovereign_account_id_of( t.args.dest ), - amount: *amount == t.args.amount, + amount: *amount == t.args.amount, }, ] ); } -fn system_para_dest_assertions_incomplete(_t: RelayToSystemParaTest) { - AssetHubKusama::assert_dmp_queue_incomplete(None, Some(Error::UntrustedReserveLocation)); -} - -fn system_para_to_relay_assertions(_t: SystemParaToRelayTest) { - AssetHubKusama::assert_xcm_pallet_attempted_error(Some(XcmError::Barrier)) -} - -fn system_para_to_para_assertions(t: SystemParaToParaTest) { +fn system_para_to_para_sender_assertions(t: SystemParaToParaTest) { type RuntimeEvent = ::RuntimeEvent; - AssetHubKusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 630_000_000, - 6_000, + 864_610_000, + 8_799, ))); - assert_expected_events!( AssetHubKusama, vec![ - // Amount to reserve transfer is transferred to Parachain's Sovereing account + // Amount to reserve transfer is transferred to Parachain's Sovereign account RuntimeEvent::Balances( pallet_balances::Event::Transfer { from, to, amount } ) => { @@ -68,18 +60,72 @@ fn system_para_to_para_assertions(t: SystemParaToParaTest) { ); } -fn system_para_to_para_assets_assertions(t: SystemParaToParaTest) { +fn para_receiver_assertions(_: Test) { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + PenpalKusamaA, + vec![ + RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + +fn para_to_system_para_sender_assertions(t: ParaToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + PenpalKusamaA::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( + 864_610_000, + 8_799, + ))); + assert_expected_events!( + PenpalKusamaA, + vec![ + // Amount to reserve transfer is transferred to Parachain's Sovereign account + RuntimeEvent::Balances( + pallet_balances::Event::Withdraw { who, amount } + ) => { + who: *who == t.sender.account_id, + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn para_to_system_para_receiver_assertions(t: ParaToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; + let sov_penpal_on_ahr = AssetHubKusama::sovereign_account_id_of( + AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()), + ); + assert_expected_events!( + AssetHubKusama, + vec![ + // Amount to reserve transfer is withdrawn from Parachain's Sovereign account + RuntimeEvent::Balances( + pallet_balances::Event::Withdraw { who, amount } + ) => { + who: *who == sov_penpal_on_ahr.clone().into(), + amount: *amount == t.args.amount, + }, + RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} +fn system_para_to_para_assets_sender_assertions(t: SystemParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; AssetHubKusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 680_000_000, - 6000, + 864_610_000, + 8799, ))); - assert_expected_events!( AssetHubKusama, vec![ - // Amount to reserve transfer is transferred to Parachain's Sovereing account + // Amount to reserve transfer is transferred to Parachain's Sovereign account RuntimeEvent::Assets( pallet_assets::Event::Transferred { asset_id, from, to, amount } ) => { @@ -94,7 +140,21 @@ fn system_para_to_para_assets_assertions(t: SystemParaToParaTest) { ); } -fn relay_limited_reserve_transfer_assets(t: RelayToSystemParaTest) -> DispatchResult { +fn system_para_to_para_assets_receiver_assertions(_: Test) { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + PenpalKusamaA, + vec![ + RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::Assets(pallet_assets::Event::Issued { .. }) => {}, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + +fn relay_to_para_reserve_transfer_assets(t: RelayToParaTest) -> DispatchResult { ::XcmPallet::limited_reserve_transfer_assets( t.signed_origin, bx!(t.args.dest.into()), @@ -105,7 +165,7 @@ fn relay_limited_reserve_transfer_assets(t: RelayToSystemParaTest) -> DispatchRe ) } -fn system_para_limited_reserve_transfer_assets(t: SystemParaToRelayTest) -> DispatchResult { +fn system_para_to_para_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { ::PolkadotXcm::limited_reserve_transfer_assets( t.signed_origin, bx!(t.args.dest.into()), @@ -116,8 +176,8 @@ fn system_para_limited_reserve_transfer_assets(t: SystemParaToRelayTest) -> Disp ) } -fn system_para_to_para_limited_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { - ::PolkadotXcm::limited_reserve_transfer_assets( +fn para_to_system_para_reserve_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { + ::PolkadotXcm::limited_reserve_transfer_assets( t.signed_origin, bx!(t.args.dest.into()), bx!(t.args.beneficiary.into()), @@ -127,129 +187,312 @@ fn system_para_to_para_limited_reserve_transfer_assets(t: SystemParaToParaTest) ) } -/// Limited Reserve Transfers of native asset from Relay Chain to the System Parachain shouldn't -/// work +/// Reserve Transfers of native asset from Relay Chain to the System Parachain shouldn't work #[test] -fn limited_reserve_transfer_native_asset_from_relay_to_system_para_fails() { - // Init values for Relay Chain +fn reserve_transfer_native_asset_from_relay_to_system_para_fails() { + let signed_origin = ::RuntimeOrigin::signed(KusamaSender::get().into()); + let destination = Kusama::child_location_of(AssetHubKusama::para_id()); + let beneficiary: MultiLocation = + AccountId32Junction { network: None, id: AssetHubKusamaReceiver::get().into() }.into(); let amount_to_send: Balance = KUSAMA_ED * 1000; + let assets: MultiAssets = (Here, amount_to_send).into(); + let fee_asset_item = 0; + + // this should fail + Kusama::execute_with(|| { + let result = ::XcmPallet::limited_reserve_transfer_assets( + signed_origin, + bx!(destination.into()), + bx!(beneficiary.into()), + bx!(assets.into()), + fee_asset_item, + WeightLimit::Unlimited, + ); + assert_err!( + result, + DispatchError::Module(sp_runtime::ModuleError { + index: 99, + error: [2, 0, 0, 0], + message: Some("Filtered") + }) + ); + }); +} + +/// Reserve Transfers of native asset from System Parachain to Relay Chain shouldn't work +#[test] +fn reserve_transfer_native_asset_from_system_para_to_relay_fails() { + // Init values for System Parachain + let signed_origin = + ::RuntimeOrigin::signed(AssetHubKusamaSender::get().into()); + let destination = AssetHubKusama::parent_location(); + let beneficiary_id = KusamaReceiver::get(); + let beneficiary: MultiLocation = + AccountId32Junction { network: None, id: beneficiary_id.into() }.into(); + let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; + + let assets: MultiAssets = (Parent, amount_to_send).into(); + let fee_asset_item = 0; + + // this should fail + AssetHubKusama::execute_with(|| { + let result = + ::PolkadotXcm::limited_reserve_transfer_assets( + signed_origin, + bx!(destination.into()), + bx!(beneficiary.into()), + bx!(assets.into()), + fee_asset_item, + WeightLimit::Unlimited, + ); + assert_err!( + result, + DispatchError::Module(sp_runtime::ModuleError { + index: 31, + error: [2, 0, 0, 0], + message: Some("Filtered") + }) + ); + }); +} + +/// Reserve Transfers of native asset from Relay to Parachain should work +#[test] +fn reserve_transfer_native_asset_from_relay_to_para() { + // Init values for Relay + let destination = Kusama::child_location_of(PenpalKusamaA::para_id()); + let beneficiary_id = PenpalKusamaAReceiver::get(); + let amount_to_send: Balance = KUSAMA_ED * 1000; + let test_args = TestContext { sender: KusamaSender::get(), - receiver: AssetHubKusamaReceiver::get(), - args: relay_test_args(amount_to_send), + receiver: PenpalKusamaAReceiver::get(), + args: relay_test_args(destination, beneficiary_id, amount_to_send), }; - let mut test = RelayToSystemParaTest::new(test_args); + let mut test = RelayToParaTest::new(test_args); let sender_balance_before = test.sender.balance; let receiver_balance_before = test.receiver.balance; - test.set_assertion::(relay_origin_assertions); - test.set_assertion::(system_para_dest_assertions_incomplete); - test.set_dispatchable::(relay_limited_reserve_transfer_assets); + test.set_assertion::(relay_to_para_sender_assertions); + test.set_assertion::(para_receiver_assertions); + test.set_dispatchable::(relay_to_para_reserve_transfer_assets); test.assert(); + let delivery_fees = Kusama::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; - assert!(sender_balance_before - amount_to_send >= sender_balance_after); - assert_eq!(receiver_balance_before, receiver_balance_after); + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_balance_after < receiver_balance_before + amount_to_send); } -/// Limited Reserve Transfers of native asset from System Parachain to Relay Chain shoudln't work +/// Reserve Transfers of native asset from System Parachain to Parachain should work #[test] -fn limited_reserve_transfer_native_asset_from_system_para_to_relay_fails() { +fn reserve_transfer_native_asset_from_system_para_to_para() { // Init values for System Parachain - let destination = AssetHubKusama::parent_location(); - let beneficiary_id = KusamaReceiver::get(); + let destination = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); + let beneficiary_id = PenpalKusamaAReceiver::get(); let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; let assets = (Parent, amount_to_send).into(); let test_args = TestContext { sender: AssetHubKusamaSender::get(), - receiver: KusamaReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + receiver: PenpalKusamaAReceiver::get(), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), }; - let mut test = SystemParaToRelayTest::new(test_args); + let mut test = SystemParaToParaTest::new(test_args); let sender_balance_before = test.sender.balance; let receiver_balance_before = test.receiver.balance; - test.set_assertion::(system_para_to_relay_assertions); - test.set_dispatchable::(system_para_limited_reserve_transfer_assets); + test.set_assertion::(system_para_to_para_sender_assertions); + test.set_assertion::(para_receiver_assertions); + test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); test.assert(); let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; - assert_eq!(sender_balance_before, sender_balance_after); - assert_eq!(receiver_balance_before, receiver_balance_after); + let delivery_fees = AssetHubKusama::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_balance_after < receiver_balance_before + amount_to_send); } -/// Limited Reserve Transfers of native asset from System Parachain to Parachain should work +/// Reserve Transfers of native asset from Parachain to System Parachain should work #[test] -fn limited_reserve_transfer_native_asset_from_system_para_to_para() { - // Init values for System Parachain - let destination = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); - let beneficiary_id = PenpalKusamaAReceiver::get(); +fn reserve_transfer_native_asset_from_para_to_system_para() { + // Init values for Penpal Parachain + let destination = PenpalKusamaA::sibling_location_of(AssetHubKusama::para_id()); + let beneficiary_id = AssetHubKusamaReceiver::get(); let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; let assets = (Parent, amount_to_send).into(); let test_args = TestContext { - sender: AssetHubKusamaSender::get(), - receiver: PenpalKusamaAReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + sender: PenpalKusamaASender::get(), + receiver: AssetHubKusamaReceiver::get(), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), }; - let mut test = SystemParaToParaTest::new(test_args); + let mut test = ParaToSystemParaTest::new(test_args); let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + let penpal_location_as_seen_by_ahr = + AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); + let sov_penpal_on_ahr = AssetHubKusama::sovereign_account_id_of(penpal_location_as_seen_by_ahr); + + // fund the Penpal's SA on AHR with the native tokens held in reserve + AssetHubKusama::fund_accounts(vec![(sov_penpal_on_ahr.into(), amount_to_send * 2)]); - test.set_assertion::(system_para_to_para_assertions); - // TODO: Add assertion for Penpal runtime. Right now message is failing with - // `UntrustedReserveLocation` - test.set_dispatchable::(system_para_to_para_limited_reserve_transfer_assets); + test.set_assertion::(para_to_system_para_sender_assertions); + test.set_assertion::(para_to_system_para_receiver_assertions); + test.set_dispatchable::(para_to_system_para_reserve_transfer_assets); test.assert(); let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; - assert!(sender_balance_before - amount_to_send >= sender_balance_after); - // TODO: Check receiver balance when Penpal runtime is improved to propery handle reserve - // transfers + let delivery_fees = PenpalKusamaA::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_balance_after < receiver_balance_before + amount_to_send); } -/// Limited Reserve Transfers of a local asset from System Parachain to Parachain should work +/// Reserve Transfers of a local asset and native asset from System Parachain to Parachain should +/// work #[test] -fn limited_reserve_transfer_asset_from_system_para_to_para() { - // Force create asset from Relay Chain and mint assets for System Parachain's sender account +fn reserve_transfer_assets_from_system_para_to_para() { + // Force create asset on AssetHubKusama and PenpalKusamaA from Relay Chain AssetHubKusama::force_create_and_mint_asset( ASSET_ID, ASSET_MIN_BALANCE, - true, + false, AssetHubKusamaSender::get(), - ASSET_MIN_BALANCE * 1000000, + Some(Weight::from_parts(1_019_445_000, 200_000)), + ASSET_MIN_BALANCE * 1_000_000, + ); + PenpalKusamaA::force_create_and_mint_asset( + ASSET_ID, + ASSET_MIN_BALANCE, + false, + PenpalKusamaASender::get(), + None, + 0, ); // Init values for System Parachain let destination = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); let beneficiary_id = PenpalKusamaAReceiver::get(); - let amount_to_send = ASSET_MIN_BALANCE * 1000; - let assets = - (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), amount_to_send) - .into(); - - let system_para_test_args = TestContext { + let fee_amount_to_send = ASSET_HUB_KUSAMA_ED * 1000; + let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; + let assets: MultiAssets = vec![ + (Parent, fee_amount_to_send).into(), + (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), asset_amount_to_send) + .into(), + ] + .into(); + let fee_asset_index = assets + .inner() + .iter() + .position(|r| r == &(Parent, fee_amount_to_send).into()) + .unwrap() as u32; + + let para_test_args = TestContext { sender: AssetHubKusamaSender::get(), receiver: PenpalKusamaAReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + args: para_test_args( + destination, + beneficiary_id, + asset_amount_to_send, + assets, + None, + fee_asset_index, + ), }; - let mut system_para_test = SystemParaToParaTest::new(system_para_test_args); + let mut test = SystemParaToParaTest::new(para_test_args); + + // Create SA-of-Penpal-on-AHR with ED. + let penpal_location = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); + let sov_penpal_on_ahr = AssetHubKusama::sovereign_account_id_of(penpal_location); + AssetHubKusama::fund_accounts(vec![(sov_penpal_on_ahr.into(), KUSAMA_ED)]); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + let sender_assets_before = AssetHubKusama::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &AssetHubKusamaSender::get()) + }); + let receiver_assets_before = PenpalKusamaA::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &PenpalKusamaAReceiver::get()) + }); + + test.set_assertion::(system_para_to_para_assets_sender_assertions); + test.set_assertion::(system_para_to_para_assets_receiver_assertions); + test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; - system_para_test.set_assertion::(system_para_to_para_assets_assertions); - // TODO: Add assertions when Penpal is able to manage assets - system_para_test - .set_dispatchable::(system_para_to_para_limited_reserve_transfer_assets); - system_para_test.assert(); + // Sender's balance is reduced + assert!(sender_balance_after < sender_balance_before); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_balance_after < receiver_balance_before + fee_amount_to_send); + + let sender_assets_after = AssetHubKusama::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &AssetHubKusamaSender::get()) + }); + let receiver_assets_after = PenpalKusamaA::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &PenpalKusamaAReceiver::get()) + }); + + // Sender's balance is reduced by exact amount + assert_eq!(sender_assets_before - asset_amount_to_send, sender_assets_after); + // Receiver's balance is increased by exact amount + assert_eq!(receiver_assets_after, receiver_assets_before + asset_amount_to_send); } diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/send.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/send.rs index face60a3a5..1b9a79f8c2 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/send.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/send.rs @@ -16,110 +16,16 @@ use crate::*; /// Relay Chain should be able to execute `Transact` instructions in System Parachain -/// when `OriginKind::Superuser` and signer is `sudo` +/// when `OriginKind::Superuser`. #[test] -fn send_transact_sudo_from_relay_to_system_para_works() { - // Init tests variables - let root_origin = ::RuntimeOrigin::root(); - let system_para_destination = Kusama::child_location_of(AssetHubKusama::para_id()).into(); - let asset_owner: AccountId = AssetHubKusamaSender::get().into(); - let xcm = AssetHubKusama::force_create_asset_xcm( - OriginKind::Superuser, +fn send_transact_as_superuser_from_relay_to_system_para_works() { + AssetHubKusama::force_create_asset_from_relay_as_root( ASSET_ID, - asset_owner.clone(), - true, - 1000, - ); - // Send XCM message from Relay Chain - Kusama::execute_with(|| { - assert_ok!(::XcmPallet::send( - root_origin, - bx!(system_para_destination), - bx!(xcm), - )); - - Kusama::assert_xcm_pallet_sent(); - }); - - // Receive XCM message in Assets Parachain - AssetHubKusama::execute_with(|| { - type RuntimeEvent = ::RuntimeEvent; - - AssetHubKusama::assert_dmp_queue_complete(Some(Weight::from_parts(1_020_000_000, 200_000))); - - assert_expected_events!( - AssetHubKusama, - vec![ - RuntimeEvent::Assets(pallet_assets::Event::ForceCreated { asset_id, owner }) => { - asset_id: *asset_id == ASSET_ID, - owner: *owner == asset_owner, - }, - ] - ); - - assert!(::Assets::asset_exists(ASSET_ID)); - }); -} - -/// Relay Chain shouldn't be able to execute `Transact` instructions in System Parachain -/// when `OriginKind::Native` -#[test] -fn send_transact_native_from_relay_to_system_para_fails() { - // Init tests variables - let signed_origin = ::RuntimeOrigin::signed(KusamaSender::get().into()); - let system_para_destination = Kusama::child_location_of(AssetHubKusama::para_id()).into(); - let asset_owner = AssetHubKusamaSender::get().into(); - let xcm = AssetHubKusama::force_create_asset_xcm( - OriginKind::Native, - ASSET_ID, - asset_owner, + ASSET_MIN_BALANCE, true, - 1000, - ); - - // Send XCM message from Relay Chain - Kusama::execute_with(|| { - assert_err!( - ::XcmPallet::send( - signed_origin, - bx!(system_para_destination), - bx!(xcm) - ), - DispatchError::BadOrigin - ); - }); -} - -/// System Parachain shouldn't be able to execute `Transact` instructions in Relay Chain -/// when `OriginKind::Native` -#[test] -fn send_transact_native_from_system_para_to_relay_fails() { - // Init tests variables - let signed_origin = - ::RuntimeOrigin::signed(AssetHubKusamaSender::get().into()); - let relay_destination = AssetHubKusama::parent_location().into(); - let call = ::RuntimeCall::System(frame_system::Call::< - ::Runtime, - >::remark_with_event { - remark: vec![0, 1, 2, 3], - }) - .encode() - .into(); - let origin_kind = OriginKind::Native; - - let xcm = xcm_transact_unpaid_execution(call, origin_kind); - - // Send XCM message from Relay Chain - AssetHubKusama::execute_with(|| { - assert_err!( - ::PolkadotXcm::send( - signed_origin, - bx!(relay_destination), - bx!(xcm) - ), - DispatchError::BadOrigin - ); - }); + AssetHubKusamaSender::get().into(), + Some(Weight::from_parts(1_019_445_000, 200_000)), + ) } /// Parachain should be able to send XCM paying its fee with sufficient asset @@ -136,6 +42,7 @@ fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() { ASSET_MIN_BALANCE, true, para_sovereign_account.clone(), + Some(Weight::from_parts(1_019_445_000, 200_000)), ASSET_MIN_BALANCE * 1000000000, ); @@ -176,7 +83,10 @@ fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() { AssetHubKusama::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; - AssetHubKusama::assert_xcmp_queue_success(None); + AssetHubKusama::assert_xcmp_queue_success(Some(Weight::from_parts( + 15_594_564_000, + 562_893, + ))); assert_expected_events!( AssetHubKusama, diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs index 4b2716e90f..9b914622ba 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs @@ -47,38 +47,28 @@ fn relay_sets_system_para_xcm_supported_version() { #[test] fn system_para_sets_relay_xcm_supported_version() { // Init test variables - let sudo_origin = ::RuntimeOrigin::root(); let parent_location = AssetHubKusama::parent_location(); - let system_para_destination: VersionedMultiLocation = - Kusama::child_location_of(AssetHubKusama::para_id()).into(); - let call = ::RuntimeCall::PolkadotXcm(pallet_xcm::Call::< - ::Runtime, - >::force_xcm_version { - location: bx!(parent_location), - version: XCM_V3, - }) - .encode() - .into(); - let origin_kind = OriginKind::Superuser; - - let xcm = xcm_transact_unpaid_execution(call, origin_kind); - - // System Parachain sets supported version for Relay Chain throught it - Kusama::execute_with(|| { - assert_ok!(::XcmPallet::send( - sudo_origin, - bx!(system_para_destination), - bx!(xcm), - )); + let force_xcm_version_call = + ::RuntimeCall::PolkadotXcm(pallet_xcm::Call::< + ::Runtime, + >::force_xcm_version { + location: bx!(parent_location), + version: XCM_V3, + }) + .encode() + .into(); - Kusama::assert_xcm_pallet_sent(); - }); + // System Parachain sets supported version for Relay Chain through it + Kusama::send_unpaid_transact_to_parachain_as_root( + AssetHubKusama::para_id(), + force_xcm_version_call, + ); // System Parachain receive the XCM message AssetHubKusama::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; - AssetHubKusama::assert_dmp_queue_complete(Some(Weight::from_parts(1_020_000_000, 200_000))); + AssetHubKusama::assert_dmp_queue_complete(Some(Weight::from_parts(1_019_210_000, 200_000))); assert_expected_events!( AssetHubKusama, diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs index 3a67b54358..e94352e5ee 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs @@ -14,9 +14,9 @@ // limitations under the License. use crate::*; -use frame_support::{instances::Instance2, BoundedVec}; +use frame_support::BoundedVec; use parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; -use sp_runtime::{DispatchError, ModuleError}; +use sp_runtime::ModuleError; #[test] fn swap_locally_on_chain_using_local_assets() { @@ -44,12 +44,6 @@ fn swap_locally_on_chain_using_local_assets() { 100_000_000_000_000, )); - assert_ok!(::Balances::force_set_balance( - ::RuntimeOrigin::root(), - AssetHubKusamaSender::get().into(), - 100_000_000_000_000, - )); - assert_ok!(::AssetConversion::create_pool( ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), asset_native.clone(), @@ -118,114 +112,37 @@ fn swap_locally_on_chain_using_local_assets() { #[test] fn swap_locally_on_chain_using_foreign_assets() { - use frame_support::weights::WeightToFee; - let asset_native = Box::new(asset_hub_kusama_runtime::xcm_config::KsmLocation::get()); + let ah_as_seen_by_penpal = PenpalKusamaA::sibling_location_of(AssetHubKusama::para_id()); + let asset_location_on_penpal = PenpalLocalTeleportableToAssetHub::get(); + let asset_id_on_penpal = match asset_location_on_penpal.last() { + Some(GeneralIndex(id)) => *id as u32, + _ => unreachable!(), + }; + let asset_owner_on_penpal = PenpalKusamaASender::get(); + let foreign_asset_at_asset_hub_kusama = + MultiLocation { parents: 1, interior: X1(Parachain(PenpalKusamaA::para_id().into())) } + .appended_with(asset_location_on_penpal) + .unwrap(); + + // 1. Create asset on penpal and, 2. Create foreign asset on asset_hub_kusama + super::penpal_create_foreign_asset_on_asset_hub( + asset_id_on_penpal, + foreign_asset_at_asset_hub_kusama, + ah_as_seen_by_penpal, + true, + asset_owner_on_penpal, + ASSET_MIN_BALANCE * 1_000_000, + ); - let foreign_asset1_at_asset_hub_kusama = Box::new(MultiLocation { - parents: 1, - interior: X3( - Parachain(PenpalKusamaA::para_id().into()), - PalletInstance(ASSETS_PALLET_ID), - GeneralIndex(ASSET_ID.into()), - ), - }); - - let assets_para_destination: VersionedMultiLocation = - MultiLocation { parents: 1, interior: X1(Parachain(AssetHubKusama::para_id().into())) } - .into(); - - let penpal_location = - MultiLocation { parents: 1, interior: X1(Parachain(PenpalKusamaA::para_id().into())) }; - - // 1. Create asset on penpal: - PenpalKusamaA::execute_with(|| { - assert_ok!(::Assets::create( - ::RuntimeOrigin::signed(PenpalKusamaASender::get()), - ASSET_ID.into(), - PenpalKusamaASender::get().into(), - 1000, - )); - - assert!(::Assets::asset_exists(ASSET_ID)); - }); - - // 2. Create foreign asset on asset_hub_kusama: - - let require_weight_at_most = Weight::from_parts(1_100_000_000_000, 30_000); - let origin_kind = OriginKind::Xcm; - let sov_penpal_on_asset_hub_kusama = AssetHubKusama::sovereign_account_id_of(penpal_location); - + let penpal_as_seen_by_ah = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); + let sov_penpal_on_ahr = AssetHubKusama::sovereign_account_id_of(penpal_as_seen_by_ah); AssetHubKusama::fund_accounts(vec![ (AssetHubKusamaSender::get().into(), 5_000_000 * KUSAMA_ED), /* An account to swap dot * for something else. */ - (sov_penpal_on_asset_hub_kusama.clone().into(), 1000_000_000_000_000_000 * KUSAMA_ED), ]); - let sov_penpal_on_asset_hub_kusama_as_location: MultiLocation = MultiLocation { - parents: 0, - interior: X1(AccountId32Junction { - network: None, - id: sov_penpal_on_asset_hub_kusama.clone().into(), - }), - }; - - let call_foreign_assets_create = - ::RuntimeCall::ForeignAssets(pallet_assets::Call::< - ::Runtime, - Instance2, - >::create { - id: *foreign_asset1_at_asset_hub_kusama, - min_balance: 1000, - admin: sov_penpal_on_asset_hub_kusama.clone().into(), - }) - .encode() - .into(); - - let buy_execution_fee_amount = parachains_common::kusama::fee::WeightToFee::weight_to_fee( - &Weight::from_parts(10_100_000_000_000, 300_000), - ); - let buy_execution_fee = MultiAsset { - id: Concrete(MultiLocation { parents: 1, interior: Here }), - fun: Fungible(buy_execution_fee_amount), - }; - - let xcm = VersionedXcm::from(Xcm(vec![ - WithdrawAsset { 0: vec![buy_execution_fee.clone()].into() }, - BuyExecution { fees: buy_execution_fee.clone(), weight_limit: Unlimited }, - Transact { require_weight_at_most, origin_kind, call: call_foreign_assets_create }, - RefundSurplus, - DepositAsset { - assets: All.into(), - beneficiary: sov_penpal_on_asset_hub_kusama_as_location, - }, - ])); - - // Send XCM message from penpal => asset_hub_kusama - let sudo_penpal_origin = ::RuntimeOrigin::root(); - PenpalKusamaA::execute_with(|| { - assert_ok!(::PolkadotXcm::send( - sudo_penpal_origin.clone(), - bx!(assets_para_destination.clone()), - bx!(xcm), - )); - - type RuntimeEvent = ::RuntimeEvent; - - assert_expected_events!( - PenpalKusamaA, - vec![ - RuntimeEvent::PolkadotXcm(pallet_xcm::Event::Sent { .. }) => {}, - ] - ); - }); - - // Receive XCM message in Assets Parachain AssetHubKusama::execute_with(|| { - assert!(::ForeignAssets::asset_exists( - *foreign_asset1_at_asset_hub_kusama - )); - // 3: Mint foreign asset on asset_hub_kusama: // // (While it might be nice to use batch, @@ -234,11 +151,9 @@ fn swap_locally_on_chain_using_foreign_assets() { type RuntimeEvent = ::RuntimeEvent; // 3. Mint foreign asset (in reality this should be a teleport or some such) assert_ok!(::ForeignAssets::mint( - ::RuntimeOrigin::signed( - sov_penpal_on_asset_hub_kusama.clone().into() - ), - *foreign_asset1_at_asset_hub_kusama, - sov_penpal_on_asset_hub_kusama.clone().into(), + ::RuntimeOrigin::signed(sov_penpal_on_ahr.clone().into()), + foreign_asset_at_asset_hub_kusama, + sov_penpal_on_ahr.clone().into(), 3_000_000_000_000, )); @@ -249,11 +164,12 @@ fn swap_locally_on_chain_using_foreign_assets() { ] ); + let foreign_asset_at_asset_hub_kusama = Box::new(foreign_asset_at_asset_hub_kusama); // 4. Create pool: assert_ok!(::AssetConversion::create_pool( ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), asset_native.clone(), - foreign_asset1_at_asset_hub_kusama.clone(), + foreign_asset_at_asset_hub_kusama.clone(), )); assert_expected_events!( @@ -265,16 +181,14 @@ fn swap_locally_on_chain_using_foreign_assets() { // 5. Add liquidity: assert_ok!(::AssetConversion::add_liquidity( - ::RuntimeOrigin::signed( - sov_penpal_on_asset_hub_kusama.clone() - ), + ::RuntimeOrigin::signed(sov_penpal_on_ahr.clone()), asset_native.clone(), - foreign_asset1_at_asset_hub_kusama.clone(), + foreign_asset_at_asset_hub_kusama.clone(), 1_000_000_000_000, 2_000_000_000_000, 0, 0, - sov_penpal_on_asset_hub_kusama.clone().into() + sov_penpal_on_ahr.clone().into() )); assert_expected_events!( @@ -289,7 +203,7 @@ fn swap_locally_on_chain_using_foreign_assets() { // 6. Swap! let path = BoundedVec::<_, _>::truncate_from(vec![ asset_native.clone(), - foreign_asset1_at_asset_hub_kusama.clone(), + foreign_asset_at_asset_hub_kusama.clone(), ]); assert_ok!( @@ -315,15 +229,13 @@ fn swap_locally_on_chain_using_foreign_assets() { // 7. Remove liquidity assert_ok!(::AssetConversion::remove_liquidity( - ::RuntimeOrigin::signed( - sov_penpal_on_asset_hub_kusama.clone() - ), + ::RuntimeOrigin::signed(sov_penpal_on_ahr.clone()), asset_native, - foreign_asset1_at_asset_hub_kusama, + foreign_asset_at_asset_hub_kusama, 1414213562273 - 2_000_000_000, // all but the 2 EDs can't be retrieved. 0, 0, - sov_penpal_on_asset_hub_kusama.clone().into(), + sov_penpal_on_ahr.clone().into(), )); }); } diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs index b0d2712046..fdd6ed9081 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs @@ -13,14 +13,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![allow(dead_code)] // - use crate::*; +use asset_hub_kusama_runtime::xcm_config::XcmConfig as AssetHubKusamaXcmConfig; +use kusama_runtime::xcm_config::XcmConfig as KusamaXcmConfig; fn relay_origin_assertions(t: RelayToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; - Kusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(630_000_000, 7_000))); + Kusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(631_531_000, 7_186))); assert_expected_events!( Kusama, @@ -45,13 +45,13 @@ fn relay_dest_assertions(t: SystemParaToRelayTest) { Kusama::assert_ump_queue_processed( true, Some(AssetHubKusama::para_id()), - Some(Weight::from_parts(310_000_000, 7_000)), + Some(Weight::from_parts(307_225_000, 7_186)), ); assert_expected_events!( Kusama, vec![ - // Amount is witdrawn from Relay Chain's `CheckAccount` + // Amount is withdrawn from Relay Chain's `CheckAccount` RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { who: *who == ::XcmPallet::check_account(), amount: *amount == t.args.amount, @@ -68,7 +68,7 @@ fn relay_dest_assertions_fail(_t: SystemParaToRelayTest) { Kusama::assert_ump_queue_processed( false, Some(AssetHubKusama::para_id()), - Some(Weight::from_parts(150_000_000, 3_500)), + Some(Weight::from_parts(157_718_000, 3_593)), ); } @@ -76,8 +76,8 @@ fn para_origin_assertions(t: SystemParaToRelayTest) { type RuntimeEvent = ::RuntimeEvent; AssetHubKusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 535_000_000, - 7_000, + 720_053_000, + 7_203, ))); AssetHubKusama::assert_parachain_system_ump_sent(); @@ -97,7 +97,7 @@ fn para_origin_assertions(t: SystemParaToRelayTest) { fn para_dest_assertions(t: RelayToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; - AssetHubKusama::assert_dmp_queue_complete(None); + AssetHubKusama::assert_dmp_queue_complete(Some(Weight::from_parts(157_718_000, 3593))); assert_expected_events!( AssetHubKusama, @@ -110,6 +110,123 @@ fn para_dest_assertions(t: RelayToSystemParaTest) { ); } +fn penpal_to_ah_foreign_assets_sender_assertions(t: ParaToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + PenpalKusamaA::assert_xcm_pallet_attempted_complete(None); + let expected_asset_id = t.args.asset_id.unwrap(); + let (_, expected_asset_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + assert_expected_events!( + PenpalKusamaA, + vec![ + RuntimeEvent::Balances( + pallet_balances::Event::Withdraw { who, amount } + ) => { + who: *who == t.sender.account_id, + amount: *amount == t.args.amount, + }, + RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { + asset_id: *asset_id == expected_asset_id, + owner: *owner == t.sender.account_id, + balance: *balance == expected_asset_amount, + }, + ] + ); +} + +fn penpal_to_ah_foreign_assets_receiver_assertions(t: ParaToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + let sov_penpal_on_ahr = AssetHubKusama::sovereign_account_id_of( + AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()), + ); + let (expected_foreign_asset_id, expected_foreign_asset_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + assert_expected_events!( + AssetHubKusama, + vec![ + // native asset reserve transfer for paying fees, withdrawn from Penpal's sov account + RuntimeEvent::Balances( + pallet_balances::Event::Withdraw { who, amount } + ) => { + who: *who == sov_penpal_on_ahr.clone().into(), + amount: *amount == t.args.amount, + }, + RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { + who: *who == t.receiver.account_id, + }, + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, amount }) => { + asset_id: *asset_id == expected_foreign_asset_id, + owner: *owner == t.receiver.account_id, + amount: *amount == expected_foreign_asset_amount, + }, + RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + +fn ah_to_penpal_foreign_assets_sender_assertions(t: SystemParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + AssetHubKusama::assert_xcm_pallet_attempted_complete(None); + let (expected_foreign_asset_id, expected_foreign_asset_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + assert_expected_events!( + AssetHubKusama, + vec![ + // native asset used for fees is transferred to Parachain's Sovereign account as reserve + RuntimeEvent::Balances( + pallet_balances::Event::Transfer { from, to, amount } + ) => { + from: *from == t.sender.account_id, + to: *to == AssetHubKusama::sovereign_account_id_of( + t.args.dest + ), + amount: *amount == t.args.amount, + }, + // foreign asset is burned locally as part of teleportation + RuntimeEvent::ForeignAssets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { + asset_id: *asset_id == expected_foreign_asset_id, + owner: *owner == t.sender.account_id, + balance: *balance == expected_foreign_asset_amount, + }, + ] + ); +} + +fn ah_to_penpal_foreign_assets_receiver_assertions(t: SystemParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + let expected_asset_id = t.args.asset_id.unwrap(); + let (_, expected_asset_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + let checking_account = ::PolkadotXcm::check_account(); + assert_expected_events!( + PenpalKusamaA, + vec![ + // checking account burns local asset as part of incoming teleport + RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { + asset_id: *asset_id == expected_asset_id, + owner: *owner == checking_account, + balance: *balance == expected_asset_amount, + }, + // local asset is teleported into account of receiver + RuntimeEvent::Assets(pallet_assets::Event::Issued { asset_id, owner, amount }) => { + asset_id: *asset_id == expected_asset_id, + owner: *owner == t.receiver.account_id, + amount: *amount == expected_asset_amount, + }, + // native asset for fee is deposited to receiver + RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { + who: *who == t.receiver.account_id, + }, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + fn relay_limited_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { ::XcmPallet::limited_teleport_assets( t.signed_origin, @@ -121,6 +238,16 @@ fn relay_limited_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { ) } +fn relay_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { + ::XcmPallet::teleport_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + ) +} + fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult { ::PolkadotXcm::limited_teleport_assets( t.signed_origin, @@ -132,15 +259,49 @@ fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResu ) } +fn system_para_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult { + ::PolkadotXcm::teleport_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + ) +} + +fn para_to_system_para_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { + ::PolkadotXcm::transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +fn system_para_to_para_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { + ::PolkadotXcm::transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + /// Limited Teleport of native asset from Relay Chain to the System Parachain should work #[test] fn limited_teleport_native_assets_from_relay_to_system_para_works() { // Init values for Relay Chain let amount_to_send: Balance = KUSAMA_ED * 1000; + let dest = Kusama::child_location_of(AssetHubKusama::para_id()); + let beneficiary_id = AssetHubKusamaReceiver::get(); let test_args = TestContext { sender: KusamaSender::get(), receiver: AssetHubKusamaReceiver::get(), - args: relay_test_args(amount_to_send), + args: relay_test_args(dest, beneficiary_id, amount_to_send), }; let mut test = RelayToSystemParaTest::new(test_args); @@ -153,11 +314,17 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() { test.set_dispatchable::(relay_limited_teleport_assets); test.assert(); + let delivery_fees = Kusama::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; // Sender's balance is reduced - assert!(sender_balance_before - amount_to_send >= sender_balance_after); + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); // Receiver's balance is increased assert!(receiver_balance_after > receiver_balance_before); } @@ -178,7 +345,7 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() { let test_args = TestContext { sender: AssetHubKusamaSender::get(), receiver: KusamaReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = SystemParaToRelayTest::new(test_args); @@ -194,14 +361,20 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() { let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; + let delivery_fees = AssetHubKusama::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + // Sender's balance is reduced - assert!(sender_balance_before - amount_to_send >= sender_balance_after); + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); // Receiver's balance is increased assert!(receiver_balance_after > receiver_balance_before); } /// Limited Teleport of native asset from System Parachain to Relay Chain -/// shouldn't work when there is not enough balance in Relay Chain's `CheckAccount` +/// should't work when there is not enough balance in Relay Chain's `CheckAccount` #[test] fn limited_teleport_native_assets_from_system_para_to_relay_fails() { // Init values for Relay Chain @@ -213,7 +386,7 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() { let test_args = TestContext { sender: AssetHubKusamaSender::get(), receiver: KusamaReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = SystemParaToRelayTest::new(test_args); @@ -229,8 +402,346 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() { let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; - // Sender's balance is reduced by amount to send (+ delivery fees) - assert!(sender_balance_before - amount_to_send >= sender_balance_after); + let delivery_fees = AssetHubKusama::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); // Receiver's balance does not change assert_eq!(receiver_balance_after, receiver_balance_before); } + +/// Teleport of native asset from Relay Chain to the System Parachain should work +#[test] +fn teleport_native_assets_from_relay_to_system_para_works() { + // Init values for Relay Chain + let amount_to_send: Balance = KUSAMA_ED * 1000; + let dest = Kusama::child_location_of(AssetHubKusama::para_id()); + let beneficiary_id = AssetHubKusamaReceiver::get(); + let test_args = TestContext { + sender: KusamaSender::get(), + receiver: AssetHubKusamaReceiver::get(), + args: relay_test_args(dest, beneficiary_id, amount_to_send), + }; + + let mut test = RelayToSystemParaTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(relay_origin_assertions); + test.set_assertion::(para_dest_assertions); + test.set_dispatchable::(relay_teleport_assets); + test.assert(); + + let delivery_fees = Kusama::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); +} + +/// Teleport of native asset from System Parachains to the Relay Chain +/// should work when there is enough balance in Relay Chain's `CheckAccount` +#[test] +fn teleport_native_assets_back_from_system_para_to_relay_works() { + // Dependency - Relay Chain's `CheckAccount` should have enough balance + teleport_native_assets_from_relay_to_system_para_works(); + + // Init values for Relay Chain + let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; + let destination = AssetHubKusama::parent_location(); + let beneficiary_id = KusamaReceiver::get(); + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubKusamaSender::get(), + receiver: KusamaReceiver::get(), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + }; + + let mut test = SystemParaToRelayTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(para_origin_assertions); + test.set_assertion::(relay_dest_assertions); + test.set_dispatchable::(system_para_teleport_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + let delivery_fees = AssetHubKusama::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); +} + +/// Teleport of native asset from System Parachain to Relay Chain +/// shouldn't work when there is not enough balance in Relay Chain's `CheckAccount` +#[test] +fn teleport_native_assets_from_system_para_to_relay_fails() { + // Init values for Relay Chain + let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; + let destination = AssetHubKusama::parent_location(); + let beneficiary_id = KusamaReceiver::get(); + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubKusamaSender::get(), + receiver: KusamaReceiver::get(), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + }; + + let mut test = SystemParaToRelayTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(para_origin_assertions); + test.set_assertion::(relay_dest_assertions_fail); + test.set_dispatchable::(system_para_teleport_assets); + test.assert(); + + let delivery_fees = AssetHubKusama::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance does not change + assert_eq!(receiver_balance_after, receiver_balance_before); +} + +#[test] +fn teleport_to_other_system_parachains_works() { + let amount = ASSET_HUB_KUSAMA_ED * 100; + let native_asset: MultiAssets = (Parent, amount).into(); + + test_parachain_is_trusted_teleporter!( + AssetHubKusama, // Origin + AssetHubKusamaXcmConfig, // XCM Configuration + vec![BridgeHubKusama], // Destinations + (native_asset, amount) + ); +} + +/// Bidirectional teleports of local Penpal assets to Asset Hub as foreign assets should work +/// (using native reserve-based transfer for fees) +#[test] +fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { + let ah_as_seen_by_penpal = PenpalKusamaA::sibling_location_of(AssetHubKusama::para_id()); + let asset_location_on_penpal = PenpalLocalTeleportableToAssetHub::get(); + let asset_id_on_penpal = match asset_location_on_penpal.last() { + Some(GeneralIndex(id)) => *id as u32, + _ => unreachable!(), + }; + let asset_owner_on_penpal = PenpalKusamaASender::get(); + let foreign_asset_at_asset_hub_kusama = + MultiLocation { parents: 1, interior: X1(Parachain(PenpalKusamaA::para_id().into())) } + .appended_with(asset_location_on_penpal) + .unwrap(); + super::penpal_create_foreign_asset_on_asset_hub( + asset_id_on_penpal, + foreign_asset_at_asset_hub_kusama, + ah_as_seen_by_penpal, + false, + asset_owner_on_penpal, + ASSET_MIN_BALANCE * 1_000_000, + ); + let penpal_to_ah_beneficiary_id = AssetHubKusamaReceiver::get(); + + let fee_amount_to_send = ASSET_HUB_KUSAMA_ED * 10_000; + let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; + + let penpal_assets: MultiAssets = vec![ + (Parent, fee_amount_to_send).into(), + (asset_location_on_penpal, asset_amount_to_send).into(), + ] + .into(); + let fee_asset_index = penpal_assets + .inner() + .iter() + .position(|r| r == &(Parent, fee_amount_to_send).into()) + .unwrap() as u32; + + // Penpal to AH test args + let penpal_to_ah_test_args = TestContext { + sender: PenpalKusamaASender::get(), + receiver: AssetHubKusamaReceiver::get(), + args: para_test_args( + ah_as_seen_by_penpal, + penpal_to_ah_beneficiary_id, + asset_amount_to_send, + penpal_assets, + Some(asset_id_on_penpal), + fee_asset_index, + ), + }; + let mut penpal_to_ah = ParaToSystemParaTest::new(penpal_to_ah_test_args); + + let penpal_sender_balance_before = penpal_to_ah.sender.balance; + let ah_receiver_balance_before = penpal_to_ah.receiver.balance; + + let penpal_sender_assets_before = PenpalKusamaA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalKusamaASender::get()) + }); + let ah_receiver_assets_before = AssetHubKusama::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance( + foreign_asset_at_asset_hub_kusama, + &AssetHubKusamaReceiver::get(), + ) + }); + + penpal_to_ah.set_assertion::(penpal_to_ah_foreign_assets_sender_assertions); + penpal_to_ah.set_assertion::(penpal_to_ah_foreign_assets_receiver_assertions); + penpal_to_ah.set_dispatchable::(para_to_system_para_transfer_assets); + penpal_to_ah.assert(); + + let penpal_sender_balance_after = penpal_to_ah.sender.balance; + let ah_receiver_balance_after = penpal_to_ah.receiver.balance; + + let penpal_sender_assets_after = PenpalKusamaA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalKusamaASender::get()) + }); + let ah_receiver_assets_after = AssetHubKusama::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance( + foreign_asset_at_asset_hub_kusama, + &AssetHubKusamaReceiver::get(), + ) + }); + + // Sender's balance is reduced + assert!(penpal_sender_balance_after < penpal_sender_balance_before); + // Receiver's balance is increased + assert!(ah_receiver_balance_after > ah_receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(ah_receiver_balance_after < ah_receiver_balance_before + fee_amount_to_send); + + // Sender's balance is reduced by exact amount + assert_eq!(penpal_sender_assets_before - asset_amount_to_send, penpal_sender_assets_after); + // Receiver's balance is increased by exact amount + assert_eq!(ah_receiver_assets_after, ah_receiver_assets_before + asset_amount_to_send); + + /////////////////////////////////////////////////////////////////////// + // Now test transferring foreign assets back from AssetHub to Penpal // + /////////////////////////////////////////////////////////////////////// + + // Move funds on AH from AHReceiver to AHSender + AssetHubKusama::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + assert_ok!(ForeignAssets::transfer( + ::RuntimeOrigin::signed(AssetHubKusamaReceiver::get()), + foreign_asset_at_asset_hub_kusama, + AssetHubKusamaSender::get().into(), + asset_amount_to_send, + )); + }); + + let ah_to_penpal_beneficiary_id = PenpalKusamaAReceiver::get(); + let penpal_as_seen_by_ah = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); + let ah_assets: MultiAssets = vec![ + (Parent, fee_amount_to_send).into(), + (foreign_asset_at_asset_hub_kusama, asset_amount_to_send).into(), + ] + .into(); + let fee_asset_index = ah_assets + .inner() + .iter() + .position(|r| r == &(Parent, fee_amount_to_send).into()) + .unwrap() as u32; + + // AH to Penpal test args + let ah_to_penpal_test_args = TestContext { + sender: AssetHubKusamaSender::get(), + receiver: PenpalKusamaAReceiver::get(), + args: para_test_args( + penpal_as_seen_by_ah, + ah_to_penpal_beneficiary_id, + asset_amount_to_send, + ah_assets, + Some(asset_id_on_penpal), + fee_asset_index, + ), + }; + let mut ah_to_penpal = SystemParaToParaTest::new(ah_to_penpal_test_args); + + let ah_sender_balance_before = ah_to_penpal.sender.balance; + let penpal_receiver_balance_before = ah_to_penpal.receiver.balance; + + let ah_sender_assets_before = AssetHubKusama::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + foreign_asset_at_asset_hub_kusama, + &AssetHubKusamaSender::get(), + ) + }); + let penpal_receiver_assets_before = PenpalKusamaA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalKusamaAReceiver::get()) + }); + + ah_to_penpal.set_assertion::(ah_to_penpal_foreign_assets_sender_assertions); + ah_to_penpal.set_assertion::(ah_to_penpal_foreign_assets_receiver_assertions); + ah_to_penpal.set_dispatchable::(system_para_to_para_transfer_assets); + ah_to_penpal.assert(); + + let ah_sender_balance_after = ah_to_penpal.sender.balance; + let penpal_receiver_balance_after = ah_to_penpal.receiver.balance; + + let ah_sender_assets_after = AssetHubKusama::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + foreign_asset_at_asset_hub_kusama, + &AssetHubKusamaSender::get(), + ) + }); + let penpal_receiver_assets_after = PenpalKusamaA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalKusamaAReceiver::get()) + }); + + // Sender's balance is reduced + assert!(ah_sender_balance_after < ah_sender_balance_before); + // Receiver's balance is increased + assert!(penpal_receiver_balance_after > penpal_receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(penpal_receiver_balance_after < penpal_receiver_balance_before + fee_amount_to_send); + + // Sender's balance is reduced by exact amount + assert_eq!(ah_sender_assets_before - asset_amount_to_send, ah_sender_assets_after); + // Receiver's balance is increased by exact amount + assert_eq!(penpal_receiver_assets_after, penpal_receiver_assets_before + asset_amount_to_send); +} diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml index 16b14f0e7d..54656c75d0 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml @@ -13,26 +13,25 @@ codec = { package = "parity-scale-codec", version = "3.6.9" } # Substrate sp-runtime = { version = "30.0.1" } frame-support = { version = "27.0.0" } -frame-system = { version = "27.0.0" } pallet-assets = { version = "28.0.0" } pallet-balances = { version = "27.0.0" } -pallet-asset-conversion = { version = "9.0.0" } +pallet-message-queue = { version = "30.0.0" } # Polkadot -polkadot-core-primitives = { version = "6.0.0" } -polkadot-parachain-primitives = { version = "5.0.0" } -polkadot-runtime-parachains = { version = "6.0.0" } xcm = { package = "staging-xcm", version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } pallet-xcm = { version = "6.0.0" } # Cumulus parachains-common = { version = "6.0.0" } xcm-emulator = { version = "0.4.0" } +asset-test-utils = { version = "6.0.0" } # Local +emulated-chains = { path = "../../chains" } integration-tests-common = { path = "../../common" } +asset-hub-polkadot-runtime = { path = "../../../../system-parachains/asset-hubs/asset-hub-polkadot" } +polkadot-runtime = { path = "../../../../relay/polkadot" } [features] -runtime-benchmarks = [ - "integration-tests-common/runtime-benchmarks" -] +runtime-benchmarks = [] \ No newline at end of file diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs index 8daf8c81e7..f006fc54b3 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs @@ -13,9 +13,26 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Disable tests when `runtime-benchmarks` is enabled, because of `type MessageProcessor = +// pallet_message_queue::mock_helpers::NoopMessageProcessor`. #![cfg(not(feature = "runtime-benchmarks"))] +pub use asset_test_utils::xcm_helpers; pub use codec::Encode; +pub use emulated_chains::{ + asset_hub_polkadot::ED as ASSET_HUB_POLKADOT_ED, polkadot::ED as POLKADOT_ED, + AssetHubPolkadotPara as AssetHubPolkadot, AssetHubPolkadotParaPallet as AssetHubPolkadotPallet, + AssetHubPolkadotParaReceiver as AssetHubPolkadotReceiver, + AssetHubPolkadotParaSender as AssetHubPolkadotSender, + BridgeHubPolkadotPara as BridgeHubPolkadot, + BridgeHubPolkadotParaReceiver as BridgeHubPolkadotReceiver, PenpalLocalTeleportableToAssetHub, + PenpalPolkadotAPara as PenpalPolkadotA, PenpalPolkadotAParaPallet as PenpalPolkadotAPallet, + PenpalPolkadotAParaReceiver as PenpalPolkadotAReceiver, + PenpalPolkadotAParaSender as PenpalPolkadotASender, PenpalPolkadotBPara as PenpalPolkadotB, + PenpalPolkadotBParaPallet as PenpalPolkadotBPallet, PenpalXcmConfig, PolkadotRelay as Polkadot, + PolkadotRelayPallet as PolkadotPallet, PolkadotRelayReceiver as PolkadotReceiver, + PolkadotRelaySender as PolkadotSender, +}; pub use frame_support::{ assert_err, assert_ok, pallet_prelude::Weight, @@ -23,14 +40,9 @@ pub use frame_support::{ traits::fungibles::Inspect, }; pub use integration_tests_common::{ - constants::{ - asset_hub_polkadot::ED as ASSET_HUB_POLKADOT_ED, polkadot::ED as POLKADOT_ED, - PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, - }, - xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, - AssetHubPolkadot, AssetHubPolkadotPallet, AssetHubPolkadotReceiver, AssetHubPolkadotSender, - PenpalPolkadotA, PenpalPolkadotAPallet, PenpalPolkadotAReceiver, PenpalPolkadotB, - PenpalPolkadotBPallet, Polkadot, PolkadotPallet, PolkadotReceiver, PolkadotSender, + test_parachain_is_trusted_teleporter, + xcm_helpers::{non_fee_asset, xcm_transact_paid_execution, xcm_transact_unpaid_execution}, + PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, }; pub use parachains_common::{AccountId, Balance}; pub use xcm::{ @@ -48,18 +60,20 @@ pub const ASSET_MIN_BALANCE: u128 = 1000; pub const ASSETS_PALLET_ID: u8 = 50; pub type RelayToSystemParaTest = Test; +pub type RelayToParaTest = Test; pub type SystemParaToRelayTest = Test; pub type SystemParaToParaTest = Test; +pub type ParaToSystemParaTest = Test; /// Returns a `TestArgs` instance to be used for the Relay Chain across integration tests -pub fn relay_test_args(amount: Balance) -> TestArgs { +pub fn relay_test_args( + dest: MultiLocation, + beneficiary_id: AccountId32, + amount: Balance, +) -> TestArgs { TestArgs { - dest: Polkadot::child_location_of(AssetHubPolkadot::para_id()), - beneficiary: AccountId32Junction { - network: None, - id: AssetHubPolkadotReceiver::get().into(), - } - .into(), + dest, + beneficiary: AccountId32Junction { network: None, id: beneficiary_id.into() }.into(), amount, assets: (Here, amount).into(), asset_id: None, @@ -68,13 +82,14 @@ pub fn relay_test_args(amount: Balance) -> TestArgs { } } -/// Returns a `TestArgs` instance to be used for the System Parachain across integration tests -pub fn system_para_test_args( +/// Returns a `TestArgs` instance to be used by parachains across integration tests +pub fn para_test_args( dest: MultiLocation, beneficiary_id: AccountId32, amount: Balance, assets: MultiAssets, asset_id: Option, + fee_asset_item: u32, ) -> TestArgs { TestArgs { dest, @@ -82,7 +97,7 @@ pub fn system_para_test_args( amount, assets, asset_id, - fee_asset_item: 0, + fee_asset_item, weight_limit: WeightLimit::Unlimited, } } diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/hrmp_channels.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/hrmp_channels.rs deleted file mode 100644 index 731e601aea..0000000000 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/hrmp_channels.rs +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -use crate::*; - -const MAX_CAPACITY: u32 = 8; -const MAX_MESSAGE_SIZE: u32 = 8192; - -/// Opening HRMP channels between Parachains should work -#[test] -fn open_hrmp_channel_between_paras_works() { - // Parchain A init values - let para_a_id = PenpalPolkadotA::para_id(); - let para_a_root_origin = ::RuntimeOrigin::root(); - - // Parachain B init values - let para_b_id = PenpalPolkadotB::para_id(); - let para_b_root_origin = ::RuntimeOrigin::root(); - - let fee_amount = POLKADOT_ED * 1000; - let fund_amount = POLKADOT_ED * 1000_000_000; - - // Fund Parachain's Sovereign accounts to be able to reserve the deposit - let para_a_sovereign_account = Polkadot::fund_para_sovereign(fund_amount, para_a_id); - let para_b_sovereign_account = Polkadot::fund_para_sovereign(fund_amount, para_b_id); - - let relay_destination: VersionedMultiLocation = PenpalPolkadotA::parent_location().into(); - - // ---- Init Open channel from Parachain to System Parachain - let mut call = Polkadot::init_open_channel_call(para_b_id, MAX_CAPACITY, MAX_MESSAGE_SIZE); - let origin_kind = OriginKind::Native; - let native_asset: MultiAsset = (Here, fee_amount).into(); - let beneficiary = Polkadot::sovereign_account_id_of_child_para(para_a_id); - - let mut xcm = xcm_transact_paid_execution(call, origin_kind, native_asset.clone(), beneficiary); - - PenpalPolkadotA::execute_with(|| { - assert_ok!(::PolkadotXcm::send( - para_a_root_origin, - bx!(relay_destination.clone()), - bx!(xcm), - )); - - PenpalPolkadotA::assert_xcm_pallet_sent(); - }); - - Polkadot::execute_with(|| { - type RuntimeEvent = ::RuntimeEvent; - - Polkadot::assert_ump_queue_processed( - true, - Some(para_a_id), - Some(Weight::from_parts(1_300_000_000, 207_000)), - ); - - assert_expected_events!( - Polkadot, - vec![ - // Parachain's Sovereign account balance is withdrawn to pay XCM fees - RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { - who: *who == para_a_sovereign_account.clone(), - amount: *amount == fee_amount, - }, - // Sender deposit is reserved for Parachain's Sovereign account - RuntimeEvent::Balances(pallet_balances::Event::Reserved { who, .. }) =>{ - who: *who == para_a_sovereign_account, - }, - // Open channel requested from Para A to Para B - RuntimeEvent::Hrmp( - polkadot_runtime_parachains::hrmp::Event::OpenChannelRequested { - sender, recipient, proposed_max_capacity: max_capacity, proposed_max_message_size: max_message_size - } - ) => { - sender: *sender == para_a_id.into(), - recipient: *recipient == para_b_id.into(), - max_capacity: *max_capacity == MAX_CAPACITY, - max_message_size: *max_message_size == MAX_MESSAGE_SIZE, - }, - ] - ); - }); - - // ---- Accept Open channel from Parachain to System Parachain - call = Polkadot::accept_open_channel_call(para_a_id); - let beneficiary = Polkadot::sovereign_account_id_of_child_para(para_b_id); - - xcm = xcm_transact_paid_execution(call, origin_kind, native_asset, beneficiary); - - PenpalPolkadotB::execute_with(|| { - assert_ok!(::PolkadotXcm::send( - para_b_root_origin, - bx!(relay_destination), - bx!(xcm), - )); - - PenpalPolkadotB::assert_xcm_pallet_sent(); - }); - - PenpalPolkadotB::execute_with(|| {}); - - Polkadot::execute_with(|| { - type RuntimeEvent = ::RuntimeEvent; - - Polkadot::assert_ump_queue_processed( - true, - Some(para_b_id), - Some(Weight::from_parts(1_300_000_000, 207_000)), - ); - - assert_expected_events!( - Polkadot, - vec![ - // Parachain's Sovereign account balance is withdrawn to pay XCM fees - RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { - who: *who == para_b_sovereign_account.clone(), - amount: *amount == fee_amount, - }, - // Sender deposit is reserved for Parachain's Sovereign account - RuntimeEvent::Balances(pallet_balances::Event::Reserved { who, .. }) =>{ - who: *who == para_b_sovereign_account, - }, - // Open channel accepted for Para A to Para B - RuntimeEvent::Hrmp( - polkadot_runtime_parachains::hrmp::Event::OpenChannelAccepted { - sender, recipient - } - ) => { - sender: *sender == para_a_id.into(), - recipient: *recipient == para_b_id.into(), - }, - ] - ); - }); - - Polkadot::force_process_hrmp_open(para_a_id, para_b_id); -} - -/// Opening HRMP channels between System Parachains and Parachains should work -#[test] -fn force_open_hrmp_channel_for_system_para_works() { - // Relay Chain init values - let relay_root_origin = ::RuntimeOrigin::root(); - - // System Para init values - let system_para_id = AssetHubPolkadot::para_id(); - - // Parachain A init values - let para_a_id = PenpalPolkadotA::para_id(); - - Polkadot::execute_with(|| { - assert_ok!(::Hrmp::force_open_hrmp_channel( - relay_root_origin, - system_para_id, - para_a_id, - MAX_CAPACITY, - MAX_MESSAGE_SIZE - )); - - type RuntimeEvent = ::RuntimeEvent; - - assert_expected_events!( - Polkadot, - vec![ - // HRMP channel forced opened - RuntimeEvent::Hrmp( - polkadot_runtime_parachains::hrmp::Event::HrmpChannelForceOpened { - sender, recipient, proposed_max_capacity: max_capacity, proposed_max_message_size: max_message_size - } - ) => { - sender: *sender == system_para_id.into(), - recipient: *recipient == para_a_id.into(), - max_capacity: *max_capacity == MAX_CAPACITY, - max_message_size: *max_message_size == MAX_MESSAGE_SIZE, - }, - ] - ); - }); -} diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs index 27c92c543b..5f8e0a9b63 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs @@ -13,10 +13,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![cfg(not(feature = "runtime-benchmarks"))] - -mod hrmp_channels; mod reserve_transfer; mod send; mod set_xcm_versions; mod teleport; + +use crate::*; +integration_tests_common::include_penpal_create_foreign_asset_on_asset_hub!( + PenpalPolkadotA, + AssetHubPolkadot, + POLKADOT_ED, + parachains_common::polkadot::fee::WeightToFee +); diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs index 96c4358abd..89f79f9c96 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs @@ -14,47 +14,39 @@ // limitations under the License. use crate::*; +use asset_hub_polkadot_runtime::xcm_config::XcmConfig as AssetHubPolkadotXcmConfig; +use polkadot_runtime::xcm_config::XcmConfig as PolkadotXcmConfig; -fn relay_origin_assertions(t: RelayToSystemParaTest) { +fn relay_to_para_sender_assertions(t: RelayToParaTest) { type RuntimeEvent = ::RuntimeEvent; - - Polkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(630_000_000, 6_000))); - + Polkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(864_610_000, 8_799))); assert_expected_events!( Polkadot, vec![ - // Amount to reserve transfer is transferred to System Parachain's Sovereign account - RuntimeEvent::Balances(pallet_balances::Event::Transfer { from, to, amount }) => { + // Amount to reserve transfer is transferred to Parachain's Sovereign account + RuntimeEvent::Balances( + pallet_balances::Event::Transfer { from, to, amount } + ) => { from: *from == t.sender.account_id, to: *to == Polkadot::sovereign_account_id_of( t.args.dest ), - amount: *amount == t.args.amount, + amount: *amount == t.args.amount, }, ] ); } -fn system_para_dest_assertions_incomplete(_t: RelayToSystemParaTest) { - AssetHubPolkadot::assert_dmp_queue_incomplete(None, Some(Error::UntrustedReserveLocation)); -} - -fn system_para_to_relay_assertions(_t: SystemParaToRelayTest) { - AssetHubPolkadot::assert_xcm_pallet_attempted_error(Some(XcmError::Barrier)) -} - -fn system_para_to_para_assertions(t: SystemParaToParaTest) { +fn system_para_to_para_sender_assertions(t: SystemParaToParaTest) { type RuntimeEvent = ::RuntimeEvent; - AssetHubPolkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 680_000_000, - 6000, + 864_610_000, + 8_799, ))); - assert_expected_events!( AssetHubPolkadot, vec![ - // Amount to reserve transfer is transferred to Parachain's Sovereing account + // Amount to reserve transfer is transferred to Parachain's Sovereign account RuntimeEvent::Balances( pallet_balances::Event::Transfer { from, to, amount } ) => { @@ -68,18 +60,72 @@ fn system_para_to_para_assertions(t: SystemParaToParaTest) { ); } -fn system_para_to_para_assets_assertions(t: SystemParaToParaTest) { +fn para_receiver_assertions(_: Test) { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + PenpalPolkadotA, + vec![ + RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + +fn para_to_system_para_sender_assertions(t: ParaToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + PenpalPolkadotA::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( + 864_610_000, + 8_799, + ))); + assert_expected_events!( + PenpalPolkadotA, + vec![ + // Amount to reserve transfer is transferred to Parachain's Sovereign account + RuntimeEvent::Balances( + pallet_balances::Event::Withdraw { who, amount } + ) => { + who: *who == t.sender.account_id, + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn para_to_system_para_receiver_assertions(t: ParaToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; + let sov_penpal_on_ahr = AssetHubPolkadot::sovereign_account_id_of( + AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()), + ); + assert_expected_events!( + AssetHubPolkadot, + vec![ + // Amount to reserve transfer is withdrawn from Parachain's Sovereign account + RuntimeEvent::Balances( + pallet_balances::Event::Withdraw { who, amount } + ) => { + who: *who == sov_penpal_on_ahr.clone().into(), + amount: *amount == t.args.amount, + }, + RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} +fn system_para_to_para_assets_sender_assertions(t: SystemParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; AssetHubPolkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 680_000_000, - 6000, + 864_610_000, + 8799, ))); - assert_expected_events!( AssetHubPolkadot, vec![ - // Amount to reserve transfer is transferred to Parachain's Sovereing account + // Amount to reserve transfer is transferred to Parachain's Sovereign account RuntimeEvent::Assets( pallet_assets::Event::Transferred { asset_id, from, to, amount } ) => { @@ -94,7 +140,21 @@ fn system_para_to_para_assets_assertions(t: SystemParaToParaTest) { ); } -fn relay_limited_reserve_transfer_assets(t: RelayToSystemParaTest) -> DispatchResult { +fn system_para_to_para_assets_receiver_assertions(_: Test) { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + PenpalPolkadotA, + vec![ + RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::Assets(pallet_assets::Event::Issued { .. }) => {}, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + +fn relay_to_para_reserve_transfer_assets(t: RelayToParaTest) -> DispatchResult { ::XcmPallet::limited_reserve_transfer_assets( t.signed_origin, bx!(t.args.dest.into()), @@ -105,7 +165,7 @@ fn relay_limited_reserve_transfer_assets(t: RelayToSystemParaTest) -> DispatchRe ) } -fn system_para_limited_reserve_transfer_assets(t: SystemParaToRelayTest) -> DispatchResult { +fn system_para_to_para_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { ::PolkadotXcm::limited_reserve_transfer_assets( t.signed_origin, bx!(t.args.dest.into()), @@ -116,8 +176,8 @@ fn system_para_limited_reserve_transfer_assets(t: SystemParaToRelayTest) -> Disp ) } -fn system_para_to_para_limited_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { - ::PolkadotXcm::limited_reserve_transfer_assets( +fn para_to_system_para_reserve_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { + ::PolkadotXcm::limited_reserve_transfer_assets( t.signed_origin, bx!(t.args.dest.into()), bx!(t.args.beneficiary.into()), @@ -127,129 +187,313 @@ fn system_para_to_para_limited_reserve_transfer_assets(t: SystemParaToParaTest) ) } -/// Limited Reserve Transfers of native asset from Relay Chain to the System Parachain shouldn't -/// work +/// Reserve Transfers of native asset from Relay Chain to the System Parachain shouldn't work #[test] -fn limited_reserve_transfer_native_asset_from_relay_to_system_para_fails() { - // Init values for Relay Chain +fn reserve_transfer_native_asset_from_relay_to_system_para_fails() { + let signed_origin = ::RuntimeOrigin::signed(PolkadotSender::get().into()); + let destination = Polkadot::child_location_of(AssetHubPolkadot::para_id()); + let beneficiary: MultiLocation = + AccountId32Junction { network: None, id: AssetHubPolkadotReceiver::get().into() }.into(); let amount_to_send: Balance = POLKADOT_ED * 1000; + let assets: MultiAssets = (Here, amount_to_send).into(); + let fee_asset_item = 0; + + // this should fail + Polkadot::execute_with(|| { + let result = ::XcmPallet::limited_reserve_transfer_assets( + signed_origin, + bx!(destination.into()), + bx!(beneficiary.into()), + bx!(assets.into()), + fee_asset_item, + WeightLimit::Unlimited, + ); + assert_err!( + result, + DispatchError::Module(sp_runtime::ModuleError { + index: 99, + error: [2, 0, 0, 0], + message: Some("Filtered") + }) + ); + }); +} + +/// Reserve Transfers of native asset from System Parachain to Relay Chain shouldn't work +#[test] +fn reserve_transfer_native_asset_from_system_para_to_relay_fails() { + // Init values for System Parachain + let signed_origin = + ::RuntimeOrigin::signed(AssetHubPolkadotSender::get().into()); + let destination = AssetHubPolkadot::parent_location(); + let beneficiary_id = PolkadotReceiver::get(); + let beneficiary: MultiLocation = + AccountId32Junction { network: None, id: beneficiary_id.into() }.into(); + let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; + + let assets: MultiAssets = (Parent, amount_to_send).into(); + let fee_asset_item = 0; + + // this should fail + AssetHubPolkadot::execute_with(|| { + let result = + ::PolkadotXcm::limited_reserve_transfer_assets( + signed_origin, + bx!(destination.into()), + bx!(beneficiary.into()), + bx!(assets.into()), + fee_asset_item, + WeightLimit::Unlimited, + ); + assert_err!( + result, + DispatchError::Module(sp_runtime::ModuleError { + index: 31, + error: [2, 0, 0, 0], + message: Some("Filtered") + }) + ); + }); +} + +/// Reserve Transfers of native asset from Relay to Parachain should work +#[test] +fn reserve_transfer_native_asset_from_relay_to_para() { + // Init values for Relay + let destination = Polkadot::child_location_of(PenpalPolkadotA::para_id()); + let beneficiary_id = PenpalPolkadotAReceiver::get(); + let amount_to_send: Balance = POLKADOT_ED * 1000; + let test_args = TestContext { sender: PolkadotSender::get(), - receiver: AssetHubPolkadotReceiver::get(), - args: relay_test_args(amount_to_send), + receiver: PenpalPolkadotAReceiver::get(), + args: relay_test_args(destination, beneficiary_id, amount_to_send), }; - let mut test = RelayToSystemParaTest::new(test_args); + let mut test = RelayToParaTest::new(test_args); let sender_balance_before = test.sender.balance; let receiver_balance_before = test.receiver.balance; - test.set_assertion::(relay_origin_assertions); - test.set_assertion::(system_para_dest_assertions_incomplete); - test.set_dispatchable::(relay_limited_reserve_transfer_assets); + test.set_assertion::(relay_to_para_sender_assertions); + test.set_assertion::(para_receiver_assertions); + test.set_dispatchable::(relay_to_para_reserve_transfer_assets); test.assert(); + let delivery_fees = Polkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; - assert!(sender_balance_before - amount_to_send >= sender_balance_after); - assert_eq!(receiver_balance_before, receiver_balance_after); + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_balance_after < receiver_balance_before + amount_to_send); } -/// Limited Reserve Transfers of native asset from System Parachain to Relay Chain shoudln't work +/// Reserve Transfers of native asset from System Parachain to Parachain should work #[test] -fn limited_reserve_transfer_native_asset_from_system_para_to_relay_fails() { +fn reserve_transfer_native_asset_from_system_para_to_para() { // Init values for System Parachain - let destination = AssetHubPolkadot::parent_location(); - let beneficiary_id = PolkadotReceiver::get(); + let destination = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); + let beneficiary_id = PenpalPolkadotAReceiver::get(); let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; let assets = (Parent, amount_to_send).into(); let test_args = TestContext { sender: AssetHubPolkadotSender::get(), - receiver: PolkadotReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + receiver: PenpalPolkadotAReceiver::get(), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), }; - let mut test = SystemParaToRelayTest::new(test_args); + let mut test = SystemParaToParaTest::new(test_args); let sender_balance_before = test.sender.balance; let receiver_balance_before = test.receiver.balance; - test.set_assertion::(system_para_to_relay_assertions); - test.set_dispatchable::(system_para_limited_reserve_transfer_assets); + test.set_assertion::(system_para_to_para_sender_assertions); + test.set_assertion::(para_receiver_assertions); + test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); test.assert(); let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; - assert_eq!(sender_balance_before, sender_balance_after); - assert_eq!(receiver_balance_before, receiver_balance_after); + let delivery_fees = AssetHubPolkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_balance_after < receiver_balance_before + amount_to_send); } -/// Limited Reserve Transfers of native asset from System Parachain to Parachain should work +/// Reserve Transfers of native asset from Parachain to System Parachain should work #[test] -fn limited_reserve_transfer_native_asset_from_system_para_to_para() { - // Init values for System Parachain - let destination = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); - let beneficiary_id = PenpalPolkadotAReceiver::get(); +fn reserve_transfer_native_asset_from_para_to_system_para() { + // Init values for Penpal Parachain + let destination = PenpalPolkadotA::sibling_location_of(AssetHubPolkadot::para_id()); + let beneficiary_id = AssetHubPolkadotReceiver::get(); let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; let assets = (Parent, amount_to_send).into(); let test_args = TestContext { - sender: AssetHubPolkadotSender::get(), - receiver: PenpalPolkadotAReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + sender: PenpalPolkadotASender::get(), + receiver: AssetHubPolkadotReceiver::get(), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), }; - let mut test = SystemParaToParaTest::new(test_args); + let mut test = ParaToSystemParaTest::new(test_args); let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + let penpal_location_as_seen_by_ahr = + AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); + let sov_penpal_on_ahr = + AssetHubPolkadot::sovereign_account_id_of(penpal_location_as_seen_by_ahr); + + // fund the Penpal's SA on AHR with the native tokens held in reserve + AssetHubPolkadot::fund_accounts(vec![(sov_penpal_on_ahr.into(), amount_to_send * 2)]); - test.set_assertion::(system_para_to_para_assertions); - // TODO: Add assertion for Penpal runtime. Right now message is failing with - // `UntrustedReserveLocation` - test.set_dispatchable::(system_para_to_para_limited_reserve_transfer_assets); + test.set_assertion::(para_to_system_para_sender_assertions); + test.set_assertion::(para_to_system_para_receiver_assertions); + test.set_dispatchable::(para_to_system_para_reserve_transfer_assets); test.assert(); let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; - assert!(sender_balance_before - amount_to_send >= sender_balance_after); - // TODO: Check receiver balance when Penpal runtime is improved to propery handle reserve - // transfers + let delivery_fees = PenpalPolkadotA::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_balance_after < receiver_balance_before + amount_to_send); } -/// Limited Reserve Transfers of a local asset from System Parachain to Parachain should work +/// Reserve Transfers of a local asset and native asset from System Parachain to Parachain should +/// work #[test] -fn limited_reserve_transfer_asset_from_system_para_to_para() { - // Force create asset from Relay Chain and mint assets for System Parachain's sender account +fn reserve_transfer_assets_from_system_para_to_para() { + // Force create asset on AssetHubPolkadot and PenpalPolkadotA from Relay Chain AssetHubPolkadot::force_create_and_mint_asset( ASSET_ID, ASSET_MIN_BALANCE, - true, + false, AssetHubPolkadotSender::get(), - ASSET_MIN_BALANCE * 1000000, + Some(Weight::from_parts(1_019_445_000, 200_000)), + ASSET_MIN_BALANCE * 1_000_000, + ); + PenpalPolkadotA::force_create_and_mint_asset( + ASSET_ID, + ASSET_MIN_BALANCE, + false, + PenpalPolkadotASender::get(), + None, + 0, ); // Init values for System Parachain let destination = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); let beneficiary_id = PenpalPolkadotAReceiver::get(); - let amount_to_send = ASSET_MIN_BALANCE * 1000; - let assets = - (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), amount_to_send) - .into(); - - let system_para_test_args = TestContext { + let fee_amount_to_send = ASSET_HUB_POLKADOT_ED * 1000; + let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; + let assets: MultiAssets = vec![ + (Parent, fee_amount_to_send).into(), + (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), asset_amount_to_send) + .into(), + ] + .into(); + let fee_asset_index = assets + .inner() + .iter() + .position(|r| r == &(Parent, fee_amount_to_send).into()) + .unwrap() as u32; + + let para_test_args = TestContext { sender: AssetHubPolkadotSender::get(), receiver: PenpalPolkadotAReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + args: para_test_args( + destination, + beneficiary_id, + asset_amount_to_send, + assets, + None, + fee_asset_index, + ), }; - let mut system_para_test = SystemParaToParaTest::new(system_para_test_args); + let mut test = SystemParaToParaTest::new(para_test_args); + + // Create SA-of-Penpal-on-AHR with ED. + let penpal_location = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); + let sov_penpal_on_ahr = AssetHubPolkadot::sovereign_account_id_of(penpal_location); + AssetHubPolkadot::fund_accounts(vec![(sov_penpal_on_ahr.into(), POLKADOT_ED)]); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + let sender_assets_before = AssetHubPolkadot::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &AssetHubPolkadotSender::get()) + }); + let receiver_assets_before = PenpalPolkadotA::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &PenpalPolkadotAReceiver::get()) + }); + + test.set_assertion::(system_para_to_para_assets_sender_assertions); + test.set_assertion::(system_para_to_para_assets_receiver_assertions); + test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; - system_para_test.set_assertion::(system_para_to_para_assets_assertions); - // TODO: Add assertions when Penpal is able to manage assets - system_para_test - .set_dispatchable::(system_para_to_para_limited_reserve_transfer_assets); - system_para_test.assert(); + // Sender's balance is reduced + assert!(sender_balance_after < sender_balance_before); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_balance_after < receiver_balance_before + fee_amount_to_send); + + let sender_assets_after = AssetHubPolkadot::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &AssetHubPolkadotSender::get()) + }); + let receiver_assets_after = PenpalPolkadotA::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &PenpalPolkadotAReceiver::get()) + }); + + // Sender's balance is reduced by exact amount + assert_eq!(sender_assets_before - asset_amount_to_send, sender_assets_after); + // Receiver's balance is increased by exact amount + assert_eq!(receiver_assets_after, receiver_assets_before + asset_amount_to_send); } diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/send.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/send.rs index 86ee5838b4..adbb28f024 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/send.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/send.rs @@ -16,113 +16,16 @@ use crate::*; /// Relay Chain should be able to execute `Transact` instructions in System Parachain -/// when `OriginKind::Superuser` and signer is `sudo` +/// when `OriginKind::Superuser`. #[test] -fn send_transact_sudo_from_relay_to_system_para_works() { - // Init tests variables - let root_origin = ::RuntimeOrigin::root(); - let system_para_destination = Polkadot::child_location_of(AssetHubPolkadot::para_id()).into(); - let asset_owner: AccountId = AssetHubPolkadotSender::get().into(); - let xcm = AssetHubPolkadot::force_create_asset_xcm( - OriginKind::Superuser, +fn send_transact_as_superuser_from_relay_to_system_para_works() { + AssetHubPolkadot::force_create_asset_from_relay_as_root( ASSET_ID, - asset_owner.clone(), - true, - 1000, - ); - // Send XCM message from Relay Chain - Polkadot::execute_with(|| { - assert_ok!(::XcmPallet::send( - root_origin, - bx!(system_para_destination), - bx!(xcm), - )); - - Polkadot::assert_xcm_pallet_sent(); - }); - - // Receive XCM message in Assets Parachain - AssetHubPolkadot::execute_with(|| { - type RuntimeEvent = ::RuntimeEvent; - - AssetHubPolkadot::assert_dmp_queue_complete(Some(Weight::from_parts( - 1_020_000_000, - 200_000, - ))); - - assert_expected_events!( - AssetHubPolkadot, - vec![ - RuntimeEvent::Assets(pallet_assets::Event::ForceCreated { asset_id, owner }) => { - asset_id: *asset_id == ASSET_ID, - owner: *owner == asset_owner, - }, - ] - ); - - assert!(::Assets::asset_exists(ASSET_ID)); - }); -} - -/// Relay Chain shouldn't be able to execute `Transact` instructions in System Parachain -/// when `OriginKind::Native` -#[test] -fn send_transact_native_from_relay_to_system_para_fails() { - // Init tests variables - let signed_origin = ::RuntimeOrigin::signed(PolkadotSender::get().into()); - let system_para_destination = Polkadot::child_location_of(AssetHubPolkadot::para_id()).into(); - let asset_owner = AssetHubPolkadotSender::get().into(); - let xcm = AssetHubPolkadot::force_create_asset_xcm( - OriginKind::Native, - ASSET_ID, - asset_owner, + ASSET_MIN_BALANCE, true, - 1000, - ); - - // Send XCM message from Relay Chain - Polkadot::execute_with(|| { - assert_err!( - ::XcmPallet::send( - signed_origin, - bx!(system_para_destination), - bx!(xcm) - ), - DispatchError::BadOrigin - ); - }); -} - -/// System Parachain shouldn't be able to execute `Transact` instructions in Relay Chain -/// when `OriginKind::Native` -#[test] -fn send_transact_native_from_system_para_to_relay_fails() { - // Init tests variables - let signed_origin = - ::RuntimeOrigin::signed(AssetHubPolkadotSender::get().into()); - let relay_destination = AssetHubPolkadot::parent_location().into(); - let call = ::RuntimeCall::System(frame_system::Call::< - ::Runtime, - >::remark_with_event { - remark: vec![0, 1, 2, 3], - }) - .encode() - .into(); - let origin_kind = OriginKind::Native; - - let xcm = xcm_transact_unpaid_execution(call, origin_kind); - - // Send XCM message from Relay Chain - AssetHubPolkadot::execute_with(|| { - assert_err!( - ::PolkadotXcm::send( - signed_origin, - bx!(relay_destination), - bx!(xcm) - ), - DispatchError::BadOrigin - ); - }); + AssetHubPolkadotSender::get().into(), + Some(Weight::from_parts(1_019_445_000, 200_000)), + ) } /// Parachain should be able to send XCM paying its fee with sufficient asset @@ -139,6 +42,7 @@ fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() { ASSET_MIN_BALANCE, true, para_sovereign_account.clone(), + Some(Weight::from_parts(1_019_445_000, 200_000)), ASSET_MIN_BALANCE * 1000000000, ); @@ -179,7 +83,10 @@ fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() { AssetHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; - AssetHubPolkadot::assert_xcmp_queue_success(None); + AssetHubPolkadot::assert_xcmp_queue_success(Some(Weight::from_parts( + 15_594_564_000, + 562_893, + ))); assert_expected_events!( AssetHubPolkadot, diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs index 8ec3ab4426..e7b752ad4f 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs @@ -47,39 +47,29 @@ fn relay_sets_system_para_xcm_supported_version() { #[test] fn system_para_sets_relay_xcm_supported_version() { // Init test variables - let sudo_origin = ::RuntimeOrigin::root(); let parent_location = AssetHubPolkadot::parent_location(); - let system_para_destination: VersionedMultiLocation = - Polkadot::child_location_of(AssetHubPolkadot::para_id()).into(); - let call = ::RuntimeCall::PolkadotXcm(pallet_xcm::Call::< - ::Runtime, - >::force_xcm_version { - location: bx!(parent_location), - version: XCM_V3, - }) - .encode() - .into(); - let origin_kind = OriginKind::Superuser; - - let xcm = xcm_transact_unpaid_execution(call, origin_kind); - - // System Parachain sets supported version for Relay Chain throught it - Polkadot::execute_with(|| { - assert_ok!(::XcmPallet::send( - sudo_origin, - bx!(system_para_destination), - bx!(xcm), - )); + let force_xcm_version_call = + ::RuntimeCall::PolkadotXcm(pallet_xcm::Call::< + ::Runtime, + >::force_xcm_version { + location: bx!(parent_location), + version: XCM_V3, + }) + .encode() + .into(); - Polkadot::assert_xcm_pallet_sent(); - }); + // System Parachain sets supported version for Relay Chain through it + Polkadot::send_unpaid_transact_to_parachain_as_root( + AssetHubPolkadot::para_id(), + force_xcm_version_call, + ); // System Parachain receive the XCM message AssetHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; AssetHubPolkadot::assert_dmp_queue_complete(Some(Weight::from_parts( - 1_020_000_000, + 1_019_210_000, 200_000, ))); diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs index aadf41f823..69d7ffe7b9 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs @@ -13,14 +13,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![allow(dead_code)] // - use crate::*; +use asset_hub_polkadot_runtime::xcm_config::XcmConfig as AssetHubPolkadotXcmConfig; +use polkadot_runtime::xcm_config::XcmConfig as PolkadotXcmConfig; fn relay_origin_assertions(t: RelayToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; - Polkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(635_000_000, 7_000))); + Polkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(631_531_000, 7_186))); assert_expected_events!( Polkadot, @@ -45,13 +45,13 @@ fn relay_dest_assertions(t: SystemParaToRelayTest) { Polkadot::assert_ump_queue_processed( true, Some(AssetHubPolkadot::para_id()), - Some(Weight::from_parts(254_182_000, 7_186)), + Some(Weight::from_parts(307_225_000, 7_186)), ); assert_expected_events!( Polkadot, vec![ - // Amount is witdrawn from Relay Chain's `CheckAccount` + // Amount is withdrawn from Relay Chain's `CheckAccount` RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { who: *who == ::XcmPallet::check_account(), amount: *amount == t.args.amount, @@ -68,7 +68,7 @@ fn relay_dest_assertions_fail(_t: SystemParaToRelayTest) { Polkadot::assert_ump_queue_processed( false, Some(AssetHubPolkadot::para_id()), - Some(Weight::from_parts(122_581_000, 3_593)), + Some(Weight::from_parts(157_718_000, 3_593)), ); } @@ -76,8 +76,8 @@ fn para_origin_assertions(t: SystemParaToRelayTest) { type RuntimeEvent = ::RuntimeEvent; AssetHubPolkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 635_000_000, - 7_000, + 720_053_000, + 7_203, ))); AssetHubPolkadot::assert_parachain_system_ump_sent(); @@ -97,7 +97,7 @@ fn para_origin_assertions(t: SystemParaToRelayTest) { fn para_dest_assertions(t: RelayToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; - AssetHubPolkadot::assert_dmp_queue_complete(None); + AssetHubPolkadot::assert_dmp_queue_complete(Some(Weight::from_parts(157_718_000, 3593))); assert_expected_events!( AssetHubPolkadot, @@ -110,6 +110,123 @@ fn para_dest_assertions(t: RelayToSystemParaTest) { ); } +fn penpal_to_ah_foreign_assets_sender_assertions(t: ParaToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + PenpalPolkadotA::assert_xcm_pallet_attempted_complete(None); + let expected_asset_id = t.args.asset_id.unwrap(); + let (_, expected_asset_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + assert_expected_events!( + PenpalPolkadotA, + vec![ + RuntimeEvent::Balances( + pallet_balances::Event::Withdraw { who, amount } + ) => { + who: *who == t.sender.account_id, + amount: *amount == t.args.amount, + }, + RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { + asset_id: *asset_id == expected_asset_id, + owner: *owner == t.sender.account_id, + balance: *balance == expected_asset_amount, + }, + ] + ); +} + +fn penpal_to_ah_foreign_assets_receiver_assertions(t: ParaToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + let sov_penpal_on_ahr = AssetHubPolkadot::sovereign_account_id_of( + AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()), + ); + let (expected_foreign_asset_id, expected_foreign_asset_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + assert_expected_events!( + AssetHubPolkadot, + vec![ + // native asset reserve transfer for paying fees, withdrawn from Penpal's sov account + RuntimeEvent::Balances( + pallet_balances::Event::Withdraw { who, amount } + ) => { + who: *who == sov_penpal_on_ahr.clone().into(), + amount: *amount == t.args.amount, + }, + RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { + who: *who == t.receiver.account_id, + }, + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, amount }) => { + asset_id: *asset_id == expected_foreign_asset_id, + owner: *owner == t.receiver.account_id, + amount: *amount == expected_foreign_asset_amount, + }, + RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + +fn ah_to_penpal_foreign_assets_sender_assertions(t: SystemParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + AssetHubPolkadot::assert_xcm_pallet_attempted_complete(None); + let (expected_foreign_asset_id, expected_foreign_asset_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + assert_expected_events!( + AssetHubPolkadot, + vec![ + // native asset used for fees is transferred to Parachain's Sovereign account as reserve + RuntimeEvent::Balances( + pallet_balances::Event::Transfer { from, to, amount } + ) => { + from: *from == t.sender.account_id, + to: *to == AssetHubPolkadot::sovereign_account_id_of( + t.args.dest + ), + amount: *amount == t.args.amount, + }, + // foreign asset is burned locally as part of teleportation + RuntimeEvent::ForeignAssets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { + asset_id: *asset_id == expected_foreign_asset_id, + owner: *owner == t.sender.account_id, + balance: *balance == expected_foreign_asset_amount, + }, + ] + ); +} + +fn ah_to_penpal_foreign_assets_receiver_assertions(t: SystemParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + let expected_asset_id = t.args.asset_id.unwrap(); + let (_, expected_asset_amount) = + non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + let checking_account = ::PolkadotXcm::check_account(); + assert_expected_events!( + PenpalPolkadotA, + vec![ + // checking account burns local asset as part of incoming teleport + RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { + asset_id: *asset_id == expected_asset_id, + owner: *owner == checking_account, + balance: *balance == expected_asset_amount, + }, + // local asset is teleported into account of receiver + RuntimeEvent::Assets(pallet_assets::Event::Issued { asset_id, owner, amount }) => { + asset_id: *asset_id == expected_asset_id, + owner: *owner == t.receiver.account_id, + amount: *amount == expected_asset_amount, + }, + // native asset for fee is deposited to receiver + RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { + who: *who == t.receiver.account_id, + }, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + fn relay_limited_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { ::XcmPallet::limited_teleport_assets( t.signed_origin, @@ -121,6 +238,16 @@ fn relay_limited_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { ) } +fn relay_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { + ::XcmPallet::teleport_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + ) +} + fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult { ::PolkadotXcm::limited_teleport_assets( t.signed_origin, @@ -132,15 +259,49 @@ fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResu ) } +fn system_para_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult { + ::PolkadotXcm::teleport_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + ) +} + +fn para_to_system_para_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { + ::PolkadotXcm::transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +fn system_para_to_para_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { + ::PolkadotXcm::transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + /// Limited Teleport of native asset from Relay Chain to the System Parachain should work #[test] fn limited_teleport_native_assets_from_relay_to_system_para_works() { // Init values for Relay Chain let amount_to_send: Balance = POLKADOT_ED * 1000; + let dest = Polkadot::child_location_of(AssetHubPolkadot::para_id()); + let beneficiary_id = AssetHubPolkadotReceiver::get(); let test_args = TestContext { sender: PolkadotSender::get(), receiver: AssetHubPolkadotReceiver::get(), - args: relay_test_args(amount_to_send), + args: relay_test_args(dest, beneficiary_id, amount_to_send), }; let mut test = RelayToSystemParaTest::new(test_args); @@ -153,11 +314,17 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() { test.set_dispatchable::(relay_limited_teleport_assets); test.assert(); + let delivery_fees = Polkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; // Sender's balance is reduced - assert!(sender_balance_before - amount_to_send >= sender_balance_after); + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); // Receiver's balance is increased assert!(receiver_balance_after > receiver_balance_before); } @@ -178,7 +345,7 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() { let test_args = TestContext { sender: AssetHubPolkadotSender::get(), receiver: PolkadotReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = SystemParaToRelayTest::new(test_args); @@ -194,8 +361,14 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() { let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; + let delivery_fees = AssetHubPolkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + // Sender's balance is reduced - assert!(sender_balance_before - amount_to_send >= sender_balance_after); + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); // Receiver's balance is increased assert!(receiver_balance_after > receiver_balance_before); } @@ -213,7 +386,7 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() { let test_args = TestContext { sender: AssetHubPolkadotSender::get(), receiver: PolkadotReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = SystemParaToRelayTest::new(test_args); @@ -229,8 +402,346 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() { let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; + let delivery_fees = AssetHubPolkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance does not change + assert_eq!(receiver_balance_after, receiver_balance_before); +} + +/// Teleport of native asset from Relay Chain to the System Parachain should work +#[test] +fn teleport_native_assets_from_relay_to_system_para_works() { + // Init values for Relay Chain + let amount_to_send: Balance = POLKADOT_ED * 1000; + let dest = Polkadot::child_location_of(AssetHubPolkadot::para_id()); + let beneficiary_id = AssetHubPolkadotReceiver::get(); + let test_args = TestContext { + sender: PolkadotSender::get(), + receiver: AssetHubPolkadotReceiver::get(), + args: relay_test_args(dest, beneficiary_id, amount_to_send), + }; + + let mut test = RelayToSystemParaTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(relay_origin_assertions); + test.set_assertion::(para_dest_assertions); + test.set_dispatchable::(relay_teleport_assets); + test.assert(); + + let delivery_fees = Polkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + // Sender's balance is reduced - assert!(sender_balance_before - amount_to_send >= sender_balance_after); + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); +} + +/// Teleport of native asset from System Parachains to the Relay Chain +/// should work when there is enough balance in Relay Chain's `CheckAccount` +#[test] +fn teleport_native_assets_back_from_system_para_to_relay_works() { + // Dependency - Relay Chain's `CheckAccount` should have enough balance + teleport_native_assets_from_relay_to_system_para_works(); + + // Init values for Relay Chain + let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; + let destination = AssetHubPolkadot::parent_location(); + let beneficiary_id = PolkadotReceiver::get(); + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubPolkadotSender::get(), + receiver: PolkadotReceiver::get(), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + }; + + let mut test = SystemParaToRelayTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(para_origin_assertions); + test.set_assertion::(relay_dest_assertions); + test.set_dispatchable::(system_para_teleport_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + let delivery_fees = AssetHubPolkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); +} + +/// Teleport of native asset from System Parachain to Relay Chain +/// shouldn't work when there is not enough balance in Relay Chain's `CheckAccount` +#[test] +fn teleport_native_assets_from_system_para_to_relay_fails() { + // Init values for Relay Chain + let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; + let destination = AssetHubPolkadot::parent_location(); + let beneficiary_id = PolkadotReceiver::get(); + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubPolkadotSender::get(), + receiver: PolkadotReceiver::get(), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + }; + + let mut test = SystemParaToRelayTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(para_origin_assertions); + test.set_assertion::(relay_dest_assertions_fail); + test.set_dispatchable::(system_para_teleport_assets); + test.assert(); + + let delivery_fees = AssetHubPolkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); // Receiver's balance does not change assert_eq!(receiver_balance_after, receiver_balance_before); } + +#[test] +fn teleport_to_other_system_parachains_works() { + let amount = ASSET_HUB_POLKADOT_ED * 100; + let native_asset: MultiAssets = (Parent, amount).into(); + + test_parachain_is_trusted_teleporter!( + AssetHubPolkadot, // Origin + AssetHubPolkadotXcmConfig, // XCM Configuration + vec![BridgeHubPolkadot], // Destinations + (native_asset, amount) + ); +} + +/// Bidirectional teleports of local Penpal assets to Asset Hub as foreign assets should work +/// (using native reserve-based transfer for fees) +#[test] +fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { + let ah_as_seen_by_penpal = PenpalPolkadotA::sibling_location_of(AssetHubPolkadot::para_id()); + let asset_location_on_penpal = PenpalLocalTeleportableToAssetHub::get(); + let asset_id_on_penpal = match asset_location_on_penpal.last() { + Some(GeneralIndex(id)) => *id as u32, + _ => unreachable!(), + }; + let asset_owner_on_penpal = PenpalPolkadotASender::get(); + let foreign_asset_at_asset_hub_polkadot = + MultiLocation { parents: 1, interior: X1(Parachain(PenpalPolkadotA::para_id().into())) } + .appended_with(asset_location_on_penpal) + .unwrap(); + super::penpal_create_foreign_asset_on_asset_hub( + asset_id_on_penpal, + foreign_asset_at_asset_hub_polkadot, + ah_as_seen_by_penpal, + false, + asset_owner_on_penpal, + ASSET_MIN_BALANCE * 1_000_000, + ); + let penpal_to_ah_beneficiary_id = AssetHubPolkadotReceiver::get(); + + let fee_amount_to_send = ASSET_HUB_POLKADOT_ED * 10_000; + let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; + + let penpal_assets: MultiAssets = vec![ + (Parent, fee_amount_to_send).into(), + (asset_location_on_penpal, asset_amount_to_send).into(), + ] + .into(); + let fee_asset_index = penpal_assets + .inner() + .iter() + .position(|r| r == &(Parent, fee_amount_to_send).into()) + .unwrap() as u32; + + // Penpal to AH test args + let penpal_to_ah_test_args = TestContext { + sender: PenpalPolkadotASender::get(), + receiver: AssetHubPolkadotReceiver::get(), + args: para_test_args( + ah_as_seen_by_penpal, + penpal_to_ah_beneficiary_id, + asset_amount_to_send, + penpal_assets, + Some(asset_id_on_penpal), + fee_asset_index, + ), + }; + let mut penpal_to_ah = ParaToSystemParaTest::new(penpal_to_ah_test_args); + + let penpal_sender_balance_before = penpal_to_ah.sender.balance; + let ah_receiver_balance_before = penpal_to_ah.receiver.balance; + + let penpal_sender_assets_before = PenpalPolkadotA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalPolkadotASender::get()) + }); + let ah_receiver_assets_before = AssetHubPolkadot::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance( + foreign_asset_at_asset_hub_polkadot, + &AssetHubPolkadotReceiver::get(), + ) + }); + + penpal_to_ah.set_assertion::(penpal_to_ah_foreign_assets_sender_assertions); + penpal_to_ah.set_assertion::(penpal_to_ah_foreign_assets_receiver_assertions); + penpal_to_ah.set_dispatchable::(para_to_system_para_transfer_assets); + penpal_to_ah.assert(); + + let penpal_sender_balance_after = penpal_to_ah.sender.balance; + let ah_receiver_balance_after = penpal_to_ah.receiver.balance; + + let penpal_sender_assets_after = PenpalPolkadotA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalPolkadotASender::get()) + }); + let ah_receiver_assets_after = AssetHubPolkadot::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance( + foreign_asset_at_asset_hub_polkadot, + &AssetHubPolkadotReceiver::get(), + ) + }); + + // Sender's balance is reduced + assert!(penpal_sender_balance_after < penpal_sender_balance_before); + // Receiver's balance is increased + assert!(ah_receiver_balance_after > ah_receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(ah_receiver_balance_after < ah_receiver_balance_before + fee_amount_to_send); + + // Sender's balance is reduced by exact amount + assert_eq!(penpal_sender_assets_before - asset_amount_to_send, penpal_sender_assets_after); + // Receiver's balance is increased by exact amount + assert_eq!(ah_receiver_assets_after, ah_receiver_assets_before + asset_amount_to_send); + + /////////////////////////////////////////////////////////////////////// + // Now test transferring foreign assets back from AssetHub to Penpal // + /////////////////////////////////////////////////////////////////////// + + // Move funds on AH from AHReceiver to AHSender + AssetHubPolkadot::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + assert_ok!(ForeignAssets::transfer( + ::RuntimeOrigin::signed(AssetHubPolkadotReceiver::get()), + foreign_asset_at_asset_hub_polkadot, + AssetHubPolkadotSender::get().into(), + asset_amount_to_send, + )); + }); + + let ah_to_penpal_beneficiary_id = PenpalPolkadotAReceiver::get(); + let penpal_as_seen_by_ah = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); + let ah_assets: MultiAssets = vec![ + (Parent, fee_amount_to_send).into(), + (foreign_asset_at_asset_hub_polkadot, asset_amount_to_send).into(), + ] + .into(); + let fee_asset_index = ah_assets + .inner() + .iter() + .position(|r| r == &(Parent, fee_amount_to_send).into()) + .unwrap() as u32; + + // AH to Penpal test args + let ah_to_penpal_test_args = TestContext { + sender: AssetHubPolkadotSender::get(), + receiver: PenpalPolkadotAReceiver::get(), + args: para_test_args( + penpal_as_seen_by_ah, + ah_to_penpal_beneficiary_id, + asset_amount_to_send, + ah_assets, + Some(asset_id_on_penpal), + fee_asset_index, + ), + }; + let mut ah_to_penpal = SystemParaToParaTest::new(ah_to_penpal_test_args); + + let ah_sender_balance_before = ah_to_penpal.sender.balance; + let penpal_receiver_balance_before = ah_to_penpal.receiver.balance; + + let ah_sender_assets_before = AssetHubPolkadot::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + foreign_asset_at_asset_hub_polkadot, + &AssetHubPolkadotSender::get(), + ) + }); + let penpal_receiver_assets_before = PenpalPolkadotA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalPolkadotAReceiver::get()) + }); + + ah_to_penpal.set_assertion::(ah_to_penpal_foreign_assets_sender_assertions); + ah_to_penpal.set_assertion::(ah_to_penpal_foreign_assets_receiver_assertions); + ah_to_penpal.set_dispatchable::(system_para_to_para_transfer_assets); + ah_to_penpal.assert(); + + let ah_sender_balance_after = ah_to_penpal.sender.balance; + let penpal_receiver_balance_after = ah_to_penpal.receiver.balance; + + let ah_sender_assets_after = AssetHubPolkadot::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + foreign_asset_at_asset_hub_polkadot, + &AssetHubPolkadotSender::get(), + ) + }); + let penpal_receiver_assets_after = PenpalPolkadotA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalPolkadotAReceiver::get()) + }); + + // Sender's balance is reduced + assert!(ah_sender_balance_after < ah_sender_balance_before); + // Receiver's balance is increased + assert!(penpal_receiver_balance_after > penpal_receiver_balance_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(penpal_receiver_balance_after < penpal_receiver_balance_before + fee_amount_to_send); + + // Sender's balance is reduced by exact amount + assert_eq!(ah_sender_assets_before - asset_amount_to_send, ah_sender_assets_after); + // Receiver's balance is increased by exact amount + assert_eq!(penpal_receiver_assets_after, penpal_receiver_assets_before + asset_amount_to_send); +} diff --git a/integration-tests/emulated/chains/Cargo.toml b/integration-tests/emulated/chains/Cargo.toml new file mode 100644 index 0000000000..9d2df663dc --- /dev/null +++ b/integration-tests/emulated/chains/Cargo.toml @@ -0,0 +1,48 @@ +[package] +name = "emulated-chains" +version = "1.0.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Definitions of the fellows emulated relay+para runtimes" + +[dependencies] + +# Substrate +grandpa-primitives = { package = "sp-consensus-grandpa", version = "12.0.0" } +sp-authority-discovery = { version = "25.0.0" } +sp-runtime = { version = "30.0.1" } +frame-support = { version = "27.0.0" } +sp-core = { version = "27.0.0" } +sp-consensus-babe = { version = "0.31.0" } +pallet-im-online = { version = "26.0.0" } +pallet-staking = { version = "27.0.0" } +beefy-primitives = { package = "sp-consensus-beefy", version = "12.0.0" } + +# Polkadot +polkadot-primitives = { version = "6.0.0" } +polkadot-runtime-parachains = { version = "6.0.0" } +polkadot-parachain-primitives = { version = "5.0.0" } + +# Cumulus +parachains-common = { version = "6.0.0" } +xcm-emulator = { version = "0.4.0" } +penpal-runtime = { version = "0.13.0" } + +# Local runtimes +kusama-runtime = { package = "staging-kusama-runtime", path = "../../../relay/kusama" } +kusama-runtime-constants = { path = "../../../relay/kusama/constants" } +polkadot-runtime = { path = "../../../relay/polkadot" } +polkadot-runtime-constants = { path = "../../../relay/polkadot/constants" } +asset-hub-polkadot-runtime = { path = "../../../system-parachains/asset-hubs/asset-hub-polkadot" } +asset-hub-kusama-runtime = { path = "../../../system-parachains/asset-hubs/asset-hub-kusama" } +collectives-polkadot-runtime = { path = "../../../system-parachains/collectives/collectives-polkadot" } +bridge-hub-polkadot-runtime = { path = "../../../system-parachains/bridge-hubs/bridge-hub-polkadot" } +bridge-hub-kusama-runtime = { path = "../../../system-parachains/bridge-hubs/bridge-hub-kusama" } +# TODO: replace with `emulated-integration-tests-common@X.Y.Z` from `polkadot-sdk` +integration-tests-common = { path = "../common" } + +[features] +runtime-benchmarks = [ + "penpal-runtime/runtime-benchmarks", +] \ No newline at end of file diff --git a/integration-tests/emulated/common/src/constants.rs b/integration-tests/emulated/chains/src/genesis.rs similarity index 77% rename from integration-tests/emulated/common/src/constants.rs rename to integration-tests/emulated/chains/src/genesis.rs index e0cfb9f658..9e6eb1533b 100644 --- a/integration-tests/emulated/common/src/constants.rs +++ b/integration-tests/emulated/chains/src/genesis.rs @@ -13,143 +13,27 @@ // See the License for the specific language governing permissions and // limitations under the License. +use integration_tests_common::{ + accounts, collators, get_account_id_from_seed, validators, SAFE_XCM_VERSION, +}; + // Substrate use beefy_primitives::ecdsa_crypto::AuthorityId as BeefyId; use grandpa_primitives::AuthorityId as GrandpaId; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; use sp_consensus_babe::AuthorityId as BabeId; -use sp_core::{sr25519, storage::Storage, Pair, Public}; -use sp_runtime::{ - traits::{IdentifyAccount, Verify}, - BuildStorage, MultiSignature, Perbill, -}; +use sp_core::{sr25519, storage::Storage}; +use sp_runtime::{BuildStorage, Perbill}; // Cumulus -use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId, Balance, BlockNumber}; +use parachains_common::{AccountId, Balance, BlockNumber}; use polkadot_parachain_primitives::primitives::{HeadData, ValidationCode}; use polkadot_primitives::{AssignmentId, ValidatorId}; use polkadot_runtime_parachains::{ configuration::HostConfiguration, paras::{ParaGenesisArgs, ParaKind}, }; -use xcm; - -pub const XCM_V2: u32 = 3; -pub const XCM_V3: u32 = 2; -pub const REF_TIME_THRESHOLD: u64 = 33; -pub const PROOF_SIZE_THRESHOLD: u64 = 33; - -type AccountPublic = ::Signer; - -/// Helper function to generate a crypto pair from seed -fn get_from_seed(seed: &str) -> ::Public { - TPublic::Pair::from_string(&format!("//{}", seed), None) - .expect("static values are valid; qed") - .public() -} - -/// Helper function to generate an account ID from seed. -fn get_account_id_from_seed(seed: &str) -> AccountId -where - AccountPublic: From<::Public>, -{ - AccountPublic::from(get_from_seed::(seed)).into_account() -} - -pub mod accounts { - use super::*; - pub const ALICE: &str = "Alice"; - pub const BOB: &str = "Bob"; - pub const CHARLIE: &str = "Charlie"; - pub const DAVE: &str = "Dave"; - pub const EVE: &str = "Eve"; - pub const FERDIE: &str = "Ferdei"; - pub const ALICE_STASH: &str = "Alice//stash"; - pub const BOB_STASH: &str = "Bob//stash"; - pub const CHARLIE_STASH: &str = "Charlie//stash"; - pub const DAVE_STASH: &str = "Dave//stash"; - pub const EVE_STASH: &str = "Eve//stash"; - pub const FERDIE_STASH: &str = "Ferdie//stash"; - pub const FERDIE_BEEFY: &str = "Ferdie//stash"; - - pub fn init_balances() -> Vec { - vec![ - get_account_id_from_seed::(ALICE), - get_account_id_from_seed::(BOB), - get_account_id_from_seed::(CHARLIE), - get_account_id_from_seed::(DAVE), - get_account_id_from_seed::(EVE), - get_account_id_from_seed::(FERDIE), - get_account_id_from_seed::(ALICE_STASH), - get_account_id_from_seed::(BOB_STASH), - get_account_id_from_seed::(CHARLIE_STASH), - get_account_id_from_seed::(DAVE_STASH), - get_account_id_from_seed::(EVE_STASH), - get_account_id_from_seed::(FERDIE_STASH), - ] - } -} - -pub mod collators { - use super::*; - - pub fn invulnerables_asset_hub_polkadot() -> Vec<(AccountId, AssetHubPolkadotAuraId)> { - vec![ - ( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - ), - ( - get_account_id_from_seed::("Bob"), - get_from_seed::("Bob"), - ), - ] - } - - pub fn invulnerables() -> Vec<(AccountId, AuraId)> { - vec![ - ( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - ), - (get_account_id_from_seed::("Bob"), get_from_seed::("Bob")), - ] - } -} - -pub mod validators { - use super::*; - - pub fn initial_authorities() -> Vec<( - AccountId, - AccountId, - BabeId, - GrandpaId, - ImOnlineId, - ValidatorId, - AssignmentId, - AuthorityDiscoveryId, - BeefyId, - )> { - let seed = "Alice"; - vec![( - get_account_id_from_seed::(&format!("{}//stash", seed)), - get_account_id_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - )] - } -} - -/// The default XCM version to set in genesis config. -const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; - // Polkadot pub mod polkadot { use super::*; @@ -196,10 +80,7 @@ pub mod polkadot { pub fn genesis() -> Storage { let genesis_config = polkadot_runtime::RuntimeGenesisConfig { - system: polkadot_runtime::SystemConfig { - code: polkadot_runtime::WASM_BINARY.unwrap().to_vec(), - ..Default::default() - }, + system: polkadot_runtime::SystemConfig::default(), balances: polkadot_runtime::BalancesConfig { balances: accounts::init_balances() .iter() @@ -350,10 +231,7 @@ pub mod kusama { pub fn genesis() -> Storage { let genesis_config = kusama_runtime::RuntimeGenesisConfig { - system: kusama_runtime::SystemConfig { - code: kusama_runtime::WASM_BINARY.unwrap().to_vec(), - ..Default::default() - }, + system: kusama_runtime::SystemConfig::default(), balances: kusama_runtime::BalancesConfig { balances: accounts::init_balances() .iter() @@ -463,17 +341,12 @@ pub mod asset_hub_polkadot { pub fn genesis() -> Storage { let genesis_config = asset_hub_polkadot_runtime::RuntimeGenesisConfig { - system: asset_hub_polkadot_runtime::SystemConfig { - code: asset_hub_polkadot_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, + system: asset_hub_polkadot_runtime::SystemConfig::default(), balances: asset_hub_polkadot_runtime::BalancesConfig { balances: accounts::init_balances() .iter() .cloned() - .map(|k| (k, ED * 4096)) + .map(|k| (k, ED * 4096 * 4096)) .collect(), }, parachain_info: asset_hub_polkadot_runtime::ParachainInfoConfig { @@ -520,17 +393,12 @@ pub mod asset_hub_kusama { pub fn genesis() -> Storage { let genesis_config = asset_hub_kusama_runtime::RuntimeGenesisConfig { - system: asset_hub_kusama_runtime::SystemConfig { - code: asset_hub_kusama_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, + system: asset_hub_kusama_runtime::SystemConfig::default(), balances: asset_hub_kusama_runtime::BalancesConfig { balances: accounts::init_balances() .iter() .cloned() - .map(|k| (k, ED * 4096)) + .map(|k| (k, ED * 4096 * 4096)) .collect(), }, parachain_info: asset_hub_kusama_runtime::ParachainInfoConfig { @@ -577,12 +445,7 @@ pub mod bridge_hub_polkadot { pub fn genesis() -> Storage { let genesis_config = bridge_hub_polkadot_runtime::RuntimeGenesisConfig { - system: bridge_hub_polkadot_runtime::SystemConfig { - code: bridge_hub_polkadot_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, + system: bridge_hub_polkadot_runtime::SystemConfig::default(), balances: bridge_hub_polkadot_runtime::BalancesConfig { balances: accounts::init_balances() .iter() @@ -634,12 +497,7 @@ pub mod bridge_hub_kusama { pub fn genesis() -> Storage { let genesis_config = bridge_hub_kusama_runtime::RuntimeGenesisConfig { - system: bridge_hub_kusama_runtime::SystemConfig { - code: bridge_hub_kusama_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, + system: bridge_hub_kusama_runtime::SystemConfig::default(), balances: bridge_hub_kusama_runtime::BalancesConfig { balances: accounts::init_balances() .iter() @@ -691,12 +549,7 @@ pub mod collectives { pub fn genesis() -> Storage { let genesis_config = collectives_polkadot_runtime::RuntimeGenesisConfig { - system: collectives_polkadot_runtime::SystemConfig { - code: collectives_polkadot_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, + system: collectives_polkadot_runtime::SystemConfig::default(), balances: collectives_polkadot_runtime::BalancesConfig { balances: accounts::init_balances() .iter() @@ -749,17 +602,12 @@ pub mod penpal { pub fn genesis(para_id: u32) -> Storage { let genesis_config = penpal_runtime::RuntimeGenesisConfig { - system: penpal_runtime::SystemConfig { - code: penpal_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - ..Default::default() - }, + system: penpal_runtime::SystemConfig::default(), balances: penpal_runtime::BalancesConfig { balances: accounts::init_balances() .iter() .cloned() - .map(|k| (k, ED * 4096)) + .map(|k| (k, ED * 4096 * 4096)) .collect(), }, parachain_info: penpal_runtime::ParachainInfoConfig { diff --git a/integration-tests/emulated/chains/src/lib.rs b/integration-tests/emulated/chains/src/lib.rs new file mode 100644 index 0000000000..84a3c8e5b4 --- /dev/null +++ b/integration-tests/emulated/chains/src/lib.rs @@ -0,0 +1,341 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod genesis; + +pub use genesis::{ + asset_hub_kusama, asset_hub_polkadot, bridge_hub_kusama, bridge_hub_polkadot, collectives, + kusama, penpal, polkadot, +}; + +use integration_tests_common::{ + accounts::{ALICE, BOB}, + impl_accounts_helpers_for_parachain, impl_accounts_helpers_for_relay_chain, + impl_assert_events_helpers_for_parachain, impl_assert_events_helpers_for_relay_chain, + impl_assets_helpers_for_parachain, impl_foreign_assets_helpers_for_parachain, + impl_hrmp_channels_helpers_for_relay_chain, impl_send_transact_helpers_for_relay_chain, + impls::Parachain, +}; + +// Substrate +use frame_support::traits::OnInitialize; + +// Cumulus +use xcm_emulator::{ + // decl_test_bridges, + decl_test_networks, + decl_test_parachains, + decl_test_relay_chains, + decl_test_sender_receiver_accounts_parameter_types, +}; + +use polkadot_primitives::runtime_api::runtime_decl_for_parachain_host::ParachainHostV7; + +decl_test_relay_chains! { + #[api_version(5)] + pub struct Polkadot { + genesis = polkadot::genesis(), + on_init = (), + runtime = polkadot_runtime, + core = { + SovereignAccountOf: polkadot_runtime::xcm_config::SovereignAccountOf, + }, + pallets = { + XcmPallet: polkadot_runtime::XcmPallet, + Balances: polkadot_runtime::Balances, + Hrmp: polkadot_runtime::Hrmp, + } + }, + #[api_version(5)] + pub struct Kusama { + genesis = kusama::genesis(), + on_init = (), + runtime = kusama_runtime, + core = { + SovereignAccountOf: kusama_runtime::xcm_config::SovereignAccountOf, + }, + pallets = { + XcmPallet: kusama_runtime::XcmPallet, + Balances: kusama_runtime::Balances, + Hrmp: kusama_runtime::Hrmp, + } + }, +} + +decl_test_parachains! { + // Polkadot Parachains + pub struct AssetHubPolkadot { + genesis = asset_hub_polkadot::genesis(), + on_init = { + asset_hub_polkadot_runtime::AuraExt::on_initialize(1); + }, + runtime = asset_hub_polkadot_runtime, + core = { + XcmpMessageHandler: asset_hub_polkadot_runtime::XcmpQueue, + LocationToAccountId: asset_hub_polkadot_runtime::xcm_config::LocationToAccountId, + ParachainInfo: asset_hub_polkadot_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: asset_hub_polkadot_runtime::PolkadotXcm, + Assets: asset_hub_polkadot_runtime::Assets, + ForeignAssets: asset_hub_polkadot_runtime::ForeignAssets, + Balances: asset_hub_polkadot_runtime::Balances, + } + }, + pub struct Collectives { + genesis = collectives::genesis(), + on_init = { + collectives_polkadot_runtime::AuraExt::on_initialize(1); + }, + runtime = collectives_polkadot_runtime, + core = { + XcmpMessageHandler: collectives_polkadot_runtime::XcmpQueue, + LocationToAccountId: collectives_polkadot_runtime::xcm_config::LocationToAccountId, + ParachainInfo: collectives_polkadot_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: collectives_polkadot_runtime::PolkadotXcm, + Balances: collectives_polkadot_runtime::Balances, + } + }, + pub struct BridgeHubPolkadot { + genesis = bridge_hub_polkadot::genesis(), + on_init = { + bridge_hub_polkadot_runtime::AuraExt::on_initialize(1); + }, + runtime = bridge_hub_polkadot_runtime, + core = { + XcmpMessageHandler: bridge_hub_polkadot_runtime::XcmpQueue, + LocationToAccountId: bridge_hub_polkadot_runtime::xcm_config::LocationToAccountId, + ParachainInfo: bridge_hub_polkadot_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: bridge_hub_polkadot_runtime::PolkadotXcm, + } + }, + pub struct PenpalPolkadotA { + genesis = penpal::genesis(penpal::PARA_ID_A), + on_init = { + penpal_runtime::AuraExt::on_initialize(1); + }, + runtime = penpal_runtime, + core = { + XcmpMessageHandler: penpal_runtime::XcmpQueue, + LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, + ParachainInfo: penpal_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: penpal_runtime::PolkadotXcm, + Assets: penpal_runtime::Assets, + Balances: penpal_runtime::Balances, + } + }, + pub struct PenpalPolkadotB { + genesis = penpal::genesis(penpal::PARA_ID_B), + on_init = { + penpal_runtime::AuraExt::on_initialize(1); + }, + runtime = penpal_runtime, + core = { + XcmpMessageHandler: penpal_runtime::XcmpQueue, + LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, + ParachainInfo: penpal_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: penpal_runtime::PolkadotXcm, + Assets: penpal_runtime::Assets, + Balances: penpal_runtime::Balances, + } + }, + // Kusama Parachains + pub struct AssetHubKusama { + genesis = asset_hub_kusama::genesis(), + on_init = { + asset_hub_kusama_runtime::AuraExt::on_initialize(1); + }, + runtime = asset_hub_kusama_runtime, + core = { + XcmpMessageHandler: asset_hub_kusama_runtime::XcmpQueue, + LocationToAccountId: asset_hub_kusama_runtime::xcm_config::LocationToAccountId, + ParachainInfo: asset_hub_kusama_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: asset_hub_kusama_runtime::PolkadotXcm, + Assets: asset_hub_kusama_runtime::Assets, + ForeignAssets: asset_hub_kusama_runtime::ForeignAssets, + PoolAssets: asset_hub_kusama_runtime::PoolAssets, + AssetConversion: asset_hub_kusama_runtime::AssetConversion, + Balances: asset_hub_kusama_runtime::Balances, + } + }, + pub struct BridgeHubKusama { + genesis = bridge_hub_kusama::genesis(), + on_init = { + bridge_hub_kusama_runtime::AuraExt::on_initialize(1); + }, + runtime = bridge_hub_kusama_runtime, + core = { + XcmpMessageHandler: bridge_hub_kusama_runtime::XcmpQueue, + LocationToAccountId: bridge_hub_kusama_runtime::xcm_config::LocationToAccountId, + ParachainInfo: bridge_hub_kusama_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: bridge_hub_kusama_runtime::PolkadotXcm, + } + }, + pub struct PenpalKusamaA { + genesis = penpal::genesis(penpal::PARA_ID_A), + on_init = { + penpal_runtime::AuraExt::on_initialize(1); + }, + runtime = penpal_runtime, + core = { + XcmpMessageHandler: penpal_runtime::XcmpQueue, + LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, + ParachainInfo: penpal_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: penpal_runtime::PolkadotXcm, + Assets: penpal_runtime::Assets, + Balances: penpal_runtime::Balances, + } + }, + pub struct PenpalKusamaB { + genesis = penpal::genesis(penpal::PARA_ID_B), + on_init = { + penpal_runtime::AuraExt::on_initialize(1); + }, + runtime = penpal_runtime, + core = { + XcmpMessageHandler: penpal_runtime::XcmpQueue, + LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, + ParachainInfo: penpal_runtime::ParachainInfo, + }, + pallets = { + PolkadotXcm: penpal_runtime::PolkadotXcm, + Assets: penpal_runtime::Assets, + Balances: penpal_runtime::Balances, + } + }, +} + +decl_test_networks! { + pub struct PolkadotMockNet { + relay_chain = Polkadot, + parachains = vec![ + AssetHubPolkadot, + Collectives, + BridgeHubPolkadot, + PenpalPolkadotA, + PenpalPolkadotB, + ], + // TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged + // bridge = PolkadotKusamaMockBridge + bridge = () + }, + pub struct KusamaMockNet { + relay_chain = Kusama, + parachains = vec![ + AssetHubKusama, + BridgeHubKusama, + PenpalKusamaA, + PenpalKusamaB, + ], + // TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged + // bridge = KusamaPolkadotMockBridge + bridge = () + }, +} + +// TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged +// decl_test_bridges! { +// pub struct PolkadotKusamaMockBridge { +// source = BridgeHubPolkadot, +// target = BridgeHubKusama, +// handler = PolkadotKusamaMessageHandler +// }, +// pub struct KusamaPolkadotMockBridge { +// source = BridgeHubKusama, +// target = BridgeHubPolkadot, +// handler = KusamaPolkadotMessageHandler +// } +// } + +// Polkadot implementation +impl_accounts_helpers_for_relay_chain!(Polkadot); +impl_assert_events_helpers_for_relay_chain!(Polkadot); +impl_hrmp_channels_helpers_for_relay_chain!(Polkadot); +impl_send_transact_helpers_for_relay_chain!(Polkadot); + +// Kusama implementation +impl_accounts_helpers_for_relay_chain!(Kusama); +impl_assert_events_helpers_for_relay_chain!(Kusama); +impl_hrmp_channels_helpers_for_relay_chain!(Kusama); +impl_send_transact_helpers_for_relay_chain!(Kusama); + +// AssetHubPolkadot implementation +impl_accounts_helpers_for_parachain!(AssetHubPolkadot); +impl_assets_helpers_for_parachain!(AssetHubPolkadot, Polkadot); +impl_assert_events_helpers_for_parachain!(AssetHubPolkadot); +impl_foreign_assets_helpers_for_parachain!(AssetHubPolkadot, Polkadot); + +// AssetHubKusama implementation +impl_accounts_helpers_for_parachain!(AssetHubKusama); +impl_assets_helpers_for_parachain!(AssetHubKusama, Kusama); +impl_assert_events_helpers_for_parachain!(AssetHubKusama); +impl_foreign_assets_helpers_for_parachain!(AssetHubKusama, Kusama); + +// PenpalPolkadot implementations +impl_accounts_helpers_for_parachain!(PenpalPolkadotA); +impl_accounts_helpers_for_parachain!(PenpalPolkadotB); +impl_assets_helpers_for_parachain!(PenpalPolkadotA, Polkadot); +impl_assets_helpers_for_parachain!(PenpalPolkadotB, Polkadot); +impl_assert_events_helpers_for_parachain!(PenpalPolkadotA); +impl_assert_events_helpers_for_parachain!(PenpalPolkadotB); + +// PenpalKusama implementations +impl_accounts_helpers_for_parachain!(PenpalKusamaA); +impl_accounts_helpers_for_parachain!(PenpalKusamaB); +impl_assets_helpers_for_parachain!(PenpalKusamaA, Kusama); +impl_assets_helpers_for_parachain!(PenpalKusamaB, Kusama); +impl_assert_events_helpers_for_parachain!(PenpalKusamaA); +impl_assert_events_helpers_for_parachain!(PenpalKusamaB); + +// Collectives implementation +impl_accounts_helpers_for_parachain!(Collectives); +impl_assert_events_helpers_for_parachain!(Collectives); + +decl_test_sender_receiver_accounts_parameter_types! { + // Relays + PolkadotRelay { sender: ALICE, receiver: BOB }, + KusamaRelay { sender: ALICE, receiver: BOB }, + // Asset Hubs + AssetHubPolkadotPara { sender: ALICE, receiver: BOB }, + AssetHubKusamaPara { sender: ALICE, receiver: BOB }, + // Collectives + CollectivesPara { sender: ALICE, receiver: BOB }, + // Bridged Hubs + BridgeHubPolkadotPara { sender: ALICE, receiver: BOB }, + BridgeHubKusamaPara { sender: ALICE, receiver: BOB }, + // Penpals + PenpalPolkadotAPara { sender: ALICE, receiver: BOB }, + PenpalPolkadotBPara { sender: ALICE, receiver: BOB }, + PenpalKusamaAPara { sender: ALICE, receiver: BOB }, + PenpalKusamaBPara { sender: ALICE, receiver: BOB } +} + +pub type PenpalLocalTeleportableToAssetHub = + penpal_runtime::xcm_config::LocalTeleportableToAssetHub; +pub type PenpalXcmConfig = penpal_runtime::xcm_config::XcmConfig; diff --git a/integration-tests/emulated/common/Cargo.toml b/integration-tests/emulated/common/Cargo.toml index ff465e9a2f..e1c9c700b2 100644 --- a/integration-tests/emulated/common/Cargo.toml +++ b/integration-tests/emulated/common/Cargo.toml @@ -9,7 +9,6 @@ description = "Common resources for integration testing with xcm-emulator" [dependencies] codec = { package = "parity-scale-codec", version = "3.6.9" } paste = "1.0.14" -serde_json = "1.0.111" # Substrate grandpa-primitives = { package = "sp-consensus-grandpa", version = "12.0.0" } @@ -22,7 +21,6 @@ pallet-assets = { version = "28.0.0" } pallet-balances = { version = "27.0.0" } pallet-message-queue = { version = "30.0.0" } pallet-im-online = { version = "26.0.0" } -pallet-staking = { version = "27.0.0" } beefy-primitives = { package = "sp-consensus-beefy", version = "12.0.0" } # Polkadot @@ -30,8 +28,6 @@ polkadot-primitives = { version = "6.0.0" } polkadot-runtime-parachains = { version = "6.0.0" } xcm = { package = "staging-xcm", version = "6.0.0" } pallet-xcm = { version = "6.0.0" } -polkadot-core-primitives = { version = "6.0.0" } -polkadot-parachain-primitives = { version = "5.0.0" } # Cumulus parachains-common = { version = "6.0.0" } @@ -41,25 +37,8 @@ cumulus-pallet-xcmp-queue = { version = "0.6.0" } cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook",] , version = "0.6.0" } asset-test-utils = { version = "6.0.0" } cumulus-pallet-dmp-queue = { version = "0.6.0" } -penpal-runtime = { version = "0.13.0" } - -# Local runtimes -kusama-runtime = { package = "staging-kusama-runtime", path = "../../../relay/kusama" } -kusama-runtime-constants = { path = "../../../relay/kusama/constants" } -polkadot-runtime = { path = "../../../relay/polkadot" } -polkadot-runtime-constants = { path = "../../../relay/polkadot/constants" } -asset-hub-polkadot-runtime = { path = "../../../system-parachains/asset-hubs/asset-hub-polkadot" } -asset-hub-kusama-runtime = { path = "../../../system-parachains/asset-hubs/asset-hub-kusama" } -collectives-polkadot-runtime = { path = "../../../system-parachains/collectives/collectives-polkadot" } -bridge-hub-polkadot-runtime = { path = "../../../system-parachains/bridge-hubs/bridge-hub-polkadot" } -bridge-hub-kusama-runtime = { path = "../../../system-parachains/bridge-hubs/bridge-hub-kusama" } # Bridges bp-messages = { version = "0.6.0" } pallet-bridge-messages = { version = "0.6.0" } bridge-runtime-common = { version = "0.6.0" } - -[features] -runtime-benchmarks = [ - "penpal-runtime/runtime-benchmarks" -] diff --git a/integration-tests/emulated/common/src/impls.rs b/integration-tests/emulated/common/src/impls.rs index 5969b8ac84..076e8d7e7a 100644 --- a/integration-tests/emulated/common/src/impls.rs +++ b/integration-tests/emulated/common/src/impls.rs @@ -17,12 +17,16 @@ pub use codec::{Decode, Encode}; pub use paste; pub use crate::{ - constants::{PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD}, - xcm_helpers::xcm_transact_unpaid_execution, + xcm_helpers::xcm_transact_unpaid_execution, PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, }; // Substrate -pub use frame_support::{assert_ok, traits::fungibles::Inspect}; +pub use frame_support::{ + assert_ok, + sp_runtime::AccountId32, + traits::fungibles::Inspect, + weights::{Weight, WeightMeter}, +}; pub use pallet_assets; pub use pallet_message_queue; use sp_core::Get; @@ -43,7 +47,8 @@ use pallet_bridge_messages::{Config, Instance1, OutboundLanes, Pallet}; pub use parachains_common::{AccountId, Balance}; pub use xcm_emulator::{ assert_expected_events, bx, helpers::weight_within_threshold, BridgeMessage, - BridgeMessageDispatchError, BridgeMessageHandler, Chain, Parachain, RelayChain, TestExt, + BridgeMessageDispatchError, BridgeMessageHandler, Chain, Network, Parachain, RelayChain, + TestExt, }; // Polkadot @@ -53,7 +58,7 @@ pub use polkadot_runtime_parachains::{ inclusion::{AggregateMessageOrigin, UmpQueueId}, }; pub use xcm::{ - prelude::{OriginKind, Outcome, VersionedXcm, Weight}, + prelude::{Junction, Junctions, MultiLocation, NetworkId, OriginKind, Outcome, VersionedXcm}, v3::Error, DoubleEncoded, }; @@ -169,12 +174,12 @@ where macro_rules! impl_accounts_helpers_for_relay_chain { ( $chain:ident ) => { $crate::impls::paste::paste! { - impl $chain { + impl $chain { /// Fund a set of accounts with a balance pub fn fund_accounts(accounts: Vec<($crate::impls::AccountId, $crate::impls::Balance)>) { ::execute_with(|| { for account in accounts { - $crate::impls::assert_ok!(]>::Balances::force_set_balance( + $crate::impls::assert_ok!(]>::Balances::force_set_balance( ::RuntimeOrigin::root(), account.0.into(), account.1, @@ -183,7 +188,7 @@ macro_rules! impl_accounts_helpers_for_relay_chain { }); } /// Fund a sovereign account based on its Parachain Id - pub fn fund_para_sovereign(amount: $crate::impls::Balance, para_id: $crate::impls::ParaId) -> sp_runtime::AccountId32 { + pub fn fund_para_sovereign(amount: $crate::impls::Balance, para_id: $crate::impls::ParaId) -> $crate::impls::AccountId32 { let sovereign_account = ::sovereign_account_id_of_child_para(para_id); Self::fund_accounts(vec![(sovereign_account.clone(), amount)]); sovereign_account @@ -197,15 +202,15 @@ macro_rules! impl_accounts_helpers_for_relay_chain { macro_rules! impl_assert_events_helpers_for_relay_chain { ( $chain:ident ) => { $crate::impls::paste::paste! { - type [<$chain RuntimeEvent>] = <$chain as $crate::impls::Chain>::RuntimeEvent; + type [<$chain RuntimeEvent>] = <$chain as $crate::impls::Chain>::RuntimeEvent; - impl $chain { + impl $chain { /// Asserts a dispatchable is completely executed and XCM sent pub fn assert_xcm_pallet_attempted_complete(expected_weight: Option<$crate::impls::Weight>) { $crate::impls::assert_expected_events!( Self, vec![ - [<$chain RuntimeEvent>]::XcmPallet( + [<$chain RuntimeEvent>]::::XcmPallet( $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Complete(weight) } ) => { weight: $crate::impls::weight_within_threshold( @@ -227,7 +232,7 @@ macro_rules! impl_assert_events_helpers_for_relay_chain { Self, vec![ // Dispatchable is properly executed and XCM message sent - [<$chain RuntimeEvent>]::XcmPallet( + [<$chain RuntimeEvent>]::::XcmPallet( $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Incomplete(weight, error) } ) => { weight: $crate::impls::weight_within_threshold( @@ -246,7 +251,7 @@ macro_rules! impl_assert_events_helpers_for_relay_chain { $crate::impls::assert_expected_events!( Self, vec![ - [<$chain RuntimeEvent>]::XcmPallet($crate::impls::pallet_xcm::Event::Sent { .. }) => {}, + [<$chain RuntimeEvent>]::::XcmPallet($crate::impls::pallet_xcm::Event::Sent { .. }) => {}, ] ); } @@ -261,7 +266,7 @@ macro_rules! impl_assert_events_helpers_for_relay_chain { Self, vec![ // XCM is succesfully received and proccessed - [<$chain RuntimeEvent>]::MessageQueue($crate::impls::pallet_message_queue::Event::Processed { + [<$chain RuntimeEvent>]::::MessageQueue($crate::impls::pallet_message_queue::Event::Processed { origin: $crate::impls::AggregateMessageOrigin::Ump($crate::impls::UmpQueueId::Para(id)), weight_used, success, @@ -287,7 +292,7 @@ macro_rules! impl_assert_events_helpers_for_relay_chain { macro_rules! impl_hrmp_channels_helpers_for_relay_chain { ( $chain:ident ) => { $crate::impls::paste::paste! { - impl $chain { + impl $chain { /// Init open channel request with another Parachain pub fn init_open_channel_call( recipient_para_id: $crate::impls::ParaId, @@ -327,9 +332,9 @@ macro_rules! impl_hrmp_channels_helpers_for_relay_chain { let relay_root_origin = ::RuntimeOrigin::root(); // Force process HRMP open channel requests without waiting for the next session - $crate::impls::assert_ok!(]>::Hrmp::force_process_hrmp_open( + $crate::impls::assert_ok!(]>::Hrmp::force_process_hrmp_open( relay_root_origin, - u32::MAX, + 0 )); let channel_id = $crate::impls::HrmpChannelId { sender, recipient }; @@ -338,7 +343,7 @@ macro_rules! impl_hrmp_channels_helpers_for_relay_chain { ::Runtime, >::contains_key(&channel_id); - // Check the HRMP channel has been successfully registered + // Check the HRMP channel has been successfully registrered assert!(hrmp_channel_exist) }); } @@ -347,16 +352,47 @@ macro_rules! impl_hrmp_channels_helpers_for_relay_chain { }; } +#[macro_export] +macro_rules! impl_send_transact_helpers_for_relay_chain { + ( $chain:ident ) => { + $crate::impls::paste::paste! { + impl $chain { + /// A root origin (as governance) sends `xcm::Transact` with `UnpaidExecution` and encoded `call` to child parachain. + pub fn send_unpaid_transact_to_parachain_as_root( + recipient: $crate::impls::ParaId, + call: $crate::impls::DoubleEncoded<()> + ) { + use $crate::impls::{bx, Chain, RelayChain}; + + ::execute_with(|| { + let root_origin = ::RuntimeOrigin::root(); + let destination: $crate::impls::MultiLocation = ::child_location_of(recipient); + let xcm = $crate::impls::xcm_transact_unpaid_execution(call, $crate::impls::OriginKind::Superuser); + + // Send XCM `Transact` + $crate::impls::assert_ok!(]>::XcmPallet::send( + root_origin, + bx!(destination.into()), + bx!(xcm), + )); + Self::assert_xcm_pallet_sent(); + }); + } + } + } + }; +} + #[macro_export] macro_rules! impl_accounts_helpers_for_parachain { ( $chain:ident ) => { $crate::impls::paste::paste! { - impl $chain { + impl $chain { /// Fund a set of accounts with a balance pub fn fund_accounts(accounts: Vec<($crate::impls::AccountId, $crate::impls::Balance)>) { ::execute_with(|| { for account in accounts { - $crate::impls::assert_ok!(]>::Balances::force_set_balance( + $crate::impls::assert_ok!(]>::Balances::force_set_balance( ::RuntimeOrigin::root(), account.0.into(), account.1, @@ -364,6 +400,23 @@ macro_rules! impl_accounts_helpers_for_parachain { } }); } + + /// Return local sovereign account of `para_id` on other `network_id` + pub fn sovereign_account_of_parachain_on_other_global_consensus( + network_id: $crate::impls::NetworkId, + para_id: $crate::impls::ParaId, + ) -> $crate::impls::AccountId { + let remote_location = $crate::impls::MultiLocation { + parents: 2, + interior: $crate::impls::Junctions::X2( + $crate::impls::Junction::GlobalConsensus(network_id), + $crate::impls::Junction::Parachain(para_id.into()), + ), + }; + ::execute_with(|| { + Self::sovereign_account_id_of(remote_location) + }) + } } } }; @@ -373,15 +426,15 @@ macro_rules! impl_accounts_helpers_for_parachain { macro_rules! impl_assert_events_helpers_for_parachain { ( $chain:ident ) => { $crate::impls::paste::paste! { - type [<$chain RuntimeEvent>] = <$chain as $crate::impls::Chain>::RuntimeEvent; + type [<$chain RuntimeEvent>] = <$chain as $crate::impls::Chain>::RuntimeEvent; - impl $chain { + impl $chain { /// Asserts a dispatchable is completely executed and XCM sent pub fn assert_xcm_pallet_attempted_complete(expected_weight: Option<$crate::impls::Weight>) { $crate::impls::assert_expected_events!( Self, vec![ - [<$chain RuntimeEvent>]::PolkadotXcm( + [<$chain RuntimeEvent>]::::PolkadotXcm( $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Complete(weight) } ) => { weight: $crate::impls::weight_within_threshold( @@ -403,7 +456,7 @@ macro_rules! impl_assert_events_helpers_for_parachain { Self, vec![ // Dispatchable is properly executed and XCM message sent - [<$chain RuntimeEvent>]::PolkadotXcm( + [<$chain RuntimeEvent>]::::PolkadotXcm( $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Incomplete(weight, error) } ) => { weight: $crate::impls::weight_within_threshold( @@ -423,7 +476,7 @@ macro_rules! impl_assert_events_helpers_for_parachain { Self, vec![ // Execution fails in the origin with `Barrier` - [<$chain RuntimeEvent>]::PolkadotXcm( + [<$chain RuntimeEvent>]::::PolkadotXcm( $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Error(error) } ) => { error: *error == expected_error.unwrap_or(*error), @@ -437,7 +490,7 @@ macro_rules! impl_assert_events_helpers_for_parachain { $crate::impls::assert_expected_events!( Self, vec![ - [<$chain RuntimeEvent>]::PolkadotXcm($crate::impls::pallet_xcm::Event::Sent { .. }) => {}, + [<$chain RuntimeEvent>]::::PolkadotXcm($crate::impls::pallet_xcm::Event::Sent { .. }) => {}, ] ); } @@ -447,7 +500,7 @@ macro_rules! impl_assert_events_helpers_for_parachain { $crate::impls::assert_expected_events!( Self, vec![ - [<$chain RuntimeEvent>]::ParachainSystem( + [<$chain RuntimeEvent>]::::ParachainSystem( $crate::impls::cumulus_pallet_parachain_system::Event::UpwardMessageSent { .. } ) => {}, ] @@ -459,8 +512,8 @@ macro_rules! impl_assert_events_helpers_for_parachain { $crate::impls::assert_expected_events!( Self, vec![ - [<$chain RuntimeEvent>]::DmpQueue($crate::impls::cumulus_pallet_dmp_queue::Event::ExecutedDownward { - outcome: $crate::impls::Outcome::Complete(weight), .. + [<$chain RuntimeEvent>]::::MessageQueue($crate::impls::pallet_message_queue::Event::Processed { + success: true, weight_used: weight, .. }) => { weight: $crate::impls::weight_within_threshold( ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), @@ -480,15 +533,14 @@ macro_rules! impl_assert_events_helpers_for_parachain { $crate::impls::assert_expected_events!( Self, vec![ - [<$chain RuntimeEvent>]::DmpQueue($crate::impls::cumulus_pallet_dmp_queue::Event::ExecutedDownward { - outcome: $crate::impls::Outcome::Incomplete(weight, error), .. + [<$chain RuntimeEvent>]::::MessageQueue($crate::impls::pallet_message_queue::Event::Processed { + success: false, weight_used: weight, .. }) => { weight: $crate::impls::weight_within_threshold( ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), expected_weight.unwrap_or(*weight), *weight ), - error: *error == expected_error.unwrap_or(*error), }, ] ); @@ -499,8 +551,8 @@ macro_rules! impl_assert_events_helpers_for_parachain { $crate::impls::assert_expected_events!( Self, vec![ - [<$chain RuntimeEvent>]::XcmpQueue( - $crate::impls::cumulus_pallet_xcmp_queue::Event::Success { weight, .. } + [<$chain RuntimeEvent>]::::MessageQueue($crate::impls::pallet_message_queue::Event::Processed { success: true, weight_used: weight, .. } + ) => { weight: $crate::impls::weight_within_threshold( ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), @@ -520,7 +572,7 @@ macro_rules! impl_assert_events_helpers_for_parachain { macro_rules! impl_assets_helpers_for_parachain { ( $chain:ident, $relay_chain:ident ) => { $crate::impls::paste::paste! { - impl $chain { + impl $chain { /// Returns the encoded call for `force_create` from the assets pallet pub fn force_create_asset_call( asset_id: u32, @@ -563,19 +615,21 @@ macro_rules! impl_assets_helpers_for_parachain { amount_to_mint: u128, ) { ::execute_with(|| { - $crate::impls::assert_ok!(]>::Assets::mint( + $crate::impls::assert_ok!(]>::Assets::mint( signed_origin, id.into(), beneficiary.clone().into(), amount_to_mint )); - type RuntimeEvent = <$chain as $crate::impls::Chain>::RuntimeEvent; + type RuntimeEvent = <$chain as $crate::impls::Chain>::RuntimeEvent; $crate::impls::assert_expected_events!( Self, vec![ - RuntimeEvent::Assets($crate::impls::pallet_assets::Event::Issued { asset_id, owner, amount }) => { + RuntimeEvent::::Assets( + $crate::impls::pallet_assets::Event::Issued { asset_id, owner, amount } + ) => { asset_id: *asset_id == id, owner: *owner == beneficiary.clone().into(), amount: *amount == amount_to_mint, @@ -591,53 +645,140 @@ macro_rules! impl_assets_helpers_for_parachain { min_balance: u128, is_sufficient: bool, asset_owner: $crate::impls::AccountId, + dmp_weight_threshold: Option<$crate::impls::Weight>, amount_to_mint: u128, ) { - use $crate::impls::{bx, Chain, RelayChain, Parachain, Inspect, TestExt}; - // Init values for Relay Chain - let root_origin = <$relay_chain as Chain>::RuntimeOrigin::root(); - let destination = <$relay_chain>::child_location_of(<$chain>::para_id()); - let xcm = Self::force_create_asset_xcm( - $crate::impls::OriginKind::Superuser, + use $crate::impls::Chain; + + // Force create asset + Self::force_create_asset_from_relay_as_root( id, - asset_owner.clone(), - is_sufficient, min_balance, + is_sufficient, + asset_owner.clone(), + dmp_weight_threshold ); - <$relay_chain>::execute_with(|| { - $crate::impls::assert_ok!(<$relay_chain as [<$relay_chain Pallet>]>::XcmPallet::send( - root_origin, - bx!(destination.into()), - bx!(xcm), - )); + // Mint asset for System Parachain's sender + let signed_origin = ::RuntimeOrigin::signed(asset_owner.clone()); + Self::mint_asset(signed_origin, id, asset_owner, amount_to_mint); + } - <$relay_chain>::assert_xcm_pallet_sent(); - }); + /// Relay Chain sends `Transact` instruction with `force_create_asset` to Parachain with `Assets` instance of `pallet_assets` . + pub fn force_create_asset_from_relay_as_root( + id: u32, + min_balance: u128, + is_sufficient: bool, + asset_owner: $crate::impls::AccountId, + dmp_weight_threshold: Option<$crate::impls::Weight>, + ) { + use $crate::impls::{Parachain, Inspect, TestExt}; + + <$relay_chain>::send_unpaid_transact_to_parachain_as_root( + Self::para_id(), + Self::force_create_asset_call(id, asset_owner.clone(), is_sufficient, min_balance), + ); + // Receive XCM message in Assets Parachain Self::execute_with(|| { - Self::assert_dmp_queue_complete(Some($crate::impls::Weight::from_parts(1_020_000_000, 200_000))); + type RuntimeEvent = <$chain as $crate::impls::Chain>::RuntimeEvent; - type RuntimeEvent = <$chain as $crate::impls::Chain>::RuntimeEvent; + Self::assert_dmp_queue_complete(dmp_weight_threshold); $crate::impls::assert_expected_events!( Self, vec![ - // Asset has been created - RuntimeEvent::Assets($crate::impls::pallet_assets::Event::ForceCreated { asset_id, owner }) => { + RuntimeEvent::::Assets($crate::impls::pallet_assets::Event::ForceCreated { asset_id, owner }) => { asset_id: *asset_id == id, - owner: *owner == asset_owner.clone(), + owner: *owner == asset_owner, }, ] ); - assert!(]>::Assets::asset_exists(id.into())); + assert!(]>::Assets::asset_exists(id.into())); }); + } + } + } + }; +} - let signed_origin = ::RuntimeOrigin::signed(asset_owner.clone()); +#[macro_export] +macro_rules! impl_foreign_assets_helpers_for_parachain { + ( $chain:ident, $relay_chain:ident ) => { + $crate::impls::paste::paste! { + impl $chain { + /// Create foreign assets using sudo `ForeignAssets::force_create()` + pub fn force_create_foreign_asset( + id: $crate::impls::MultiLocation, + owner: $crate::impls::AccountId, + is_sufficient: bool, + min_balance: u128, + prefund_accounts: Vec<($crate::impls::AccountId, u128)>, + ) { + use $crate::impls::Inspect; + let sudo_origin = <$chain as $crate::impls::Chain>::RuntimeOrigin::root(); + ::execute_with(|| { + $crate::impls::assert_ok!( + ]>::ForeignAssets::force_create( + sudo_origin, + id, + owner.clone().into(), + is_sufficient, + min_balance, + ) + ); + assert!(]>::ForeignAssets::asset_exists(id)); + type RuntimeEvent = <$chain as $crate::impls::Chain>::RuntimeEvent; + $crate::impls::assert_expected_events!( + Self, + vec![ + RuntimeEvent::::ForeignAssets( + $crate::impls::pallet_assets::Event::ForceCreated { + asset_id, + .. + } + ) => { asset_id: *asset_id == id, }, + ] + ); + }); + for (beneficiary, amount) in prefund_accounts.into_iter() { + let signed_origin = + <$chain as $crate::impls::Chain>::RuntimeOrigin::signed(owner.clone()); + Self::mint_foreign_asset(signed_origin, id, beneficiary, amount); + } + } - // Mint asset for System Parachain's sender - Self::mint_asset(signed_origin, id, asset_owner, amount_to_mint); + /// Mint assets making use of the ForeignAssets pallet-assets instance + pub fn mint_foreign_asset( + signed_origin: ::RuntimeOrigin, + id: $crate::impls::MultiLocation, + beneficiary: $crate::impls::AccountId, + amount_to_mint: u128, + ) { + ::execute_with(|| { + $crate::impls::assert_ok!(]>::ForeignAssets::mint( + signed_origin, + id.into(), + beneficiary.clone().into(), + amount_to_mint + )); + + type RuntimeEvent = <$chain as $crate::impls::Chain>::RuntimeEvent; + + $crate::impls::assert_expected_events!( + Self, + vec![ + RuntimeEvent::::ForeignAssets( + $crate::impls::pallet_assets::Event::Issued { asset_id, owner, amount } + ) => { + asset_id: *asset_id == id, + owner: *owner == beneficiary.clone().into(), + amount: *amount == amount_to_mint, + }, + ] + ); + }); } } } diff --git a/integration-tests/emulated/common/src/lib.rs b/integration-tests/emulated/common/src/lib.rs index 11e6ef5921..8058f88b58 100644 --- a/integration-tests/emulated/common/src/lib.rs +++ b/integration-tests/emulated/common/src/lib.rs @@ -13,316 +13,137 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![cfg(not(feature = "runtime-benchmarks"))] - -pub mod constants; pub mod impls; +pub mod macros; pub mod xcm_helpers; -use constants::{ - accounts::{ALICE, BOB}, - asset_hub_kusama, asset_hub_polkadot, bridge_hub_kusama, bridge_hub_polkadot, collectives, - kusama, penpal, polkadot, -}; - // Substrate -use frame_support::traits::OnInitialize; +use beefy_primitives::ecdsa_crypto::AuthorityId as BeefyId; +use grandpa_primitives::AuthorityId as GrandpaId; +use pallet_im_online::sr25519::AuthorityId as ImOnlineId; +use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; +use sp_consensus_babe::AuthorityId as BabeId; +use sp_core::{sr25519, Pair, Public}; +use sp_runtime::{ + traits::{IdentifyAccount, Verify}, + MultiSignature, +}; // Cumulus -use xcm_emulator::{ - // decl_test_bridges, - decl_test_networks, - decl_test_parachains, - decl_test_relay_chains, - decl_test_sender_receiver_accounts_parameter_types, - DefaultMessageProcessor, -}; +use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId}; +use polkadot_primitives::{AssignmentId, ValidatorId}; -use polkadot_primitives::runtime_api::runtime_decl_for_parachain_host::ParachainHostV8; +/// The default XCM version to set in genesis config. +pub const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; -decl_test_relay_chains! { - #[api_version(5)] - pub struct Polkadot { - genesis = polkadot::genesis(), - on_init = (), - runtime = polkadot_runtime, - core = { - MessageProcessor: DefaultMessageProcessor, - SovereignAccountOf: polkadot_runtime::xcm_config::SovereignAccountOf, - }, - pallets = { - XcmPallet: polkadot_runtime::XcmPallet, - Balances: polkadot_runtime::Balances, - Hrmp: polkadot_runtime::Hrmp, - } - }, - #[api_version(5)] - pub struct Kusama { - genesis = kusama::genesis(), - on_init = (), - runtime = kusama_runtime, - core = { - MessageProcessor: DefaultMessageProcessor, - SovereignAccountOf: kusama_runtime::xcm_config::SovereignAccountOf, - }, - pallets = { - XcmPallet: kusama_runtime::XcmPallet, - Balances: kusama_runtime::Balances, - Hrmp: kusama_runtime::Hrmp, - } - }, -} +pub const XCM_V2: u32 = 3; +pub const XCM_V3: u32 = 2; +pub const REF_TIME_THRESHOLD: u64 = 33; +pub const PROOF_SIZE_THRESHOLD: u64 = 33; -decl_test_parachains! { - // Polkadot Parachains - pub struct AssetHubPolkadot { - genesis = asset_hub_polkadot::genesis(), - on_init = { - asset_hub_polkadot_runtime::AuraExt::on_initialize(1); - }, - runtime = asset_hub_polkadot_runtime, - core = { - XcmpMessageHandler: asset_hub_polkadot_runtime::XcmpQueue, - DmpMessageHandler: asset_hub_polkadot_runtime::DmpQueue, - LocationToAccountId: asset_hub_polkadot_runtime::xcm_config::LocationToAccountId, - ParachainInfo: asset_hub_polkadot_runtime::ParachainInfo, - }, - pallets = { - PolkadotXcm: asset_hub_polkadot_runtime::PolkadotXcm, - Assets: asset_hub_polkadot_runtime::Assets, - Balances: asset_hub_polkadot_runtime::Balances, - } - }, - pub struct Collectives { - genesis = collectives::genesis(), - on_init = { - collectives_polkadot_runtime::AuraExt::on_initialize(1); - }, - runtime = collectives_polkadot_runtime, - core = { - XcmpMessageHandler: collectives_polkadot_runtime::XcmpQueue, - DmpMessageHandler: collectives_polkadot_runtime::DmpQueue, - LocationToAccountId: collectives_polkadot_runtime::xcm_config::LocationToAccountId, - ParachainInfo: collectives_polkadot_runtime::ParachainInfo, - }, - pallets = { - PolkadotXcm: collectives_polkadot_runtime::PolkadotXcm, - Balances: collectives_polkadot_runtime::Balances, - } - }, - pub struct BridgeHubPolkadot { - genesis = bridge_hub_polkadot::genesis(), - on_init = { - bridge_hub_polkadot_runtime::AuraExt::on_initialize(1); - }, - runtime = bridge_hub_polkadot_runtime, - core = { - XcmpMessageHandler: bridge_hub_polkadot_runtime::XcmpQueue, - DmpMessageHandler: bridge_hub_polkadot_runtime::DmpQueue, - LocationToAccountId: bridge_hub_polkadot_runtime::xcm_config::LocationToAccountId, - ParachainInfo: bridge_hub_polkadot_runtime::ParachainInfo, - }, - pallets = { - PolkadotXcm: bridge_hub_polkadot_runtime::PolkadotXcm, - } - }, - pub struct PenpalPolkadotA { - genesis = penpal::genesis(penpal::PARA_ID_A), - on_init = { - penpal_runtime::AuraExt::on_initialize(1); - }, - runtime = penpal_runtime, - core = { - XcmpMessageHandler: penpal_runtime::XcmpQueue, - DmpMessageHandler: penpal_runtime::DmpQueue, - LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, - ParachainInfo: penpal_runtime::ParachainInfo, - }, - pallets = { - PolkadotXcm: penpal_runtime::PolkadotXcm, - Assets: penpal_runtime::Assets, - } - }, - pub struct PenpalPolkadotB { - genesis = penpal::genesis(penpal::PARA_ID_B), - on_init = { - penpal_runtime::AuraExt::on_initialize(1); - }, - runtime = penpal_runtime, - core = { - XcmpMessageHandler: penpal_runtime::XcmpQueue, - DmpMessageHandler: penpal_runtime::DmpQueue, - LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, - ParachainInfo: penpal_runtime::ParachainInfo, - }, - pallets = { - PolkadotXcm: penpal_runtime::PolkadotXcm, - Assets: penpal_runtime::Assets, - } - }, - // Kusama Parachains - pub struct AssetHubKusama { - genesis = asset_hub_kusama::genesis(), - on_init = { - asset_hub_kusama_runtime::AuraExt::on_initialize(1); - }, - runtime = asset_hub_kusama_runtime, - core = { - XcmpMessageHandler: asset_hub_kusama_runtime::XcmpQueue, - DmpMessageHandler: asset_hub_kusama_runtime::DmpQueue, - LocationToAccountId: asset_hub_kusama_runtime::xcm_config::LocationToAccountId, - ParachainInfo: asset_hub_kusama_runtime::ParachainInfo, - }, - pallets = { - PolkadotXcm: asset_hub_kusama_runtime::PolkadotXcm, - Assets: asset_hub_kusama_runtime::Assets, - ForeignAssets: asset_hub_kusama_runtime::ForeignAssets, - PoolAssets: asset_hub_kusama_runtime::PoolAssets, - AssetConversion: asset_hub_kusama_runtime::AssetConversion, - Balances: asset_hub_kusama_runtime::Balances, - } - }, - pub struct BridgeHubKusama { - genesis = bridge_hub_kusama::genesis(), - on_init = { - bridge_hub_kusama_runtime::AuraExt::on_initialize(1); - }, - runtime = bridge_hub_kusama_runtime, - core = { - XcmpMessageHandler: bridge_hub_kusama_runtime::XcmpQueue, - DmpMessageHandler: bridge_hub_kusama_runtime::DmpQueue, - LocationToAccountId: bridge_hub_kusama_runtime::xcm_config::LocationToAccountId, - ParachainInfo: bridge_hub_kusama_runtime::ParachainInfo, - }, - pallets = { - PolkadotXcm: bridge_hub_kusama_runtime::PolkadotXcm, - } - }, - pub struct PenpalKusamaA { - genesis = penpal::genesis(penpal::PARA_ID_A), - on_init = { - penpal_runtime::AuraExt::on_initialize(1); - }, - runtime = penpal_runtime, - core = { - XcmpMessageHandler: penpal_runtime::XcmpQueue, - DmpMessageHandler: penpal_runtime::DmpQueue, - LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, - ParachainInfo: penpal_runtime::ParachainInfo, - }, - pallets = { - PolkadotXcm: penpal_runtime::PolkadotXcm, - Assets: penpal_runtime::Assets, - } - }, - pub struct PenpalKusamaB { - genesis = penpal::genesis(penpal::PARA_ID_B), - on_init = { - penpal_runtime::AuraExt::on_initialize(1); - }, - runtime = penpal_runtime, - core = { - XcmpMessageHandler: penpal_runtime::XcmpQueue, - DmpMessageHandler: penpal_runtime::DmpQueue, - LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, - ParachainInfo: penpal_runtime::ParachainInfo, - }, - pallets = { - PolkadotXcm: penpal_runtime::PolkadotXcm, - Assets: penpal_runtime::Assets, - } - }, -} +type AccountPublic = ::Signer; -decl_test_networks! { - pub struct PolkadotMockNet { - relay_chain = Polkadot, - parachains = vec![ - AssetHubPolkadot, - Collectives, - BridgeHubPolkadot, - PenpalPolkadotA, - PenpalPolkadotB, - ], - // TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged - // bridge = PolkadotKusamaMockBridge - bridge = () - }, - pub struct KusamaMockNet { - relay_chain = Kusama, - parachains = vec![ - AssetHubKusama, - BridgeHubKusama, - PenpalKusamaA, - PenpalKusamaB, - ], - // TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged - // bridge = KusamaPolkadotMockBridge - bridge = () - }, +/// Helper function to generate a crypto pair from seed +fn get_from_seed(seed: &str) -> ::Public { + TPublic::Pair::from_string(&format!("//{}", seed), None) + .expect("static values are valid; qed") + .public() } -// TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged -// decl_test_bridges! { -// pub struct PolkadotKusamaMockBridge { -// source = BridgeHubPolkadot, -// target = BridgeHubKusama, -// handler = PolkadotKusamaMessageHandler -// }, -// pub struct KusamaPolkadotMockBridge { -// source = BridgeHubKusama, -// target = BridgeHubPolkadot, -// handler = KusamaPolkadotMessageHandler -// } -// } - -// Polkadot implementation -impl_accounts_helpers_for_relay_chain!(Polkadot); -impl_assert_events_helpers_for_relay_chain!(Polkadot); -impl_hrmp_channels_helpers_for_relay_chain!(Polkadot); - -// Kusama implementation -impl_accounts_helpers_for_relay_chain!(Kusama); -impl_assert_events_helpers_for_relay_chain!(Kusama); -impl_hrmp_channels_helpers_for_relay_chain!(Kusama); - -// AssetHubPolkadot implementation -impl_accounts_helpers_for_parachain!(AssetHubPolkadot); -impl_assets_helpers_for_parachain!(AssetHubPolkadot, Polkadot); -impl_assert_events_helpers_for_parachain!(AssetHubPolkadot); - -// AssetHubKusama implementation -impl_accounts_helpers_for_parachain!(AssetHubKusama); -impl_assets_helpers_for_parachain!(AssetHubKusama, Kusama); -impl_assert_events_helpers_for_parachain!(AssetHubKusama); - -// PenpalPolkadot implementations -impl_assert_events_helpers_for_parachain!(PenpalPolkadotA); -impl_assert_events_helpers_for_parachain!(PenpalPolkadotB); +/// Helper function to generate an account ID from seed. +pub fn get_account_id_from_seed(seed: &str) -> AccountId +where + AccountPublic: From<::Public>, +{ + AccountPublic::from(get_from_seed::(seed)).into_account() +} -// PenpalKusama implementations -impl_assert_events_helpers_for_parachain!(PenpalKusamaA); -impl_assert_events_helpers_for_parachain!(PenpalKusamaB); +pub mod accounts { + use super::*; + pub const ALICE: &str = "Alice"; + pub const BOB: &str = "Bob"; + pub const CHARLIE: &str = "Charlie"; + pub const DAVE: &str = "Dave"; + pub const EVE: &str = "Eve"; + pub const FERDIE: &str = "Ferdei"; + pub const ALICE_STASH: &str = "Alice//stash"; + pub const BOB_STASH: &str = "Bob//stash"; + pub const CHARLIE_STASH: &str = "Charlie//stash"; + pub const DAVE_STASH: &str = "Dave//stash"; + pub const EVE_STASH: &str = "Eve//stash"; + pub const FERDIE_STASH: &str = "Ferdie//stash"; + pub const FERDIE_BEEFY: &str = "Ferdie//stash"; + + pub fn init_balances() -> Vec { + vec![ + get_account_id_from_seed::(ALICE), + get_account_id_from_seed::(BOB), + get_account_id_from_seed::(CHARLIE), + get_account_id_from_seed::(DAVE), + get_account_id_from_seed::(EVE), + get_account_id_from_seed::(FERDIE), + get_account_id_from_seed::(ALICE_STASH), + get_account_id_from_seed::(BOB_STASH), + get_account_id_from_seed::(CHARLIE_STASH), + get_account_id_from_seed::(DAVE_STASH), + get_account_id_from_seed::(EVE_STASH), + get_account_id_from_seed::(FERDIE_STASH), + ] + } +} -// Collectives implementation -impl_accounts_helpers_for_parachain!(Collectives); -impl_assert_events_helpers_for_parachain!(Collectives); +pub mod collators { + use super::*; + + pub fn invulnerables_asset_hub_polkadot() -> Vec<(AccountId, AssetHubPolkadotAuraId)> { + vec![ + ( + get_account_id_from_seed::("Alice"), + get_from_seed::("Alice"), + ), + ( + get_account_id_from_seed::("Bob"), + get_from_seed::("Bob"), + ), + ] + } + + pub fn invulnerables() -> Vec<(AccountId, AuraId)> { + vec![ + ( + get_account_id_from_seed::("Alice"), + get_from_seed::("Alice"), + ), + (get_account_id_from_seed::("Bob"), get_from_seed::("Bob")), + ] + } +} -decl_test_sender_receiver_accounts_parameter_types! { - // Relays - Polkadot { sender: ALICE, receiver: BOB }, - Kusama { sender: ALICE, receiver: BOB }, - // Asset Hubs - AssetHubPolkadot { sender: ALICE, receiver: BOB }, - AssetHubKusama { sender: ALICE, receiver: BOB }, - // Collectives - Collectives { sender: ALICE, receiver: BOB }, - // Bridged Hubs - BridgeHubPolkadot { sender: ALICE, receiver: BOB }, - BridgeHubKusama { sender: ALICE, receiver: BOB }, - // Penpals - PenpalPolkadotA { sender: ALICE, receiver: BOB }, - PenpalPolkadotB { sender: ALICE, receiver: BOB }, - PenpalKusamaA { sender: ALICE, receiver: BOB }, - PenpalKusamaB { sender: ALICE, receiver: BOB } +pub mod validators { + use super::*; + + pub fn initial_authorities() -> Vec<( + AccountId, + AccountId, + BabeId, + GrandpaId, + ImOnlineId, + ValidatorId, + AssignmentId, + AuthorityDiscoveryId, + BeefyId, + )> { + let seed = "Alice"; + vec![( + get_account_id_from_seed::(&format!("{}//stash", seed)), + get_account_id_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + )] + } } diff --git a/integration-tests/emulated/common/src/macros.rs b/integration-tests/emulated/common/src/macros.rs index a65b2057af..8718f1e83a 100644 --- a/integration-tests/emulated/common/src/macros.rs +++ b/integration-tests/emulated/common/src/macros.rs @@ -13,28 +13,43 @@ // See the License for the specific language governing permissions and // limitations under the License. +pub use paste; + +// Substrate +pub use pallet_balances; +pub use pallet_message_queue; +pub use pallet_xcm; + +// Polkadot +pub use xcm::prelude::{AccountId32, WeightLimit}; + +// Cumulus +pub use asset_test_utils; +pub use cumulus_pallet_xcmp_queue; +pub use xcm_emulator::Chain; + #[macro_export] macro_rules! test_parachain_is_trusted_teleporter { ( $sender_para:ty, $sender_xcm_config:ty, vec![$( $receiver_para:ty ),+], ($assets:expr, $amount:expr) ) => { - $crate::paste::paste! { + $crate::macros::paste::paste! { // init Origin variables let sender = [<$sender_para Sender>]::get(); let mut para_sender_balance_before = - <$sender_para as $crate::Chain>::account_data_of(sender.clone()).free; - let origin = <$sender_para as $crate::Chain>::RuntimeOrigin::signed(sender.clone()); + <$sender_para as $crate::macros::Chain>::account_data_of(sender.clone()).free; + let origin = <$sender_para as $crate::macros::Chain>::RuntimeOrigin::signed(sender.clone()); let fee_asset_item = 0; - let weight_limit = $crate::WeightLimit::Unlimited; + let weight_limit = $crate::macros::WeightLimit::Unlimited; $( { // init Destination variables let receiver = [<$receiver_para Receiver>]::get(); let para_receiver_balance_before = - <$receiver_para as $crate::Chain>::account_data_of(receiver.clone()).free; + <$receiver_para as $crate::macros::Chain>::account_data_of(receiver.clone()).free; let para_destination = <$sender_para>::sibling_location_of(<$receiver_para>::para_id()); let beneficiary: MultiLocation = - $crate::AccountId32 { network: None, id: receiver.clone().into() }.into(); + $crate::macros::AccountId32 { network: None, id: receiver.clone().into() }.into(); // Send XCM message from Origin Parachain // We are only testing the limited teleport version, which should be ok since success will @@ -49,19 +64,19 @@ macro_rules! test_parachain_is_trusted_teleporter { weight_limit.clone(), )); - type RuntimeEvent = <$sender_para as $crate::Chain>::RuntimeEvent; + type RuntimeEvent = <$sender_para as $crate::macros::Chain>::RuntimeEvent; assert_expected_events!( $sender_para, vec![ RuntimeEvent::PolkadotXcm( - $crate::pallet_xcm::Event::Attempted { outcome: Outcome::Complete { .. } } + $crate::macros::pallet_xcm::Event::Attempted { outcome: Outcome::Complete { .. } } ) => {}, RuntimeEvent::XcmpQueue( - $crate::cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. } + $crate::macros::cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. } ) => {}, RuntimeEvent::Balances( - $crate::pallet_balances::Event::Withdraw { who: sender, amount } + $crate::macros::pallet_balances::Event::Withdraw { who: sender, amount } ) => {}, ] ); @@ -69,16 +84,16 @@ macro_rules! test_parachain_is_trusted_teleporter { // Receive XCM message in Destination Parachain <$receiver_para>::execute_with(|| { - type RuntimeEvent = <$receiver_para as $crate::Chain>::RuntimeEvent; + type RuntimeEvent = <$receiver_para as $crate::macros::Chain>::RuntimeEvent; assert_expected_events!( $receiver_para, vec![ RuntimeEvent::Balances( - $crate::pallet_balances::Event::Deposit { who: receiver, .. } + $crate::macros::pallet_balances::Event::Deposit { who: receiver, .. } ) => {}, - RuntimeEvent::XcmpQueue( - $crate::cumulus_pallet_xcmp_queue::Event::Success { .. } + RuntimeEvent::MessageQueue( + $crate::macros::pallet_message_queue::Event::Processed { success: true, .. } ) => {}, ] ); @@ -86,11 +101,11 @@ macro_rules! test_parachain_is_trusted_teleporter { // Check if balances are updated accordingly in Origin and Destination Parachains let para_sender_balance_after = - <$sender_para as $crate::Chain>::account_data_of(sender.clone()).free; + <$sender_para as $crate::macros::Chain>::account_data_of(sender.clone()).free; let para_receiver_balance_after = - <$receiver_para as $crate::Chain>::account_data_of(receiver.clone()).free; + <$receiver_para as $crate::macros::Chain>::account_data_of(receiver.clone()).free; let delivery_fees = <$sender_para>::execute_with(|| { - asset_test_utils::xcm_helpers::transfer_assets_delivery_fees::< + $crate::macros::asset_test_utils::xcm_helpers::transfer_assets_delivery_fees::< <$sender_xcm_config as xcm_executor::Config>::XcmSender, >($assets.clone(), fee_asset_item, weight_limit.clone(), beneficiary, para_destination) }); @@ -99,9 +114,108 @@ macro_rules! test_parachain_is_trusted_teleporter { assert!(para_receiver_balance_after > para_receiver_balance_before); // Update sender balance - para_sender_balance_before = <$sender_para as $crate::Chain>::account_data_of(sender.clone()).free; + para_sender_balance_before = <$sender_para as $crate::macros::Chain>::account_data_of(sender.clone()).free; } )+ } }; } + +#[macro_export] +macro_rules! include_penpal_create_foreign_asset_on_asset_hub { + ( $penpal:ident, $asset_hub:ident, $relay_ed:expr, $weight_to_fee:expr) => { + $crate::impls::paste::paste! { + pub fn penpal_create_foreign_asset_on_asset_hub( + asset_id_on_penpal: u32, + foreign_asset_at_asset_hub: MultiLocation, + ah_as_seen_by_penpal: MultiLocation, + is_sufficient: bool, + asset_owner: AccountId, + prefund_amount: u128, + ) { + use frame_support::weights::WeightToFee; + let ah_check_account = $asset_hub::execute_with(|| { + <$asset_hub as [<$asset_hub Pallet>]>::PolkadotXcm::check_account() + }); + let penpal_check_account = + $penpal::execute_with(|| <$penpal as [<$penpal Pallet>]>::PolkadotXcm::check_account()); + let penpal_as_seen_by_ah = $asset_hub::sibling_location_of($penpal::para_id()); + + // prefund SA of Penpal on AssetHub with enough native tokens to pay for creating + // new foreign asset, also prefund CheckingAccount with ED, because teleported asset + // itself might not be sufficient and CheckingAccount cannot be created otherwise + let sov_penpal_on_ah = $asset_hub::sovereign_account_id_of(penpal_as_seen_by_ah); + $asset_hub::fund_accounts(vec![ + (sov_penpal_on_ah.clone().into(), $relay_ed * 100_000_000_000), + (ah_check_account.clone().into(), $relay_ed * 1000), + ]); + + // prefund SA of AssetHub on Penpal with native asset + let sov_ah_on_penpal = $penpal::sovereign_account_id_of(ah_as_seen_by_penpal); + $penpal::fund_accounts(vec![ + (sov_ah_on_penpal.into(), $relay_ed * 1_000_000_000), + (penpal_check_account.clone().into(), $relay_ed * 1000), + ]); + + // Force create asset on $penpal and prefund [<$penpal Sender>] + $penpal::force_create_and_mint_asset( + asset_id_on_penpal, + ASSET_MIN_BALANCE, + is_sufficient, + asset_owner, + None, + prefund_amount, + ); + + let require_weight_at_most = Weight::from_parts(1_100_000_000_000, 30_000); + // `OriginKind::Xcm` required by ForeignCreators pallet-assets origin filter + let origin_kind = OriginKind::Xcm; + let call_create_foreign_assets = + <$asset_hub as Chain>::RuntimeCall::ForeignAssets(pallet_assets::Call::< + <$asset_hub as Chain>::Runtime, + pallet_assets::Instance2, + >::create { + id: foreign_asset_at_asset_hub, + min_balance: ASSET_MIN_BALANCE, + admin: sov_penpal_on_ah.into(), + }) + .encode(); + let buy_execution_fee_amount = $weight_to_fee::weight_to_fee( + &Weight::from_parts(10_100_000_000_000, 300_000), + ); + let buy_execution_fee = MultiAsset { + id: Concrete(MultiLocation { parents: 1, interior: Here }), + fun: Fungible(buy_execution_fee_amount), + }; + let xcm = VersionedXcm::from(Xcm(vec![ + WithdrawAsset { 0: vec![buy_execution_fee.clone()].into() }, + BuyExecution { fees: buy_execution_fee.clone(), weight_limit: Unlimited }, + Transact { require_weight_at_most, origin_kind, call: call_create_foreign_assets.into() }, + ExpectTransactStatus(MaybeErrorCode::Success), + RefundSurplus, + DepositAsset { assets: All.into(), beneficiary: penpal_as_seen_by_ah }, + ])); + // Send XCM message from penpal => asset_hub + let sudo_penpal_origin = <$penpal as Chain>::RuntimeOrigin::root(); + $penpal::execute_with(|| { + assert_ok!(<$penpal as [<$penpal Pallet>]>::PolkadotXcm::send( + sudo_penpal_origin.clone(), + bx!(ah_as_seen_by_penpal.into()), + bx!(xcm), + )); + type RuntimeEvent = <$penpal as Chain>::RuntimeEvent; + assert_expected_events!( + $penpal, + vec![ + RuntimeEvent::PolkadotXcm(pallet_xcm::Event::Sent { .. }) => {}, + ] + ); + }); + $asset_hub::execute_with(|| { + type ForeignAssets = <$asset_hub as [<$asset_hub Pallet>]>::ForeignAssets; + assert!(ForeignAssets::asset_exists(foreign_asset_at_asset_hub)); + }); + } + } + }; +} diff --git a/integration-tests/emulated/common/src/xcm_helpers.rs b/integration-tests/emulated/common/src/xcm_helpers.rs index 4096cdbba0..c40f51a440 100644 --- a/integration-tests/emulated/common/src/xcm_helpers.rs +++ b/integration-tests/emulated/common/src/xcm_helpers.rs @@ -15,14 +15,7 @@ // along with Cumulus. If not, see . use parachains_common::AccountId; -use xcm::{ - prelude::{ - AccountId32, All, BuyExecution, DepositAsset, MultiAsset, MultiAssets, MultiLocation, - OriginKind, RefundSurplus, Transact, UnpaidExecution, VersionedXcm, Weight, WeightLimit, - WithdrawAsset, Xcm, X1, - }, - DoubleEncoded, -}; +use xcm::{prelude::*, DoubleEncoded}; /// Helper method to build a XCM with a `Transact` instruction and paying for its execution pub fn xcm_transact_paid_execution( @@ -64,3 +57,16 @@ pub fn xcm_transact_unpaid_execution( Transact { require_weight_at_most, origin_kind, call }, ])) } +/// Helper method to get the non-fee asset used in multiple assets transfer +pub fn non_fee_asset(assets: &MultiAssets, fee_idx: usize) -> Option<(MultiLocation, u128)> { + let asset = assets.inner().into_iter().enumerate().find(|a| a.0 != fee_idx)?.1.clone(); + let asset_id = match asset.id { + Concrete(id) => id, + _ => return None, + }; + let asset_amount = match asset.fun { + Fungible(amount) => amount, + _ => return None, + }; + Some((asset_id, asset_amount)) +} From 0a343f3f41117003ef023e7c126db3e9683e40ca Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 12 Jan 2024 16:04:09 +0100 Subject: [PATCH 063/316] chore: fmt for all --- relay/kusama/src/lib.rs | 2 +- system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs | 4 ++-- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 3 ++- .../bridge-hub-kusama/src/bridge_to_polkadot_config.rs | 3 ++- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 7 +++++-- .../bridge-hubs/bridge-hub-kusama/tests/tests.rs | 9 +++++---- .../bridge-hub-polkadot/src/bridge_to_kusama_config.rs | 3 ++- .../bridge-hubs/bridge-hub-polkadot/src/lib.rs | 7 +++++-- .../bridge-hubs/bridge-hub-polkadot/tests/tests.rs | 9 +++++---- .../collectives/collectives-polkadot/src/lib.rs | 6 +++--- 10 files changed, 32 insertions(+), 21 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index ed280495f2..f9f3717aac 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1669,7 +1669,7 @@ pub type Migrations = migrations::Unreleased; /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { - use super::{Runtime, parachains_configuration}; + use super::{parachains_configuration, Runtime}; /// Unreleased migrations. Add new ones here: pub type Unreleased = ( diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index b74299072f..c02dc8af8e 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -70,8 +70,8 @@ use frame_system::{ use pallet_asset_conversion_tx_payment::AssetConversionAdapter; use pallet_nfts::PalletFeatures; use parachains_common::{ - impls::DealWithFees, AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, BlockNumber, - Hash, Header, Nonce, Signature, message_queue::*, + impls::DealWithFees, message_queue::*, AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, + BlockNumber, Hash, Header, Nonce, Signature, }; use sp_runtime::RuntimeDebug; use system_parachains_constants::{ diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 681a52d3a0..23711af960 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -103,8 +103,9 @@ use frame_system::{ use pallet_nfts::PalletFeatures; use parachains_common::{ impls::{AssetsToBlockAuthor, DealWithFees}, + message_queue::*, AccountId, AssetHubPolkadotAuraId as AuraId, AssetIdForTrustBackedAssets, Balance, BlockNumber, - Hash, Header, Nonce, Signature, message_queue::*, + Hash, Header, Nonce, Signature, }; use sp_runtime::RuntimeDebug; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs index 90642c0fee..4d2cab6726 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs @@ -265,7 +265,8 @@ impl pallet_xcm_bridge_hub::Config for Runtime } /// On messages delivered callback. -type OnMessagesDeliveredFromPolkadot = XcmBlobHaulerAdapter; +type OnMessagesDeliveredFromPolkadot = + XcmBlobHaulerAdapter; /// Messaging Bridge configuration for BridgeHubKusama -> BridgeHubPolkadot pub struct WithBridgeHubPolkadotMessageBridge; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index d41f76dc19..e70b7fd62d 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -60,7 +60,9 @@ use frame_support::{ dispatch::DispatchClass, genesis_builder_helper::{build_config, create_default_config}, parameter_types, - traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, TransformOrigin}, + traits::{ + ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, TransformOrigin, + }, weights::{ConstantMultiplier, Weight}, PalletId, }; @@ -85,7 +87,8 @@ use polkadot_runtime_constants::system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use parachains_common::{ - impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, message_queue::*, + impls::DealWithFees, message_queue::*, AccountId, Balance, BlockNumber, Hash, Header, Nonce, + Signature, }; use system_parachains_constants::{ kusama::{consensus::*, currency::*, fee::WeightToFee}, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index bd935645c0..92b5ab9eba 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -17,10 +17,11 @@ use bp_polkadot_core::Signature; use bridge_hub_kusama_runtime::{ bridge_to_polkadot_config::{ - AssetHubPolkadotParaId, BridgeGrandpaPolkadotInstance, BridgeHubPolkadotChainId, BridgeParachainPolkadotInstance, - DeliveryRewardInBalance, PolkadotGlobalConsensusNetwork, RefundBridgeHubPolkadotMessages, - RequiredStakeForStakeAndSlash, WithBridgeHubPolkadotMessageBridge, - WithBridgeHubPolkadotMessagesInstance, XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, + AssetHubPolkadotParaId, BridgeGrandpaPolkadotInstance, BridgeHubPolkadotChainId, + BridgeParachainPolkadotInstance, DeliveryRewardInBalance, PolkadotGlobalConsensusNetwork, + RefundBridgeHubPolkadotMessages, RequiredStakeForStakeAndSlash, + WithBridgeHubPolkadotMessageBridge, WithBridgeHubPolkadotMessagesInstance, + XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, }, xcm_config::{KsmRelayLocation, RelayNetwork, XcmConfig}, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs index 9a592445e4..3f43e4c4c3 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs @@ -265,7 +265,8 @@ impl pallet_xcm_bridge_hub::Config for Runtime { } /// On messages delivered callback. -type OnMessagesDeliveredFromKusama = XcmBlobHaulerAdapter; +type OnMessagesDeliveredFromKusama = + XcmBlobHaulerAdapter; /// Messaging Bridge configuration for BridgeHubPolkadot -> BridgeHubKusama pub struct WithBridgeHubKusamaMessageBridge; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index f2430a515e..302b12c195 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -60,7 +60,9 @@ use frame_support::{ dispatch::DispatchClass, genesis_builder_helper::{build_config, create_default_config}, parameter_types, - traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, TransformOrigin}, + traits::{ + ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, TransformOrigin, + }, weights::{ConstantMultiplier, Weight}, PalletId, }; @@ -86,7 +88,8 @@ use polkadot_runtime_constants::system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use parachains_common::{ - impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, message_queue::*, + impls::DealWithFees, message_queue::*, AccountId, Balance, BlockNumber, Hash, Header, Nonce, + Signature, }; use system_parachains_constants::{ polkadot::{consensus::*, currency::*, fee::WeightToFee}, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index 1ef6e2585d..ba7a5c2d87 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -17,10 +17,11 @@ use bp_polkadot_core::Signature; use bridge_hub_polkadot_runtime::{ bridge_to_kusama_config::{ - AssetHubKusamaParaId, BridgeGrandpaKusamaInstance, BridgeHubKusamaChainId, BridgeParachainKusamaInstance, - DeliveryRewardInBalance, KusamaGlobalConsensusNetwork, RefundBridgeHubKusamaMessages, - RequiredStakeForStakeAndSlash, WithBridgeHubKusamaMessageBridge, - WithBridgeHubKusamaMessagesInstance, XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, + AssetHubKusamaParaId, BridgeGrandpaKusamaInstance, BridgeHubKusamaChainId, + BridgeParachainKusamaInstance, DeliveryRewardInBalance, KusamaGlobalConsensusNetwork, + RefundBridgeHubKusamaMessages, RequiredStakeForStakeAndSlash, + WithBridgeHubKusamaMessageBridge, WithBridgeHubKusamaMessagesInstance, + XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, }, xcm_config::{DotRelayLocation, RelayNetwork, XcmConfig}, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 6dfb97a6c9..9fe40b7ad5 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -79,7 +79,8 @@ use frame_system::{ EnsureRoot, }; use parachains_common::{ - impls::DealWithFees, AccountId, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature, message_queue::*, + impls::DealWithFees, message_queue::*, AccountId, AuraId, Balance, BlockNumber, Hash, Header, + Nonce, Signature, }; use sp_runtime::RuntimeDebug; use system_parachains_constants::{ @@ -88,8 +89,7 @@ use system_parachains_constants::{ SLOT_DURATION, }; use xcm_config::{ - GovernanceLocation, LocationToAccountId, TreasurerBodyId, - XcmOriginToTransactDispatchOrigin, + GovernanceLocation, LocationToAccountId, TreasurerBodyId, XcmOriginToTransactDispatchOrigin, }; #[cfg(any(feature = "std", test))] From 9041c28934aee007475246123bf187db320b212c Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 12 Jan 2024 23:20:31 +0100 Subject: [PATCH 064/316] fix: "Warning: Error parsing Cargo.toml manifest, fallback to caching entire file: Error: Invalid TOML document: expected key-value, found comma" https://github.com/polkadot-fellows/runtimes/actions/runs/7507624988/job/20441549625?pr=137#step:9:1 --- relay/kusama/Cargo.toml | 2 +- relay/polkadot/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index e271fa7368..710f50cdd9 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -123,7 +123,7 @@ keyring = { package = "sp-keyring", version = "30.0.0" } sp-trie = { version = "28.0.0" } separator = "0.4.1" serde_json = "1.0.111" -remote-externalities = { package = "frame-remote-externalities" , version = "0.34.0" } +remote-externalities = { package = "frame-remote-externalities", version = "0.34.0" } tokio = { version = "1.35.1", features = ["macros"] } sp-tracing = { default-features = false , version = "15.0.0" } diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index 40f5f7f32e..63585a9942 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -120,7 +120,7 @@ keyring = { package = "sp-keyring", version = "30.0.0" } sp-trie = { version = "28.0.0" } serde_json = "1.0.111" separator = "0.4.1" -remote-externalities = { package = "frame-remote-externalities" , version = "0.34.0" } +remote-externalities = { package = "frame-remote-externalities", version = "0.34.0" } tokio = { version = "1.35.1", features = ["macros"] } sp-tracing = { default-features = false , version = "15.0.0" } From 05a0b01d65c0731782d9455b1e44ccb0b6f40af2 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 12 Jan 2024 23:41:30 +0100 Subject: [PATCH 065/316] fix: added `rust-src` to the stable toolchain components --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 32259e51c8..5b3b825255 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,6 +42,7 @@ jobs: profile: minimal toolchain: stable target: wasm32-unknown-unknown + components: rust-src - name: Install nightly toolchain uses: actions-rs/toolchain@v1 From ca7e1dfab61642c601e684f47461376d0a30d991 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Sat, 13 Jan 2024 22:49:18 +0100 Subject: [PATCH 066/316] fix: added `rust-src` to check-migrations --- .github/workflows/check-migrations.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/check-migrations.yml b/.github/workflows/check-migrations.yml index 512ab7e5af..bcd5687024 100644 --- a/.github/workflows/check-migrations.yml +++ b/.github/workflows/check-migrations.yml @@ -62,6 +62,9 @@ jobs: - name: Add wasm32-unknown-unknown target run: rustup target add wasm32-unknown-unknown + - name: Add rust-src component + run: rustup component add rust-src + - name: Fetch cache uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 with: From ab4354c5e8c277b7a5eadfbba6f3e6b61d5f9329 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 15 Jan 2024 15:51:55 +0100 Subject: [PATCH 067/316] [migrations] added `cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4` to SP --- system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs | 5 ++++- system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs | 7 +++++-- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 5 ++++- .../bridge-hubs/bridge-hub-polkadot/src/lib.rs | 5 ++++- .../collectives/collectives-polkadot/src/lib.rs | 5 ++++- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index c02dc8af8e..12714fb522 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -974,7 +974,10 @@ pub type SignedExtra = ( pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = (); +pub type Migrations = ( + // unreleased + cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, +); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 23711af960..090e3f61d0 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -885,8 +885,11 @@ pub type SignedExtra = ( pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = - frame_support::migrations::VersionedMigration<0, 1, UniquesMigration, Uniques, RocksDbWeight>; +pub type Migrations = ( + frame_support::migrations::VersionedMigration<0, 1, UniquesMigration, Uniques, RocksDbWeight>, + // unreleased + cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, +); /// Migration for Uniques to V1 pub struct UniquesMigration; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index e70b7fd62d..326377e00d 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -152,7 +152,10 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = (); +pub type Migrations = ( + // unreleased + cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, +); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 302b12c195..9eb8d0b53e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -152,7 +152,10 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = (); +pub type Migrations = ( + // unreleased + cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, +); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 9fe40b7ad5..a4219e3c08 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -711,7 +711,10 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// All migrations executed on runtime upgrade as a nested tuple of types implementing /// `OnRuntimeUpgrade`. Included migrations must be idempotent. -type Migrations = (); +type Migrations = ( + // unreleased + cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, +); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< From f11f639eff497e7e130a0efa194f31c5418692f0 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 15 Jan 2024 16:27:17 +0100 Subject: [PATCH 068/316] [migrations] `pallet_nomination_pools::migration::versioned::V7ToV8` to relays --- relay/kusama/src/lib.rs | 1 + relay/polkadot/src/lib.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index f9f3717aac..55a3f1a9f5 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1677,6 +1677,7 @@ pub mod migrations { pallet_nomination_pools::migration::versioned::V6ToV7, pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, + pallet_nomination_pools::migration::versioned::V7ToV8, ); } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 153082d851..abae2e1c22 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1710,6 +1710,7 @@ pub mod migrations { pallet_nomination_pools::migration::versioned::V6ToV7, pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, + pallet_nomination_pools::migration::versioned::V7ToV8, ); } From 2fee7ed29928f357070fdb0e937bac7c09f3f1d7 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 16 Jan 2024 16:50:13 +0100 Subject: [PATCH 069/316] WIP: (DNM) Oliver's migration fix for `pallet-nominations-pools` (fix from https://github.com/paritytech/polkadot-sdk/pull/2942) --- relay/kusama/src/lib.rs | 209 ++++++++++++++++++++++++++++++++++++- relay/polkadot/src/lib.rs | 210 +++++++++++++++++++++++++++++++++++++- 2 files changed, 413 insertions(+), 6 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 55a3f1a9f5..2e6ff429f6 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1673,11 +1673,15 @@ pub mod migrations { /// Unreleased migrations. Add new ones here: pub type Unreleased = ( - pallet_nomination_pools::migration::versioned::V5toV6, - pallet_nomination_pools::migration::versioned::V6ToV7, pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, - pallet_nomination_pools::migration::versioned::V7ToV8, + pallet_nomination_pools::migration::versioned::V5toV6, + // TODO:(PR#137) - replace with fixed/released version + crate::test_oliverfix_migration::V6ToV7, + // pallet_nomination_pools::migration::versioned::V6ToV7, + // TODO:(PR#137) - replace with fixed/released version + crate::test_oliverfix_migration::V7ToV8, + // pallet_nomination_pools::migration::versioned::V7ToV8, ); } @@ -2776,3 +2780,202 @@ mod init_state_migration { } } } + +// TODO:(PR#137) - replace with fixed/released version +mod test_oliverfix_migration { + use super::*; + use frame_support::{ + traits::OnRuntimeUpgrade, DebugNoBound, RuntimeDebugNoBound, Twox64Concat, + }; + use frame_system::pallet_prelude::BlockNumberFor; + use pallet_nomination_pools::*; + use sp_runtime::Saturating; + + pub type V7ToV8 = frame_support::migrations::VersionedMigration< + 7, + 8, + v8::VersionUncheckedMigrateV7ToV8, + pallet_nomination_pools::pallet::Pallet, + ::DbWeight, + >; + + pub type V6ToV7 = frame_support::migrations::VersionedMigration< + 6, + 7, + v7::VersionUncheckedMigrateV6ToV7, + pallet_nomination_pools::pallet::Pallet, + ::DbWeight, + >; + + pub mod v8 { + use super::*; + + use super::v7::BondedPoolInner as OldBondedPoolInner; + + impl OldBondedPoolInner { + fn migrate_to_v8(self) -> BondedPoolInner { + BondedPoolInner { + commission: Commission { + current: self.commission.current, + max: self.commission.max, + change_rate: self.commission.change_rate, + throttle_from: self.commission.throttle_from, + // `claim_permission` is a new field. + claim_permission: None, + }, + member_counter: self.member_counter, + points: self.points, + roles: self.roles, + state: self.state, + } + } + } + + pub struct VersionUncheckedMigrateV7ToV8(sp_std::marker::PhantomData); + + impl OnRuntimeUpgrade for VersionUncheckedMigrateV7ToV8 { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + Ok(Vec::new()) + } + + fn on_runtime_upgrade() -> Weight { + let mut translated = 0u64; + BondedPools::::translate::, _>(|_key, old_value| { + translated.saturating_inc(); + Some(old_value.migrate_to_v8()) + }); + T::DbWeight::get().reads_writes(translated, translated + 1) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + // Check new `claim_permission` field is present. + frame_support::ensure!( + BondedPools::::iter() + .all(|(_, inner)| inner.commission.claim_permission.is_none()), + "`claim_permission` value has not been set correctly." + ); + Ok(()) + } + } + } + + mod v7 { + use super::*; + + use sp_staking::StakingInterface; + // use frame_support::traits::GetStorageVersion; + + #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] + #[codec(mel_bound(T: Config))] + #[scale_info(skip_type_params(T))] + pub struct Commission { + pub current: Option<(Perbill, T::AccountId)>, + pub max: Option, + pub change_rate: Option>>, + pub throttle_from: Option>, + } + + #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] + #[codec(mel_bound(T: Config))] + #[scale_info(skip_type_params(T))] + pub struct BondedPoolInner { + pub commission: Commission, + pub member_counter: u32, + pub points: BalanceOf, + pub roles: PoolRoles, + pub state: PoolState, + } + + #[derive(RuntimeDebugNoBound)] + #[cfg_attr(feature = "std", derive(Clone, PartialEq))] + pub struct BondedPool { + /// The identifier of the pool. + id: PoolId, + /// The inner fields. + inner: BondedPoolInner, + } + + impl BondedPool { + fn bonded_account(&self) -> T::AccountId { + Pallet::::create_bonded_account(self.id) + } + } + + #[frame_support::storage_alias] + pub type BondedPools = + CountedStorageMap, Twox64Concat, PoolId, BondedPoolInner>; + + pub struct VersionUncheckedMigrateV6ToV7(sp_std::marker::PhantomData); + impl VersionUncheckedMigrateV6ToV7 { + fn calculate_tvl_by_total_stake() -> BalanceOf { + BondedPools::::iter() + .map(|(id, inner)| { + T::Staking::total_stake( + &BondedPool { id, inner: inner.clone() }.bonded_account(), + ) + .unwrap_or_default() + }) + .reduce(|acc, total_balance| acc + total_balance) + .unwrap_or_default() + } + } + + impl OnRuntimeUpgrade for VersionUncheckedMigrateV6ToV7 { + fn on_runtime_upgrade() -> Weight { + let migrated = BondedPools::::count(); + // The TVL should be the sum of all the funds that are actively staked and in the + // unbonding process of the account of each pool. + let tvl: BalanceOf = Self::calculate_tvl_by_total_stake(); + + TotalValueLocked::::set(tvl); + + log!(info, "Upgraded {} pools with a TVL of {:?}", migrated, tvl); + + // reads: migrated * (BondedPools + Staking::total_stake) + count + onchain + // version + // + // writes: current version + TVL + T::DbWeight::get() + .reads_writes(migrated.saturating_mul(2).saturating_add(2).into(), 2) + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + Ok(Vec::new()) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_data: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + // check that the `TotalValueLocked` written is actually the sum of `total_stake` of + // the `BondedPools`` + let tvl: BalanceOf = Self::calculate_tvl_by_total_stake(); + frame_support::ensure!( + TotalValueLocked::::get() == tvl, + "TVL written is not equal to `Staking::total_stake` of all `BondedPools`." + ); + + // TODO: skip for now + // calculate the sum of `total_balance` of all `PoolMember` as the upper bound for + // the `TotalValueLocked`. + // let total_balance_members: BalanceOf = PoolMembers::::iter() + // .map(|(_, member)| member.total_balance()) + // .reduce(|acc, total_balance| acc + total_balance) + // .unwrap_or_default(); + // + // frame_support::ensure!( + // TotalValueLocked::::get() <= total_balance_members, + // "TVL is greater than the balance of all PoolMembers." + // ); + // + // frame_support::ensure!( + // Pallet::::on_chain_storage_version() >= 7, + // "nomination-pools::migration::v7: wrong storage version" + // ); + + Ok(()) + } + } + } +} diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index abae2e1c22..0c006d2046 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1706,11 +1706,15 @@ pub mod migrations { pub type Unreleased = ( // Upgrade SessionKeys to include BEEFY key UpgradeSessionKeys, - pallet_nomination_pools::migration::versioned::V5toV6, - pallet_nomination_pools::migration::versioned::V6ToV7, pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, - pallet_nomination_pools::migration::versioned::V7ToV8, + pallet_nomination_pools::migration::versioned::V5toV6, + // TODO:(PR#137) - replace with fixed/released version + crate::test_oliverfix_migration::V6ToV7, + // pallet_nomination_pools::migration::versioned::V6ToV7, + // TODO:(PR#137) - replace with fixed/released version + crate::test_oliverfix_migration::V7ToV8, + // pallet_nomination_pools::migration::versioned::V7ToV8, ); } @@ -2954,3 +2958,203 @@ mod remote_tests { }); } } + +// TODO:(PR#137) - replace with fixed/released version +mod test_oliverfix_migration { + use super::*; + use frame_support::{ + traits::OnRuntimeUpgrade, DebugNoBound, RuntimeDebugNoBound, Twox64Concat, + }; + use frame_system::pallet_prelude::BlockNumberFor; + use pallet_nomination_pools::*; + use sp_runtime::Saturating; + + pub type V7ToV8 = frame_support::migrations::VersionedMigration< + 7, + 8, + v8::VersionUncheckedMigrateV7ToV8, + pallet_nomination_pools::pallet::Pallet, + ::DbWeight, + >; + + pub type V6ToV7 = frame_support::migrations::VersionedMigration< + 6, + 7, + v7::VersionUncheckedMigrateV6ToV7, + pallet_nomination_pools::pallet::Pallet, + ::DbWeight, + >; + + pub mod v8 { + use super::*; + + use super::v7::BondedPoolInner as OldBondedPoolInner; + + impl OldBondedPoolInner { + fn migrate_to_v8(self) -> BondedPoolInner { + BondedPoolInner { + commission: Commission { + current: self.commission.current, + max: self.commission.max, + change_rate: self.commission.change_rate, + throttle_from: self.commission.throttle_from, + // `claim_permission` is a new field. + claim_permission: None, + }, + member_counter: self.member_counter, + points: self.points, + roles: self.roles, + state: self.state, + } + } + } + + pub struct VersionUncheckedMigrateV7ToV8(sp_std::marker::PhantomData); + + impl OnRuntimeUpgrade for VersionUncheckedMigrateV7ToV8 { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + Ok(Vec::new()) + } + + fn on_runtime_upgrade() -> Weight { + let mut translated = 0u64; + BondedPools::::translate::, _>(|_key, old_value| { + translated.saturating_inc(); + Some(old_value.migrate_to_v8()) + }); + T::DbWeight::get().reads_writes(translated, translated + 1) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + // Check new `claim_permission` field is present. + frame_support::ensure!( + BondedPools::::iter() + .all(|(_, inner)| inner.commission.claim_permission.is_none()), + "`claim_permission` value has not been set correctly." + ); + Ok(()) + } + } + } + + mod v7 { + use super::*; + + use scale_info::TypeInfo; + use sp_staking::StakingInterface; + // use frame_support::traits::GetStorageVersion; + + #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] + #[codec(mel_bound(T: Config))] + #[scale_info(skip_type_params(T))] + pub struct Commission { + pub current: Option<(Perbill, T::AccountId)>, + pub max: Option, + pub change_rate: Option>>, + pub throttle_from: Option>, + } + + #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] + #[codec(mel_bound(T: Config))] + #[scale_info(skip_type_params(T))] + pub struct BondedPoolInner { + pub commission: Commission, + pub member_counter: u32, + pub points: BalanceOf, + pub roles: PoolRoles, + pub state: PoolState, + } + + #[derive(RuntimeDebugNoBound)] + #[cfg_attr(feature = "std", derive(Clone, PartialEq))] + pub struct BondedPool { + /// The identifier of the pool. + id: PoolId, + /// The inner fields. + inner: BondedPoolInner, + } + + impl BondedPool { + fn bonded_account(&self) -> T::AccountId { + Pallet::::create_bonded_account(self.id) + } + } + + #[frame_support::storage_alias] + pub type BondedPools = + CountedStorageMap, Twox64Concat, PoolId, BondedPoolInner>; + + pub struct VersionUncheckedMigrateV6ToV7(sp_std::marker::PhantomData); + impl VersionUncheckedMigrateV6ToV7 { + fn calculate_tvl_by_total_stake() -> BalanceOf { + BondedPools::::iter() + .map(|(id, inner)| { + T::Staking::total_stake( + &BondedPool { id, inner: inner.clone() }.bonded_account(), + ) + .unwrap_or_default() + }) + .reduce(|acc, total_balance| acc + total_balance) + .unwrap_or_default() + } + } + + impl OnRuntimeUpgrade for VersionUncheckedMigrateV6ToV7 { + fn on_runtime_upgrade() -> Weight { + let migrated = BondedPools::::count(); + // The TVL should be the sum of all the funds that are actively staked and in the + // unbonding process of the account of each pool. + let tvl: BalanceOf = Self::calculate_tvl_by_total_stake(); + + TotalValueLocked::::set(tvl); + + log!(info, "Upgraded {} pools with a TVL of {:?}", migrated, tvl); + + // reads: migrated * (BondedPools + Staking::total_stake) + count + onchain + // version + // + // writes: current version + TVL + T::DbWeight::get() + .reads_writes(migrated.saturating_mul(2).saturating_add(2).into(), 2) + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + Ok(Vec::new()) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_data: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + // check that the `TotalValueLocked` written is actually the sum of `total_stake` of + // the `BondedPools`` + let tvl: BalanceOf = Self::calculate_tvl_by_total_stake(); + frame_support::ensure!( + TotalValueLocked::::get() == tvl, + "TVL written is not equal to `Staking::total_stake` of all `BondedPools`." + ); + + // TODO: skip for now + // calculate the sum of `total_balance` of all `PoolMember` as the upper bound for + // the `TotalValueLocked`. + // let total_balance_members: BalanceOf = PoolMembers::::iter() + // .map(|(_, member)| member.total_balance()) + // .reduce(|acc, total_balance| acc + total_balance) + // .unwrap_or_default(); + // + // frame_support::ensure!( + // TotalValueLocked::::get() <= total_balance_members, + // "TVL is greater than the balance of all PoolMembers." + // ); + // + // frame_support::ensure!( + // Pallet::::on_chain_storage_version() >= 7, + // "nomination-pools::migration::v7: wrong storage version" + // ); + + Ok(()) + } + } + } +} From 38c66c642e394911045929256dc201d23f8f64bc Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 17 Jan 2024 10:24:17 +0100 Subject: [PATCH 070/316] [migrations] added `pallet_grandpa::migrations::MigrateV4ToV5,` to Kusama/Polkadot --- relay/kusama/src/lib.rs | 1 + relay/polkadot/src/lib.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 2e6ff429f6..f730ff177e 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1675,6 +1675,7 @@ pub mod migrations { pub type Unreleased = ( pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, + pallet_grandpa::migrations::MigrateV4ToV5, pallet_nomination_pools::migration::versioned::V5toV6, // TODO:(PR#137) - replace with fixed/released version crate::test_oliverfix_migration::V6ToV7, diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 0c006d2046..9a5f67e151 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1708,6 +1708,7 @@ pub mod migrations { UpgradeSessionKeys, pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, + pallet_grandpa::migrations::MigrateV4ToV5, pallet_nomination_pools::migration::versioned::V5toV6, // TODO:(PR#137) - replace with fixed/released version crate::test_oliverfix_migration::V6ToV7, From b0853a9132312a5be6f583cb76548b65640ccbef Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 22 Jan 2024 13:17:51 +0100 Subject: [PATCH 071/316] [chain-specs] Updated relay+paras (except encointer) --- chain-spec-generator/Cargo.toml | 32 +- chain-spec-generator/src/relay_chain_specs.rs | 257 ++++------ .../src/system_parachains_specs.rs | 439 +++++++----------- 3 files changed, 268 insertions(+), 460 deletions(-) diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index c6b5275467..e164eb7545 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -9,28 +9,28 @@ license.workspace = true [dependencies] clap = { version = "4.4.4", features = [ "derive" ] } hex-literal = "0.4.1" -serde_json = "1.0.107" -serde = { version = "1.0.188", features = ["derive"] } +serde_json = "1.0.111" +serde = { version = "1.0.195", features = ["derive"] } polkadot-runtime = { path = "../relay/polkadot" } polkadot-runtime-constants = { path = "../relay/polkadot/constants" } kusama-runtime = { package = "staging-kusama-runtime", path = "../relay/kusama" } kusama-runtime-constants = { path = "../relay/kusama/constants" } -sc-chain-spec = "24.0.0" -polkadot-runtime-parachains = "4.0.0" -polkadot-primitives = "4.0.0" -sp-consensus-babe = "0.29.0" -sp-authority-discovery = "23.0.0" -sp-core = "25.0.0" -pallet-staking = "25.0.0" -sc-consensus-grandpa = "0.16.0" -pallet-im-online = "24.0.0" -sp-runtime = "28.0.0" -sp-consensus-beefy = "10.0.0" -xcm = { package = "staging-xcm", version = "4.0.0" } -parachains-common = { version = "4.0.0" } -cumulus-primitives-core = { version = "0.4.0" } +sc-chain-spec = "26.0.0" +polkadot-runtime-parachains = "6.0.0" +polkadot-primitives = "6.0.0" +sp-consensus-babe = "0.31.0" +sp-authority-discovery = "25.0.0" +sp-core = "27.0.0" +pallet-staking = "27.0.0" +sc-consensus-grandpa = "0.18.0" +pallet-im-online = "26.0.0" +sp-runtime = "30.0.1" +sp-consensus-beefy = "12.0.0" +xcm = { package = "staging-xcm", version = "6.0.0" } +parachains-common = { version = "6.0.0" } +cumulus-primitives-core = { version = "0.6.0" } asset-hub-polkadot-runtime = { path = "../system-parachains/asset-hubs/asset-hub-polkadot" } asset-hub-kusama-runtime = { path = "../system-parachains/asset-hubs/asset-hub-kusama" } diff --git a/chain-spec-generator/src/relay_chain_specs.rs b/chain-spec-generator/src/relay_chain_specs.rs index f5384dfdfc..075c965762 100644 --- a/chain-spec-generator/src/relay_chain_specs.rs +++ b/chain-spec-generator/src/relay_chain_specs.rs @@ -29,11 +29,9 @@ use sp_consensus_beefy::ecdsa_crypto::AuthorityId as BeefyId; use sp_core::{sr25519, Pair, Public}; use sp_runtime::{traits::IdentifyAccount, Perbill}; -pub type PolkadotChainSpec = - sc_chain_spec::GenericChainSpec; +pub type PolkadotChainSpec = sc_chain_spec::GenericChainSpec<(), NoExtension>; -pub type KusamaChainSpec = - sc_chain_spec::GenericChainSpec; +pub type KusamaChainSpec = sc_chain_spec::GenericChainSpec<(), NoExtension>; const DEFAULT_PROTOCOL_ID: &str = "dot"; @@ -199,7 +197,6 @@ fn testnet_accounts() -> Vec { } pub fn polkadot_testnet_genesis( - wasm_binary: &[u8], initial_authorities: Vec<( AccountId, AccountId, @@ -213,21 +210,18 @@ pub fn polkadot_testnet_genesis( )>, _root_key: AccountId, endowed_accounts: Option>, -) -> polkadot_runtime::RuntimeGenesisConfig { +) -> serde_json::Value { let endowed_accounts: Vec = endowed_accounts.unwrap_or_else(testnet_accounts); const ENDOWMENT: u128 = 1_000_000 * DOT; const STASH: u128 = 100 * DOT; - polkadot_runtime::RuntimeGenesisConfig { - beefy: Default::default(), - system: polkadot_runtime::SystemConfig { code: wasm_binary.to_vec(), ..Default::default() }, - indices: polkadot_runtime::IndicesConfig { indices: vec![] }, - balances: polkadot_runtime::BalancesConfig { - balances: endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect(), + serde_json::json!({ + "balances": { + "balances": endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect::>(), }, - session: polkadot_runtime::SessionConfig { - keys: initial_authorities + "session": { + "keys": initial_authorities .iter() .map(|x| { ( @@ -246,49 +240,27 @@ pub fn polkadot_testnet_genesis( }) .collect::>(), }, - staking: polkadot_runtime::StakingConfig { - minimum_validator_count: 1, - validator_count: initial_authorities.len() as u32, - stakers: initial_authorities + "staking": { + "minimumValidatorCount": 1, + "validatorCount": initial_authorities.len() as u32, + "stakers": initial_authorities .iter() - .map(|x| { - (x.0.clone(), x.0.clone(), STASH, polkadot_runtime::StakerStatus::Validator) - }) - .collect(), - invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(), - force_era: Forcing::NotForcing, - slash_reward_fraction: Perbill::from_percent(10), - ..Default::default() - }, - babe: polkadot_runtime::BabeConfig { - authorities: Default::default(), - epoch_config: Some(polkadot_runtime::BABE_GENESIS_EPOCH_CONFIG), - ..Default::default() + .map(|x| (x.0.clone(), x.0.clone(), STASH, polkadot_runtime::StakerStatus::::Validator)) + .collect::>(), + "invulnerables": initial_authorities.iter().map(|x| x.0.clone()).collect::>(), + "forceEra": Forcing::NotForcing, + "slashRewardFraction": Perbill::from_percent(10), }, - grandpa: Default::default(), - im_online: Default::default(), - authority_discovery: polkadot_runtime::AuthorityDiscoveryConfig { - keys: vec![], - ..Default::default() + "babe": { + "epochConfig": Some(polkadot_runtime::BABE_GENESIS_EPOCH_CONFIG), }, - claims: polkadot_runtime::ClaimsConfig { claims: vec![], vesting: vec![] }, - vesting: polkadot_runtime::VestingConfig { vesting: vec![] }, - treasury: Default::default(), - hrmp: Default::default(), - configuration: polkadot_runtime::ConfigurationConfig { - config: default_parachains_host_configuration(), + "configuration": { + "config": default_parachains_host_configuration(), }, - paras: Default::default(), - xcm_pallet: Default::default(), - nomination_pools: Default::default(), - registrar: Default::default(), - transaction_payment: Default::default(), - } + }) } -/// Helper function to create kusama `RuntimeGenesisConfig` for testing pub fn kusama_testnet_genesis( - wasm_binary: &[u8], initial_authorities: Vec<( AccountId, AccountId, @@ -302,21 +274,18 @@ pub fn kusama_testnet_genesis( )>, _root_key: AccountId, endowed_accounts: Option>, -) -> kusama_runtime::RuntimeGenesisConfig { +) -> serde_json::Value { let endowed_accounts: Vec = endowed_accounts.unwrap_or_else(testnet_accounts); const ENDOWMENT: u128 = 1_000_000 * KSM; const STASH: u128 = 100 * KSM; - kusama_runtime::RuntimeGenesisConfig { - system: kusama_runtime::SystemConfig { code: wasm_binary.to_vec(), ..Default::default() }, - indices: kusama_runtime::IndicesConfig { indices: vec![] }, - balances: kusama_runtime::BalancesConfig { - balances: endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect(), + serde_json::json!({ + "balances": { + "balances": endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect::>(), }, - beefy: Default::default(), - session: kusama_runtime::SessionConfig { - keys: initial_authorities + "session": { + "keys": initial_authorities .iter() .map(|x| { ( @@ -335,60 +304,36 @@ pub fn kusama_testnet_genesis( }) .collect::>(), }, - staking: kusama_runtime::StakingConfig { - minimum_validator_count: 1, - validator_count: initial_authorities.len() as u32, - stakers: initial_authorities + "staking": { + "minimumValidatorCount": 1, + "validatorCount": initial_authorities.len() as u32, + "stakers": initial_authorities .iter() - .map(|x| (x.0.clone(), x.0.clone(), STASH, kusama_runtime::StakerStatus::Validator)) - .collect(), - invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(), - force_era: Forcing::NotForcing, - slash_reward_fraction: Perbill::from_percent(10), - ..Default::default() - }, - babe: kusama_runtime::BabeConfig { - authorities: Default::default(), - epoch_config: Some(kusama_runtime::BABE_GENESIS_EPOCH_CONFIG), - ..Default::default() + .map(|x| (x.0.clone(), x.0.clone(), STASH, kusama_runtime::StakerStatus::::Validator)) + .collect::>(), + "invulnerables": initial_authorities.iter().map(|x| x.0.clone()).collect::>(), + "forceEra": Forcing::NotForcing, + "slashRewardFraction": Perbill::from_percent(10), }, - grandpa: Default::default(), - im_online: Default::default(), - authority_discovery: kusama_runtime::AuthorityDiscoveryConfig { - keys: vec![], - ..Default::default() + "babe": { + "epochConfig": Some(kusama_runtime::BABE_GENESIS_EPOCH_CONFIG), }, - claims: kusama_runtime::ClaimsConfig { claims: vec![], vesting: vec![] }, - vesting: kusama_runtime::VestingConfig { vesting: vec![] }, - treasury: Default::default(), - hrmp: Default::default(), - configuration: kusama_runtime::ConfigurationConfig { - config: default_parachains_host_configuration(), + "configuration": { + "config": default_parachains_host_configuration(), }, - paras: Default::default(), - xcm_pallet: Default::default(), - nomination_pools: Default::default(), - nis_counterpart_balances: Default::default(), - registrar: Default::default(), - transaction_payment: Default::default(), - society: Default::default(), - } + }) } -fn polkadot_development_config_genesis( - wasm_binary: &[u8], -) -> polkadot_runtime::RuntimeGenesisConfig { +fn polkadot_development_config_genesis() -> serde_json::Value { polkadot_testnet_genesis( - wasm_binary, vec![get_authority_keys_from_seed("Alice")], get_account_id_from_seed::("Alice"), None, ) } -fn kusama_development_config_genesis(wasm_binary: &[u8]) -> kusama_runtime::RuntimeGenesisConfig { +fn kusama_development_config_genesis() -> serde_json::Value { kusama_testnet_genesis( - wasm_binary, vec![get_authority_keys_from_seed("Alice")], get_account_id_from_seed::("Alice"), None, @@ -397,44 +342,39 @@ fn kusama_development_config_genesis(wasm_binary: &[u8]) -> kusama_runtime::Runt /// Polkadot development config (single validator Alice) pub fn polkadot_development_config() -> Result, String> { - let wasm_binary = - polkadot_runtime::WASM_BINARY.ok_or("Polkadot development wasm not available")?; - - Ok(Box::new(PolkadotChainSpec::from_genesis( - "Polakdot Development", - "polkadot-dev", - ChainType::Development, - move || polkadot_development_config_genesis(wasm_binary), - vec![], - None, - Some(DEFAULT_PROTOCOL_ID), - None, - Some(polkadot_chain_spec_properties()), - Default::default(), - ))) + Ok(Box::new( + PolkadotChainSpec::builder( + polkadot_runtime::WASM_BINARY.ok_or("Polkadot development wasm not available")?, + Default::default(), + ) + .with_name("Polakdot Development") + .with_id("polkadot-dev") + .with_chain_type(ChainType::Development) + .with_genesis_config_patch(polkadot_development_config_genesis()) + .with_protocol_id(DEFAULT_PROTOCOL_ID) + .with_properties(polkadot_chain_spec_properties()) + .build(), + )) } /// Kusama development config (single validator Alice) pub fn kusama_development_config() -> Result, String> { - let wasm_binary = kusama_runtime::WASM_BINARY.ok_or("Kusama development wasm not available")?; - - Ok(Box::new(KusamaChainSpec::from_genesis( - "Kusama Development", - "kusama-dev", - ChainType::Development, - move || kusama_development_config_genesis(wasm_binary), - vec![], - None, - Some(DEFAULT_PROTOCOL_ID), - None, - None, - Default::default(), - ))) + Ok(Box::new( + KusamaChainSpec::builder( + kusama_runtime::WASM_BINARY.ok_or("Kusama development wasm not available")?, + Default::default(), + ) + .with_name("Kusama Development") + .with_id("kusama-dev") + .with_chain_type(ChainType::Development) + .with_genesis_config_patch(kusama_development_config_genesis()) + .with_protocol_id(DEFAULT_PROTOCOL_ID) + .build(), + )) } -fn polkadot_local_testnet_genesis(wasm_binary: &[u8]) -> polkadot_runtime::RuntimeGenesisConfig { +fn polkadot_local_testnet_genesis() -> serde_json::Value { polkadot_testnet_genesis( - wasm_binary, vec![get_authority_keys_from_seed("Alice"), get_authority_keys_from_seed("Bob")], get_account_id_from_seed::("Alice"), None, @@ -443,26 +383,23 @@ fn polkadot_local_testnet_genesis(wasm_binary: &[u8]) -> polkadot_runtime::Runti /// Polkadot local testnet config (multivalidator Alice + Bob) pub fn polkadot_local_testnet_config() -> Result, String> { - let wasm_binary = - polkadot_runtime::WASM_BINARY.ok_or("Polkadot development wasm not available")?; - - Ok(Box::new(PolkadotChainSpec::from_genesis( - "Polkadot Local Testnet", - "polkadot-local", - ChainType::Local, - move || polkadot_local_testnet_genesis(wasm_binary), - vec![], - None, - Some(DEFAULT_PROTOCOL_ID), - None, - Some(polkadot_chain_spec_properties()), - Default::default(), - ))) + Ok(Box::new( + PolkadotChainSpec::builder( + polkadot_runtime::WASM_BINARY.ok_or("Polkadot development wasm not available")?, + Default::default(), + ) + .with_name("Polkadot Local Testnet") + .with_id("polkadot-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(polkadot_local_testnet_genesis()) + .with_protocol_id(DEFAULT_PROTOCOL_ID) + .with_properties(polkadot_chain_spec_properties()) + .build(), + )) } -fn kusama_local_testnet_genesis(wasm_binary: &[u8]) -> kusama_runtime::RuntimeGenesisConfig { +fn kusama_local_testnet_genesis() -> serde_json::Value { kusama_testnet_genesis( - wasm_binary, vec![get_authority_keys_from_seed("Alice"), get_authority_keys_from_seed("Bob")], get_account_id_from_seed::("Alice"), None, @@ -471,20 +408,18 @@ fn kusama_local_testnet_genesis(wasm_binary: &[u8]) -> kusama_runtime::RuntimeGe /// Kusama local testnet config (multivalidator Alice + Bob) pub fn kusama_local_testnet_config() -> Result, String> { - let wasm_binary = kusama_runtime::WASM_BINARY.ok_or("Kusama development wasm not available")?; - - Ok(Box::new(KusamaChainSpec::from_genesis( - "Kusama Local Testnet", - "kusama-local", - ChainType::Local, - move || kusama_local_testnet_genesis(wasm_binary), - vec![], - None, - Some(DEFAULT_PROTOCOL_ID), - None, - None, - Default::default(), - ))) + Ok(Box::new( + KusamaChainSpec::builder( + kusama_runtime::WASM_BINARY.ok_or("Kusama development wasm not available")?, + Default::default(), + ) + .with_name("Kusama Local Testnet") + .with_id("kusama-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(kusama_local_testnet_genesis()) + .with_protocol_id(DEFAULT_PROTOCOL_ID) + .build(), + )) } #[cfg(test)] diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 8968be99bb..6524e877da 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -32,23 +32,17 @@ pub struct Extensions { pub para_id: u32, } -pub type AssetHubPolkadotChainSpec = - sc_chain_spec::GenericChainSpec; +pub type AssetHubPolkadotChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; -pub type AssetHubKusamaChainSpec = - sc_chain_spec::GenericChainSpec; +pub type AssetHubKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; -pub type CollectivesPolkadotChainSpec = - sc_chain_spec::GenericChainSpec; +pub type CollectivesPolkadotChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; -pub type BridgeHubPolkadotChainSpec = - sc_chain_spec::GenericChainSpec; +pub type BridgeHubPolkadotChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; -pub type BridgeHubKusamaChainSpec = - sc_chain_spec::GenericChainSpec; +pub type BridgeHubKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; -pub type GluttonKusamaChainSpec = - sc_chain_spec::GenericChainSpec; +pub type GluttonKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; pub type EncointerKusamaChainSpec = sc_chain_spec::GenericChainSpec; @@ -131,33 +125,28 @@ pub fn bridge_hub_kusama_session_keys(keys: AuraId) -> bridge_hub_kusama_runtime // AssetHubPolkadot fn asset_hub_polkadot_genesis( - wasm_binary: &[u8], invulnerables: Vec<(AccountId, AssetHubPolkadotAuraId)>, endowed_accounts: Vec, id: ParaId, -) -> asset_hub_polkadot_runtime::RuntimeGenesisConfig { - asset_hub_polkadot_runtime::RuntimeGenesisConfig { - system: asset_hub_polkadot_runtime::SystemConfig { - code: wasm_binary.to_vec(), - ..Default::default() - }, - balances: asset_hub_polkadot_runtime::BalancesConfig { +) -> serde_json::Value { + serde_json::json!({ + "balances": asset_hub_polkadot_runtime::BalancesConfig { balances: endowed_accounts .iter() .cloned() - .map(|k| (k, ASSET_HUB_POLKADOT_ED * 4096)) + .map(|k| (k, ASSET_HUB_POLKADOT_ED * 4096 * 4096)) .collect(), }, - parachain_info: asset_hub_polkadot_runtime::ParachainInfoConfig { + "parachainInfo": asset_hub_polkadot_runtime::ParachainInfoConfig { parachain_id: id, ..Default::default() }, - collator_selection: asset_hub_polkadot_runtime::CollatorSelectionConfig { + "collatorSelection": asset_hub_polkadot_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), candidacy_bond: ASSET_HUB_POLKADOT_ED * 16, ..Default::default() }, - session: asset_hub_polkadot_runtime::SessionConfig { + "session": asset_hub_polkadot_runtime::SessionConfig { keys: invulnerables .into_iter() .map(|(acc, aura)| { @@ -169,30 +158,20 @@ fn asset_hub_polkadot_genesis( }) .collect(), }, - // no need to pass anything to aura, in fact it will panic if we do. Session will take care - // of this. - aura: Default::default(), - aura_ext: Default::default(), - parachain_system: Default::default(), - polkadot_xcm: asset_hub_polkadot_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - assets: Default::default(), - foreign_assets: Default::default(), - transaction_payment: Default::default(), - } + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. `aura: Default::default()` + }) } -fn asset_hub_polkadot_local_genesis( - wasm_binary: &[u8], -) -> asset_hub_polkadot_runtime::RuntimeGenesisConfig { +fn asset_hub_polkadot_local_genesis(para_id: ParaId) -> serde_json::Value { asset_hub_polkadot_genesis( // initial collators. - wasm_binary, invulnerables_asset_hub_polkadot(), testnet_accounts(), - 1000.into(), + para_id, ) } @@ -202,54 +181,44 @@ pub fn asset_hub_polkadot_local_testnet_config() -> Result, S properties.insert("tokenSymbol".into(), "DOT".into()); properties.insert("tokenDecimals".into(), 10.into()); - let wasm_binary = - asset_hub_polkadot_runtime::WASM_BINARY.ok_or("AssetHubPolkadot wasm not available")?; - - Ok(Box::new(AssetHubPolkadotChainSpec::from_genesis( - // Name - "Polkadot Asset Hub Local", - // ID - "asset-hub-polkadot-local", - ChainType::Local, - move || asset_hub_polkadot_local_genesis(wasm_binary), - Vec::new(), - None, - None, - None, - Some(properties), - Extensions { relay_chain: "polkadot-local".into(), para_id: 1000 }, - ))) + Ok(Box::new( + AssetHubPolkadotChainSpec::builder( + asset_hub_polkadot_runtime::WASM_BINARY.expect("AssetHubPolkadot wasm not available!"), + Extensions { relay_chain: "polkadot-local".into(), para_id: 1000 }, + ) + .with_name("Polkadot Asset Hub Local") + .with_id("asset-hub-polkadot-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(asset_hub_polkadot_local_genesis(1000.into())) + .with_properties(properties) + .build(), + )) } // AssetHubKusama fn asset_hub_kusama_genesis( - wasm_binary: &[u8], invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, id: ParaId, -) -> asset_hub_kusama_runtime::RuntimeGenesisConfig { - asset_hub_kusama_runtime::RuntimeGenesisConfig { - system: asset_hub_kusama_runtime::SystemConfig { - code: wasm_binary.to_vec(), - ..Default::default() - }, - balances: asset_hub_kusama_runtime::BalancesConfig { +) -> serde_json::Value { + serde_json::json!({ + "balances": asset_hub_kusama_runtime::BalancesConfig { balances: endowed_accounts .iter() .cloned() - .map(|k| (k, ASSET_HUB_KUSAMA_ED * 4096)) + .map(|k| (k, ASSET_HUB_KUSAMA_ED * 4096 * 4096)) .collect(), }, - parachain_info: asset_hub_kusama_runtime::ParachainInfoConfig { + "parachainInfo": asset_hub_kusama_runtime::ParachainInfoConfig { parachain_id: id, ..Default::default() }, - collator_selection: asset_hub_kusama_runtime::CollatorSelectionConfig { + "collatorSelection": asset_hub_kusama_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), candidacy_bond: ASSET_HUB_KUSAMA_ED * 16, ..Default::default() }, - session: asset_hub_kusama_runtime::SessionConfig { + "session": asset_hub_kusama_runtime::SessionConfig { keys: invulnerables .into_iter() .map(|(acc, aura)| { @@ -261,31 +230,20 @@ fn asset_hub_kusama_genesis( }) .collect(), }, - // no need to pass anything to aura, in fact it will panic if we do. Session will take care - // of this. - aura: Default::default(), - aura_ext: Default::default(), - parachain_system: Default::default(), - polkadot_xcm: asset_hub_kusama_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - assets: Default::default(), - foreign_assets: Default::default(), - pool_assets: Default::default(), - transaction_payment: Default::default(), - } + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. `aura: Default::default()` + }) } -fn asset_hub_kusama_local_genesis( - wasm_binary: &[u8], -) -> asset_hub_kusama_runtime::RuntimeGenesisConfig { +fn asset_hub_kusama_local_genesis(para_id: ParaId) -> serde_json::Value { asset_hub_kusama_genesis( // initial collators. - wasm_binary, invulnerables(), testnet_accounts(), - 1000.into(), + para_id, ) } @@ -295,54 +253,44 @@ pub fn asset_hub_kusama_local_testnet_config() -> Result, Str properties.insert("tokenSymbol".into(), "KSM".into()); properties.insert("tokenDecimals".into(), 12.into()); - let wasm_binary = - asset_hub_kusama_runtime::WASM_BINARY.ok_or("AssetHubKusama wasm not available")?; - - Ok(Box::new(AssetHubKusamaChainSpec::from_genesis( - // Name - "Kusama Asset Hub Local", - // ID - "asset-hub-kusama-local", - ChainType::Local, - move || asset_hub_kusama_local_genesis(wasm_binary), - Vec::new(), - None, - None, - None, - Some(properties), - Extensions { relay_chain: "kusama-local".into(), para_id: 1000 }, - ))) + Ok(Box::new( + AssetHubKusamaChainSpec::builder( + asset_hub_kusama_runtime::WASM_BINARY.expect("AssetHubKusama wasm not available!"), + Extensions { relay_chain: "kusama-local".into(), para_id: 1000 }, + ) + .with_name("Kusama Asset Hub Local") + .with_id("asset-hub-kusama-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(asset_hub_kusama_local_genesis(1000.into())) + .with_properties(properties) + .build(), + )) } // CollectivesPolkadot fn collectives_polkadot_genesis( - wasm_binary: &[u8], invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, id: ParaId, -) -> collectives_polkadot_runtime::RuntimeGenesisConfig { - collectives_polkadot_runtime::RuntimeGenesisConfig { - system: collectives_polkadot_runtime::SystemConfig { - code: wasm_binary.to_vec(), - ..Default::default() - }, - balances: collectives_polkadot_runtime::BalancesConfig { +) -> serde_json::Value { + serde_json::json!({ + "balances": collectives_polkadot_runtime::BalancesConfig { balances: endowed_accounts .iter() .cloned() - .map(|k| (k, COLLECTIVES_POLKADOT_ED * 4096)) + .map(|k| (k, COLLECTIVES_POLKADOT_ED * 4096 * 4096)) .collect(), }, - parachain_info: collectives_polkadot_runtime::ParachainInfoConfig { + "parachainInfo": collectives_polkadot_runtime::ParachainInfoConfig { parachain_id: id, ..Default::default() }, - collator_selection: collectives_polkadot_runtime::CollatorSelectionConfig { + "collatorSelection": collectives_polkadot_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), candidacy_bond: COLLECTIVES_POLKADOT_ED * 16, ..Default::default() }, - session: collectives_polkadot_runtime::SessionConfig { + "session": collectives_polkadot_runtime::SessionConfig { keys: invulnerables .into_iter() .map(|(acc, aura)| { @@ -354,31 +302,20 @@ fn collectives_polkadot_genesis( }) .collect(), }, - // no need to pass anything to aura, in fact it will panic if we do. Session will take care - // of this. - aura: Default::default(), - aura_ext: Default::default(), - parachain_system: Default::default(), - polkadot_xcm: collectives_polkadot_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - alliance: Default::default(), - alliance_motion: Default::default(), - fellowship_treasury: Default::default(), - transaction_payment: Default::default(), - } + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. `aura: Default::default()` + }) } -fn collectives_polkadot_local_genesis( - wasm_binary: &[u8], -) -> collectives_polkadot_runtime::RuntimeGenesisConfig { +fn collectives_polkadot_local_genesis(para_id: ParaId) -> serde_json::Value { collectives_polkadot_genesis( // initial collators. - wasm_binary, invulnerables(), testnet_accounts(), - 1001.into(), + para_id, ) } @@ -388,54 +325,45 @@ pub fn collectives_polkadot_local_testnet_config() -> Result, properties.insert("tokenSymbol".into(), "DOT".into()); properties.insert("tokenDecimals".into(), 10.into()); - let wasm_binary = collectives_polkadot_runtime::WASM_BINARY - .ok_or("CollectivesPolkadot wasm not available")?; - - Ok(Box::new(CollectivesPolkadotChainSpec::from_genesis( - // Name - "Polkadot Collectives Local", - // ID - "collectives-polkadot-local", - ChainType::Local, - move || collectives_polkadot_local_genesis(wasm_binary), - Vec::new(), - None, - None, - None, - Some(properties), - Extensions { relay_chain: "polkadot-local".into(), para_id: 1001 }, - ))) + Ok(Box::new( + CollectivesPolkadotChainSpec::builder( + collectives_polkadot_runtime::WASM_BINARY + .expect("CollectivesPolkadot wasm not available!"), + Extensions { relay_chain: "polkadot-local".into(), para_id: 1001 }, + ) + .with_name("Polkadot Collectives Local") + .with_id("collectives-polkadot-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(collectives_polkadot_local_genesis(1001.into())) + .with_properties(properties) + .build(), + )) } // BridgeHubPolkadot fn bridge_hub_polkadot_genesis( - wasm_binary: &[u8], invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, id: ParaId, -) -> bridge_hub_polkadot_runtime::RuntimeGenesisConfig { - bridge_hub_polkadot_runtime::RuntimeGenesisConfig { - system: bridge_hub_polkadot_runtime::SystemConfig { - code: wasm_binary.to_vec(), - ..Default::default() - }, - balances: bridge_hub_polkadot_runtime::BalancesConfig { +) -> serde_json::Value { + serde_json::json!({ + "balances": bridge_hub_polkadot_runtime::BalancesConfig { balances: endowed_accounts .iter() .cloned() - .map(|k| (k, BRIDGE_HUB_POLKADOT_ED * 4096)) + .map(|k| (k, BRIDGE_HUB_POLKADOT_ED * 4096 * 4096)) .collect(), }, - parachain_info: bridge_hub_polkadot_runtime::ParachainInfoConfig { + "parachainInfo": bridge_hub_polkadot_runtime::ParachainInfoConfig { parachain_id: id, ..Default::default() }, - collator_selection: bridge_hub_polkadot_runtime::CollatorSelectionConfig { + "collatorSelection": bridge_hub_polkadot_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), candidacy_bond: BRIDGE_HUB_POLKADOT_ED * 16, ..Default::default() }, - session: bridge_hub_polkadot_runtime::SessionConfig { + "session": bridge_hub_polkadot_runtime::SessionConfig { keys: invulnerables .into_iter() .map(|(acc, aura)| { @@ -447,31 +375,20 @@ fn bridge_hub_polkadot_genesis( }) .collect(), }, - bridge_kusama_grandpa: Default::default(), - bridge_kusama_messages: Default::default(), - // no need to pass anything to aura, in fact it will panic if we do. Session will take care - // of this. - aura: Default::default(), - aura_ext: Default::default(), - parachain_system: Default::default(), - polkadot_xcm: bridge_hub_polkadot_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - bridge_kusama_parachains: Default::default(), - transaction_payment: Default::default(), - } + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. `aura: Default::default()` + }) } -fn bridge_hub_polkadot_local_genesis( - wasm_binary: &[u8], -) -> bridge_hub_polkadot_runtime::RuntimeGenesisConfig { +fn bridge_hub_polkadot_local_genesis(para_id: ParaId) -> serde_json::Value { bridge_hub_polkadot_genesis( // initial collators. - wasm_binary, invulnerables(), testnet_accounts(), - 1002.into(), + para_id, ) } @@ -481,54 +398,45 @@ pub fn bridge_hub_polkadot_local_testnet_config() -> Result, properties.insert("tokenSymbol".into(), "DOT".into()); properties.insert("tokenDecimals".into(), 10.into()); - let wasm_binary = - bridge_hub_polkadot_runtime::WASM_BINARY.ok_or("BridgeHubPolkadot wasm not available")?; - - Ok(Box::new(BridgeHubPolkadotChainSpec::from_genesis( - // Name - "Polkadot Bridge Hub Local", - // ID - "bridge-hub-polkadot-local", - ChainType::Local, - move || bridge_hub_polkadot_local_genesis(wasm_binary), - Vec::new(), - None, - None, - None, - Some(properties), - Extensions { relay_chain: "polkadot-local".into(), para_id: 1002 }, - ))) + Ok(Box::new( + BridgeHubPolkadotChainSpec::builder( + bridge_hub_polkadot_runtime::WASM_BINARY + .expect("BridgeHubPolkadot wasm not available!"), + Extensions { relay_chain: "polkadot-local".into(), para_id: 1002 }, + ) + .with_name("Polkadot Bridge Hub Local") + .with_id("bridge-hub-polkadot-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(bridge_hub_polkadot_local_genesis(1002.into())) + .with_properties(properties) + .build(), + )) } // BridgeHubKusama fn bridge_hub_kusama_genesis( - wasm_binary: &[u8], invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, id: ParaId, -) -> bridge_hub_kusama_runtime::RuntimeGenesisConfig { - bridge_hub_kusama_runtime::RuntimeGenesisConfig { - system: bridge_hub_kusama_runtime::SystemConfig { - code: wasm_binary.to_vec(), - ..Default::default() - }, - balances: bridge_hub_kusama_runtime::BalancesConfig { +) -> serde_json::Value { + serde_json::json!({ + "balances": bridge_hub_kusama_runtime::BalancesConfig { balances: endowed_accounts .iter() .cloned() - .map(|k| (k, BRIDGE_HUB_KUSAMA_ED * 4096)) + .map(|k| (k, BRIDGE_HUB_KUSAMA_ED * 4096 * 4096)) .collect(), }, - parachain_info: bridge_hub_kusama_runtime::ParachainInfoConfig { + "parachainInfo": bridge_hub_kusama_runtime::ParachainInfoConfig { parachain_id: id, ..Default::default() }, - collator_selection: bridge_hub_kusama_runtime::CollatorSelectionConfig { + "collatorSelection": bridge_hub_kusama_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), candidacy_bond: BRIDGE_HUB_KUSAMA_ED * 16, ..Default::default() }, - session: bridge_hub_kusama_runtime::SessionConfig { + "session": bridge_hub_kusama_runtime::SessionConfig { keys: invulnerables .into_iter() .map(|(acc, aura)| { @@ -540,31 +448,20 @@ fn bridge_hub_kusama_genesis( }) .collect(), }, - bridge_polkadot_grandpa: Default::default(), - bridge_polkadot_messages: Default::default(), - // no need to pass anything to aura, in fact it will panic if we do. Session will take care - // of this. - aura: Default::default(), - aura_ext: Default::default(), - parachain_system: Default::default(), - polkadot_xcm: bridge_hub_kusama_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - bridge_polkadot_parachains: Default::default(), - transaction_payment: Default::default(), - } + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. `aura: Default::default()` + }) } -fn bridge_hub_kusama_local_genesis( - wasm_binary: &[u8], -) -> bridge_hub_kusama_runtime::RuntimeGenesisConfig { +fn bridge_hub_kusama_local_genesis(para_id: ParaId) -> serde_json::Value { bridge_hub_kusama_genesis( // initial collators. - wasm_binary, invulnerables(), testnet_accounts(), - 1002.into(), + para_id, ) } @@ -574,74 +471,50 @@ pub fn bridge_hub_kusama_local_testnet_config() -> Result, St properties.insert("tokenSymbol".into(), "KSM".into()); properties.insert("tokenDecimals".into(), 12.into()); - let wasm_binary = - bridge_hub_kusama_runtime::WASM_BINARY.ok_or("BridgeHubKusama wasm not available")?; - - Ok(Box::new(BridgeHubKusamaChainSpec::from_genesis( - // Name - "Kusama Bridge Hub Local", - // ID - "bridge-hub-kusama-local", - ChainType::Local, - move || bridge_hub_kusama_local_genesis(wasm_binary), - Vec::new(), - None, - None, - None, - Some(properties), - Extensions { relay_chain: "kusama-local".into(), para_id: 1002 }, - ))) + Ok(Box::new( + BridgeHubKusamaChainSpec::builder( + bridge_hub_kusama_runtime::WASM_BINARY.expect("BridgeHubKusama wasm not available!"), + Extensions { relay_chain: "kusama-local".into(), para_id: 1002 }, + ) + .with_name("Kusama Bridge Hub Local") + .with_id("bridge-hub-kusama-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(bridge_hub_kusama_local_genesis(1002.into())) + .with_properties(properties) + .build(), + )) } // GluttonKusama -fn glutton_kusama_genesis( - wasm_binary: &[u8], - id: ParaId, -) -> glutton_kusama_runtime::RuntimeGenesisConfig { - glutton_kusama_runtime::RuntimeGenesisConfig { - system: glutton_kusama_runtime::SystemConfig { - code: wasm_binary.to_vec(), - ..Default::default() - }, - glutton: Default::default(), - sudo: Default::default(), - parachain_system: Default::default(), - parachain_info: glutton_kusama_runtime::ParachainInfoConfig { +fn glutton_kusama_genesis(id: ParaId) -> serde_json::Value { + serde_json::json!({ + "parachainInfo": glutton_kusama_runtime::ParachainInfoConfig { parachain_id: id, ..Default::default() }, - } + }) } -fn glutton_kusama_local_genesis( - wasm_binary: &[u8], -) -> glutton_kusama_runtime::RuntimeGenesisConfig { - glutton_kusama_genesis(wasm_binary, 1002.into()) +fn glutton_kusama_local_genesis(id: ParaId) -> serde_json::Value { + glutton_kusama_genesis(id) } pub fn glutton_kusama_local_testnet_config() -> Result, String> { let mut properties = sc_chain_spec::Properties::new(); properties.insert("ss58Format".into(), 2.into()); - properties.insert("tokenSymbol".into(), "KSM".into()); - properties.insert("tokenDecimals".into(), 12.into()); - - let wasm_binary = - glutton_kusama_runtime::WASM_BINARY.ok_or("GluttonKusama wasm not available")?; - Ok(Box::new(GluttonKusamaChainSpec::from_genesis( - // Name - "Glutton Kusama Local", - // ID - "glutton-kusama-local", - ChainType::Local, - move || glutton_kusama_local_genesis(wasm_binary), - Vec::new(), - None, - None, - None, - Some(properties), - Extensions { relay_chain: "kusama-local".into(), para_id: 1002 }, - ))) + Ok(Box::new( + GluttonKusamaChainSpec::builder( + glutton_kusama_runtime::WASM_BINARY.expect("GluttonKusama wasm not available!"), + Extensions { relay_chain: "kusama-local".into(), para_id: 1300 }, + ) + .with_name("Kusama Glutton Local") + .with_id("glutton-kusama-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(glutton_kusama_local_genesis(1300.into())) + .with_properties(properties) + .build(), + )) } // EncointerKusama From 7a0e1d67bc40f22a041b8b65a16fb3ea8c1e335b Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 22 Jan 2024 13:19:20 +0100 Subject: [PATCH 072/316] [chain-specs] Updated encointer to `polkadot-sdk@1.5` --- chain-spec-generator/Cargo.toml | 3 + .../src/system_parachains_specs.rs | 89 ++++++++----------- 2 files changed, 38 insertions(+), 54 deletions(-) diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index e164eb7545..79a4d87cca 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -40,6 +40,9 @@ bridge-hub-kusama-runtime = { path = "../system-parachains/bridge-hubs/bridge-hu encointer-kusama-runtime = { path = "../system-parachains/encointer" } glutton-kusama-runtime = { path = "../system-parachains/gluttons/glutton-kusama" } +# encointer is not migrated to the latest release, so we use compatible deps, when needed +sp-core-encointer-compatible = { package = "sp-core", version = "25.0.0" } + [features] runtime-benchmarks = [ "asset-hub-polkadot-runtime/runtime-benchmarks", diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 6524e877da..c3f5ee38fd 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -44,8 +44,7 @@ pub type BridgeHubKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensio pub type GluttonKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; -pub type EncointerKusamaChainSpec = - sc_chain_spec::GenericChainSpec; +pub type EncointerKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; const ASSET_HUB_POLKADOT_ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; @@ -518,56 +517,43 @@ pub fn glutton_kusama_local_testnet_config() -> Result, Strin } // EncointerKusama -fn encointer_kusama_genesis( - wasm_binary: &[u8], - endowed_accounts: Vec, - id: ParaId, -) -> encointer_kusama_runtime::RuntimeGenesisConfig { - encointer_kusama_runtime::RuntimeGenesisConfig { - system: encointer_kusama_runtime::SystemConfig { - code: wasm_binary.to_vec(), - ..Default::default() - }, - balances: encointer_kusama_runtime::BalancesConfig { +fn encointer_kusama_genesis(endowed_accounts: Vec, id: u32) -> serde_json::Value { + // The Encointer may not be migrated to the latest release, so we use compatible dependencies. + fn get_from_seed( + seed: &str, + ) -> ::Public { + use sp_core_encointer_compatible::Pair; + TPublic::Pair::from_string(&format!("//{}", seed), None) + .expect("static values are valid; qed") + .public() + } + + serde_json::json!({ + "balances": asset_hub_kusama_runtime::BalancesConfig { balances: endowed_accounts .iter() .cloned() .map(|k| (k, ENCOINTER_KUSAMA_ED * 4096)) .collect(), }, - parachain_info: encointer_kusama_runtime::ParachainInfoConfig { - parachain_id: id, + "parachainInfo": encointer_kusama_runtime::ParachainInfoConfig { + parachain_id: id.into(), ..Default::default() }, - collective: Default::default(), - encointer_balances: Default::default(), - encointer_ceremonies: Default::default(), - encointer_communities: Default::default(), - encointer_faucet: Default::default(), - encointer_scheduler: Default::default(), - membership: Default::default(), - treasury: Default::default(), - aura: encointer_kusama_runtime::AuraConfig { - authorities: vec![get_from_seed::("Alice").into()], + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - aura_ext: Default::default(), - parachain_system: Default::default(), - polkadot_xcm: encointer_kusama_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() + "aura": encointer_kusama_runtime::AuraConfig { + authorities: vec![get_from_seed::("Alice").into()], }, - transaction_payment: Default::default(), - } + }) } -fn encointer_kusama_local_genesis( - wasm_binary: &[u8], -) -> encointer_kusama_runtime::RuntimeGenesisConfig { +fn encointer_kusama_local_genesis(para_id: u32) -> serde_json::Value { encointer_kusama_genesis( // initial collators. - wasm_binary, testnet_accounts(), - 1001.into(), + para_id, ) } @@ -577,21 +563,16 @@ pub fn encointer_kusama_local_testnet_config() -> Result, Str properties.insert("tokenSymbol".into(), "KSM".into()); properties.insert("tokenDecimals".into(), 12.into()); - let wasm_binary = - encointer_kusama_runtime::WASM_BINARY.ok_or("EncointerKusama wasm not available")?; - - Ok(Box::new(EncointerKusamaChainSpec::from_genesis( - // Name - "Kusama Encointer Local", - // ID - "encointer-kusama-local", - ChainType::Local, - move || encointer_kusama_local_genesis(wasm_binary), - Vec::new(), - None, - None, - None, - Some(properties), - Extensions { relay_chain: "kusama-local".into(), para_id: 1001 }, - ))) + Ok(Box::new( + EncointerKusamaChainSpec::builder( + encointer_kusama_runtime::WASM_BINARY.expect("EncointerKusama wasm not available!"), + Extensions { relay_chain: "kusama-local".into(), para_id: 1001 }, + ) + .with_name("Kusama Encointer Local") + .with_id("encointer-kusama-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(encointer_kusama_local_genesis(1001)) + .with_properties(properties) + .build(), + )) } From 526c46540ec923b30b97e9c0faa322c05835458d Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 22 Jan 2024 16:26:38 +0100 Subject: [PATCH 073/316] Fix tests --- integration-tests/emulated/chains/src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/integration-tests/emulated/chains/src/lib.rs b/integration-tests/emulated/chains/src/lib.rs index 84a3c8e5b4..a4e6f3eed7 100644 --- a/integration-tests/emulated/chains/src/lib.rs +++ b/integration-tests/emulated/chains/src/lib.rs @@ -41,8 +41,6 @@ use xcm_emulator::{ decl_test_sender_receiver_accounts_parameter_types, }; -use polkadot_primitives::runtime_api::runtime_decl_for_parachain_host::ParachainHostV7; - decl_test_relay_chains! { #[api_version(5)] pub struct Polkadot { @@ -58,7 +56,7 @@ decl_test_relay_chains! { Hrmp: polkadot_runtime::Hrmp, } }, - #[api_version(5)] + #[api_version(8)] pub struct Kusama { genesis = kusama::genesis(), on_init = (), From 69acc263422fa2cf726db6f02ebba3944438f50b Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 22 Jan 2024 23:29:31 +0100 Subject: [PATCH 074/316] Update relay/polkadot/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- relay/polkadot/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 9a5f67e151..e4482f97c9 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -798,7 +798,6 @@ impl pallet_fast_unstake::Config for Runtime { parameter_types! { // Minimum 4 CENTS/byte pub const BasicDeposit: Balance = deposit(1, 258); - // TODO:(PR#137) - check ByteDeposit? pub const ByteDeposit: Balance = deposit(0, 1); pub const SubAccountDeposit: Balance = deposit(1, 53); pub const MaxSubAccounts: u32 = 100; From 86aad7f5fa146bc4be5c4829168bfb40ec993278 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 23 Jan 2024 12:25:54 +0100 Subject: [PATCH 075/316] Added CHANGELOG.md entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c11ed9a0a4..11337e88b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Upgrade parachains runtime API from v7 to v8 in Kusama ([context](https://paritytech.github.io/polkadot-sdk/book/protocol-validator-disabling.html), [polkadot-fellows/runtimes#148](https://github.com/polkadot-fellows/runtimes/pull/148)). - Fixed the lowering of Asset Hub existential deposits. - MMR leaves generated by `pallet_mmr` point to the next-authority-set of the current block instead of the prior block [polkadot-fellows/runtimes#169](https://github.com/polkadot-fellows/runtimes/pull/169) +- Upgrade dependencies to the `polkadot-sdk@1.5.0` release ([polkadot-fellows/runtimes#137](https://github.com/polkadot-fellows/runtimes/pull/137)) ### Removed From 2d08e1b0921abe36baf9b321516ad56b29261b42 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 23 Jan 2024 12:32:02 +0100 Subject: [PATCH 076/316] Removed `TODO:(PR#137)` --- relay/kusama/src/lib.rs | 2 -- relay/polkadot/src/lib.rs | 1 - system-parachains/gluttons/glutton-kusama/src/lib.rs | 1 - 3 files changed, 4 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index f730ff177e..c76ef4e7cf 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -649,7 +649,6 @@ parameter_types! { 27, "DOT_SLASH_DEFER_DURATION" ); - // TODO:(PR#137) - check MaxExposurePageSize/MaxNominators 512? pub const MaxExposurePageSize: u32 = 512; // Note: this is not really correct as Max Nominators is (MaxExposurePageSize * page_count) but // this is an unbounded number. We just set it to a reasonably high value, 1 full page @@ -917,7 +916,6 @@ impl claims::Config for Runtime { parameter_types! { // Minimum 100 bytes/KSM deposited (1 CENT/byte) pub const BasicDeposit: Balance = 1000 * CENTS; // 258 bytes on-chain - // TODO:(PR#137) - check ByteDeposit? pub const ByteDeposit: Balance = deposit(0, 1); pub const SubAccountDeposit: Balance = 200 * CENTS; // 53 bytes on-chain pub const MaxSubAccounts: u32 = 100; diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index e4482f97c9..344d976688 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -667,7 +667,6 @@ parameter_types! { "DOT_SLASH_DEFER_DURATION" ); pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE; - // TODO:(PR#137) - check MaxExposurePageSize/MaxNominators 512? pub const MaxExposurePageSize: u32 = 512; // Note: this is not really correct as Max Nominators is (MaxExposurePageSize * page_count) but // this is an unbounded number. We just set it to a reasonably high value, 1 full page diff --git a/system-parachains/gluttons/glutton-kusama/src/lib.rs b/system-parachains/gluttons/glutton-kusama/src/lib.rs index 1e90e239e4..8bdd8e08b1 100644 --- a/system-parachains/gluttons/glutton-kusama/src/lib.rs +++ b/system-parachains/gluttons/glutton-kusama/src/lib.rs @@ -232,7 +232,6 @@ construct_runtime! { ParachainSystem: cumulus_pallet_parachain_system = 1, ParachainInfo: parachain_info = 2, - // TODO:(PR#137) - do we still need this? // DMP handler. CumulusXcm: cumulus_pallet_xcm = 10, MessageQueue: pallet_message_queue = 11, From 2fc33003e0416a1b4fc1631f40c8833d2dd7ee30 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 26 Jan 2024 00:26:25 +0100 Subject: [PATCH 077/316] Fix constants stuff after rebase --- relay/kusama/Cargo.toml | 1 - relay/kusama/constants/Cargo.toml | 2 +- relay/polkadot/Cargo.toml | 1 - relay/polkadot/constants/Cargo.toml | 2 +- .../asset-hubs/asset-hub-kusama/src/lib.rs | 8 +- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 8 +- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 2 +- .../bridge-hub-polkadot/src/lib.rs | 2 +- .../collectives-polkadot/src/lib.rs | 2 +- system-parachains/constants/Cargo.toml | 2 +- system-parachains/encointer/Cargo.toml | 14 +- system-parachains/encointer/src/lib.rs | 165 ++++++++++++++++-- 12 files changed, 174 insertions(+), 35 deletions(-) diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index 710f50cdd9..47d58733eb 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -17,7 +17,6 @@ rustc-hex = { version = "2.1.0", default-features = false } serde = { version = "1.0.195", default-features = false } serde_derive = { version = "1.0.195", optional = true } static_assertions = "1.1.0" -smallvec = "1.11.2" authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "25.0.0" } babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.31.0" } diff --git a/relay/kusama/constants/Cargo.toml b/relay/kusama/constants/Cargo.toml index b560f49ae0..0d7da2911c 100644 --- a/relay/kusama/constants/Cargo.toml +++ b/relay/kusama/constants/Cargo.toml @@ -7,7 +7,7 @@ edition.workspace = true license.workspace = true [dependencies] -smallvec = "1.11.2" +smallvec = "1.13.1" frame-support = { default-features = false , version = "27.0.0" } primitives = { package = "polkadot-primitives", default-features = false , version = "6.0.0" } diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index 63585a9942..5a881d4ee7 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -16,7 +16,6 @@ rustc-hex = { version = "2.1.0", default-features = false } serde = { version = "1.0.195", default-features = false } serde_derive = { version = "1.0.195", optional = true } static_assertions = "1.1.0" -smallvec = "1.11.2" authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "25.0.0" } babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.31.0" } diff --git a/relay/polkadot/constants/Cargo.toml b/relay/polkadot/constants/Cargo.toml index 1c6ad326da..bb07bfb6a4 100644 --- a/relay/polkadot/constants/Cargo.toml +++ b/relay/polkadot/constants/Cargo.toml @@ -7,7 +7,7 @@ edition.workspace = true license.workspace = true [dependencies] -smallvec = "1.11.2" +smallvec = "1.13.1" frame-support = { default-features = false , version = "27.0.0" } primitives = { package = "polkadot-primitives", default-features = false , version = "6.0.0" } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 12714fb522..d40933f512 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -1323,7 +1323,7 @@ impl_runtime_apis! { // Relay/native token can be teleported between AH and Relay. Some(( MultiAsset { - fun: Fungible(EXISTENTIAL_DEPOSIT), + fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }, Parent.into(), @@ -1338,7 +1338,7 @@ impl_runtime_apis! { ); Some(( MultiAsset { - fun: Fungible(EXISTENTIAL_DEPOSIT), + fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }, ParentThen(Parachain(random_para_id).into()).into(), @@ -1352,12 +1352,12 @@ impl_runtime_apis! { // (We don't care that Relay doesn't accept incoming unknown AH local asset) let dest = Parent.into(); - let fee_amount = EXISTENTIAL_DEPOSIT; + let fee_amount = ExistentialDeposit::get(); let fee_asset: MultiAsset = (MultiLocation::parent(), fee_amount).into(); let who = frame_benchmarking::whitelisted_caller(); // Give some multiple of the existential deposit - let balance = fee_amount + EXISTENTIAL_DEPOSIT * 1000; + let balance = fee_amount + ExistentialDeposit::get() * 1000; let _ = >::make_free_balance_be( &who, balance, ); diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 090e3f61d0..a145d6eb96 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -1216,7 +1216,7 @@ impl_runtime_apis! { // Relay/native token can be teleported between AH and Relay. Some(( MultiAsset { - fun: Fungible(EXISTENTIAL_DEPOSIT), + fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }, Parent.into(), @@ -1231,7 +1231,7 @@ impl_runtime_apis! { ); Some(( MultiAsset { - fun: Fungible(EXISTENTIAL_DEPOSIT), + fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }, ParentThen(Parachain(random_para_id).into()).into(), @@ -1245,12 +1245,12 @@ impl_runtime_apis! { // (We don't care that Relay doesn't accept incoming unknown AH local asset) let dest = Parent.into(); - let fee_amount = EXISTENTIAL_DEPOSIT; + let fee_amount = ExistentialDeposit::get(); let fee_asset: MultiAsset = (MultiLocation::parent(), fee_amount).into(); let who = frame_benchmarking::whitelisted_caller(); // Give some multiple of the existential deposit - let balance = fee_amount + EXISTENTIAL_DEPOSIT * 1000; + let balance = fee_amount + ExistentialDeposit::get() * 1000; let _ = >::make_free_balance_be( &who, balance, ); diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 326377e00d..dc648e1f0b 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -1023,7 +1023,7 @@ impl_runtime_apis! { // Relay/native token can be teleported between BH and Relay. Some(( MultiAsset { - fun: Fungible(EXISTENTIAL_DEPOSIT), + fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }, Parent.into(), diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 9eb8d0b53e..ec566e4d77 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -1023,7 +1023,7 @@ impl_runtime_apis! { // Relay/native token can be teleported between BH and Relay. Some(( MultiAsset { - fun: Fungible(EXISTENTIAL_DEPOSIT), + fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }, Parent.into(), diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index a4219e3c08..a7eb45509f 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -980,7 +980,7 @@ impl_runtime_apis! { // Relay/native token can be teleported between Collectives and Relay. Some(( MultiAsset { - fun: Fungible(EXISTENTIAL_DEPOSIT), + fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }.into(), Parent.into(), diff --git a/system-parachains/constants/Cargo.toml b/system-parachains/constants/Cargo.toml index d8c079192c..a414dd6126 100644 --- a/system-parachains/constants/Cargo.toml +++ b/system-parachains/constants/Cargo.toml @@ -8,7 +8,7 @@ edition.workspace = true license.workspace = true [dependencies] -smallvec = "1.11.2" +smallvec = "1.13.1" frame-support = { default-features = false , version = "27.0.0" } kusama-runtime-constants = { path = "../../relay/kusama/constants", default-features = false} diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml index 940e8201f7..548ae95ebe 100644 --- a/system-parachains/encointer/Cargo.toml +++ b/system-parachains/encointer/Cargo.toml @@ -17,6 +17,7 @@ log = { version = "0.4.20", default-features = false } scale-info = { version = "2.10.0", default-features = false, features = [ "derive", ] } +smallvec = "1.13.1" # encointer deps encointer-balances-tx-payment = { default-features = false, version = "3.0.2" } @@ -88,10 +89,13 @@ cumulus-primitives-timestamp = { default-features = false, version = "0.4.0" } cumulus-primitives-utility = { default-features = false, version = "0.4.0" } parachain-info = { package = "staging-parachain-info", default-features = false, version = "0.4.0" } parachains-common = { default-features = false, version = "4.0.0" } -system-parachains-constants = { path = "../constants", default-features = false } - -# Used for runtime benchmarking +# TODO:(PR#137) - Encointer pallets do not have compatible `polkadot-sdk` versions with the rest, +# so we need to copy all the stuff from `system-parachains-constants`. +# system-parachains-constants = { path = "../constants", default-features = false } +polkadot-core-primitives = { default-features = false, version = "4.0.0"} +polkadot-primitives = { default-features = false , version = "4.0.0" } +kusama-runtime-constants = { path = "../../relay/kusama/constants", default-features = false} [build-dependencies] substrate-wasm-builder = { optional = true, version = "14.0.0" } @@ -148,6 +152,7 @@ std = [ "frame-system-rpc-runtime-api/std", "frame-system/std", "frame-try-runtime/std", + "kusama-runtime-constants/std", "log/std", "pallet-asset-tx-payment/std", "pallet-aura/std", @@ -174,6 +179,8 @@ std = [ "pallet-xcm/std", "parachain-info/std", "parachains-common/std", + "polkadot-core-primitives/std", + "polkadot-primitives/std", "scale-info/std", "sp-api/std", "sp-block-builder/std", @@ -187,6 +194,7 @@ std = [ "sp-std/std", "sp-transaction-pool/std", "sp-version/std", +# "system-parachains-constants/std", "substrate-wasm-builder", "xcm-builder/std", "xcm-executor/std", diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 6382c62127..c65496fd53 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -93,6 +93,7 @@ use sp_version::RuntimeVersion; use system_parachains_constants::{ kusama::{consensus::*, currency::*, fee::WeightToFee}, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, + SLOT_DURATION, }; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::{ @@ -105,22 +106,6 @@ use xcm_executor::XcmExecutor; /// A type to hold UTC unix epoch [ms] pub type Moment = u64; -pub const ONE_DAY: Moment = 86_400_000; - -/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included -/// into the relay chain. -const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1; -/// How many parachain blocks are processed by the relay chain per parent. Limits the -/// number of blocks authored per slot. -const BLOCK_PROCESSING_VELOCITY: u32 = 1; -/// This determines the average expected block time that we are targeting. -/// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`. -/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked -/// up by `pallet_aura` to implement `fn slot_duration()`. -/// -/// Change this to adjust the block time. -pub const MILLISECS_PER_BLOCK: u64 = 12000; -pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; pub type AssetId = AssetIdOf; pub type AssetBalance = AssetBalanceOf; @@ -1022,3 +1007,151 @@ fn test_ed_is_one_tenth_of_relay() { let encointer_ed = ExistentialDeposit::get(); assert_eq!(relay_ed / 10, encointer_ed); } + +// TODO:(PR#137) - encointer pallets does not have compatible `polkadot-sdk` versions, +// so we cannot easily reuse `system-parachains-constants` module. +mod system_parachains_constants { + use super::*; + use frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND; + + /// This determines the average expected block time that we are targeting. Blocks will be + /// produced at a minimum duration defined by `SLOT_DURATION`. `SLOT_DURATION` is picked up by + /// `pallet_timestamp` which is in turn picked up by `pallet_aura` to implement `fn + /// slot_duration()`. + /// + /// Change this to adjust the block time. + pub const MILLISECS_PER_BLOCK: u64 = 12000; + pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; + + // Time is measured by number of blocks. + pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); + pub const HOURS: BlockNumber = MINUTES * 60; + pub const DAYS: BlockNumber = HOURS * 24; + + /// We assume that ~5% of the block weight is consumed by `on_initialize` handlers. This is + /// used to limit the maximal weight of a single extrinsic. + pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(5); + /// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used by + /// Operational extrinsics. + pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); + + /// We allow for 0.5 seconds of compute with a 6 second average block time. + pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts( + WEIGHT_REF_TIME_PER_SECOND.saturating_div(2), + polkadot_primitives::MAX_POV_SIZE as u64, + ); + + pub(crate) mod kusama { + /// Consensus-related. + pub mod consensus { + /// Maximum number of blocks simultaneously accepted by the Runtime, not yet included + /// into the relay chain. + pub const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1; + /// How many parachain blocks are processed by the relay chain per parent. Limits the + /// number of blocks authored per slot. + pub const BLOCK_PROCESSING_VELOCITY: u32 = 1; + /// Relay chain slot duration, in milliseconds. + pub const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000; + } + + /// Constants relating to KSM. + pub mod currency { + use polkadot_core_primitives::Balance; + + /// The default existential deposit for system chains. 1/10th of the Relay Chain's + /// existential deposit. Individual system parachains may modify this in special cases. + pub const SYSTEM_PARA_EXISTENTIAL_DEPOSIT: Balance = + kusama_runtime_constants::currency::EXISTENTIAL_DEPOSIT / 10; + + /// One "KSM" that a UI would show a user. + pub const UNITS: Balance = 1_000_000_000_000; + pub const QUID: Balance = UNITS / 30; + pub const CENTS: Balance = QUID / 100; + pub const MILLICENTS: Balance = CENTS / 1_000; + + /// Deposit rate for stored data. 1/100th of the Relay Chain's deposit rate. `items` is + /// the number of keys in storage and `bytes` is the size of the value. + pub const fn system_para_deposit(items: u32, bytes: u32) -> Balance { + kusama_runtime_constants::currency::deposit(items, bytes) / 100 + } + } + + /// Constants related to Kusama fee payment. + pub mod fee { + use frame_support::{ + pallet_prelude::Weight, + weights::{ + constants::ExtrinsicBaseWeight, FeePolynomial, WeightToFeeCoefficient, + WeightToFeeCoefficients, WeightToFeePolynomial, + }, + }; + use polkadot_core_primitives::Balance; + use smallvec::smallvec; + pub use sp_runtime::Perbill; + + /// Handles converting a weight scalar to a fee value, based on the scale and + /// granularity of the node's balance type. + /// + /// This should typically create a mapping between the following ranges: + /// - [0, MAXIMUM_BLOCK_WEIGHT] + /// - [Balance::min, Balance::max] + /// + /// Yet, it can be used for any other sort of change to weight-fee. Some examples being: + /// - Setting it to `0` will essentially disable the weight fee. + /// - Setting it to `1` will cause the literal `#[weight = x]` values to be charged. + pub struct WeightToFee; + + impl frame_support::weights::WeightToFee for WeightToFee { + type Balance = Balance; + + fn weight_to_fee(weight: &Weight) -> Self::Balance { + let time_poly: FeePolynomial = RefTimeToFee::polynomial().into(); + let proof_poly: FeePolynomial = ProofSizeToFee::polynomial().into(); + + // Take the maximum instead of the sum to charge by the more scarce resource. + time_poly.eval(weight.ref_time()).max(proof_poly.eval(weight.proof_size())) + } + } + + /// Maps the reference time component of `Weight` to a fee. + pub struct RefTimeToFee; + + impl WeightToFeePolynomial for RefTimeToFee { + type Balance = Balance; + fn polynomial() -> WeightToFeeCoefficients { + // In Kusama, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 + // CENT: The standard system parachain configuration is 1/10 of that, as in + // 1/100 CENT. + let p = super::currency::CENTS; + let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); + + smallvec![WeightToFeeCoefficient { + degree: 1, + negative: false, + coeff_frac: Perbill::from_rational(p % q, q), + coeff_integer: p / q, + }] + } + } + + /// Maps the proof size component of `Weight` to a fee. + pub struct ProofSizeToFee; + + impl WeightToFeePolynomial for ProofSizeToFee { + type Balance = Balance; + fn polynomial() -> WeightToFeeCoefficients { + // Map 10kb proof to 1 CENT. + let p = super::currency::CENTS; + let q = 10_000; + + smallvec![WeightToFeeCoefficient { + degree: 1, + negative: false, + coeff_frac: Perbill::from_rational(p % q, q), + coeff_integer: p / q, + }] + } + } + } + } +} From 9bdf7e4922ad10ef38e5fee06bebcce1b09a8deb Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 26 Jan 2024 10:56:45 +0100 Subject: [PATCH 078/316] WIP: test final version of pallet-nomination-pools migration fix: https://github.com/paritytech/polkadot-sdk/pull/2942 --- relay/kusama/src/lib.rs | 173 +++++++++++++++++++++++++++++-------- relay/polkadot/src/lib.rs | 177 ++++++++++++++++++++++++++++++-------- 2 files changed, 276 insertions(+), 74 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index c76ef4e7cf..0b88d3e12b 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1671,9 +1671,6 @@ pub mod migrations { /// Unreleased migrations. Add new ones here: pub type Unreleased = ( - pallet_staking::migrations::v14::MigrateToV14, - parachains_configuration::migration::v10::MigrateToV10, - pallet_grandpa::migrations::MigrateV4ToV5, pallet_nomination_pools::migration::versioned::V5toV6, // TODO:(PR#137) - replace with fixed/released version crate::test_oliverfix_migration::V6ToV7, @@ -1681,6 +1678,9 @@ pub mod migrations { // TODO:(PR#137) - replace with fixed/released version crate::test_oliverfix_migration::V7ToV8, // pallet_nomination_pools::migration::versioned::V7ToV8, + pallet_staking::migrations::v14::MigrateToV14, + parachains_configuration::migration::v10::MigrateToV10, + pallet_grandpa::migrations::MigrateV4ToV5, ); } @@ -2807,11 +2807,9 @@ mod test_oliverfix_migration { >; pub mod v8 { - use super::*; - - use super::v7::BondedPoolInner as OldBondedPoolInner; + use super::{v7::V7BondedPoolInner, *}; - impl OldBondedPoolInner { + impl V7BondedPoolInner { fn migrate_to_v8(self) -> BondedPoolInner { BondedPoolInner { commission: Commission { @@ -2831,7 +2829,6 @@ mod test_oliverfix_migration { } pub struct VersionUncheckedMigrateV7ToV8(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for VersionUncheckedMigrateV7ToV8 { #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { @@ -2840,7 +2837,7 @@ mod test_oliverfix_migration { fn on_runtime_upgrade() -> Weight { let mut translated = 0u64; - BondedPools::::translate::, _>(|_key, old_value| { + BondedPools::::translate::, _>(|_key, old_value| { translated.saturating_inc(); Some(old_value.migrate_to_v8()) }); @@ -2855,21 +2852,30 @@ mod test_oliverfix_migration { .all(|(_, inner)| inner.commission.claim_permission.is_none()), "`claim_permission` value has not been set correctly." ); + use frame_support::traits::GetStorageVersion; + frame_support::ensure!( + Pallet::::on_chain_storage_version() >= 8, + "nomination-pools::migration::v8: wrong storage version" + ); Ok(()) } } } - mod v7 { + /// This migration accumulates and initializes the [`TotalValueLocked`] for all pools. + /// + /// WARNING: This migration works under the assumption that the [`BondedPools`] cannot be + /// inflated arbitrarily. Otherwise this migration could fail due to too high weight. + pub(crate) mod v7 { use super::*; - - use sp_staking::StakingInterface; - // use frame_support::traits::GetStorageVersion; + use frame_support::{BoundedBTreeMap, DefaultNoBound}; + use sp_runtime::traits::{Convert, Zero}; + use sp_staking::EraIndex; #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] #[codec(mel_bound(T: Config))] #[scale_info(skip_type_params(T))] - pub struct Commission { + pub struct V7Commission { pub current: Option<(Perbill, T::AccountId)>, pub max: Option, pub change_rate: Option>>, @@ -2879,40 +2885,49 @@ mod test_oliverfix_migration { #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] #[codec(mel_bound(T: Config))] #[scale_info(skip_type_params(T))] - pub struct BondedPoolInner { - pub commission: Commission, + pub struct V7BondedPoolInner { + pub commission: V7Commission, pub member_counter: u32, pub points: BalanceOf, pub roles: PoolRoles, pub state: PoolState, } + #[allow(dead_code)] #[derive(RuntimeDebugNoBound)] #[cfg_attr(feature = "std", derive(Clone, PartialEq))] - pub struct BondedPool { + pub struct V7BondedPool { /// The identifier of the pool. id: PoolId, /// The inner fields. - inner: BondedPoolInner, + inner: V7BondedPoolInner, } - impl BondedPool { + impl V7BondedPool { fn bonded_account(&self) -> T::AccountId { Pallet::::create_bonded_account(self.id) } + fn points_to_balance(&self, points: BalanceOf) -> BalanceOf { + use sp_staking::StakingInterface; + let bonded_balance = + T::Staking::active_stake(&self.bonded_account()).unwrap_or(Zero::zero()); + point_to_balance::(bonded_balance, self.inner.points, points) + } } + // NOTE: We cannot put a V7 prefix here since that would change the storage key. #[frame_support::storage_alias] pub type BondedPools = - CountedStorageMap, Twox64Concat, PoolId, BondedPoolInner>; + CountedStorageMap, Twox64Concat, PoolId, V7BondedPoolInner>; pub struct VersionUncheckedMigrateV6ToV7(sp_std::marker::PhantomData); impl VersionUncheckedMigrateV6ToV7 { fn calculate_tvl_by_total_stake() -> BalanceOf { + use sp_staking::StakingInterface; BondedPools::::iter() .map(|(id, inner)| { T::Staking::total_stake( - &BondedPool { id, inner: inner.clone() }.bonded_account(), + &V7BondedPool { id, inner: inner.clone() }.bonded_account(), ) .unwrap_or_default() }) @@ -2955,26 +2970,112 @@ mod test_oliverfix_migration { "TVL written is not equal to `Staking::total_stake` of all `BondedPools`." ); - // TODO: skip for now // calculate the sum of `total_balance` of all `PoolMember` as the upper bound for // the `TotalValueLocked`. - // let total_balance_members: BalanceOf = PoolMembers::::iter() - // .map(|(_, member)| member.total_balance()) - // .reduce(|acc, total_balance| acc + total_balance) - // .unwrap_or_default(); - // - // frame_support::ensure!( - // TotalValueLocked::::get() <= total_balance_members, - // "TVL is greater than the balance of all PoolMembers." - // ); - // - // frame_support::ensure!( - // Pallet::::on_chain_storage_version() >= 7, - // "nomination-pools::migration::v7: wrong storage version" - // ); + let total_balance_members: BalanceOf = PoolMembers::::iter() + .map(|(_, member)| total_balance(&member)) + .reduce(|acc, total_balance| acc + total_balance) + .unwrap_or_default(); + + frame_support::ensure!( + TotalValueLocked::::get() <= total_balance_members, + "TVL is greater than the balance of all PoolMembers." + ); + + use frame_support::traits::GetStorageVersion; + frame_support::ensure!( + Pallet::::on_chain_storage_version() >= 7, + "nomination-pools::migration::v7: wrong storage version" + ); Ok(()) } } + + #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, RuntimeDebugNoBound)] + #[cfg_attr(feature = "std", derive(Clone, PartialEq, Eq))] + #[codec(mel_bound(T: Config))] + #[scale_info(skip_type_params(T))] + pub struct UnbondPool { + /// The points in this pool. + points: BalanceOf, + /// The funds in the pool. + balance: BalanceOf, + } + + impl UnbondPool { + fn point_to_balance(&self, points: BalanceOf) -> BalanceOf { + point_to_balance::(self.balance, self.points, points) + } + } + + #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, RuntimeDebugNoBound)] + #[cfg_attr(feature = "std", derive(Clone, PartialEq))] + #[codec(mel_bound(T: Config))] + #[scale_info(skip_type_params(T))] + pub struct SubPools { + /// A general, era agnostic pool of funds that have fully unbonded. The pools + /// of `Self::with_era` will lazily be merged into into this pool if they are + /// older then `current_era - TotalUnbondingPools`. + no_era: UnbondPool, + /// Map of era in which a pool becomes unbonded in => unbond pools. + with_era: BoundedBTreeMap, TotalUnbondingPools>, + } + + #[frame_support::storage_alias] + pub type SubPoolsStorage = + CountedStorageMap, Twox64Concat, PoolId, SubPools>; + + // TODO:(PR#137) - hacky copy of pallet-nomination-pools, because lots of this stuff is + // private there. + fn total_balance(self_as_member: &PoolMember) -> BalanceOf { + // let pool = V7BondedPool::::get(self_as_member.pool_id).unwrap(); + let id = self_as_member.pool_id; + let pool = BondedPools::::try_get(id) + .ok() + .map(|inner| V7BondedPool { id, inner }) + .unwrap(); + let active_balance = pool.points_to_balance(self_as_member.points); + + let sub_pools = match SubPoolsStorage::::get(self_as_member.pool_id) { + Some(sub_pools) => sub_pools, + None => return active_balance, + }; + + let unbonding_balance = self_as_member.unbonding_eras.iter().fold( + BalanceOf::::zero(), + |accumulator, (era, unlocked_points)| { + // if the `SubPools::with_era` has already been merged into the + // `SubPools::no_era` use this pool instead. + let era_pool = sub_pools.with_era.get(era).unwrap_or(&sub_pools.no_era); + accumulator + (era_pool.point_to_balance(*unlocked_points)) + }, + ); + + active_balance + unbonding_balance + } + + fn point_to_balance( + current_balance: BalanceOf, + current_points: BalanceOf, + points: BalanceOf, + ) -> BalanceOf { + let u256 = T::BalanceToU256::convert; + let balance = T::U256ToBalance::convert; + if current_balance.is_zero() || current_points.is_zero() || points.is_zero() { + // There is nothing to unbond + return Zero::zero() + } + + use sp_std::ops::Div; + + // Equivalent of (current_balance / current_points) * points + balance( + u256(current_balance) + .saturating_mul(u256(points)) + // We check for zero above + .div(u256(current_points)), + ) + } } } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 344d976688..f7006b190d 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1704,9 +1704,6 @@ pub mod migrations { pub type Unreleased = ( // Upgrade SessionKeys to include BEEFY key UpgradeSessionKeys, - pallet_staking::migrations::v14::MigrateToV14, - parachains_configuration::migration::v10::MigrateToV10, - pallet_grandpa::migrations::MigrateV4ToV5, pallet_nomination_pools::migration::versioned::V5toV6, // TODO:(PR#137) - replace with fixed/released version crate::test_oliverfix_migration::V6ToV7, @@ -1714,6 +1711,9 @@ pub mod migrations { // TODO:(PR#137) - replace with fixed/released version crate::test_oliverfix_migration::V7ToV8, // pallet_nomination_pools::migration::versioned::V7ToV8, + pallet_staking::migrations::v14::MigrateToV14, + parachains_configuration::migration::v10::MigrateToV10, + pallet_grandpa::migrations::MigrateV4ToV5, ); } @@ -2962,7 +2962,8 @@ mod remote_tests { mod test_oliverfix_migration { use super::*; use frame_support::{ - traits::OnRuntimeUpgrade, DebugNoBound, RuntimeDebugNoBound, Twox64Concat, + pallet_prelude::TypeInfo, traits::OnRuntimeUpgrade, DebugNoBound, RuntimeDebugNoBound, + Twox64Concat, }; use frame_system::pallet_prelude::BlockNumberFor; use pallet_nomination_pools::*; @@ -2985,11 +2986,9 @@ mod test_oliverfix_migration { >; pub mod v8 { - use super::*; - - use super::v7::BondedPoolInner as OldBondedPoolInner; + use super::{v7::V7BondedPoolInner, *}; - impl OldBondedPoolInner { + impl V7BondedPoolInner { fn migrate_to_v8(self) -> BondedPoolInner { BondedPoolInner { commission: Commission { @@ -3009,7 +3008,6 @@ mod test_oliverfix_migration { } pub struct VersionUncheckedMigrateV7ToV8(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for VersionUncheckedMigrateV7ToV8 { #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { @@ -3018,7 +3016,7 @@ mod test_oliverfix_migration { fn on_runtime_upgrade() -> Weight { let mut translated = 0u64; - BondedPools::::translate::, _>(|_key, old_value| { + BondedPools::::translate::, _>(|_key, old_value| { translated.saturating_inc(); Some(old_value.migrate_to_v8()) }); @@ -3033,22 +3031,30 @@ mod test_oliverfix_migration { .all(|(_, inner)| inner.commission.claim_permission.is_none()), "`claim_permission` value has not been set correctly." ); + use frame_support::traits::GetStorageVersion; + frame_support::ensure!( + Pallet::::on_chain_storage_version() >= 8, + "nomination-pools::migration::v8: wrong storage version" + ); Ok(()) } } } - mod v7 { + /// This migration accumulates and initializes the [`TotalValueLocked`] for all pools. + /// + /// WARNING: This migration works under the assumption that the [`BondedPools`] cannot be + /// inflated arbitrarily. Otherwise this migration could fail due to too high weight. + pub(crate) mod v7 { use super::*; - - use scale_info::TypeInfo; - use sp_staking::StakingInterface; - // use frame_support::traits::GetStorageVersion; + use frame_support::{BoundedBTreeMap, DefaultNoBound}; + use sp_runtime::traits::{Convert, Zero}; + use sp_staking::EraIndex; #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] #[codec(mel_bound(T: Config))] #[scale_info(skip_type_params(T))] - pub struct Commission { + pub struct V7Commission { pub current: Option<(Perbill, T::AccountId)>, pub max: Option, pub change_rate: Option>>, @@ -3058,40 +3064,49 @@ mod test_oliverfix_migration { #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] #[codec(mel_bound(T: Config))] #[scale_info(skip_type_params(T))] - pub struct BondedPoolInner { - pub commission: Commission, + pub struct V7BondedPoolInner { + pub commission: V7Commission, pub member_counter: u32, pub points: BalanceOf, pub roles: PoolRoles, pub state: PoolState, } + #[allow(dead_code)] #[derive(RuntimeDebugNoBound)] #[cfg_attr(feature = "std", derive(Clone, PartialEq))] - pub struct BondedPool { + pub struct V7BondedPool { /// The identifier of the pool. id: PoolId, /// The inner fields. - inner: BondedPoolInner, + inner: V7BondedPoolInner, } - impl BondedPool { + impl V7BondedPool { fn bonded_account(&self) -> T::AccountId { Pallet::::create_bonded_account(self.id) } + fn points_to_balance(&self, points: BalanceOf) -> BalanceOf { + use sp_staking::StakingInterface; + let bonded_balance = + T::Staking::active_stake(&self.bonded_account()).unwrap_or(Zero::zero()); + point_to_balance::(bonded_balance, self.inner.points, points) + } } + // NOTE: We cannot put a V7 prefix here since that would change the storage key. #[frame_support::storage_alias] pub type BondedPools = - CountedStorageMap, Twox64Concat, PoolId, BondedPoolInner>; + CountedStorageMap, Twox64Concat, PoolId, V7BondedPoolInner>; pub struct VersionUncheckedMigrateV6ToV7(sp_std::marker::PhantomData); impl VersionUncheckedMigrateV6ToV7 { fn calculate_tvl_by_total_stake() -> BalanceOf { + use sp_staking::StakingInterface; BondedPools::::iter() .map(|(id, inner)| { T::Staking::total_stake( - &BondedPool { id, inner: inner.clone() }.bonded_account(), + &V7BondedPool { id, inner: inner.clone() }.bonded_account(), ) .unwrap_or_default() }) @@ -3134,26 +3149,112 @@ mod test_oliverfix_migration { "TVL written is not equal to `Staking::total_stake` of all `BondedPools`." ); - // TODO: skip for now // calculate the sum of `total_balance` of all `PoolMember` as the upper bound for // the `TotalValueLocked`. - // let total_balance_members: BalanceOf = PoolMembers::::iter() - // .map(|(_, member)| member.total_balance()) - // .reduce(|acc, total_balance| acc + total_balance) - // .unwrap_or_default(); - // - // frame_support::ensure!( - // TotalValueLocked::::get() <= total_balance_members, - // "TVL is greater than the balance of all PoolMembers." - // ); - // - // frame_support::ensure!( - // Pallet::::on_chain_storage_version() >= 7, - // "nomination-pools::migration::v7: wrong storage version" - // ); + let total_balance_members: BalanceOf = PoolMembers::::iter() + .map(|(_, member)| total_balance(&member)) + .reduce(|acc, total_balance| acc + total_balance) + .unwrap_or_default(); + + frame_support::ensure!( + TotalValueLocked::::get() <= total_balance_members, + "TVL is greater than the balance of all PoolMembers." + ); + + use frame_support::traits::GetStorageVersion; + frame_support::ensure!( + Pallet::::on_chain_storage_version() >= 7, + "nomination-pools::migration::v7: wrong storage version" + ); Ok(()) } } + + #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, RuntimeDebugNoBound)] + #[cfg_attr(feature = "std", derive(Clone, PartialEq, Eq))] + #[codec(mel_bound(T: Config))] + #[scale_info(skip_type_params(T))] + pub struct UnbondPool { + /// The points in this pool. + points: BalanceOf, + /// The funds in the pool. + balance: BalanceOf, + } + + impl UnbondPool { + fn point_to_balance(&self, points: BalanceOf) -> BalanceOf { + point_to_balance::(self.balance, self.points, points) + } + } + + #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, RuntimeDebugNoBound)] + #[cfg_attr(feature = "std", derive(Clone, PartialEq))] + #[codec(mel_bound(T: Config))] + #[scale_info(skip_type_params(T))] + pub struct SubPools { + /// A general, era agnostic pool of funds that have fully unbonded. The pools + /// of `Self::with_era` will lazily be merged into into this pool if they are + /// older then `current_era - TotalUnbondingPools`. + no_era: UnbondPool, + /// Map of era in which a pool becomes unbonded in => unbond pools. + with_era: BoundedBTreeMap, TotalUnbondingPools>, + } + + #[frame_support::storage_alias] + pub type SubPoolsStorage = + CountedStorageMap, Twox64Concat, PoolId, SubPools>; + + // TODO:(PR#137) - hacky copy of pallet-nomination-pools, because lots of this stuff is + // private there. + fn total_balance(self_as_member: &PoolMember) -> BalanceOf { + // let pool = V7BondedPool::::get(self_as_member.pool_id).unwrap(); + let id = self_as_member.pool_id; + let pool = BondedPools::::try_get(id) + .ok() + .map(|inner| V7BondedPool { id, inner }) + .unwrap(); + let active_balance = pool.points_to_balance(self_as_member.points); + + let sub_pools = match SubPoolsStorage::::get(self_as_member.pool_id) { + Some(sub_pools) => sub_pools, + None => return active_balance, + }; + + let unbonding_balance = self_as_member.unbonding_eras.iter().fold( + BalanceOf::::zero(), + |accumulator, (era, unlocked_points)| { + // if the `SubPools::with_era` has already been merged into the + // `SubPools::no_era` use this pool instead. + let era_pool = sub_pools.with_era.get(era).unwrap_or(&sub_pools.no_era); + accumulator + (era_pool.point_to_balance(*unlocked_points)) + }, + ); + + active_balance + unbonding_balance + } + + fn point_to_balance( + current_balance: BalanceOf, + current_points: BalanceOf, + points: BalanceOf, + ) -> BalanceOf { + let u256 = T::BalanceToU256::convert; + let balance = T::U256ToBalance::convert; + if current_balance.is_zero() || current_points.is_zero() || points.is_zero() { + // There is nothing to unbond + return Zero::zero() + } + + use sp_std::ops::Div; + + // Equivalent of (current_balance / current_points) * points + balance( + u256(current_balance) + .saturating_mul(u256(points)) + // We check for zero above + .div(u256(current_points)), + ) + } } } From 9e786dbb933bea55c937a689c882db647fab53b7 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Fri, 2 Feb 2024 16:17:39 +0200 Subject: [PATCH 079/316] update asset hub --- .../asset-hubs/asset-hub-kusama/src/lib.rs | 6 +++--- .../asset-hub-kusama/src/xcm_config.rs | 8 +++++--- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 3 +-- .../asset-hub-polkadot/src/xcm_config.rs | 4 ++-- system-parachains/constants/src/kusama.rs | 17 +++++++++++++++++ system-parachains/constants/src/polkadot.rs | 17 +++++++++++++++++ 6 files changed, 45 insertions(+), 10 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index d40933f512..50c197d136 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -35,7 +35,6 @@ use assets_common::{ }; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; -use snowbridge_kusama_common::EthereumNetwork; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ @@ -75,8 +74,9 @@ use parachains_common::{ }; use sp_runtime::RuntimeDebug; use system_parachains_constants::{ - kusama::{consensus::*, currency::*, fee::WeightToFee}, - AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, + kusama::{consensus::*, currency::*, fee::WeightToFee, snowbridge::EthereumNetwork}, + AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, + NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; use xcm::opaque::v3::MultiLocation; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index ea4523bac2..b652da4bd6 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -39,10 +39,9 @@ use parachains_common::{ }, }; use polkadot_parachain_primitives::primitives::Sibling; -use snowbridge_kusama_common::EthereumNetwork; use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; -use system_parachains_constants::TREASURY_PALLET_ID; +use system_parachains_constants::{kusama::snowbridge::EthereumNetwork, TREASURY_PALLET_ID}; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, @@ -96,6 +95,9 @@ pub type LocationToAccountId = ( // Different global consensus parachain sovereign account. // (Used for over-bridge transfers and reserve processing) GlobalConsensusParachainConvertsFor, + // Ethereum contract sovereign account. + // (Used to get convert ethereum contract locations to sovereign account) + GlobalConsensusEthereumConvertsFor, ); /// Means for transacting the native currency on this chain. @@ -880,7 +882,7 @@ pub mod bridging { 1, X2( Parachain(SiblingBridgeHubParaId::get()), - PalletInstance(snowbridge_kusama_common::INBOUND_QUEUE_MESSAGES_PALLET_INDEX) + PalletInstance(system_parachains_constants::kusama::snowbridge::INBOUND_QUEUE_MESSAGES_PALLET_INDEX), ) ); diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index a145d6eb96..4a8b3dc84e 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -67,7 +67,6 @@ use assets_common::{ MultiLocationForAssetId, }; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; -use snowbridge_polkadot_common::EthereumNetwork; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; @@ -110,7 +109,7 @@ use parachains_common::{ use sp_runtime::RuntimeDebug; use system_parachains_constants::{ - polkadot::{consensus::*, currency::*, fee::WeightToFee}, + polkadot::{consensus::*, currency::*, fee::WeightToFee, snowbridge::EthereumNetwork}, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 2c5ce969d0..9e2ce33f3d 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -39,7 +39,7 @@ use polkadot_runtime_constants::system_parachain; use snowbridge_polkadot_common::EthereumNetwork; use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; -use system_parachains_constants::TREASURY_PALLET_ID; +use system_parachains_constants::{polkadot::snowbridge::EthereumNetwork, TREASURY_PALLET_ID}; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, @@ -757,7 +757,7 @@ pub mod bridging { 1, X2( Parachain(SiblingBridgeHubParaId::get()), - PalletInstance(snowbridge_polkadot_common::INBOUND_QUEUE_MESSAGES_PALLET_INDEX) + PalletInstance(system_parachains_constants::polkadot::snowbridge::INBOUND_QUEUE_MESSAGES_PALLET_INDEX) ) ); diff --git a/system-parachains/constants/src/kusama.rs b/system-parachains/constants/src/kusama.rs index 04ecbf3e20..34451ba79e 100644 --- a/system-parachains/constants/src/kusama.rs +++ b/system-parachains/constants/src/kusama.rs @@ -124,3 +124,20 @@ pub mod fee { } } } + +pub mod snowbridge { + use frame_support::parameter_types; + use xcm::opaque::lts::NetworkId; + + /// The pallet index of the Ethereum inbound queue pallet in the bridge hub runtime. + pub const INBOUND_QUEUE_PALLET_INDEX: u8 = 80; + + parameter_types! { + /// Network and location for the Ethereum chain. On Kusama, the Ethereum chain bridged + /// to is the Ethereum Main network, with chain ID 1. + /// + /// + pub EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 1 }; + } +} + diff --git a/system-parachains/constants/src/polkadot.rs b/system-parachains/constants/src/polkadot.rs index 932cf2c341..d53933334c 100644 --- a/system-parachains/constants/src/polkadot.rs +++ b/system-parachains/constants/src/polkadot.rs @@ -146,3 +146,20 @@ pub mod fee { } } } + +pub mod snowbridge { + use frame_support::parameter_types; + use xcm::opaque::lts::NetworkId; + + /// The pallet index of the Ethereum inbound queue pallet in the bridge hub runtime. + pub const INBOUND_QUEUE_PALLET_INDEX: u8 = 80; + + parameter_types! { + /// Network and location for the Ethereum chain. On Polkadot, the Ethereum chain bridged + /// to is the Ethereum Main network, with chain ID 1. + /// + /// + pub EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 1 }; + } +} + From 237f0cab00a1d5eda96e764b610639e3a9d51698 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 5 Feb 2024 10:35:45 +0200 Subject: [PATCH 080/316] update bridge hub --- .../asset-hubs/asset-hub-kusama/Cargo.toml | 1 - .../asset-hubs/asset-hub-polkadot/Cargo.toml | 1 - .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 7 +- .../src/bridge_to_ethereum_config.rs | 2 +- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 179 +++++++++-------- .../bridge-hub-kusama/src/xcm_config.rs | 55 +++--- .../bridge-hub-polkadot/Cargo.toml | 8 +- .../src/bridge_to_ethereum_config.rs | 2 +- .../bridge-hub-polkadot/src/lib.rs | 180 ++++++++++-------- .../bridge-hub-polkadot/src/xcm_config.rs | 53 +++--- 10 files changed, 262 insertions(+), 226 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index 95e858f048..30cbab8a26 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -95,7 +95,6 @@ assets-common = { default-features = false , version = "0.6.0" } # Bridges pallet-xcm-bridge-hub-router = { default-features = false , version = "0.4.0" } snowbridge-router-primitives = { default-features = false , version = "1.0.0" } #todo publish -snowbridge-kusama-common = { default-features = false , version = "1.0.0" } #todo publish [dev-dependencies] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 64373ab8f0..a4f41dede5 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -90,7 +90,6 @@ assets-common = { default-features = false , version = "0.6.0" } # Bridges pallet-xcm-bridge-hub-router = { default-features = false , version = "0.4.0" } snowbridge-router-primitives = { default-features = false, version = "1.0.0" } #todo publish -snowbridge-polkadot-common = { default-features = false, version = "1.0.0" } #todo publish [dev-dependencies] hex-literal = "0.4.1" diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 8b65821222..b8b4732fe0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -121,13 +121,12 @@ snowbridge-beacon-primitives = { default-features = false , version = "1.0.0" } snowbridge-system = { default-features = false , version = "1.0.0" } snowbridge-system-runtime-api = { default-features = false , version = "1.0.0" } snowbridge-core = { default-features = false , version = "1.0.0" } -snowbridge-ethereum-beacon-client = { default-features = false , version = "1.0.0" } -snowbridge-inbound-queue = { default-features = false , version = "1.0.0" } -snowbridge-outbound-queue = { default-features = false , version = "1.0.0" } +snowbridge-pallet-ethereum-client = { default-features = false , version = "1.0.0" } +snowbridge-pallet-inbound-queue = { default-features = false , version = "1.0.0" } +snowbridge-pallet-outbound-queue = { default-features = false , version = "1.0.0" } snowbridge-outbound-queue-runtime-api = { default-features = false , version = "1.0.0" } snowbridge-router-primitives = { default-features = false , version = "1.0.0" } snowbridge-runtime-common = { default-features = false , version = "1.0.0" } -snowbridge-kusama-common = { default-features = false , version = "1.0.0" } [dev-dependencies] bridge-hub-test-utils = { version = "0.6.0" } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs index 5ef402c002..3ff3c15dbc 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs @@ -18,7 +18,7 @@ use crate::{ xcm_config::UniversalLocation, Runtime, }; -use snowbridge_kusama_common::EthereumNetwork; +use system_parachains_constants::kusama::snowbridge::EthereumNetwork; use snowbridge_router_primitives::outbound::EthereumBlobExporter; /// Exports message to the Ethereum Gateway contract. diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index dc648e1f0b..5f0e22d017 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -28,6 +28,7 @@ mod weights; pub mod xcm_config; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_primitives_core::ParaId; use snowbridge_beacon_primitives::{Fork, ForkVersions}; use snowbridge_core::{ gwei, meth, outbound::Message, AgentId, AllowSiblingsOnly, PricingParameters, Rewards, @@ -48,12 +49,6 @@ use sp_std::prelude::*; use sp_version::NativeVersion; use sp_version::RuntimeVersion; -#[cfg(not(feature = "runtime-benchmarks"))] -use bridge_hub_common::BridgeHubMessageRouter; -use bridge_hub_common::{ - message_queue::{NarrowOriginToSibling, ParaIdToSibling}, - AggregateMessageOrigin, -}; use cumulus_primitives_core::ParaId; use frame_support::{ construct_runtime, @@ -90,6 +85,8 @@ use parachains_common::{ impls::DealWithFees, message_queue::*, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, }; + +use polkadot_runtime_common::prod_or_fast; use system_parachains_constants::{ kusama::{consensus::*, currency::*, fee::WeightToFee}, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, @@ -99,17 +96,9 @@ use system_parachains_constants::{ use xcm::prelude::*; #[cfg(feature = "runtime-benchmarks")] -use crate::xcm_config::benchmark_helpers::DoNothingRouter; -#[cfg(feature = "runtime-benchmarks")] -use snowbridge_beacon_primitives::CompactExecutionHeader; -#[cfg(feature = "runtime-benchmarks")] -use snowbridge_core::RingBufferMap; -#[cfg(feature = "runtime-benchmarks")] -pub use snowbridge_ethereum_beacon_client::ExecutionHeaderBuffer; -#[cfg(feature = "runtime-benchmarks")] -use snowbridge_inbound_queue::BenchmarkHelper; -#[cfg(feature = "runtime-benchmarks")] -use sp_core::H256; +use benchmark_helpers::DoNothingRouter; +#[cfg(not(feature = "runtime-benchmarks"))] +use bridge_hub_common::BridgeHubMessageRouter; /// The address format for describing accounts. pub type Address = MultiAddress; @@ -155,6 +144,11 @@ pub type UncheckedExtrinsic = pub type Migrations = ( // unreleased cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, + snowbridge_pallet_system::migration::v0::InitializeOnUpgrade< + Runtime, + ConstU32, + ConstU32, + >, ); /// Executive: handles dispatch to the various modules. @@ -344,21 +338,27 @@ impl cumulus_pallet_parachain_system::Config for Runtime { impl parachain_info::Config for Runtime {} parameter_types! { - pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; + /// Amount of weight that can be spent per block to service messages. This was increased + /// from 35% to 60% of the max block weight to accommodate the Ethereum beacon light client + /// extrinsics. The force_checkpoint and submit extrinsics (for submit, optionally) includes + /// the sync committee's pubkeys (512 x 48 bytes) + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(60) * RuntimeBlockWeights::get().max_block; } impl pallet_message_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_message_queue::WeightInfo; #[cfg(feature = "runtime-benchmarks")] - type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor< - cumulus_primitives_core::AggregateMessageOrigin, - >; + type MessageProcessor = + pallet_message_queue::mock_helpers::NoopMessageProcessor; #[cfg(not(feature = "runtime-benchmarks"))] - type MessageProcessor = xcm_builder::ProcessXcmMessage< - AggregateMessageOrigin, - xcm_executor::XcmExecutor, - RuntimeCall, + type MessageProcessor = BridgeHubMessageRouter< + xcm_builder::ProcessXcmMessage< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >, + EthereumOutboundQueue, >; type Size = u32; // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: @@ -371,8 +371,6 @@ impl pallet_message_queue::Config for Runtime { impl cumulus_pallet_aura_ext::Config for Runtime {} -// todo add message queue pallet config impl pallet_message_queue::Config for Runtime { - parameter_types! { // Fellows pluralistic body. pub const FellowsBodyId: BodyId = BodyId::Technical; @@ -501,13 +499,6 @@ impl pallet_utility::Config for Runtime { } // Ethereum Bridge - -#[cfg(not(feature = "runtime-benchmarks"))] -parameter_types! { - pub storage EthereumGatewayAddress: H160 = H160::zero(); -} - -#[cfg(feature = "runtime-benchmarks")] parameter_types! { pub storage EthereumGatewayAddress: H160 = H160(hex_literal::hex!("EDa338E4dC46038493b885327842fD3E301CaB39")); } @@ -515,7 +506,7 @@ parameter_types! { parameter_types! { pub const CreateAssetCall: [u8;2] = [53, 0]; pub const CreateAssetDeposit: u128 = (UNITS / 10) + EXISTENTIAL_DEPOSIT; - pub const InboundQueuePalletInstance: u8 = snowbridge_kusama_common::INBOUND_QUEUE_MESSAGES_PALLET_INDEX; + pub const InboundQueuePalletInstance: u8 = system_parachains_constants::kusama::snowbridge::INBOUND_QUEUE_MESSAGES_PALLET_INDEX; pub Parameters: PricingParameters = PricingParameters { exchange_rate: FixedU128::from_rational(1, 400), fee_per_gas: gwei(20), @@ -524,15 +515,46 @@ parameter_types! { } #[cfg(feature = "runtime-benchmarks")] -impl BenchmarkHelper for Runtime { - fn initialize_storage(block_hash: H256, header: CompactExecutionHeader) { - >::insert(block_hash, header); +pub mod benchmark_helpers { + use crate::{EthereumBeaconClient, Runtime, RuntimeOrigin}; + use codec::Encode; + use snowbridge_beacon_primitives::CompactExecutionHeader; + use snowbridge_pallet_inbound_queue::BenchmarkHelper; + use sp_core::H256; + use xcm::latest::{Assets, Location, SendError, SendResult, SendXcm, Xcm, XcmHash}; + + impl BenchmarkHelper for Runtime { + fn initialize_storage(block_hash: H256, header: CompactExecutionHeader) { + EthereumBeaconClient::store_execution_header(block_hash, header, 0, H256::default()) + } + } + + pub struct DoNothingRouter; + impl SendXcm for DoNothingRouter { + type Ticket = Xcm<()>; + + fn validate( + _dest: &mut Option, + xcm: &mut Option>, + ) -> SendResult { + Ok((xcm.clone().unwrap(), Assets::new())) + } + fn deliver(xcm: Xcm<()>) -> Result { + let hash = xcm.using_encoded(sp_io::hashing::blake2_256); + Ok(hash) + } + } + + impl snowbridge_pallet_system::BenchmarkHelper for () { + fn make_xcm_origin(location: Location) -> RuntimeOrigin { + RuntimeOrigin::from(pallet_xcm::Origin::Xcm(location)) + } } } -impl snowbridge_inbound_queue::Config for Runtime { +impl snowbridge_pallet_inbound_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type Verifier = snowbridge_ethereum_beacon_client::Pallet; + type Verifier = snowbridge_pallet_ethereum_client::Pallet; type Token = Balances; #[cfg(not(feature = "runtime-benchmarks"))] type XcmSender = XcmRouter; @@ -552,11 +574,12 @@ impl snowbridge_inbound_queue::Config for Runtime { type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; type MaxMessageSize = ConstU32<2048>; - type WeightInfo = weights::snowbridge_inbound_queue::WeightInfo; + type WeightInfo = weights::snowbridge_pallet_inbound_queue::WeightInfo; type PricingParameters = EthereumSystem; + type AssetTransactor = ::AssetTransactor; } -impl snowbridge_outbound_queue::Config for Runtime { +impl snowbridge_pallet_outbound_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Hashing = Keccak256; type MessageQueue = MessageQueue; @@ -566,35 +589,38 @@ impl snowbridge_outbound_queue::Config for Runtime { type GasMeter = snowbridge_core::outbound::ConstantGasMeter; type Balance = Balance; type WeightToFee = WeightToFee; - type WeightInfo = weights::snowbridge_outbound_queue::WeightInfo; + type WeightInfo = weights::snowbridge_pallet_outbound_queue::WeightInfo; type PricingParameters = EthereumSystem; type Channels = EthereumSystem; } -#[cfg(not(feature = "beacon-spec-mainnet"))] +#[cfg(any(feature = "std", feature = "fast-runtime", feature = "runtime-benchmarks", test))] parameter_types! { pub const ChainForkVersions: ForkVersions = ForkVersions { genesis: Fork { - version: [0, 0, 0, 1], // 0x00000001 + version: [0, 0, 0, 0], // 0x00000000 epoch: 0, }, altair: Fork { - version: [1, 0, 0, 1], // 0x01000001 + version: [1, 0, 0, 0], // 0x01000000 epoch: 0, }, bellatrix: Fork { - version: [2, 0, 0, 1], // 0x02000001 + version: [2, 0, 0, 0], // 0x02000000 epoch: 0, }, capella: Fork { - version: [3, 0, 0, 1], // 0x03000001 + version: [3, 0, 0, 0], // 0x03000000 epoch: 0, }, + deneb: Fork { + version: [4, 0, 0, 0], // 0x04000000 + epoch: 0, + } }; - pub const MaxExecutionHeadersToKeep:u32 = 1000; } -#[cfg(feature = "beacon-spec-mainnet")] +#[cfg(not(any(feature = "std", feature = "fast-runtime", feature = "runtime-benchmarks", test)))] parameter_types! { pub const ChainForkVersions: ForkVersions = ForkVersions { genesis: Fork { @@ -613,32 +639,32 @@ parameter_types! { version: [3, 0, 0, 0], // 0x03000000 epoch: 194048, }, + deneb: Fork { + version: [4, 0, 0, 0], // 0x04000000 + epoch: 99999999, // TODO update when epoch becomes known + }, }; - pub const MaxExecutionHeadersToKeep:u32 = 8192 * 2; } -impl snowbridge_ethereum_beacon_client::Config for Runtime { +parameter_types! { + pub const MaxExecutionHeadersToKeep: u32 = prod_or_fast!(8192 * 2, 1000); +} + +impl snowbridge_pallet_ethereum_client::Config for Runtime { type RuntimeEvent = RuntimeEvent; type ForkVersions = ChainForkVersions; type MaxExecutionHeadersToKeep = MaxExecutionHeadersToKeep; - type WeightInfo = weights::snowbridge_ethereum_beacon_client::WeightInfo; + type WeightInfo = weights::snowbridge_pallet_ethereum_client::WeightInfo; } -#[cfg(feature = "runtime-benchmarks")] -impl snowbridge_system::BenchmarkHelper for () { - fn make_xcm_origin(location: xcm::latest::MultiLocation) -> RuntimeOrigin { - RuntimeOrigin::from(pallet_xcm::Origin::Xcm(location)) - } -} - -impl snowbridge_system::Config for Runtime { +impl snowbridge_pallet_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OutboundQueue = EthereumOutboundQueue; type SiblingOrigin = EnsureXcm; type AgentIdOf = snowbridge_core::AgentIdOf; type TreasuryAccount = TreasuryAccount; type Token = Balances; - type WeightInfo = weights::snowbridge_system::WeightInfo; + type WeightInfo = weights::snowbridge_pallet_system::WeightInfo; #[cfg(feature = "runtime-benchmarks")] type Helper = (); type DefaultPricingParameters = Parameters; @@ -686,10 +712,13 @@ construct_runtime!( BridgePolkadotMessages: pallet_bridge_messages:: = 53, XcmOverBridgeHubPolkadot: pallet_xcm_bridge_hub:: = 54, - EthereumInboundQueue: snowbridge_inbound_queue = 80, - EthereumOutboundQueue: snowbridge_outbound_queue = 81, - EthereumBeaconClient: snowbridge_ethereum_beacon_client = 82, - EthereumSystem: snowbridge_system = 83, + // Ethereum bridge pallets. + EthereumInboundQueue: snowbridge_pallet_inbound_queue = 80, + EthereumOutboundQueue: snowbridge_pallet_inbound_queue = 81, + EthereumBeaconClient: snowbridge_pallet_ethereum_client = 82, + EthereumSystem: snowbridge_pallet_system = 83, + + // todo add message queue pallet here } ); @@ -719,10 +748,10 @@ mod benches { [pallet_bridge_parachains, PolkadotParachains] [pallet_bridge_messages, PolkadotMessages] // Ethereum Bridge - [snowbridge_inbound_queue, EthereumInboundQueue] - [snowbridge_outbound_queue, EthereumOutboundQueue] - [snowbridge_system, EthereumSystem] - [snowbridge_ethereum_beacon_client, EthereumBeaconClient] + [snowbridge_pallet_inbound_queue, EthereumInboundQueue] + [snowbridge_pallet_outbound_queue, EthereumOutboundQueue] + [snowbridge_pallet_system, EthereumSystem] + [snowbridge_pallet_ethereum_client, EthereumBeaconClient] ); } @@ -925,18 +954,18 @@ impl_runtime_apis! { } impl snowbridge_outbound_queue_runtime_api::OutboundQueueApi for Runtime { - fn prove_message(leaf_index: u64) -> Option { - snowbridge_outbound_queue::api::prove_message::(leaf_index) + fn prove_message(leaf_index: u64) -> Option { + snowbridge_pallet_outbound_queue::api::prove_message::(leaf_index) } fn calculate_fee(message: Message) -> Option { - snowbridge_outbound_queue::api::calculate_fee::(message) + snowbridge_pallet_outbound_queue::api::calculate_fee::(message) } } impl snowbridge_system_runtime_api::ControlApi for Runtime { - fn agent_id(location: VersionedMultiLocation) -> Option { - snowbridge_system::api::agent_id::(location) + fn agent_id(location: VersionedLocation) -> Option { + snowbridge_pallet_system::api::agent_id::(location) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index b26686db8c..fd7a229caf 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -22,6 +22,7 @@ use super::{ PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; +use crate::EthereumGatewayAddress; use frame_support::{ match_types, parameter_types, traits::{ConstU32, Contains, Equals, Everything, Nothing}, @@ -35,12 +36,11 @@ use parachains_common::{ }; use polkadot_parachain_primitives::primitives::Sibling; use snowbridge_core::DescribeHere; -use snowbridge_kusama_common::EthereumNetwork; use snowbridge_runtime_common::XcmExportFeeToSibling; use sp_core::{Get, H256}; use sp_runtime::traits::AccountIdConversion; use sp_std::marker::PhantomData; -use system_parachains_constants::TREASURY_PALLET_ID; +use system_parachains_constants::{kusama::snowbridge::EthereumNetwork, TREASURY_PALLET_ID}; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, @@ -50,7 +50,7 @@ use xcm_builder::{ ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, + XcmFeeToAccount, }; use xcm_executor::{traits::{FeeManager, FeeReason, FeeReason::Export, WithOriginFilter}, XcmExecutor}; @@ -152,9 +152,12 @@ impl Contains for SafeCallFilter { match call { RuntimeCall::System(frame_system::Call::set_storage { items }) if items.iter().all(|(k, _)| { - k.eq(&DeliveryRewardInBalance::key()) || // todo one or two slashes? - k.eq(&RequiredStakeForStakeAndSlash::key()) | - k.eq(&EthereumGatewayAddress::key()) + k.eq(&DeliveryRewardInBalance::key()) || + k.eq(&RequiredStakeForStakeAndSlash::key()) || + k.eq(&EthereumGatewayAddress::key()) || + // Allow resetting of Ethereum nonces in Rococo only. + k.starts_with(&snowbridge_pallet_inbound_queue::Nonce::::final_prefix()) || + k.starts_with(&snowbridge_pallet_outbound_queue::Nonce::::final_prefix()) }) => return true, _ => (), @@ -201,13 +204,20 @@ impl Contains for SafeCallFilter { crate::bridge_to_polkadot_config::WithBridgeHubPolkadotMessagesInstance, >::set_operating_mode { .. }) | RuntimeCall::EthereumBeaconClient( - snowbridge_ethereum_beacon_client::Call::force_checkpoint { .. } | - snowbridge_ethereum_beacon_client::Call::set_operating_mode { .. }, + snowbridge_pallet_ethereum_client::Call::force_checkpoint { .. } | + snowbridge_pallet_ethereum_client::Call::set_operating_mode { .. }, ) | RuntimeCall::EthereumInboundQueue( - snowbridge_inbound_queue::Call::set_operating_mode { .. }, + snowbridge_pallet_inbound_queue::Call::set_operating_mode { .. }, ) | RuntimeCall::EthereumOutboundQueue( - snowbridge_outbound_queue::Call::set_operating_mode { .. }, - ) | RuntimeCall::EthereumSystem(..) + snowbridge_pallet_outbound_queue::Call::set_operating_mode { .. }, + ) | RuntimeCall::EthereumSystem( + snowbridge_pallet_system::Call::upgrade { .. } | + snowbridge_pallet_system::Call::set_operating_mode { .. } | + snowbridge_pallet_system::Call::set_pricing_parameters { .. } | + snowbridge_pallet_system::Call::force_update_channel { .. } | + snowbridge_pallet_system::Call::force_transfer_native_from_agent { .. } | + snowbridge_pallet_system::Call::set_token_transfer_fees { .. }, + ) ) } } @@ -301,12 +311,12 @@ impl xcm_executor::Config for XcmConfig { Self::AssetTransactor, crate::EthereumOutboundQueue, >, - XcmFeeToAccount, // todo check if right + XcmFeeToAccount, ), >; type MessageExporter = ( ToBridgeHubPolkadotHaulBlobExporter, - crate::bridge_to_ethereum_config::SnowbridgeExporter + crate::bridge_to_ethereum_config::SnowbridgeExporter, ); type UniversalAliases = Nothing; type CallDispatcher = WithOriginFilter; @@ -384,22 +394,3 @@ for XcmFeeManagerFromComponentsBridgeHub FeeHandler::handle_fee(fee, context, reason); } } - -#[cfg(feature = "runtime-benchmarks")] -pub mod benchmark_helpers { - use crate::{MultiAssets, MultiLocation, SendError, SendResult, SendXcm, Xcm, XcmHash}; - - pub struct DoNothingRouter; - impl SendXcm for DoNothingRouter { - type Ticket = (); - fn validate( - _dest: &mut Option, - _msg: &mut Option>, - ) -> SendResult<()> { - Ok(((), MultiAssets::new())) - } - fn deliver(_: ()) -> Result { - Ok([0; 32]) - } - } -} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 09fbe3a36f..dd0e0c4e2f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -109,6 +109,7 @@ bp-relayers = { default-features = false , version = "0.4.0" } bp-runtime = { default-features = false , version = "0.4.0" } bp-kusama = { default-features = false , version = "0.2.0" } bp-polkadot = { default-features = false , version = "0.2.0" } +bridge-hub-common = { default-features = false , version = "0.4.0" } #todo publish bridge-runtime-common = { default-features = false , version = "0.4.0" } pallet-bridge-grandpa = { default-features = false , version = "0.4.0" } pallet-bridge-messages = { default-features = false , version = "0.4.0" } @@ -120,13 +121,12 @@ snowbridge-beacon-primitives = { default-features = false , version = "1.0.0" } snowbridge-system = { default-features = false , version = "1.0.0" } snowbridge-system-runtime-api = { default-features = false , version = "1.0.0" } snowbridge-core = { default-features = false , version = "1.0.0" } -snowbridge-ethereum-beacon-client = { default-features = false , version = "1.0.0" } -snowbridge-inbound-queue = { default-features = false , version = "1.0.0" } -snowbridge-outbound-queue = { default-features = false , version = "1.0.0" } +snowbridge-pallet-ethereum-client = { default-features = false , version = "1.0.0" } +snowbridge-pallet-inbound-queue = { default-features = false , version = "1.0.0" } +snowbridge-pallet-outbound-queue = { default-features = false , version = "1.0.0" } snowbridge-outbound-queue-runtime-api = { default-features = false , version = "1.0.0" } snowbridge-router-primitives = { default-features = false , version = "1.0.0" } snowbridge-runtime-common = { default-features = false , version = "1.0.0" } -snowbridge-kusama-common = { default-features = false , version = "1.0.0" } [dev-dependencies] bridge-hub-test-utils = { version = "0.6.0" } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs index 713af64649..f69f1d7dc6 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs @@ -18,7 +18,7 @@ use crate::{ xcm_config::UniversalLocation, Runtime, }; -use snowbridge_polkadot_common::EthereumNetwork; +use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; use snowbridge_router_primitives::outbound::EthereumBlobExporter; /// Exports message to the Ethereum Gateway contract. diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index ec566e4d77..6b8d795ef1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -48,12 +48,6 @@ use sp_std::prelude::*; use sp_version::NativeVersion; use sp_version::RuntimeVersion; -#[cfg(not(feature = "runtime-benchmarks"))] -use bridge_hub_common::BridgeHubMessageRouter; -use bridge_hub_common::{ - message_queue::{NarrowOriginToSibling, ParaIdToSibling}, - AggregateMessageOrigin, -}; use cumulus_primitives_core::ParaId; use frame_support::{ construct_runtime, @@ -91,6 +85,8 @@ use parachains_common::{ impls::DealWithFees, message_queue::*, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, }; + +use polkadot_runtime_common::prod_or_fast; use system_parachains_constants::{ polkadot::{consensus::*, currency::*, fee::WeightToFee}, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, @@ -99,17 +95,9 @@ use system_parachains_constants::{ use xcm::prelude::*; #[cfg(feature = "runtime-benchmarks")] -use crate::xcm_config::benchmark_helpers::DoNothingRouter; -#[cfg(feature = "runtime-benchmarks")] -use snowbridge_beacon_primitives::CompactExecutionHeader; -#[cfg(feature = "runtime-benchmarks")] -use snowbridge_core::RingBufferMap; -#[cfg(feature = "runtime-benchmarks")] -pub use snowbridge_ethereum_beacon_client::ExecutionHeaderBuffer; -#[cfg(feature = "runtime-benchmarks")] -use snowbridge_inbound_queue::BenchmarkHelper; -#[cfg(feature = "runtime-benchmarks")] -use sp_core::H256; +use benchmark_helpers::DoNothingRouter; +#[cfg(not(feature = "runtime-benchmarks"))] +use bridge_hub_common::BridgeHubMessageRouter; /// The address format for describing accounts. pub type Address = MultiAddress; @@ -155,6 +143,11 @@ pub type UncheckedExtrinsic = pub type Migrations = ( // unreleased cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, + snowbridge_pallet_system::migration::v0::InitializeOnUpgrade< + Runtime, + ConstU32, + ConstU32, + >, ); /// Executive: handles dispatch to the various modules. @@ -344,21 +337,27 @@ impl cumulus_pallet_parachain_system::Config for Runtime { impl parachain_info::Config for Runtime {} parameter_types! { - pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; + /// Amount of weight that can be spent per block to service messages. This was increased + /// from 35% to 60% of the max block weight to accommodate the Ethereum beacon light client + /// extrinsics. The force_checkpoint and submit extrinsics (for submit, optionally) includes + /// the sync committee's pubkeys (512 x 48 bytes) + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(60) * RuntimeBlockWeights::get().max_block; } impl pallet_message_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_message_queue::WeightInfo; #[cfg(feature = "runtime-benchmarks")] - type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor< - cumulus_primitives_core::AggregateMessageOrigin, - >; + type MessageProcessor = + pallet_message_queue::mock_helpers::NoopMessageProcessor; #[cfg(not(feature = "runtime-benchmarks"))] - type MessageProcessor = xcm_builder::ProcessXcmMessage< - AggregateMessageOrigin, - xcm_executor::XcmExecutor, - RuntimeCall, + type MessageProcessor = BridgeHubMessageRouter< + xcm_builder::ProcessXcmMessage< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >, + EthereumOutboundQueue, >; type Size = u32; // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: @@ -371,8 +370,6 @@ impl pallet_message_queue::Config for Runtime { impl cumulus_pallet_aura_ext::Config for Runtime {} -// todo add message queue pallet config impl pallet_message_queue::Config for Runtime { - parameter_types! { // Fellows pluralistic body. pub const FellowsBodyId: BodyId = BodyId::Technical; @@ -501,13 +498,6 @@ impl pallet_utility::Config for Runtime { } // Ethereum Bridge - -#[cfg(not(feature = "runtime-benchmarks"))] -parameter_types! { - pub storage EthereumGatewayAddress: H160 = H160::zero(); -} - -#[cfg(feature = "runtime-benchmarks")] parameter_types! { pub storage EthereumGatewayAddress: H160 = H160(hex_literal::hex!("EDa338E4dC46038493b885327842fD3E301CaB39")); } @@ -515,7 +505,7 @@ parameter_types! { parameter_types! { pub const CreateAssetCall: [u8;2] = [53, 0]; pub const CreateAssetDeposit: u128 = (UNITS / 10) + EXISTENTIAL_DEPOSIT; - pub const InboundQueuePalletInstance: u8 = snowbridge_kusama_common::INBOUND_QUEUE_MESSAGES_PALLET_INDEX; + pub const InboundQueuePalletInstance: u8 = system_parachains_constants::polkadot::snowbridge::INBOUND_QUEUE_MESSAGES_PALLET_INDEX; pub Parameters: PricingParameters = PricingParameters { exchange_rate: FixedU128::from_rational(1, 400), fee_per_gas: gwei(20), @@ -524,15 +514,46 @@ parameter_types! { } #[cfg(feature = "runtime-benchmarks")] -impl BenchmarkHelper for Runtime { - fn initialize_storage(block_hash: H256, header: CompactExecutionHeader) { - >::insert(block_hash, header); +pub mod benchmark_helpers { + use crate::{EthereumBeaconClient, Runtime, RuntimeOrigin}; + use codec::Encode; + use snowbridge_beacon_primitives::CompactExecutionHeader; + use snowbridge_pallet_inbound_queue::BenchmarkHelper; + use sp_core::H256; + use xcm::latest::{Assets, Location, SendError, SendResult, SendXcm, Xcm, XcmHash}; + + impl BenchmarkHelper for Runtime { + fn initialize_storage(block_hash: H256, header: CompactExecutionHeader) { + EthereumBeaconClient::store_execution_header(block_hash, header, 0, H256::default()) + } + } + + pub struct DoNothingRouter; + impl SendXcm for DoNothingRouter { + type Ticket = Xcm<()>; + + fn validate( + _dest: &mut Option, + xcm: &mut Option>, + ) -> SendResult { + Ok((xcm.clone().unwrap(), Assets::new())) + } + fn deliver(xcm: Xcm<()>) -> Result { + let hash = xcm.using_encoded(sp_io::hashing::blake2_256); + Ok(hash) + } + } + + impl snowbridge_pallet_system::BenchmarkHelper for () { + fn make_xcm_origin(location: Location) -> RuntimeOrigin { + RuntimeOrigin::from(pallet_xcm::Origin::Xcm(location)) + } } } -impl snowbridge_inbound_queue::Config for Runtime { +impl snowbridge_pallet_inbound_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type Verifier = snowbridge_ethereum_beacon_client::Pallet; + type Verifier = snowbridge_pallet_ethereum_client::Pallet; type Token = Balances; #[cfg(not(feature = "runtime-benchmarks"))] type XcmSender = XcmRouter; @@ -552,49 +573,53 @@ impl snowbridge_inbound_queue::Config for Runtime { type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; type MaxMessageSize = ConstU32<2048>; - type WeightInfo = weights::snowbridge_inbound_queue::WeightInfo; + type WeightInfo = weights::snowbridge_pallet_inbound_queue::WeightInfo; type PricingParameters = EthereumSystem; + type AssetTransactor = ::AssetTransactor; } -impl snowbridge_outbound_queue::Config for Runtime { +impl snowbridge_pallet_outbound_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Hashing = Keccak256; type MessageQueue = MessageQueue; - type Decimals = ConstU8<12>; + type Decimals = ConstU8<10>; type MaxMessagePayloadSize = ConstU32<2048>; type MaxMessagesPerBlock = ConstU32<32>; type GasMeter = snowbridge_core::outbound::ConstantGasMeter; type Balance = Balance; type WeightToFee = WeightToFee; - type WeightInfo = weights::snowbridge_outbound_queue::WeightInfo; + type WeightInfo = weights::snowbridge_pallet_outbound_queue::WeightInfo; type PricingParameters = EthereumSystem; type Channels = EthereumSystem; } -#[cfg(not(feature = "beacon-spec-mainnet"))] +#[cfg(any(feature = "std", feature = "fast-runtime", feature = "runtime-benchmarks", test))] parameter_types! { pub const ChainForkVersions: ForkVersions = ForkVersions { genesis: Fork { - version: [0, 0, 0, 1], // 0x00000001 + version: [0, 0, 0, 0], // 0x00000000 epoch: 0, }, altair: Fork { - version: [1, 0, 0, 1], // 0x01000001 + version: [1, 0, 0, 0], // 0x01000000 epoch: 0, }, bellatrix: Fork { - version: [2, 0, 0, 1], // 0x02000001 + version: [2, 0, 0, 0], // 0x02000000 epoch: 0, }, capella: Fork { - version: [3, 0, 0, 1], // 0x03000001 + version: [3, 0, 0, 0], // 0x03000000 epoch: 0, }, + deneb: Fork { + version: [4, 0, 0, 0], // 0x04000000 + epoch: 0, + } }; - pub const MaxExecutionHeadersToKeep:u32 = 1000; } -#[cfg(feature = "beacon-spec-mainnet")] +#[cfg(not(any(feature = "std", feature = "fast-runtime", feature = "runtime-benchmarks", test)))] parameter_types! { pub const ChainForkVersions: ForkVersions = ForkVersions { genesis: Fork { @@ -613,32 +638,32 @@ parameter_types! { version: [3, 0, 0, 0], // 0x03000000 epoch: 194048, }, + deneb: Fork { + version: [4, 0, 0, 0], // 0x04000000 + epoch: 99999999, // TODO update when epoch becomes known + }, }; - pub const MaxExecutionHeadersToKeep:u32 = 8192 * 2; } -impl snowbridge_ethereum_beacon_client::Config for Runtime { +parameter_types! { + pub const MaxExecutionHeadersToKeep: u32 = prod_or_fast!(8192 * 2, 1000); +} + +impl snowbridge_pallet_ethereum_client::Config for Runtime { type RuntimeEvent = RuntimeEvent; type ForkVersions = ChainForkVersions; type MaxExecutionHeadersToKeep = MaxExecutionHeadersToKeep; - type WeightInfo = weights::snowbridge_ethereum_beacon_client::WeightInfo; + type WeightInfo = weights::snowbridge_pallet_ethereum_client::WeightInfo; } -#[cfg(feature = "runtime-benchmarks")] -impl snowbridge_system::BenchmarkHelper for () { - fn make_xcm_origin(location: xcm::latest::MultiLocation) -> RuntimeOrigin { - RuntimeOrigin::from(pallet_xcm::Origin::Xcm(location)) - } -} - -impl snowbridge_system::Config for Runtime { +impl snowbridge_pallet_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OutboundQueue = EthereumOutboundQueue; type SiblingOrigin = EnsureXcm; type AgentIdOf = snowbridge_core::AgentIdOf; type TreasuryAccount = TreasuryAccount; type Token = Balances; - type WeightInfo = weights::snowbridge_system::WeightInfo; + type WeightInfo = weights::snowbridge_pallet_system::WeightInfo; #[cfg(feature = "runtime-benchmarks")] type Helper = (); type DefaultPricingParameters = Parameters; @@ -686,10 +711,13 @@ construct_runtime!( BridgeKusamaMessages: pallet_bridge_messages:: = 53, XcmOverBridgeHubKusama: pallet_xcm_bridge_hub:: = 54, - EthereumInboundQueue: snowbridge_inbound_queue = 80, - EthereumOutboundQueue: snowbridge_outbound_queue = 81, - EthereumBeaconClient: snowbridge_ethereum_beacon_client = 82, - EthereumSystem: snowbridge_system = 83, + // Ethereum bridge pallets. + EthereumInboundQueue: snowbridge_pallet_inbound_queue = 80, + EthereumOutboundQueue: snowbridge_pallet_inbound_queue = 81, + EthereumBeaconClient: snowbridge_pallet_ethereum_client = 82, + EthereumSystem: snowbridge_pallet_system = 83, + + // todo add message queue pallet here } ); @@ -719,10 +747,10 @@ mod benches { [pallet_bridge_parachains, KusamaParachains] [pallet_bridge_messages, KusamaMessages] // Ethereum Bridge - [snowbridge_inbound_queue, EthereumInboundQueue] - [snowbridge_outbound_queue, EthereumOutboundQueue] - [snowbridge_system, EthereumSystem] - [snowbridge_ethereum_beacon_client, EthereumBeaconClient] + [snowbridge_pallet_inbound_queue, EthereumInboundQueue] + [snowbridge_pallet_outbound_queue, EthereumOutboundQueue] + [snowbridge_pallet_system, EthereumSystem] + [snowbridge_pallet_ethereum_client, EthereumBeaconClient] ); } @@ -925,18 +953,18 @@ impl_runtime_apis! { } impl snowbridge_outbound_queue_runtime_api::OutboundQueueApi for Runtime { - fn prove_message(leaf_index: u64) -> Option { - snowbridge_outbound_queue::api::prove_message::(leaf_index) + fn prove_message(leaf_index: u64) -> Option { + snowbridge_pallet_outbound_queue::api::prove_message::(leaf_index) } fn calculate_fee(message: Message) -> Option { - snowbridge_outbound_queue::api::calculate_fee::(message) + snowbridge_pallet_outbound_queue::api::calculate_fee::(message) } } impl snowbridge_system_runtime_api::ControlApi for Runtime { - fn agent_id(location: VersionedMultiLocation) -> Option { - snowbridge_system::api::agent_id::(location) + fn agent_id(location: VersionedLocation) -> Option { + snowbridge_pallet_system::api::agent_id::(location) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index a9888646dd..72f74817a4 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -22,6 +22,7 @@ use super::{ PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; +use crate::EthereumGatewayAddress; use frame_support::{ match_types, parameter_types, traits::{ConstU32, Contains, Equals, Everything, Nothing}, @@ -35,11 +36,10 @@ use parachains_common::{ use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_constants::system_parachain; use snowbridge_core::DescribeHere; -use snowbridge_polkadot_common::EthereumNetwork; use snowbridge_runtime_common::XcmExportFeeToSibling; use sp_core::{Get, H256}; use sp_runtime::traits::AccountIdConversion; -use system_parachains_constants::TREASURY_PALLET_ID; +use system_parachains_constants::{polkadot::snowbridge::EthereumNetwork, TREASURY_PALLET_ID}; use sp_std::marker::PhantomData; use xcm::latest::prelude::*; use xcm_builder::{ @@ -50,7 +50,7 @@ use xcm_builder::{ ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, + XcmFeeToAccount, }; use xcm_executor::{traits::{FeeManager, FeeReason, FeeReason::Export, WithOriginFilter}, XcmExecutor}; @@ -155,9 +155,12 @@ impl Contains for SafeCallFilter { match call { RuntimeCall::System(frame_system::Call::set_storage { items }) if items.iter().all(|(k, _)| { - k.eq(&DeliveryRewardInBalance::key()) || // todo one or two slashes? - k.eq(&RequiredStakeForStakeAndSlash::key()) | - k.eq(&EthereumGatewayAddress::key()) + k.eq(&DeliveryRewardInBalance::key()) || + k.eq(&RequiredStakeForStakeAndSlash::key()) || + k.eq(&EthereumGatewayAddress::key()) || + // Allow resetting of Ethereum nonces in Rococo only. + k.starts_with(&snowbridge_pallet_inbound_queue::Nonce::::final_prefix()) || + k.starts_with(&snowbridge_pallet_outbound_queue::Nonce::::final_prefix()) }) => return true, _ => (), @@ -204,13 +207,20 @@ impl Contains for SafeCallFilter { crate::bridge_to_kusama_config::WithBridgeHubKusamaMessagesInstance, >::set_operating_mode { .. }) | RuntimeCall::EthereumBeaconClient( - snowbridge_ethereum_beacon_client::Call::force_checkpoint { .. } | - snowbridge_ethereum_beacon_client::Call::set_operating_mode { .. }, + snowbridge_pallet_ethereum_client::Call::force_checkpoint { .. } | + snowbridge_pallet_ethereum_client::Call::set_operating_mode { .. }, ) | RuntimeCall::EthereumInboundQueue( - snowbridge_inbound_queue::Call::set_operating_mode { .. }, + snowbridge_pallet_inbound_queue::Call::set_operating_mode { .. }, ) | RuntimeCall::EthereumOutboundQueue( - snowbridge_outbound_queue::Call::set_operating_mode { .. }, - ) | RuntimeCall::EthereumSystem(..) + snowbridge_pallet_outbound_queue::Call::set_operating_mode { .. }, + ) | RuntimeCall::EthereumSystem( + snowbridge_pallet_system::Call::upgrade { .. } | + snowbridge_pallet_system::Call::set_operating_mode { .. } | + snowbridge_pallet_system::Call::set_pricing_parameters { .. } | + snowbridge_pallet_system::Call::force_update_channel { .. } | + snowbridge_pallet_system::Call::force_transfer_native_from_agent { .. } | + snowbridge_pallet_system::Call::set_token_transfer_fees { .. }, + ) ) } } @@ -308,7 +318,7 @@ impl xcm_executor::Config for XcmConfig { Self::AssetTransactor, crate::EthereumOutboundQueue, >, - XcmFeeToAccount, // todo check if right + XcmFeeToAccount, ), >; type MessageExporter = ( @@ -391,22 +401,3 @@ for XcmFeeManagerFromComponentsBridgeHub FeeHandler::handle_fee(fee, context, reason); } } - -#[cfg(feature = "runtime-benchmarks")] -pub mod benchmark_helpers { - use crate::{MultiAssets, MultiLocation, SendError, SendResult, SendXcm, Xcm, XcmHash}; - - pub struct DoNothingRouter; - impl SendXcm for DoNothingRouter { - type Ticket = (); - fn validate( - _dest: &mut Option, - _msg: &mut Option>, - ) -> SendResult<()> { - Ok(((), MultiAssets::new())) - } - fn deliver(_: ()) -> Result { - Ok([0; 32]) - } - } -} From 21d7835ddd26439fcb87c99c67e28f130f36c13f Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 5 Feb 2024 15:46:16 +0200 Subject: [PATCH 081/316] fixes --- .../asset-hubs/asset-hub-kusama/Cargo.toml | 2 - .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 47 ++++++------------- .../bridge-hub-polkadot/Cargo.toml | 47 ++++++------------- 3 files changed, 30 insertions(+), 66 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index 30cbab8a26..0752b466a3 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -144,7 +144,6 @@ runtime-benchmarks = [ "pallet-xcm/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", - "snowbridge-kusama-common/runtime-benchmarks", "snowbridge-router-primitives/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", @@ -238,7 +237,6 @@ std = [ "polkadot-runtime-common/std", "polkadot-runtime-constants/std", "scale-info/std", - "snowbridge-kusama-common/std", "snowbridge-router-primitives/std", "sp-api/std", "sp-block-builder/std", diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index b8b4732fe0..4054e057ce 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -93,6 +93,7 @@ bp-relayers = { default-features = false , version = "0.6.0" } bp-runtime = { default-features = false , version = "0.6.0" } bp-kusama = { default-features = false , version = "0.4.0" } bp-polkadot = { default-features = false , version = "0.4.0" } +bridge-hub-common = { default-features = false , version = "0.4.0" } #todo publish bridge-runtime-common = { default-features = false , version = "0.6.0" } pallet-bridge-grandpa = { default-features = false , version = "0.6.0" } pallet-bridge-messages = { default-features = false , version = "0.6.0" } @@ -100,25 +101,9 @@ pallet-bridge-parachains = { default-features = false , version = "0.6.0" } pallet-bridge-relayers = { default-features = false , version = "0.6.0" } pallet-xcm-bridge-hub = { default-features = false , version = "0.1.0" } -# Bridges -bp-header-chain = { default-features = false , version = "0.4.0" } -bp-messages = { default-features = false , version = "0.4.0" } -bp-parachains = { default-features = false , version = "0.4.0" } -bp-polkadot-core = { default-features = false , version = "0.4.0" } -bp-relayers = { default-features = false , version = "0.4.0" } -bp-runtime = { default-features = false , version = "0.4.0" } -bp-kusama = { default-features = false , version = "0.2.0" } -bp-polkadot = { default-features = false , version = "0.2.0" } -bridge-hub-common = { default-features = false , version = "0.4.0" } #todo publish -bridge-runtime-common = { default-features = false , version = "0.4.0" } -pallet-bridge-grandpa = { default-features = false , version = "0.4.0" } -pallet-bridge-messages = { default-features = false , version = "0.4.0" } -pallet-bridge-parachains = { default-features = false , version = "0.4.0" } -pallet-bridge-relayers = { default-features = false , version = "0.4.0" } - # Ethereum Bridge (Snowbridge) snowbridge-beacon-primitives = { default-features = false , version = "1.0.0" } -snowbridge-system = { default-features = false , version = "1.0.0" } +snowbridge-pallet-system = { default-features = false , version = "1.0.0" } snowbridge-system-runtime-api = { default-features = false , version = "1.0.0" } snowbridge-core = { default-features = false , version = "1.0.0" } snowbridge-pallet-ethereum-client = { default-features = false , version = "1.0.0" } @@ -197,15 +182,14 @@ std = [ "serde", "snowbridge-beacon-primitives/std", "snowbridge-core/std", - "snowbridge-ethereum-beacon-client/std", - "snowbridge-inbound-queue/std", + "snowbridge-pallet-ethereum-client/std", + "snowbridge-pallet-inbound-queue/std", "snowbridge-outbound-queue-runtime-api/std", - "snowbridge-outbound-queue/std", - "snowbridge-kusama-common/std", + "snowbridge-pallet-outbound-queue/std", "snowbridge-router-primitives/std", "snowbridge-runtime-common/std", "snowbridge-system-runtime-api/std", - "snowbridge-system/std", + "snowbridge-pallet-system/std", "sp-api/std", "sp-block-builder/std", "sp-consensus-aura/std", @@ -256,13 +240,12 @@ runtime-benchmarks = [ "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", "snowbridge-core/runtime-benchmarks", - "snowbridge-ethereum-beacon-client/runtime-benchmarks", - "snowbridge-inbound-queue/runtime-benchmarks", - "snowbridge-outbound-queue/runtime-benchmarks", - "snowbridge-kusama-common/runtime-benchmarks", + "snowbridge-pallet-ethereum-client/runtime-benchmarks", + "snowbridge-pallet-inbound-queue/runtime-benchmarks", + "snowbridge-pallet-outbound-queue/runtime-benchmarks", "snowbridge-router-primitives/runtime-benchmarks", "snowbridge-runtime-common/runtime-benchmarks", - "snowbridge-system/runtime-benchmarks", + "snowbridge-pallet-system/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", @@ -296,16 +279,16 @@ try-runtime = [ "pallet-xcm/try-runtime", "parachain-info/try-runtime", "polkadot-runtime-common/try-runtime", - "snowbridge-ethereum-beacon-client/try-runtime", - "snowbridge-inbound-queue/try-runtime", - "snowbridge-outbound-queue/try-runtime", - "snowbridge-system/try-runtime", + "snowbridge-pallet-ethereum-client/try-runtime", + "snowbridge-pallet-inbound-queue/try-runtime", + "snowbridge-pallet-outbound-queue/try-runtime", + "snowbridge-pallet-system/try-runtime", "sp-runtime/try-runtime", ] experimental = [ "pallet-aura/experimental" ] beacon-spec-mainnet = [ - "snowbridge-ethereum-beacon-client/beacon-spec-mainnet", + "snowbridge-pallet-ethereum-client/beacon-spec-mainnet", ] # A feature that should be enabled when the runtime should be built for on-chain diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index dd0e0c4e2f..061745a80e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -93,6 +93,7 @@ bp-relayers = { default-features = false , version = "0.6.0" } bp-runtime = { default-features = false , version = "0.6.0" } bp-kusama = { default-features = false , version = "0.4.0" } bp-polkadot = { default-features = false , version = "0.4.0" } +bridge-hub-common = { default-features = false , version = "0.4.0" } #todo publish bridge-runtime-common = { default-features = false , version = "0.6.0" } pallet-bridge-grandpa = { default-features = false , version = "0.6.0" } pallet-bridge-messages = { default-features = false , version = "0.6.0" } @@ -100,25 +101,9 @@ pallet-bridge-parachains = { default-features = false , version = "0.6.0" } pallet-bridge-relayers = { default-features = false , version = "0.6.0" } pallet-xcm-bridge-hub = { default-features = false , version = "0.1.0" } -# Bridges -bp-header-chain = { default-features = false , version = "0.4.0" } -bp-messages = { default-features = false , version = "0.4.0" } -bp-parachains = { default-features = false , version = "0.4.0" } -bp-polkadot-core = { default-features = false , version = "0.4.0" } -bp-relayers = { default-features = false , version = "0.4.0" } -bp-runtime = { default-features = false , version = "0.4.0" } -bp-kusama = { default-features = false , version = "0.2.0" } -bp-polkadot = { default-features = false , version = "0.2.0" } -bridge-hub-common = { default-features = false , version = "0.4.0" } #todo publish -bridge-runtime-common = { default-features = false , version = "0.4.0" } -pallet-bridge-grandpa = { default-features = false , version = "0.4.0" } -pallet-bridge-messages = { default-features = false , version = "0.4.0" } -pallet-bridge-parachains = { default-features = false , version = "0.4.0" } -pallet-bridge-relayers = { default-features = false , version = "0.4.0" } - # Ethereum Bridge (Snowbridge) snowbridge-beacon-primitives = { default-features = false , version = "1.0.0" } -snowbridge-system = { default-features = false , version = "1.0.0" } +snowbridge-pallet-system = { default-features = false , version = "1.0.0" } snowbridge-system-runtime-api = { default-features = false , version = "1.0.0" } snowbridge-core = { default-features = false , version = "1.0.0" } snowbridge-pallet-ethereum-client = { default-features = false , version = "1.0.0" } @@ -197,15 +182,14 @@ std = [ "serde", "snowbridge-beacon-primitives/std", "snowbridge-core/std", - "snowbridge-ethereum-beacon-client/std", - "snowbridge-inbound-queue/std", + "snowbridge-pallet-ethereum-client/std", + "snowbridge-pallet-inbound-queue/std", "snowbridge-outbound-queue-runtime-api/std", - "snowbridge-outbound-queue/std", - "snowbridge-kusama-common/std", + "snowbridge-pallet-outbound-queue/std", "snowbridge-router-primitives/std", "snowbridge-runtime-common/std", "snowbridge-system-runtime-api/std", - "snowbridge-system/std", + "snowbridge-pallet-system/std", "sp-api/std", "sp-block-builder/std", "sp-consensus-aura/std", @@ -255,13 +239,12 @@ runtime-benchmarks = [ "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", "snowbridge-core/runtime-benchmarks", - "snowbridge-ethereum-beacon-client/runtime-benchmarks", - "snowbridge-inbound-queue/runtime-benchmarks", - "snowbridge-outbound-queue/runtime-benchmarks", - "snowbridge-kusama-common/runtime-benchmarks", + "snowbridge-pallet-ethereum-client/runtime-benchmarks", + "snowbridge-pallet-inbound-queue/runtime-benchmarks", + "snowbridge-pallet-outbound-queue/runtime-benchmarks", "snowbridge-router-primitives/runtime-benchmarks", "snowbridge-runtime-common/runtime-benchmarks", - "snowbridge-system/runtime-benchmarks", + "snowbridge-pallet-system/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", @@ -295,16 +278,16 @@ try-runtime = [ "pallet-xcm/try-runtime", "parachain-info/try-runtime", "polkadot-runtime-common/try-runtime", - "snowbridge-ethereum-beacon-client/try-runtime", - "snowbridge-inbound-queue/try-runtime", - "snowbridge-outbound-queue/try-runtime", - "snowbridge-system/try-runtime", + "snowbridge-pallet-ethereum-client/try-runtime", + "snowbridge-pallet-inbound-queue/try-runtime", + "snowbridge-pallet-outbound-queue/try-runtime", + "snowbridge-pallet-system/try-runtime", "sp-runtime/try-runtime", ] experimental = [ "pallet-aura/experimental" ] beacon-spec-mainnet = [ - "snowbridge-ethereum-beacon-client/beacon-spec-mainnet", + "snowbridge-pallet-ethereum-client/beacon-spec-mainnet", ] # A feature that should be enabled when the runtime should be built for on-chain From b4f8d777cfff312f7facf7c21c1b2994103e33ad Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 5 Feb 2024 15:49:46 +0200 Subject: [PATCH 082/316] fixes --- relay/kusama/src/xcm_config.rs | 4 ++-- .../asset-hubs/asset-hub-kusama/src/lib.rs | 5 ++-- .../asset-hub-kusama/src/xcm_config.rs | 2 +- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 5 ++-- .../asset-hub-polkadot/src/xcm_config.rs | 5 ++-- .../src/bridge_to_ethereum_config.rs | 15 +++++------- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 2 -- .../bridge-hub-kusama/src/xcm_config.rs | 21 ++++++++--------- .../src/bridge_to_ethereum_config.rs | 15 +++++------- .../bridge-hub-polkadot/src/lib.rs | 5 ++-- .../bridge-hub-polkadot/src/xcm_config.rs | 23 +++++++++---------- system-parachains/constants/src/kusama.rs | 1 - system-parachains/constants/src/polkadot.rs | 1 - 13 files changed, 46 insertions(+), 58 deletions(-) diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index ff6b12390a..52a955d493 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -41,8 +41,8 @@ use xcm_builder::{ DescribeFamily, FrameTransactionalProcessor, HashedDescription, IsChildSystemParachain, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, - UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, - XcmFeesToAccount, + UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + XcmFeeManagerFromComponents, XcmFeesToAccount, }; parameter_types! { diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 50c197d136..a4ab45d854 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -75,8 +75,7 @@ use parachains_common::{ use sp_runtime::RuntimeDebug; use system_parachains_constants::{ kusama::{consensus::*, currency::*, fee::WeightToFee, snowbridge::EthereumNetwork}, - AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, - NORMAL_DISPATCH_RATIO, + AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; use xcm::opaque::v3::MultiLocation; @@ -384,7 +383,7 @@ impl pallet_assets::Config for Runtime { type CreateOrigin = ForeignCreators< ( FromSiblingParachain>, - FromNetwork + FromNetwork, ), ForeignCreatorsSovereignAccountOf, AccountId, diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index b652da4bd6..e0926de01b 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -909,7 +909,7 @@ pub mod bridging { } pub type IsTrustedBridgedReserveLocationForForeignAsset = - matching::IsForeignConcreteAsset>; + matching::IsForeignConcreteAsset>; impl Contains<(MultiLocation, Junction)> for UniversalAliases { fn contains(alias: &(MultiLocation, Junction)) -> bool { diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 4a8b3dc84e..2c5d93af0e 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -63,7 +63,8 @@ mod weights; pub mod xcm_config; use assets_common::{ - foreign_creators::ForeignCreators, matching::{FromNetwork, FromSiblingParachain}, + foreign_creators::ForeignCreators, + matching::{FromNetwork, FromSiblingParachain}, MultiLocationForAssetId, }; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; @@ -325,7 +326,7 @@ impl pallet_assets::Config for Runtime { type CreateOrigin = ForeignCreators< ( FromSiblingParachain>, - FromNetwork + FromNetwork, ), ForeignCreatorsSovereignAccountOf, AccountId, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 9e2ce33f3d..58a2319c29 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -784,7 +784,7 @@ pub mod bridging { } pub type IsTrustedBridgedReserveLocationForForeignAsset = - matching::IsForeignConcreteAsset>; + matching::IsForeignConcreteAsset>; impl Contains<(MultiLocation, Junction)> for UniversalAliases { fn contains(alias: &(MultiLocation, Junction)) -> bool { @@ -810,7 +810,8 @@ pub mod bridging { } }); assert!(alias.is_some(), "we expect here BridgeHubPolkadot to Kusama mapping at least"); - Some(alias.unwrap()) } + Some(alias.unwrap()) + } } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs index 3ff3c15dbc..1b883feed3 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs @@ -14,17 +14,14 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . -use crate::{ - xcm_config::UniversalLocation, - Runtime, -}; -use system_parachains_constants::kusama::snowbridge::EthereumNetwork; +use crate::{xcm_config::UniversalLocation, Runtime}; use snowbridge_router_primitives::outbound::EthereumBlobExporter; +use system_parachains_constants::kusama::snowbridge::EthereumNetwork; /// Exports message to the Ethereum Gateway contract. pub type SnowbridgeExporter = EthereumBlobExporter< - UniversalLocation, - EthereumNetwork, - snowbridge_outbound_queue::Pallet, - snowbridge_core::AgentIdOf, + UniversalLocation, + EthereumNetwork, + snowbridge_pallet_outbound_queue::Pallet, + snowbridge_core::AgentIdOf, >; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 5f0e22d017..1975573179 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -34,7 +34,6 @@ use snowbridge_core::{ gwei, meth, outbound::Message, AgentId, AllowSiblingsOnly, PricingParameters, Rewards, }; use snowbridge_router_primitives::inbound::MessageToXcm; -use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H160}; use sp_runtime::{ @@ -49,7 +48,6 @@ use sp_std::prelude::*; use sp_version::NativeVersion; use sp_version::RuntimeVersion; -use cumulus_primitives_core::ParaId; use frame_support::{ construct_runtime, dispatch::DispatchClass, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index fd7a229caf..369903f57e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -18,11 +18,10 @@ use super::{ bridge_to_polkadot_config::{ DeliveryRewardInBalance, RequiredStakeForStakeAndSlash, ToBridgeHubPolkadotHaulBlobExporter, }, - AccountId, AllPalletsWithSystem, Balances, EthereumGatewayAddress, ParachainInfo, ParachainSystem, PolkadotXcm, - PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, - XcmpQueue, + AccountId, AllPalletsWithSystem, Balances, EthereumGatewayAddress, ParachainInfo, + ParachainSystem, PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, + RuntimeOrigin, WeightToFee, XcmpQueue, }; -use crate::EthereumGatewayAddress; use frame_support::{ match_types, parameter_types, traits::{ConstU32, Contains, Equals, Everything, Nothing}, @@ -52,8 +51,10 @@ use xcm_builder::{ TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeToAccount, }; -use xcm_executor::{traits::{FeeManager, FeeReason, FeeReason::Export, WithOriginFilter}, - XcmExecutor}; +use xcm_executor::{ + traits::{FeeManager, FeeReason, FeeReason::Export, WithOriginFilter}, + XcmExecutor, +}; parameter_types! { pub const KsmRelayLocation: MultiLocation = MultiLocation::parent(); @@ -314,10 +315,8 @@ impl xcm_executor::Config for XcmConfig { XcmFeeToAccount, ), >; - type MessageExporter = ( - ToBridgeHubPolkadotHaulBlobExporter, - crate::bridge_to_ethereum_config::SnowbridgeExporter, - ); + type MessageExporter = + (ToBridgeHubPolkadotHaulBlobExporter, crate::bridge_to_ethereum_config::SnowbridgeExporter); type UniversalAliases = Nothing; type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; @@ -380,7 +379,7 @@ pub struct XcmFeeManagerFromComponentsBridgeHub( PhantomData<(WaivedLocations, HandleFee)>, ); impl, FeeHandler: HandleFee> FeeManager -for XcmFeeManagerFromComponentsBridgeHub + for XcmFeeManagerFromComponentsBridgeHub { fn is_waived(origin: Option<&MultiLocation>, fee_reason: FeeReason) -> bool { let Some(loc) = origin else { return false }; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs index f69f1d7dc6..c8108f189f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs @@ -14,17 +14,14 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . -use crate::{ - xcm_config::UniversalLocation, - Runtime, -}; -use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; +use crate::{xcm_config::UniversalLocation, Runtime}; use snowbridge_router_primitives::outbound::EthereumBlobExporter; +use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; /// Exports message to the Ethereum Gateway contract. pub type SnowbridgeExporter = EthereumBlobExporter< - UniversalLocation, - EthereumNetwork, - snowbridge_outbound_queue::Pallet, - snowbridge_core::AgentIdOf, + UniversalLocation, + EthereumNetwork, + snowbridge_pallet_outbound_queue::Pallet, + snowbridge_core::AgentIdOf, >; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 6b8d795ef1..01646d577d 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -28,12 +28,12 @@ mod weights; pub mod xcm_config; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_primitives_core::ParaId; use snowbridge_beacon_primitives::{Fork, ForkVersions}; use snowbridge_core::{ gwei, meth, outbound::Message, AgentId, AllowSiblingsOnly, PricingParameters, Rewards, }; use snowbridge_router_primitives::inbound::MessageToXcm; -use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H160}; use sp_runtime::{ @@ -48,7 +48,6 @@ use sp_std::prelude::*; use sp_version::NativeVersion; use sp_version::RuntimeVersion; -use cumulus_primitives_core::ParaId; use frame_support::{ construct_runtime, dispatch::DispatchClass, @@ -68,7 +67,7 @@ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; use xcm_config::{ - FellowshipLocation, GovernanceLocation, XcmConfig, TreasuryAccount, + FellowshipLocation, GovernanceLocation, TreasuryAccount, XcmConfig, XcmOriginToTransactDispatchOrigin, }; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 72f74817a4..e15ee92b61 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -18,11 +18,10 @@ use super::{ bridge_to_kusama_config::{ DeliveryRewardInBalance, RequiredStakeForStakeAndSlash, ToBridgeHubKusamaHaulBlobExporter, }, - AccountId, AllPalletsWithSystem, Balances, EthereumGatewayAddress, ParachainInfo, ParachainSystem, PolkadotXcm, - PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, - XcmpQueue, + AccountId, AllPalletsWithSystem, Balances, EthereumGatewayAddress, ParachainInfo, + ParachainSystem, PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, + RuntimeOrigin, WeightToFee, XcmpQueue, }; -use crate::EthereumGatewayAddress; use frame_support::{ match_types, parameter_types, traits::{ConstU32, Contains, Equals, Everything, Nothing}, @@ -39,8 +38,8 @@ use snowbridge_core::DescribeHere; use snowbridge_runtime_common::XcmExportFeeToSibling; use sp_core::{Get, H256}; use sp_runtime::traits::AccountIdConversion; -use system_parachains_constants::{polkadot::snowbridge::EthereumNetwork, TREASURY_PALLET_ID}; use sp_std::marker::PhantomData; +use system_parachains_constants::{polkadot::snowbridge::EthereumNetwork, TREASURY_PALLET_ID}; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, @@ -52,8 +51,10 @@ use xcm_builder::{ TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeToAccount, }; -use xcm_executor::{traits::{FeeManager, FeeReason, FeeReason::Export, WithOriginFilter}, - XcmExecutor}; +use xcm_executor::{ + traits::{FeeManager, FeeReason, FeeReason::Export, WithOriginFilter}, + XcmExecutor, +}; parameter_types! { pub const DotRelayLocation: MultiLocation = MultiLocation::parent(); @@ -321,10 +322,8 @@ impl xcm_executor::Config for XcmConfig { XcmFeeToAccount, ), >; - type MessageExporter = ( - ToBridgeHubKusamaHaulBlobExporter, - crate::bridge_to_ethereum_config::SnowbridgeExporter - ); + type MessageExporter = + (ToBridgeHubKusamaHaulBlobExporter, crate::bridge_to_ethereum_config::SnowbridgeExporter); type UniversalAliases = Nothing; type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; @@ -387,7 +386,7 @@ pub struct XcmFeeManagerFromComponentsBridgeHub( PhantomData<(WaivedLocations, HandleFee)>, ); impl, FeeHandler: HandleFee> FeeManager -for XcmFeeManagerFromComponentsBridgeHub + for XcmFeeManagerFromComponentsBridgeHub { fn is_waived(origin: Option<&MultiLocation>, fee_reason: FeeReason) -> bool { let Some(loc) = origin else { return false }; diff --git a/system-parachains/constants/src/kusama.rs b/system-parachains/constants/src/kusama.rs index 34451ba79e..9e362d130f 100644 --- a/system-parachains/constants/src/kusama.rs +++ b/system-parachains/constants/src/kusama.rs @@ -140,4 +140,3 @@ pub mod snowbridge { pub EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 1 }; } } - diff --git a/system-parachains/constants/src/polkadot.rs b/system-parachains/constants/src/polkadot.rs index d53933334c..f7273019ac 100644 --- a/system-parachains/constants/src/polkadot.rs +++ b/system-parachains/constants/src/polkadot.rs @@ -162,4 +162,3 @@ pub mod snowbridge { pub EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 1 }; } } - From 05e8cefd180346cb8016eed1b650da4423733ce8 Mon Sep 17 00:00:00 2001 From: Alistair Singh Date: Tue, 6 Feb 2024 01:01:32 +0200 Subject: [PATCH 083/316] disable using max fee --- .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 6 ++---- .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index e0926de01b..1298330bf6 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -873,10 +873,8 @@ pub mod bridging { parameter_types! { /// User fee for ERC20 token transfer back to Ethereum. - /// (initially was calculated by test `OutboundQueue::calculate_fees` - ETH/ROC 1/400 and fee_per_gas 20 GWEI = 2200698000000 + *25%) - /// Needs to be more than fee calculated from DefaultFeeConfig FeeConfigRecord in snowbridge:parachain/pallets/outbound-queue/src/lib.rs - /// Polkadot uses 10 decimals, Kusama and Rococo 12 decimals. - pub const DefaultBridgeHubEthereumBaseFee: Balance = 2_750_872_500_000; + /// Configure the fee to max Balance so that it is disabled. + pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX; pub storage BridgeHubEthereumBaseFee: Balance = DefaultBridgeHubEthereumBaseFee::get(); pub SiblingBridgeHubWithEthereumInboundQueueInstance: MultiLocation = MultiLocation::new( 1, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 58a2319c29..657eb1c791 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -748,10 +748,8 @@ pub mod bridging { parameter_types! { /// User fee for ERC20 token transfer back to Ethereum. - /// (initially was calculated by test `OutboundQueue::calculate_fees` - ETH/ROC 1/400 and fee_per_gas 20 GWEI = 2200698000000 + *25%) - /// Needs to be more than fee calculated from DefaultFeeConfig FeeConfigRecord in snowbridge:parachain/pallets/outbound-queue/src/lib.rs - /// Polkadot uses 10 decimals, Kusama and Rococo 12 decimals. - pub const DefaultBridgeHubEthereumBaseFee: Balance = 27_508_725_000; + /// Configure the fee to max Balance so that it is disabled. + pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX; pub storage BridgeHubEthereumBaseFee: Balance = DefaultBridgeHubEthereumBaseFee::get(); pub SiblingBridgeHubWithEthereumInboundQueueInstance: MultiLocation = MultiLocation::new( 1, From 7fc05c1671f1f5b01ca26ad57c350c0dc87892be Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 6 Feb 2024 16:33:59 +0100 Subject: [PATCH 084/316] [bridges] Changed order/index for `MessageQueue` on BridgeHubs --- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 5 ++++- system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 09d7637c33..46a1d822e6 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -495,7 +495,6 @@ construct_runtime!( CumulusXcm: cumulus_pallet_xcm = 32, // Temporary to migrate the remaining DMP messages: DmpQueue: cumulus_pallet_dmp_queue = 33, - MessageQueue: pallet_message_queue = 34, // Handy utilities. Utility: pallet_utility = 40, @@ -509,6 +508,10 @@ construct_runtime!( BridgePolkadotParachains: pallet_bridge_parachains:: = 52, BridgePolkadotMessages: pallet_bridge_messages:: = 53, XcmOverBridgeHubPolkadot: pallet_xcm_bridge_hub:: = 54, + + // Message Queue. Importantly, it is registered after Snowbridge pallets + // so that messages are processed after the `on_initialize` hooks of bridging pallets. + MessageQueue: pallet_message_queue = 175, } ); diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 254b1dcd18..544b26b1af 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -495,7 +495,6 @@ construct_runtime!( CumulusXcm: cumulus_pallet_xcm = 32, // Temporary to migrate the remaining DMP messages: DmpQueue: cumulus_pallet_dmp_queue = 33, - MessageQueue: pallet_message_queue = 34, // Handy utilities. Utility: pallet_utility = 40, @@ -509,6 +508,10 @@ construct_runtime!( BridgeKusamaParachains: pallet_bridge_parachains:: = 52, BridgeKusamaMessages: pallet_bridge_messages:: = 53, XcmOverBridgeHubKusama: pallet_xcm_bridge_hub:: = 54, + + // Message Queue. Importantly, it is registered after Snowbridge pallets + // so that messages are processed after the `on_initialize` hooks of bridging pallets. + MessageQueue: pallet_message_queue = 175, } ); From 767f9036e99fbf44e4d8987241cd0ff6903a3524 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 24 Jan 2024 23:10:36 +0100 Subject: [PATCH 085/316] Upgrade to latest polkadot@1.6.0: `cargo upgrade -v --pinned --incompatible` + revert encointer changes --- Cargo.lock | 5819 ++++++++--------- chain-spec-generator/Cargo.toml | 30 +- .../assets/asset-hub-kusama/Cargo.toml | 26 +- .../assets/asset-hub-polkadot/Cargo.toml | 24 +- integration-tests/emulated/chains/Cargo.toml | 32 +- integration-tests/emulated/common/Cargo.toml | 50 +- relay/kusama/Cargo.toml | 190 +- relay/kusama/constants/Cargo.toml | 14 +- relay/polkadot/Cargo.toml | 184 +- relay/polkadot/constants/Cargo.toml | 14 +- .../asset-hubs/asset-hub-kusama/Cargo.toml | 130 +- .../asset-hub-kusama/primitives/Cargo.toml | 8 +- .../asset-hubs/asset-hub-polkadot/Cargo.toml | 124 +- .../asset-hub-polkadot/primitives/Cargo.toml | 8 +- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 136 +- .../bridge-hub-kusama/primitives/Cargo.toml | 14 +- .../bridge-hub-polkadot/Cargo.toml | 136 +- .../bridge-hub-polkadot/primitives/Cargo.toml | 14 +- .../collectives-polkadot/Cargo.toml | 122 +- system-parachains/constants/Cargo.toml | 10 +- .../gluttons/glutton-kusama/Cargo.toml | 62 +- 21 files changed, 3324 insertions(+), 3823 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b754d927f1..1830943f7d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -136,9 +136,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.5" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", @@ -211,6 +211,20 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "aquamarine" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "074b80d14d0240b6ce94d68f059a2d26a5d77280ae142662365a21ef6e2594ef" +dependencies = [ + "include_dir", + "itertools 0.10.5", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "ark-bls12-377" version = "0.4.0" @@ -423,19 +437,19 @@ dependencies = [ "asset-hub-kusama-runtime", "asset-test-utils", "emulated-chains", - "frame-support 27.0.0", + "frame-support 28.0.0", "integration-tests-common", "pallet-asset-conversion", - "pallet-assets 28.0.0", - "pallet-balances 27.0.0", - "pallet-message-queue 30.0.0", - "pallet-xcm 6.0.0", - "parachains-common 6.0.0", + "pallet-assets 29.0.0", + "pallet-balances 28.0.0", + "pallet-message-queue 31.0.0", + "pallet-xcm 7.0.0", + "parachains-common 7.0.0", "parity-scale-codec", - "sp-runtime 30.0.1", + "sp-runtime 31.0.1", "staging-kusama-runtime", - "staging-xcm 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm 7.0.0", + "staging-xcm-executor 7.0.0", "system-parachains-constants", "xcm-emulator", ] @@ -450,76 +464,76 @@ dependencies = [ "bp-asset-hub-polkadot", "bp-bridge-hub-kusama", "bp-bridge-hub-polkadot", - "cumulus-pallet-aura-ext 0.6.0", - "cumulus-pallet-dmp-queue 0.6.0", - "cumulus-pallet-parachain-system 0.6.0", + "cumulus-pallet-aura-ext 0.7.0", + "cumulus-pallet-dmp-queue 0.7.0", + "cumulus-pallet-parachain-system 0.7.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.6.0", - "cumulus-pallet-xcmp-queue 0.6.0", - "cumulus-primitives-core 0.6.0", - "cumulus-primitives-utility 0.6.0", - "frame-benchmarking 27.0.0", - "frame-executive 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", - "frame-system-benchmarking 27.0.0", - "frame-system-rpc-runtime-api 25.0.0", - "frame-try-runtime 0.33.0", + "cumulus-pallet-xcm 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-utility 0.7.0", + "frame-benchmarking 28.0.0", + "frame-executive 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-system-benchmarking 28.0.0", + "frame-system-rpc-runtime-api 26.0.0", + "frame-try-runtime 0.34.0", "hex-literal", "kusama-runtime-constants", "log", "pallet-asset-conversion", "pallet-asset-conversion-tx-payment", - "pallet-assets 28.0.0", - "pallet-aura 26.0.0", - "pallet-authorship 27.0.0", - "pallet-balances 27.0.0", - "pallet-collator-selection 8.0.0", - "pallet-message-queue 30.0.0", + "pallet-assets 29.0.0", + "pallet-aura 27.0.0", + "pallet-authorship 28.0.0", + "pallet-balances 28.0.0", + "pallet-collator-selection 9.0.0", + "pallet-message-queue 31.0.0", "pallet-multisig", "pallet-nft-fractionalization", "pallet-nfts", "pallet-nfts-runtime-api", - "pallet-proxy 27.0.0", - "pallet-session 27.0.0", + "pallet-proxy 28.0.0", + "pallet-session 28.0.0", "pallet-state-trie-migration", - "pallet-timestamp 26.0.0", - "pallet-transaction-payment 27.0.0", - "pallet-transaction-payment-rpc-runtime-api 27.0.0", + "pallet-timestamp 27.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment-rpc-runtime-api 28.0.0", "pallet-uniques", - "pallet-utility 27.0.0", - "pallet-xcm 6.0.0", - "pallet-xcm-benchmarks 6.0.0", + "pallet-utility 28.0.0", + "pallet-xcm 7.0.0", + "pallet-xcm-benchmarks 7.0.0", "pallet-xcm-bridge-hub-router", - "parachains-common 6.0.0", + "parachains-common 7.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-core-primitives 6.0.0", - "polkadot-parachain-primitives 5.0.0", - "polkadot-runtime-common 6.0.0", + "polkadot-core-primitives 7.0.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-runtime-common 7.0.0", "polkadot-runtime-constants", "primitive-types", "scale-info", - "sp-api 25.0.0", - "sp-block-builder 25.0.0", - "sp-consensus-aura 0.31.0", - "sp-core 27.0.0", - "sp-genesis-builder 0.6.0", - "sp-inherents 25.0.0", - "sp-io 29.0.0", - "sp-offchain 25.0.0", - "sp-runtime 30.0.1", - "sp-session 26.0.0", - "sp-std 13.0.0", - "sp-storage 18.0.0", - "sp-transaction-pool 25.0.0", - "sp-version 28.0.0", - "sp-weights 26.0.0", - "staging-parachain-info 0.6.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", - "substrate-wasm-builder 16.0.0", + "sp-api 26.0.0", + "sp-block-builder 26.0.0", + "sp-consensus-aura 0.32.0", + "sp-core 28.0.0", + "sp-genesis-builder 0.7.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", + "sp-transaction-pool 26.0.0", + "sp-version 29.0.0", + "sp-weights 27.0.0", + "staging-parachain-info 0.7.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", + "substrate-wasm-builder 17.0.0", "system-parachains-constants", ] @@ -530,18 +544,18 @@ dependencies = [ "asset-hub-polkadot-runtime", "asset-test-utils", "emulated-chains", - "frame-support 27.0.0", + "frame-support 28.0.0", "integration-tests-common", - "pallet-assets 28.0.0", - "pallet-balances 27.0.0", - "pallet-message-queue 30.0.0", - "pallet-xcm 6.0.0", - "parachains-common 6.0.0", + "pallet-assets 29.0.0", + "pallet-balances 28.0.0", + "pallet-message-queue 31.0.0", + "pallet-xcm 7.0.0", + "parachains-common 7.0.0", "parity-scale-codec", "polkadot-runtime", - "sp-runtime 30.0.1", - "staging-xcm 6.0.0", - "staging-xcm-executor 6.0.0", + "sp-runtime 31.0.1", + "staging-xcm 7.0.0", + "staging-xcm-executor 7.0.0", "system-parachains-constants", "xcm-emulator", ] @@ -556,134 +570,134 @@ dependencies = [ "bp-asset-hub-polkadot", "bp-bridge-hub-kusama", "bp-bridge-hub-polkadot", - "cumulus-pallet-aura-ext 0.6.0", - "cumulus-pallet-dmp-queue 0.6.0", - "cumulus-pallet-parachain-system 0.6.0", + "cumulus-pallet-aura-ext 0.7.0", + "cumulus-pallet-dmp-queue 0.7.0", + "cumulus-pallet-parachain-system 0.7.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.6.0", - "cumulus-pallet-xcmp-queue 0.6.0", - "cumulus-primitives-core 0.6.0", - "cumulus-primitives-utility 0.6.0", - "frame-benchmarking 27.0.0", - "frame-executive 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", - "frame-system-benchmarking 27.0.0", - "frame-system-rpc-runtime-api 25.0.0", - "frame-try-runtime 0.33.0", + "cumulus-pallet-xcm 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-utility 0.7.0", + "frame-benchmarking 28.0.0", + "frame-executive 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-system-benchmarking 28.0.0", + "frame-system-rpc-runtime-api 26.0.0", + "frame-try-runtime 0.34.0", "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-tx-payment 27.0.0", - "pallet-assets 28.0.0", - "pallet-aura 26.0.0", - "pallet-authorship 27.0.0", - "pallet-balances 27.0.0", - "pallet-collator-selection 8.0.0", - "pallet-message-queue 30.0.0", + "pallet-asset-tx-payment 28.0.0", + "pallet-assets 29.0.0", + "pallet-aura 27.0.0", + "pallet-authorship 28.0.0", + "pallet-balances 28.0.0", + "pallet-collator-selection 9.0.0", + "pallet-message-queue 31.0.0", "pallet-multisig", "pallet-nfts", "pallet-nfts-runtime-api", - "pallet-proxy 27.0.0", - "pallet-session 27.0.0", - "pallet-timestamp 26.0.0", - "pallet-transaction-payment 27.0.0", - "pallet-transaction-payment-rpc-runtime-api 27.0.0", + "pallet-proxy 28.0.0", + "pallet-session 28.0.0", + "pallet-timestamp 27.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment-rpc-runtime-api 28.0.0", "pallet-uniques", - "pallet-utility 27.0.0", - "pallet-xcm 6.0.0", - "pallet-xcm-benchmarks 6.0.0", + "pallet-utility 28.0.0", + "pallet-xcm 7.0.0", + "pallet-xcm-benchmarks 7.0.0", "pallet-xcm-bridge-hub-router", - "parachains-common 6.0.0", + "parachains-common 7.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-core-primitives 6.0.0", - "polkadot-parachain-primitives 5.0.0", - "polkadot-runtime-common 6.0.0", + "polkadot-core-primitives 7.0.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-runtime-common 7.0.0", "polkadot-runtime-constants", "scale-info", - "sp-api 25.0.0", - "sp-block-builder 25.0.0", - "sp-consensus-aura 0.31.0", - "sp-core 27.0.0", - "sp-genesis-builder 0.6.0", - "sp-inherents 25.0.0", - "sp-io 29.0.0", - "sp-offchain 25.0.0", - "sp-runtime 30.0.1", - "sp-session 26.0.0", - "sp-std 13.0.0", - "sp-storage 18.0.0", - "sp-transaction-pool 25.0.0", - "sp-version 28.0.0", - "sp-weights 26.0.0", - "staging-parachain-info 0.6.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", - "substrate-wasm-builder 16.0.0", + "sp-api 26.0.0", + "sp-block-builder 26.0.0", + "sp-consensus-aura 0.32.0", + "sp-core 28.0.0", + "sp-genesis-builder 0.7.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", + "sp-transaction-pool 26.0.0", + "sp-version 29.0.0", + "sp-weights 27.0.0", + "staging-parachain-info 0.7.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", + "substrate-wasm-builder 17.0.0", "system-parachains-constants", ] [[package]] name = "asset-test-utils" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e667143b26882e0f67cf028814d46f92671655085e47604cc0e0b62579fee24" +checksum = "f2fc9ae11639b454ef894ebcd8fa1ea8edb09b14aba20477c4026d9ac6e4421f" dependencies = [ "assets-common", - "cumulus-pallet-parachain-system 0.6.0", - "cumulus-pallet-xcmp-queue 0.6.0", - "cumulus-primitives-core 0.6.0", - "cumulus-primitives-parachain-inherent 0.6.0", - "cumulus-test-relay-sproof-builder 0.6.0", - "frame-support 27.0.0", - "frame-system 27.0.0", - "pallet-assets 28.0.0", - "pallet-balances 27.0.0", - "pallet-collator-selection 8.0.0", - "pallet-session 27.0.0", - "pallet-xcm 6.0.0", + "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-parachain-inherent 0.7.0", + "cumulus-test-relay-sproof-builder 0.7.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-assets 29.0.0", + "pallet-balances 28.0.0", + "pallet-collator-selection 9.0.0", + "pallet-session 28.0.0", + "pallet-xcm 7.0.0", "pallet-xcm-bridge-hub-router", - "parachains-common 6.0.0", + "parachains-common 7.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-parachain-primitives 5.0.0", - "sp-consensus-aura 0.31.0", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "staging-parachain-info 0.6.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", - "substrate-wasm-builder 16.0.0", + "polkadot-parachain-primitives 6.0.0", + "sp-consensus-aura 0.32.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "staging-parachain-info 0.7.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", + "substrate-wasm-builder 17.0.0", ] [[package]] name = "assets-common" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3eefe3c913d16da32e39ad87edcbe7c6d94c34a33b7fdc08763247d69b516b5" +checksum = "c7d2d5b75d36daec8ffad11f121f581cc3aec2b7b117d8ab68f6e3ac914a5569" dependencies = [ - "cumulus-primitives-core 0.6.0", - "frame-support 27.0.0", + "cumulus-primitives-core 0.7.0", + "frame-support 28.0.0", "impl-trait-for-tuples", "log", "pallet-asset-conversion", - "pallet-asset-tx-payment 27.0.0", - "pallet-xcm 6.0.0", - "parachains-common 6.0.0", + "pallet-asset-tx-payment 28.0.0", + "pallet-xcm 7.0.0", + "parachains-common 7.0.0", "parity-scale-codec", "scale-info", - "sp-api 25.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", - "substrate-wasm-builder 16.0.0", + "sp-api 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", + "substrate-wasm-builder 17.0.0", ] [[package]] @@ -833,9 +847,9 @@ dependencies = [ [[package]] name = "binary-merkle-tree" -version = "12.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c2839a4cb8e9e2c1f2cadb92de7a151c68de424a2e6433ced90e4d67c2ace0b" +checksum = "4bf2706ac2641485d35ed06ebfe0b3b2c43e19a7ad8a90215580a91dd1766114" dependencies = [ "hash-db", "log", @@ -862,7 +876,7 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "prettyplease 0.2.15", + "prettyplease 0.2.16", "proc-macro2", "quote", "regex", @@ -1035,40 +1049,40 @@ dependencies = [ name = "bp-asset-hub-kusama" version = "1.0.0" dependencies = [ - "bp-xcm-bridge-hub-router 0.5.0", - "frame-support 27.0.0", + "bp-xcm-bridge-hub-router 0.6.0", + "frame-support 28.0.0", "parity-scale-codec", "scale-info", - "sp-std 13.0.0", - "staging-xcm 6.0.0", + "sp-std 14.0.0", + "staging-xcm 7.0.0", ] [[package]] name = "bp-asset-hub-polkadot" version = "1.0.0" dependencies = [ - "bp-xcm-bridge-hub-router 0.5.0", - "frame-support 27.0.0", + "bp-xcm-bridge-hub-router 0.6.0", + "frame-support 28.0.0", "parity-scale-codec", "scale-info", - "sp-std 13.0.0", - "staging-xcm 6.0.0", + "sp-std 14.0.0", + "staging-xcm 7.0.0", ] [[package]] name = "bp-bridge-hub-cumulus" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d76abad1eafb53d1377365c3004456bb61abb5795d06498323770c5647290a2" +checksum = "7a2ab8c4b01666c7b1fca260a4ef755c6de01ddac94566b13b3b974ed7966d6d" dependencies = [ "bp-messages", "bp-polkadot-core", "bp-runtime", - "frame-support 27.0.0", - "frame-system 27.0.0", - "polkadot-primitives 6.0.0", - "sp-api 25.0.0", - "sp-std 13.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "polkadot-primitives 7.0.0", + "sp-api 26.0.0", + "sp-std 14.0.0", ] [[package]] @@ -1078,12 +1092,12 @@ dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", "bp-runtime", - "frame-support 27.0.0", + "frame-support 28.0.0", "kusama-runtime-constants", "polkadot-runtime-constants", - "sp-api 25.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-api 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -1093,136 +1107,136 @@ dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", "bp-runtime", - "frame-support 27.0.0", + "frame-support 28.0.0", "kusama-runtime-constants", "polkadot-runtime-constants", - "sp-api 25.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-api 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "bp-header-chain" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0135eafdf5d8ee896e875c7f403417b7e8c1a60794daa03ea8d4614ad11bc2e" +checksum = "13815b42c75e06a6f6b19521a824cb6bf1624654b041ae0b4abeb279df0e2588" dependencies = [ "bp-runtime", "finality-grandpa", - "frame-support 27.0.0", + "frame-support 28.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-consensus-grandpa 12.0.0", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-consensus-grandpa 13.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "bp-kusama" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c318068ab7f4d07cf122d4227a7951be7007b70029f160885b86527d3c1d64" +checksum = "b7cf6db324f903d20b2b5e8e213488b6df6c058d3c86ca5a0fa532d1f8a02b3b" dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", - "frame-support 27.0.0", - "sp-api 25.0.0", - "sp-std 13.0.0", + "frame-support 28.0.0", + "sp-api 26.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-messages" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ba0e3d7c760f6121f93286f4cbee7fa50c86a6b5a230b3b357bc81e5c1826d9" +checksum = "220c494acdb350a79a7268f4a73d7a6b6cd3f2138f301856a6f6c4a5c09ef926" dependencies = [ "bp-header-chain", "bp-runtime", - "frame-support 27.0.0", + "frame-support 28.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core 27.0.0", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-parachains" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b615d01bc99346daa91aea18c18bb7edfca5d29ab5730d04060753d5b59afc73" +checksum = "cf36b503d044eab3078e0f2c49087031b807b8277968ebcb22c7f2e611cf4602" dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", - "frame-support 27.0.0", + "frame-support 28.0.0", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "bp-polkadot" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1af8ed56bc7dddc4a3b30ca1568cf406df77ed0b883e0c55e21917b2396460e" +checksum = "4f631c9127a07e4d4f9af9b2f92463c1b8a601f7f7cf9394a932c4373f77201c" dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", - "frame-support 27.0.0", - "sp-api 25.0.0", - "sp-std 13.0.0", + "frame-support 28.0.0", + "sp-api 26.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-polkadot-core" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca2fa4991db1c5bf9f8ec4c5e0e320a19e76cfe197f850d353f3abae84ae98a" +checksum = "80145cd18bd06347b5571a767112163e1da41e8b10a90bf9d2d982bf0ba5fcb7" dependencies = [ "bp-messages", "bp-runtime", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "parity-util-mem", "scale-info", "serde", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "bp-relayers" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4736fdf102aca9ff3e656905557427668e0f339d8b0702b245d354eba63c7186" +checksum = "cf10c05632fad95ba4c6c3d1b2f3a3109bde6aa8f295098351a6e5b1270ba201" dependencies = [ "bp-messages", "bp-runtime", - "frame-support 27.0.0", + "frame-support 28.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "bp-runtime" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "426e8c3390a33f7ebd7c009b33278c8f4c42d6be008264387efcb1dee80af96b" +checksum = "1fad9aefbc3e6cb63e0ac82a4dae9f1404416b41fb45931a4b43946cfa23c814" dependencies = [ - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "hash-db", "impl-trait-for-tuples", "log", @@ -1230,20 +1244,20 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-state-machine 0.34.0", - "sp-std 13.0.0", - "sp-trie 28.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-std 14.0.0", + "sp-trie 29.0.0", "trie-db", ] [[package]] name = "bp-test-utils" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "382a1045b3a21ce3e9becc3bcf95a3c92519b48e405c39dfdf85f43cdf7906b9" +checksum = "9282521d9d851e93bb312e2465f72d5b2e549a70e68bf7421db4870b854011ee" dependencies = [ "bp-header-chain", "bp-parachains", @@ -1252,21 +1266,21 @@ dependencies = [ "ed25519-dalek", "finality-grandpa", "parity-scale-codec", - "sp-application-crypto 29.0.0", - "sp-consensus-grandpa 12.0.0", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-trie 28.0.0", + "sp-application-crypto 30.0.0", + "sp-consensus-grandpa 13.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-trie 29.0.0", ] [[package]] name = "bp-xcm-bridge-hub" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "118842d57deb8d54e2288595a33689fc364ffbf5877648e84940b2cf4b4dd4a6" +checksum = "6663e0179d475e30cfcf28cf597cdc8f4bb1c2c39a557b4cbe0057db0657fb67" dependencies = [ - "sp-std 13.0.0", + "sp-std 14.0.0", ] [[package]] @@ -1283,14 +1297,14 @@ dependencies = [ [[package]] name = "bp-xcm-bridge-hub-router" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98f3ee360878f0cebae637b8584d9425609176ae93e10c8e05ffff544948db19" +checksum = "8f58cd5d7880f4bc8fc569e5bb0174302cd3f7e18a322e0fec2a4733cced35cb" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-runtime 30.0.1", + "sp-core 28.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -1311,71 +1325,71 @@ dependencies = [ "bp-runtime", "bridge-hub-test-utils", "bridge-runtime-common", - "cumulus-pallet-aura-ext 0.6.0", - "cumulus-pallet-dmp-queue 0.6.0", - "cumulus-pallet-parachain-system 0.6.0", + "cumulus-pallet-aura-ext 0.7.0", + "cumulus-pallet-dmp-queue 0.7.0", + "cumulus-pallet-parachain-system 0.7.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.6.0", - "cumulus-pallet-xcmp-queue 0.6.0", - "cumulus-primitives-core 0.6.0", - "cumulus-primitives-utility 0.6.0", - "frame-benchmarking 27.0.0", - "frame-executive 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", - "frame-system-benchmarking 27.0.0", - "frame-system-rpc-runtime-api 25.0.0", - "frame-try-runtime 0.33.0", + "cumulus-pallet-xcm 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-utility 0.7.0", + "frame-benchmarking 28.0.0", + "frame-executive 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-system-benchmarking 28.0.0", + "frame-system-rpc-runtime-api 26.0.0", + "frame-try-runtime 0.34.0", "hex-literal", "kusama-runtime-constants", "log", - "pallet-aura 26.0.0", - "pallet-authorship 27.0.0", - "pallet-balances 27.0.0", + "pallet-aura 27.0.0", + "pallet-authorship 28.0.0", + "pallet-balances 28.0.0", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-collator-selection 8.0.0", - "pallet-message-queue 30.0.0", + "pallet-collator-selection 9.0.0", + "pallet-message-queue 31.0.0", "pallet-multisig", - "pallet-session 27.0.0", - "pallet-timestamp 26.0.0", - "pallet-transaction-payment 27.0.0", - "pallet-transaction-payment-rpc-runtime-api 27.0.0", - "pallet-utility 27.0.0", - "pallet-xcm 6.0.0", - "pallet-xcm-benchmarks 6.0.0", + "pallet-session 28.0.0", + "pallet-timestamp 27.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "pallet-utility 28.0.0", + "pallet-xcm 7.0.0", + "pallet-xcm-benchmarks 7.0.0", "pallet-xcm-bridge-hub", - "parachains-common 6.0.0", + "parachains-common 7.0.0", "parity-scale-codec", - "polkadot-core-primitives 6.0.0", - "polkadot-parachain-primitives 5.0.0", - "polkadot-runtime-common 6.0.0", + "polkadot-core-primitives 7.0.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-runtime-common 7.0.0", "polkadot-runtime-constants", "scale-info", "serde", - "sp-api 25.0.0", - "sp-block-builder 25.0.0", - "sp-consensus-aura 0.31.0", - "sp-core 27.0.0", - "sp-genesis-builder 0.6.0", - "sp-inherents 25.0.0", - "sp-io 29.0.0", - "sp-keyring 30.0.0", - "sp-offchain 25.0.0", - "sp-runtime 30.0.1", - "sp-session 26.0.0", - "sp-std 13.0.0", - "sp-storage 18.0.0", - "sp-transaction-pool 25.0.0", - "sp-version 28.0.0", - "staging-parachain-info 0.6.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "sp-api 26.0.0", + "sp-block-builder 26.0.0", + "sp-consensus-aura 0.32.0", + "sp-core 28.0.0", + "sp-genesis-builder 0.7.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-keyring 31.0.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", + "sp-transaction-pool 26.0.0", + "sp-version 29.0.0", + "staging-parachain-info 0.7.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", "static_assertions", - "substrate-wasm-builder 16.0.0", + "substrate-wasm-builder 17.0.0", "system-parachains-constants", ] @@ -1397,79 +1411,79 @@ dependencies = [ "bp-runtime", "bridge-hub-test-utils", "bridge-runtime-common", - "cumulus-pallet-aura-ext 0.6.0", - "cumulus-pallet-dmp-queue 0.6.0", - "cumulus-pallet-parachain-system 0.6.0", + "cumulus-pallet-aura-ext 0.7.0", + "cumulus-pallet-dmp-queue 0.7.0", + "cumulus-pallet-parachain-system 0.7.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.6.0", - "cumulus-pallet-xcmp-queue 0.6.0", - "cumulus-primitives-core 0.6.0", - "cumulus-primitives-utility 0.6.0", - "frame-benchmarking 27.0.0", - "frame-executive 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", - "frame-system-benchmarking 27.0.0", - "frame-system-rpc-runtime-api 25.0.0", - "frame-try-runtime 0.33.0", + "cumulus-pallet-xcm 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-utility 0.7.0", + "frame-benchmarking 28.0.0", + "frame-executive 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-system-benchmarking 28.0.0", + "frame-system-rpc-runtime-api 26.0.0", + "frame-try-runtime 0.34.0", "hex-literal", "kusama-runtime-constants", "log", - "pallet-aura 26.0.0", - "pallet-authorship 27.0.0", - "pallet-balances 27.0.0", + "pallet-aura 27.0.0", + "pallet-authorship 28.0.0", + "pallet-balances 28.0.0", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-collator-selection 8.0.0", - "pallet-message-queue 30.0.0", + "pallet-collator-selection 9.0.0", + "pallet-message-queue 31.0.0", "pallet-multisig", - "pallet-session 27.0.0", - "pallet-timestamp 26.0.0", - "pallet-transaction-payment 27.0.0", - "pallet-transaction-payment-rpc-runtime-api 27.0.0", - "pallet-utility 27.0.0", - "pallet-xcm 6.0.0", - "pallet-xcm-benchmarks 6.0.0", + "pallet-session 28.0.0", + "pallet-timestamp 27.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "pallet-utility 28.0.0", + "pallet-xcm 7.0.0", + "pallet-xcm-benchmarks 7.0.0", "pallet-xcm-bridge-hub", - "parachains-common 6.0.0", + "parachains-common 7.0.0", "parity-scale-codec", - "polkadot-core-primitives 6.0.0", - "polkadot-parachain-primitives 5.0.0", - "polkadot-runtime-common 6.0.0", + "polkadot-core-primitives 7.0.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-runtime-common 7.0.0", "polkadot-runtime-constants", "scale-info", "serde", - "sp-api 25.0.0", - "sp-block-builder 25.0.0", - "sp-consensus-aura 0.31.0", - "sp-core 27.0.0", - "sp-genesis-builder 0.6.0", - "sp-inherents 25.0.0", - "sp-io 29.0.0", - "sp-keyring 30.0.0", - "sp-offchain 25.0.0", - "sp-runtime 30.0.1", - "sp-session 26.0.0", - "sp-std 13.0.0", - "sp-storage 18.0.0", - "sp-transaction-pool 25.0.0", - "sp-version 28.0.0", - "staging-parachain-info 0.6.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "sp-api 26.0.0", + "sp-block-builder 26.0.0", + "sp-consensus-aura 0.32.0", + "sp-core 28.0.0", + "sp-genesis-builder 0.7.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-keyring 31.0.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", + "sp-transaction-pool 26.0.0", + "sp-version 29.0.0", + "staging-parachain-info 0.7.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", "static_assertions", - "substrate-wasm-builder 16.0.0", + "substrate-wasm-builder 17.0.0", "system-parachains-constants", ] [[package]] name = "bridge-hub-test-utils" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d744617b60464166d7d4fbe859164f8dc4f22e096ce386d37afcc3fe157e4a9" +checksum = "6ac81ef95972c445ffda86b9b1be4346d62c98924e5242f56f026296114ebea8" dependencies = [ "asset-test-utils", "bp-header-chain", @@ -1480,42 +1494,44 @@ dependencies = [ "bp-runtime", "bp-test-utils", "bridge-runtime-common", - "cumulus-pallet-parachain-system 0.6.0", - "cumulus-pallet-xcmp-queue 0.6.0", - "frame-benchmarking 27.0.0", - "frame-executive 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.0", + "frame-benchmarking 28.0.0", + "frame-executive 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "impl-trait-for-tuples", "log", - "pallet-balances 27.0.0", + "pallet-balances 28.0.0", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-collator-selection 8.0.0", - "pallet-session 27.0.0", - "pallet-utility 27.0.0", - "pallet-xcm 6.0.0", - "pallet-xcm-benchmarks 6.0.0", - "parachains-common 6.0.0", + "pallet-collator-selection 9.0.0", + "pallet-session 28.0.0", + "pallet-utility 28.0.0", + "pallet-xcm 7.0.0", + "pallet-xcm-benchmarks 7.0.0", + "parachains-common 7.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-keyring 30.0.0", - "sp-runtime 30.0.1", - "sp-tracing 15.0.0", - "staging-parachain-info 0.6.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-keyring 31.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-tracing 16.0.0", + "staging-parachain-info 0.7.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", ] [[package]] name = "bridge-runtime-common" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb844adfe3e4d866e77f535d2d6e19bbc0b733c8cb1f317f42ebe798cd14309e" +checksum = "ad84d21ab89055d3d2d85064a04f51c0993f1885379b0d4ef2c0dff26b0fbfb1" dependencies = [ "bp-header-chain", "bp-messages", @@ -1524,27 +1540,27 @@ dependencies = [ "bp-relayers", "bp-runtime", "bp-xcm-bridge-hub", - "bp-xcm-bridge-hub-router 0.5.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "bp-xcm-bridge-hub-router 0.6.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "hash-db", "log", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-transaction-payment 27.0.0", - "pallet-utility 27.0.0", - "parity-scale-codec", - "scale-info", - "sp-api 25.0.0", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-trie 28.0.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-utility 28.0.0", + "parity-scale-codec", + "scale-info", + "sp-api 26.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-trie 29.0.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", "static_assertions", ] @@ -1755,30 +1771,30 @@ dependencies = [ "bridge-hub-polkadot-runtime", "clap", "collectives-polkadot-runtime", - "cumulus-primitives-core 0.6.0", + "cumulus-primitives-core 0.7.0", "encointer-kusama-runtime", "glutton-kusama-runtime", "hex-literal", "kusama-runtime-constants", "pallet-im-online", - "pallet-staking 27.0.0", - "parachains-common 6.0.0", - "polkadot-primitives 6.0.0", + "pallet-staking 28.0.0", + "parachains-common 7.0.0", + "polkadot-primitives 7.0.0", "polkadot-runtime", "polkadot-runtime-constants", - "polkadot-runtime-parachains 6.0.0", - "sc-chain-spec 26.0.0", + "polkadot-runtime-parachains 7.0.0", + "sc-chain-spec 27.0.0", "sc-consensus-grandpa", "serde", "serde_json", - "sp-authority-discovery 25.0.0", - "sp-consensus-babe 0.31.0", + "sp-authority-discovery 26.0.0", + "sp-consensus-babe 0.32.0", "sp-consensus-beefy", "sp-core 25.0.0", - "sp-core 27.0.0", - "sp-runtime 30.0.1", + "sp-core 28.0.0", + "sp-runtime 31.0.1", "staging-kusama-runtime", - "staging-xcm 6.0.0", + "staging-xcm 7.0.0", ] [[package]] @@ -1803,7 +1819,7 @@ checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" dependencies = [ "core2", "multibase", - "multihash 0.17.0", + "multihash", "serde", "unsigned-varint", ] @@ -1839,9 +1855,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", @@ -1850,9 +1866,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.14" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e92c5c1a78c62968ec57dbc2440366a2d6e5a23faf829970ff1585dc6b18e2" +checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" dependencies = [ "clap_builder", "clap_derive", @@ -1860,15 +1876,14 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.14" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4323769dc8a61e2c39ad7dc26f6f2800524691a44d74fe3d1071a5c24db6370" +checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" dependencies = [ "anstream", "anstyle", "clap_lex", "strsim", - "terminal_size", ] [[package]] @@ -1915,72 +1930,72 @@ dependencies = [ name = "collectives-polkadot-runtime" version = "1.0.0" dependencies = [ - "cumulus-pallet-aura-ext 0.6.0", - "cumulus-pallet-dmp-queue 0.6.0", - "cumulus-pallet-parachain-system 0.6.0", + "cumulus-pallet-aura-ext 0.7.0", + "cumulus-pallet-dmp-queue 0.7.0", + "cumulus-pallet-parachain-system 0.7.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.6.0", - "cumulus-pallet-xcmp-queue 0.6.0", - "cumulus-primitives-core 0.6.0", - "cumulus-primitives-utility 0.6.0", - "frame-benchmarking 27.0.0", - "frame-executive 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", - "frame-system-benchmarking 27.0.0", - "frame-system-rpc-runtime-api 25.0.0", - "frame-try-runtime 0.33.0", + "cumulus-pallet-xcm 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-utility 0.7.0", + "frame-benchmarking 28.0.0", + "frame-executive 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-system-benchmarking 28.0.0", + "frame-system-rpc-runtime-api 26.0.0", + "frame-try-runtime 0.34.0", "hex-literal", "log", "pallet-alliance", - "pallet-asset-rate 6.0.0", - "pallet-aura 26.0.0", - "pallet-authorship 27.0.0", - "pallet-balances 27.0.0", - "pallet-collator-selection 8.0.0", - "pallet-collective 27.0.0", + "pallet-asset-rate 7.0.0", + "pallet-aura 27.0.0", + "pallet-authorship 28.0.0", + "pallet-balances 28.0.0", + "pallet-collator-selection 9.0.0", + "pallet-collective 28.0.0", "pallet-core-fellowship", - "pallet-message-queue 30.0.0", + "pallet-message-queue 31.0.0", "pallet-multisig", "pallet-preimage", - "pallet-proxy 27.0.0", + "pallet-proxy 28.0.0", "pallet-ranked-collective", "pallet-referenda", "pallet-salary", - "pallet-scheduler 28.0.0", - "pallet-session 27.0.0", - "pallet-timestamp 26.0.0", - "pallet-transaction-payment 27.0.0", - "pallet-transaction-payment-rpc-runtime-api 27.0.0", - "pallet-treasury 26.0.0", - "pallet-utility 27.0.0", - "pallet-xcm 6.0.0", - "parachains-common 6.0.0", - "parity-scale-codec", - "polkadot-core-primitives 6.0.0", - "polkadot-parachain-primitives 5.0.0", - "polkadot-runtime-common 6.0.0", + "pallet-scheduler 29.0.0", + "pallet-session 28.0.0", + "pallet-timestamp 27.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "pallet-treasury 27.0.0", + "pallet-utility 28.0.0", + "pallet-xcm 7.0.0", + "parachains-common 7.0.0", + "parity-scale-codec", + "polkadot-core-primitives 7.0.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-runtime-common 7.0.0", "polkadot-runtime-constants", "scale-info", - "sp-api 25.0.0", - "sp-arithmetic 22.0.0", - "sp-block-builder 25.0.0", - "sp-consensus-aura 0.31.0", - "sp-core 27.0.0", - "sp-genesis-builder 0.6.0", - "sp-inherents 25.0.0", - "sp-offchain 25.0.0", - "sp-runtime 30.0.1", - "sp-session 26.0.0", - "sp-std 13.0.0", - "sp-storage 18.0.0", - "sp-transaction-pool 25.0.0", - "sp-version 28.0.0", - "staging-parachain-info 0.6.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", - "substrate-wasm-builder 16.0.0", + "sp-api 26.0.0", + "sp-arithmetic 23.0.0", + "sp-block-builder 26.0.0", + "sp-consensus-aura 0.32.0", + "sp-core 28.0.0", + "sp-genesis-builder 0.7.0", + "sp-inherents 26.0.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", + "sp-transaction-pool 26.0.0", + "sp-version 29.0.0", + "staging-parachain-info 0.7.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", + "substrate-wasm-builder 17.0.0", "system-parachains-constants", ] @@ -2248,11 +2263,10 @@ dependencies = [ [[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", ] @@ -2351,21 +2365,21 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0976731a7fdc209cf677e660dcabd60bd101c9d326a9b105bb4dfc2f588591d" +checksum = "8100a3283be2c46905345141e9a063f092949c6630a1fb70993b04c97f309e55" dependencies = [ - "cumulus-pallet-parachain-system 0.6.0", - "frame-support 27.0.0", - "frame-system 27.0.0", - "pallet-aura 26.0.0", - "pallet-timestamp 26.0.0", + "cumulus-pallet-parachain-system 0.7.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-aura 27.0.0", + "pallet-timestamp 27.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 29.0.0", - "sp-consensus-aura 0.31.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-application-crypto 30.0.0", + "sp-consensus-aura 0.32.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -2388,21 +2402,21 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e14d2bfe35cd9fd86302c575b42d7f2e8510b6cdbb1e0730ad5b31da9caa60" +checksum = "f461956a4a85c053657fe64e73852940c8a52e7d8fc20ccb4f91688e73f0820b" dependencies = [ - "cumulus-primitives-core 0.6.0", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "cumulus-primitives-core 0.7.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "staging-xcm 6.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "staging-xcm 7.0.0", ] [[package]] @@ -2439,36 +2453,36 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0980004d033c8e160148a6ae82423a7fff02455f7d6bccba2b16e87ef4a53b76" +checksum = "4a1a0e6800ea92447eab2c9170cc77d21987fd0e61ed79a6e1318f7b127b3e2c" dependencies = [ "bytes", - "cumulus-pallet-parachain-system-proc-macro 0.5.0", - "cumulus-primitives-core 0.6.0", - "cumulus-primitives-parachain-inherent 0.6.0", + "cumulus-pallet-parachain-system-proc-macro 0.6.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-parachain-inherent 0.7.0", "cumulus-primitives-proof-size-hostfunction", "environmental", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "impl-trait-for-tuples", "log", - "pallet-message-queue 30.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 5.0.0", - "polkadot-runtime-parachains 6.0.0", - "scale-info", - "sp-core 27.0.0", - "sp-externalities 0.24.0", - "sp-inherents 25.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-state-machine 0.34.0", - "sp-std 13.0.0", - "sp-trie 28.0.0", - "sp-version 28.0.0", - "staging-xcm 6.0.0", + "pallet-message-queue 31.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 6.0.0", + "polkadot-runtime-parachains 7.0.0", + "scale-info", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-std 14.0.0", + "sp-trie 29.0.0", + "sp-version 29.0.0", + "staging-xcm 7.0.0", "trie-db", ] @@ -2486,11 +2500,11 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc86fdc17ef11f9adcd7565a4238107a3538426990fa4ffed8e6dc1d40582a2" +checksum = "befbaf3a1ce23ac8476481484fef5f4d500cbd15b4dad6380ce1d28134b0c1f7" dependencies = [ - "proc-macro-crate 2.0.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 2.0.48", @@ -2498,17 +2512,17 @@ dependencies = [ [[package]] name = "cumulus-pallet-session-benchmarking" -version = "8.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fec7368454572169916c9b0621bc1da04774260e32486fd1d2f58dbb21a7b85d" +checksum = "b90c6389bd56472581a2b9510c97e6fe869fe6c73c58d3d533ee3c74b92cce14" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", - "pallet-session 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-session 28.0.0", "parity-scale-codec", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -2530,19 +2544,19 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcm" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04efb075677bd1c54934294049f7264ef58dec22d18614c59ea76c99275b0ba7" +checksum = "d9e5e8dd3f9c98620e32cbb1783725a3e75a3147cb351b43de37663824311cd9" dependencies = [ - "cumulus-primitives-core 0.6.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "cumulus-primitives-core 0.7.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "staging-xcm 6.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "staging-xcm 7.0.0", ] [[package]] @@ -2572,28 +2586,28 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eda7f0f2644ef02fa18054a483650dfd7085caad7137221cbc05747c13ad7d7" +checksum = "439cdba45813623e7f45374f160f3356d27fb1aaca2536dd7f60ef2a7e9b30cd" dependencies = [ "bounded-collections", - "bp-xcm-bridge-hub-router 0.5.0", - "cumulus-primitives-core 0.6.0", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "bp-xcm-bridge-hub-router 0.6.0", + "cumulus-primitives-core 0.7.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-message-queue 30.0.0", + "pallet-message-queue 31.0.0", "parity-scale-codec", - "polkadot-runtime-common 6.0.0", - "polkadot-runtime-parachains 6.0.0", + "polkadot-runtime-common 7.0.0", + "polkadot-runtime-parachains 7.0.0", "scale-info", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "staging-xcm 6.0.0", - "staging-xcm-executor 6.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "staging-xcm 7.0.0", + "staging-xcm-executor 7.0.0", ] [[package]] @@ -2616,20 +2630,20 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "475c9928839e4ff8c168dc1eb4e31dc53e3b6380b85b5cdc1965da96026ec025" +checksum = "036b64697b5fd04c8039ccf15b9891104c496afb6c418c2cea1234d4898d0a28" dependencies = [ "parity-scale-codec", - "polkadot-core-primitives 6.0.0", - "polkadot-parachain-primitives 5.0.0", - "polkadot-primitives 6.0.0", + "polkadot-core-primitives 7.0.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", "scale-info", - "sp-api 25.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-trie 28.0.0", - "staging-xcm 6.0.0", + "sp-api 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-trie 29.0.0", + "staging-xcm 7.0.0", ] [[package]] @@ -2640,7 +2654,7 @@ checksum = "9d0b1e0e6dcf393dbf05b31122a8c4739acf407a96ec8fd707886f36ee95c355" dependencies = [ "async-trait", "cumulus-primitives-core 0.4.0", - "cumulus-relay-chain-interface 0.4.0", + "cumulus-relay-chain-interface", "cumulus-test-relay-sproof-builder 0.4.0", "parity-scale-codec", "sc-client-api 25.0.0", @@ -2658,37 +2672,29 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe636dcb0964587379b82af2856d1c174267e477a64229e878aed4150a813089" +checksum = "9cb6fe06744fed6e84682c48816181ad63652003570c2135c425481440fcd2f2" dependencies = [ "async-trait", - "cumulus-primitives-core 0.6.0", - "cumulus-relay-chain-interface 0.6.0", - "cumulus-test-relay-sproof-builder 0.6.0", + "cumulus-primitives-core 0.7.0", "parity-scale-codec", - "sc-client-api 27.0.0", "scale-info", - "sp-api 25.0.0", - "sp-core 27.0.0", - "sp-inherents 25.0.0", - "sp-runtime 30.0.1", - "sp-state-machine 0.34.0", - "sp-std 13.0.0", - "sp-storage 18.0.0", - "sp-trie 28.0.0", - "tracing", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-std 14.0.0", + "sp-trie 29.0.0", ] [[package]] name = "cumulus-primitives-proof-size-hostfunction" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d8668bb256b32b5fd5a1226811b3d763bd463f3200effee810c7a6f77feef30" +checksum = "a132e17ac2c79436bc5004b0d56cb35ca65b966434f14e5ff8a9bc1afcfca5a4" dependencies = [ - "sp-externalities 0.24.0", - "sp-runtime-interface 23.0.0", - "sp-trie 28.0.0", + "sp-externalities 0.25.0", + "sp-runtime-interface 24.0.0", + "sp-trie 29.0.0", ] [[package]] @@ -2728,23 +2734,23 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21cf332f275e5dcfc08cafc043bc37bfcf3989f3a39ffe1c840d44f568edb877" +checksum = "99542836a3b341249f4b4f54eca7cd5d42a99d38fd7dc6974d19899a90b2f82d" dependencies = [ - "cumulus-primitives-core 0.6.0", - "frame-support 27.0.0", + "cumulus-primitives-core 0.7.0", + "frame-support 28.0.0", "log", - "pallet-xcm-benchmarks 6.0.0", + "pallet-xcm-benchmarks 7.0.0", "parity-scale-codec", - "polkadot-runtime-common 6.0.0", - "polkadot-runtime-parachains 6.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "polkadot-runtime-common 7.0.0", + "polkadot-runtime-parachains 7.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", ] [[package]] @@ -2758,7 +2764,7 @@ dependencies = [ "futures", "jsonrpsee-core", "parity-scale-codec", - "polkadot-overseer 4.0.0", + "polkadot-overseer", "sc-client-api 25.0.0", "sp-api 23.0.0", "sp-blockchain 25.0.0", @@ -2766,25 +2772,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cumulus-relay-chain-interface" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a42b67dc400ff5f9dc07aedb8602f5deac2f2ac2290fd5529e4eb1345a3202a" -dependencies = [ - "async-trait", - "cumulus-primitives-core 0.6.0", - "futures", - "jsonrpsee-core", - "parity-scale-codec", - "polkadot-overseer 6.0.0", - "sc-client-api 27.0.0", - "sp-api 25.0.0", - "sp-blockchain 27.0.0", - "sp-state-machine 0.34.0", - "thiserror", -] - [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.4.0" @@ -2802,17 +2789,17 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c66e3ae7ba8cc8ac846c421bb01869fa516c9a1d490fb711d94a793dc5ab178" +checksum = "c0ec12490a40b00427119fd1e12a6d1fe0652d2df3e992dea1bc4f331effed12" dependencies = [ - "cumulus-primitives-core 0.6.0", + "cumulus-primitives-core 0.7.0", "parity-scale-codec", - "polkadot-primitives 6.0.0", - "sp-runtime 30.0.1", - "sp-state-machine 0.34.0", - "sp-std 13.0.0", - "sp-trie 28.0.0", + "polkadot-primitives 7.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-std 14.0.0", + "sp-trie 29.0.0", ] [[package]] @@ -2843,9 +2830,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f711ade317dd348950a9910f81c5947e3d8907ebd2b83f76203ff1807e6a2bc2" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ "cfg-if", "cpufeatures", @@ -3192,7 +3179,7 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ - "curve25519-dalek 4.0.0", + "curve25519-dalek 4.1.1", "ed25519", "rand_core 0.6.4", "serde", @@ -3249,24 +3236,24 @@ dependencies = [ "bridge-hub-kusama-runtime", "bridge-hub-polkadot-runtime", "collectives-polkadot-runtime", - "frame-support 27.0.0", + "frame-support 28.0.0", "integration-tests-common", "kusama-runtime-constants", "pallet-im-online", - "pallet-staking 27.0.0", - "parachains-common 6.0.0", + "pallet-staking 28.0.0", + "parachains-common 7.0.0", "penpal-runtime", - "polkadot-parachain-primitives 5.0.0", - "polkadot-primitives 6.0.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", "polkadot-runtime", "polkadot-runtime-constants", - "polkadot-runtime-parachains 6.0.0", - "sp-authority-discovery 25.0.0", - "sp-consensus-babe 0.31.0", + "polkadot-runtime-parachains 7.0.0", + "sp-authority-discovery 26.0.0", + "sp-consensus-babe 0.32.0", "sp-consensus-beefy", - "sp-consensus-grandpa 12.0.0", - "sp-core 27.0.0", - "sp-runtime 30.0.1", + "sp-consensus-grandpa 13.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", "staging-kusama-runtime", "xcm-emulator", ] @@ -3667,16 +3654,6 @@ dependencies = [ "libc", ] -[[package]] -name = "fdlimit" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e182f7dbc2ef73d9ef67351c5fbbea084729c48362d3ce9dd44c28e32e277fe5" -dependencies = [ - "libc", - "thiserror", -] - [[package]] name = "ff" version = "0.13.0" @@ -3689,9 +3666,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.1.20" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" [[package]] name = "file-per-thread-logger" @@ -3784,6 +3761,15 @@ dependencies = [ "parity-scale-codec", ] +[[package]] +name = "fork-tree" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e93d3f0315c2eccf23453609e0ab92fe7c6ad1ca8129bcaf80b9a08c8d7fc52b" +dependencies = [ + "parity-scale-codec", +] + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -3827,27 +3813,27 @@ dependencies = [ [[package]] name = "frame-benchmarking" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f99ad86e915f3a57b4a1b56a296e9e3f5bb5aec44189e6d85a773398c6ce614b" +checksum = "2b16f7f853f64ec6fbc981b3e224cc3400752662da140ec62c160b5b859bab68" dependencies = [ - "frame-support 27.0.0", - "frame-support-procedural 22.0.0", - "frame-system 27.0.0", + "frame-support 28.0.0", + "frame-support-procedural 23.0.0", + "frame-system 28.0.0", "linregress", "log", "parity-scale-codec", "paste", "scale-info", "serde", - "sp-api 25.0.0", - "sp-application-crypto 29.0.0", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-runtime-interface 23.0.0", - "sp-std 13.0.0", - "sp-storage 18.0.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-runtime-interface 24.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "static_assertions", ] @@ -3863,13 +3849,25 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "frame-election-provider-solution-type" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5c3bff645e46577c69c272733c53fa3a77d1ee6e40dfb66157bc94b0740b8fc" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "frame-election-provider-support" version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebad507fb038db2f7ce982d30bd9828a59785c9a4780348d59cd6cceaee80d1a" dependencies = [ - "frame-election-provider-solution-type", + "frame-election-provider-solution-type 12.0.0", "frame-support 25.0.0", "frame-system 25.0.0", "parity-scale-codec", @@ -3883,20 +3881,20 @@ dependencies = [ [[package]] name = "frame-election-provider-support" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26d8dabf04394bb59a44e41664984289c2b5b28d565193fac49695db846f167" +checksum = "c596d956c4eedaffbe2fd6f75562e63e3e60001222bc6f8cc45fa77f3ea51791" dependencies = [ - "frame-election-provider-solution-type", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-election-provider-solution-type 13.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-arithmetic 22.0.0", - "sp-core 27.0.0", - "sp-npos-elections 25.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-npos-elections 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -3920,21 +3918,21 @@ dependencies = [ [[package]] name = "frame-executive" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da9af388ae194ff65aba5c7cd7afe9fdaea6a021a06417efc6e4aebd996e7a3" +checksum = "5a5247e367912fe95f813e96542921ab4edf671860fd557625b55f40155abf90" dependencies = [ - "frame-support 27.0.0", - "frame-system 27.0.0", - "frame-try-runtime 0.33.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-try-runtime 0.34.0", "log", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-tracing 15.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-tracing 16.0.0", ] [[package]] @@ -3951,9 +3949,9 @@ dependencies = [ [[package]] name = "frame-remote-externalities" -version = "0.34.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fce6dcbe54a14394ba471f8f1c38a9b7b9bbccda9c23ef04de74403527ef4bf" +checksum = "26ac8b505de5aa10e9c9548a3642fc708fc47fe3843b840992e6e6ab139f39d0" dependencies = [ "futures", "indicatif", @@ -3961,10 +3959,10 @@ dependencies = [ "log", "parity-scale-codec", "serde", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-state-machine 0.34.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", "spinners", "substrate-rpc-client", "tokio", @@ -3977,7 +3975,7 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "023504bbdd0e8d1ebe3d9d289b009337cdb9a24c5e74615ffd7b188aa1664c2d" dependencies = [ - "aquamarine", + "aquamarine 0.3.2", "bitflags 1.3.2", "docify", "environmental", @@ -4014,17 +4012,17 @@ dependencies = [ [[package]] name = "frame-support" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "654f8001ac929387a460ed2b1dd9ef70af81221ef2b3519bf4c91ecef88f68e4" +checksum = "e48b00bb3e82c465a435b08827e7abe5144345bc1a998848bdd7ce72fa203bb5" dependencies = [ - "aquamarine", + "aquamarine 0.4.0", "array-bytes 6.2.2", "bitflags 1.3.2", "docify", "environmental", "frame-metadata", - "frame-support-procedural 22.0.0", + "frame-support-procedural 23.0.0", "impl-trait-for-tuples", "k256", "log", @@ -4035,21 +4033,21 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-api 25.0.0", - "sp-arithmetic 22.0.0", - "sp-core 27.0.0", - "sp-core-hashing-proc-macro 14.0.0", - "sp-debug-derive 13.0.0", - "sp-genesis-builder 0.6.0", - "sp-inherents 25.0.0", - "sp-io 29.0.0", - "sp-metadata-ir 0.5.0", - "sp-runtime 30.0.1", - "sp-staking 25.0.0", - "sp-state-machine 0.34.0", - "sp-std 13.0.0", - "sp-tracing 15.0.0", - "sp-weights 26.0.0", + "sp-api 26.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-core-hashing-proc-macro 15.0.0", + "sp-debug-derive 14.0.0", + "sp-genesis-builder 0.7.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-metadata-ir 0.6.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", + "sp-state-machine 0.35.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", + "sp-weights 27.0.0", "static_assertions", "tt-call", ] @@ -4064,7 +4062,7 @@ dependencies = [ "cfg-expr", "derive-syn-parse", "expander 2.0.0", - "frame-support-procedural-tools", + "frame-support-procedural-tools 9.0.0", "itertools 0.10.5", "macro_magic", "proc-macro-warning", @@ -4076,21 +4074,21 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef13774b6423deb98878e75cd7d22e3bd1ed60c216b000d000a8549de402fcd2" +checksum = "0be717139a0da9b31b559356db73f6ce48876d331e833ebdc32de3a9ad581e15" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", "expander 2.0.0", - "frame-support-procedural-tools", + "frame-support-procedural-tools 10.0.0", "itertools 0.10.5", "macro_magic", "proc-macro-warning", "proc-macro2", "quote", - "sp-core-hashing 14.0.0", + "sp-core-hashing 15.0.0", "syn 2.0.48", ] @@ -4100,13 +4098,26 @@ version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3ac1266522a8c9a2d2d26d205ec3028b88582d5f3cd5cbc75d0ec8271d197b7" dependencies = [ - "frame-support-procedural-tools-derive", + "frame-support-procedural-tools-derive 10.0.0", "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.48", ] +[[package]] +name = "frame-support-procedural-tools" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3363df38464c47a73eb521a4f648bfcc7537a82d70347ef8af3f73b6d019e910" +dependencies = [ + "frame-support-procedural-tools-derive 11.0.0", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "frame-support-procedural-tools-derive" version = "10.0.0" @@ -4118,6 +4129,17 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "frame-support-procedural-tools-derive" +version = "11.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68672b9ec6fe72d259d3879dc212c5e42e977588cdac830c76f54d9f492aeb58" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "frame-system" version = "25.0.0" @@ -4140,23 +4162,23 @@ dependencies = [ [[package]] name = "frame-system" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93a51b0fc4d1f35cc4e56c356738ce0e3d1f8483062d9243653b91fd2d20b083" +checksum = "983b3215c8d97775b90dc1db88f858c46401682bd2fb8572bdd102ff8c2ca2a6" dependencies = [ "cfg-if", "docify", - "frame-support 27.0.0", + "frame-support 28.0.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-version 28.0.0", - "sp-weights 26.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-version 29.0.0", + "sp-weights 27.0.0", ] [[package]] @@ -4177,18 +4199,18 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "398ca6909232d9e4a2686e862e49bd68314f1ee9796ba0ec29d55300523bf89f" +checksum = "f78a2fe203b01b596156b2514e0b890b4a628dbdb50925316e755aa623b6fe53" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -4203,12 +4225,12 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ce3dd1fb4ac9a390ebac1744bbb368fcf457a3fda0df2d788c535a3ef5819e1" +checksum = "28d183819ea7df1d89acd61fe423ae6bec24a29d87db5c18182339a751c0837a" dependencies = [ "parity-scale-codec", - "sp-api 25.0.0", + "sp-api 26.0.0", ] [[package]] @@ -4226,15 +4248,15 @@ dependencies = [ [[package]] name = "frame-try-runtime" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5edad06e1918b138964e0fee7d7b6d248e7d23e7946f868b165723564ba01b09" +checksum = "c5b3dab79d14d2e8f6329d7e5cb49f2bdb81b9ef3019b1c405d94defa137a353" dependencies = [ - "frame-support 27.0.0", + "frame-support 28.0.0", "parity-scale-codec", - "sp-api 25.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-api 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -4430,6 +4452,16 @@ dependencies = [ "wasi 0.11.0+wasi-snapshot-preview1", ] +[[package]] +name = "getrandom_or_panic" +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.5.0" @@ -4480,39 +4512,39 @@ dependencies = [ name = "glutton-kusama-runtime" version = "1.0.0" dependencies = [ - "cumulus-pallet-parachain-system 0.6.0", - "cumulus-pallet-xcm 0.6.0", - "cumulus-primitives-core 0.6.0", - "frame-benchmarking 27.0.0", - "frame-executive 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", - "frame-system-benchmarking 27.0.0", - "frame-system-rpc-runtime-api 25.0.0", - "frame-try-runtime 0.33.0", + "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-xcm 0.7.0", + "cumulus-primitives-core 0.7.0", + "frame-benchmarking 28.0.0", + "frame-executive 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-system-benchmarking 28.0.0", + "frame-system-rpc-runtime-api 26.0.0", + "frame-try-runtime 0.34.0", "pallet-glutton", - "pallet-message-queue 30.0.0", + "pallet-message-queue 31.0.0", "pallet-sudo", - "parachains-common 6.0.0", - "parity-scale-codec", - "scale-info", - "sp-api 25.0.0", - "sp-block-builder 25.0.0", - "sp-core 27.0.0", - "sp-genesis-builder 0.6.0", - "sp-inherents 25.0.0", - "sp-offchain 25.0.0", - "sp-runtime 30.0.1", - "sp-session 26.0.0", - "sp-std 13.0.0", - "sp-storage 18.0.0", - "sp-transaction-pool 25.0.0", - "sp-version 28.0.0", - "staging-parachain-info 0.6.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", - "substrate-wasm-builder 16.0.0", + "parachains-common 7.0.0", + "parity-scale-codec", + "scale-info", + "sp-api 26.0.0", + "sp-block-builder 26.0.0", + "sp-core 28.0.0", + "sp-genesis-builder 0.7.0", + "sp-inherents 26.0.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", + "sp-transaction-pool 26.0.0", + "sp-version 29.0.0", + "staging-parachain-info 0.7.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", + "substrate-wasm-builder 17.0.0", "system-parachains-constants", ] @@ -5002,29 +5034,29 @@ dependencies = [ "asset-test-utils", "bp-messages", "bridge-runtime-common", - "cumulus-pallet-dmp-queue 0.6.0", - "cumulus-pallet-parachain-system 0.6.0", - "cumulus-pallet-xcmp-queue 0.6.0", - "cumulus-primitives-core 0.6.0", - "frame-support 27.0.0", - "pallet-assets 28.0.0", - "pallet-balances 27.0.0", + "cumulus-pallet-dmp-queue 0.7.0", + "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.0", + "cumulus-primitives-core 0.7.0", + "frame-support 28.0.0", + "pallet-assets 29.0.0", + "pallet-balances 28.0.0", "pallet-bridge-messages", "pallet-im-online", - "pallet-message-queue 30.0.0", - "pallet-xcm 6.0.0", - "parachains-common 6.0.0", + "pallet-message-queue 31.0.0", + "pallet-xcm 7.0.0", + "parachains-common 7.0.0", "parity-scale-codec", "paste", - "polkadot-primitives 6.0.0", - "polkadot-runtime-parachains 6.0.0", - "sp-authority-discovery 25.0.0", - "sp-consensus-babe 0.31.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-parachains 7.0.0", + "sp-authority-discovery 26.0.0", + "sp-consensus-babe 0.32.0", "sp-consensus-beefy", - "sp-consensus-grandpa 12.0.0", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "staging-xcm 6.0.0", + "sp-consensus-grandpa 13.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "staging-xcm 7.0.0", "xcm-emulator", ] @@ -5292,14 +5324,14 @@ checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" name = "kusama-runtime-constants" version = "1.0.0" dependencies = [ - "frame-support 27.0.0", - "polkadot-primitives 6.0.0", - "polkadot-runtime-common 6.0.0", + "frame-support 28.0.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-common 7.0.0", "smallvec", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-weights 26.0.0", - "staging-xcm 6.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", + "staging-xcm 7.0.0", ] [[package]] @@ -5355,12 +5387,12 @@ checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] name = "libloading" -version = "0.7.4" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" dependencies = [ "cfg-if", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -5440,7 +5472,7 @@ dependencies = [ "libp2p-identity", "log", "multiaddr", - "multihash 0.17.0", + "multihash", "multistream-select", "once_cell", "parking_lot 0.12.1", @@ -5500,7 +5532,7 @@ dependencies = [ "ed25519-dalek", "log", "multiaddr", - "multihash 0.17.0", + "multihash", "quick-protobuf", "rand 0.8.5", "sha2 0.10.8", @@ -6115,6 +6147,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + [[package]] name = "mick-jaeger" version = "0.1.8" @@ -6163,7 +6207,7 @@ dependencies = [ "bitflags 1.3.2", "blake2 0.10.6", "c2-chacha", - "curve25519-dalek 4.0.0", + "curve25519-dalek 4.1.1", "either", "hashlink", "lioness", @@ -6215,7 +6259,7 @@ dependencies = [ "data-encoding", "log", "multibase", - "multihash 0.17.0", + "multihash", "percent-encoding", "serde", "static_assertions", @@ -6245,55 +6289,12 @@ dependencies = [ "blake3", "core2", "digest 0.10.7", - "multihash-derive 0.8.0", + "multihash-derive", "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" @@ -6308,31 +6309,6 @@ dependencies = [ "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", - "syn 1.0.109", - "synstructure", -] - [[package]] name = "multimap" version = "0.8.3" @@ -6633,9 +6609,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orchestra" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46d78e1deb2a8d54fc1f063a544130db4da31dfe4d5d3b493186424910222a76" +checksum = "5edee0c1917703f8a28cd229cf6a5c91a7ee34be139ced16509ac5b53b9d0c51" dependencies = [ "async-trait", "dyn-clonable", @@ -6643,16 +6619,16 @@ dependencies = [ "futures-timer", "orchestra-proc-macro", "pin-project", - "prioritized-metered-channel", + "prioritized-metered-channel 0.6.1", "thiserror", "tracing", ] [[package]] name = "orchestra-proc-macro" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d035b1f968d91a826f2e34a9d6d02cb2af5aa7ca39ebd27922d850ab4b2dd2c6" +checksum = "4f60e64a3808b5bb2786b9da09fc70714952aabcdd0eeba6f1718e3dbc34ad5b" dependencies = [ "expander 2.0.0", "indexmap 2.1.0", @@ -6675,59 +6651,59 @@ dependencies = [ [[package]] name = "pallet-alliance" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf8ceda912ff13d75e4144724daec0b0829ccf7a518b672e91d027f431d3d327" +checksum = "40fbbd9263e776fbb907283928363c82857a97b3c78120ce15a9ea06ece6570a" dependencies = [ "array-bytes 6.2.2", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-collective 27.0.0", + "pallet-collective 28.0.0", "pallet-identity", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-core-hashing 14.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-core-hashing 15.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-asset-conversion" -version = "9.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4b91839d5d00be65483a80964eb9c6f60e59bfcc3dbafc2899c46b0465ebecb" +checksum = "aa2139677a59351fbd8513ddd92be4a7443d7d92f8f6897b2bbc78f55d1c6b8a" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-api 25.0.0", - "sp-arithmetic 22.0.0", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-api 26.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-asset-conversion-tx-payment" -version = "9.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80810624ea3a3bab34568a45c7abca5777d60ed6312e271d04893ee5e69e002e" +checksum = "95388ffba6e39a34d9e95db0d7f776f36225fac387f3edbcc33856aa2df7913a" dependencies = [ - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "pallet-asset-conversion", - "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment 28.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -6748,18 +6724,18 @@ dependencies = [ [[package]] name = "pallet-asset-rate" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "094849e7310c9ad5d7dabf20ec8792c61812af32d4cc96b4319b973d320863fd" +checksum = "1e6f4917bc6c9ed6864813bbb828e94c63e1878a21af89d25dd0ff7da742f53e" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -6783,21 +6759,21 @@ dependencies = [ [[package]] name = "pallet-asset-tx-payment" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c3855550f4440a6e7ed47b23945473d708bb76e6a3c41f1a132514e0ed91349" +checksum = "e967664d86219ca9f7d33504e8d914225cdb92e9e793d35edaab1fd2574f162f" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", - "pallet-transaction-payment 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-transaction-payment 28.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -6819,19 +6795,19 @@ dependencies = [ [[package]] name = "pallet-assets" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0394a32537f67d6f2d0b5642be44bcd2e3ffd44ba458ea4b756dd6e9168cd90" +checksum = "aca79db2bc70c269170893604d8a56d0f32d52c75a23a3d887b6b4df132366b7" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -6854,20 +6830,20 @@ dependencies = [ [[package]] name = "pallet-aura" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "796c9823f84c4fc3b92b170ef9339bad67f9376a16d8df943331b72809dade39" +checksum = "10c6ecf016520a6883df14b2f1d469d98166377eba4b299af7b76eee0130e3a6" dependencies = [ - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-timestamp 26.0.0", + "pallet-timestamp 27.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 29.0.0", - "sp-consensus-aura 0.31.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-application-crypto 30.0.0", + "sp-consensus-aura 0.32.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -6889,19 +6865,19 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "361a82bd3370cef45db42171bb335c124ce19d577d6b3af22b3956d57aec631f" +checksum = "b9224b0a0bb4fa721d51f56947c73d4189710691b4cb40e7f7a8abf59795759a" dependencies = [ - "frame-support 27.0.0", - "frame-system 27.0.0", - "pallet-session 27.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-session 28.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 29.0.0", - "sp-authority-discovery 25.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-application-crypto 30.0.0", + "sp-authority-discovery 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -6921,17 +6897,17 @@ dependencies = [ [[package]] name = "pallet-authorship" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37359c9f33c8f660126390b42281c0c1c6736ff2f7e1f1361299234f43fd3de8" +checksum = "817b0420f9c14bd9bfbaf9e2f769a7e8124ab4fe3da0d07c80485c0901947ab8" dependencies = [ - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -6961,50 +6937,50 @@ dependencies = [ [[package]] name = "pallet-babe" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3ef6815dbc5ceb3f036e7b4037a6a37876df8817cec07637f269f79879430d2" +checksum = "4ba445228a941062d7c4d6295810a359df7757d6182c36ddb824f8c3bf350380" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-authorship 27.0.0", - "pallet-session 27.0.0", - "pallet-timestamp 26.0.0", + "pallet-authorship 28.0.0", + "pallet-session 28.0.0", + "pallet-timestamp 27.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 29.0.0", - "sp-consensus-babe 0.31.0", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-session 26.0.0", - "sp-staking 25.0.0", - "sp-std 13.0.0", + "sp-application-crypto 30.0.0", + "sp-consensus-babe 0.32.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-staking 26.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-bags-list" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46d48f60b6da70607edc794cc05e72ae70ea532ec539094ffcc4c7c9250a453b" +checksum = "00b0d7b6922a6bed960591efb49da6637312c034337faf4c85d8b35f2e2c611a" dependencies = [ - "aquamarine", + "aquamarine 0.4.0", "docify", - "frame-benchmarking 27.0.0", - "frame-election-provider-support 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-balances 27.0.0", + "pallet-balances 28.0.0", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-tracing 15.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-tracing 16.0.0", ] [[package]] @@ -7025,188 +7001,206 @@ dependencies = [ [[package]] name = "pallet-balances" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919a13c14461ab698c59aadd80d23694c98a17ed6c2dd7c8cc974577738f1836" +checksum = "8406b5616e468d80972b6365f3cd8211d0dbf4d107b379fac85fddcfdf0b5562" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-beefy" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b6a09b8f3cc9dcc2edac7319ffc4f74ada08d570eb3fb23aed00b49b4c437f" +checksum = "03f71d32d9681e9d78102dad00377629cac24b4bf43f6371c0dc7e5b25981eb4" dependencies = [ - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-authorship 27.0.0", - "pallet-session 27.0.0", + "pallet-authorship 28.0.0", + "pallet-session 28.0.0", "parity-scale-codec", "scale-info", "serde", "sp-consensus-beefy", - "sp-runtime 30.0.1", - "sp-session 26.0.0", - "sp-staking 25.0.0", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-staking 26.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-beefy-mmr" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e959c1126a433a8a6e756c8e85081e727a60c75353785a2b805ea25d2f7ff5fd" +checksum = "d8b8eaa5c053d9cbf20faa397f21b80b9b5bafbe428890b0171fd1bba16f52ce" dependencies = [ "array-bytes 6.2.2", "binary-merkle-tree", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "pallet-beefy", "pallet-mmr", - "pallet-session 27.0.0", + "pallet-session 28.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-api 25.0.0", + "sp-api 26.0.0", "sp-consensus-beefy", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-state-machine 0.34.0", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-bounties" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9982eb7f49564bd1815c804a1ca73a15f7d021a70d36cfb35c1e2f5dffb7c739" +checksum = "b5d421e3228bc4e8170d817d657aa87761b77ee4675a9e16328e1ca070cb4c41" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-treasury 26.0.0", + "pallet-treasury 27.0.0", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-bridge-grandpa" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17d6a612927f39c3a92a426fe0d226cc17b2bc8b60122e767d186d5e210ed12a" +checksum = "f6023fc7f2ed561589721f64fbdf9368737eae1b7b712d4b75e4c2b3d0d4a6f6" dependencies = [ "bp-header-chain", "bp-runtime", "bp-test-utils", "finality-grandpa", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-consensus-grandpa 12.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-trie 28.0.0", + "sp-consensus-grandpa 13.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-trie 29.0.0", ] [[package]] name = "pallet-bridge-messages" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cfc14baf0e65041a2cf9874c08d3e82212fe5d10f6a3ac1d0f40fcffac188f" +checksum = "ca7058e4135266d55f71251996857832656eaa392a0b526f396ff06666921cc6" dependencies = [ "bp-messages", "bp-runtime", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "num-traits", "parity-scale-codec", "scale-info", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-bridge-parachains" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80f4ab34d6a2c3bf8f72a3c1dc8bab5c0097e8d9ce27083f69b4d1c7d619ec61" +checksum = "538965e029986aa4cc996d507ad98af51b24ed399fca14ad9ae131f11270ecbf" dependencies = [ "bp-header-chain", "bp-parachains", "bp-polkadot-core", "bp-runtime", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "pallet-bridge-grandpa", "parity-scale-codec", "scale-info", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-trie 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-trie 29.0.0", ] [[package]] name = "pallet-bridge-relayers" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "273095478c3a09de73b7a01db3b2f938070621bc47e92cbbdadd31b7ba73f94c" +checksum = "d6820dd74455aa2b377d509c30a64562b03b887d08a8fbe7c9963da157f9a9d0" dependencies = [ "bp-messages", "bp-relayers", "bp-runtime", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-arithmetic 22.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-arithmetic 23.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", +] + +[[package]] +name = "pallet-broker" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "904983f117ff92ee24b251f2a883ff01b6f8e9063649877f3892ecbb516e3cbd" +dependencies = [ + "bitvec", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "parity-scale-codec", + "scale-info", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-child-bounties" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a27dfd21f4b038b534376d289954dc2fe735101b5d07ed6356f8578a1e134d2" +checksum = "fb62c44d3ab8dcbf106b22acc138eaea6e51563d16a8d4a246303f2e20eeb9e5" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "pallet-bounties", - "pallet-treasury 26.0.0", + "pallet-treasury 27.0.0", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -7231,22 +7225,22 @@ dependencies = [ [[package]] name = "pallet-collator-selection" -version = "8.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c352469427fb52314865ec220c8b83d05457de6c99f746b497575bb5c224682" +checksum = "f4199122c135e161d2e2f4cbc9339c54a11ac4b11e0beb67e53b49a3c90d566b" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-authorship 27.0.0", - "pallet-session 27.0.0", + "pallet-authorship 28.0.0", + "pallet-session 28.0.0", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-runtime 30.0.1", - "sp-staking 25.0.0", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", + "sp-std 14.0.0", ] [[package]] @@ -7269,76 +7263,76 @@ dependencies = [ [[package]] name = "pallet-collective" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e45e487c9ff2e3d36265f4cd2ead2721f9881670417c767fd95081d28bb2c890" +checksum = "1ed22cf9d91c120695063cfa95ae0ffabcadefdf2581657ddb5fd68555b3a2e0" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-conviction-voting" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93572f2a2e85e419bcd13ed65093eef677d7001616c7ba078fa05106dae11a1" +checksum = "4a189b5fb4a473edc7b2d52109fe10d0017b9b56f7c0324018b5970125db3ce3" dependencies = [ "assert_matches", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-core-fellowship" -version = "11.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d8c79b5837a1ba4b1803e2b03ccbc761deb5f84589227faa3995e20e7d7afdf" +checksum = "e8b59821d4508572c7b7cf9f044b1c87b7aa857acca1af2ec712d901a0002649" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 22.0.0", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-democracy" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e0aa3ee4c1c4b530b9d6a1dfdfbac69b64a9bad3d2fdd4748b961a4ec0962c2" +checksum = "b687c8a22b37f9b8444a29959f9cd0cf0be2f8efb8cd9bf91860d5dbafdab8b3" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -7367,25 +7361,25 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3f6303bbd336414959861b9a530f53e295d66f8d27dd8bd626daaf8fa051a1f" +checksum = "dc5e1f80bb4ce08b27f5a8a733d5c2d72d083a7d48afa4bdbb1ef3594a31e353" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-election-provider-support 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-election-provider-support-benchmarking 26.0.0", + "pallet-election-provider-support-benchmarking 27.0.0", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-arithmetic 22.0.0", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-npos-elections 25.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-npos-elections 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", "strum", ] @@ -7406,37 +7400,37 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baa4d9a426c024e1aa3bb6adbb03aa3b6887be8775e3fba0abda48ca9b17c864" +checksum = "193a8592c5fd534d56d07b2abe14e830d23947fb66f31867083e4f3ef80c8caa" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-election-provider-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", - "sp-npos-elections 25.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-npos-elections 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-elections-phragmen" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9f5a24ff9e46113edc57dfc1be6343652fac6dd967662cdc82b194aa38be9e" +checksum = "2dd2f70c57cbb3dcde39f141721dd34a8c852e0caaf61ae6b0bbd23138b6e1d3" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-npos-elections 25.0.0", - "sp-runtime 30.0.1", - "sp-staking 25.0.0", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-npos-elections 26.0.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", + "sp-std 14.0.0", ] [[package]] @@ -7644,121 +7638,122 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9186636e923b4be260d4a9cfff2aabb2620c6d0c755396ab31b0c74f1883891b" +checksum = "cd6e0b51b82075b046792cdde2d4a2f6c9301f3deba44c26d30ab152060b9028" dependencies = [ "docify", - "frame-benchmarking 27.0.0", - "frame-election-provider-support 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-staking 25.0.0", - "sp-std 13.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-glutton" -version = "13.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26571660041ba596c43ee71992be20950e80d71f4199dfa8e57691a6757e20e9" +checksum = "8140a1a715bb76151ac58bb6617e7a506ec3a89f842c3f6904179cbf6940b987" dependencies = [ "blake2 0.10.6", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-grandpa" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8127d9f60e5b5e88014ee9423245503704fd188a972be2a02cb921a470db762" +checksum = "935e91fa8936381aff2b88d8a7dad38ac30a1c8d2310340d73ce1c07b5ae72ce" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-authorship 27.0.0", - "pallet-session 27.0.0", + "pallet-authorship 28.0.0", + "pallet-session 28.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 29.0.0", - "sp-consensus-grandpa 12.0.0", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-session 26.0.0", - "sp-staking 25.0.0", - "sp-std 13.0.0", + "sp-application-crypto 30.0.0", + "sp-consensus-grandpa 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-staking 26.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-identity" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b094c99305f6b61b6aead5b8fbfa44dafa002696dd5c663336a7eb3b68950c46" +checksum = "f3259bb87d50529027fa40267c3662dc80c683f253f121f391c032b019c88fcb" dependencies = [ "enumflags2", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "log", "parity-scale-codec", "scale-info", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-im-online" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "273b6bd0c0f098b935714a59f9487e64382e87de49a7cf6d6dd8cdeb63be0aed" +checksum = "e4be3f0165158828e4e77fae106a93bc1f48cc751755bdb012edb3ac0ef1d246" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-authorship 27.0.0", + "pallet-authorship 28.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 29.0.0", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-staking 25.0.0", - "sp-std 13.0.0", + "sp-application-crypto 30.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-indices" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81e5eeda9acaed9968ebe2221f8f18fcee7103b7f1f739ef6c20f73e5e3bf447" +checksum = "4ead239524e40e55d172f024ff6795998068a2ba1c0950e74c4db7f347cfa91e" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-keyring 30.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-keyring 31.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -7796,20 +7791,20 @@ dependencies = [ [[package]] name = "pallet-membership" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d662c6cdf6c2ead71ba1d2dbf1c0fef0fa9edbfdcc05377c2db056fe00a9f1da" +checksum = "1bc2dfdff5a7e5b21355b34245312ba2ea687444d9003960e7b876e1df518dab" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -7834,238 +7829,239 @@ dependencies = [ [[package]] name = "pallet-message-queue" -version = "30.0.0" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8290ebbf3fafdd90f7db6a249101c3bcc6428e089476d6ac237e2339da97401" +checksum = "ab6302efb264a65fd175f3082b72004df125f646a3c68b72fd08e657a468c0d6" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "environmental", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 22.0.0", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-weights 26.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-weights 27.0.0", ] [[package]] name = "pallet-mmr" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac6e31cef5ee5cc094a3ffbb7fc5a1424a5a4c877143541dbf51a29724d6d4cb" +checksum = "ba6565b91d1d585047648793feece7c2c70080b37e1f55ab3a4fb50b4c1bec86" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-io 29.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", "sp-mmr-primitives", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-multisig" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97de91a840d8fa4f2eb0dea5de7dd06221b39dd0955c3065ae4a10f63a0ba2c" +checksum = "14dbcdea9d3d7963aab57078a5bd6f3596186bfcf181d666db6ea2bfdc0184ec" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-nft-fractionalization" -version = "9.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e19791a4d82d7d23a0bcf2ce93b9317915d1979c9be817171655ce6e992c40f3" +checksum = "a948a03e2f5d2202a4bb8f7d701a2f29f557c50582bf6f8ccd7824863092012f" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-assets 28.0.0", + "pallet-assets 29.0.0", "pallet-nfts", "parity-scale-codec", "scale-info", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-nfts" -version = "21.0.0" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d848b63485ca0877e5a6e407cf67d54acb35591db455a6b3151fa105d0c7de" +checksum = "71368a2a22a266fac11104f41334fc82e2b94c3f26a70b13eca98cdecf2e106f" dependencies = [ "enumflags2", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-nfts-runtime-api" -version = "13.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0b15d938dd4d0d40f95721d9bc0f93e8bc2de01b91432cd8abce7f3348bf2d" +checksum = "e342996c6bcb1e6a3258b18b1aebf4d77d9c2dd011863393478329e7e8d67128" dependencies = [ "pallet-nfts", "parity-scale-codec", - "sp-api 25.0.0", - "sp-std 13.0.0", + "sp-api 26.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-nis" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aeb66fc313fa20704203134b93f2df3b9470a56021a3a2e31a28668cc29293b" +checksum = "86c541b2785051ebe1ae378be4b086055fbb8b13ee18fd949dfcf68dbd1c3325" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-arithmetic 22.0.0", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-nomination-pools" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdcf958a1c1f516adad578c697907bd03a9f4a94533100fb788bea7566b9745d" +checksum = "a4eca0c1399f1c48b3051b33d6624021ae2b3791139461427cfc99a1e64f0cb8" dependencies = [ - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-balances 27.0.0", + "pallet-balances 28.0.0", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-staking 25.0.0", - "sp-std 13.0.0", - "sp-tracing 15.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", ] [[package]] name = "pallet-nomination-pools-benchmarking" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb69a53b558f5382eba0bb875f03823ec105300a40738ae16b64eca748249a4c" +checksum = "d01847415cd33a92c65e8d13cb0041a32b2f2523c84d9d944287ae5c0d920c82" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-election-provider-support 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "pallet-bags-list", "pallet-nomination-pools", - "pallet-staking 27.0.0", + "pallet-staking 28.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 30.0.1", - "sp-runtime-interface 23.0.0", - "sp-staking 25.0.0", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-runtime-interface 24.0.0", + "sp-staking 26.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-nomination-pools-runtime-api" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a586ad28735a59b0a74a5aeee43820911f2a384b8f5321f5a4b8f8a026f3173" +checksum = "a64b17d862b833ca07a375646ecc80e164e5618c3aed4e5631816aa7288bf9b1" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", - "sp-api 25.0.0", - "sp-std 13.0.0", + "sp-api 26.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-offences" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77352f9a1afcde5d36395c9847e14c75d73c379e4f9ff7643f5d64741f20587" +checksum = "de7b17230f58ff6b1ec2a70b3c639c49f585841dacf63f30c78db6387a833e0b" dependencies = [ - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-balances 27.0.0", + "pallet-balances 28.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-runtime 30.0.1", - "sp-staking 25.0.0", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-offences-benchmarking" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb14e278769dba2a6ebcced6fd565015f09f7f9366add0ff10156744e551c8d3" +checksum = "060483993358293d041e5173635082c68c7783a800c0874e8df87c324232f0d1" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-election-provider-support 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-babe 27.0.0", - "pallet-balances 27.0.0", + "pallet-babe 28.0.0", + "pallet-balances 28.0.0", "pallet-grandpa", "pallet-im-online", "pallet-offences", - "pallet-session 27.0.0", - "pallet-staking 27.0.0", + "pallet-session 28.0.0", + "pallet-staking 28.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 30.0.1", - "sp-staking 25.0.0", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-preimage" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74e6ef7cdf7de30219789470d3c6d1606a10e34cad4891738033ae1a1fe92e30" +checksum = "ce688c68f117b1916a844579aa5a945d786059b119a1cc80ace370afd1e50da4" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -8086,92 +8082,92 @@ dependencies = [ [[package]] name = "pallet-proxy" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f1e89e043a6059fc19ada02364da3f20570f18b5eefdb6b20332e495218acb1" +checksum = "d3162924576a70509136eb4d8513497fb640a8b3ea753883fe29bd454c511485" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-ranked-collective" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f613ea43dcad3cb29f948e4889aace0a604495360cad32297a4b0c4591615dfb" +checksum = "86c6d11592a6ba9039bd3486dba15f0cb045889b2746f4619f5ec78188fdd151" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 22.0.0", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-recovery" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b5e90c670d6275b77ef12ecf794a799020815a03d5dfe1b98288772ff14b7f" +checksum = "b8649310b8f00e3b2983331cdb7173d1e66e5eeb3a3d21479e7a65386244f883" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-referenda" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c91a148d8fa3e11738ccc650fdfaf1f055b1283099b12b8dc430b39a7fb3988" +checksum = "6c6645c0c09ff8484c6c7ac1546d908202ed555b18169ea956955e4e2d77b210" dependencies = [ "assert_matches", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 22.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-arithmetic 23.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-salary" -version = "12.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86997dc4190bc440a8954c297ce03a14286cd57c1d778824d3686c7289b8b31c" +checksum = "1d6ad8b06d101931f335ea32f7c0e91bd1241c7b74d856cccf0b4fad8ab7177c" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 22.0.0", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -8194,21 +8190,21 @@ dependencies = [ [[package]] name = "pallet-scheduler" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6261d6f18bb2ed22451a87aac91f40e6d9753249827235fbc2aa1ccfe576c594" +checksum = "bc26a27b77170c18261af7be04a6569e3d0d58788255b9f283ccd089aac37887" dependencies = [ "docify", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-weights 26.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-weights 27.0.0", ] [[package]] @@ -8236,62 +8232,62 @@ dependencies = [ [[package]] name = "pallet-session" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d08a1fd9bcdead33c7d8b3a483241084575e19943c0f806194b96d731cf7a80b" +checksum = "e23ca2bfcffb5194de952050557bdd1fe9bce18b2bc81e8f8c01c8a3c3c3e5d8" dependencies = [ - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "impl-trait-for-tuples", "log", - "pallet-timestamp 26.0.0", + "pallet-timestamp 27.0.0", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-session 26.0.0", - "sp-staking 25.0.0", - "sp-state-machine 0.34.0", - "sp-std 13.0.0", - "sp-trie 28.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-staking 26.0.0", + "sp-state-machine 0.35.0", + "sp-std 14.0.0", + "sp-trie 29.0.0", ] [[package]] name = "pallet-session-benchmarking" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c8a1fe52d8f2fc79e4784f8c96f3e3bed6da5d343bedaa4237c5641563f8cc" +checksum = "bc660786028d46e03fb0a419d6a15df3fa556db7ce74efebf5a35037b32b4bc4" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", - "pallet-session 27.0.0", - "pallet-staking 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-session 28.0.0", + "pallet-staking 28.0.0", "parity-scale-codec", "rand 0.8.5", - "sp-runtime 30.0.1", - "sp-session 26.0.0", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-society" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dcf8c3ee3e104d3c069af9c261e3a84b57e74622ac98630f5925c1ad9ffaeb5" +checksum = "33c19c1f5a410c0b03dc1e3245ffc0269e6c9085e6f6a64ee023f7515b6f8d9b" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", - "sp-arithmetic 22.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-arithmetic 23.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -8320,35 +8316,35 @@ dependencies = [ [[package]] name = "pallet-staking" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721324165298bdc5f3dc8838a0e94d7ca1e471a702185dfbbafff84d89945e4e" +checksum = "8883bbca2bd6ee41f81382418372ce44fd771ac53591ce9be4018ea43f8c5eda" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-election-provider-support 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-authorship 27.0.0", - "pallet-session 27.0.0", + "pallet-authorship 28.0.0", + "pallet-session 28.0.0", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", "serde", - "sp-application-crypto 29.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-staking 25.0.0", - "sp-std 13.0.0", + "sp-application-crypto 30.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-staking-reward-curve" -version = "10.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8878e29f3d001ac1b1b714621f462e41a9d1fa8f385657f955e8a1ec0684d7" +checksum = "efca5a4a423427d2c83af5fe07ab648c16b91e3782c3cc23316fe0bd96b4c794" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 2.0.48", @@ -8366,58 +8362,58 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" -version = "18.0.0" +version = "19.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f5b0d52306a74510f730567ed9543b7e4eac9043fd519cdc94ba5b3850befa" +checksum = "e23336e4da87101633f95f9932946564c926ca7f87499654b38923b1579c605e" dependencies = [ "log", - "sp-arithmetic 22.0.0", + "sp-arithmetic 23.0.0", ] [[package]] name = "pallet-staking-runtime-api" -version = "13.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ce19dffced5c3455016a3f80f33f92aba903675d09c3c81a2919abc4cf78725" +checksum = "e27156b772eccb539cb1a1ea1b1b6e98d9c6589e18b913a30f67913fcf67fe7e" dependencies = [ "parity-scale-codec", - "sp-api 25.0.0", - "sp-staking 25.0.0", + "sp-api 26.0.0", + "sp-staking 26.0.0", ] [[package]] name = "pallet-state-trie-migration" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61bfbf58d5c787a4e25d1bb2ac29c9a86c31f9e82e129f624e5fd0e71bc8476e" +checksum = "2a48713905a318b0307e523fd3d3ca4b197ce74b2520203ded0d02e8a6c6bbd7" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-sudo" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1273597599b58a462454f8ce626b517183b7008a438dbbcc8989ea6980a10c6f" +checksum = "053dae9119d2d828af80e8ac98f497dc27155d6b5d42264dab8fae40f2314c41" dependencies = [ "docify", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -8443,43 +8439,43 @@ dependencies = [ [[package]] name = "pallet-timestamp" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e72c2e35a574dff24f58ff8a1d19cd997858600a1cf608c3a28477fb9bfed3" +checksum = "688b89bdd377609b592bd094b304ebca33f4767fe72935465e2fd7db0e797968" dependencies = [ "docify", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-inherents 25.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-storage 18.0.0", - "sp-timestamp 25.0.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-storage 19.0.0", + "sp-timestamp 26.0.0", ] [[package]] name = "pallet-tips" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2943d26f89e3bf74c95634ca31a8f62e743dc4dc9fbb7323fd4799e5cf722c10" +checksum = "facf64cab7f7a4762c57e5827597b2ca073755de4c9716444cf0847db34836df" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-treasury 26.0.0", + "pallet-treasury 27.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -8501,19 +8497,19 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fdf0cba2fe991bd14562b3e6504fa78eaf079e5b84ff6747edfe50049366aa1" +checksum = "18b4ca7a1af9b1f091900a354a96319c7614d7a32106ba86cb7f0b6f90239065" dependencies = [ - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -8531,15 +8527,15 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12eb6403383c384bb922392292d20dad26d95f44292f08d4444ef4a16f892671" +checksum = "acdfd7c882439b8198c99ece57b5bf785965545a6fa6d0bb7b56b264df1e437a" dependencies = [ - "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment 28.0.0", "parity-scale-codec", - "sp-api 25.0.0", - "sp-runtime 30.0.1", - "sp-weights 26.0.0", + "sp-api 26.0.0", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", ] [[package]] @@ -8564,38 +8560,38 @@ dependencies = [ [[package]] name = "pallet-treasury" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b173de5886d221ab2be524b29d2febb0f5f8f57a47bb0152a8a153a7ab573f1" +checksum = "a75cb7498228e1a150fa09ce64acafe7105ff39b75dae1c266ba58b7e3eb225e" dependencies = [ "docify", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "impl-trait-for-tuples", - "pallet-balances 27.0.0", + "pallet-balances 28.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-uniques" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04892f18f0efe31883af1f0998827a08c0b55eb65d8e3818c5a14965dc6ee27f" +checksum = "faf5e6bf708cc4d7efe8d66a8bb80da4875724edbcf1f624bd34b6937c0af452" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -8617,19 +8613,19 @@ dependencies = [ [[package]] name = "pallet-utility" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae212409d911bfd5c3cfe078afc71375431547cf0b24f222741c4dc6a6327683" +checksum = "384c1d740c019410f6b40586cc387726c2e3c417c0e3e6f7e4774cd46bc6c1d0" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -8650,34 +8646,34 @@ dependencies = [ [[package]] name = "pallet-vesting" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9efa19c0258d21cda531b7e81532ce6fb28c10f99f406c051852ed51f28dcefd" +checksum = "55f3ac517a10c14beee86a737b9ea5d592af9ab21cc5354474bc5f7019210358" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] name = "pallet-whitelist" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a9943df0e695f0b1719e9d559ab08fbded03a443e270e48b11bee56f209a2d7" +checksum = "de259e3329422bf3eb10b7e966f4b1c5caadcb29cd2d45af3a000cb2d184e60d" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-api 25.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-api 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -8704,26 +8700,26 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb9211a13bffe31ba0555c382b2e377213ccf7bfd800b115e222cb349142" +checksum = "cee3520e03ac679125e8dcaa00ce4afeeb106a9623e79b5acf970d72af7f5d02" dependencies = [ "bounded-collections", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", - "pallet-balances 27.0.0", + "pallet-balances 28.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", ] [[package]] @@ -8748,66 +8744,66 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fd71243da6203b60fd89640aa58c5cd9f03a9d2cb1c83d10d7b60360f1326f" +checksum = "9b2846fe0a9fe3e103dea417da9d41d4f59e32aa2f2ee79e9bf424d1c99e4ba1" dependencies = [ - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", ] [[package]] name = "pallet-xcm-bridge-hub" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ac06adbe492bda1c840e3a775b69d619391fe1a631cebd76010dc8394fed75f" +checksum = "99e448ca8caf6006a0c4d018dfa4a14e1728be87f944c598c443d74fb45bd68f" dependencies = [ "bp-messages", "bp-runtime", "bp-xcm-bridge-hub", "bridge-runtime-common", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", ] [[package]] name = "pallet-xcm-bridge-hub-router" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b36a67b5b0755e616fa0f5c0874ff5f83ba66eb0f7c4ec98166b95d6915c291" +checksum = "21f10cb76e759fbb672f132d72d9c4f75895ce3c9c9f50d68cd902bc88b043fc" dependencies = [ - "bp-xcm-bridge-hub-router 0.5.0", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "bp-xcm-bridge-hub-router 0.6.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", ] [[package]] @@ -8847,72 +8843,74 @@ dependencies = [ [[package]] name = "parachains-common" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95c5d3cd2e1516fad507855309237b6a6f8fe778819ce5583ce48970c524101a" +checksum = "ceadd4f51620023871ece5eeda64734acd17d84d49b45473d335e900a012fdde" dependencies = [ - "cumulus-primitives-core 0.6.0", - "cumulus-primitives-utility 0.6.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-utility 0.7.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "log", "num-traits", - "pallet-asset-tx-payment 27.0.0", - "pallet-assets 28.0.0", - "pallet-authorship 27.0.0", - "pallet-balances 27.0.0", - "pallet-collator-selection 8.0.0", - "pallet-message-queue 30.0.0", - "parity-scale-codec", - "polkadot-core-primitives 6.0.0", - "polkadot-primitives 6.0.0", - "rococo-runtime-constants 6.0.0", + "pallet-asset-tx-payment 28.0.0", + "pallet-assets 29.0.0", + "pallet-authorship 28.0.0", + "pallet-balances 28.0.0", + "pallet-collator-selection 9.0.0", + "pallet-message-queue 31.0.0", + "pallet-xcm 7.0.0", + "parity-scale-codec", + "polkadot-core-primitives 7.0.0", + "polkadot-primitives 7.0.0", + "rococo-runtime-constants 7.0.0", "scale-info", "smallvec", - "sp-consensus-aura 0.31.0", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "staging-parachain-info 0.6.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "substrate-wasm-builder 16.0.0", - "westend-runtime-constants 6.0.0", + "sp-consensus-aura 0.32.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "staging-parachain-info 0.7.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", + "substrate-wasm-builder 17.0.0", + "westend-runtime-constants 7.0.0", ] [[package]] name = "parachains-runtimes-test-utils" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34682787ee935f35aa45044637f9557c0b313d91453b41016724574e6193f493" +checksum = "8cbd399bef5df9f94bc75e29ae2fee5d0dca685888b45cc3dad1961cc1347eb6" dependencies = [ "assets-common", - "cumulus-pallet-parachain-system 0.6.0", - "cumulus-pallet-xcmp-queue 0.6.0", - "cumulus-primitives-core 0.6.0", - "cumulus-primitives-parachain-inherent 0.6.0", - "cumulus-test-relay-sproof-builder 0.6.0", - "frame-support 27.0.0", - "frame-system 27.0.0", - "pallet-assets 28.0.0", - "pallet-balances 27.0.0", - "pallet-collator-selection 8.0.0", - "pallet-session 27.0.0", - "pallet-xcm 6.0.0", - "parachains-common 6.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 5.0.0", - "sp-consensus-aura 0.31.0", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-tracing 15.0.0", - "staging-parachain-info 0.6.0", - "staging-xcm 6.0.0", - "staging-xcm-executor 6.0.0", - "substrate-wasm-builder 16.0.0", + "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-parachain-inherent 0.7.0", + "cumulus-test-relay-sproof-builder 0.7.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "pallet-assets 29.0.0", + "pallet-balances 28.0.0", + "pallet-collator-selection 9.0.0", + "pallet-session 28.0.0", + "pallet-xcm 7.0.0", + "parachains-common 7.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 6.0.0", + "sp-consensus-aura 0.32.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-tracing 16.0.0", + "staging-parachain-info 0.7.0", + "staging-xcm 7.0.0", + "staging-xcm-executor 7.0.0", + "substrate-wasm-builder 17.0.0", ] [[package]] @@ -8957,7 +8955,7 @@ version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate 2.0.1", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 1.0.109", @@ -9105,65 +9103,67 @@ dependencies = [ [[package]] name = "penpal-runtime" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b8a9b83c66de6015d3185bff94cd3a0d192f6f3421580165b1d6f74ef1b376" +checksum = "352fa44dc0bb228e1e0235e0af1308b7d6a8b907a8190d10a2a7c54b4a708455" dependencies = [ - "cumulus-pallet-aura-ext 0.6.0", - "cumulus-pallet-dmp-queue 0.6.0", - "cumulus-pallet-parachain-system 0.6.0", + "assets-common", + "cumulus-pallet-aura-ext 0.7.0", + "cumulus-pallet-dmp-queue 0.7.0", + "cumulus-pallet-parachain-system 0.7.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.6.0", - "cumulus-pallet-xcmp-queue 0.6.0", - "cumulus-primitives-core 0.6.0", - "cumulus-primitives-utility 0.6.0", - "frame-benchmarking 27.0.0", - "frame-executive 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", - "frame-system-benchmarking 27.0.0", - "frame-system-rpc-runtime-api 25.0.0", - "frame-try-runtime 0.33.0", + "cumulus-pallet-xcm 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-utility 0.7.0", + "frame-benchmarking 28.0.0", + "frame-executive 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-system-benchmarking 28.0.0", + "frame-system-rpc-runtime-api 26.0.0", + "frame-try-runtime 0.34.0", "hex-literal", "log", - "pallet-asset-tx-payment 27.0.0", - "pallet-assets 28.0.0", - "pallet-aura 26.0.0", - "pallet-authorship 27.0.0", - "pallet-balances 27.0.0", - "pallet-collator-selection 8.0.0", - "pallet-message-queue 30.0.0", - "pallet-session 27.0.0", + "pallet-asset-tx-payment 28.0.0", + "pallet-assets 29.0.0", + "pallet-aura 27.0.0", + "pallet-authorship 28.0.0", + "pallet-balances 28.0.0", + "pallet-collator-selection 9.0.0", + "pallet-message-queue 31.0.0", + "pallet-session 28.0.0", "pallet-sudo", - "pallet-timestamp 26.0.0", - "pallet-transaction-payment 27.0.0", - "pallet-transaction-payment-rpc-runtime-api 27.0.0", - "pallet-xcm 6.0.0", - "parachains-common 6.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 5.0.0", - "polkadot-primitives 6.0.0", - "polkadot-runtime-common 6.0.0", + "pallet-timestamp 27.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "pallet-xcm 7.0.0", + "parachains-common 7.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-common 7.0.0", "scale-info", "smallvec", - "sp-api 25.0.0", - "sp-block-builder 25.0.0", - "sp-consensus-aura 0.31.0", - "sp-core 27.0.0", - "sp-genesis-builder 0.6.0", - "sp-inherents 25.0.0", - "sp-offchain 25.0.0", - "sp-runtime 30.0.1", - "sp-session 26.0.0", - "sp-std 13.0.0", - "sp-storage 18.0.0", - "sp-transaction-pool 25.0.0", - "sp-version 28.0.0", - "staging-parachain-info 0.6.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", - "substrate-wasm-builder 16.0.0", + "snowbridge-rococo-common", + "sp-api 26.0.0", + "sp-block-builder 26.0.0", + "sp-consensus-aura 0.32.0", + "sp-core 28.0.0", + "sp-genesis-builder 0.7.0", + "sp-inherents 26.0.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", + "sp-transaction-pool 26.0.0", + "sp-version 29.0.0", + "staging-parachain-info 0.7.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", + "substrate-wasm-builder 17.0.0", ] [[package]] @@ -9257,15 +9257,15 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a185e7c80e3a42c681f02afe39c0d6a3f0eb5eef0b740afd592b3234aa462b1f" +checksum = "bda2b0f0c580c38f12445a4af10e0a23acf48381b2a95653e0be48ba787e10e5" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -9279,7 +9279,7 @@ dependencies = [ "mick-jaeger", "parity-scale-codec", "parking_lot 0.12.1", - "polkadot-node-primitives 4.0.0", + "polkadot-node-primitives", "polkadot-primitives 4.0.0", "sc-network 0.31.0", "sp-core 25.0.0", @@ -9287,25 +9287,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "polkadot-node-jaeger" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08be78960db8b91245b08813ad8261a3f9ae15d3dba194ff88b65a3971a16141" -dependencies = [ - "lazy_static", - "log", - "mick-jaeger", - "parity-scale-codec", - "parking_lot 0.12.1", - "polkadot-node-primitives 6.0.0", - "polkadot-primitives 6.0.0", - "sc-network 0.33.0", - "sp-core 27.0.0", - "thiserror", - "tokio", -] - [[package]] name = "polkadot-node-metrics" version = "4.0.0" @@ -9318,32 +9299,12 @@ dependencies = [ "log", "parity-scale-codec", "polkadot-primitives 4.0.0", - "prioritized-metered-channel", - "sc-cli 0.33.0", - "sc-service 0.32.0", - "sc-tracing 25.0.0", - "substrate-prometheus-endpoint", - "tracing-gum 4.0.0", -] - -[[package]] -name = "polkadot-node-metrics" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3aac00c8be626db8de37699d3a66f109ad5399ee03122a670b12eb6cf21359" -dependencies = [ - "bs58 0.5.0", - "futures", - "futures-timer", - "log", - "parity-scale-codec", - "polkadot-primitives 6.0.0", - "prioritized-metered-channel", - "sc-cli 0.35.0", - "sc-service 0.34.0", - "sc-tracing 27.0.0", - "substrate-prometheus-endpoint", - "tracing-gum 6.0.0", + "prioritized-metered-channel 0.5.1", + "sc-cli", + "sc-service", + "sc-tracing", + "substrate-prometheus-endpoint 0.16.0", + "tracing-gum", ] [[package]] @@ -9360,40 +9321,15 @@ dependencies = [ "futures", "hex", "parity-scale-codec", - "polkadot-node-jaeger 4.0.0", - "polkadot-node-primitives 4.0.0", + "polkadot-node-jaeger", + "polkadot-node-primitives", "polkadot-primitives 4.0.0", "rand 0.8.5", - "sc-authority-discovery 0.31.0", + "sc-authority-discovery", "sc-network 0.31.0", "strum", "thiserror", - "tracing-gum 4.0.0", -] - -[[package]] -name = "polkadot-node-network-protocol" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c53384d262771317827b8839d9b2eff81a9e3d66c815211dcf8312d20ab72c9" -dependencies = [ - "async-channel", - "async-trait", - "bitvec", - "derive_more", - "fatality", - "futures", - "hex", - "parity-scale-codec", - "polkadot-node-jaeger 6.0.0", - "polkadot-node-primitives 6.0.0", - "polkadot-primitives 6.0.0", - "rand 0.8.5", - "sc-authority-discovery 0.33.0", - "sc-network 0.33.0", - "strum", - "thiserror", - "tracing-gum 6.0.0", + "tracing-gum", ] [[package]] @@ -9407,7 +9343,7 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives 3.0.0", "polkadot-primitives 4.0.0", - "schnorrkel", + "schnorrkel 0.9.1", "serde", "sp-application-crypto 27.0.0", "sp-consensus-babe 0.29.0", @@ -9419,30 +9355,6 @@ dependencies = [ "zstd 0.12.4", ] -[[package]] -name = "polkadot-node-primitives" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90d056deb074d6a97be279fac580210ee847a1d09d9115ad094f83a86c2b6a91" -dependencies = [ - "bitvec", - "bounded-vec", - "futures", - "parity-scale-codec", - "polkadot-parachain-primitives 5.0.0", - "polkadot-primitives 6.0.0", - "schnorrkel", - "serde", - "sp-application-crypto 29.0.0", - "sp-consensus-babe 0.31.0", - "sp-core 27.0.0", - "sp-keystore 0.33.0", - "sp-maybe-compressed-blob 10.0.0", - "sp-runtime 30.0.1", - "thiserror", - "zstd 0.12.4", -] - [[package]] name = "polkadot-node-subsystem-types" version = "4.0.0" @@ -9453,11 +9365,11 @@ dependencies = [ "derive_more", "futures", "orchestra", - "polkadot-node-jaeger 4.0.0", - "polkadot-node-network-protocol 4.0.0", - "polkadot-node-primitives 4.0.0", + "polkadot-node-jaeger", + "polkadot-node-network-protocol", + "polkadot-node-primitives", "polkadot-primitives 4.0.0", - "polkadot-statement-table 4.0.0", + "polkadot-statement-table", "sc-client-api 25.0.0", "sc-network 0.31.0", "sc-transaction-pool-api 25.0.0", @@ -9465,36 +9377,7 @@ dependencies = [ "sp-api 23.0.0", "sp-authority-discovery 23.0.0", "sp-consensus-babe 0.29.0", - "substrate-prometheus-endpoint", - "thiserror", -] - -[[package]] -name = "polkadot-node-subsystem-types" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f64090deea91a0cefce3f378fa6a1e901b48852f3ed18ab622271f241fefe1d" -dependencies = [ - "async-trait", - "bitvec", - "derive_more", - "futures", - "orchestra", - "polkadot-node-jaeger 6.0.0", - "polkadot-node-network-protocol 6.0.0", - "polkadot-node-primitives 6.0.0", - "polkadot-primitives 6.0.0", - "polkadot-statement-table 6.0.0", - "sc-client-api 27.0.0", - "sc-network 0.33.0", - "sc-transaction-pool-api 27.0.0", - "smallvec", - "sp-api 25.0.0", - "sp-authority-discovery 25.0.0", - "sp-blockchain 27.0.0", - "sp-consensus-babe 0.31.0", - "sp-runtime 30.0.1", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.16.0", "thiserror", ] @@ -9509,39 +9392,16 @@ dependencies = [ "futures-timer", "orchestra", "parking_lot 0.12.1", - "polkadot-node-metrics 4.0.0", - "polkadot-node-network-protocol 4.0.0", - "polkadot-node-primitives 4.0.0", - "polkadot-node-subsystem-types 4.0.0", + "polkadot-node-metrics", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem-types", "polkadot-primitives 4.0.0", "sc-client-api 25.0.0", "sp-api 23.0.0", "sp-core 25.0.0", "tikv-jemalloc-ctl", - "tracing-gum 4.0.0", -] - -[[package]] -name = "polkadot-overseer" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830258b62d41bdf9cee96bd8377be0697639d766f527af6d8bf507f5ee2db59c" -dependencies = [ - "async-trait", - "futures", - "futures-timer", - "orchestra", - "parking_lot 0.12.1", - "polkadot-node-metrics 6.0.0", - "polkadot-node-network-protocol 6.0.0", - "polkadot-node-primitives 6.0.0", - "polkadot-node-subsystem-types 6.0.0", - "polkadot-primitives 6.0.0", - "sc-client-api 27.0.0", - "sp-api 25.0.0", - "sp-core 27.0.0", - "tikv-jemalloc-ctl", - "tracing-gum 6.0.0", + "tracing-gum", ] [[package]] @@ -9564,20 +9424,20 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b0b8521215ec97799c75a7531c2ac0627fa2b8916fde2bdc6c79bf05b93645" +checksum = "9b37c55955147479e7b2f3c2e5385db4846ac3e3b997cd4a4ad52344524b5447" dependencies = [ "bounded-collections", "derive_more", "parity-scale-codec", - "polkadot-core-primitives 6.0.0", + "polkadot-core-primitives 7.0.0", "scale-info", "serde", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-weights 26.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-weights 27.0.0", ] [[package]] @@ -9609,29 +9469,29 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6b60b3e37d83b42f483b2ec9a2a195d83dc7fbfaa57ba1ca9142eec6bf276f" +checksum = "8aefd230a654f5b2aee18ebbd9c081835def0e1898ee6c018501dd77c18f5929" dependencies = [ "bitvec", "hex-literal", "parity-scale-codec", - "polkadot-core-primitives 6.0.0", - "polkadot-parachain-primitives 5.0.0", + "polkadot-core-primitives 7.0.0", + "polkadot-parachain-primitives 6.0.0", "scale-info", "serde", - "sp-api 25.0.0", - "sp-application-crypto 29.0.0", - "sp-arithmetic 22.0.0", - "sp-authority-discovery 25.0.0", - "sp-consensus-slots 0.31.0", - "sp-core 27.0.0", - "sp-inherents 25.0.0", - "sp-io 29.0.0", - "sp-keystore 0.33.0", - "sp-runtime 30.0.1", - "sp-staking 25.0.0", - "sp-std 13.0.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-arithmetic 23.0.0", + "sp-authority-discovery 26.0.0", + "sp-consensus-slots 0.32.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", + "sp-std 14.0.0", ] [[package]] @@ -9640,40 +9500,40 @@ version = "1.0.0" dependencies = [ "binary-merkle-tree", "bitvec", - "frame-benchmarking 27.0.0", - "frame-election-provider-support 27.0.0", - "frame-executive 27.0.0", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-executive 28.0.0", "frame-remote-externalities", - "frame-support 27.0.0", - "frame-system 27.0.0", - "frame-system-benchmarking 27.0.0", - "frame-system-rpc-runtime-api 25.0.0", - "frame-try-runtime 0.33.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-system-benchmarking 28.0.0", + "frame-system-rpc-runtime-api 26.0.0", + "frame-try-runtime 0.34.0", "hex-literal", "log", - "pallet-asset-rate 6.0.0", - "pallet-authority-discovery 27.0.0", - "pallet-authorship 27.0.0", - "pallet-babe 27.0.0", + "pallet-asset-rate 7.0.0", + "pallet-authority-discovery 28.0.0", + "pallet-authorship 28.0.0", + "pallet-babe 28.0.0", "pallet-bags-list", - "pallet-balances 27.0.0", + "pallet-balances 28.0.0", "pallet-beefy", "pallet-beefy-mmr", "pallet-bounties", "pallet-child-bounties", - "pallet-collective 27.0.0", + "pallet-collective 28.0.0", "pallet-conviction-voting", "pallet-democracy", - "pallet-election-provider-multi-phase 26.0.0", - "pallet-election-provider-support-benchmarking 26.0.0", + "pallet-election-provider-multi-phase 27.0.0", + "pallet-election-provider-support-benchmarking 27.0.0", "pallet-elections-phragmen", - "pallet-fast-unstake 26.0.0", + "pallet-fast-unstake 27.0.0", "pallet-grandpa", "pallet-identity", "pallet-im-online", "pallet-indices", - "pallet-membership 27.0.0", - "pallet-message-queue 30.0.0", + "pallet-membership 28.0.0", + "pallet-message-queue 31.0.0", "pallet-mmr", "pallet-multisig", "pallet-nomination-pools", @@ -9682,66 +9542,66 @@ dependencies = [ "pallet-offences", "pallet-offences-benchmarking", "pallet-preimage", - "pallet-proxy 27.0.0", + "pallet-proxy 28.0.0", "pallet-referenda", - "pallet-scheduler 28.0.0", - "pallet-session 27.0.0", + "pallet-scheduler 29.0.0", + "pallet-session 28.0.0", "pallet-session-benchmarking", - "pallet-staking 27.0.0", + "pallet-staking 28.0.0", "pallet-staking-reward-curve", - "pallet-staking-reward-fn 18.0.0", + "pallet-staking-reward-fn 19.0.0", "pallet-staking-runtime-api", - "pallet-timestamp 26.0.0", + "pallet-timestamp 27.0.0", "pallet-tips", - "pallet-transaction-payment 27.0.0", - "pallet-transaction-payment-rpc-runtime-api 27.0.0", - "pallet-treasury 26.0.0", - "pallet-utility 27.0.0", - "pallet-vesting 27.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "pallet-treasury 27.0.0", + "pallet-utility 28.0.0", + "pallet-vesting 28.0.0", "pallet-whitelist", - "pallet-xcm 6.0.0", - "pallet-xcm-benchmarks 6.0.0", + "pallet-xcm 7.0.0", + "pallet-xcm-benchmarks 7.0.0", "parity-scale-codec", - "polkadot-primitives 6.0.0", - "polkadot-runtime-common 6.0.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-common 7.0.0", "polkadot-runtime-constants", - "polkadot-runtime-parachains 6.0.0", + "polkadot-runtime-parachains 7.0.0", "rustc-hex", "scale-info", "separator", "serde", "serde_derive", "serde_json", - "sp-api 25.0.0", - "sp-application-crypto 29.0.0", - "sp-arithmetic 22.0.0", - "sp-authority-discovery 25.0.0", - "sp-block-builder 25.0.0", - "sp-consensus-babe 0.31.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-arithmetic 23.0.0", + "sp-authority-discovery 26.0.0", + "sp-block-builder 26.0.0", + "sp-consensus-babe 0.32.0", "sp-consensus-beefy", - "sp-core 27.0.0", - "sp-debug-derive 13.0.0", - "sp-genesis-builder 0.6.0", - "sp-inherents 25.0.0", - "sp-io 29.0.0", - "sp-keyring 30.0.0", + "sp-core 28.0.0", + "sp-debug-derive 14.0.0", + "sp-genesis-builder 0.7.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-keyring 31.0.0", "sp-mmr-primitives", - "sp-npos-elections 25.0.0", - "sp-offchain 25.0.0", - "sp-runtime 30.0.1", - "sp-session 26.0.0", - "sp-staking 25.0.0", - "sp-std 13.0.0", - "sp-storage 18.0.0", - "sp-tracing 15.0.0", - "sp-transaction-pool 25.0.0", - "sp-trie 28.0.0", - "sp-version 28.0.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "sp-npos-elections 26.0.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-staking 26.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", + "sp-tracing 16.0.0", + "sp-transaction-pool 26.0.0", + "sp-trie 29.0.0", + "sp-version 29.0.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", "static_assertions", - "substrate-wasm-builder 16.0.0", + "substrate-wasm-builder 17.0.0", "tiny-keccak", "tokio", ] @@ -9799,53 +9659,54 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96287e584d1f6a25a9b435d1334287d13da294d85d339ededc7715ce6d5be686" +checksum = "4641a850b7415a42e56bd262aba243ed77a9280cb2b825a427c425bdc8961d70" dependencies = [ "bitvec", - "frame-benchmarking 27.0.0", - "frame-election-provider-support 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "impl-trait-for-tuples", "libsecp256k1", "log", - "pallet-asset-rate 6.0.0", - "pallet-authorship 27.0.0", - "pallet-babe 27.0.0", - "pallet-balances 27.0.0", - "pallet-election-provider-multi-phase 26.0.0", - "pallet-fast-unstake 26.0.0", + "pallet-asset-rate 7.0.0", + "pallet-authorship 28.0.0", + "pallet-babe 28.0.0", + "pallet-balances 28.0.0", + "pallet-broker", + "pallet-election-provider-multi-phase 27.0.0", + "pallet-fast-unstake 27.0.0", "pallet-identity", - "pallet-session 27.0.0", - "pallet-staking 27.0.0", - "pallet-staking-reward-fn 18.0.0", - "pallet-timestamp 26.0.0", - "pallet-transaction-payment 27.0.0", - "pallet-treasury 26.0.0", - "pallet-vesting 27.0.0", - "pallet-xcm-benchmarks 6.0.0", - "parity-scale-codec", - "polkadot-primitives 6.0.0", - "polkadot-runtime-parachains 6.0.0", + "pallet-session 28.0.0", + "pallet-staking 28.0.0", + "pallet-staking-reward-fn 19.0.0", + "pallet-timestamp 27.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-treasury 27.0.0", + "pallet-vesting 28.0.0", + "pallet-xcm-benchmarks 7.0.0", + "parity-scale-codec", + "polkadot-primitives 7.0.0", + "polkadot-runtime-parachains 7.0.0", "rustc-hex", "scale-info", "serde", "serde_derive", - "slot-range-helper 6.0.0", - "sp-api 25.0.0", - "sp-core 27.0.0", - "sp-inherents 25.0.0", - "sp-io 29.0.0", - "sp-npos-elections 25.0.0", - "sp-runtime 30.0.1", - "sp-session 26.0.0", - "sp-staking 25.0.0", - "sp-std 13.0.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "slot-range-helper 7.0.0", + "sp-api 26.0.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-npos-elections 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-staking 26.0.0", + "sp-std 14.0.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", "static_assertions", ] @@ -9853,14 +9714,14 @@ dependencies = [ name = "polkadot-runtime-constants" version = "1.0.0" dependencies = [ - "frame-support 27.0.0", - "polkadot-primitives 6.0.0", - "polkadot-runtime-common 6.0.0", + "frame-support 28.0.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-common 7.0.0", "smallvec", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-weights 26.0.0", - "staging-xcm 6.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", + "staging-xcm 7.0.0", ] [[package]] @@ -9879,16 +9740,16 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416d2a4a0c3792669984484d5fe831f20dea9ab734b00befbb0250f992144be6" +checksum = "4ac3c6ee03f38556274b26049c51c5c7095abfd4ebfd11cd492918a4344f2851" dependencies = [ "bs58 0.5.0", - "frame-benchmarking 27.0.0", + "frame-benchmarking 28.0.0", "parity-scale-codec", - "polkadot-primitives 6.0.0", - "sp-std 13.0.0", - "sp-tracing 15.0.0", + "polkadot-primitives 7.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", ] [[package]] @@ -9941,50 +9802,52 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c00498f856712916e54ef1c214fa8fa6cab193497b0ab99f2a79eff6525596" +checksum = "6d253ef2952097398d98ed12729e47f9328bcd1baa92c3acc1524a4baca7d1ac" dependencies = [ "bitflags 1.3.2", "bitvec", "derive_more", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "impl-trait-for-tuples", "log", - "pallet-authority-discovery 27.0.0", - "pallet-authorship 27.0.0", - "pallet-babe 27.0.0", - "pallet-balances 27.0.0", - "pallet-message-queue 30.0.0", - "pallet-session 27.0.0", - "pallet-staking 27.0.0", - "pallet-timestamp 26.0.0", - "pallet-vesting 27.0.0", - "parity-scale-codec", - "polkadot-core-primitives 6.0.0", - "polkadot-parachain-primitives 5.0.0", - "polkadot-primitives 6.0.0", - "polkadot-runtime-metrics 6.0.0", + "pallet-authority-discovery 28.0.0", + "pallet-authorship 28.0.0", + "pallet-babe 28.0.0", + "pallet-balances 28.0.0", + "pallet-broker", + "pallet-message-queue 31.0.0", + "pallet-session 28.0.0", + "pallet-staking 28.0.0", + "pallet-timestamp 27.0.0", + "pallet-vesting 28.0.0", + "parity-scale-codec", + "polkadot-core-primitives 7.0.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-metrics 7.0.0", "rand 0.8.5", "rand_chacha 0.3.1", "rustc-hex", "scale-info", "serde", - "sp-api 25.0.0", - "sp-application-crypto 29.0.0", - "sp-core 27.0.0", - "sp-inherents 25.0.0", - "sp-io 29.0.0", - "sp-keystore 0.33.0", - "sp-runtime 30.0.1", - "sp-session 26.0.0", - "sp-staking 25.0.0", - "sp-std 13.0.0", - "sp-tracing 15.0.0", - "staging-xcm 6.0.0", - "staging-xcm-executor 6.0.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-staking 26.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", + "staging-xcm 7.0.0", + "staging-xcm-executor 7.0.0", "static_assertions", ] @@ -10000,21 +9863,10 @@ dependencies = [ ] [[package]] -name = "polkadot-statement-table" -version = "6.0.0" +name = "polling" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e90105dd6e7a739ba7a91d26156daa143b99c058dd4df101664ea77ced14faf" -dependencies = [ - "parity-scale-codec", - "polkadot-primitives 6.0.0", - "sp-core 27.0.0", -] - -[[package]] -name = "polling" -version = "3.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" +checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" dependencies = [ "cfg-if", "concurrent-queue", @@ -10107,9 +9959,9 @@ 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.48", @@ -10146,6 +9998,22 @@ dependencies = [ "tracing", ] +[[package]] +name = "prioritized-metered-channel" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a172e6cc603231f2cf004232eabcecccc0da53ba576ab286ef7baa0cfc7927ad" +dependencies = [ + "coarsetime", + "crossbeam-queue", + "derive_more", + "futures", + "futures-timer", + "nanorand", + "thiserror", + "tracing", +] + [[package]] name = "proc-macro-crate" version = "1.3.1" @@ -10158,14 +10026,22 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" dependencies = [ - "toml_datetime", "toml_edit 0.20.2", ] +[[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.0", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -10664,15 +10540,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "ripemd" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" -dependencies = [ - "digest 0.10.7", -] - [[package]] name = "rlp" version = "0.5.2" @@ -10711,18 +10578,19 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96315fe3c89019f13bf11c438bafd4bb96b510945cea5342267c4498633b4387" +checksum = "3b5b507493a19b5061eb2860c394847261216c7ea7f8f62ba2cb02e55c27d611" dependencies = [ - "frame-support 27.0.0", - "polkadot-primitives 6.0.0", - "polkadot-runtime-common 6.0.0", + "frame-support 28.0.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-common 7.0.0", "smallvec", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-weights 26.0.0", - "staging-xcm 6.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", ] [[package]] @@ -10952,13 +10820,13 @@ dependencies = [ [[package]] name = "sc-allocator" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79ad8791d398db62202f541849b3260ad5c9cf20a1982e3f4ad92f9a629ade76" +checksum = "43b05714bc70605d5f8983612d1643d875cd4782ef53a8720907a0eb75070cba" dependencies = [ "log", - "sp-core 27.0.0", - "sp-wasm-interface 19.0.0", + "sp-core 28.0.0", + "sp-wasm-interface 20.0.0", "thiserror", ] @@ -10974,7 +10842,7 @@ dependencies = [ "ip_network", "libp2p", "log", - "multihash 0.17.0", + "multihash", "parity-scale-codec", "prost", "prost-build", @@ -10987,37 +10855,7 @@ dependencies = [ "sp-core 25.0.0", "sp-keystore 0.31.0", "sp-runtime 28.0.0", - "substrate-prometheus-endpoint", - "thiserror", -] - -[[package]] -name = "sc-authority-discovery" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e563c043124ee28a6723ac320a1aba80283932e8ba34faa7ef427331961780" -dependencies = [ - "async-trait", - "futures", - "futures-timer", - "ip_network", - "libp2p", - "log", - "multihash 0.18.1", - "multihash-codetable", - "parity-scale-codec", - "prost", - "prost-build", - "rand 0.8.5", - "sc-client-api 27.0.0", - "sc-network 0.33.0", - "sp-api 25.0.0", - "sp-authority-discovery 25.0.0", - "sp-blockchain 27.0.0", - "sp-core 27.0.0", - "sp-keystore 0.33.0", - "sp-runtime 30.0.1", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.16.0", "thiserror", ] @@ -11039,18 +10877,18 @@ dependencies = [ [[package]] name = "sc-block-builder" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b900efcf276c61da505e20ac275b2bae8f03b8ceba20dc7e276edec12ca49355" +checksum = "656b85de8aad8dd758f2e5f250f300e4711f294f238c9299064fbd624cb263f7" dependencies = [ "parity-scale-codec", - "sp-api 25.0.0", - "sp-block-builder 25.0.0", - "sp-blockchain 27.0.0", - "sp-core 27.0.0", - "sp-inherents 25.0.0", - "sp-runtime 30.0.1", - "sp-trie 28.0.0", + "sp-api 26.0.0", + "sp-block-builder 26.0.0", + "sp-blockchain 28.0.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-trie 29.0.0", ] [[package]] @@ -11060,7 +10898,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec7e711ea9870d3fb8e2a3ea5b601a9e20c63d0d2f457f40146407721e246a77" dependencies = [ "memmap2", - "sc-chain-spec-derive", + "sc-chain-spec-derive 10.0.0", "sc-client-api 25.0.0", "sc-executor 0.29.0", "sc-network 0.31.0", @@ -11075,28 +10913,28 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31471216bdcef2195151d1e3324ec6fd09a6d87b306a15fae4590c0675f0d4c1" +checksum = "f7f6a6926973e084fe9b23ffee9784cd41d84ea0627c605891542661bd9ff958" dependencies = [ "array-bytes 6.2.2", "docify", "log", "memmap2", "parity-scale-codec", - "sc-chain-spec-derive", - "sc-client-api 27.0.0", - "sc-executor 0.31.0", - "sc-network 0.33.0", - "sc-telemetry 14.0.0", + "sc-chain-spec-derive 11.0.0", + "sc-client-api 28.0.0", + "sc-executor 0.32.0", + "sc-network 0.34.0", + "sc-telemetry 15.0.0", "serde", "serde_json", - "sp-blockchain 27.0.0", - "sp-core 27.0.0", - "sp-genesis-builder 0.6.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-state-machine 0.34.0", + "sp-blockchain 28.0.0", + "sp-core 28.0.0", + "sp-genesis-builder 0.7.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", ] [[package]] @@ -11111,6 +10949,18 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "sc-chain-spec-derive" +version = "11.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2e80fbdaea194762d4b4b0eec389037c25ad102676203b42d684774ae3019b8" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "sc-cli" version = "0.33.0" @@ -11120,7 +10970,7 @@ dependencies = [ "array-bytes 6.2.2", "chrono", "clap", - "fdlimit 0.2.1", + "fdlimit", "futures", "libp2p-identity", "log", @@ -11130,13 +10980,13 @@ dependencies = [ "regex", "rpassword", "sc-client-api 25.0.0", - "sc-client-db 0.32.0", - "sc-keystore 22.0.0", + "sc-client-db", + "sc-keystore", "sc-mixnet 0.1.0", "sc-network 0.31.0", - "sc-service 0.32.0", + "sc-service", "sc-telemetry 12.0.0", - "sc-tracing 25.0.0", + "sc-tracing", "sc-utils 11.0.0", "serde", "serde_json", @@ -11144,7 +10994,7 @@ dependencies = [ "sp-core 25.0.0", "sp-keyring 28.0.0", "sp-keystore 0.31.0", - "sp-panic-handler", + "sp-panic-handler 12.0.0", "sp-runtime 28.0.0", "sp-version 26.0.0", "thiserror", @@ -11152,48 +11002,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "sc-cli" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e59c23e005876d2eca1e90ae2deaf85b4c78861f21b9fc3caf6535ca19f6ad9" -dependencies = [ - "array-bytes 6.2.2", - "bip39", - "chrono", - "clap", - "fdlimit 0.3.0", - "futures", - "itertools 0.10.5", - "libp2p-identity", - "log", - "names", - "parity-scale-codec", - "rand 0.8.5", - "regex", - "rpassword", - "sc-client-api 27.0.0", - "sc-client-db 0.34.0", - "sc-keystore 24.0.0", - "sc-mixnet 0.3.0", - "sc-network 0.33.0", - "sc-service 0.34.0", - "sc-telemetry 14.0.0", - "sc-tracing 27.0.0", - "sc-utils 13.0.0", - "serde", - "serde_json", - "sp-blockchain 27.0.0", - "sp-core 27.0.0", - "sp-keyring 30.0.0", - "sp-keystore 0.33.0", - "sp-panic-handler", - "sp-runtime 30.0.1", - "sp-version 28.0.0", - "thiserror", - "tokio", -] - [[package]] name = "sc-client-api" version = "25.0.0" @@ -11212,42 +11020,42 @@ dependencies = [ "sp-blockchain 25.0.0", "sp-consensus 0.29.0", "sp-core 25.0.0", - "sp-database", + "sp-database 9.0.0", "sp-externalities 0.23.0", "sp-runtime 28.0.0", "sp-state-machine 0.32.0", "sp-statement-store 7.0.0", "sp-storage 17.0.0", "sp-trie 26.0.0", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.16.0", ] [[package]] name = "sc-client-api" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9eb785ab5be9a6cacc3cebf137539d66cd9fb05d5472d4aa4aa83f65004c799" +checksum = "af05565a0f6467ebe0b430f3a44524fecee9e4aff621647ea5eab8833f775b6f" dependencies = [ "fnv", "futures", "log", "parity-scale-codec", "parking_lot 0.12.1", - "sc-executor 0.31.0", - "sc-transaction-pool-api 27.0.0", - "sc-utils 13.0.0", - "sp-api 25.0.0", - "sp-blockchain 27.0.0", - "sp-consensus 0.31.0", - "sp-core 27.0.0", - "sp-database", - "sp-externalities 0.24.0", - "sp-runtime 30.0.1", - "sp-state-machine 0.34.0", - "sp-statement-store 9.0.0", - "sp-storage 18.0.0", - "sp-trie 28.0.0", - "substrate-prometheus-endpoint", + "sc-executor 0.32.0", + "sc-transaction-pool-api 28.0.0", + "sc-utils 14.0.0", + "sp-api 26.0.0", + "sp-blockchain 28.0.0", + "sp-consensus 0.32.0", + "sp-core 28.0.0", + "sp-database 10.0.0", + "sp-externalities 0.25.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-statement-store 10.0.0", + "sp-storage 19.0.0", + "sp-trie 29.0.0", + "substrate-prometheus-endpoint 0.17.0", ] [[package]] @@ -11266,44 +11074,17 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api 25.0.0", - "sc-state-db 0.27.0", + "sc-state-db", "schnellru", "sp-arithmetic 20.0.0", "sp-blockchain 25.0.0", "sp-core 25.0.0", - "sp-database", + "sp-database 9.0.0", "sp-runtime 28.0.0", "sp-state-machine 0.32.0", "sp-trie 26.0.0", ] -[[package]] -name = "sc-client-db" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2ca0a8a26eeb09988245f44c78552e0dc5b2f3945d1495ee711bbbf71bc2d2a" -dependencies = [ - "hash-db", - "kvdb", - "kvdb-memorydb", - "kvdb-rocksdb", - "linked-hash-map", - "log", - "parity-db", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-client-api 27.0.0", - "sc-state-db 0.29.0", - "schnellru", - "sp-arithmetic 22.0.0", - "sp-blockchain 27.0.0", - "sp-core 27.0.0", - "sp-database", - "sp-runtime 30.0.1", - "sp-state-machine 0.34.0", - "sp-trie 28.0.0", -] - [[package]] name = "sc-consensus" version = "0.30.0" @@ -11326,15 +11107,15 @@ dependencies = [ "sp-core 25.0.0", "sp-runtime 28.0.0", "sp-state-machine 0.32.0", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.16.0", "thiserror", ] [[package]] name = "sc-consensus" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe8204108702ac2f35ed3a541e00aae4656c7591cad6fff33bcc6e7774fc9607" +checksum = "3b0409758bb01f2e975b01c7cb2203aa27746e9796a483b18c57123e6e78fae5" dependencies = [ "async-trait", "futures", @@ -11343,59 +11124,59 @@ dependencies = [ "log", "mockall", "parking_lot 0.12.1", - "sc-client-api 27.0.0", - "sc-utils 13.0.0", - "serde", - "sp-api 25.0.0", - "sp-blockchain 27.0.0", - "sp-consensus 0.31.0", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-state-machine 0.34.0", - "substrate-prometheus-endpoint", + "sc-client-api 28.0.0", + "sc-utils 14.0.0", + "serde", + "sp-api 26.0.0", + "sp-blockchain 28.0.0", + "sp-consensus 0.32.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "substrate-prometheus-endpoint 0.17.0", "thiserror", ] [[package]] name = "sc-consensus-grandpa" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "923ca35a57239e8d25f458d8edd075e1c051d64e388963b497fd5d8ab005f2c7" +checksum = "a824457a3384e7bc19d7ee587dffa5b646deb81a2351be0dd075c2110a3d677a" dependencies = [ "ahash 0.8.7", "array-bytes 6.2.2", "async-trait", "dyn-clone", "finality-grandpa", - "fork-tree", + "fork-tree 12.0.0", "futures", "futures-timer", "log", "parity-scale-codec", "parking_lot 0.12.1", "rand 0.8.5", - "sc-block-builder 0.32.0", - "sc-chain-spec 26.0.0", - "sc-client-api 27.0.0", - "sc-consensus 0.32.0", - "sc-network 0.33.0", - "sc-network-common 0.32.0", + "sc-block-builder 0.33.0", + "sc-chain-spec 27.0.0", + "sc-client-api 28.0.0", + "sc-consensus 0.33.0", + "sc-network 0.34.0", + "sc-network-common 0.33.0", "sc-network-gossip", - "sc-network-sync 0.32.0", - "sc-telemetry 14.0.0", - "sc-transaction-pool-api 27.0.0", - "sc-utils 13.0.0", + "sc-network-sync 0.33.0", + "sc-telemetry 15.0.0", + "sc-transaction-pool-api 28.0.0", + "sc-utils 14.0.0", "serde_json", - "sp-api 25.0.0", - "sp-application-crypto 29.0.0", - "sp-arithmetic 22.0.0", - "sp-blockchain 27.0.0", - "sp-consensus 0.31.0", - "sp-consensus-grandpa 12.0.0", - "sp-core 27.0.0", - "sp-keystore 0.33.0", - "sp-runtime 30.0.1", - "substrate-prometheus-endpoint", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-arithmetic 23.0.0", + "sp-blockchain 28.0.0", + "sp-consensus 0.32.0", + "sp-consensus-grandpa 13.0.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", + "substrate-prometheus-endpoint 0.17.0", "thiserror", ] @@ -11414,7 +11195,7 @@ dependencies = [ "sp-core 25.0.0", "sp-externalities 0.23.0", "sp-io 27.0.0", - "sp-panic-handler", + "sp-panic-handler 12.0.0", "sp-runtime-interface 21.0.0", "sp-trie 26.0.0", "sp-version 26.0.0", @@ -11424,24 +11205,24 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eea713755b62067b9c223cef0525b6a88336ca6658fe0ed38340d8cad4963af5" +checksum = "3129f8af1f8aa5b05829ffec942feff61163054a536704ba48fdcc2276f6042a" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "sc-executor-common 0.28.0", - "sc-executor-wasmtime 0.28.0", + "sc-executor-common 0.29.0", + "sc-executor-wasmtime 0.29.0", "schnellru", - "sp-api 25.0.0", - "sp-core 27.0.0", - "sp-externalities 0.24.0", - "sp-io 29.0.0", - "sp-panic-handler", - "sp-runtime-interface 23.0.0", - "sp-trie 28.0.0", - "sp-version 28.0.0", - "sp-wasm-interface 19.0.0", + "sp-api 26.0.0", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-io 30.0.0", + "sp-panic-handler 13.0.0", + "sp-runtime-interface 24.0.0", + "sp-trie 29.0.0", + "sp-version 29.0.0", + "sp-wasm-interface 20.0.0", "tracing", ] @@ -11460,13 +11241,13 @@ dependencies = [ [[package]] name = "sc-executor-common" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40d0fdbc88edc041b64891c7162e02f062baa699212395db0615bd9bdcda0dd7" +checksum = "0285a4a14c0d2c1d04380ff83cddd79181ded510c605d36804cb9c6eb3bbf2ae" dependencies = [ - "sc-allocator 22.0.0", - "sp-maybe-compressed-blob 10.0.0", - "sp-wasm-interface 19.0.0", + "sc-allocator 23.0.0", + "sp-maybe-compressed-blob 11.0.0", + "sp-wasm-interface 20.0.0", "thiserror", "wasm-instrument", ] @@ -11492,9 +11273,9 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13a935fc2a7e8e7a7fb4fe7bc15d5be9b52a101f921867703c81a7d02a821f86" +checksum = "5c2ba6ea0e68400caf4847fbcfca6123952b05a817e06f024e9cbafa665ac9d8" dependencies = [ "anyhow", "cfg-if", @@ -11502,10 +11283,10 @@ dependencies = [ "log", "parking_lot 0.12.1", "rustix 0.36.17", - "sc-allocator 22.0.0", - "sc-executor-common 0.28.0", - "sp-runtime-interface 23.0.0", - "sp-wasm-interface 19.0.0", + "sc-allocator 23.0.0", + "sc-executor-common 0.29.0", + "sp-runtime-interface 24.0.0", + "sp-wasm-interface 20.0.0", "wasmtime", ] @@ -11526,24 +11307,6 @@ dependencies = [ "sp-runtime 28.0.0", ] -[[package]] -name = "sc-informant" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fd39dfdb19ade5fd05d0646adc4cbadc3c89fbe270dcc7d33b7d496366cd784" -dependencies = [ - "ansi_term", - "futures", - "futures-timer", - "log", - "sc-client-api 27.0.0", - "sc-network 0.33.0", - "sc-network-common 0.32.0", - "sc-network-sync 0.32.0", - "sp-blockchain 27.0.0", - "sp-runtime 30.0.1", -] - [[package]] name = "sc-keystore" version = "22.0.0" @@ -11559,21 +11322,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sc-keystore" -version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efa306595e3491e73d9b8291c2e3a6c8ea06fe05d1bacd29365fcbd2e9430ad" -dependencies = [ - "array-bytes 6.2.2", - "parking_lot 0.12.1", - "serde_json", - "sp-application-crypto 29.0.0", - "sp-core 27.0.0", - "sp-keystore 0.33.0", - "thiserror", -] - [[package]] name = "sc-mixnet" version = "0.1.0" @@ -11605,9 +11353,9 @@ dependencies = [ [[package]] name = "sc-mixnet" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df018e1c19855361b958d205cf075b8093f394a67cd337eb4413989d8766abe4" +checksum = "4cac7d7145c712c4a8b184b3979fe1a154c200ebb1b9f11f1e4e39db97a389f8" dependencies = [ "array-bytes 4.2.0", "arrayvec 0.7.4", @@ -11621,15 +11369,15 @@ dependencies = [ "multiaddr", "parity-scale-codec", "parking_lot 0.12.1", - "sc-client-api 27.0.0", - "sc-network 0.33.0", - "sc-transaction-pool-api 27.0.0", - "sp-api 25.0.0", - "sp-consensus 0.31.0", - "sp-core 27.0.0", - "sp-keystore 0.33.0", - "sp-mixnet 0.3.0", - "sp-runtime 30.0.1", + "sc-client-api 28.0.0", + "sc-network 0.34.0", + "sc-transaction-pool-api 28.0.0", + "sp-api 26.0.0", + "sp-consensus 0.32.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "sp-mixnet 0.4.0", + "sp-runtime 31.0.1", "thiserror", ] @@ -11668,7 +11416,7 @@ dependencies = [ "sp-blockchain 25.0.0", "sp-core 25.0.0", "sp-runtime 28.0.0", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.16.0", "thiserror", "unsigned-varint", "wasm-timer", @@ -11677,9 +11425,9 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abc4093ac710df0daa0dde6ea3613ecf391695e321923c9bb270eebd5c070bf2" +checksum = "7f2f49eccabc1de61ff976a184f5380a230f07baa5cb075a31c8ec9459fcd076" dependencies = [ "array-bytes 6.2.2", "async-channel", @@ -11700,17 +11448,17 @@ dependencies = [ "partial_sort", "pin-project", "rand 0.8.5", - "sc-client-api 27.0.0", - "sc-network-common 0.32.0", - "sc-utils 13.0.0", + "sc-client-api 28.0.0", + "sc-network-common 0.33.0", + "sc-utils 14.0.0", "serde", "serde_json", "smallvec", - "sp-arithmetic 22.0.0", - "sp-blockchain 27.0.0", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "substrate-prometheus-endpoint", + "sp-arithmetic 23.0.0", + "sp-blockchain 28.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "substrate-prometheus-endpoint 0.17.0", "thiserror", "tokio", "tokio-stream", @@ -11740,27 +11488,6 @@ dependencies = [ "unsigned-varint", ] -[[package]] -name = "sc-network-bitswap" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae68646fa90d2b93bd02be2e16eb46673e6cc863c83ebe04be54a10cf0c7cb6" -dependencies = [ - "async-channel", - "cid", - "futures", - "libp2p-identity", - "log", - "prost", - "prost-build", - "sc-client-api 27.0.0", - "sc-network 0.33.0", - "sp-blockchain 27.0.0", - "sp-runtime 30.0.1", - "thiserror", - "unsigned-varint", -] - [[package]] name = "sc-network-common" version = "0.30.0" @@ -11781,9 +11508,9 @@ dependencies = [ [[package]] name = "sc-network-common" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d62375edb2146c538166886ae09662b62b7205085826f276da49a11be278d905" +checksum = "9b798acc12d5b3120b2d5e8a078fcec39d6732089261136ac31c993235ade917" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -11791,29 +11518,29 @@ dependencies = [ "libp2p-identity", "parity-scale-codec", "prost-build", - "sc-consensus 0.32.0", - "sp-consensus 0.31.0", - "sp-consensus-grandpa 12.0.0", - "sp-runtime 30.0.1", + "sc-consensus 0.33.0", + "sp-consensus 0.32.0", + "sp-consensus-grandpa 13.0.0", + "sp-runtime 31.0.1", ] [[package]] name = "sc-network-gossip" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc9f9e0267f58062280f7249eea969a0c9f479c9ad08049ffb39a6f88e515a34" +checksum = "cd92792f3a04fcb1f21018c9f8a5d6d438d705a2548ffcdc7730280c667b8386" dependencies = [ "ahash 0.8.7", "futures", "futures-timer", "libp2p", "log", - "sc-network 0.33.0", - "sc-network-common 0.32.0", - "sc-network-sync 0.32.0", + "sc-network 0.34.0", + "sc-network-common 0.33.0", + "sc-network-sync 0.33.0", "schnellru", - "sp-runtime 30.0.1", - "substrate-prometheus-endpoint", + "sp-runtime 31.0.1", + "substrate-prometheus-endpoint 0.17.0", "tracing", ] @@ -11839,28 +11566,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sc-network-light" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a97885f6b4b2b5b01c47061c0e8cca10bd20599e6fd48f28044792077e82a7" -dependencies = [ - "array-bytes 6.2.2", - "async-channel", - "futures", - "libp2p-identity", - "log", - "parity-scale-codec", - "prost", - "prost-build", - "sc-client-api 27.0.0", - "sc-network 0.33.0", - "sp-blockchain 27.0.0", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "thiserror", -] - [[package]] name = "sc-network-sync" version = "0.30.0" @@ -11870,7 +11575,7 @@ dependencies = [ "array-bytes 6.2.2", "async-channel", "async-trait", - "fork-tree", + "fork-tree 11.0.0", "futures", "futures-timer", "libp2p", @@ -11892,21 +11597,21 @@ dependencies = [ "sp-consensus-grandpa 10.0.0", "sp-core 25.0.0", "sp-runtime 28.0.0", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.16.0", "thiserror", "tokio-stream", ] [[package]] name = "sc-network-sync" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7645483f69449667520359d6518320a2a938d7ef9f03037486b489cc597896" +checksum = "c4c92fd35c49f748abf0bf420e1e99aa76b0f48ab43c183ea5dacef951116d7e" dependencies = [ "array-bytes 6.2.2", "async-channel", "async-trait", - "fork-tree", + "fork-tree 12.0.0", "futures", "futures-timer", "libp2p", @@ -11915,20 +11620,20 @@ dependencies = [ "parity-scale-codec", "prost", "prost-build", - "sc-client-api 27.0.0", - "sc-consensus 0.32.0", - "sc-network 0.33.0", - "sc-network-common 0.32.0", - "sc-utils 13.0.0", + "sc-client-api 28.0.0", + "sc-consensus 0.33.0", + "sc-network 0.34.0", + "sc-network-common 0.33.0", + "sc-utils 14.0.0", "schnellru", "smallvec", - "sp-arithmetic 22.0.0", - "sp-blockchain 27.0.0", - "sp-consensus 0.31.0", - "sp-consensus-grandpa 12.0.0", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "substrate-prometheus-endpoint", + "sp-arithmetic 23.0.0", + "sp-blockchain 28.0.0", + "sp-consensus 0.32.0", + "sp-consensus-grandpa 13.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "substrate-prometheus-endpoint 0.17.0", "thiserror", "tokio", "tokio-stream", @@ -11950,27 +11655,7 @@ dependencies = [ "sc-utils 11.0.0", "sp-consensus 0.29.0", "sp-runtime 28.0.0", - "substrate-prometheus-endpoint", -] - -[[package]] -name = "sc-network-transactions" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b9a513f519b781ec238a7f33b4f71ca6333c9d3f175ca7b7850fb8ab266869" -dependencies = [ - "array-bytes 6.2.2", - "futures", - "libp2p", - "log", - "parity-scale-codec", - "sc-network 0.33.0", - "sc-network-common 0.32.0", - "sc-network-sync 0.32.0", - "sc-utils 13.0.0", - "sp-consensus 0.31.0", - "sp-runtime 30.0.1", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.16.0", ] [[package]] @@ -11989,7 +11674,7 @@ dependencies = [ "sc-client-api 25.0.0", "sc-mixnet 0.1.0", "sc-rpc-api 0.30.0", - "sc-tracing 25.0.0", + "sc-tracing", "sc-transaction-pool-api 25.0.0", "sc-utils 11.0.0", "serde_json", @@ -12006,39 +11691,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "sc-rpc" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a1251123e0fad557607750da1b000c062ee193fad86369e6a90ab2e6e0b4e13" -dependencies = [ - "futures", - "jsonrpsee", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-block-builder 0.32.0", - "sc-chain-spec 26.0.0", - "sc-client-api 27.0.0", - "sc-mixnet 0.3.0", - "sc-rpc-api 0.32.0", - "sc-tracing 27.0.0", - "sc-transaction-pool-api 27.0.0", - "sc-utils 13.0.0", - "serde_json", - "sp-api 25.0.0", - "sp-blockchain 27.0.0", - "sp-core 27.0.0", - "sp-keystore 0.33.0", - "sp-offchain 25.0.0", - "sp-rpc 25.0.0", - "sp-runtime 30.0.1", - "sp-session 26.0.0", - "sp-statement-store 9.0.0", - "sp-version 28.0.0", - "tokio", -] - [[package]] name = "sc-rpc-api" version = "0.30.0" @@ -12062,22 +11714,22 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ceef96e1df9b6f2db3d5ff8703dd79ce96bf0aa6d53b17fb1ee774a73e88ba" +checksum = "630e81a436f32487452ae1a57ad0ba31f320ddf864bb7faefd7490fe16b3e139" dependencies = [ "jsonrpsee", "parity-scale-codec", - "sc-chain-spec 26.0.0", - "sc-mixnet 0.3.0", - "sc-transaction-pool-api 27.0.0", + "sc-chain-spec 27.0.0", + "sc-mixnet 0.4.0", + "sc-transaction-pool-api 28.0.0", "scale-info", "serde", "serde_json", - "sp-core 27.0.0", - "sp-rpc 25.0.0", - "sp-runtime 30.0.1", - "sp-version 28.0.0", + "sp-core 28.0.0", + "sp-rpc 26.0.0", + "sp-runtime 31.0.1", + "sp-version 29.0.0", "thiserror", ] @@ -12091,7 +11743,7 @@ dependencies = [ "jsonrpsee", "log", "serde_json", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.16.0", "tokio", "tower", "tower-http", @@ -12126,36 +11778,6 @@ dependencies = [ "tokio-stream", ] -[[package]] -name = "sc-rpc-spec-v2" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9112cc7f746672f8080bafcb34c970e36db765f852f449b1e1640d44fe5fdc7d" -dependencies = [ - "array-bytes 6.2.2", - "futures", - "futures-util", - "hex", - "jsonrpsee", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-chain-spec 26.0.0", - "sc-client-api 27.0.0", - "sc-transaction-pool-api 27.0.0", - "sc-utils 13.0.0", - "serde", - "sp-api 25.0.0", - "sp-blockchain 27.0.0", - "sp-core 27.0.0", - "sp-rpc 25.0.0", - "sp-runtime 30.0.1", - "sp-version 28.0.0", - "thiserror", - "tokio", - "tokio-stream", -] - [[package]] name = "sc-service" version = "0.32.0" @@ -12176,24 +11798,24 @@ dependencies = [ "sc-block-builder 0.30.0", "sc-chain-spec 24.0.0", "sc-client-api 25.0.0", - "sc-client-db 0.32.0", + "sc-client-db", "sc-consensus 0.30.0", "sc-executor 0.29.0", - "sc-informant 0.30.0", - "sc-keystore 22.0.0", + "sc-informant", + "sc-keystore", "sc-network 0.31.0", - "sc-network-bitswap 0.30.0", + "sc-network-bitswap", "sc-network-common 0.30.0", - "sc-network-light 0.30.0", + "sc-network-light", "sc-network-sync 0.30.0", - "sc-network-transactions 0.30.0", - "sc-rpc 26.0.0", + "sc-network-transactions", + "sc-rpc", "sc-rpc-server", - "sc-rpc-spec-v2 0.31.0", - "sc-sysinfo 24.0.0", + "sc-rpc-spec-v2", + "sc-sysinfo", "sc-telemetry 12.0.0", - "sc-tracing 25.0.0", - "sc-transaction-pool 25.0.0", + "sc-tracing", + "sc-transaction-pool", "sc-transaction-pool-api 25.0.0", "sc-utils 11.0.0", "serde", @@ -12209,75 +11831,11 @@ dependencies = [ "sp-state-machine 0.32.0", "sp-storage 17.0.0", "sp-transaction-pool 23.0.0", - "sp-transaction-storage-proof 23.0.0", + "sp-transaction-storage-proof", "sp-trie 26.0.0", "sp-version 26.0.0", "static_init", - "substrate-prometheus-endpoint", - "tempfile", - "thiserror", - "tokio", - "tracing", - "tracing-futures", -] - -[[package]] -name = "sc-service" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e21ba254620ee66bec56f2e7e93f4ed2a492da50009a09e524bfd21a5fdcb30" -dependencies = [ - "async-trait", - "directories", - "exit-future", - "futures", - "futures-timer", - "jsonrpsee", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "pin-project", - "rand 0.8.5", - "sc-chain-spec 26.0.0", - "sc-client-api 27.0.0", - "sc-client-db 0.34.0", - "sc-consensus 0.32.0", - "sc-executor 0.31.0", - "sc-informant 0.32.0", - "sc-keystore 24.0.0", - "sc-network 0.33.0", - "sc-network-bitswap 0.32.0", - "sc-network-common 0.32.0", - "sc-network-light 0.32.0", - "sc-network-sync 0.32.0", - "sc-network-transactions 0.32.0", - "sc-rpc 28.0.0", - "sc-rpc-server", - "sc-rpc-spec-v2 0.33.0", - "sc-sysinfo 26.0.0", - "sc-telemetry 14.0.0", - "sc-tracing 27.0.0", - "sc-transaction-pool 27.0.0", - "sc-transaction-pool-api 27.0.0", - "sc-utils 13.0.0", - "serde", - "serde_json", - "sp-api 25.0.0", - "sp-blockchain 27.0.0", - "sp-consensus 0.31.0", - "sp-core 27.0.0", - "sp-externalities 0.24.0", - "sp-keystore 0.33.0", - "sp-runtime 30.0.1", - "sp-session 26.0.0", - "sp-state-machine 0.34.0", - "sp-storage 18.0.0", - "sp-transaction-pool 25.0.0", - "sp-transaction-storage-proof 25.0.0", - "sp-trie 28.0.0", - "sp-version 28.0.0", - "static_init", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.16.0", "tempfile", "thiserror", "tokio", @@ -12297,18 +11855,6 @@ dependencies = [ "sp-core 25.0.0", ] -[[package]] -name = "sc-state-db" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d20aeec62d91b8e8f0f7497bd147d427332a76c9b054e50973c3d289685808ee" -dependencies = [ - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sp-core 27.0.0", -] - [[package]] name = "sc-sysinfo" version = "24.0.0" @@ -12329,27 +11875,6 @@ dependencies = [ "sp-std 12.0.0", ] -[[package]] -name = "sc-sysinfo" -version = "26.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a028b0b37acaa1394b6abc8344dbb4a9c26c3631b26db0e277b1c1772c73a867" -dependencies = [ - "derive_more", - "futures", - "libc", - "log", - "rand 0.8.5", - "rand_pcg", - "regex", - "sc-telemetry 14.0.0", - "serde", - "serde_json", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-std 13.0.0", -] - [[package]] name = "sc-telemetry" version = "12.0.0" @@ -12372,9 +11897,9 @@ dependencies = [ [[package]] name = "sc-telemetry" -version = "14.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc5a1c7282f7f56b4caaed8ebb9d723cee92ebbdd0585e6e0e8e57a9fdcc590d" +checksum = "96841bdc22e1ad5931e6cb7557b06ef33aeda7f5eef3864653359840f9fd025a" dependencies = [ "chrono", "futures", @@ -12383,7 +11908,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "rand 0.8.5", - "sc-utils 13.0.0", + "sc-utils 14.0.0", "serde", "serde_json", "thiserror", @@ -12420,37 +11945,6 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "sc-tracing" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44a512ed582251b8605cfa0245787f60434e241666298bd4dd5f206d6c0814d0" -dependencies = [ - "ansi_term", - "atty", - "chrono", - "lazy_static", - "libc", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "regex", - "rustc-hash", - "sc-client-api 27.0.0", - "sc-tracing-proc-macro", - "serde", - "sp-api 25.0.0", - "sp-blockchain 27.0.0", - "sp-core 27.0.0", - "sp-rpc 25.0.0", - "sp-runtime 30.0.1", - "sp-tracing 15.0.0", - "thiserror", - "tracing", - "tracing-log", - "tracing-subscriber", -] - [[package]] name = "sc-tracing-proc-macro" version = "10.0.0" @@ -12476,44 +11970,17 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sc-client-api 25.0.0", - "sc-transaction-pool-api 25.0.0", - "sc-utils 11.0.0", - "serde", - "sp-api 23.0.0", - "sp-blockchain 25.0.0", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-tracing 14.0.0", - "sp-transaction-pool 23.0.0", - "substrate-prometheus-endpoint", - "thiserror", -] - -[[package]] -name = "sc-transaction-pool" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28627585ac5e3d8095067f5052d4b98fb5d2d61d819e8f27a7057750a03984f" -dependencies = [ - "async-trait", - "futures", - "futures-timer", - "linked-hash-map", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-client-api 27.0.0", - "sc-transaction-pool-api 27.0.0", - "sc-utils 13.0.0", + "sc-client-api 25.0.0", + "sc-transaction-pool-api 25.0.0", + "sc-utils 11.0.0", "serde", - "sp-api 25.0.0", - "sp-blockchain 27.0.0", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-tracing 15.0.0", - "sp-transaction-pool 25.0.0", - "substrate-prometheus-endpoint", + "sp-api 23.0.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-tracing 14.0.0", + "sp-transaction-pool 23.0.0", + "substrate-prometheus-endpoint 0.16.0", "thiserror", ] @@ -12536,18 +12003,18 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99b8e2122ec55f2e7d14fcfad524e278e4ba7dc5f398f32e32e17c31ee519c72" +checksum = "3402336f81a52fd6b1fd5a16fa3f4279032de1e113fe4a973865bf0b0e28679c" dependencies = [ "async-trait", "futures", "log", "parity-scale-codec", "serde", - "sp-blockchain 27.0.0", - "sp-core 27.0.0", - "sp-runtime 30.0.1", + "sp-blockchain 28.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", "thiserror", ] @@ -12569,9 +12036,9 @@ dependencies = [ [[package]] name = "sc-utils" -version = "13.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6921990b07ea392b5cea4fae2153bac23cea983c09e5a6716bcae59340e9150d" +checksum = "0c4d5d1f106d670dd0c56fe540e8b0916aaeff6960bb39440ed8f3c80b52f8d4" dependencies = [ "async-channel", "futures", @@ -12580,7 +12047,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "prometheus", - "sp-arithmetic 22.0.0", + "sp-arithmetic 23.0.0", ] [[package]] @@ -12639,7 +12106,7 @@ dependencies = [ "arrayvec 0.5.2", "curve25519-dalek 2.1.3", "getrandom 0.1.16", - "merlin", + "merlin 2.0.1", "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", @@ -12647,6 +12114,25 @@ dependencies = [ "zeroize", ] +[[package]] +name = "schnorrkel" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" +dependencies = [ + "aead", + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek 4.1.1", + "getrandom_or_panic", + "merlin 3.0.0", + "rand_core 0.6.4", + "serde_bytes", + "sha2 0.10.8", + "subtle 2.5.0", + "zeroize", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -12799,6 +12285,15 @@ 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.195" @@ -12843,17 +12338,6 @@ dependencies = [ "opaque-debug 0.3.0", ] -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - [[package]] name = "sha2" version = "0.8.2" @@ -12911,9 +12395,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" @@ -12989,15 +12473,15 @@ dependencies = [ [[package]] name = "slot-range-helper" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4976dad61a607ef0b19e0cf9afb94846be96e1ac817e664dc71f67de3d7704a2" +checksum = "5d9bb569dc58f1e139c20f532a2ad13d54795060c0000c2c49dc812b17684197" dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -13021,7 +12505,7 @@ dependencies = [ "aes-gcm", "blake2 0.10.6", "chacha20poly1305", - "curve25519-dalek 4.0.0", + "curve25519-dalek 4.1.1", "rand_core 0.6.4", "ring 0.17.7", "rustc_version 0.4.0", @@ -13029,6 +12513,17 @@ dependencies = [ "subtle 2.5.0", ] +[[package]] +name = "snowbridge-rococo-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dc8ddfb7bec2140079a788c312010f793d75fde1f996128517b0c14270296a4" +dependencies = [ + "frame-support 28.0.0", + "log", + "staging-xcm 7.0.0", +] + [[package]] name = "socket2" version = "0.4.10" @@ -13090,23 +12585,23 @@ dependencies = [ [[package]] name = "sp-api" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7f4202d58db32c71adb23be744f7b0c93a8063ad9b17b9b4f81d3fc4633ae6" +checksum = "6dea138c6dbf282ab57756492f0232ea0a08575ca9cbe2b7b1ead49000f238a7" dependencies = [ "hash-db", "log", "parity-scale-codec", "scale-info", - "sp-api-proc-macro 14.0.0", - "sp-core 27.0.0", - "sp-externalities 0.24.0", - "sp-metadata-ir 0.5.0", - "sp-runtime 30.0.1", - "sp-state-machine 0.34.0", - "sp-std 13.0.0", - "sp-trie 28.0.0", - "sp-version 28.0.0", + "sp-api-proc-macro 15.0.0", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-metadata-ir 0.6.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-std 14.0.0", + "sp-trie 29.0.0", + "sp-version 29.0.0", "thiserror", ] @@ -13127,14 +12622,14 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "14.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f19a8b3ebe748e59c5a679bb7510251b9c96873c0f4dc7669030c8254598716" +checksum = "0694be2891593450916d6b53a274d234bccbc86bcbada36ba23fc356989070c7" dependencies = [ "Inflector", "blake2 0.10.6", "expander 2.0.0", - "proc-macro-crate 2.0.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 2.0.48", @@ -13156,16 +12651,16 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "29.0.0" +version = "30.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd703034c3f4f34fa4965e0d4d773f50d0f56256b1759b36016b3b1baba147d8" +checksum = "7e4fe7a9b7fa9da76272b201e2fb3c7900d97d32a46b66af9a04dad457f73c71" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-std 14.0.0", ] [[package]] @@ -13185,16 +12680,16 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56dec3290d64ec9994457abe974f82fe7260c9cc32e920e4cf20611346ca7464" +checksum = "f42721f072b421f292a072e8f52a3b3c0fbc27428f0c9fe24067bc47046bad63" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-std 13.0.0", + "sp-std 14.0.0", "static_assertions", ] @@ -13214,16 +12709,16 @@ dependencies = [ [[package]] name = "sp-authority-discovery" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d626bc6b32b0defc2b7bdb5899c8f4ca86e9646e0cba80d09e9c263fd74fe39" +checksum = "22a740c05e9096eb17e93b5ab6aa5fe8ce0c9b4243777826d92133b3dd682e14" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 25.0.0", - "sp-application-crypto 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -13240,14 +12735,14 @@ dependencies = [ [[package]] name = "sp-block-builder" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64475dafccb351ea025f06f40b205aae8de16563347622d513a0a7767090ca4d" +checksum = "e6d2aa0943101367b955f5806c3ecea2e23df7c90059708107470dbfb9d3d7ab" dependencies = [ - "sp-api 25.0.0", - "sp-inherents 25.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-api 26.0.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -13263,7 +12758,7 @@ dependencies = [ "schnellru", "sp-api 23.0.0", "sp-consensus 0.29.0", - "sp-database", + "sp-database 9.0.0", "sp-runtime 28.0.0", "sp-state-machine 0.32.0", "thiserror", @@ -13271,20 +12766,20 @@ dependencies = [ [[package]] name = "sp-blockchain" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97252dce922ebb4239e52173d9d67957892da74196372e52d05f44ff68f887a2" +checksum = "f9adee5ddcf0682d0302ed640a285b9f922d933a205b63c7819a74d6092b6f78" dependencies = [ "futures", "log", "parity-scale-codec", "parking_lot 0.12.1", "schnellru", - "sp-api 25.0.0", - "sp-consensus 0.31.0", - "sp-database", - "sp-runtime 30.0.1", - "sp-state-machine 0.34.0", + "sp-api 26.0.0", + "sp-consensus 0.32.0", + "sp-database 10.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", "thiserror", ] @@ -13306,17 +12801,17 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae7acf47fab76b2929ca26f679f1b94e66c03ae1f68637878fe6f18bc4dd160" +checksum = "cfcac16e85f78db9c99c9424659bb25790be079a0b758a3674ee8e1e7ef635b0" dependencies = [ "async-trait", "futures", "log", - "sp-core 27.0.0", - "sp-inherents 25.0.0", - "sp-runtime 30.0.1", - "sp-state-machine 0.34.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", "thiserror", ] @@ -13340,20 +12835,20 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237ffe23611f0f1e152b09e513090227752652eab2f10965825865102a86bfcc" +checksum = "3ab8e878a116b0885eaefd068235657737cb72fdce60a8c080dfd092f7d645cc" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-api 25.0.0", - "sp-application-crypto 29.0.0", - "sp-consensus-slots 0.31.0", - "sp-inherents 25.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-timestamp 25.0.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-consensus-slots 0.32.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-timestamp 26.0.0", ] [[package]] @@ -13378,41 +12873,41 @@ dependencies = [ [[package]] name = "sp-consensus-babe" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d248658f288676d2c814bcf79577a5bd0b9f386bfae5c4860bfed6ca71ab973b" +checksum = "ebfedfdea5b22fb3625cd664e72503dcbd1087373181d5be0d092b3e7b4c61f5" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "serde", - "sp-api 25.0.0", - "sp-application-crypto 29.0.0", - "sp-consensus-slots 0.31.0", - "sp-core 27.0.0", - "sp-inherents 25.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-timestamp 25.0.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-consensus-slots 0.32.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-timestamp 26.0.0", ] [[package]] name = "sp-consensus-beefy" -version = "12.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9b2a4f6aac1f224dd3c4cdb2637c3c1a1c518a5af816fd87b4978c5a61a4cf" +checksum = "e09a424196a673f0e6b5fe79e4ab97da416491cfecab7bc835fa595134ac1b5c" dependencies = [ "lazy_static", "parity-scale-codec", "scale-info", "serde", - "sp-api 25.0.0", - "sp-application-crypto 29.0.0", - "sp-core 27.0.0", - "sp-io 29.0.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", "sp-mmr-primitives", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", "strum", ] @@ -13437,21 +12932,21 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" -version = "12.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c01ae3526e29cc2c54daa6c55cb84911d89642f49cc6b2e49a6103f611c05a8" +checksum = "2a906b20409a5a69b1d9580848f502af20cf2c51a1ae028ba208375eb11f332b" dependencies = [ "finality-grandpa", "log", "parity-scale-codec", "scale-info", "serde", - "sp-api 25.0.0", - "sp-application-crypto 29.0.0", - "sp-core 27.0.0", - "sp-keystore 0.33.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -13469,15 +12964,15 @@ dependencies = [ [[package]] name = "sp-consensus-slots" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4627b5d9a9991438c42944fb704315092d6c07967469aafa135328be2f9f412" +checksum = "fdc5c1620d81196391daa15e78ea20cc11c59f08c509381c276d5d6a3d4d36af" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std 13.0.0", - "sp-timestamp 25.0.0", + "sp-std 14.0.0", + "sp-timestamp 26.0.0", ] [[package]] @@ -13500,7 +12995,7 @@ dependencies = [ "lazy_static", "libsecp256k1", "log", - "merlin", + "merlin 2.0.1", "parity-scale-codec", "parking_lot 0.12.1", "paste", @@ -13508,7 +13003,7 @@ dependencies = [ "rand 0.8.5", "regex", "scale-info", - "schnorrkel", + "schnorrkel 0.9.1", "secp256k1 0.24.3", "secrecy", "serde", @@ -13529,9 +13024,9 @@ dependencies = [ [[package]] name = "sp-core" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d92c65ecfdb86fa1c4809b06a2a83d6f3bdb1ef4fe4c5a4f6df19229030d5283" +checksum = "f230cb12575455070da0fc174815958423a0b9a641d5e304a9457113c7cb4007" dependencies = [ "array-bytes 6.2.2", "bip39", @@ -13548,23 +13043,23 @@ dependencies = [ "itertools 0.10.5", "libsecp256k1", "log", - "merlin", + "merlin 3.0.0", "parity-scale-codec", "parking_lot 0.12.1", "paste", "primitive-types", "rand 0.8.5", "scale-info", - "schnorrkel", + "schnorrkel 0.11.4", "secp256k1 0.28.1", "secrecy", "serde", - "sp-core-hashing 14.0.0", - "sp-debug-derive 13.0.0", - "sp-externalities 0.24.0", - "sp-runtime-interface 23.0.0", - "sp-std 13.0.0", - "sp-storage 18.0.0", + "sp-core-hashing 15.0.0", + "sp-debug-derive 14.0.0", + "sp-externalities 0.25.0", + "sp-runtime-interface 24.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "ss58-registry", "substrate-bip39", "thiserror", @@ -13589,9 +13084,9 @@ dependencies = [ [[package]] name = "sp-core-hashing" -version = "14.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1936171e56a51272757760cc50883d2a8c37c650b3602a0aeed05b0c4fffc5f1" +checksum = "1e0f4990add7b2cefdeca883c0efa99bb4d912cb2196120e1500c0cc099553b0" dependencies = [ "blake2b_simd", "byteorder", @@ -13614,12 +13109,12 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" -version = "14.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8497dc98fc204ba9c09abb99840d64964de1925fbd9ff74cc01aa18492c19bd8" +checksum = "7527f8dda7667c41009b2cd0efaddcb81709b9741bd5ee6d17b11bad835cc698" dependencies = [ "quote", - "sp-core-hashing 14.0.0", + "sp-core-hashing 15.0.0", "syn 2.0.48", ] @@ -13633,6 +13128,16 @@ dependencies = [ "parking_lot 0.12.1", ] +[[package]] +name = "sp-database" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "722cbecdbf5b94578137dbd07feb51e95f7de221be0c1ff4dcfe0bb4cd986929" +dependencies = [ + "kvdb", + "parking_lot 0.12.1", +] + [[package]] name = "sp-debug-derive" version = "12.0.0" @@ -13646,9 +13151,9 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "13.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fd2c660c3e940df93f4920b183cc103443d66503f68189fa7e4b3f09996a18" +checksum = "48d09fa0a5f7299fb81ee25ae3853d26200f7a348148aed6de76be905c007dbe" dependencies = [ "proc-macro2", "quote", @@ -13669,14 +13174,14 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.24.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac0a1df458d0bba69bc011a3b0197049396272e497b207ad161289e7518b74bf" +checksum = "63867ec85950ced90d4ab1bba902a47db1b1efdf2829f653945669b2bb470a9c" dependencies = [ "environmental", "parity-scale-codec", - "sp-std 13.0.0", - "sp-storage 18.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", ] [[package]] @@ -13693,14 +13198,14 @@ dependencies = [ [[package]] name = "sp-genesis-builder" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8152be87c61e6d74f491d05b67086408462ab0593b2340311a91a2d3d246f03" +checksum = "dfdc79df83221ec5a279cbbd08fd6f8be164b9b081c8e84593ce2c2ebd5d66c0" dependencies = [ "serde_json", - "sp-api 25.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-api 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -13720,16 +13225,16 @@ dependencies = [ [[package]] name = "sp-inherents" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7089c364b99df5ce82c1cedcaba56f574ff06e403d9f8640bee33f87750566a2" +checksum = "9a3caf2d1288549d7e6c32b453f2d4855d498bb88600101011e35653e022a6f2" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", "thiserror", ] @@ -13760,9 +13265,9 @@ dependencies = [ [[package]] name = "sp-io" -version = "29.0.0" +version = "30.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c600c911757504c43f8c354edd1b0d327a1c2abfe947e490a6b62d8f1543d96" +checksum = "c55f26d89feedaf0faf81688b6e1e1e81329cd8b4c6a4fd6c5b97ed9dd068b8a" dependencies = [ "bytes", "ed25519-dalek", @@ -13771,14 +13276,14 @@ dependencies = [ "parity-scale-codec", "rustversion", "secp256k1 0.28.1", - "sp-core 27.0.0", - "sp-externalities 0.24.0", - "sp-keystore 0.33.0", - "sp-runtime-interface 23.0.0", - "sp-state-machine 0.34.0", - "sp-std 13.0.0", - "sp-tracing 15.0.0", - "sp-trie 28.0.0", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-keystore 0.34.0", + "sp-runtime-interface 24.0.0", + "sp-state-machine 0.35.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", + "sp-trie 29.0.0", "tracing", "tracing-core", ] @@ -13797,13 +13302,12 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "30.0.0" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245dfdf093568086ba7e3099319998a37d5ccf6b9faab45f170c766fc1122c37" +checksum = "98165ce7c625a8cdb88d39c6bbd56fe8b32ada64ed0894032beba99795f557da" dependencies = [ - "lazy_static", - "sp-core 27.0.0", - "sp-runtime 30.0.1", + "sp-core 28.0.0", + "sp-runtime 31.0.1", "strum", ] @@ -13822,14 +13326,14 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b955546b815ace30f63542efda71ce4e010444596cd8316f7ef49a26fb971709" +checksum = "96806a28a62ed9ddecd0b28857b1344d029390f7c5c42a2ff9199cbf5638635c" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "sp-core 27.0.0", - "sp-externalities 0.24.0", + "sp-core 28.0.0", + "sp-externalities 0.25.0", "thiserror", ] @@ -13845,9 +13349,9 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" -version = "10.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0950218edb5c5fb4867e28814d7b13c13a3c80ea37f356dc410437105a07cff8" +checksum = "f0c768c11afbe698a090386876911da4236af199cd38a5866748df4d8628aeff" dependencies = [ "thiserror", "zstd 0.12.4", @@ -13867,14 +13371,14 @@ dependencies = [ [[package]] name = "sp-metadata-ir" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97cacf4a5b315d8709b5a29ad8e736c0ad5b719e70d02aca0c29c7e3dca4a6e2" +checksum = "fa0b5e87e56c1bb26d9524d48dd127121d630f895bd5914a34f0b017489f7c1d" dependencies = [ "frame-metadata", "parity-scale-codec", "scale-info", - "sp-std 13.0.0", + "sp-std 14.0.0", ] [[package]] @@ -13892,33 +13396,33 @@ dependencies = [ [[package]] name = "sp-mixnet" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19bd1dca687e8b360ea48c6e7351c175c8c2ca4d7f0cc0ec88274ef8519c507f" +checksum = "85ed83d2f899484bde61c72cbae6edfb25708d43e6b19934e206f3c706df67df" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 25.0.0", - "sp-application-crypto 29.0.0", - "sp-std 13.0.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-std 14.0.0", ] [[package]] name = "sp-mmr-primitives" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b6fad7c530c463057d68d465aff08e5fff068c3c6827ff64fbd1ee34d3f2a5" +checksum = "b7526a73d518c03fa2447588b1544019a194a4f113cf34d2610d3b5925c80c86" dependencies = [ "ckb-merkle-mountain-range", "log", "parity-scale-codec", "scale-info", "serde", - "sp-api 25.0.0", - "sp-core 27.0.0", - "sp-debug-derive 13.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-api 26.0.0", + "sp-core 28.0.0", + "sp-debug-derive 14.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", "thiserror", ] @@ -13939,17 +13443,17 @@ dependencies = [ [[package]] name = "sp-npos-elections" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0d56d158aed198ec52dc04ee64e6be8dd1bb42e6837c80aa5aa8c058479afa8" +checksum = "fa8efff28b504b4b928288976e5f72c00c7ece9d2348a7ca2496c77849dd4c8f" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 22.0.0", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -13965,13 +13469,13 @@ dependencies = [ [[package]] name = "sp-offchain" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5016e6a6cb55aa55f290abe5c5f5efc35defa9eeb996a21667d18ae256c45d5c" +checksum = "fb45b3e397dc9c7b81cb2d8d641d0bcb1f525b60e83835783413ba73b3f61ac9" dependencies = [ - "sp-api 25.0.0", - "sp-core 27.0.0", - "sp-runtime 30.0.1", + "sp-api 26.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -13985,6 +13489,17 @@ dependencies = [ "regex", ] +[[package]] +name = "sp-panic-handler" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8f5a17a0a11de029a8b811cb6e8b32ce7e02183cc04a3e965c383246798c416" +dependencies = [ + "backtrace", + "lazy_static", + "regex", +] + [[package]] name = "sp-rpc" version = "23.0.0" @@ -13998,13 +13513,13 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3921819bed23ddf4ad6bf402b596a6950255b91f9b58fee88b454dd988d938d6" +checksum = "8a55f2c7660b579627d22932ecfe2e5f001a7671d2fa77667387517c7f80e6fb" dependencies = [ "rustc-hash", "serde", - "sp-core 27.0.0", + "sp-core 28.0.0", ] [[package]] @@ -14032,9 +13547,9 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "30.0.1" +version = "31.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4bb0ddcc4e26cc6c770b49149e1a07ad6b34ab22d3da94330994b7145a025f" +checksum = "a3bb49a4475d390198dfd3d41bef4564ab569fbaf1b5e38ae69b35fc01199d91" dependencies = [ "docify", "either", @@ -14047,12 +13562,12 @@ dependencies = [ "scale-info", "serde", "simple-mermaid", - "sp-application-crypto 29.0.0", - "sp-arithmetic 22.0.0", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-std 13.0.0", - "sp-weights 26.0.0", + "sp-application-crypto 30.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-std 14.0.0", + "sp-weights 27.0.0", ] [[package]] @@ -14076,20 +13591,20 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "23.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0093f419cb2ef80c8ecb583ac54e05d1105710eb84add7f9483c8ea882cbaff" +checksum = "f66b66d8cec3d785fa6289336c1d9cbd4305d5d84f7134378c4d79ed7983e6fb" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities 0.24.0", - "sp-runtime-interface-proc-macro 16.0.0", - "sp-std 13.0.0", - "sp-storage 18.0.0", - "sp-tracing 15.0.0", - "sp-wasm-interface 19.0.0", + "sp-externalities 0.25.0", + "sp-runtime-interface-proc-macro 17.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", + "sp-tracing 16.0.0", + "sp-wasm-interface 20.0.0", "static_assertions", ] @@ -14108,13 +13623,13 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "16.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ebdb4aff8286f5095871b2f950037d690edb0fed0590af5f6735352533a53b6" +checksum = "cfaf6e85b2ec12a4b99cd6d8d57d083e30c94b7f1b0d8f93547121495aae6f0c" dependencies = [ "Inflector", "expander 2.0.0", - "proc-macro-crate 2.0.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 2.0.48", @@ -14138,18 +13653,18 @@ dependencies = [ [[package]] name = "sp-session" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cdec3cb1c7f0900cfaec5de83f00841d99f2c2fbd32d44931601b43ba6d5bfa" +checksum = "8048981db53d4f5171e6003f5e11fbfc27a8c196b0827619907a4214746a623b" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 25.0.0", - "sp-core 27.0.0", - "sp-keystore 0.33.0", - "sp-runtime 30.0.1", - "sp-staking 25.0.0", - "sp-std 13.0.0", + "sp-api 26.0.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", + "sp-staking 26.0.0", + "sp-std 14.0.0", ] [[package]] @@ -14169,17 +13684,17 @@ dependencies = [ [[package]] name = "sp-staking" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15411bbc26ca6d9b14d44698ef19243c8875fa7cc3260621ba28b3241c477c" +checksum = "c0e68be3fff84dd8ee552f9d13dd2e9eab3663e0bddfc6c6c88de02aaca1e311" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -14196,7 +13711,7 @@ dependencies = [ "smallvec", "sp-core 25.0.0", "sp-externalities 0.23.0", - "sp-panic-handler", + "sp-panic-handler 12.0.0", "sp-std 12.0.0", "sp-trie 26.0.0", "thiserror", @@ -14206,9 +13721,9 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.34.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f5027dceaa62f3c18f40593ee6a898df69c70e84e01450a17293511c4f3c46c" +checksum = "718c779ad1d6fcc0be64c7ce030b33fa44b5c8914b3a1319ef63bb5f27fb98df" dependencies = [ "hash-db", "log", @@ -14216,11 +13731,11 @@ dependencies = [ "parking_lot 0.12.1", "rand 0.8.5", "smallvec", - "sp-core 27.0.0", - "sp-externalities 0.24.0", - "sp-panic-handler", - "sp-std 13.0.0", - "sp-trie 28.0.0", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-panic-handler 13.0.0", + "sp-std 14.0.0", + "sp-trie 29.0.0", "thiserror", "tracing", "trie-db", @@ -14233,7 +13748,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b8654bcd37602b1811414050d34d14f543873bd4e64e50d210a0116b660c600" dependencies = [ "aes-gcm", - "curve25519-dalek 4.0.0", + "curve25519-dalek 4.1.1", "ed25519-dalek", "hkdf", "parity-scale-codec", @@ -14253,25 +13768,25 @@ dependencies = [ [[package]] name = "sp-statement-store" -version = "9.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66ce852bff3c772be9646cc3491ee7dc8db47a3fb860659b5258c585a730013" +checksum = "fee6d4ceb2513f180e6e017fd6d6f3c9a1a122dcedee5fc8e4254d8a7ecf793d" dependencies = [ "aes-gcm", - "curve25519-dalek 4.0.0", + "curve25519-dalek 4.1.1", "ed25519-dalek", "hkdf", "parity-scale-codec", "rand 0.8.5", "scale-info", "sha2 0.10.8", - "sp-api 25.0.0", - "sp-application-crypto 29.0.0", - "sp-core 27.0.0", - "sp-externalities 0.24.0", - "sp-runtime 30.0.1", - "sp-runtime-interface 23.0.0", - "sp-std 13.0.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-runtime 31.0.1", + "sp-runtime-interface 24.0.0", + "sp-std 14.0.0", "thiserror", "x25519-dalek 2.0.0", ] @@ -14284,9 +13799,9 @@ checksum = "54c78c5a66682568cc7b153603c5d01a2cc8f5c221c7b1e921517a0eef18ae05" [[package]] name = "sp-std" -version = "13.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71323a3b5f189085d11123ce397b3cdfaec4437071243b51f68a38a4833fbaa7" +checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" [[package]] name = "sp-storage" @@ -14304,16 +13819,16 @@ dependencies = [ [[package]] name = "sp-storage" -version = "18.0.0" +version = "19.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5300c9012180259489a97167f4c45cf3362446e5f0d0c66b6e9342968be8f22" +checksum = "1fb92d7b24033a8a856d6e20dd980b653cbd7af7ec471cc988b1b7c1d2e3a32b" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 13.0.0", - "sp-std 13.0.0", + "sp-debug-derive 14.0.0", + "sp-std 14.0.0", ] [[package]] @@ -14332,15 +13847,15 @@ dependencies = [ [[package]] name = "sp-timestamp" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c6c12bc3bce3f785984843ea997e7f3da9c43ee392bf8c6f9ab183976c0cbf" +checksum = "347eaddd5b07856ccec69ac3300e72e392a5efc3aea5fb4b7230888a0b447b9e" dependencies = [ "async-trait", "parity-scale-codec", - "sp-inherents 25.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", "thiserror", ] @@ -14359,12 +13874,12 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "15.0.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b63d14c3214b8b5fe35b67bd61124b5f080cc9d1312b227e0c6cc2a198461e" +checksum = "0351810b9d074df71c4514c5228ed05c250607cba131c1c9d1526760ab69c05c" dependencies = [ "parity-scale-codec", - "sp-std 13.0.0", + "sp-std 14.0.0", "tracing", "tracing-core", "tracing-subscriber", @@ -14382,12 +13897,12 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3927edc3371ad785725b3e50edf6769097ba64b193fc4779ec6e047f0d106dd0" +checksum = "97c4052e69eacdb7a411e050c56a838f460b8a879071125451e9bb2d4814df34" dependencies = [ - "sp-api 25.0.0", - "sp-runtime 30.0.1", + "sp-api 26.0.0", + "sp-runtime 31.0.1", ] [[package]] @@ -14406,22 +13921,6 @@ dependencies = [ "sp-trie 26.0.0", ] -[[package]] -name = "sp-transaction-storage-proof" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c58c860d7e2e7dc267fa0d8bcf451816d9a0e387c4fcefafb15412aa7fd97fa" -dependencies = [ - "async-trait", - "parity-scale-codec", - "scale-info", - "sp-core 27.0.0", - "sp-inherents 25.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-trie 28.0.0", -] - [[package]] name = "sp-trie" version = "26.0.0" @@ -14449,13 +13948,12 @@ dependencies = [ [[package]] name = "sp-trie" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc3ad723c9addc4b7aafbe8bfabf638c39be3c911e11f58e924e17554003ac" +checksum = "2e4d24d84a0beb44a71dcac1b41980e1edf7fb722c7f3046710136a283cd479b" dependencies = [ "ahash 0.8.7", "hash-db", - "hashbrown 0.13.2", "lazy_static", "memory-db", "nohash-hasher", @@ -14464,9 +13962,9 @@ dependencies = [ "rand 0.8.5", "scale-info", "schnellru", - "sp-core 27.0.0", - "sp-externalities 0.24.0", - "sp-std 13.0.0", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-std 14.0.0", "thiserror", "tracing", "trie-db", @@ -14487,25 +13985,25 @@ dependencies = [ "sp-core-hashing-proc-macro 13.0.0", "sp-runtime 28.0.0", "sp-std 12.0.0", - "sp-version-proc-macro", + "sp-version-proc-macro 12.0.0", "thiserror", ] [[package]] name = "sp-version" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f18671744ee3af2a325daa257cc7aba2c464b36cca165d61bec72ed1ddcbb51" +checksum = "afd1b053394347e22f541696bca4a9ac3ec848b50d1b86f5018d2b771f39f11a" dependencies = [ "impl-serde", "parity-scale-codec", "parity-wasm", "scale-info", "serde", - "sp-core-hashing-proc-macro 14.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-version-proc-macro", + "sp-core-hashing-proc-macro 15.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-version-proc-macro 13.0.0", "thiserror", ] @@ -14521,6 +14019,18 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "sp-version-proc-macro" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9bc3fed32d6dacbbbfb28dd1fe0224affbb737cb6cbfca1d9149351c2b69a7d" +dependencies = [ + "parity-scale-codec", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "sp-wasm-interface" version = "18.0.0" @@ -14537,15 +14047,15 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "19.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4ef2e859d3cde7294c3bf691f8f64244a6a9bb67e53c65729b129318757070e" +checksum = "9ef97172c42eb4c6c26506f325f48463e9bc29b2034a587f1b9e48c751229bee" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std 13.0.0", + "sp-std 14.0.0", "wasmtime", ] @@ -14567,18 +14077,18 @@ dependencies = [ [[package]] name = "sp-weights" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8813a9942a3b900d5ce109875b91ff8ae7eb5849545ebb6464c22aa21e42622e" +checksum = "9e874bdf9dd3fd3242f5b7867a4eaedd545b02f29041a46d222a9d9d5caaaa5c" dependencies = [ "bounded-collections", "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-arithmetic 22.0.0", - "sp-debug-derive 13.0.0", - "sp-std 13.0.0", + "sp-arithmetic 23.0.0", + "sp-debug-derive 14.0.0", + "sp-std 14.0.0", ] [[package]] @@ -14641,41 +14151,41 @@ version = "1.0.0" dependencies = [ "binary-merkle-tree", "bitvec", - "frame-benchmarking 27.0.0", - "frame-election-provider-support 27.0.0", - "frame-executive 27.0.0", + "frame-benchmarking 28.0.0", + "frame-election-provider-support 28.0.0", + "frame-executive 28.0.0", "frame-remote-externalities", - "frame-support 27.0.0", - "frame-system 27.0.0", - "frame-system-benchmarking 27.0.0", - "frame-system-rpc-runtime-api 25.0.0", - "frame-try-runtime 0.33.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-system-benchmarking 28.0.0", + "frame-system-rpc-runtime-api 26.0.0", + "frame-try-runtime 0.34.0", "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-rate 6.0.0", - "pallet-authority-discovery 27.0.0", - "pallet-authorship 27.0.0", - "pallet-babe 27.0.0", + "pallet-asset-rate 7.0.0", + "pallet-authority-discovery 28.0.0", + "pallet-authorship 28.0.0", + "pallet-babe 28.0.0", "pallet-bags-list", - "pallet-balances 27.0.0", + "pallet-balances 28.0.0", "pallet-beefy", "pallet-beefy-mmr", "pallet-bounties", "pallet-child-bounties", - "pallet-collective 27.0.0", + "pallet-collective 28.0.0", "pallet-conviction-voting", "pallet-democracy", - "pallet-election-provider-multi-phase 26.0.0", - "pallet-election-provider-support-benchmarking 26.0.0", + "pallet-election-provider-multi-phase 27.0.0", + "pallet-election-provider-support-benchmarking 27.0.0", "pallet-elections-phragmen", - "pallet-fast-unstake 26.0.0", + "pallet-fast-unstake 27.0.0", "pallet-grandpa", "pallet-identity", "pallet-im-online", "pallet-indices", - "pallet-membership 27.0.0", - "pallet-message-queue 30.0.0", + "pallet-membership 28.0.0", + "pallet-message-queue 31.0.0", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -14685,67 +14195,67 @@ dependencies = [ "pallet-offences", "pallet-offences-benchmarking", "pallet-preimage", - "pallet-proxy 27.0.0", + "pallet-proxy 28.0.0", "pallet-ranked-collective", "pallet-recovery", "pallet-referenda", - "pallet-scheduler 28.0.0", - "pallet-session 27.0.0", + "pallet-scheduler 29.0.0", + "pallet-session 28.0.0", "pallet-session-benchmarking", "pallet-society", - "pallet-staking 27.0.0", + "pallet-staking 28.0.0", "pallet-staking-runtime-api", "pallet-state-trie-migration", - "pallet-timestamp 26.0.0", + "pallet-timestamp 27.0.0", "pallet-tips", - "pallet-transaction-payment 27.0.0", - "pallet-transaction-payment-rpc-runtime-api 27.0.0", - "pallet-treasury 26.0.0", - "pallet-utility 27.0.0", - "pallet-vesting 27.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "pallet-treasury 27.0.0", + "pallet-utility 28.0.0", + "pallet-vesting 28.0.0", "pallet-whitelist", - "pallet-xcm 6.0.0", - "pallet-xcm-benchmarks 6.0.0", + "pallet-xcm 7.0.0", + "pallet-xcm-benchmarks 7.0.0", "parity-scale-codec", - "polkadot-primitives 6.0.0", - "polkadot-runtime-common 6.0.0", - "polkadot-runtime-parachains 6.0.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-common 7.0.0", + "polkadot-runtime-parachains 7.0.0", "rustc-hex", "scale-info", "separator", "serde", "serde_derive", "serde_json", - "sp-api 25.0.0", - "sp-application-crypto 29.0.0", - "sp-arithmetic 22.0.0", - "sp-authority-discovery 25.0.0", - "sp-block-builder 25.0.0", - "sp-consensus-babe 0.31.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-arithmetic 23.0.0", + "sp-authority-discovery 26.0.0", + "sp-block-builder 26.0.0", + "sp-consensus-babe 0.32.0", "sp-consensus-beefy", - "sp-core 27.0.0", - "sp-debug-derive 13.0.0", - "sp-genesis-builder 0.6.0", - "sp-inherents 25.0.0", - "sp-io 29.0.0", - "sp-keyring 30.0.0", + "sp-core 28.0.0", + "sp-debug-derive 14.0.0", + "sp-genesis-builder 0.7.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-keyring 31.0.0", "sp-mmr-primitives", - "sp-npos-elections 25.0.0", - "sp-offchain 25.0.0", - "sp-runtime 30.0.1", - "sp-session 26.0.0", - "sp-staking 25.0.0", - "sp-std 13.0.0", - "sp-storage 18.0.0", - "sp-tracing 15.0.0", - "sp-transaction-pool 25.0.0", - "sp-trie 28.0.0", - "sp-version 28.0.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "sp-npos-elections 26.0.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-staking 26.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", + "sp-tracing 16.0.0", + "sp-transaction-pool 26.0.0", + "sp-trie 29.0.0", + "sp-version 29.0.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", + "staging-xcm-executor 7.0.0", "static_assertions", - "substrate-wasm-builder 16.0.0", + "substrate-wasm-builder 17.0.0", "tiny-keccak", "tokio", ] @@ -14767,17 +14277,17 @@ dependencies = [ [[package]] name = "staging-parachain-info" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02fd981bfbcb9a942de6cf79555d510fcec0d1b255b74303daf0182ab69a495f" +checksum = "ad554ffd27fbcafd82e234d7e7188e458e51bfe2b3b5000dd236dce762e3e95f" dependencies = [ - "cumulus-primitives-core 0.6.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "cumulus-primitives-core 0.7.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 30.0.1", - "sp-std 13.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", ] [[package]] @@ -14800,10 +14310,11 @@ dependencies = [ [[package]] name = "staging-xcm" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "407cc6e4b9cd1b62df9270d921d94ed375e697d65a782975d5e5a5f85bbeafb5" +checksum = "0df18af00766d22926916bb443f14742c65cc6b2f0fe997b8f26da0d0f9ee9ca" dependencies = [ + "array-bytes 6.2.2", "bounded-collections", "derivative", "environmental", @@ -14812,8 +14323,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-weights 26.0.0", - "xcm-procedural 6.0.0", + "sp-weights 27.0.0", + "xcm-procedural 7.0.0", ] [[package]] @@ -14841,25 +14352,25 @@ dependencies = [ [[package]] name = "staging-xcm-builder" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6be7cc419a631fac2daa752fba1f730f7cf53b7490438342f67790de0b961508" +checksum = "2f7a45adc5b85ac35d2245833967772cc74af10899143ebfa4df3c7eb494edb0" dependencies = [ - "frame-support 27.0.0", - "frame-system 27.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "impl-trait-for-tuples", "log", - "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment 28.0.0", "parity-scale-codec", - "polkadot-parachain-primitives 5.0.0", + "polkadot-parachain-primitives 6.0.0", "scale-info", - "sp-arithmetic 22.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-weights 26.0.0", - "staging-xcm 6.0.0", - "staging-xcm-executor 6.0.0", + "sp-arithmetic 23.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-weights 27.0.0", + "staging-xcm 7.0.0", + "staging-xcm-executor 7.0.0", ] [[package]] @@ -14885,24 +14396,24 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19dfe56ba656b1cdb8886289618ed1d70fb5d7279cbd32c42bc2f0ce6b27845f" +checksum = "2493cf438497734b64cdeb55dbee9872bd598f7b08649e9a3bd56d7939360a80" dependencies = [ "environmental", - "frame-benchmarking 27.0.0", - "frame-support 27.0.0", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 22.0.0", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-weights 26.0.0", - "staging-xcm 6.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-weights 27.0.0", + "staging-xcm 7.0.0", ] [[package]] @@ -14939,19 +14450,6 @@ dependencies = [ "syn 1.0.109", ] -[[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" @@ -14988,7 +14486,7 @@ checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", - "schnorrkel", + "schnorrkel 0.9.1", "sha2 0.9.9", "zeroize", ] @@ -15029,18 +14527,31 @@ dependencies = [ "tokio", ] +[[package]] +name = "substrate-prometheus-endpoint" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8fe06b03b8a291c09507c42f92a2c2c10dd3d62975d02c7f64a92d87bfe09b" +dependencies = [ + "hyper", + "log", + "prometheus", + "thiserror", + "tokio", +] + [[package]] name = "substrate-rpc-client" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fa0743d9665e00acaed5800e605ee7c977eafbb2dfa86cbceda2708fe8d6ac3" +checksum = "9076480cc6f480429b081bf93607d32183bdac4d6f0d2969d5e08de08bea1701" dependencies = [ "async-trait", "jsonrpsee", "log", - "sc-rpc-api 0.32.0", + "sc-rpc-api 0.33.0", "serde", - "sp-runtime 30.0.1", + "sp-runtime 31.0.1", ] [[package]] @@ -15074,19 +14585,19 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "16.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc8166be0b5e24dc91209ec92869bfa6e0fbe07e64ebc7e92242121c04a83e2d" +checksum = "ac08d23ff4da66fe6cb0300f249be010d78e5abeafef0390cae39736a374e6cd" dependencies = [ "ansi_term", "build-helper", "cargo_metadata", "filetime", "parity-wasm", - "sp-maybe-compressed-blob 10.0.0", + "sp-maybe-compressed-blob 11.0.0", "strum", "tempfile", - "toml 0.7.8", + "toml 0.8.2", "walkdir", "wasm-opt", ] @@ -15162,14 +14673,14 @@ dependencies = [ name = "system-parachains-constants" version = "1.0.0" dependencies = [ - "frame-support 27.0.0", + "frame-support 28.0.0", "kusama-runtime-constants", - "parachains-common 6.0.0", - "polkadot-core-primitives 6.0.0", - "polkadot-primitives 6.0.0", + "parachains-common 7.0.0", + "polkadot-core-primitives 7.0.0", + "polkadot-primitives 7.0.0", "polkadot-runtime-constants", "smallvec", - "sp-runtime 30.0.1", + "sp-runtime 31.0.1", ] [[package]] @@ -15206,16 +14717,6 @@ 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.28", - "windows-sys 0.48.0", -] - [[package]] name = "termtree" version = "0.4.1" @@ -15480,9 +14981,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] @@ -15513,6 +15014,17 @@ dependencies = [ "winnow", ] +[[package]] +name = "toml_edit" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + [[package]] name = "tower" version = "0.4.13" @@ -15604,24 +15116,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32c0555bd635d9adbf8dec0bf45f7c2aef7541121d648ba37f5f792a211077b6" dependencies = [ "coarsetime", - "polkadot-node-jaeger 4.0.0", + "polkadot-node-jaeger", "polkadot-primitives 4.0.0", "tracing", "tracing-gum-proc-macro", ] -[[package]] -name = "tracing-gum" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11fe5d66dd9124c5b7a7f891b411ed7b98d06645fd61ca8b4895c2ad7fabd876" -dependencies = [ - "coarsetime", - "polkadot-primitives 6.0.0", - "tracing", - "tracing-gum-proc-macro", -] - [[package]] name = "tracing-gum-proc-macro" version = "4.0.0" @@ -16340,18 +15840,19 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "116510890fa55b4c21f10691872dadd912be73ac444edd3df60c6237a65c5b4e" +checksum = "2c410b8a17b87e5228f9c27ba4a8020e7ece4a8afb0f452b989834623afe84a2" dependencies = [ - "frame-support 27.0.0", - "polkadot-primitives 6.0.0", - "polkadot-runtime-common 6.0.0", + "frame-support 28.0.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-common 7.0.0", "smallvec", - "sp-core 27.0.0", - "sp-runtime 30.0.1", - "sp-weights 26.0.0", - "staging-xcm 6.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", + "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.0", ] [[package]] @@ -16675,7 +16176,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek 4.0.0", + "curve25519-dalek 4.1.1", "rand_core 0.6.4", "serde", "zeroize", @@ -16701,36 +16202,36 @@ dependencies = [ [[package]] name = "xcm-emulator" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0347ee7c717126822e99192e15dee53ff439ad88ac3181af7b2d4aa52b5539c9" +checksum = "dfe27508d4304447fdb7419b769ed9fbeab56bcd41ecf9193e43a33fb8f5588a" dependencies = [ - "cumulus-pallet-parachain-system 0.6.0", - "cumulus-pallet-xcmp-queue 0.6.0", - "cumulus-primitives-core 0.6.0", - "cumulus-primitives-parachain-inherent 0.6.0", - "cumulus-test-relay-sproof-builder 0.6.0", - "frame-support 27.0.0", - "frame-system 27.0.0", + "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.0", + "cumulus-primitives-core 0.7.0", + "cumulus-primitives-parachain-inherent 0.7.0", + "cumulus-test-relay-sproof-builder 0.7.0", + "frame-support 28.0.0", + "frame-system 28.0.0", "impl-trait-for-tuples", "lazy_static", "log", - "pallet-balances 27.0.0", - "pallet-message-queue 30.0.0", - "parachains-common 6.0.0", + "pallet-balances 28.0.0", + "pallet-message-queue 31.0.0", + "parachains-common 7.0.0", "parity-scale-codec", "paste", - "polkadot-parachain-primitives 5.0.0", - "polkadot-primitives 6.0.0", - "polkadot-runtime-parachains 6.0.0", - "sp-arithmetic 22.0.0", - "sp-core 27.0.0", - "sp-io 29.0.0", - "sp-runtime 30.0.1", - "sp-std 13.0.0", - "sp-tracing 15.0.0", - "staging-xcm 6.0.0", - "staging-xcm-executor 6.0.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime-parachains 7.0.0", + "sp-arithmetic 23.0.0", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-tracing 16.0.0", + "staging-xcm 7.0.0", + "staging-xcm-executor 7.0.0", ] [[package]] @@ -16747,9 +16248,9 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37861444391815dfe05f3ee1039d19e7c82db319976832e8233729bd355de223" +checksum = "7998facd751c42ec9b11a4cf71fcdb41fb147c5c8db8bcd1281fe84f8760d515" dependencies = [ "Inflector", "proc-macro2", diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index 79a4d87cca..6156c2d1b6 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -7,7 +7,7 @@ repository.workspace = true license.workspace = true [dependencies] -clap = { version = "4.4.4", features = [ "derive" ] } +clap = { version = "4.4.18", features = [ "derive" ] } hex-literal = "0.4.1" serde_json = "1.0.111" serde = { version = "1.0.195", features = ["derive"] } @@ -17,20 +17,20 @@ polkadot-runtime-constants = { path = "../relay/polkadot/constants" } kusama-runtime = { package = "staging-kusama-runtime", path = "../relay/kusama" } kusama-runtime-constants = { path = "../relay/kusama/constants" } -sc-chain-spec = "26.0.0" -polkadot-runtime-parachains = "6.0.0" -polkadot-primitives = "6.0.0" -sp-consensus-babe = "0.31.0" -sp-authority-discovery = "25.0.0" -sp-core = "27.0.0" -pallet-staking = "27.0.0" -sc-consensus-grandpa = "0.18.0" -pallet-im-online = "26.0.0" -sp-runtime = "30.0.1" -sp-consensus-beefy = "12.0.0" -xcm = { package = "staging-xcm", version = "6.0.0" } -parachains-common = { version = "6.0.0" } -cumulus-primitives-core = { version = "0.6.0" } +sc-chain-spec = "27.0.0" +polkadot-runtime-parachains = "7.0.0" +polkadot-primitives = "7.0.0" +sp-consensus-babe = "0.32.0" +sp-authority-discovery = "26.0.0" +sp-core = "28.0.0" +pallet-staking = "28.0.0" +sc-consensus-grandpa = "0.19.0" +pallet-im-online = "27.0.0" +sp-runtime = "31.0.1" +sp-consensus-beefy = "13.0.0" +xcm = { package = "staging-xcm", version = "7.0.0" } +parachains-common = { version = "7.0.0" } +cumulus-primitives-core = { version = "0.7.0" } asset-hub-polkadot-runtime = { path = "../system-parachains/asset-hubs/asset-hub-polkadot" } asset-hub-kusama-runtime = { path = "../system-parachains/asset-hubs/asset-hub-kusama" } diff --git a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml index 792f3d8bc4..570836830a 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml @@ -12,22 +12,22 @@ codec = { package = "parity-scale-codec", version = "3.6.9" } assert_matches = "1.5.0" # Substrate -sp-runtime = { version = "30.0.1" } -frame-support = { version = "27.0.0" } -pallet-assets = { version = "28.0.0" } -pallet-balances = { version = "27.0.0" } -pallet-asset-conversion = { version = "9.0.0" } -pallet-message-queue = { version = "30.0.0" } +sp-runtime = { version = "31.0.1" } +frame-support = { version = "28.0.0" } +pallet-assets = { version = "29.0.0" } +pallet-balances = { version = "28.0.0" } +pallet-asset-conversion = { version = "10.0.0" } +pallet-message-queue = { version = "31.0.0" } # Polkadot -xcm = { package = "staging-xcm", version = "6.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } -pallet-xcm = { version = "6.0.0" } +xcm = { package = "staging-xcm", version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.0" } +pallet-xcm = { version = "7.0.0" } # Cumulus -parachains-common = { version = "6.0.0" } -xcm-emulator = { version = "0.4.0" } -asset-test-utils = { version = "6.0.0" } +parachains-common = { version = "7.0.0" } +xcm-emulator = { version = "0.5.0" } +asset-test-utils = { version = "7.0.0" } # Local emulated-chains = { path = "../../chains" } @@ -37,4 +37,4 @@ kusama-runtime = { package = "staging-kusama-runtime", path = "../../../../relay system-parachains-constants = { path = "../../../../system-parachains/constants" } [features] -runtime-benchmarks = [] \ No newline at end of file +runtime-benchmarks = [] diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml index ff2500dd6d..fb377ac9fd 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml @@ -11,21 +11,21 @@ publish = false codec = { package = "parity-scale-codec", version = "3.6.9" } # Substrate -sp-runtime = { version = "30.0.1" } -frame-support = { version = "27.0.0" } -pallet-assets = { version = "28.0.0" } -pallet-balances = { version = "27.0.0" } -pallet-message-queue = { version = "30.0.0" } +sp-runtime = { version = "31.0.1" } +frame-support = { version = "28.0.0" } +pallet-assets = { version = "29.0.0" } +pallet-balances = { version = "28.0.0" } +pallet-message-queue = { version = "31.0.0" } # Polkadot -xcm = { package = "staging-xcm", version = "6.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } -pallet-xcm = { version = "6.0.0" } +xcm = { package = "staging-xcm", version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.0" } +pallet-xcm = { version = "7.0.0" } # Cumulus -parachains-common = { version = "6.0.0" } -xcm-emulator = { version = "0.4.0" } -asset-test-utils = { version = "6.0.0" } +parachains-common = { version = "7.0.0" } +xcm-emulator = { version = "0.5.0" } +asset-test-utils = { version = "7.0.0" } # Local emulated-chains = { path = "../../chains" } @@ -35,4 +35,4 @@ polkadot-runtime = { path = "../../../../relay/polkadot" } system-parachains-constants = { path = "../../../../system-parachains/constants" } [features] -runtime-benchmarks = [] \ No newline at end of file +runtime-benchmarks = [] diff --git a/integration-tests/emulated/chains/Cargo.toml b/integration-tests/emulated/chains/Cargo.toml index 9d2df663dc..c54e952af8 100644 --- a/integration-tests/emulated/chains/Cargo.toml +++ b/integration-tests/emulated/chains/Cargo.toml @@ -9,25 +9,25 @@ description = "Definitions of the fellows emulated relay+para runtimes" [dependencies] # Substrate -grandpa-primitives = { package = "sp-consensus-grandpa", version = "12.0.0" } -sp-authority-discovery = { version = "25.0.0" } -sp-runtime = { version = "30.0.1" } -frame-support = { version = "27.0.0" } -sp-core = { version = "27.0.0" } -sp-consensus-babe = { version = "0.31.0" } -pallet-im-online = { version = "26.0.0" } -pallet-staking = { version = "27.0.0" } -beefy-primitives = { package = "sp-consensus-beefy", version = "12.0.0" } +grandpa-primitives = { package = "sp-consensus-grandpa", version = "13.0.0" } +sp-authority-discovery = { version = "26.0.0" } +sp-runtime = { version = "31.0.1" } +frame-support = { version = "28.0.0" } +sp-core = { version = "28.0.0" } +sp-consensus-babe = { version = "0.32.0" } +pallet-im-online = { version = "27.0.0" } +pallet-staking = { version = "28.0.0" } +beefy-primitives = { package = "sp-consensus-beefy", version = "13.0.0" } # Polkadot -polkadot-primitives = { version = "6.0.0" } -polkadot-runtime-parachains = { version = "6.0.0" } -polkadot-parachain-primitives = { version = "5.0.0" } +polkadot-primitives = { version = "7.0.0" } +polkadot-runtime-parachains = { version = "7.0.0" } +polkadot-parachain-primitives = { version = "6.0.0" } # Cumulus -parachains-common = { version = "6.0.0" } -xcm-emulator = { version = "0.4.0" } -penpal-runtime = { version = "0.13.0" } +parachains-common = { version = "7.0.0" } +xcm-emulator = { version = "0.5.0" } +penpal-runtime = { version = "0.14.0" } # Local runtimes kusama-runtime = { package = "staging-kusama-runtime", path = "../../../relay/kusama" } @@ -45,4 +45,4 @@ integration-tests-common = { path = "../common" } [features] runtime-benchmarks = [ "penpal-runtime/runtime-benchmarks", -] \ No newline at end of file +] diff --git a/integration-tests/emulated/common/Cargo.toml b/integration-tests/emulated/common/Cargo.toml index e1c9c700b2..a9830821f8 100644 --- a/integration-tests/emulated/common/Cargo.toml +++ b/integration-tests/emulated/common/Cargo.toml @@ -11,34 +11,34 @@ codec = { package = "parity-scale-codec", version = "3.6.9" } paste = "1.0.14" # Substrate -grandpa-primitives = { package = "sp-consensus-grandpa", version = "12.0.0" } -sp-authority-discovery = { version = "25.0.0" } -sp-runtime = { version = "30.0.1" } -frame-support = { version = "27.0.0" } -sp-core = { version = "27.0.0" } -sp-consensus-babe = { version = "0.31.0" } -pallet-assets = { version = "28.0.0" } -pallet-balances = { version = "27.0.0" } -pallet-message-queue = { version = "30.0.0" } -pallet-im-online = { version = "26.0.0" } -beefy-primitives = { package = "sp-consensus-beefy", version = "12.0.0" } +grandpa-primitives = { package = "sp-consensus-grandpa", version = "13.0.0" } +sp-authority-discovery = { version = "26.0.0" } +sp-runtime = { version = "31.0.1" } +frame-support = { version = "28.0.0" } +sp-core = { version = "28.0.0" } +sp-consensus-babe = { version = "0.32.0" } +pallet-assets = { version = "29.0.0" } +pallet-balances = { version = "28.0.0" } +pallet-message-queue = { version = "31.0.0" } +pallet-im-online = { version = "27.0.0" } +beefy-primitives = { package = "sp-consensus-beefy", version = "13.0.0" } # Polkadot -polkadot-primitives = { version = "6.0.0" } -polkadot-runtime-parachains = { version = "6.0.0" } -xcm = { package = "staging-xcm", version = "6.0.0" } -pallet-xcm = { version = "6.0.0" } +polkadot-primitives = { version = "7.0.0" } +polkadot-runtime-parachains = { version = "7.0.0" } +xcm = { package = "staging-xcm", version = "7.0.0" } +pallet-xcm = { version = "7.0.0" } # Cumulus -parachains-common = { version = "6.0.0" } -cumulus-primitives-core = { version = "0.6.0" } -xcm-emulator = { version = "0.4.0" } -cumulus-pallet-xcmp-queue = { version = "0.6.0" } -cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook",] , version = "0.6.0" } -asset-test-utils = { version = "6.0.0" } -cumulus-pallet-dmp-queue = { version = "0.6.0" } +parachains-common = { version = "7.0.0" } +cumulus-primitives-core = { version = "0.7.0" } +xcm-emulator = { version = "0.5.0" } +cumulus-pallet-xcmp-queue = { version = "0.7.0" } +cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook",] , version = "0.7.0" } +asset-test-utils = { version = "7.0.0" } +cumulus-pallet-dmp-queue = { version = "0.7.0" } # Bridges -bp-messages = { version = "0.6.0" } -pallet-bridge-messages = { version = "0.6.0" } -bridge-runtime-common = { version = "0.6.0" } +bp-messages = { version = "0.7.0" } +pallet-bridge-messages = { version = "0.7.0" } +bridge-runtime-common = { version = "0.7.0" } diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index eaa7c9cbf0..ca07a1c7b8 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -18,116 +18,116 @@ serde = { version = "1.0.195", default-features = false } serde_derive = { version = "1.0.195", optional = true } static_assertions = "1.1.0" -authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "25.0.0" } -babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.31.0" } -beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "12.0.0" } -binary-merkle-tree = { default-features = false , version = "12.0.0" } +authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "26.0.0" } +babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.32.0" } +beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "13.0.0" } +binary-merkle-tree = { default-features = false , version = "13.0.0" } kusama-runtime-constants = { package = "kusama-runtime-constants", path = "constants", default-features = false } -sp-api = { default-features = false , version = "25.0.0" } -inherents = { package = "sp-inherents", default-features = false , version = "25.0.0" } -offchain-primitives = { package = "sp-offchain", default-features = false , version = "25.0.0" } -sp-std = { package = "sp-std", default-features = false , version = "13.0.0" } -sp-application-crypto = { default-features = false , version = "29.0.0" } -sp-arithmetic = { default-features = false , version = "22.0.0" } -sp-genesis-builder = { default-features = false , version = "0.6.0" } -sp-io = { default-features = false , version = "29.0.0" } -sp-mmr-primitives = { default-features = false , version = "25.0.0" } -sp-runtime = { default-features = false , version = "30.0.1" } -sp-staking = { default-features = false , version = "25.0.0" } -sp-core = { default-features = false , version = "27.0.0" } -sp-session = { default-features = false , version = "26.0.0" } -sp-storage = { default-features = false , version = "18.0.0" } -sp-version = { default-features = false , version = "28.0.0" } -tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "25.0.0" } -block-builder-api = { package = "sp-block-builder", default-features = false , version = "25.0.0" } -sp-npos-elections = { default-features = false , version = "25.0.0" } +sp-api = { default-features = false , version = "26.0.0" } +inherents = { package = "sp-inherents", default-features = false , version = "26.0.0" } +offchain-primitives = { package = "sp-offchain", default-features = false , version = "26.0.0" } +sp-std = { package = "sp-std", default-features = false , version = "14.0.0" } +sp-application-crypto = { default-features = false , version = "30.0.0" } +sp-arithmetic = { default-features = false , version = "23.0.0" } +sp-genesis-builder = { default-features = false , version = "0.7.0" } +sp-io = { default-features = false , version = "30.0.0" } +sp-mmr-primitives = { default-features = false , version = "26.0.0" } +sp-runtime = { default-features = false , version = "31.0.1" } +sp-staking = { default-features = false , version = "26.0.0" } +sp-core = { default-features = false , version = "28.0.0" } +sp-session = { default-features = false , version = "27.0.0" } +sp-storage = { default-features = false , version = "19.0.0" } +sp-version = { default-features = false , version = "29.0.0" } +tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "26.0.0" } +block-builder-api = { package = "sp-block-builder", default-features = false , version = "26.0.0" } +sp-npos-elections = { default-features = false , version = "26.0.0" } -pallet-asset-rate = { default-features = false , version = "6.0.0" } -pallet-authority-discovery = { default-features = false , version = "27.0.0" } -pallet-authorship = { default-features = false , version = "27.0.0" } -pallet-babe = { default-features = false , version = "27.0.0" } -pallet-bags-list = { default-features = false , version = "26.0.0" } -pallet-balances = { default-features = false , version = "27.0.0" } -pallet-beefy = { default-features = false , version = "27.0.0" } -pallet-beefy-mmr = { default-features = false , version = "27.0.0" } -pallet-bounties = { default-features = false , version = "26.0.0" } -pallet-child-bounties = { default-features = false , version = "26.0.0" } -pallet-transaction-payment = { default-features = false , version = "27.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "27.0.0" } -pallet-nomination-pools-runtime-api = { default-features = false , version = "22.0.0" } -pallet-collective = { default-features = false , version = "27.0.0" } -pallet-conviction-voting = { default-features = false , version = "27.0.0" } -pallet-democracy = { default-features = false , version = "27.0.0" } -pallet-elections-phragmen = { default-features = false , version = "28.0.0" } -pallet-election-provider-multi-phase = { default-features = false , version = "26.0.0" } -pallet-fast-unstake = { default-features = false , version = "26.0.0" } -frame-executive = { default-features = false , version = "27.0.0" } -pallet-grandpa = { default-features = false , version = "27.0.0" } -pallet-nis = { default-features = false , version = "27.0.0" } -pallet-identity = { default-features = false , version = "27.0.0" } -pallet-im-online = { default-features = false , version = "26.0.0" } -pallet-indices = { default-features = false , version = "27.0.0" } -pallet-membership = { default-features = false , version = "27.0.0" } -pallet-message-queue = { default-features = false , version = "30.0.0" } -pallet-mmr = { default-features = false , version = "26.0.0" } -pallet-multisig = { default-features = false , version = "27.0.0" } -pallet-nomination-pools = { default-features = false , version = "24.0.0" } -pallet-offences = { default-features = false , version = "26.0.0" } -pallet-preimage = { default-features = false , version = "27.0.0" } -pallet-proxy = { default-features = false , version = "27.0.0" } -pallet-ranked-collective = { default-features = false , version = "27.0.0" } -pallet-recovery = { default-features = false , version = "27.0.0" } -pallet-referenda = { default-features = false , version = "27.0.0" } -pallet-scheduler = { default-features = false , version = "28.0.0" } -pallet-session = { default-features = false , version = "27.0.0" } -pallet-society = { default-features = false, version = "27.0.0" } -frame-support = { default-features = false , version = "27.0.0" } -pallet-staking = { default-features = false , version = "27.0.0" } -pallet-state-trie-migration = { default-features = false , version = "28.0.0" } -pallet-staking-runtime-api = { default-features = false , version = "13.0.0" } -frame-system = { default-features = false , version = "27.0.0" } -frame-system-rpc-runtime-api = { default-features = false , version = "25.0.0" } -pallet-timestamp = { default-features = false , version = "26.0.0" } -pallet-tips = { default-features = false , version = "26.0.0" } -pallet-treasury = { default-features = false , version = "26.0.0" } -pallet-utility = { default-features = false , version = "27.0.0" } -pallet-vesting = { default-features = false , version = "27.0.0" } -pallet-whitelist = { default-features = false , version = "26.0.0" } -pallet-xcm = { default-features = false , version = "6.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } -frame-election-provider-support = { default-features = false , version = "27.0.0" } +pallet-asset-rate = { default-features = false , version = "7.0.0" } +pallet-authority-discovery = { default-features = false , version = "28.0.0" } +pallet-authorship = { default-features = false , version = "28.0.0" } +pallet-babe = { default-features = false , version = "28.0.0" } +pallet-bags-list = { default-features = false , version = "27.0.0" } +pallet-balances = { default-features = false , version = "28.0.0" } +pallet-beefy = { default-features = false , version = "28.0.0" } +pallet-beefy-mmr = { default-features = false , version = "28.0.0" } +pallet-bounties = { default-features = false , version = "27.0.0" } +pallet-child-bounties = { default-features = false , version = "27.0.0" } +pallet-transaction-payment = { default-features = false , version = "28.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "28.0.0" } +pallet-nomination-pools-runtime-api = { default-features = false , version = "23.0.0" } +pallet-collective = { default-features = false , version = "28.0.0" } +pallet-conviction-voting = { default-features = false , version = "28.0.0" } +pallet-democracy = { default-features = false , version = "28.0.0" } +pallet-elections-phragmen = { default-features = false , version = "29.0.0" } +pallet-election-provider-multi-phase = { default-features = false , version = "27.0.0" } +pallet-fast-unstake = { default-features = false , version = "27.0.0" } +frame-executive = { default-features = false , version = "28.0.0" } +pallet-grandpa = { default-features = false , version = "28.0.0" } +pallet-nis = { default-features = false , version = "28.0.0" } +pallet-identity = { default-features = false , version = "28.0.0" } +pallet-im-online = { default-features = false , version = "27.0.0" } +pallet-indices = { default-features = false , version = "28.0.0" } +pallet-membership = { default-features = false , version = "28.0.0" } +pallet-message-queue = { default-features = false , version = "31.0.0" } +pallet-mmr = { default-features = false , version = "27.0.0" } +pallet-multisig = { default-features = false , version = "28.0.0" } +pallet-nomination-pools = { default-features = false , version = "25.0.0" } +pallet-offences = { default-features = false , version = "27.0.0" } +pallet-preimage = { default-features = false , version = "28.0.0" } +pallet-proxy = { default-features = false , version = "28.0.0" } +pallet-ranked-collective = { default-features = false , version = "28.0.0" } +pallet-recovery = { default-features = false , version = "28.0.0" } +pallet-referenda = { default-features = false , version = "28.0.0" } +pallet-scheduler = { default-features = false , version = "29.0.0" } +pallet-session = { default-features = false , version = "28.0.0" } +pallet-society = { default-features = false, version = "28.0.0" } +frame-support = { default-features = false , version = "28.0.0" } +pallet-staking = { default-features = false , version = "28.0.0" } +pallet-state-trie-migration = { default-features = false , version = "29.0.0" } +pallet-staking-runtime-api = { default-features = false , version = "14.0.0" } +frame-system = { default-features = false , version = "28.0.0" } +frame-system-rpc-runtime-api = { default-features = false , version = "26.0.0" } +pallet-timestamp = { default-features = false , version = "27.0.0" } +pallet-tips = { default-features = false , version = "27.0.0" } +pallet-treasury = { default-features = false , version = "27.0.0" } +pallet-utility = { default-features = false , version = "28.0.0" } +pallet-vesting = { default-features = false , version = "28.0.0" } +pallet-whitelist = { default-features = false , version = "27.0.0" } +pallet-xcm = { default-features = false , version = "7.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.0" } +frame-election-provider-support = { default-features = false , version = "28.0.0" } -frame-benchmarking = { default-features = false, optional = true , version = "27.0.0" } -frame-try-runtime = { default-features = false, optional = true , version = "0.33.0" } -pallet-offences-benchmarking = { default-features = false, optional = true , version = "27.0.0" } -pallet-session-benchmarking = { default-features = false, optional = true , version = "27.0.0" } -pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "25.0.0" } -frame-system-benchmarking = { default-features = false, optional = true , version = "27.0.0" } -pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "26.0.0" } +frame-benchmarking = { default-features = false, optional = true , version = "28.0.0" } +frame-try-runtime = { default-features = false, optional = true , version = "0.34.0" } +pallet-offences-benchmarking = { default-features = false, optional = true , version = "28.0.0" } +pallet-session-benchmarking = { default-features = false, optional = true , version = "28.0.0" } +pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "26.0.0" } +frame-system-benchmarking = { default-features = false, optional = true , version = "28.0.0" } +pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "27.0.0" } hex-literal = "0.4.1" -runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "6.0.0" } -runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "6.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "6.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "7.0.0" } +runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "7.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "7.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "6.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "6.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "6.0.0" } +xcm = { package = "staging-xcm", default-features = false , version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "7.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "7.0.0" } -sp-debug-derive = { default-features = false, version = "13.0.0" } +sp-debug-derive = { default-features = false, version = "14.0.0" } [dev-dependencies] tiny-keccak = { version = "2.0.2", features = ["keccak"] } -keyring = { package = "sp-keyring", version = "30.0.0" } -sp-trie = { version = "28.0.0" } +keyring = { package = "sp-keyring", version = "31.0.0" } +sp-trie = { version = "29.0.0" } separator = "0.4.1" serde_json = "1.0.111" -remote-externalities = { package = "frame-remote-externalities", version = "0.34.0" } +remote-externalities = { package = "frame-remote-externalities", version = "0.35.0" } tokio = { version = "1.35.1", features = ["macros"] } -sp-tracing = { default-features = false , version = "15.0.0" } +sp-tracing = { default-features = false , version = "16.0.0" } [build-dependencies] -substrate-wasm-builder = { version = "16.0.0" } +substrate-wasm-builder = { version = "17.0.0" } [features] default = [ "std" ] diff --git a/relay/kusama/constants/Cargo.toml b/relay/kusama/constants/Cargo.toml index 0d7da2911c..99e9e84975 100644 --- a/relay/kusama/constants/Cargo.toml +++ b/relay/kusama/constants/Cargo.toml @@ -9,14 +9,14 @@ license.workspace = true [dependencies] smallvec = "1.13.1" -frame-support = { default-features = false , version = "27.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "6.0.0" } -runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "6.0.0" } -sp-runtime = { default-features = false , version = "30.0.1" } -sp-weights = { default-features = false , version = "26.0.0" } -sp-core = { default-features = false , version = "27.0.0" } +frame-support = { default-features = false , version = "28.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "7.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "7.0.0" } +sp-runtime = { default-features = false , version = "31.0.1" } +sp-weights = { default-features = false , version = "27.0.0" } +sp-core = { default-features = false , version = "28.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "6.0.0" } +xcm = { package = "staging-xcm", default-features = false , version = "7.0.0" } [features] default = [ "std" ] diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index 62e8fd97ff..d2465cd6f7 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -17,114 +17,114 @@ serde = { version = "1.0.195", default-features = false } serde_derive = { version = "1.0.195", optional = true } static_assertions = "1.1.0" -authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "25.0.0" } -babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.31.0" } -beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "12.0.0" } -binary-merkle-tree = { default-features = false , version = "12.0.0" } -block-builder-api = { package = "sp-block-builder", default-features = false , version = "25.0.0" } -inherents = { package = "sp-inherents", default-features = false , version = "25.0.0" } -offchain-primitives = { package = "sp-offchain", default-features = false , version = "25.0.0" } -tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "25.0.0" } -sp-arithmetic = { default-features = false , version = "22.0.0" } -sp-api = { default-features = false , version = "25.0.0" } -sp-genesis-builder = { default-features = false , version = "0.6.0" } -sp-std = { default-features = false , version = "13.0.0" } -sp-application-crypto = { default-features = false , version = "29.0.0" } -sp-io = { default-features = false , version = "29.0.0" } -sp-mmr-primitives = { default-features = false , version = "25.0.0" } -sp-runtime = { default-features = false , version = "30.0.1" } -sp-staking = { default-features = false , version = "25.0.0" } -sp-core = { default-features = false , version = "27.0.0" } -sp-session = { default-features = false , version = "26.0.0" } -sp-storage = { default-features = false , version = "18.0.0" } -sp-version = { default-features = false , version = "28.0.0" } -sp-npos-elections = { default-features = false , version = "25.0.0" } +authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "26.0.0" } +babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.32.0" } +beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "13.0.0" } +binary-merkle-tree = { default-features = false , version = "13.0.0" } +block-builder-api = { package = "sp-block-builder", default-features = false , version = "26.0.0" } +inherents = { package = "sp-inherents", default-features = false , version = "26.0.0" } +offchain-primitives = { package = "sp-offchain", default-features = false , version = "26.0.0" } +tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "26.0.0" } +sp-arithmetic = { default-features = false , version = "23.0.0" } +sp-api = { default-features = false , version = "26.0.0" } +sp-genesis-builder = { default-features = false , version = "0.7.0" } +sp-std = { default-features = false , version = "14.0.0" } +sp-application-crypto = { default-features = false , version = "30.0.0" } +sp-io = { default-features = false , version = "30.0.0" } +sp-mmr-primitives = { default-features = false , version = "26.0.0" } +sp-runtime = { default-features = false , version = "31.0.1" } +sp-staking = { default-features = false , version = "26.0.0" } +sp-core = { default-features = false , version = "28.0.0" } +sp-session = { default-features = false , version = "27.0.0" } +sp-storage = { default-features = false , version = "19.0.0" } +sp-version = { default-features = false , version = "29.0.0" } +sp-npos-elections = { default-features = false , version = "26.0.0" } -pallet-asset-rate = { default-features = false , version = "6.0.0" } -pallet-authority-discovery = { default-features = false , version = "27.0.0" } -pallet-authorship = { default-features = false , version = "27.0.0" } -pallet-babe = { default-features = false , version = "27.0.0" } -pallet-bags-list = { default-features = false , version = "26.0.0" } -pallet-balances = { default-features = false , version = "27.0.0" } -pallet-beefy = { default-features = false , version = "27.0.0" } -pallet-beefy-mmr = { default-features = false , version = "27.0.0" } -pallet-bounties = { default-features = false , version = "26.0.0" } -pallet-child-bounties = { default-features = false , version = "26.0.0" } -pallet-transaction-payment = { default-features = false , version = "27.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "27.0.0" } -pallet-collective = { default-features = false , version = "27.0.0" } -pallet-conviction-voting = { default-features = false , version = "27.0.0" } -pallet-democracy = { default-features = false , version = "27.0.0" } -pallet-elections-phragmen = { default-features = false , version = "28.0.0" } -pallet-election-provider-multi-phase = { default-features = false , version = "26.0.0" } -pallet-fast-unstake = { default-features = false , version = "26.0.0" } -frame-executive = { default-features = false , version = "27.0.0" } -pallet-grandpa = { default-features = false , version = "27.0.0" } -pallet-identity = { default-features = false , version = "27.0.0" } -pallet-im-online = { default-features = false , version = "26.0.0" } -pallet-indices = { default-features = false , version = "27.0.0" } -pallet-membership = { default-features = false , version = "27.0.0" } -pallet-message-queue = { default-features = false , version = "30.0.0" } -pallet-mmr = { default-features = false , version = "26.0.0" } -pallet-multisig = { default-features = false , version = "27.0.0" } -pallet-nomination-pools = { default-features = false , version = "24.0.0" } -pallet-nomination-pools-runtime-api = { default-features = false , version = "22.0.0" } -pallet-offences = { default-features = false , version = "26.0.0" } -pallet-preimage = { default-features = false , version = "27.0.0" } -pallet-proxy = { default-features = false , version = "27.0.0" } -pallet-referenda = { default-features = false , version = "27.0.0" } -pallet-scheduler = { default-features = false , version = "28.0.0" } -pallet-session = { default-features = false , version = "27.0.0" } -frame-support = { default-features = false , version = "27.0.0" } -pallet-staking = { default-features = false , version = "27.0.0" } -pallet-staking-reward-fn = { default-features = false, version = "18.0.0" } -pallet-staking-reward-curve = { version = "10.0.0" } -pallet-staking-runtime-api = { default-features = false , version = "13.0.0" } -frame-system = { default-features = false , version = "27.0.0" } -frame-system-rpc-runtime-api = { default-features = false , version = "25.0.0" } +pallet-asset-rate = { default-features = false , version = "7.0.0" } +pallet-authority-discovery = { default-features = false , version = "28.0.0" } +pallet-authorship = { default-features = false , version = "28.0.0" } +pallet-babe = { default-features = false , version = "28.0.0" } +pallet-bags-list = { default-features = false , version = "27.0.0" } +pallet-balances = { default-features = false , version = "28.0.0" } +pallet-beefy = { default-features = false , version = "28.0.0" } +pallet-beefy-mmr = { default-features = false , version = "28.0.0" } +pallet-bounties = { default-features = false , version = "27.0.0" } +pallet-child-bounties = { default-features = false , version = "27.0.0" } +pallet-transaction-payment = { default-features = false , version = "28.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "28.0.0" } +pallet-collective = { default-features = false , version = "28.0.0" } +pallet-conviction-voting = { default-features = false , version = "28.0.0" } +pallet-democracy = { default-features = false , version = "28.0.0" } +pallet-elections-phragmen = { default-features = false , version = "29.0.0" } +pallet-election-provider-multi-phase = { default-features = false , version = "27.0.0" } +pallet-fast-unstake = { default-features = false , version = "27.0.0" } +frame-executive = { default-features = false , version = "28.0.0" } +pallet-grandpa = { default-features = false , version = "28.0.0" } +pallet-identity = { default-features = false , version = "28.0.0" } +pallet-im-online = { default-features = false , version = "27.0.0" } +pallet-indices = { default-features = false , version = "28.0.0" } +pallet-membership = { default-features = false , version = "28.0.0" } +pallet-message-queue = { default-features = false , version = "31.0.0" } +pallet-mmr = { default-features = false , version = "27.0.0" } +pallet-multisig = { default-features = false , version = "28.0.0" } +pallet-nomination-pools = { default-features = false , version = "25.0.0" } +pallet-nomination-pools-runtime-api = { default-features = false , version = "23.0.0" } +pallet-offences = { default-features = false , version = "27.0.0" } +pallet-preimage = { default-features = false , version = "28.0.0" } +pallet-proxy = { default-features = false , version = "28.0.0" } +pallet-referenda = { default-features = false , version = "28.0.0" } +pallet-scheduler = { default-features = false , version = "29.0.0" } +pallet-session = { default-features = false , version = "28.0.0" } +frame-support = { default-features = false , version = "28.0.0" } +pallet-staking = { default-features = false , version = "28.0.0" } +pallet-staking-reward-fn = { default-features = false, version = "19.0.0" } +pallet-staking-reward-curve = { version = "11.0.0" } +pallet-staking-runtime-api = { default-features = false , version = "14.0.0" } +frame-system = { default-features = false , version = "28.0.0" } +frame-system-rpc-runtime-api = { default-features = false , version = "26.0.0" } polkadot-runtime-constants = { package = "polkadot-runtime-constants", path = "constants", default-features = false } -pallet-timestamp = { default-features = false , version = "26.0.0" } -pallet-tips = { default-features = false , version = "26.0.0" } -pallet-treasury = { default-features = false , version = "26.0.0" } -pallet-whitelist = { default-features = false , version = "26.0.0" } -pallet-vesting = { default-features = false , version = "27.0.0" } -pallet-utility = { default-features = false , version = "27.0.0" } -frame-election-provider-support = { default-features = false , version = "27.0.0" } -pallet-xcm = { default-features = false, version = "6.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } +pallet-timestamp = { default-features = false , version = "27.0.0" } +pallet-tips = { default-features = false , version = "27.0.0" } +pallet-treasury = { default-features = false , version = "27.0.0" } +pallet-whitelist = { default-features = false , version = "27.0.0" } +pallet-vesting = { default-features = false , version = "28.0.0" } +pallet-utility = { default-features = false , version = "28.0.0" } +frame-election-provider-support = { default-features = false , version = "28.0.0" } +pallet-xcm = { default-features = false, version = "7.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.0" } -frame-benchmarking = { default-features = false, optional = true , version = "27.0.0" } -frame-try-runtime = { default-features = false, optional = true , version = "0.33.0" } -frame-system-benchmarking = { default-features = false, optional = true , version = "27.0.0" } -pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "26.0.0" } -pallet-offences-benchmarking = { default-features = false, optional = true , version = "27.0.0" } -pallet-session-benchmarking = { default-features = false, optional = true , version = "27.0.0" } -pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "25.0.0" } +frame-benchmarking = { default-features = false, optional = true , version = "28.0.0" } +frame-try-runtime = { default-features = false, optional = true , version = "0.34.0" } +frame-system-benchmarking = { default-features = false, optional = true , version = "28.0.0" } +pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +pallet-offences-benchmarking = { default-features = false, optional = true , version = "28.0.0" } +pallet-session-benchmarking = { default-features = false, optional = true , version = "28.0.0" } +pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "26.0.0" } hex-literal = { version = "0.4.1", optional = true } -runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "6.0.0" } -runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "6.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "6.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "7.0.0" } +runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "7.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "7.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "6.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "6.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "6.0.0" } +xcm = { package = "staging-xcm", default-features = false , version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "7.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "7.0.0" } -sp-debug-derive = { default-features = false, version = "13.0.0" } +sp-debug-derive = { default-features = false, version = "14.0.0" } [dev-dependencies] hex-literal = "0.4.1" tiny-keccak = { version = "2.0.2", features = ["keccak"] } -keyring = { package = "sp-keyring", version = "30.0.0" } -sp-trie = { version = "28.0.0" } +keyring = { package = "sp-keyring", version = "31.0.0" } +sp-trie = { version = "29.0.0" } serde_json = "1.0.111" separator = "0.4.1" -remote-externalities = { package = "frame-remote-externalities", version = "0.34.0" } +remote-externalities = { package = "frame-remote-externalities", version = "0.35.0" } tokio = { version = "1.35.1", features = ["macros"] } -sp-tracing = { default-features = false , version = "15.0.0" } +sp-tracing = { default-features = false , version = "16.0.0" } [build-dependencies] -substrate-wasm-builder = { version = "16.0.0" } +substrate-wasm-builder = { version = "17.0.0" } [features] default = [ "std" ] diff --git a/relay/polkadot/constants/Cargo.toml b/relay/polkadot/constants/Cargo.toml index bb07bfb6a4..9aca9fd84a 100644 --- a/relay/polkadot/constants/Cargo.toml +++ b/relay/polkadot/constants/Cargo.toml @@ -9,14 +9,14 @@ license.workspace = true [dependencies] smallvec = "1.13.1" -frame-support = { default-features = false , version = "27.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "6.0.0" } -runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "6.0.0" } -sp-runtime = { default-features = false , version = "30.0.1" } -sp-weights = { default-features = false , version = "26.0.0" } -sp-core = { default-features = false , version = "27.0.0" } +frame-support = { default-features = false , version = "28.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "7.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "7.0.0" } +sp-runtime = { default-features = false , version = "31.0.1" } +sp-weights = { default-features = false , version = "27.0.0" } +sp-core = { default-features = false , version = "28.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "6.0.0" } +xcm = { package = "staging-xcm", default-features = false , version = "7.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index 91030bd990..2143eb67c3 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -23,84 +23,84 @@ kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-f polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } -frame-executive = { default-features = false, version = "27.0.0" } -frame-support = { default-features = false, version = "27.0.0" } -frame-system = { default-features = false, version = "27.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } -pallet-asset-conversion-tx-payment = { default-features = false, version = "9.0.0" } -pallet-assets = { default-features = false, version = "28.0.0" } -pallet-asset-conversion = { default-features = false, version = "9.0.0" } -pallet-aura = { default-features = false, version = "26.0.0" } -pallet-authorship = { default-features = false, version = "27.0.0" } -pallet-balances = { default-features = false, version = "27.0.0" } -pallet-message-queue = { default-features = false , version = "30.0.0" } -pallet-multisig = { default-features = false, version = "27.0.0" } -pallet-nft-fractionalization = { default-features = false, version = "9.0.0" } -pallet-nfts = { default-features = false, version = "21.0.0" } -pallet-nfts-runtime-api = { default-features = false, version = "13.0.0" } -pallet-proxy = { default-features = false, version = "27.0.0" } -pallet-session = { default-features = false, version = "27.0.0" } -pallet-state-trie-migration = { default-features = false, optional = true , version = "28.0.0" } -pallet-timestamp = { default-features = false, version = "26.0.0" } -pallet-transaction-payment = { default-features = false, version = "27.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "27.0.0" } -pallet-uniques = { default-features = false, version = "27.0.0" } -pallet-utility = { default-features = false, version = "27.0.0" } -sp-api = { default-features = false, version = "25.0.0" } -sp-block-builder = { default-features = false, version = "25.0.0" } -sp-consensus-aura = { default-features = false, version = "0.31.0" } -sp-core = { default-features = false, version = "27.0.0" } -sp-genesis-builder = { default-features = false , version = "0.6.0" } -sp-inherents = { default-features = false, version = "25.0.0" } -sp-offchain = { default-features = false, version = "25.0.0" } -sp-runtime = { default-features = false, version = "30.0.1" } -sp-session = { default-features = false, version = "26.0.0" } -sp-std = { default-features = false, version = "13.0.0" } -sp-storage = { default-features = false, version = "18.0.0" } -sp-transaction-pool = { default-features = false, version = "25.0.0" } -sp-version = { default-features = false, version = "28.0.0" } -sp-weights = { default-features = false, version = "26.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "28.0.0" } +frame-executive = { default-features = false, version = "28.0.0" } +frame-support = { default-features = false, version = "28.0.0" } +frame-system = { default-features = false, version = "28.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "28.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "26.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.34.0" } +pallet-asset-conversion-tx-payment = { default-features = false, version = "10.0.0" } +pallet-assets = { default-features = false, version = "29.0.0" } +pallet-asset-conversion = { default-features = false, version = "10.0.0" } +pallet-aura = { default-features = false, version = "27.0.0" } +pallet-authorship = { default-features = false, version = "28.0.0" } +pallet-balances = { default-features = false, version = "28.0.0" } +pallet-message-queue = { default-features = false , version = "31.0.0" } +pallet-multisig = { default-features = false, version = "28.0.0" } +pallet-nft-fractionalization = { default-features = false, version = "10.0.0" } +pallet-nfts = { default-features = false, version = "22.0.0" } +pallet-nfts-runtime-api = { default-features = false, version = "14.0.0" } +pallet-proxy = { default-features = false, version = "28.0.0" } +pallet-session = { default-features = false, version = "28.0.0" } +pallet-state-trie-migration = { default-features = false, optional = true , version = "29.0.0" } +pallet-timestamp = { default-features = false, version = "27.0.0" } +pallet-transaction-payment = { default-features = false, version = "28.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "28.0.0" } +pallet-uniques = { default-features = false, version = "28.0.0" } +pallet-utility = { default-features = false, version = "28.0.0" } +sp-api = { default-features = false, version = "26.0.0" } +sp-block-builder = { default-features = false, version = "26.0.0" } +sp-consensus-aura = { default-features = false, version = "0.32.0" } +sp-core = { default-features = false, version = "28.0.0" } +sp-genesis-builder = { default-features = false , version = "0.7.0" } +sp-inherents = { default-features = false, version = "26.0.0" } +sp-offchain = { default-features = false, version = "26.0.0" } +sp-runtime = { default-features = false, version = "31.0.1" } +sp-session = { default-features = false, version = "27.0.0" } +sp-std = { default-features = false, version = "14.0.0" } +sp-storage = { default-features = false, version = "19.0.0" } +sp-transaction-pool = { default-features = false, version = "26.0.0" } +sp-version = { default-features = false, version = "29.0.0" } +sp-weights = { default-features = false, version = "27.0.0" } # num-traits feature needed for dex integer sq root: primitive-types = { version = "0.12.2", default-features = false, features = ["codec", "scale-info", "num-traits"] } # Polkadot -pallet-xcm = { default-features = false, version = "6.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } -polkadot-core-primitives = { default-features = false, version = "6.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } -polkadot-runtime-common = { default-features = false, version = "6.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } +pallet-xcm = { default-features = false, version = "7.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.0" } +polkadot-core-primitives = { default-features = false, version = "7.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "6.0.0" } +polkadot-runtime-common = { default-features = false, version = "7.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "7.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.6.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } -cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.6.0" } -cumulus-primitives-core = { default-features = false , version = "0.6.0" } -cumulus-primitives-utility = { default-features = false , version = "0.6.0" } -pallet-collator-selection = { default-features = false , version = "8.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } -parachains-common = { default-features = false , version = "6.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.7.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.7.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.7.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "9.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.7.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.7.0" } +cumulus-primitives-core = { default-features = false , version = "0.7.0" } +cumulus-primitives-utility = { default-features = false , version = "0.7.0" } +pallet-collator-selection = { default-features = false , version = "9.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.7.0" } +parachains-common = { default-features = false , version = "7.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } -assets-common = { default-features = false , version = "0.6.0" } +assets-common = { default-features = false , version = "0.7.0" } # Bridges -pallet-xcm-bridge-hub-router = { default-features = false , version = "0.4.0" } +pallet-xcm-bridge-hub-router = { default-features = false , version = "0.5.0" } [dev-dependencies] -asset-test-utils = { version = "6.0.0" } -parachains-runtimes-test-utils = { version = "6.0.0" } -sp-io = { version = "29.0.0" } +asset-test-utils = { version = "7.0.0" } +parachains-runtimes-test-utils = { version = "7.0.0" } +sp-io = { version = "30.0.0" } [build-dependencies] -substrate-wasm-builder = { optional = true , version = "16.0.0" } +substrate-wasm-builder = { optional = true , version = "17.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml index 2382481ca3..6f45d8ebda 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml @@ -12,14 +12,14 @@ codec = { package = "parity-scale-codec", version = "3.6.9", default-features = scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # Bridge Dependencies -bp-xcm-bridge-hub-router = { default-features = false , version = "0.5.0" } +bp-xcm-bridge-hub-router = { default-features = false , version = "0.6.0" } # Substrate Based Dependencies -frame-support = { default-features = false, version = "27.0.0" } -sp-std = { default-features = false, version = "13.0.0" } +frame-support = { default-features = false, version = "28.0.0" } +sp-std = { default-features = false, version = "14.0.0" } # Polkadot -xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "7.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 83d83e6e51..bfd7926282 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -23,80 +23,80 @@ kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-f polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } -frame-executive = { default-features = false, version = "27.0.0" } -frame-support = { default-features = false, version = "27.0.0" } -frame-system = { default-features = false, version = "27.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } -pallet-asset-tx-payment = { default-features = false , version = "27.0.0" } -pallet-assets = { default-features = false, version = "28.0.0" } -pallet-aura = { default-features = false, version = "26.0.0" } -pallet-authorship = { default-features = false, version = "27.0.0" } -pallet-balances = { default-features = false, version = "27.0.0" } -pallet-message-queue = { default-features = false , version = "30.0.0" } -pallet-multisig = { default-features = false, version = "27.0.0" } -pallet-nfts = { default-features = false, version = "21.0.0" } -pallet-nfts-runtime-api = { default-features = false, version = "13.0.0" } -pallet-proxy = { default-features = false, version = "27.0.0" } -pallet-session = { default-features = false, version = "27.0.0" } -pallet-timestamp = { default-features = false, version = "26.0.0" } -pallet-transaction-payment = { default-features = false, version = "27.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "27.0.0" } -pallet-uniques = { default-features = false, version = "27.0.0" } -pallet-utility = { default-features = false, version = "27.0.0" } -sp-api = { default-features = false, version = "25.0.0" } -sp-block-builder = { default-features = false, version = "25.0.0" } -sp-consensus-aura = { default-features = false, version = "0.31.0" } -sp-core = { default-features = false, version = "27.0.0" } -sp-genesis-builder = { default-features = false , version = "0.6.0" } -sp-inherents = { default-features = false, version = "25.0.0" } -sp-offchain = { default-features = false, version = "25.0.0" } -sp-runtime = { default-features = false, version = "30.0.1" } -sp-session = { default-features = false, version = "26.0.0" } -sp-std = { default-features = false, version = "13.0.0" } -sp-storage = { default-features = false, version = "18.0.0" } -sp-transaction-pool = { default-features = false, version = "25.0.0" } -sp-version = { default-features = false, version = "28.0.0" } -sp-weights = { default-features = false, version = "26.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "28.0.0" } +frame-executive = { default-features = false, version = "28.0.0" } +frame-support = { default-features = false, version = "28.0.0" } +frame-system = { default-features = false, version = "28.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "28.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "26.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.34.0" } +pallet-asset-tx-payment = { default-features = false , version = "28.0.0" } +pallet-assets = { default-features = false, version = "29.0.0" } +pallet-aura = { default-features = false, version = "27.0.0" } +pallet-authorship = { default-features = false, version = "28.0.0" } +pallet-balances = { default-features = false, version = "28.0.0" } +pallet-message-queue = { default-features = false , version = "31.0.0" } +pallet-multisig = { default-features = false, version = "28.0.0" } +pallet-nfts = { default-features = false, version = "22.0.0" } +pallet-nfts-runtime-api = { default-features = false, version = "14.0.0" } +pallet-proxy = { default-features = false, version = "28.0.0" } +pallet-session = { default-features = false, version = "28.0.0" } +pallet-timestamp = { default-features = false, version = "27.0.0" } +pallet-transaction-payment = { default-features = false, version = "28.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "28.0.0" } +pallet-uniques = { default-features = false, version = "28.0.0" } +pallet-utility = { default-features = false, version = "28.0.0" } +sp-api = { default-features = false, version = "26.0.0" } +sp-block-builder = { default-features = false, version = "26.0.0" } +sp-consensus-aura = { default-features = false, version = "0.32.0" } +sp-core = { default-features = false, version = "28.0.0" } +sp-genesis-builder = { default-features = false , version = "0.7.0" } +sp-inherents = { default-features = false, version = "26.0.0" } +sp-offchain = { default-features = false, version = "26.0.0" } +sp-runtime = { default-features = false, version = "31.0.1" } +sp-session = { default-features = false, version = "27.0.0" } +sp-std = { default-features = false, version = "14.0.0" } +sp-storage = { default-features = false, version = "19.0.0" } +sp-transaction-pool = { default-features = false, version = "26.0.0" } +sp-version = { default-features = false, version = "29.0.0" } +sp-weights = { default-features = false, version = "27.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "6.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } -polkadot-core-primitives = { default-features = false, version = "6.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } -polkadot-runtime-common = { default-features = false, version = "6.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } +pallet-xcm = { default-features = false, version = "7.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.0" } +polkadot-core-primitives = { default-features = false, version = "7.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "6.0.0" } +polkadot-runtime-common = { default-features = false, version = "7.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "7.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.6.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } -cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.6.0" } -cumulus-primitives-core = { default-features = false , version = "0.6.0" } -cumulus-primitives-utility = { default-features = false , version = "0.6.0" } -pallet-collator-selection = { default-features = false , version = "8.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } -parachains-common = { default-features = false , version = "6.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.7.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.7.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.7.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "9.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.7.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.7.0" } +cumulus-primitives-core = { default-features = false , version = "0.7.0" } +cumulus-primitives-utility = { default-features = false , version = "0.7.0" } +pallet-collator-selection = { default-features = false , version = "9.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.7.0" } +parachains-common = { default-features = false , version = "7.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } -assets-common = { default-features = false , version = "0.6.0" } +assets-common = { default-features = false , version = "0.7.0" } # Bridges -pallet-xcm-bridge-hub-router = { default-features = false , version = "0.4.0" } +pallet-xcm-bridge-hub-router = { default-features = false , version = "0.5.0" } [dev-dependencies] hex-literal = "0.4.1" -asset-test-utils = { version = "6.0.0" } -parachains-runtimes-test-utils = { version = "6.0.0" } -sp-io = { version = "29.0.0" } +asset-test-utils = { version = "7.0.0" } +parachains-runtimes-test-utils = { version = "7.0.0" } +sp-io = { version = "30.0.0" } [build-dependencies] -substrate-wasm-builder = { optional = true , version = "16.0.0" } +substrate-wasm-builder = { optional = true , version = "17.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml index f881bbcde7..6ac886036c 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml @@ -12,14 +12,14 @@ codec = { package = "parity-scale-codec", version = "3.6.9", default-features = scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # Bridge Dependencies -bp-xcm-bridge-hub-router = { default-features = false , version = "0.5.0" } +bp-xcm-bridge-hub-router = { default-features = false , version = "0.6.0" } # Substrate Based Dependencies -frame-support = { default-features = false, version = "27.0.0" } -sp-std = { default-features = false, version = "13.0.0" } +frame-support = { default-features = false, version = "28.0.0" } +sp-std = { default-features = false, version = "14.0.0" } # Polkadot -xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "7.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 58b584fe6f..d2fd959b6b 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -9,7 +9,7 @@ repository.workspace = true version.workspace = true [build-dependencies] -substrate-wasm-builder = { optional = true , version = "16.0.0" } +substrate-wasm-builder = { optional = true , version = "17.0.0" } [dependencies] codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive"] } @@ -27,82 +27,82 @@ kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-f polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } -frame-executive = { default-features = false, version = "27.0.0" } -frame-support = { default-features = false, version = "27.0.0" } -frame-system = { default-features = false, version = "27.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } -pallet-aura = { default-features = false, version = "26.0.0" } -pallet-authorship = { default-features = false, version = "27.0.0" } -pallet-balances = { default-features = false, version = "27.0.0" } -pallet-message-queue = { default-features = false , version = "30.0.0" } -pallet-multisig = { default-features = false, version = "27.0.0" } -pallet-session = { default-features = false, version = "27.0.0" } -pallet-timestamp = { default-features = false, version = "26.0.0" } -pallet-transaction-payment = { default-features = false, version = "27.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "27.0.0" } -pallet-utility = { default-features = false, version = "27.0.0" } -sp-api = { default-features = false, version = "25.0.0" } -sp-block-builder = { default-features = false, version = "25.0.0" } -sp-consensus-aura = { default-features = false, version = "0.31.0" } -sp-core = { default-features = false, version = "27.0.0" } -sp-genesis-builder = { default-features = false , version = "0.6.0" } -sp-inherents = { default-features = false, version = "25.0.0" } -sp-io = { default-features = false, version = "29.0.0" } -sp-offchain = { default-features = false, version = "25.0.0" } -sp-runtime = { default-features = false, version = "30.0.1" } -sp-session = { default-features = false, version = "26.0.0" } -sp-std = { default-features = false, version = "13.0.0" } -sp-storage = { default-features = false, version = "18.0.0" } -sp-transaction-pool = { default-features = false, version = "25.0.0" } -sp-version = { default-features = false, version = "28.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "28.0.0" } +frame-executive = { default-features = false, version = "28.0.0" } +frame-support = { default-features = false, version = "28.0.0" } +frame-system = { default-features = false, version = "28.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "28.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "26.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.34.0" } +pallet-aura = { default-features = false, version = "27.0.0" } +pallet-authorship = { default-features = false, version = "28.0.0" } +pallet-balances = { default-features = false, version = "28.0.0" } +pallet-message-queue = { default-features = false , version = "31.0.0" } +pallet-multisig = { default-features = false, version = "28.0.0" } +pallet-session = { default-features = false, version = "28.0.0" } +pallet-timestamp = { default-features = false, version = "27.0.0" } +pallet-transaction-payment = { default-features = false, version = "28.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "28.0.0" } +pallet-utility = { default-features = false, version = "28.0.0" } +sp-api = { default-features = false, version = "26.0.0" } +sp-block-builder = { default-features = false, version = "26.0.0" } +sp-consensus-aura = { default-features = false, version = "0.32.0" } +sp-core = { default-features = false, version = "28.0.0" } +sp-genesis-builder = { default-features = false , version = "0.7.0" } +sp-inherents = { default-features = false, version = "26.0.0" } +sp-io = { default-features = false, version = "30.0.0" } +sp-offchain = { default-features = false, version = "26.0.0" } +sp-runtime = { default-features = false, version = "31.0.1" } +sp-session = { default-features = false, version = "27.0.0" } +sp-std = { default-features = false, version = "14.0.0" } +sp-storage = { default-features = false, version = "19.0.0" } +sp-transaction-pool = { default-features = false, version = "26.0.0" } +sp-version = { default-features = false, version = "29.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "6.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } -polkadot-core-primitives = { default-features = false, version = "6.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } -polkadot-runtime-common = { default-features = false, version = "6.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } +pallet-xcm = { default-features = false, version = "7.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.0" } +polkadot-core-primitives = { default-features = false, version = "7.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "6.0.0" } +polkadot-runtime-common = { default-features = false, version = "7.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "7.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.6.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } -cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.6.0" } -cumulus-primitives-core = { default-features = false , version = "0.6.0" } -cumulus-primitives-utility = { default-features = false , version = "0.6.0" } -pallet-collator-selection = { default-features = false , version = "8.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } -parachains-common = { default-features = false , version = "6.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.7.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.7.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.7.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "9.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.7.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.7.0" } +cumulus-primitives-core = { default-features = false , version = "0.7.0" } +cumulus-primitives-utility = { default-features = false , version = "0.7.0" } +pallet-collator-selection = { default-features = false , version = "9.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.7.0" } +parachains-common = { default-features = false , version = "7.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } # Bridges -bp-header-chain = { default-features = false , version = "0.6.0" } -bp-messages = { default-features = false , version = "0.6.0" } -bp-parachains = { default-features = false , version = "0.6.0" } -bp-polkadot-core = { default-features = false , version = "0.6.0" } -bp-relayers = { default-features = false , version = "0.6.0" } -bp-runtime = { default-features = false , version = "0.6.0" } -bp-kusama = { default-features = false , version = "0.4.0" } -bp-polkadot = { default-features = false , version = "0.4.0" } -bridge-runtime-common = { default-features = false , version = "0.6.0" } -pallet-bridge-grandpa = { default-features = false , version = "0.6.0" } -pallet-bridge-messages = { default-features = false , version = "0.6.0" } -pallet-bridge-parachains = { default-features = false , version = "0.6.0" } -pallet-bridge-relayers = { default-features = false , version = "0.6.0" } -pallet-xcm-bridge-hub = { default-features = false , version = "0.1.0" } +bp-header-chain = { default-features = false , version = "0.7.0" } +bp-messages = { default-features = false , version = "0.7.0" } +bp-parachains = { default-features = false , version = "0.7.0" } +bp-polkadot-core = { default-features = false , version = "0.7.0" } +bp-relayers = { default-features = false , version = "0.7.0" } +bp-runtime = { default-features = false , version = "0.7.0" } +bp-kusama = { default-features = false , version = "0.5.0" } +bp-polkadot = { default-features = false , version = "0.5.0" } +bridge-runtime-common = { default-features = false , version = "0.7.0" } +pallet-bridge-grandpa = { default-features = false , version = "0.7.0" } +pallet-bridge-messages = { default-features = false , version = "0.7.0" } +pallet-bridge-parachains = { default-features = false , version = "0.7.0" } +pallet-bridge-relayers = { default-features = false , version = "0.7.0" } +pallet-xcm-bridge-hub = { default-features = false , version = "0.2.0" } [dev-dependencies] -bridge-hub-test-utils = { version = "0.6.0" } -bridge-runtime-common = { version = "0.6.0", features = ["integrity-test"] } -sp-keyring = { version = "30.0.0" } +bridge-hub-test-utils = { version = "0.7.0" } +bridge-runtime-common = { version = "0.7.0", features = ["integrity-test"] } +sp-keyring = { version = "31.0.0" } static_assertions = { version = "1.1.0" } [features] diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml index fe96ffdfbe..f45a93f2ec 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml @@ -14,15 +14,15 @@ kusama-runtime-constants = { path = "../../../../relay/kusama/constants", defaul polkadot-runtime-constants = { path = "../../../../relay/polkadot/constants", default-features = false} # Bridge Dependencies -bp-bridge-hub-cumulus = { default-features = false , version = "0.6.0" } -bp-runtime = { default-features = false , version = "0.6.0" } -bp-messages = { default-features = false , version = "0.6.0" } +bp-bridge-hub-cumulus = { default-features = false , version = "0.7.0" } +bp-runtime = { default-features = false , version = "0.7.0" } +bp-messages = { default-features = false , version = "0.7.0" } # Substrate Based Dependencies -frame-support = { default-features = false, version = "27.0.0" } -sp-api = { default-features = false, version = "25.0.0" } -sp-runtime = { default-features = false, version = "30.0.1" } -sp-std = { default-features = false , version = "13.0.0" } +frame-support = { default-features = false, version = "28.0.0" } +sp-api = { default-features = false, version = "26.0.0" } +sp-runtime = { default-features = false, version = "31.0.1" } +sp-std = { default-features = false , version = "14.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 097109c7a5..8bf728c9d6 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -9,7 +9,7 @@ repository.workspace = true version.workspace = true [build-dependencies] -substrate-wasm-builder = { optional = true , version = "16.0.0" } +substrate-wasm-builder = { optional = true , version = "17.0.0" } [dependencies] codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive"] } @@ -27,82 +27,82 @@ kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-f polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } -frame-executive = { default-features = false, version = "27.0.0" } -frame-support = { default-features = false, version = "27.0.0" } -frame-system = { default-features = false, version = "27.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } -pallet-aura = { default-features = false, version = "26.0.0" } -pallet-authorship = { default-features = false, version = "27.0.0" } -pallet-balances = { default-features = false, version = "27.0.0" } -pallet-message-queue = { default-features = false , version = "30.0.0" } -pallet-multisig = { default-features = false, version = "27.0.0" } -pallet-session = { default-features = false, version = "27.0.0" } -pallet-timestamp = { default-features = false, version = "26.0.0" } -pallet-transaction-payment = { default-features = false, version = "27.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "27.0.0" } -pallet-utility = { default-features = false, version = "27.0.0" } -sp-api = { default-features = false, version = "25.0.0" } -sp-block-builder = { default-features = false, version = "25.0.0" } -sp-consensus-aura = { default-features = false, version = "0.31.0" } -sp-core = { default-features = false, version = "27.0.0" } -sp-genesis-builder = { default-features = false , version = "0.6.0" } -sp-inherents = { default-features = false, version = "25.0.0" } -sp-io = { default-features = false, version = "29.0.0" } -sp-offchain = { default-features = false, version = "25.0.0" } -sp-runtime = { default-features = false, version = "30.0.1" } -sp-session = { default-features = false, version = "26.0.0" } -sp-std = { default-features = false, version = "13.0.0" } -sp-storage = { default-features = false, version = "18.0.0" } -sp-transaction-pool = { default-features = false, version = "25.0.0" } -sp-version = { default-features = false, version = "28.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "28.0.0" } +frame-executive = { default-features = false, version = "28.0.0" } +frame-support = { default-features = false, version = "28.0.0" } +frame-system = { default-features = false, version = "28.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "28.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "26.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.34.0" } +pallet-aura = { default-features = false, version = "27.0.0" } +pallet-authorship = { default-features = false, version = "28.0.0" } +pallet-balances = { default-features = false, version = "28.0.0" } +pallet-message-queue = { default-features = false , version = "31.0.0" } +pallet-multisig = { default-features = false, version = "28.0.0" } +pallet-session = { default-features = false, version = "28.0.0" } +pallet-timestamp = { default-features = false, version = "27.0.0" } +pallet-transaction-payment = { default-features = false, version = "28.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "28.0.0" } +pallet-utility = { default-features = false, version = "28.0.0" } +sp-api = { default-features = false, version = "26.0.0" } +sp-block-builder = { default-features = false, version = "26.0.0" } +sp-consensus-aura = { default-features = false, version = "0.32.0" } +sp-core = { default-features = false, version = "28.0.0" } +sp-genesis-builder = { default-features = false , version = "0.7.0" } +sp-inherents = { default-features = false, version = "26.0.0" } +sp-io = { default-features = false, version = "30.0.0" } +sp-offchain = { default-features = false, version = "26.0.0" } +sp-runtime = { default-features = false, version = "31.0.1" } +sp-session = { default-features = false, version = "27.0.0" } +sp-std = { default-features = false, version = "14.0.0" } +sp-storage = { default-features = false, version = "19.0.0" } +sp-transaction-pool = { default-features = false, version = "26.0.0" } +sp-version = { default-features = false, version = "29.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "6.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } -polkadot-core-primitives = { default-features = false, version = "6.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } -polkadot-runtime-common = { default-features = false, version = "6.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } +pallet-xcm = { default-features = false, version = "7.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.0" } +polkadot-core-primitives = { default-features = false, version = "7.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "6.0.0" } +polkadot-runtime-common = { default-features = false, version = "7.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "7.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.6.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } -cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.6.0" } -cumulus-primitives-core = { default-features = false , version = "0.6.0" } -cumulus-primitives-utility = { default-features = false , version = "0.6.0" } -pallet-collator-selection = { default-features = false , version = "8.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } -parachains-common = { default-features = false , version = "6.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.7.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.7.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.7.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "9.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.7.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.7.0" } +cumulus-primitives-core = { default-features = false , version = "0.7.0" } +cumulus-primitives-utility = { default-features = false , version = "0.7.0" } +pallet-collator-selection = { default-features = false , version = "9.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.7.0" } +parachains-common = { default-features = false , version = "7.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } # Bridges -bp-header-chain = { default-features = false , version = "0.6.0" } -bp-messages = { default-features = false , version = "0.6.0" } -bp-parachains = { default-features = false , version = "0.6.0" } -bp-polkadot-core = { default-features = false , version = "0.6.0" } -bp-relayers = { default-features = false , version = "0.6.0" } -bp-runtime = { default-features = false , version = "0.6.0" } -bp-kusama = { default-features = false , version = "0.4.0" } -bp-polkadot = { default-features = false , version = "0.4.0" } -bridge-runtime-common = { default-features = false , version = "0.6.0" } -pallet-bridge-grandpa = { default-features = false , version = "0.6.0" } -pallet-bridge-messages = { default-features = false , version = "0.6.0" } -pallet-bridge-parachains = { default-features = false , version = "0.6.0" } -pallet-bridge-relayers = { default-features = false , version = "0.6.0" } -pallet-xcm-bridge-hub = { default-features = false , version = "0.1.0" } +bp-header-chain = { default-features = false , version = "0.7.0" } +bp-messages = { default-features = false , version = "0.7.0" } +bp-parachains = { default-features = false , version = "0.7.0" } +bp-polkadot-core = { default-features = false , version = "0.7.0" } +bp-relayers = { default-features = false , version = "0.7.0" } +bp-runtime = { default-features = false , version = "0.7.0" } +bp-kusama = { default-features = false , version = "0.5.0" } +bp-polkadot = { default-features = false , version = "0.5.0" } +bridge-runtime-common = { default-features = false , version = "0.7.0" } +pallet-bridge-grandpa = { default-features = false , version = "0.7.0" } +pallet-bridge-messages = { default-features = false , version = "0.7.0" } +pallet-bridge-parachains = { default-features = false , version = "0.7.0" } +pallet-bridge-relayers = { default-features = false , version = "0.7.0" } +pallet-xcm-bridge-hub = { default-features = false , version = "0.2.0" } [dev-dependencies] -bridge-hub-test-utils = { version = "0.6.0" } -bridge-runtime-common = { version = "0.6.0", features = ["integrity-test"] } -sp-keyring = { version = "30.0.0" } +bridge-hub-test-utils = { version = "0.7.0" } +bridge-runtime-common = { version = "0.7.0", features = ["integrity-test"] } +sp-keyring = { version = "31.0.0" } static_assertions = { version = "1.1.0" } [features] diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml index 717310b606..773ff5bca6 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml @@ -14,15 +14,15 @@ kusama-runtime-constants = { path = "../../../../relay/kusama/constants", defaul polkadot-runtime-constants = { path = "../../../../relay/polkadot/constants", default-features = false} # Bridge Dependencies -bp-bridge-hub-cumulus = { default-features = false , version = "0.6.0" } -bp-runtime = { default-features = false , version = "0.6.0" } -bp-messages = { default-features = false , version = "0.6.0" } +bp-bridge-hub-cumulus = { default-features = false , version = "0.7.0" } +bp-runtime = { default-features = false , version = "0.7.0" } +bp-messages = { default-features = false , version = "0.7.0" } # Substrate Based Dependencies -frame-support = { default-features = false, version = "27.0.0" } -sp-api = { default-features = false, version = "25.0.0" } -sp-runtime = { default-features = false, version = "30.0.1" } -sp-std = { default-features = false , version = "13.0.0" } +frame-support = { default-features = false, version = "28.0.0" } +sp-api = { default-features = false, version = "26.0.0" } +sp-runtime = { default-features = false, version = "31.0.1" } +sp-std = { default-features = false , version = "14.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index 6b7bf8af63..32b7189669 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -15,75 +15,75 @@ log = { version = "0.4.20", default-features = false } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } -frame-executive = { default-features = false, version = "27.0.0" } -frame-support = { default-features = false, version = "27.0.0" } -frame-system = { default-features = false, version = "27.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } -pallet-asset-rate = { default-features = false , version = "6.0.0" } -pallet-alliance = { default-features = false, version = "26.0.0" } -pallet-aura = { default-features = false, version = "26.0.0" } -pallet-authorship = { default-features = false, version = "27.0.0" } -pallet-balances = { default-features = false, version = "27.0.0" } -pallet-collective = { default-features = false, version = "27.0.0" } -pallet-message-queue = { default-features = false , version = "30.0.0" } -pallet-multisig = { default-features = false, version = "27.0.0" } -pallet-preimage = { default-features = false , version = "27.0.0" } -pallet-proxy = { default-features = false, version = "27.0.0" } -pallet-scheduler = { default-features = false , version = "28.0.0" } -pallet-session = { default-features = false, version = "27.0.0" } -pallet-timestamp = { default-features = false, version = "26.0.0" } -pallet-transaction-payment = { default-features = false, version = "27.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "27.0.0" } -pallet-treasury = { default-features = false , version = "26.0.0" } -pallet-utility = { default-features = false, version = "27.0.0" } -pallet-referenda = { default-features = false, version = "27.0.0" } -pallet-ranked-collective = { default-features = false, version = "27.0.0" } -pallet-core-fellowship = { default-features = false, version = "11.0.0" } -pallet-salary = { default-features = false, version = "12.0.0" } -sp-api = { default-features = false, version = "25.0.0" } -sp-arithmetic = { default-features = false , version = "22.0.0" } -sp-block-builder = { default-features = false, version = "25.0.0" } -sp-consensus-aura = { default-features = false, version = "0.31.0" } -sp-core = { default-features = false, version = "27.0.0" } -sp-genesis-builder = { default-features = false , version = "0.6.0" } -sp-inherents = { default-features = false, version = "25.0.0" } -sp-offchain = { default-features = false, version = "25.0.0" } -sp-runtime = { default-features = false, version = "30.0.1" } -sp-session = { default-features = false, version = "26.0.0" } -sp-std = { default-features = false, version = "13.0.0" } -sp-storage = { default-features = false, version = "18.0.0" } -sp-transaction-pool = { default-features = false, version = "25.0.0" } -sp-version = { default-features = false, version = "28.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "28.0.0" } +frame-executive = { default-features = false, version = "28.0.0" } +frame-support = { default-features = false, version = "28.0.0" } +frame-system = { default-features = false, version = "28.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "28.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "26.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.34.0" } +pallet-asset-rate = { default-features = false , version = "7.0.0" } +pallet-alliance = { default-features = false, version = "27.0.0" } +pallet-aura = { default-features = false, version = "27.0.0" } +pallet-authorship = { default-features = false, version = "28.0.0" } +pallet-balances = { default-features = false, version = "28.0.0" } +pallet-collective = { default-features = false, version = "28.0.0" } +pallet-message-queue = { default-features = false , version = "31.0.0" } +pallet-multisig = { default-features = false, version = "28.0.0" } +pallet-preimage = { default-features = false , version = "28.0.0" } +pallet-proxy = { default-features = false, version = "28.0.0" } +pallet-scheduler = { default-features = false , version = "29.0.0" } +pallet-session = { default-features = false, version = "28.0.0" } +pallet-timestamp = { default-features = false, version = "27.0.0" } +pallet-transaction-payment = { default-features = false, version = "28.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "28.0.0" } +pallet-treasury = { default-features = false , version = "27.0.0" } +pallet-utility = { default-features = false, version = "28.0.0" } +pallet-referenda = { default-features = false, version = "28.0.0" } +pallet-ranked-collective = { default-features = false, version = "28.0.0" } +pallet-core-fellowship = { default-features = false, version = "12.0.0" } +pallet-salary = { default-features = false, version = "13.0.0" } +sp-api = { default-features = false, version = "26.0.0" } +sp-arithmetic = { default-features = false , version = "23.0.0" } +sp-block-builder = { default-features = false, version = "26.0.0" } +sp-consensus-aura = { default-features = false, version = "0.32.0" } +sp-core = { default-features = false, version = "28.0.0" } +sp-genesis-builder = { default-features = false , version = "0.7.0" } +sp-inherents = { default-features = false, version = "26.0.0" } +sp-offchain = { default-features = false, version = "26.0.0" } +sp-runtime = { default-features = false, version = "31.0.1" } +sp-session = { default-features = false, version = "27.0.0" } +sp-std = { default-features = false, version = "14.0.0" } +sp-storage = { default-features = false, version = "19.0.0" } +sp-transaction-pool = { default-features = false, version = "26.0.0" } +sp-version = { default-features = false, version = "29.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "6.0.0" } -polkadot-core-primitives = { default-features = false, version = "6.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } -polkadot-runtime-common = { default-features = false, version = "6.0.0" } +pallet-xcm = { default-features = false, version = "7.0.0" } +polkadot-core-primitives = { default-features = false, version = "7.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "6.0.0" } +polkadot-runtime-common = { default-features = false, version = "7.0.0" } polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} -xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "7.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.6.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } -cumulus-pallet-xcmp-queue = { default-features = false , version = "0.6.0" } -cumulus-primitives-core = { default-features = false , version = "0.6.0" } -cumulus-primitives-utility = { default-features = false , version = "0.6.0" } -pallet-collator-selection = { default-features = false , version = "8.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } -parachains-common = { default-features = false , version = "6.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.7.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.7.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.7.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "9.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.7.0" } +cumulus-pallet-xcmp-queue = { default-features = false , version = "0.7.0" } +cumulus-primitives-core = { default-features = false , version = "0.7.0" } +cumulus-primitives-utility = { default-features = false , version = "0.7.0" } +pallet-collator-selection = { default-features = false , version = "9.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.7.0" } +parachains-common = { default-features = false , version = "7.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } [build-dependencies] -substrate-wasm-builder = { optional = true , version = "16.0.0" } +substrate-wasm-builder = { optional = true , version = "17.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/constants/Cargo.toml b/system-parachains/constants/Cargo.toml index a414dd6126..b1f97d2384 100644 --- a/system-parachains/constants/Cargo.toml +++ b/system-parachains/constants/Cargo.toml @@ -10,13 +10,13 @@ license.workspace = true [dependencies] smallvec = "1.13.1" -frame-support = { default-features = false , version = "27.0.0" } +frame-support = { default-features = false , version = "28.0.0" } kusama-runtime-constants = { path = "../../relay/kusama/constants", default-features = false} -parachains-common = { default-features = false , version = "6.0.0" } -polkadot-core-primitives = { default-features = false, version = "6.0.0"} -polkadot-primitives = { default-features = false , version = "6.0.0" } +parachains-common = { default-features = false , version = "7.0.0" } +polkadot-core-primitives = { default-features = false, version = "7.0.0"} +polkadot-primitives = { default-features = false , version = "7.0.0" } polkadot-runtime-constants = { path = "../../relay/polkadot/constants", default-features = false} -sp-runtime = { default-features = false , version = "30.0.1" } +sp-runtime = { default-features = false , version = "31.0.1" } [features] default = [ "std" ] diff --git a/system-parachains/gluttons/glutton-kusama/Cargo.toml b/system-parachains/gluttons/glutton-kusama/Cargo.toml index ba5845c74d..6e5153e449 100644 --- a/system-parachains/gluttons/glutton-kusama/Cargo.toml +++ b/system-parachains/gluttons/glutton-kusama/Cargo.toml @@ -13,44 +13,44 @@ codec = { package = "parity-scale-codec", version = "3.6.9", default-features = scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "27.0.0" } -frame-executive = { default-features = false, version = "27.0.0" } -frame-support = { default-features = false, version = "27.0.0" } -frame-system = { default-features = false, version = "27.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "25.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "27.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.33.0" } -pallet-glutton = { default-features = false, optional = true, version = "13.0.0" } -pallet-message-queue = { default-features = false , version = "30.0.0" } -pallet-sudo = { default-features = false, optional = true, version = "27.0.0" } -sp-api = { default-features = false, version = "25.0.0" } -sp-block-builder = { default-features = false, version = "25.0.0" } -sp-core = { default-features = false, version = "27.0.0" } -sp-genesis-builder = { default-features = false , version = "0.6.0" } -sp-inherents = { default-features = false, version = "25.0.0" } -sp-offchain = { default-features = false, version = "25.0.0" } -sp-runtime = { default-features = false, version = "30.0.1" } -sp-session = { default-features = false, version = "26.0.0" } -sp-std = { default-features = false, version = "13.0.0" } -sp-storage = { default-features = false, version = "18.0.0" } -sp-transaction-pool = { default-features = false, version = "25.0.0" } -sp-version = { default-features = false, version = "28.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "28.0.0" } +frame-executive = { default-features = false, version = "28.0.0" } +frame-support = { default-features = false, version = "28.0.0" } +frame-system = { default-features = false, version = "28.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "26.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "28.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.34.0" } +pallet-glutton = { default-features = false, optional = true, version = "14.0.0" } +pallet-message-queue = { default-features = false , version = "31.0.0" } +pallet-sudo = { default-features = false, optional = true, version = "28.0.0" } +sp-api = { default-features = false, version = "26.0.0" } +sp-block-builder = { default-features = false, version = "26.0.0" } +sp-core = { default-features = false, version = "28.0.0" } +sp-genesis-builder = { default-features = false , version = "0.7.0" } +sp-inherents = { default-features = false, version = "26.0.0" } +sp-offchain = { default-features = false, version = "26.0.0" } +sp-runtime = { default-features = false, version = "31.0.1" } +sp-session = { default-features = false, version = "27.0.0" } +sp-std = { default-features = false, version = "14.0.0" } +sp-storage = { default-features = false, version = "19.0.0" } +sp-transaction-pool = { default-features = false, version = "26.0.0" } +sp-version = { default-features = false, version = "29.0.0" } # Polkadot -xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "7.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.0" } # Cumulus -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } -cumulus-primitives-core = { default-features = false , version = "0.6.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } -parachains-common = { default-features = false , version = "6.0.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.7.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.7.0" } +cumulus-primitives-core = { default-features = false , version = "0.7.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.7.0" } +parachains-common = { default-features = false , version = "7.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } [build-dependencies] -substrate-wasm-builder = { version = "16.0.0" } +substrate-wasm-builder = { version = "17.0.0" } [features] default = [ "std" ] From 5a8595cc990a6cb11569e3ed1b871fc257f7ed77 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 25 Jan 2024 10:24:26 +0100 Subject: [PATCH 086/316] [frame_system] adapt https://github.com/paritytech/polkadot-sdk/pull/1343 (RuntimeTask) --- relay/kusama/src/lib.rs | 1 + relay/polkadot/src/lib.rs | 1 + system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs | 1 + system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs | 1 + system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 1 + system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 1 + system-parachains/collectives/collectives-polkadot/src/lib.rs | 1 + system-parachains/gluttons/glutton-kusama/src/lib.rs | 1 + 8 files changed, 8 insertions(+) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index f4012a5bda..7bca59e29d 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -189,6 +189,7 @@ impl frame_system::Config for Runtime { type Lookup = AccountIdLookup; type Block = Block; type RuntimeEvent = RuntimeEvent; + type RuntimeTask = RuntimeTask; type BlockHashCount = BlockHashCount; type DbWeight = RocksDbWeight; type Version = Version; diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index ad0938887a..3995ffbea3 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -182,6 +182,7 @@ impl frame_system::Config for Runtime { type Lookup = AccountIdLookup; type Block = Block; type RuntimeEvent = RuntimeEvent; + type RuntimeTask = RuntimeTask; type BlockHashCount = BlockHashCount; type DbWeight = RocksDbWeight; type Version = Version; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 89e3bc1074..f935acc88e 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -180,6 +180,7 @@ impl frame_system::Config for Runtime { type Hashing = BlakeTwo256; type Block = Block; type RuntimeEvent = RuntimeEvent; + type RuntimeTask = RuntimeTask; type RuntimeOrigin = RuntimeOrigin; type BlockHashCount = BlockHashCount; type DbWeight = RocksDbWeight; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 0552811f38..c46722df4a 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -193,6 +193,7 @@ impl frame_system::Config for Runtime { type Hashing = BlakeTwo256; type Block = Block; type RuntimeEvent = RuntimeEvent; + type RuntimeTask = RuntimeTask; type RuntimeOrigin = RuntimeOrigin; type BlockHashCount = BlockHashCount; type DbWeight = RocksDbWeight; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 46a1d822e6..80baabffb4 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -205,6 +205,7 @@ impl frame_system::Config for Runtime { type Block = Block; /// The ubiquitous event type. type RuntimeEvent = RuntimeEvent; + type RuntimeTask = RuntimeTask; /// The ubiquitous origin type. type RuntimeOrigin = RuntimeOrigin; /// Maximum number of block number to block hash mappings to keep (oldest pruned first). diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 544b26b1af..540ed21544 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -205,6 +205,7 @@ impl frame_system::Config for Runtime { type Block = Block; /// The ubiquitous event type. type RuntimeEvent = RuntimeEvent; + type RuntimeTask = RuntimeTask; /// The ubiquitous origin type. type RuntimeOrigin = RuntimeOrigin; /// Maximum number of block number to block hash mappings to keep (oldest pruned first). diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 98df201fa4..d0806eb8cf 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -169,6 +169,7 @@ impl frame_system::Config for Runtime { type Hashing = BlakeTwo256; type Block = Block; type RuntimeEvent = RuntimeEvent; + type RuntimeTask = RuntimeTask; type RuntimeOrigin = RuntimeOrigin; type BlockHashCount = BlockHashCount; type DbWeight = RocksDbWeight; diff --git a/system-parachains/gluttons/glutton-kusama/src/lib.rs b/system-parachains/gluttons/glutton-kusama/src/lib.rs index 8bdd8e08b1..6b58934e48 100644 --- a/system-parachains/gluttons/glutton-kusama/src/lib.rs +++ b/system-parachains/gluttons/glutton-kusama/src/lib.rs @@ -149,6 +149,7 @@ impl frame_system::Config for Runtime { type Hashing = BlakeTwo256; type Block = Block; type RuntimeEvent = RuntimeEvent; + type RuntimeTask = RuntimeTask; type RuntimeOrigin = RuntimeOrigin; type BlockHashCount = BlockHashCount; type Version = Version; From f36b197a79d64aee2eeb42a626fc7eddcefa5f81 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 25 Jan 2024 10:31:37 +0100 Subject: [PATCH 087/316] [frame_system] adapt https://github.com/paritytech/polkadot-sdk/pull/2682 (Authorize Upgrade Pattern) --- relay/kusama/src/weights/frame_system.rs | 27 +++++++++++++++++++ relay/polkadot/src/weights/frame_system.rs | 27 +++++++++++++++++++ .../src/weights/frame_system.rs | 27 +++++++++++++++++++ .../src/weights/frame_system.rs | 27 +++++++++++++++++++ .../src/weights/frame_system.rs | 27 +++++++++++++++++++ .../src/weights/frame_system.rs | 27 +++++++++++++++++++ .../src/weights/frame_system.rs | 27 +++++++++++++++++++ .../src/weights/frame_system.rs | 27 +++++++++++++++++++ 8 files changed, 216 insertions(+) diff --git a/relay/kusama/src/weights/frame_system.rs b/relay/kusama/src/weights/frame_system.rs index 7b91d447dd..5ac1e481d2 100644 --- a/relay/kusama/src/weights/frame_system.rs +++ b/relay/kusama/src/weights/frame_system.rs @@ -145,4 +145,31 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } + /// Storage: `System::AuthorizedUpgrade` (r:0 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + fn authorize_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 33_027_000 picoseconds. + Weight::from_parts(33_027_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::AuthorizedUpgrade` (r:1 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn apply_authorized_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `22` + // Estimated: `1518` + // Minimum execution time: 118_101_992_000 picoseconds. + Weight::from_parts(118_101_992_000, 0) + .saturating_add(Weight::from_parts(0, 1518)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } } diff --git a/relay/polkadot/src/weights/frame_system.rs b/relay/polkadot/src/weights/frame_system.rs index d63eb078b1..d656b958b1 100644 --- a/relay/polkadot/src/weights/frame_system.rs +++ b/relay/polkadot/src/weights/frame_system.rs @@ -145,4 +145,31 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } + /// Storage: `System::AuthorizedUpgrade` (r:0 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + fn authorize_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 33_027_000 picoseconds. + Weight::from_parts(33_027_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::AuthorizedUpgrade` (r:1 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn apply_authorized_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `22` + // Estimated: `1518` + // Minimum execution time: 118_101_992_000 picoseconds. + Weight::from_parts(118_101_992_000, 0) + .saturating_add(Weight::from_parts(0, 1518)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/frame_system.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/frame_system.rs index 765cfdecb4..3bbf793fb2 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/frame_system.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/frame_system.rs @@ -149,4 +149,31 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } + /// Storage: `System::AuthorizedUpgrade` (r:0 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + fn authorize_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 33_027_000 picoseconds. + Weight::from_parts(33_027_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::AuthorizedUpgrade` (r:1 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn apply_authorized_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `22` + // Estimated: `1518` + // Minimum execution time: 118_101_992_000 picoseconds. + Weight::from_parts(118_101_992_000, 0) + .saturating_add(Weight::from_parts(0, 1518)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/frame_system.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/frame_system.rs index 0f8e05242a..00e6f9824d 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/frame_system.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/frame_system.rs @@ -149,4 +149,31 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } + /// Storage: `System::AuthorizedUpgrade` (r:0 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + fn authorize_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 33_027_000 picoseconds. + Weight::from_parts(33_027_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::AuthorizedUpgrade` (r:1 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn apply_authorized_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `22` + // Estimated: `1518` + // Minimum execution time: 118_101_992_000 picoseconds. + Weight::from_parts(118_101_992_000, 0) + .saturating_add(Weight::from_parts(0, 1518)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/frame_system.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/frame_system.rs index 4a27cf896d..b744030203 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/frame_system.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/frame_system.rs @@ -149,4 +149,31 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } + /// Storage: `System::AuthorizedUpgrade` (r:0 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + fn authorize_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 33_027_000 picoseconds. + Weight::from_parts(33_027_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::AuthorizedUpgrade` (r:1 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn apply_authorized_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `22` + // Estimated: `1518` + // Minimum execution time: 118_101_992_000 picoseconds. + Weight::from_parts(118_101_992_000, 0) + .saturating_add(Weight::from_parts(0, 1518)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/frame_system.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/frame_system.rs index 0acabfdc2a..11a8083bcc 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/frame_system.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/frame_system.rs @@ -149,4 +149,31 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } + /// Storage: `System::AuthorizedUpgrade` (r:0 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + fn authorize_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 33_027_000 picoseconds. + Weight::from_parts(33_027_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::AuthorizedUpgrade` (r:1 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn apply_authorized_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `22` + // Estimated: `1518` + // Minimum execution time: 118_101_992_000 picoseconds. + Weight::from_parts(118_101_992_000, 0) + .saturating_add(Weight::from_parts(0, 1518)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } } diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/frame_system.rs b/system-parachains/collectives/collectives-polkadot/src/weights/frame_system.rs index b70406f300..1eed2e545a 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/frame_system.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/frame_system.rs @@ -149,4 +149,31 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } + /// Storage: `System::AuthorizedUpgrade` (r:0 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + fn authorize_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 33_027_000 picoseconds. + Weight::from_parts(33_027_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::AuthorizedUpgrade` (r:1 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn apply_authorized_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `22` + // Estimated: `1518` + // Minimum execution time: 118_101_992_000 picoseconds. + Weight::from_parts(118_101_992_000, 0) + .saturating_add(Weight::from_parts(0, 1518)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } } diff --git a/system-parachains/gluttons/glutton-kusama/src/weights/frame_system.rs b/system-parachains/gluttons/glutton-kusama/src/weights/frame_system.rs index 36c4abc400..4f81cc322d 100644 --- a/system-parachains/gluttons/glutton-kusama/src/weights/frame_system.rs +++ b/system-parachains/gluttons/glutton-kusama/src/weights/frame_system.rs @@ -152,4 +152,31 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } + /// Storage: `System::AuthorizedUpgrade` (r:0 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + fn authorize_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 33_027_000 picoseconds. + Weight::from_parts(33_027_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::AuthorizedUpgrade` (r:1 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn apply_authorized_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `22` + // Estimated: `1518` + // Minimum execution time: 118_101_992_000 picoseconds. + Weight::from_parts(118_101_992_000, 0) + .saturating_add(Weight::from_parts(0, 1518)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } } From 7d03f8a8bb7ad59490bc514cb354a76074f384d2 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 25 Jan 2024 12:58:24 +0100 Subject: [PATCH 088/316] [asset_conversion] adapt https://github.com/paritytech/polkadot-sdk/pull/1677 --- .../asset-hubs/asset-hub-kusama/src/lib.rs | 14 +++++++------- .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 7 +++---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index f935acc88e..e28cb28f51 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -334,7 +334,6 @@ impl pallet_asset_conversion::Config for Runtime { type Balance = Balance; type HigherPrecisionBalance = sp_core::U256; type Currency = Balances; - type AssetBalance = Balance; type AssetId = MultiLocation; type Assets = LocalAndForeignAssets< Assets, @@ -351,7 +350,7 @@ impl pallet_asset_conversion::Config for Runtime { type PalletId = AssetConversionPalletId; type AllowMultiAssetPools = AllowMultiAssetPools; type MaxSwapPathLength = ConstU32<4>; - type MultiAssetId = Box; + type MultiAssetId = MultiLocation; type MultiAssetIdConverter = MultiLocationConverter; type MintMinLiquidity = ConstU128<100>; @@ -1116,17 +1115,18 @@ impl_runtime_apis! { impl pallet_asset_conversion::AssetConversionApi< Block, Balance, - u128, - Box, + MultiLocation, > for Runtime { - fn quote_price_exact_tokens_for_tokens(asset1: Box, asset2: Box, amount: u128, include_fee: bool) -> Option { + fn quote_price_exact_tokens_for_tokens(asset1: MultiLocation, asset2: MultiLocation, amount: Balance, include_fee: bool) -> Option { AssetConversion::quote_price_exact_tokens_for_tokens(asset1, asset2, amount, include_fee) } - fn quote_price_tokens_for_exact_tokens(asset1: Box, asset2: Box, amount: u128, include_fee: bool) -> Option { + + fn quote_price_tokens_for_exact_tokens(asset1: MultiLocation, asset2: MultiLocation, amount: Balance, include_fee: bool) -> Option { AssetConversion::quote_price_tokens_for_exact_tokens(asset1, asset2, amount, include_fee) } - fn get_reserves(asset1: Box, asset2: Box) -> Option<(Balance, Balance)> { + + fn get_reserves(asset1: MultiLocation, asset2: MultiLocation) -> Option<(Balance, Balance)> { AssetConversion::get_reserves(&asset1, &asset2).ok() } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 4d6b0676f8..22136487bb 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -694,8 +694,7 @@ pub struct BenchmarkMultiLocationConverter { } #[cfg(feature = "runtime-benchmarks")] -impl - pallet_asset_conversion::BenchmarkHelper> +impl pallet_asset_conversion::BenchmarkHelper for BenchmarkMultiLocationConverter where SelfParaId: Get, @@ -710,8 +709,8 @@ where ), } } - fn multiasset_id(asset_id: u32) -> sp_std::boxed::Box { - sp_std::boxed::Box::new(Self::asset_id(asset_id)) + fn multiasset_id(asset_id: u32) -> MultiLocation { + Self::asset_id(asset_id) } } From ded3fad53a83c86e8a73afca423d4f8d860501a9 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 25 Jan 2024 13:27:39 +0100 Subject: [PATCH 089/316] [asset_conversion] adapt https://github.com/paritytech/polkadot-sdk/pull/2031 --- .../asset-hubs/asset-hub-kusama/src/lib.rs | 73 ++++++++++--------- .../src/weights/pallet_asset_conversion.rs | 38 ++++++---- .../asset-hub-kusama/src/xcm_config.rs | 56 +------------- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 6 +- 4 files changed, 68 insertions(+), 105 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index e28cb28f51..774add43e6 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -29,7 +29,7 @@ pub mod xcm_config; use assets_common::{ foreign_creators::ForeignCreators, - local_and_foreign_assets::{LocalAndForeignAssets, MultiLocationConverter}, + local_and_foreign_assets::{LocalFromLeft, TargetFromLeft}, matching::FromSiblingParachain, AssetIdForTrustBackedAssetsConvert, MultiLocationForAssetId, }; @@ -56,8 +56,9 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, ord_parameter_types, parameter_types, traits::{ - AsEnsureOriginWithArg, ConstBool, ConstU128, ConstU32, ConstU64, ConstU8, EitherOfDiverse, - Equals, InstanceFilter, TransformOrigin, + fungible, fungibles, tokens::imbalance::ResolveAssetTo, AsEnsureOriginWithArg, ConstBool, + ConstU128, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Equals, InstanceFilter, + TransformOrigin, }, weights::{ConstantMultiplier, Weight}, BoundedVec, PalletId, @@ -80,8 +81,9 @@ use system_parachains_constants::{ }; use xcm::opaque::v3::MultiLocation; use xcm_config::{ - FellowshipLocation, ForeignAssetsConvertedConcreteId, GovernanceLocation, KsmLocation, - PoolAssetsConvertedConcreteId, TrustBackedAssetsConvertedConcreteId, + FellowshipLocation, ForeignAssetsConvertedConcreteId, ForeignCreatorsSovereignAccountOf, + GovernanceLocation, KsmLocation, PoolAssetsConvertedConcreteId, + TrustBackedAssetsConvertedConcreteId, TrustBackedAssetsPalletLocation, }; #[cfg(any(feature = "std", test))] @@ -92,10 +94,6 @@ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use xcm::prelude::*; -use crate::xcm_config::{ - ForeignCreatorsSovereignAccountOf, LocalAndForeignAssetsMultiLocationMatcher, - TrustBackedAssetsPalletLocation, -}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; impl_opaque_keys! { @@ -293,8 +291,6 @@ impl pallet_assets::Config for Runtime { parameter_types! { pub const AssetConversionPalletId: PalletId = PalletId(*b"py/ascon"); - pub const AllowMultiAssetPools: bool = false; - // should be non-zero if AllowMultiAssetPools is true, otherwise can be zero pub const LiquidityWithdrawalFee: Permill = Permill::from_percent(0); } @@ -329,35 +325,50 @@ impl pallet_assets::Config for Runtime { type BenchmarkHelper = (); } +/// Union fungibles implementation for `Assets`` and `ForeignAssets`. +pub type LocalAndForeignAssets = fungibles::UnionOf< + Assets, + ForeignAssets, + LocalFromLeft< + AssetIdForTrustBackedAssetsConvert, + AssetIdForTrustBackedAssets, + >, + MultiLocation, + AccountId, +>; + impl pallet_asset_conversion::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; type HigherPrecisionBalance = sp_core::U256; - type Currency = Balances; - type AssetId = MultiLocation; - type Assets = LocalAndForeignAssets< - Assets, - AssetIdForTrustBackedAssetsConvert, - ForeignAssets, + type AssetKind = MultiLocation; + type Assets = fungible::UnionOf< + Balances, + LocalAndForeignAssets, + TargetFromLeft, + Self::AssetKind, + Self::AccountId, >; - type PoolAssets = PoolAssets; + type PoolId = (Self::AssetKind, Self::AssetKind); + type PoolLocator = + pallet_asset_conversion::WithFirstAsset; type PoolAssetId = u32; + type PoolAssets = PoolAssets; type PoolSetupFee = ConstU128<0>; // Asset class deposit fees are sufficient to prevent spam - type PoolSetupFeeReceiver = AssetConversionOrigin; - // should be non-zero if `AllowMultiAssetPools` is true, otherwise can be zero. + type PoolSetupFeeAsset = KsmLocation; + type PoolSetupFeeTarget = ResolveAssetTo; type LiquidityWithdrawalFee = LiquidityWithdrawalFee; type LPFee = ConstU32<3>; type PalletId = AssetConversionPalletId; - type AllowMultiAssetPools = AllowMultiAssetPools; type MaxSwapPathLength = ConstU32<4>; - type MultiAssetId = MultiLocation; - type MultiAssetIdConverter = - MultiLocationConverter; type MintMinLiquidity = ConstU128<100>; type WeightInfo = weights::pallet_asset_conversion::WeightInfo; #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = - crate::xcm_config::BenchmarkMultiLocationConverter>; + type BenchmarkHelper = assets_common::benchmarks::AssetPairFactory< + KsmLocation, + parachain_info::Pallet, + xcm_config::AssetsPalletIndex, + >; } parameter_types! { @@ -762,12 +773,8 @@ impl pallet_collator_selection::Config for Runtime { impl pallet_asset_conversion_tx_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type Fungibles = LocalAndForeignAssets< - Assets, - AssetIdForTrustBackedAssetsConvert, - ForeignAssets, - >; - type OnChargeAssetTransaction = AssetConversionAdapter; + type Fungibles = LocalAndForeignAssets; + type OnChargeAssetTransaction = AssetConversionAdapter; } parameter_types! { @@ -1127,7 +1134,7 @@ impl_runtime_apis! { } fn get_reserves(asset1: MultiLocation, asset2: MultiLocation) -> Option<(Balance, Balance)> { - AssetConversion::get_reserves(&asset1, &asset2).ok() + AssetConversion::get_reserves(asset1, asset2).ok() } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_asset_conversion.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_asset_conversion.rs index be47f8e53a..97b959858f 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_asset_conversion.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_asset_conversion.rs @@ -121,15 +121,18 @@ impl pallet_asset_conversion::WeightInfo for WeightInfo /// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn swap_exact_tokens_for_tokens() -> Weight { + fn swap_exact_tokens_for_tokens(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1185` - // Estimated: `13818` - // Minimum execution time: 155_900_000 picoseconds. - Weight::from_parts(158_685_000, 0) - .saturating_add(Weight::from_parts(0, 13818)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(8)) + // Measured: `0 + n * (557 ±0)` + // Estimated: `7404 + n * (393 ±92)` + // Minimum execution time: 930_000_000 picoseconds. + Weight::from_parts(960_000_000, 0) + .saturating_add(Weight::from_parts(0, 7404)) + // Standard Error: 17_993_720 + .saturating_add(Weight::from_parts(41_959_183, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 393).saturating_mul(n.into())) } /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) @@ -137,14 +140,17 @@ impl pallet_asset_conversion::WeightInfo for WeightInfo /// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) /// Storage: `ForeignAssets::Account` (r:4 w:4) /// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) - fn swap_tokens_for_exact_tokens() -> Weight { + fn swap_tokens_for_exact_tokens(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1185` - // Estimated: `13818` - // Minimum execution time: 156_024_000 picoseconds. - Weight::from_parts(157_817_000, 0) - .saturating_add(Weight::from_parts(0, 13818)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(8)) + // Measured: `0 + n * (557 ±0)` + // Estimated: `7404 + n * (393 ±92)` + // Minimum execution time: 940_000_000 picoseconds. + Weight::from_parts(956_000_000, 0) + .saturating_add(Weight::from_parts(0, 7404)) + // Standard Error: 15_746_647 + .saturating_add(Weight::from_parts(39_193_877, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 393).saturating_mul(n.into())) } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 22136487bb..f61ed2678e 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -20,10 +20,7 @@ use super::{ TrustBackedAssetsInstance, WeightToFee, XcmpQueue, }; use crate::{ForeignAssets, ForeignAssetsInstance}; -use assets_common::{ - local_and_foreign_assets::MatchesLocalAndForeignAssetsMultiLocation, - matching::{FromSiblingParachain, IsForeignConcreteAsset}, -}; +use assets_common::matching::{FromSiblingParachain, IsForeignConcreteAsset}; use frame_support::{ match_types, parameter_types, traits::{ConstU32, Contains, Equals, Everything, Nothing, PalletInfoAccess}, @@ -58,9 +55,6 @@ use xcm_builder::{ }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; -#[cfg(feature = "runtime-benchmarks")] -use {cumulus_primitives_core::ParaId, sp_core::Get}; - parameter_types! { pub const KsmLocation: MultiLocation = MultiLocation::parent(); pub const RelayNetwork: Option = Some(NetworkId::Kusama); @@ -68,8 +62,8 @@ parameter_types! { pub UniversalLocation: InteriorMultiLocation = X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())); pub UniversalLocationNetworkId: NetworkId = UniversalLocation::get().global_consensus().unwrap(); - pub TrustBackedAssetsPalletLocation: MultiLocation = - PalletInstance(::index() as u8).into(); + pub AssetsPalletIndex: u32 = ::index() as u32; + pub TrustBackedAssetsPalletLocation: MultiLocation = PalletInstance(AssetsPalletIndex::get() as u8).into(); pub ForeignAssetsPalletLocation: MultiLocation = PalletInstance(::index() as u8).into(); pub PoolAssetsPalletLocation: MultiLocation = @@ -189,24 +183,6 @@ pub type PoolFungiblesTransactor = FungiblesAdapter< pub type AssetTransactors = (CurrencyTransactor, FungiblesTransactor, ForeignFungiblesTransactor, PoolFungiblesTransactor); -/// Simple `MultiLocation` matcher for Local and Foreign asset `MultiLocation`. -pub struct LocalAndForeignAssetsMultiLocationMatcher; -impl MatchesLocalAndForeignAssetsMultiLocation for LocalAndForeignAssetsMultiLocationMatcher { - fn is_local(location: &MultiLocation) -> bool { - use assets_common::fungible_conversion::MatchesMultiLocation; - TrustBackedAssetsConvertedConcreteId::contains(location) - } - fn is_foreign(location: &MultiLocation) -> bool { - use assets_common::fungible_conversion::MatchesMultiLocation; - ForeignAssetsConvertedConcreteId::contains(location) - } -} -impl Contains for LocalAndForeignAssetsMultiLocationMatcher { - fn contains(location: &MultiLocation) -> bool { - Self::is_local(location) || Self::is_foreign(location) - } -} - /// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, /// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can /// biases the kind of local `Origin` it will become. @@ -688,32 +664,6 @@ impl pallet_assets::BenchmarkHelper for XcmBenchmarkHelper { } } -#[cfg(feature = "runtime-benchmarks")] -pub struct BenchmarkMultiLocationConverter { - _phantom: sp_std::marker::PhantomData, -} - -#[cfg(feature = "runtime-benchmarks")] -impl pallet_asset_conversion::BenchmarkHelper - for BenchmarkMultiLocationConverter -where - SelfParaId: Get, -{ - fn asset_id(asset_id: u32) -> MultiLocation { - MultiLocation { - parents: 1, - interior: X3( - Parachain(SelfParaId::get().into()), - PalletInstance(::index() as u8), - GeneralIndex(asset_id.into()), - ), - } - } - fn multiasset_id(asset_id: u32) -> MultiLocation { - Self::asset_id(asset_id) - } -} - /// All configuration related to bridging pub mod bridging { use super::*; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index c46722df4a..540f15f0cd 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -113,8 +113,9 @@ use system_parachains_constants::{ SLOT_DURATION, }; use xcm_config::{ - DotLocation, FellowshipLocation, ForeignAssetsConvertedConcreteId, GovernanceLocation, - TrustBackedAssetsConvertedConcreteId, XcmOriginToTransactDispatchOrigin, + DotLocation, FellowshipLocation, ForeignAssetsConvertedConcreteId, + ForeignCreatorsSovereignAccountOf, GovernanceLocation, TrustBackedAssetsConvertedConcreteId, + XcmOriginToTransactDispatchOrigin, }; #[cfg(any(feature = "std", test))] @@ -125,7 +126,6 @@ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use xcm::prelude::*; -use crate::xcm_config::ForeignCreatorsSovereignAccountOf; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; impl_opaque_keys! { From 01bdd99653b07feb2e04931534d3bc2bcf13c7b3 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 25 Jan 2024 14:49:54 +0100 Subject: [PATCH 090/316] [bridges/xcm] adapt https://github.com/paritytech/polkadot-sdk/pull/2481 (XCM version check) + https://github.com/paritytech/polkadot-sdk/pull/2692 --- Cargo.lock | 1 - .../asset-hubs/asset-hub-kusama/src/lib.rs | 20 ++++- .../asset-hub-kusama/tests/tests.rs | 12 ++- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 20 ++++- .../asset-hub-polkadot/tests/tests.rs | 12 ++- .../src/bridge_to_polkadot_config.rs | 26 +++++- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 15 ++++ .../bridge-hub-kusama/tests/tests.rs | 82 ++++++++----------- .../src/bridge_to_kusama_config.rs | 25 +++++- .../bridge-hub-polkadot/src/lib.rs | 15 ++++ .../bridge-hub-polkadot/tests/tests.rs | 78 ++++++++---------- 11 files changed, 195 insertions(+), 111 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1830943f7d..1fe622ce5e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3380,7 +3380,6 @@ dependencies = [ "staging-xcm-builder 4.0.1", "staging-xcm-executor 4.0.2", "substrate-wasm-builder 14.0.0", - "system-parachains-constants", ] [[package]] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 774add43e6..c6a6f486b5 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -881,6 +881,7 @@ impl pallet_xcm_bridge_hub_router::Config for Runti type UniversalLocation = xcm_config::UniversalLocation; type BridgedNetworkId = xcm_config::bridging::to_polkadot::PolkadotNetwork; type Bridges = xcm_config::bridging::NetworkExportTable; + type DestinationVersion = PolkadotXcm; #[cfg(not(feature = "runtime-benchmarks"))] type BridgeHubOrigin = EnsureXcm>; @@ -1541,11 +1542,26 @@ impl_runtime_apis! { ); } - fn ensure_bridged_target_destination() -> MultiLocation { + fn ensure_bridged_target_destination() -> Result { ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests( xcm_config::bridging::SiblingBridgeHubParaId::get().into() ); - xcm_config::bridging::to_polkadot::AssetHubPolkadot::get() + let bridged_asset_hub = xcm_config::bridging::to_polkadot::AssetHubPolkadot::get(); + let _ = PolkadotXcm::force_xcm_version( + RuntimeOrigin::root(), + Box::new(bridged_asset_hub), + XCM_VERSION, + ).map_err(|e| { + log::error!( + "Failed to dispatch `force_xcm_version({:?}, {:?}, {:?})`, error: {:?}", + RuntimeOrigin::root(), + bridged_asset_hub, + XCM_VERSION, + e + ); + BenchmarkError::Stop("XcmVersion was not stored!") + })?; + Ok(bridged_asset_hub) } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index 603e3ea8ca..1d2b5daa0d 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -25,9 +25,9 @@ use asset_hub_kusama_runtime::{ TrustBackedAssetsPalletLocation, XcmConfig, }, AllPalletsWithoutSystem, AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets, - ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, Runtime, - RuntimeCall, RuntimeEvent, SessionKeys, ToPolkadotXcmRouterInstance, TrustBackedAssetsInstance, - XcmpQueue, + ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, + PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, + ToPolkadotXcmRouterInstance, TrustBackedAssetsInstance, XcmpQueue, }; use asset_test_utils::{ test_cases_over_bridge::TestBridgingConfig, CollatorSessionKey, CollatorSessionKeys, ExtBuilder, @@ -657,6 +657,12 @@ asset_test_utils::include_create_and_manage_foreign_assets_for_local_consensus_p ); fn bridging_to_asset_hub_polkadot() -> TestBridgingConfig { + let _ = PolkadotXcm::force_xcm_version( + RuntimeOrigin::root(), + Box::new(bridging::to_polkadot::AssetHubPolkadot::get()), + XCM_VERSION, + ) + .expect("version saved!"); TestBridgingConfig { bridged_network: bridging::to_polkadot::PolkadotNetwork::get(), local_bridge_hub_para_id: bridging::SiblingBridgeHubParaId::get(), diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 540f15f0cd..5c3cd38e01 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -792,6 +792,7 @@ impl pallet_xcm_bridge_hub_router::Config for Runtime type UniversalLocation = xcm_config::UniversalLocation; type BridgedNetworkId = xcm_config::bridging::to_kusama::KusamaNetwork; type Bridges = xcm_config::bridging::NetworkExportTable; + type DestinationVersion = PolkadotXcm; #[cfg(not(feature = "runtime-benchmarks"))] type BridgeHubOrigin = EnsureXcm>; @@ -1426,11 +1427,26 @@ impl_runtime_apis! { ); } - fn ensure_bridged_target_destination() -> MultiLocation { + fn ensure_bridged_target_destination() -> Result { ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests( xcm_config::bridging::SiblingBridgeHubParaId::get().into() ); - xcm_config::bridging::to_kusama::AssetHubKusama::get() + let bridged_asset_hub = xcm_config::bridging::to_kusama::AssetHubKusama::get(); + let _ = PolkadotXcm::force_xcm_version( + RuntimeOrigin::root(), + Box::new(bridged_asset_hub), + XCM_VERSION, + ).map_err(|e| { + log::error!( + "Failed to dispatch `force_xcm_version({:?}, {:?}, {:?})`, error: {:?}", + RuntimeOrigin::root(), + bridged_asset_hub, + XCM_VERSION, + e + ); + BenchmarkError::Stop("XcmVersion was not stored!") + })?; + Ok(bridged_asset_hub) } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index b9bb25e243..5b36c1ed18 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -25,9 +25,9 @@ use asset_hub_polkadot_runtime::{ TrustBackedAssetsPalletLocation, XcmConfig, }, AllPalletsWithoutSystem, AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets, - ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, Runtime, - RuntimeCall, RuntimeEvent, SessionKeys, ToKusamaXcmRouterInstance, TrustBackedAssetsInstance, - XcmpQueue, + ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, + PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, + ToKusamaXcmRouterInstance, TrustBackedAssetsInstance, XcmpQueue, }; use asset_test_utils::{ test_cases_over_bridge::TestBridgingConfig, CollatorSessionKey, CollatorSessionKeys, ExtBuilder, @@ -683,6 +683,12 @@ asset_test_utils::include_create_and_manage_foreign_assets_for_local_consensus_p ); fn bridging_to_asset_hub_kusama() -> TestBridgingConfig { + let _ = PolkadotXcm::force_xcm_version( + RuntimeOrigin::root(), + Box::new(bridging::to_kusama::AssetHubKusama::get()), + XCM_VERSION, + ) + .expect("version saved!"); TestBridgingConfig { bridged_network: bridging::to_kusama::KusamaNetwork::get(), local_bridge_hub_para_id: bridging::SiblingBridgeHubParaId::get(), diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs index 4d2cab6726..e8a72e6658 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs @@ -19,8 +19,8 @@ use crate::{ weights, xcm_config::{UniversalLocation, XcmRouter}, - AccountId, Balance, Balances, BlockNumber, BridgePolkadotMessages, Runtime, RuntimeEvent, - RuntimeOrigin, XcmOverBridgeHubPolkadot, + AccountId, Balance, Balances, BlockNumber, BridgePolkadotMessages, PolkadotXcm, Runtime, + RuntimeEvent, RuntimeOrigin, XcmOverBridgeHubPolkadot, }; use bp_messages::LaneId; use bp_parachains::SingleParaStoredHeaderDataBuilder; @@ -33,7 +33,7 @@ use bridge_runtime_common::{ }, messages_xcm_extension::{ SenderAndLane, XcmAsPlainPayload, XcmBlobHauler, XcmBlobHaulerAdapter, - XcmBlobMessageDispatch, + XcmBlobMessageDispatch, XcmVersionOfDestAndRemoteBridge, }, refund_relayer_extension::{ ActualFeeRefund, RefundBridgedParachainMessages, RefundSignedExtensionAdapter, @@ -75,6 +75,11 @@ parameter_types! { parameter_types! { /// Polkadot Network identifier. pub PolkadotGlobalConsensusNetwork: NetworkId = NetworkId::Polkadot; + /// Polkadot Network as `Location`. + pub PolkadotGlobalConsensusNetworkLocation: MultiLocation = MultiLocation { + parents: 2, + interior: X1(GlobalConsensus(PolkadotGlobalConsensusNetwork::get())) + }; /// Interior location (relative to this runtime) of the with-Polkadot messages pallet. pub BridgeKusamaToPolkadotMessagesPalletInstance: InteriorMultiLocation = X1( PalletInstance(::index() as u8), @@ -84,6 +89,14 @@ parameter_types! { pub AssetHubKusamaParaId: cumulus_primitives_core::ParaId = kusama_runtime_constants::system_parachain::ASSET_HUB_ID.into(); /// Identifier of the bridged Polkadot Asset Hub parachain. pub AssetHubPolkadotParaId: cumulus_primitives_core::ParaId = polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + /// Location of the bridged Polkadot Bridge Hub parachain. + pub BridgeHubPolkadotLocation: MultiLocation = MultiLocation { + parents: 2, + interior: X2( + GlobalConsensus(PolkadotGlobalConsensusNetwork::get()), + Parachain(::PARACHAIN_ID) + ) + }; /// A route (XCM location and bridge lane) that the Kusama Asset Hub -> Polkadot Asset Hub /// message is following. @@ -257,9 +270,11 @@ impl XcmBlobHauler for ToBridgeHubPolkadotXcmBlobHauler { pub type XcmOverBridgeHubPolkadotInstance = pallet_xcm_bridge_hub::Instance1; impl pallet_xcm_bridge_hub::Config for Runtime { type UniversalLocation = UniversalLocation; - type BridgedNetworkId = PolkadotGlobalConsensusNetwork; + type BridgedNetwork = PolkadotGlobalConsensusNetworkLocation; type BridgeMessagesPalletInstance = WithBridgeHubPolkadotMessagesInstance; type MessageExportPrice = (); + type DestinationVersion = + XcmVersionOfDestAndRemoteBridge; type Lanes = ActiveLanes; type LanesSupport = ToBridgeHubPolkadotXcmBlobHauler; } @@ -418,5 +433,8 @@ mod tests { bp_bridge_hub_kusama::WITH_BRIDGE_KUSAMA_TO_POLKADOT_MESSAGES_PALLET_INDEX )) ); + + assert!(BridgeHubPolkadotLocation::get() + .starts_with(&PolkadotGlobalConsensusNetworkLocation::get())); } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 80baabffb4..87a7b67b53 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -949,6 +949,21 @@ impl_runtime_apis! { fn export_message_origin_and_destination( ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { + // save XCM version for remote bridge hub + let _ = PolkadotXcm::force_xcm_version( + RuntimeOrigin::root(), + Box::new(bridge_to_polkadot_config::BridgeHubPolkadotLocation::get()), + XCM_VERSION, + ).map_err(|e| { + log::error!( + "Failed to dispatch `force_xcm_version({:?}, {:?}, {:?})`, error: {:?}", + RuntimeOrigin::root(), + bridge_to_polkadot_config::BridgeHubPolkadotLocation::get(), + XCM_VERSION, + e + ); + BenchmarkError::Stop("XcmVersion was not stored!") + })?; Ok( ( bridge_to_polkadot_config::FromAssetHubKusamaToAssetHubPolkadotRoute::get().location, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index b9a0d64516..bf614b2096 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -18,25 +18,26 @@ use bp_polkadot_core::Signature; use bridge_hub_kusama_runtime::{ bridge_to_polkadot_config::{ AssetHubPolkadotParaId, BridgeGrandpaPolkadotInstance, BridgeHubPolkadotChainId, - BridgeParachainPolkadotInstance, DeliveryRewardInBalance, PolkadotGlobalConsensusNetwork, - RefundBridgeHubPolkadotMessages, RequiredStakeForStakeAndSlash, - WithBridgeHubPolkadotMessageBridge, WithBridgeHubPolkadotMessagesInstance, - XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, + BridgeHubPolkadotLocation, BridgeParachainPolkadotInstance, DeliveryRewardInBalance, + PolkadotGlobalConsensusNetwork, RefundBridgeHubPolkadotMessages, + RequiredStakeForStakeAndSlash, WithBridgeHubPolkadotMessageBridge, + WithBridgeHubPolkadotMessagesInstance, XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, }, xcm_config::{KsmRelayLocation, RelayNetwork, XcmConfig}, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, - ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, - UncheckedExtrinsic, + ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, + SignedExtra, UncheckedExtrinsic, }; +use bridge_hub_test_utils::test_cases::from_parachain; use codec::{Decode, Encode}; -use frame_support::parameter_types; -use frame_system::pallet_prelude::HeaderFor; -use parachains_common::{kusama::fee::WeightToFee, AccountId, AuraId, Balance}; +use frame_support::{parameter_types, traits::ConstU8}; +use parachains_common::{AccountId, AuraId, Balance}; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ generic::{Era, SignedPayload}, AccountId32, }; +use system_parachains_constants::kusama::fee::WeightToFee; use xcm::latest::prelude::*; const ALICE: [u8; 32] = [1u8; 32]; @@ -44,6 +45,16 @@ const ALICE: [u8; 32] = [1u8; 32]; // Para id of sibling chain used in tests. pub const SIBLING_PARACHAIN_ID: u32 = 1000; +// Runtime from tests PoV +type RuntimeTestsAdapter = from_parachain::WithRemoteParachainHelperAdapter< + Runtime, + AllPalletsWithoutSystem, + BridgeGrandpaPolkadotInstance, + BridgeParachainPolkadotInstance, + WithBridgeHubPolkadotMessagesInstance, + WithBridgeHubPolkadotMessageBridge, +>; + parameter_types! { pub CheckingAccount: AccountId = PolkadotXcm::check_account(); } @@ -52,13 +63,16 @@ fn construct_extrinsic( sender: sp_keyring::AccountKeyring, call: RuntimeCall, ) -> UncheckedExtrinsic { + let account_id = AccountId32::from(sender.public()); let extra: SignedExtra = ( frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), frame_system::CheckTxVersion::::new(), frame_system::CheckGenesis::::new(), frame_system::CheckEra::::from(Era::immortal()), - frame_system::CheckNonce::::from(0), + frame_system::CheckNonce::::from( + frame_system::Pallet::::account(&account_id).nonce, + ), frame_system::CheckWeight::::new(), pallet_transaction_payment::ChargeTransactionPayment::::from(0), BridgeRejectObsoleteHeadersAndMessages, @@ -68,7 +82,7 @@ fn construct_extrinsic( let signature = payload.using_encoded(|e| sender.sign(e)); UncheckedExtrinsic::new_signed( call, - AccountId32::from(sender.public()).into(), + account_id.into(), Signature::Sr25519(signature.clone()), extra, ) @@ -76,18 +90,13 @@ fn construct_extrinsic( fn construct_and_apply_extrinsic( relayer_at_target: sp_keyring::AccountKeyring, - batch: pallet_utility::Call, + call: RuntimeCall, ) -> sp_runtime::DispatchOutcome { - let batch_call = RuntimeCall::Utility(batch); - let xt = construct_extrinsic(relayer_at_target, batch_call); + let xt = construct_extrinsic(relayer_at_target, call); let r = Executive::apply_extrinsic(xt); r.unwrap() } -fn executive_init_block(header: &HeaderFor) { - Executive::initialize_block(header) -} - fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys { bridge_hub_test_utils::CollatorSessionKeys::new( AccountId::from(Alice), @@ -130,11 +139,7 @@ fn initialize_bridge_by_governance_works() { bridge_hub_test_utils::test_cases::initialize_bridge_by_governance_works::< Runtime, BridgeGrandpaPolkadotInstance, - >( - collator_session_keys(), - bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, - Box::new(|call| RuntimeCall::BridgePolkadotGrandpa(call).encode()), - ) + >(collator_session_keys(), bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID) } #[test] @@ -188,7 +193,7 @@ fn handle_export_message_from_system_parachain_add_to_outbound_queue_works() { Some((KsmRelayLocation::get(), ExistentialDeposit::get()).into()), // value should be >= than value generated by `can_calculate_weight_for_paid_export_message_with_reserve_transfer` Some((KsmRelayLocation::get(), bp_bridge_hub_kusama::BridgeHubKusamaBaseXcmFeeInKsms::get()).into()), - || (), + || PolkadotXcm::force_xcm_version(RuntimeOrigin::root(), Box::new(BridgeHubPolkadotLocation::get()), XCM_VERSION).expect("version saved!"), ) } @@ -202,6 +207,7 @@ fn message_dispatch_routing_works() { WithBridgeHubPolkadotMessagesInstance, RelayNetwork, PolkadotGlobalConsensusNetwork, + ConstU8<2>, >( collator_session_keys(), bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, @@ -225,38 +231,22 @@ fn message_dispatch_routing_works() { #[test] fn relayed_incoming_message_works() { - bridge_hub_test_utils::test_cases::relayed_incoming_message_works::< - Runtime, - AllPalletsWithoutSystem, - XcmConfig, - ParachainSystem, - BridgeGrandpaPolkadotInstance, - BridgeParachainPolkadotInstance, - WithBridgeHubPolkadotMessagesInstance, - WithBridgeHubPolkadotMessageBridge, - >( + from_parachain::relayed_incoming_message_works::( collator_session_keys(), bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, + BridgeHubPolkadotChainId::get(), SIBLING_PARACHAIN_ID, Kusama, XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, || (), + construct_and_apply_extrinsic, ) } #[test] pub fn complex_relay_extrinsic_works() { - bridge_hub_test_utils::test_cases::complex_relay_extrinsic_works::< - Runtime, - AllPalletsWithoutSystem, - XcmConfig, - ParachainSystem, - BridgeGrandpaPolkadotInstance, - BridgeParachainPolkadotInstance, - WithBridgeHubPolkadotMessagesInstance, - WithBridgeHubPolkadotMessageBridge, - >( + from_parachain::complex_relay_extrinsic_works::( collator_session_keys(), bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, @@ -264,10 +254,8 @@ pub fn complex_relay_extrinsic_works() { BridgeHubPolkadotChainId::get(), Kusama, XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, - ExistentialDeposit::get(), - executive_init_block, - construct_and_apply_extrinsic, || (), + construct_and_apply_extrinsic, ); } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs index 3f43e4c4c3..7463658756 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs @@ -19,8 +19,8 @@ use crate::{ weights, xcm_config::{UniversalLocation, XcmRouter}, - AccountId, Balance, Balances, BlockNumber, BridgeKusamaMessages, Runtime, RuntimeEvent, - RuntimeOrigin, XcmOverBridgeHubKusama, + AccountId, Balance, Balances, BlockNumber, BridgeKusamaMessages, PolkadotXcm, Runtime, + RuntimeEvent, RuntimeOrigin, XcmOverBridgeHubKusama, }; use bp_messages::LaneId; use bp_parachains::SingleParaStoredHeaderDataBuilder; @@ -33,7 +33,7 @@ use bridge_runtime_common::{ }, messages_xcm_extension::{ SenderAndLane, XcmAsPlainPayload, XcmBlobHauler, XcmBlobHaulerAdapter, - XcmBlobMessageDispatch, + XcmBlobMessageDispatch, XcmVersionOfDestAndRemoteBridge, }, refund_relayer_extension::{ ActualFeeRefund, RefundBridgedParachainMessages, RefundSignedExtensionAdapter, @@ -75,6 +75,11 @@ parameter_types! { parameter_types! { /// Kusama Network identifier. pub KusamaGlobalConsensusNetwork: NetworkId = NetworkId::Kusama; + /// Kusama Network as `Location`. + pub KusamaGlobalConsensusNetworkLocation: MultiLocation = MultiLocation { + parents: 2, + interior: X1(GlobalConsensus(KusamaGlobalConsensusNetwork::get())) + }; /// Interior location (relative to this runtime) of the with-Kusama messages pallet. pub BridgePolkadotToKusamaMessagesPalletInstance: InteriorMultiLocation = X1( PalletInstance(::index() as u8), @@ -84,6 +89,14 @@ parameter_types! { pub AssetHubPolkadotParaId: cumulus_primitives_core::ParaId = polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(); /// Identifier of the bridged Kusama Asset Hub parachain. pub AssetHubKusamaParaId: cumulus_primitives_core::ParaId = kusama_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + /// Location of the bridged Kusama Bridge Hub parachain. + pub BridgeHubKusamaLocation: MultiLocation = MultiLocation { + parents: 2, + interior: X2( + GlobalConsensus(KusamaGlobalConsensusNetwork::get()), + Parachain(::PARACHAIN_ID) + ) + }; /// A route (XCM location and bridge lane) that the Polkadot Asset Hub -> Kusama Asset Hub /// message is following. @@ -257,9 +270,10 @@ impl XcmBlobHauler for ToBridgeHubKusamaXcmBlobHauler { pub type XcmOverBridgeHubKusamaInstance = pallet_xcm_bridge_hub::Instance1; impl pallet_xcm_bridge_hub::Config for Runtime { type UniversalLocation = UniversalLocation; - type BridgedNetworkId = KusamaGlobalConsensusNetwork; + type BridgedNetwork = KusamaGlobalConsensusNetworkLocation; type BridgeMessagesPalletInstance = WithBridgeHubKusamaMessagesInstance; type MessageExportPrice = (); + type DestinationVersion = XcmVersionOfDestAndRemoteBridge; type Lanes = ActiveLanes; type LanesSupport = ToBridgeHubKusamaXcmBlobHauler; } @@ -414,5 +428,8 @@ mod tests { bp_bridge_hub_polkadot::WITH_BRIDGE_POLKADOT_TO_KUSAMA_MESSAGES_PALLET_INDEX )) ); + + assert!(BridgeHubKusamaLocation::get() + .starts_with(&KusamaGlobalConsensusNetworkLocation::get())); } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 540ed21544..4755968ce9 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -949,6 +949,21 @@ impl_runtime_apis! { fn export_message_origin_and_destination( ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { + // save XCM version for remote bridge hub + let _ = PolkadotXcm::force_xcm_version( + RuntimeOrigin::root(), + Box::new(bridge_to_kusama_config::BridgeHubKusamaLocation::get()), + XCM_VERSION, + ).map_err(|e| { + log::error!( + "Failed to dispatch `force_xcm_version({:?}, {:?}, {:?})`, error: {:?}", + RuntimeOrigin::root(), + bridge_to_kusama_config::BridgeHubKusamaLocation::get(), + XCM_VERSION, + e + ); + BenchmarkError::Stop("XcmVersion was not stored!") + })?; Ok( ( bridge_to_kusama_config::FromAssetHubPolkadotToAssetHubKusamaRoute::get().location, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index ba7a5c2d87..c3a3517318 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -18,25 +18,26 @@ use bp_polkadot_core::Signature; use bridge_hub_polkadot_runtime::{ bridge_to_kusama_config::{ AssetHubKusamaParaId, BridgeGrandpaKusamaInstance, BridgeHubKusamaChainId, - BridgeParachainKusamaInstance, DeliveryRewardInBalance, KusamaGlobalConsensusNetwork, - RefundBridgeHubKusamaMessages, RequiredStakeForStakeAndSlash, + BridgeHubKusamaLocation, BridgeParachainKusamaInstance, DeliveryRewardInBalance, + KusamaGlobalConsensusNetwork, RefundBridgeHubKusamaMessages, RequiredStakeForStakeAndSlash, WithBridgeHubKusamaMessageBridge, WithBridgeHubKusamaMessagesInstance, XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, }, xcm_config::{DotRelayLocation, RelayNetwork, XcmConfig}, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, - ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, - UncheckedExtrinsic, + ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, + SignedExtra, UncheckedExtrinsic, }; +use bridge_hub_test_utils::test_cases::from_parachain; use codec::{Decode, Encode}; -use frame_support::parameter_types; -use frame_system::pallet_prelude::HeaderFor; -use parachains_common::{polkadot::fee::WeightToFee, AccountId, AuraId, Balance}; +use frame_support::{parameter_types, traits::ConstU8}; +use parachains_common::{AccountId, AuraId, Balance}; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ generic::{Era, SignedPayload}, AccountId32, }; +use system_parachains_constants::polkadot::fee::WeightToFee; use xcm::latest::prelude::*; const ALICE: [u8; 32] = [1u8; 32]; @@ -44,6 +45,16 @@ const ALICE: [u8; 32] = [1u8; 32]; // Para id of sibling chain used in tests. pub const SIBLING_PARACHAIN_ID: u32 = 1000; +// Runtime from tests PoV +type RuntimeTestsAdapter = from_parachain::WithRemoteParachainHelperAdapter< + Runtime, + AllPalletsWithoutSystem, + BridgeGrandpaKusamaInstance, + BridgeParachainKusamaInstance, + WithBridgeHubKusamaMessagesInstance, + WithBridgeHubKusamaMessageBridge, +>; + parameter_types! { pub CheckingAccount: AccountId = PolkadotXcm::check_account(); } @@ -52,13 +63,16 @@ fn construct_extrinsic( sender: sp_keyring::AccountKeyring, call: RuntimeCall, ) -> UncheckedExtrinsic { + let account_id = AccountId32::from(sender.public()); let extra: SignedExtra = ( frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), frame_system::CheckTxVersion::::new(), frame_system::CheckGenesis::::new(), frame_system::CheckEra::::from(Era::immortal()), - frame_system::CheckNonce::::from(0), + frame_system::CheckNonce::::from( + frame_system::Pallet::::account(&account_id).nonce, + ), frame_system::CheckWeight::::new(), pallet_transaction_payment::ChargeTransactionPayment::::from(0), BridgeRejectObsoleteHeadersAndMessages, @@ -68,7 +82,7 @@ fn construct_extrinsic( let signature = payload.using_encoded(|e| sender.sign(e)); UncheckedExtrinsic::new_signed( call, - AccountId32::from(sender.public()).into(), + account_id.into(), Signature::Sr25519(signature.clone()), extra, ) @@ -76,18 +90,13 @@ fn construct_extrinsic( fn construct_and_apply_extrinsic( relayer_at_target: sp_keyring::AccountKeyring, - batch: pallet_utility::Call, + call: RuntimeCall, ) -> sp_runtime::DispatchOutcome { - let batch_call = RuntimeCall::Utility(batch); - let xt = construct_extrinsic(relayer_at_target, batch_call); + let xt = construct_extrinsic(relayer_at_target, call); let r = Executive::apply_extrinsic(xt); r.unwrap() } -fn executive_init_block(header: &HeaderFor) { - Executive::initialize_block(header) -} - fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys { bridge_hub_test_utils::CollatorSessionKeys::new( AccountId::from(Alice), @@ -130,11 +139,7 @@ fn initialize_bridge_by_governance_works() { bridge_hub_test_utils::test_cases::initialize_bridge_by_governance_works::< Runtime, BridgeGrandpaKusamaInstance, - >( - collator_session_keys(), - bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, - Box::new(|call| RuntimeCall::BridgeKusamaGrandpa(call).encode()), - ) + >(collator_session_keys(), bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID) } #[test] @@ -188,7 +193,7 @@ fn handle_export_message_from_system_parachain_add_to_outbound_queue_works() { Some((DotRelayLocation::get(), ExistentialDeposit::get()).into()), // value should be >= than value generated by `can_calculate_weight_for_paid_export_message_with_reserve_transfer` Some((DotRelayLocation::get(), bp_bridge_hub_polkadot::BridgeHubPolkadotBaseXcmFeeInDots::get()).into()), - || (), + || PolkadotXcm::force_xcm_version(RuntimeOrigin::root(), Box::new(BridgeHubKusamaLocation::get()), XCM_VERSION).expect("version saved!"), ) } @@ -202,6 +207,7 @@ fn message_dispatch_routing_works() { WithBridgeHubKusamaMessagesInstance, RelayNetwork, KusamaGlobalConsensusNetwork, + ConstU8<2>, >( collator_session_keys(), bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, @@ -225,38 +231,22 @@ fn message_dispatch_routing_works() { #[test] fn relayed_incoming_message_works() { - bridge_hub_test_utils::test_cases::relayed_incoming_message_works::< - Runtime, - AllPalletsWithoutSystem, - XcmConfig, - ParachainSystem, - BridgeGrandpaKusamaInstance, - BridgeParachainKusamaInstance, - WithBridgeHubKusamaMessagesInstance, - WithBridgeHubKusamaMessageBridge, - >( + from_parachain::relayed_incoming_message_works::( collator_session_keys(), bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, + BridgeHubKusamaChainId::get(), SIBLING_PARACHAIN_ID, Polkadot, XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, || (), + construct_and_apply_extrinsic, ) } #[test] pub fn complex_relay_extrinsic_works() { - bridge_hub_test_utils::test_cases::complex_relay_extrinsic_works::< - Runtime, - AllPalletsWithoutSystem, - XcmConfig, - ParachainSystem, - BridgeGrandpaKusamaInstance, - BridgeParachainKusamaInstance, - WithBridgeHubKusamaMessagesInstance, - WithBridgeHubKusamaMessageBridge, - >( + from_parachain::complex_relay_extrinsic_works::( collator_session_keys(), bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, @@ -264,10 +254,8 @@ pub fn complex_relay_extrinsic_works() { BridgeHubKusamaChainId::get(), Polkadot, XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, - ExistentialDeposit::get(), - executive_init_block, - construct_and_apply_extrinsic, || (), + construct_and_apply_extrinsic, ); } From 7796a1f4fe6308ef3cb0df07b984453b8efa7909 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 26 Jan 2024 14:15:46 +0100 Subject: [PATCH 091/316] Cargo.lock --- Cargo.lock | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.lock b/Cargo.lock index 1fe622ce5e..1830943f7d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3380,6 +3380,7 @@ dependencies = [ "staging-xcm-builder 4.0.1", "staging-xcm-executor 4.0.2", "substrate-wasm-builder 14.0.0", + "system-parachains-constants", ] [[package]] From 773ad07ae09ca805efc3655dfe80798c2d3dc302 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 29 Jan 2024 10:22:52 +0100 Subject: [PATCH 092/316] [pallet_uniques] adapt https://github.com/paritytech/polkadot-sdk/pull/2687 (versioned migration) --- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 5c3cd38e01..9200fca45d 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -89,7 +89,7 @@ use frame_support::{ parameter_types, traits::{ AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Equals, - InstanceFilter, OnRuntimeUpgrade, TransformOrigin, + InstanceFilter, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -884,19 +884,13 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. pub type Migrations = ( - frame_support::migrations::VersionedMigration<0, 1, UniquesMigration, Uniques, RocksDbWeight>, + UniquesMigration, // unreleased cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, ); /// Migration for Uniques to V1 -pub struct UniquesMigration; - -impl OnRuntimeUpgrade for UniquesMigration { - fn on_runtime_upgrade() -> Weight { - pallet_uniques::migration::migrate_to_v1::>() - } -} +pub type UniquesMigration = pallet_uniques::migration::MigrateV0ToV1; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< From c9a5b0b9a01b28c6d2737346547be8f8708d37b5 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 29 Jan 2024 13:19:08 +0100 Subject: [PATCH 093/316] [pallet_identity] adapt https://github.com/paritytech/polkadot-sdk/pull/2651 --- relay/kusama/src/lib.rs | 12 +++ relay/kusama/src/weights/pallet_identity.rs | 94 +++++++++++++++++++ relay/polkadot/src/lib.rs | 12 +++ relay/polkadot/src/weights/pallet_identity.rs | 94 +++++++++++++++++++ 4 files changed, 212 insertions(+) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 7bca59e29d..a88b511aa7 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -936,6 +936,13 @@ impl pallet_identity::Config for Runtime { type Slashed = Treasury; type ForceOrigin = EitherOf, GeneralAdmin>; type RegistrarOrigin = EitherOf, GeneralAdmin>; + // TODO:(PR#159) check adds bellow and remove this comment! + type OffchainSignature = Signature; + type SigningPublicKey = ::Signer; + type UsernameAuthorityOrigin = EnsureRoot; + type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; + type MaxSuffixLength = ConstU32<7>; + type MaxUsernameLength = ConstU32<32>; type WeightInfo = weights::pallet_identity::WeightInfo; } @@ -1670,6 +1677,9 @@ pub type Migrations = migrations::Unreleased; pub mod migrations { use super::{parachains_configuration, Runtime}; + // We don't have a limit in the Relay Chain. + const IDENTITY_MIGRATION_KEY_LIMIT: u64 = u64::MAX; + /// Unreleased migrations. Add new ones here: pub type Unreleased = ( pallet_nomination_pools::migration::versioned::V5toV6, @@ -1682,6 +1692,8 @@ pub mod migrations { pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, pallet_grandpa::migrations::MigrateV4ToV5, + // Migrate Identity pallet for Usernames + pallet_identity::migration::versioned::V0ToV1, ); } diff --git a/relay/kusama/src/weights/pallet_identity.rs b/relay/kusama/src/weights/pallet_identity.rs index c160e50c64..fd6256f3af 100644 --- a/relay/kusama/src/weights/pallet_identity.rs +++ b/relay/kusama/src/weights/pallet_identity.rs @@ -345,4 +345,98 @@ 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(52), added: 2527, mode: `MaxEncodedLen`) + fn add_username_authority() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 13_873_000 picoseconds. + Weight::from_parts(13_873_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::UsernameAuthorities` (r:0 w:1) + /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn remove_username_authority() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 10_653_000 picoseconds. + Weight::from_parts(10_653_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(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Identity::AccountOfUsername` (r:1 w:1) + /// Proof: `Identity::AccountOfUsername` (`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(7572), added: 10047, mode: `MaxEncodedLen`) + fn set_username_for() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `11037` + // Minimum execution time: 75_928_000 picoseconds. + Weight::from_parts(75_928_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Identity::PendingUsernames` (r:1 w:1) + /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::AccountOfUsername` (r:0 w:1) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + fn accept_username() -> Weight { + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `11037` + // Minimum execution time: 38_157_000 picoseconds. + Weight::from_parts(38_157_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .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(77), added: 2552, mode: `MaxEncodedLen`) + fn remove_expired_approval() -> Weight { + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `3542` + // Minimum execution time: 46_821_000 picoseconds. + Weight::from_parts(46_821_000, 0) + .saturating_add(Weight::from_parts(0, 3542)) + .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(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + fn set_primary_username() -> Weight { + // Proof Size summary in bytes: + // Measured: `247` + // Estimated: `11037` + // Minimum execution time: 22_515_000 picoseconds. + Weight::from_parts(22_515_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .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(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + fn remove_dangling_username() -> Weight { + // Proof Size summary in bytes: + // Measured: `126` + // Estimated: `11037` + // Minimum execution time: 15_997_000 picoseconds. + Weight::from_parts(15_997_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 3995ffbea3..c5904ea7ac 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -817,6 +817,13 @@ impl pallet_identity::Config for Runtime { type Slashed = Treasury; type ForceOrigin = EitherOf, GeneralAdmin>; type RegistrarOrigin = EitherOf, GeneralAdmin>; + // TODO:(PR#159) check adds bellow and remove this comment! + type OffchainSignature = Signature; + type SigningPublicKey = ::Signer; + type UsernameAuthorityOrigin = EnsureRoot; + type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; + type MaxSuffixLength = ConstU32<7>; + type MaxUsernameLength = ConstU32<32>; type WeightInfo = weights::pallet_identity::WeightInfo; } @@ -1691,6 +1698,9 @@ pub type Migrations = migrations::Unreleased; pub mod migrations { use super::*; + // We don't have a limit in the Relay Chain. + const IDENTITY_MIGRATION_KEY_LIMIT: u64 = u64::MAX; + /// Upgrade Session keys to include BEEFY key. /// When this is removed, should also remove `OldSessionKeys`. pub struct UpgradeSessionKeys; @@ -1715,6 +1725,8 @@ pub mod migrations { pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, pallet_grandpa::migrations::MigrateV4ToV5, + // Migrate Identity pallet for Usernames + pallet_identity::migration::versioned::V0ToV1, ); } diff --git a/relay/polkadot/src/weights/pallet_identity.rs b/relay/polkadot/src/weights/pallet_identity.rs index 087cdb708c..5c17727ba6 100644 --- a/relay/polkadot/src/weights/pallet_identity.rs +++ b/relay/polkadot/src/weights/pallet_identity.rs @@ -345,4 +345,98 @@ 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(52), added: 2527, mode: `MaxEncodedLen`) + fn add_username_authority() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 13_873_000 picoseconds. + Weight::from_parts(13_873_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Identity::UsernameAuthorities` (r:0 w:1) + /// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn remove_username_authority() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 10_653_000 picoseconds. + Weight::from_parts(10_653_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(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Identity::AccountOfUsername` (r:1 w:1) + /// Proof: `Identity::AccountOfUsername` (`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(7572), added: 10047, mode: `MaxEncodedLen`) + fn set_username_for() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `11037` + // Minimum execution time: 75_928_000 picoseconds. + Weight::from_parts(75_928_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Identity::PendingUsernames` (r:1 w:1) + /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Storage: `Identity::AccountOfUsername` (r:0 w:1) + /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + fn accept_username() -> Weight { + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `11037` + // Minimum execution time: 38_157_000 picoseconds. + Weight::from_parts(38_157_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .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(77), added: 2552, mode: `MaxEncodedLen`) + fn remove_expired_approval() -> Weight { + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `3542` + // Minimum execution time: 46_821_000 picoseconds. + Weight::from_parts(46_821_000, 0) + .saturating_add(Weight::from_parts(0, 3542)) + .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(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + fn set_primary_username() -> Weight { + // Proof Size summary in bytes: + // Measured: `247` + // Estimated: `11037` + // Minimum execution time: 22_515_000 picoseconds. + Weight::from_parts(22_515_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .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(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityOf` (r:1 w:0) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + fn remove_dangling_username() -> Weight { + // Proof Size summary in bytes: + // Measured: `126` + // Estimated: `11037` + // Minimum execution time: 15_997_000 picoseconds. + Weight::from_parts(15_997_000, 0) + .saturating_add(Weight::from_parts(0, 11037)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } } From 6fb51da30264e4578cb1478dbe5b606b145eb861 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 29 Jan 2024 13:21:44 +0100 Subject: [PATCH 094/316] [pallet-vesting] adapt https://github.com/paritytech/polkadot-sdk/pull/2403 --- relay/kusama/src/lib.rs | 1 + relay/polkadot/src/lib.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index a88b511aa7..2bf5b917be 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1023,6 +1023,7 @@ impl pallet_vesting::Config for Runtime { type MinVestedTransfer = MinVestedTransfer; type WeightInfo = weights::pallet_vesting::WeightInfo; type UnvestedFundsAllowedWithdrawReasons = UnvestedFundsAllowedWithdrawReasons; + type BlockNumberProvider = System; const MAX_VESTING_SCHEDULES: u32 = 28; } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index c5904ea7ac..36762688d6 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1065,6 +1065,7 @@ impl pallet_vesting::Config for Runtime { type MinVestedTransfer = MinVestedTransfer; type WeightInfo = weights::pallet_vesting::WeightInfo; type UnvestedFundsAllowedWithdrawReasons = UnvestedFundsAllowedWithdrawReasons; + type BlockNumberProvider = System; const MAX_VESTING_SCHEDULES: u32 = 28; } From a10717db9ec3423ceaef565469acab015ab1ee6e Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 29 Jan 2024 13:30:21 +0100 Subject: [PATCH 095/316] [pallet-staking] adapt https://github.com/paritytech/polkadot-sdk/pull/2589 --- relay/kusama/src/lib.rs | 2 ++ relay/kusama/src/weights/pallet_staking.rs | 20 ++++++++++++++++++++ relay/polkadot/src/lib.rs | 2 ++ relay/polkadot/src/weights/pallet_staking.rs | 20 ++++++++++++++++++++ 4 files changed, 44 insertions(+) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 2bf5b917be..90eafcfaae 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -685,6 +685,8 @@ impl pallet_staking::Config for Runtime { type NominationsQuota = pallet_staking::FixedNominationsQuota<{ MaxNominations::get() }>; type MaxUnlockingChunks = frame_support::traits::ConstU32<32>; type HistoryDepth = frame_support::traits::ConstU32<84>; + // TODO:(PR#159) check/set correct constant and remove this comment! + type MaxControllersInDeprecationBatch = ConstU32<751>; type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig; type EventListeners = NominationPools; type WeightInfo = weights::pallet_staking::WeightInfo; diff --git a/relay/kusama/src/weights/pallet_staking.rs b/relay/kusama/src/weights/pallet_staking.rs index 356b94047c..56c0a56507 100644 --- a/relay/kusama/src/weights/pallet_staking.rs +++ b/relay/kusama/src/weights/pallet_staking.rs @@ -405,6 +405,26 @@ impl pallet_staking::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(10_319, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Staking::Ledger` (r:751 w:1502) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) + /// Storage: `Staking::Payee` (r:751 w:0) + /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:0 w:751) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// The range of component `i` is `[0, 751]`. + fn deprecate_controller_batch(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `668 + i * (148 ±0)` + // Estimated: `990 + i * (3566 ±0)` + // Minimum execution time: 1_934_000 picoseconds. + Weight::from_parts(2_070_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 19_129 + .saturating_add(Weight::from_parts(13_231_580, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(i.into()))) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(i.into()))) + .saturating_add(Weight::from_parts(0, 3566).saturating_mul(i.into())) + } /// Storage: `Staking::SlashingSpans` (r:1 w:1) /// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Staking::Bonded` (r:1 w:1) diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 36762688d6..27c878848a 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -779,6 +779,8 @@ impl pallet_staking::Config for Runtime { type NominationsQuota = pallet_staking::FixedNominationsQuota<{ MaxNominations::get() }>; type MaxUnlockingChunks = frame_support::traits::ConstU32<32>; type HistoryDepth = frame_support::traits::ConstU32<84>; + // TODO:(PR#159) check/set correct constant and remove this comment! + type MaxControllersInDeprecationBatch = ConstU32<751>; type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig; type EventListeners = NominationPools; type WeightInfo = weights::pallet_staking::WeightInfo; diff --git a/relay/polkadot/src/weights/pallet_staking.rs b/relay/polkadot/src/weights/pallet_staking.rs index 80359106f4..28e53589f7 100644 --- a/relay/polkadot/src/weights/pallet_staking.rs +++ b/relay/polkadot/src/weights/pallet_staking.rs @@ -405,6 +405,26 @@ impl pallet_staking::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(10_309, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Staking::Ledger` (r:751 w:1502) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) + /// Storage: `Staking::Payee` (r:751 w:0) + /// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `Staking::Bonded` (r:0 w:751) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// The range of component `i` is `[0, 751]`. + fn deprecate_controller_batch(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `668 + i * (148 ±0)` + // Estimated: `990 + i * (3566 ±0)` + // Minimum execution time: 1_934_000 picoseconds. + Weight::from_parts(2_070_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 19_129 + .saturating_add(Weight::from_parts(13_231_580, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(i.into()))) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(i.into()))) + .saturating_add(Weight::from_parts(0, 3566).saturating_mul(i.into())) + } /// Storage: `Staking::SlashingSpans` (r:1 w:1) /// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Staking::Bonded` (r:1 w:1) From f1394999dd6894ae02e3bf9743e541e90d15b898 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 29 Jan 2024 13:35:01 +0100 Subject: [PATCH 096/316] [pallet-election-provider-multi-phase] adapt https://github.com/paritytech/polkadot-sdk/pull/2694 --- relay/kusama/src/lib.rs | 2 -- relay/polkadot/src/lib.rs | 2 -- 2 files changed, 4 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 90eafcfaae..75923dcf1a 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -487,7 +487,6 @@ parameter_types! { pub const SignedDepositByte: Balance = deposit(0, 10) / 1024; // Each good submission will get 1/10 KSM as reward pub SignedRewardBase: Balance = UNITS / 10; - pub BetterUnsignedThreshold: Perbill = Perbill::from_rational(5u32, 10_000); // 1 hour session, 15 minutes unsigned phase, 8 offchain executions. pub OffchainRepeat: BlockNumber = UnsignedPhase::get() / 8; @@ -566,7 +565,6 @@ impl pallet_election_provider_multi_phase::Config for Runtime { type SlashHandler = (); // burn slashes type RewardHandler = (); // nothing to do upon rewards type SignedPhase = SignedPhase; - type BetterUnsignedThreshold = BetterUnsignedThreshold; type BetterSignedThreshold = (); type OffchainRepeat = OffchainRepeat; type MinerTxPriority = NposSolutionPriority; diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 27c878848a..5ba83b8500 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -519,7 +519,6 @@ parameter_types! { pub const SignedDepositByte: Balance = deposit(0, 10) / 1024; // Each good submission will get 1 DOT as reward pub SignedRewardBase: Balance = 1 * UNITS; - pub BetterUnsignedThreshold: Perbill = Perbill::from_rational(5u32, 10_000); // 4 hour session, 1 hour unsigned phase, 32 offchain executions. pub OffchainRepeat: BlockNumber = UnsignedPhase::get() / 32; @@ -596,7 +595,6 @@ impl pallet_election_provider_multi_phase::Config for Runtime { type MinerConfig = Self; type SlashHandler = (); // burn slashes type RewardHandler = (); // nothing to do upon rewards - type BetterUnsignedThreshold = BetterUnsignedThreshold; type BetterSignedThreshold = (); type OffchainRepeat = OffchainRepeat; type MinerTxPriority = NposSolutionPriority; From b8dd1b98660aa2dab78667682d14c450bd4ab562 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 29 Jan 2024 14:29:03 +0100 Subject: [PATCH 097/316] [coretime] adapt https://github.com/paritytech/polkadot-sdk/pull/1694 (as noop) --- relay/kusama/src/lib.rs | 16 +++++++++++++--- relay/polkadot/src/lib.rs | 14 ++++++++++++-- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 75923dcf1a..293d48ae73 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1226,6 +1226,8 @@ impl parachains_paras::Config for Runtime { type QueueFootprinter = ParaInclusion; type NextSessionRotation = Babe; type OnNewHead = Registrar; + // TODO:(PR#159)(PR#1694): check `AssignCoretime` bellow and remove this comment! + type AssignCoretime = (); } parameter_types! { @@ -1292,7 +1294,9 @@ impl parachains_paras_inherent::Config for Runtime { } impl parachains_scheduler::Config for Runtime { - type AssignmentProvider = ParaAssignmentProvider; + // If you change this, make sure the `Assignment` type of the new provider is binary compatible, + // otherwise provide a migration. + type AssignmentProvider = ParachainsAssignmentProvider; } impl parachains_assigner_parachains::Config for Runtime {} @@ -1301,6 +1305,8 @@ impl parachains_initializer::Config for Runtime { type Randomness = pallet_babe::RandomnessFromOneEpochAgo; type ForceOrigin = EnsureRoot; type WeightInfo = weights::runtime_parachains_initializer::WeightInfo; + // TODO:(PR#159)(PR#1694): check `CoretimeOnNewSession` bellow and remove this comment! + type CoretimeOnNewSession = (); } impl parachains_disputes::Config for Runtime { @@ -1609,7 +1615,8 @@ construct_runtime! { ParaSessionInfo: parachains_session_info = 61, ParasDisputes: parachains_disputes = 62, ParasSlashing: parachains_slashing = 63, - ParaAssignmentProvider: parachains_assigner_parachains = 64, + // TODO:(PR#159)(PR#1694): check rename `ParachainsAssignmentProvider` and remove `Storage` bellow and remove this comment! + ParachainsAssignmentProvider: parachains_assigner_parachains = 64, // Parachain Onboarding Pallets. Start indices at 70 to leave room. Registrar: paras_registrar = 70, @@ -1676,7 +1683,7 @@ pub type Migrations = migrations::Unreleased; /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { - use super::{parachains_configuration, Runtime}; + use super::{parachains_configuration, parachains_scheduler, Runtime}; // We don't have a limit in the Relay Chain. const IDENTITY_MIGRATION_KEY_LIMIT: u64 = u64::MAX; @@ -1695,6 +1702,9 @@ pub mod migrations { pallet_grandpa::migrations::MigrateV4ToV5, // Migrate Identity pallet for Usernames pallet_identity::migration::versioned::V0ToV1, + // TODO:(PR#159)(PR#1694): check `parachains_scheduler::MigrateV1ToV2` bellow and remove + // this comment! + parachains_scheduler::migration::MigrateV1ToV2, ); } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 5ba83b8500..ebde982d66 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1308,6 +1308,8 @@ impl parachains_paras::Config for Runtime { type QueueFootprinter = ParaInclusion; type NextSessionRotation = Babe; type OnNewHead = Registrar; + // TODO:(PR#159)(PR#1694): check `AssignCoretime` bellow and remove this comment! + type AssignCoretime = (); } parameter_types! { @@ -1374,7 +1376,9 @@ impl parachains_paras_inherent::Config for Runtime { } impl parachains_scheduler::Config for Runtime { - type AssignmentProvider = ParaAssignmentProvider; + // If you change this, make sure the `Assignment` type of the new provider is binary compatible, + // otherwise provide a migration. + type AssignmentProvider = ParachainsAssignmentProvider; } impl parachains_assigner_parachains::Config for Runtime {} @@ -1383,6 +1387,8 @@ impl parachains_initializer::Config for Runtime { type Randomness = pallet_babe::RandomnessFromOneEpochAgo; type ForceOrigin = EnsureRoot; type WeightInfo = weights::runtime_parachains_initializer::WeightInfo; + // TODO:(PR#159)(PR#1694): check `CoretimeOnNewSession` bellow and remove this comment! + type CoretimeOnNewSession = (); } impl parachains_disputes::Config for Runtime { @@ -1632,7 +1638,8 @@ construct_runtime! { ParaSessionInfo: parachains_session_info = 61, ParasDisputes: parachains_disputes = 62, ParasSlashing: parachains_slashing = 63, - ParaAssignmentProvider: parachains_assigner_parachains = 64, + // TODO:(PR#159)(PR#1694): check rename `ParachainsAssignmentProvider` bellow and remove this comment! + ParachainsAssignmentProvider: parachains_assigner_parachains = 64, // Parachain Onboarding Pallets. Start indices at 70 to leave room. Registrar: paras_registrar = 70, @@ -1728,6 +1735,9 @@ pub mod migrations { pallet_grandpa::migrations::MigrateV4ToV5, // Migrate Identity pallet for Usernames pallet_identity::migration::versioned::V0ToV1, + // TODO:(PR#159)(PR#1694): check `parachains_scheduler::MigrateV1ToV2` bellow and remove + // this comment! + parachains_scheduler::migration::MigrateV1ToV2, ); } From 48f12556ae128f26d28b2fff999eec71dcba5249 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 29 Jan 2024 16:43:01 +0100 Subject: [PATCH 098/316] [parachains_configuration] add `parachains_configuration::migration::v11::MigrateToV11` --- relay/kusama/src/lib.rs | 1 + relay/polkadot/src/lib.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 293d48ae73..ce18a5319d 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1699,6 +1699,7 @@ pub mod migrations { // pallet_nomination_pools::migration::versioned::V7ToV8, pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, + parachains_configuration::migration::v11::MigrateToV11, pallet_grandpa::migrations::MigrateV4ToV5, // Migrate Identity pallet for Usernames pallet_identity::migration::versioned::V0ToV1, diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index ebde982d66..0c65e1f8c7 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1732,6 +1732,7 @@ pub mod migrations { // pallet_nomination_pools::migration::versioned::V7ToV8, pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, + parachains_configuration::migration::v11::MigrateToV11, pallet_grandpa::migrations::MigrateV4ToV5, // Migrate Identity pallet for Usernames pallet_identity::migration::versioned::V0ToV1, From e76af9b3455f5852aa8915131d29e3046eafb2c8 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 30 Jan 2024 10:58:19 +0100 Subject: [PATCH 099/316] [emulated-tests] Added `MessageOrigin` to SP chain definitions + fixes --- Cargo.lock | 1 + .../assets/asset-hub-kusama/src/tests/swap.rs | 29 ++++++++----------- integration-tests/emulated/chains/Cargo.toml | 1 + integration-tests/emulated/chains/src/lib.rs | 9 ++++++ 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1830943f7d..e42920d62c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3236,6 +3236,7 @@ dependencies = [ "bridge-hub-kusama-runtime", "bridge-hub-polkadot-runtime", "collectives-polkadot-runtime", + "cumulus-primitives-core 0.7.0", "frame-support 28.0.0", "integration-tests-common", "kusama-runtime-constants", diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs index 02aa5259a2..fc0159df14 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs @@ -14,7 +14,6 @@ // limitations under the License. use crate::*; -use frame_support::BoundedVec; use sp_runtime::ModuleError; #[test] @@ -74,7 +73,7 @@ fn swap_locally_on_chain_using_local_assets() { ] ); - let path = BoundedVec::<_, _>::truncate_from(vec![asset_native.clone(), asset_one.clone()]); + let path = vec![asset_native.clone(), asset_one.clone()]; assert_ok!( ::AssetConversion::swap_exact_tokens_for_tokens( @@ -111,7 +110,7 @@ fn swap_locally_on_chain_using_local_assets() { #[test] fn swap_locally_on_chain_using_foreign_assets() { - let asset_native = Box::new(asset_hub_kusama_runtime::xcm_config::KsmLocation::get()); + let asset_native = asset_hub_kusama_runtime::xcm_config::KsmLocation::get(); let ah_as_seen_by_penpal = PenpalKusamaA::sibling_location_of(AssetHubKusama::para_id()); let asset_location_on_penpal = PenpalLocalTeleportableToAssetHub::get(); let asset_id_on_penpal = match asset_location_on_penpal.last() { @@ -163,12 +162,11 @@ fn swap_locally_on_chain_using_foreign_assets() { ] ); - let foreign_asset_at_asset_hub_kusama = Box::new(foreign_asset_at_asset_hub_kusama); // 4. Create pool: assert_ok!(::AssetConversion::create_pool( ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), - asset_native.clone(), - foreign_asset_at_asset_hub_kusama.clone(), + Box::new(asset_native), + Box::new(foreign_asset_at_asset_hub_kusama), )); assert_expected_events!( @@ -181,8 +179,8 @@ fn swap_locally_on_chain_using_foreign_assets() { // 5. Add liquidity: assert_ok!(::AssetConversion::add_liquidity( ::RuntimeOrigin::signed(sov_penpal_on_ahr.clone()), - asset_native.clone(), - foreign_asset_at_asset_hub_kusama.clone(), + Box::new(asset_native), + Box::new(foreign_asset_at_asset_hub_kusama), 1_000_000_000_000, 2_000_000_000_000, 0, @@ -200,10 +198,7 @@ fn swap_locally_on_chain_using_foreign_assets() { ); // 6. Swap! - let path = BoundedVec::<_, _>::truncate_from(vec![ - asset_native.clone(), - foreign_asset_at_asset_hub_kusama.clone(), - ]); + let path = vec![Box::new(asset_native), Box::new(foreign_asset_at_asset_hub_kusama)]; assert_ok!( ::AssetConversion::swap_exact_tokens_for_tokens( @@ -229,8 +224,8 @@ fn swap_locally_on_chain_using_foreign_assets() { // 7. Remove liquidity assert_ok!(::AssetConversion::remove_liquidity( ::RuntimeOrigin::signed(sov_penpal_on_ahr.clone()), - asset_native, - foreign_asset_at_asset_hub_kusama, + Box::new(asset_native), + Box::new(foreign_asset_at_asset_hub_kusama), 1414213562273 - 2_000_000_000, // all but the 2 EDs can't be retrieved. 0, 0, @@ -241,7 +236,7 @@ fn swap_locally_on_chain_using_foreign_assets() { #[test] fn cannot_create_pool_from_pool_assets() { - let asset_native = Box::new(asset_hub_kusama_runtime::xcm_config::KsmLocation::get()); + let asset_native = asset_hub_kusama_runtime::xcm_config::KsmLocation::get(); let mut asset_one = asset_hub_kusama_runtime::xcm_config::PoolAssetsPalletLocation::get(); asset_one.append_with(GeneralIndex(ASSET_ID.into())).expect("pool assets"); @@ -266,10 +261,10 @@ fn cannot_create_pool_from_pool_assets() { assert_matches::assert_matches!( ::AssetConversion::create_pool( ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), - asset_native.clone(), + Box::new(asset_native), Box::new(asset_one), ), - Err(DispatchError::Module(ModuleError{index: _, error: _, message})) => assert_eq!(message, Some("UnsupportedAsset")) + Err(DispatchError::Module(ModuleError{index: _, error: _, message})) => assert_eq!(message, Some("Unknown")) ); }); } diff --git a/integration-tests/emulated/chains/Cargo.toml b/integration-tests/emulated/chains/Cargo.toml index c54e952af8..132d1113e7 100644 --- a/integration-tests/emulated/chains/Cargo.toml +++ b/integration-tests/emulated/chains/Cargo.toml @@ -26,6 +26,7 @@ polkadot-parachain-primitives = { version = "6.0.0" } # Cumulus parachains-common = { version = "7.0.0" } +cumulus-primitives-core = { version = "0.7.0" } xcm-emulator = { version = "0.5.0" } penpal-runtime = { version = "0.14.0" } diff --git a/integration-tests/emulated/chains/src/lib.rs b/integration-tests/emulated/chains/src/lib.rs index a4e6f3eed7..4e09349582 100644 --- a/integration-tests/emulated/chains/src/lib.rs +++ b/integration-tests/emulated/chains/src/lib.rs @@ -84,6 +84,7 @@ decl_test_parachains! { XcmpMessageHandler: asset_hub_polkadot_runtime::XcmpQueue, LocationToAccountId: asset_hub_polkadot_runtime::xcm_config::LocationToAccountId, ParachainInfo: asset_hub_polkadot_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, }, pallets = { PolkadotXcm: asset_hub_polkadot_runtime::PolkadotXcm, @@ -102,6 +103,7 @@ decl_test_parachains! { XcmpMessageHandler: collectives_polkadot_runtime::XcmpQueue, LocationToAccountId: collectives_polkadot_runtime::xcm_config::LocationToAccountId, ParachainInfo: collectives_polkadot_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, }, pallets = { PolkadotXcm: collectives_polkadot_runtime::PolkadotXcm, @@ -118,6 +120,7 @@ decl_test_parachains! { XcmpMessageHandler: bridge_hub_polkadot_runtime::XcmpQueue, LocationToAccountId: bridge_hub_polkadot_runtime::xcm_config::LocationToAccountId, ParachainInfo: bridge_hub_polkadot_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, }, pallets = { PolkadotXcm: bridge_hub_polkadot_runtime::PolkadotXcm, @@ -133,6 +136,7 @@ decl_test_parachains! { XcmpMessageHandler: penpal_runtime::XcmpQueue, LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, ParachainInfo: penpal_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, }, pallets = { PolkadotXcm: penpal_runtime::PolkadotXcm, @@ -150,6 +154,7 @@ decl_test_parachains! { XcmpMessageHandler: penpal_runtime::XcmpQueue, LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, ParachainInfo: penpal_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, }, pallets = { PolkadotXcm: penpal_runtime::PolkadotXcm, @@ -168,6 +173,7 @@ decl_test_parachains! { XcmpMessageHandler: asset_hub_kusama_runtime::XcmpQueue, LocationToAccountId: asset_hub_kusama_runtime::xcm_config::LocationToAccountId, ParachainInfo: asset_hub_kusama_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, }, pallets = { PolkadotXcm: asset_hub_kusama_runtime::PolkadotXcm, @@ -188,6 +194,7 @@ decl_test_parachains! { XcmpMessageHandler: bridge_hub_kusama_runtime::XcmpQueue, LocationToAccountId: bridge_hub_kusama_runtime::xcm_config::LocationToAccountId, ParachainInfo: bridge_hub_kusama_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, }, pallets = { PolkadotXcm: bridge_hub_kusama_runtime::PolkadotXcm, @@ -203,6 +210,7 @@ decl_test_parachains! { XcmpMessageHandler: penpal_runtime::XcmpQueue, LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, ParachainInfo: penpal_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, }, pallets = { PolkadotXcm: penpal_runtime::PolkadotXcm, @@ -220,6 +228,7 @@ decl_test_parachains! { XcmpMessageHandler: penpal_runtime::XcmpQueue, LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, ParachainInfo: penpal_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, }, pallets = { PolkadotXcm: penpal_runtime::PolkadotXcm, From 5fee984460a10aeff9c2623c546d4be4b4c5f235 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Fri, 9 Feb 2024 11:39:21 +0200 Subject: [PATCH 100/316] adds deneb epoch for mainnet --- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 2 +- system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 1975573179..4a108b6cac 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -639,7 +639,7 @@ parameter_types! { }, deneb: Fork { version: [4, 0, 0, 0], // 0x04000000 - epoch: 99999999, // TODO update when epoch becomes known + epoch: 269568, }, }; } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 01646d577d..66577927c1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -639,7 +639,7 @@ parameter_types! { }, deneb: Fork { version: [4, 0, 0, 0], // 0x04000000 - epoch: 99999999, // TODO update when epoch becomes known + epoch: 269568, // TODO update when epoch becomes known }, }; } From 1ba0c11fd0f1cf19a1111e16c743668e868711f0 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 12 Feb 2024 11:54:58 +0100 Subject: [PATCH 101/316] [xcm-builder] allow(deprecated) xcm_builder::CurrencyAdapter + TODO --- relay/kusama/src/xcm_config.rs | 7 +++++-- relay/polkadot/src/xcm_config.rs | 7 +++++-- .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 9 ++++++--- .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 9 ++++++--- .../bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 9 ++++++--- .../bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs | 9 ++++++--- .../collectives/collectives-polkadot/src/xcm_config.rs | 9 ++++++--- 7 files changed, 40 insertions(+), 19 deletions(-) diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index e549d1ba78..12586401f1 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -34,11 +34,13 @@ use runtime_common::{ }; use sp_core::ConstU32; use xcm::latest::prelude::*; +// TODO:(PR#159) change to FungibleAdapter +#[allow(deprecated)] +use xcm_builder::CurrencyAdapter as XcmCurrencyAdapter; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, - ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal, - DescribeFamily, + ChildParachainConvertsVia, DescribeAllTerminal, DescribeFamily, /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` * FrameTransactionalProcessor, */ HashedDescription, IsChildSystemParachain, IsConcrete, MintLocation, OriginToPluralityVoice, @@ -82,6 +84,7 @@ pub type SovereignAccountOf = ( /// point of view of XCM-only concepts like `MultiLocation` and `MultiAsset`. /// /// Ours is only aware of the Balances pallet, which is mapped to `TokenLocation`. +#[allow(deprecated)] pub type LocalAssetTransactor = XcmCurrencyAdapter< // Use this currency: Balances, diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index d543e9b5be..ba73646b2d 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -39,11 +39,13 @@ use runtime_common::{ }; use sp_core::ConstU32; use xcm::latest::prelude::*; +// TODO:(PR#159) change to FungibleAdapter +#[allow(deprecated)] +use xcm_builder::CurrencyAdapter as XcmCurrencyAdapter; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, - ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal, - DescribeFamily, + ChildParachainConvertsVia, DescribeAllTerminal, DescribeFamily, /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` * FrameTransactionalProcessor, */ HashedDescription, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, @@ -85,6 +87,7 @@ pub type SovereignAccountOf = ( /// of view of XCM-only concepts like `MultiLocation` and `MultiAsset`. /// /// Ours is only aware of the Balances pallet, which is mapped to `TokenLocation`. +#[allow(deprecated)] pub type LocalAssetTransactor = XcmCurrencyAdapter< // Use this currency: Balances, diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index f61ed2678e..3cc0f174c1 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -39,11 +39,13 @@ use polkadot_parachain_primitives::primitives::Sibling; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; +// TODO:(PR#159) change to FungibleAdapter +#[allow(deprecated)] +use xcm_builder::CurrencyAdapter; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, - DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - EnsureXcmOrigin, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, + DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` * FrameTransactionalProcessor, */ FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, @@ -93,6 +95,7 @@ pub type LocationToAccountId = ( ); /// Means for transacting the native currency on this chain. +#[allow(deprecated)] pub type CurrencyTransactor = CurrencyAdapter< // Use this currency: Balances, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index c059ecd7ee..83256f8610 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -39,11 +39,13 @@ use polkadot_runtime_constants::system_parachain; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; +// TODO:(PR#159) change to FungibleAdapter +#[allow(deprecated)] +use xcm_builder::CurrencyAdapter; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, - DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - EnsureXcmOrigin, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, + DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` * FrameTransactionalProcessor, */ FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, @@ -89,6 +91,7 @@ pub type LocationToAccountId = ( ); /// Means for transacting the native currency on this chain. +#[allow(deprecated)] pub type CurrencyTransactor = CurrencyAdapter< // Use this currency: Balances, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 1753860967..918d52a5e5 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -37,11 +37,13 @@ use polkadot_parachain_primitives::primitives::Sibling; use sp_runtime::traits::AccountIdConversion; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; +// TODO:(PR#159) change to FungibleAdapter +#[allow(deprecated)] +use xcm_builder::CurrencyAdapter; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, - DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - EnsureXcmOrigin, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, + DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` * FrameTransactionalProcessor, */ HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, @@ -81,6 +83,7 @@ pub type LocationToAccountId = ( ); /// Means for transacting the native currency on this chain. +#[allow(deprecated)] pub type CurrencyTransactor = CurrencyAdapter< // Use this currency: Balances, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 9ff8100375..95f5fbbc02 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -37,11 +37,13 @@ use polkadot_runtime_constants::system_parachain; use sp_runtime::traits::AccountIdConversion; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; +// TODO:(PR#159) change to FungibleAdapter +#[allow(deprecated)] +use xcm_builder::CurrencyAdapter; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, - DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - EnsureXcmOrigin, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, + DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` * FrameTransactionalProcessor, */ HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, @@ -81,6 +83,7 @@ pub type LocationToAccountId = ( ); /// Means for transacting the native currency on this chain. +#[allow(deprecated)] pub type CurrencyTransactor = CurrencyAdapter< // Use this currency: Balances, diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 7e6d0bd098..31863586b8 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -34,11 +34,13 @@ use polkadot_runtime_constants::{system_parachain, xcm as xcm_constants}; use sp_runtime::traits::AccountIdConversion; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; +// TODO:(PR#159) change to FungibleAdapter +#[allow(deprecated)] +use xcm_builder::CurrencyAdapter; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, - DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - DescribeTerminus, EnsureXcmOrigin, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, + DenyThenTry, DescribeAllTerminal, DescribeFamily, DescribeTerminus, EnsureXcmOrigin, FixedWeightBounds, /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` * FrameTransactionalProcessor, */ HashedDescription, IsConcrete, OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset, @@ -80,6 +82,7 @@ pub type LocationToAccountId = ( ); /// Means for transacting the native currency on this chain. +#[allow(deprecated)] pub type CurrencyTransactor = CurrencyAdapter< // Use this currency: Balances, From 3e55fe6d9f124794d192b5b414acc41107d4320b Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 12 Feb 2024 15:37:00 +0100 Subject: [PATCH 102/316] Finally patched `pallet-nomination-pools` + removed tmp migration --- Cargo.lock | 4 +- relay/kusama/Cargo.toml | 2 +- relay/kusama/src/lib.rs | 308 +------------------------------------ relay/polkadot/Cargo.toml | 2 +- relay/polkadot/src/lib.rs | 309 +------------------------------------- 5 files changed, 8 insertions(+), 617 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b754d927f1..0a20e22a89 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7956,9 +7956,9 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" -version = "24.0.0" +version = "24.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdcf958a1c1f516adad578c697907bd03a9f4a94533100fb788bea7566b9745d" +checksum = "fc4d609e5aed9d34a5d64c9564008b44afc16d3fc16b9642fe3c32aa91ab5648" dependencies = [ "frame-support 27.0.0", "frame-system 27.0.0", diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index eaa7c9cbf0..95047b3b13 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -71,7 +71,7 @@ pallet-membership = { default-features = false , version = "27.0.0" } pallet-message-queue = { default-features = false , version = "30.0.0" } pallet-mmr = { default-features = false , version = "26.0.0" } pallet-multisig = { default-features = false , version = "27.0.0" } -pallet-nomination-pools = { default-features = false , version = "24.0.0" } +pallet-nomination-pools = { default-features = false , version = "24.0.1" } pallet-offences = { default-features = false , version = "26.0.0" } pallet-preimage = { default-features = false , version = "27.0.0" } pallet-proxy = { default-features = false , version = "27.0.0" } diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index f4012a5bda..228297824a 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1672,12 +1672,8 @@ pub mod migrations { /// Unreleased migrations. Add new ones here: pub type Unreleased = ( pallet_nomination_pools::migration::versioned::V5toV6, - // TODO:(PR#137) - replace with fixed/released version - crate::test_oliverfix_migration::V6ToV7, - // pallet_nomination_pools::migration::versioned::V6ToV7, - // TODO:(PR#137) - replace with fixed/released version - crate::test_oliverfix_migration::V7ToV8, - // pallet_nomination_pools::migration::versioned::V7ToV8, + pallet_nomination_pools::migration::versioned::V6ToV7, + pallet_nomination_pools::migration::versioned::V7ToV8, pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, pallet_grandpa::migrations::MigrateV4ToV5, @@ -2780,303 +2776,3 @@ mod init_state_migration { } } } - -// TODO:(PR#137) - replace with fixed/released version -mod test_oliverfix_migration { - use super::*; - use frame_support::{ - traits::OnRuntimeUpgrade, DebugNoBound, RuntimeDebugNoBound, Twox64Concat, - }; - use frame_system::pallet_prelude::BlockNumberFor; - use pallet_nomination_pools::*; - use sp_runtime::Saturating; - - pub type V7ToV8 = frame_support::migrations::VersionedMigration< - 7, - 8, - v8::VersionUncheckedMigrateV7ToV8, - pallet_nomination_pools::pallet::Pallet, - ::DbWeight, - >; - - pub type V6ToV7 = frame_support::migrations::VersionedMigration< - 6, - 7, - v7::VersionUncheckedMigrateV6ToV7, - pallet_nomination_pools::pallet::Pallet, - ::DbWeight, - >; - - pub mod v8 { - use super::{v7::V7BondedPoolInner, *}; - - impl V7BondedPoolInner { - fn migrate_to_v8(self) -> BondedPoolInner { - BondedPoolInner { - commission: Commission { - current: self.commission.current, - max: self.commission.max, - change_rate: self.commission.change_rate, - throttle_from: self.commission.throttle_from, - // `claim_permission` is a new field. - claim_permission: None, - }, - member_counter: self.member_counter, - points: self.points, - roles: self.roles, - state: self.state, - } - } - } - - pub struct VersionUncheckedMigrateV7ToV8(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for VersionUncheckedMigrateV7ToV8 { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - Ok(Vec::new()) - } - - fn on_runtime_upgrade() -> Weight { - let mut translated = 0u64; - BondedPools::::translate::, _>(|_key, old_value| { - translated.saturating_inc(); - Some(old_value.migrate_to_v8()) - }); - T::DbWeight::get().reads_writes(translated, translated + 1) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_: Vec) -> Result<(), sp_runtime::TryRuntimeError> { - // Check new `claim_permission` field is present. - frame_support::ensure!( - BondedPools::::iter() - .all(|(_, inner)| inner.commission.claim_permission.is_none()), - "`claim_permission` value has not been set correctly." - ); - use frame_support::traits::GetStorageVersion; - frame_support::ensure!( - Pallet::::on_chain_storage_version() >= 8, - "nomination-pools::migration::v8: wrong storage version" - ); - Ok(()) - } - } - } - - /// This migration accumulates and initializes the [`TotalValueLocked`] for all pools. - /// - /// WARNING: This migration works under the assumption that the [`BondedPools`] cannot be - /// inflated arbitrarily. Otherwise this migration could fail due to too high weight. - pub(crate) mod v7 { - use super::*; - use frame_support::{BoundedBTreeMap, DefaultNoBound}; - use sp_runtime::traits::{Convert, Zero}; - use sp_staking::EraIndex; - - #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] - #[codec(mel_bound(T: Config))] - #[scale_info(skip_type_params(T))] - pub struct V7Commission { - pub current: Option<(Perbill, T::AccountId)>, - pub max: Option, - pub change_rate: Option>>, - pub throttle_from: Option>, - } - - #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] - #[codec(mel_bound(T: Config))] - #[scale_info(skip_type_params(T))] - pub struct V7BondedPoolInner { - pub commission: V7Commission, - pub member_counter: u32, - pub points: BalanceOf, - pub roles: PoolRoles, - pub state: PoolState, - } - - #[allow(dead_code)] - #[derive(RuntimeDebugNoBound)] - #[cfg_attr(feature = "std", derive(Clone, PartialEq))] - pub struct V7BondedPool { - /// The identifier of the pool. - id: PoolId, - /// The inner fields. - inner: V7BondedPoolInner, - } - - impl V7BondedPool { - fn bonded_account(&self) -> T::AccountId { - Pallet::::create_bonded_account(self.id) - } - fn points_to_balance(&self, points: BalanceOf) -> BalanceOf { - use sp_staking::StakingInterface; - let bonded_balance = - T::Staking::active_stake(&self.bonded_account()).unwrap_or(Zero::zero()); - point_to_balance::(bonded_balance, self.inner.points, points) - } - } - - // NOTE: We cannot put a V7 prefix here since that would change the storage key. - #[frame_support::storage_alias] - pub type BondedPools = - CountedStorageMap, Twox64Concat, PoolId, V7BondedPoolInner>; - - pub struct VersionUncheckedMigrateV6ToV7(sp_std::marker::PhantomData); - impl VersionUncheckedMigrateV6ToV7 { - fn calculate_tvl_by_total_stake() -> BalanceOf { - use sp_staking::StakingInterface; - BondedPools::::iter() - .map(|(id, inner)| { - T::Staking::total_stake( - &V7BondedPool { id, inner: inner.clone() }.bonded_account(), - ) - .unwrap_or_default() - }) - .reduce(|acc, total_balance| acc + total_balance) - .unwrap_or_default() - } - } - - impl OnRuntimeUpgrade for VersionUncheckedMigrateV6ToV7 { - fn on_runtime_upgrade() -> Weight { - let migrated = BondedPools::::count(); - // The TVL should be the sum of all the funds that are actively staked and in the - // unbonding process of the account of each pool. - let tvl: BalanceOf = Self::calculate_tvl_by_total_stake(); - - TotalValueLocked::::set(tvl); - - log!(info, "Upgraded {} pools with a TVL of {:?}", migrated, tvl); - - // reads: migrated * (BondedPools + Staking::total_stake) + count + onchain - // version - // - // writes: current version + TVL - T::DbWeight::get() - .reads_writes(migrated.saturating_mul(2).saturating_add(2).into(), 2) - } - - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - Ok(Vec::new()) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_data: Vec) -> Result<(), sp_runtime::TryRuntimeError> { - // check that the `TotalValueLocked` written is actually the sum of `total_stake` of - // the `BondedPools`` - let tvl: BalanceOf = Self::calculate_tvl_by_total_stake(); - frame_support::ensure!( - TotalValueLocked::::get() == tvl, - "TVL written is not equal to `Staking::total_stake` of all `BondedPools`." - ); - - // calculate the sum of `total_balance` of all `PoolMember` as the upper bound for - // the `TotalValueLocked`. - let total_balance_members: BalanceOf = PoolMembers::::iter() - .map(|(_, member)| total_balance(&member)) - .reduce(|acc, total_balance| acc + total_balance) - .unwrap_or_default(); - - frame_support::ensure!( - TotalValueLocked::::get() <= total_balance_members, - "TVL is greater than the balance of all PoolMembers." - ); - - use frame_support::traits::GetStorageVersion; - frame_support::ensure!( - Pallet::::on_chain_storage_version() >= 7, - "nomination-pools::migration::v7: wrong storage version" - ); - - Ok(()) - } - } - - #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, RuntimeDebugNoBound)] - #[cfg_attr(feature = "std", derive(Clone, PartialEq, Eq))] - #[codec(mel_bound(T: Config))] - #[scale_info(skip_type_params(T))] - pub struct UnbondPool { - /// The points in this pool. - points: BalanceOf, - /// The funds in the pool. - balance: BalanceOf, - } - - impl UnbondPool { - fn point_to_balance(&self, points: BalanceOf) -> BalanceOf { - point_to_balance::(self.balance, self.points, points) - } - } - - #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, RuntimeDebugNoBound)] - #[cfg_attr(feature = "std", derive(Clone, PartialEq))] - #[codec(mel_bound(T: Config))] - #[scale_info(skip_type_params(T))] - pub struct SubPools { - /// A general, era agnostic pool of funds that have fully unbonded. The pools - /// of `Self::with_era` will lazily be merged into into this pool if they are - /// older then `current_era - TotalUnbondingPools`. - no_era: UnbondPool, - /// Map of era in which a pool becomes unbonded in => unbond pools. - with_era: BoundedBTreeMap, TotalUnbondingPools>, - } - - #[frame_support::storage_alias] - pub type SubPoolsStorage = - CountedStorageMap, Twox64Concat, PoolId, SubPools>; - - // TODO:(PR#137) - hacky copy of pallet-nomination-pools, because lots of this stuff is - // private there. - fn total_balance(self_as_member: &PoolMember) -> BalanceOf { - // let pool = V7BondedPool::::get(self_as_member.pool_id).unwrap(); - let id = self_as_member.pool_id; - let pool = BondedPools::::try_get(id) - .ok() - .map(|inner| V7BondedPool { id, inner }) - .unwrap(); - let active_balance = pool.points_to_balance(self_as_member.points); - - let sub_pools = match SubPoolsStorage::::get(self_as_member.pool_id) { - Some(sub_pools) => sub_pools, - None => return active_balance, - }; - - let unbonding_balance = self_as_member.unbonding_eras.iter().fold( - BalanceOf::::zero(), - |accumulator, (era, unlocked_points)| { - // if the `SubPools::with_era` has already been merged into the - // `SubPools::no_era` use this pool instead. - let era_pool = sub_pools.with_era.get(era).unwrap_or(&sub_pools.no_era); - accumulator + (era_pool.point_to_balance(*unlocked_points)) - }, - ); - - active_balance + unbonding_balance - } - - fn point_to_balance( - current_balance: BalanceOf, - current_points: BalanceOf, - points: BalanceOf, - ) -> BalanceOf { - let u256 = T::BalanceToU256::convert; - let balance = T::U256ToBalance::convert; - if current_balance.is_zero() || current_points.is_zero() || points.is_zero() { - // There is nothing to unbond - return Zero::zero() - } - - use sp_std::ops::Div; - - // Equivalent of (current_balance / current_points) * points - balance( - u256(current_balance) - .saturating_mul(u256(points)) - // We check for zero above - .div(u256(current_points)), - ) - } - } -} diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index 62e8fd97ff..01a85ee55b 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -67,7 +67,7 @@ pallet-membership = { default-features = false , version = "27.0.0" } pallet-message-queue = { default-features = false , version = "30.0.0" } pallet-mmr = { default-features = false , version = "26.0.0" } pallet-multisig = { default-features = false , version = "27.0.0" } -pallet-nomination-pools = { default-features = false , version = "24.0.0" } +pallet-nomination-pools = { default-features = false , version = "24.0.1" } pallet-nomination-pools-runtime-api = { default-features = false , version = "22.0.0" } pallet-offences = { default-features = false , version = "26.0.0" } pallet-preimage = { default-features = false , version = "27.0.0" } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index ad0938887a..bdb438aadc 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1705,12 +1705,8 @@ pub mod migrations { // Upgrade SessionKeys to include BEEFY key UpgradeSessionKeys, pallet_nomination_pools::migration::versioned::V5toV6, - // TODO:(PR#137) - replace with fixed/released version - crate::test_oliverfix_migration::V6ToV7, - // pallet_nomination_pools::migration::versioned::V6ToV7, - // TODO:(PR#137) - replace with fixed/released version - crate::test_oliverfix_migration::V7ToV8, - // pallet_nomination_pools::migration::versioned::V7ToV8, + pallet_nomination_pools::migration::versioned::V6ToV7, + pallet_nomination_pools::migration::versioned::V7ToV8, pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, pallet_grandpa::migrations::MigrateV4ToV5, @@ -2958,304 +2954,3 @@ mod remote_tests { }); } } - -// TODO:(PR#137) - replace with fixed/released version -mod test_oliverfix_migration { - use super::*; - use frame_support::{ - pallet_prelude::TypeInfo, traits::OnRuntimeUpgrade, DebugNoBound, RuntimeDebugNoBound, - Twox64Concat, - }; - use frame_system::pallet_prelude::BlockNumberFor; - use pallet_nomination_pools::*; - use sp_runtime::Saturating; - - pub type V7ToV8 = frame_support::migrations::VersionedMigration< - 7, - 8, - v8::VersionUncheckedMigrateV7ToV8, - pallet_nomination_pools::pallet::Pallet, - ::DbWeight, - >; - - pub type V6ToV7 = frame_support::migrations::VersionedMigration< - 6, - 7, - v7::VersionUncheckedMigrateV6ToV7, - pallet_nomination_pools::pallet::Pallet, - ::DbWeight, - >; - - pub mod v8 { - use super::{v7::V7BondedPoolInner, *}; - - impl V7BondedPoolInner { - fn migrate_to_v8(self) -> BondedPoolInner { - BondedPoolInner { - commission: Commission { - current: self.commission.current, - max: self.commission.max, - change_rate: self.commission.change_rate, - throttle_from: self.commission.throttle_from, - // `claim_permission` is a new field. - claim_permission: None, - }, - member_counter: self.member_counter, - points: self.points, - roles: self.roles, - state: self.state, - } - } - } - - pub struct VersionUncheckedMigrateV7ToV8(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for VersionUncheckedMigrateV7ToV8 { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - Ok(Vec::new()) - } - - fn on_runtime_upgrade() -> Weight { - let mut translated = 0u64; - BondedPools::::translate::, _>(|_key, old_value| { - translated.saturating_inc(); - Some(old_value.migrate_to_v8()) - }); - T::DbWeight::get().reads_writes(translated, translated + 1) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_: Vec) -> Result<(), sp_runtime::TryRuntimeError> { - // Check new `claim_permission` field is present. - frame_support::ensure!( - BondedPools::::iter() - .all(|(_, inner)| inner.commission.claim_permission.is_none()), - "`claim_permission` value has not been set correctly." - ); - use frame_support::traits::GetStorageVersion; - frame_support::ensure!( - Pallet::::on_chain_storage_version() >= 8, - "nomination-pools::migration::v8: wrong storage version" - ); - Ok(()) - } - } - } - - /// This migration accumulates and initializes the [`TotalValueLocked`] for all pools. - /// - /// WARNING: This migration works under the assumption that the [`BondedPools`] cannot be - /// inflated arbitrarily. Otherwise this migration could fail due to too high weight. - pub(crate) mod v7 { - use super::*; - use frame_support::{BoundedBTreeMap, DefaultNoBound}; - use sp_runtime::traits::{Convert, Zero}; - use sp_staking::EraIndex; - - #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] - #[codec(mel_bound(T: Config))] - #[scale_info(skip_type_params(T))] - pub struct V7Commission { - pub current: Option<(Perbill, T::AccountId)>, - pub max: Option, - pub change_rate: Option>>, - pub throttle_from: Option>, - } - - #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] - #[codec(mel_bound(T: Config))] - #[scale_info(skip_type_params(T))] - pub struct V7BondedPoolInner { - pub commission: V7Commission, - pub member_counter: u32, - pub points: BalanceOf, - pub roles: PoolRoles, - pub state: PoolState, - } - - #[allow(dead_code)] - #[derive(RuntimeDebugNoBound)] - #[cfg_attr(feature = "std", derive(Clone, PartialEq))] - pub struct V7BondedPool { - /// The identifier of the pool. - id: PoolId, - /// The inner fields. - inner: V7BondedPoolInner, - } - - impl V7BondedPool { - fn bonded_account(&self) -> T::AccountId { - Pallet::::create_bonded_account(self.id) - } - fn points_to_balance(&self, points: BalanceOf) -> BalanceOf { - use sp_staking::StakingInterface; - let bonded_balance = - T::Staking::active_stake(&self.bonded_account()).unwrap_or(Zero::zero()); - point_to_balance::(bonded_balance, self.inner.points, points) - } - } - - // NOTE: We cannot put a V7 prefix here since that would change the storage key. - #[frame_support::storage_alias] - pub type BondedPools = - CountedStorageMap, Twox64Concat, PoolId, V7BondedPoolInner>; - - pub struct VersionUncheckedMigrateV6ToV7(sp_std::marker::PhantomData); - impl VersionUncheckedMigrateV6ToV7 { - fn calculate_tvl_by_total_stake() -> BalanceOf { - use sp_staking::StakingInterface; - BondedPools::::iter() - .map(|(id, inner)| { - T::Staking::total_stake( - &V7BondedPool { id, inner: inner.clone() }.bonded_account(), - ) - .unwrap_or_default() - }) - .reduce(|acc, total_balance| acc + total_balance) - .unwrap_or_default() - } - } - - impl OnRuntimeUpgrade for VersionUncheckedMigrateV6ToV7 { - fn on_runtime_upgrade() -> Weight { - let migrated = BondedPools::::count(); - // The TVL should be the sum of all the funds that are actively staked and in the - // unbonding process of the account of each pool. - let tvl: BalanceOf = Self::calculate_tvl_by_total_stake(); - - TotalValueLocked::::set(tvl); - - log!(info, "Upgraded {} pools with a TVL of {:?}", migrated, tvl); - - // reads: migrated * (BondedPools + Staking::total_stake) + count + onchain - // version - // - // writes: current version + TVL - T::DbWeight::get() - .reads_writes(migrated.saturating_mul(2).saturating_add(2).into(), 2) - } - - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - Ok(Vec::new()) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_data: Vec) -> Result<(), sp_runtime::TryRuntimeError> { - // check that the `TotalValueLocked` written is actually the sum of `total_stake` of - // the `BondedPools`` - let tvl: BalanceOf = Self::calculate_tvl_by_total_stake(); - frame_support::ensure!( - TotalValueLocked::::get() == tvl, - "TVL written is not equal to `Staking::total_stake` of all `BondedPools`." - ); - - // calculate the sum of `total_balance` of all `PoolMember` as the upper bound for - // the `TotalValueLocked`. - let total_balance_members: BalanceOf = PoolMembers::::iter() - .map(|(_, member)| total_balance(&member)) - .reduce(|acc, total_balance| acc + total_balance) - .unwrap_or_default(); - - frame_support::ensure!( - TotalValueLocked::::get() <= total_balance_members, - "TVL is greater than the balance of all PoolMembers." - ); - - use frame_support::traits::GetStorageVersion; - frame_support::ensure!( - Pallet::::on_chain_storage_version() >= 7, - "nomination-pools::migration::v7: wrong storage version" - ); - - Ok(()) - } - } - - #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, RuntimeDebugNoBound)] - #[cfg_attr(feature = "std", derive(Clone, PartialEq, Eq))] - #[codec(mel_bound(T: Config))] - #[scale_info(skip_type_params(T))] - pub struct UnbondPool { - /// The points in this pool. - points: BalanceOf, - /// The funds in the pool. - balance: BalanceOf, - } - - impl UnbondPool { - fn point_to_balance(&self, points: BalanceOf) -> BalanceOf { - point_to_balance::(self.balance, self.points, points) - } - } - - #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, RuntimeDebugNoBound)] - #[cfg_attr(feature = "std", derive(Clone, PartialEq))] - #[codec(mel_bound(T: Config))] - #[scale_info(skip_type_params(T))] - pub struct SubPools { - /// A general, era agnostic pool of funds that have fully unbonded. The pools - /// of `Self::with_era` will lazily be merged into into this pool if they are - /// older then `current_era - TotalUnbondingPools`. - no_era: UnbondPool, - /// Map of era in which a pool becomes unbonded in => unbond pools. - with_era: BoundedBTreeMap, TotalUnbondingPools>, - } - - #[frame_support::storage_alias] - pub type SubPoolsStorage = - CountedStorageMap, Twox64Concat, PoolId, SubPools>; - - // TODO:(PR#137) - hacky copy of pallet-nomination-pools, because lots of this stuff is - // private there. - fn total_balance(self_as_member: &PoolMember) -> BalanceOf { - // let pool = V7BondedPool::::get(self_as_member.pool_id).unwrap(); - let id = self_as_member.pool_id; - let pool = BondedPools::::try_get(id) - .ok() - .map(|inner| V7BondedPool { id, inner }) - .unwrap(); - let active_balance = pool.points_to_balance(self_as_member.points); - - let sub_pools = match SubPoolsStorage::::get(self_as_member.pool_id) { - Some(sub_pools) => sub_pools, - None => return active_balance, - }; - - let unbonding_balance = self_as_member.unbonding_eras.iter().fold( - BalanceOf::::zero(), - |accumulator, (era, unlocked_points)| { - // if the `SubPools::with_era` has already been merged into the - // `SubPools::no_era` use this pool instead. - let era_pool = sub_pools.with_era.get(era).unwrap_or(&sub_pools.no_era); - accumulator + (era_pool.point_to_balance(*unlocked_points)) - }, - ); - - active_balance + unbonding_balance - } - - fn point_to_balance( - current_balance: BalanceOf, - current_points: BalanceOf, - points: BalanceOf, - ) -> BalanceOf { - let u256 = T::BalanceToU256::convert; - let balance = T::U256ToBalance::convert; - if current_balance.is_zero() || current_points.is_zero() || points.is_zero() { - // There is nothing to unbond - return Zero::zero() - } - - use sp_std::ops::Div; - - // Equivalent of (current_balance / current_points) * points - balance( - u256(current_balance) - .saturating_mul(u256(points)) - // We check for zero above - .div(u256(current_points)), - ) - } - } -} From 288f0a140043435f8f46ab4b4d163103918d6437 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 13 Feb 2024 09:29:19 +0100 Subject: [PATCH 103/316] Finally patched `pallet-nomination-pools` + removed tmp migration --- Cargo.lock | 4 ++-- relay/kusama/Cargo.toml | 2 +- relay/polkadot/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0a20e22a89..6b62c82770 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7956,9 +7956,9 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" -version = "24.0.1" +version = "24.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4d609e5aed9d34a5d64c9564008b44afc16d3fc16b9642fe3c32aa91ab5648" +checksum = "32950c1329132fbb7f0f70efddafbbe103fc15bcb9528e3a3406639935d1c6e4" dependencies = [ "frame-support 27.0.0", "frame-system 27.0.0", diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index 95047b3b13..e93235e5d8 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -71,7 +71,7 @@ pallet-membership = { default-features = false , version = "27.0.0" } pallet-message-queue = { default-features = false , version = "30.0.0" } pallet-mmr = { default-features = false , version = "26.0.0" } pallet-multisig = { default-features = false , version = "27.0.0" } -pallet-nomination-pools = { default-features = false , version = "24.0.1" } +pallet-nomination-pools = { default-features = false , version = "24.0.2" } pallet-offences = { default-features = false , version = "26.0.0" } pallet-preimage = { default-features = false , version = "27.0.0" } pallet-proxy = { default-features = false , version = "27.0.0" } diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index 01a85ee55b..b527cca7e6 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -67,7 +67,7 @@ pallet-membership = { default-features = false , version = "27.0.0" } pallet-message-queue = { default-features = false , version = "30.0.0" } pallet-mmr = { default-features = false , version = "26.0.0" } pallet-multisig = { default-features = false , version = "27.0.0" } -pallet-nomination-pools = { default-features = false , version = "24.0.1" } +pallet-nomination-pools = { default-features = false , version = "24.0.2" } pallet-nomination-pools-runtime-api = { default-features = false , version = "22.0.0" } pallet-offences = { default-features = false , version = "26.0.0" } pallet-preimage = { default-features = false , version = "27.0.0" } From c6b16fa7631e336e2b899f6173a397bdec21c07d Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 13 Feb 2024 09:21:01 +0100 Subject: [PATCH 104/316] [xcm-executor/builder] Patch with transactional fix --- Cargo.lock | 140 +++++++++--------- integration-tests/emulated/chains/Cargo.toml | 2 +- relay/kusama/Cargo.toml | 6 +- relay/kusama/src/lib.rs | 13 +- relay/kusama/src/xcm_config.rs | 13 +- relay/polkadot/Cargo.toml | 6 +- relay/polkadot/src/lib.rs | 13 +- relay/polkadot/src/xcm_config.rs | 15 +- .../asset-hubs/asset-hub-kusama/Cargo.toml | 8 +- .../asset-hubs/asset-hub-kusama/src/lib.rs | 13 +- .../asset-hub-kusama/src/xcm_config.rs | 11 +- .../asset-hubs/asset-hub-polkadot/Cargo.toml | 8 +- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 13 +- .../asset-hub-polkadot/src/xcm_config.rs | 11 +- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 8 +- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 13 +- .../bridge-hub-kusama/src/xcm_config.rs | 14 +- .../bridge-hub-polkadot/Cargo.toml | 8 +- .../bridge-hub-polkadot/src/lib.rs | 13 +- .../bridge-hub-polkadot/src/xcm_config.rs | 14 +- .../collectives-polkadot/Cargo.toml | 6 +- .../collectives-polkadot/src/xcm_config.rs | 7 +- .../gluttons/glutton-kusama/Cargo.toml | 4 +- .../gluttons/glutton-kusama/src/xcm_config.rs | 7 +- 24 files changed, 167 insertions(+), 199 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6b62c82770..2edda45ce7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -435,7 +435,7 @@ dependencies = [ "sp-runtime 30.0.1", "staging-kusama-runtime", "staging-xcm 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-executor 6.0.2", "system-parachains-constants", "xcm-emulator", ] @@ -457,7 +457,7 @@ dependencies = [ "cumulus-pallet-xcm 0.6.0", "cumulus-pallet-xcmp-queue 0.6.0", "cumulus-primitives-core 0.6.0", - "cumulus-primitives-utility 0.6.0", + "cumulus-primitives-utility 0.6.2", "frame-benchmarking 27.0.0", "frame-executive 27.0.0", "frame-support 27.0.0", @@ -489,7 +489,7 @@ dependencies = [ "pallet-uniques", "pallet-utility 27.0.0", "pallet-xcm 6.0.0", - "pallet-xcm-benchmarks 6.0.0", + "pallet-xcm-benchmarks 6.0.2", "pallet-xcm-bridge-hub-router", "parachains-common 6.0.0", "parachains-runtimes-test-utils", @@ -517,8 +517,8 @@ dependencies = [ "sp-weights 26.0.0", "staging-parachain-info 0.6.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", "substrate-wasm-builder 16.0.0", "system-parachains-constants", ] @@ -541,7 +541,7 @@ dependencies = [ "polkadot-runtime", "sp-runtime 30.0.1", "staging-xcm 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-executor 6.0.2", "system-parachains-constants", "xcm-emulator", ] @@ -563,7 +563,7 @@ dependencies = [ "cumulus-pallet-xcm 0.6.0", "cumulus-pallet-xcmp-queue 0.6.0", "cumulus-primitives-core 0.6.0", - "cumulus-primitives-utility 0.6.0", + "cumulus-primitives-utility 0.6.2", "frame-benchmarking 27.0.0", "frame-executive 27.0.0", "frame-support 27.0.0", @@ -592,7 +592,7 @@ dependencies = [ "pallet-uniques", "pallet-utility 27.0.0", "pallet-xcm 6.0.0", - "pallet-xcm-benchmarks 6.0.0", + "pallet-xcm-benchmarks 6.0.2", "pallet-xcm-bridge-hub-router", "parachains-common 6.0.0", "parachains-runtimes-test-utils", @@ -619,8 +619,8 @@ dependencies = [ "sp-weights 26.0.0", "staging-parachain-info 0.6.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", "substrate-wasm-builder 16.0.0", "system-parachains-constants", ] @@ -656,8 +656,8 @@ dependencies = [ "sp-std 13.0.0", "staging-parachain-info 0.6.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", "substrate-wasm-builder 16.0.0", ] @@ -681,8 +681,8 @@ dependencies = [ "sp-runtime 30.0.1", "sp-std 13.0.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", "substrate-wasm-builder 16.0.0", ] @@ -1318,7 +1318,7 @@ dependencies = [ "cumulus-pallet-xcm 0.6.0", "cumulus-pallet-xcmp-queue 0.6.0", "cumulus-primitives-core 0.6.0", - "cumulus-primitives-utility 0.6.0", + "cumulus-primitives-utility 0.6.2", "frame-benchmarking 27.0.0", "frame-executive 27.0.0", "frame-support 27.0.0", @@ -1345,7 +1345,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api 27.0.0", "pallet-utility 27.0.0", "pallet-xcm 6.0.0", - "pallet-xcm-benchmarks 6.0.0", + "pallet-xcm-benchmarks 6.0.2", "pallet-xcm-bridge-hub", "parachains-common 6.0.0", "parity-scale-codec", @@ -1372,8 +1372,8 @@ dependencies = [ "sp-version 28.0.0", "staging-parachain-info 0.6.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", "static_assertions", "substrate-wasm-builder 16.0.0", "system-parachains-constants", @@ -1404,7 +1404,7 @@ dependencies = [ "cumulus-pallet-xcm 0.6.0", "cumulus-pallet-xcmp-queue 0.6.0", "cumulus-primitives-core 0.6.0", - "cumulus-primitives-utility 0.6.0", + "cumulus-primitives-utility 0.6.2", "frame-benchmarking 27.0.0", "frame-executive 27.0.0", "frame-support 27.0.0", @@ -1431,7 +1431,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api 27.0.0", "pallet-utility 27.0.0", "pallet-xcm 6.0.0", - "pallet-xcm-benchmarks 6.0.0", + "pallet-xcm-benchmarks 6.0.2", "pallet-xcm-bridge-hub", "parachains-common 6.0.0", "parity-scale-codec", @@ -1458,8 +1458,8 @@ dependencies = [ "sp-version 28.0.0", "staging-parachain-info 0.6.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", "static_assertions", "substrate-wasm-builder 16.0.0", "system-parachains-constants", @@ -1496,7 +1496,7 @@ dependencies = [ "pallet-session 27.0.0", "pallet-utility 27.0.0", "pallet-xcm 6.0.0", - "pallet-xcm-benchmarks 6.0.0", + "pallet-xcm-benchmarks 6.0.2", "parachains-common 6.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", @@ -1507,8 +1507,8 @@ dependencies = [ "sp-tracing 15.0.0", "staging-parachain-info 0.6.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", ] [[package]] @@ -1544,7 +1544,7 @@ dependencies = [ "sp-std 13.0.0", "sp-trie 28.0.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", + "staging-xcm-builder 6.0.2", "static_assertions", ] @@ -1922,7 +1922,7 @@ dependencies = [ "cumulus-pallet-xcm 0.6.0", "cumulus-pallet-xcmp-queue 0.6.0", "cumulus-primitives-core 0.6.0", - "cumulus-primitives-utility 0.6.0", + "cumulus-primitives-utility 0.6.2", "frame-benchmarking 27.0.0", "frame-executive 27.0.0", "frame-support 27.0.0", @@ -1978,8 +1978,8 @@ dependencies = [ "sp-version 28.0.0", "staging-parachain-info 0.6.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", "substrate-wasm-builder 16.0.0", "system-parachains-constants", ] @@ -2593,7 +2593,7 @@ dependencies = [ "sp-runtime 30.0.1", "sp-std 13.0.0", "staging-xcm 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-executor 6.0.2", ] [[package]] @@ -2728,14 +2728,14 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" -version = "0.6.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21cf332f275e5dcfc08cafc043bc37bfcf3989f3a39ffe1c840d44f568edb877" +checksum = "2a19c875e3fa4ac39aaf43117c7ff5230eb5b2de90d75aa782a4d81b07435bb3" dependencies = [ "cumulus-primitives-core 0.6.0", "frame-support 27.0.0", "log", - "pallet-xcm-benchmarks 6.0.0", + "pallet-xcm-benchmarks 6.0.2", "parity-scale-codec", "polkadot-runtime-common 6.0.0", "polkadot-runtime-parachains 6.0.0", @@ -2743,8 +2743,8 @@ dependencies = [ "sp-runtime 30.0.1", "sp-std 13.0.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", ] [[package]] @@ -4510,8 +4510,8 @@ dependencies = [ "sp-version 28.0.0", "staging-parachain-info 0.6.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", "substrate-wasm-builder 16.0.0", "system-parachains-constants", ] @@ -8722,8 +8722,8 @@ dependencies = [ "sp-runtime 30.0.1", "sp-std 13.0.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", ] [[package]] @@ -8748,9 +8748,9 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "6.0.0" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fd71243da6203b60fd89640aa58c5cd9f03a9d2cb1c83d10d7b60360f1326f" +checksum = "d64081cd57aa8b037fa26e701a23049c1b4e9e6b2d15bd37a389b2cb63811f6d" dependencies = [ "frame-benchmarking 27.0.0", "frame-support 27.0.0", @@ -8762,8 +8762,8 @@ dependencies = [ "sp-runtime 30.0.1", "sp-std 13.0.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", ] [[package]] @@ -8786,8 +8786,8 @@ dependencies = [ "sp-runtime 30.0.1", "sp-std 13.0.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", ] [[package]] @@ -8807,7 +8807,7 @@ dependencies = [ "sp-runtime 30.0.1", "sp-std 13.0.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", + "staging-xcm-builder 6.0.2", ] [[package]] @@ -8852,7 +8852,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95c5d3cd2e1516fad507855309237b6a6f8fe778819ce5583ce48970c524101a" dependencies = [ "cumulus-primitives-core 0.6.0", - "cumulus-primitives-utility 0.6.0", + "cumulus-primitives-utility 0.6.2", "frame-support 27.0.0", "frame-system 27.0.0", "log", @@ -8876,7 +8876,7 @@ dependencies = [ "sp-std 13.0.0", "staging-parachain-info 0.6.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", + "staging-xcm-builder 6.0.2", "substrate-wasm-builder 16.0.0", "westend-runtime-constants 6.0.0", ] @@ -8911,7 +8911,7 @@ dependencies = [ "sp-tracing 15.0.0", "staging-parachain-info 0.6.0", "staging-xcm 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-executor 6.0.2", "substrate-wasm-builder 16.0.0", ] @@ -9105,9 +9105,9 @@ dependencies = [ [[package]] name = "penpal-runtime" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b8a9b83c66de6015d3185bff94cd3a0d192f6f3421580165b1d6f74ef1b376" +checksum = "495a978c9d8eede3809fea69eeed60e7bc18dc07001ae26348532c5daa8aceb3" dependencies = [ "cumulus-pallet-aura-ext 0.6.0", "cumulus-pallet-dmp-queue 0.6.0", @@ -9116,7 +9116,7 @@ dependencies = [ "cumulus-pallet-xcm 0.6.0", "cumulus-pallet-xcmp-queue 0.6.0", "cumulus-primitives-core 0.6.0", - "cumulus-primitives-utility 0.6.0", + "cumulus-primitives-utility 0.6.2", "frame-benchmarking 27.0.0", "frame-executive 27.0.0", "frame-support 27.0.0", @@ -9161,8 +9161,8 @@ dependencies = [ "sp-version 28.0.0", "staging-parachain-info 0.6.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", "substrate-wasm-builder 16.0.0", ] @@ -9700,7 +9700,7 @@ dependencies = [ "pallet-vesting 27.0.0", "pallet-whitelist", "pallet-xcm 6.0.0", - "pallet-xcm-benchmarks 6.0.0", + "pallet-xcm-benchmarks 6.0.2", "parity-scale-codec", "polkadot-primitives 6.0.0", "polkadot-runtime-common 6.0.0", @@ -9738,8 +9738,8 @@ dependencies = [ "sp-trie 28.0.0", "sp-version 28.0.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", "static_assertions", "substrate-wasm-builder 16.0.0", "tiny-keccak", @@ -9825,7 +9825,7 @@ dependencies = [ "pallet-transaction-payment 27.0.0", "pallet-treasury 26.0.0", "pallet-vesting 27.0.0", - "pallet-xcm-benchmarks 6.0.0", + "pallet-xcm-benchmarks 6.0.2", "parity-scale-codec", "polkadot-primitives 6.0.0", "polkadot-runtime-parachains 6.0.0", @@ -9844,8 +9844,8 @@ dependencies = [ "sp-staking 25.0.0", "sp-std 13.0.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", "static_assertions", ] @@ -9984,7 +9984,7 @@ dependencies = [ "sp-std 13.0.0", "sp-tracing 15.0.0", "staging-xcm 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-executor 6.0.2", "static_assertions", ] @@ -14705,7 +14705,7 @@ dependencies = [ "pallet-vesting 27.0.0", "pallet-whitelist", "pallet-xcm 6.0.0", - "pallet-xcm-benchmarks 6.0.0", + "pallet-xcm-benchmarks 6.0.2", "parity-scale-codec", "polkadot-primitives 6.0.0", "polkadot-runtime-common 6.0.0", @@ -14742,8 +14742,8 @@ dependencies = [ "sp-trie 28.0.0", "sp-version 28.0.0", "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", "static_assertions", "substrate-wasm-builder 16.0.0", "tiny-keccak", @@ -14841,9 +14841,9 @@ dependencies = [ [[package]] name = "staging-xcm-builder" -version = "6.0.0" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6be7cc419a631fac2daa752fba1f730f7cf53b7490438342f67790de0b961508" +checksum = "e1c24e7dab7298f4a3fd346a900745af2b34691ed95eec641e25ad13679c0456" dependencies = [ "frame-support 27.0.0", "frame-system 27.0.0", @@ -14859,7 +14859,7 @@ dependencies = [ "sp-std 13.0.0", "sp-weights 26.0.0", "staging-xcm 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-executor 6.0.2", ] [[package]] @@ -14885,9 +14885,9 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "6.0.0" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19dfe56ba656b1cdb8886289618ed1d70fb5d7279cbd32c42bc2f0ce6b27845f" +checksum = "8e329638f105e28b500e31062834e1011be8a81326a8499fe2f1557e924dbe54" dependencies = [ "environmental", "frame-benchmarking 27.0.0", @@ -16730,7 +16730,7 @@ dependencies = [ "sp-std 13.0.0", "sp-tracing 15.0.0", "staging-xcm 6.0.0", - "staging-xcm-executor 6.0.0", + "staging-xcm-executor 6.0.2", ] [[package]] diff --git a/integration-tests/emulated/chains/Cargo.toml b/integration-tests/emulated/chains/Cargo.toml index 9d2df663dc..d338ca8875 100644 --- a/integration-tests/emulated/chains/Cargo.toml +++ b/integration-tests/emulated/chains/Cargo.toml @@ -27,7 +27,7 @@ polkadot-parachain-primitives = { version = "5.0.0" } # Cumulus parachains-common = { version = "6.0.0" } xcm-emulator = { version = "0.4.0" } -penpal-runtime = { version = "0.13.0" } +penpal-runtime = { version = "0.13.1" } # Local runtimes kusama-runtime = { package = "staging-kusama-runtime", path = "../../../relay/kusama" } diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index e93235e5d8..2aa26d106b 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -94,7 +94,7 @@ pallet-utility = { default-features = false , version = "27.0.0" } pallet-vesting = { default-features = false , version = "27.0.0" } pallet-whitelist = { default-features = false , version = "26.0.0" } pallet-xcm = { default-features = false , version = "6.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.2" } frame-election-provider-support = { default-features = false , version = "27.0.0" } frame-benchmarking = { default-features = false, optional = true , version = "27.0.0" } @@ -111,8 +111,8 @@ runtime-parachains = { package = "polkadot-runtime-parachains", default-features primitives = { package = "polkadot-primitives", default-features = false , version = "6.0.0" } xcm = { package = "staging-xcm", default-features = false , version = "6.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "6.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "6.0.2" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "6.0.2" } sp-debug-derive = { default-features = false, version = "13.0.0" } diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 228297824a..125b9f2610 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -2454,13 +2454,12 @@ sp_api::impl_runtime_apis! { Ok((origin, ticket, assets)) } - // TODO:(PR#137) - revert back with `polkadot-sdk@1.6.0` or `polkadot-sdk@1.7.0` - // fn fee_asset() -> Result { - // Ok(MultiAsset { - // id: Concrete(TokenLocation::get()), - // fun: Fungible(1_000_000 * UNITS), - // }) - // } + fn fee_asset() -> Result { + Ok(MultiAsset { + id: Concrete(TokenLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { // Kusama doesn't support asset locking diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index e549d1ba78..989008d758 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -38,12 +38,10 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal, - DescribeFamily, - /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` - * FrameTransactionalProcessor, */ - HashedDescription, IsChildSystemParachain, IsConcrete, MintLocation, OriginToPluralityVoice, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + DescribeFamily, FrameTransactionalProcessor, HashedDescription, IsChildSystemParachain, + IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, + UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; @@ -214,8 +212,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; - // TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` - // type TransactionalProcessor = FrameTransactionalProcessor; + type TransactionalProcessor = FrameTransactionalProcessor; } parameter_types! { diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index b527cca7e6..6cae342373 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -91,7 +91,7 @@ pallet-vesting = { default-features = false , version = "27.0.0" } pallet-utility = { default-features = false , version = "27.0.0" } frame-election-provider-support = { default-features = false , version = "27.0.0" } pallet-xcm = { default-features = false, version = "6.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.2" } frame-benchmarking = { default-features = false, optional = true , version = "27.0.0" } frame-try-runtime = { default-features = false, optional = true , version = "0.33.0" } @@ -107,8 +107,8 @@ runtime-parachains = { package = "polkadot-runtime-parachains", default-features primitives = { package = "polkadot-primitives", default-features = false , version = "6.0.0" } xcm = { package = "staging-xcm", default-features = false , version = "6.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "6.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "6.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "6.0.2" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "6.0.2" } sp-debug-derive = { default-features = false, version = "13.0.0" } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index bdb438aadc..754cd68a11 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -2453,13 +2453,12 @@ sp_api::impl_runtime_apis! { Ok((origin, ticket, assets)) } - // TODO:(PR#137) - revert back with `polkadot-sdk@1.6.0` or `polkadot-sdk@1.7.0` - // fn fee_asset() -> Result { - // Ok(MultiAsset { - // id: Concrete(TokenLocation::get()), - // fun: Fungible(1_000_000 * UNITS), - // }) - // } + fn fee_asset() -> Result { + Ok(MultiAsset { + id: Concrete(TokenLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { // Polkadot doesn't support asset locking diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index d543e9b5be..12af781a2f 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -43,13 +43,11 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal, - DescribeFamily, - /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` - * FrameTransactionalProcessor, */ - HashedDescription, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, - UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, + DescribeFamily, FrameTransactionalProcessor, HashedDescription, IsConcrete, MintLocation, + OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, + XcmFeeToAccount, }; parameter_types! { @@ -229,8 +227,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; - // TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` - // type TransactionalProcessor = FrameTransactionalProcessor; + type TransactionalProcessor = FrameTransactionalProcessor; } parameter_types! { diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index 91030bd990..5b43559fbd 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -68,13 +68,13 @@ primitive-types = { version = "0.12.2", default-features = false, features = ["c # Polkadot pallet-xcm = { default-features = false, version = "6.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.2" } polkadot-core-primitives = { default-features = false, version = "6.0.0" } polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } polkadot-runtime-common = { default-features = false, version = "6.0.0" } xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.2" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.2" } # Cumulus cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } @@ -84,7 +84,7 @@ cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0 cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.6.0" } cumulus-primitives-core = { default-features = false , version = "0.6.0" } -cumulus-primitives-utility = { default-features = false , version = "0.6.0" } +cumulus-primitives-utility = { default-features = false , version = "0.6.2" } pallet-collator-selection = { default-features = false , version = "8.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } parachains-common = { default-features = false , version = "6.0.0" } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 89e3bc1074..9a7015d49a 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -1499,13 +1499,12 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } - // TODO:(PR#137) - revert back with `polkadot-sdk@1.6.0` or `polkadot-sdk@1.7.0` - // fn fee_asset() -> Result { - // Ok(MultiAsset { - // id: Concrete(KsmLocation::get()), - // fun: Fungible(1_000_000 * UNITS), - // }) - // } + fn fee_asset() -> Result { + Ok(MultiAsset { + id: Concrete(KsmLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 4d6b0676f8..dd6535b648 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -46,11 +46,9 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - EnsureXcmOrigin, - /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` - * FrameTransactionalProcessor, */ - FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, - NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + EnsureXcmOrigin, FrameTransactionalProcessor, FungiblesAdapter, + GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, NoChecking, + ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, @@ -607,8 +605,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - // TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` - // type TransactionalProcessor = FrameTransactionalProcessor; + type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 83d83e6e51..63a87cbe66 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -63,13 +63,13 @@ sp-weights = { default-features = false, version = "26.0.0" } # Polkadot pallet-xcm = { default-features = false, version = "6.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.2" } polkadot-core-primitives = { default-features = false, version = "6.0.0" } polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } polkadot-runtime-common = { default-features = false, version = "6.0.0" } xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.2" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.2" } # Cumulus cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } @@ -79,7 +79,7 @@ cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0 cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.6.0" } cumulus-primitives-core = { default-features = false , version = "0.6.0" } -cumulus-primitives-utility = { default-features = false , version = "0.6.0" } +cumulus-primitives-utility = { default-features = false , version = "0.6.2" } pallet-collator-selection = { default-features = false , version = "8.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } parachains-common = { default-features = false , version = "6.0.0" } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 0552811f38..f1e197dde5 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -1391,13 +1391,12 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } - // TODO:(PR#137) - revert back with `polkadot-sdk@1.6.0` or `polkadot-sdk@1.7.0` - // fn fee_asset() -> Result { - // Ok(MultiAsset { - // id: Concrete(DotLocation::get()), - // fun: Fungible(1_000_000 * UNITS), - // }) - // } + fn fee_asset() -> Result { + Ok(MultiAsset { + id: Concrete(DotLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index c059ecd7ee..04469b3fcd 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -43,11 +43,9 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - EnsureXcmOrigin, - /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` - * FrameTransactionalProcessor, */ - FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, - NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + EnsureXcmOrigin, FrameTransactionalProcessor, FungiblesAdapter, + GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, NoChecking, + ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, @@ -529,8 +527,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - // TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` - // type TransactionalProcessor = FrameTransactionalProcessor; + type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 58b584fe6f..fd17197658 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -61,13 +61,13 @@ sp-version = { default-features = false, version = "28.0.0" } # Polkadot pallet-xcm = { default-features = false, version = "6.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.2" } polkadot-core-primitives = { default-features = false, version = "6.0.0" } polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } polkadot-runtime-common = { default-features = false, version = "6.0.0" } xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.2" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.2" } # Cumulus cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } @@ -77,7 +77,7 @@ cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0 cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.6.0" } cumulus-primitives-core = { default-features = false , version = "0.6.0" } -cumulus-primitives-utility = { default-features = false , version = "0.6.0" } +cumulus-primitives-utility = { default-features = false , version = "0.6.2" } pallet-collator-selection = { default-features = false , version = "8.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } parachains-common = { default-features = false , version = "6.0.0" } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 46a1d822e6..210acfc6a8 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -934,13 +934,12 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } - // TODO:(PR#137) - revert back with `polkadot-sdk@1.6.0` or `polkadot-sdk@1.7.0` - // fn fee_asset() -> Result { - // Ok(MultiAsset { - // id: Concrete(KsmRelayLocation::get()), - // fun: Fungible(1_000_000 * UNITS), - // }) - // } + fn fee_asset() -> Result { + Ok(MultiAsset { + id: Concrete(KsmRelayLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 1753860967..b73e1c7494 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -41,13 +41,10 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - EnsureXcmOrigin, - /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` - * FrameTransactionalProcessor, */ - HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, - UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + EnsureXcmOrigin, FrameTransactionalProcessor, HashedDescription, IsConcrete, ParentAsSuperuser, + ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -287,8 +284,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - // TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` - // type TransactionalProcessor = FrameTransactionalProcessor; + type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 097109c7a5..4303c1ee59 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -61,13 +61,13 @@ sp-version = { default-features = false, version = "28.0.0" } # Polkadot pallet-xcm = { default-features = false, version = "6.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "6.0.2" } polkadot-core-primitives = { default-features = false, version = "6.0.0" } polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } polkadot-runtime-common = { default-features = false, version = "6.0.0" } xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.2" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.2" } # Cumulus cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } @@ -77,7 +77,7 @@ cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0 cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.6.0" } cumulus-primitives-core = { default-features = false , version = "0.6.0" } -cumulus-primitives-utility = { default-features = false , version = "0.6.0" } +cumulus-primitives-utility = { default-features = false , version = "0.6.2" } pallet-collator-selection = { default-features = false , version = "8.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } parachains-common = { default-features = false , version = "6.0.0" } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 544b26b1af..b181caf631 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -934,13 +934,12 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } - // TODO:(PR#137) - revert back with `polkadot-sdk@1.6.0` or `polkadot-sdk@1.7.0` - // fn fee_asset() -> Result { - // Ok(MultiAsset { - // id: Concrete(DotRelayLocation::get()), - // fun: Fungible(1_000_000 * UNITS), - // }) - // } + fn fee_asset() -> Result { + Ok(MultiAsset { + id: Concrete(DotRelayLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 9ff8100375..9eda62b0bc 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -41,13 +41,10 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - EnsureXcmOrigin, - /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` - * FrameTransactionalProcessor, */ - HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, - UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + EnsureXcmOrigin, FrameTransactionalProcessor, HashedDescription, IsConcrete, ParentAsSuperuser, + ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -294,8 +291,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - // TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` - // type TransactionalProcessor = FrameTransactionalProcessor; + type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index 6b7bf8af63..1676d925d8 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -65,8 +65,8 @@ polkadot-parachain-primitives = { default-features = false, version = "5.0.0" } polkadot-runtime-common = { default-features = false, version = "6.0.0" } polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.2" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.2" } # Cumulus cumulus-pallet-aura-ext = { default-features = false , version = "0.6.0" } @@ -76,7 +76,7 @@ cumulus-pallet-session-benchmarking = { default-features = false, version = "8.0 cumulus-pallet-xcm = { default-features = false , version = "0.6.0" } cumulus-pallet-xcmp-queue = { default-features = false , version = "0.6.0" } cumulus-primitives-core = { default-features = false , version = "0.6.0" } -cumulus-primitives-utility = { default-features = false , version = "0.6.0" } +cumulus-primitives-utility = { default-features = false , version = "0.6.2" } pallet-collator-selection = { default-features = false , version = "8.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } parachains-common = { default-features = false , version = "6.0.0" } diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 7e6d0bd098..9112f1265a 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -38,9 +38,7 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - DescribeTerminus, EnsureXcmOrigin, - FixedWeightBounds, /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` - * FrameTransactionalProcessor, */ + DescribeTerminus, EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, HashedDescription, IsConcrete, OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, @@ -313,8 +311,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; - // TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` - // type TransactionalProcessor = FrameTransactionalProcessor; + type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. diff --git a/system-parachains/gluttons/glutton-kusama/Cargo.toml b/system-parachains/gluttons/glutton-kusama/Cargo.toml index ba5845c74d..771d80d7e8 100644 --- a/system-parachains/gluttons/glutton-kusama/Cargo.toml +++ b/system-parachains/gluttons/glutton-kusama/Cargo.toml @@ -38,8 +38,8 @@ sp-version = { default-features = false, version = "28.0.0" } # Polkadot xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "6.0.2" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "6.0.2" } # Cumulus cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.6.0" } diff --git a/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs b/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs index aefe8d9a42..d278a859cb 100644 --- a/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs +++ b/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs @@ -24,9 +24,7 @@ use frame_support::{ }; use xcm::latest::prelude::*; use xcm_builder::{ - AllowExplicitUnpaidExecutionFrom, - FixedWeightBounds, /* TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` - * FrameTransactionalProcessor, */ + AllowExplicitUnpaidExecutionFrom, FixedWeightBounds, FrameTransactionalProcessor, ParentAsSuperuser, ParentIsPreset, SovereignSignedViaLocation, }; @@ -86,8 +84,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; - // TODO:(PR#137) - wait for xcm-executor patch or `polkadot-sdk@1.7.0` - // type TransactionalProcessor = FrameTransactionalProcessor; + type TransactionalProcessor = FrameTransactionalProcessor; } impl cumulus_pallet_xcm::Config for Runtime { From 975c08d2fee1e82b5a91a206311268065e51e266 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 13 Feb 2024 11:16:21 +0100 Subject: [PATCH 105/316] Fix patch for penpal-runtime --- Cargo.lock | 4 ++-- integration-tests/emulated/chains/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2edda45ce7..5f64048fa3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9105,9 +9105,9 @@ dependencies = [ [[package]] name = "penpal-runtime" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "495a978c9d8eede3809fea69eeed60e7bc18dc07001ae26348532c5daa8aceb3" +checksum = "848508f492e7a04f8a884416c1ba4588d6f13641f98afd9761ff453ed9c4ff98" dependencies = [ "cumulus-pallet-aura-ext 0.6.0", "cumulus-pallet-dmp-queue 0.6.0", diff --git a/integration-tests/emulated/chains/Cargo.toml b/integration-tests/emulated/chains/Cargo.toml index d338ca8875..a99a224673 100644 --- a/integration-tests/emulated/chains/Cargo.toml +++ b/integration-tests/emulated/chains/Cargo.toml @@ -27,7 +27,7 @@ polkadot-parachain-primitives = { version = "5.0.0" } # Cumulus parachains-common = { version = "6.0.0" } xcm-emulator = { version = "0.4.0" } -penpal-runtime = { version = "0.13.1" } +penpal-runtime = { version = "0.13.2" } # Local runtimes kusama-runtime = { package = "staging-kusama-runtime", path = "../../../relay/kusama" } From e5ecc96a83d4c239f8f43cd8f02e6bb6c85b909b Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 13 Feb 2024 13:30:45 +0200 Subject: [PATCH 106/316] update crate versions --- .../asset-hubs/asset-hub-kusama/Cargo.toml | 3 +-- .../asset-hubs/asset-hub-polkadot/Cargo.toml | 2 +- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 20 +++++++++---------- .../bridge-hub-polkadot/Cargo.toml | 20 +++++++++---------- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index 0752b466a3..fc19484e0b 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -94,8 +94,7 @@ assets-common = { default-features = false , version = "0.6.0" } # Bridges pallet-xcm-bridge-hub-router = { default-features = false , version = "0.4.0" } -snowbridge-router-primitives = { default-features = false , version = "1.0.0" } #todo publish - +snowbridge-router-primitives = { default-features = false , version = "0.1.0" } [dev-dependencies] asset-test-utils = { version = "6.0.0" } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index a4f41dede5..29c323422a 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -89,7 +89,7 @@ assets-common = { default-features = false , version = "0.6.0" } # Bridges pallet-xcm-bridge-hub-router = { default-features = false , version = "0.4.0" } -snowbridge-router-primitives = { default-features = false, version = "1.0.0" } #todo publish +snowbridge-router-primitives = { default-features = false, version = "0.1.0" } [dev-dependencies] hex-literal = "0.4.1" diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 4054e057ce..ab5e661c3f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -102,16 +102,16 @@ pallet-bridge-relayers = { default-features = false , version = "0.6.0" } pallet-xcm-bridge-hub = { default-features = false , version = "0.1.0" } # Ethereum Bridge (Snowbridge) -snowbridge-beacon-primitives = { default-features = false , version = "1.0.0" } -snowbridge-pallet-system = { default-features = false , version = "1.0.0" } -snowbridge-system-runtime-api = { default-features = false , version = "1.0.0" } -snowbridge-core = { default-features = false , version = "1.0.0" } -snowbridge-pallet-ethereum-client = { default-features = false , version = "1.0.0" } -snowbridge-pallet-inbound-queue = { default-features = false , version = "1.0.0" } -snowbridge-pallet-outbound-queue = { default-features = false , version = "1.0.0" } -snowbridge-outbound-queue-runtime-api = { default-features = false , version = "1.0.0" } -snowbridge-router-primitives = { default-features = false , version = "1.0.0" } -snowbridge-runtime-common = { default-features = false , version = "1.0.0" } +snowbridge-beacon-primitives = { default-features = false , version = "0.1.0" } +snowbridge-pallet-system = { default-features = false , version = "0.1.0" } +snowbridge-system-runtime-api = { default-features = false , version = "0.1.0" } +snowbridge-core = { default-features = false , version = "0.1.0" } +snowbridge-pallet-ethereum-client = { default-features = false , version = "0.1.0" } +snowbridge-pallet-inbound-queue = { default-features = false , version = "0.1.0" } +snowbridge-pallet-outbound-queue = { default-features = false , version = "0.1.0" } +snowbridge-outbound-queue-runtime-api = { default-features = false , version = "0.1.0" } +snowbridge-router-primitives = { default-features = false , version = "0.1.0" } +snowbridge-runtime-common = { default-features = false , version = "0.1.0" } [dev-dependencies] bridge-hub-test-utils = { version = "0.6.0" } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 061745a80e..668bf084dc 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -102,16 +102,16 @@ pallet-bridge-relayers = { default-features = false , version = "0.6.0" } pallet-xcm-bridge-hub = { default-features = false , version = "0.1.0" } # Ethereum Bridge (Snowbridge) -snowbridge-beacon-primitives = { default-features = false , version = "1.0.0" } -snowbridge-pallet-system = { default-features = false , version = "1.0.0" } -snowbridge-system-runtime-api = { default-features = false , version = "1.0.0" } -snowbridge-core = { default-features = false , version = "1.0.0" } -snowbridge-pallet-ethereum-client = { default-features = false , version = "1.0.0" } -snowbridge-pallet-inbound-queue = { default-features = false , version = "1.0.0" } -snowbridge-pallet-outbound-queue = { default-features = false , version = "1.0.0" } -snowbridge-outbound-queue-runtime-api = { default-features = false , version = "1.0.0" } -snowbridge-router-primitives = { default-features = false , version = "1.0.0" } -snowbridge-runtime-common = { default-features = false , version = "1.0.0" } +snowbridge-beacon-primitives = { default-features = false , version = "0.1.0" } +snowbridge-pallet-system = { default-features = false , version = "0.1.0" } +snowbridge-system-runtime-api = { default-features = false , version = "0.1.0" } +snowbridge-core = { default-features = false , version = "0.1.0" } +snowbridge-pallet-ethereum-client = { default-features = false , version = "0.1.0" } +snowbridge-pallet-inbound-queue = { default-features = false , version = "0.1.0" } +snowbridge-pallet-outbound-queue = { default-features = false , version = "0.1.0" } +snowbridge-outbound-queue-runtime-api = { default-features = false , version = "0.1.0" } +snowbridge-router-primitives = { default-features = false , version = "0.1.0" } +snowbridge-runtime-common = { default-features = false , version = "0.1.0" } [dev-dependencies] bridge-hub-test-utils = { version = "0.6.0" } From 18c7a69e1519832fc8d1794faa74f6c97ffb2bbb Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 13 Feb 2024 13:42:09 +0200 Subject: [PATCH 107/316] remove beacon mainnet spec --- Cargo.lock | 10146 ++++++++++++---- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 5 +- .../bridge-hub-polkadot/Cargo.toml | 5 +- 3 files changed, 7530 insertions(+), 2626 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f89577ccbe..f5174351b4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -186,6 +186,77 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +[[package]] +name = "alloy-primitives" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0628ec0ba5b98b3370bb6be17b12f23bfce8ee4ad83823325a20546d9b03b78" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "proptest", + "rand 0.8.5", + "ruint", + "serde", + "tiny-keccak", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" +dependencies = [ + "alloy-rlp-derive", + "arrayvec 0.7.4", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a98ad1696a2e17f010ae8e43e9f2a1e930ed176a8e3ff77acfeff6dfb07b42c" +dependencies = [ + "const-hex", + "dunce", + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.48", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-types" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98d7107bed88e8f09f0ddcc3335622d87bfb6821f3e0c7473329fb1cfad5e015" +dependencies = [ + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + [[package]] name = "android-tzdata" version = "0.1.1" @@ -287,6 +358,20 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "aquamarine" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" +dependencies = [ + "include_dir", + "itertools 0.10.5", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "arc-swap" version = "1.6.0" @@ -300,8 +385,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" dependencies = [ "ark-ec", - "ark-ff", - "ark-std", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -311,9 +396,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" dependencies = [ "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -322,10 +407,10 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" dependencies = [ - "ark-ff", + "ark-ff 0.4.2", "ark-poly", - "ark-serialize", - "ark-std", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", "itertools 0.10.5", @@ -333,16 +418,34 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + [[package]] name = "ark-ff" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "digest 0.10.7", "itertools 0.10.5", @@ -353,6 +456,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-asm" version = "0.4.2" @@ -363,6 +476,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-macros" version = "0.4.2" @@ -382,13 +507,23 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", ] +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + [[package]] name = "ark-serialize" version = "0.4.2" @@ -396,7 +531,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ "ark-serialize-derive", - "ark-std", + "ark-std 0.4.0", "digest 0.10.7", "num-bigint", ] @@ -412,6 +547,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + [[package]] name = "ark-std" version = "0.4.0" @@ -531,20 +676,21 @@ version = "1.0.0" dependencies = [ "assert_matches", "asset-hub-kusama-runtime", - "frame-support", - "frame-system", + "asset-test-utils", + "emulated-chains", + "frame-support 27.0.0", "integration-tests-common", "pallet-asset-conversion", - "pallet-assets", - "pallet-balances", - "pallet-xcm", - "parachains-common", - "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime-parachains", - "sp-runtime", - "staging-xcm", + "pallet-assets 28.0.0", + "pallet-balances 27.0.0", + "pallet-message-queue 30.0.0", + "pallet-xcm 6.0.0", + "parachains-common 6.0.0", + "parity-scale-codec", + "sp-runtime 30.0.1", + "staging-kusama-runtime", + "staging-xcm 6.0.0", + "staging-xcm-executor 6.0.2", "xcm-emulator", ] @@ -558,75 +704,78 @@ dependencies = [ "bp-asset-hub-polkadot", "bp-bridge-hub-kusama", "bp-bridge-hub-polkadot", - "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", + "cumulus-pallet-aura-ext 0.6.0", + "cumulus-pallet-dmp-queue 0.6.0", + "cumulus-pallet-parachain-system 0.6.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-utility", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "cumulus-pallet-xcm 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-utility 0.6.2", + "frame-benchmarking 27.0.0", + "frame-executive 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-system-benchmarking 27.0.0", + "frame-system-rpc-runtime-api 25.0.0", + "frame-try-runtime 0.33.0", "hex-literal", "kusama-runtime-constants", "log", "pallet-asset-conversion", "pallet-asset-conversion-tx-payment", - "pallet-assets", - "pallet-aura", - "pallet-authorship", - "pallet-balances", - "pallet-collator-selection", + "pallet-assets 28.0.0", + "pallet-aura 26.0.0", + "pallet-authorship 27.0.0", + "pallet-balances 27.0.0", + "pallet-collator-selection 8.0.0", + "pallet-message-queue 30.0.0", "pallet-multisig", "pallet-nft-fractionalization", "pallet-nfts", "pallet-nfts-runtime-api", - "pallet-proxy", - "pallet-session", + "pallet-proxy 27.0.0", + "pallet-session 27.0.0", "pallet-state-trie-migration", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", + "pallet-timestamp 26.0.0", + "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment-rpc-runtime-api 27.0.0", "pallet-uniques", - "pallet-utility", - "pallet-xcm", - "pallet-xcm-benchmarks", + "pallet-utility 27.0.0", + "pallet-xcm 6.0.0", + "pallet-xcm-benchmarks 6.0.2", "pallet-xcm-bridge-hub-router", - "parachains-common", + "parachains-common 6.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime-common", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", + "polkadot-runtime-common 6.0.0", "polkadot-runtime-constants", "primitive-types", "scale-info", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "sp-weights", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", + "smallvec", + "snowbridge-router-primitives", + "sp-api 25.0.0", + "sp-block-builder 25.0.0", + "sp-consensus-aura 0.31.0", + "sp-core 27.0.0", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-offchain 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-transaction-pool 25.0.0", + "sp-version 28.0.0", + "sp-weights 26.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", + "substrate-wasm-builder 16.0.0", "system-parachains-constants", ] @@ -634,20 +783,21 @@ dependencies = [ name = "asset-hub-polkadot-integration-tests" version = "1.0.0" dependencies = [ - "frame-support", - "frame-system", + "asset-hub-polkadot-runtime", + "asset-test-utils", + "emulated-chains", + "frame-support 27.0.0", "integration-tests-common", - "pallet-asset-conversion", - "pallet-assets", - "pallet-balances", - "pallet-xcm", - "parachains-common", - "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime-parachains", - "sp-runtime", - "staging-xcm", + "pallet-assets 28.0.0", + "pallet-balances 27.0.0", + "pallet-message-queue 30.0.0", + "pallet-xcm 6.0.0", + "parachains-common 6.0.0", + "parity-scale-codec", + "polkadot-runtime", + "sp-runtime 30.0.1", + "staging-xcm 6.0.0", + "staging-xcm-executor 6.0.2", "xcm-emulator", ] @@ -661,134 +811,136 @@ dependencies = [ "bp-asset-hub-polkadot", "bp-bridge-hub-kusama", "bp-bridge-hub-polkadot", - "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", + "cumulus-pallet-aura-ext 0.6.0", + "cumulus-pallet-dmp-queue 0.6.0", + "cumulus-pallet-parachain-system 0.6.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-utility", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "cumulus-pallet-xcm 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-utility 0.6.2", + "frame-benchmarking 27.0.0", + "frame-executive 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-system-benchmarking 27.0.0", + "frame-system-rpc-runtime-api 25.0.0", + "frame-try-runtime 0.33.0", "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-tx-payment", - "pallet-assets", - "pallet-aura", - "pallet-authorship", - "pallet-balances", - "pallet-collator-selection", + "pallet-asset-tx-payment 27.0.0", + "pallet-assets 28.0.0", + "pallet-aura 26.0.0", + "pallet-authorship 27.0.0", + "pallet-balances 27.0.0", + "pallet-collator-selection 8.0.0", + "pallet-message-queue 30.0.0", "pallet-multisig", "pallet-nfts", "pallet-nfts-runtime-api", - "pallet-proxy", - "pallet-session", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", + "pallet-proxy 27.0.0", + "pallet-session 27.0.0", + "pallet-timestamp 26.0.0", + "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment-rpc-runtime-api 27.0.0", "pallet-uniques", - "pallet-utility", - "pallet-xcm", - "pallet-xcm-benchmarks", + "pallet-utility 27.0.0", + "pallet-xcm 6.0.0", + "pallet-xcm-benchmarks 6.0.2", "pallet-xcm-bridge-hub-router", - "parachains-common", + "parachains-common 6.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime-common", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", + "polkadot-runtime-common 6.0.0", "polkadot-runtime-constants", "scale-info", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "sp-weights", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", + "smallvec", + "snowbridge-router-primitives", + "sp-api 25.0.0", + "sp-block-builder 25.0.0", + "sp-consensus-aura 0.31.0", + "sp-core 27.0.0", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-offchain 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-transaction-pool 25.0.0", + "sp-version 28.0.0", + "sp-weights 26.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", + "substrate-wasm-builder 16.0.0", "system-parachains-constants", ] [[package]] name = "asset-test-utils" -version = "4.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de674aa0b8f0c31a00fd99a4003751c788c7023ed62527097a1286dd530fbe60" +checksum = "2e667143b26882e0f67cf028814d46f92671655085e47604cc0e0b62579fee24" dependencies = [ "assets-common", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", - "cumulus-test-relay-sproof-builder", - "frame-support", - "frame-system", - "pallet-assets", - "pallet-balances", - "pallet-collator-selection", - "pallet-session", - "pallet-xcm", + "cumulus-pallet-parachain-system 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-parachain-inherent 0.6.0", + "cumulus-test-relay-sproof-builder 0.6.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "pallet-assets 28.0.0", + "pallet-balances 27.0.0", + "pallet-collator-selection 8.0.0", + "pallet-session 27.0.0", + "pallet-xcm 6.0.0", "pallet-xcm-bridge-hub-router", - "parachains-common", + "parachains-common 6.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-parachain-primitives", - "sp-consensus-aura", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", + "polkadot-parachain-primitives 5.0.0", + "sp-consensus-aura 0.31.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", + "substrate-wasm-builder 16.0.0", ] [[package]] name = "assets-common" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b8aa1c485e12af4a0a2b48402fa85d382ab4962731e71f5edc0f85c4cba28c" +checksum = "c3eefe3c913d16da32e39ad87edcbe7c6d94c34a33b7fdc08763247d69b516b5" dependencies = [ - "cumulus-primitives-core", - "frame-support", + "cumulus-primitives-core 0.6.0", + "frame-support 27.0.0", "impl-trait-for-tuples", "log", "pallet-asset-conversion", - "pallet-asset-tx-payment", - "pallet-xcm", - "parachains-common", + "pallet-asset-tx-payment 27.0.0", + "pallet-xcm 6.0.0", + "parachains-common 6.0.0", "parity-scale-codec", "scale-info", - "sp-api", - "sp-runtime", - "sp-std", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", + "sp-api 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", + "substrate-wasm-builder 16.0.0", ] [[package]] @@ -833,9 +985,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.73" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", @@ -872,6 +1024,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "auto_impl" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "823b8bb275161044e2ac7a25879cb3e2480cb403e3943022c7c769c599b756aa" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -940,9 +1103,9 @@ dependencies = [ [[package]] name = "binary-merkle-tree" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a399848a68a5196a04c19db5bfc4dca3cd0989a3165150f06c1ad1bc8882aa34" +checksum = "6c2839a4cb8e9e2c1f2cadb92de7a151c68de424a2e6433ced90e4d67c2ace0b" dependencies = [ "hash-db", "log", @@ -978,6 +1141,40 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "bip39" +version = "2.0.0" +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]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitcoin_hashes" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" + [[package]] name = "bitflags" version = "1.3.2" @@ -998,6 +1195,7 @@ checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ "funty", "radium", + "serde", "tap", "wyz", ] @@ -1126,6 +1324,18 @@ dependencies = [ "serde", ] +[[package]] +name = "bounded-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32385ecb91a31bddaf908e8dcf4a15aef1bcd3913cc03ebfad02ff6d568abc1" +dependencies = [ + "log", + "parity-scale-codec", + "scale-info", + "serde", +] + [[package]] name = "bounded-vec" version = "0.7.1" @@ -1139,40 +1349,40 @@ dependencies = [ name = "bp-asset-hub-kusama" version = "1.0.0" dependencies = [ - "bp-xcm-bridge-hub-router", - "frame-support", + "bp-xcm-bridge-hub-router 0.5.0", + "frame-support 27.0.0", "parity-scale-codec", "scale-info", - "sp-std", - "staging-xcm", + "sp-std 13.0.0", + "staging-xcm 6.0.0", ] [[package]] name = "bp-asset-hub-polkadot" version = "1.0.0" dependencies = [ - "bp-xcm-bridge-hub-router", - "frame-support", + "bp-xcm-bridge-hub-router 0.5.0", + "frame-support 27.0.0", "parity-scale-codec", "scale-info", - "sp-std", - "staging-xcm", + "sp-std 13.0.0", + "staging-xcm 6.0.0", ] [[package]] name = "bp-bridge-hub-cumulus" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b18aaf9ed9ecffade4d56bb1a63cd70b9e61ea4ef69023f2dcd0fd54d18f280" +checksum = "4d76abad1eafb53d1377365c3004456bb61abb5795d06498323770c5647290a2" dependencies = [ "bp-messages", "bp-polkadot-core", - "bp-runtime", - "frame-support", - "frame-system", - "polkadot-primitives", - "sp-api", - "sp-std", + "bp-runtime 0.6.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "polkadot-primitives 6.0.0", + "sp-api 25.0.0", + "sp-std 13.0.0", ] [[package]] @@ -1181,13 +1391,13 @@ version = "1.0.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", - "bp-runtime", - "frame-support", + "bp-runtime 0.6.0", + "frame-support 27.0.0", "kusama-runtime-constants", "polkadot-runtime-constants", - "sp-api", - "sp-runtime", - "sp-std", + "sp-api 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -1196,167 +1406,161 @@ version = "1.0.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", - "bp-runtime", - "frame-support", + "bp-runtime 0.6.0", + "frame-support 27.0.0", "kusama-runtime-constants", "polkadot-runtime-constants", - "sp-api", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "bp-bridge-hub-rococo" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcb3425030c446f51c0d9bc71605b42dc96acff94b2feff51cd09a5e58dc0dd" -dependencies = [ - "bp-bridge-hub-cumulus", - "bp-messages", - "bp-runtime", - "frame-support", - "sp-api", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "bp-bridge-hub-wococo" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ecd2e53fcb7b489a544e27474839586b662bd0c5eea0a9bd21d5eaeae8e6b0b" -dependencies = [ - "bp-bridge-hub-cumulus", - "bp-messages", - "bp-runtime", - "frame-support", - "sp-api", - "sp-runtime", - "sp-std", + "sp-api 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "bp-header-chain" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb057324305f7cacce9d87a82d0e6e8de8ec2ff40fd2df707f97f74ddd0631f9" +checksum = "a0135eafdf5d8ee896e875c7f403417b7e8c1a60794daa03ea8d4614ad11bc2e" dependencies = [ - "bp-runtime", + "bp-runtime 0.6.0", "finality-grandpa", - "frame-support", + "frame-support 27.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-consensus-grandpa", - "sp-core", - "sp-runtime", - "sp-std", + "sp-consensus-grandpa 12.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "bp-kusama" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d69f61df356df3dbedf2dfbfec65ce673ff80121ad7eb319b84a093ebc24aaf9" +checksum = "f8c318068ab7f4d07cf122d4227a7951be7007b70029f160885b86527d3c1d64" dependencies = [ "bp-header-chain", "bp-polkadot-core", - "bp-runtime", - "frame-support", - "sp-api", - "sp-std", + "bp-runtime 0.6.0", + "frame-support 27.0.0", + "sp-api 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "bp-messages" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4df7b23c2c5cdfb7260c0c88835e554f857b0a80e4c1cfa48dd1194e6fb6c6d" +checksum = "8ba0e3d7c760f6121f93286f4cbee7fa50c86a6b5a230b3b357bc81e5c1826d9" dependencies = [ "bp-header-chain", - "bp-runtime", - "frame-support", + "bp-runtime 0.6.0", + "frame-support 27.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-std", + "sp-core 27.0.0", + "sp-std 13.0.0", ] [[package]] name = "bp-parachains" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16a644c3fa5ac2233dd2de94ebe2a4aa98c7cca36b34d96e6604f4d34b0758b4" +checksum = "b615d01bc99346daa91aea18c18bb7edfca5d29ab5730d04060753d5b59afc73" dependencies = [ "bp-header-chain", "bp-polkadot-core", - "bp-runtime", - "frame-support", + "bp-runtime 0.6.0", + "frame-support 27.0.0", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "bp-polkadot" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2643dd8c1c9f82517cb0f438bb66533e8f0b54d8c4b063d24f835aa620e4034" +checksum = "d1af8ed56bc7dddc4a3b30ca1568cf406df77ed0b883e0c55e21917b2396460e" dependencies = [ "bp-header-chain", "bp-polkadot-core", - "bp-runtime", - "frame-support", - "sp-api", - "sp-std", + "bp-runtime 0.6.0", + "frame-support 27.0.0", + "sp-api 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "bp-polkadot-core" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34f0342d051a3b07fecbcabc7efca35880865ede7ef5b2b49ca323c94bdb6d53" +checksum = "eca2fa4991db1c5bf9f8ec4c5e0e320a19e76cfe197f850d353f3abae84ae98a" dependencies = [ "bp-messages", - "bp-runtime", - "frame-support", - "frame-system", + "bp-runtime 0.6.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "parity-util-mem", "scale-info", "serde", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "bp-relayers" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11ea832eedd3bb19a13f77474b4eced1782914527fc54404a423d6259095bdb" +checksum = "4736fdf102aca9ff3e656905557427668e0f339d8b0702b245d354eba63c7186" dependencies = [ "bp-messages", - "bp-runtime", - "frame-support", + "bp-runtime 0.6.0", + "frame-support 27.0.0", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "bp-runtime" -version = "0.4.0" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "426e8c3390a33f7ebd7c009b33278c8f4c42d6be008264387efcb1dee80af96b" +dependencies = [ + "frame-support 27.0.0", + "frame-system 27.0.0", + "hash-db", + "impl-trait-for-tuples", + "log", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "sp-std 13.0.0", + "sp-trie 28.0.0", + "trie-db", +] + +[[package]] +name = "bp-runtime" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c4fd30d6814b73c245c40c760ffbadec3f834865ddd681161ef33672a766e50" +checksum = "6b29668fffbc3e4a7ad789b498424ed6d8a313f93544a090bbaaef8a1f7fd243" dependencies = [ - "frame-support", - "frame-system", + "frame-support 29.0.0", + "frame-system 29.0.0", "hash-db", "impl-trait-for-tuples", "log", @@ -1364,34 +1568,43 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-trie", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", + "sp-std 14.0.0", + "sp-trie 30.0.0", "trie-db", ] [[package]] name = "bp-test-utils" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e625f0def0740566ca053a7b7076c301992eed132b3821a07e835bb8062fb79a" +checksum = "382a1045b3a21ce3e9becc3bcf95a3c92519b48e405c39dfdf85f43cdf7906b9" dependencies = [ "bp-header-chain", "bp-parachains", "bp-polkadot-core", - "bp-runtime", + "bp-runtime 0.6.0", "ed25519-dalek", "finality-grandpa", "parity-scale-codec", - "sp-application-crypto", - "sp-consensus-grandpa", - "sp-core", - "sp-runtime", - "sp-std", - "sp-trie", + "sp-application-crypto 29.0.0", + "sp-consensus-grandpa 12.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-trie 28.0.0", +] + +[[package]] +name = "bp-xcm-bridge-hub" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "118842d57deb8d54e2288595a33689fc364ffbf5877648e84940b2cf4b4dd4a6" +dependencies = [ + "sp-std 13.0.0", ] [[package]] @@ -1402,8 +1615,38 @@ checksum = "be3b4fafc31f17da1b4ea403c4118e4f4f1d9a5a696729b374551d582e48633b" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 25.0.0", + "sp-runtime 28.0.0", +] + +[[package]] +name = "bp-xcm-bridge-hub-router" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98f3ee360878f0cebae637b8584d9425609176ae93e10c8e05ffff544948db19" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core 27.0.0", + "sp-runtime 30.0.1", +] + +[[package]] +name = "bridge-hub-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e69c25ec3db0ef22ae409cc60f5c42364124264ce6640e17dbcfc0280e4b5dd9" +dependencies = [ + "cumulus-primitives-core 0.8.0", + "frame-support 29.0.0", + "pallet-message-queue 32.0.0", + "parity-scale-codec", + "scale-info", + "snowbridge-core", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", ] [[package]] @@ -1421,71 +1664,86 @@ dependencies = [ "bp-polkadot", "bp-polkadot-core", "bp-relayers", - "bp-runtime", + "bp-runtime 0.6.0", + "bridge-hub-common", "bridge-hub-test-utils", "bridge-runtime-common", - "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", + "cumulus-pallet-aura-ext 0.6.0", + "cumulus-pallet-dmp-queue 0.6.0", + "cumulus-pallet-parachain-system 0.6.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-utility", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "cumulus-pallet-xcm 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-utility 0.6.2", + "frame-benchmarking 27.0.0", + "frame-executive 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-system-benchmarking 27.0.0", + "frame-system-rpc-runtime-api 25.0.0", + "frame-try-runtime 0.33.0", "hex-literal", "kusama-runtime-constants", "log", - "pallet-aura", - "pallet-authorship", - "pallet-balances", + "pallet-aura 26.0.0", + "pallet-authorship 27.0.0", + "pallet-balances 27.0.0", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-collator-selection", + "pallet-collator-selection 8.0.0", + "pallet-message-queue 30.0.0", "pallet-multisig", - "pallet-session", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-utility", - "pallet-xcm", - "pallet-xcm-benchmarks", - "parachains-common", - "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime-common", - "scale-info", - "serde", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-keyring", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", + "pallet-session 27.0.0", + "pallet-timestamp 26.0.0", + "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment-rpc-runtime-api 27.0.0", + "pallet-utility 27.0.0", + "pallet-xcm 6.0.0", + "pallet-xcm-benchmarks 6.0.2", + "pallet-xcm-bridge-hub", + "parachains-common 6.0.0", + "parity-scale-codec", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", + "polkadot-runtime-common 6.0.0", + "polkadot-runtime-constants", + "scale-info", + "serde", + "smallvec", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-runtime-common", + "snowbridge-system-runtime-api", + "sp-api 25.0.0", + "sp-block-builder 25.0.0", + "sp-consensus-aura 0.31.0", + "sp-core 27.0.0", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-keyring 30.0.0", + "sp-offchain 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-transaction-pool 25.0.0", + "sp-version 28.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", "static_assertions", - "substrate-wasm-builder", + "substrate-wasm-builder 16.0.0", "system-parachains-constants", ] @@ -1504,156 +1762,169 @@ dependencies = [ "bp-polkadot", "bp-polkadot-core", "bp-relayers", - "bp-runtime", + "bp-runtime 0.6.0", + "bridge-hub-common", "bridge-hub-test-utils", "bridge-runtime-common", - "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", + "cumulus-pallet-aura-ext 0.6.0", + "cumulus-pallet-dmp-queue 0.6.0", + "cumulus-pallet-parachain-system 0.6.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-utility", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "cumulus-pallet-xcm 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-utility 0.6.2", + "frame-benchmarking 27.0.0", + "frame-executive 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-system-benchmarking 27.0.0", + "frame-system-rpc-runtime-api 25.0.0", + "frame-try-runtime 0.33.0", "hex-literal", + "kusama-runtime-constants", "log", - "pallet-aura", - "pallet-authorship", - "pallet-balances", + "pallet-aura 26.0.0", + "pallet-authorship 27.0.0", + "pallet-balances 27.0.0", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-collator-selection", + "pallet-collator-selection 8.0.0", + "pallet-message-queue 30.0.0", "pallet-multisig", - "pallet-session", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-utility", - "pallet-xcm", - "pallet-xcm-benchmarks", - "parachains-common", - "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime-common", + "pallet-session 27.0.0", + "pallet-timestamp 26.0.0", + "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment-rpc-runtime-api 27.0.0", + "pallet-utility 27.0.0", + "pallet-xcm 6.0.0", + "pallet-xcm-benchmarks 6.0.2", + "pallet-xcm-bridge-hub", + "parachains-common 6.0.0", + "parity-scale-codec", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", + "polkadot-runtime-common 6.0.0", "polkadot-runtime-constants", "scale-info", "serde", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-keyring", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", + "smallvec", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-runtime-common", + "snowbridge-system-runtime-api", + "sp-api 25.0.0", + "sp-block-builder 25.0.0", + "sp-consensus-aura 0.31.0", + "sp-core 27.0.0", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-keyring 30.0.0", + "sp-offchain 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-transaction-pool 25.0.0", + "sp-version 28.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", "static_assertions", - "substrate-wasm-builder", + "substrate-wasm-builder 16.0.0", "system-parachains-constants", ] [[package]] name = "bridge-hub-test-utils" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3598ffa3d0c5f5651dee8aea016b69c5a3be48ab01fb83f773c93af0cf77c68" +checksum = "2d744617b60464166d7d4fbe859164f8dc4f22e096ce386d37afcc3fe157e4a9" dependencies = [ "asset-test-utils", - "bp-bridge-hub-rococo", - "bp-bridge-hub-wococo", "bp-header-chain", "bp-messages", "bp-parachains", "bp-polkadot-core", "bp-relayers", - "bp-runtime", + "bp-runtime 0.6.0", "bp-test-utils", "bridge-runtime-common", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", - "cumulus-pallet-xcmp-queue", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "log", - "pallet-balances", + "cumulus-pallet-parachain-system 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "frame-benchmarking 27.0.0", + "frame-executive 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "log", + "pallet-balances 27.0.0", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-collator-selection", - "pallet-session", - "pallet-utility", - "pallet-xcm", - "pallet-xcm-benchmarks", - "parachains-common", + "pallet-collator-selection 8.0.0", + "pallet-session 27.0.0", + "pallet-utility 27.0.0", + "pallet-xcm 6.0.0", + "pallet-xcm-benchmarks 6.0.2", + "parachains-common 6.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "sp-core", - "sp-io", - "sp-keyring", - "sp-runtime", - "sp-tracing", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-keyring 30.0.0", + "sp-runtime 30.0.1", + "sp-tracing 15.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", ] [[package]] name = "bridge-runtime-common" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a585d0a58356e3a6131a2cb77a69af5580af278075cac46a85d54e5f6ea1b982" +checksum = "eb844adfe3e4d866e77f535d2d6e19bbc0b733c8cb1f317f42ebe798cd14309e" dependencies = [ "bp-header-chain", "bp-messages", "bp-parachains", "bp-polkadot-core", "bp-relayers", - "bp-runtime", - "bp-xcm-bridge-hub-router", - "frame-support", - "frame-system", + "bp-runtime 0.6.0", + "bp-xcm-bridge-hub", + "bp-xcm-bridge-hub-router 0.5.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "hash-db", "log", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-transaction-payment", - "pallet-utility", - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-trie", - "staging-xcm", - "staging-xcm-builder", + "pallet-transaction-payment 27.0.0", + "pallet-utility 27.0.0", + "parity-scale-codec", + "scale-info", + "sp-api 25.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-trie 28.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", "static_assertions", ] @@ -1876,29 +2147,30 @@ dependencies = [ "bridge-hub-polkadot-runtime", "clap", "collectives-polkadot-runtime", - "cumulus-primitives-core", + "cumulus-primitives-core 0.6.0", "encointer-kusama-runtime", "glutton-kusama-runtime", "hex-literal", "kusama-runtime-constants", "pallet-im-online", - "pallet-staking", - "parachains-common", - "polkadot-primitives", + "pallet-staking 27.0.0", + "parachains-common 6.0.0", + "polkadot-primitives 6.0.0", "polkadot-runtime", "polkadot-runtime-constants", - "polkadot-runtime-parachains", - "sc-chain-spec", + "polkadot-runtime-parachains 6.0.0", + "sc-chain-spec 26.0.0", "sc-consensus-grandpa", "serde", "serde_json", - "sp-authority-discovery", - "sp-consensus-babe", + "sp-authority-discovery 25.0.0", + "sp-consensus-babe 0.31.0", "sp-consensus-beefy", - "sp-core", - "sp-runtime", + "sp-core 25.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", "staging-kusama-runtime", - "staging-xcm", + "staging-xcm 6.0.0", ] [[package]] @@ -1924,7 +2196,7 @@ checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" dependencies = [ "core2", "multibase", - "multihash", + "multihash 0.17.0", "serde", "unsigned-varint", ] @@ -1997,6 +2269,7 @@ dependencies = [ "anstyle", "clap_lex", "strsim", + "terminal_size", ] [[package]] @@ -2043,71 +2316,73 @@ dependencies = [ name = "collectives-polkadot-runtime" version = "1.0.0" dependencies = [ - "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", + "cumulus-pallet-aura-ext 0.6.0", + "cumulus-pallet-dmp-queue 0.6.0", + "cumulus-pallet-parachain-system 0.6.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-utility", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "cumulus-pallet-xcm 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-utility 0.6.2", + "frame-benchmarking 27.0.0", + "frame-executive 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-system-benchmarking 27.0.0", + "frame-system-rpc-runtime-api 25.0.0", + "frame-try-runtime 0.33.0", "hex-literal", "log", "pallet-alliance", - "pallet-asset-rate", - "pallet-aura", - "pallet-authorship", - "pallet-balances", - "pallet-collator-selection", - "pallet-collective", + "pallet-asset-rate 6.0.0", + "pallet-aura 26.0.0", + "pallet-authorship 27.0.0", + "pallet-balances 27.0.0", + "pallet-collator-selection 8.0.0", + "pallet-collective 27.0.0", "pallet-core-fellowship", + "pallet-message-queue 30.0.0", "pallet-multisig", "pallet-preimage", - "pallet-proxy", + "pallet-proxy 27.0.0", "pallet-ranked-collective", "pallet-referenda", "pallet-salary", - "pallet-scheduler", - "pallet-session", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-xcm", - "parachains-common", - "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime-common", + "pallet-scheduler 28.0.0", + "pallet-session 27.0.0", + "pallet-timestamp 26.0.0", + "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment-rpc-runtime-api 27.0.0", + "pallet-treasury 26.0.0", + "pallet-utility 27.0.0", + "pallet-xcm 6.0.0", + "parachains-common 6.0.0", + "parity-scale-codec", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", + "polkadot-runtime-common 6.0.0", "polkadot-runtime-constants", "scale-info", - "sp-api", - "sp-arithmetic", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", + "smallvec", + "sp-api 25.0.0", + "sp-arithmetic 22.0.0", + "sp-block-builder 25.0.0", + "sp-consensus-aura 0.31.0", + "sp-core 27.0.0", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-offchain 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-transaction-pool 25.0.0", + "sp-version 28.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", + "substrate-wasm-builder 16.0.0", "system-parachains-constants", ] @@ -2145,6 +2420,19 @@ dependencies = [ "windows-sys 0.45.0", ] +[[package]] +name = "const-hex" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d59688ad0945eaf6b84cb44fedbe93484c81b48970e98f09db8a22832d7961" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + [[package]] name = "const-oid" version = "0.9.5" @@ -2525,17 +2813,36 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071cdddd31e2b0d47a74249675de828857f61eb5f6afa36cfcf63ea6ee2b60f2" dependencies = [ - "cumulus-pallet-parachain-system", - "frame-support", - "frame-system", - "pallet-aura", - "pallet-timestamp", + "cumulus-pallet-parachain-system 0.4.1", + "frame-support 25.0.0", + "frame-system 25.0.0", + "pallet-aura 24.0.0", + "pallet-timestamp 24.0.0", + "parity-scale-codec", + "scale-info", + "sp-application-crypto 27.0.0", + "sp-consensus-aura 0.29.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "cumulus-pallet-aura-ext" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0976731a7fdc209cf677e660dcabd60bd101c9d326a9b105bb4dfc2f588591d" +dependencies = [ + "cumulus-pallet-parachain-system 0.6.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "pallet-aura 26.0.0", + "pallet-timestamp 26.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-consensus-aura", - "sp-runtime", - "sp-std", + "sp-application-crypto 29.0.0", + "sp-consensus-aura 0.31.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -2544,16 +2851,35 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d1cb9d43cdfeedea19b4f6b8386e5b6264a97938b29f5c711a84e9dc7105ff7" dependencies = [ - "cumulus-primitives-core", - "frame-support", - "frame-system", + "cumulus-primitives-core 0.4.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "staging-xcm 4.0.0", +] + +[[package]] +name = "cumulus-pallet-dmp-queue" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e14d2bfe35cd9fd86302c575b42d7f2e8510b6cdbb1e0730ad5b31da9caa60" +dependencies = [ + "cumulus-primitives-core 0.6.0", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", - "staging-xcm", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-xcm 6.0.0", ] [[package]] @@ -2563,28 +2889,63 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d20d2280051998fcf113f04d25d4b39f27b449570b6350fdfb7e92541cb0aae7" dependencies = [ "bytes", - "cumulus-pallet-parachain-system-proc-macro", - "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", + "cumulus-pallet-parachain-system-proc-macro 0.4.0", + "cumulus-primitives-core 0.4.0", + "cumulus-primitives-parachain-inherent 0.4.0", + "environmental", + "frame-support 25.0.0", + "frame-system 25.0.0", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "polkadot-parachain-primitives 3.0.0", + "polkadot-runtime-parachains 4.0.0", + "scale-info", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-inherents 23.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "sp-std 12.0.0", + "sp-trie 26.0.0", + "sp-version 26.0.0", + "staging-xcm 4.0.0", + "trie-db", +] + +[[package]] +name = "cumulus-pallet-parachain-system" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0980004d033c8e160148a6ae82423a7fff02455f7d6bccba2b16e87ef4a53b76" +dependencies = [ + "bytes", + "cumulus-pallet-parachain-system-proc-macro 0.5.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-parachain-inherent 0.6.0", + "cumulus-primitives-proof-size-hostfunction", "environmental", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "impl-trait-for-tuples", "log", + "pallet-message-queue 30.0.0", "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-runtime-parachains", + "polkadot-parachain-primitives 5.0.0", + "polkadot-runtime-parachains 6.0.0", "scale-info", - "sp-core", - "sp-externalities", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-trie", - "sp-version", - "staging-xcm", + "sp-core 27.0.0", + "sp-externalities 0.24.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "sp-std 13.0.0", + "sp-trie 28.0.0", + "sp-version 28.0.0", + "staging-xcm 6.0.0", "trie-db", ] @@ -2600,19 +2961,31 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "cumulus-pallet-parachain-system-proc-macro" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc86fdc17ef11f9adcd7565a4238107a3538426990fa4ffed8e6dc1d40582a2" +dependencies = [ + "proc-macro-crate 2.0.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "cumulus-pallet-session-benchmarking" -version = "6.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf9aaa60ed60ee9cbfc55535a6e2a01353c8308135e24d6c50ba989e518f17d" +checksum = "fec7368454572169916c9b0621bc1da04774260e32486fd1d2f58dbb21a7b85d" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "pallet-session", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "pallet-session 27.0.0", "parity-scale-codec", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -2621,15 +2994,32 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ff03e14a0f5847bdee67a673ee945d3acd5c1d7238d46993208dcbfb774e27f" dependencies = [ - "cumulus-primitives-core", - "frame-support", - "frame-system", + "cumulus-primitives-core 0.4.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "parity-scale-codec", + "scale-info", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "staging-xcm 4.0.0", +] + +[[package]] +name = "cumulus-pallet-xcm" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04efb075677bd1c54934294049f7264ef58dec22d18614c59ea76c99275b0ba7" +dependencies = [ + "cumulus-primitives-core 0.6.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", - "staging-xcm", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-xcm 6.0.0", ] [[package]] @@ -2638,23 +3028,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6af9816dd6564149729ba133c2c984c88fb15c4a2cb66f57be06b9147744e51" dependencies = [ - "bp-xcm-bridge-hub-router", - "cumulus-primitives-core", - "frame-benchmarking", - "frame-support", - "frame-system", + "bp-xcm-bridge-hub-router 0.3.0", + "cumulus-primitives-core 0.4.0", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", "parity-scale-codec", - "polkadot-runtime-common", - "polkadot-runtime-parachains", + "polkadot-runtime-common 4.0.0", + "polkadot-runtime-parachains 4.0.0", "rand_chacha 0.3.1", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "staging-xcm", - "staging-xcm-executor", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "staging-xcm 4.0.0", + "staging-xcm-executor 4.0.2", +] + +[[package]] +name = "cumulus-pallet-xcmp-queue" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eda7f0f2644ef02fa18054a483650dfd7085caad7137221cbc05747c13ad7d7" +dependencies = [ + "bounded-collections 0.1.8", + "bp-xcm-bridge-hub-router 0.5.0", + "cumulus-primitives-core 0.6.0", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "log", + "pallet-message-queue 30.0.0", + "parity-scale-codec", + "polkadot-runtime-common 6.0.0", + "polkadot-runtime-parachains 6.0.0", + "scale-info", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-xcm 6.0.0", + "staging-xcm-executor 6.0.2", ] [[package]] @@ -2664,15 +3080,51 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d40f62add2352287be4cb58b0017a91f61d953e2c6d2777c20d93185558196e1" dependencies = [ "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-primitives", + "polkadot-core-primitives 4.0.0", + "polkadot-parachain-primitives 3.0.0", + "polkadot-primitives 4.0.0", + "scale-info", + "sp-api 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-trie 26.0.0", + "staging-xcm 4.0.0", +] + +[[package]] +name = "cumulus-primitives-core" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "475c9928839e4ff8c168dc1eb4e31dc53e3b6380b85b5cdc1965da96026ec025" +dependencies = [ + "parity-scale-codec", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", + "polkadot-primitives 6.0.0", + "scale-info", + "sp-api 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-trie 28.0.0", + "staging-xcm 6.0.0", +] + +[[package]] +name = "cumulus-primitives-core" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9df07f6825fd50ea30aae335e43dc1a615a05de7465f5f329b9e414f2c886a12" +dependencies = [ + "parity-scale-codec", + "polkadot-core-primitives 8.0.0", + "polkadot-parachain-primitives 7.0.0", + "polkadot-primitives 8.0.0", "scale-info", - "sp-api", - "sp-runtime", - "sp-std", - "sp-trie", - "staging-xcm", + "sp-api 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-trie 30.0.0", + "staging-xcm 8.0.0", ] [[package]] @@ -2682,35 +3134,70 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d0b1e0e6dcf393dbf05b31122a8c4739acf407a96ec8fd707886f36ee95c355" 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-trie", + "cumulus-primitives-core 0.4.0", + "cumulus-relay-chain-interface 0.4.0", + "cumulus-test-relay-sproof-builder 0.4.0", + "parity-scale-codec", + "sc-client-api 25.0.0", + "scale-info", + "sp-api 23.0.0", + "sp-core 25.0.0", + "sp-inherents 23.0.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "sp-std 12.0.0", + "sp-storage 17.0.0", + "sp-trie 26.0.0", + "tracing", +] + +[[package]] +name = "cumulus-primitives-parachain-inherent" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe636dcb0964587379b82af2856d1c174267e477a64229e878aed4150a813089" +dependencies = [ + "async-trait", + "cumulus-primitives-core 0.6.0", + "cumulus-relay-chain-interface 0.6.0", + "cumulus-test-relay-sproof-builder 0.6.0", + "parity-scale-codec", + "sc-client-api 27.0.0", + "scale-info", + "sp-api 25.0.0", + "sp-core 27.0.0", + "sp-inherents 25.0.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-trie 28.0.0", "tracing", ] +[[package]] +name = "cumulus-primitives-proof-size-hostfunction" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d8668bb256b32b5fd5a1226811b3d763bd463f3200effee810c7a6f77feef30" +dependencies = [ + "sp-externalities 0.24.0", + "sp-runtime-interface 23.0.0", + "sp-trie 28.0.0", +] + [[package]] name = "cumulus-primitives-timestamp" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771ef4a34f7bcd4e8782f73d8dbd0df031b1c1c82e54b06af69f88df2cddc316" dependencies = [ - "cumulus-primitives-core", + "cumulus-primitives-core 0.4.0", "futures", "parity-scale-codec", - "sp-inherents", - "sp-std", - "sp-timestamp", + "sp-inherents 23.0.0", + "sp-std 12.0.0", + "sp-timestamp 23.0.0", ] [[package]] @@ -2719,19 +3206,40 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d0ad7498cb748684f0f309ee037e9a29a91fb3ec5b5276b5fc723c3716bdd8a" dependencies = [ - "cumulus-primitives-core", - "frame-support", + "cumulus-primitives-core 0.4.0", + "frame-support 25.0.0", + "log", + "pallet-xcm-benchmarks 4.0.1", + "parity-scale-codec", + "polkadot-runtime-common 4.0.0", + "polkadot-runtime-parachains 4.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "staging-xcm 4.0.0", + "staging-xcm-builder 4.0.1", + "staging-xcm-executor 4.0.2", +] + +[[package]] +name = "cumulus-primitives-utility" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a19c875e3fa4ac39aaf43117c7ff5230eb5b2de90d75aa782a4d81b07435bb3" +dependencies = [ + "cumulus-primitives-core 0.6.0", + "frame-support 27.0.0", "log", - "pallet-xcm-benchmarks", + "pallet-xcm-benchmarks 6.0.2", "parity-scale-codec", - "polkadot-runtime-common", - "polkadot-runtime-parachains", - "sp-io", - "sp-runtime", - "sp-std", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", + "polkadot-runtime-common 6.0.0", + "polkadot-runtime-parachains 6.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", ] [[package]] @@ -2741,15 +3249,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af081ef8885042e7ae96e9d1cf32ec6f0616fe4cb78f0325ed7c5accded687fb" dependencies = [ "async-trait", - "cumulus-primitives-core", + "cumulus-primitives-core 0.4.0", + "futures", + "jsonrpsee-core", + "parity-scale-codec", + "polkadot-overseer 4.0.0", + "sc-client-api 25.0.0", + "sp-api 23.0.0", + "sp-blockchain 25.0.0", + "sp-state-machine 0.32.0", + "thiserror", +] + +[[package]] +name = "cumulus-relay-chain-interface" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a42b67dc400ff5f9dc07aedb8602f5deac2f2ac2290fd5529e4eb1345a3202a" +dependencies = [ + "async-trait", + "cumulus-primitives-core 0.6.0", "futures", "jsonrpsee-core", "parity-scale-codec", - "polkadot-overseer", - "sc-client-api", - "sp-api", - "sp-blockchain", - "sp-state-machine", + "polkadot-overseer 6.0.0", + "sc-client-api 27.0.0", + "sp-api 25.0.0", + "sp-blockchain 27.0.0", + "sp-state-machine 0.34.0", "thiserror", ] @@ -2759,13 +3286,28 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59b921a9cb6758faa1c739f135fd87aa1e10a4e86a1c1db3119b396a62287cf2" dependencies = [ - "cumulus-primitives-core", + "cumulus-primitives-core 0.4.0", + "parity-scale-codec", + "polkadot-primitives 4.0.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "sp-std 12.0.0", + "sp-trie 26.0.0", +] + +[[package]] +name = "cumulus-test-relay-sproof-builder" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c66e3ae7ba8cc8ac846c421bb01869fa516c9a1d490fb711d94a793dc5ab178" +dependencies = [ + "cumulus-primitives-core 0.6.0", "parity-scale-codec", - "polkadot-primitives", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-trie", + "polkadot-primitives 6.0.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "sp-std 13.0.0", + "sp-trie 28.0.0", ] [[package]] @@ -3176,6 +3718,12 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + [[package]] name = "dyn-clonable" version = "0.9.0" @@ -3241,15 +3789,16 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ "curve25519-dalek 4.1.2", "ed25519", "rand_core 0.6.4", "serde", "sha2 0.10.7", + "subtle 2.4.1", "zeroize", ] @@ -3314,6 +3863,37 @@ dependencies = [ "zeroize", ] +[[package]] +name = "emulated-chains" +version = "1.0.0" +dependencies = [ + "asset-hub-kusama-runtime", + "asset-hub-polkadot-runtime", + "bridge-hub-kusama-runtime", + "bridge-hub-polkadot-runtime", + "collectives-polkadot-runtime", + "frame-support 27.0.0", + "integration-tests-common", + "kusama-runtime-constants", + "pallet-im-online", + "pallet-staking 27.0.0", + "parachains-common 6.0.0", + "penpal-runtime", + "polkadot-parachain-primitives 5.0.0", + "polkadot-primitives 6.0.0", + "polkadot-runtime", + "polkadot-runtime-constants", + "polkadot-runtime-parachains 6.0.0", + "sp-authority-discovery 25.0.0", + "sp-consensus-babe 0.31.0", + "sp-consensus-beefy", + "sp-consensus-grandpa 12.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "staging-kusama-runtime", + "xcm-emulator", +] + [[package]] name = "encode_unicode" version = "0.3.6" @@ -3327,14 +3907,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "574a256785661fe0353b6664a896b03eaac804e01de3b7146a1e68bea23823c6" dependencies = [ "encointer-primitives", - "frame-support", - "frame-system", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", - "pallet-asset-tx-payment", + "pallet-asset-tx-payment 25.0.0", "pallet-encointer-balances", "pallet-encointer-ceremonies", - "pallet-transaction-payment", - "sp-runtime", + "pallet-transaction-payment 25.0.0", + "sp-runtime 28.0.0", ] [[package]] @@ -3344,11 +3924,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cc19094858c453d1622fee74cd5ac4aeafc5afcc1695c442361528604f3a3cd" dependencies = [ "encointer-primitives", - "frame-support", + "frame-support 25.0.0", "parity-scale-codec", "scale-info", - "sp-api", - "sp-std", + "sp-api 23.0.0", + "sp-std 12.0.0", ] [[package]] @@ -3358,39 +3938,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0e915dfb90455b04de86863d5e8c28727b88a5e79035d1592f5340befc2d31a" dependencies = [ "encointer-primitives", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] name = "encointer-kusama-runtime" version = "1.0.0" dependencies = [ - "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", + "cumulus-pallet-aura-ext 0.4.0", + "cumulus-pallet-dmp-queue 0.4.0", + "cumulus-pallet-parachain-system 0.4.1", + "cumulus-pallet-xcm 0.4.0", + "cumulus-pallet-xcmp-queue 0.4.0", + "cumulus-primitives-core 0.4.0", "cumulus-primitives-timestamp", - "cumulus-primitives-utility", + "cumulus-primitives-utility 0.4.1", "encointer-balances-tx-payment", "encointer-balances-tx-payment-rpc-runtime-api", "encointer-primitives", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "frame-benchmarking 25.0.0", + "frame-executive 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "frame-system-benchmarking 25.0.0", + "frame-system-rpc-runtime-api 23.0.0", + "frame-try-runtime 0.31.0", "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-tx-payment", - "pallet-aura", - "pallet-balances", - "pallet-collective", + "pallet-asset-tx-payment 25.0.0", + "pallet-aura 24.0.0", + "pallet-balances 25.0.0", + "pallet-collective 25.0.0", "pallet-encointer-balances", "pallet-encointer-bazaar", "pallet-encointer-bazaar-rpc-runtime-api", @@ -3402,38 +3982,40 @@ dependencies = [ "pallet-encointer-reputation-commitments", "pallet-encointer-scheduler", "pallet-insecure-randomness-collective-flip", - "pallet-membership", - "pallet-proxy", - "pallet-scheduler", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-xcm", - "parachains-common", - "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-runtime-common", - "scale-info", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-transaction-pool", - "sp-version", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", - "system-parachains-constants", + "pallet-membership 25.0.0", + "pallet-proxy 25.0.0", + "pallet-scheduler 26.0.0", + "pallet-timestamp 24.0.0", + "pallet-transaction-payment 25.0.0", + "pallet-transaction-payment-rpc-runtime-api 25.0.0", + "pallet-treasury 24.0.0", + "pallet-utility 25.0.0", + "pallet-xcm 4.0.0", + "parachains-common 4.0.0", + "parity-scale-codec", + "polkadot-core-primitives 4.0.0", + "polkadot-parachain-primitives 3.0.0", + "polkadot-primitives 4.0.0", + "polkadot-runtime-common 4.0.0", + "scale-info", + "smallvec", + "sp-api 23.0.0", + "sp-block-builder 23.0.0", + "sp-consensus-aura 0.29.0", + "sp-core 25.0.0", + "sp-genesis-builder 0.4.0", + "sp-inherents 23.0.0", + "sp-offchain 23.0.0", + "sp-runtime 28.0.0", + "sp-session 24.0.0", + "sp-std 12.0.0", + "sp-transaction-pool 23.0.0", + "sp-version 26.0.0", + "staging-parachain-info 0.4.0", + "staging-xcm 4.0.0", + "staging-xcm-builder 4.0.1", + "staging-xcm-executor 4.0.2", + "substrate-wasm-builder 14.0.0", ] [[package]] @@ -3446,8 +4028,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] @@ -3459,15 +4041,15 @@ dependencies = [ "bs58 0.4.0", "crc 2.1.0", "ep-core", - "frame-support", + "frame-support 25.0.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", "substrate-geohash", ] @@ -3544,10 +4126,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-core", - "sp-runtime", - "sp-std", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", "substrate-fixed", ] @@ -3578,6 +4160,16 @@ dependencies = [ "libc", ] +[[package]] +name = "ethabi-decode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d398648d65820a727d6a81e58b962f874473396a047e4c30bafe3240953417" +dependencies = [ + "ethereum-types", + "tiny-keccak", +] + [[package]] name = "ethbloom" version = "0.13.0" @@ -3586,8 +4178,10 @@ checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", + "scale-info", "tiny-keccak", ] @@ -3599,9 +4193,11 @@ checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ "ethbloom", "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", "primitive-types", + "scale-info", "uint", ] @@ -3672,6 +4268,17 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec 0.7.4", + "auto_impl", + "bytes", +] + [[package]] name = "fatality" version = "0.0.6" @@ -3706,6 +4313,16 @@ dependencies = [ "libc", ] +[[package]] +name = "fdlimit" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e182f7dbc2ef73d9ef67351c5fbbea084729c48362d3ce9dd44c28e32e277fe5" +dependencies = [ + "libc", + "thiserror", +] + [[package]] name = "ff" version = "0.12.1" @@ -3844,23 +4461,75 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dd4946d63eab00d899f08a7e74e965cc6785c2298efaea6a2752905f4810407" dependencies = [ - "frame-support", - "frame-support-procedural", - "frame-system", + "frame-support 25.0.0", + "frame-support-procedural 20.0.0", + "frame-system 25.0.0", + "linregress", + "log", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-runtime-interface 21.0.0", + "sp-std 12.0.0", + "sp-storage 17.0.0", + "static_assertions", +] + +[[package]] +name = "frame-benchmarking" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f99ad86e915f3a57b4a1b56a296e9e3f5bb5aec44189e6d85a773398c6ce614b" +dependencies = [ + "frame-support 27.0.0", + "frame-support-procedural 22.0.0", + "frame-system 27.0.0", + "linregress", + "log", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-runtime-interface 23.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "static_assertions", +] + +[[package]] +name = "frame-benchmarking" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4090659c6aaa3c4d5b6c6ec909b4b0a25dec10ad92aad5f729efa8d5bd4d806a" +dependencies = [ + "frame-support 29.0.0", + "frame-support-procedural 24.0.0", + "frame-system 29.0.0", "linregress", "log", "parity-scale-codec", "paste", "scale-info", "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-runtime-interface 25.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", "static_assertions", ] @@ -3883,15 +4552,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebad507fb038db2f7ce982d30bd9828a59785c9a4780348d59cd6cceaee80d1a" dependencies = [ "frame-election-provider-solution-type", - "frame-support", - "frame-system", + "frame-support 25.0.0", + "frame-system 25.0.0", + "parity-scale-codec", + "scale-info", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-npos-elections 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "frame-election-provider-support" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26d8dabf04394bb59a44e41664984289c2b5b28d565193fac49695db846f167" +dependencies = [ + "frame-election-provider-solution-type", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-npos-elections", - "sp-runtime", - "sp-std", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-npos-elections 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -3900,17 +4587,36 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dda2c20ea3267ee20c9a5482f320236510c4ade6aec1dd930cb57dc5651c64f" dependencies = [ - "frame-support", - "frame-system", - "frame-try-runtime", + "frame-support 25.0.0", + "frame-system 25.0.0", + "frame-try-runtime 0.31.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-tracing 14.0.0", +] + +[[package]] +name = "frame-executive" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da9af388ae194ff65aba5c7cd7afe9fdaea6a021a06417efc6e4aebd996e7a3" +dependencies = [ + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-try-runtime 0.33.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-tracing", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-tracing 15.0.0", ] [[package]] @@ -3927,9 +4633,9 @@ dependencies = [ [[package]] name = "frame-remote-externalities" -version = "0.32.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a30013df51f4d4e58472c4fecdbfeb141234ece5f6355e5b3a3e51d3f87d452d" +checksum = "3fce6dcbe54a14394ba471f8f1c38a9b7b9bbccda9c23ef04de74403527ef4bf" dependencies = [ "futures", "indicatif", @@ -3937,10 +4643,10 @@ dependencies = [ "log", "parity-scale-codec", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", "spinners", "substrate-rpc-client", "tokio", @@ -3953,12 +4659,12 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "023504bbdd0e8d1ebe3d9d289b009337cdb9a24c5e74615ffd7b188aa1664c2d" dependencies = [ - "aquamarine", + "aquamarine 0.3.2", "bitflags 1.3.2", "docify", "environmental", "frame-metadata", - "frame-support-procedural", + "frame-support-procedural 20.0.0", "impl-trait-for-tuples", "k256", "log", @@ -3969,42 +4675,166 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-api", - "sp-arithmetic", - "sp-core", - "sp-core-hashing-proc-macro", + "sp-api 23.0.0", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-core-hashing-proc-macro 13.0.0", "sp-debug-derive 12.0.0", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-metadata-ir", - "sp-runtime", - "sp-staking", - "sp-state-machine", - "sp-std", - "sp-tracing", - "sp-weights", + "sp-genesis-builder 0.4.0", + "sp-inherents 23.0.0", + "sp-io 27.0.0", + "sp-metadata-ir 0.4.0", + "sp-runtime 28.0.0", + "sp-staking 23.0.0", + "sp-state-machine 0.32.0", + "sp-std 12.0.0", + "sp-tracing 14.0.0", + "sp-weights 24.0.0", "static_assertions", "tt-call", ] [[package]] -name = "frame-support-procedural" -version = "20.0.0" +name = "frame-support" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6bc383298353ff2790ac1a301262c21ac196dbc26ef67a2213c46524a06dd1" +checksum = "654f8001ac929387a460ed2b1dd9ef70af81221ef2b3519bf4c91ecef88f68e4" +dependencies = [ + "aquamarine 0.3.2", + "array-bytes 6.1.0", + "bitflags 1.3.2", + "docify", + "environmental", + "frame-metadata", + "frame-support-procedural 22.0.0", + "impl-trait-for-tuples", + "k256", + "log", + "macro_magic", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "serde_json", + "smallvec", + "sp-api 25.0.0", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-core-hashing-proc-macro 14.0.0", + "sp-debug-derive 13.0.0", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-metadata-ir 0.5.0", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-state-machine 0.34.0", + "sp-std 13.0.0", + "sp-tracing 15.0.0", + "sp-weights 26.0.0", + "static_assertions", + "tt-call", +] + +[[package]] +name = "frame-support" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3b24824d29c43d0af94be3356bbf30338ededed649f6841d315a9ae067ce872" +dependencies = [ + "aquamarine 0.5.0", + "array-bytes 6.1.0", + "bitflags 1.3.2", + "docify", + "environmental", + "frame-metadata", + "frame-support-procedural 24.0.0", + "impl-trait-for-tuples", + "k256", + "log", + "macro_magic", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "serde_json", + "smallvec", + "sp-api 27.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-crypto-hashing-proc-macro", + "sp-debug-derive 14.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-metadata-ir 0.6.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", + "sp-state-machine 0.36.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", + "sp-weights 28.0.0", + "static_assertions", + "tt-call", +] + +[[package]] +name = "frame-support-procedural" +version = "20.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6bc383298353ff2790ac1a301262c21ac196dbc26ef67a2213c46524a06dd1" +dependencies = [ + "Inflector", + "cfg-expr", + "derive-syn-parse", + "expander 2.0.0", + "frame-support-procedural-tools 9.0.0", + "itertools 0.10.5", + "macro_magic", + "proc-macro-warning", + "proc-macro2", + "quote", + "sp-core-hashing 13.0.0", + "syn 2.0.48", +] + +[[package]] +name = "frame-support-procedural" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef13774b6423deb98878e75cd7d22e3bd1ed60c216b000d000a8549de402fcd2" +dependencies = [ + "Inflector", + "cfg-expr", + "derive-syn-parse", + "expander 2.0.0", + "frame-support-procedural-tools 9.0.0", + "itertools 0.10.5", + "macro_magic", + "proc-macro-warning", + "proc-macro2", + "quote", + "sp-core-hashing 14.0.0", + "syn 2.0.48", +] + +[[package]] +name = "frame-support-procedural" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bf1d648c4007d421b9677b3c893256913498fff159dc2d85022cdd9cc432f3c" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", "expander 2.0.0", - "frame-support-procedural-tools", + "frame-support-procedural-tools 10.0.0", "itertools 0.10.5", "macro_magic", "proc-macro-warning", "proc-macro2", "quote", - "sp-core-hashing", + "sp-crypto-hashing", "syn 2.0.48", ] @@ -4014,13 +4844,26 @@ version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3ac1266522a8c9a2d2d26d205ec3028b88582d5f3cd5cbc75d0ec8271d197b7" dependencies = [ - "frame-support-procedural-tools-derive", + "frame-support-procedural-tools-derive 10.0.0", "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.48", ] +[[package]] +name = "frame-support-procedural-tools" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3363df38464c47a73eb521a4f648bfcc7537a82d70347ef8af3f73b6d019e910" +dependencies = [ + "frame-support-procedural-tools-derive 11.0.0", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "frame-support-procedural-tools-derive" version = "10.0.0" @@ -4032,6 +4875,17 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "frame-support-procedural-tools-derive" +version = "11.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68672b9ec6fe72d259d3879dc212c5e42e977588cdac830c76f54d9f492aeb58" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "frame-system" version = "25.0.0" @@ -4039,17 +4893,59 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57e316407c45a5093c833966a906301aa0dcbd05048061cd9cde2548d017bfd9" dependencies = [ "cfg-if", - "frame-support", + "frame-support 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-version 26.0.0", + "sp-weights 24.0.0", +] + +[[package]] +name = "frame-system" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93a51b0fc4d1f35cc4e56c356738ce0e3d1f8483062d9243653b91fd2d20b083" +dependencies = [ + "cfg-if", + "docify", + "frame-support 27.0.0", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-version 28.0.0", + "sp-weights 26.0.0", +] + +[[package]] +name = "frame-system" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bc20a793c3cec0b11165c1075fe11a255b2491f3eef8230bb3073cb296e7383" +dependencies = [ + "cfg-if", + "docify", + "frame-support 29.0.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-version", - "sp-weights", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-version 30.0.0", + "sp-weights 28.0.0", ] [[package]] @@ -4058,14 +4954,30 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5b1388055d29a7a1c4d41b1623d3fcbc9d7f31d17abe04500b270b26901d926" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "parity-scale-codec", + "scale-info", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "frame-system-benchmarking" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "398ca6909232d9e4a2686e862e49bd68314f1ee9796ba0ec29d55300523bf89f" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -4075,7 +4987,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17572a34fd866ad6cab6977a2c30b38645e0a499b3486de00ae9103f7002d6d3" dependencies = [ "parity-scale-codec", - "sp-api", + "sp-api 23.0.0", +] + +[[package]] +name = "frame-system-rpc-runtime-api" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ce3dd1fb4ac9a390ebac1744bbb368fcf457a3fda0df2d788c535a3ef5819e1" +dependencies = [ + "parity-scale-codec", + "sp-api 25.0.0", ] [[package]] @@ -4084,11 +5006,24 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f082e770275f9b46ddf46b09bc7a993f84db691c39d9e4d038ac07443cb17a18" dependencies = [ - "frame-support", + "frame-support 25.0.0", "parity-scale-codec", - "sp-api", - "sp-runtime", - "sp-std", + "sp-api 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "frame-try-runtime" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5edad06e1918b138964e0fee7d7b6d248e7d23e7946f868b165723564ba01b09" +dependencies = [ + "frame-support 27.0.0", + "parity-scale-codec", + "sp-api 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -4286,6 +5221,16 @@ dependencies = [ "wasi 0.11.0+wasi-snapshot-preview1", ] +[[package]] +name = "getrandom_or_panic" +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" @@ -4346,38 +5291,39 @@ dependencies = [ name = "glutton-kusama-runtime" version = "1.0.0" dependencies = [ - "cumulus-pallet-parachain-system", - "cumulus-pallet-xcm", - "cumulus-primitives-core", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "cumulus-pallet-parachain-system 0.6.0", + "cumulus-pallet-xcm 0.6.0", + "cumulus-primitives-core 0.6.0", + "frame-benchmarking 27.0.0", + "frame-executive 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-system-benchmarking 27.0.0", + "frame-system-rpc-runtime-api 25.0.0", + "frame-try-runtime 0.33.0", "pallet-glutton", + "pallet-message-queue 30.0.0", "pallet-sudo", - "parachains-common", - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-block-builder", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", + "parachains-common 6.0.0", + "parity-scale-codec", + "scale-info", + "sp-api 25.0.0", + "sp-block-builder 25.0.0", + "sp-core 27.0.0", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-offchain 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-transaction-pool 25.0.0", + "sp-version 28.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", + "substrate-wasm-builder 16.0.0", "system-parachains-constants", ] @@ -4872,46 +5818,32 @@ dependencies = [ name = "integration-tests-common" version = "1.0.0" dependencies = [ - "asset-hub-kusama-runtime", - "asset-hub-polkadot-runtime", "asset-test-utils", "bp-messages", - "bridge-hub-kusama-runtime", - "bridge-hub-polkadot-runtime", "bridge-runtime-common", - "collectives-polkadot-runtime", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "frame-support", - "kusama-runtime-constants", - "pallet-assets", - "pallet-balances", + "cumulus-pallet-dmp-queue 0.6.0", + "cumulus-pallet-parachain-system 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "frame-support 27.0.0", + "pallet-assets 28.0.0", + "pallet-balances 27.0.0", "pallet-bridge-messages", "pallet-im-online", - "pallet-message-queue", - "pallet-staking", - "pallet-xcm", - "parachains-common", + "pallet-message-queue 30.0.0", + "pallet-xcm 6.0.0", + "parachains-common 6.0.0", "parity-scale-codec", "paste", - "penpal-runtime", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-primitives", - "polkadot-runtime", - "polkadot-runtime-constants", - "polkadot-runtime-parachains", - "serde_json", - "sp-authority-discovery", - "sp-consensus-babe", + "polkadot-primitives 6.0.0", + "polkadot-runtime-parachains 6.0.0", + "sp-authority-discovery 25.0.0", + "sp-consensus-babe 0.31.0", "sp-consensus-beefy", - "sp-consensus-grandpa", - "sp-core", - "sp-runtime", - "staging-kusama-runtime", - "staging-xcm", + "sp-consensus-grandpa 12.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "staging-xcm 6.0.0", "xcm-emulator", ] @@ -4957,7 +5889,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.3", + "socket2 0.5.5", "widestring", "windows-sys 0.48.0", "winreg", @@ -5198,14 +6130,14 @@ checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" name = "kusama-runtime-constants" version = "1.0.0" dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", + "frame-support 27.0.0", + "polkadot-primitives 6.0.0", + "polkadot-runtime-common 6.0.0", "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", - "staging-xcm", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-weights 26.0.0", + "staging-xcm 6.0.0", ] [[package]] @@ -5255,9 +6187,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libloading" @@ -5347,7 +6279,7 @@ dependencies = [ "libp2p-identity", "log", "multiaddr", - "multihash", + "multihash 0.17.0", "multistream-select", "once_cell", "parking_lot 0.12.1", @@ -5407,7 +6339,7 @@ dependencies = [ "ed25519-dalek", "log", "multiaddr", - "multihash", + "multihash 0.17.0", "quick-protobuf", "rand 0.8.5", "sha2 0.10.7", @@ -5654,7 +6586,7 @@ dependencies = [ "libp2p-identity", "libp2p-noise", "log", - "multihash", + "multihash 0.17.0", "quick-protobuf", "quick-protobuf-codec", "rand 0.8.5", @@ -6075,6 +7007,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + [[package]] name = "mick-jaeger" version = "0.1.8" @@ -6103,9 +7047,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -6175,7 +7119,7 @@ dependencies = [ "data-encoding", "log", "multibase", - "multihash", + "multihash 0.17.0", "percent-encoding", "serde", "static_assertions", @@ -6205,12 +7149,55 @@ dependencies = [ "blake3", "core2", "digest 0.10.7", - "multihash-derive", + "multihash-derive 0.8.0", "sha2 0.10.7", "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.7", + "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.7", + "sha3", + "strobe-rs", +] + [[package]] name = "multihash-derive" version = "0.8.0" @@ -6225,6 +7212,31 @@ dependencies = [ "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", + "syn 1.0.109", + "synstructure", +] + [[package]] name = "multimap" version = "0.8.3" @@ -6440,9 +7452,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", "libm", @@ -6599,59 +7611,59 @@ dependencies = [ [[package]] name = "pallet-alliance" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3526a94a8aca9d98f06eb8ee76e1bf65f80fd23c278b25e6537a23b51392a85" +checksum = "cf8ceda912ff13d75e4144724daec0b0829ccf7a518b672e91d027f431d3d327" dependencies = [ "array-bytes 6.1.0", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-collective", + "pallet-collective 27.0.0", "pallet-identity", "parity-scale-codec", "scale-info", - "sp-core", - "sp-core-hashing", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-core-hashing 14.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-asset-conversion" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7f0ae643c877d9a36d7335bcda6614861b846a60f448da8cf3276d4042ef33" +checksum = "e4b91839d5d00be65483a80964eb9c6f60e59bfcc3dbafc2899c46b0465ebecb" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-api", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-api 25.0.0", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-asset-conversion-tx-payment" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64952179a5a409dead964a387c86a29d16d40a34cf54bf88e4d74ffdcdddf7a6" +checksum = "80810624ea3a3bab34568a45c7abca5777d60ed6312e271d04893ee5e69e002e" dependencies = [ - "frame-support", - "frame-system", + "frame-support 27.0.0", + "frame-system 27.0.0", "pallet-asset-conversion", - "pallet-transaction-payment", + "pallet-transaction-payment 27.0.0", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -6660,14 +7672,30 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "740aebbcfefe8528f56ff8a339f810520a28df3ec159d016ef719aaa9f131af4" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "parity-scale-codec", + "scale-info", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-asset-rate" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "094849e7310c9ad5d7dabf20ec8792c61812af32d4cc96b4319b973d320863fd" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -6676,34 +7704,70 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "028e30633114612160fc4e7add46504790abb3780db79eae1efae98c034dca0b" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "pallet-transaction-payment", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "pallet-transaction-payment 25.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] -name = "pallet-assets" -version = "26.0.0" +name = "pallet-asset-tx-payment" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3855550f4440a6e7ed47b23945473d708bb76e6a3c41f1a132514e0ed91349" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "pallet-transaction-payment 27.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", +] + +[[package]] +name = "pallet-assets" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09b91035c82dc9e64eaf52f3f6a39f4674bcb56333553882d6ff5d12500a9182" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-assets" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0394a32537f67d6f2d0b5642be44bcd2e3ffd44ba458ea4b756dd6e9168cd90" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -6712,16 +7776,34 @@ version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04fbef67cf62445b7fd8e68241e6b71d9fb8c77abb3d52259eebf525a4cd5586" dependencies = [ - "frame-support", - "frame-system", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "pallet-timestamp 24.0.0", + "parity-scale-codec", + "scale-info", + "sp-application-crypto 27.0.0", + "sp-consensus-aura 0.29.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-aura" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "796c9823f84c4fc3b92b170ef9339bad67f9376a16d8df943331b72809dade39" +dependencies = [ + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-timestamp", + "pallet-timestamp 26.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-consensus-aura", - "sp-runtime", - "sp-std", + "sp-application-crypto 29.0.0", + "sp-consensus-aura 0.31.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -6730,15 +7812,32 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fda272a66bbf1602579efcede67606ac43cda6d462ad551c527d8cadc871813d" dependencies = [ - "frame-support", - "frame-system", - "pallet-session", + "frame-support 25.0.0", + "frame-system 25.0.0", + "pallet-session 25.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-authority-discovery", - "sp-runtime", - "sp-std", + "sp-application-crypto 27.0.0", + "sp-authority-discovery 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-authority-discovery" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "361a82bd3370cef45db42171bb335c124ce19d577d6b3af22b3956d57aec631f" +dependencies = [ + "frame-support 27.0.0", + "frame-system 27.0.0", + "pallet-session 27.0.0", + "parity-scale-codec", + "scale-info", + "sp-application-crypto 29.0.0", + "sp-authority-discovery 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -6747,13 +7846,28 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d38eab59f7d15fe43c81fc3cd92f4c1f895ca6d0efb74fc2a6d6d7d3d34d413" dependencies = [ - "frame-support", - "frame-system", + "frame-support 25.0.0", + "frame-system 25.0.0", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-authorship" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37359c9f33c8f660126390b42281c0c1c6736ff2f7e1f1361299234f43fd3de8" +dependencies = [ + "frame-support 27.0.0", + "frame-system 27.0.0", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -6762,46 +7876,71 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b12430ca4b79b27231acb1ff3f99d33d6503fbeba40bfc8380e42d59b6d52b0" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "pallet-authorship 25.0.0", + "pallet-session 25.0.0", + "pallet-timestamp 24.0.0", + "parity-scale-codec", + "scale-info", + "sp-application-crypto 27.0.0", + "sp-consensus-babe 0.29.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-session 24.0.0", + "sp-staking 23.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-babe" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3ef6815dbc5ceb3f036e7b4037a6a37876df8817cec07637f269f79879430d2" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-authorship", - "pallet-session", - "pallet-timestamp", + "pallet-authorship 27.0.0", + "pallet-session 27.0.0", + "pallet-timestamp 26.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-consensus-babe", - "sp-core", - "sp-io", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", + "sp-application-crypto 29.0.0", + "sp-consensus-babe 0.31.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-bags-list" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d49c4448e51a5c64d63a4263aebeb2dfb90dabb48746e178b337fb7f533d45f" +checksum = "46d48f60b6da70607edc794cc05e72ae70ea532ec539094ffcc4c7c9250a453b" dependencies = [ - "aquamarine", + "aquamarine 0.3.2", "docify", - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-balances", + "pallet-balances 27.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-tracing", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-tracing 15.0.0", ] [[package]] @@ -6810,185 +7949,217 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9de2915b425ae77d63ba25c194780599b7be25307454a138cfb316c16d001e68" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-balances" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "919a13c14461ab698c59aadd80d23694c98a17ed6c2dd7c8cc974577738f1836" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime 30.0.1", + "sp-std 13.0.0", +] + +[[package]] +name = "pallet-balances" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "942007f4f7aace74b77009db1675e7ca98683a42dde5e2d85bba2a9f404d2e5a" +dependencies = [ + "docify", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 32.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-beefy" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8563fce9fdb0e557015c0b58ed7ea7d5c1a4a1ddb1d27bf56e040d6bbf5c79e9" +checksum = "24b6a09b8f3cc9dcc2edac7319ffc4f74ada08d570eb3fb23aed00b49b4c437f" dependencies = [ - "frame-support", - "frame-system", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-authorship", - "pallet-session", + "pallet-authorship 27.0.0", + "pallet-session 27.0.0", "parity-scale-codec", "scale-info", "serde", "sp-consensus-beefy", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-beefy-mmr" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee3ed75c348ba23064cea40dab623719ef348bfe67ea39f195f82e2e7a7d0115" +checksum = "e959c1126a433a8a6e756c8e85081e727a60c75353785a2b805ea25d2f7ff5fd" dependencies = [ "array-bytes 6.1.0", "binary-merkle-tree", - "frame-support", - "frame-system", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "pallet-beefy", "pallet-mmr", - "pallet-session", + "pallet-session 27.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-api", + "sp-api 25.0.0", "sp-consensus-beefy", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-bounties" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74c0fb83c88f217e5bfe07a69a6d8a6c32d01241159ab81705ba5d4c3e24aaab" +checksum = "9982eb7f49564bd1815c804a1ca73a15f7d021a70d36cfb35c1e2f5dffb7c739" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-treasury", + "pallet-treasury 26.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-bridge-grandpa" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc5083b92333f5ad64eb97d7e54978bd53c9ac8de8ac3c4056585fd236254d0" +checksum = "17d6a612927f39c3a92a426fe0d226cc17b2bc8b60122e767d186d5e210ed12a" dependencies = [ "bp-header-chain", - "bp-runtime", + "bp-runtime 0.6.0", "bp-test-utils", "finality-grandpa", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-consensus-grandpa", - "sp-runtime", - "sp-std", - "sp-trie", + "sp-consensus-grandpa 12.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-trie 28.0.0", ] [[package]] name = "pallet-bridge-messages" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e61922a3b67f17508e27ab2bba9dd03d4b2e6878d8c0819f7e155544443cfd" +checksum = "69cfc14baf0e65041a2cf9874c08d3e82212fe5d10f6a3ac1d0f40fcffac188f" dependencies = [ "bp-messages", - "bp-runtime", - "frame-benchmarking", - "frame-support", - "frame-system", + "bp-runtime 0.6.0", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "num-traits", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-bridge-parachains" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88703f22433e3bc5ba69f89b6002fd28c74753a1ab425117f103e91fec05696a" +checksum = "80f4ab34d6a2c3bf8f72a3c1dc8bab5c0097e8d9ce27083f69b4d1c7d619ec61" dependencies = [ "bp-header-chain", "bp-parachains", "bp-polkadot-core", - "bp-runtime", - "frame-benchmarking", - "frame-support", - "frame-system", + "bp-runtime 0.6.0", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "pallet-bridge-grandpa", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", - "sp-trie", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-trie 28.0.0", ] [[package]] name = "pallet-bridge-relayers" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04af803c4fb3e48a83325bb4781505fc5268e364f488116cf6718ddbbe57937d" +checksum = "273095478c3a09de73b7a01db3b2f938070621bc47e92cbbdadd31b7ba73f94c" dependencies = [ "bp-messages", "bp-relayers", - "bp-runtime", - "frame-benchmarking", - "frame-support", - "frame-system", + "bp-runtime 0.6.0", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-runtime", - "sp-std", + "sp-arithmetic 22.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-child-bounties" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2246ce705aee37f9b6ad818e3646910d31ef4191e1c234bff054a710ef8d8a38" +checksum = "4a27dfd21f4b038b534376d289954dc2fe735101b5d07ed6356f8578a1e134d2" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "pallet-bounties", - "pallet-treasury", + "pallet-treasury 26.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -6997,18 +8168,38 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66c093c8867dbdb540da33076566605320b2eda78da5062d3d954f05862db18d" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "pallet-authorship 25.0.0", + "pallet-session 25.0.0", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sp-runtime 28.0.0", + "sp-staking 23.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-collator-selection" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c352469427fb52314865ec220c8b83d05457de6c99f746b497575bb5c224682" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-authorship", - "pallet-session", + "pallet-authorship 27.0.0", + "pallet-session 27.0.0", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] @@ -7017,72 +8208,90 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dddb120b5ee520146617a8c49b4d4c980ba9188918d43085539bf78815e7ec1d" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-collective" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e45e487c9ff2e3d36265f4cd2ead2721f9881670417c767fd95081d28bb2c890" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-conviction-voting" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c8ff7512a377b708f71772e5169550cebc8f74bc8c26553015698eaa0975356" +checksum = "d93572f2a2e85e419bcd13ed65093eef677d7001616c7ba078fa05106dae11a1" dependencies = [ "assert_matches", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-core-fellowship" -version = "9.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c52f9f5ce35127f55972845c49604309e8df81facbc34560abc680df5515383" +checksum = "6d8c79b5837a1ba4b1803e2b03ccbc761deb5f84589227faa3995e20e7d7afdf" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-democracy" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9f24ad18db2eeae0f03ba1743a82aaf300e0bbd6cdcb1119b0da93eef3d77f" +checksum = "9e0aa3ee4c1c4b530b9d6a1dfdfbac69b64a9bad3d2fdd4748b961a4ec0962c2" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -7091,21 +8300,45 @@ version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "481178ef558a9409d9c12fc01279b517e3a0a7797664e89761447dba3a182ce6" dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-election-provider-support 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "pallet-election-provider-support-benchmarking 24.0.0", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-npos-elections 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "strum", +] + +[[package]] +name = "pallet-election-provider-multi-phase" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3f6303bbd336414959861b9a530f53e295d66f8d27dd8bd626daaf8fa051a1f" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-election-provider-support-benchmarking", + "pallet-election-provider-support-benchmarking 26.0.0", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-npos-elections", - "sp-runtime", - "sp-std", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-npos-elections 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", "strum", ] @@ -7115,33 +8348,48 @@ version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5ab6413ec88b64acf849a202795c67940dc3bcc846ce03bd0893b90e2119ecf" dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-election-provider-support 25.0.0", + "frame-system 25.0.0", "parity-scale-codec", - "sp-npos-elections", - "sp-runtime", - "sp-std", + "sp-npos-elections 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] -name = "pallet-elections-phragmen" +name = "pallet-election-provider-support-benchmarking" version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "021da1d28b604b3654f895987dcb1ccb47d73102b31bc84c8f784bed261f01d8" +checksum = "baa4d9a426c024e1aa3bb6adbb03aa3b6887be8775e3fba0abda48ca9b17c864" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-system 27.0.0", + "parity-scale-codec", + "sp-npos-elections 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", +] + +[[package]] +name = "pallet-elections-phragmen" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a9f5a24ff9e46113edc57dfc1be6343652fac6dd967662cdc82b194aa38be9e" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-npos-elections", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-npos-elections 25.0.0", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] @@ -7152,16 +8400,16 @@ checksum = "32a2ea2b74c36582daf64b632064b3525da8aa2cdced57581272264ebd811a7a" dependencies = [ "approx", "encointer-primitives", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", - "pallet-asset-tx-payment", - "pallet-transaction-payment", + "pallet-asset-tx-payment 25.0.0", + "pallet-transaction-payment 25.0.0", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7171,15 +8419,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2f5797985a0a1d94338ab69659e62fb3b9435f070db39a0e610fd1757cf77fd" dependencies = [ "encointer-primitives", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", "pallet-encointer-communities", "parity-scale-codec", "scale-info", - "sp-core", - "sp-std", + "sp-core 25.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7189,9 +8437,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6471fa29e940363ff8090bb620ad82564286f955bfaa33a15147190438542aa6" dependencies = [ "encointer-primitives", - "frame-support", - "sp-api", - "sp-std", + "frame-support 25.0.0", + "sp-api 23.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7203,21 +8451,21 @@ dependencies = [ "encointer-ceremonies-assignment", "encointer-meetup-validation", "encointer-primitives", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", "pallet-encointer-balances", "pallet-encointer-communities", "pallet-encointer-scheduler", - "pallet-timestamp", + "pallet-timestamp 24.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-application-crypto 27.0.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7227,9 +8475,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af85c19a7b83a255348a95ee0b691810088320c36319eb4446eb527f0e854a04" dependencies = [ "encointer-primitives", - "frame-support", - "sp-api", - "sp-std", + "frame-support 25.0.0", + "sp-api 23.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7239,17 +8487,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88164fe398f45a0af98c74115e27c2c19cbdb218da7a1ba2269c12e92574779c" dependencies = [ "encointer-primitives", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", "pallet-encointer-balances", "pallet-encointer-scheduler", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7259,8 +8507,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1808d7908167315f12204db923a35f4af851e7c53b73351ed7d1b9e53a8c948d" dependencies = [ "encointer-primitives", - "sp-api", - "sp-std", + "sp-api 23.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7271,18 +8519,18 @@ checksum = "749e2e516dd7d0c5901920c866f8ae0c6d76665df07e5acd5fbccc5938bb9193" dependencies = [ "approx", "encointer-primitives", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", "pallet-encointer-communities", "pallet-encointer-reputation-commitments", - "pallet-treasury", + "pallet-treasury 24.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7293,19 +8541,19 @@ checksum = "27da548ae6f6070797c3270160cc0c76d4ddc20575d63e5a615d6f28d99c7cb5" dependencies = [ "approx", "encointer-primitives", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", "pallet-encointer-ceremonies", "pallet-encointer-communities", "pallet-encointer-scheduler", - "pallet-timestamp", + "pallet-timestamp 24.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7315,16 +8563,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a90e9127e0ed2392545ea4178b82f25ac987cb1228e6d90c77875d559a7a1578" dependencies = [ "encointer-primitives", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", "impl-trait-for-tuples", "log", - "pallet-timestamp", + "pallet-timestamp 24.0.0", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7334,116 +8582,136 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05634a197738c999a3032393916182fedccce13cb063fc330ee9bf810cd53b49" dependencies = [ "docify", - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-election-provider-support 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-staking 23.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-fast-unstake" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9186636e923b4be260d4a9cfff2aabb2620c6d0c755396ab31b0c74f1883891b" +dependencies = [ + "docify", + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-glutton" -version = "11.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3686506ac15f9b0442f5dffe496b68fca391116acfb6baef65524bb08c94f4" +checksum = "26571660041ba596c43ee71992be20950e80d71f4199dfa8e57691a6757e20e9" dependencies = [ "blake2 0.10.6", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-grandpa" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b87c7f4cd94a526054dfebf7a84fbcaf6385033defa246ad83e321e71f8c5a92" +checksum = "a8127d9f60e5b5e88014ee9423245503704fd188a972be2a02cb921a470db762" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-authorship", - "pallet-session", + "pallet-authorship 27.0.0", + "pallet-session 27.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-consensus-grandpa", - "sp-core", - "sp-io", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", + "sp-application-crypto 29.0.0", + "sp-consensus-grandpa 12.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-identity" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "735bf6c19d30299e2d448797170a67d41c6a8ba593fb3a71ce4e11d3b85c60e9" +checksum = "b094c99305f6b61b6aead5b8fbfa44dafa002696dd5c663336a7eb3b68950c46" dependencies = [ "enumflags2", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-im-online" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59eb1c68cc6b4700ad1d2a81ba847ff7b37406aa0326b7716825155d3f985762" +checksum = "273b6bd0c0f098b935714a59f9487e64382e87de49a7cf6d6dd8cdeb63be0aed" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-authorship", + "pallet-authorship 27.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-application-crypto 29.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-indices" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0893ae7f2211010e92bf57fe31f18e2223a2f97f6d6393aa7192e283ec520beb" +checksum = "81e5eeda9acaed9968ebe2221f8f18fcee7103b7f1f739ef6c20f73e5e3bf447" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-keyring", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-keyring 30.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -7452,13 +8720,13 @@ version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df4d7fab2948940925d4c0076ec542b2c67b37a5332449f102241993d31a8b41" dependencies = [ - "frame-support", - "frame-system", + "frame-support 25.0.0", + "frame-system 25.0.0", "parity-scale-codec", "safe-mix", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7467,16 +8735,34 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e1504034588eb733f8ce98b77757e9a7390662313aa133ef1e3b9fbb94359c7" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-membership" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d662c6cdf6c2ead71ba1d2dbf1c0fef0fa9edbfdcc05377c2db056fe00a9f1da" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -7485,233 +8771,275 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0776bf51d03bd746159063fa1357234feb85114273d40ef3aa3efba65d091eb4" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-weights 24.0.0", +] + +[[package]] +name = "pallet-message-queue" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8290ebbf3fafdd90f7db6a249101c3bcc6428e089476d6ac237e2339da97401" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-weights 26.0.0", +] + +[[package]] +name = "pallet-message-queue" +version = "32.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ccb23dee70b184a214d729db550117a0965a69107d466d35181d60a6feede38" +dependencies = [ + "environmental", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-weights 28.0.0", ] [[package]] name = "pallet-mmr" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b9789cac80b48e9427724d0b400f984fb844fc711fc2dd2d0cdccdedda7169" +checksum = "ac6e31cef5ee5cc094a3ffbb7fc5a1424a5a4c877143541dbf51a29724d6d4cb" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", + "sp-core 27.0.0", + "sp-io 29.0.0", "sp-mmr-primitives", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-multisig" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea2785a0bfb1884a8283bf65010bb7189c8fce958ced9947a8c71c148ef199f" +checksum = "d97de91a840d8fa4f2eb0dea5de7dd06221b39dd0955c3065ae4a10f63a0ba2c" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-nft-fractionalization" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "959fb2e68e4421650538d9b64a3243f0a0cdc8962f35f749af18bf9b70f7253d" +checksum = "e19791a4d82d7d23a0bcf2ce93b9317915d1979c9be817171655ce6e992c40f3" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-assets", + "pallet-assets 28.0.0", "pallet-nfts", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-nfts" -version = "19.0.0" +version = "21.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "999a30c5861a83a6ab38a564df99f976f0bc6bf54b03620abc568bba5f7b4834" +checksum = "86d848b63485ca0877e5a6e407cf67d54acb35591db455a6b3151fa105d0c7de" dependencies = [ "enumflags2", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-nfts-runtime-api" -version = "11.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a64c725e28fdf7d2512c1ce8eab8ba05fc7211fb864ee6c3d2300a2b3bd381" +checksum = "9d0b15d938dd4d0d40f95721d9bc0f93e8bc2de01b91432cd8abce7f3348bf2d" dependencies = [ "pallet-nfts", "parity-scale-codec", - "sp-api", + "sp-api 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-nis" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aa7ec891b7f1801a405095a2ad2c70eef94d2abe86792eee54794de23cbd035" +checksum = "0aeb66fc313fa20704203134b93f2df3b9470a56021a3a2e31a28668cc29293b" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-runtime", - "sp-std", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-nomination-pools" -version = "22.0.2" +version = "24.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72cec44f1a5752ace99cfc5472d79a758b1cca25b9cc5b2d62ffd8aba6e66a8a" +checksum = "32950c1329132fbb7f0f70efddafbbe103fc15bcb9528e3a3406639935d1c6e4" dependencies = [ - "frame-support", - "frame-system", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-balances", + "pallet-balances 27.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", - "sp-tracing", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", + "sp-tracing 15.0.0", ] [[package]] name = "pallet-nomination-pools-benchmarking" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b27cbf4a47cc79862d254f16b38c68fd2dda087ce58e7c0021859d89718e865a" +checksum = "fb69a53b558f5382eba0bb875f03823ec105300a40738ae16b64eca748249a4c" dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "pallet-bags-list", "pallet-nomination-pools", - "pallet-staking", + "pallet-staking 27.0.0", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-runtime-interface", - "sp-staking", - "sp-std", + "sp-runtime 30.0.1", + "sp-runtime-interface 23.0.0", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-nomination-pools-runtime-api" -version = "20.0.0" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65c256cc530a19ff614f2af9b5c95ae9aa777a2bf1542aa455ae65e842f8c924" +checksum = "1a586ad28735a59b0a74a5aeee43820911f2a384b8f5321f5a4b8f8a026f3173" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", - "sp-api", - "sp-std", + "sp-api 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-offences" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3fd14c02ed4b689652826aa93284aada5a2cf859df3cc34ad88b2fd410a8c50" +checksum = "c77352f9a1afcde5d36395c9847e14c75d73c379e4f9ff7643f5d64741f20587" dependencies = [ - "frame-support", - "frame-system", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-balances", + "pallet-balances 27.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-offences-benchmarking" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1b3ae77cfb16f0495372853d42a44e34ab7b183bd8996a8cee91715f783ff49" +checksum = "fb14e278769dba2a6ebcced6fd565015f09f7f9366add0ff10156744e551c8d3" dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-babe", - "pallet-balances", + "pallet-babe 27.0.0", + "pallet-balances 27.0.0", "pallet-grandpa", "pallet-im-online", "pallet-offences", - "pallet-session", - "pallet-staking", + "pallet-session 27.0.0", + "pallet-staking 27.0.0", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] name = "pallet-preimage" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed40405c758b52375cfc75aac74f10ff9bb9480569e5cfca42682e2db6c387" +checksum = "74e6ef7cdf7de30219789470d3c6d1606a10e34cad4891738033ae1a1fe92e30" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -7720,88 +9048,104 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fbc0b550f5cbbad51f9daf795cc7046d40bbff256dae8d6072fd710ab40fd3a" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "parity-scale-codec", + "scale-info", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-proxy" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f1e89e043a6059fc19ada02364da3f20570f18b5eefdb6b20332e495218acb1" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-ranked-collective" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8181da7fd6b9adf4f8641c5bcb156cd209e3226eea87ee9f9b1ac41f8e37c714" +checksum = "f613ea43dcad3cb29f948e4889aace0a604495360cad32297a4b0c4591615dfb" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-recovery" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "889fddd16cfdea09c2ae4dc8e9f67a1ec4b8ac680412cffb772fa572489ec687" +checksum = "30b5e90c670d6275b77ef12ecf794a799020815a03d5dfe1b98288772ff14b7f" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-referenda" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "592ff9873af379bf55e835072afd787cd6435204213ac484e86345b026f4ae4e" +checksum = "6c91a148d8fa3e11738ccc650fdfaf1f055b1283099b12b8dc430b39a7fb3988" dependencies = [ "assert_matches", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-io", - "sp-runtime", - "sp-std", + "sp-arithmetic 22.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-salary" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ac035a8cccd7297ad03ad8ebe372b01f451aaafa9b243f5ce59b061d0806b1" +checksum = "86997dc4190bc440a8954c297ce03a14286cd57c1d778824d3686c7289b8b31c" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -7811,76 +9155,117 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3508a51d359c6640577feead9dc00667f38cec385baad77b636c61ff746ffe24" dependencies = [ "docify", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 25.0.0", + "frame-system 25.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-weights 24.0.0", ] [[package]] -name = "pallet-session" -version = "25.0.0" +name = "pallet-scheduler" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "768a6fb5333efc2bd2a3538c1d6ffa4178398660d4e3be89f2eb82d4e9088ae6" +checksum = "6261d6f18bb2ed22451a87aac91f40e6d9753249827235fbc2aa1ccfe576c594" dependencies = [ - "frame-support", - "frame-system", - "impl-trait-for-tuples", + "docify", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-state-machine", - "sp-std", - "sp-trie", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-weights 26.0.0", ] [[package]] -name = "pallet-session-benchmarking" +name = "pallet-session" version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5401cee669394e86a15851ace4ad60ef1b4d656f11ff22c83d8004051279ea59" +checksum = "768a6fb5333efc2bd2a3538c1d6ffa4178398660d4e3be89f2eb82d4e9088ae6" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "pallet-session", - "pallet-staking", + "frame-support 25.0.0", + "frame-system 25.0.0", + "impl-trait-for-tuples", + "log", + "pallet-timestamp 24.0.0", "parity-scale-codec", - "rand 0.8.5", - "sp-runtime", - "sp-session", - "sp-std", + "scale-info", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-session 24.0.0", + "sp-staking 23.0.0", + "sp-state-machine 0.32.0", + "sp-std 12.0.0", + "sp-trie 26.0.0", ] [[package]] -name = "pallet-society" -version = "25.0.0" +name = "pallet-session" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36959be2c7f810ba6b8ece8cfe2ee515774c1c776f1ed0bebf3b9e8068f6a435" +checksum = "d08a1fd9bcdead33c7d8b3a483241084575e19943c0f806194b96d731cf7a80b" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 27.0.0", + "frame-system 27.0.0", + "impl-trait-for-tuples", "log", + "pallet-timestamp 26.0.0", "parity-scale-codec", - "rand_chacha 0.2.2", "scale-info", - "sp-arithmetic", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-staking 25.0.0", + "sp-state-machine 0.34.0", + "sp-std 13.0.0", + "sp-trie 28.0.0", +] + +[[package]] +name = "pallet-session-benchmarking" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c8a1fe52d8f2fc79e4784f8c96f3e3bed6da5d343bedaa4237c5641563f8cc" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "pallet-session 27.0.0", + "pallet-staking 27.0.0", + "parity-scale-codec", + "rand 0.8.5", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-std 13.0.0", +] + +[[package]] +name = "pallet-society" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dcf8c3ee3e104d3c069af9c261e3a84b57e74622ac98630f5925c1ad9ffaeb5" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "log", + "parity-scale-codec", + "rand_chacha 0.2.2", + "scale-info", + "sp-arithmetic 22.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -7889,22 +9274,46 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bed335abd32d357dd9750dae7fb87b01dfd8fe69faadcb94a6e0e0a43057d923" dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-election-provider-support 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "pallet-authorship 25.0.0", + "pallet-session 25.0.0", + "parity-scale-codec", + "rand_chacha 0.2.2", + "scale-info", + "serde", + "sp-application-crypto 27.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-staking 23.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-staking" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "721324165298bdc5f3dc8838a0e94d7ca1e471a702185dfbbafff84d89945e4e" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-authorship", - "pallet-session", + "pallet-authorship 27.0.0", + "pallet-session 27.0.0", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", "serde", - "sp-application-crypto", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-application-crypto 29.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", ] [[package]] @@ -7926,52 +9335,63 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45b6f832653badb5f70bdfecc1ded64b02b8159b27f18515af03f8b80f1b023b" dependencies = [ "log", - "sp-arithmetic", + "sp-arithmetic 20.0.0", +] + +[[package]] +name = "pallet-staking-reward-fn" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f5b0d52306a74510f730567ed9543b7e4eac9043fd519cdc94ba5b3850befa" +dependencies = [ + "log", + "sp-arithmetic 22.0.0", ] [[package]] name = "pallet-staking-runtime-api" -version = "11.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773c0d24ad4da4b505e47b43e91c8c0af4e835f16104bc770732a4796c174748" +checksum = "4ce19dffced5c3455016a3f80f33f92aba903675d09c3c81a2919abc4cf78725" dependencies = [ "parity-scale-codec", - "sp-api", + "sp-api 25.0.0", + "sp-staking 25.0.0", ] [[package]] name = "pallet-state-trie-migration" -version = "26.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "550292d79f281fd1bfbbf2643f10cef3d67068075d46374295f2efe7f7113da0" +checksum = "61bfbf58d5c787a4e25d1bb2ac29c9a86c31f9e82e129f624e5fd0e71bc8476e" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-sudo" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcec9f73ecb8d0439a13043a253a9fd90aa6bf5aece6470194bbfc7f79256d88" +checksum = "1273597599b58a462454f8ce626b517183b7008a438dbbcc8989ea6980a10c6f" dependencies = [ "docify", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -7981,38 +9401,80 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b25ec8749cf3f481b5e5199be701bac0dea835851b83fc7c455192762711858d" dependencies = [ "docify", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-inherents 23.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-storage 17.0.0", + "sp-timestamp 23.0.0", +] + +[[package]] +name = "pallet-timestamp" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33e72c2e35a574dff24f58ff8a1d19cd997858600a1cf608c3a28477fb9bfed3" +dependencies = [ + "docify", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-timestamp 25.0.0", +] + +[[package]] +name = "pallet-timestamp" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1b8810ddfb254c7fb8cd7698229cce513d309a43ff117b38798dae6120f477b" +dependencies = [ + "docify", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-std", - "sp-storage", - "sp-timestamp", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "sp-timestamp 27.0.0", ] [[package]] name = "pallet-tips" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b17cf8b964e5533f1f5ac1f087f3f69adfead754cb5dd25abe395ec1e7abc9" +checksum = "2943d26f89e3bf74c95634ca31a8f62e743dc4dc9fbb7323fd4799e5cf722c10" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", - "pallet-treasury", + "pallet-treasury 26.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -8021,15 +9483,49 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87ef7ceaac786e41613731e3bc48284f1aa3ec260934abda2daed949de6e5ada" dependencies = [ - "frame-support", - "frame-system", + "frame-support 25.0.0", + "frame-system 25.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-transaction-payment" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fdf0cba2fe991bd14562b3e6504fa78eaf079e5b84ff6747edfe50049366aa1" +dependencies = [ + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", +] + +[[package]] +name = "pallet-transaction-payment" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39f690f5c287ad34b28ca951ef7fae80b08cc9218d970723b7a70e4d29396872" +dependencies = [ + "frame-support 29.0.0", + "frame-system 29.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", ] [[package]] @@ -8038,11 +9534,24 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07d87fdc4028155367c6ea98143054a6c00b38bfd77ec08681e289e429e35505" dependencies = [ - "pallet-transaction-payment", + "pallet-transaction-payment 25.0.0", + "parity-scale-codec", + "sp-api 23.0.0", + "sp-runtime 28.0.0", + "sp-weights 24.0.0", +] + +[[package]] +name = "pallet-transaction-payment-rpc-runtime-api" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12eb6403383c384bb922392292d20dad26d95f44292f08d4444ef4a16f892671" +dependencies = [ + "pallet-transaction-payment 27.0.0", "parity-scale-codec", - "sp-api", - "sp-runtime", - "sp-weights", + "sp-api 25.0.0", + "sp-runtime 30.0.1", + "sp-weights 26.0.0", ] [[package]] @@ -8052,33 +9561,53 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8dd462af11574485864023849e0622916b611dbc88111192fb39b1e6d7e666ba" dependencies = [ "docify", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "impl-trait-for-tuples", + "pallet-balances 25.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-treasury" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b173de5886d221ab2be524b29d2febb0f5f8f57a47bb0152a8a153a7ab573f1" +dependencies = [ + "docify", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "impl-trait-for-tuples", - "pallet-balances", + "pallet-balances 27.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-uniques" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8010c79bac1b78fb35b3ee17b40469dec3fcf2eaa6fd863c5be5d96f2ad46bfd" +checksum = "04892f18f0efe31883af1f0998827a08c0b55eb65d8e3818c5a14965dc6ee27f" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -8087,15 +9616,32 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85a8a6941da32837e4297e0d8abe0a5c94f348a119cccbf27b0f99ee01246c0e" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "parity-scale-codec", + "scale-info", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-utility" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae212409d911bfd5c3cfe078afc71375431547cf0b24f222741c4dc6a6327683" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -8104,30 +9650,46 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd29411ef24eb6a856adf1bc33b37ead4835a25dafb1c4c8c95b13fa5247748f" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-vesting" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9efa19c0258d21cda531b7e81532ce6fb28c10f99f406c051852ed51f28dcefd" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "pallet-whitelist" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37304829099cfec7d17df70cfe11ccf6cb7bd624eab80e8e79e895859454540" +checksum = "3a9943df0e695f0b1719e9d559ab08fbded03a443e270e48b11bee56f209a2d7" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-api", - "sp-runtime", - "sp-std", + "sp-api 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -8136,20 +9698,44 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04d5e5404d9dadb39390949aadc2c641c16ce4cb0f47ed7a7ff584ab914c2984" dependencies = [ - "bounded-collections", - "frame-benchmarking", - "frame-support", - "frame-system", + "bounded-collections 0.1.8", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "staging-xcm 4.0.0", + "staging-xcm-executor 4.0.2", +] + +[[package]] +name = "pallet-xcm" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76c4eb9211a13bffe31ba0555c382b2e377213ccf7bfd800b115e222cb349142" +dependencies = [ + "bounded-collections 0.1.8", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", + "pallet-balances 27.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "staging-xcm", - "staging-xcm-executor", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", ] [[package]] @@ -8158,38 +9744,82 @@ version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7f50852380d3272accbf4532dc2e46cdc7f66f5452600bfd7d33fc208a5ff1e" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "staging-xcm 4.0.0", + "staging-xcm-builder 4.0.1", + "staging-xcm-executor 4.0.2", +] + +[[package]] +name = "pallet-xcm-benchmarks" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d64081cd57aa8b037fa26e701a23049c1b4e9e6b2d15bd37a389b2cb63811f6d" +dependencies = [ + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", +] + +[[package]] +name = "pallet-xcm-bridge-hub" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ac06adbe492bda1c840e3a775b69d619391fe1a631cebd76010dc8394fed75f" +dependencies = [ + "bp-messages", + "bp-runtime 0.6.0", + "bp-xcm-bridge-hub", + "bridge-runtime-common", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", + "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", ] [[package]] name = "pallet-xcm-bridge-hub-router" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e2d8a783510d2fb4c0e81f591baad76fa8ebbed0f77852bf23720b299539b61" +checksum = "4b36a67b5b0755e616fa0f5c0874ff5f83ba66eb0f7c4ec98166b95d6915c291" dependencies = [ - "bp-xcm-bridge-hub-router", - "frame-benchmarking", - "frame-support", - "frame-system", + "bp-xcm-bridge-hub-router 0.5.0", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", - "staging-xcm", - "staging-xcm-builder", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", ] [[package]] @@ -8198,75 +9828,116 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7ab598917585ae55b892dbfb6fa5073eb40454c47504a0d0db2634505538632" dependencies = [ - "cumulus-primitives-core", - "cumulus-primitives-utility", - "frame-support", - "frame-system", + "cumulus-primitives-core 0.4.0", + "cumulus-primitives-utility 0.4.1", + "frame-support 25.0.0", + "frame-system 25.0.0", + "log", + "num-traits", + "pallet-asset-tx-payment 25.0.0", + "pallet-assets 26.0.0", + "pallet-authorship 25.0.0", + "pallet-balances 25.0.0", + "pallet-collator-selection 6.0.0", + "parity-scale-codec", + "polkadot-core-primitives 4.0.0", + "polkadot-primitives 4.0.0", + "rococo-runtime-constants 4.0.0", + "scale-info", + "smallvec", + "sp-consensus-aura 0.29.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "staging-parachain-info 0.4.0", + "staging-xcm 4.0.0", + "staging-xcm-builder 4.0.1", + "substrate-wasm-builder 14.0.0", + "westend-runtime-constants 4.0.0", +] + +[[package]] +name = "parachains-common" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95c5d3cd2e1516fad507855309237b6a6f8fe778819ce5583ce48970c524101a" +dependencies = [ + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-utility 0.6.2", + "frame-support 27.0.0", + "frame-system 27.0.0", "log", "num-traits", - "pallet-asset-tx-payment", - "pallet-assets", - "pallet-authorship", - "pallet-balances", - "pallet-collator-selection", + "pallet-asset-tx-payment 27.0.0", + "pallet-assets 28.0.0", + "pallet-authorship 27.0.0", + "pallet-balances 27.0.0", + "pallet-collator-selection 8.0.0", + "pallet-message-queue 30.0.0", "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-primitives", - "rococo-runtime-constants", + "polkadot-core-primitives 6.0.0", + "polkadot-primitives 6.0.0", + "rococo-runtime-constants 6.0.0", "scale-info", "smallvec", - "sp-consensus-aura", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "substrate-wasm-builder", - "westend-runtime-constants", + "sp-consensus-aura 0.31.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", + "substrate-wasm-builder 16.0.0", + "westend-runtime-constants 6.0.0", ] [[package]] name = "parachains-runtimes-test-utils" -version = "4.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4473cc6319cada74f52b4c0b35a7a8b248e0db661aed4e65bd3a4cf676c9d4ff" +checksum = "34682787ee935f35aa45044637f9557c0b313d91453b41016724574e6193f493" dependencies = [ "assets-common", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", - "cumulus-test-relay-sproof-builder", - "frame-support", - "frame-system", - "pallet-assets", - "pallet-balances", - "pallet-collator-selection", - "pallet-session", - "pallet-xcm", - "parachains-common", - "parity-scale-codec", - "polkadot-parachain-primitives", - "sp-consensus-aura", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-tracing", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-executor", - "substrate-wasm-builder", + "cumulus-pallet-parachain-system 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-parachain-inherent 0.6.0", + "cumulus-test-relay-sproof-builder 0.6.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "pallet-assets 28.0.0", + "pallet-balances 27.0.0", + "pallet-collator-selection 8.0.0", + "pallet-session 27.0.0", + "pallet-xcm 6.0.0", + "parachains-common 6.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 5.0.0", + "sp-consensus-aura 0.31.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-tracing 15.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-executor 6.0.2", + "substrate-wasm-builder 16.0.0", ] +[[package]] +name = "parity-bytes" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b56e3a2420138bdb970f84dfb9c774aea80fa0e7371549eedec0d80c209c67" + [[package]] name = "parity-db" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78f19d20a0d2cc52327a88d131fa1c4ea81ea4a04714aedcfeca2dd410049cf8" +checksum = "592a28a24b09c9dc20ac8afaa6839abc417c720afe42c12e1e4a9d6aa2508d2e" dependencies = [ "blake2 0.10.6", "crc32fast", @@ -8280,6 +9951,7 @@ dependencies = [ "rand 0.8.5", "siphasher", "snap", + "winapi", ] [[package]] @@ -8303,7 +9975,7 @@ version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate 2.0.1", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 1.0.109", @@ -8460,64 +10132,65 @@ dependencies = [ [[package]] name = "penpal-runtime" -version = "0.11.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfc3b8710f83bcaed4e9e944f17805be08857563ac7e59b64ff2b184ff7927e" +checksum = "848508f492e7a04f8a884416c1ba4588d6f13641f98afd9761ff453ed9c4ff98" dependencies = [ - "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", + "cumulus-pallet-aura-ext 0.6.0", + "cumulus-pallet-dmp-queue 0.6.0", + "cumulus-pallet-parachain-system 0.6.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-utility", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "cumulus-pallet-xcm 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-utility 0.6.2", + "frame-benchmarking 27.0.0", + "frame-executive 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-system-benchmarking 27.0.0", + "frame-system-rpc-runtime-api 25.0.0", + "frame-try-runtime 0.33.0", "hex-literal", "log", - "pallet-asset-tx-payment", - "pallet-assets", - "pallet-aura", - "pallet-authorship", - "pallet-balances", - "pallet-collator-selection", - "pallet-session", + "pallet-asset-tx-payment 27.0.0", + "pallet-assets 28.0.0", + "pallet-aura 26.0.0", + "pallet-authorship 27.0.0", + "pallet-balances 27.0.0", + "pallet-collator-selection 8.0.0", + "pallet-message-queue 30.0.0", + "pallet-session 27.0.0", "pallet-sudo", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-xcm", - "parachains-common", + "pallet-timestamp 26.0.0", + "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment-rpc-runtime-api 27.0.0", + "pallet-xcm 6.0.0", + "parachains-common 6.0.0", "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-primitives", - "polkadot-runtime-common", + "polkadot-parachain-primitives 5.0.0", + "polkadot-primitives 6.0.0", + "polkadot-runtime-common 6.0.0", "scale-info", "smallvec", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", + "sp-api 25.0.0", + "sp-block-builder 25.0.0", + "sp-consensus-aura 0.31.0", + "sp-core 27.0.0", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-offchain 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-transaction-pool 25.0.0", + "sp-version 28.0.0", + "staging-parachain-info 0.6.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", + "substrate-wasm-builder 16.0.0", ] [[package]] @@ -8526,6 +10199,17 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +[[package]] +name = "pest" +version = "2.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + [[package]] name = "petgraph" version = "0.6.4" @@ -8614,9 +10298,35 @@ checksum = "b08d1d6ca24e1b13f8069e015cfab794344212dd7436aadd61de8086a82664ef" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "polkadot-core-primitives" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a185e7c80e3a42c681f02afe39c0d6a3f0eb5eef0b740afd592b3234aa462b1f" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", +] + +[[package]] +name = "polkadot-core-primitives" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6a08e4e014c853b252ecbbe3ccd67b2d33d78e46988d309b8cccf4ac06e25ef" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", ] [[package]] @@ -8630,10 +10340,29 @@ dependencies = [ "mick-jaeger", "parity-scale-codec", "parking_lot 0.12.1", - "polkadot-node-primitives", - "polkadot-primitives", - "sc-network", - "sp-core", + "polkadot-node-primitives 4.0.0", + "polkadot-primitives 4.0.0", + "sc-network 0.31.0", + "sp-core 25.0.0", + "thiserror", + "tokio", +] + +[[package]] +name = "polkadot-node-jaeger" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08be78960db8b91245b08813ad8261a3f9ae15d3dba194ff88b65a3971a16141" +dependencies = [ + "lazy_static", + "log", + "mick-jaeger", + "parity-scale-codec", + "parking_lot 0.12.1", + "polkadot-node-primitives 6.0.0", + "polkadot-primitives 6.0.0", + "sc-network 0.33.0", + "sp-core 27.0.0", "thiserror", "tokio", ] @@ -8649,13 +10378,33 @@ dependencies = [ "futures-timer", "log", "parity-scale-codec", - "polkadot-primitives", + "polkadot-primitives 4.0.0", + "prioritized-metered-channel", + "sc-cli 0.33.0", + "sc-service 0.32.0", + "sc-tracing 25.0.0", + "substrate-prometheus-endpoint", + "tracing-gum 4.0.0", +] + +[[package]] +name = "polkadot-node-metrics" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3aac00c8be626db8de37699d3a66f109ad5399ee03122a670b12eb6cf21359" +dependencies = [ + "bs58 0.5.0", + "futures", + "futures-timer", + "log", + "parity-scale-codec", + "polkadot-primitives 6.0.0", "prioritized-metered-channel", - "sc-cli", - "sc-service", - "sc-tracing", + "sc-cli 0.35.0", + "sc-service 0.34.0", + "sc-tracing 27.0.0", "substrate-prometheus-endpoint", - "tracing-gum", + "tracing-gum 6.0.0", ] [[package]] @@ -8672,37 +10421,86 @@ dependencies = [ "futures", "hex", "parity-scale-codec", - "polkadot-node-jaeger", - "polkadot-node-primitives", - "polkadot-primitives", + "polkadot-node-jaeger 4.0.0", + "polkadot-node-primitives 4.0.0", + "polkadot-primitives 4.0.0", "rand 0.8.5", - "sc-authority-discovery", - "sc-network", + "sc-authority-discovery 0.31.0", + "sc-network 0.31.0", "strum", "thiserror", - "tracing-gum", + "tracing-gum 4.0.0", ] [[package]] -name = "polkadot-node-primitives" -version = "4.0.0" +name = "polkadot-node-network-protocol" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e82ee5edac871310bd1ce16a035ad2fc901d6ddd69ea0bbabc7f0a70a02770a" +checksum = "2c53384d262771317827b8839d9b2eff81a9e3d66c815211dcf8312d20ab72c9" dependencies = [ - "bounded-vec", + "async-channel", + "async-trait", + "bitvec", + "derive_more", + "fatality", "futures", + "hex", "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-primitives", - "schnorrkel", - "serde", - "sp-application-crypto", - "sp-consensus-babe", - "sp-core", - "sp-keystore", - "sp-maybe-compressed-blob", - "sp-runtime", - "thiserror", + "polkadot-node-jaeger 6.0.0", + "polkadot-node-primitives 6.0.0", + "polkadot-primitives 6.0.0", + "rand 0.8.5", + "sc-authority-discovery 0.33.0", + "sc-network 0.33.0", + "strum", + "thiserror", + "tracing-gum 6.0.0", +] + +[[package]] +name = "polkadot-node-primitives" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e82ee5edac871310bd1ce16a035ad2fc901d6ddd69ea0bbabc7f0a70a02770a" +dependencies = [ + "bounded-vec", + "futures", + "parity-scale-codec", + "polkadot-parachain-primitives 3.0.0", + "polkadot-primitives 4.0.0", + "schnorrkel 0.9.1", + "serde", + "sp-application-crypto 27.0.0", + "sp-consensus-babe 0.29.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-maybe-compressed-blob 9.0.0", + "sp-runtime 28.0.0", + "thiserror", + "zstd 0.12.4", +] + +[[package]] +name = "polkadot-node-primitives" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90d056deb074d6a97be279fac580210ee847a1d09d9115ad094f83a86c2b6a91" +dependencies = [ + "bitvec", + "bounded-vec", + "futures", + "parity-scale-codec", + "polkadot-parachain-primitives 5.0.0", + "polkadot-primitives 6.0.0", + "schnorrkel 0.9.1", + "serde", + "sp-application-crypto 29.0.0", + "sp-consensus-babe 0.31.0", + "sp-core 27.0.0", + "sp-keystore 0.33.0", + "sp-maybe-compressed-blob 10.0.0", + "sp-runtime 30.0.1", + "thiserror", "zstd 0.12.4", ] @@ -8716,18 +10514,47 @@ dependencies = [ "derive_more", "futures", "orchestra", - "polkadot-node-jaeger", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-primitives", - "polkadot-statement-table", - "sc-client-api", - "sc-network", - "sc-transaction-pool-api", + "polkadot-node-jaeger 4.0.0", + "polkadot-node-network-protocol 4.0.0", + "polkadot-node-primitives 4.0.0", + "polkadot-primitives 4.0.0", + "polkadot-statement-table 4.0.0", + "sc-client-api 25.0.0", + "sc-network 0.31.0", + "sc-transaction-pool-api 25.0.0", + "smallvec", + "sp-api 23.0.0", + "sp-authority-discovery 23.0.0", + "sp-consensus-babe 0.29.0", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "polkadot-node-subsystem-types" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f64090deea91a0cefce3f378fa6a1e901b48852f3ed18ab622271f241fefe1d" +dependencies = [ + "async-trait", + "bitvec", + "derive_more", + "futures", + "orchestra", + "polkadot-node-jaeger 6.0.0", + "polkadot-node-network-protocol 6.0.0", + "polkadot-node-primitives 6.0.0", + "polkadot-primitives 6.0.0", + "polkadot-statement-table 6.0.0", + "sc-client-api 27.0.0", + "sc-network 0.33.0", + "sc-transaction-pool-api 27.0.0", "smallvec", - "sp-api", - "sp-authority-discovery", - "sp-consensus-babe", + "sp-api 25.0.0", + "sp-authority-discovery 25.0.0", + "sp-blockchain 27.0.0", + "sp-consensus-babe 0.31.0", + "sp-runtime 30.0.1", "substrate-prometheus-endpoint", "thiserror", ] @@ -8743,16 +10570,39 @@ dependencies = [ "futures-timer", "orchestra", "parking_lot 0.12.1", - "polkadot-node-metrics", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem-types", - "polkadot-primitives", - "sc-client-api", - "sp-api", - "sp-core", + "polkadot-node-metrics 4.0.0", + "polkadot-node-network-protocol 4.0.0", + "polkadot-node-primitives 4.0.0", + "polkadot-node-subsystem-types 4.0.0", + "polkadot-primitives 4.0.0", + "sc-client-api 25.0.0", + "sp-api 23.0.0", + "sp-core 25.0.0", + "tikv-jemalloc-ctl", + "tracing-gum 4.0.0", +] + +[[package]] +name = "polkadot-overseer" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830258b62d41bdf9cee96bd8377be0697639d766f527af6d8bf507f5ee2db59c" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "orchestra", + "parking_lot 0.12.1", + "polkadot-node-metrics 6.0.0", + "polkadot-node-network-protocol 6.0.0", + "polkadot-node-primitives 6.0.0", + "polkadot-node-subsystem-types 6.0.0", + "polkadot-primitives 6.0.0", + "sc-client-api 27.0.0", + "sp-api 25.0.0", + "sp-core 27.0.0", "tikv-jemalloc-ctl", - "tracing-gum", + "tracing-gum 6.0.0", ] [[package]] @@ -8761,16 +10611,52 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42265630c0c48e25d7ee5a9f4bdcafd003be65c0a44deeb6541620ca169fa519" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.8", + "derive_more", + "frame-support 25.0.0", + "parity-scale-codec", + "polkadot-core-primitives 4.0.0", + "scale-info", + "serde", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "polkadot-parachain-primitives" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b0b8521215ec97799c75a7531c2ac0627fa2b8916fde2bdc6c79bf05b93645" +dependencies = [ + "bounded-collections 0.1.8", + "derive_more", + "parity-scale-codec", + "polkadot-core-primitives 6.0.0", + "scale-info", + "serde", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-weights 26.0.0", +] + +[[package]] +name = "polkadot-parachain-primitives" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248ab090959a92e61493277e33b7e85104280a4beb4cb0815137d3c8c50a07f4" +dependencies = [ + "bounded-collections 0.2.0", "derive_more", - "frame-support", "parity-scale-codec", - "polkadot-core-primitives", + "polkadot-core-primitives 8.0.0", "scale-info", "serde", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-weights 28.0.0", ] [[package]] @@ -8782,22 +10668,76 @@ dependencies = [ "bitvec", "hex-literal", "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", + "polkadot-core-primitives 4.0.0", + "polkadot-parachain-primitives 3.0.0", + "scale-info", + "serde", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-arithmetic 20.0.0", + "sp-authority-discovery 23.0.0", + "sp-consensus-slots 0.29.0", + "sp-core 25.0.0", + "sp-inherents 23.0.0", + "sp-io 27.0.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", + "sp-staking 23.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "polkadot-primitives" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6b60b3e37d83b42f483b2ec9a2a195d83dc7fbfaa57ba1ca9142eec6bf276f" +dependencies = [ + "bitvec", + "hex-literal", + "parity-scale-codec", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", + "scale-info", + "serde", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-arithmetic 22.0.0", + "sp-authority-discovery 25.0.0", + "sp-consensus-slots 0.31.0", + "sp-core 27.0.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-keystore 0.33.0", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", +] + +[[package]] +name = "polkadot-primitives" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f66d047db81997a1ec9526987031b0d8f146edb0bdcdc0f9af73f6a2aa62fbce" +dependencies = [ + "bitvec", + "hex-literal", + "parity-scale-codec", + "polkadot-core-primitives 8.0.0", + "polkadot-parachain-primitives 7.0.0", "scale-info", "serde", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-authority-discovery", - "sp-consensus-slots", - "sp-core", - "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", + "sp-authority-discovery 27.0.0", + "sp-consensus-slots 0.33.0", + "sp-core 29.0.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", + "sp-std 14.0.0", ] [[package]] @@ -8806,40 +10746,40 @@ version = "1.0.0" dependencies = [ "binary-merkle-tree", "bitvec", - "frame-benchmarking", - "frame-election-provider-support", - "frame-executive", + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-executive 27.0.0", "frame-remote-externalities", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-system-benchmarking 27.0.0", + "frame-system-rpc-runtime-api 25.0.0", + "frame-try-runtime 0.33.0", "hex-literal", "log", - "pallet-asset-rate", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", + "pallet-asset-rate 6.0.0", + "pallet-authority-discovery 27.0.0", + "pallet-authorship 27.0.0", + "pallet-babe 27.0.0", "pallet-bags-list", - "pallet-balances", + "pallet-balances 27.0.0", "pallet-beefy", "pallet-beefy-mmr", "pallet-bounties", "pallet-child-bounties", - "pallet-collective", + "pallet-collective 27.0.0", "pallet-conviction-voting", "pallet-democracy", - "pallet-election-provider-multi-phase", - "pallet-election-provider-support-benchmarking", + "pallet-election-provider-multi-phase 26.0.0", + "pallet-election-provider-support-benchmarking 26.0.0", "pallet-elections-phragmen", - "pallet-fast-unstake", + "pallet-fast-unstake 26.0.0", "pallet-grandpa", "pallet-identity", "pallet-im-online", "pallet-indices", - "pallet-membership", - "pallet-message-queue", + "pallet-membership 27.0.0", + "pallet-message-queue 30.0.0", "pallet-mmr", "pallet-multisig", "pallet-nomination-pools", @@ -8848,67 +10788,66 @@ dependencies = [ "pallet-offences", "pallet-offences-benchmarking", "pallet-preimage", - "pallet-proxy", + "pallet-proxy 27.0.0", "pallet-referenda", - "pallet-scheduler", - "pallet-session", + "pallet-scheduler 28.0.0", + "pallet-session 27.0.0", "pallet-session-benchmarking", - "pallet-staking", + "pallet-staking 27.0.0", "pallet-staking-reward-curve", - "pallet-staking-reward-fn", + "pallet-staking-reward-fn 18.0.0", "pallet-staking-runtime-api", - "pallet-timestamp", + "pallet-timestamp 26.0.0", "pallet-tips", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-vesting", + "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment-rpc-runtime-api 27.0.0", + "pallet-treasury 26.0.0", + "pallet-utility 27.0.0", + "pallet-vesting 27.0.0", "pallet-whitelist", - "pallet-xcm", - "pallet-xcm-benchmarks", + "pallet-xcm 6.0.0", + "pallet-xcm-benchmarks 6.0.2", "parity-scale-codec", - "polkadot-primitives", - "polkadot-runtime-common", + "polkadot-primitives 6.0.0", + "polkadot-runtime-common 6.0.0", "polkadot-runtime-constants", - "polkadot-runtime-parachains", + "polkadot-runtime-parachains 6.0.0", "rustc-hex", "scale-info", "separator", "serde", "serde_derive", "serde_json", - "smallvec", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-authority-discovery", - "sp-block-builder", - "sp-consensus-babe", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-arithmetic 22.0.0", + "sp-authority-discovery 25.0.0", + "sp-block-builder 25.0.0", + "sp-consensus-babe 0.31.0", "sp-consensus-beefy", - "sp-core", + "sp-core 27.0.0", "sp-debug-derive 10.0.0", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-keyring", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-keyring 30.0.0", "sp-mmr-primitives", - "sp-npos-elections", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-transaction-pool", - "sp-trie", - "sp-version", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", + "sp-npos-elections 25.0.0", + "sp-offchain 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-staking 25.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-tracing 15.0.0", + "sp-transaction-pool 25.0.0", + "sp-trie 28.0.0", + "sp-version 28.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", "static_assertions", - "substrate-wasm-builder", + "substrate-wasm-builder 16.0.0", "tiny-keccak", "tokio", ] @@ -8920,47 +10859,99 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a788f8ed8b33262c33f72d78e3416c5991e40d333178ae43000a92181ee44bca" dependencies = [ "bitvec", - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-election-provider-support 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "impl-trait-for-tuples", + "libsecp256k1", + "log", + "pallet-asset-rate 4.0.0", + "pallet-authorship 25.0.0", + "pallet-babe 25.0.0", + "pallet-balances 25.0.0", + "pallet-election-provider-multi-phase 24.0.0", + "pallet-fast-unstake 24.0.0", + "pallet-session 25.0.0", + "pallet-staking 25.0.0", + "pallet-staking-reward-fn 16.0.0", + "pallet-timestamp 24.0.0", + "pallet-transaction-payment 25.0.0", + "pallet-treasury 24.0.0", + "pallet-vesting 25.0.0", + "pallet-xcm-benchmarks 4.0.1", + "parity-scale-codec", + "polkadot-primitives 4.0.0", + "polkadot-runtime-parachains 4.0.0", + "rustc-hex", + "scale-info", + "serde", + "serde_derive", + "slot-range-helper 4.0.0", + "sp-api 23.0.0", + "sp-core 25.0.0", + "sp-inherents 23.0.0", + "sp-io 27.0.0", + "sp-npos-elections 23.0.0", + "sp-runtime 28.0.0", + "sp-session 24.0.0", + "sp-staking 23.0.0", + "sp-std 12.0.0", + "staging-xcm 4.0.0", + "staging-xcm-builder 4.0.1", + "staging-xcm-executor 4.0.2", + "static_assertions", +] + +[[package]] +name = "polkadot-runtime-common" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96287e584d1f6a25a9b435d1334287d13da294d85d339ededc7715ce6d5be686" +dependencies = [ + "bitvec", + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "impl-trait-for-tuples", "libsecp256k1", "log", - "pallet-asset-rate", - "pallet-authorship", - "pallet-babe", - "pallet-balances", - "pallet-election-provider-multi-phase", - "pallet-fast-unstake", - "pallet-session", - "pallet-staking", - "pallet-staking-reward-fn", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-treasury", - "pallet-vesting", - "pallet-xcm-benchmarks", - "parity-scale-codec", - "polkadot-primitives", - "polkadot-runtime-parachains", + "pallet-asset-rate 6.0.0", + "pallet-authorship 27.0.0", + "pallet-babe 27.0.0", + "pallet-balances 27.0.0", + "pallet-election-provider-multi-phase 26.0.0", + "pallet-fast-unstake 26.0.0", + "pallet-identity", + "pallet-session 27.0.0", + "pallet-staking 27.0.0", + "pallet-staking-reward-fn 18.0.0", + "pallet-timestamp 26.0.0", + "pallet-transaction-payment 27.0.0", + "pallet-treasury 26.0.0", + "pallet-vesting 27.0.0", + "pallet-xcm-benchmarks 6.0.2", + "parity-scale-codec", + "polkadot-primitives 6.0.0", + "polkadot-runtime-parachains 6.0.0", "rustc-hex", "scale-info", "serde", "serde_derive", - "slot-range-helper", - "sp-api", - "sp-core", - "sp-inherents", - "sp-io", - "sp-npos-elections", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", + "slot-range-helper 6.0.0", + "sp-api 25.0.0", + "sp-core 27.0.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-npos-elections 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-staking 25.0.0", + "sp-std 13.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", "static_assertions", ] @@ -8968,14 +10959,14 @@ dependencies = [ name = "polkadot-runtime-constants" version = "1.0.0" dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", + "frame-support 27.0.0", + "polkadot-primitives 6.0.0", + "polkadot-runtime-common 6.0.0", "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", - "staging-xcm", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-weights 26.0.0", + "staging-xcm 6.0.0", ] [[package]] @@ -8985,11 +10976,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfe45b01d9d621174c9c0eef0871aeead5986393838206fe58df3ae414bcb8d2" dependencies = [ "bs58 0.5.0", - "frame-benchmarking", + "frame-benchmarking 25.0.0", + "parity-scale-codec", + "polkadot-primitives 4.0.0", + "sp-std 12.0.0", + "sp-tracing 14.0.0", +] + +[[package]] +name = "polkadot-runtime-metrics" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "416d2a4a0c3792669984484d5fe831f20dea9ab734b00befbb0250f992144be6" +dependencies = [ + "bs58 0.5.0", + "frame-benchmarking 27.0.0", "parity-scale-codec", - "polkadot-primitives", - "sp-std", - "sp-tracing", + "polkadot-primitives 6.0.0", + "sp-std 13.0.0", + "sp-tracing 15.0.0", ] [[package]] @@ -9001,43 +11006,91 @@ dependencies = [ "bitflags 1.3.2", "bitvec", "derive_more", - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "impl-trait-for-tuples", + "log", + "pallet-authority-discovery 25.0.0", + "pallet-authorship 25.0.0", + "pallet-babe 25.0.0", + "pallet-balances 25.0.0", + "pallet-message-queue 28.0.0", + "pallet-session 25.0.0", + "pallet-staking 25.0.0", + "pallet-timestamp 24.0.0", + "pallet-vesting 25.0.0", + "parity-scale-codec", + "polkadot-core-primitives 4.0.0", + "polkadot-parachain-primitives 3.0.0", + "polkadot-primitives 4.0.0", + "polkadot-runtime-metrics 4.0.0", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rustc-hex", + "scale-info", + "serde", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-core 25.0.0", + "sp-inherents 23.0.0", + "sp-io 27.0.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", + "sp-session 24.0.0", + "sp-staking 23.0.0", + "sp-std 12.0.0", + "staging-xcm 4.0.0", + "staging-xcm-executor 4.0.2", + "static_assertions", +] + +[[package]] +name = "polkadot-runtime-parachains" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c00498f856712916e54ef1c214fa8fa6cab193497b0ab99f2a79eff6525596" +dependencies = [ + "bitflags 1.3.2", + "bitvec", + "derive_more", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "impl-trait-for-tuples", "log", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-balances", - "pallet-message-queue", - "pallet-session", - "pallet-staking", - "pallet-timestamp", - "pallet-vesting", - "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-primitives", - "polkadot-runtime-metrics", + "pallet-authority-discovery 27.0.0", + "pallet-authorship 27.0.0", + "pallet-babe 27.0.0", + "pallet-balances 27.0.0", + "pallet-message-queue 30.0.0", + "pallet-session 27.0.0", + "pallet-staking 27.0.0", + "pallet-timestamp 26.0.0", + "pallet-vesting 27.0.0", + "parity-scale-codec", + "polkadot-core-primitives 6.0.0", + "polkadot-parachain-primitives 5.0.0", + "polkadot-primitives 6.0.0", + "polkadot-runtime-metrics 6.0.0", "rand 0.8.5", "rand_chacha 0.3.1", "rustc-hex", "scale-info", "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "sp-tracing", - "staging-xcm", - "staging-xcm-executor", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-core 27.0.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-keystore 0.33.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-staking 25.0.0", + "sp-std 13.0.0", + "sp-tracing 15.0.0", + "staging-xcm 6.0.0", + "staging-xcm-executor 6.0.2", "static_assertions", ] @@ -9048,8 +11101,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22b2a11cb8871f7e30a8f5e455c92d19a186065644ee00f9acda550ff89dacce" dependencies = [ "parity-scale-codec", - "polkadot-primitives", - "sp-core", + "polkadot-primitives 4.0.0", + "sp-core 25.0.0", +] + +[[package]] +name = "polkadot-statement-table" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e90105dd6e7a739ba7a91d26156daa143b99c058dd4df101664ea77ced14faf" +dependencies = [ + "parity-scale-codec", + "polkadot-primitives 6.0.0", + "sp-core 27.0.0", ] [[package]] @@ -9208,14 +11272,22 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" dependencies = [ - "toml_datetime", "toml_edit 0.20.2", ] +[[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]] name = "proc-macro-error" version = "1.0.4" @@ -9303,6 +11375,26 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.4.0", + "lazy_static", + "num-traits", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax 0.8.2", + "rusty-fork", + "tempfile", + "unarray", +] + [[package]] name = "prost" version = "0.11.9" @@ -9528,6 +11620,15 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -9686,6 +11787,12 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + [[package]] name = "resolv-conf" version = "0.7.0" @@ -9732,6 +11839,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "rlp" version = "0.5.2" @@ -9758,14 +11874,30 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "272eaa4f1b4b5357d89d1f8f504cb5ee81a105bf7e5c295f053c6e521f2a199b" dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", + "frame-support 25.0.0", + "polkadot-primitives 4.0.0", + "polkadot-runtime-common 4.0.0", + "smallvec", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-weights 24.0.0", + "staging-xcm 4.0.0", +] + +[[package]] +name = "rococo-runtime-constants" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96315fe3c89019f13bf11c438bafd4bb96b510945cea5342267c4498633b4387" +dependencies = [ + "frame-support 27.0.0", + "polkadot-primitives 6.0.0", + "polkadot-runtime-common 6.0.0", "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", - "staging-xcm", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-weights 26.0.0", + "staging-xcm 6.0.0", ] [[package]] @@ -9829,6 +11961,36 @@ dependencies = [ "webrtc-util", ] +[[package]] +name = "ruint" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608a5726529f2f0ef81b8fde9873c4bb829d6b5b5ca6be4d97345ddf0749c825" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand 0.8.5", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e666a5496a0b2186dbcd0ff6106e29e093c15591bde62c20d3842007c6978a09" + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -9856,6 +12018,15 @@ dependencies = [ "semver 0.9.0", ] +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + [[package]] name = "rustc_version" version = "0.4.0" @@ -9999,6 +12170,18 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -10050,8 +12233,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66b4c5976a9cff7fcf24c946276a62ea7837862b6f3bf9f8011f08faf4f08474" dependencies = [ "log", - "sp-core", - "sp-wasm-interface", + "sp-core 25.0.0", + "sp-wasm-interface 18.0.0", + "thiserror", +] + +[[package]] +name = "sc-allocator" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79ad8791d398db62202f541849b3260ad5c9cf20a1982e3f4ad92f9a629ade76" +dependencies = [ + "log", + "sp-core 27.0.0", + "sp-wasm-interface 19.0.0", "thiserror", ] @@ -10067,37 +12262,83 @@ dependencies = [ "ip_network", "libp2p", "log", - "multihash", + "multihash 0.17.0", "parity-scale-codec", "prost", "prost-build", "rand 0.8.5", - "sc-client-api", - "sc-network", - "sp-api", - "sp-authority-discovery", - "sp-blockchain", - "sp-core", - "sp-keystore", - "sp-runtime", + "sc-client-api 25.0.0", + "sc-network 0.31.0", + "sp-api 23.0.0", + "sp-authority-discovery 23.0.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", "substrate-prometheus-endpoint", "thiserror", ] [[package]] -name = "sc-block-builder" -version = "0.30.0" +name = "sc-authority-discovery" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e563c043124ee28a6723ac320a1aba80283932e8ba34faa7ef427331961780" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "ip_network", + "libp2p", + "log", + "multihash 0.18.1", + "multihash-codetable", + "parity-scale-codec", + "prost", + "prost-build", + "rand 0.8.5", + "sc-client-api 27.0.0", + "sc-network 0.33.0", + "sp-api 25.0.0", + "sp-authority-discovery 25.0.0", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-keystore 0.33.0", + "sp-runtime 30.0.1", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "sc-block-builder" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d3999b9b758c09a6c1155e481b683ee87712f071cc5a0679f9ee4906a14a404" dependencies = [ "parity-scale-codec", - "sc-client-api", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-core", - "sp-inherents", - "sp-runtime", + "sc-client-api 25.0.0", + "sp-api 23.0.0", + "sp-block-builder 23.0.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-inherents 23.0.0", + "sp-runtime 28.0.0", +] + +[[package]] +name = "sc-block-builder" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b900efcf276c61da505e20ac275b2bae8f03b8ceba20dc7e276edec12ca49355" +dependencies = [ + "parity-scale-codec", + "sp-api 25.0.0", + "sp-block-builder 25.0.0", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-inherents 25.0.0", + "sp-runtime 30.0.1", + "sp-trie 28.0.0", ] [[package]] @@ -10108,16 +12349,42 @@ checksum = "ec7e711ea9870d3fb8e2a3ea5b601a9e20c63d0d2f457f40146407721e246a77" dependencies = [ "memmap2", "sc-chain-spec-derive", - "sc-client-api", - "sc-executor", - "sc-network", - "sc-telemetry", + "sc-client-api 25.0.0", + "sc-executor 0.29.0", + "sc-network 0.31.0", + "sc-telemetry 12.0.0", + "serde", + "serde_json", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", +] + +[[package]] +name = "sc-chain-spec" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31471216bdcef2195151d1e3324ec6fd09a6d87b306a15fae4590c0675f0d4c1" +dependencies = [ + "array-bytes 6.1.0", + "docify", + "log", + "memmap2", + "parity-scale-codec", + "sc-chain-spec-derive", + "sc-client-api 27.0.0", + "sc-executor 0.31.0", + "sc-network 0.33.0", + "sc-telemetry 14.0.0", "serde", "serde_json", - "sp-blockchain", - "sp-core", - "sp-runtime", - "sp-state-machine", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-genesis-builder 0.6.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", ] [[package]] @@ -10141,7 +12408,7 @@ dependencies = [ "array-bytes 6.1.0", "chrono", "clap", - "fdlimit", + "fdlimit 0.2.1", "futures", "libp2p-identity", "log", @@ -10150,29 +12417,71 @@ dependencies = [ "rand 0.8.5", "regex", "rpassword", - "sc-client-api", - "sc-client-db", - "sc-keystore", - "sc-mixnet", - "sc-network", - "sc-service", - "sc-telemetry", - "sc-tracing", - "sc-utils", + "sc-client-api 25.0.0", + "sc-client-db 0.32.0", + "sc-keystore 22.0.0", + "sc-mixnet 0.1.0", + "sc-network 0.31.0", + "sc-service 0.32.0", + "sc-telemetry 12.0.0", + "sc-tracing 25.0.0", + "sc-utils 11.0.0", "serde", "serde_json", - "sp-blockchain", - "sp-core", - "sp-keyring", - "sp-keystore", - "sp-panic-handler", - "sp-runtime", - "sp-version", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-keyring 28.0.0", + "sp-keystore 0.31.0", + "sp-panic-handler 12.0.0", + "sp-runtime 28.0.0", + "sp-version 26.0.0", "thiserror", "tiny-bip39", "tokio", ] +[[package]] +name = "sc-cli" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e59c23e005876d2eca1e90ae2deaf85b4c78861f21b9fc3caf6535ca19f6ad9" +dependencies = [ + "array-bytes 6.1.0", + "bip39", + "chrono", + "clap", + "fdlimit 0.3.0", + "futures", + "itertools 0.10.5", + "libp2p-identity", + "log", + "names", + "parity-scale-codec", + "rand 0.8.5", + "regex", + "rpassword", + "sc-client-api 27.0.0", + "sc-client-db 0.34.0", + "sc-keystore 24.0.0", + "sc-mixnet 0.3.0", + "sc-network 0.33.0", + "sc-service 0.34.0", + "sc-telemetry 14.0.0", + "sc-tracing 27.0.0", + "sc-utils 13.0.0", + "serde", + "serde_json", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-keyring 30.0.0", + "sp-keystore 0.33.0", + "sp-panic-handler 12.0.0", + "sp-runtime 30.0.1", + "sp-version 28.0.0", + "thiserror", + "tokio", +] + [[package]] name = "sc-client-api" version = "25.0.0" @@ -10184,20 +12493,48 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sc-executor", - "sc-transaction-pool-api", - "sc-utils", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", + "sc-executor 0.29.0", + "sc-transaction-pool-api 25.0.0", + "sc-utils 11.0.0", + "sp-api 23.0.0", + "sp-blockchain 25.0.0", + "sp-consensus 0.29.0", + "sp-core 25.0.0", "sp-database", - "sp-externalities", - "sp-runtime", - "sp-state-machine", - "sp-statement-store", - "sp-storage", - "sp-trie", + "sp-externalities 0.23.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "sp-statement-store 7.0.0", + "sp-storage 17.0.0", + "sp-trie 26.0.0", + "substrate-prometheus-endpoint", +] + +[[package]] +name = "sc-client-api" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9eb785ab5be9a6cacc3cebf137539d66cd9fb05d5472d4aa4aa83f65004c799" +dependencies = [ + "fnv", + "futures", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-executor 0.31.0", + "sc-transaction-pool-api 27.0.0", + "sc-utils 13.0.0", + "sp-api 25.0.0", + "sp-blockchain 27.0.0", + "sp-consensus 0.31.0", + "sp-core 27.0.0", + "sp-database", + "sp-externalities 0.24.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "sp-statement-store 9.0.0", + "sp-storage 18.0.0", + "sp-trie 28.0.0", "substrate-prometheus-endpoint", ] @@ -10216,16 +12553,43 @@ dependencies = [ "parity-db", "parity-scale-codec", "parking_lot 0.12.1", - "sc-client-api", - "sc-state-db", + "sc-client-api 25.0.0", + "sc-state-db 0.27.0", + "schnellru", + "sp-arithmetic 20.0.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-database", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "sp-trie 26.0.0", +] + +[[package]] +name = "sc-client-db" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2ca0a8a26eeb09988245f44c78552e0dc5b2f3945d1495ee711bbbf71bc2d2a" +dependencies = [ + "hash-db", + "kvdb", + "kvdb-memorydb", + "kvdb-rocksdb", + "linked-hash-map", + "log", + "parity-db", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api 27.0.0", + "sc-state-db 0.29.0", "schnellru", - "sp-arithmetic", - "sp-blockchain", - "sp-core", + "sp-arithmetic 22.0.0", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", "sp-database", - "sp-runtime", - "sp-state-machine", - "sp-trie", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "sp-trie 28.0.0", ] [[package]] @@ -10241,24 +12605,50 @@ dependencies = [ "log", "mockall", "parking_lot 0.12.1", - "sc-client-api", - "sc-utils", - "serde", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-runtime", - "sp-state-machine", + "sc-client-api 25.0.0", + "sc-utils 11.0.0", + "serde", + "sp-api 23.0.0", + "sp-blockchain 25.0.0", + "sp-consensus 0.29.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "sc-consensus" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe8204108702ac2f35ed3a541e00aae4656c7591cad6fff33bcc6e7774fc9607" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "libp2p-identity", + "log", + "mockall", + "parking_lot 0.12.1", + "sc-client-api 27.0.0", + "sc-utils 13.0.0", + "serde", + "sp-api 25.0.0", + "sp-blockchain 27.0.0", + "sp-consensus 0.31.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "sc-consensus-grandpa" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cbc5db21ea2c4ba65b23315e73e69e8155630fb47c84b93d40b0e759c9d86d" +checksum = "923ca35a57239e8d25f458d8edd075e1c051d64e388963b497fd5d8ab005f2c7" dependencies = [ "ahash 0.8.8", "array-bytes 6.1.0", @@ -10272,26 +12662,27 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "rand 0.8.5", - "sc-block-builder", - "sc-chain-spec", - "sc-client-api", - "sc-consensus", - "sc-network", - "sc-network-common", + "sc-block-builder 0.32.0", + "sc-chain-spec 26.0.0", + "sc-client-api 27.0.0", + "sc-consensus 0.32.0", + "sc-network 0.33.0", + "sc-network-common 0.32.0", "sc-network-gossip", - "sc-telemetry", - "sc-transaction-pool-api", - "sc-utils", + "sc-network-sync 0.32.0", + "sc-telemetry 14.0.0", + "sc-transaction-pool-api 27.0.0", + "sc-utils 13.0.0", "serde_json", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", - "sp-consensus-grandpa", - "sp-core", - "sp-keystore", - "sp-runtime", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-arithmetic 22.0.0", + "sp-blockchain 27.0.0", + "sp-consensus 0.31.0", + "sp-consensus-grandpa 12.0.0", + "sp-core 27.0.0", + "sp-keystore 0.33.0", + "sp-runtime 30.0.1", "substrate-prometheus-endpoint", "thiserror", ] @@ -10304,18 +12695,41 @@ checksum = "225f2ad733bc7234a6638d5203624194824b2f78ab631bc911223f536a66b9c8" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "sc-executor-common", - "sc-executor-wasmtime", + "sc-executor-common 0.26.0", + "sc-executor-wasmtime 0.26.0", + "schnellru", + "sp-api 23.0.0", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-io 27.0.0", + "sp-panic-handler 12.0.0", + "sp-runtime-interface 21.0.0", + "sp-trie 26.0.0", + "sp-version 26.0.0", + "sp-wasm-interface 18.0.0", + "tracing", +] + +[[package]] +name = "sc-executor" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eea713755b62067b9c223cef0525b6a88336ca6658fe0ed38340d8cad4963af5" +dependencies = [ + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-executor-common 0.28.0", + "sc-executor-wasmtime 0.28.0", "schnellru", - "sp-api", - "sp-core", - "sp-externalities", - "sp-io", - "sp-panic-handler", - "sp-runtime-interface", - "sp-trie", - "sp-version", - "sp-wasm-interface", + "sp-api 25.0.0", + "sp-core 27.0.0", + "sp-externalities 0.24.0", + "sp-io 29.0.0", + "sp-panic-handler 12.0.0", + "sp-runtime-interface 23.0.0", + "sp-trie 28.0.0", + "sp-version 28.0.0", + "sp-wasm-interface 19.0.0", "tracing", ] @@ -10325,9 +12739,22 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "169c1cfe81ba0e0d44ab4ada1600e30b6a9de588c792db73e32a854a6e3e1a87" dependencies = [ - "sc-allocator", - "sp-maybe-compressed-blob", - "sp-wasm-interface", + "sc-allocator 20.0.0", + "sp-maybe-compressed-blob 9.0.0", + "sp-wasm-interface 18.0.0", + "thiserror", + "wasm-instrument", +] + +[[package]] +name = "sc-executor-common" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40d0fdbc88edc041b64891c7162e02f062baa699212395db0615bd9bdcda0dd7" +dependencies = [ + "sc-allocator 22.0.0", + "sp-maybe-compressed-blob 10.0.0", + "sp-wasm-interface 19.0.0", "thiserror", "wasm-instrument", ] @@ -10344,10 +12771,29 @@ dependencies = [ "log", "parking_lot 0.12.1", "rustix 0.36.15", - "sc-allocator", - "sc-executor-common", - "sp-runtime-interface", - "sp-wasm-interface", + "sc-allocator 20.0.0", + "sc-executor-common 0.26.0", + "sp-runtime-interface 21.0.0", + "sp-wasm-interface 18.0.0", + "wasmtime", +] + +[[package]] +name = "sc-executor-wasmtime" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13a935fc2a7e8e7a7fb4fe7bc15d5be9b52a101f921867703c81a7d02a821f86" +dependencies = [ + "anyhow", + "cfg-if", + "libc", + "log", + "parking_lot 0.12.1", + "rustix 0.36.15", + "sc-allocator 22.0.0", + "sc-executor-common 0.28.0", + "sp-runtime-interface 23.0.0", + "sp-wasm-interface 19.0.0", "wasmtime", ] @@ -10361,11 +12807,29 @@ dependencies = [ "futures", "futures-timer", "log", - "sc-client-api", - "sc-network", - "sc-network-common", - "sp-blockchain", - "sp-runtime", + "sc-client-api 25.0.0", + "sc-network 0.31.0", + "sc-network-common 0.30.0", + "sp-blockchain 25.0.0", + "sp-runtime 28.0.0", +] + +[[package]] +name = "sc-informant" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fd39dfdb19ade5fd05d0646adc4cbadc3c89fbe270dcc7d33b7d496366cd784" +dependencies = [ + "ansi_term", + "futures", + "futures-timer", + "log", + "sc-client-api 27.0.0", + "sc-network 0.33.0", + "sc-network-common 0.32.0", + "sc-network-sync 0.32.0", + "sp-blockchain 27.0.0", + "sp-runtime 30.0.1", ] [[package]] @@ -10377,9 +12841,24 @@ dependencies = [ "array-bytes 6.1.0", "parking_lot 0.12.1", "serde_json", - "sp-application-crypto", - "sp-core", - "sp-keystore", + "sp-application-crypto 27.0.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "thiserror", +] + +[[package]] +name = "sc-keystore" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efa306595e3491e73d9b8291c2e3a6c8ea06fe05d1bacd29365fcbd2e9430ad" +dependencies = [ + "array-bytes 6.1.0", + "parking_lot 0.12.1", + "serde_json", + "sp-application-crypto 29.0.0", + "sp-core 27.0.0", + "sp-keystore 0.33.0", "thiserror", ] @@ -10400,15 +12879,45 @@ dependencies = [ "multiaddr", "parity-scale-codec", "parking_lot 0.12.1", - "sc-client-api", - "sc-network", - "sc-transaction-pool-api", - "sp-api", - "sp-consensus", - "sp-core", - "sp-keystore", - "sp-mixnet", - "sp-runtime", + "sc-client-api 25.0.0", + "sc-network 0.31.0", + "sc-transaction-pool-api 25.0.0", + "sp-api 23.0.0", + "sp-consensus 0.29.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-mixnet 0.1.0", + "sp-runtime 28.0.0", + "thiserror", +] + +[[package]] +name = "sc-mixnet" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df018e1c19855361b958d205cf075b8093f394a67cd337eb4413989d8766abe4" +dependencies = [ + "array-bytes 4.2.0", + "arrayvec 0.7.4", + "blake2 0.10.6", + "bytes", + "futures", + "futures-timer", + "libp2p-identity", + "log", + "mixnet", + "multiaddr", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api 27.0.0", + "sc-network 0.33.0", + "sc-transaction-pool-api 27.0.0", + "sp-api 25.0.0", + "sp-consensus 0.31.0", + "sp-core 27.0.0", + "sp-keystore 0.33.0", + "sp-mixnet 0.3.0", + "sp-runtime 30.0.1", "thiserror", ] @@ -10437,16 +12946,16 @@ dependencies = [ "partial_sort", "pin-project", "rand 0.8.5", - "sc-client-api", - "sc-network-common", - "sc-utils", + "sc-client-api 25.0.0", + "sc-network-common 0.30.0", + "sc-utils 11.0.0", "serde", "serde_json", "smallvec", - "sp-arithmetic", - "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-arithmetic 20.0.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint", @@ -10454,6 +12963,50 @@ dependencies = [ "zeroize", ] +[[package]] +name = "sc-network" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abc4093ac710df0daa0dde6ea3613ecf391695e321923c9bb270eebd5c070bf2" +dependencies = [ + "array-bytes 6.1.0", + "async-channel", + "async-trait", + "asynchronous-codec", + "bytes", + "either", + "fnv", + "futures", + "futures-timer", + "ip_network", + "libp2p", + "linked_hash_set", + "log", + "mockall", + "parity-scale-codec", + "parking_lot 0.12.1", + "partial_sort", + "pin-project", + "rand 0.8.5", + "sc-client-api 27.0.0", + "sc-network-common 0.32.0", + "sc-utils 13.0.0", + "serde", + "serde_json", + "smallvec", + "sp-arithmetic 22.0.0", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "substrate-prometheus-endpoint", + "thiserror", + "tokio", + "tokio-stream", + "unsigned-varint", + "wasm-timer", + "zeroize", +] + [[package]] name = "sc-network-bitswap" version = "0.30.0" @@ -10467,10 +13020,31 @@ dependencies = [ "log", "prost", "prost-build", - "sc-client-api", - "sc-network", - "sp-blockchain", - "sp-runtime", + "sc-client-api 25.0.0", + "sc-network 0.31.0", + "sp-blockchain 25.0.0", + "sp-runtime 28.0.0", + "thiserror", + "unsigned-varint", +] + +[[package]] +name = "sc-network-bitswap" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae68646fa90d2b93bd02be2e16eb46673e6cc863c83ebe04be54a10cf0c7cb6" +dependencies = [ + "async-channel", + "cid", + "futures", + "libp2p-identity", + "log", + "prost", + "prost-build", + "sc-client-api 27.0.0", + "sc-network 0.33.0", + "sp-blockchain 27.0.0", + "sp-runtime 30.0.1", "thiserror", "unsigned-varint", ] @@ -10487,28 +13061,47 @@ dependencies = [ "libp2p-identity", "parity-scale-codec", "prost-build", - "sc-consensus", - "sp-consensus", - "sp-consensus-grandpa", - "sp-runtime", + "sc-consensus 0.30.0", + "sp-consensus 0.29.0", + "sp-consensus-grandpa 10.0.0", + "sp-runtime 28.0.0", ] [[package]] -name = "sc-network-gossip" -version = "0.31.0" +name = "sc-network-common" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b884a9f7cd348c4c1899c0bbf95237e39dffba4baec48d4b98c1046f6bb04fa5" +checksum = "d62375edb2146c538166886ae09662b62b7205085826f276da49a11be278d905" dependencies = [ - "ahash 0.8.8", + "async-trait", + "bitflags 1.3.2", "futures", - "futures-timer", - "libp2p", - "log", - "sc-network", - "sc-network-common", - "schnellru", - "sp-runtime", - "substrate-prometheus-endpoint", + "libp2p-identity", + "parity-scale-codec", + "prost-build", + "sc-consensus 0.32.0", + "sp-consensus 0.31.0", + "sp-consensus-grandpa 12.0.0", + "sp-runtime 30.0.1", +] + +[[package]] +name = "sc-network-gossip" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc9f9e0267f58062280f7249eea969a0c9f479c9ad08049ffb39a6f88e515a34" +dependencies = [ + "ahash 0.8.8", + "futures", + "futures-timer", + "libp2p", + "log", + "sc-network 0.33.0", + "sc-network-common 0.32.0", + "sc-network-sync 0.32.0", + "schnellru", + "sp-runtime 30.0.1", + "substrate-prometheus-endpoint", "tracing", ] @@ -10526,11 +13119,33 @@ dependencies = [ "parity-scale-codec", "prost", "prost-build", - "sc-client-api", - "sc-network", - "sp-blockchain", - "sp-core", - "sp-runtime", + "sc-client-api 25.0.0", + "sc-network 0.31.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "thiserror", +] + +[[package]] +name = "sc-network-light" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a97885f6b4b2b5b01c47061c0e8cca10bd20599e6fd48f28044792077e82a7" +dependencies = [ + "array-bytes 6.1.0", + "async-channel", + "futures", + "libp2p-identity", + "log", + "parity-scale-codec", + "prost", + "prost-build", + "sc-client-api 27.0.0", + "sc-network 0.33.0", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", "thiserror", ] @@ -10552,21 +13167,58 @@ dependencies = [ "parity-scale-codec", "prost", "prost-build", - "sc-client-api", - "sc-consensus", - "sc-network", - "sc-network-common", - "sc-utils", + "sc-client-api 25.0.0", + "sc-consensus 0.30.0", + "sc-network 0.31.0", + "sc-network-common 0.30.0", + "sc-utils 11.0.0", + "schnellru", + "smallvec", + "sp-arithmetic 20.0.0", + "sp-blockchain 25.0.0", + "sp-consensus 0.29.0", + "sp-consensus-grandpa 10.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "substrate-prometheus-endpoint", + "thiserror", + "tokio-stream", +] + +[[package]] +name = "sc-network-sync" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd7645483f69449667520359d6518320a2a938d7ef9f03037486b489cc597896" +dependencies = [ + "array-bytes 6.1.0", + "async-channel", + "async-trait", + "fork-tree", + "futures", + "futures-timer", + "libp2p", + "log", + "mockall", + "parity-scale-codec", + "prost", + "prost-build", + "sc-client-api 27.0.0", + "sc-consensus 0.32.0", + "sc-network 0.33.0", + "sc-network-common 0.32.0", + "sc-utils 13.0.0", "schnellru", "smallvec", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", - "sp-consensus-grandpa", - "sp-core", - "sp-runtime", + "sp-arithmetic 22.0.0", + "sp-blockchain 27.0.0", + "sp-consensus 0.31.0", + "sp-consensus-grandpa 12.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", "substrate-prometheus-endpoint", "thiserror", + "tokio", "tokio-stream", ] @@ -10581,11 +13233,31 @@ dependencies = [ "libp2p", "log", "parity-scale-codec", - "sc-network", - "sc-network-common", - "sc-utils", - "sp-consensus", - "sp-runtime", + "sc-network 0.31.0", + "sc-network-common 0.30.0", + "sc-utils 11.0.0", + "sp-consensus 0.29.0", + "sp-runtime 28.0.0", + "substrate-prometheus-endpoint", +] + +[[package]] +name = "sc-network-transactions" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b9a513f519b781ec238a7f33b4f71ca6333c9d3f175ca7b7850fb8ab266869" +dependencies = [ + "array-bytes 6.1.0", + "futures", + "libp2p", + "log", + "parity-scale-codec", + "sc-network 0.33.0", + "sc-network-common 0.32.0", + "sc-network-sync 0.32.0", + "sc-utils 13.0.0", + "sp-consensus 0.31.0", + "sp-runtime 30.0.1", "substrate-prometheus-endpoint", ] @@ -10600,25 +13272,58 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sc-block-builder", - "sc-chain-spec", - "sc-client-api", - "sc-mixnet", - "sc-rpc-api", - "sc-tracing", - "sc-transaction-pool-api", - "sc-utils", + "sc-block-builder 0.30.0", + "sc-chain-spec 24.0.0", + "sc-client-api 25.0.0", + "sc-mixnet 0.1.0", + "sc-rpc-api 0.30.0", + "sc-tracing 25.0.0", + "sc-transaction-pool-api 25.0.0", + "sc-utils 11.0.0", + "serde_json", + "sp-api 23.0.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-offchain 23.0.0", + "sp-rpc 23.0.0", + "sp-runtime 28.0.0", + "sp-session 24.0.0", + "sp-statement-store 7.0.0", + "sp-version 26.0.0", + "tokio", +] + +[[package]] +name = "sc-rpc" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a1251123e0fad557607750da1b000c062ee193fad86369e6a90ab2e6e0b4e13" +dependencies = [ + "futures", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-block-builder 0.32.0", + "sc-chain-spec 26.0.0", + "sc-client-api 27.0.0", + "sc-mixnet 0.3.0", + "sc-rpc-api 0.32.0", + "sc-tracing 27.0.0", + "sc-transaction-pool-api 27.0.0", + "sc-utils 13.0.0", "serde_json", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-keystore", - "sp-offchain", - "sp-rpc", - "sp-runtime", - "sp-session", - "sp-statement-store", - "sp-version", + "sp-api 25.0.0", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-keystore 0.33.0", + "sp-offchain 25.0.0", + "sp-rpc 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-statement-store 9.0.0", + "sp-version 28.0.0", "tokio", ] @@ -10630,16 +13335,37 @@ checksum = "def499ac717db8442fe18543e52330d5f105027b666df73c0b38e81e9105078b" dependencies = [ "jsonrpsee", "parity-scale-codec", - "sc-chain-spec", - "sc-mixnet", - "sc-transaction-pool-api", + "sc-chain-spec 24.0.0", + "sc-mixnet 0.1.0", + "sc-transaction-pool-api 25.0.0", + "scale-info", + "serde", + "serde_json", + "sp-core 25.0.0", + "sp-rpc 23.0.0", + "sp-runtime 28.0.0", + "sp-version 26.0.0", + "thiserror", +] + +[[package]] +name = "sc-rpc-api" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ceef96e1df9b6f2db3d5ff8703dd79ce96bf0aa6d53b17fb1ee774a73e88ba" +dependencies = [ + "jsonrpsee", + "parity-scale-codec", + "sc-chain-spec 26.0.0", + "sc-mixnet 0.3.0", + "sc-transaction-pool-api 27.0.0", "scale-info", "serde", "serde_json", - "sp-core", - "sp-rpc", - "sp-runtime", - "sp-version", + "sp-core 27.0.0", + "sp-rpc 25.0.0", + "sp-runtime 30.0.1", + "sp-version 28.0.0", "thiserror", ] @@ -10673,16 +13399,46 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sc-chain-spec", - "sc-client-api", - "sc-transaction-pool-api", - "sc-utils", + "sc-chain-spec 24.0.0", + "sc-client-api 25.0.0", + "sc-transaction-pool-api 25.0.0", + "sc-utils 11.0.0", + "serde", + "sp-api 23.0.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-version 26.0.0", + "thiserror", + "tokio", + "tokio-stream", +] + +[[package]] +name = "sc-rpc-spec-v2" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9112cc7f746672f8080bafcb34c970e36db765f852f449b1e1640d44fe5fdc7d" +dependencies = [ + "array-bytes 6.1.0", + "futures", + "futures-util", + "hex", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-chain-spec 26.0.0", + "sc-client-api 27.0.0", + "sc-transaction-pool-api 27.0.0", + "sc-utils 13.0.0", "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-runtime", - "sp-version", + "sp-api 25.0.0", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-rpc 25.0.0", + "sp-runtime 30.0.1", + "sp-version 28.0.0", "thiserror", "tokio", "tokio-stream", @@ -10705,45 +13461,109 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "rand 0.8.5", - "sc-block-builder", - "sc-chain-spec", - "sc-client-api", - "sc-client-db", - "sc-consensus", - "sc-executor", - "sc-informant", - "sc-keystore", - "sc-network", - "sc-network-bitswap", - "sc-network-common", - "sc-network-light", - "sc-network-sync", - "sc-network-transactions", - "sc-rpc", + "sc-block-builder 0.30.0", + "sc-chain-spec 24.0.0", + "sc-client-api 25.0.0", + "sc-client-db 0.32.0", + "sc-consensus 0.30.0", + "sc-executor 0.29.0", + "sc-informant 0.30.0", + "sc-keystore 22.0.0", + "sc-network 0.31.0", + "sc-network-bitswap 0.30.0", + "sc-network-common 0.30.0", + "sc-network-light 0.30.0", + "sc-network-sync 0.30.0", + "sc-network-transactions 0.30.0", + "sc-rpc 26.0.0", + "sc-rpc-server", + "sc-rpc-spec-v2 0.31.0", + "sc-sysinfo 24.0.0", + "sc-telemetry 12.0.0", + "sc-tracing 25.0.0", + "sc-transaction-pool 25.0.0", + "sc-transaction-pool-api 25.0.0", + "sc-utils 11.0.0", + "serde", + "serde_json", + "sp-api 23.0.0", + "sp-blockchain 25.0.0", + "sp-consensus 0.29.0", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", + "sp-session 24.0.0", + "sp-state-machine 0.32.0", + "sp-storage 17.0.0", + "sp-transaction-pool 23.0.0", + "sp-transaction-storage-proof 23.0.0", + "sp-trie 26.0.0", + "sp-version 26.0.0", + "static_init", + "substrate-prometheus-endpoint", + "tempfile", + "thiserror", + "tokio", + "tracing", + "tracing-futures", +] + +[[package]] +name = "sc-service" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e21ba254620ee66bec56f2e7e93f4ed2a492da50009a09e524bfd21a5fdcb30" +dependencies = [ + "async-trait", + "directories", + "exit-future", + "futures", + "futures-timer", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "pin-project", + "rand 0.8.5", + "sc-chain-spec 26.0.0", + "sc-client-api 27.0.0", + "sc-client-db 0.34.0", + "sc-consensus 0.32.0", + "sc-executor 0.31.0", + "sc-informant 0.32.0", + "sc-keystore 24.0.0", + "sc-network 0.33.0", + "sc-network-bitswap 0.32.0", + "sc-network-common 0.32.0", + "sc-network-light 0.32.0", + "sc-network-sync 0.32.0", + "sc-network-transactions 0.32.0", + "sc-rpc 28.0.0", "sc-rpc-server", - "sc-rpc-spec-v2", - "sc-sysinfo", - "sc-telemetry", - "sc-tracing", - "sc-transaction-pool", - "sc-transaction-pool-api", - "sc-utils", + "sc-rpc-spec-v2 0.33.0", + "sc-sysinfo 26.0.0", + "sc-telemetry 14.0.0", + "sc-tracing 27.0.0", + "sc-transaction-pool 27.0.0", + "sc-transaction-pool-api 27.0.0", + "sc-utils 13.0.0", "serde", "serde_json", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-externalities", - "sp-keystore", - "sp-runtime", - "sp-session", - "sp-state-machine", - "sp-storage", - "sp-transaction-pool", - "sp-transaction-storage-proof", - "sp-trie", - "sp-version", + "sp-api 25.0.0", + "sp-blockchain 27.0.0", + "sp-consensus 0.31.0", + "sp-core 27.0.0", + "sp-externalities 0.24.0", + "sp-keystore 0.33.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-state-machine 0.34.0", + "sp-storage 18.0.0", + "sp-transaction-pool 25.0.0", + "sp-transaction-storage-proof 25.0.0", + "sp-trie 28.0.0", + "sp-version 28.0.0", "static_init", "substrate-prometheus-endpoint", "tempfile", @@ -10762,7 +13582,19 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sp-core", + "sp-core 25.0.0", +] + +[[package]] +name = "sc-state-db" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d20aeec62d91b8e8f0f7497bd147d427332a76c9b054e50973c3d289685808ee" +dependencies = [ + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sp-core 27.0.0", ] [[package]] @@ -10777,12 +13609,33 @@ dependencies = [ "rand 0.8.5", "rand_pcg", "regex", - "sc-telemetry", + "sc-telemetry 12.0.0", + "serde", + "serde_json", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sc-sysinfo" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a028b0b37acaa1394b6abc8344dbb4a9c26c3631b26db0e277b1c1772c73a867" +dependencies = [ + "derive_more", + "futures", + "libc", + "log", + "rand 0.8.5", + "rand_pcg", + "regex", + "sc-telemetry 14.0.0", "serde", "serde_json", - "sp-core", - "sp-io", - "sp-std", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-std 13.0.0", ] [[package]] @@ -10798,7 +13651,27 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "rand 0.8.5", - "sc-utils", + "sc-utils 11.0.0", + "serde", + "serde_json", + "thiserror", + "wasm-timer", +] + +[[package]] +name = "sc-telemetry" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc5a1c7282f7f56b4caaed8ebb9d723cee92ebbdd0585e6e0e8e57a9fdcc590d" +dependencies = [ + "chrono", + "futures", + "libp2p", + "log", + "parking_lot 0.12.1", + "pin-project", + "rand 0.8.5", + "sc-utils 13.0.0", "serde", "serde_json", "thiserror", @@ -10820,15 +13693,46 @@ dependencies = [ "parking_lot 0.12.1", "regex", "rustc-hash", - "sc-client-api", + "sc-client-api 25.0.0", + "sc-tracing-proc-macro", + "serde", + "sp-api 23.0.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-rpc 23.0.0", + "sp-runtime 28.0.0", + "sp-tracing 14.0.0", + "thiserror", + "tracing", + "tracing-log", + "tracing-subscriber", +] + +[[package]] +name = "sc-tracing" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44a512ed582251b8605cfa0245787f60434e241666298bd4dd5f206d6c0814d0" +dependencies = [ + "ansi_term", + "atty", + "chrono", + "lazy_static", + "libc", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "regex", + "rustc-hash", + "sc-client-api 27.0.0", "sc-tracing-proc-macro", "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-rpc", - "sp-runtime", - "sp-tracing", + "sp-api 25.0.0", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-rpc 25.0.0", + "sp-runtime 30.0.1", + "sp-tracing 15.0.0", "thiserror", "tracing", "tracing-log", @@ -10860,16 +13764,43 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sc-client-api", - "sc-transaction-pool-api", - "sc-utils", - "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-runtime", - "sp-tracing", - "sp-transaction-pool", + "sc-client-api 25.0.0", + "sc-transaction-pool-api 25.0.0", + "sc-utils 11.0.0", + "serde", + "sp-api 23.0.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-tracing 14.0.0", + "sp-transaction-pool 23.0.0", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "sc-transaction-pool" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28627585ac5e3d8095067f5052d4b98fb5d2d61d819e8f27a7057750a03984f" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "linked-hash-map", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api 27.0.0", + "sc-transaction-pool-api 27.0.0", + "sc-utils 13.0.0", + "serde", + "sp-api 25.0.0", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-tracing 15.0.0", + "sp-transaction-pool 25.0.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -10885,9 +13816,26 @@ dependencies = [ "log", "parity-scale-codec", "serde", - "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "thiserror", +] + +[[package]] +name = "sc-transaction-pool-api" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99b8e2122ec55f2e7d14fcfad524e278e4ba7dc5f398f32e32e17c31ee519c72" +dependencies = [ + "async-trait", + "futures", + "log", + "parity-scale-codec", + "serde", + "sp-blockchain 27.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", "thiserror", ] @@ -10904,23 +13852,39 @@ dependencies = [ "log", "parking_lot 0.12.1", "prometheus", - "sp-arithmetic", + "sp-arithmetic 20.0.0", ] [[package]] -name = "scale-info" -version = "2.10.0" +name = "sc-utils" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" +checksum = "6921990b07ea392b5cea4fae2153bac23cea983c09e5a6716bcae59340e9150d" dependencies = [ - "bitvec", - "cfg-if", - "derive_more", - "parity-scale-codec", - "scale-info-derive", - "serde", -] - + "async-channel", + "futures", + "futures-timer", + "lazy_static", + "log", + "parking_lot 0.12.1", + "prometheus", + "sp-arithmetic 22.0.0", +] + +[[package]] +name = "scale-info" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" +dependencies = [ + "bitvec", + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", + "serde", +] + [[package]] name = "scale-info-derive" version = "2.10.0" @@ -10963,7 +13927,7 @@ dependencies = [ "arrayvec 0.5.2", "curve25519-dalek 2.1.3", "getrandom 0.1.16", - "merlin", + "merlin 2.0.1", "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", @@ -10971,6 +13935,25 @@ dependencies = [ "zeroize", ] +[[package]] +name = "schnorrkel" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" +dependencies = [ + "aead 0.5.2", + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek 4.1.2", + "getrandom_or_panic", + "merlin 3.0.0", + "rand_core 0.6.4", + "serde_bytes", + "sha2 0.10.7", + "subtle 2.4.1", + "zeroize", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -11049,7 +14032,16 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" dependencies = [ - "secp256k1-sys", + "secp256k1-sys 0.6.1", +] + +[[package]] +name = "secp256k1" +version = "0.28.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" +dependencies = [ + "secp256k1-sys 0.9.2", ] [[package]] @@ -11061,6 +14053,15 @@ dependencies = [ "cc", ] +[[package]] +name = "secp256k1-sys" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb" +dependencies = [ + "cc", +] + [[package]] name = "secrecy" version = "0.8.0" @@ -11099,7 +14100,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", ] [[package]] @@ -11108,7 +14109,16 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser 0.10.2", ] [[package]] @@ -11126,6 +14136,15 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + [[package]] name = "separator" version = "0.4.1" @@ -11141,6 +14160,24 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-big-array" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd31f59f6fe2b0c055371bb2f16d7f0aa7d8881676c04a55b1596d1a17cd10a4" +dependencies = [ + "serde", +] + +[[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.195" @@ -11154,9 +14191,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.109" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0652c533506ad7a2e353cce269330d6afd8bdfb6d75e0ace5b35aacbd7b9e9" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ "itoa", "ryu", @@ -11299,6 +14336,12 @@ dependencies = [ "wide", ] +[[package]] +name = "simple-mermaid" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "620a1d43d70e142b1d46a929af51d44f383db9c7a2ec122de2cd992ccfcf3c18" + [[package]] name = "siphasher" version = "0.3.11" @@ -11329,15 +14372,28 @@ dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "slot-range-helper" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4976dad61a607ef0b19e0cf9afb94846be96e1ac817e664dc71f67de3d7704a2" +dependencies = [ + "enumn", + "parity-scale-codec", + "paste", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "smallvec" -version = "1.12.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "snap" @@ -11363,269 +14419,884 @@ dependencies = [ ] [[package]] -name = "socket2" -version = "0.4.9" +name = "snowbridge-amcl" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "460a9ed63cdf03c1b9847e8a12a5f5ba19c4efd5869e4a737e05be25d7c427e5" dependencies = [ - "libc", - "winapi", + "parity-scale-codec", + "scale-info", ] [[package]] -name = "socket2" -version = "0.5.3" +name = "snowbridge-beacon-primitives" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +checksum = "60a73ef707257064bc4ecce8323cdb7c30e8ecd1ce74aa89a6e82e81fa8b9970" dependencies = [ - "libc", - "windows-sys 0.48.0", + "byte-slice-cast", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex", + "parity-scale-codec", + "rlp", + "scale-info", + "serde", + "snowbridge-ethereum", + "snowbridge-milagro-bls", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "ssz_rs", + "ssz_rs_derive", + "static_assertions", ] [[package]] -name = "soketto" -version = "0.7.1" +name = "snowbridge-core" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" +checksum = "7d3615664be8525d6f23e42dce1c314abc7f961a7f862b74012444e16d5dde5c" dependencies = [ - "base64 0.13.1", - "bytes", - "flate2", - "futures", - "http", - "httparse", - "log", - "rand 0.8.5", - "sha-1", + "ethabi-decode", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "parity-scale-codec", + "polkadot-parachain-primitives 7.0.0", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", ] [[package]] -name = "sp-api" -version = "23.0.0" +name = "snowbridge-ethereum" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f582f92ce47c86e4ffffe81fdd5120fea7c850dc0800653a7fa203bcc1532335" +checksum = "315ad74f081734cb51f48bb10cd18a3f83cfec3c09a551bc936027708635e808" dependencies = [ - "hash-db", - "log", + "ethabi-decode", + "ethbloom", + "ethereum-types", + "hex-literal", + "parity-bytes", "parity-scale-codec", + "rlp", + "rustc-hex", "scale-info", - "sp-api-proc-macro", - "sp-core", - "sp-externalities", - "sp-metadata-ir", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-trie", - "sp-version", - "thiserror", + "serde", + "serde-big-array", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", ] [[package]] -name = "sp-api-proc-macro" -version = "12.0.0" +name = "snowbridge-milagro-bls" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a896941b2d27365a6f937ebce11e36d55132dc32104f6a48b4cd765b55efd252" +checksum = "026aa8638f690a53e3f7676024b9e913b1cab0111d1b7b92669d40a188f9d7e6" dependencies = [ - "Inflector", - "blake2 0.10.6", - "expander 2.0.0", - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 2.0.48", + "hex", + "lazy_static", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "snowbridge-amcl", + "zeroize", ] [[package]] -name = "sp-application-crypto" -version = "27.0.0" +name = "snowbridge-outbound-queue-merkle-tree" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a93da025616ab59639f8e378df579c5aaa2c8b9999f328a0239156a57c991b53" +checksum = "5382cf77aeb8a92a142751949cdea1f230b7864e1ea687352c28439faabcf69d" dependencies = [ "parity-scale-codec", "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-std", + "sp-core 29.0.0", + "sp-runtime 32.0.0", ] [[package]] -name = "sp-arithmetic" -version = "20.0.0" +name = "snowbridge-outbound-queue-runtime-api" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f80b5c16afb61dde1037a469d570adcc686440036429e50abe2301ba9d61aad5" +checksum = "4933810488df1660cf60f53a7952ce1dff6aaef72d9fc740e1274e937136444e" dependencies = [ - "integer-sqrt", - "num-traits", + "frame-support 29.0.0", "parity-scale-codec", - "scale-info", - "serde", - "sp-std", - "static_assertions", + "snowbridge-core", + "snowbridge-outbound-queue-merkle-tree", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", ] [[package]] -name = "sp-authority-discovery" -version = "23.0.0" +name = "snowbridge-pallet-ethereum-client" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e204d85bad6f02a5ae8fbba83c365e20459e979fd69db5575ba4b3ea1025ab3c" +checksum = "a0fd437cd5db8b7d16cdd4da110d674d245532afa31df10108a11858a07844a6" dependencies = [ + "bp-runtime 0.8.0", + "byte-slice-cast", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "log", + "pallet-timestamp 28.0.0", "parity-scale-codec", + "rlp", "scale-info", - "sp-api", - "sp-application-crypto", - "sp-runtime", - "sp-std", + "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-ethereum", + "snowbridge-pallet-ethereum-client-fixtures", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "ssz_rs", + "ssz_rs_derive", + "static_assertions", ] [[package]] -name = "sp-block-builder" -version = "23.0.0" +name = "snowbridge-pallet-ethereum-client-fixtures" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cd16df3d1cdad862d3e764f10f7675876b011e032907423fdfa377ae2ec8575" +checksum = "d3d5b4b7e17eaadbc52ac3fc9fbcce63dfc60c05a1b19604cd009d6595c1175e" dependencies = [ - "sp-api", - "sp-inherents", - "sp-runtime", - "sp-std", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "snowbridge-beacon-primitives", + "snowbridge-core", + "sp-core 29.0.0", + "sp-std 14.0.0", ] [[package]] -name = "sp-blockchain" -version = "25.0.0" +name = "snowbridge-pallet-inbound-queue" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4932b97cde61874f395bab9b02443e3bd2046943abb280b63f83da9d0b623ea7" +checksum = "79c1fbfd32dbba082a9312c02c3ef35de929741f78f48e88b7668909350ef9e2" dependencies = [ - "futures", + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", "log", + "num-traits", + "pallet-balances 29.0.0", "parity-scale-codec", - "parking_lot 0.12.1", - "schnellru", - "sp-api", - "sp-consensus", - "sp-database", - "sp-runtime", - "sp-state-machine", - "thiserror", -] - -[[package]] -name = "sp-consensus" -version = "0.29.0" + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-ethereum", + "snowbridge-pallet-inbound-queue-fixtures", + "snowbridge-router-primitives", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + +[[package]] +name = "snowbridge-pallet-inbound-queue-fixtures" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c5d7170fb7cfb18024ef7eeb40d272d22b9c3587d85cde2d091e8463b397f06" +checksum = "3d8fff63b0a64d1dd06571ad074e664594bd9392481cd3489edde36e1d2dcc96" dependencies = [ - "async-trait", - "futures", - "log", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", - "thiserror", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "snowbridge-beacon-primitives", + "snowbridge-core", + "sp-core 29.0.0", + "sp-std 14.0.0", ] [[package]] -name = "sp-consensus-aura" -version = "0.29.0" +name = "snowbridge-pallet-outbound-queue" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643a7c486a645f398d219d1fbcc8a416cad5018164a212fefde5c2ef00a182e4" +checksum = "2c7498ba5bc2b15e1d032b3e44659cd117cad24eab457a40dc5e17acfaac0aff" dependencies = [ - "async-trait", + "bridge-hub-common", + "ethabi-decode", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", "parity-scale-codec", "scale-info", - "sp-api", - "sp-application-crypto", - "sp-consensus-slots", - "sp-inherents", - "sp-runtime", - "sp-std", - "sp-timestamp", + "serde", + "snowbridge-core", + "snowbridge-outbound-queue-merkle-tree", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", ] [[package]] -name = "sp-consensus-babe" -version = "0.29.0" +name = "snowbridge-pallet-system" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "268f9b2e36d4e136c09ad87876cdcfd7ff734cb5917f333fefebff248f95a24f" +checksum = "f6a410d9312bdcc3ba5944abb7d21f6b25065b32c7f8b39b9c7a4b0bd0dacfb4" dependencies = [ - "async-trait", + "ethabi-decode", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", "parity-scale-codec", "scale-info", - "serde", - "sp-api", - "sp-application-crypto", - "sp-consensus-slots", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-std", - "sp-timestamp", + "snowbridge-core", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", ] [[package]] -name = "sp-consensus-beefy" -version = "10.0.0" +name = "snowbridge-router-primitives" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e18fe984ea745727e645c43d6a955bc471b3bcd36aa8d260c3bd0deeada0c5" +checksum = "ee5cc8e156f033971c5435676be92ab6f70a926b3497ca9c28c0dde9697b8da9" dependencies = [ - "lazy_static", + "ethabi-decode", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "log", "parity-scale-codec", "scale-info", "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-mmr-primitives", - "sp-runtime", - "sp-std", - "strum", + "snowbridge-core", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", ] [[package]] -name = "sp-consensus-grandpa" -version = "10.0.0" +name = "snowbridge-runtime-common" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28bbee685900110419913f281ce0f29457fbc17418f00d15f0212c8043aba167" +checksum = "4d751007be1c9c68b075b0b1f9b02c25a02f458903a2c7893ba6e4231a00c24a" dependencies = [ - "finality-grandpa", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", - "scale-info", - "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-keystore", - "sp-runtime", - "sp-std", + "snowbridge-core", + "sp-arithmetic 24.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", ] [[package]] -name = "sp-consensus-slots" -version = "0.29.0" +name = "snowbridge-system-runtime-api" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "895b0c176d4eead833ddee5251d3cccbaeb0191ca3f33f84b11d347bebc6e21f" +checksum = "5c5c3c4e6e87b76ae1f9639bbc1528e1ae4e5a8d6a16d02d8d48e56d4a89f4ca" dependencies = [ "parity-scale-codec", - "scale-info", - "serde", - "sp-std", - "sp-timestamp", + "snowbridge-core", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", ] [[package]] -name = "sp-core" -version = "25.0.0" +name = "socket2" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9ebb090ead698a6df04347c86a31ba91a387edb8a58534ec70c4f977d1e1e87" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "soketto" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" +dependencies = [ + "base64 0.13.1", + "bytes", + "flate2", + "futures", + "http", + "httparse", + "log", + "rand 0.8.5", + "sha-1", +] + +[[package]] +name = "sp-api" +version = "23.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f582f92ce47c86e4ffffe81fdd5120fea7c850dc0800653a7fa203bcc1532335" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "scale-info", + "sp-api-proc-macro 12.0.0", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-metadata-ir 0.4.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "sp-std 12.0.0", + "sp-trie 26.0.0", + "sp-version 26.0.0", + "thiserror", +] + +[[package]] +name = "sp-api" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7f4202d58db32c71adb23be744f7b0c93a8063ad9b17b9b4f81d3fc4633ae6" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "scale-info", + "sp-api-proc-macro 14.0.0", + "sp-core 27.0.0", + "sp-externalities 0.24.0", + "sp-metadata-ir 0.5.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "sp-std 13.0.0", + "sp-trie 28.0.0", + "sp-version 28.0.0", + "thiserror", +] + +[[package]] +name = "sp-api" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ef42aa652381ade883c14ffbbb5c0fec36d382d2217b5bace01b8a0e8634778" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "scale-info", + "sp-api-proc-macro 15.0.0", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-metadata-ir 0.6.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", + "sp-std 14.0.0", + "sp-trie 30.0.0", + "sp-version 30.0.0", + "thiserror", +] + +[[package]] +name = "sp-api-proc-macro" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a896941b2d27365a6f937ebce11e36d55132dc32104f6a48b4cd765b55efd252" +dependencies = [ + "Inflector", + "blake2 0.10.6", + "expander 2.0.0", + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "sp-api-proc-macro" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f19a8b3ebe748e59c5a679bb7510251b9c96873c0f4dc7669030c8254598716" +dependencies = [ + "Inflector", + "blake2 0.10.6", + "expander 2.0.0", + "proc-macro-crate 2.0.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "sp-api-proc-macro" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0694be2891593450916d6b53a274d234bccbc86bcbada36ba23fc356989070c7" +dependencies = [ + "Inflector", + "blake2 0.10.6", + "expander 2.0.0", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "sp-application-crypto" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a93da025616ab59639f8e378df579c5aaa2c8b9999f328a0239156a57c991b53" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-application-crypto" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd703034c3f4f34fa4965e0d4d773f50d0f56256b1759b36016b3b1baba147d8" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-std 13.0.0", +] + +[[package]] +name = "sp-application-crypto" +version = "31.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "547cad7a6eabb52c639ec117b3db9c6b43cf1b29a9393b18feb19e101a91833f" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-std 14.0.0", +] + +[[package]] +name = "sp-arithmetic" +version = "20.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f80b5c16afb61dde1037a469d570adcc686440036429e50abe2301ba9d61aad5" +dependencies = [ + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-std 12.0.0", + "static_assertions", +] + +[[package]] +name = "sp-arithmetic" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dec3290d64ec9994457abe974f82fe7260c9cc32e920e4cf20611346ca7464" +dependencies = [ + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-std 13.0.0", + "static_assertions", +] + +[[package]] +name = "sp-arithmetic" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afa823ca5adc490d47dccb41d69ad482bc57a317bd341de275868378f48f131c" +dependencies = [ + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-std 14.0.0", + "static_assertions", +] + +[[package]] +name = "sp-authority-discovery" +version = "23.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e204d85bad6f02a5ae8fbba83c365e20459e979fd69db5575ba4b3ea1025ab3c" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-authority-discovery" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d626bc6b32b0defc2b7bdb5899c8f4ca86e9646e0cba80d09e9c263fd74fe39" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", +] + +[[package]] +name = "sp-authority-discovery" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92b177c72b5d2973c36d60f6ef942d791d9fd91eae8b08c71882e4118d4fbfc" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + +[[package]] +name = "sp-block-builder" +version = "23.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cd16df3d1cdad862d3e764f10f7675876b011e032907423fdfa377ae2ec8575" +dependencies = [ + "sp-api 23.0.0", + "sp-inherents 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-block-builder" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64475dafccb351ea025f06f40b205aae8de16563347622d513a0a7767090ca4d" +dependencies = [ + "sp-api 25.0.0", + "sp-inherents 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", +] + +[[package]] +name = "sp-blockchain" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4932b97cde61874f395bab9b02443e3bd2046943abb280b63f83da9d0b623ea7" +dependencies = [ + "futures", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "schnellru", + "sp-api 23.0.0", + "sp-consensus 0.29.0", + "sp-database", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "thiserror", +] + +[[package]] +name = "sp-blockchain" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97252dce922ebb4239e52173d9d67957892da74196372e52d05f44ff68f887a2" +dependencies = [ + "futures", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "schnellru", + "sp-api 25.0.0", + "sp-consensus 0.31.0", + "sp-database", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "thiserror", +] + +[[package]] +name = "sp-consensus" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c5d7170fb7cfb18024ef7eeb40d272d22b9c3587d85cde2d091e8463b397f06" +dependencies = [ + "async-trait", + "futures", + "log", + "sp-core 25.0.0", + "sp-inherents 23.0.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "thiserror", +] + +[[package]] +name = "sp-consensus" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae7acf47fab76b2929ca26f679f1b94e66c03ae1f68637878fe6f18bc4dd160" +dependencies = [ + "async-trait", + "futures", + "log", + "sp-core 27.0.0", + "sp-inherents 25.0.0", + "sp-runtime 30.0.1", + "sp-state-machine 0.34.0", + "thiserror", +] + +[[package]] +name = "sp-consensus-aura" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643a7c486a645f398d219d1fbcc8a416cad5018164a212fefde5c2ef00a182e4" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-consensus-slots 0.29.0", + "sp-inherents 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-timestamp 23.0.0", +] + +[[package]] +name = "sp-consensus-aura" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "237ffe23611f0f1e152b09e513090227752652eab2f10965825865102a86bfcc" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-consensus-slots 0.31.0", + "sp-inherents 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-timestamp 25.0.0", +] + +[[package]] +name = "sp-consensus-babe" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "268f9b2e36d4e136c09ad87876cdcfd7ff734cb5917f333fefebff248f95a24f" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-consensus-slots 0.29.0", + "sp-core 25.0.0", + "sp-inherents 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-timestamp 23.0.0", +] + +[[package]] +name = "sp-consensus-babe" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d248658f288676d2c814bcf79577a5bd0b9f386bfae5c4860bfed6ca71ab973b" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-consensus-slots 0.31.0", + "sp-core 27.0.0", + "sp-inherents 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-timestamp 25.0.0", +] + +[[package]] +name = "sp-consensus-beefy" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9b2a4f6aac1f224dd3c4cdb2637c3c1a1c518a5af816fd87b4978c5a61a4cf" +dependencies = [ + "lazy_static", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-mmr-primitives", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "strum", +] + +[[package]] +name = "sp-consensus-grandpa" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28bbee685900110419913f281ce0f29457fbc17418f00d15f0212c8043aba167" +dependencies = [ + "finality-grandpa", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-consensus-grandpa" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c01ae3526e29cc2c54daa6c55cb84911d89642f49cc6b2e49a6103f611c05a8" +dependencies = [ + "finality-grandpa", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-core 27.0.0", + "sp-keystore 0.33.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", +] + +[[package]] +name = "sp-consensus-slots" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "895b0c176d4eead833ddee5251d3cccbaeb0191ca3f33f84b11d347bebc6e21f" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-std 12.0.0", + "sp-timestamp 23.0.0", +] + +[[package]] +name = "sp-consensus-slots" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4627b5d9a9991438c42944fb704315092d6c07967469aafa135328be2f9f412" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-std 13.0.0", + "sp-timestamp 25.0.0", +] + +[[package]] +name = "sp-consensus-slots" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73a5bd1fcd84bbdc7255528c7cdb92f9357fd555f06ee553af7e340cbdab517c" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-std 14.0.0", + "sp-timestamp 27.0.0", +] + +[[package]] +name = "sp-core" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9ebb090ead698a6df04347c86a31ba91a387edb8a58534ec70c4f977d1e1e87" dependencies = [ "array-bytes 6.1.0", "bitflags 1.3.2", "blake2 0.10.6", - "bounded-collections", + "bounded-collections 0.1.8", "bs58 0.5.0", "dyn-clonable", "ed25519-zebra", @@ -11636,7 +15307,7 @@ dependencies = [ "lazy_static", "libsecp256k1", "log", - "merlin", + "merlin 2.0.1", "parity-scale-codec", "parking_lot 0.12.1", "paste", @@ -11644,16 +15315,16 @@ dependencies = [ "rand 0.8.5", "regex", "scale-info", - "schnorrkel", - "secp256k1", + "schnorrkel 0.9.1", + "secp256k1 0.24.3", "secrecy", "serde", - "sp-core-hashing", + "sp-core-hashing 13.0.0", "sp-debug-derive 12.0.0", - "sp-externalities", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-externalities 0.23.0", + "sp-runtime-interface 21.0.0", + "sp-std 12.0.0", + "sp-storage 17.0.0", "ss58-registry", "substrate-bip39", "thiserror", @@ -11663,6 +15334,98 @@ dependencies = [ "zeroize", ] +[[package]] +name = "sp-core" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d92c65ecfdb86fa1c4809b06a2a83d6f3bdb1ef4fe4c5a4f6df19229030d5283" +dependencies = [ + "array-bytes 6.1.0", + "bip39", + "bitflags 1.3.2", + "blake2 0.10.6", + "bounded-collections 0.1.8", + "bs58 0.5.0", + "dyn-clonable", + "ed25519-zebra", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "itertools 0.10.5", + "libsecp256k1", + "log", + "merlin 2.0.1", + "parity-scale-codec", + "parking_lot 0.12.1", + "paste", + "primitive-types", + "rand 0.8.5", + "scale-info", + "schnorrkel 0.9.1", + "secp256k1 0.28.2", + "secrecy", + "serde", + "sp-core-hashing 14.0.0", + "sp-debug-derive 13.0.0", + "sp-externalities 0.24.0", + "sp-runtime-interface 23.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "ss58-registry", + "substrate-bip39", + "thiserror", + "tracing", + "w3f-bls", + "zeroize", +] + +[[package]] +name = "sp-core" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c33c7a1568175250628567d50c4e1c54a6ac5bc1190413b9be29a9e810cbe73" +dependencies = [ + "array-bytes 6.1.0", + "bip39", + "bitflags 1.3.2", + "blake2 0.10.6", + "bounded-collections 0.2.0", + "bs58 0.5.0", + "dyn-clonable", + "ed25519-zebra", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "itertools 0.10.5", + "libsecp256k1", + "log", + "merlin 3.0.0", + "parity-scale-codec", + "parking_lot 0.12.1", + "paste", + "primitive-types", + "rand 0.8.5", + "scale-info", + "schnorrkel 0.11.4", + "secp256k1 0.28.2", + "secrecy", + "serde", + "sp-crypto-hashing", + "sp-debug-derive 14.0.0", + "sp-externalities 0.26.0", + "sp-runtime-interface 25.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "ss58-registry", + "substrate-bip39", + "thiserror", + "tracing", + "w3f-bls", + "zeroize", +] + [[package]] name = "sp-core-hashing" version = "13.0.0" @@ -11677,6 +15440,20 @@ dependencies = [ "twox-hash", ] +[[package]] +name = "sp-core-hashing" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1936171e56a51272757760cc50883d2a8c37c650b3602a0aeed05b0c4fffc5f1" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.7", + "sha3", + "twox-hash", +] + [[package]] name = "sp-core-hashing-proc-macro" version = "13.0.0" @@ -11684,7 +15461,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ce3e6931303769197da81facefa86159fa1085dcd96ecb7e7407b5b93582a0" dependencies = [ "quote", - "sp-core-hashing", + "sp-core-hashing 13.0.0", + "syn 2.0.48", +] + +[[package]] +name = "sp-core-hashing-proc-macro" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8497dc98fc204ba9c09abb99840d64964de1925fbd9ff74cc01aa18492c19bd8" +dependencies = [ + "quote", + "sp-core-hashing 14.0.0", + "syn 2.0.48", +] + +[[package]] +name = "sp-crypto-hashing" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9927a7f81334ed5b8a98a4a978c81324d12bd9713ec76b5c68fd410174c5eb" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.7", + "sha3", + "twox-hash", +] + +[[package]] +name = "sp-crypto-hashing-proc-macro" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b85d0f1f1e44bd8617eb2a48203ee854981229e3e79e6f468c7175d5fd37489b" +dependencies = [ + "quote", + "sp-crypto-hashing", "syn 2.0.48", ] @@ -11720,42 +15533,142 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "sp-debug-derive" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fd2c660c3e940df93f4920b183cc103443d66503f68189fa7e4b3f09996a18" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "sp-debug-derive" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d09fa0a5f7299fb81ee25ae3853d26200f7a348148aed6de76be905c007dbe" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "sp-externalities" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "884d05160bc89d0943d1c9fb8006c3d44b80f37f8af607aeff8d4d9cc82e279a" dependencies = [ - "environmental", + "environmental", + "parity-scale-codec", + "sp-std 12.0.0", + "sp-storage 17.0.0", +] + +[[package]] +name = "sp-externalities" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac0a1df458d0bba69bc011a3b0197049396272e497b207ad161289e7518b74bf" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 13.0.0", + "sp-storage 18.0.0", +] + +[[package]] +name = "sp-externalities" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7096ed024cec397804864898b093b51e14c7299f1d00c67dd5800330e02bb82" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 14.0.0", + "sp-storage 20.0.0", +] + +[[package]] +name = "sp-genesis-builder" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0cb71d40ad47e40bdcce5ae5531c7d7ba579cd495a0e0413642fb063fa66f84" +dependencies = [ + "serde_json", + "sp-api 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-genesis-builder" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8152be87c61e6d74f491d05b67086408462ab0593b2340311a91a2d3d246f03" +dependencies = [ + "serde_json", + "sp-api 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", +] + +[[package]] +name = "sp-genesis-builder" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd865540ec19479c7349b584ccd78cc34c3f3a628a2a69dbb6365ceec36295ee" +dependencies = [ + "serde_json", + "sp-api 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + +[[package]] +name = "sp-inherents" +version = "23.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604229aa145be0cff853b47ffed8bc2c62eb08ec6974d6307b9a559c378e6dc5" +dependencies = [ + "async-trait", + "impl-trait-for-tuples", "parity-scale-codec", - "sp-std", - "sp-storage", + "scale-info", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "thiserror", ] [[package]] -name = "sp-genesis-builder" -version = "0.4.0" +name = "sp-inherents" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0cb71d40ad47e40bdcce5ae5531c7d7ba579cd495a0e0413642fb063fa66f84" +checksum = "7089c364b99df5ce82c1cedcaba56f574ff06e403d9f8640bee33f87750566a2" dependencies = [ - "serde_json", - "sp-api", - "sp-runtime", - "sp-std", + "async-trait", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "thiserror", ] [[package]] name = "sp-inherents" -version = "23.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604229aa145be0cff853b47ffed8bc2c62eb08ec6974d6307b9a559c378e6dc5" +checksum = "607c9e35e96966645ff180a9e9f976433b96e905d0a91d8d5315e605a21f4bc0" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 32.0.0", + "sp-std 14.0.0", "thiserror", ] @@ -11771,15 +15684,66 @@ dependencies = [ "log", "parity-scale-codec", "rustversion", - "secp256k1", - "sp-core", - "sp-externalities", - "sp-keystore", - "sp-runtime-interface", - "sp-state-machine", - "sp-std", - "sp-tracing", - "sp-trie", + "secp256k1 0.24.3", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-keystore 0.31.0", + "sp-runtime-interface 21.0.0", + "sp-state-machine 0.32.0", + "sp-std 12.0.0", + "sp-tracing 14.0.0", + "sp-trie 26.0.0", + "tracing", + "tracing-core", +] + +[[package]] +name = "sp-io" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c600c911757504c43f8c354edd1b0d327a1c2abfe947e490a6b62d8f1543d96" +dependencies = [ + "bytes", + "ed25519-dalek", + "libsecp256k1", + "log", + "parity-scale-codec", + "rustversion", + "secp256k1 0.28.2", + "sp-core 27.0.0", + "sp-externalities 0.24.0", + "sp-keystore 0.33.0", + "sp-runtime-interface 23.0.0", + "sp-state-machine 0.34.0", + "sp-std 13.0.0", + "sp-tracing 15.0.0", + "sp-trie 28.0.0", + "tracing", + "tracing-core", +] + +[[package]] +name = "sp-io" +version = "31.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec43aa073eab35fcb920d7592474d5427ea3be2bf938706a3ad955d7ba54fd8d" +dependencies = [ + "bytes", + "ed25519-dalek", + "libsecp256k1", + "log", + "parity-scale-codec", + "rustversion", + "secp256k1 0.28.2", + "sp-core 29.0.0", + "sp-crypto-hashing", + "sp-externalities 0.26.0", + "sp-keystore 0.35.0", + "sp-runtime-interface 25.0.0", + "sp-state-machine 0.36.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", + "sp-trie 30.0.0", "tracing", "tracing-core", ] @@ -11791,8 +15755,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "655ec0b35cb9cb9029fb323aa676b07d58deb872cecc7566e50278409a00ee95" dependencies = [ "lazy_static", - "sp-core", - "sp-runtime", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "strum", +] + +[[package]] +name = "sp-keyring" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245dfdf093568086ba7e3099319998a37d5ccf6b9faab45f170c766fc1122c37" +dependencies = [ + "lazy_static", + "sp-core 27.0.0", + "sp-runtime 30.0.1", "strum", ] @@ -11804,8 +15780,34 @@ checksum = "8b8ec5ebbba70bee83d79c3fe5e49f12df0a4bb6029858ddf9a15eea7539a592" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "sp-core", - "sp-externalities", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "thiserror", +] + +[[package]] +name = "sp-keystore" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b955546b815ace30f63542efda71ce4e010444596cd8316f7ef49a26fb971709" +dependencies = [ + "parity-scale-codec", + "parking_lot 0.12.1", + "sp-core 27.0.0", + "sp-externalities 0.24.0", + "thiserror", +] + +[[package]] +name = "sp-keystore" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "444f2d53968b1ce5e908882710ff1f3873fcf3e95f59d57432daf685bbacb959" +dependencies = [ + "parity-scale-codec", + "parking_lot 0.12.1", + "sp-core 29.0.0", + "sp-externalities 0.26.0", "thiserror", ] @@ -11819,6 +15821,16 @@ dependencies = [ "zstd 0.12.4", ] +[[package]] +name = "sp-maybe-compressed-blob" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0950218edb5c5fb4867e28814d7b13c13a3c80ea37f356dc410437105a07cff8" +dependencies = [ + "thiserror", + "zstd 0.12.4", +] + [[package]] name = "sp-metadata-ir" version = "0.4.0" @@ -11828,7 +15840,31 @@ dependencies = [ "frame-metadata", "parity-scale-codec", "scale-info", - "sp-std", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-metadata-ir" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97cacf4a5b315d8709b5a29ad8e736c0ad5b719e70d02aca0c29c7e3dca4a6e2" +dependencies = [ + "frame-metadata", + "parity-scale-codec", + "scale-info", + "sp-std 13.0.0", +] + +[[package]] +name = "sp-metadata-ir" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa0b5e87e56c1bb26d9524d48dd127121d630f895bd5914a34f0b017489f7c1d" +dependencies = [ + "frame-metadata", + "parity-scale-codec", + "scale-info", + "sp-std 14.0.0", ] [[package]] @@ -11839,27 +15875,40 @@ checksum = "bdf61f28ca97aab6c21a3c6e0ed496e60d505e5de1f43fd4ba748c9afaa4fc85" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api", - "sp-application-crypto", - "sp-std", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-mixnet" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19bd1dca687e8b360ea48c6e7351c175c8c2ca4d7f0cc0ec88274ef8519c507f" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-std 13.0.0", ] [[package]] name = "sp-mmr-primitives" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3b33c20a4b1dd5a0069ced6997078a2af5d625f2c53d1b69bef9e131f42d77" +checksum = "84b6fad7c530c463057d68d465aff08e5fff068c3c6827ff64fbd1ee34d3f2a5" dependencies = [ "ckb-merkle-mountain-range", "log", "parity-scale-codec", "scale-info", "serde", - "sp-api", - "sp-core", - "sp-debug-derive 12.0.0", - "sp-runtime", - "sp-std", + "sp-api 25.0.0", + "sp-core 27.0.0", + "sp-debug-derive 13.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", "thiserror", ] @@ -11872,10 +15921,25 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-core", - "sp-runtime", - "sp-std", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-npos-elections" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d56d158aed198ec52dc04ee64e6be8dd1bb42e6837c80aa5aa8c058479afa8" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -11884,9 +15948,20 @@ version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9310227f043ed99877b0449a683025a7461431a00995dcd6ef423a273d0fd85d" dependencies = [ - "sp-api", - "sp-core", - "sp-runtime", + "sp-api 23.0.0", + "sp-core 25.0.0", + "sp-runtime 28.0.0", +] + +[[package]] +name = "sp-offchain" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5016e6a6cb55aa55f290abe5c5f5efc35defa9eeb996a21667d18ae256c45d5c" +dependencies = [ + "sp-api 25.0.0", + "sp-core 27.0.0", + "sp-runtime 30.0.1", ] [[package]] @@ -11900,6 +15975,17 @@ dependencies = [ "regex", ] +[[package]] +name = "sp-panic-handler" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8f5a17a0a11de029a8b811cb6e8b32ce7e02183cc04a3e965c383246798c416" +dependencies = [ + "backtrace", + "lazy_static", + "regex", +] + [[package]] name = "sp-rpc" version = "23.0.0" @@ -11908,7 +15994,18 @@ checksum = "51867fea921f54bbaa2bf505f373559b5f3b80e8d7f38ecb9677f0d3795a3e6a" dependencies = [ "rustc-hash", "serde", - "sp-core", + "sp-core 25.0.0", +] + +[[package]] +name = "sp-rpc" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3921819bed23ddf4ad6bf402b596a6950255b91f9b58fee88b454dd988d938d6" +dependencies = [ + "rustc-hash", + "serde", + "sp-core 27.0.0", ] [[package]] @@ -11926,12 +16023,62 @@ dependencies = [ "rand 0.8.5", "scale-info", "serde", - "sp-application-crypto", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-std", - "sp-weights", + "sp-application-crypto 27.0.0", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-std 12.0.0", + "sp-weights 24.0.0", +] + +[[package]] +name = "sp-runtime" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee4bb0ddcc4e26cc6c770b49149e1a07ad6b34ab22d3da94330994b7145a025f" +dependencies = [ + "docify", + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "paste", + "rand 0.8.5", + "scale-info", + "serde", + "simple-mermaid", + "sp-application-crypto 29.0.0", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-std 13.0.0", + "sp-weights 26.0.0", +] + +[[package]] +name = "sp-runtime" +version = "32.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a95e71603a6281e91b0f1fd3d68057644be16d75a4602013187b8137db8abee" +dependencies = [ + "docify", + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "paste", + "rand 0.8.5", + "scale-info", + "serde", + "simple-mermaid", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-std 14.0.0", + "sp-weights 28.0.0", ] [[package]] @@ -11944,12 +16091,50 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities", - "sp-runtime-interface-proc-macro", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "sp-externalities 0.23.0", + "sp-runtime-interface-proc-macro 15.0.0", + "sp-std 12.0.0", + "sp-storage 17.0.0", + "sp-tracing 14.0.0", + "sp-wasm-interface 18.0.0", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "23.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0093f419cb2ef80c8ecb583ac54e05d1105710eb84add7f9483c8ea882cbaff" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.24.0", + "sp-runtime-interface-proc-macro 16.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-tracing 15.0.0", + "sp-wasm-interface 19.0.0", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e2321ab29d4bcc31f1ba1b4f076a81fb2a666465231e5c981c72320d74dbe63" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.26.0", + "sp-runtime-interface-proc-macro 17.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "sp-tracing 16.0.0", + "sp-wasm-interface 20.0.0", "static_assertions", ] @@ -11967,34 +16152,108 @@ dependencies = [ ] [[package]] -name = "sp-session" -version = "24.0.0" +name = "sp-runtime-interface-proc-macro" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ebdb4aff8286f5095871b2f950037d690edb0fed0590af5f6735352533a53b6" +dependencies = [ + "Inflector", + "expander 2.0.0", + "proc-macro-crate 2.0.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "17.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfaf6e85b2ec12a4b99cd6d8d57d083e30c94b7f1b0d8f93547121495aae6f0c" +dependencies = [ + "Inflector", + "expander 2.0.0", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "sp-session" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248dd8f49aa96b56bf0a7d513691ddb4194f9359fdb93e94397eabdef1036085" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api 23.0.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", + "sp-staking 23.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-session" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cdec3cb1c7f0900cfaec5de83f00841d99f2c2fbd32d44931601b43ba6d5bfa" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api 25.0.0", + "sp-core 27.0.0", + "sp-keystore 0.33.0", + "sp-runtime 30.0.1", + "sp-staking 25.0.0", + "sp-std 13.0.0", +] + +[[package]] +name = "sp-staking" +version = "23.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee0feed0137234598bd1f76d0b468c585ea16619ea9ed1acbba82dd24ac79788" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-staking" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248dd8f49aa96b56bf0a7d513691ddb4194f9359fdb93e94397eabdef1036085" +checksum = "5a15411bbc26ca6d9b14d44698ef19243c8875fa7cc3260621ba28b3241c477c" dependencies = [ + "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-api", - "sp-core", - "sp-keystore", - "sp-runtime", - "sp-staking", - "sp-std", + "serde", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] name = "sp-staking" -version = "23.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee0feed0137234598bd1f76d0b468c585ea16619ea9ed1acbba82dd24ac79788" +checksum = "1e14d003ecf0b610bf1305a92bdab875289b39d514c073f30e75e78c2763a788" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", ] [[package]] @@ -12009,11 +16268,55 @@ dependencies = [ "parking_lot 0.12.1", "rand 0.8.5", "smallvec", - "sp-core", - "sp-externalities", - "sp-panic-handler", - "sp-std", - "sp-trie", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-panic-handler 12.0.0", + "sp-std 12.0.0", + "sp-trie 26.0.0", + "thiserror", + "tracing", + "trie-db", +] + +[[package]] +name = "sp-state-machine" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f5027dceaa62f3c18f40593ee6a898df69c70e84e01450a17293511c4f3c46c" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "smallvec", + "sp-core 27.0.0", + "sp-externalities 0.24.0", + "sp-panic-handler 12.0.0", + "sp-std 13.0.0", + "sp-trie 28.0.0", + "thiserror", + "tracing", + "trie-db", +] + +[[package]] +name = "sp-state-machine" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a67297e702aa32027d7766803f362a420d6d3ec9e2f84961f3c64e2e52b5aaf9" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "smallvec", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-panic-handler 13.0.0", + "sp-std 14.0.0", + "sp-trie 30.0.0", "thiserror", "tracing", "trie-db", @@ -12033,13 +16336,38 @@ dependencies = [ "rand 0.8.5", "scale-info", "sha2 0.10.7", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-externalities", - "sp-runtime", - "sp-runtime-interface", - "sp-std", + "sp-api 23.0.0", + "sp-application-crypto 27.0.0", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-runtime 28.0.0", + "sp-runtime-interface 21.0.0", + "sp-std 12.0.0", + "thiserror", + "x25519-dalek 2.0.0", +] + +[[package]] +name = "sp-statement-store" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66ce852bff3c772be9646cc3491ee7dc8db47a3fb860659b5258c585a730013" +dependencies = [ + "aes-gcm 0.10.2", + "curve25519-dalek 4.1.2", + "ed25519-dalek", + "hkdf", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sha2 0.10.7", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-core 27.0.0", + "sp-externalities 0.24.0", + "sp-runtime 30.0.1", + "sp-runtime-interface 23.0.0", + "sp-std 13.0.0", "thiserror", "x25519-dalek 2.0.0", ] @@ -12050,6 +16378,18 @@ version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54c78c5a66682568cc7b153603c5d01a2cc8f5c221c7b1e921517a0eef18ae05" +[[package]] +name = "sp-std" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71323a3b5f189085d11123ce397b3cdfaec4437071243b51f68a38a4833fbaa7" + +[[package]] +name = "sp-std" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" + [[package]] name = "sp-storage" version = "17.0.0" @@ -12061,7 +16401,35 @@ dependencies = [ "ref-cast", "serde", "sp-debug-derive 12.0.0", - "sp-std", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-storage" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5300c9012180259489a97167f4c45cf3362446e5f0d0c66b6e9342968be8f22" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 13.0.0", + "sp-std 13.0.0", +] + +[[package]] +name = "sp-storage" +version = "20.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dba5791cb3978e95daf99dad919ecb3ec35565604e88cd38d805d9d4981e8bd" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 14.0.0", + "sp-std 14.0.0", ] [[package]] @@ -12072,9 +16440,37 @@ checksum = "004a7f453240db80b2967c0e1c6411836efc7daa7afae98fd16202caa51460e0" dependencies = [ "async-trait", "parity-scale-codec", - "sp-inherents", - "sp-runtime", - "sp-std", + "sp-inherents 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "thiserror", +] + +[[package]] +name = "sp-timestamp" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c6c12bc3bce3f785984843ea997e7f3da9c43ee392bf8c6f9ab183976c0cbf" +dependencies = [ + "async-trait", + "parity-scale-codec", + "sp-inherents 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "thiserror", +] + +[[package]] +name = "sp-timestamp" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "249cd06624f2edb53b25af528ab216a508dc9d0870e158b43caac3a97e86699f" +dependencies = [ + "async-trait", + "parity-scale-codec", + "sp-inherents 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", "thiserror", ] @@ -12085,7 +16481,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d727cb5265641ffbb7d4e42c18b63e29f6cfdbd240aae3bcf093c3d6eb29a19" dependencies = [ "parity-scale-codec", - "sp-std", + "sp-std 12.0.0", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-tracing" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b63d14c3214b8b5fe35b67bd61124b5f080cc9d1312b227e0c6cc2a198461e" +dependencies = [ + "parity-scale-codec", + "sp-std 13.0.0", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-tracing" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0351810b9d074df71c4514c5228ed05c250607cba131c1c9d1526760ab69c05c" +dependencies = [ + "parity-scale-codec", + "sp-std 14.0.0", "tracing", "tracing-core", "tracing-subscriber", @@ -12097,8 +16519,18 @@ version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7cd2afe89c474339d15d06e73639171ebe4d280be6904d9349072103da21427" dependencies = [ - "sp-api", - "sp-runtime", + "sp-api 23.0.0", + "sp-runtime 28.0.0", +] + +[[package]] +name = "sp-transaction-pool" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3927edc3371ad785725b3e50edf6769097ba64b193fc4779ec6e047f0d106dd0" +dependencies = [ + "sp-api 25.0.0", + "sp-runtime 30.0.1", ] [[package]] @@ -12110,11 +16542,27 @@ dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-std", - "sp-trie", + "sp-core 25.0.0", + "sp-inherents 23.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-trie 26.0.0", +] + +[[package]] +name = "sp-transaction-storage-proof" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c58c860d7e2e7dc267fa0d8bcf451816d9a0e387c4fcefafb15412aa7fd97fa" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "sp-core 27.0.0", + "sp-inherents 25.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-trie 28.0.0", ] [[package]] @@ -12134,8 +16582,59 @@ dependencies = [ "rand 0.8.5", "scale-info", "schnellru", - "sp-core", - "sp-std", + "sp-core 25.0.0", + "sp-std 12.0.0", + "thiserror", + "tracing", + "trie-db", + "trie-root", +] + +[[package]] +name = "sp-trie" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cbc3ad723c9addc4b7aafbe8bfabf638c39be3c911e11f58e924e17554003ac" +dependencies = [ + "ahash 0.8.8", + "hash-db", + "hashbrown 0.13.2", + "lazy_static", + "memory-db", + "nohash-hasher", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "scale-info", + "schnellru", + "sp-core 27.0.0", + "sp-externalities 0.24.0", + "sp-std 13.0.0", + "thiserror", + "tracing", + "trie-db", + "trie-root", +] + +[[package]] +name = "sp-trie" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed48dfd05081e8b36741b10ce4eb686c135a2952227a11fe71caec89890ddbb" +dependencies = [ + "ahash 0.8.8", + "hash-db", + "lazy_static", + "memory-db", + "nohash-hasher", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "scale-info", + "schnellru", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-std 14.0.0", "thiserror", "tracing", "trie-db", @@ -12153,36 +16652,112 @@ dependencies = [ "parity-wasm", "scale-info", "serde", - "sp-core-hashing-proc-macro", - "sp-runtime", - "sp-std", - "sp-version-proc-macro", + "sp-core-hashing-proc-macro 13.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-version-proc-macro 12.0.0", + "thiserror", +] + +[[package]] +name = "sp-version" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f18671744ee3af2a325daa257cc7aba2c464b36cca165d61bec72ed1ddcbb51" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "parity-wasm", + "scale-info", + "serde", + "sp-core-hashing-proc-macro 14.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-version-proc-macro 12.0.0", + "thiserror", +] + +[[package]] +name = "sp-version" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff4a660c68995663d6778df324f4e2b4efc48d55a8e9c92c22a5fb7dae7899cd" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "parity-wasm", + "scale-info", + "serde", + "sp-crypto-hashing-proc-macro", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-version-proc-macro 13.0.0", "thiserror", ] [[package]] -name = "sp-version-proc-macro" -version = "12.0.0" +name = "sp-version-proc-macro" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49535d8c7184dab46d15639c68374a30cbb1534e392fa09a1ebb059a993ad436" +dependencies = [ + "parity-scale-codec", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "sp-version-proc-macro" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9bc3fed32d6dacbbbfb28dd1fe0224affbb737cb6cbfca1d9149351c2b69a7d" +dependencies = [ + "parity-scale-codec", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "sp-wasm-interface" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5d85813d46a22484cdf5e5afddbbe85442dd1b4d84d67a8c7792f92f9f93607" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std 12.0.0", + "wasmtime", +] + +[[package]] +name = "sp-wasm-interface" +version = "19.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49535d8c7184dab46d15639c68374a30cbb1534e392fa09a1ebb059a993ad436" +checksum = "c4ef2e859d3cde7294c3bf691f8f64244a6a9bb67e53c65729b129318757070e" dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", "parity-scale-codec", - "proc-macro2", - "quote", - "syn 2.0.48", + "sp-std 13.0.0", + "wasmtime", ] [[package]] name = "sp-wasm-interface" -version = "18.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5d85813d46a22484cdf5e5afddbbe85442dd1b4d84d67a8c7792f92f9f93607" +checksum = "9ef97172c42eb4c6c26506f325f48463e9bc29b2034a587f1b9e48c751229bee" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std", + "sp-std 14.0.0", "wasmtime", ] @@ -12196,10 +16771,42 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-arithmetic", - "sp-core", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", "sp-debug-derive 12.0.0", - "sp-std", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-weights" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8813a9942a3b900d5ce109875b91ff8ae7eb5849545ebb6464c22aa21e42622e" +dependencies = [ + "bounded-collections 0.1.8", + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic 22.0.0", + "sp-debug-derive 13.0.0", + "sp-std 13.0.0", +] + +[[package]] +name = "sp-weights" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3be30aec904994451dcacf841a9168cfbbaf817de6b24b6a1c1418cbf1af2fe" +dependencies = [ + "bounded-collections 0.2.0", + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic 24.0.0", + "sp-debug-derive 14.0.0", + "sp-std 14.0.0", ] [[package]] @@ -12254,6 +16861,29 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "ssz_rs" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "057291e5631f280978fa9c8009390663ca4613359fc1318e36a8c24c392f6d1f" +dependencies = [ + "bitvec", + "num-bigint", + "sha2 0.9.9", + "ssz_rs_derive", +] + +[[package]] +name = "ssz_rs_derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f07d54c4d01a1713eb363b55ba51595da15f6f1211435b71466460da022aa140" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -12266,41 +16896,41 @@ version = "1.0.0" dependencies = [ "binary-merkle-tree", "bitvec", - "frame-benchmarking", - "frame-election-provider-support", - "frame-executive", + "frame-benchmarking 27.0.0", + "frame-election-provider-support 27.0.0", + "frame-executive 27.0.0", "frame-remote-externalities", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", + "frame-support 27.0.0", + "frame-system 27.0.0", + "frame-system-benchmarking 27.0.0", + "frame-system-rpc-runtime-api 25.0.0", + "frame-try-runtime 0.33.0", "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-rate", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", + "pallet-asset-rate 6.0.0", + "pallet-authority-discovery 27.0.0", + "pallet-authorship 27.0.0", + "pallet-babe 27.0.0", "pallet-bags-list", - "pallet-balances", + "pallet-balances 27.0.0", "pallet-beefy", "pallet-beefy-mmr", "pallet-bounties", "pallet-child-bounties", - "pallet-collective", + "pallet-collective 27.0.0", "pallet-conviction-voting", "pallet-democracy", - "pallet-election-provider-multi-phase", - "pallet-election-provider-support-benchmarking", + "pallet-election-provider-multi-phase 26.0.0", + "pallet-election-provider-support-benchmarking 26.0.0", "pallet-elections-phragmen", - "pallet-fast-unstake", + "pallet-fast-unstake 26.0.0", "pallet-grandpa", "pallet-identity", "pallet-im-online", "pallet-indices", - "pallet-membership", - "pallet-message-queue", + "pallet-membership 27.0.0", + "pallet-message-queue 30.0.0", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -12310,68 +16940,67 @@ dependencies = [ "pallet-offences", "pallet-offences-benchmarking", "pallet-preimage", - "pallet-proxy", + "pallet-proxy 27.0.0", "pallet-ranked-collective", "pallet-recovery", "pallet-referenda", - "pallet-scheduler", - "pallet-session", + "pallet-scheduler 28.0.0", + "pallet-session 27.0.0", "pallet-session-benchmarking", "pallet-society", - "pallet-staking", + "pallet-staking 27.0.0", "pallet-staking-runtime-api", "pallet-state-trie-migration", - "pallet-timestamp", + "pallet-timestamp 26.0.0", "pallet-tips", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-vesting", + "pallet-transaction-payment 27.0.0", + "pallet-transaction-payment-rpc-runtime-api 27.0.0", + "pallet-treasury 26.0.0", + "pallet-utility 27.0.0", + "pallet-vesting 27.0.0", "pallet-whitelist", - "pallet-xcm", - "pallet-xcm-benchmarks", + "pallet-xcm 6.0.0", + "pallet-xcm-benchmarks 6.0.2", "parity-scale-codec", - "polkadot-primitives", - "polkadot-runtime-common", - "polkadot-runtime-parachains", + "polkadot-primitives 6.0.0", + "polkadot-runtime-common 6.0.0", + "polkadot-runtime-parachains 6.0.0", "rustc-hex", "scale-info", "separator", "serde", "serde_derive", "serde_json", - "smallvec", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-authority-discovery", - "sp-block-builder", - "sp-consensus-babe", + "sp-api 25.0.0", + "sp-application-crypto 29.0.0", + "sp-arithmetic 22.0.0", + "sp-authority-discovery 25.0.0", + "sp-block-builder 25.0.0", + "sp-consensus-babe 0.31.0", "sp-consensus-beefy", - "sp-core", + "sp-core 27.0.0", "sp-debug-derive 10.0.0", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-keyring", + "sp-genesis-builder 0.6.0", + "sp-inherents 25.0.0", + "sp-io 29.0.0", + "sp-keyring 30.0.0", "sp-mmr-primitives", - "sp-npos-elections", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-transaction-pool", - "sp-trie", - "sp-version", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", + "sp-npos-elections 25.0.0", + "sp-offchain 25.0.0", + "sp-runtime 30.0.1", + "sp-session 26.0.0", + "sp-staking 25.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-tracing 15.0.0", + "sp-transaction-pool 25.0.0", + "sp-trie 28.0.0", + "sp-version 28.0.0", + "staging-xcm 6.0.0", + "staging-xcm-builder 6.0.2", + "staging-xcm-executor 6.0.2", "static_assertions", - "substrate-wasm-builder", + "substrate-wasm-builder 16.0.0", "tiny-keccak", "tokio", ] @@ -12382,13 +17011,28 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a1bcf863664ca5708d92894fc30d2c6606c7dbb7d7cfcf43b9ae69d5b83f4fb" dependencies = [ - "cumulus-primitives-core", - "frame-support", - "frame-system", + "cumulus-primitives-core 0.4.0", + "frame-support 25.0.0", + "frame-system 25.0.0", + "parity-scale-codec", + "scale-info", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "staging-parachain-info" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02fd981bfbcb9a942de6cf79555d510fcec0d1b255b74303daf0182ab69a495f" +dependencies = [ + "cumulus-primitives-core 0.6.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 30.0.1", + "sp-std 13.0.0", ] [[package]] @@ -12397,7 +17041,44 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abd0c2e401a1e264379131c27676bc65c9631aaa508044bc04d8ce60a7d8524" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.8", + "derivative", + "environmental", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-weights 24.0.0", + "xcm-procedural 4.0.0", +] + +[[package]] +name = "staging-xcm" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "407cc6e4b9cd1b62df9270d921d94ed375e697d65a782975d5e5a5f85bbeafb5" +dependencies = [ + "bounded-collections 0.1.8", + "derivative", + "environmental", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-weights 26.0.0", + "xcm-procedural 6.0.0", +] + +[[package]] +name = "staging-xcm" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ccecaeae5eca8453760e96fcf65481b19898459971842004732e88cd3570741" +dependencies = [ + "array-bytes 6.1.0", + "bounded-collections 0.2.0", "derivative", "environmental", "impl-trait-for-tuples", @@ -12405,8 +17086,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-weights", - "xcm-procedural", + "sp-weights 28.0.0", + "xcm-procedural 8.0.0", ] [[package]] @@ -12415,21 +17096,67 @@ version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8628fd8878df3978a34da0ef75722b118f4bc40bb47fb3c687cc0899f7ede43c" dependencies = [ - "frame-support", - "frame-system", + "frame-support 25.0.0", + "frame-system 25.0.0", + "impl-trait-for-tuples", + "log", + "pallet-transaction-payment 25.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 3.0.0", + "scale-info", + "sp-arithmetic 20.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-weights 24.0.0", + "staging-xcm 4.0.0", + "staging-xcm-executor 4.0.2", +] + +[[package]] +name = "staging-xcm-builder" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1c24e7dab7298f4a3fd346a900745af2b34691ed95eec641e25ad13679c0456" +dependencies = [ + "frame-support 27.0.0", + "frame-system 27.0.0", + "impl-trait-for-tuples", + "log", + "pallet-transaction-payment 27.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 5.0.0", + "scale-info", + "sp-arithmetic 22.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-weights 26.0.0", + "staging-xcm 6.0.0", + "staging-xcm-executor 6.0.2", +] + +[[package]] +name = "staging-xcm-builder" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e8c74e3d5b47173a22ad468ab28aeb88cfb92b742fa91a95fe1a8230c2365f" +dependencies = [ + "frame-support 29.0.0", + "frame-system 29.0.0", "impl-trait-for-tuples", "log", - "pallet-transaction-payment", + "pallet-transaction-payment 29.0.0", "parity-scale-codec", - "polkadot-parachain-primitives", + "polkadot-parachain-primitives 7.0.0", "scale-info", - "sp-arithmetic", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", - "staging-xcm", - "staging-xcm-executor", + "sp-arithmetic 24.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-weights 28.0.0", + "staging-xcm 8.0.0", + "staging-xcm-executor 8.0.0", ] [[package]] @@ -12439,18 +17166,62 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49bc3b2b8429aacca1897c72b786e7c21d36170a919e9333fe533868d32d2774" dependencies = [ "environmental", - "frame-benchmarking", - "frame-support", + "frame-benchmarking 25.0.0", + "frame-support 25.0.0", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-weights 24.0.0", + "staging-xcm 4.0.0", +] + +[[package]] +name = "staging-xcm-executor" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e329638f105e28b500e31062834e1011be8a81326a8499fe2f1557e924dbe54" +dependencies = [ + "environmental", + "frame-benchmarking 27.0.0", + "frame-support 27.0.0", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-weights 26.0.0", + "staging-xcm 6.0.0", +] + +[[package]] +name = "staging-xcm-executor" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "666e4c4fb7b1e91342a54281cb15bda81e17b795c6072f8b4892946249c03922" +dependencies = [ + "environmental", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", - "staging-xcm", + "scale-info", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-weights 28.0.0", + "staging-xcm 8.0.0", ] [[package]] @@ -12487,6 +17258,19 @@ dependencies = [ "syn 1.0.109", ] +[[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.4.1", + "zeroize", +] + [[package]] name = "strsim" version = "0.10.0" @@ -12536,13 +17320,13 @@ dependencies = [ [[package]] name = "substrate-bip39" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" +checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", - "schnorrkel", + "schnorrkel 0.9.1", "sha2 0.9.9", "zeroize", ] @@ -12585,16 +17369,16 @@ dependencies = [ [[package]] name = "substrate-rpc-client" -version = "0.30.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5575c2bef89385e5406565b8fe5620856d414e3846c60927a78f0788cb288c8c" +checksum = "7fa0743d9665e00acaed5800e605ee7c977eafbb2dfa86cbceda2708fe8d6ac3" dependencies = [ "async-trait", "jsonrpsee", "log", - "sc-rpc-api", + "sc-rpc-api 0.32.0", "serde", - "sp-runtime", + "sp-runtime 30.0.1", ] [[package]] @@ -12618,7 +17402,26 @@ dependencies = [ "cargo_metadata", "filetime", "parity-wasm", - "sp-maybe-compressed-blob", + "sp-maybe-compressed-blob 9.0.0", + "strum", + "tempfile", + "toml 0.7.6", + "walkdir", + "wasm-opt", +] + +[[package]] +name = "substrate-wasm-builder" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc8166be0b5e24dc91209ec92869bfa6e0fbe07e64ebc7e92242121c04a83e2d" +dependencies = [ + "ansi_term", + "build-helper", + "cargo_metadata", + "filetime", + "parity-wasm", + "sp-maybe-compressed-blob 10.0.0", "strum", "tempfile", "toml 0.7.6", @@ -12669,6 +17472,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn-solidity" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b837ef12ab88835251726eb12237655e61ec8dc8a280085d1961cdc3dfd047" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "synstructure" version = "0.12.6" @@ -12706,14 +17521,14 @@ dependencies = [ name = "system-parachains-constants" version = "1.0.0" dependencies = [ - "frame-support", + "frame-support 27.0.0", "kusama-runtime-constants", - "parachains-common", - "polkadot-core-primitives", - "polkadot-primitives", + "parachains-common 6.0.0", + "polkadot-core-primitives 6.0.0", + "polkadot-primitives 6.0.0", "polkadot-runtime-constants", "smallvec", - "sp-runtime", + "sp-runtime 30.0.1", ] [[package]] @@ -12750,6 +17565,16 @@ 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.8", + "windows-sys 0.48.0", +] + [[package]] name = "termtree" version = "0.4.1" @@ -12758,18 +17583,18 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.48" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.48" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", @@ -12923,9 +17748,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.32.0" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ "backtrace", "bytes", @@ -12935,16 +17760,16 @@ dependencies = [ "parking_lot 0.12.1", "pin-project-lite 0.2.12", "signal-hook-registry", - "socket2 0.5.3", + "socket2 0.5.5", "tokio-macros", "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", @@ -13034,9 +17859,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] @@ -13067,6 +17892,17 @@ dependencies = [ "winnow", ] +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap 2.0.0", + "toml_datetime", + "winnow", +] + [[package]] name = "tower" version = "0.4.13" @@ -13134,9 +17970,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -13159,8 +17995,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32c0555bd635d9adbf8dec0bf45f7c2aef7541121d648ba37f5f792a211077b6" dependencies = [ "coarsetime", - "polkadot-node-jaeger", - "polkadot-primitives", + "polkadot-node-jaeger 4.0.0", + "polkadot-primitives 4.0.0", + "tracing", + "tracing-gum-proc-macro", +] + +[[package]] +name = "tracing-gum" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11fe5d66dd9124c5b7a7f891b411ed7b98d06645fd61ca8b4895c2ad7fabd876" +dependencies = [ + "coarsetime", + "polkadot-primitives 6.0.0", "tracing", "tracing-gum-proc-macro", ] @@ -13339,6 +18187,12 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + [[package]] name = "uint" version = "0.9.5" @@ -13351,6 +18205,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + [[package]] name = "unicode-bidi" version = "0.3.13" @@ -13481,8 +18341,8 @@ dependencies = [ "ark-bls12-377", "ark-bls12-381", "ark-ec", - "ark-ff", - "ark-serialize", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", "ark-serialize-derive", "arrayref", "constcat", @@ -13496,6 +18356,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + [[package]] name = "waitgroup" version = "0.1.2" @@ -14151,14 +19020,30 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "682c32c5f5e6d51c431bf66c33fc502c66e7b25488c0bd92f5ee020c329f2beb" dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", + "frame-support 25.0.0", + "polkadot-primitives 4.0.0", + "polkadot-runtime-common 4.0.0", + "smallvec", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-weights 24.0.0", + "staging-xcm 4.0.0", +] + +[[package]] +name = "westend-runtime-constants" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "116510890fa55b4c21f10691872dadd912be73ac444edd3df60c6237a65c5b4e" +dependencies = [ + "frame-support 27.0.0", + "polkadot-primitives 6.0.0", + "polkadot-runtime-common 6.0.0", "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", - "staging-xcm", + "sp-core 27.0.0", + "sp-runtime 30.0.1", + "sp-weights 26.0.0", + "staging-xcm 6.0.0", ] [[package]] @@ -14559,35 +19444,36 @@ dependencies = [ [[package]] name = "xcm-emulator" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd344ca12e6217fbbc6ee27bedb01113357ea31bea198e74b76f618102b6f06c" +checksum = "0347ee7c717126822e99192e15dee53ff439ad88ac3181af7b2d4aa52b5539c9" dependencies = [ - "cumulus-pallet-parachain-system", - "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", - "cumulus-test-relay-sproof-builder", - "frame-support", - "frame-system", + "cumulus-pallet-parachain-system 0.6.0", + "cumulus-pallet-xcmp-queue 0.6.0", + "cumulus-primitives-core 0.6.0", + "cumulus-primitives-parachain-inherent 0.6.0", + "cumulus-test-relay-sproof-builder 0.6.0", + "frame-support 27.0.0", + "frame-system 27.0.0", "impl-trait-for-tuples", "lazy_static", "log", - "pallet-balances", - "pallet-message-queue", - "parachains-common", + "pallet-balances 27.0.0", + "pallet-message-queue 30.0.0", + "parachains-common 6.0.0", "parity-scale-codec", "paste", - "polkadot-parachain-primitives", - "polkadot-primitives", - "polkadot-runtime-parachains", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-tracing", - "staging-xcm", - "staging-xcm-executor", + "polkadot-parachain-primitives 5.0.0", + "polkadot-primitives 6.0.0", + "polkadot-runtime-parachains 6.0.0", + "sp-arithmetic 22.0.0", + "sp-core 27.0.0", + "sp-io 29.0.0", + "sp-runtime 30.0.1", + "sp-std 13.0.0", + "sp-tracing 15.0.0", + "staging-xcm 6.0.0", + "staging-xcm-executor 6.0.2", ] [[package]] @@ -14602,6 +19488,30 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "xcm-procedural" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37861444391815dfe05f3ee1039d19e7c82db319976832e8233729bd355de223" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "xcm-procedural" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4717a97970a9cda70d7db53cf50d2615c2f6f6b7c857445325b4a39ea7aa2cd" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "yamux" version = "0.10.2" diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index ab5e661c3f..a3c526fed0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -93,7 +93,7 @@ bp-relayers = { default-features = false , version = "0.6.0" } bp-runtime = { default-features = false , version = "0.6.0" } bp-kusama = { default-features = false , version = "0.4.0" } bp-polkadot = { default-features = false , version = "0.4.0" } -bridge-hub-common = { default-features = false , version = "0.4.0" } #todo publish +bridge-hub-common = { default-features = false , version = "0.1.0" } bridge-runtime-common = { default-features = false , version = "0.6.0" } pallet-bridge-grandpa = { default-features = false , version = "0.6.0" } pallet-bridge-messages = { default-features = false , version = "0.6.0" } @@ -287,9 +287,6 @@ try-runtime = [ ] experimental = [ "pallet-aura/experimental" ] -beacon-spec-mainnet = [ - "snowbridge-pallet-ethereum-client/beacon-spec-mainnet", -] # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 668bf084dc..4de86e1f04 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -93,7 +93,7 @@ bp-relayers = { default-features = false , version = "0.6.0" } bp-runtime = { default-features = false , version = "0.6.0" } bp-kusama = { default-features = false , version = "0.4.0" } bp-polkadot = { default-features = false , version = "0.4.0" } -bridge-hub-common = { default-features = false , version = "0.4.0" } #todo publish +bridge-hub-common = { default-features = false , version = "0.1.0" } bridge-runtime-common = { default-features = false , version = "0.6.0" } pallet-bridge-grandpa = { default-features = false , version = "0.6.0" } pallet-bridge-messages = { default-features = false , version = "0.6.0" } @@ -286,9 +286,6 @@ try-runtime = [ ] experimental = [ "pallet-aura/experimental" ] -beacon-spec-mainnet = [ - "snowbridge-pallet-ethereum-client/beacon-spec-mainnet", -] # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm From e7dffeaa8c3b9d03cae5181ed03500e846bd38f7 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 13 Feb 2024 15:26:59 +0100 Subject: [PATCH 108/316] [collectives] Removed older TODOs - addresing https://github.com/polkadot-fellows/runtimes/issues/113 --- .../src/fellowship/mod.rs | 53 ++----------------- 1 file changed, 4 insertions(+), 49 deletions(-) diff --git a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs index fb2c340a88..0bd759dc7c 100644 --- a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs @@ -24,7 +24,7 @@ use crate::{ xcm_config::{LocationToAccountId, TreasurerBodyId}, AccountId, AssetRate, Balance, Balances, FellowshipReferenda, GovernanceLocation, PolkadotTreasuryAccount, Preimage, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, - Scheduler, DAYS, + Scheduler, DAYS, FELLOWSHIP_TREASURY_PALLET_ID, }; use cumulus_primitives_core::Junction::GeneralIndex; use frame_support::{ @@ -253,9 +253,7 @@ impl pallet_salary::Config for Runtime { } parameter_types! { - // TODO: reference the constant value from common crate when polkadot-sdk 1.5 is released. - // https://github.com/polkadot-fellows/runtimes/issues/113 - pub const FellowshipTreasuryPalletId: PalletId = PalletId(*b"py/feltr"); + pub const FellowshipTreasuryPalletId: PalletId = FELLOWSHIP_TREASURY_PALLET_ID; pub const ProposalBond: Permill = Permill::from_percent(100); pub const Burn: Permill = Permill::from_percent(0); pub const MaxBalance: Balance = Balance::max_value(); @@ -284,9 +282,7 @@ impl pallet_treasury::Config for Runtime { // Instead, public or fellowship referenda should be used to propose and command the treasury // spend or spend_local dispatchables. The parameters below have been configured accordingly to // discourage its use. - // TODO: replace with `NeverEnsure` once polkadot-sdk 1.5 is released. - // https://github.com/polkadot-fellows/runtimes/issues/113 - type ApproveOrigin = EnsureRoot; + type ApproveOrigin = frame_support::traits::NeverEnsureOrigin; type OnSlash = (); type ProposalBond = ProposalBond; type ProposalBondMinimum = MaxBalance; @@ -329,46 +325,5 @@ impl pallet_treasury::Config for Runtime { type BalanceConverter = AssetRate; type PayoutPeriod = ConstU32<{ 30 * DAYS }>; #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = benchmarks::TreasuryArguments, ConstU32<1000>>; -} - -// TODO: replace by [`polkadot_runtime_common::impls::benchmarks::TreasuryArguments`] when -// polkadot-sdk 1.5 is released. -// https://github.com/polkadot-fellows/runtimes/issues/113 -#[cfg(feature = "runtime-benchmarks")] -mod benchmarks { - use super::VersionedLocatableAsset; - use core::marker::PhantomData; - use frame_support::traits::Get; - use pallet_treasury::ArgumentsFactory as TreasuryArgumentsFactory; - use sp_core::{ConstU32, ConstU8}; - use xcm::prelude::*; - - /// Provide factory methods for the [`VersionedLocatableAsset`] and the `Beneficiary` of the - /// [`VersionedMultiLocation`]. The location of the asset is determined as a Parachain with an - /// ID equal to the passed seed. - pub struct TreasuryArguments, ParaId = ConstU32<0>>( - PhantomData<(Parents, ParaId)>, - ); - impl, ParaId: Get> - TreasuryArgumentsFactory - for TreasuryArguments - { - fn create_asset_kind(seed: u32) -> VersionedLocatableAsset { - VersionedLocatableAsset::V3 { - location: xcm::v3::MultiLocation::new(Parents::get(), X1(Parachain(ParaId::get()))), - asset_id: xcm::v3::MultiLocation::new( - 0, - X2(PalletInstance(seed.try_into().unwrap()), GeneralIndex(seed.into())), - ) - .into(), - } - } - fn create_beneficiary(seed: [u8; 32]) -> VersionedMultiLocation { - VersionedMultiLocation::V3(xcm::v3::MultiLocation::new( - 0, - X1(AccountId32 { network: None, id: seed }), - )) - } - } + type BenchmarkHelper = polkadot_runtime_common::impls::benchmarks::TreasuryArguments; } From 84cbfa69e045b85c2ed7afc1165b981b9c0bd39a Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 13 Feb 2024 16:51:49 +0200 Subject: [PATCH 109/316] update versions --- .config/zepter.yaml | 40 + Cargo.lock | 798 +++++++++++++++++- chain-spec-generator/Cargo.toml | 7 + .../assets/asset-hub-kusama/Cargo.toml | 15 +- .../assets/asset-hub-polkadot/Cargo.toml | 14 +- integration-tests/emulated/chains/Cargo.toml | 19 +- relay/kusama/src/xcm_config.rs | 2 +- relay/polkadot/src/xcm_config.rs | 2 +- .../asset-hubs/asset-hub-kusama/Cargo.toml | 5 +- .../asset-hubs/asset-hub-kusama/src/lib.rs | 9 +- .../asset-hub-kusama/src/xcm_config.rs | 24 +- .../asset-hubs/asset-hub-polkadot/Cargo.toml | 6 +- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 5 +- .../asset-hub-polkadot/src/xcm_config.rs | 7 +- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 1 + .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 2 +- .../bridge-hub-kusama/src/weights/mod.rs | 8 +- .../snowbridge_ethereum_beacon_client.rs | 151 ---- .../src/weights/snowbridge_outbound_queue.rs | 87 -- .../snowbridge_pallet_ethereum_client.rs | 151 ++++ .../snowbridge_pallet_inbound_queue.rs} | 46 +- .../snowbridge_pallet_outbound_queue.rs | 87 ++ .../src/weights/snowbridge_pallet_system.rs | 256 ++++++ .../src/weights/snowbridge_system.rs | 256 ------ .../bridge-hub-polkadot/Cargo.toml | 2 + .../bridge-hub-polkadot/src/lib.rs | 7 +- .../bridge-hub-polkadot/src/weights/mod.rs | 4 + .../snowbridge_ethereum_beacon_client.rs | 151 ---- .../src/weights/snowbridge_outbound_queue.rs | 87 -- .../snowbridge_pallet_ethereum_client.rs | 151 ++++ .../snowbridge_pallet_inbound_queue.rs} | 46 +- .../snowbridge_pallet_outbound_queue.rs | 87 ++ .../src/weights/snowbridge_pallet_system.rs | 256 ++++++ .../src/weights/snowbridge_system.rs | 256 ------ .../collectives-polkadot/Cargo.toml | 3 + .../collectives-polkadot/src/xcm_config.rs | 2 +- system-parachains/constants/Cargo.toml | 2 + system-parachains/encointer/Cargo.toml | 256 +++--- .../gluttons/glutton-kusama/Cargo.toml | 1 + 39 files changed, 2080 insertions(+), 1229 deletions(-) create mode 100644 .config/zepter.yaml delete mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_ethereum_beacon_client.rs delete mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_outbound_queue.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_ethereum_client.rs rename system-parachains/bridge-hubs/{bridge-hub-polkadot/src/weights/snowbridge_inbound_queue.rs => bridge-hub-kusama/src/weights/snowbridge_pallet_inbound_queue.rs} (51%) create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_outbound_queue.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_system.rs delete mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_system.rs delete mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_ethereum_beacon_client.rs delete mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_outbound_queue.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_ethereum_client.rs rename system-parachains/bridge-hubs/{bridge-hub-kusama/src/weights/snowbridge_inbound_queue.rs => bridge-hub-polkadot/src/weights/snowbridge_pallet_inbound_queue.rs} (50%) create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_outbound_queue.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_system.rs delete mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_system.rs diff --git a/.config/zepter.yaml b/.config/zepter.yaml new file mode 100644 index 0000000000..f701392d16 --- /dev/null +++ b/.config/zepter.yaml @@ -0,0 +1,40 @@ +version: + format: 1 + # Minimum version of the binary that is expected to work. This is just for printing a nice error + # message when someone tries to use an older version. + binary: 0.13.2 + +# The examples in this file assume crate `A` to have a dependency on crate `B`. +workflows: + check: + - [ + 'lint', + # Check that `A` activates the features of `B`. + 'propagate-feature', + # These are the features to check: + '--features=try-runtime,runtime-benchmarks,std', + # Do not try to add a new section into `[features]` of `A` only because `B` expose that feature. There are edge-cases where this is still needed, but we can add them manually. + '--left-side-feature-missing=ignore', + # Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on. + '--left-side-outside-workspace=ignore', + # Some features imply that they activate a specific dependency as non-optional. Otherwise the default behaviour with a `?` is used. + '--feature-enables-dep=try-runtime:frame-try-runtime,runtime-benchmarks:frame-benchmarking', + # Auxillary flags: + '--offline', + '--locked', + '--show-path', + '--quiet', + ] + # Same as `check`, but with the `--fix` flag. + default: + - [ $check.0, '--fix' ] + +# Will be displayed when any workflow fails: +help: + text: | + Polkadot-SDK uses the Zepter CLI to detect abnormalities in the feature configuration. + It looks like one more more checks failed; please check the console output. You can try to automatically address them by running `zepter`. + Otherwise please ask directly in the Merge Request, GitHub Discussions or on Matrix Chat, thank you. + links: + - "https://github.com/paritytech/polkadot-sdk/issues/1831" + - "https://github.com/ggwpez/zepter" diff --git a/Cargo.lock b/Cargo.lock index f5174351b4..edc568d9b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -680,7 +680,7 @@ dependencies = [ "emulated-chains", "frame-support 27.0.0", "integration-tests-common", - "pallet-asset-conversion", + "pallet-asset-conversion 9.0.0", "pallet-assets 28.0.0", "pallet-balances 27.0.0", "pallet-message-queue 30.0.0", @@ -699,7 +699,7 @@ name = "asset-hub-kusama-runtime" version = "1.0.0" dependencies = [ "asset-test-utils", - "assets-common", + "assets-common 0.8.0", "bp-asset-hub-kusama", "bp-asset-hub-polkadot", "bp-bridge-hub-kusama", @@ -722,7 +722,7 @@ dependencies = [ "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-conversion", + "pallet-asset-conversion 9.0.0", "pallet-asset-conversion-tx-payment", "pallet-assets 28.0.0", "pallet-aura 26.0.0", @@ -806,7 +806,7 @@ name = "asset-hub-polkadot-runtime" version = "1.0.0" dependencies = [ "asset-test-utils", - "assets-common", + "assets-common 0.8.0", "bp-asset-hub-kusama", "bp-asset-hub-polkadot", "bp-bridge-hub-kusama", @@ -888,7 +888,7 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e667143b26882e0f67cf028814d46f92671655085e47604cc0e0b62579fee24" dependencies = [ - "assets-common", + "assets-common 0.6.0", "cumulus-pallet-parachain-system 0.6.0", "cumulus-pallet-xcmp-queue 0.6.0", "cumulus-primitives-core 0.6.0", @@ -928,7 +928,7 @@ dependencies = [ "frame-support 27.0.0", "impl-trait-for-tuples", "log", - "pallet-asset-conversion", + "pallet-asset-conversion 9.0.0", "pallet-asset-tx-payment 27.0.0", "pallet-xcm 6.0.0", "parachains-common 6.0.0", @@ -943,6 +943,30 @@ dependencies = [ "substrate-wasm-builder 16.0.0", ] +[[package]] +name = "assets-common" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65e90021d772c2dd82d45fd085e05a2cb5866464d4c7421ac6a8007733b350bb" +dependencies = [ + "cumulus-primitives-core 0.8.0", + "frame-support 29.0.0", + "impl-trait-for-tuples", + "log", + "pallet-asset-conversion 11.0.0", + "pallet-xcm 8.0.0", + "parachains-common 8.0.0", + "parity-scale-codec", + "scale-info", + "sp-api 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", + "substrate-wasm-builder 18.0.0", +] + [[package]] name = "async-channel" version = "1.9.0" @@ -2409,15 +2433,15 @@ dependencies = [ [[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]] @@ -3242,6 +3266,28 @@ dependencies = [ "staging-xcm-executor 6.0.2", ] +[[package]] +name = "cumulus-primitives-utility" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "610400dd0bbafde20db3dfccc50540f7ace05e169d93acce2b86008984ea70f7" +dependencies = [ + "cumulus-primitives-core 0.8.0", + "frame-support 29.0.0", + "log", + "pallet-asset-conversion 11.0.0", + "pallet-xcm-benchmarks 8.0.0", + "parity-scale-codec", + "polkadot-runtime-common 8.0.0", + "polkadot-runtime-parachains 8.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + [[package]] name = "cumulus-relay-chain-interface" version = "0.4.0" @@ -3702,7 +3748,7 @@ dependencies = [ "regex", "syn 2.0.48", "termcolor", - "toml 0.8.2", + "toml 0.8.10", "walkdir", ] @@ -4545,13 +4591,25 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "frame-election-provider-solution-type" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5c3bff645e46577c69c272733c53fa3a77d1ee6e40dfb66157bc94b0740b8fc" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "frame-election-provider-support" version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebad507fb038db2f7ce982d30bd9828a59785c9a4780348d59cd6cceaee80d1a" dependencies = [ - "frame-election-provider-solution-type", + "frame-election-provider-solution-type 12.0.0", "frame-support 25.0.0", "frame-system 25.0.0", "parity-scale-codec", @@ -4569,7 +4627,7 @@ version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d26d8dabf04394bb59a44e41664984289c2b5b28d565193fac49695db846f167" dependencies = [ - "frame-election-provider-solution-type", + "frame-election-provider-solution-type 12.0.0", "frame-support 27.0.0", "frame-system 27.0.0", "parity-scale-codec", @@ -4581,6 +4639,24 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "frame-election-provider-support" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87da19ee99e6473cd057ead84337d20011fe5e299c6750e88e43b8b7963b8852" +dependencies = [ + "frame-election-provider-solution-type 13.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "parity-scale-codec", + "scale-info", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-npos-elections 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "frame-executive" version = "25.0.0" @@ -7621,7 +7697,7 @@ dependencies = [ "frame-system 27.0.0", "log", "pallet-collective 27.0.0", - "pallet-identity", + "pallet-identity 27.0.0", "parity-scale-codec", "scale-info", "sp-core 27.0.0", @@ -7650,6 +7726,25 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-asset-conversion" +version = "11.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4079f12db3cf98daa717337ab5b7e5ef15aa3bec3b497f501dc715d129b500da" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "parity-scale-codec", + "scale-info", + "sp-api 27.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-asset-conversion-tx-payment" version = "9.0.0" @@ -7658,7 +7753,7 @@ checksum = "80810624ea3a3bab34568a45c7abca5777d60ed6312e271d04893ee5e69e002e" dependencies = [ "frame-support 27.0.0", "frame-system 27.0.0", - "pallet-asset-conversion", + "pallet-asset-conversion 9.0.0", "pallet-transaction-payment 27.0.0", "parity-scale-codec", "scale-info", @@ -7698,6 +7793,22 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-asset-rate" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "571ce57fd846911041749832b46a8c2b01f0b79ffebcd7585e3973865607036d" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "parity-scale-codec", + "scale-info", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-asset-tx-payment" version = "25.0.0" @@ -7736,6 +7847,25 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-asset-tx-payment" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed783679921ad8b96807d683d320c314e305753b230d5c04dc713bab7aca64c" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "pallet-transaction-payment 29.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-assets" version = "26.0.0" @@ -7770,6 +7900,23 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-assets" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46728a98a910af13f6a77033dd053456650773bb7adc71e0ba845bff7e31b33e" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-aura" version = "24.0.0" @@ -7840,6 +7987,23 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-authority-discovery" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "904f83f518b396c4fd1634fb675a36db0841f22420d3aa664bc154bee6035f57" +dependencies = [ + "frame-support 29.0.0", + "frame-system 29.0.0", + "pallet-session 29.0.0", + "parity-scale-codec", + "scale-info", + "sp-application-crypto 31.0.0", + "sp-authority-discovery 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-authorship" version = "25.0.0" @@ -7870,6 +8034,21 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-authorship" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d83773e731a1760f99684b09961ed7b92acafe335f36f08ebb8313d3b9c72e2" +dependencies = [ + "frame-support 29.0.0", + "frame-system 29.0.0", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-babe" version = "25.0.0" @@ -7920,6 +8099,31 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-babe" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3f2020c52667a650d64e84a4bbb63388e25bc1c9bc872a8243d03bfcb285049" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "pallet-authorship 29.0.0", + "pallet-session 29.0.0", + "pallet-timestamp 28.0.0", + "parity-scale-codec", + "scale-info", + "sp-application-crypto 31.0.0", + "sp-consensus-babe 0.33.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-staking 27.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-bags-list" version = "26.0.0" @@ -8142,6 +8346,24 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-broker" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd8cfe04e8c3f9ca8342ac785f2b1aee6140e1809546fc6f3a99fad20a8dfbf9" +dependencies = [ + "bitvec", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "parity-scale-codec", + "scale-info", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-child-bounties" version = "26.0.0" @@ -8202,6 +8424,26 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-collator-selection" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59b5ad46601c613396e92292a24c5b5d76e904c456ece9deb10913f6ea2e2999" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "pallet-authorship 29.0.0", + "pallet-session 29.0.0", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-collective" version = "25.0.0" @@ -8342,6 +8584,30 @@ dependencies = [ "strum", ] +[[package]] +name = "pallet-election-provider-multi-phase" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b54d1d3fe9ae61a144d581147e699b7c3009169de0019a0f87cca0bed82681e7" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "pallet-election-provider-support-benchmarking 28.0.0", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-npos-elections 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "strum", +] + [[package]] name = "pallet-election-provider-support-benchmarking" version = "24.0.0" @@ -8372,6 +8638,21 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-election-provider-support-benchmarking" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46ec87816a1e32a1ab6deececa99e21e6684b111efe87b11b8298328dbbefd01" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-system 29.0.0", + "parity-scale-codec", + "sp-npos-elections 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-elections-phragmen" version = "28.0.0" @@ -8615,6 +8896,26 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-fast-unstake" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2222607a0dba10a9d57cab5360a6549b5fda925181c3c7af481246c0964998df" +dependencies = [ + "docify", + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-glutton" version = "13.0.0" @@ -8675,6 +8976,24 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-identity" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9e1cae19e30e7dc822c419988b30bb1318d79a8d5da92733822d0e84fe760ca" +dependencies = [ + "enumflags2", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-im-online" version = "26.0.0" @@ -9155,6 +9474,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3508a51d359c6640577feead9dc00667f38cec385baad77b636c61ff746ffe24" dependencies = [ "docify", + "frame-benchmarking 25.0.0", "frame-support 25.0.0", "frame-system 25.0.0", "log", @@ -9231,6 +9551,29 @@ dependencies = [ "sp-trie 28.0.0", ] +[[package]] +name = "pallet-session" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7412ac59247b300feee53709f7009a23d1c6f8c70528599f48f44e102d896d03" +dependencies = [ + "frame-support 29.0.0", + "frame-system 29.0.0", + "impl-trait-for-tuples", + "log", + "pallet-timestamp 28.0.0", + "parity-scale-codec", + "scale-info", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-staking 27.0.0", + "sp-state-machine 0.36.0", + "sp-std 14.0.0", + "sp-trie 30.0.0", +] + [[package]] name = "pallet-session-benchmarking" version = "27.0.0" @@ -9316,6 +9659,30 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-staking" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a94127295cf027a26e933ea6788b0824e9fedd90740013673e2d36b5d707efe" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "pallet-authorship 29.0.0", + "pallet-session 29.0.0", + "parity-scale-codec", + "rand_chacha 0.2.2", + "scale-info", + "serde", + "sp-application-crypto 31.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-staking-reward-curve" version = "10.0.0" @@ -9348,6 +9715,16 @@ dependencies = [ "sp-arithmetic 22.0.0", ] +[[package]] +name = "pallet-staking-reward-fn" +version = "20.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "505d45e08bad052f55fb51f00a6b6244d23ee46ffdc8091f6cddf4e3a880319d" +dependencies = [ + "log", + "sp-arithmetic 24.0.0", +] + [[package]] name = "pallet-staking-runtime-api" version = "13.0.0" @@ -9594,6 +9971,26 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-treasury" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1605eb5083a2cd172544f33c6e59eca2e23ac49f02f13d1562b1b8a409df9c60" +dependencies = [ + "docify", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "impl-trait-for-tuples", + "pallet-balances 29.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-uniques" version = "27.0.0" @@ -9676,6 +10073,22 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-vesting" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4525f3038cdf078fea39d913c563ca626f09a615e7724f0c9eac97743c75ff44" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-whitelist" version = "26.0.0" @@ -9738,6 +10151,30 @@ dependencies = [ "staging-xcm-executor 6.0.2", ] +[[package]] +name = "pallet-xcm" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16bda69e8f69123ff81a6d60479fd91b9794f07a24959ced406f5fccbf77482c" +dependencies = [ + "bounded-collections 0.2.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "pallet-balances 29.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + [[package]] name = "pallet-xcm-benchmarks" version = "4.0.1" @@ -9778,6 +10215,26 @@ dependencies = [ "staging-xcm-executor 6.0.2", ] +[[package]] +name = "pallet-xcm-benchmarks" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c8e616fcc03682d06f6127f8ae6e31082fc97f795fc4adf8ce67735d7342aea" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + [[package]] name = "pallet-xcm-bridge-hub" version = "0.1.0" @@ -9893,13 +10350,45 @@ dependencies = [ "westend-runtime-constants 6.0.0", ] +[[package]] +name = "parachains-common" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34aa00981a24a2b772afaa49e258f9bcd6bb372db060a05614becc1c74d4456" +dependencies = [ + "cumulus-primitives-core 0.8.0", + "cumulus-primitives-utility 0.8.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "pallet-asset-tx-payment 29.0.0", + "pallet-assets 30.0.0", + "pallet-authorship 29.0.0", + "pallet-balances 29.0.0", + "pallet-collator-selection 10.0.0", + "pallet-message-queue 32.0.0", + "pallet-xcm 8.0.0", + "parity-scale-codec", + "polkadot-primitives 8.0.0", + "scale-info", + "sp-consensus-aura 0.33.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-parachain-info 0.8.0", + "staging-xcm 8.0.0", + "staging-xcm-executor 8.0.0", + "substrate-wasm-builder 18.0.0", +] + [[package]] name = "parachains-runtimes-test-utils" version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34682787ee935f35aa45044637f9557c0b313d91453b41016724574e6193f493" dependencies = [ - "assets-common", + "assets-common 0.6.0", "cumulus-pallet-parachain-system 0.6.0", "cumulus-pallet-xcmp-queue 0.6.0", "cumulus-primitives-core 0.6.0", @@ -10775,7 +11264,7 @@ dependencies = [ "pallet-elections-phragmen", "pallet-fast-unstake 26.0.0", "pallet-grandpa", - "pallet-identity", + "pallet-identity 27.0.0", "pallet-im-online", "pallet-indices", "pallet-membership 27.0.0", @@ -10923,7 +11412,7 @@ dependencies = [ "pallet-balances 27.0.0", "pallet-election-provider-multi-phase 26.0.0", "pallet-fast-unstake 26.0.0", - "pallet-identity", + "pallet-identity 27.0.0", "pallet-session 27.0.0", "pallet-staking 27.0.0", "pallet-staking-reward-fn 18.0.0", @@ -10955,6 +11444,59 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "polkadot-runtime-common" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4332f736bf9859c2f66d4db0f68f686a764c1e185392ecfc5e98efb53af05af" +dependencies = [ + "bitvec", + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "impl-trait-for-tuples", + "libsecp256k1", + "log", + "pallet-asset-rate 8.0.0", + "pallet-authorship 29.0.0", + "pallet-babe 29.0.0", + "pallet-balances 29.0.0", + "pallet-broker", + "pallet-election-provider-multi-phase 28.0.0", + "pallet-fast-unstake 28.0.0", + "pallet-identity 29.0.0", + "pallet-session 29.0.0", + "pallet-staking 29.0.0", + "pallet-staking-reward-fn 20.0.0", + "pallet-timestamp 28.0.0", + "pallet-transaction-payment 29.0.0", + "pallet-treasury 28.0.0", + "pallet-vesting 29.0.0", + "pallet-xcm-benchmarks 8.0.0", + "parity-scale-codec", + "polkadot-primitives 8.0.0", + "polkadot-runtime-parachains 8.0.0", + "rustc-hex", + "scale-info", + "serde", + "serde_derive", + "slot-range-helper 8.0.0", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-npos-elections 27.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-staking 27.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", + "static_assertions", +] + [[package]] name = "polkadot-runtime-constants" version = "1.0.0" @@ -10997,6 +11539,20 @@ dependencies = [ "sp-tracing 15.0.0", ] +[[package]] +name = "polkadot-runtime-metrics" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3566c6fd0c21b5dd555309427c984cf506f875ee90f710acea295b478fecbe0" +dependencies = [ + "bs58 0.5.0", + "frame-benchmarking 29.0.0", + "parity-scale-codec", + "polkadot-primitives 8.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", +] + [[package]] name = "polkadot-runtime-parachains" version = "4.0.0" @@ -11094,6 +11650,56 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "polkadot-runtime-parachains" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef42b7542a9c5b41ebf925d52bc0ce431232e01b0991b8c01a95f0f5f4eac0cf" +dependencies = [ + "bitflags 1.3.2", + "bitvec", + "derive_more", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "impl-trait-for-tuples", + "log", + "pallet-authority-discovery 29.0.0", + "pallet-authorship 29.0.0", + "pallet-babe 29.0.0", + "pallet-balances 29.0.0", + "pallet-broker", + "pallet-message-queue 32.0.0", + "pallet-session 29.0.0", + "pallet-staking 29.0.0", + "pallet-timestamp 28.0.0", + "pallet-vesting 29.0.0", + "parity-scale-codec", + "polkadot-core-primitives 8.0.0", + "polkadot-parachain-primitives 7.0.0", + "polkadot-primitives 8.0.0", + "polkadot-runtime-metrics 8.0.0", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rustc-hex", + "scale-info", + "serde", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-staking 27.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-executor 8.0.0", + "static_assertions", +] + [[package]] name = "polkadot-statement-table" version = "4.0.0" @@ -14202,9 +14808,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -14389,6 +14995,19 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "slot-range-helper" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d40fa5e14772407fd2ccffdd5971bf055bbf46a40727c0ea96d2bb6563d17e1c" +dependencies = [ + "enumn", + "parity-scale-codec", + "paste", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "smallvec" version = "1.13.1" @@ -15150,6 +15769,24 @@ dependencies = [ "sp-timestamp 25.0.0", ] +[[package]] +name = "sp-consensus-aura" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bf13c293685319751f72fa5216c7fb5f25f3e8e8fe29b4503296ed5f5466b3d" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-consensus-slots 0.33.0", + "sp-inherents 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-timestamp 27.0.0", +] + [[package]] name = "sp-consensus-babe" version = "0.29.0" @@ -15190,6 +15827,26 @@ dependencies = [ "sp-timestamp 25.0.0", ] +[[package]] +name = "sp-consensus-babe" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9be2f86a2f0ce2a78b455feb547aa27604fd76a7f7a691995cbad44e0b1b9dd" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-consensus-slots 0.33.0", + "sp-core 29.0.0", + "sp-inherents 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-timestamp 27.0.0", +] + [[package]] name = "sp-consensus-beefy" version = "12.0.0" @@ -15831,6 +16488,16 @@ dependencies = [ "zstd 0.12.4", ] +[[package]] +name = "sp-maybe-compressed-blob" +version = "11.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c768c11afbe698a090386876911da4236af199cd38a5866748df4d8628aeff" +dependencies = [ + "thiserror", + "zstd 0.12.4", +] + [[package]] name = "sp-metadata-ir" version = "0.4.0" @@ -15942,6 +16609,21 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "sp-npos-elections" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "195d7e1154c91cce5c3abc8c778689c3e5799da6411328dd32ac7a974c68e526" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "sp-offchain" version = "23.0.0" @@ -16211,6 +16893,22 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "sp-session" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b86531090cc04d2ab3535df07146258e2fb3ab6257b0a77ef14aa08282c3d4a" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", + "sp-std 14.0.0", +] + [[package]] name = "sp-staking" version = "23.0.0" @@ -16926,7 +17624,7 @@ dependencies = [ "pallet-elections-phragmen", "pallet-fast-unstake 26.0.0", "pallet-grandpa", - "pallet-identity", + "pallet-identity 27.0.0", "pallet-im-online", "pallet-indices", "pallet-membership 27.0.0", @@ -17035,6 +17733,21 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "staging-parachain-info" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7dc139d104f676a18c13380a09c3f72d59450a7471116387cbf8cb5f845a0e" +dependencies = [ + "cumulus-primitives-core 0.8.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "parity-scale-codec", + "scale-info", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "staging-xcm" version = "4.0.0" @@ -17429,6 +18142,25 @@ dependencies = [ "wasm-opt", ] +[[package]] +name = "substrate-wasm-builder" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "511bbc2df035f5fe2556d855369a1bbb45df620360391a1f6e3fa1a1d64af79a" +dependencies = [ + "build-helper", + "cargo_metadata", + "console", + "filetime", + "parity-wasm", + "sp-maybe-compressed-blob 11.0.0", + "strum", + "tempfile", + "toml 0.8.10", + "walkdir", + "wasm-opt", +] + [[package]] name = "substring" version = "1.4.5" @@ -17529,6 +18261,7 @@ dependencies = [ "polkadot-runtime-constants", "smallvec", "sp-runtime 30.0.1", + "staging-xcm 6.0.0", ] [[package]] @@ -17847,14 +18580,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.2" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.20.2", + "toml_edit 0.22.4", ] [[package]] @@ -17886,8 +18619,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ "indexmap 2.0.0", - "serde", - "serde_spanned", "toml_datetime", "winnow", ] @@ -17903,6 +18634,19 @@ dependencies = [ "winnow", ] +[[package]] +name = "toml_edit" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c9ffdf896f8daaabf9b66ba8e77ea1ed5ed0f72821b398aba62352e95062951" +dependencies = [ + "indexmap 2.0.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + [[package]] name = "tower" version = "0.4.13" @@ -18382,9 +19126,9 @@ checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index 79a4d87cca..608222be77 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -54,4 +54,11 @@ runtime-benchmarks = [ "polkadot-runtime/runtime-benchmarks", "encointer-kusama-runtime/runtime-benchmarks", "glutton-kusama-runtime/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks", + "pallet-im-online/runtime-benchmarks", + "pallet-staking/runtime-benchmarks", + "parachains-common/runtime-benchmarks", + "polkadot-primitives/runtime-benchmarks", + "polkadot-runtime-parachains/runtime-benchmarks", + "sp-runtime/runtime-benchmarks" ] diff --git a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml index 8e88b5b843..dc7068f23f 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml @@ -36,4 +36,17 @@ asset-hub-kusama-runtime = { path = "../../../../system-parachains/asset-hubs/as kusama-runtime = { package = "staging-kusama-runtime", path = "../../../../relay/kusama" } [features] -runtime-benchmarks = [] \ No newline at end of file +runtime-benchmarks = [ + "asset-hub-kusama-runtime/runtime-benchmarks", + "emulated-chains/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "pallet-asset-conversion/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "parachains-common/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "kusama-runtime/runtime-benchmarks", + "xcm-executor/runtime-benchmarks" +] diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml index 54656c75d0..81d1830fca 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml @@ -34,4 +34,16 @@ asset-hub-polkadot-runtime = { path = "../../../../system-parachains/asset-hubs/ polkadot-runtime = { path = "../../../../relay/polkadot" } [features] -runtime-benchmarks = [] \ No newline at end of file +runtime-benchmarks = [ + "asset-hub-polkadot-runtime/runtime-benchmarks", + "emulated-chains/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "parachains-common/runtime-benchmarks", + "polkadot-runtime/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "xcm-executor/runtime-benchmarks" +] diff --git a/integration-tests/emulated/chains/Cargo.toml b/integration-tests/emulated/chains/Cargo.toml index 9d2df663dc..bdcf9fbf13 100644 --- a/integration-tests/emulated/chains/Cargo.toml +++ b/integration-tests/emulated/chains/Cargo.toml @@ -44,5 +44,20 @@ integration-tests-common = { path = "../common" } [features] runtime-benchmarks = [ - "penpal-runtime/runtime-benchmarks", -] \ No newline at end of file + "penpal-runtime/runtime-benchmarks", + "asset-hub-kusama-runtime/runtime-benchmarks", + "asset-hub-polkadot-runtime/runtime-benchmarks", + "bridge-hub-kusama-runtime/runtime-benchmarks", + "bridge-hub-polkadot-runtime/runtime-benchmarks", + "collectives-polkadot-runtime/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "pallet-im-online/runtime-benchmarks", + "pallet-staking/runtime-benchmarks", + "parachains-common/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", + "polkadot-primitives/runtime-benchmarks", + "polkadot-runtime/runtime-benchmarks", + "polkadot-runtime-parachains/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "kusama-runtime/runtime-benchmarks" +] diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index 52a955d493..9cb1c0c5e7 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -42,7 +42,7 @@ use xcm_builder::{ IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeesToAccount, + XcmFeeManagerFromComponents, XcmFeeToAccount, }; parameter_types! { diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index ef1a73d398..12af781a2f 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -47,7 +47,7 @@ use xcm_builder::{ OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, - XcmFeesToAccount, + XcmFeeToAccount, }; parameter_types! { diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index fc19484e0b..a97661802a 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -90,7 +90,7 @@ pallet-collator-selection = { default-features = false , version = "8.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } parachains-common = { default-features = false , version = "6.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } -assets-common = { default-features = false , version = "0.6.0" } +assets-common = { default-features = false , version = "0.8.0" } # Bridges pallet-xcm-bridge-hub-router = { default-features = false , version = "0.4.0" } @@ -147,6 +147,8 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks", + "parachains-common/runtime-benchmarks" ] try-runtime = [ "cumulus-pallet-aura-ext/try-runtime", @@ -256,6 +258,7 @@ std = [ "xcm-builder/std", "xcm-executor/std", "xcm/std", + "primitive-types/std" ] experimental = [ "pallet-aura/experimental" ] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index a4ab45d854..8e0a425289 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -29,9 +29,8 @@ pub mod xcm_config; use assets_common::{ foreign_creators::ForeignCreators, - local_and_foreign_assets::{LocalAndForeignAssets, MultiLocationConverter}, matching::{FromNetwork, FromSiblingParachain}, - AssetIdForTrustBackedAssetsConvert, MultiLocationForAssetId, + AssetIdForTrustBackedAssetsConvert, }; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; @@ -93,7 +92,7 @@ use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use xcm::prelude::*; use crate::xcm_config::{ - ForeignCreatorsSovereignAccountOf, LocalAndForeignAssetsMultiLocationMatcher, + ForeignCreatorsSovereignAccountOf, TrustBackedAssetsPalletLocation, }; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; @@ -377,8 +376,8 @@ pub type ForeignAssetsInstance = pallet_assets::Instance2; impl pallet_assets::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; - type AssetId = MultiLocationForAssetId; - type AssetIdParameter = MultiLocationForAssetId; + type AssetId = xcm::v3::MultiLocation; + type AssetIdParameter = xcm::v3::MultiLocation; type Currency = Balances; type CreateOrigin = ForeignCreators< ( diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 1298330bf6..f2f7e419dd 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -21,7 +21,6 @@ use super::{ }; use crate::{ForeignAssets, ForeignAssetsInstance}; use assets_common::{ - local_and_foreign_assets::MatchesLocalAndForeignAssetsMultiLocation, matching::{FromNetwork, FromSiblingParachain, IsForeignConcreteAsset}, }; use frame_support::{ @@ -50,10 +49,10 @@ use xcm_builder::{ EnsureXcmOrigin, FrameTransactionalProcessor, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignPaidRemoteExporter, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeesToAccount, + XcmFeeManagerFromComponents, XcmFeeToAccount }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -191,23 +190,6 @@ pub type PoolFungiblesTransactor = FungiblesAdapter< pub type AssetTransactors = (CurrencyTransactor, FungiblesTransactor, ForeignFungiblesTransactor, PoolFungiblesTransactor); -/// Simple `MultiLocation` matcher for Local and Foreign asset `MultiLocation`. -pub struct LocalAndForeignAssetsMultiLocationMatcher; -impl MatchesLocalAndForeignAssetsMultiLocation for LocalAndForeignAssetsMultiLocationMatcher { - fn is_local(location: &MultiLocation) -> bool { - use assets_common::fungible_conversion::MatchesMultiLocation; - TrustBackedAssetsConvertedConcreteId::contains(location) - } - fn is_foreign(location: &MultiLocation) -> bool { - use assets_common::fungible_conversion::MatchesMultiLocation; - ForeignAssetsConvertedConcreteId::contains(location) - } -} -impl Contains for LocalAndForeignAssetsMultiLocationMatcher { - fn contains(location: &MultiLocation) -> bool { - Self::is_local(location) || Self::is_foreign(location) - } -} /// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, /// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can @@ -880,7 +862,7 @@ pub mod bridging { 1, X2( Parachain(SiblingBridgeHubParaId::get()), - PalletInstance(system_parachains_constants::kusama::snowbridge::INBOUND_QUEUE_MESSAGES_PALLET_INDEX), + PalletInstance(system_parachains_constants::kusama::snowbridge::INBOUND_QUEUE_PALLET_INDEX), ) ); diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 29c323422a..7551463067 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -85,7 +85,7 @@ pallet-collator-selection = { default-features = false , version = "8.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.6.0" } parachains-common = { default-features = false , version = "6.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } -assets-common = { default-features = false , version = "0.6.0" } +assets-common = { default-features = false , version = "0.8.0" } # Bridges pallet-xcm-bridge-hub-router = { default-features = false , version = "0.4.0" } @@ -133,6 +133,9 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks", + "parachains-common/runtime-benchmarks", + "snowbridge-router-primitives/runtime-benchmarks" ] try-runtime = [ "cumulus-pallet-aura-ext/try-runtime", @@ -235,6 +238,7 @@ std = [ "xcm-builder/std", "xcm-executor/std", "xcm/std", + "snowbridge-router-primitives/std" ] experimental = [ "pallet-aura/experimental" ] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 2c5d93af0e..6557a9323b 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -65,7 +65,6 @@ pub mod xcm_config; use assets_common::{ foreign_creators::ForeignCreators, matching::{FromNetwork, FromSiblingParachain}, - MultiLocationForAssetId, }; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; @@ -320,8 +319,8 @@ pub type ForeignAssetsInstance = pallet_assets::Instance2; impl pallet_assets::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; - type AssetId = MultiLocationForAssetId; - type AssetIdParameter = MultiLocationForAssetId; + type AssetId = xcm::v3::MultiLocation; + type AssetIdParameter = xcm::v3::MultiLocation; type Currency = Balances; type CreateOrigin = ForeignCreators< ( diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 657eb1c791..d5400d6aa9 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -36,7 +36,6 @@ use parachains_common::{ }; use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_constants::system_parachain; -use snowbridge_polkadot_common::EthereumNetwork; use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; use system_parachains_constants::{polkadot::snowbridge::EthereumNetwork, TREASURY_PALLET_ID}; @@ -48,10 +47,10 @@ use xcm_builder::{ EnsureXcmOrigin, FrameTransactionalProcessor, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignPaidRemoteExporter, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeesToAccount, + XcmFeeManagerFromComponents, XcmFeeToAccount }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -755,7 +754,7 @@ pub mod bridging { 1, X2( Parachain(SiblingBridgeHubParaId::get()), - PalletInstance(system_parachains_constants::polkadot::snowbridge::INBOUND_QUEUE_MESSAGES_PALLET_INDEX) + PalletInstance(system_parachains_constants::polkadot::snowbridge::INBOUND_QUEUE_PALLET_INDEX) ) ); diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index a3c526fed0..900d47bbb4 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -249,6 +249,7 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks" ] try-runtime = [ diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 4a108b6cac..ef6e90f0d0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -504,7 +504,7 @@ parameter_types! { parameter_types! { pub const CreateAssetCall: [u8;2] = [53, 0]; pub const CreateAssetDeposit: u128 = (UNITS / 10) + EXISTENTIAL_DEPOSIT; - pub const InboundQueuePalletInstance: u8 = system_parachains_constants::kusama::snowbridge::INBOUND_QUEUE_MESSAGES_PALLET_INDEX; + pub const InboundQueuePalletInstance: u8 = system_parachains_constants::kusama::snowbridge::INBOUND_QUEUE_PALLET_INDEX; pub Parameters: PricingParameters = PricingParameters { exchange_rate: FixedU128::from_rational(1, 400), fee_per_gas: gwei(20), diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs index 45d6b9e13f..8fbbc73d18 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs @@ -43,10 +43,10 @@ pub mod pallet_utility; pub mod pallet_xcm; pub mod paritydb_weights; pub mod rocksdb_weights; -pub mod snowbridge_ethereum_beacon_client; -pub mod snowbridge_inbound_queue; -pub mod snowbridge_outbound_queue; -pub mod snowbridge_system; +pub mod snowbridge_pallet_ethereum_client; +pub mod snowbridge_pallet_inbound_queue; +pub mod snowbridge_pallet_outbound_queue; +pub mod snowbridge_pallet_system; pub mod xcm; pub use block_weights::constants::BlockExecutionWeight; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_ethereum_beacon_client.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_ethereum_beacon_client.rs deleted file mode 100644 index ffc8446fbd..0000000000 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_ethereum_beacon_client.rs +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//! Autogenerated weights for `snowbridge_ethereum_beacon_client` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ip-172-31-8-124`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-kusama-dev"), DB CACHE: 1024 - -// Executed Command: -// target/release/polkadot-parachain -// benchmark -// pallet -// --base-path -// /mnt/scratch/benchmark -// --chain=bridge-hub-kusama-dev -// --pallet=snowbridge_ethereum_beacon_client -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --steps -// 50 -// --repeat -// 20 -// --output -// ./system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_ethereum_beacon_client.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `snowbridge_ethereum_beacon_client`. -pub struct WeightInfo(PhantomData); -impl snowbridge_ethereum_beacon_client::WeightInfo for WeightInfo { - /// Storage: EthereumBeaconClient FinalizedBeaconStateIndex (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconStateIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconStateMapping (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconStateMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient NextSyncCommittee (r:0 w:1) - /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient InitialCheckpointRoot (r:0 w:1) - /// Proof: EthereumBeaconClient InitialCheckpointRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ValidatorsRoot (r:0 w:1) - /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:0 w:1) - /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:0 w:1) - /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestExecutionState (r:0 w:1) - /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconState (r:0 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - fn force_checkpoint() -> Weight { - // Proof Size summary in bytes: - // Measured: `42` - // Estimated: `3501` - // Minimum execution time: 97_185_781_000 picoseconds. - Weight::from_parts(97_263_571_000, 0) - .saturating_add(Weight::from_parts(0, 3501)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(9)) - } - /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:1) - /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:0) - /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient NextSyncCommittee (r:1 w:0) - /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:1 w:0) - /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) - /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconStateIndex (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconStateIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconStateMapping (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconStateMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - fn submit() -> Weight { - // Proof Size summary in bytes: - // Measured: `92753` - // Estimated: `93857` - // Minimum execution time: 25_999_968_000 picoseconds. - Weight::from_parts(26_051_019_000, 0) - .saturating_add(Weight::from_parts(0, 93857)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:0) - /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:0) - /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:0) - /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient NextSyncCommittee (r:1 w:1) - /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:1 w:0) - /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) - /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - fn submit_with_sync_committee() -> Weight { - // Proof Size summary in bytes: - // Measured: `92717` - // Estimated: `93857` - // Minimum execution time: 122_354_917_000 picoseconds. - Weight::from_parts(122_461_312_000, 0) - .saturating_add(Weight::from_parts(0, 93857)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:0) - /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:0) - /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:1) - /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ExecutionHeaderIndex (r:1 w:1) - /// Proof: EthereumBeaconClient ExecutionHeaderIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ExecutionHeaderMapping (r:1 w:1) - /// Proof: EthereumBeaconClient ExecutionHeaderMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ExecutionHeaders (r:0 w:1) - /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(136), added: 2611, mode: MaxEncodedLen) - fn submit_execution_header() -> Weight { - // Proof Size summary in bytes: - // Measured: `386` - // Estimated: `3537` - // Minimum execution time: 108_761_000 picoseconds. - Weight::from_parts(113_158_000, 0) - .saturating_add(Weight::from_parts(0, 3537)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } -} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_outbound_queue.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_outbound_queue.rs deleted file mode 100644 index 7a6aeaba39..0000000000 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_outbound_queue.rs +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//! Autogenerated weights for `snowbridge_outbound_queue` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-20, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `192.168.1.13`, CPU: `` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-kusama-dev"), DB CACHE: 1024 - -// Executed Command: -// ../target/release/polkadot-parachain -// benchmark -// pallet -// --chain=bridge-hub-kusama-dev -// --pallet=snowbridge_outbound_queue -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --output -// ./system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_outbound_queue.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `snowbridge_outbound_queue`. -pub struct WeightInfo(PhantomData); -impl snowbridge_outbound_queue::WeightInfo for WeightInfo { - /// Storage: EthereumOutboundQueue MessageLeaves (r:1 w:1) - /// Proof Skipped: EthereumOutboundQueue MessageLeaves (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: EthereumOutboundQueue PendingHighPriorityMessageCount (r:1 w:1) - /// Proof: EthereumOutboundQueue PendingHighPriorityMessageCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue Nonce (r:1 w:1) - /// Proof: EthereumOutboundQueue Nonce (max_values: None, max_size: Some(20), added: 2495, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue Messages (r:1 w:1) - /// Proof Skipped: EthereumOutboundQueue Messages (max_values: Some(1), max_size: None, mode: Measured) - fn do_process_message() -> Weight { - // Proof Size summary in bytes: - // Measured: `42` - // Estimated: `3485` - // Minimum execution time: 39_000_000 picoseconds. - Weight::from_parts(39_000_000, 3485) - .saturating_add(T::DbWeight::get().reads(4_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) - } - /// Storage: EthereumOutboundQueue MessageLeaves (r:1 w:0) - /// Proof Skipped: EthereumOutboundQueue MessageLeaves (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Digest (r:1 w:1) - /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) - fn commit() -> Weight { - // Proof Size summary in bytes: - // Measured: `1094` - // Estimated: `2579` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(28_000_000, 2579) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - - fn commit_single() -> Weight { - // Proof Size summary in bytes: - // Measured: `1094` - // Estimated: `2579` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(9_000_000, 1586) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } -} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_ethereum_client.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_ethereum_client.rs new file mode 100644 index 0000000000..0d5f29c6ff --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_ethereum_client.rs @@ -0,0 +1,151 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `snowbridge_pallet_ethereum_client` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-06-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ip-172-31-8-124`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/polkadot-parachain +// benchmark +// pallet +// --base-path +// /mnt/scratch/benchmark +// --chain=bridge-hub-rococo-dev +// --pallet=snowbridge_ethereum_beacon_client +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --steps +// 50 +// --repeat +// 20 +// --output +// ./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `snowbridge_pallet_ethereum_client`. +pub struct WeightInfo(PhantomData); +impl snowbridge_pallet_ethereum_client::WeightInfo for WeightInfo { + /// Storage: EthereumBeaconClient FinalizedBeaconStateIndex (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconStateIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconStateMapping (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconStateMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient NextSyncCommittee (r:0 w:1) + /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient InitialCheckpointRoot (r:0 w:1) + /// Proof: EthereumBeaconClient InitialCheckpointRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ValidatorsRoot (r:0 w:1) + /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:0 w:1) + /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:0 w:1) + /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestExecutionState (r:0 w:1) + /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconState (r:0 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + fn force_checkpoint() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `3501` + // Minimum execution time: 97_185_781_000 picoseconds. + Weight::from_parts(97_263_571_000, 0) + .saturating_add(Weight::from_parts(0, 3501)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(9)) + } + /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:1) + /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:0) + /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient NextSyncCommittee (r:1 w:0) + /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:1 w:0) + /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) + /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconStateIndex (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconStateIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconStateMapping (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconStateMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) + fn submit() -> Weight { + // Proof Size summary in bytes: + // Measured: `92753` + // Estimated: `93857` + // Minimum execution time: 25_999_968_000 picoseconds. + Weight::from_parts(26_051_019_000, 0) + .saturating_add(Weight::from_parts(0, 93857)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:0) + /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:0) + /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:0) + /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient NextSyncCommittee (r:1 w:1) + /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:1 w:0) + /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) + /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + fn submit_with_sync_committee() -> Weight { + // Proof Size summary in bytes: + // Measured: `92717` + // Estimated: `93857` + // Minimum execution time: 122_354_917_000 picoseconds. + Weight::from_parts(122_461_312_000, 0) + .saturating_add(Weight::from_parts(0, 93857)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:0) + /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:0) + /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:1) + /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ExecutionHeaderIndex (r:1 w:1) + /// Proof: EthereumBeaconClient ExecutionHeaderIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ExecutionHeaderMapping (r:1 w:1) + /// Proof: EthereumBeaconClient ExecutionHeaderMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ExecutionHeaders (r:0 w:1) + /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(136), added: 2611, mode: MaxEncodedLen) + fn submit_execution_header() -> Weight { + // Proof Size summary in bytes: + // Measured: `386` + // Estimated: `3537` + // Minimum execution time: 108_761_000 picoseconds. + Weight::from_parts(113_158_000, 0) + .saturating_add(Weight::from_parts(0, 3537)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_inbound_queue.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_inbound_queue.rs similarity index 51% rename from system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_inbound_queue.rs rename to system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_inbound_queue.rs index 073efc3866..faf404f90c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_inbound_queue.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_inbound_queue.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Autogenerated weights for `snowbridge_inbound_queue` +//! Autogenerated weights for `snowbridge_pallet_inbound_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2023-09-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` @@ -25,7 +25,7 @@ // target/release/polkadot-parachain // benchmark // pallet -// --chain=bridge-hub-polkadot-dev +// --chain=bridge-hub-rococo-dev // --pallet=snowbridge_inbound_queue // --extrinsic=* // --execution=wasm @@ -35,7 +35,7 @@ // --repeat // 20 // --output -// ./system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_inbound_queue.rs +// ./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_inbound_queue.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -45,25 +45,25 @@ use frame_support::{traits::Get, weights::Weight}; use core::marker::PhantomData; -/// Weight functions for `snowbridge_inbound_queue`. +/// Weight functions for `snowbridge_pallet_inbound_queue`. pub struct WeightInfo(PhantomData); -impl snowbridge_inbound_queue::WeightInfo for WeightInfo { - /// Storage: EthereumInboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumInboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ExecutionHeaders (r:1 w:0) - /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(136), added: 2611, mode: MaxEncodedLen) - /// Storage: EthereumInboundQueue Nonce (r:1 w:1) - /// Proof: EthereumInboundQueue Nonce (max_values: None, max_size: Some(20), added: 2495, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - fn submit() -> Weight { - // Proof Size summary in bytes: - // Measured: `457` - // Estimated: `3601` - // Minimum execution time: 69_000_000 picoseconds. - Weight::from_parts(70_000_000, 0) - .saturating_add(Weight::from_parts(0, 3601)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(2)) - } +impl snowbridge_pallet_inbound_queue::WeightInfo for WeightInfo { + /// Storage: EthereumInboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumInboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ExecutionHeaders (r:1 w:0) + /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(136), added: 2611, mode: MaxEncodedLen) + /// Storage: EthereumInboundQueue Nonce (r:1 w:1) + /// Proof: EthereumInboundQueue Nonce (max_values: None, max_size: Some(20), added: 2495, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn submit() -> Weight { + // Proof Size summary in bytes: + // Measured: `457` + // Estimated: `3601` + // Minimum execution time: 69_000_000 picoseconds. + Weight::from_parts(70_000_000, 0) + .saturating_add(Weight::from_parts(0, 3601)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_outbound_queue.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_outbound_queue.rs new file mode 100644 index 0000000000..8adcef076e --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_outbound_queue.rs @@ -0,0 +1,87 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `snowbridge_outbound_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-20, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `192.168.1.13`, CPU: `` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 + +// Executed Command: +// ../target/release/polkadot-parachain +// benchmark +// pallet +// --chain=bridge-hub-rococo-dev +// --pallet=snowbridge_outbound_queue +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --output +// ../parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_outbound_queue.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `snowbridge_outbound_queue`. +pub struct WeightInfo(PhantomData); +impl snowbridge_pallet_outbound_queue::WeightInfo for WeightInfo { + /// Storage: EthereumOutboundQueue MessageLeaves (r:1 w:1) + /// Proof Skipped: EthereumOutboundQueue MessageLeaves (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: EthereumOutboundQueue PendingHighPriorityMessageCount (r:1 w:1) + /// Proof: EthereumOutboundQueue PendingHighPriorityMessageCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue Nonce (r:1 w:1) + /// Proof: EthereumOutboundQueue Nonce (max_values: None, max_size: Some(20), added: 2495, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue Messages (r:1 w:1) + /// Proof Skipped: EthereumOutboundQueue Messages (max_values: Some(1), max_size: None, mode: Measured) + fn do_process_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `3485` + // Minimum execution time: 39_000_000 picoseconds. + Weight::from_parts(39_000_000, 3485) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + /// Storage: EthereumOutboundQueue MessageLeaves (r:1 w:0) + /// Proof Skipped: EthereumOutboundQueue MessageLeaves (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: System Digest (r:1 w:1) + /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) + fn commit() -> Weight { + // Proof Size summary in bytes: + // Measured: `1094` + // Estimated: `2579` + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(28_000_000, 2579) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + + fn commit_single() -> Weight { + // Proof Size summary in bytes: + // Measured: `1094` + // Estimated: `2579` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_000_000, 1586) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_system.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_system.rs new file mode 100644 index 0000000000..c6c188e323 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_system.rs @@ -0,0 +1,256 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `snowbridge_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-09, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `crake.local`, CPU: `` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// bridge-hub-rococo-dev +// --pallet=snowbridge_pallet_system +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --output +// parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_pallet_system.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `snowbridge_system`. +pub struct WeightInfo(PhantomData); +impl snowbridge_pallet_system::WeightInfo for WeightInfo { + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `3517` + // Minimum execution time: 47_000_000 picoseconds. + Weight::from_parts(47_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: EthereumSystem Agents (r:1 w:1) + /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn create_agent() -> Weight { + // Proof Size summary in bytes: + // Measured: `187` + // Estimated: `6196` + // Minimum execution time: 87_000_000 picoseconds. + Weight::from_parts(87_000_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: EthereumSystem Agents (r:1 w:0) + /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) + /// Storage: EthereumSystem Channels (r:1 w:1) + /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn create_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `602` + // Estimated: `69050` + // Minimum execution time: 84_000_000 picoseconds. + Weight::from_parts(84_000_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: EthereumSystem Channels (r:1 w:0) + /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn update_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `256` + // Estimated: `6044` + // Minimum execution time: 41_000_000 picoseconds. + Weight::from_parts(41_000_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: EthereumSystem Channels (r:1 w:0) + /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn force_update_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `256` + // Estimated: `6044` + // Minimum execution time: 41_000_000 picoseconds. + Weight::from_parts(41_000_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn set_operating_mode() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `3517` + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(30_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: EthereumSystem Agents (r:1 w:0) + /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn transfer_native_from_agent() -> Weight { + // Proof Size summary in bytes: + // Measured: `252` + // Estimated: `6044` + // Minimum execution time: 43_000_000 picoseconds. + Weight::from_parts(43_000_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: EthereumSystem Agents (r:1 w:0) + /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn force_transfer_native_from_agent() -> Weight { + // Proof Size summary in bytes: + // Measured: `252` + // Estimated: `6044` + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(42_000_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn set_token_transfer_fees() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `3517` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(42_000_000, 3517) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn set_pricing_parameters() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `3517` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(42_000_000, 3517) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_system.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_system.rs deleted file mode 100644 index e92074b297..0000000000 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_system.rs +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//! Autogenerated weights for `snowbridge_system` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-09, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `crake.local`, CPU: `` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-kusama-dev"), DB CACHE: 1024 - -// Executed Command: -// target/release/polkadot-parachain -// benchmark -// pallet -// --chain -// bridge-hub-kusama-dev -// --pallet=snowbridge_system -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --output -// ./system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_system.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `snowbridge_system`. -pub struct WeightInfo(PhantomData); -impl snowbridge_system::WeightInfo for WeightInfo { - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// 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: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn upgrade() -> Weight { - // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3517` - // Minimum execution time: 47_000_000 picoseconds. - Weight::from_parts(47_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: EthereumSystem Agents (r:1 w:1) - /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// 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: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn create_agent() -> Weight { - // Proof Size summary in bytes: - // Measured: `187` - // Estimated: `6196` - // Minimum execution time: 87_000_000 picoseconds. - Weight::from_parts(87_000_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(6)) - } - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: EthereumSystem Agents (r:1 w:0) - /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: EthereumSystem Channels (r:1 w:1) - /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:1 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn create_channel() -> Weight { - // Proof Size summary in bytes: - // Measured: `602` - // Estimated: `69050` - // Minimum execution time: 84_000_000 picoseconds. - Weight::from_parts(84_000_000, 0) - .saturating_add(Weight::from_parts(0, 69050)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(5)) - } - /// Storage: EthereumSystem Channels (r:1 w:0) - /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:0) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn update_channel() -> Weight { - // Proof Size summary in bytes: - // Measured: `256` - // Estimated: `6044` - // Minimum execution time: 41_000_000 picoseconds. - Weight::from_parts(41_000_000, 0) - .saturating_add(Weight::from_parts(0, 6044)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: EthereumSystem Channels (r:1 w:0) - /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:0) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn force_update_channel() -> Weight { - // Proof Size summary in bytes: - // Measured: `256` - // Estimated: `6044` - // Minimum execution time: 41_000_000 picoseconds. - Weight::from_parts(41_000_000, 0) - .saturating_add(Weight::from_parts(0, 6044)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// 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: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn set_operating_mode() -> Weight { - // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3517` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(30_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: EthereumSystem Agents (r:1 w:0) - /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:0) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn transfer_native_from_agent() -> Weight { - // Proof Size summary in bytes: - // Measured: `252` - // Estimated: `6044` - // Minimum execution time: 43_000_000 picoseconds. - Weight::from_parts(43_000_000, 0) - .saturating_add(Weight::from_parts(0, 6044)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: EthereumSystem Agents (r:1 w:0) - /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:0) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn force_transfer_native_from_agent() -> Weight { - // Proof Size summary in bytes: - // Measured: `252` - // Estimated: `6044` - // Minimum execution time: 42_000_000 picoseconds. - Weight::from_parts(42_000_000, 0) - .saturating_add(Weight::from_parts(0, 6044)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) - } - - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// 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: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn set_token_transfer_fees() -> Weight { - // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3517` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(42_000_000, 3517) - .saturating_add(T::DbWeight::get().reads(4_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) - } - - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// 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: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn set_pricing_parameters() -> Weight { - // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3517` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(42_000_000, 3517) - .saturating_add(T::DbWeight::get().reads(4_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) - } -} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 4de86e1f04..477d48281f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -248,6 +248,8 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks", + "parachains-common/runtime-benchmarks" ] try-runtime = [ diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 66577927c1..84076758d8 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -27,6 +27,8 @@ pub mod bridge_to_kusama_config; mod weights; pub mod xcm_config; +use crate::xcm_config::XcmRouter; +use bridge_hub_common::AggregateMessageOrigin; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::ParaId; use snowbridge_beacon_primitives::{Fork, ForkVersions}; @@ -40,8 +42,9 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, Keccak256}, transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, + ApplyExtrinsicResult, FixedU128 }; +use parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; use sp_std::prelude::*; #[cfg(feature = "std")] @@ -504,7 +507,7 @@ parameter_types! { parameter_types! { pub const CreateAssetCall: [u8;2] = [53, 0]; pub const CreateAssetDeposit: u128 = (UNITS / 10) + EXISTENTIAL_DEPOSIT; - pub const InboundQueuePalletInstance: u8 = system_parachains_constants::polkadot::snowbridge::INBOUND_QUEUE_MESSAGES_PALLET_INDEX; + pub const InboundQueuePalletInstance: u8 = system_parachains_constants::polkadot::snowbridge::INBOUND_QUEUE_PALLET_INDEX; pub Parameters: PricingParameters = PricingParameters { exchange_rate: FixedU128::from_rational(1, 400), fee_per_gas: gwei(20), diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs index e56ad7c2cc..467a41fd8a 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs @@ -43,6 +43,10 @@ pub mod pallet_utility; pub mod pallet_xcm; pub mod paritydb_weights; pub mod rocksdb_weights; +pub mod snowbridge_pallet_ethereum_client; +pub mod snowbridge_pallet_inbound_queue; +pub mod snowbridge_pallet_outbound_queue; +pub mod snowbridge_pallet_system; pub mod xcm; pub use block_weights::constants::BlockExecutionWeight; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_ethereum_beacon_client.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_ethereum_beacon_client.rs deleted file mode 100644 index 3027708e84..0000000000 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_ethereum_beacon_client.rs +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//! Autogenerated weights for `snowbridge_ethereum_beacon_client` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ip-172-31-8-124`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-polkadot-dev"), DB CACHE: 1024 - -// Executed Command: -// target/release/polkadot-parachain -// benchmark -// pallet -// --base-path -// /mnt/scratch/benchmark -// --chain=bridge-hub-polkadot-dev -// --pallet=snowbridge_ethereum_beacon_client -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --steps -// 50 -// --repeat -// 20 -// --output -// ./system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_ethereum_beacon_client.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `snowbridge_ethereum_beacon_client`. -pub struct WeightInfo(PhantomData); -impl snowbridge_ethereum_beacon_client::WeightInfo for WeightInfo { - /// Storage: EthereumBeaconClient FinalizedBeaconStateIndex (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconStateIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconStateMapping (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconStateMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient NextSyncCommittee (r:0 w:1) - /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient InitialCheckpointRoot (r:0 w:1) - /// Proof: EthereumBeaconClient InitialCheckpointRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ValidatorsRoot (r:0 w:1) - /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:0 w:1) - /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:0 w:1) - /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestExecutionState (r:0 w:1) - /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconState (r:0 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - fn force_checkpoint() -> Weight { - // Proof Size summary in bytes: - // Measured: `42` - // Estimated: `3501` - // Minimum execution time: 97_185_781_000 picoseconds. - Weight::from_parts(97_263_571_000, 0) - .saturating_add(Weight::from_parts(0, 3501)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(9)) - } - /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:1) - /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:0) - /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient NextSyncCommittee (r:1 w:0) - /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:1 w:0) - /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) - /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconStateIndex (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconStateIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconStateMapping (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconStateMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - fn submit() -> Weight { - // Proof Size summary in bytes: - // Measured: `92753` - // Estimated: `93857` - // Minimum execution time: 25_999_968_000 picoseconds. - Weight::from_parts(26_051_019_000, 0) - .saturating_add(Weight::from_parts(0, 93857)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:0) - /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:0) - /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:0) - /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient NextSyncCommittee (r:1 w:1) - /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:1 w:0) - /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) - /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - fn submit_with_sync_committee() -> Weight { - // Proof Size summary in bytes: - // Measured: `92717` - // Estimated: `93857` - // Minimum execution time: 122_354_917_000 picoseconds. - Weight::from_parts(122_461_312_000, 0) - .saturating_add(Weight::from_parts(0, 93857)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:0) - /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:0) - /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:1) - /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ExecutionHeaderIndex (r:1 w:1) - /// Proof: EthereumBeaconClient ExecutionHeaderIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ExecutionHeaderMapping (r:1 w:1) - /// Proof: EthereumBeaconClient ExecutionHeaderMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ExecutionHeaders (r:0 w:1) - /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(136), added: 2611, mode: MaxEncodedLen) - fn submit_execution_header() -> Weight { - // Proof Size summary in bytes: - // Measured: `386` - // Estimated: `3537` - // Minimum execution time: 108_761_000 picoseconds. - Weight::from_parts(113_158_000, 0) - .saturating_add(Weight::from_parts(0, 3537)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } -} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_outbound_queue.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_outbound_queue.rs deleted file mode 100644 index b5a9610a9a..0000000000 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_outbound_queue.rs +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//! Autogenerated weights for `snowbridge_outbound_queue` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-20, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `192.168.1.13`, CPU: `` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-polkadot-dev"), DB CACHE: 1024 - -// Executed Command: -// ../target/release/polkadot-parachain -// benchmark -// pallet -// --chain=bridge-hub-polkadot-dev -// --pallet=snowbridge_outbound_queue -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --output -// ./system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_outbound_queue.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `snowbridge_outbound_queue`. -pub struct WeightInfo(PhantomData); -impl snowbridge_outbound_queue::WeightInfo for WeightInfo { - /// Storage: EthereumOutboundQueue MessageLeaves (r:1 w:1) - /// Proof Skipped: EthereumOutboundQueue MessageLeaves (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: EthereumOutboundQueue PendingHighPriorityMessageCount (r:1 w:1) - /// Proof: EthereumOutboundQueue PendingHighPriorityMessageCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue Nonce (r:1 w:1) - /// Proof: EthereumOutboundQueue Nonce (max_values: None, max_size: Some(20), added: 2495, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue Messages (r:1 w:1) - /// Proof Skipped: EthereumOutboundQueue Messages (max_values: Some(1), max_size: None, mode: Measured) - fn do_process_message() -> Weight { - // Proof Size summary in bytes: - // Measured: `42` - // Estimated: `3485` - // Minimum execution time: 39_000_000 picoseconds. - Weight::from_parts(39_000_000, 3485) - .saturating_add(T::DbWeight::get().reads(4_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) - } - /// Storage: EthereumOutboundQueue MessageLeaves (r:1 w:0) - /// Proof Skipped: EthereumOutboundQueue MessageLeaves (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Digest (r:1 w:1) - /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) - fn commit() -> Weight { - // Proof Size summary in bytes: - // Measured: `1094` - // Estimated: `2579` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(28_000_000, 2579) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - - fn commit_single() -> Weight { - // Proof Size summary in bytes: - // Measured: `1094` - // Estimated: `2579` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(9_000_000, 1586) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } -} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_ethereum_client.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_ethereum_client.rs new file mode 100644 index 0000000000..0d5f29c6ff --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_ethereum_client.rs @@ -0,0 +1,151 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `snowbridge_pallet_ethereum_client` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-06-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ip-172-31-8-124`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/polkadot-parachain +// benchmark +// pallet +// --base-path +// /mnt/scratch/benchmark +// --chain=bridge-hub-rococo-dev +// --pallet=snowbridge_ethereum_beacon_client +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --steps +// 50 +// --repeat +// 20 +// --output +// ./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `snowbridge_pallet_ethereum_client`. +pub struct WeightInfo(PhantomData); +impl snowbridge_pallet_ethereum_client::WeightInfo for WeightInfo { + /// Storage: EthereumBeaconClient FinalizedBeaconStateIndex (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconStateIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconStateMapping (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconStateMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient NextSyncCommittee (r:0 w:1) + /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient InitialCheckpointRoot (r:0 w:1) + /// Proof: EthereumBeaconClient InitialCheckpointRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ValidatorsRoot (r:0 w:1) + /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:0 w:1) + /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:0 w:1) + /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestExecutionState (r:0 w:1) + /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconState (r:0 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + fn force_checkpoint() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `3501` + // Minimum execution time: 97_185_781_000 picoseconds. + Weight::from_parts(97_263_571_000, 0) + .saturating_add(Weight::from_parts(0, 3501)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(9)) + } + /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:1) + /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:0) + /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient NextSyncCommittee (r:1 w:0) + /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:1 w:0) + /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) + /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconStateIndex (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconStateIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconStateMapping (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconStateMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) + fn submit() -> Weight { + // Proof Size summary in bytes: + // Measured: `92753` + // Estimated: `93857` + // Minimum execution time: 25_999_968_000 picoseconds. + Weight::from_parts(26_051_019_000, 0) + .saturating_add(Weight::from_parts(0, 93857)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:0) + /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:0) + /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:0) + /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient NextSyncCommittee (r:1 w:1) + /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:1 w:0) + /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) + /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + fn submit_with_sync_committee() -> Weight { + // Proof Size summary in bytes: + // Measured: `92717` + // Estimated: `93857` + // Minimum execution time: 122_354_917_000 picoseconds. + Weight::from_parts(122_461_312_000, 0) + .saturating_add(Weight::from_parts(0, 93857)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:0) + /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:0) + /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:1) + /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ExecutionHeaderIndex (r:1 w:1) + /// Proof: EthereumBeaconClient ExecutionHeaderIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ExecutionHeaderMapping (r:1 w:1) + /// Proof: EthereumBeaconClient ExecutionHeaderMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ExecutionHeaders (r:0 w:1) + /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(136), added: 2611, mode: MaxEncodedLen) + fn submit_execution_header() -> Weight { + // Proof Size summary in bytes: + // Measured: `386` + // Estimated: `3537` + // Minimum execution time: 108_761_000 picoseconds. + Weight::from_parts(113_158_000, 0) + .saturating_add(Weight::from_parts(0, 3537)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_inbound_queue.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_inbound_queue.rs similarity index 50% rename from system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_inbound_queue.rs rename to system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_inbound_queue.rs index cbadf1ba90..faf404f90c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_inbound_queue.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_inbound_queue.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Autogenerated weights for `snowbridge_inbound_queue` +//! Autogenerated weights for `snowbridge_pallet_inbound_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2023-09-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` @@ -25,7 +25,7 @@ // target/release/polkadot-parachain // benchmark // pallet -// --chain=bridge-hub-kusama-dev +// --chain=bridge-hub-rococo-dev // --pallet=snowbridge_inbound_queue // --extrinsic=* // --execution=wasm @@ -35,7 +35,7 @@ // --repeat // 20 // --output -// ./system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_inbound_queue.rs +// ./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_inbound_queue.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -45,25 +45,25 @@ use frame_support::{traits::Get, weights::Weight}; use core::marker::PhantomData; -/// Weight functions for `snowbridge_inbound_queue`. +/// Weight functions for `snowbridge_pallet_inbound_queue`. pub struct WeightInfo(PhantomData); -impl snowbridge_inbound_queue::WeightInfo for WeightInfo { - /// Storage: EthereumInboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumInboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ExecutionHeaders (r:1 w:0) - /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(136), added: 2611, mode: MaxEncodedLen) - /// Storage: EthereumInboundQueue Nonce (r:1 w:1) - /// Proof: EthereumInboundQueue Nonce (max_values: None, max_size: Some(20), added: 2495, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - fn submit() -> Weight { - // Proof Size summary in bytes: - // Measured: `457` - // Estimated: `3601` - // Minimum execution time: 69_000_000 picoseconds. - Weight::from_parts(70_000_000, 0) - .saturating_add(Weight::from_parts(0, 3601)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(2)) - } +impl snowbridge_pallet_inbound_queue::WeightInfo for WeightInfo { + /// Storage: EthereumInboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumInboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ExecutionHeaders (r:1 w:0) + /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(136), added: 2611, mode: MaxEncodedLen) + /// Storage: EthereumInboundQueue Nonce (r:1 w:1) + /// Proof: EthereumInboundQueue Nonce (max_values: None, max_size: Some(20), added: 2495, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn submit() -> Weight { + // Proof Size summary in bytes: + // Measured: `457` + // Estimated: `3601` + // Minimum execution time: 69_000_000 picoseconds. + Weight::from_parts(70_000_000, 0) + .saturating_add(Weight::from_parts(0, 3601)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_outbound_queue.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_outbound_queue.rs new file mode 100644 index 0000000000..8adcef076e --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_outbound_queue.rs @@ -0,0 +1,87 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `snowbridge_outbound_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-20, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `192.168.1.13`, CPU: `` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 + +// Executed Command: +// ../target/release/polkadot-parachain +// benchmark +// pallet +// --chain=bridge-hub-rococo-dev +// --pallet=snowbridge_outbound_queue +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --output +// ../parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_outbound_queue.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `snowbridge_outbound_queue`. +pub struct WeightInfo(PhantomData); +impl snowbridge_pallet_outbound_queue::WeightInfo for WeightInfo { + /// Storage: EthereumOutboundQueue MessageLeaves (r:1 w:1) + /// Proof Skipped: EthereumOutboundQueue MessageLeaves (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: EthereumOutboundQueue PendingHighPriorityMessageCount (r:1 w:1) + /// Proof: EthereumOutboundQueue PendingHighPriorityMessageCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue Nonce (r:1 w:1) + /// Proof: EthereumOutboundQueue Nonce (max_values: None, max_size: Some(20), added: 2495, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue Messages (r:1 w:1) + /// Proof Skipped: EthereumOutboundQueue Messages (max_values: Some(1), max_size: None, mode: Measured) + fn do_process_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `42` + // Estimated: `3485` + // Minimum execution time: 39_000_000 picoseconds. + Weight::from_parts(39_000_000, 3485) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + /// Storage: EthereumOutboundQueue MessageLeaves (r:1 w:0) + /// Proof Skipped: EthereumOutboundQueue MessageLeaves (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: System Digest (r:1 w:1) + /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) + fn commit() -> Weight { + // Proof Size summary in bytes: + // Measured: `1094` + // Estimated: `2579` + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(28_000_000, 2579) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + + fn commit_single() -> Weight { + // Proof Size summary in bytes: + // Measured: `1094` + // Estimated: `2579` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_000_000, 1586) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_system.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_system.rs new file mode 100644 index 0000000000..c6c188e323 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_system.rs @@ -0,0 +1,256 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `snowbridge_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-09, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `crake.local`, CPU: `` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// bridge-hub-rococo-dev +// --pallet=snowbridge_pallet_system +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --output +// parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_pallet_system.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `snowbridge_system`. +pub struct WeightInfo(PhantomData); +impl snowbridge_pallet_system::WeightInfo for WeightInfo { + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `3517` + // Minimum execution time: 47_000_000 picoseconds. + Weight::from_parts(47_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: EthereumSystem Agents (r:1 w:1) + /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn create_agent() -> Weight { + // Proof Size summary in bytes: + // Measured: `187` + // Estimated: `6196` + // Minimum execution time: 87_000_000 picoseconds. + Weight::from_parts(87_000_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: EthereumSystem Agents (r:1 w:0) + /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) + /// Storage: EthereumSystem Channels (r:1 w:1) + /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn create_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `602` + // Estimated: `69050` + // Minimum execution time: 84_000_000 picoseconds. + Weight::from_parts(84_000_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: EthereumSystem Channels (r:1 w:0) + /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn update_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `256` + // Estimated: `6044` + // Minimum execution time: 41_000_000 picoseconds. + Weight::from_parts(41_000_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: EthereumSystem Channels (r:1 w:0) + /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn force_update_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `256` + // Estimated: `6044` + // Minimum execution time: 41_000_000 picoseconds. + Weight::from_parts(41_000_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn set_operating_mode() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `3517` + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(30_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: EthereumSystem Agents (r:1 w:0) + /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn transfer_native_from_agent() -> Weight { + // Proof Size summary in bytes: + // Measured: `252` + // Estimated: `6044` + // Minimum execution time: 43_000_000 picoseconds. + Weight::from_parts(43_000_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: EthereumSystem Agents (r:1 w:0) + /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn force_transfer_native_from_agent() -> Weight { + // Proof Size summary in bytes: + // Measured: `252` + // Estimated: `6044` + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(42_000_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn set_token_transfer_fees() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `3517` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(42_000_000, 3517) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) + /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// 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: MessageQueue Pages (r:0 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn set_pricing_parameters() -> Weight { + // Proof Size summary in bytes: + // Measured: `80` + // Estimated: `3517` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(42_000_000, 3517) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_system.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_system.rs deleted file mode 100644 index 73b219b800..0000000000 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_system.rs +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//! Autogenerated weights for `snowbridge_system` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-09, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `crake.local`, CPU: `` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-polkadot-dev"), DB CACHE: 1024 - -// Executed Command: -// target/release/polkadot-parachain -// benchmark -// pallet -// --chain -// bridge-hub-polkadot-dev -// --pallet=snowbridge_system -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --output -// ./system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_system.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `snowbridge_system`. -pub struct WeightInfo(PhantomData); -impl snowbridge_system::WeightInfo for WeightInfo { - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// 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: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn upgrade() -> Weight { - // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3517` - // Minimum execution time: 47_000_000 picoseconds. - Weight::from_parts(47_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: EthereumSystem Agents (r:1 w:1) - /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// 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: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn create_agent() -> Weight { - // Proof Size summary in bytes: - // Measured: `187` - // Estimated: `6196` - // Minimum execution time: 87_000_000 picoseconds. - Weight::from_parts(87_000_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(6)) - } - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: EthereumSystem Agents (r:1 w:0) - /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: EthereumSystem Channels (r:1 w:1) - /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:1 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn create_channel() -> Weight { - // Proof Size summary in bytes: - // Measured: `602` - // Estimated: `69050` - // Minimum execution time: 84_000_000 picoseconds. - Weight::from_parts(84_000_000, 0) - .saturating_add(Weight::from_parts(0, 69050)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(5)) - } - /// Storage: EthereumSystem Channels (r:1 w:0) - /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:0) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn update_channel() -> Weight { - // Proof Size summary in bytes: - // Measured: `256` - // Estimated: `6044` - // Minimum execution time: 41_000_000 picoseconds. - Weight::from_parts(41_000_000, 0) - .saturating_add(Weight::from_parts(0, 6044)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: EthereumSystem Channels (r:1 w:0) - /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:0) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn force_update_channel() -> Weight { - // Proof Size summary in bytes: - // Measured: `256` - // Estimated: `6044` - // Minimum execution time: 41_000_000 picoseconds. - Weight::from_parts(41_000_000, 0) - .saturating_add(Weight::from_parts(0, 6044)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// 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: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn set_operating_mode() -> Weight { - // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3517` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(30_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: EthereumSystem Agents (r:1 w:0) - /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:0) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn transfer_native_from_agent() -> Weight { - // Proof Size summary in bytes: - // Measured: `252` - // Estimated: `6044` - // Minimum execution time: 43_000_000 picoseconds. - Weight::from_parts(43_000_000, 0) - .saturating_add(Weight::from_parts(0, 6044)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: EthereumSystem Agents (r:1 w:0) - /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:0) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn force_transfer_native_from_agent() -> Weight { - // Proof Size summary in bytes: - // Measured: `252` - // Estimated: `6044` - // Minimum execution time: 42_000_000 picoseconds. - Weight::from_parts(42_000_000, 0) - .saturating_add(Weight::from_parts(0, 6044)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) - } - - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// 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: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn set_token_transfer_fees() -> Weight { - // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3517` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(42_000_000, 3517) - .saturating_add(T::DbWeight::get().reads(4_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) - } - - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// 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: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn set_pricing_parameters() -> Weight { - // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3517` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(42_000_000, 3517) - .saturating_add(T::DbWeight::get().reads(4_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) - } -} diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index d40600153e..c30a126e22 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -120,6 +120,9 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", + "parachains-common/runtime-benchmarks" ] try-runtime = [ "cumulus-pallet-aura-ext/try-runtime", diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 6a140d1d4a..9112f1265a 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -43,7 +43,7 @@ use xcm_builder::{ RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeesToAccount, + XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; diff --git a/system-parachains/constants/Cargo.toml b/system-parachains/constants/Cargo.toml index a414dd6126..ce4dabfdb5 100644 --- a/system-parachains/constants/Cargo.toml +++ b/system-parachains/constants/Cargo.toml @@ -17,6 +17,7 @@ polkadot-core-primitives = { default-features = false, version = "6.0.0"} polkadot-primitives = { default-features = false , version = "6.0.0" } polkadot-runtime-constants = { path = "../../relay/polkadot/constants", default-features = false} sp-runtime = { default-features = false , version = "30.0.1" } +xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } [features] default = [ "std" ] @@ -28,4 +29,5 @@ std = [ "polkadot-primitives/std", "polkadot-runtime-constants/std", "sp-runtime/std", + "xcm/std", ] diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml index d595ad6e8c..7b36177e5e 100644 --- a/system-parachains/encointer/Cargo.toml +++ b/system-parachains/encointer/Cargo.toml @@ -106,132 +106,150 @@ kusama-runtime-constants = { path = "../../relay/kusama/constants", default-feat [features] default = ["std"] runtime-benchmarks = [ - "cumulus-pallet-xcmp-queue/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", - "pallet-balances/runtime-benchmarks", - "pallet-collective/runtime-benchmarks", - "pallet-encointer-balances/runtime-benchmarks", - "pallet-encointer-bazaar/runtime-benchmarks", - "pallet-encointer-ceremonies/runtime-benchmarks", - "pallet-encointer-communities/runtime-benchmarks", - "pallet-encointer-faucet/runtime-benchmarks", - "pallet-encointer-reputation-commitments/runtime-benchmarks", - "pallet-encointer-scheduler/runtime-benchmarks", - "pallet-membership/runtime-benchmarks", - "pallet-proxy/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-treasury/runtime-benchmarks", - "pallet-utility/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "polkadot-runtime-common/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", - "xcm-executor/runtime-benchmarks", + "cumulus-pallet-xcmp-queue/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", + "pallet-balances/runtime-benchmarks", + "pallet-collective/runtime-benchmarks", + "pallet-encointer-balances/runtime-benchmarks", + "pallet-encointer-bazaar/runtime-benchmarks", + "pallet-encointer-ceremonies/runtime-benchmarks", + "pallet-encointer-communities/runtime-benchmarks", + "pallet-encointer-faucet/runtime-benchmarks", + "pallet-encointer-reputation-commitments/runtime-benchmarks", + "pallet-encointer-scheduler/runtime-benchmarks", + "pallet-membership/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "polkadot-runtime-common/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", + "xcm-executor/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", + "encointer-balances-tx-payment/runtime-benchmarks", + "encointer-primitives/runtime-benchmarks", + "pallet-asset-tx-payment/runtime-benchmarks", + "pallet-scheduler/runtime-benchmarks", + "parachains-common/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", + "polkadot-primitives/runtime-benchmarks" ] std = [ - "codec/std", - "cumulus-pallet-aura-ext/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", - "encointer-balances-tx-payment-rpc-runtime-api/std", - "encointer-balances-tx-payment/std", - "encointer-primitives/serde_derive", - "encointer-primitives/std", - "frame-executive/std", - "frame-support/std", - "frame-system-rpc-runtime-api/std", - "frame-system/std", - "frame-try-runtime/std", - "kusama-runtime-constants/std", - "log/std", - "pallet-asset-tx-payment/std", - "pallet-aura/std", - "pallet-balances/std", - "pallet-collective/std", - "pallet-encointer-balances/std", - "pallet-encointer-bazaar-rpc-runtime-api/std", - "pallet-encointer-bazaar/std", - "pallet-encointer-ceremonies-rpc-runtime-api/std", - "pallet-encointer-ceremonies/std", - "pallet-encointer-communities-rpc-runtime-api/std", - "pallet-encointer-communities/std", - "pallet-encointer-faucet/std", - "pallet-encointer-reputation-commitments/std", - "pallet-encointer-scheduler/std", - "pallet-insecure-randomness-collective-flip/std", - "pallet-membership/std", - "pallet-proxy/std", - "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-treasury/std", - "pallet-utility/std", - "pallet-xcm/std", - "parachain-info/std", - "parachains-common/std", - "polkadot-core-primitives/std", - "polkadot-primitives/std", - "scale-info/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-aura/std", - "sp-core/std", - "sp-genesis-builder/std", - "sp-inherents/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", + "codec/std", + "cumulus-pallet-aura-ext/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", + "encointer-balances-tx-payment-rpc-runtime-api/std", + "encointer-balances-tx-payment/std", + "encointer-primitives/serde_derive", + "encointer-primitives/std", + "frame-executive/std", + "frame-support/std", + "frame-system-rpc-runtime-api/std", + "frame-system/std", + "frame-try-runtime/std", + "kusama-runtime-constants/std", + "log/std", + "pallet-asset-tx-payment/std", + "pallet-aura/std", + "pallet-balances/std", + "pallet-collective/std", + "pallet-encointer-balances/std", + "pallet-encointer-bazaar-rpc-runtime-api/std", + "pallet-encointer-bazaar/std", + "pallet-encointer-ceremonies-rpc-runtime-api/std", + "pallet-encointer-ceremonies/std", + "pallet-encointer-communities-rpc-runtime-api/std", + "pallet-encointer-communities/std", + "pallet-encointer-faucet/std", + "pallet-encointer-reputation-commitments/std", + "pallet-encointer-scheduler/std", + "pallet-insecure-randomness-collective-flip/std", + "pallet-membership/std", + "pallet-proxy/std", + "pallet-timestamp/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", + "pallet-treasury/std", + "pallet-utility/std", + "pallet-xcm/std", + "parachain-info/std", + "parachains-common/std", + "polkadot-core-primitives/std", + "polkadot-primitives/std", + "scale-info/std", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-aura/std", + "sp-core/std", + "sp-genesis-builder/std", + "sp-inherents/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-transaction-pool/std", + "sp-version/std", # "system-parachains-constants/std", - "substrate-wasm-builder", - "xcm-builder/std", - "xcm-executor/std", - "xcm/std", + "substrate-wasm-builder", + "xcm-builder/std", + "xcm-executor/std", + "xcm/std", + "frame-benchmarking?/std", + "frame-system-benchmarking?/std", + "pallet-scheduler/std", + "polkadot-parachain-primitives/std", + "polkadot-runtime-common/std" ] try-runtime = [ - "cumulus-pallet-aura-ext/try-runtime", - "cumulus-pallet-dmp-queue/try-runtime", - "cumulus-pallet-parachain-system/try-runtime", - "cumulus-pallet-xcm/try-runtime", - "cumulus-pallet-xcmp-queue/try-runtime", - "frame-executive/try-runtime", - "frame-system/try-runtime", - "frame-try-runtime/try-runtime", - "pallet-asset-tx-payment/try-runtime", - "pallet-aura/try-runtime", - "pallet-balances/try-runtime", - "pallet-collective/try-runtime", - "pallet-encointer-balances/try-runtime", - "pallet-encointer-bazaar/try-runtime", - "pallet-encointer-ceremonies/try-runtime", - "pallet-encointer-communities/try-runtime", - "pallet-encointer-faucet/try-runtime", - "pallet-encointer-reputation-commitments/try-runtime", - "pallet-encointer-scheduler/try-runtime", - "pallet-insecure-randomness-collective-flip/try-runtime", - "pallet-membership/try-runtime", - "pallet-proxy/try-runtime", - "pallet-scheduler/try-runtime", - "pallet-timestamp/try-runtime", - "pallet-transaction-payment/try-runtime", - "pallet-treasury/try-runtime", - "pallet-utility/try-runtime", - "pallet-xcm/try-runtime", - "parachain-info/try-runtime", + "cumulus-pallet-aura-ext/try-runtime", + "cumulus-pallet-dmp-queue/try-runtime", + "cumulus-pallet-parachain-system/try-runtime", + "cumulus-pallet-xcm/try-runtime", + "cumulus-pallet-xcmp-queue/try-runtime", + "frame-executive/try-runtime", + "frame-system/try-runtime", + "frame-try-runtime/try-runtime", + "pallet-asset-tx-payment/try-runtime", + "pallet-aura/try-runtime", + "pallet-balances/try-runtime", + "pallet-collective/try-runtime", + "pallet-encointer-balances/try-runtime", + "pallet-encointer-bazaar/try-runtime", + "pallet-encointer-ceremonies/try-runtime", + "pallet-encointer-communities/try-runtime", + "pallet-encointer-faucet/try-runtime", + "pallet-encointer-reputation-commitments/try-runtime", + "pallet-encointer-scheduler/try-runtime", + "pallet-insecure-randomness-collective-flip/try-runtime", + "pallet-membership/try-runtime", + "pallet-proxy/try-runtime", + "pallet-scheduler/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-transaction-payment/try-runtime", + "pallet-treasury/try-runtime", + "pallet-utility/try-runtime", + "pallet-xcm/try-runtime", + "parachain-info/try-runtime", + "encointer-balances-tx-payment/try-runtime", + "encointer-primitives/try-runtime", + "frame-support/try-runtime", + "polkadot-runtime-common/try-runtime", + "sp-runtime/try-runtime" ] experimental = [ "pallet-aura/experimental" ] diff --git a/system-parachains/gluttons/glutton-kusama/Cargo.toml b/system-parachains/gluttons/glutton-kusama/Cargo.toml index ba5845c74d..8659f584d9 100644 --- a/system-parachains/gluttons/glutton-kusama/Cargo.toml +++ b/system-parachains/gluttons/glutton-kusama/Cargo.toml @@ -67,6 +67,7 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks" ] std = [ "codec/std", From 97f81f9b9d759bbb5f7f64431ba71fa3718b2348 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 14 Feb 2024 11:35:17 +0100 Subject: [PATCH 110/316] Updated TODO for removing DMPQueue --- system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs | 2 ++ system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs | 2 ++ system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 2 ++ system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 2 ++ system-parachains/collectives/collectives-polkadot/src/lib.rs | 2 ++ system-parachains/encointer/src/lib.rs | 2 ++ 6 files changed, 12 insertions(+) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 9a7015d49a..08b7b6d2b0 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -697,6 +697,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } +// TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) impl cumulus_pallet_dmp_queue::Config for Runtime { type WeightInfo = weights::cumulus_pallet_dmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; @@ -923,6 +924,7 @@ construct_runtime!( XcmpQueue: cumulus_pallet_xcmp_queue = 30, PolkadotXcm: pallet_xcm = 31, CumulusXcm: cumulus_pallet_xcm = 32, + // TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) // Temporary to migrate the remaining DMP messages: DmpQueue: cumulus_pallet_dmp_queue = 33, ToPolkadotXcmRouter: pallet_xcm_bridge_hub_router:: = 34, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index f1e197dde5..95ec6add33 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -636,6 +636,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } +// TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) impl cumulus_pallet_dmp_queue::Config for Runtime { type WeightInfo = weights::cumulus_pallet_dmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; @@ -840,6 +841,7 @@ construct_runtime!( XcmpQueue: cumulus_pallet_xcmp_queue = 30, PolkadotXcm: pallet_xcm = 31, CumulusXcm: cumulus_pallet_xcm = 32, + // TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) // Temporary to migrate the remaining DMP messages: DmpQueue: cumulus_pallet_dmp_queue = 33, ToKusamaXcmRouter: pallet_xcm_bridge_hub_router:: = 34, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 210acfc6a8..92c2df46e2 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -383,6 +383,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } +// TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) impl cumulus_pallet_dmp_queue::Config for Runtime { type WeightInfo = weights::cumulus_pallet_dmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; @@ -493,6 +494,7 @@ construct_runtime!( XcmpQueue: cumulus_pallet_xcmp_queue = 30, PolkadotXcm: pallet_xcm = 31, CumulusXcm: cumulus_pallet_xcm = 32, + // TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) // Temporary to migrate the remaining DMP messages: DmpQueue: cumulus_pallet_dmp_queue = 33, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index b181caf631..a656380a43 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -383,6 +383,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } +// TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) impl cumulus_pallet_dmp_queue::Config for Runtime { type WeightInfo = weights::cumulus_pallet_dmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; @@ -493,6 +494,7 @@ construct_runtime!( XcmpQueue: cumulus_pallet_xcmp_queue = 30, PolkadotXcm: pallet_xcm = 31, CumulusXcm: cumulus_pallet_xcm = 32, + // TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) // Temporary to migrate the remaining DMP messages: DmpQueue: cumulus_pallet_dmp_queue = 33, diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 98df201fa4..2d876529bb 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -450,6 +450,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } +// TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) impl cumulus_pallet_dmp_queue::Config for Runtime { type WeightInfo = weights::cumulus_pallet_dmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; @@ -656,6 +657,7 @@ construct_runtime!( XcmpQueue: cumulus_pallet_xcmp_queue = 30, PolkadotXcm: pallet_xcm = 31, CumulusXcm: cumulus_pallet_xcm = 32, + // TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) // Temporary to migrate the remaining DMP messages: DmpQueue: cumulus_pallet_dmp_queue = 33, MessageQueue: pallet_message_queue = 34, diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 515a138e43..eb04d4753d 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -468,6 +468,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } +// TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) impl cumulus_pallet_dmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; @@ -628,6 +629,7 @@ construct_runtime! { XcmpQueue: cumulus_pallet_xcmp_queue = 30, PolkadotXcm: pallet_xcm = 31, CumulusXcm: cumulus_pallet_xcm = 32, + // TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) DmpQueue: cumulus_pallet_dmp_queue = 33, // Handy utilities. From 01d2344de282fe2a6e3509745afa03e5562aabb8 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 14 Feb 2024 14:59:18 +0100 Subject: [PATCH 111/316] [collectives-polkadot] Fixed benchmarks (expcept payout) --- .../src/fellowship/mod.rs | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs index 0bd759dc7c..8af872a2a2 100644 --- a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs @@ -52,7 +52,10 @@ use xcm::latest::BodyId; use xcm_builder::{AliasesIntoAccountId32, LocatableAssetId, PayOverXcm}; #[cfg(feature = "runtime-benchmarks")] -use crate::impls::benchmarks::{OpenHrmpChannel, PayWithEnsure}; +use crate::{ + impls::benchmarks::{OpenHrmpChannel, PayWithEnsure}, + ExistentialDeposit, +}; /// The Fellowship members' ranks. pub mod ranks { @@ -263,6 +266,11 @@ parameter_types! { PalletInstance(::index() as u8).into(); } +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub const ProposalBondForBenchmark: Permill = Permill::from_percent(5); +} + /// [`PayOverXcm`] setup to pay the Fellowship Treasury. pub type FellowshipTreasuryPaymaster = PayOverXcm< FellowshipTreasuryInteriorLocation, @@ -282,11 +290,23 @@ impl pallet_treasury::Config for Runtime { // Instead, public or fellowship referenda should be used to propose and command the treasury // spend or spend_local dispatchables. The parameters below have been configured accordingly to // discourage its use. + #[cfg(not(feature = "runtime-benchmarks"))] type ApproveOrigin = frame_support::traits::NeverEnsureOrigin; + #[cfg(feature = "runtime-benchmarks")] + type ApproveOrigin = EnsureRoot; type OnSlash = (); + #[cfg(not(feature = "runtime-benchmarks"))] type ProposalBond = ProposalBond; + #[cfg(feature = "runtime-benchmarks")] + type ProposalBond = ProposalBondForBenchmark; + #[cfg(not(feature = "runtime-benchmarks"))] type ProposalBondMinimum = MaxBalance; + #[cfg(feature = "runtime-benchmarks")] + type ProposalBondMinimum = ConstU128<{ ExistentialDeposit::get() * 100 }>; + #[cfg(not(feature = "runtime-benchmarks"))] type ProposalBondMaximum = MaxBalance; + #[cfg(feature = "runtime-benchmarks")] + type ProposalBondMaximum = ConstU128<{ ExistentialDeposit::get() * 500 }>; // end. type WeightInfo = weights::pallet_treasury::WeightInfo; From f82cc0536f5b4c272cea185f3e31d2ca9d9537df Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 14 Feb 2024 15:09:07 +0100 Subject: [PATCH 112/316] [bridges] Added code comment for `MessageExportPrice` --- .../bridge-hub-kusama/src/bridge_to_polkadot_config.rs | 3 +++ .../bridge-hub-polkadot/src/bridge_to_kusama_config.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs index 4d2cab6726..b18f167158 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs @@ -259,6 +259,9 @@ impl pallet_xcm_bridge_hub::Config for Runtime type UniversalLocation = UniversalLocation; type BridgedNetworkId = PolkadotGlobalConsensusNetwork; type BridgeMessagesPalletInstance = WithBridgeHubPolkadotMessagesInstance; + // `MessageExportPrice` is simply propagated to the inner `xcm_builder::HaulBlobExporter`, and + // we do not need or want to add any additional price for exporting here, as it is already + // covered by the measured weight of the `ExportMessage` instruction. type MessageExportPrice = (); type Lanes = ActiveLanes; type LanesSupport = ToBridgeHubPolkadotXcmBlobHauler; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs index 3f43e4c4c3..1b9f151727 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs @@ -259,6 +259,9 @@ impl pallet_xcm_bridge_hub::Config for Runtime { type UniversalLocation = UniversalLocation; type BridgedNetworkId = KusamaGlobalConsensusNetwork; type BridgeMessagesPalletInstance = WithBridgeHubKusamaMessagesInstance; + // `MessageExportPrice` is simply propagated to the inner `xcm_builder::HaulBlobExporter`, and + // we do not need or want to add any additional price for exporting here, as it is already + // covered by the measured weight of the `ExportMessage` instruction. type MessageExportPrice = (); type Lanes = ActiveLanes; type LanesSupport = ToBridgeHubKusamaXcmBlobHauler; From 69ce1198dd15942a51696802e2b4fa4a67685cf7 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 14 Feb 2024 15:41:12 +0100 Subject: [PATCH 113/316] Upgrade to latest: `cargo upgrade -v --pinned --incompatible` --- Cargo.lock | 4586 +++++++++-------- chain-spec-generator/Cargo.toml | 34 +- .../assets/asset-hub-kusama/Cargo.toml | 24 +- .../assets/asset-hub-polkadot/Cargo.toml | 22 +- integration-tests/emulated/chains/Cargo.toml | 32 +- integration-tests/emulated/common/Cargo.toml | 50 +- relay/kusama/Cargo.toml | 192 +- relay/kusama/constants/Cargo.toml | 14 +- relay/polkadot/Cargo.toml | 184 +- relay/polkadot/constants/Cargo.toml | 14 +- .../asset-hubs/asset-hub-kusama/Cargo.toml | 128 +- .../asset-hub-kusama/primitives/Cargo.toml | 6 +- .../asset-hubs/asset-hub-polkadot/Cargo.toml | 122 +- .../asset-hub-polkadot/primitives/Cargo.toml | 6 +- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 136 +- .../bridge-hub-kusama/primitives/Cargo.toml | 12 +- .../bridge-hub-polkadot/Cargo.toml | 136 +- .../bridge-hub-polkadot/primitives/Cargo.toml | 12 +- .../collectives-polkadot/Cargo.toml | 120 +- system-parachains/constants/Cargo.toml | 10 +- .../gluttons/glutton-kusama/Cargo.toml | 60 +- 21 files changed, 3032 insertions(+), 2868 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ac1ac8e0f1..6e16ddddc3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -213,9 +213,9 @@ dependencies = [ [[package]] name = "aquamarine" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "074b80d14d0240b6ce94d68f059a2d26a5d77280ae142662365a21ef6e2594ef" +checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" dependencies = [ "include_dir", "itertools 0.10.5", @@ -437,19 +437,19 @@ dependencies = [ "asset-hub-kusama-runtime", "asset-test-utils", "emulated-chains", - "frame-support 28.0.0", + "frame-support 29.0.0", "integration-tests-common", "pallet-asset-conversion", - "pallet-assets 29.0.0", - "pallet-balances 28.0.0", - "pallet-message-queue 31.0.0", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", + "pallet-assets 30.0.0", + "pallet-balances 29.0.0", + "pallet-message-queue 32.0.0", + "pallet-xcm 8.0.0", + "parachains-common 8.0.0", "parity-scale-codec", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", "staging-kusama-runtime", - "staging-xcm 7.0.0", - "staging-xcm-executor 7.0.3", + "staging-xcm 8.0.0", + "staging-xcm-executor 8.0.0", "system-parachains-constants", "xcm-emulator", ] @@ -464,76 +464,76 @@ dependencies = [ "bp-asset-hub-polkadot", "bp-bridge-hub-kusama", "bp-bridge-hub-polkadot", - "cumulus-pallet-aura-ext 0.7.0", - "cumulus-pallet-dmp-queue 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-aura-ext 0.8.0", + "cumulus-pallet-dmp-queue 0.8.0", + "cumulus-pallet-parachain-system 0.8.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.3", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "cumulus-pallet-xcm 0.8.0", + "cumulus-pallet-xcmp-queue 0.8.0", + "cumulus-primitives-core 0.8.0", + "cumulus-primitives-utility 0.8.0", + "frame-benchmarking 29.0.0", + "frame-executive 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "frame-system-benchmarking 29.0.0", + "frame-system-rpc-runtime-api 27.0.0", + "frame-try-runtime 0.35.0", "hex-literal", "kusama-runtime-constants", "log", "pallet-asset-conversion", "pallet-asset-conversion-tx-payment", - "pallet-assets 29.0.0", - "pallet-aura 27.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-message-queue 31.0.0", + "pallet-assets 30.0.0", + "pallet-aura 28.0.0", + "pallet-authorship 29.0.0", + "pallet-balances 29.0.0", + "pallet-collator-selection 10.0.0", + "pallet-message-queue 32.0.0", "pallet-multisig", "pallet-nft-fractionalization", "pallet-nfts", "pallet-nfts-runtime-api", - "pallet-proxy 28.0.0", - "pallet-session 28.0.0", + "pallet-proxy 29.0.0", + "pallet-session 29.0.0", "pallet-state-trie-migration", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "pallet-timestamp 28.0.0", + "pallet-transaction-payment 29.0.0", + "pallet-transaction-payment-rpc-runtime-api 29.0.0", "pallet-uniques", - "pallet-utility 28.0.0", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-utility 29.0.0", + "pallet-xcm 8.0.0", + "pallet-xcm-benchmarks 8.0.0", "pallet-xcm-bridge-hub-router", - "parachains-common 7.0.0", + "parachains-common 8.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-runtime-common 7.0.0", + "polkadot-core-primitives 8.0.0", + "polkadot-parachain-primitives 7.0.0", + "polkadot-runtime-common 8.0.0", "polkadot-runtime-constants", "primitive-types", "scale-info", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-std 14.0.0", - "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "sp-weights 27.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "sp-api 27.0.0", + "sp-block-builder 27.0.0", + "sp-consensus-aura 0.33.0", + "sp-core 29.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-offchain 27.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "sp-transaction-pool 27.0.0", + "sp-version 30.0.0", + "sp-weights 28.0.0", + "staging-parachain-info 0.8.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", + "substrate-wasm-builder 18.0.0", "system-parachains-constants", ] @@ -544,18 +544,18 @@ dependencies = [ "asset-hub-polkadot-runtime", "asset-test-utils", "emulated-chains", - "frame-support 28.0.0", + "frame-support 29.0.0", "integration-tests-common", - "pallet-assets 29.0.0", - "pallet-balances 28.0.0", - "pallet-message-queue 31.0.0", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", + "pallet-assets 30.0.0", + "pallet-balances 29.0.0", + "pallet-message-queue 32.0.0", + "pallet-xcm 8.0.0", + "parachains-common 8.0.0", "parity-scale-codec", "polkadot-runtime", - "sp-runtime 31.0.1", - "staging-xcm 7.0.0", - "staging-xcm-executor 7.0.3", + "sp-runtime 32.0.0", + "staging-xcm 8.0.0", + "staging-xcm-executor 8.0.0", "system-parachains-constants", "xcm-emulator", ] @@ -570,134 +570,128 @@ dependencies = [ "bp-asset-hub-polkadot", "bp-bridge-hub-kusama", "bp-bridge-hub-polkadot", - "cumulus-pallet-aura-ext 0.7.0", - "cumulus-pallet-dmp-queue 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-aura-ext 0.8.0", + "cumulus-pallet-dmp-queue 0.8.0", + "cumulus-pallet-parachain-system 0.8.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.3", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "cumulus-pallet-xcm 0.8.0", + "cumulus-pallet-xcmp-queue 0.8.0", + "cumulus-primitives-core 0.8.0", + "cumulus-primitives-utility 0.8.0", + "frame-benchmarking 29.0.0", + "frame-executive 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "frame-system-benchmarking 29.0.0", + "frame-system-rpc-runtime-api 27.0.0", + "frame-try-runtime 0.35.0", "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-tx-payment 28.0.0", - "pallet-assets 29.0.0", - "pallet-aura 27.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-message-queue 31.0.0", + "pallet-asset-tx-payment 29.0.0", + "pallet-assets 30.0.0", + "pallet-aura 28.0.0", + "pallet-authorship 29.0.0", + "pallet-balances 29.0.0", + "pallet-collator-selection 10.0.0", + "pallet-message-queue 32.0.0", "pallet-multisig", "pallet-nfts", "pallet-nfts-runtime-api", - "pallet-proxy 28.0.0", - "pallet-session 28.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "pallet-proxy 29.0.0", + "pallet-session 29.0.0", + "pallet-timestamp 28.0.0", + "pallet-transaction-payment 29.0.0", + "pallet-transaction-payment-rpc-runtime-api 29.0.0", "pallet-uniques", - "pallet-utility 28.0.0", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-utility 29.0.0", + "pallet-xcm 8.0.0", + "pallet-xcm-benchmarks 8.0.0", "pallet-xcm-bridge-hub-router", - "parachains-common 7.0.0", + "parachains-common 8.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-runtime-common 7.0.0", + "polkadot-core-primitives 8.0.0", + "polkadot-parachain-primitives 7.0.0", + "polkadot-runtime-common 8.0.0", "polkadot-runtime-constants", "scale-info", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-std 14.0.0", - "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "sp-weights 27.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "sp-api 27.0.0", + "sp-block-builder 27.0.0", + "sp-consensus-aura 0.33.0", + "sp-core 29.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-offchain 27.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "sp-transaction-pool 27.0.0", + "sp-version 30.0.0", + "sp-weights 28.0.0", + "staging-parachain-info 0.8.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", + "substrate-wasm-builder 18.0.0", "system-parachains-constants", ] [[package]] name = "asset-test-utils" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fc9ae11639b454ef894ebcd8fa1ea8edb09b14aba20477c4026d9ac6e4421f" +checksum = "c6a5ef8ee6dcf362ec170bed2bd56c2b7a2a92d79489f08892f704846cae0dd5" dependencies = [ - "assets-common", - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-parachain-inherent 0.7.0", - "cumulus-test-relay-sproof-builder 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-assets 29.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-session 28.0.0", - "pallet-xcm 7.0.0", + "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-xcmp-queue 0.8.0", + "cumulus-primitives-core 0.8.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "pallet-asset-conversion", + "pallet-assets 30.0.0", + "pallet-balances 29.0.0", + "pallet-collator-selection 10.0.0", + "pallet-session 29.0.0", + "pallet-xcm 8.0.0", "pallet-xcm-bridge-hub-router", - "parachains-common 7.0.0", + "parachains-common 8.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "staging-parachain-info 0.8.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", + "substrate-wasm-builder 18.0.0", ] [[package]] name = "assets-common" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d2d5b75d36daec8ffad11f121f581cc3aec2b7b117d8ab68f6e3ac914a5569" +checksum = "65e90021d772c2dd82d45fd085e05a2cb5866464d4c7421ac6a8007733b350bb" dependencies = [ - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", + "cumulus-primitives-core 0.8.0", + "frame-support 29.0.0", "impl-trait-for-tuples", "log", "pallet-asset-conversion", - "pallet-asset-tx-payment 28.0.0", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", + "pallet-xcm 8.0.0", + "parachains-common 8.0.0", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api 27.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", + "substrate-wasm-builder 18.0.0", ] [[package]] @@ -847,9 +841,9 @@ dependencies = [ [[package]] name = "binary-merkle-tree" -version = "13.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bf2706ac2641485d35ed06ebfe0b3b2c43e19a7ad8a90215580a91dd1766114" +checksum = "2bf857f8f411164ce1af14a778626af96251de7a77837711efbc440807e7053f" dependencies = [ "hash-db", "log", @@ -1036,6 +1030,18 @@ dependencies = [ "serde", ] +[[package]] +name = "bounded-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32385ecb91a31bddaf908e8dcf4a15aef1bcd3913cc03ebfad02ff6d568abc1" +dependencies = [ + "log", + "parity-scale-codec", + "scale-info", + "serde", +] + [[package]] name = "bounded-vec" version = "0.7.1" @@ -1049,39 +1055,39 @@ dependencies = [ name = "bp-asset-hub-kusama" version = "1.0.0" dependencies = [ - "bp-xcm-bridge-hub-router 0.6.0", - "frame-support 28.0.0", + "bp-xcm-bridge-hub-router 0.7.0", + "frame-support 29.0.0", "parity-scale-codec", "scale-info", "sp-std 14.0.0", - "staging-xcm 7.0.0", + "staging-xcm 8.0.0", ] [[package]] name = "bp-asset-hub-polkadot" version = "1.0.0" dependencies = [ - "bp-xcm-bridge-hub-router 0.6.0", - "frame-support 28.0.0", + "bp-xcm-bridge-hub-router 0.7.0", + "frame-support 29.0.0", "parity-scale-codec", "scale-info", "sp-std 14.0.0", - "staging-xcm 7.0.0", + "staging-xcm 8.0.0", ] [[package]] name = "bp-bridge-hub-cumulus" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ab8c4b01666c7b1fca260a4ef755c6de01ddac94566b13b3b974ed7966d6d" +checksum = "3e91ab68506081576066d3641d7794f63d96f3ca1eee0c059c2cc2174e55f638" dependencies = [ "bp-messages", "bp-polkadot-core", "bp-runtime", - "frame-support 28.0.0", - "frame-system 28.0.0", - "polkadot-primitives 7.0.0", - "sp-api 26.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "polkadot-primitives 8.0.0", + "sp-api 27.0.0", "sp-std 14.0.0", ] @@ -1092,11 +1098,11 @@ dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", "bp-runtime", - "frame-support 28.0.0", + "frame-support 29.0.0", "kusama-runtime-constants", "polkadot-runtime-constants", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api 27.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -1107,136 +1113,136 @@ dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", "bp-runtime", - "frame-support 28.0.0", + "frame-support 29.0.0", "kusama-runtime-constants", "polkadot-runtime-constants", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api 27.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-header-chain" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13815b42c75e06a6f6b19521a824cb6bf1624654b041ae0b4abeb279df0e2588" +checksum = "96157f586811969b3911d26cc79e02b28cfbecf859d96d7c12b6af10b9ea9350" dependencies = [ "bp-runtime", "finality-grandpa", - "frame-support 28.0.0", + "frame-support 29.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-consensus-grandpa 13.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-consensus-grandpa 14.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-kusama" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cf6db324f903d20b2b5e8e213488b6df6c058d3c86ca5a0fa532d1f8a02b3b" +checksum = "c37ed284f7648ca888de72da69873ead9672b56436b08eae2e196c11d0847626" dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", - "frame-support 28.0.0", - "sp-api 26.0.0", + "frame-support 29.0.0", + "sp-api 27.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-messages" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "220c494acdb350a79a7268f4a73d7a6b6cd3f2138f301856a6f6c4a5c09ef926" +checksum = "cf43a49ea13d4c2f141481b6cbff85a197c47fe6aec1f5af21e40b68e8fd02fd" dependencies = [ "bp-header-chain", "bp-runtime", - "frame-support 28.0.0", + "frame-support 29.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", + "sp-core 29.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-parachains" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf36b503d044eab3078e0f2c49087031b807b8277968ebcb22c7f2e611cf4602" +checksum = "762e309a008b2ad4088d4c4e9d39fa9f78f59124b6a52c25ceb0ef5f22d901f5" dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", - "frame-support 28.0.0", + "frame-support 29.0.0", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-polkadot" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f631c9127a07e4d4f9af9b2f92463c1b8a601f7f7cf9394a932c4373f77201c" +checksum = "059126468d590f377fa941a2b6fa744eb6754e9dd0d3d339e2ead4f2e45a7f7d" dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", - "frame-support 28.0.0", - "sp-api 26.0.0", + "frame-support 29.0.0", + "sp-api 27.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-polkadot-core" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80145cd18bd06347b5571a767112163e1da41e8b10a90bf9d2d982bf0ba5fcb7" +checksum = "b862e8dcccc9a3fafb58a1735bc205b7663d3335d7b3dd942503b98f28d6b067" dependencies = [ "bp-messages", "bp-runtime", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "parity-scale-codec", "parity-util-mem", "scale-info", "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-relayers" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf10c05632fad95ba4c6c3d1b2f3a3109bde6aa8f295098351a6e5b1270ba201" +checksum = "74a4b0e2771227611fe9e6a2c37ba2bf7408cf2385a9eb2f44e6096bb0e616ec" dependencies = [ "bp-messages", "bp-runtime", - "frame-support 28.0.0", + "frame-support 29.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-runtime" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fad9aefbc3e6cb63e0ac82a4dae9f1404416b41fb45931a4b43946cfa23c814" +checksum = "6b29668fffbc3e4a7ad789b498424ed6d8a313f93544a090bbaaef8a1f7fd243" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "hash-db", "impl-trait-for-tuples", "log", @@ -1244,20 +1250,20 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie 30.0.0", "trie-db", ] [[package]] name = "bp-test-utils" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9282521d9d851e93bb312e2465f72d5b2e549a70e68bf7421db4870b854011ee" +checksum = "6640a95733148b4f2004d362471eba49583da4b961681f5ea722039478924d31" dependencies = [ "bp-header-chain", "bp-parachains", @@ -1266,12 +1272,12 @@ dependencies = [ "ed25519-dalek", "finality-grandpa", "parity-scale-codec", - "sp-application-crypto 30.0.0", - "sp-consensus-grandpa 13.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-application-crypto 31.0.0", + "sp-consensus-grandpa 14.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie 30.0.0", ] [[package]] @@ -1297,14 +1303,14 @@ dependencies = [ [[package]] name = "bp-xcm-bridge-hub-router" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f58cd5d7880f4bc8fc569e5bb0174302cd3f7e18a322e0fec2a4733cced35cb" +checksum = "86ff4abe93be7bc1663adc41817b1aa3476fbec953ce361537419924310d5dd4" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-runtime 32.0.0", ] [[package]] @@ -1325,71 +1331,71 @@ dependencies = [ "bp-runtime", "bridge-hub-test-utils", "bridge-runtime-common", - "cumulus-pallet-aura-ext 0.7.0", - "cumulus-pallet-dmp-queue 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-aura-ext 0.8.0", + "cumulus-pallet-dmp-queue 0.8.0", + "cumulus-pallet-parachain-system 0.8.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.3", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "cumulus-pallet-xcm 0.8.0", + "cumulus-pallet-xcmp-queue 0.8.0", + "cumulus-primitives-core 0.8.0", + "cumulus-primitives-utility 0.8.0", + "frame-benchmarking 29.0.0", + "frame-executive 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "frame-system-benchmarking 29.0.0", + "frame-system-rpc-runtime-api 27.0.0", + "frame-try-runtime 0.35.0", "hex-literal", "kusama-runtime-constants", "log", - "pallet-aura 27.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", + "pallet-aura 28.0.0", + "pallet-authorship 29.0.0", + "pallet-balances 29.0.0", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-collator-selection 9.0.0", - "pallet-message-queue 31.0.0", + "pallet-collator-selection 10.0.0", + "pallet-message-queue 32.0.0", "pallet-multisig", - "pallet-session 28.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-utility 28.0.0", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-session 29.0.0", + "pallet-timestamp 28.0.0", + "pallet-transaction-payment 29.0.0", + "pallet-transaction-payment-rpc-runtime-api 29.0.0", + "pallet-utility 29.0.0", + "pallet-xcm 8.0.0", + "pallet-xcm-benchmarks 8.0.0", "pallet-xcm-bridge-hub", - "parachains-common 7.0.0", + "parachains-common 8.0.0", "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-runtime-common 7.0.0", + "polkadot-core-primitives 8.0.0", + "polkadot-parachain-primitives 7.0.0", + "polkadot-runtime-common 8.0.0", "polkadot-runtime-constants", "scale-info", "serde", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-std 14.0.0", - "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "sp-api 27.0.0", + "sp-block-builder 27.0.0", + "sp-consensus-aura 0.33.0", + "sp-core 29.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-keyring 32.0.0", + "sp-offchain 27.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "sp-transaction-pool 27.0.0", + "sp-version 30.0.0", + "staging-parachain-info 0.8.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", "static_assertions", - "substrate-wasm-builder 17.0.0", + "substrate-wasm-builder 18.0.0", "system-parachains-constants", ] @@ -1411,127 +1417,119 @@ dependencies = [ "bp-runtime", "bridge-hub-test-utils", "bridge-runtime-common", - "cumulus-pallet-aura-ext 0.7.0", - "cumulus-pallet-dmp-queue 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-aura-ext 0.8.0", + "cumulus-pallet-dmp-queue 0.8.0", + "cumulus-pallet-parachain-system 0.8.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.3", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "cumulus-pallet-xcm 0.8.0", + "cumulus-pallet-xcmp-queue 0.8.0", + "cumulus-primitives-core 0.8.0", + "cumulus-primitives-utility 0.8.0", + "frame-benchmarking 29.0.0", + "frame-executive 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "frame-system-benchmarking 29.0.0", + "frame-system-rpc-runtime-api 27.0.0", + "frame-try-runtime 0.35.0", "hex-literal", "kusama-runtime-constants", "log", - "pallet-aura 27.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", + "pallet-aura 28.0.0", + "pallet-authorship 29.0.0", + "pallet-balances 29.0.0", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-collator-selection 9.0.0", - "pallet-message-queue 31.0.0", + "pallet-collator-selection 10.0.0", + "pallet-message-queue 32.0.0", "pallet-multisig", - "pallet-session 28.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-utility 28.0.0", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-session 29.0.0", + "pallet-timestamp 28.0.0", + "pallet-transaction-payment 29.0.0", + "pallet-transaction-payment-rpc-runtime-api 29.0.0", + "pallet-utility 29.0.0", + "pallet-xcm 8.0.0", + "pallet-xcm-benchmarks 8.0.0", "pallet-xcm-bridge-hub", - "parachains-common 7.0.0", + "parachains-common 8.0.0", "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-runtime-common 7.0.0", + "polkadot-core-primitives 8.0.0", + "polkadot-parachain-primitives 7.0.0", + "polkadot-runtime-common 8.0.0", "polkadot-runtime-constants", "scale-info", "serde", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-std 14.0.0", - "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "sp-api 27.0.0", + "sp-block-builder 27.0.0", + "sp-consensus-aura 0.33.0", + "sp-core 29.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-keyring 32.0.0", + "sp-offchain 27.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "sp-transaction-pool 27.0.0", + "sp-version 30.0.0", + "staging-parachain-info 0.8.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", "static_assertions", - "substrate-wasm-builder 17.0.0", + "substrate-wasm-builder 18.0.0", "system-parachains-constants", ] [[package]] name = "bridge-hub-test-utils" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac81ef95972c445ffda86b9b1be4346d62c98924e5242f56f026296114ebea8" +checksum = "69d67fc7c61f5155579fa7c039b69605c6b0efde22771f947dfa49dafe087be1" dependencies = [ "asset-test-utils", "bp-header-chain", "bp-messages", - "bp-parachains", "bp-polkadot-core", "bp-relayers", "bp-runtime", "bp-test-utils", "bridge-runtime-common", - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-xcmp-queue 0.8.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "impl-trait-for-tuples", "log", - "pallet-balances 28.0.0", + "pallet-balances 29.0.0", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-collator-selection 9.0.0", - "pallet-session 28.0.0", - "pallet-utility 28.0.0", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", - "parachains-common 7.0.0", + "pallet-utility 29.0.0", + "parachains-common 8.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-keyring 32.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", "sp-tracing 16.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", ] [[package]] name = "bridge-runtime-common" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad84d21ab89055d3d2d85064a04f51c0993f1885379b0d4ef2c0dff26b0fbfb1" +checksum = "be96f5eb3ef2ce92e0337e06b76a2e0e9f120a5f6fd96bf8db817e5643c118b9" dependencies = [ "bp-header-chain", "bp-messages", @@ -1540,27 +1538,27 @@ dependencies = [ "bp-relayers", "bp-runtime", "bp-xcm-bridge-hub", - "bp-xcm-bridge-hub-router 0.6.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "bp-xcm-bridge-hub-router 0.7.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "hash-db", "log", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-transaction-payment 28.0.0", - "pallet-utility 28.0.0", + "pallet-transaction-payment 29.0.0", + "pallet-utility 29.0.0", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "sp-trie 29.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", + "sp-trie 30.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", "static_assertions", ] @@ -1581,9 +1579,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" +checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" dependencies = [ "memchr", "serde", @@ -1771,30 +1769,30 @@ dependencies = [ "bridge-hub-polkadot-runtime", "clap", "collectives-polkadot-runtime", - "cumulus-primitives-core 0.7.0", + "cumulus-primitives-core 0.8.0", "encointer-kusama-runtime", "glutton-kusama-runtime", "hex-literal", "kusama-runtime-constants", "pallet-im-online", - "pallet-staking 28.0.0", - "parachains-common 7.0.0", - "polkadot-primitives 7.0.0", + "pallet-staking 29.0.0", + "parachains-common 8.0.0", + "polkadot-primitives 8.0.0", "polkadot-runtime", "polkadot-runtime-constants", - "polkadot-runtime-parachains 7.0.0", - "sc-chain-spec 27.0.0", + "polkadot-runtime-parachains 8.0.0", + "sc-chain-spec 28.0.0", "sc-consensus-grandpa", "serde", "serde_json", - "sp-authority-discovery 26.0.0", - "sp-consensus-babe 0.32.0", + "sp-authority-discovery 27.0.0", + "sp-consensus-babe 0.33.0", "sp-consensus-beefy", "sp-core 25.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "staging-kusama-runtime", - "staging-xcm 7.0.0", + "staging-xcm 8.0.0", ] [[package]] @@ -1866,9 +1864,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.18" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" +checksum = "80c21025abd42669a92efc996ef13cfb2c5c627858421ea58d5c3b331a6c134f" dependencies = [ "clap_builder", "clap_derive", @@ -1876,9 +1874,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.18" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" +checksum = "458bf1f341769dfcf849846f65dffdf9146daa56bcd2a47cb4e1de9915567c99" dependencies = [ "anstream", "anstyle", @@ -1888,9 +1886,9 @@ dependencies = [ [[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", @@ -1900,19 +1898,18 @@ dependencies = [ [[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", ] @@ -1930,72 +1927,72 @@ dependencies = [ name = "collectives-polkadot-runtime" version = "1.0.0" dependencies = [ - "cumulus-pallet-aura-ext 0.7.0", - "cumulus-pallet-dmp-queue 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-aura-ext 0.8.0", + "cumulus-pallet-dmp-queue 0.8.0", + "cumulus-pallet-parachain-system 0.8.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.3", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "cumulus-pallet-xcm 0.8.0", + "cumulus-pallet-xcmp-queue 0.8.0", + "cumulus-primitives-core 0.8.0", + "cumulus-primitives-utility 0.8.0", + "frame-benchmarking 29.0.0", + "frame-executive 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "frame-system-benchmarking 29.0.0", + "frame-system-rpc-runtime-api 27.0.0", + "frame-try-runtime 0.35.0", "hex-literal", "log", "pallet-alliance", - "pallet-asset-rate 7.0.0", - "pallet-aura 27.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-collective 28.0.0", + "pallet-asset-rate 8.0.0", + "pallet-aura 28.0.0", + "pallet-authorship 29.0.0", + "pallet-balances 29.0.0", + "pallet-collator-selection 10.0.0", + "pallet-collective 29.0.0", "pallet-core-fellowship", - "pallet-message-queue 31.0.0", + "pallet-message-queue 32.0.0", "pallet-multisig", "pallet-preimage", - "pallet-proxy 28.0.0", + "pallet-proxy 29.0.0", "pallet-ranked-collective", "pallet-referenda", "pallet-salary", - "pallet-scheduler 29.0.0", - "pallet-session 28.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-treasury 27.0.0", - "pallet-utility 28.0.0", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", - "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-runtime-common 7.0.0", + "pallet-scheduler 30.0.0", + "pallet-session 29.0.0", + "pallet-timestamp 28.0.0", + "pallet-transaction-payment 29.0.0", + "pallet-transaction-payment-rpc-runtime-api 29.0.0", + "pallet-treasury 28.0.0", + "pallet-utility 29.0.0", + "pallet-xcm 8.0.0", + "parachains-common 8.0.0", + "parity-scale-codec", + "polkadot-core-primitives 8.0.0", + "polkadot-parachain-primitives 7.0.0", + "polkadot-runtime-common 8.0.0", "polkadot-runtime-constants", "scale-info", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-std 14.0.0", - "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "sp-api 27.0.0", + "sp-arithmetic 24.0.0", + "sp-block-builder 27.0.0", + "sp-consensus-aura 0.33.0", + "sp-core 29.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 27.0.0", + "sp-offchain 27.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "sp-transaction-pool 27.0.0", + "sp-version 30.0.0", + "staging-parachain-info 0.8.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", + "substrate-wasm-builder 18.0.0", "system-parachains-constants", ] @@ -2022,15 +2019,15 @@ dependencies = [ [[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]] @@ -2365,20 +2362,20 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8100a3283be2c46905345141e9a063f092949c6630a1fb70993b04c97f309e55" +checksum = "9e8e78b18548ae3454bc8a46e2bc2e3f521ea547844cbaecc9344d4741f4b1ef" dependencies = [ - "cumulus-pallet-parachain-system 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-aura 27.0.0", - "pallet-timestamp 27.0.0", + "cumulus-pallet-parachain-system 0.8.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "pallet-aura 28.0.0", + "pallet-timestamp 28.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-consensus-aura 0.32.0", - "sp-runtime 31.0.1", + "sp-application-crypto 31.0.0", + "sp-consensus-aura 0.33.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -2402,21 +2399,21 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f461956a4a85c053657fe64e73852940c8a52e7d8fc20ccb4f91688e73f0820b" +checksum = "06ebf036bcb1e61c943cf588d14b903234594fb2538f2d7dae36e20fcc3c86e8" dependencies = [ - "cumulus-primitives-core 0.7.0", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "cumulus-primitives-core 0.8.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "staging-xcm 7.0.0", + "staging-xcm 8.0.0", ] [[package]] @@ -2453,36 +2450,36 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1a0e6800ea92447eab2c9170cc77d21987fd0e61ed79a6e1318f7b127b3e2c" +checksum = "56c253dcebafba5fa2e98f9d7afc313686ab0f54ab90785347a9de2b62b323f7" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro 0.6.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-parachain-inherent 0.7.0", + "cumulus-primitives-core 0.8.0", + "cumulus-primitives-parachain-inherent 0.8.0", "cumulus-primitives-proof-size-hostfunction", "environmental", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "impl-trait-for-tuples", "log", - "pallet-message-queue 31.0.0", + "pallet-message-queue 32.0.0", "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "polkadot-runtime-parachains 7.0.0", + "polkadot-parachain-primitives 7.0.0", + "polkadot-runtime-parachains 8.0.0", "scale-info", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-std 14.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "staging-xcm 7.0.0", + "sp-trie 30.0.0", + "sp-version 30.0.0", + "staging-xcm 8.0.0", "trie-db", ] @@ -2512,16 +2509,16 @@ dependencies = [ [[package]] name = "cumulus-pallet-session-benchmarking" -version = "9.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b90c6389bd56472581a2b9510c97e6fe869fe6c73c58d3d533ee3c74b92cce14" +checksum = "2f3259f743f70f39baa3abf2d9d8de864e18120465f8731b99bef039a3bf9329" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-session 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "pallet-session 29.0.0", "parity-scale-codec", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -2544,19 +2541,19 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcm" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9e5e8dd3f9c98620e32cbb1783725a3e75a3147cb351b43de37663824311cd9" +checksum = "8e802291060763f8d1176bf808da97aafe5afe7351f62bb093c317c1d35c5cee" dependencies = [ - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "cumulus-primitives-core 0.8.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "staging-xcm 7.0.0", + "staging-xcm 8.0.0", ] [[package]] @@ -2586,28 +2583,28 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439cdba45813623e7f45374f160f3356d27fb1aaca2536dd7f60ef2a7e9b30cd" +checksum = "0fa22d6e479a4d3a2790bab291269ba0917a1ac384255a54a2ebc3f7c37e505e" dependencies = [ - "bounded-collections", - "bp-xcm-bridge-hub-router 0.6.0", - "cumulus-primitives-core 0.7.0", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "bounded-collections 0.2.0", + "bp-xcm-bridge-hub-router 0.7.0", + "cumulus-primitives-core 0.8.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "pallet-message-queue 31.0.0", + "pallet-message-queue 32.0.0", "parity-scale-codec", - "polkadot-runtime-common 7.0.0", - "polkadot-runtime-parachains 7.0.0", + "polkadot-runtime-common 8.0.0", + "polkadot-runtime-parachains 8.0.0", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "staging-xcm 7.0.0", - "staging-xcm-executor 7.0.3", + "staging-xcm 8.0.0", + "staging-xcm-executor 8.0.0", ] [[package]] @@ -2630,20 +2627,20 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "036b64697b5fd04c8039ccf15b9891104c496afb6c418c2cea1234d4898d0a28" +checksum = "9df07f6825fd50ea30aae335e43dc1a615a05de7465f5f329b9e414f2c886a12" dependencies = [ "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", + "polkadot-core-primitives 8.0.0", + "polkadot-parachain-primitives 7.0.0", + "polkadot-primitives 8.0.0", "scale-info", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api 27.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "sp-trie 29.0.0", - "staging-xcm 7.0.0", + "sp-trie 30.0.0", + "staging-xcm 8.0.0", ] [[package]] @@ -2672,29 +2669,29 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cb6fe06744fed6e84682c48816181ad63652003570c2135c425481440fcd2f2" +checksum = "38ad140a065a6b8001fb26ec42b91391e90fde120f5b4e57986698249a9b98c8" dependencies = [ "async-trait", - "cumulus-primitives-core 0.7.0", + "cumulus-primitives-core 0.8.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-inherents 26.0.0", + "sp-core 29.0.0", + "sp-inherents 27.0.0", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie 30.0.0", ] [[package]] name = "cumulus-primitives-proof-size-hostfunction" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a132e17ac2c79436bc5004b0d56cb35ca65b966434f14e5ff8a9bc1afcfca5a4" +checksum = "c1b74f9141190b9f4bf96a947ade46da64097b77f1ebfa8d611c81724250e119" dependencies = [ - "sp-externalities 0.25.0", - "sp-runtime-interface 24.0.0", - "sp-trie 29.0.0", + "sp-externalities 0.26.0", + "sp-runtime-interface 25.0.0", + "sp-trie 30.0.0", ] [[package]] @@ -2734,23 +2731,24 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" -version = "0.7.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ece52eeb7e87faea0d374356571ebc13f279df3bf79a1dc8a0db6c49d6ba23" +checksum = "610400dd0bbafde20db3dfccc50540f7ace05e169d93acce2b86008984ea70f7" dependencies = [ - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", + "cumulus-primitives-core 0.8.0", + "frame-support 29.0.0", "log", - "pallet-xcm-benchmarks 7.0.3", + "pallet-asset-conversion", + "pallet-xcm-benchmarks 8.0.0", "parity-scale-codec", - "polkadot-runtime-common 7.0.0", - "polkadot-runtime-parachains 7.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "polkadot-runtime-common 8.0.0", + "polkadot-runtime-parachains 8.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", ] [[package]] @@ -2762,7 +2760,7 @@ dependencies = [ "async-trait", "cumulus-primitives-core 0.4.0", "futures", - "jsonrpsee-core", + "jsonrpsee-core 0.16.3", "parity-scale-codec", "polkadot-overseer", "sc-client-api 25.0.0", @@ -2789,17 +2787,17 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ec12490a40b00427119fd1e12a6d1fe0652d2df3e992dea1bc4f331effed12" +checksum = "bfff604ad01c5c0c397f9a971c8cec6443aea3658813778875b4f64de07847d5" dependencies = [ - "cumulus-primitives-core 0.7.0", + "cumulus-primitives-core 0.8.0", "parity-scale-codec", - "polkadot-primitives 7.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "polkadot-primitives 8.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie 30.0.0", ] [[package]] @@ -3106,7 +3104,7 @@ dependencies = [ "regex", "syn 2.0.48", "termcolor", - "toml 0.8.2", + "toml 0.8.10", "walkdir", ] @@ -3236,25 +3234,25 @@ dependencies = [ "bridge-hub-kusama-runtime", "bridge-hub-polkadot-runtime", "collectives-polkadot-runtime", - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", + "cumulus-primitives-core 0.8.0", + "frame-support 29.0.0", "integration-tests-common", "kusama-runtime-constants", "pallet-im-online", - "pallet-staking 28.0.0", - "parachains-common 7.0.0", + "pallet-staking 29.0.0", + "parachains-common 8.0.0", "penpal-runtime", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", + "polkadot-parachain-primitives 7.0.0", + "polkadot-primitives 8.0.0", "polkadot-runtime", "polkadot-runtime-constants", - "polkadot-runtime-parachains 7.0.0", - "sp-authority-discovery 26.0.0", - "sp-consensus-babe 0.32.0", + "polkadot-runtime-parachains 8.0.0", + "sp-authority-discovery 27.0.0", + "sp-consensus-babe 0.33.0", "sp-consensus-beefy", - "sp-consensus-grandpa 13.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-consensus-grandpa 14.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "staging-kusama-runtime", "xcm-emulator", ] @@ -3814,27 +3812,27 @@ dependencies = [ [[package]] name = "frame-benchmarking" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b16f7f853f64ec6fbc981b3e224cc3400752662da140ec62c160b5b859bab68" +checksum = "4090659c6aaa3c4d5b6c6ec909b4b0a25dec10ad92aad5f729efa8d5bd4d806a" dependencies = [ - "frame-support 28.0.0", - "frame-support-procedural 23.0.0", - "frame-system 28.0.0", + "frame-support 29.0.0", + "frame-support-procedural 24.0.0", + "frame-system 29.0.0", "linregress", "log", "parity-scale-codec", "paste", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-runtime-interface 24.0.0", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-runtime-interface 25.0.0", "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-storage 20.0.0", "static_assertions", ] @@ -3882,19 +3880,19 @@ dependencies = [ [[package]] name = "frame-election-provider-support" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c596d956c4eedaffbe2fd6f75562e63e3e60001222bc6f8cc45fa77f3ea51791" +checksum = "87da19ee99e6473cd057ead84337d20011fe5e299c6750e88e43b8b7963b8852" dependencies = [ "frame-election-provider-solution-type 13.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-npos-elections 27.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -3919,19 +3917,19 @@ dependencies = [ [[package]] name = "frame-executive" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5247e367912fe95f813e96542921ab4edf671860fd557625b55f40155abf90" +checksum = "09bff9574ee2dcc349f646e1d2faadf76afd688c2ea1bbac5e4a0e19a0c19c59" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-try-runtime 0.34.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "frame-try-runtime 0.35.0", "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", "sp-tracing 16.0.0", ] @@ -3950,20 +3948,21 @@ dependencies = [ [[package]] name = "frame-remote-externalities" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26ac8b505de5aa10e9c9548a3642fc708fc47fe3843b840992e6e6ab139f39d0" +checksum = "360bfdb6821372164a65933d9a6d5998f38c722360b59b69d2bf78a87ef58b2a" dependencies = [ "futures", "indicatif", - "jsonrpsee", + "jsonrpsee 0.20.3", "log", "parity-scale-codec", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-core 29.0.0", + "sp-crypto-hashing", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "spinners", "substrate-rpc-client", "tokio", @@ -3995,7 +3994,7 @@ dependencies = [ "sp-api 23.0.0", "sp-arithmetic 20.0.0", "sp-core 25.0.0", - "sp-core-hashing-proc-macro 13.0.0", + "sp-core-hashing-proc-macro", "sp-debug-derive 12.0.0", "sp-genesis-builder 0.4.0", "sp-inherents 23.0.0", @@ -4013,17 +4012,17 @@ dependencies = [ [[package]] name = "frame-support" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48b00bb3e82c465a435b08827e7abe5144345bc1a998848bdd7ce72fa203bb5" +checksum = "a3b24824d29c43d0af94be3356bbf30338ededed649f6841d315a9ae067ce872" dependencies = [ - "aquamarine 0.4.0", + "aquamarine 0.5.0", "array-bytes 6.2.2", "bitflags 1.3.2", "docify", "environmental", "frame-metadata", - "frame-support-procedural 23.0.0", + "frame-support-procedural 24.0.0", "impl-trait-for-tuples", "k256", "log", @@ -4034,21 +4033,21 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-core-hashing-proc-macro 15.0.0", + "sp-api 27.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-crypto-hashing-proc-macro", "sp-debug-derive 14.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", "sp-metadata-ir 0.6.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", - "sp-state-machine 0.35.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", + "sp-state-machine 0.36.0", "sp-std 14.0.0", "sp-tracing 16.0.0", - "sp-weights 27.0.0", + "sp-weights 28.0.0", "static_assertions", "tt-call", ] @@ -4069,15 +4068,15 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "sp-core-hashing 13.0.0", + "sp-core-hashing", "syn 2.0.48", ] [[package]] name = "frame-support-procedural" -version = "23.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0be717139a0da9b31b559356db73f6ce48876d331e833ebdc32de3a9ad581e15" +checksum = "3bf1d648c4007d421b9677b3c893256913498fff159dc2d85022cdd9cc432f3c" dependencies = [ "Inflector", "cfg-expr", @@ -4089,7 +4088,7 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "sp-core-hashing 15.0.0", + "sp-crypto-hashing", "syn 2.0.48", ] @@ -4163,23 +4162,23 @@ dependencies = [ [[package]] name = "frame-system" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "983b3215c8d97775b90dc1db88f858c46401682bd2fb8572bdd102ff8c2ca2a6" +checksum = "5bc20a793c3cec0b11165c1075fe11a255b2491f3eef8230bb3073cb296e7383" dependencies = [ "cfg-if", "docify", - "frame-support 28.0.0", + "frame-support 29.0.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "sp-version 29.0.0", - "sp-weights 27.0.0", + "sp-version 30.0.0", + "sp-weights 28.0.0", ] [[package]] @@ -4200,17 +4199,17 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f78a2fe203b01b596156b2514e0b890b4a628dbdb50925316e755aa623b6fe53" +checksum = "ac47ee48fee3a0b49c9ab9ee68997dee3733776a355f780cf2858449cf495d69" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -4226,12 +4225,12 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d183819ea7df1d89acd61fe423ae6bec24a29d87db5c18182339a751c0837a" +checksum = "4c1b20433c3c76b56ce905ed971631ec8c34fa64cf6c20e590afe46455fc0cc8" dependencies = [ "parity-scale-codec", - "sp-api 26.0.0", + "sp-api 27.0.0", ] [[package]] @@ -4249,14 +4248,14 @@ dependencies = [ [[package]] name = "frame-try-runtime" -version = "0.34.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5b3dab79d14d2e8f6329d7e5cb49f2bdb81b9ef3019b1c405d94defa137a353" +checksum = "0eab87d07bc2f9a2160b818d1b7506c303b3b28b6a8a5f01dc5e2641390450b5" dependencies = [ - "frame-support 28.0.0", + "frame-support 29.0.0", "parity-scale-codec", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api 27.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -4513,39 +4512,39 @@ dependencies = [ name = "glutton-kusama-runtime" version = "1.0.0" dependencies = [ - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-xcm 0.7.0", - "cumulus-primitives-core 0.7.0", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-xcm 0.8.0", + "cumulus-primitives-core 0.8.0", + "frame-benchmarking 29.0.0", + "frame-executive 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "frame-system-benchmarking 29.0.0", + "frame-system-rpc-runtime-api 27.0.0", + "frame-try-runtime 0.35.0", "pallet-glutton", - "pallet-message-queue 31.0.0", + "pallet-message-queue 32.0.0", "pallet-sudo", - "parachains-common 7.0.0", - "parity-scale-codec", - "scale-info", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", - "sp-core 28.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-std 14.0.0", - "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "parachains-common 8.0.0", + "parity-scale-codec", + "scale-info", + "sp-api 27.0.0", + "sp-block-builder 27.0.0", + "sp-core 29.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 27.0.0", + "sp-offchain 27.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "sp-transaction-pool 27.0.0", + "sp-version 30.0.0", + "staging-parachain-info 0.8.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", + "substrate-wasm-builder 18.0.0", "system-parachains-constants", ] @@ -4817,7 +4816,6 @@ dependencies = [ "rustls-native-certs", "tokio", "tokio-rustls", - "webpki-roots 0.25.3", ] [[package]] @@ -5035,29 +5033,29 @@ dependencies = [ "asset-test-utils", "bp-messages", "bridge-runtime-common", - "cumulus-pallet-dmp-queue 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", - "pallet-assets 29.0.0", - "pallet-balances 28.0.0", + "cumulus-pallet-dmp-queue 0.8.0", + "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-xcmp-queue 0.8.0", + "cumulus-primitives-core 0.8.0", + "frame-support 29.0.0", + "pallet-assets 30.0.0", + "pallet-balances 29.0.0", "pallet-bridge-messages", "pallet-im-online", - "pallet-message-queue 31.0.0", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", + "pallet-message-queue 32.0.0", + "pallet-xcm 8.0.0", + "parachains-common 8.0.0", "parity-scale-codec", "paste", - "polkadot-primitives 7.0.0", - "polkadot-runtime-parachains 7.0.0", - "sp-authority-discovery 26.0.0", - "sp-consensus-babe 0.32.0", + "polkadot-primitives 8.0.0", + "polkadot-runtime-parachains 8.0.0", + "sp-authority-discovery 27.0.0", + "sp-consensus-babe 0.33.0", "sp-consensus-beefy", - "sp-consensus-grandpa 13.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "staging-xcm 7.0.0", + "sp-consensus-grandpa 14.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "staging-xcm 8.0.0", "xcm-emulator", ] @@ -5155,25 +5153,38 @@ version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" dependencies = [ - "jsonrpsee-core", + "jsonrpsee-core 0.16.3", + "jsonrpsee-proc-macros 0.16.3", + "jsonrpsee-server 0.16.3", + "jsonrpsee-types 0.16.3", + "tracing", +] + +[[package]] +name = "jsonrpsee" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "affdc52f7596ccb2d7645231fc6163bb314630c989b64998f3699a28b4d5d4dc" +dependencies = [ + "jsonrpsee-core 0.20.3", "jsonrpsee-http-client", - "jsonrpsee-proc-macros", - "jsonrpsee-server", - "jsonrpsee-types", + "jsonrpsee-proc-macros 0.20.3", + "jsonrpsee-server 0.20.3", + "jsonrpsee-types 0.20.3", "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", + "jsonrpsee-core 0.20.3", "pin-project", "rustls-native-certs", "soketto", @@ -5182,7 +5193,7 @@ dependencies = [ "tokio-rustls", "tokio-util", "tracing", - "webpki-roots 0.25.3", + "url", ] [[package]] @@ -5193,15 +5204,38 @@ checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" dependencies = [ "anyhow", "arrayvec 0.7.4", - "async-lock 2.8.0", "async-trait", "beef", "futures-channel", - "futures-timer", "futures-util", "globset", "hyper", - "jsonrpsee-types", + "jsonrpsee-types 0.16.3", + "parking_lot 0.12.1", + "rand 0.8.5", + "rustc-hash", + "serde", + "serde_json", + "soketto", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "jsonrpsee-core" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da2327ba8df2fdbd5e897e2b5ed25ce7f299d345b9736b6828814c3dbd1fd47b" +dependencies = [ + "anyhow", + "async-lock 2.8.0", + "async-trait", + "beef", + "futures-timer", + "futures-util", + "hyper", + "jsonrpsee-types 0.20.3", "parking_lot 0.12.1", "rand 0.8.5", "rustc-hash", @@ -5215,21 +5249,22 @@ 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", + "jsonrpsee-core 0.20.3", + "jsonrpsee-types 0.20.3", "serde", "serde_json", "thiserror", "tokio", + "tower", "tracing", + "url", ] [[package]] @@ -5245,6 +5280,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "jsonrpsee-proc-macros" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29110019693a4fa2dbda04876499d098fa16d70eba06b1e6e2b3f1b251419515" +dependencies = [ + "heck", + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "jsonrpsee-server" version = "0.16.3" @@ -5255,11 +5303,34 @@ dependencies = [ "futures-util", "http", "hyper", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", + "serde", + "serde_json", + "soketto", + "tokio", + "tokio-stream", + "tokio-util", + "tower", + "tracing", +] + +[[package]] +name = "jsonrpsee-server" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82c39a00449c9ef3f50b84fc00fc4acba20ef8f559f07902244abf4c15c5ab9c" +dependencies = [ + "futures-util", + "http", + "hyper", + "jsonrpsee-core 0.20.3", + "jsonrpsee-types 0.20.3", + "route-recognizer", "serde", "serde_json", "soketto", + "thiserror", "tokio", "tokio-stream", "tokio-util", @@ -5281,16 +5352,31 @@ dependencies = [ "tracing", ] +[[package]] +name = "jsonrpsee-types" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be0be325642e850ed0bdff426674d2e66b2b7117c9be23a7caef68a2902b7d9" +dependencies = [ + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", + "tracing", +] + [[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", + "jsonrpsee-core 0.20.3", + "jsonrpsee-types 0.20.3", + "url", ] [[package]] @@ -5325,14 +5411,14 @@ checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" name = "kusama-runtime-constants" version = "1.0.0" dependencies = [ - "frame-support 28.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", + "frame-support 29.0.0", + "polkadot-primitives 8.0.0", + "polkadot-runtime-common 8.0.0", "smallvec", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", - "staging-xcm 7.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-weights 28.0.0", + "staging-xcm 8.0.0", ] [[package]] @@ -5779,7 +5865,7 @@ dependencies = [ "rw-stream-sink", "soketto", "url", - "webpki-roots 0.22.6", + "webpki-roots", ] [[package]] @@ -6118,6 +6204,15 @@ dependencies = [ "libc", ] +[[package]] +name = "memmap2" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.8.0" @@ -6610,9 +6705,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orchestra" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5edee0c1917703f8a28cd229cf6a5c91a7ee34be139ced16509ac5b53b9d0c51" +checksum = "2356622ffdfe72362a45a1e5e87bb113b8327e596e39b91f11f0ef4395c8da79" dependencies = [ "async-trait", "dyn-clonable", @@ -6627,9 +6722,9 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f60e64a3808b5bb2786b9da09fc70714952aabcdd0eeba6f1718e3dbc34ad5b" +checksum = "eedb646674596266dc9bb2b5c7eea7c36b32ecc7777eba0d510196972d72c4fd" dependencies = [ "expander 2.0.0", "indexmap 2.1.0", @@ -6652,58 +6747,58 @@ dependencies = [ [[package]] name = "pallet-alliance" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40fbbd9263e776fbb907283928363c82857a97b3c78120ce15a9ea06ece6570a" +checksum = "2807a0de560760490eb581095a23a68377308879bd6096b0f100795b53898db6" dependencies = [ "array-bytes 6.2.2", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "pallet-collective 28.0.0", + "pallet-collective 29.0.0", "pallet-identity", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-core-hashing 15.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-crypto-hashing", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-asset-conversion" -version = "10.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2139677a59351fbd8513ddd92be4a7443d7d92f8f6897b2bbc78f55d1c6b8a" +checksum = "4079f12db3cf98daa717337ab5b7e5ef15aa3bec3b497f501dc715d129b500da" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-api 27.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-asset-conversion-tx-payment" -version = "10.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95388ffba6e39a34d9e95db0d7f776f36225fac387f3edbcc33856aa2df7913a" +checksum = "d2019e84d65bf6c6105edb61cd6b6f4c6d9a1b347e05d9380e92b0dcf2a29fd7" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "pallet-asset-conversion", - "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment 29.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -6725,17 +6820,17 @@ dependencies = [ [[package]] name = "pallet-asset-rate" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6f4917bc6c9ed6864813bbb828e94c63e1878a21af89d25dd0ff7da742f53e" +checksum = "571ce57fd846911041749832b46a8c2b01f0b79ffebcd7585e3973865607036d" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -6760,20 +6855,20 @@ dependencies = [ [[package]] name = "pallet-asset-tx-payment" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e967664d86219ca9f7d33504e8d914225cdb92e9e793d35edaab1fd2574f162f" +checksum = "9ed783679921ad8b96807d683d320c314e305753b230d5c04dc713bab7aca64c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-transaction-payment 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "pallet-transaction-payment 29.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -6796,18 +6891,18 @@ dependencies = [ [[package]] name = "pallet-assets" -version = "29.0.0" +version = "30.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aca79db2bc70c269170893604d8a56d0f32d52c75a23a3d887b6b4df132366b7" +checksum = "46728a98a910af13f6a77033dd053456650773bb7adc71e0ba845bff7e31b33e" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -6831,19 +6926,19 @@ dependencies = [ [[package]] name = "pallet-aura" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10c6ecf016520a6883df14b2f1d469d98166377eba4b299af7b76eee0130e3a6" +checksum = "a611bef3c8cf281e41a43f32a4153260bdc8b7b61b901e65c7a4442529224e11" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "pallet-timestamp 27.0.0", + "pallet-timestamp 28.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-consensus-aura 0.32.0", - "sp-runtime 31.0.1", + "sp-application-crypto 31.0.0", + "sp-consensus-aura 0.33.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -6866,18 +6961,18 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9224b0a0bb4fa721d51f56947c73d4189710691b4cb40e7f7a8abf59795759a" +checksum = "904f83f518b396c4fd1634fb675a36db0841f22420d3aa664bc154bee6035f57" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-session 28.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "pallet-session 29.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-authority-discovery 26.0.0", - "sp-runtime 31.0.1", + "sp-application-crypto 31.0.0", + "sp-authority-discovery 27.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -6898,16 +6993,16 @@ dependencies = [ [[package]] name = "pallet-authorship" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "817b0420f9c14bd9bfbaf9e2f769a7e8124ab4fe3da0d07c80485c0901947ab8" +checksum = "3d83773e731a1760f99684b09961ed7b92acafe335f36f08ebb8313d3b9c72e2" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -6938,48 +7033,48 @@ dependencies = [ [[package]] name = "pallet-babe" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ba445228a941062d7c4d6295810a359df7757d6182c36ddb824f8c3bf350380" +checksum = "d3f2020c52667a650d64e84a4bbb63388e25bc1c9bc872a8243d03bfcb285049" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "pallet-authorship 28.0.0", - "pallet-session 28.0.0", - "pallet-timestamp 27.0.0", + "pallet-authorship 29.0.0", + "pallet-session 29.0.0", + "pallet-timestamp 28.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-consensus-babe 0.32.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", + "sp-application-crypto 31.0.0", + "sp-consensus-babe 0.33.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-staking 27.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-bags-list" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0d7b6922a6bed960591efb49da6637312c034337faf4c85d8b35f2e2c611a" +checksum = "dd27bfa4bfa5751652842b81241c7eff3e68f2806d9dacc17b03d2cb20a39756" dependencies = [ - "aquamarine 0.4.0", + "aquamarine 0.5.0", "docify", - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "pallet-balances 28.0.0", + "pallet-balances 29.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", "sp-tracing 16.0.0", ] @@ -7002,205 +7097,206 @@ dependencies = [ [[package]] name = "pallet-balances" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8406b5616e468d80972b6365f3cd8211d0dbf4d107b379fac85fddcfdf0b5562" +checksum = "942007f4f7aace74b77009db1675e7ca98683a42dde5e2d85bba2a9f404d2e5a" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "docify", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-beefy" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03f71d32d9681e9d78102dad00377629cac24b4bf43f6371c0dc7e5b25981eb4" +checksum = "4bedd80e9d8b196f31ea134efd271fdc1b8380ca3aa2d8af6ea8b5a0dc4fa460" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "pallet-authorship 28.0.0", - "pallet-session 28.0.0", + "pallet-authorship 29.0.0", + "pallet-session 29.0.0", "parity-scale-codec", "scale-info", "serde", "sp-consensus-beefy", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-staking 27.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-beefy-mmr" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b8eaa5c053d9cbf20faa397f21b80b9b5bafbe428890b0171fd1bba16f52ce" +checksum = "7d334f24d3c0c016d16aa87d069485847d622e8ebebace18ec5cf56609ca3a67" dependencies = [ "array-bytes 6.2.2", "binary-merkle-tree", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "pallet-beefy", "pallet-mmr", - "pallet-session 28.0.0", + "pallet-session 29.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", + "sp-api 27.0.0", "sp-consensus-beefy", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-std 14.0.0", ] [[package]] name = "pallet-bounties" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5d421e3228bc4e8170d817d657aa87761b77ee4675a9e16328e1ca070cb4c41" +checksum = "4765879e96676c13cdbed746d66fd59dcde1e9e65fda1f064fa2fffa3bc5d597" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "pallet-treasury 27.0.0", + "pallet-treasury 28.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-bridge-grandpa" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6023fc7f2ed561589721f64fbdf9368737eae1b7b712d4b75e4c2b3d0d4a6f6" +checksum = "085573f22a29f8108e2e374b4b4c90702a7449c21edc29d1d614889e9b0c8c0c" dependencies = [ "bp-header-chain", "bp-runtime", "bp-test-utils", "finality-grandpa", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-consensus-grandpa 13.0.0", - "sp-runtime 31.0.1", + "sp-consensus-grandpa 14.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie 30.0.0", ] [[package]] name = "pallet-bridge-messages" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca7058e4135266d55f71251996857832656eaa392a0b526f396ff06666921cc6" +checksum = "6b0aac358f6781471f6fd667d5d5af6ee55c3eb11fc494de76787e942bc43726" dependencies = [ "bp-messages", "bp-runtime", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "num-traits", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-bridge-parachains" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "538965e029986aa4cc996d507ad98af51b24ed399fca14ad9ae131f11270ecbf" +checksum = "6976281a13460098827ef61a368ef5c26f07bb4bfaf81a9ee4105577a73fc488" dependencies = [ "bp-header-chain", "bp-parachains", "bp-polkadot-core", "bp-runtime", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "pallet-bridge-grandpa", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie 30.0.0", ] [[package]] name = "pallet-bridge-relayers" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6820dd74455aa2b377d509c30a64562b03b887d08a8fbe7c9963da157f9a9d0" +checksum = "bc71ebc287106596ae4d6026d1bdea6448c4b26f08f4477e8e9a2620e5a7c24b" dependencies = [ "bp-messages", "bp-relayers", "bp-runtime", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 24.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-broker" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904983f117ff92ee24b251f2a883ff01b6f8e9063649877f3892ecbb516e3cbd" +checksum = "fd8cfe04e8c3f9ca8342ac785f2b1aee6140e1809546fc6f3a99fad20a8dfbf9" dependencies = [ "bitvec", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-child-bounties" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb62c44d3ab8dcbf106b22acc138eaea6e51563d16a8d4a246303f2e20eeb9e5" +checksum = "00fd06f2d719f5bb16ab3e836c6b053bbd92631ba694f8c2bf810013b2548167" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "pallet-bounties", - "pallet-treasury 27.0.0", + "pallet-treasury 28.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -7226,21 +7322,21 @@ dependencies = [ [[package]] name = "pallet-collator-selection" -version = "9.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4199122c135e161d2e2f4cbc9339c54a11ac4b11e0beb67e53b49a3c90d566b" +checksum = "59b5ad46601c613396e92292a24c5b5d76e904c456ece9deb10913f6ea2e2999" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "pallet-authorship 28.0.0", - "pallet-session 28.0.0", + "pallet-authorship 29.0.0", + "pallet-session 29.0.0", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", "sp-std 14.0.0", ] @@ -7264,75 +7360,76 @@ dependencies = [ [[package]] name = "pallet-collective" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ed22cf9d91c120695063cfa95ae0ffabcadefdf2581657ddb5fd68555b3a2e0" +checksum = "4c362a0b8f30895c15ecc7d8c24b0d94bb586c4b9bbd37ac8053b4629d9cc80b" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-conviction-voting" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a189b5fb4a473edc7b2d52109fe10d0017b9b56f7c0324018b5970125db3ce3" +checksum = "6aee3a8b6fcde893f862993f9d45eb0fcd492dde0967fd56ef78d79fc7b53dc0" dependencies = [ "assert_matches", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-core-fellowship" -version = "12.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8b59821d4508572c7b7cf9f044b1c87b7aa857acca1af2ec712d901a0002649" +checksum = "c596f690afabed04954b52de0cf4ae3e05fd388d2fce2f64f0d6766c62e8e260" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", + "pallet-ranked-collective", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-democracy" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b687c8a22b37f9b8444a29959f9cd0cf0be2f8efb8cd9bf91860d5dbafdab8b3" +checksum = "aa781d632063087bcd3ff46eb1a668f15647ab116f1c8a7c573b7168f62d72c3" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -7362,24 +7459,24 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc5e1f80bb4ce08b27f5a8a733d5c2d72d083a7d48afa4bdbb1ef3594a31e353" +checksum = "b54d1d3fe9ae61a144d581147e699b7c3009169de0019a0f87cca0bed82681e7" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "pallet-election-provider-support-benchmarking 27.0.0", + "pallet-election-provider-support-benchmarking 28.0.0", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-npos-elections 27.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", "strum", ] @@ -7401,36 +7498,36 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193a8592c5fd534d56d07b2abe14e830d23947fb66f31867083e4f3ef80c8caa" +checksum = "46ec87816a1e32a1ab6deececa99e21e6684b111efe87b11b8298328dbbefd01" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-system 29.0.0", "parity-scale-codec", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", + "sp-npos-elections 27.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-elections-phragmen" -version = "29.0.0" +version = "30.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dd2f70c57cbb3dcde39f141721dd34a8c852e0caaf61ae6b0bbd23138b6e1d3" +checksum = "10cb0158cc7461fda5db04c5791d0df34635bec37181763aca449bade677d12d" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-npos-elections 27.0.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", "sp-std 14.0.0", ] @@ -7639,121 +7736,121 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd6e0b51b82075b046792cdde2d4a2f6c9301f3deba44c26d30ab152060b9028" +checksum = "2222607a0dba10a9d57cab5360a6549b5fda925181c3c7af481246c0964998df" dependencies = [ "docify", - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-glutton" -version = "14.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8140a1a715bb76151ac58bb6617e7a506ec3a89f842c3f6904179cbf6940b987" +checksum = "81f2b2f49d42832bfc2320fb34d606065c0fd1c326a65f9075e5edd354ed2be2" dependencies = [ "blake2 0.10.6", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-grandpa" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "935e91fa8936381aff2b88d8a7dad38ac30a1c8d2310340d73ce1c07b5ae72ce" +checksum = "a5b20be8592eed7ebca2ee661fc43450088552ebe0bd483d7b101cf5968ab12d" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "pallet-authorship 28.0.0", - "pallet-session 28.0.0", + "pallet-authorship 29.0.0", + "pallet-session 29.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-consensus-grandpa 13.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", + "sp-application-crypto 31.0.0", + "sp-consensus-grandpa 14.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-staking 27.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-identity" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3259bb87d50529027fa40267c3662dc80c683f253f121f391c032b019c88fcb" +checksum = "e9e1cae19e30e7dc822c419988b30bb1318d79a8d5da92733822d0e84fe760ca" dependencies = [ "enumflags2", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-im-online" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4be3f0165158828e4e77fae106a93bc1f48cc751755bdb012edb3ac0ef1d246" +checksum = "598ea5c87351edc953d1f455f32ff456cf2f1daf7bbada1f1e03be8e384852ab" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "pallet-authorship 28.0.0", + "pallet-authorship 29.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-indices" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ead239524e40e55d172f024ff6795998068a2ba1c0950e74c4db7f347cfa91e" +checksum = "2e880ebdb429ca76fb400b1b361ed7fce018a5ea2fc2da4764de5156fffdfa73" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-keyring 32.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -7792,19 +7889,19 @@ dependencies = [ [[package]] name = "pallet-membership" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2dfdff5a7e5b21355b34245312ba2ea687444d9003960e7b876e1df518dab" +checksum = "ad901cdf3de23daf23ff8b092ab318b13faebfc1aa4d84263f2fdc84feaf3e9b" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -7830,238 +7927,238 @@ dependencies = [ [[package]] name = "pallet-message-queue" -version = "31.0.0" +version = "32.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab6302efb264a65fd175f3082b72004df125f646a3c68b72fd08e657a468c0d6" +checksum = "9ccb23dee70b184a214d729db550117a0965a69107d466d35181d60a6feede38" dependencies = [ "environmental", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "sp-weights 27.0.0", + "sp-weights 28.0.0", ] [[package]] name = "pallet-mmr" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba6565b91d1d585047648793feece7c2c70080b37e1f55ab3a4fb50b4c1bec86" +checksum = "a6f1f23a70764dad2b4094d8be12ebbb82df210f2e80dd36fa941a5ac191c6cd" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", "sp-mmr-primitives", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-multisig" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14dbcdea9d3d7963aab57078a5bd6f3596186bfcf181d666db6ea2bfdc0184ec" +checksum = "176f6a5c170185f892a047c0ae189bc52eb390f2c0b94d4261ed0ebc7f82a548" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-nft-fractionalization" -version = "10.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948a03e2f5d2202a4bb8f7d701a2f29f557c50582bf6f8ccd7824863092012f" +checksum = "e4225c31beb3a10235dd165c78f340c344ee78f6ebccd7c99d62a71fb76d2e39" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "pallet-assets 29.0.0", + "pallet-assets 30.0.0", "pallet-nfts", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-nfts" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71368a2a22a266fac11104f41334fc82e2b94c3f26a70b13eca98cdecf2e106f" +checksum = "d3a8978bd9c43ac5ebaa7a26e5bd0c130b037d7cde97189e1a62fa64e5ee1ef1" dependencies = [ "enumflags2", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-nfts-runtime-api" -version = "14.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e342996c6bcb1e6a3258b18b1aebf4d77d9c2dd011863393478329e7e8d67128" +checksum = "c412ca82207d43e651ef80a3be837220b82ad0d6c3174922c369ef301ea0e5af" dependencies = [ "pallet-nfts", "parity-scale-codec", - "sp-api 26.0.0", + "sp-api 27.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-nis" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86c541b2785051ebe1ae378be4b086055fbb8b13ee18fd949dfcf68dbd1c3325" +checksum = "32a64a0e80dec2c60d5962dd249061a47dc4356db440f26cdec50b8acaded1d3" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-nomination-pools" -version = "25.0.3" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5989ca1100694371c9951118d58e84e93b60c1919006e9d4ad0f7537952c388" +checksum = "0f14519c1c613d2f8c95c27015864c11a37969a23deeba9f6dbaff4276e1b81c" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "pallet-balances 28.0.0", + "pallet-balances 29.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", "sp-std 14.0.0", "sp-tracing 16.0.0", ] [[package]] name = "pallet-nomination-pools-benchmarking" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01847415cd33a92c65e8d13cb0041a32b2f2523c84d9d944287ae5c0d920c82" +checksum = "18a1eba3078e2492cad15e4695f90eb3fc570386d9f71f8b81f709c7123fc6b5" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "pallet-bags-list", "pallet-nomination-pools", - "pallet-staking 28.0.0", + "pallet-staking 29.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", - "sp-runtime-interface 24.0.0", - "sp-staking 26.0.0", + "sp-runtime 32.0.0", + "sp-runtime-interface 25.0.0", + "sp-staking 27.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-nomination-pools-runtime-api" -version = "23.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64b17d862b833ca07a375646ecc80e164e5618c3aed4e5631816aa7288bf9b1" +checksum = "bc5b35e6c471a669437b987ff02e11e2283412c9ebaeec5334dec3f73bcea652" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", - "sp-api 26.0.0", + "sp-api 27.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-offences" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de7b17230f58ff6b1ec2a70b3c639c49f585841dacf63f30c78db6387a833e0b" +checksum = "60b5bcfdc4f6032d7570929094fd459de12d840c440c395fb4d365d679e13eda" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "pallet-balances 28.0.0", + "pallet-balances 29.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-offences-benchmarking" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "060483993358293d041e5173635082c68c7783a800c0874e8df87c324232f0d1" +checksum = "bbc33e3086c19235cb903cbbbde1bc1c4f428519ad4c23446dc84c75d0061582" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "pallet-babe 28.0.0", - "pallet-balances 28.0.0", + "pallet-babe 29.0.0", + "pallet-balances 29.0.0", "pallet-grandpa", "pallet-im-online", "pallet-offences", - "pallet-session 28.0.0", - "pallet-staking 28.0.0", + "pallet-session 29.0.0", + "pallet-staking 29.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-preimage" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce688c68f117b1916a844579aa5a945d786059b119a1cc80ace370afd1e50da4" +checksum = "7344a30c304771beb90aec34604100185e47cdc0366e268ad18922de602a0c7e" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -8083,91 +8180,93 @@ dependencies = [ [[package]] name = "pallet-proxy" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3162924576a70509136eb4d8513497fb640a8b3ea753883fe29bd454c511485" +checksum = "f7aa31a0b91e8060b808c3e3407e4578a5e94503b174b9e99769147b24fb2c56" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-ranked-collective" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86c6d11592a6ba9039bd3486dba15f0cb045889b2746f4619f5ec78188fdd151" +checksum = "3733dbfc44d8f5e1a08287a9064e5794e9d0e92b1bd68cdad2e22202b1964528" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-recovery" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8649310b8f00e3b2983331cdb7173d1e66e5eeb3a3d21479e7a65386244f883" +checksum = "797b554ddc87082c18223440d61a81cf35ccab6573321ce473a099e7a709a760" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-referenda" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c6645c0c09ff8484c6c7ac1546d908202ed555b18169ea956955e4e2d77b210" +checksum = "da850889e7101b63cadb980b7f39df67feb6d63bc6092769b9b708e9eb596db1" dependencies = [ "assert_matches", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 23.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 24.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-salary" -version = "13.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ad8b06d101931f335ea32f7c0e91bd1241c7b74d856cccf0b4fad8ab7177c" +checksum = "433048af0ba0aae9f8c5a03e3b1b54b6628809a7d2af671a9c0cc54611dae093" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", + "pallet-ranked-collective", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -8191,21 +8290,21 @@ dependencies = [ [[package]] name = "pallet-scheduler" -version = "29.0.0" +version = "30.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc26a27b77170c18261af7be04a6569e3d0d58788255b9f283ccd089aac37887" +checksum = "45e2a4ebe6a5f98b14a26deed8d7a1ea28bb2c2d3ad4d6dc129a725523a2042d" dependencies = [ "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "sp-weights 27.0.0", + "sp-weights 28.0.0", ] [[package]] @@ -8233,61 +8332,61 @@ dependencies = [ [[package]] name = "pallet-session" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e23ca2bfcffb5194de952050557bdd1fe9bce18b2bc81e8f8c01c8a3c3c3e5d8" +checksum = "7412ac59247b300feee53709f7009a23d1c6f8c70528599f48f44e102d896d03" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "impl-trait-for-tuples", "log", - "pallet-timestamp 27.0.0", + "pallet-timestamp 28.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", - "sp-state-machine 0.35.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-staking 27.0.0", + "sp-state-machine 0.36.0", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie 30.0.0", ] [[package]] name = "pallet-session-benchmarking" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc660786028d46e03fb0a419d6a15df3fa556db7ce74efebf5a35037b32b4bc4" +checksum = "b9c2731415381020db1e78db8b40207f8423a16099e78f2fde599cbcb57ea8db" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-session 28.0.0", - "pallet-staking 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "pallet-session 29.0.0", + "pallet-staking 29.0.0", "parity-scale-codec", "rand 0.8.5", - "sp-runtime 31.0.1", - "sp-session 27.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-society" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c19c1f5a410c0b03dc1e3245ffc0269e6c9085e6f6a64ee023f7515b6f8d9b" +checksum = "dba64f96619c25ae7a0b41f4a5111c2d3102e8b8c6cbce80ece6955e825f9de2" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", - "sp-arithmetic 23.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 24.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -8317,25 +8416,25 @@ dependencies = [ [[package]] name = "pallet-staking" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8883bbca2bd6ee41f81382418372ce44fd771ac53591ce9be4018ea43f8c5eda" +checksum = "3a94127295cf027a26e933ea6788b0824e9fedd90740013673e2d36b5d707efe" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "pallet-authorship 28.0.0", - "pallet-session 28.0.0", + "pallet-authorship 29.0.0", + "pallet-session 29.0.0", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", "serde", - "sp-application-crypto 30.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-application-crypto 31.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", "sp-std 14.0.0", ] @@ -8363,57 +8462,57 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" -version = "19.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e23336e4da87101633f95f9932946564c926ca7f87499654b38923b1579c605e" +checksum = "505d45e08bad052f55fb51f00a6b6244d23ee46ffdc8091f6cddf4e3a880319d" dependencies = [ "log", - "sp-arithmetic 23.0.0", + "sp-arithmetic 24.0.0", ] [[package]] name = "pallet-staking-runtime-api" -version = "14.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e27156b772eccb539cb1a1ea1b1b6e98d9c6589e18b913a30f67913fcf67fe7e" +checksum = "237d7b5a10cb6cba727c3e957fb241776302aa3cce589e6759ba53f50129c1a5" dependencies = [ "parity-scale-codec", - "sp-api 26.0.0", - "sp-staking 26.0.0", + "sp-api 27.0.0", + "sp-staking 27.0.0", ] [[package]] name = "pallet-state-trie-migration" -version = "29.0.0" +version = "30.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a48713905a318b0307e523fd3d3ca4b197ce74b2520203ded0d02e8a6c6bbd7" +checksum = "d76e52dedc146b7a9c3b7c5a6ff4c4c442a8ab8cc58ec30e90e1e98cdc51ad34" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-sudo" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053dae9119d2d828af80e8ac98f497dc27155d6b5d42264dab8fae40f2314c41" +checksum = "b6d02f7855d411913e77e57126f4a8b8a32d90d9bf47d0b747e367a1301729c3" dependencies = [ "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -8440,42 +8539,42 @@ dependencies = [ [[package]] name = "pallet-timestamp" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688b89bdd377609b592bd094b304ebca33f4767fe72935465e2fd7db0e797968" +checksum = "c1b8810ddfb254c7fb8cd7698229cce513d309a43ff117b38798dae6120f477b" dependencies = [ "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "sp-storage 19.0.0", - "sp-timestamp 26.0.0", + "sp-storage 20.0.0", + "sp-timestamp 27.0.0", ] [[package]] name = "pallet-tips" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "facf64cab7f7a4762c57e5827597b2ca073755de4c9716444cf0847db34836df" +checksum = "8ca4b9921c9e9b59e8eeb64677ba6ec49743ef5fe98e0b63f77411b2b9f6cc99" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "pallet-treasury 27.0.0", + "pallet-treasury 28.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -8498,18 +8597,18 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18b4ca7a1af9b1f091900a354a96319c7614d7a32106ba86cb7f0b6f90239065" +checksum = "39f690f5c287ad34b28ca951ef7fae80b08cc9218d970723b7a70e4d29396872" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -8528,15 +8627,15 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdfd7c882439b8198c99ece57b5bf785965545a6fa6d0bb7b56b264df1e437a" +checksum = "c78bcba80c7c61712b98a6b5640975ebd25ceb688c18e975af78a0fac81785b0" dependencies = [ - "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment 29.0.0", "parity-scale-codec", - "sp-api 26.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "sp-api 27.0.0", + "sp-runtime 32.0.0", + "sp-weights 28.0.0", ] [[package]] @@ -8561,37 +8660,37 @@ dependencies = [ [[package]] name = "pallet-treasury" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75cb7498228e1a150fa09ce64acafe7105ff39b75dae1c266ba58b7e3eb225e" +checksum = "1605eb5083a2cd172544f33c6e59eca2e23ac49f02f13d1562b1b8a409df9c60" dependencies = [ "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "impl-trait-for-tuples", - "pallet-balances 28.0.0", + "pallet-balances 29.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-uniques" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf5e6bf708cc4d7efe8d66a8bb80da4875724edbcf1f624bd34b6937c0af452" +checksum = "ac9449d6e2cdcc4456466eff97a065c43dde678620551f5fd79072dec3b9f560" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -8614,18 +8713,18 @@ dependencies = [ [[package]] name = "pallet-utility" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384c1d740c019410f6b40586cc387726c2e3c417c0e3e6f7e4774cd46bc6c1d0" +checksum = "954f15b98c3fdebb763bb5cea4ec6803fd180d540ec5b07a9fcb2c118251d52c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -8647,33 +8746,33 @@ dependencies = [ [[package]] name = "pallet-vesting" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55f3ac517a10c14beee86a737b9ea5d592af9ab21cc5354474bc5f7019210358" +checksum = "4525f3038cdf078fea39d913c563ca626f09a615e7724f0c9eac97743c75ff44" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-whitelist" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de259e3329422bf3eb10b7e966f4b1c5caadcb29cd2d45af3a000cb2d184e60d" +checksum = "da0ad4ce05688bdddcdb682cbed2f3edff0ee5349f0b745ebacc27d179582432" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api 27.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -8683,7 +8782,7 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04d5e5404d9dadb39390949aadc2c641c16ce4cb0f47ed7a7ff584ab914c2984" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "frame-benchmarking 25.0.0", "frame-support 25.0.0", "frame-system 25.0.0", @@ -8701,26 +8800,26 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee3520e03ac679125e8dcaa00ce4afeeb106a9623e79b5acf970d72af7f5d02" +checksum = "16bda69e8f69123ff81a6d60479fd91b9794f07a24959ced406f5fccbf77482c" dependencies = [ - "bounded-collections", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "bounded-collections 0.2.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "pallet-balances 28.0.0", + "pallet-balances 29.0.0", "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", ] [[package]] @@ -8745,66 +8844,66 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "7.0.3" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "890bbad7a5752c8d4c3681457bac4e87fafc79cd9dd5b1a94e6f237f93a795a3" +checksum = "3c8e616fcc03682d06f6127f8ae6e31082fc97f795fc4adf8ce67735d7342aea" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", ] [[package]] name = "pallet-xcm-bridge-hub" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99e448ca8caf6006a0c4d018dfa4a14e1728be87f944c598c443d74fb45bd68f" +checksum = "6177a88f606fc95e2bfa576f06b2f461dcdd0e0a01e73276c9478834267d214f" dependencies = [ "bp-messages", "bp-runtime", "bp-xcm-bridge-hub", "bridge-runtime-common", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", ] [[package]] name = "pallet-xcm-bridge-hub-router" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21f10cb76e759fbb672f132d72d9c4f75895ce3c9c9f50d68cd902bc88b043fc" +checksum = "bd5bd3947da7f031c86904f12b6690bbecd2efa122906a8dd838499150fe4322" dependencies = [ - "bp-xcm-bridge-hub-router 0.6.0", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "bp-xcm-bridge-hub-router 0.7.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", ] [[package]] @@ -8844,74 +8943,65 @@ dependencies = [ [[package]] name = "parachains-common" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceadd4f51620023871ece5eeda64734acd17d84d49b45473d335e900a012fdde" +checksum = "d34aa00981a24a2b772afaa49e258f9bcd6bb372db060a05614becc1c74d4456" dependencies = [ - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.3", - "frame-support 28.0.0", - "frame-system 28.0.0", + "cumulus-primitives-core 0.8.0", + "cumulus-primitives-utility 0.8.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "log", - "num-traits", - "pallet-asset-tx-payment 28.0.0", - "pallet-assets 29.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-message-queue 31.0.0", - "pallet-xcm 7.0.0", - "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-primitives 7.0.0", - "rococo-runtime-constants 7.0.0", + "pallet-asset-tx-payment 29.0.0", + "pallet-assets 30.0.0", + "pallet-authorship 29.0.0", + "pallet-balances 29.0.0", + "pallet-collator-selection 10.0.0", + "pallet-message-queue 32.0.0", + "pallet-xcm 8.0.0", + "parity-scale-codec", + "polkadot-primitives 8.0.0", "scale-info", - "smallvec", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-consensus-aura 0.33.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", - "westend-runtime-constants 7.0.0", + "staging-parachain-info 0.8.0", + "staging-xcm 8.0.0", + "staging-xcm-executor 8.0.0", + "substrate-wasm-builder 18.0.0", ] [[package]] name = "parachains-runtimes-test-utils" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cbd399bef5df9f94bc75e29ae2fee5d0dca685888b45cc3dad1961cc1347eb6" -dependencies = [ - "assets-common", - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-parachain-inherent 0.7.0", - "cumulus-test-relay-sproof-builder 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-assets 29.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-session 28.0.0", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d295b9c391ce15f68ddcd7b0d428eb2d3338643a4d1f471b3dd8a15538865e17" +dependencies = [ + "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-xcmp-queue 0.8.0", + "cumulus-primitives-core 0.8.0", + "cumulus-primitives-parachain-inherent 0.8.0", + "cumulus-test-relay-sproof-builder 0.8.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "pallet-balances 29.0.0", + "pallet-collator-selection 10.0.0", + "pallet-session 29.0.0", + "pallet-xcm 8.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 7.0.0", + "sp-consensus-aura 0.33.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", "sp-tracing 16.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "staging-parachain-info 0.8.0", + "staging-xcm 8.0.0", + "staging-xcm-executor 8.0.0", + "substrate-wasm-builder 18.0.0", ] [[package]] @@ -8927,7 +9017,7 @@ dependencies = [ "libc", "log", "lz4", - "memmap2", + "memmap2 0.5.10", "parking_lot 0.12.1", "rand 0.8.5", "siphasher", @@ -9104,67 +9194,66 @@ dependencies = [ [[package]] name = "penpal-runtime" -version = "0.14.3" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73556f5783be7b2045e55625ae72da8c9ca255bbd9c14184c8c18b76ef6f81e2" +checksum = "c804f33306e47153a4bad6a9cd33bbd537fa4b5f9434d505c8a6fc321a0bb71a" dependencies = [ "assets-common", - "cumulus-pallet-aura-ext 0.7.0", - "cumulus-pallet-dmp-queue 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-aura-ext 0.8.0", + "cumulus-pallet-parachain-system 0.8.0", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.3", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "cumulus-pallet-xcm 0.8.0", + "cumulus-pallet-xcmp-queue 0.8.0", + "cumulus-primitives-core 0.8.0", + "cumulus-primitives-utility 0.8.0", + "frame-benchmarking 29.0.0", + "frame-executive 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "frame-system-benchmarking 29.0.0", + "frame-system-rpc-runtime-api 27.0.0", + "frame-try-runtime 0.35.0", "hex-literal", "log", - "pallet-asset-tx-payment 28.0.0", - "pallet-assets 29.0.0", - "pallet-aura 27.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-message-queue 31.0.0", - "pallet-session 28.0.0", + "pallet-asset-tx-payment 29.0.0", + "pallet-assets 30.0.0", + "pallet-aura 28.0.0", + "pallet-authorship 29.0.0", + "pallet-balances 29.0.0", + "pallet-collator-selection 10.0.0", + "pallet-message-queue 32.0.0", + "pallet-session 29.0.0", "pallet-sudo", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", + "pallet-timestamp 28.0.0", + "pallet-transaction-payment 29.0.0", + "pallet-transaction-payment-rpc-runtime-api 29.0.0", + "pallet-xcm 8.0.0", + "parachains-common 8.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 7.0.0", + "polkadot-primitives 8.0.0", + "polkadot-runtime-common 8.0.0", "scale-info", "smallvec", - "snowbridge-rococo-common", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-std 14.0.0", - "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "sp-api 27.0.0", + "sp-block-builder 27.0.0", + "sp-consensus-aura 0.33.0", + "sp-core 29.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 27.0.0", + "sp-offchain 27.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "sp-transaction-pool 27.0.0", + "sp-version 30.0.0", + "staging-parachain-info 0.8.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", + "substrate-wasm-builder 18.0.0", + "testnet-parachains-constants", ] [[package]] @@ -9258,14 +9347,14 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda2b0f0c580c38f12445a4af10e0a23acf48381b2a95653e0be48ba787e10e5" +checksum = "b6a08e4e014c853b252ecbbe3ccd67b2d33d78e46988d309b8cccf4ac06e25ef" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -9411,7 +9500,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42265630c0c48e25d7ee5a9f4bdcafd003be65c0a44deeb6541620ca169fa519" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "derive_more", "frame-support 25.0.0", "parity-scale-codec", @@ -9425,20 +9514,20 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b37c55955147479e7b2f3c2e5385db4846ac3e3b997cd4a4ad52344524b5447" +checksum = "248ab090959a92e61493277e33b7e85104280a4beb4cb0815137d3c8c50a07f4" dependencies = [ - "bounded-collections", + "bounded-collections 0.2.0", "derive_more", "parity-scale-codec", - "polkadot-core-primitives 7.0.0", + "polkadot-core-primitives 8.0.0", "scale-info", "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "sp-weights 27.0.0", + "sp-weights 28.0.0", ] [[package]] @@ -9470,28 +9559,28 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8aefd230a654f5b2aee18ebbd9c081835def0e1898ee6c018501dd77c18f5929" +checksum = "f66d047db81997a1ec9526987031b0d8f146edb0bdcdc0f9af73f6a2aa62fbce" dependencies = [ "bitvec", "hex-literal", "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", + "polkadot-core-primitives 8.0.0", + "polkadot-parachain-primitives 7.0.0", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-authority-discovery 26.0.0", - "sp-consensus-slots 0.32.0", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", + "sp-authority-discovery 27.0.0", + "sp-consensus-slots 0.33.0", + "sp-core 29.0.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", "sp-std 14.0.0", ] @@ -9501,40 +9590,40 @@ version = "1.0.0" dependencies = [ "binary-merkle-tree", "bitvec", - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-executive 28.0.0", + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-executive 29.0.0", "frame-remote-externalities", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "frame-system-benchmarking 29.0.0", + "frame-system-rpc-runtime-api 27.0.0", + "frame-try-runtime 0.35.0", "hex-literal", "log", - "pallet-asset-rate 7.0.0", - "pallet-authority-discovery 28.0.0", - "pallet-authorship 28.0.0", - "pallet-babe 28.0.0", + "pallet-asset-rate 8.0.0", + "pallet-authority-discovery 29.0.0", + "pallet-authorship 29.0.0", + "pallet-babe 29.0.0", "pallet-bags-list", - "pallet-balances 28.0.0", + "pallet-balances 29.0.0", "pallet-beefy", "pallet-beefy-mmr", "pallet-bounties", "pallet-child-bounties", - "pallet-collective 28.0.0", + "pallet-collective 29.0.0", "pallet-conviction-voting", "pallet-democracy", - "pallet-election-provider-multi-phase 27.0.0", - "pallet-election-provider-support-benchmarking 27.0.0", + "pallet-election-provider-multi-phase 28.0.0", + "pallet-election-provider-support-benchmarking 28.0.0", "pallet-elections-phragmen", - "pallet-fast-unstake 27.0.0", + "pallet-fast-unstake 28.0.0", "pallet-grandpa", "pallet-identity", "pallet-im-online", "pallet-indices", - "pallet-membership 28.0.0", - "pallet-message-queue 31.0.0", + "pallet-membership 29.0.0", + "pallet-message-queue 32.0.0", "pallet-mmr", "pallet-multisig", "pallet-nomination-pools", @@ -9543,66 +9632,66 @@ dependencies = [ "pallet-offences", "pallet-offences-benchmarking", "pallet-preimage", - "pallet-proxy 28.0.0", + "pallet-proxy 29.0.0", "pallet-referenda", - "pallet-scheduler 29.0.0", - "pallet-session 28.0.0", + "pallet-scheduler 30.0.0", + "pallet-session 29.0.0", "pallet-session-benchmarking", - "pallet-staking 28.0.0", + "pallet-staking 29.0.0", "pallet-staking-reward-curve", - "pallet-staking-reward-fn 19.0.0", + "pallet-staking-reward-fn 20.0.0", "pallet-staking-runtime-api", - "pallet-timestamp 27.0.0", + "pallet-timestamp 28.0.0", "pallet-tips", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-treasury 27.0.0", - "pallet-utility 28.0.0", - "pallet-vesting 28.0.0", + "pallet-transaction-payment 29.0.0", + "pallet-transaction-payment-rpc-runtime-api 29.0.0", + "pallet-treasury 28.0.0", + "pallet-utility 29.0.0", + "pallet-vesting 29.0.0", "pallet-whitelist", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-xcm 8.0.0", + "pallet-xcm-benchmarks 8.0.0", "parity-scale-codec", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", + "polkadot-primitives 8.0.0", + "polkadot-runtime-common 8.0.0", "polkadot-runtime-constants", - "polkadot-runtime-parachains 7.0.0", + "polkadot-runtime-parachains 8.0.0", "rustc-hex", "scale-info", "separator", "serde", "serde_derive", "serde_json", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-authority-discovery 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-babe 0.32.0", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", + "sp-authority-discovery 27.0.0", + "sp-block-builder 27.0.0", + "sp-consensus-babe 0.33.0", "sp-consensus-beefy", - "sp-core 28.0.0", + "sp-core 29.0.0", "sp-debug-derive 14.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-keyring 32.0.0", "sp-mmr-primitives", - "sp-npos-elections 26.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", + "sp-npos-elections 27.0.0", + "sp-offchain 27.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-staking 27.0.0", "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-storage 20.0.0", "sp-tracing 16.0.0", - "sp-transaction-pool 26.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "sp-transaction-pool 27.0.0", + "sp-trie 30.0.0", + "sp-version 30.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", "static_assertions", - "substrate-wasm-builder 17.0.0", + "substrate-wasm-builder 18.0.0", "tiny-keccak", "tokio", ] @@ -9660,54 +9749,54 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4641a850b7415a42e56bd262aba243ed77a9280cb2b825a427c425bdc8961d70" +checksum = "d4332f736bf9859c2f66d4db0f68f686a764c1e185392ecfc5e98efb53af05af" dependencies = [ "bitvec", - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "impl-trait-for-tuples", "libsecp256k1", "log", - "pallet-asset-rate 7.0.0", - "pallet-authorship 28.0.0", - "pallet-babe 28.0.0", - "pallet-balances 28.0.0", + "pallet-asset-rate 8.0.0", + "pallet-authorship 29.0.0", + "pallet-babe 29.0.0", + "pallet-balances 29.0.0", "pallet-broker", - "pallet-election-provider-multi-phase 27.0.0", - "pallet-fast-unstake 27.0.0", + "pallet-election-provider-multi-phase 28.0.0", + "pallet-fast-unstake 28.0.0", "pallet-identity", - "pallet-session 28.0.0", - "pallet-staking 28.0.0", - "pallet-staking-reward-fn 19.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-treasury 27.0.0", - "pallet-vesting 28.0.0", - "pallet-xcm-benchmarks 7.0.3", - "parity-scale-codec", - "polkadot-primitives 7.0.0", - "polkadot-runtime-parachains 7.0.0", + "pallet-session 29.0.0", + "pallet-staking 29.0.0", + "pallet-staking-reward-fn 20.0.0", + "pallet-timestamp 28.0.0", + "pallet-transaction-payment 29.0.0", + "pallet-treasury 28.0.0", + "pallet-vesting 29.0.0", + "pallet-xcm-benchmarks 8.0.0", + "parity-scale-codec", + "polkadot-primitives 8.0.0", + "polkadot-runtime-parachains 8.0.0", "rustc-hex", "scale-info", "serde", "serde_derive", - "slot-range-helper 7.0.0", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", - "sp-std 14.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "slot-range-helper 8.0.0", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-npos-elections 27.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-staking 27.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", "static_assertions", ] @@ -9715,14 +9804,14 @@ dependencies = [ name = "polkadot-runtime-constants" version = "1.0.0" dependencies = [ - "frame-support 28.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", + "frame-support 29.0.0", + "polkadot-primitives 8.0.0", + "polkadot-runtime-common 8.0.0", "smallvec", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", - "staging-xcm 7.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-weights 28.0.0", + "staging-xcm 8.0.0", ] [[package]] @@ -9741,14 +9830,14 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac3c6ee03f38556274b26049c51c5c7095abfd4ebfd11cd492918a4344f2851" +checksum = "e3566c6fd0c21b5dd555309427c984cf506f875ee90f710acea295b478fecbe0" dependencies = [ "bs58 0.5.0", - "frame-benchmarking 28.0.0", + "frame-benchmarking 29.0.0", "parity-scale-codec", - "polkadot-primitives 7.0.0", + "polkadot-primitives 8.0.0", "sp-std 14.0.0", "sp-tracing 16.0.0", ] @@ -9803,52 +9892,52 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d253ef2952097398d98ed12729e47f9328bcd1baa92c3acc1524a4baca7d1ac" +checksum = "ef42b7542a9c5b41ebf925d52bc0ce431232e01b0991b8c01a95f0f5f4eac0cf" dependencies = [ "bitflags 1.3.2", "bitvec", "derive_more", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "impl-trait-for-tuples", "log", - "pallet-authority-discovery 28.0.0", - "pallet-authorship 28.0.0", - "pallet-babe 28.0.0", - "pallet-balances 28.0.0", + "pallet-authority-discovery 29.0.0", + "pallet-authorship 29.0.0", + "pallet-babe 29.0.0", + "pallet-balances 29.0.0", "pallet-broker", - "pallet-message-queue 31.0.0", - "pallet-session 28.0.0", - "pallet-staking 28.0.0", - "pallet-timestamp 27.0.0", - "pallet-vesting 28.0.0", - "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-metrics 7.0.0", + "pallet-message-queue 32.0.0", + "pallet-session 29.0.0", + "pallet-staking 29.0.0", + "pallet-timestamp 28.0.0", + "pallet-vesting 29.0.0", + "parity-scale-codec", + "polkadot-core-primitives 8.0.0", + "polkadot-parachain-primitives 7.0.0", + "polkadot-primitives 8.0.0", + "polkadot-runtime-metrics 8.0.0", "rand 0.8.5", "rand_chacha 0.3.1", "rustc-hex", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-staking 27.0.0", "sp-std 14.0.0", "sp-tracing 16.0.0", - "staging-xcm 7.0.0", - "staging-xcm-executor 7.0.3", + "staging-xcm 8.0.0", + "staging-xcm-executor 8.0.0", "static_assertions", ] @@ -10131,7 +10220,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]] @@ -10148,7 +10247,7 @@ dependencies = [ "multimap", "petgraph", "prettyplease 0.1.25", - "prost", + "prost 0.11.9", "prost-types", "regex", "syn 1.0.109", @@ -10169,13 +10268,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.48", +] + [[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]] @@ -10579,21 +10691,27 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b5b507493a19b5061eb2860c394847261216c7ea7f8f62ba2cb02e55c27d611" +checksum = "0b45c21ccb0f8777512a65510c106aeee4b59682944b9a5cb31cd7b8ed4ccb47" dependencies = [ - "frame-support 28.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", + "frame-support 29.0.0", + "polkadot-primitives 8.0.0", + "polkadot-runtime-common 8.0.0", "smallvec", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-weights 28.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", ] +[[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" @@ -10821,12 +10939,12 @@ dependencies = [ [[package]] name = "sc-allocator" -version = "23.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b05714bc70605d5f8983612d1643d875cd4782ef53a8720907a0eb75070cba" +checksum = "357127c91373ed6d1ae582f6e3300ab5b13bcde43bbf270a891f44194ef48b70" dependencies = [ "log", - "sp-core 28.0.0", + "sp-core 29.0.0", "sp-wasm-interface 20.0.0", "thiserror", ] @@ -10845,7 +10963,7 @@ dependencies = [ "log", "multihash", "parity-scale-codec", - "prost", + "prost 0.11.9", "prost-build", "rand 0.8.5", "sc-client-api 25.0.0", @@ -10878,18 +10996,18 @@ dependencies = [ [[package]] name = "sc-block-builder" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "656b85de8aad8dd758f2e5f250f300e4711f294f238c9299064fbd624cb263f7" +checksum = "8e8b0640994965c6ff3afa13242d95a61611b83da21fd86ac2b1ebd03e241a02" dependencies = [ "parity-scale-codec", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", - "sp-blockchain 28.0.0", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", - "sp-trie 29.0.0", + "sp-api 27.0.0", + "sp-block-builder 27.0.0", + "sp-blockchain 29.0.0", + "sp-core 29.0.0", + "sp-inherents 27.0.0", + "sp-runtime 32.0.0", + "sp-trie 30.0.0", ] [[package]] @@ -10898,7 +11016,7 @@ version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec7e711ea9870d3fb8e2a3ea5b601a9e20c63d0d2f457f40146407721e246a77" dependencies = [ - "memmap2", + "memmap2 0.5.10", "sc-chain-spec-derive 10.0.0", "sc-client-api 25.0.0", "sc-executor 0.29.0", @@ -10914,28 +11032,29 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7f6a6926973e084fe9b23ffee9784cd41d84ea0627c605891542661bd9ff958" +checksum = "0f73880050f8b04fed7f6301279ef3899df13a3891bd06156d56f9a1c50fefba" dependencies = [ "array-bytes 6.2.2", "docify", "log", - "memmap2", + "memmap2 0.9.4", "parity-scale-codec", "sc-chain-spec-derive 11.0.0", - "sc-client-api 28.0.0", - "sc-executor 0.32.0", - "sc-network 0.34.0", - "sc-telemetry 15.0.0", + "sc-client-api 29.0.0", + "sc-executor 0.33.0", + "sc-network 0.35.0", + "sc-telemetry 16.0.0", "serde", "serde_json", - "sp-blockchain 28.0.0", - "sp-core 28.0.0", - "sp-genesis-builder 0.7.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-blockchain 29.0.0", + "sp-core 29.0.0", + "sp-crypto-hashing", + "sp-genesis-builder 0.8.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", ] [[package]] @@ -11033,29 +11152,29 @@ dependencies = [ [[package]] name = "sc-client-api" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af05565a0f6467ebe0b430f3a44524fecee9e4aff621647ea5eab8833f775b6f" +checksum = "3e914dfadaaf384d8869ae47f3ec783bf6a1ac24e7827f5fec2e0e649a450a91" dependencies = [ "fnv", "futures", "log", "parity-scale-codec", "parking_lot 0.12.1", - "sc-executor 0.32.0", - "sc-transaction-pool-api 28.0.0", - "sc-utils 14.0.0", - "sp-api 26.0.0", - "sp-blockchain 28.0.0", - "sp-consensus 0.32.0", - "sp-core 28.0.0", + "sc-executor 0.33.0", + "sc-transaction-pool-api 29.0.0", + "sc-utils 15.0.0", + "sp-api 27.0.0", + "sp-blockchain 29.0.0", + "sp-consensus 0.33.0", + "sp-core 29.0.0", "sp-database 10.0.0", - "sp-externalities 0.25.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-statement-store 10.0.0", - "sp-storage 19.0.0", - "sp-trie 29.0.0", + "sp-externalities 0.26.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", + "sp-statement-store 11.0.0", + "sp-storage 20.0.0", + "sp-trie 30.0.0", "substrate-prometheus-endpoint 0.17.0", ] @@ -11114,9 +11233,9 @@ dependencies = [ [[package]] name = "sc-consensus" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0409758bb01f2e975b01c7cb2203aa27746e9796a483b18c57123e6e78fae5" +checksum = "c8e1ac2c698b828073982b6f5b1a466fcc345a452983356af74254ade8e9987d" dependencies = [ "async-trait", "futures", @@ -11125,24 +11244,24 @@ dependencies = [ "log", "mockall", "parking_lot 0.12.1", - "sc-client-api 28.0.0", - "sc-utils 14.0.0", - "serde", - "sp-api 26.0.0", - "sp-blockchain 28.0.0", - "sp-consensus 0.32.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sc-client-api 29.0.0", + "sc-utils 15.0.0", + "serde", + "sp-api 27.0.0", + "sp-blockchain 29.0.0", + "sp-consensus 0.33.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "substrate-prometheus-endpoint 0.17.0", "thiserror", ] [[package]] name = "sc-consensus-grandpa" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a824457a3384e7bc19d7ee587dffa5b646deb81a2351be0dd075c2110a3d677a" +checksum = "7ae91e5b5a120be4d13a59eaf94fd85d7c7af528482b8e21d861fa1167df3083" dependencies = [ "ahash 0.8.8", "array-bytes 6.2.2", @@ -11156,27 +11275,28 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "rand 0.8.5", - "sc-block-builder 0.33.0", - "sc-chain-spec 27.0.0", - "sc-client-api 28.0.0", - "sc-consensus 0.33.0", - "sc-network 0.34.0", - "sc-network-common 0.33.0", + "sc-block-builder 0.34.0", + "sc-chain-spec 28.0.0", + "sc-client-api 29.0.0", + "sc-consensus 0.34.0", + "sc-network 0.35.0", + "sc-network-common 0.34.0", "sc-network-gossip", - "sc-network-sync 0.33.0", - "sc-telemetry 15.0.0", - "sc-transaction-pool-api 28.0.0", - "sc-utils 14.0.0", + "sc-network-sync 0.34.0", + "sc-telemetry 16.0.0", + "sc-transaction-pool-api 29.0.0", + "sc-utils 15.0.0", "serde_json", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-blockchain 28.0.0", - "sp-consensus 0.32.0", - "sp-consensus-grandpa 13.0.0", - "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", + "sp-blockchain 29.0.0", + "sp-consensus 0.33.0", + "sp-consensus-grandpa 14.0.0", + "sp-core 29.0.0", + "sp-crypto-hashing", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint 0.17.0", "thiserror", ] @@ -11206,23 +11326,23 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3129f8af1f8aa5b05829ffec942feff61163054a536704ba48fdcc2276f6042a" +checksum = "aa2ac6c356538d67987bbb867e11a12a84ba87250c70fd50005b6d74f570a4f7" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "sc-executor-common 0.29.0", - "sc-executor-wasmtime 0.29.0", + "sc-executor-common 0.30.0", + "sc-executor-wasmtime 0.30.0", "schnellru", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-io 30.0.0", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-io 31.0.0", "sp-panic-handler 13.0.0", - "sp-runtime-interface 24.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", + "sp-runtime-interface 25.0.0", + "sp-trie 30.0.0", + "sp-version 30.0.0", "sp-wasm-interface 20.0.0", "tracing", ] @@ -11237,20 +11357,20 @@ dependencies = [ "sp-maybe-compressed-blob 9.0.0", "sp-wasm-interface 18.0.0", "thiserror", - "wasm-instrument", + "wasm-instrument 0.3.0", ] [[package]] name = "sc-executor-common" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0285a4a14c0d2c1d04380ff83cddd79181ded510c605d36804cb9c6eb3bbf2ae" +checksum = "07498138dee3ddf2c71299ca372d8449880bb3a8a8a299a483094e9c26b0823e" dependencies = [ - "sc-allocator 23.0.0", + "sc-allocator 24.0.0", "sp-maybe-compressed-blob 11.0.0", "sp-wasm-interface 20.0.0", "thiserror", - "wasm-instrument", + "wasm-instrument 0.4.0", ] [[package]] @@ -11274,9 +11394,9 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c2ba6ea0e68400caf4847fbcfca6123952b05a817e06f024e9cbafa665ac9d8" +checksum = "30a387779ab54ec1ffce0bf3a6631faada079459d42796c1895683767918a642" dependencies = [ "anyhow", "cfg-if", @@ -11284,9 +11404,9 @@ dependencies = [ "log", "parking_lot 0.12.1", "rustix 0.36.17", - "sc-allocator 23.0.0", - "sc-executor-common 0.29.0", - "sp-runtime-interface 24.0.0", + "sc-allocator 24.0.0", + "sc-executor-common 0.30.0", + "sp-runtime-interface 25.0.0", "sp-wasm-interface 20.0.0", "wasmtime", ] @@ -11354,9 +11474,9 @@ dependencies = [ [[package]] name = "sc-mixnet" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cac7d7145c712c4a8b184b3979fe1a154c200ebb1b9f11f1e4e39db97a389f8" +checksum = "45fb213c15679fe5b87c383815d7fb758c70d3e7c573948bd7fe26ff344d2272" dependencies = [ "array-bytes 4.2.0", "arrayvec 0.7.4", @@ -11370,15 +11490,15 @@ dependencies = [ "multiaddr", "parity-scale-codec", "parking_lot 0.12.1", - "sc-client-api 28.0.0", - "sc-network 0.34.0", - "sc-transaction-pool-api 28.0.0", - "sp-api 26.0.0", - "sp-consensus 0.32.0", - "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-mixnet 0.4.0", - "sp-runtime 31.0.1", + "sc-client-api 29.0.0", + "sc-network 0.35.0", + "sc-transaction-pool-api 29.0.0", + "sp-api 27.0.0", + "sp-consensus 0.33.0", + "sp-core 29.0.0", + "sp-keystore 0.35.0", + "sp-mixnet 0.5.0", + "sp-runtime 32.0.0", "thiserror", ] @@ -11426,9 +11546,9 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.34.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2f49eccabc1de61ff976a184f5380a230f07baa5cb075a31c8ec9459fcd076" +checksum = "f231c7d5e749ec428b4cfa669d759ae76cd3da4f50d7352a2d711acdc7532891" dependencies = [ "array-bytes 6.2.2", "async-channel", @@ -11449,16 +11569,16 @@ dependencies = [ "partial_sort", "pin-project", "rand 0.8.5", - "sc-client-api 28.0.0", - "sc-network-common 0.33.0", - "sc-utils 14.0.0", + "sc-client-api 29.0.0", + "sc-network-common 0.34.0", + "sc-utils 15.0.0", "serde", "serde_json", "smallvec", - "sp-arithmetic 23.0.0", - "sp-blockchain 28.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 24.0.0", + "sp-blockchain 29.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint 0.17.0", "thiserror", "tokio", @@ -11479,7 +11599,7 @@ dependencies = [ "futures", "libp2p-identity", "log", - "prost", + "prost 0.11.9", "prost-build", "sc-client-api 25.0.0", "sc-network 0.31.0", @@ -11509,9 +11629,9 @@ dependencies = [ [[package]] name = "sc-network-common" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b798acc12d5b3120b2d5e8a078fcec39d6732089261136ac31c993235ade917" +checksum = "3504bbff5ab016948dbab0f21a8be26324810b76eff3627ce744adb5bfc1b3ce" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -11519,28 +11639,28 @@ dependencies = [ "libp2p-identity", "parity-scale-codec", "prost-build", - "sc-consensus 0.33.0", - "sp-consensus 0.32.0", - "sp-consensus-grandpa 13.0.0", - "sp-runtime 31.0.1", + "sc-consensus 0.34.0", + "sp-consensus 0.33.0", + "sp-consensus-grandpa 14.0.0", + "sp-runtime 32.0.0", ] [[package]] name = "sc-network-gossip" -version = "0.34.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd92792f3a04fcb1f21018c9f8a5d6d438d705a2548ffcdc7730280c667b8386" +checksum = "dad02cf809c34b53614fa61377e3289064edf6c78eb11df071d11fbf7546d7e9" dependencies = [ "ahash 0.8.8", "futures", "futures-timer", "libp2p", "log", - "sc-network 0.34.0", - "sc-network-common 0.33.0", - "sc-network-sync 0.33.0", + "sc-network 0.35.0", + "sc-network-common 0.34.0", + "sc-network-sync 0.34.0", "schnellru", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint 0.17.0", "tracing", ] @@ -11557,7 +11677,7 @@ dependencies = [ "libp2p-identity", "log", "parity-scale-codec", - "prost", + "prost 0.11.9", "prost-build", "sc-client-api 25.0.0", "sc-network 0.31.0", @@ -11583,7 +11703,7 @@ dependencies = [ "log", "mockall", "parity-scale-codec", - "prost", + "prost 0.11.9", "prost-build", "sc-client-api 25.0.0", "sc-consensus 0.30.0", @@ -11605,9 +11725,9 @@ dependencies = [ [[package]] name = "sc-network-sync" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4c92fd35c49f748abf0bf420e1e99aa76b0f48ab43c183ea5dacef951116d7e" +checksum = "9aa9377059deece4e7d419d9ec456f657268c0c603e1cf98df4a920f6da83461" dependencies = [ "array-bytes 6.2.2", "async-channel", @@ -11619,21 +11739,21 @@ dependencies = [ "log", "mockall", "parity-scale-codec", - "prost", + "prost 0.12.3", "prost-build", - "sc-client-api 28.0.0", - "sc-consensus 0.33.0", - "sc-network 0.34.0", - "sc-network-common 0.33.0", - "sc-utils 14.0.0", + "sc-client-api 29.0.0", + "sc-consensus 0.34.0", + "sc-network 0.35.0", + "sc-network-common 0.34.0", + "sc-utils 15.0.0", "schnellru", "smallvec", - "sp-arithmetic 23.0.0", - "sp-blockchain 28.0.0", - "sp-consensus 0.32.0", - "sp-consensus-grandpa 13.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 24.0.0", + "sp-blockchain 29.0.0", + "sp-consensus 0.33.0", + "sp-consensus-grandpa 14.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint 0.17.0", "thiserror", "tokio", @@ -11666,7 +11786,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb277280b6b3519e4a2e693b75d4ca516ebb4a928162e6a1791b217b2be60c9f" dependencies = [ "futures", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -11698,7 +11818,7 @@ version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "def499ac717db8442fe18543e52330d5f105027b666df73c0b38e81e9105078b" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.16.3", "parity-scale-codec", "sc-chain-spec 24.0.0", "sc-mixnet 0.1.0", @@ -11715,22 +11835,22 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630e81a436f32487452ae1a57ad0ba31f320ddf864bb7faefd7490fe16b3e139" +checksum = "e9db6aaabfa7e0c27ec15d0f0a11b994cd4bcf86e362f0d9732b4a414d793f0f" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.20.3", "parity-scale-codec", - "sc-chain-spec 27.0.0", - "sc-mixnet 0.4.0", - "sc-transaction-pool-api 28.0.0", + "sc-chain-spec 28.0.0", + "sc-mixnet 0.5.0", + "sc-transaction-pool-api 29.0.0", "scale-info", "serde", "serde_json", - "sp-core 28.0.0", - "sp-rpc 26.0.0", - "sp-runtime 31.0.1", - "sp-version 29.0.0", + "sp-core 29.0.0", + "sp-rpc 27.0.0", + "sp-runtime 32.0.0", + "sp-version 30.0.0", "thiserror", ] @@ -11741,7 +11861,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8083e1b026dcf397f8c1122b3fba6cc744c6962996df6a30e0fb75223f7637" dependencies = [ "http", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "serde_json", "substrate-prometheus-endpoint 0.16.0", @@ -11760,7 +11880,7 @@ dependencies = [ "futures", "futures-util", "hex", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -11790,7 +11910,7 @@ dependencies = [ "exit-future", "futures", "futures-timer", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -11898,9 +12018,9 @@ dependencies = [ [[package]] name = "sc-telemetry" -version = "15.0.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96841bdc22e1ad5931e6cb7557b06ef33aeda7f5eef3864653359840f9fd025a" +checksum = "0673a93aa0684b606abfc5fce6c882ada7bb5fad8a2ddc66a09a42bcc9664d91" dependencies = [ "chrono", "futures", @@ -11909,7 +12029,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "rand 0.8.5", - "sc-utils 14.0.0", + "sc-utils 15.0.0", "serde", "serde_json", "thiserror", @@ -12004,18 +12124,18 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3402336f81a52fd6b1fd5a16fa3f4279032de1e113fe4a973865bf0b0e28679c" +checksum = "93ae888ce3491acb1b489c3dba930d0c46c7ef9f9893ba0ab8af9125362f3d14" dependencies = [ "async-trait", "futures", "log", "parity-scale-codec", "serde", - "sp-blockchain 28.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-blockchain 29.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "thiserror", ] @@ -12037,9 +12157,9 @@ dependencies = [ [[package]] name = "sc-utils" -version = "14.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4d5d1f106d670dd0c56fe540e8b0916aaeff6960bb39440ed8f3c80b52f8d4" +checksum = "28b1a238f5baa56405db4e440e2d2f697583736fa2e2f1aac345c438a42975f1" dependencies = [ "async-channel", "futures", @@ -12048,7 +12168,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "prometheus", - "sp-arithmetic 23.0.0", + "sp-arithmetic 24.0.0", ] [[package]] @@ -12279,9 +12399,9 @@ checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5" [[package]] name = "serde" -version = "1.0.195" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] @@ -12297,9 +12417,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.195" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", @@ -12308,9 +12428,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.111" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ "itoa", "ryu", @@ -12474,14 +12594,14 @@ dependencies = [ [[package]] name = "slot-range-helper" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d9bb569dc58f1e139c20f532a2ad13d54795060c0000c2c49dc812b17684197" +checksum = "d40fa5e14772407fd2ccffdd5971bf055bbf46a40727c0ea96d2bb6563d17e1c" dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -12514,17 +12634,6 @@ dependencies = [ "subtle 2.5.0", ] -[[package]] -name = "snowbridge-rococo-common" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dc8ddfb7bec2140079a788c312010f793d75fde1f996128517b0c14270296a4" -dependencies = [ - "frame-support 28.0.0", - "log", - "staging-xcm 7.0.0", -] - [[package]] name = "socket2" version = "0.4.10" @@ -12586,23 +12695,23 @@ dependencies = [ [[package]] name = "sp-api" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dea138c6dbf282ab57756492f0232ea0a08575ca9cbe2b7b1ead49000f238a7" +checksum = "6ef42aa652381ade883c14ffbbb5c0fec36d382d2217b5bace01b8a0e8634778" dependencies = [ "hash-db", "log", "parity-scale-codec", "scale-info", "sp-api-proc-macro 15.0.0", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "sp-core 29.0.0", + "sp-externalities 0.26.0", "sp-metadata-ir 0.6.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-std 14.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", + "sp-trie 30.0.0", + "sp-version 30.0.0", "thiserror", ] @@ -12652,15 +12761,15 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "30.0.0" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4fe7a9b7fa9da76272b201e2fb3c7900d97d32a46b66af9a04dad457f73c71" +checksum = "547cad7a6eabb52c639ec117b3db9c6b43cf1b29a9393b18feb19e101a91833f" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", "sp-std 14.0.0", ] @@ -12681,9 +12790,9 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "23.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f42721f072b421f292a072e8f52a3b3c0fbc27428f0c9fe24067bc47046bad63" +checksum = "afa823ca5adc490d47dccb41d69ad482bc57a317bd341de275868378f48f131c" dependencies = [ "integer-sqrt", "num-traits", @@ -12710,15 +12819,15 @@ dependencies = [ [[package]] name = "sp-authority-discovery" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a740c05e9096eb17e93b5ab6aa5fe8ce0c9b4243777826d92133b3dd682e14" +checksum = "c92b177c72b5d2973c36d60f6ef942d791d9fd91eae8b08c71882e4118d4fbfc" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-runtime 31.0.1", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -12736,13 +12845,13 @@ dependencies = [ [[package]] name = "sp-block-builder" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d2aa0943101367b955f5806c3ecea2e23df7c90059708107470dbfb9d3d7ab" +checksum = "1b36ce171caa7eb2bbe682c089f755fdefa71d3702e4fb1ba30d10146aef99d5" dependencies = [ - "sp-api 26.0.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", + "sp-api 27.0.0", + "sp-inherents 27.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -12767,20 +12876,20 @@ dependencies = [ [[package]] name = "sp-blockchain" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9adee5ddcf0682d0302ed640a285b9f922d933a205b63c7819a74d6092b6f78" +checksum = "a31303e766d2e53812641bbc1f1cec03a85793fc9e627e55f0a6854b28708758" dependencies = [ "futures", "log", "parity-scale-codec", "parking_lot 0.12.1", "schnellru", - "sp-api 26.0.0", - "sp-consensus 0.32.0", + "sp-api 27.0.0", + "sp-consensus 0.33.0", "sp-database 10.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "thiserror", ] @@ -12802,17 +12911,17 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcac16e85f78db9c99c9424659bb25790be079a0b758a3674ee8e1e7ef635b0" +checksum = "cb6e512b862c4ff7a26cdcd364898cc42e181ff5cb35fbb226ff27d88c81569a" dependencies = [ "async-trait", "futures", "log", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-core 29.0.0", + "sp-inherents 27.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "thiserror", ] @@ -12836,20 +12945,20 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8e878a116b0885eaefd068235657737cb72fdce60a8c080dfd092f7d645cc" +checksum = "4bf13c293685319751f72fa5216c7fb5f25f3e8e8fe29b4503296ed5f5466b3d" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-consensus-slots 0.32.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-consensus-slots 0.33.0", + "sp-inherents 27.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "sp-timestamp 26.0.0", + "sp-timestamp 27.0.0", ] [[package]] @@ -12874,40 +12983,41 @@ dependencies = [ [[package]] name = "sp-consensus-babe" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebfedfdea5b22fb3625cd664e72503dcbd1087373181d5be0d092b3e7b4c61f5" +checksum = "b9be2f86a2f0ce2a78b455feb547aa27604fd76a7f7a691995cbad44e0b1b9dd" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-consensus-slots 0.32.0", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-consensus-slots 0.33.0", + "sp-core 29.0.0", + "sp-inherents 27.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "sp-timestamp 26.0.0", + "sp-timestamp 27.0.0", ] [[package]] name = "sp-consensus-beefy" -version = "13.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e09a424196a673f0e6b5fe79e4ab97da416491cfecab7bc835fa595134ac1b5c" +checksum = "90ff890a84ef57628b010df0e1d75b3a78fb7f575e4ceeba7215c276902c403e" dependencies = [ "lazy_static", "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-crypto-hashing", + "sp-io 31.0.0", "sp-mmr-primitives", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", "sp-std 14.0.0", "strum", ] @@ -12933,20 +13043,20 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" -version = "13.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a906b20409a5a69b1d9580848f502af20cf2c51a1ae028ba208375eb11f332b" +checksum = "64b606164600db36e596db7abf32b4533dc9a74526d9444c4c45035427b2199b" dependencies = [ "finality-grandpa", "log", "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -12965,15 +13075,15 @@ dependencies = [ [[package]] name = "sp-consensus-slots" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc5c1620d81196391daa15e78ea20cc11c59f08c509381c276d5d6a3d4d36af" +checksum = "73a5bd1fcd84bbdc7255528c7cdb92f9357fd555f06ee553af7e340cbdab517c" dependencies = [ "parity-scale-codec", "scale-info", "serde", "sp-std 14.0.0", - "sp-timestamp 26.0.0", + "sp-timestamp 27.0.0", ] [[package]] @@ -12985,7 +13095,7 @@ dependencies = [ "array-bytes 6.2.2", "bitflags 1.3.2", "blake2 0.10.6", - "bounded-collections", + "bounded-collections 0.1.9", "bs58 0.5.0", "dyn-clonable", "ed25519-zebra", @@ -13008,7 +13118,7 @@ dependencies = [ "secp256k1 0.24.3", "secrecy", "serde", - "sp-core-hashing 13.0.0", + "sp-core-hashing", "sp-debug-derive 12.0.0", "sp-externalities 0.23.0", "sp-runtime-interface 21.0.0", @@ -13025,15 +13135,15 @@ dependencies = [ [[package]] name = "sp-core" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f230cb12575455070da0fc174815958423a0b9a641d5e304a9457113c7cb4007" +checksum = "7c33c7a1568175250628567d50c4e1c54a6ac5bc1190413b9be29a9e810cbe73" dependencies = [ "array-bytes 6.2.2", "bip39", "bitflags 1.3.2", "blake2 0.10.6", - "bounded-collections", + "bounded-collections 0.2.0", "bs58 0.5.0", "dyn-clonable", "ed25519-zebra", @@ -13055,12 +13165,12 @@ dependencies = [ "secp256k1 0.28.1", "secrecy", "serde", - "sp-core-hashing 15.0.0", + "sp-crypto-hashing", "sp-debug-derive 14.0.0", - "sp-externalities 0.25.0", - "sp-runtime-interface 24.0.0", + "sp-externalities 0.26.0", + "sp-runtime-interface 25.0.0", "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-storage 20.0.0", "ss58-registry", "substrate-bip39", "thiserror", @@ -13084,10 +13194,21 @@ dependencies = [ ] [[package]] -name = "sp-core-hashing" -version = "15.0.0" +name = "sp-core-hashing-proc-macro" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ce3e6931303769197da81facefa86159fa1085dcd96ecb7e7407b5b93582a0" +dependencies = [ + "quote", + "sp-core-hashing", + "syn 2.0.48", +] + +[[package]] +name = "sp-crypto-hashing" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0f4990add7b2cefdeca883c0efa99bb4d912cb2196120e1500c0cc099553b0" +checksum = "bc9927a7f81334ed5b8a98a4a978c81324d12bd9713ec76b5c68fd410174c5eb" dependencies = [ "blake2b_simd", "byteorder", @@ -13098,24 +13219,13 @@ dependencies = [ ] [[package]] -name = "sp-core-hashing-proc-macro" -version = "13.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ce3e6931303769197da81facefa86159fa1085dcd96ecb7e7407b5b93582a0" -dependencies = [ - "quote", - "sp-core-hashing 13.0.0", - "syn 2.0.48", -] - -[[package]] -name = "sp-core-hashing-proc-macro" -version = "15.0.0" +name = "sp-crypto-hashing-proc-macro" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7527f8dda7667c41009b2cd0efaddcb81709b9741bd5ee6d17b11bad835cc698" +checksum = "b85d0f1f1e44bd8617eb2a48203ee854981229e3e79e6f468c7175d5fd37489b" dependencies = [ "quote", - "sp-core-hashing 15.0.0", + "sp-crypto-hashing", "syn 2.0.48", ] @@ -13175,14 +13285,14 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63867ec85950ced90d4ab1bba902a47db1b1efdf2829f653945669b2bb470a9c" +checksum = "e7096ed024cec397804864898b093b51e14c7299f1d00c67dd5800330e02bb82" dependencies = [ "environmental", "parity-scale-codec", "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-storage 20.0.0", ] [[package]] @@ -13199,13 +13309,13 @@ dependencies = [ [[package]] name = "sp-genesis-builder" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfdc79df83221ec5a279cbbd08fd6f8be164b9b081c8e84593ce2c2ebd5d66c0" +checksum = "fd865540ec19479c7349b584ccd78cc34c3f3a628a2a69dbb6365ceec36295ee" dependencies = [ "serde_json", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api 27.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -13226,15 +13336,15 @@ dependencies = [ [[package]] name = "sp-inherents" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3caf2d1288549d7e6c32b453f2d4855d498bb88600101011e35653e022a6f2" +checksum = "607c9e35e96966645ff180a9e9f976433b96e905d0a91d8d5315e605a21f4bc0" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", "sp-std 14.0.0", "thiserror", ] @@ -13266,9 +13376,9 @@ dependencies = [ [[package]] name = "sp-io" -version = "30.0.0" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55f26d89feedaf0faf81688b6e1e1e81329cd8b4c6a4fd6c5b97ed9dd068b8a" +checksum = "ec43aa073eab35fcb920d7592474d5427ea3be2bf938706a3ad955d7ba54fd8d" dependencies = [ "bytes", "ed25519-dalek", @@ -13277,14 +13387,15 @@ dependencies = [ "parity-scale-codec", "rustversion", "secp256k1 0.28.1", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-keystore 0.34.0", - "sp-runtime-interface 24.0.0", - "sp-state-machine 0.35.0", + "sp-core 29.0.0", + "sp-crypto-hashing", + "sp-externalities 0.26.0", + "sp-keystore 0.35.0", + "sp-runtime-interface 25.0.0", + "sp-state-machine 0.36.0", "sp-std 14.0.0", "sp-tracing 16.0.0", - "sp-trie 29.0.0", + "sp-trie 30.0.0", "tracing", "tracing-core", ] @@ -13303,12 +13414,12 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "31.0.0" +version = "32.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98165ce7c625a8cdb88d39c6bbd56fe8b32ada64ed0894032beba99795f557da" +checksum = "69cf0a2f881958466fc92bc9b39bbc2c0d815ded4a21f8f953372b0ac2e11b02" dependencies = [ - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "strum", ] @@ -13327,14 +13438,14 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.34.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96806a28a62ed9ddecd0b28857b1344d029390f7c5c42a2ff9199cbf5638635c" +checksum = "444f2d53968b1ce5e908882710ff1f3873fcf3e95f59d57432daf685bbacb959" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "sp-core 29.0.0", + "sp-externalities 0.26.0", "thiserror", ] @@ -13397,32 +13508,32 @@ dependencies = [ [[package]] name = "sp-mixnet" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85ed83d2f899484bde61c72cbae6edfb25708d43e6b19934e206f3c706df67df" +checksum = "7bebd44b915c65aeb7e7eeaea466aba3b27cdd915c83ea83d4643c54f21ffbbf" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", "sp-std 14.0.0", ] [[package]] name = "sp-mmr-primitives" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7526a73d518c03fa2447588b1544019a194a4f113cf34d2610d3b5925c80c86" +checksum = "891b7263b7c44a569173ee1078f68fb1a01991a44914607c0100aa5ae41f6562" dependencies = [ "ckb-merkle-mountain-range", "log", "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", - "sp-core 28.0.0", + "sp-api 27.0.0", + "sp-core 29.0.0", "sp-debug-derive 14.0.0", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", "sp-std 14.0.0", "thiserror", ] @@ -13444,16 +13555,16 @@ dependencies = [ [[package]] name = "sp-npos-elections" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8efff28b504b4b928288976e5f72c00c7ece9d2348a7ca2496c77849dd4c8f" +checksum = "195d7e1154c91cce5c3abc8c778689c3e5799da6411328dd32ac7a974c68e526" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -13470,13 +13581,13 @@ dependencies = [ [[package]] name = "sp-offchain" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb45b3e397dc9c7b81cb2d8d641d0bcb1f525b60e83835783413ba73b3f61ac9" +checksum = "4d83b955dce0b6d143bec3f60571311168f362b1c16cf044da7037a407b66c19" dependencies = [ - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", ] [[package]] @@ -13514,13 +13625,13 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a55f2c7660b579627d22932ecfe2e5f001a7671d2fa77667387517c7f80e6fb" +checksum = "9af4b73fe7ddd88b1641cca90048c4e525e721763199e6fd29c4f590884f4d16" dependencies = [ "rustc-hash", "serde", - "sp-core 28.0.0", + "sp-core 29.0.0", ] [[package]] @@ -13548,9 +13659,9 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "31.0.1" +version = "32.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3bb49a4475d390198dfd3d41bef4564ab569fbaf1b5e38ae69b35fc01199d91" +checksum = "0a95e71603a6281e91b0f1fd3d68057644be16d75a4602013187b8137db8abee" dependencies = [ "docify", "either", @@ -13563,12 +13674,12 @@ dependencies = [ "scale-info", "serde", "simple-mermaid", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", "sp-std 14.0.0", - "sp-weights 27.0.0", + "sp-weights 28.0.0", ] [[package]] @@ -13592,18 +13703,18 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f66b66d8cec3d785fa6289336c1d9cbd4305d5d84f7134378c4d79ed7983e6fb" +checksum = "4e2321ab29d4bcc31f1ba1b4f076a81fb2a666465231e5c981c72320d74dbe63" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities 0.25.0", + "sp-externalities 0.26.0", "sp-runtime-interface-proc-macro 17.0.0", "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-storage 20.0.0", "sp-tracing 16.0.0", "sp-wasm-interface 20.0.0", "static_assertions", @@ -13654,17 +13765,17 @@ dependencies = [ [[package]] name = "sp-session" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8048981db53d4f5171e6003f5e11fbfc27a8c196b0827619907a4214746a623b" +checksum = "3b86531090cc04d2ab3535df07146258e2fb3ab6257b0a77ef14aa08282c3d4a" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", "sp-std 14.0.0", ] @@ -13685,16 +13796,16 @@ dependencies = [ [[package]] name = "sp-staking" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0e68be3fff84dd8ee552f9d13dd2e9eab3663e0bddfc6c6c88de02aaca1e311" +checksum = "1e14d003ecf0b610bf1305a92bdab875289b39d514c073f30e75e78c2763a788" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -13722,9 +13833,9 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718c779ad1d6fcc0be64c7ce030b33fa44b5c8914b3a1319ef63bb5f27fb98df" +checksum = "a67297e702aa32027d7766803f362a420d6d3ec9e2f84961f3c64e2e52b5aaf9" dependencies = [ "hash-db", "log", @@ -13732,11 +13843,11 @@ dependencies = [ "parking_lot 0.12.1", "rand 0.8.5", "smallvec", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "sp-core 29.0.0", + "sp-externalities 0.26.0", "sp-panic-handler 13.0.0", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie 30.0.0", "thiserror", "tracing", "trie-db", @@ -13769,9 +13880,9 @@ dependencies = [ [[package]] name = "sp-statement-store" -version = "10.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee6d4ceb2513f180e6e017fd6d6f3c9a1a122dcedee5fc8e4254d8a7ecf793d" +checksum = "309a9ae4e8134bbed8ffc510cf4d461a4a651f9250b556de782cedd876abe1ff" dependencies = [ "aes-gcm", "curve25519-dalek 4.1.2", @@ -13781,12 +13892,13 @@ dependencies = [ "rand 0.8.5", "scale-info", "sha2 0.10.8", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-runtime 31.0.1", - "sp-runtime-interface 24.0.0", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-crypto-hashing", + "sp-externalities 0.26.0", + "sp-runtime 32.0.0", + "sp-runtime-interface 25.0.0", "sp-std 14.0.0", "thiserror", "x25519-dalek 2.0.0", @@ -13820,9 +13932,9 @@ dependencies = [ [[package]] name = "sp-storage" -version = "19.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb92d7b24033a8a856d6e20dd980b653cbd7af7ec471cc988b1b7c1d2e3a32b" +checksum = "8dba5791cb3978e95daf99dad919ecb3ec35565604e88cd38d805d9d4981e8bd" dependencies = [ "impl-serde", "parity-scale-codec", @@ -13848,14 +13960,14 @@ dependencies = [ [[package]] name = "sp-timestamp" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "347eaddd5b07856ccec69ac3300e72e392a5efc3aea5fb4b7230888a0b447b9e" +checksum = "249cd06624f2edb53b25af528ab216a508dc9d0870e158b43caac3a97e86699f" dependencies = [ "async-trait", "parity-scale-codec", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", + "sp-inherents 27.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", "thiserror", ] @@ -13898,12 +14010,12 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97c4052e69eacdb7a411e050c56a838f460b8a879071125451e9bb2d4814df34" +checksum = "9742861c5330bdcb42856a6eed3d3745b58ee1c92ca4c9260032ff4e6c387165" dependencies = [ - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api 27.0.0", + "sp-runtime 32.0.0", ] [[package]] @@ -13949,9 +14061,9 @@ dependencies = [ [[package]] name = "sp-trie" -version = "29.0.0" +version = "30.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e4d24d84a0beb44a71dcac1b41980e1edf7fb722c7f3046710136a283cd479b" +checksum = "eed48dfd05081e8b36741b10ce4eb686c135a2952227a11fe71caec89890ddbb" dependencies = [ "ahash 0.8.8", "hash-db", @@ -13963,8 +14075,8 @@ dependencies = [ "rand 0.8.5", "scale-info", "schnellru", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "sp-core 29.0.0", + "sp-externalities 0.26.0", "sp-std 14.0.0", "thiserror", "tracing", @@ -13983,7 +14095,7 @@ dependencies = [ "parity-wasm", "scale-info", "serde", - "sp-core-hashing-proc-macro 13.0.0", + "sp-core-hashing-proc-macro", "sp-runtime 28.0.0", "sp-std 12.0.0", "sp-version-proc-macro 12.0.0", @@ -13992,17 +14104,17 @@ dependencies = [ [[package]] name = "sp-version" -version = "29.0.0" +version = "30.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afd1b053394347e22f541696bca4a9ac3ec848b50d1b86f5018d2b771f39f11a" +checksum = "ff4a660c68995663d6778df324f4e2b4efc48d55a8e9c92c22a5fb7dae7899cd" dependencies = [ "impl-serde", "parity-scale-codec", "parity-wasm", "scale-info", "serde", - "sp-core-hashing-proc-macro 15.0.0", - "sp-runtime 31.0.1", + "sp-crypto-hashing-proc-macro", + "sp-runtime 32.0.0", "sp-std 14.0.0", "sp-version-proc-macro 13.0.0", "thiserror", @@ -14078,16 +14190,16 @@ dependencies = [ [[package]] name = "sp-weights" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e874bdf9dd3fd3242f5b7867a4eaedd545b02f29041a46d222a9d9d5caaaa5c" +checksum = "a3be30aec904994451dcacf841a9168cfbbaf817de6b24b6a1c1418cbf1af2fe" dependencies = [ - "bounded-collections", + "bounded-collections 0.2.0", "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-arithmetic 23.0.0", + "sp-arithmetic 24.0.0", "sp-debug-derive 14.0.0", "sp-std 14.0.0", ] @@ -14152,41 +14264,41 @@ version = "1.0.0" dependencies = [ "binary-merkle-tree", "bitvec", - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-executive 28.0.0", + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-executive 29.0.0", "frame-remote-externalities", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "frame-system-benchmarking 29.0.0", + "frame-system-rpc-runtime-api 27.0.0", + "frame-try-runtime 0.35.0", "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-rate 7.0.0", - "pallet-authority-discovery 28.0.0", - "pallet-authorship 28.0.0", - "pallet-babe 28.0.0", + "pallet-asset-rate 8.0.0", + "pallet-authority-discovery 29.0.0", + "pallet-authorship 29.0.0", + "pallet-babe 29.0.0", "pallet-bags-list", - "pallet-balances 28.0.0", + "pallet-balances 29.0.0", "pallet-beefy", "pallet-beefy-mmr", "pallet-bounties", "pallet-child-bounties", - "pallet-collective 28.0.0", + "pallet-collective 29.0.0", "pallet-conviction-voting", "pallet-democracy", - "pallet-election-provider-multi-phase 27.0.0", - "pallet-election-provider-support-benchmarking 27.0.0", + "pallet-election-provider-multi-phase 28.0.0", + "pallet-election-provider-support-benchmarking 28.0.0", "pallet-elections-phragmen", - "pallet-fast-unstake 27.0.0", + "pallet-fast-unstake 28.0.0", "pallet-grandpa", "pallet-identity", "pallet-im-online", "pallet-indices", - "pallet-membership 28.0.0", - "pallet-message-queue 31.0.0", + "pallet-membership 29.0.0", + "pallet-message-queue 32.0.0", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -14196,67 +14308,67 @@ dependencies = [ "pallet-offences", "pallet-offences-benchmarking", "pallet-preimage", - "pallet-proxy 28.0.0", + "pallet-proxy 29.0.0", "pallet-ranked-collective", "pallet-recovery", "pallet-referenda", - "pallet-scheduler 29.0.0", - "pallet-session 28.0.0", + "pallet-scheduler 30.0.0", + "pallet-session 29.0.0", "pallet-session-benchmarking", "pallet-society", - "pallet-staking 28.0.0", + "pallet-staking 29.0.0", "pallet-staking-runtime-api", "pallet-state-trie-migration", - "pallet-timestamp 27.0.0", + "pallet-timestamp 28.0.0", "pallet-tips", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-treasury 27.0.0", - "pallet-utility 28.0.0", - "pallet-vesting 28.0.0", + "pallet-transaction-payment 29.0.0", + "pallet-transaction-payment-rpc-runtime-api 29.0.0", + "pallet-treasury 28.0.0", + "pallet-utility 29.0.0", + "pallet-vesting 29.0.0", "pallet-whitelist", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-xcm 8.0.0", + "pallet-xcm-benchmarks 8.0.0", "parity-scale-codec", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", - "polkadot-runtime-parachains 7.0.0", + "polkadot-primitives 8.0.0", + "polkadot-runtime-common 8.0.0", + "polkadot-runtime-parachains 8.0.0", "rustc-hex", "scale-info", "separator", "serde", "serde_derive", "serde_json", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-authority-discovery 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-babe 0.32.0", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", + "sp-authority-discovery 27.0.0", + "sp-block-builder 27.0.0", + "sp-consensus-babe 0.33.0", "sp-consensus-beefy", - "sp-core 28.0.0", + "sp-core 29.0.0", "sp-debug-derive 14.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-keyring 32.0.0", "sp-mmr-primitives", - "sp-npos-elections 26.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", + "sp-npos-elections 27.0.0", + "sp-offchain 27.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-staking 27.0.0", "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-storage 20.0.0", "sp-tracing 16.0.0", - "sp-transaction-pool 26.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "sp-transaction-pool 27.0.0", + "sp-trie 30.0.0", + "sp-version 30.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", "static_assertions", - "substrate-wasm-builder 17.0.0", + "substrate-wasm-builder 18.0.0", "tiny-keccak", "tokio", ] @@ -14278,16 +14390,16 @@ dependencies = [ [[package]] name = "staging-parachain-info" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad554ffd27fbcafd82e234d7e7188e458e51bfe2b3b5000dd236dce762e3e95f" +checksum = "da7dc139d104f676a18c13380a09c3f72d59450a7471116387cbf8cb5f845a0e" dependencies = [ - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "cumulus-primitives-core 0.8.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", "sp-std 14.0.0", ] @@ -14297,7 +14409,7 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abd0c2e401a1e264379131c27676bc65c9631aaa508044bc04d8ce60a7d8524" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "derivative", "environmental", "impl-trait-for-tuples", @@ -14311,12 +14423,12 @@ dependencies = [ [[package]] name = "staging-xcm" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0df18af00766d22926916bb443f14742c65cc6b2f0fe997b8f26da0d0f9ee9ca" +checksum = "5ccecaeae5eca8453760e96fcf65481b19898459971842004732e88cd3570741" dependencies = [ "array-bytes 6.2.2", - "bounded-collections", + "bounded-collections 0.2.0", "derivative", "environmental", "impl-trait-for-tuples", @@ -14324,8 +14436,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-weights 27.0.0", - "xcm-procedural 7.0.0", + "sp-weights 28.0.0", + "xcm-procedural 8.0.0", ] [[package]] @@ -14353,25 +14465,25 @@ dependencies = [ [[package]] name = "staging-xcm-builder" -version = "7.0.3" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ba4f214fe99d79ffcc266f431abbb32d3596788327b925d469c7bb6a3c84d3c" +checksum = "b2e8c74e3d5b47173a22ad468ab28aeb88cfb92b742fa91a95fe1a8230c2365f" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "impl-trait-for-tuples", "log", - "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment 29.0.0", "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", + "polkadot-parachain-primitives 7.0.0", "scale-info", - "sp-arithmetic 23.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 24.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "sp-weights 27.0.0", - "staging-xcm 7.0.0", - "staging-xcm-executor 7.0.3", + "sp-weights 28.0.0", + "staging-xcm 8.0.0", + "staging-xcm-executor 8.0.0", ] [[package]] @@ -14397,24 +14509,24 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "7.0.3" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f1dea1e33eefee513c197c24255670951a2c515a6ce2c7049fe86385400074f" +checksum = "666e4c4fb7b1e91342a54281cb15bda81e17b795c6072f8b4892946249c03922" dependencies = [ "environmental", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", - "sp-weights 27.0.0", - "staging-xcm 7.0.0", + "sp-weights 28.0.0", + "staging-xcm 8.0.0", ] [[package]] @@ -14453,9 +14565,9 @@ dependencies = [ [[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" @@ -14543,16 +14655,16 @@ dependencies = [ [[package]] name = "substrate-rpc-client" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9076480cc6f480429b081bf93607d32183bdac4d6f0d2969d5e08de08bea1701" +checksum = "40e5235d8460ec81e9a382345aa80d75e2943f224a332559847344bb62fa13b3" dependencies = [ "async-trait", - "jsonrpsee", + "jsonrpsee 0.20.3", "log", - "sc-rpc-api 0.33.0", + "sc-rpc-api 0.34.0", "serde", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", ] [[package]] @@ -14586,19 +14698,19 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "17.0.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac08d23ff4da66fe6cb0300f249be010d78e5abeafef0390cae39736a374e6cd" +checksum = "511bbc2df035f5fe2556d855369a1bbb45df620360391a1f6e3fa1a1d64af79a" dependencies = [ - "ansi_term", "build-helper", "cargo_metadata", + "console", "filetime", "parity-wasm", "sp-maybe-compressed-blob 11.0.0", "strum", "tempfile", - "toml 0.8.2", + "toml 0.8.10", "walkdir", "wasm-opt", ] @@ -14674,14 +14786,14 @@ dependencies = [ name = "system-parachains-constants" version = "1.0.0" dependencies = [ - "frame-support 28.0.0", + "frame-support 29.0.0", "kusama-runtime-constants", - "parachains-common 7.0.0", - "polkadot-core-primitives 7.0.0", - "polkadot-primitives 7.0.0", + "parachains-common 8.0.0", + "polkadot-core-primitives 8.0.0", + "polkadot-primitives 8.0.0", "polkadot-runtime-constants", "smallvec", - "sp-runtime 31.0.1", + "sp-runtime 32.0.0", ] [[package]] @@ -14724,6 +14836,21 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +[[package]] +name = "testnet-parachains-constants" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ff23c25f39d64b930ab9d721643d0c780a66201c7f1da34fac6982752626bf5" +dependencies = [ + "frame-support 29.0.0", + "polkadot-core-primitives 8.0.0", + "rococo-runtime-constants 8.0.0", + "smallvec", + "sp-runtime 32.0.0", + "staging-xcm 8.0.0", + "westend-runtime-constants 8.0.0", +] + [[package]] name = "thiserror" version = "1.0.56" @@ -14871,9 +14998,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.35.1" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ "backtrace", "bytes", @@ -14970,14 +15097,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.2" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.20.2", + "toml_edit 0.22.5", ] [[package]] @@ -14999,7 +15126,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.5.33", ] [[package]] @@ -15009,10 +15136,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ "indexmap 2.1.0", - "serde", - "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.5.33", ] [[package]] @@ -15023,7 +15148,20 @@ checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ "indexmap 2.1.0", "toml_datetime", - "winnow", + "winnow 0.5.33", +] + +[[package]] +name = "toml_edit" +version = "0.22.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99e68c159e8f5ba8a28c4eb7b0c0c190d77bb479047ca713270048145a9ad28a" +dependencies = [ + "indexmap 2.1.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow 0.6.0", ] [[package]] @@ -15032,6 +15170,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", @@ -15453,6 +15595,15 @@ 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.89" @@ -15528,6 +15679,15 @@ dependencies = [ "parity-wasm", ] +[[package]] +name = "wasm-instrument" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a47ecb37b9734d1085eaa5ae1a81e60801fd8c28d4cabdd8aedb982021918bc" +dependencies = [ + "parity-wasm", +] + [[package]] name = "wasm-opt" version = "0.116.0" @@ -15817,12 +15977,6 @@ dependencies = [ "webpki", ] -[[package]] -name = "webpki-roots" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" - [[package]] name = "westend-runtime-constants" version = "4.0.0" @@ -15841,19 +15995,19 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c410b8a17b87e5228f9c27ba4a8020e7ece4a8afb0f452b989834623afe84a2" +checksum = "3b080c193714605ce1033311d85035247adca170181cd68a3ad7e3ca87755a14" dependencies = [ - "frame-support 28.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", + "frame-support 29.0.0", + "polkadot-primitives 8.0.0", + "polkadot-runtime-common 8.0.0", "smallvec", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-weights 28.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", ] [[package]] @@ -16141,6 +16295,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1dbce9e90e5404c5a52ed82b1d13fc8cfbdad85033b6f57546ffd1265f8451" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.50.0" @@ -16203,36 +16366,37 @@ dependencies = [ [[package]] name = "xcm-emulator" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfe27508d4304447fdb7419b769ed9fbeab56bcd41ecf9193e43a33fb8f5588a" +checksum = "8b49681988880dd6d08a4d5f6b7cb612a0f12172270349655c1e2f870b3526fd" dependencies = [ - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-parachain-inherent 0.7.0", - "cumulus-test-relay-sproof-builder 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-xcmp-queue 0.8.0", + "cumulus-primitives-core 0.8.0", + "cumulus-primitives-parachain-inherent 0.8.0", + "cumulus-test-relay-sproof-builder 0.8.0", + "frame-support 29.0.0", + "frame-system 29.0.0", "impl-trait-for-tuples", "lazy_static", "log", - "pallet-balances 28.0.0", - "pallet-message-queue 31.0.0", - "parachains-common 7.0.0", + "pallet-balances 29.0.0", + "pallet-message-queue 32.0.0", + "parachains-common 8.0.0", "parity-scale-codec", "paste", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-parachains 7.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "polkadot-parachain-primitives 7.0.0", + "polkadot-primitives 8.0.0", + "polkadot-runtime-parachains 8.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-crypto-hashing", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std 14.0.0", "sp-tracing 16.0.0", - "staging-xcm 7.0.0", - "staging-xcm-executor 7.0.3", + "staging-xcm 8.0.0", + "staging-xcm-executor 8.0.0", ] [[package]] @@ -16249,9 +16413,9 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7998facd751c42ec9b11a4cf71fcdb41fb147c5c8db8bcd1281fe84f8760d515" +checksum = "f4717a97970a9cda70d7db53cf50d2615c2f6f6b7c857445325b4a39ea7aa2cd" dependencies = [ "Inflector", "proc-macro2", diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index 6156c2d1b6..fa4959589b 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -7,30 +7,30 @@ repository.workspace = true license.workspace = true [dependencies] -clap = { version = "4.4.18", features = [ "derive" ] } +clap = { version = "4.5.0", features = [ "derive" ] } hex-literal = "0.4.1" -serde_json = "1.0.111" -serde = { version = "1.0.195", features = ["derive"] } +serde_json = "1.0.113" +serde = { version = "1.0.196", features = ["derive"] } polkadot-runtime = { path = "../relay/polkadot" } polkadot-runtime-constants = { path = "../relay/polkadot/constants" } kusama-runtime = { package = "staging-kusama-runtime", path = "../relay/kusama" } kusama-runtime-constants = { path = "../relay/kusama/constants" } -sc-chain-spec = "27.0.0" -polkadot-runtime-parachains = "7.0.0" -polkadot-primitives = "7.0.0" -sp-consensus-babe = "0.32.0" -sp-authority-discovery = "26.0.0" -sp-core = "28.0.0" -pallet-staking = "28.0.0" -sc-consensus-grandpa = "0.19.0" -pallet-im-online = "27.0.0" -sp-runtime = "31.0.1" -sp-consensus-beefy = "13.0.0" -xcm = { package = "staging-xcm", version = "7.0.0" } -parachains-common = { version = "7.0.0" } -cumulus-primitives-core = { version = "0.7.0" } +sc-chain-spec = "28.0.0" +polkadot-runtime-parachains = "8.0.0" +polkadot-primitives = "8.0.0" +sp-consensus-babe = "0.33.0" +sp-authority-discovery = "27.0.0" +sp-core = "29.0.0" +pallet-staking = "29.0.0" +sc-consensus-grandpa = "0.20.0" +pallet-im-online = "28.0.0" +sp-runtime = "32.0.0" +sp-consensus-beefy = "14.0.0" +xcm = { package = "staging-xcm", version = "8.0.0" } +parachains-common = { version = "8.0.0" } +cumulus-primitives-core = { version = "0.8.0" } asset-hub-polkadot-runtime = { path = "../system-parachains/asset-hubs/asset-hub-polkadot" } asset-hub-kusama-runtime = { path = "../system-parachains/asset-hubs/asset-hub-kusama" } diff --git a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml index 570836830a..7eac29d6e4 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml @@ -12,22 +12,22 @@ codec = { package = "parity-scale-codec", version = "3.6.9" } assert_matches = "1.5.0" # Substrate -sp-runtime = { version = "31.0.1" } -frame-support = { version = "28.0.0" } -pallet-assets = { version = "29.0.0" } -pallet-balances = { version = "28.0.0" } -pallet-asset-conversion = { version = "10.0.0" } -pallet-message-queue = { version = "31.0.0" } +sp-runtime = { version = "32.0.0" } +frame-support = { version = "29.0.0" } +pallet-assets = { version = "30.0.0" } +pallet-balances = { version = "29.0.0" } +pallet-asset-conversion = { version = "11.0.0" } +pallet-message-queue = { version = "32.0.0" } # Polkadot -xcm = { package = "staging-xcm", version = "7.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.0" } -pallet-xcm = { version = "7.0.0" } +xcm = { package = "staging-xcm", version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.0" } +pallet-xcm = { version = "8.0.0" } # Cumulus -parachains-common = { version = "7.0.0" } -xcm-emulator = { version = "0.5.0" } -asset-test-utils = { version = "7.0.0" } +parachains-common = { version = "8.0.0" } +xcm-emulator = { version = "0.6.0" } +asset-test-utils = { version = "8.0.0" } # Local emulated-chains = { path = "../../chains" } diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml index fb377ac9fd..05110bc672 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml @@ -11,21 +11,21 @@ publish = false codec = { package = "parity-scale-codec", version = "3.6.9" } # Substrate -sp-runtime = { version = "31.0.1" } -frame-support = { version = "28.0.0" } -pallet-assets = { version = "29.0.0" } -pallet-balances = { version = "28.0.0" } -pallet-message-queue = { version = "31.0.0" } +sp-runtime = { version = "32.0.0" } +frame-support = { version = "29.0.0" } +pallet-assets = { version = "30.0.0" } +pallet-balances = { version = "29.0.0" } +pallet-message-queue = { version = "32.0.0" } # Polkadot -xcm = { package = "staging-xcm", version = "7.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.0" } -pallet-xcm = { version = "7.0.0" } +xcm = { package = "staging-xcm", version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.0" } +pallet-xcm = { version = "8.0.0" } # Cumulus -parachains-common = { version = "7.0.0" } -xcm-emulator = { version = "0.5.0" } -asset-test-utils = { version = "7.0.0" } +parachains-common = { version = "8.0.0" } +xcm-emulator = { version = "0.6.0" } +asset-test-utils = { version = "8.0.0" } # Local emulated-chains = { path = "../../chains" } diff --git a/integration-tests/emulated/chains/Cargo.toml b/integration-tests/emulated/chains/Cargo.toml index 135901e052..e8ee0f6115 100644 --- a/integration-tests/emulated/chains/Cargo.toml +++ b/integration-tests/emulated/chains/Cargo.toml @@ -9,26 +9,26 @@ description = "Definitions of the fellows emulated relay+para runtimes" [dependencies] # Substrate -grandpa-primitives = { package = "sp-consensus-grandpa", version = "13.0.0" } -sp-authority-discovery = { version = "26.0.0" } -sp-runtime = { version = "31.0.1" } -frame-support = { version = "28.0.0" } -sp-core = { version = "28.0.0" } -sp-consensus-babe = { version = "0.32.0" } -pallet-im-online = { version = "27.0.0" } -pallet-staking = { version = "28.0.0" } -beefy-primitives = { package = "sp-consensus-beefy", version = "13.0.0" } +grandpa-primitives = { package = "sp-consensus-grandpa", version = "14.0.0" } +sp-authority-discovery = { version = "27.0.0" } +sp-runtime = { version = "32.0.0" } +frame-support = { version = "29.0.0" } +sp-core = { version = "29.0.0" } +sp-consensus-babe = { version = "0.33.0" } +pallet-im-online = { version = "28.0.0" } +pallet-staking = { version = "29.0.0" } +beefy-primitives = { package = "sp-consensus-beefy", version = "14.0.0" } # Polkadot -polkadot-primitives = { version = "7.0.0" } -polkadot-runtime-parachains = { version = "7.0.0" } -polkadot-parachain-primitives = { version = "6.0.0" } +polkadot-primitives = { version = "8.0.0" } +polkadot-runtime-parachains = { version = "8.0.0" } +polkadot-parachain-primitives = { version = "7.0.0" } # Cumulus -parachains-common = { version = "7.0.0" } -cumulus-primitives-core = { version = "0.7.0" } -xcm-emulator = { version = "0.5.0" } -penpal-runtime = { version = "0.14.3" } +parachains-common = { version = "8.0.0" } +cumulus-primitives-core = { version = "0.8.0" } +xcm-emulator = { version = "0.6.0" } +penpal-runtime = { version = "0.15.0" } # Local runtimes kusama-runtime = { package = "staging-kusama-runtime", path = "../../../relay/kusama" } diff --git a/integration-tests/emulated/common/Cargo.toml b/integration-tests/emulated/common/Cargo.toml index a9830821f8..444e71ec93 100644 --- a/integration-tests/emulated/common/Cargo.toml +++ b/integration-tests/emulated/common/Cargo.toml @@ -11,34 +11,34 @@ codec = { package = "parity-scale-codec", version = "3.6.9" } paste = "1.0.14" # Substrate -grandpa-primitives = { package = "sp-consensus-grandpa", version = "13.0.0" } -sp-authority-discovery = { version = "26.0.0" } -sp-runtime = { version = "31.0.1" } -frame-support = { version = "28.0.0" } -sp-core = { version = "28.0.0" } -sp-consensus-babe = { version = "0.32.0" } -pallet-assets = { version = "29.0.0" } -pallet-balances = { version = "28.0.0" } -pallet-message-queue = { version = "31.0.0" } -pallet-im-online = { version = "27.0.0" } -beefy-primitives = { package = "sp-consensus-beefy", version = "13.0.0" } +grandpa-primitives = { package = "sp-consensus-grandpa", version = "14.0.0" } +sp-authority-discovery = { version = "27.0.0" } +sp-runtime = { version = "32.0.0" } +frame-support = { version = "29.0.0" } +sp-core = { version = "29.0.0" } +sp-consensus-babe = { version = "0.33.0" } +pallet-assets = { version = "30.0.0" } +pallet-balances = { version = "29.0.0" } +pallet-message-queue = { version = "32.0.0" } +pallet-im-online = { version = "28.0.0" } +beefy-primitives = { package = "sp-consensus-beefy", version = "14.0.0" } # Polkadot -polkadot-primitives = { version = "7.0.0" } -polkadot-runtime-parachains = { version = "7.0.0" } -xcm = { package = "staging-xcm", version = "7.0.0" } -pallet-xcm = { version = "7.0.0" } +polkadot-primitives = { version = "8.0.0" } +polkadot-runtime-parachains = { version = "8.0.0" } +xcm = { package = "staging-xcm", version = "8.0.0" } +pallet-xcm = { version = "8.0.0" } # Cumulus -parachains-common = { version = "7.0.0" } -cumulus-primitives-core = { version = "0.7.0" } -xcm-emulator = { version = "0.5.0" } -cumulus-pallet-xcmp-queue = { version = "0.7.0" } -cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook",] , version = "0.7.0" } -asset-test-utils = { version = "7.0.0" } -cumulus-pallet-dmp-queue = { version = "0.7.0" } +parachains-common = { version = "8.0.0" } +cumulus-primitives-core = { version = "0.8.0" } +xcm-emulator = { version = "0.6.0" } +cumulus-pallet-xcmp-queue = { version = "0.8.0" } +cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook",] , version = "0.8.0" } +asset-test-utils = { version = "8.0.0" } +cumulus-pallet-dmp-queue = { version = "0.8.0" } # Bridges -bp-messages = { version = "0.7.0" } -pallet-bridge-messages = { version = "0.7.0" } -bridge-runtime-common = { version = "0.7.0" } +bp-messages = { version = "0.8.0" } +pallet-bridge-messages = { version = "0.8.0" } +bridge-runtime-common = { version = "0.8.0" } diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index 1646933bb6..2f1fbb1e02 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -14,120 +14,120 @@ parity-scale-codec = { version = "3.6.9", default-features = false, features = [ scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } log = { version = "0.4.20", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } -serde = { version = "1.0.195", default-features = false } -serde_derive = { version = "1.0.195", optional = true } +serde = { version = "1.0.196", default-features = false } +serde_derive = { version = "1.0.196", optional = true } static_assertions = "1.1.0" -authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "26.0.0" } -babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.32.0" } -beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "13.0.0" } -binary-merkle-tree = { default-features = false , version = "13.0.0" } +authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "27.0.0" } +babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.33.0" } +beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "14.0.0" } +binary-merkle-tree = { default-features = false , version = "14.0.0" } kusama-runtime-constants = { package = "kusama-runtime-constants", path = "constants", default-features = false } -sp-api = { default-features = false , version = "26.0.0" } -inherents = { package = "sp-inherents", default-features = false , version = "26.0.0" } -offchain-primitives = { package = "sp-offchain", default-features = false , version = "26.0.0" } +sp-api = { default-features = false , version = "27.0.0" } +inherents = { package = "sp-inherents", default-features = false , version = "27.0.0" } +offchain-primitives = { package = "sp-offchain", default-features = false , version = "27.0.0" } sp-std = { package = "sp-std", default-features = false , version = "14.0.0" } -sp-application-crypto = { default-features = false , version = "30.0.0" } -sp-arithmetic = { default-features = false , version = "23.0.0" } -sp-genesis-builder = { default-features = false , version = "0.7.0" } -sp-io = { default-features = false , version = "30.0.0" } -sp-mmr-primitives = { default-features = false , version = "26.0.0" } -sp-runtime = { default-features = false , version = "31.0.1" } -sp-staking = { default-features = false , version = "26.0.0" } -sp-core = { default-features = false , version = "28.0.0" } -sp-session = { default-features = false , version = "27.0.0" } -sp-storage = { default-features = false , version = "19.0.0" } -sp-version = { default-features = false , version = "29.0.0" } -tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "26.0.0" } -block-builder-api = { package = "sp-block-builder", default-features = false , version = "26.0.0" } -sp-npos-elections = { default-features = false , version = "26.0.0" } +sp-application-crypto = { default-features = false , version = "31.0.0" } +sp-arithmetic = { default-features = false , version = "24.0.0" } +sp-genesis-builder = { default-features = false , version = "0.8.0" } +sp-io = { default-features = false , version = "31.0.0" } +sp-mmr-primitives = { default-features = false , version = "27.0.0" } +sp-runtime = { default-features = false , version = "32.0.0" } +sp-staking = { default-features = false , version = "27.0.0" } +sp-core = { default-features = false , version = "29.0.0" } +sp-session = { default-features = false , version = "28.0.0" } +sp-storage = { default-features = false , version = "20.0.0" } +sp-version = { default-features = false , version = "30.0.0" } +tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "27.0.0" } +block-builder-api = { package = "sp-block-builder", default-features = false , version = "27.0.0" } +sp-npos-elections = { default-features = false , version = "27.0.0" } -pallet-asset-rate = { default-features = false , version = "7.0.0" } -pallet-authority-discovery = { default-features = false , version = "28.0.0" } -pallet-authorship = { default-features = false , version = "28.0.0" } -pallet-babe = { default-features = false , version = "28.0.0" } -pallet-bags-list = { default-features = false , version = "27.0.0" } -pallet-balances = { default-features = false , version = "28.0.0" } -pallet-beefy = { default-features = false , version = "28.0.0" } -pallet-beefy-mmr = { default-features = false , version = "28.0.0" } -pallet-bounties = { default-features = false , version = "27.0.0" } -pallet-child-bounties = { default-features = false , version = "27.0.0" } -pallet-transaction-payment = { default-features = false , version = "28.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "28.0.0" } -pallet-nomination-pools-runtime-api = { default-features = false , version = "23.0.0" } -pallet-collective = { default-features = false , version = "28.0.0" } -pallet-conviction-voting = { default-features = false , version = "28.0.0" } -pallet-democracy = { default-features = false , version = "28.0.0" } -pallet-elections-phragmen = { default-features = false , version = "29.0.0" } -pallet-election-provider-multi-phase = { default-features = false , version = "27.0.0" } -pallet-fast-unstake = { default-features = false , version = "27.0.0" } -frame-executive = { default-features = false , version = "28.0.0" } -pallet-grandpa = { default-features = false , version = "28.0.0" } -pallet-nis = { default-features = false , version = "28.0.0" } -pallet-identity = { default-features = false , version = "28.0.0" } -pallet-im-online = { default-features = false , version = "27.0.0" } -pallet-indices = { default-features = false , version = "28.0.0" } -pallet-membership = { default-features = false , version = "28.0.0" } -pallet-message-queue = { default-features = false , version = "31.0.0" } -pallet-mmr = { default-features = false , version = "27.0.0" } -pallet-multisig = { default-features = false , version = "28.0.0" } -pallet-nomination-pools = { default-features = false , version = "25.0.3" } -pallet-offences = { default-features = false , version = "27.0.0" } -pallet-preimage = { default-features = false , version = "28.0.0" } -pallet-proxy = { default-features = false , version = "28.0.0" } -pallet-ranked-collective = { default-features = false , version = "28.0.0" } -pallet-recovery = { default-features = false , version = "28.0.0" } -pallet-referenda = { default-features = false , version = "28.0.0" } -pallet-scheduler = { default-features = false , version = "29.0.0" } -pallet-session = { default-features = false , version = "28.0.0" } -pallet-society = { default-features = false, version = "28.0.0" } -frame-support = { default-features = false , version = "28.0.0" } -pallet-staking = { default-features = false , version = "28.0.0" } -pallet-state-trie-migration = { default-features = false , version = "29.0.0" } -pallet-staking-runtime-api = { default-features = false , version = "14.0.0" } -frame-system = { default-features = false , version = "28.0.0" } -frame-system-rpc-runtime-api = { default-features = false , version = "26.0.0" } -pallet-timestamp = { default-features = false , version = "27.0.0" } -pallet-tips = { default-features = false , version = "27.0.0" } -pallet-treasury = { default-features = false , version = "27.0.0" } -pallet-utility = { default-features = false , version = "28.0.0" } -pallet-vesting = { default-features = false , version = "28.0.0" } -pallet-whitelist = { default-features = false , version = "27.0.0" } -pallet-xcm = { default-features = false , version = "7.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.3" } -frame-election-provider-support = { default-features = false , version = "28.0.0" } +pallet-asset-rate = { default-features = false , version = "8.0.0" } +pallet-authority-discovery = { default-features = false , version = "29.0.0" } +pallet-authorship = { default-features = false , version = "29.0.0" } +pallet-babe = { default-features = false , version = "29.0.0" } +pallet-bags-list = { default-features = false , version = "28.0.0" } +pallet-balances = { default-features = false , version = "29.0.0" } +pallet-beefy = { default-features = false , version = "29.0.0" } +pallet-beefy-mmr = { default-features = false , version = "29.0.0" } +pallet-bounties = { default-features = false , version = "28.0.0" } +pallet-child-bounties = { default-features = false , version = "28.0.0" } +pallet-transaction-payment = { default-features = false , version = "29.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "29.0.0" } +pallet-nomination-pools-runtime-api = { default-features = false , version = "24.0.0" } +pallet-collective = { default-features = false , version = "29.0.0" } +pallet-conviction-voting = { default-features = false , version = "29.0.0" } +pallet-democracy = { default-features = false , version = "29.0.0" } +pallet-elections-phragmen = { default-features = false , version = "30.0.0" } +pallet-election-provider-multi-phase = { default-features = false , version = "28.0.0" } +pallet-fast-unstake = { default-features = false , version = "28.0.0" } +frame-executive = { default-features = false , version = "29.0.0" } +pallet-grandpa = { default-features = false , version = "29.0.0" } +pallet-nis = { default-features = false , version = "29.0.0" } +pallet-identity = { default-features = false , version = "29.0.0" } +pallet-im-online = { default-features = false , version = "28.0.0" } +pallet-indices = { default-features = false , version = "29.0.0" } +pallet-membership = { default-features = false , version = "29.0.0" } +pallet-message-queue = { default-features = false , version = "32.0.0" } +pallet-mmr = { default-features = false , version = "28.0.0" } +pallet-multisig = { default-features = false , version = "29.0.0" } +pallet-nomination-pools = { default-features = false , version = "26.0.0" } +pallet-offences = { default-features = false , version = "28.0.0" } +pallet-preimage = { default-features = false , version = "29.0.0" } +pallet-proxy = { default-features = false , version = "29.0.0" } +pallet-ranked-collective = { default-features = false , version = "29.0.0" } +pallet-recovery = { default-features = false , version = "29.0.0" } +pallet-referenda = { default-features = false , version = "29.0.0" } +pallet-scheduler = { default-features = false , version = "30.0.0" } +pallet-session = { default-features = false , version = "29.0.0" } +pallet-society = { default-features = false, version = "29.0.0" } +frame-support = { default-features = false , version = "29.0.0" } +pallet-staking = { default-features = false , version = "29.0.0" } +pallet-state-trie-migration = { default-features = false , version = "30.0.0" } +pallet-staking-runtime-api = { default-features = false , version = "15.0.0" } +frame-system = { default-features = false , version = "29.0.0" } +frame-system-rpc-runtime-api = { default-features = false , version = "27.0.0" } +pallet-timestamp = { default-features = false , version = "28.0.0" } +pallet-tips = { default-features = false , version = "28.0.0" } +pallet-treasury = { default-features = false , version = "28.0.0" } +pallet-utility = { default-features = false , version = "29.0.0" } +pallet-vesting = { default-features = false , version = "29.0.0" } +pallet-whitelist = { default-features = false , version = "28.0.0" } +pallet-xcm = { default-features = false , version = "8.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.0" } +frame-election-provider-support = { default-features = false , version = "29.0.0" } -frame-benchmarking = { default-features = false, optional = true , version = "28.0.0" } -frame-try-runtime = { default-features = false, optional = true , version = "0.34.0" } -pallet-offences-benchmarking = { default-features = false, optional = true , version = "28.0.0" } -pallet-session-benchmarking = { default-features = false, optional = true , version = "28.0.0" } -pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "26.0.0" } -frame-system-benchmarking = { default-features = false, optional = true , version = "28.0.0" } -pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +frame-benchmarking = { default-features = false, optional = true , version = "29.0.0" } +frame-try-runtime = { default-features = false, optional = true , version = "0.35.0" } +pallet-offences-benchmarking = { default-features = false, optional = true , version = "29.0.0" } +pallet-session-benchmarking = { default-features = false, optional = true , version = "29.0.0" } +pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "27.0.0" } +frame-system-benchmarking = { default-features = false, optional = true , version = "29.0.0" } +pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "28.0.0" } hex-literal = "0.4.1" -runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "7.0.0" } -runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "7.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "7.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "8.0.0" } +runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "8.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "8.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "7.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "7.0.3" } -xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "7.0.3" } +xcm = { package = "staging-xcm", default-features = false , version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "8.0.0" } sp-debug-derive = { default-features = false, version = "14.0.0" } [dev-dependencies] tiny-keccak = { version = "2.0.2", features = ["keccak"] } -keyring = { package = "sp-keyring", version = "31.0.0" } -sp-trie = { version = "29.0.0" } +keyring = { package = "sp-keyring", version = "32.0.0" } +sp-trie = { version = "30.0.0" } separator = "0.4.1" -serde_json = "1.0.111" -remote-externalities = { package = "frame-remote-externalities", version = "0.35.0" } -tokio = { version = "1.35.1", features = ["macros"] } +serde_json = "1.0.113" +remote-externalities = { package = "frame-remote-externalities", version = "0.36.0" } +tokio = { version = "1.36.0", features = ["macros"] } sp-tracing = { default-features = false , version = "16.0.0" } [build-dependencies] -substrate-wasm-builder = { version = "17.0.0" } +substrate-wasm-builder = { version = "18.0.0" } [features] default = [ "std" ] diff --git a/relay/kusama/constants/Cargo.toml b/relay/kusama/constants/Cargo.toml index 99e9e84975..5d19e4a1f6 100644 --- a/relay/kusama/constants/Cargo.toml +++ b/relay/kusama/constants/Cargo.toml @@ -9,14 +9,14 @@ license.workspace = true [dependencies] smallvec = "1.13.1" -frame-support = { default-features = false , version = "28.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "7.0.0" } -runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "7.0.0" } -sp-runtime = { default-features = false , version = "31.0.1" } -sp-weights = { default-features = false , version = "27.0.0" } -sp-core = { default-features = false , version = "28.0.0" } +frame-support = { default-features = false , version = "29.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "8.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "8.0.0" } +sp-runtime = { default-features = false , version = "32.0.0" } +sp-weights = { default-features = false , version = "28.0.0" } +sp-core = { default-features = false , version = "29.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "7.0.0" } +xcm = { package = "staging-xcm", default-features = false , version = "8.0.0" } [features] default = [ "std" ] diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index 431b238f54..aa014804d6 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -13,118 +13,118 @@ parity-scale-codec = { version = "3.6.9", default-features = false, features = [ scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } log = { version = "0.4.20", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } -serde = { version = "1.0.195", default-features = false } -serde_derive = { version = "1.0.195", optional = true } +serde = { version = "1.0.196", default-features = false } +serde_derive = { version = "1.0.196", optional = true } static_assertions = "1.1.0" -authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "26.0.0" } -babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.32.0" } -beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "13.0.0" } -binary-merkle-tree = { default-features = false , version = "13.0.0" } -block-builder-api = { package = "sp-block-builder", default-features = false , version = "26.0.0" } -inherents = { package = "sp-inherents", default-features = false , version = "26.0.0" } -offchain-primitives = { package = "sp-offchain", default-features = false , version = "26.0.0" } -tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "26.0.0" } -sp-arithmetic = { default-features = false , version = "23.0.0" } -sp-api = { default-features = false , version = "26.0.0" } -sp-genesis-builder = { default-features = false , version = "0.7.0" } +authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "27.0.0" } +babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.33.0" } +beefy-primitives = { package = "sp-consensus-beefy", default-features = false , version = "14.0.0" } +binary-merkle-tree = { default-features = false , version = "14.0.0" } +block-builder-api = { package = "sp-block-builder", default-features = false , version = "27.0.0" } +inherents = { package = "sp-inherents", default-features = false , version = "27.0.0" } +offchain-primitives = { package = "sp-offchain", default-features = false , version = "27.0.0" } +tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "27.0.0" } +sp-arithmetic = { default-features = false , version = "24.0.0" } +sp-api = { default-features = false , version = "27.0.0" } +sp-genesis-builder = { default-features = false , version = "0.8.0" } sp-std = { default-features = false , version = "14.0.0" } -sp-application-crypto = { default-features = false , version = "30.0.0" } -sp-io = { default-features = false , version = "30.0.0" } -sp-mmr-primitives = { default-features = false , version = "26.0.0" } -sp-runtime = { default-features = false , version = "31.0.1" } -sp-staking = { default-features = false , version = "26.0.0" } -sp-core = { default-features = false , version = "28.0.0" } -sp-session = { default-features = false , version = "27.0.0" } -sp-storage = { default-features = false , version = "19.0.0" } -sp-version = { default-features = false , version = "29.0.0" } -sp-npos-elections = { default-features = false , version = "26.0.0" } +sp-application-crypto = { default-features = false , version = "31.0.0" } +sp-io = { default-features = false , version = "31.0.0" } +sp-mmr-primitives = { default-features = false , version = "27.0.0" } +sp-runtime = { default-features = false , version = "32.0.0" } +sp-staking = { default-features = false , version = "27.0.0" } +sp-core = { default-features = false , version = "29.0.0" } +sp-session = { default-features = false , version = "28.0.0" } +sp-storage = { default-features = false , version = "20.0.0" } +sp-version = { default-features = false , version = "30.0.0" } +sp-npos-elections = { default-features = false , version = "27.0.0" } -pallet-asset-rate = { default-features = false , version = "7.0.0" } -pallet-authority-discovery = { default-features = false , version = "28.0.0" } -pallet-authorship = { default-features = false , version = "28.0.0" } -pallet-babe = { default-features = false , version = "28.0.0" } -pallet-bags-list = { default-features = false , version = "27.0.0" } -pallet-balances = { default-features = false , version = "28.0.0" } -pallet-beefy = { default-features = false , version = "28.0.0" } -pallet-beefy-mmr = { default-features = false , version = "28.0.0" } -pallet-bounties = { default-features = false , version = "27.0.0" } -pallet-child-bounties = { default-features = false , version = "27.0.0" } -pallet-transaction-payment = { default-features = false , version = "28.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "28.0.0" } -pallet-collective = { default-features = false , version = "28.0.0" } -pallet-conviction-voting = { default-features = false , version = "28.0.0" } -pallet-democracy = { default-features = false , version = "28.0.0" } -pallet-elections-phragmen = { default-features = false , version = "29.0.0" } -pallet-election-provider-multi-phase = { default-features = false , version = "27.0.0" } -pallet-fast-unstake = { default-features = false , version = "27.0.0" } -frame-executive = { default-features = false , version = "28.0.0" } -pallet-grandpa = { default-features = false , version = "28.0.0" } -pallet-identity = { default-features = false , version = "28.0.0" } -pallet-im-online = { default-features = false , version = "27.0.0" } -pallet-indices = { default-features = false , version = "28.0.0" } -pallet-membership = { default-features = false , version = "28.0.0" } -pallet-message-queue = { default-features = false , version = "31.0.0" } -pallet-mmr = { default-features = false , version = "27.0.0" } -pallet-multisig = { default-features = false , version = "28.0.0" } -pallet-nomination-pools = { default-features = false , version = "25.0.3" } -pallet-nomination-pools-runtime-api = { default-features = false , version = "23.0.0" } -pallet-offences = { default-features = false , version = "27.0.0" } -pallet-preimage = { default-features = false , version = "28.0.0" } -pallet-proxy = { default-features = false , version = "28.0.0" } -pallet-referenda = { default-features = false , version = "28.0.0" } -pallet-scheduler = { default-features = false , version = "29.0.0" } -pallet-session = { default-features = false , version = "28.0.0" } -frame-support = { default-features = false , version = "28.0.0" } -pallet-staking = { default-features = false , version = "28.0.0" } -pallet-staking-reward-fn = { default-features = false, version = "19.0.0" } +pallet-asset-rate = { default-features = false , version = "8.0.0" } +pallet-authority-discovery = { default-features = false , version = "29.0.0" } +pallet-authorship = { default-features = false , version = "29.0.0" } +pallet-babe = { default-features = false , version = "29.0.0" } +pallet-bags-list = { default-features = false , version = "28.0.0" } +pallet-balances = { default-features = false , version = "29.0.0" } +pallet-beefy = { default-features = false , version = "29.0.0" } +pallet-beefy-mmr = { default-features = false , version = "29.0.0" } +pallet-bounties = { default-features = false , version = "28.0.0" } +pallet-child-bounties = { default-features = false , version = "28.0.0" } +pallet-transaction-payment = { default-features = false , version = "29.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "29.0.0" } +pallet-collective = { default-features = false , version = "29.0.0" } +pallet-conviction-voting = { default-features = false , version = "29.0.0" } +pallet-democracy = { default-features = false , version = "29.0.0" } +pallet-elections-phragmen = { default-features = false , version = "30.0.0" } +pallet-election-provider-multi-phase = { default-features = false , version = "28.0.0" } +pallet-fast-unstake = { default-features = false , version = "28.0.0" } +frame-executive = { default-features = false , version = "29.0.0" } +pallet-grandpa = { default-features = false , version = "29.0.0" } +pallet-identity = { default-features = false , version = "29.0.0" } +pallet-im-online = { default-features = false , version = "28.0.0" } +pallet-indices = { default-features = false , version = "29.0.0" } +pallet-membership = { default-features = false , version = "29.0.0" } +pallet-message-queue = { default-features = false , version = "32.0.0" } +pallet-mmr = { default-features = false , version = "28.0.0" } +pallet-multisig = { default-features = false , version = "29.0.0" } +pallet-nomination-pools = { default-features = false , version = "26.0.0" } +pallet-nomination-pools-runtime-api = { default-features = false , version = "24.0.0" } +pallet-offences = { default-features = false , version = "28.0.0" } +pallet-preimage = { default-features = false , version = "29.0.0" } +pallet-proxy = { default-features = false , version = "29.0.0" } +pallet-referenda = { default-features = false , version = "29.0.0" } +pallet-scheduler = { default-features = false , version = "30.0.0" } +pallet-session = { default-features = false , version = "29.0.0" } +frame-support = { default-features = false , version = "29.0.0" } +pallet-staking = { default-features = false , version = "29.0.0" } +pallet-staking-reward-fn = { default-features = false, version = "20.0.0" } pallet-staking-reward-curve = { version = "11.0.0" } -pallet-staking-runtime-api = { default-features = false , version = "14.0.0" } -frame-system = { default-features = false , version = "28.0.0" } -frame-system-rpc-runtime-api = { default-features = false , version = "26.0.0" } +pallet-staking-runtime-api = { default-features = false , version = "15.0.0" } +frame-system = { default-features = false , version = "29.0.0" } +frame-system-rpc-runtime-api = { default-features = false , version = "27.0.0" } polkadot-runtime-constants = { package = "polkadot-runtime-constants", path = "constants", default-features = false } -pallet-timestamp = { default-features = false , version = "27.0.0" } -pallet-tips = { default-features = false , version = "27.0.0" } -pallet-treasury = { default-features = false , version = "27.0.0" } -pallet-whitelist = { default-features = false , version = "27.0.0" } -pallet-vesting = { default-features = false , version = "28.0.0" } -pallet-utility = { default-features = false , version = "28.0.0" } -frame-election-provider-support = { default-features = false , version = "28.0.0" } -pallet-xcm = { default-features = false, version = "7.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.3" } +pallet-timestamp = { default-features = false , version = "28.0.0" } +pallet-tips = { default-features = false , version = "28.0.0" } +pallet-treasury = { default-features = false , version = "28.0.0" } +pallet-whitelist = { default-features = false , version = "28.0.0" } +pallet-vesting = { default-features = false , version = "29.0.0" } +pallet-utility = { default-features = false , version = "29.0.0" } +frame-election-provider-support = { default-features = false , version = "29.0.0" } +pallet-xcm = { default-features = false, version = "8.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.0" } -frame-benchmarking = { default-features = false, optional = true , version = "28.0.0" } -frame-try-runtime = { default-features = false, optional = true , version = "0.34.0" } -frame-system-benchmarking = { default-features = false, optional = true , version = "28.0.0" } -pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "27.0.0" } -pallet-offences-benchmarking = { default-features = false, optional = true , version = "28.0.0" } -pallet-session-benchmarking = { default-features = false, optional = true , version = "28.0.0" } -pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "26.0.0" } +frame-benchmarking = { default-features = false, optional = true , version = "29.0.0" } +frame-try-runtime = { default-features = false, optional = true , version = "0.35.0" } +frame-system-benchmarking = { default-features = false, optional = true , version = "29.0.0" } +pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "28.0.0" } +pallet-offences-benchmarking = { default-features = false, optional = true , version = "29.0.0" } +pallet-session-benchmarking = { default-features = false, optional = true , version = "29.0.0" } +pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "27.0.0" } hex-literal = { version = "0.4.1", optional = true } -runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "7.0.0" } -runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "7.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "7.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "8.0.0" } +runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "8.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "8.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "7.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "7.0.3" } -xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "7.0.3" } +xcm = { package = "staging-xcm", default-features = false , version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "8.0.0" } sp-debug-derive = { default-features = false, version = "14.0.0" } [dev-dependencies] hex-literal = "0.4.1" tiny-keccak = { version = "2.0.2", features = ["keccak"] } -keyring = { package = "sp-keyring", version = "31.0.0" } -sp-trie = { version = "29.0.0" } -serde_json = "1.0.111" +keyring = { package = "sp-keyring", version = "32.0.0" } +sp-trie = { version = "30.0.0" } +serde_json = "1.0.113" separator = "0.4.1" -remote-externalities = { package = "frame-remote-externalities", version = "0.35.0" } -tokio = { version = "1.35.1", features = ["macros"] } +remote-externalities = { package = "frame-remote-externalities", version = "0.36.0" } +tokio = { version = "1.36.0", features = ["macros"] } sp-tracing = { default-features = false , version = "16.0.0" } [build-dependencies] -substrate-wasm-builder = { version = "17.0.0" } +substrate-wasm-builder = { version = "18.0.0" } [features] default = [ "std" ] diff --git a/relay/polkadot/constants/Cargo.toml b/relay/polkadot/constants/Cargo.toml index 9aca9fd84a..332126e86e 100644 --- a/relay/polkadot/constants/Cargo.toml +++ b/relay/polkadot/constants/Cargo.toml @@ -9,14 +9,14 @@ license.workspace = true [dependencies] smallvec = "1.13.1" -frame-support = { default-features = false , version = "28.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "7.0.0" } -runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "7.0.0" } -sp-runtime = { default-features = false , version = "31.0.1" } -sp-weights = { default-features = false , version = "27.0.0" } -sp-core = { default-features = false , version = "28.0.0" } +frame-support = { default-features = false , version = "29.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "8.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "8.0.0" } +sp-runtime = { default-features = false , version = "32.0.0" } +sp-weights = { default-features = false , version = "28.0.0" } +sp-core = { default-features = false , version = "29.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "7.0.0" } +xcm = { package = "staging-xcm", default-features = false , version = "8.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index 21eae7f71b..7ab9d97f5a 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -23,84 +23,84 @@ kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-f polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "28.0.0" } -frame-executive = { default-features = false, version = "28.0.0" } -frame-support = { default-features = false, version = "28.0.0" } -frame-system = { default-features = false, version = "28.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "28.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "26.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.34.0" } -pallet-asset-conversion-tx-payment = { default-features = false, version = "10.0.0" } -pallet-assets = { default-features = false, version = "29.0.0" } -pallet-asset-conversion = { default-features = false, version = "10.0.0" } -pallet-aura = { default-features = false, version = "27.0.0" } -pallet-authorship = { default-features = false, version = "28.0.0" } -pallet-balances = { default-features = false, version = "28.0.0" } -pallet-message-queue = { default-features = false , version = "31.0.0" } -pallet-multisig = { default-features = false, version = "28.0.0" } -pallet-nft-fractionalization = { default-features = false, version = "10.0.0" } -pallet-nfts = { default-features = false, version = "22.0.0" } -pallet-nfts-runtime-api = { default-features = false, version = "14.0.0" } -pallet-proxy = { default-features = false, version = "28.0.0" } -pallet-session = { default-features = false, version = "28.0.0" } -pallet-state-trie-migration = { default-features = false, optional = true , version = "29.0.0" } -pallet-timestamp = { default-features = false, version = "27.0.0" } -pallet-transaction-payment = { default-features = false, version = "28.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "28.0.0" } -pallet-uniques = { default-features = false, version = "28.0.0" } -pallet-utility = { default-features = false, version = "28.0.0" } -sp-api = { default-features = false, version = "26.0.0" } -sp-block-builder = { default-features = false, version = "26.0.0" } -sp-consensus-aura = { default-features = false, version = "0.32.0" } -sp-core = { default-features = false, version = "28.0.0" } -sp-genesis-builder = { default-features = false , version = "0.7.0" } -sp-inherents = { default-features = false, version = "26.0.0" } -sp-offchain = { default-features = false, version = "26.0.0" } -sp-runtime = { default-features = false, version = "31.0.1" } -sp-session = { default-features = false, version = "27.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "29.0.0" } +frame-executive = { default-features = false, version = "29.0.0" } +frame-support = { default-features = false, version = "29.0.0" } +frame-system = { default-features = false, version = "29.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "29.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "27.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.35.0" } +pallet-asset-conversion-tx-payment = { default-features = false, version = "11.0.0" } +pallet-assets = { default-features = false, version = "30.0.0" } +pallet-asset-conversion = { default-features = false, version = "11.0.0" } +pallet-aura = { default-features = false, version = "28.0.0" } +pallet-authorship = { default-features = false, version = "29.0.0" } +pallet-balances = { default-features = false, version = "29.0.0" } +pallet-message-queue = { default-features = false , version = "32.0.0" } +pallet-multisig = { default-features = false, version = "29.0.0" } +pallet-nft-fractionalization = { default-features = false, version = "11.0.0" } +pallet-nfts = { default-features = false, version = "23.0.0" } +pallet-nfts-runtime-api = { default-features = false, version = "15.0.0" } +pallet-proxy = { default-features = false, version = "29.0.0" } +pallet-session = { default-features = false, version = "29.0.0" } +pallet-state-trie-migration = { default-features = false, optional = true , version = "30.0.0" } +pallet-timestamp = { default-features = false, version = "28.0.0" } +pallet-transaction-payment = { default-features = false, version = "29.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "29.0.0" } +pallet-uniques = { default-features = false, version = "29.0.0" } +pallet-utility = { default-features = false, version = "29.0.0" } +sp-api = { default-features = false, version = "27.0.0" } +sp-block-builder = { default-features = false, version = "27.0.0" } +sp-consensus-aura = { default-features = false, version = "0.33.0" } +sp-core = { default-features = false, version = "29.0.0" } +sp-genesis-builder = { default-features = false , version = "0.8.0" } +sp-inherents = { default-features = false, version = "27.0.0" } +sp-offchain = { default-features = false, version = "27.0.0" } +sp-runtime = { default-features = false, version = "32.0.0" } +sp-session = { default-features = false, version = "28.0.0" } sp-std = { default-features = false, version = "14.0.0" } -sp-storage = { default-features = false, version = "19.0.0" } -sp-transaction-pool = { default-features = false, version = "26.0.0" } -sp-version = { default-features = false, version = "29.0.0" } -sp-weights = { default-features = false, version = "27.0.0" } +sp-storage = { default-features = false, version = "20.0.0" } +sp-transaction-pool = { default-features = false, version = "27.0.0" } +sp-version = { default-features = false, version = "30.0.0" } +sp-weights = { default-features = false, version = "28.0.0" } # num-traits feature needed for dex integer sq root: primitive-types = { version = "0.12.2", default-features = false, features = ["codec", "scale-info", "num-traits"] } # Polkadot -pallet-xcm = { default-features = false, version = "7.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.3" } -polkadot-core-primitives = { default-features = false, version = "7.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "6.0.0" } -polkadot-runtime-common = { default-features = false, version = "7.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "7.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "7.0.3" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.3" } +pallet-xcm = { default-features = false, version = "8.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.0" } +polkadot-core-primitives = { default-features = false, version = "8.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } +polkadot-runtime-common = { default-features = false, version = "8.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.7.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.7.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.7.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "9.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.7.0" } -cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.7.0" } -cumulus-primitives-core = { default-features = false , version = "0.7.0" } -cumulus-primitives-utility = { default-features = false , version = "0.7.3" } -pallet-collator-selection = { default-features = false , version = "9.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.7.0" } -parachains-common = { default-features = false , version = "7.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.8.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.8.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "10.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.8.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.8.0" } +cumulus-primitives-core = { default-features = false , version = "0.8.0" } +cumulus-primitives-utility = { default-features = false , version = "0.8.0" } +pallet-collator-selection = { default-features = false , version = "10.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.8.0" } +parachains-common = { default-features = false , version = "8.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } -assets-common = { default-features = false , version = "0.7.0" } +assets-common = { default-features = false , version = "0.8.0" } # Bridges -pallet-xcm-bridge-hub-router = { default-features = false , version = "0.5.0" } +pallet-xcm-bridge-hub-router = { default-features = false , version = "0.6.0" } [dev-dependencies] -asset-test-utils = { version = "7.0.0" } -parachains-runtimes-test-utils = { version = "7.0.0" } -sp-io = { version = "30.0.0" } +asset-test-utils = { version = "8.0.0" } +parachains-runtimes-test-utils = { version = "8.0.0" } +sp-io = { version = "31.0.0" } [build-dependencies] -substrate-wasm-builder = { optional = true , version = "17.0.0" } +substrate-wasm-builder = { optional = true , version = "18.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml index 6f45d8ebda..26b0c80801 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml @@ -12,14 +12,14 @@ codec = { package = "parity-scale-codec", version = "3.6.9", default-features = scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # Bridge Dependencies -bp-xcm-bridge-hub-router = { default-features = false , version = "0.6.0" } +bp-xcm-bridge-hub-router = { default-features = false , version = "0.7.0" } # Substrate Based Dependencies -frame-support = { default-features = false, version = "28.0.0" } +frame-support = { default-features = false, version = "29.0.0" } sp-std = { default-features = false, version = "14.0.0" } # Polkadot -xcm = { package = "staging-xcm", default-features = false, version = "7.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 787077cc50..290f139d9d 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -23,80 +23,80 @@ kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-f polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "28.0.0" } -frame-executive = { default-features = false, version = "28.0.0" } -frame-support = { default-features = false, version = "28.0.0" } -frame-system = { default-features = false, version = "28.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "28.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "26.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.34.0" } -pallet-asset-tx-payment = { default-features = false , version = "28.0.0" } -pallet-assets = { default-features = false, version = "29.0.0" } -pallet-aura = { default-features = false, version = "27.0.0" } -pallet-authorship = { default-features = false, version = "28.0.0" } -pallet-balances = { default-features = false, version = "28.0.0" } -pallet-message-queue = { default-features = false , version = "31.0.0" } -pallet-multisig = { default-features = false, version = "28.0.0" } -pallet-nfts = { default-features = false, version = "22.0.0" } -pallet-nfts-runtime-api = { default-features = false, version = "14.0.0" } -pallet-proxy = { default-features = false, version = "28.0.0" } -pallet-session = { default-features = false, version = "28.0.0" } -pallet-timestamp = { default-features = false, version = "27.0.0" } -pallet-transaction-payment = { default-features = false, version = "28.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "28.0.0" } -pallet-uniques = { default-features = false, version = "28.0.0" } -pallet-utility = { default-features = false, version = "28.0.0" } -sp-api = { default-features = false, version = "26.0.0" } -sp-block-builder = { default-features = false, version = "26.0.0" } -sp-consensus-aura = { default-features = false, version = "0.32.0" } -sp-core = { default-features = false, version = "28.0.0" } -sp-genesis-builder = { default-features = false , version = "0.7.0" } -sp-inherents = { default-features = false, version = "26.0.0" } -sp-offchain = { default-features = false, version = "26.0.0" } -sp-runtime = { default-features = false, version = "31.0.1" } -sp-session = { default-features = false, version = "27.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "29.0.0" } +frame-executive = { default-features = false, version = "29.0.0" } +frame-support = { default-features = false, version = "29.0.0" } +frame-system = { default-features = false, version = "29.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "29.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "27.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.35.0" } +pallet-asset-tx-payment = { default-features = false , version = "29.0.0" } +pallet-assets = { default-features = false, version = "30.0.0" } +pallet-aura = { default-features = false, version = "28.0.0" } +pallet-authorship = { default-features = false, version = "29.0.0" } +pallet-balances = { default-features = false, version = "29.0.0" } +pallet-message-queue = { default-features = false , version = "32.0.0" } +pallet-multisig = { default-features = false, version = "29.0.0" } +pallet-nfts = { default-features = false, version = "23.0.0" } +pallet-nfts-runtime-api = { default-features = false, version = "15.0.0" } +pallet-proxy = { default-features = false, version = "29.0.0" } +pallet-session = { default-features = false, version = "29.0.0" } +pallet-timestamp = { default-features = false, version = "28.0.0" } +pallet-transaction-payment = { default-features = false, version = "29.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "29.0.0" } +pallet-uniques = { default-features = false, version = "29.0.0" } +pallet-utility = { default-features = false, version = "29.0.0" } +sp-api = { default-features = false, version = "27.0.0" } +sp-block-builder = { default-features = false, version = "27.0.0" } +sp-consensus-aura = { default-features = false, version = "0.33.0" } +sp-core = { default-features = false, version = "29.0.0" } +sp-genesis-builder = { default-features = false , version = "0.8.0" } +sp-inherents = { default-features = false, version = "27.0.0" } +sp-offchain = { default-features = false, version = "27.0.0" } +sp-runtime = { default-features = false, version = "32.0.0" } +sp-session = { default-features = false, version = "28.0.0" } sp-std = { default-features = false, version = "14.0.0" } -sp-storage = { default-features = false, version = "19.0.0" } -sp-transaction-pool = { default-features = false, version = "26.0.0" } -sp-version = { default-features = false, version = "29.0.0" } -sp-weights = { default-features = false, version = "27.0.0" } +sp-storage = { default-features = false, version = "20.0.0" } +sp-transaction-pool = { default-features = false, version = "27.0.0" } +sp-version = { default-features = false, version = "30.0.0" } +sp-weights = { default-features = false, version = "28.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "7.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.3" } -polkadot-core-primitives = { default-features = false, version = "7.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "6.0.0" } -polkadot-runtime-common = { default-features = false, version = "7.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "7.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "7.0.3" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.3" } +pallet-xcm = { default-features = false, version = "8.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.0" } +polkadot-core-primitives = { default-features = false, version = "8.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } +polkadot-runtime-common = { default-features = false, version = "8.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.7.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.7.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.7.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "9.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.7.0" } -cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.7.0" } -cumulus-primitives-core = { default-features = false , version = "0.7.0" } -cumulus-primitives-utility = { default-features = false , version = "0.7.3" } -pallet-collator-selection = { default-features = false , version = "9.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.7.0" } -parachains-common = { default-features = false , version = "7.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.8.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.8.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "10.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.8.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.8.0" } +cumulus-primitives-core = { default-features = false , version = "0.8.0" } +cumulus-primitives-utility = { default-features = false , version = "0.8.0" } +pallet-collator-selection = { default-features = false , version = "10.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.8.0" } +parachains-common = { default-features = false , version = "8.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } -assets-common = { default-features = false , version = "0.7.0" } +assets-common = { default-features = false , version = "0.8.0" } # Bridges -pallet-xcm-bridge-hub-router = { default-features = false , version = "0.5.0" } +pallet-xcm-bridge-hub-router = { default-features = false , version = "0.6.0" } [dev-dependencies] hex-literal = "0.4.1" -asset-test-utils = { version = "7.0.0" } -parachains-runtimes-test-utils = { version = "7.0.0" } -sp-io = { version = "30.0.0" } +asset-test-utils = { version = "8.0.0" } +parachains-runtimes-test-utils = { version = "8.0.0" } +sp-io = { version = "31.0.0" } [build-dependencies] -substrate-wasm-builder = { optional = true , version = "17.0.0" } +substrate-wasm-builder = { optional = true , version = "18.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml index 6ac886036c..e049be2504 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml @@ -12,14 +12,14 @@ codec = { package = "parity-scale-codec", version = "3.6.9", default-features = scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # Bridge Dependencies -bp-xcm-bridge-hub-router = { default-features = false , version = "0.6.0" } +bp-xcm-bridge-hub-router = { default-features = false , version = "0.7.0" } # Substrate Based Dependencies -frame-support = { default-features = false, version = "28.0.0" } +frame-support = { default-features = false, version = "29.0.0" } sp-std = { default-features = false, version = "14.0.0" } # Polkadot -xcm = { package = "staging-xcm", default-features = false, version = "7.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 252f782af3..9a0f9342c5 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -9,14 +9,14 @@ repository.workspace = true version.workspace = true [build-dependencies] -substrate-wasm-builder = { optional = true , version = "17.0.0" } +substrate-wasm-builder = { optional = true , version = "18.0.0" } [dependencies] codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive"] } hex-literal = { version = "0.4.1" } log = { version = "0.4.20", default-features = false } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.195", optional = true, features = ["derive"] } +serde = { version = "1.0.196", optional = true, features = ["derive"] } # Local bp-asset-hub-kusama = { path = "../../asset-hubs/asset-hub-kusama/primitives", default-features = false} @@ -27,82 +27,82 @@ kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-f polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "28.0.0" } -frame-executive = { default-features = false, version = "28.0.0" } -frame-support = { default-features = false, version = "28.0.0" } -frame-system = { default-features = false, version = "28.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "28.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "26.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.34.0" } -pallet-aura = { default-features = false, version = "27.0.0" } -pallet-authorship = { default-features = false, version = "28.0.0" } -pallet-balances = { default-features = false, version = "28.0.0" } -pallet-message-queue = { default-features = false , version = "31.0.0" } -pallet-multisig = { default-features = false, version = "28.0.0" } -pallet-session = { default-features = false, version = "28.0.0" } -pallet-timestamp = { default-features = false, version = "27.0.0" } -pallet-transaction-payment = { default-features = false, version = "28.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "28.0.0" } -pallet-utility = { default-features = false, version = "28.0.0" } -sp-api = { default-features = false, version = "26.0.0" } -sp-block-builder = { default-features = false, version = "26.0.0" } -sp-consensus-aura = { default-features = false, version = "0.32.0" } -sp-core = { default-features = false, version = "28.0.0" } -sp-genesis-builder = { default-features = false , version = "0.7.0" } -sp-inherents = { default-features = false, version = "26.0.0" } -sp-io = { default-features = false, version = "30.0.0" } -sp-offchain = { default-features = false, version = "26.0.0" } -sp-runtime = { default-features = false, version = "31.0.1" } -sp-session = { default-features = false, version = "27.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "29.0.0" } +frame-executive = { default-features = false, version = "29.0.0" } +frame-support = { default-features = false, version = "29.0.0" } +frame-system = { default-features = false, version = "29.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "29.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "27.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.35.0" } +pallet-aura = { default-features = false, version = "28.0.0" } +pallet-authorship = { default-features = false, version = "29.0.0" } +pallet-balances = { default-features = false, version = "29.0.0" } +pallet-message-queue = { default-features = false , version = "32.0.0" } +pallet-multisig = { default-features = false, version = "29.0.0" } +pallet-session = { default-features = false, version = "29.0.0" } +pallet-timestamp = { default-features = false, version = "28.0.0" } +pallet-transaction-payment = { default-features = false, version = "29.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "29.0.0" } +pallet-utility = { default-features = false, version = "29.0.0" } +sp-api = { default-features = false, version = "27.0.0" } +sp-block-builder = { default-features = false, version = "27.0.0" } +sp-consensus-aura = { default-features = false, version = "0.33.0" } +sp-core = { default-features = false, version = "29.0.0" } +sp-genesis-builder = { default-features = false , version = "0.8.0" } +sp-inherents = { default-features = false, version = "27.0.0" } +sp-io = { default-features = false, version = "31.0.0" } +sp-offchain = { default-features = false, version = "27.0.0" } +sp-runtime = { default-features = false, version = "32.0.0" } +sp-session = { default-features = false, version = "28.0.0" } sp-std = { default-features = false, version = "14.0.0" } -sp-storage = { default-features = false, version = "19.0.0" } -sp-transaction-pool = { default-features = false, version = "26.0.0" } -sp-version = { default-features = false, version = "29.0.0" } +sp-storage = { default-features = false, version = "20.0.0" } +sp-transaction-pool = { default-features = false, version = "27.0.0" } +sp-version = { default-features = false, version = "30.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "7.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.3" } -polkadot-core-primitives = { default-features = false, version = "7.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "6.0.0" } -polkadot-runtime-common = { default-features = false, version = "7.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "7.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "7.0.3" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.3" } +pallet-xcm = { default-features = false, version = "8.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.0" } +polkadot-core-primitives = { default-features = false, version = "8.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } +polkadot-runtime-common = { default-features = false, version = "8.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.7.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.7.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.7.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "9.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.7.0" } -cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.7.0" } -cumulus-primitives-core = { default-features = false , version = "0.7.0" } -cumulus-primitives-utility = { default-features = false , version = "0.7.3" } -pallet-collator-selection = { default-features = false , version = "9.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.7.0" } -parachains-common = { default-features = false , version = "7.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.8.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.8.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "10.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.8.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.8.0" } +cumulus-primitives-core = { default-features = false , version = "0.8.0" } +cumulus-primitives-utility = { default-features = false , version = "0.8.0" } +pallet-collator-selection = { default-features = false , version = "10.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.8.0" } +parachains-common = { default-features = false , version = "8.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } # Bridges -bp-header-chain = { default-features = false , version = "0.7.0" } -bp-messages = { default-features = false , version = "0.7.0" } -bp-parachains = { default-features = false , version = "0.7.0" } -bp-polkadot-core = { default-features = false , version = "0.7.0" } -bp-relayers = { default-features = false , version = "0.7.0" } -bp-runtime = { default-features = false , version = "0.7.0" } -bp-kusama = { default-features = false , version = "0.5.0" } -bp-polkadot = { default-features = false , version = "0.5.0" } -bridge-runtime-common = { default-features = false , version = "0.7.0" } -pallet-bridge-grandpa = { default-features = false , version = "0.7.0" } -pallet-bridge-messages = { default-features = false , version = "0.7.0" } -pallet-bridge-parachains = { default-features = false , version = "0.7.0" } -pallet-bridge-relayers = { default-features = false , version = "0.7.0" } -pallet-xcm-bridge-hub = { default-features = false , version = "0.2.0" } +bp-header-chain = { default-features = false , version = "0.8.0" } +bp-messages = { default-features = false , version = "0.8.0" } +bp-parachains = { default-features = false , version = "0.8.0" } +bp-polkadot-core = { default-features = false , version = "0.8.0" } +bp-relayers = { default-features = false , version = "0.8.0" } +bp-runtime = { default-features = false , version = "0.8.0" } +bp-kusama = { default-features = false , version = "0.6.0" } +bp-polkadot = { default-features = false , version = "0.6.0" } +bridge-runtime-common = { default-features = false , version = "0.8.0" } +pallet-bridge-grandpa = { default-features = false , version = "0.8.0" } +pallet-bridge-messages = { default-features = false , version = "0.8.0" } +pallet-bridge-parachains = { default-features = false , version = "0.8.0" } +pallet-bridge-relayers = { default-features = false , version = "0.8.0" } +pallet-xcm-bridge-hub = { default-features = false , version = "0.3.0" } [dev-dependencies] -bridge-hub-test-utils = { version = "0.7.0" } -bridge-runtime-common = { version = "0.7.0", features = ["integrity-test"] } -sp-keyring = { version = "31.0.0" } +bridge-hub-test-utils = { version = "0.8.0" } +bridge-runtime-common = { version = "0.8.0", features = ["integrity-test"] } +sp-keyring = { version = "32.0.0" } static_assertions = { version = "1.1.0" } [features] diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml index f45a93f2ec..22b3a55e4d 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml @@ -14,14 +14,14 @@ kusama-runtime-constants = { path = "../../../../relay/kusama/constants", defaul polkadot-runtime-constants = { path = "../../../../relay/polkadot/constants", default-features = false} # Bridge Dependencies -bp-bridge-hub-cumulus = { default-features = false , version = "0.7.0" } -bp-runtime = { default-features = false , version = "0.7.0" } -bp-messages = { default-features = false , version = "0.7.0" } +bp-bridge-hub-cumulus = { default-features = false , version = "0.8.0" } +bp-runtime = { default-features = false , version = "0.8.0" } +bp-messages = { default-features = false , version = "0.8.0" } # Substrate Based Dependencies -frame-support = { default-features = false, version = "28.0.0" } -sp-api = { default-features = false, version = "26.0.0" } -sp-runtime = { default-features = false, version = "31.0.1" } +frame-support = { default-features = false, version = "29.0.0" } +sp-api = { default-features = false, version = "27.0.0" } +sp-runtime = { default-features = false, version = "32.0.0" } sp-std = { default-features = false , version = "14.0.0" } [features] diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 1759d02407..d39c334251 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -9,14 +9,14 @@ repository.workspace = true version.workspace = true [build-dependencies] -substrate-wasm-builder = { optional = true , version = "17.0.0" } +substrate-wasm-builder = { optional = true , version = "18.0.0" } [dependencies] codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive"] } hex-literal = { version = "0.4.1" } log = { version = "0.4.20", default-features = false } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.195", optional = true, features = ["derive"] } +serde = { version = "1.0.196", optional = true, features = ["derive"] } # Local bp-asset-hub-kusama = { path = "../../asset-hubs/asset-hub-kusama/primitives", default-features = false} @@ -27,82 +27,82 @@ kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-f polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "28.0.0" } -frame-executive = { default-features = false, version = "28.0.0" } -frame-support = { default-features = false, version = "28.0.0" } -frame-system = { default-features = false, version = "28.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "28.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "26.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.34.0" } -pallet-aura = { default-features = false, version = "27.0.0" } -pallet-authorship = { default-features = false, version = "28.0.0" } -pallet-balances = { default-features = false, version = "28.0.0" } -pallet-message-queue = { default-features = false , version = "31.0.0" } -pallet-multisig = { default-features = false, version = "28.0.0" } -pallet-session = { default-features = false, version = "28.0.0" } -pallet-timestamp = { default-features = false, version = "27.0.0" } -pallet-transaction-payment = { default-features = false, version = "28.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "28.0.0" } -pallet-utility = { default-features = false, version = "28.0.0" } -sp-api = { default-features = false, version = "26.0.0" } -sp-block-builder = { default-features = false, version = "26.0.0" } -sp-consensus-aura = { default-features = false, version = "0.32.0" } -sp-core = { default-features = false, version = "28.0.0" } -sp-genesis-builder = { default-features = false , version = "0.7.0" } -sp-inherents = { default-features = false, version = "26.0.0" } -sp-io = { default-features = false, version = "30.0.0" } -sp-offchain = { default-features = false, version = "26.0.0" } -sp-runtime = { default-features = false, version = "31.0.1" } -sp-session = { default-features = false, version = "27.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "29.0.0" } +frame-executive = { default-features = false, version = "29.0.0" } +frame-support = { default-features = false, version = "29.0.0" } +frame-system = { default-features = false, version = "29.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "29.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "27.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.35.0" } +pallet-aura = { default-features = false, version = "28.0.0" } +pallet-authorship = { default-features = false, version = "29.0.0" } +pallet-balances = { default-features = false, version = "29.0.0" } +pallet-message-queue = { default-features = false , version = "32.0.0" } +pallet-multisig = { default-features = false, version = "29.0.0" } +pallet-session = { default-features = false, version = "29.0.0" } +pallet-timestamp = { default-features = false, version = "28.0.0" } +pallet-transaction-payment = { default-features = false, version = "29.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "29.0.0" } +pallet-utility = { default-features = false, version = "29.0.0" } +sp-api = { default-features = false, version = "27.0.0" } +sp-block-builder = { default-features = false, version = "27.0.0" } +sp-consensus-aura = { default-features = false, version = "0.33.0" } +sp-core = { default-features = false, version = "29.0.0" } +sp-genesis-builder = { default-features = false , version = "0.8.0" } +sp-inherents = { default-features = false, version = "27.0.0" } +sp-io = { default-features = false, version = "31.0.0" } +sp-offchain = { default-features = false, version = "27.0.0" } +sp-runtime = { default-features = false, version = "32.0.0" } +sp-session = { default-features = false, version = "28.0.0" } sp-std = { default-features = false, version = "14.0.0" } -sp-storage = { default-features = false, version = "19.0.0" } -sp-transaction-pool = { default-features = false, version = "26.0.0" } -sp-version = { default-features = false, version = "29.0.0" } +sp-storage = { default-features = false, version = "20.0.0" } +sp-transaction-pool = { default-features = false, version = "27.0.0" } +sp-version = { default-features = false, version = "30.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "7.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.3" } -polkadot-core-primitives = { default-features = false, version = "7.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "6.0.0" } -polkadot-runtime-common = { default-features = false, version = "7.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "7.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "7.0.3" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.3" } +pallet-xcm = { default-features = false, version = "8.0.0" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.0" } +polkadot-core-primitives = { default-features = false, version = "8.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } +polkadot-runtime-common = { default-features = false, version = "8.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.7.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.7.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.7.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "9.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.7.0" } -cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.7.0" } -cumulus-primitives-core = { default-features = false , version = "0.7.0" } -cumulus-primitives-utility = { default-features = false , version = "0.7.3" } -pallet-collator-selection = { default-features = false , version = "9.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.7.0" } -parachains-common = { default-features = false , version = "7.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.8.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.8.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "10.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.8.0" } +cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.8.0" } +cumulus-primitives-core = { default-features = false , version = "0.8.0" } +cumulus-primitives-utility = { default-features = false , version = "0.8.0" } +pallet-collator-selection = { default-features = false , version = "10.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.8.0" } +parachains-common = { default-features = false , version = "8.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } # Bridges -bp-header-chain = { default-features = false , version = "0.7.0" } -bp-messages = { default-features = false , version = "0.7.0" } -bp-parachains = { default-features = false , version = "0.7.0" } -bp-polkadot-core = { default-features = false , version = "0.7.0" } -bp-relayers = { default-features = false , version = "0.7.0" } -bp-runtime = { default-features = false , version = "0.7.0" } -bp-kusama = { default-features = false , version = "0.5.0" } -bp-polkadot = { default-features = false , version = "0.5.0" } -bridge-runtime-common = { default-features = false , version = "0.7.0" } -pallet-bridge-grandpa = { default-features = false , version = "0.7.0" } -pallet-bridge-messages = { default-features = false , version = "0.7.0" } -pallet-bridge-parachains = { default-features = false , version = "0.7.0" } -pallet-bridge-relayers = { default-features = false , version = "0.7.0" } -pallet-xcm-bridge-hub = { default-features = false , version = "0.2.0" } +bp-header-chain = { default-features = false , version = "0.8.0" } +bp-messages = { default-features = false , version = "0.8.0" } +bp-parachains = { default-features = false , version = "0.8.0" } +bp-polkadot-core = { default-features = false , version = "0.8.0" } +bp-relayers = { default-features = false , version = "0.8.0" } +bp-runtime = { default-features = false , version = "0.8.0" } +bp-kusama = { default-features = false , version = "0.6.0" } +bp-polkadot = { default-features = false , version = "0.6.0" } +bridge-runtime-common = { default-features = false , version = "0.8.0" } +pallet-bridge-grandpa = { default-features = false , version = "0.8.0" } +pallet-bridge-messages = { default-features = false , version = "0.8.0" } +pallet-bridge-parachains = { default-features = false , version = "0.8.0" } +pallet-bridge-relayers = { default-features = false , version = "0.8.0" } +pallet-xcm-bridge-hub = { default-features = false , version = "0.3.0" } [dev-dependencies] -bridge-hub-test-utils = { version = "0.7.0" } -bridge-runtime-common = { version = "0.7.0", features = ["integrity-test"] } -sp-keyring = { version = "31.0.0" } +bridge-hub-test-utils = { version = "0.8.0" } +bridge-runtime-common = { version = "0.8.0", features = ["integrity-test"] } +sp-keyring = { version = "32.0.0" } static_assertions = { version = "1.1.0" } [features] diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml index 773ff5bca6..7888acf5c1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml @@ -14,14 +14,14 @@ kusama-runtime-constants = { path = "../../../../relay/kusama/constants", defaul polkadot-runtime-constants = { path = "../../../../relay/polkadot/constants", default-features = false} # Bridge Dependencies -bp-bridge-hub-cumulus = { default-features = false , version = "0.7.0" } -bp-runtime = { default-features = false , version = "0.7.0" } -bp-messages = { default-features = false , version = "0.7.0" } +bp-bridge-hub-cumulus = { default-features = false , version = "0.8.0" } +bp-runtime = { default-features = false , version = "0.8.0" } +bp-messages = { default-features = false , version = "0.8.0" } # Substrate Based Dependencies -frame-support = { default-features = false, version = "28.0.0" } -sp-api = { default-features = false, version = "26.0.0" } -sp-runtime = { default-features = false, version = "31.0.1" } +frame-support = { default-features = false, version = "29.0.0" } +sp-api = { default-features = false, version = "27.0.0" } +sp-runtime = { default-features = false, version = "32.0.0" } sp-std = { default-features = false , version = "14.0.0" } [features] diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index a4ad3bbde0..9e06ee75aa 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -15,75 +15,75 @@ log = { version = "0.4.20", default-features = false } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "28.0.0" } -frame-executive = { default-features = false, version = "28.0.0" } -frame-support = { default-features = false, version = "28.0.0" } -frame-system = { default-features = false, version = "28.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "28.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "26.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.34.0" } -pallet-asset-rate = { default-features = false , version = "7.0.0" } -pallet-alliance = { default-features = false, version = "27.0.0" } -pallet-aura = { default-features = false, version = "27.0.0" } -pallet-authorship = { default-features = false, version = "28.0.0" } -pallet-balances = { default-features = false, version = "28.0.0" } -pallet-collective = { default-features = false, version = "28.0.0" } -pallet-message-queue = { default-features = false , version = "31.0.0" } -pallet-multisig = { default-features = false, version = "28.0.0" } -pallet-preimage = { default-features = false , version = "28.0.0" } -pallet-proxy = { default-features = false, version = "28.0.0" } -pallet-scheduler = { default-features = false , version = "29.0.0" } -pallet-session = { default-features = false, version = "28.0.0" } -pallet-timestamp = { default-features = false, version = "27.0.0" } -pallet-transaction-payment = { default-features = false, version = "28.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "28.0.0" } -pallet-treasury = { default-features = false , version = "27.0.0" } -pallet-utility = { default-features = false, version = "28.0.0" } -pallet-referenda = { default-features = false, version = "28.0.0" } -pallet-ranked-collective = { default-features = false, version = "28.0.0" } -pallet-core-fellowship = { default-features = false, version = "12.0.0" } -pallet-salary = { default-features = false, version = "13.0.0" } -sp-api = { default-features = false, version = "26.0.0" } -sp-arithmetic = { default-features = false , version = "23.0.0" } -sp-block-builder = { default-features = false, version = "26.0.0" } -sp-consensus-aura = { default-features = false, version = "0.32.0" } -sp-core = { default-features = false, version = "28.0.0" } -sp-genesis-builder = { default-features = false , version = "0.7.0" } -sp-inherents = { default-features = false, version = "26.0.0" } -sp-offchain = { default-features = false, version = "26.0.0" } -sp-runtime = { default-features = false, version = "31.0.1" } -sp-session = { default-features = false, version = "27.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "29.0.0" } +frame-executive = { default-features = false, version = "29.0.0" } +frame-support = { default-features = false, version = "29.0.0" } +frame-system = { default-features = false, version = "29.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "29.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "27.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.35.0" } +pallet-asset-rate = { default-features = false , version = "8.0.0" } +pallet-alliance = { default-features = false, version = "28.0.0" } +pallet-aura = { default-features = false, version = "28.0.0" } +pallet-authorship = { default-features = false, version = "29.0.0" } +pallet-balances = { default-features = false, version = "29.0.0" } +pallet-collective = { default-features = false, version = "29.0.0" } +pallet-message-queue = { default-features = false , version = "32.0.0" } +pallet-multisig = { default-features = false, version = "29.0.0" } +pallet-preimage = { default-features = false , version = "29.0.0" } +pallet-proxy = { default-features = false, version = "29.0.0" } +pallet-scheduler = { default-features = false , version = "30.0.0" } +pallet-session = { default-features = false, version = "29.0.0" } +pallet-timestamp = { default-features = false, version = "28.0.0" } +pallet-transaction-payment = { default-features = false, version = "29.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "29.0.0" } +pallet-treasury = { default-features = false , version = "28.0.0" } +pallet-utility = { default-features = false, version = "29.0.0" } +pallet-referenda = { default-features = false, version = "29.0.0" } +pallet-ranked-collective = { default-features = false, version = "29.0.0" } +pallet-core-fellowship = { default-features = false, version = "13.0.0" } +pallet-salary = { default-features = false, version = "14.0.0" } +sp-api = { default-features = false, version = "27.0.0" } +sp-arithmetic = { default-features = false , version = "24.0.0" } +sp-block-builder = { default-features = false, version = "27.0.0" } +sp-consensus-aura = { default-features = false, version = "0.33.0" } +sp-core = { default-features = false, version = "29.0.0" } +sp-genesis-builder = { default-features = false , version = "0.8.0" } +sp-inherents = { default-features = false, version = "27.0.0" } +sp-offchain = { default-features = false, version = "27.0.0" } +sp-runtime = { default-features = false, version = "32.0.0" } +sp-session = { default-features = false, version = "28.0.0" } sp-std = { default-features = false, version = "14.0.0" } -sp-storage = { default-features = false, version = "19.0.0" } -sp-transaction-pool = { default-features = false, version = "26.0.0" } -sp-version = { default-features = false, version = "29.0.0" } +sp-storage = { default-features = false, version = "20.0.0" } +sp-transaction-pool = { default-features = false, version = "27.0.0" } +sp-version = { default-features = false, version = "30.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "7.0.0" } -polkadot-core-primitives = { default-features = false, version = "7.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "6.0.0" } -polkadot-runtime-common = { default-features = false, version = "7.0.0" } +pallet-xcm = { default-features = false, version = "8.0.0" } +polkadot-core-primitives = { default-features = false, version = "8.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } +polkadot-runtime-common = { default-features = false, version = "8.0.0" } polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} -xcm = { package = "staging-xcm", default-features = false, version = "7.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "7.0.3" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.3" } +xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.0" } # Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.7.0" } -cumulus-pallet-dmp-queue = { default-features = false , version = "0.7.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.7.0" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "9.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.7.0" } -cumulus-pallet-xcmp-queue = { default-features = false , version = "0.7.0" } -cumulus-primitives-core = { default-features = false , version = "0.7.0" } -cumulus-primitives-utility = { default-features = false , version = "0.7.3" } -pallet-collator-selection = { default-features = false , version = "9.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.7.0" } -parachains-common = { default-features = false , version = "7.0.0" } +cumulus-pallet-aura-ext = { default-features = false , version = "0.8.0" } +cumulus-pallet-dmp-queue = { default-features = false , version = "0.8.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.0" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "10.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.8.0" } +cumulus-pallet-xcmp-queue = { default-features = false , version = "0.8.0" } +cumulus-primitives-core = { default-features = false , version = "0.8.0" } +cumulus-primitives-utility = { default-features = false , version = "0.8.0" } +pallet-collator-selection = { default-features = false , version = "10.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.8.0" } +parachains-common = { default-features = false , version = "8.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } [build-dependencies] -substrate-wasm-builder = { optional = true , version = "17.0.0" } +substrate-wasm-builder = { optional = true , version = "18.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/constants/Cargo.toml b/system-parachains/constants/Cargo.toml index b1f97d2384..3137cf2138 100644 --- a/system-parachains/constants/Cargo.toml +++ b/system-parachains/constants/Cargo.toml @@ -10,13 +10,13 @@ license.workspace = true [dependencies] smallvec = "1.13.1" -frame-support = { default-features = false , version = "28.0.0" } +frame-support = { default-features = false , version = "29.0.0" } kusama-runtime-constants = { path = "../../relay/kusama/constants", default-features = false} -parachains-common = { default-features = false , version = "7.0.0" } -polkadot-core-primitives = { default-features = false, version = "7.0.0"} -polkadot-primitives = { default-features = false , version = "7.0.0" } +parachains-common = { default-features = false , version = "8.0.0" } +polkadot-core-primitives = { default-features = false, version = "8.0.0"} +polkadot-primitives = { default-features = false , version = "8.0.0" } polkadot-runtime-constants = { path = "../../relay/polkadot/constants", default-features = false} -sp-runtime = { default-features = false , version = "31.0.1" } +sp-runtime = { default-features = false , version = "32.0.0" } [features] default = [ "std" ] diff --git a/system-parachains/gluttons/glutton-kusama/Cargo.toml b/system-parachains/gluttons/glutton-kusama/Cargo.toml index 2adfb25a53..49d2443123 100644 --- a/system-parachains/gluttons/glutton-kusama/Cargo.toml +++ b/system-parachains/gluttons/glutton-kusama/Cargo.toml @@ -13,44 +13,44 @@ codec = { package = "parity-scale-codec", version = "3.6.9", default-features = scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "28.0.0" } -frame-executive = { default-features = false, version = "28.0.0" } -frame-support = { default-features = false, version = "28.0.0" } -frame-system = { default-features = false, version = "28.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "26.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "28.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.34.0" } -pallet-glutton = { default-features = false, optional = true, version = "14.0.0" } -pallet-message-queue = { default-features = false , version = "31.0.0" } -pallet-sudo = { default-features = false, optional = true, version = "28.0.0" } -sp-api = { default-features = false, version = "26.0.0" } -sp-block-builder = { default-features = false, version = "26.0.0" } -sp-core = { default-features = false, version = "28.0.0" } -sp-genesis-builder = { default-features = false , version = "0.7.0" } -sp-inherents = { default-features = false, version = "26.0.0" } -sp-offchain = { default-features = false, version = "26.0.0" } -sp-runtime = { default-features = false, version = "31.0.1" } -sp-session = { default-features = false, version = "27.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "29.0.0" } +frame-executive = { default-features = false, version = "29.0.0" } +frame-support = { default-features = false, version = "29.0.0" } +frame-system = { default-features = false, version = "29.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "27.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "29.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.35.0" } +pallet-glutton = { default-features = false, optional = true, version = "15.0.0" } +pallet-message-queue = { default-features = false , version = "32.0.0" } +pallet-sudo = { default-features = false, optional = true, version = "29.0.0" } +sp-api = { default-features = false, version = "27.0.0" } +sp-block-builder = { default-features = false, version = "27.0.0" } +sp-core = { default-features = false, version = "29.0.0" } +sp-genesis-builder = { default-features = false , version = "0.8.0" } +sp-inherents = { default-features = false, version = "27.0.0" } +sp-offchain = { default-features = false, version = "27.0.0" } +sp-runtime = { default-features = false, version = "32.0.0" } +sp-session = { default-features = false, version = "28.0.0" } sp-std = { default-features = false, version = "14.0.0" } -sp-storage = { default-features = false, version = "19.0.0" } -sp-transaction-pool = { default-features = false, version = "26.0.0" } -sp-version = { default-features = false, version = "29.0.0" } +sp-storage = { default-features = false, version = "20.0.0" } +sp-transaction-pool = { default-features = false, version = "27.0.0" } +sp-version = { default-features = false, version = "30.0.0" } # Polkadot -xcm = { package = "staging-xcm", default-features = false, version = "7.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "7.0.3" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.3" } +xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.0" } # Cumulus -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.7.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.7.0" } -cumulus-primitives-core = { default-features = false , version = "0.7.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.7.0" } -parachains-common = { default-features = false , version = "7.0.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.8.0" } +cumulus-primitives-core = { default-features = false , version = "0.8.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.8.0" } +parachains-common = { default-features = false , version = "8.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } [build-dependencies] -substrate-wasm-builder = { version = "17.0.0" } +substrate-wasm-builder = { version = "18.0.0" } [features] default = [ "std" ] From 2d6d3ac530d00f3d7a2495ad24ec286d06113125 Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Wed, 14 Feb 2024 18:57:14 +0100 Subject: [PATCH 114/316] chore(xcm): Replace deprecated CurrencyAdapter with FungibleAdapter --- .../src/tests/reserve_transfer.rs | 4 ++-- .../asset-hub-kusama/src/tests/teleport.rs | 16 ++++++++-------- .../src/tests/reserve_transfer.rs | 4 ++-- .../asset-hub-polkadot/src/tests/teleport.rs | 16 ++++++++-------- integration-tests/emulated/common/src/macros.rs | 4 ++-- relay/kusama/src/xcm_config.rs | 8 ++------ relay/polkadot/src/xcm_config.rs | 8 ++------ .../asset-hub-kusama/src/xcm_config.rs | 8 ++------ .../asset-hub-polkadot/src/xcm_config.rs | 10 +++------- .../bridge-hub-kusama/src/xcm_config.rs | 10 +++------- .../bridge-hub-polkadot/src/xcm_config.rs | 10 +++------- .../collectives-polkadot/src/xcm_config.rs | 10 +++------- system-parachains/encointer/src/lib.rs | 2 +- 13 files changed, 41 insertions(+), 69 deletions(-) diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs index 8dabfba5b5..e99f9e422d 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs @@ -103,12 +103,12 @@ fn para_to_system_para_receiver_assertions(t: ParaToSystemParaTest) { vec![ // Amount to reserve transfer is withdrawn from Parachain's Sovereign account RuntimeEvent::Balances( - pallet_balances::Event::Withdraw { who, amount } + pallet_balances::Event::Burned { who, amount } ) => { who: *who == sov_penpal_on_ahr.clone().into(), amount: *amount == t.args.amount, }, - RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::Balances(pallet_balances::Event::Minted { .. }) => {}, RuntimeEvent::MessageQueue( pallet_message_queue::Event::Processed { success: true, .. } ) => {}, diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs index fdd6ed9081..b940c4e2eb 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs @@ -26,12 +26,12 @@ fn relay_origin_assertions(t: RelayToSystemParaTest) { Kusama, vec![ // Amount to teleport is withdrawn from Sender - RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { + RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => { who: *who == t.sender.account_id, amount: *amount == t.args.amount, }, // Amount to teleport is deposited in Relay's `CheckAccount` - RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, amount }) => { + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) => { who: *who == ::XcmPallet::check_account(), amount: *amount == t.args.amount, }, @@ -52,12 +52,12 @@ fn relay_dest_assertions(t: SystemParaToRelayTest) { Kusama, vec![ // Amount is withdrawn from Relay Chain's `CheckAccount` - RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { + RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => { who: *who == ::XcmPallet::check_account(), amount: *amount == t.args.amount, }, // Amount minus fees are deposited in Receiver's account - RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => { who: *who == t.receiver.account_id, }, ] @@ -86,7 +86,7 @@ fn para_origin_assertions(t: SystemParaToRelayTest) { AssetHubKusama, vec![ // Amount is withdrawn from Sender's account - RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { + RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => { who: *who == t.sender.account_id, amount: *amount == t.args.amount, }, @@ -103,7 +103,7 @@ fn para_dest_assertions(t: RelayToSystemParaTest) { AssetHubKusama, vec![ // Amount minus fees are deposited in Receiver's account - RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => { who: *who == t.receiver.account_id, }, ] @@ -146,12 +146,12 @@ fn penpal_to_ah_foreign_assets_receiver_assertions(t: ParaToSystemParaTest) { vec![ // native asset reserve transfer for paying fees, withdrawn from Penpal's sov account RuntimeEvent::Balances( - pallet_balances::Event::Withdraw { who, amount } + pallet_balances::Event::Burned { who, amount } ) => { who: *who == sov_penpal_on_ahr.clone().into(), amount: *amount == t.args.amount, }, - RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => { who: *who == t.receiver.account_id, }, RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, amount }) => { diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs index 89f79f9c96..e9fa92ff34 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs @@ -103,12 +103,12 @@ fn para_to_system_para_receiver_assertions(t: ParaToSystemParaTest) { vec![ // Amount to reserve transfer is withdrawn from Parachain's Sovereign account RuntimeEvent::Balances( - pallet_balances::Event::Withdraw { who, amount } + pallet_balances::Event::Burned { who, amount } ) => { who: *who == sov_penpal_on_ahr.clone().into(), amount: *amount == t.args.amount, }, - RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::Balances(pallet_balances::Event::Minted { .. }) => {}, RuntimeEvent::MessageQueue( pallet_message_queue::Event::Processed { success: true, .. } ) => {}, diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs index 69d7ffe7b9..ed49e09b9a 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs @@ -26,12 +26,12 @@ fn relay_origin_assertions(t: RelayToSystemParaTest) { Polkadot, vec![ // Amount to teleport is withdrawn from Sender - RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { + RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => { who: *who == t.sender.account_id, amount: *amount == t.args.amount, }, // Amount to teleport is deposited in Relay's `CheckAccount` - RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, amount }) => { + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) => { who: *who == ::XcmPallet::check_account(), amount: *amount == t.args.amount, }, @@ -52,12 +52,12 @@ fn relay_dest_assertions(t: SystemParaToRelayTest) { Polkadot, vec![ // Amount is withdrawn from Relay Chain's `CheckAccount` - RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { + RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => { who: *who == ::XcmPallet::check_account(), amount: *amount == t.args.amount, }, // Amount minus fees are deposited in Receiver's account - RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => { who: *who == t.receiver.account_id, }, ] @@ -86,7 +86,7 @@ fn para_origin_assertions(t: SystemParaToRelayTest) { AssetHubPolkadot, vec![ // Amount is withdrawn from Sender's account - RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => { + RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => { who: *who == t.sender.account_id, amount: *amount == t.args.amount, }, @@ -103,7 +103,7 @@ fn para_dest_assertions(t: RelayToSystemParaTest) { AssetHubPolkadot, vec![ // Amount minus fees are deposited in Receiver's account - RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => { who: *who == t.receiver.account_id, }, ] @@ -146,12 +146,12 @@ fn penpal_to_ah_foreign_assets_receiver_assertions(t: ParaToSystemParaTest) { vec![ // native asset reserve transfer for paying fees, withdrawn from Penpal's sov account RuntimeEvent::Balances( - pallet_balances::Event::Withdraw { who, amount } + pallet_balances::Event::Burned { who, amount } ) => { who: *who == sov_penpal_on_ahr.clone().into(), amount: *amount == t.args.amount, }, - RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => { who: *who == t.receiver.account_id, }, RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, amount }) => { diff --git a/integration-tests/emulated/common/src/macros.rs b/integration-tests/emulated/common/src/macros.rs index 8718f1e83a..ffcf2bc346 100644 --- a/integration-tests/emulated/common/src/macros.rs +++ b/integration-tests/emulated/common/src/macros.rs @@ -76,7 +76,7 @@ macro_rules! test_parachain_is_trusted_teleporter { $crate::macros::cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. } ) => {}, RuntimeEvent::Balances( - $crate::macros::pallet_balances::Event::Withdraw { who: sender, amount } + $crate::macros::pallet_balances::Event::Burned { who: sender, amount } ) => {}, ] ); @@ -90,7 +90,7 @@ macro_rules! test_parachain_is_trusted_teleporter { $receiver_para, vec![ RuntimeEvent::Balances( - $crate::macros::pallet_balances::Event::Deposit { who: receiver, .. } + $crate::macros::pallet_balances::Event::Minted { who: receiver, .. } ) => {}, RuntimeEvent::MessageQueue( $crate::macros::pallet_message_queue::Event::Processed { success: true, .. } diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index a188ba05a0..bd1ff9adb7 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -34,9 +34,6 @@ use runtime_common::{ }; use sp_core::ConstU32; use xcm::latest::prelude::*; -// TODO:(PR#159) change to FungibleAdapter -#[allow(deprecated)] -use xcm_builder::CurrencyAdapter as XcmCurrencyAdapter; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, @@ -44,7 +41,7 @@ use xcm_builder::{ HashedDescription, IsChildSystemParachain, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, + XcmFeeManagerFromComponents, XcmFeeToAccount, FungibleAdapter, }; parameter_types! { @@ -82,8 +79,7 @@ pub type SovereignAccountOf = ( /// point of view of XCM-only concepts like `MultiLocation` and `MultiAsset`. /// /// Ours is only aware of the Balances pallet, which is mapped to `TokenLocation`. -#[allow(deprecated)] -pub type LocalAssetTransactor = XcmCurrencyAdapter< +pub type LocalAssetTransactor = FungibleAdapter< // Use this currency: Balances, // Use this currency when it is a fungible asset matching the given location or name: diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index b4f22f1f9a..e202f5ba4b 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -39,9 +39,6 @@ use runtime_common::{ }; use sp_core::ConstU32; use xcm::latest::prelude::*; -// TODO:(PR#159) change to FungibleAdapter -#[allow(deprecated)] -use xcm_builder::CurrencyAdapter as XcmCurrencyAdapter; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, @@ -49,7 +46,7 @@ use xcm_builder::{ HashedDescription, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, + XcmFeeManagerFromComponents, XcmFeeToAccount, FungibleAdapter, }; parameter_types! { @@ -85,8 +82,7 @@ pub type SovereignAccountOf = ( /// of view of XCM-only concepts like `MultiLocation` and `MultiAsset`. /// /// Ours is only aware of the Balances pallet, which is mapped to `TokenLocation`. -#[allow(deprecated)] -pub type LocalAssetTransactor = XcmCurrencyAdapter< +pub type LocalAssetTransactor = FungibleAdapter< // Use this currency: Balances, // Use this currency when it is a fungible asset matching the given location or name: diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 56184ac579..a95383feb2 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -39,9 +39,6 @@ use polkadot_parachain_primitives::primitives::Sibling; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; -// TODO:(PR#159) change to FungibleAdapter -#[allow(deprecated)] -use xcm_builder::CurrencyAdapter; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, @@ -51,7 +48,7 @@ use xcm_builder::{ SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, - WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, + WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, FungibleAdapter, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -93,8 +90,7 @@ pub type LocationToAccountId = ( ); /// Means for transacting the native currency on this chain. -#[allow(deprecated)] -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: diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 78ee9736fa..f2a15296fb 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -39,9 +39,6 @@ use polkadot_runtime_constants::system_parachain; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; -// TODO:(PR#159) change to FungibleAdapter -#[allow(deprecated)] -use xcm_builder::CurrencyAdapter; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, @@ -51,7 +48,7 @@ use xcm_builder::{ SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, - WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, + WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, FungibleAdapter, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -89,8 +86,7 @@ pub type LocationToAccountId = ( ); /// Means for transacting the native currency on this chain. -#[allow(deprecated)] -pub type CurrencyTransactor = CurrencyAdapter< +pub type FungibleTransactor = FungibleAdapter< // Use this currency: Balances, // Use this currency when it is a fungible asset matching the given location or name: @@ -156,7 +152,7 @@ pub type ForeignFungiblesTransactor = FungiblesAdapter< >; /// Means for transacting assets on this chain. -pub type AssetTransactors = (CurrencyTransactor, FungiblesTransactor, ForeignFungiblesTransactor); +pub type AssetTransactors = (FungibleTransactor, FungiblesTransactor, ForeignFungiblesTransactor); /// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, /// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 1d1ea27d7f..a8cce05d61 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -37,9 +37,6 @@ use polkadot_parachain_primitives::primitives::Sibling; use sp_runtime::traits::AccountIdConversion; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; -// TODO:(PR#159) change to FungibleAdapter -#[allow(deprecated)] -use xcm_builder::CurrencyAdapter; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, @@ -48,7 +45,7 @@ use xcm_builder::{ SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, + XcmFeeManagerFromComponents, XcmFeeToAccount, FungibleAdapter, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -81,8 +78,7 @@ pub type LocationToAccountId = ( ); /// Means for transacting the native currency on this chain. -#[allow(deprecated)] -pub type CurrencyTransactor = CurrencyAdapter< +pub type FungibleTransactor = FungibleAdapter< // Use this currency: Balances, // Use this currency when it is a fungible asset matching the given location or name: @@ -256,7 +252,7 @@ pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; - type AssetTransactor = CurrencyTransactor; + type AssetTransactor = FungibleTransactor; type OriginConverter = XcmOriginToTransactDispatchOrigin; // BridgeHub does not recognize a reserve location for any asset. Users must teleport KSM // where allowed (e.g. with the Relay Chain). diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index b09f5b4648..7a533be7a2 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -37,9 +37,6 @@ use polkadot_runtime_constants::system_parachain; use sp_runtime::traits::AccountIdConversion; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; -// TODO:(PR#159) change to FungibleAdapter -#[allow(deprecated)] -use xcm_builder::CurrencyAdapter; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, @@ -48,7 +45,7 @@ use xcm_builder::{ SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, + XcmFeeManagerFromComponents, XcmFeeToAccount, FungibleAdapter, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -81,8 +78,7 @@ pub type LocationToAccountId = ( ); /// Means for transacting the native currency on this chain. -#[allow(deprecated)] -pub type CurrencyTransactor = CurrencyAdapter< +pub type FungibleTransactor = FungibleAdapter< // Use this currency: Balances, // Use this currency when it is a fungible asset matching the given location or name: @@ -263,7 +259,7 @@ pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; - type AssetTransactor = CurrencyTransactor; + type AssetTransactor = FungibleTransactor; type OriginConverter = XcmOriginToTransactDispatchOrigin; // BridgeHub does not recognize a reserve location for any asset. Users must teleport DOT // where allowed (e.g. with the Relay Chain). diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index f870565cd7..4971126944 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -34,9 +34,6 @@ use polkadot_runtime_constants::{system_parachain, xcm as xcm_constants}; use sp_runtime::traits::AccountIdConversion; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; -// TODO:(PR#159) change to FungibleAdapter -#[allow(deprecated)] -use xcm_builder::CurrencyAdapter; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, @@ -46,7 +43,7 @@ use xcm_builder::{ SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, - XcmFeeToAccount, + XcmFeeToAccount, FungibleAdapter, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -81,8 +78,7 @@ pub type LocationToAccountId = ( ); /// Means for transacting the native currency on this chain. -#[allow(deprecated)] -pub type CurrencyTransactor = CurrencyAdapter< +pub type FungibleTransactor = FungibleAdapter< // Use this currency: Balances, // Use this currency when it is a fungible asset matching the given location or name: @@ -287,7 +283,7 @@ pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; - type AssetTransactor = CurrencyTransactor; + type AssetTransactor = FungibleTransactor; type OriginConverter = XcmOriginToTransactDispatchOrigin; // Collectives does not recognize a reserve location for any asset. Users must teleport DOT // where allowed (e.g. with the Relay Chain). diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index eb04d4753d..a84583643b 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -77,7 +77,7 @@ pub use parachains_common::{ }; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use sp_api::impl_runtime_apis; -use sp_core::{crypto::KeyTypeId, ConstU32, OpaqueMetadata}; +use sp_core::{crypto::KeyTypeId, ConstU32, ConstU64, OpaqueMetadata}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; use sp_runtime::{ From 182a1895e14f9385bef6015049fcf07665a14840 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 15 Feb 2024 10:29:11 +0200 Subject: [PATCH 115/316] adds missing deps --- Cargo.lock | 2751 ++++++++++++++++- .../bridge-hub-polkadot/Cargo.toml | 12 + 2 files changed, 2630 insertions(+), 133 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aa1e3b9fae..5f430d82eb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -110,6 +110,77 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +[[package]] +name = "alloy-primitives" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0628ec0ba5b98b3370bb6be17b12f23bfce8ee4ad83823325a20546d9b03b78" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "proptest", + "rand 0.8.5", + "ruint", + "serde", + "tiny-keccak", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" +dependencies = [ + "alloy-rlp-derive", + "arrayvec 0.7.4", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a98ad1696a2e17f010ae8e43e9f2a1e930ed176a8e3ff77acfeff6dfb07b42c" +dependencies = [ + "const-hex", + "dunce", + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.48", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-types" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98d7107bed88e8f09f0ddcc3335622d87bfb6821f3e0c7473329fb1cfad5e015" +dependencies = [ + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + [[package]] name = "android-tzdata" version = "0.1.1" @@ -211,6 +282,20 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "aquamarine" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" +dependencies = [ + "include_dir", + "itertools 0.10.5", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "ark-bls12-377" version = "0.4.0" @@ -218,8 +303,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" dependencies = [ "ark-ec", - "ark-ff", - "ark-std", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -229,9 +314,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" dependencies = [ "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -240,10 +325,10 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" dependencies = [ - "ark-ff", + "ark-ff 0.4.2", "ark-poly", - "ark-serialize", - "ark-std", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", "itertools 0.10.5", @@ -251,16 +336,34 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + [[package]] name = "ark-ff" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "digest 0.10.7", "itertools 0.10.5", @@ -271,6 +374,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-asm" version = "0.4.2" @@ -281,6 +394,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-macros" version = "0.4.2" @@ -300,13 +425,23 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", ] +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + [[package]] name = "ark-serialize" version = "0.4.2" @@ -314,7 +449,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ "ark-serialize-derive", - "ark-std", + "ark-std 0.4.0", "digest 0.10.7", "num-bigint", ] @@ -330,6 +465,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + [[package]] name = "ark-std" version = "0.4.0" @@ -425,7 +570,7 @@ dependencies = [ "emulated-chains", "frame-support 27.0.0", "integration-tests-common", - "pallet-asset-conversion", + "pallet-asset-conversion 9.0.0", "pallet-assets 28.0.0", "pallet-balances 27.0.0", "pallet-message-queue 30.0.0", @@ -445,7 +590,7 @@ name = "asset-hub-kusama-runtime" version = "1.0.0" dependencies = [ "asset-test-utils", - "assets-common", + "assets-common 0.8.0", "bp-asset-hub-kusama", "bp-asset-hub-polkadot", "bp-bridge-hub-kusama", @@ -468,7 +613,7 @@ dependencies = [ "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-conversion", + "pallet-asset-conversion 9.0.0", "pallet-asset-conversion-tx-payment", "pallet-assets 28.0.0", "pallet-aura 26.0.0", @@ -488,18 +633,19 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api 27.0.0", "pallet-uniques", "pallet-utility 27.0.0", - "pallet-xcm 6.0.0", - "pallet-xcm-benchmarks 6.0.2", + "pallet-xcm 4.0.0", + "pallet-xcm-benchmarks 4.0.1", "pallet-xcm-bridge-hub-router", "parachains-common 6.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-core-primitives 6.0.0", - "polkadot-parachain-primitives 5.0.0", - "polkadot-runtime-common 6.0.0", + "polkadot-core-primitives 4.0.0", + "polkadot-parachain-primitives 3.0.0", + "polkadot-runtime-common 4.0.0", "polkadot-runtime-constants", "primitive-types", "scale-info", + "snowbridge-router-primitives", "sp-api 25.0.0", "sp-block-builder 25.0.0", "sp-consensus-aura 0.31.0", @@ -516,9 +662,9 @@ dependencies = [ "sp-version 28.0.0", "sp-weights 26.0.0", "staging-parachain-info 0.6.0", - "staging-xcm 6.0.0", - "staging-xcm-builder 6.0.2", - "staging-xcm-executor 6.0.2", + "staging-xcm 4.0.0", + "staging-xcm-builder 4.0.1", + "staging-xcm-executor 4.0.2", "substrate-wasm-builder 16.0.0", "system-parachains-constants", ] @@ -551,7 +697,7 @@ name = "asset-hub-polkadot-runtime" version = "1.0.0" dependencies = [ "asset-test-utils", - "assets-common", + "assets-common 0.8.0", "bp-asset-hub-kusama", "bp-asset-hub-polkadot", "bp-bridge-hub-kusama", @@ -602,6 +748,8 @@ dependencies = [ "polkadot-runtime-common 6.0.0", "polkadot-runtime-constants", "scale-info", + "smallvec", + "snowbridge-router-primitives", "sp-api 25.0.0", "sp-block-builder 25.0.0", "sp-consensus-aura 0.31.0", @@ -631,7 +779,7 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e667143b26882e0f67cf028814d46f92671655085e47604cc0e0b62579fee24" dependencies = [ - "assets-common", + "assets-common 0.6.0", "cumulus-pallet-parachain-system 0.6.0", "cumulus-pallet-xcmp-queue 0.6.0", "cumulus-primitives-core 0.6.0", @@ -671,7 +819,7 @@ dependencies = [ "frame-support 27.0.0", "impl-trait-for-tuples", "log", - "pallet-asset-conversion", + "pallet-asset-conversion 9.0.0", "pallet-asset-tx-payment 27.0.0", "pallet-xcm 6.0.0", "parachains-common 6.0.0", @@ -686,6 +834,30 @@ dependencies = [ "substrate-wasm-builder 16.0.0", ] +[[package]] +name = "assets-common" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65e90021d772c2dd82d45fd085e05a2cb5866464d4c7421ac6a8007733b350bb" +dependencies = [ + "cumulus-primitives-core 0.8.0", + "frame-support 29.0.0", + "impl-trait-for-tuples", + "log", + "pallet-asset-conversion 11.0.0", + "pallet-xcm 8.0.0", + "parachains-common 8.0.0", + "parity-scale-codec", + "scale-info", + "sp-api 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", + "substrate-wasm-builder 18.0.0", +] + [[package]] name = "async-channel" version = "1.9.0" @@ -771,6 +943,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "auto_impl" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "823b8bb275161044e2ac7a25879cb3e2480cb403e3943022c7c769c599b756aa" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -884,6 +1067,21 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitcoin_hashes" version = "0.11.0" @@ -1022,6 +1220,18 @@ dependencies = [ "serde", ] +[[package]] +name = "bounded-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32385ecb91a31bddaf908e8dcf4a15aef1bcd3913cc03ebfad02ff6d568abc1" +dependencies = [ + "log", + "parity-scale-codec", + "scale-info", + "serde", +] + [[package]] name = "bounded-vec" version = "0.7.1" @@ -1063,7 +1273,7 @@ checksum = "4d76abad1eafb53d1377365c3004456bb61abb5795d06498323770c5647290a2" dependencies = [ "bp-messages", "bp-polkadot-core", - "bp-runtime", + "bp-runtime 0.6.0", "frame-support 27.0.0", "frame-system 27.0.0", "polkadot-primitives 6.0.0", @@ -1077,7 +1287,7 @@ version = "1.0.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", - "bp-runtime", + "bp-runtime 0.6.0", "frame-support 27.0.0", "kusama-runtime-constants", "polkadot-runtime-constants", @@ -1092,7 +1302,7 @@ version = "1.0.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", - "bp-runtime", + "bp-runtime 0.6.0", "frame-support 27.0.0", "kusama-runtime-constants", "polkadot-runtime-constants", @@ -1107,7 +1317,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0135eafdf5d8ee896e875c7f403417b7e8c1a60794daa03ea8d4614ad11bc2e" dependencies = [ - "bp-runtime", + "bp-runtime 0.6.0", "finality-grandpa", "frame-support 27.0.0", "parity-scale-codec", @@ -1127,7 +1337,7 @@ checksum = "f8c318068ab7f4d07cf122d4227a7951be7007b70029f160885b86527d3c1d64" dependencies = [ "bp-header-chain", "bp-polkadot-core", - "bp-runtime", + "bp-runtime 0.6.0", "frame-support 27.0.0", "sp-api 25.0.0", "sp-std 13.0.0", @@ -1140,7 +1350,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ba0e3d7c760f6121f93286f4cbee7fa50c86a6b5a230b3b357bc81e5c1826d9" dependencies = [ "bp-header-chain", - "bp-runtime", + "bp-runtime 0.6.0", "frame-support 27.0.0", "parity-scale-codec", "scale-info", @@ -1157,7 +1367,7 @@ checksum = "b615d01bc99346daa91aea18c18bb7edfca5d29ab5730d04060753d5b59afc73" dependencies = [ "bp-header-chain", "bp-polkadot-core", - "bp-runtime", + "bp-runtime 0.6.0", "frame-support 27.0.0", "impl-trait-for-tuples", "parity-scale-codec", @@ -1175,7 +1385,7 @@ checksum = "d1af8ed56bc7dddc4a3b30ca1568cf406df77ed0b883e0c55e21917b2396460e" dependencies = [ "bp-header-chain", "bp-polkadot-core", - "bp-runtime", + "bp-runtime 0.6.0", "frame-support 27.0.0", "sp-api 25.0.0", "sp-std 13.0.0", @@ -1188,7 +1398,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eca2fa4991db1c5bf9f8ec4c5e0e320a19e76cfe197f850d353f3abae84ae98a" dependencies = [ "bp-messages", - "bp-runtime", + "bp-runtime 0.6.0", "frame-support 27.0.0", "frame-system 27.0.0", "parity-scale-codec", @@ -1207,7 +1417,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4736fdf102aca9ff3e656905557427668e0f339d8b0702b245d354eba63c7186" dependencies = [ "bp-messages", - "bp-runtime", + "bp-runtime 0.6.0", "frame-support 27.0.0", "parity-scale-codec", "scale-info", @@ -1239,6 +1449,30 @@ dependencies = [ "trie-db", ] +[[package]] +name = "bp-runtime" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b29668fffbc3e4a7ad789b498424ed6d8a313f93544a090bbaaef8a1f7fd243" +dependencies = [ + "frame-support 29.0.0", + "frame-system 29.0.0", + "hash-db", + "impl-trait-for-tuples", + "log", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", + "sp-std 14.0.0", + "sp-trie 30.0.0", + "trie-db", +] + [[package]] name = "bp-test-utils" version = "0.6.0" @@ -1248,7 +1482,7 @@ dependencies = [ "bp-header-chain", "bp-parachains", "bp-polkadot-core", - "bp-runtime", + "bp-runtime 0.6.0", "ed25519-dalek", "finality-grandpa", "parity-scale-codec", @@ -1293,6 +1527,24 @@ dependencies = [ "sp-runtime 30.0.1", ] +[[package]] +name = "bridge-hub-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e69c25ec3db0ef22ae409cc60f5c42364124264ce6640e17dbcfc0280e4b5dd9" +dependencies = [ + "cumulus-primitives-core 0.8.0", + "frame-support 29.0.0", + "pallet-message-queue 32.0.0", + "parity-scale-codec", + "scale-info", + "snowbridge-core", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", +] + [[package]] name = "bridge-hub-kusama-runtime" version = "1.0.0" @@ -1308,7 +1560,8 @@ dependencies = [ "bp-polkadot", "bp-polkadot-core", "bp-relayers", - "bp-runtime", + "bp-runtime 0.6.0", + "bridge-hub-common", "bridge-hub-test-utils", "bridge-runtime-common", "cumulus-pallet-aura-ext 0.6.0", @@ -1355,6 +1608,16 @@ dependencies = [ "polkadot-runtime-constants", "scale-info", "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-runtime-common", + "snowbridge-system-runtime-api", "sp-api 25.0.0", "sp-block-builder 25.0.0", "sp-consensus-aura 0.31.0", @@ -1394,7 +1657,8 @@ dependencies = [ "bp-polkadot", "bp-polkadot-core", "bp-relayers", - "bp-runtime", + "bp-runtime 0.6.0", + "bridge-hub-common", "bridge-hub-test-utils", "bridge-runtime-common", "cumulus-pallet-aura-ext 0.6.0", @@ -1441,6 +1705,16 @@ dependencies = [ "polkadot-runtime-constants", "scale-info", "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-runtime-common", + "snowbridge-system-runtime-api", "sp-api 25.0.0", "sp-block-builder 25.0.0", "sp-consensus-aura 0.31.0", @@ -1477,7 +1751,7 @@ dependencies = [ "bp-parachains", "bp-polkadot-core", "bp-relayers", - "bp-runtime", + "bp-runtime 0.6.0", "bp-test-utils", "bridge-runtime-common", "cumulus-pallet-parachain-system 0.6.0", @@ -1522,7 +1796,7 @@ dependencies = [ "bp-parachains", "bp-polkadot-core", "bp-relayers", - "bp-runtime", + "bp-runtime 0.6.0", "bp-xcm-bridge-hub", "bp-xcm-bridge-hub-router 0.5.0", "frame-support 27.0.0", @@ -2007,15 +2281,28 @@ dependencies = [ [[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-hex" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d59688ad0945eaf6b84cb44fedbe93484c81b48970e98f09db8a22832d7961" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", ] [[package]] @@ -2490,7 +2777,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bc86fdc17ef11f9adcd7565a4238107a3538426990fa4ffed8e6dc1d40582a2" dependencies = [ - "proc-macro-crate 2.0.1", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 2.0.48", @@ -2576,7 +2863,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9eda7f0f2644ef02fa18054a483650dfd7085caad7137221cbc05747c13ad7d7" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "bp-xcm-bridge-hub-router 0.5.0", "cumulus-primitives-core 0.6.0", "frame-benchmarking 27.0.0", @@ -2632,6 +2919,24 @@ dependencies = [ "staging-xcm 6.0.0", ] +[[package]] +name = "cumulus-primitives-core" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9df07f6825fd50ea30aae335e43dc1a615a05de7465f5f329b9e414f2c886a12" +dependencies = [ + "parity-scale-codec", + "polkadot-core-primitives 8.0.0", + "polkadot-parachain-primitives 7.0.0", + "polkadot-primitives 8.0.0", + "scale-info", + "sp-api 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-trie 30.0.0", + "staging-xcm 8.0.0", +] + [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.4.0" @@ -2747,6 +3052,28 @@ dependencies = [ "staging-xcm-executor 6.0.2", ] +[[package]] +name = "cumulus-primitives-utility" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "610400dd0bbafde20db3dfccc50540f7ace05e169d93acce2b86008984ea70f7" +dependencies = [ + "cumulus-primitives-core 0.8.0", + "frame-support 29.0.0", + "log", + "pallet-asset-conversion 11.0.0", + "pallet-xcm-benchmarks 8.0.0", + "parity-scale-codec", + "polkadot-runtime-common 8.0.0", + "polkadot-runtime-parachains 8.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + [[package]] name = "cumulus-relay-chain-interface" version = "0.4.0" @@ -3119,7 +3446,7 @@ dependencies = [ "regex", "syn 2.0.48", "termcolor", - "toml 0.8.2", + "toml 0.8.10", "walkdir", ] @@ -3135,6 +3462,12 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + [[package]] name = "dyn-clonable" version = "0.9.0" @@ -3527,6 +3860,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "ethabi-decode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d398648d65820a727d6a81e58b962f874473396a047e4c30bafe3240953417" +dependencies = [ + "ethereum-types", + "tiny-keccak", +] + [[package]] name = "ethbloom" version = "0.13.0" @@ -3535,8 +3878,10 @@ checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", + "scale-info", "tiny-keccak", ] @@ -3548,9 +3893,11 @@ checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ "ethbloom", "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", "primitive-types", + "scale-info", "uint", ] @@ -3633,6 +3980,17 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec 0.7.4", + "auto_impl", + "bytes", +] + [[package]] name = "fatality" version = "0.0.6" @@ -3852,24 +4210,62 @@ dependencies = [ ] [[package]] -name = "frame-election-provider-solution-type" -version = "12.0.0" +name = "frame-benchmarking" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03911cf3675af64252a6de7b4f383eafa80d5ea5830184e7a0739aeb0b95272d" +checksum = "4090659c6aaa3c4d5b6c6ec909b4b0a25dec10ad92aad5f729efa8d5bd4d806a" dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] + "frame-support 29.0.0", + "frame-support-procedural 24.0.0", + "frame-system 29.0.0", + "linregress", + "log", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-runtime-interface 25.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "static_assertions", +] + +[[package]] +name = "frame-election-provider-solution-type" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03911cf3675af64252a6de7b4f383eafa80d5ea5830184e7a0739aeb0b95272d" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "frame-election-provider-solution-type" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5c3bff645e46577c69c272733c53fa3a77d1ee6e40dfb66157bc94b0740b8fc" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] name = "frame-election-provider-support" version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebad507fb038db2f7ce982d30bd9828a59785c9a4780348d59cd6cceaee80d1a" dependencies = [ - "frame-election-provider-solution-type", + "frame-election-provider-solution-type 12.0.0", "frame-support 25.0.0", "frame-system 25.0.0", "parity-scale-codec", @@ -3887,7 +4283,7 @@ version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d26d8dabf04394bb59a44e41664984289c2b5b28d565193fac49695db846f167" dependencies = [ - "frame-election-provider-solution-type", + "frame-election-provider-solution-type 12.0.0", "frame-support 27.0.0", "frame-system 27.0.0", "parity-scale-codec", @@ -3899,6 +4295,24 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "frame-election-provider-support" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87da19ee99e6473cd057ead84337d20011fe5e299c6750e88e43b8b7963b8852" +dependencies = [ + "frame-election-provider-solution-type 13.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "parity-scale-codec", + "scale-info", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-npos-elections 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "frame-executive" version = "25.0.0" @@ -3977,7 +4391,7 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "023504bbdd0e8d1ebe3d9d289b009337cdb9a24c5e74615ffd7b188aa1664c2d" dependencies = [ - "aquamarine", + "aquamarine 0.3.2", "bitflags 1.3.2", "docify", "environmental", @@ -4018,7 +4432,7 @@ version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "654f8001ac929387a460ed2b1dd9ef70af81221ef2b3519bf4c91ecef88f68e4" dependencies = [ - "aquamarine", + "aquamarine 0.3.2", "array-bytes 6.2.2", "bitflags 1.3.2", "docify", @@ -4054,6 +4468,48 @@ dependencies = [ "tt-call", ] +[[package]] +name = "frame-support" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3b24824d29c43d0af94be3356bbf30338ededed649f6841d315a9ae067ce872" +dependencies = [ + "aquamarine 0.5.0", + "array-bytes 6.2.2", + "bitflags 1.3.2", + "docify", + "environmental", + "frame-metadata", + "frame-support-procedural 24.0.0", + "impl-trait-for-tuples", + "k256", + "log", + "macro_magic", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "serde_json", + "smallvec", + "sp-api 27.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-crypto-hashing-proc-macro", + "sp-debug-derive 14.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-metadata-ir 0.6.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", + "sp-state-machine 0.36.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", + "sp-weights 28.0.0", + "static_assertions", + "tt-call", +] + [[package]] name = "frame-support-procedural" version = "20.0.0" @@ -4064,7 +4520,7 @@ dependencies = [ "cfg-expr", "derive-syn-parse", "expander 2.0.0", - "frame-support-procedural-tools", + "frame-support-procedural-tools 9.0.0", "itertools 0.10.5", "macro_magic", "proc-macro-warning", @@ -4084,7 +4540,7 @@ dependencies = [ "cfg-expr", "derive-syn-parse", "expander 2.0.0", - "frame-support-procedural-tools", + "frame-support-procedural-tools 9.0.0", "itertools 0.10.5", "macro_magic", "proc-macro-warning", @@ -4094,19 +4550,52 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "frame-support-procedural" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bf1d648c4007d421b9677b3c893256913498fff159dc2d85022cdd9cc432f3c" +dependencies = [ + "Inflector", + "cfg-expr", + "derive-syn-parse", + "expander 2.0.0", + "frame-support-procedural-tools 10.0.0", + "itertools 0.10.5", + "macro_magic", + "proc-macro-warning", + "proc-macro2", + "quote", + "sp-crypto-hashing", + "syn 2.0.48", +] + [[package]] name = "frame-support-procedural-tools" version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3ac1266522a8c9a2d2d26d205ec3028b88582d5f3cd5cbc75d0ec8271d197b7" dependencies = [ - "frame-support-procedural-tools-derive", + "frame-support-procedural-tools-derive 10.0.0", "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.48", ] +[[package]] +name = "frame-support-procedural-tools" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3363df38464c47a73eb521a4f648bfcc7537a82d70347ef8af3f73b6d019e910" +dependencies = [ + "frame-support-procedural-tools-derive 11.0.0", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "frame-support-procedural-tools-derive" version = "10.0.0" @@ -4118,6 +4607,17 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "frame-support-procedural-tools-derive" +version = "11.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68672b9ec6fe72d259d3879dc212c5e42e977588cdac830c76f54d9f492aeb58" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "frame-system" version = "25.0.0" @@ -4159,6 +4659,27 @@ dependencies = [ "sp-weights 26.0.0", ] +[[package]] +name = "frame-system" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bc20a793c3cec0b11165c1075fe11a255b2491f3eef8230bb3073cb296e7383" +dependencies = [ + "cfg-if", + "docify", + "frame-support 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-version 30.0.0", + "sp-weights 28.0.0", +] + [[package]] name = "frame-system-benchmarking" version = "25.0.0" @@ -4430,6 +4951,16 @@ dependencies = [ "wasi 0.11.0+wasi-snapshot-preview1", ] +[[package]] +name = "getrandom_or_panic" +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.5.0" @@ -6115,6 +6646,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + [[package]] name = "mick-jaeger" version = "0.1.8" @@ -6685,7 +7228,7 @@ dependencies = [ "frame-system 27.0.0", "log", "pallet-collective 27.0.0", - "pallet-identity", + "pallet-identity 27.0.0", "parity-scale-codec", "scale-info", "sp-core 27.0.0", @@ -6714,6 +7257,25 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-asset-conversion" +version = "11.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4079f12db3cf98daa717337ab5b7e5ef15aa3bec3b497f501dc715d129b500da" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "parity-scale-codec", + "scale-info", + "sp-api 27.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-asset-conversion-tx-payment" version = "9.0.0" @@ -6722,7 +7284,7 @@ checksum = "80810624ea3a3bab34568a45c7abca5777d60ed6312e271d04893ee5e69e002e" dependencies = [ "frame-support 27.0.0", "frame-system 27.0.0", - "pallet-asset-conversion", + "pallet-asset-conversion 9.0.0", "pallet-transaction-payment 27.0.0", "parity-scale-codec", "scale-info", @@ -6762,6 +7324,22 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-asset-rate" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "571ce57fd846911041749832b46a8c2b01f0b79ffebcd7585e3973865607036d" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "parity-scale-codec", + "scale-info", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-asset-tx-payment" version = "25.0.0" @@ -6800,6 +7378,25 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-asset-tx-payment" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed783679921ad8b96807d683d320c314e305753b230d5c04dc713bab7aca64c" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "pallet-transaction-payment 29.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-assets" version = "26.0.0" @@ -6834,6 +7431,23 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-assets" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46728a98a910af13f6a77033dd053456650773bb7adc71e0ba845bff7e31b33e" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-aura" version = "24.0.0" @@ -6904,6 +7518,23 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-authority-discovery" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "904f83f518b396c4fd1634fb675a36db0841f22420d3aa664bc154bee6035f57" +dependencies = [ + "frame-support 29.0.0", + "frame-system 29.0.0", + "pallet-session 29.0.0", + "parity-scale-codec", + "scale-info", + "sp-application-crypto 31.0.0", + "sp-authority-discovery 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-authorship" version = "25.0.0" @@ -6934,6 +7565,21 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-authorship" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d83773e731a1760f99684b09961ed7b92acafe335f36f08ebb8313d3b9c72e2" +dependencies = [ + "frame-support 29.0.0", + "frame-system 29.0.0", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-babe" version = "25.0.0" @@ -6984,13 +7630,38 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-babe" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3f2020c52667a650d64e84a4bbb63388e25bc1c9bc872a8243d03bfcb285049" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "pallet-authorship 29.0.0", + "pallet-session 29.0.0", + "pallet-timestamp 28.0.0", + "parity-scale-codec", + "scale-info", + "sp-application-crypto 31.0.0", + "sp-consensus-babe 0.33.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-staking 27.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-bags-list" version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46d48f60b6da70607edc794cc05e72ae70ea532ec539094ffcc4c7c9250a453b" dependencies = [ - "aquamarine", + "aquamarine 0.3.2", "docify", "frame-benchmarking 27.0.0", "frame-election-provider-support 27.0.0", @@ -7039,6 +7710,23 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-balances" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "942007f4f7aace74b77009db1675e7ca98683a42dde5e2d85bba2a9f404d2e5a" +dependencies = [ + "docify", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-beefy" version = "27.0.0" @@ -7112,7 +7800,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17d6a612927f39c3a92a426fe0d226cc17b2bc8b60122e767d186d5e210ed12a" dependencies = [ "bp-header-chain", - "bp-runtime", + "bp-runtime 0.6.0", "bp-test-utils", "finality-grandpa", "frame-benchmarking 27.0.0", @@ -7134,7 +7822,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cfc14baf0e65041a2cf9874c08d3e82212fe5d10f6a3ac1d0f40fcffac188f" dependencies = [ "bp-messages", - "bp-runtime", + "bp-runtime 0.6.0", "frame-benchmarking 27.0.0", "frame-support 27.0.0", "frame-system 27.0.0", @@ -7155,7 +7843,7 @@ dependencies = [ "bp-header-chain", "bp-parachains", "bp-polkadot-core", - "bp-runtime", + "bp-runtime 0.6.0", "frame-benchmarking 27.0.0", "frame-support 27.0.0", "frame-system 27.0.0", @@ -7176,7 +7864,7 @@ checksum = "273095478c3a09de73b7a01db3b2f938070621bc47e92cbbdadd31b7ba73f94c" dependencies = [ "bp-messages", "bp-relayers", - "bp-runtime", + "bp-runtime 0.6.0", "frame-benchmarking 27.0.0", "frame-support 27.0.0", "frame-system 27.0.0", @@ -7189,6 +7877,24 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-broker" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd8cfe04e8c3f9ca8342ac785f2b1aee6140e1809546fc6f3a99fad20a8dfbf9" +dependencies = [ + "bitvec", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "parity-scale-codec", + "scale-info", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-child-bounties" version = "26.0.0" @@ -7249,6 +7955,26 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-collator-selection" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59b5ad46601c613396e92292a24c5b5d76e904c456ece9deb10913f6ea2e2999" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "pallet-authorship 29.0.0", + "pallet-session 29.0.0", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-collective" version = "25.0.0" @@ -7389,6 +8115,30 @@ dependencies = [ "strum", ] +[[package]] +name = "pallet-election-provider-multi-phase" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b54d1d3fe9ae61a144d581147e699b7c3009169de0019a0f87cca0bed82681e7" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "pallet-election-provider-support-benchmarking 28.0.0", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-npos-elections 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "strum", +] + [[package]] name = "pallet-election-provider-support-benchmarking" version = "24.0.0" @@ -7419,6 +8169,21 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-election-provider-support-benchmarking" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46ec87816a1e32a1ab6deececa99e21e6684b111efe87b11b8298328dbbefd01" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-system 29.0.0", + "parity-scale-codec", + "sp-npos-elections 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-elections-phragmen" version = "28.0.0" @@ -7663,10 +8428,30 @@ dependencies = [ ] [[package]] -name = "pallet-glutton" -version = "13.0.0" +name = "pallet-fast-unstake" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26571660041ba596c43ee71992be20950e80d71f4199dfa8e57691a6757e20e9" +checksum = "2222607a0dba10a9d57cab5360a6549b5fda925181c3c7af481246c0964998df" +dependencies = [ + "docify", + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", + "sp-std 14.0.0", +] + +[[package]] +name = "pallet-glutton" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26571660041ba596c43ee71992be20950e80d71f4199dfa8e57691a6757e20e9" dependencies = [ "blake2 0.10.6", "frame-benchmarking 27.0.0", @@ -7722,6 +8507,24 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-identity" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9e1cae19e30e7dc822c419988b30bb1318d79a8d5da92733822d0e84fe760ca" +dependencies = [ + "enumflags2", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-im-online" version = "26.0.0" @@ -7852,6 +8655,27 @@ dependencies = [ "sp-weights 26.0.0", ] +[[package]] +name = "pallet-message-queue" +version = "32.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ccb23dee70b184a214d729db550117a0965a69107d466d35181d60a6feede38" +dependencies = [ + "environmental", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-weights 28.0.0", +] + [[package]] name = "pallet-mmr" version = "26.0.0" @@ -8181,6 +9005,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3508a51d359c6640577feead9dc00667f38cec385baad77b636c61ff746ffe24" dependencies = [ "docify", + "frame-benchmarking 25.0.0", "frame-support 25.0.0", "frame-system 25.0.0", "log", @@ -8257,6 +9082,29 @@ dependencies = [ "sp-trie 28.0.0", ] +[[package]] +name = "pallet-session" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7412ac59247b300feee53709f7009a23d1c6f8c70528599f48f44e102d896d03" +dependencies = [ + "frame-support 29.0.0", + "frame-system 29.0.0", + "impl-trait-for-tuples", + "log", + "pallet-timestamp 28.0.0", + "parity-scale-codec", + "scale-info", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-staking 27.0.0", + "sp-state-machine 0.36.0", + "sp-std 14.0.0", + "sp-trie 30.0.0", +] + [[package]] name = "pallet-session-benchmarking" version = "27.0.0" @@ -8342,6 +9190,30 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-staking" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a94127295cf027a26e933ea6788b0824e9fedd90740013673e2d36b5d707efe" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "pallet-authorship 29.0.0", + "pallet-session 29.0.0", + "parity-scale-codec", + "rand_chacha 0.2.2", + "scale-info", + "serde", + "sp-application-crypto 31.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-staking-reward-curve" version = "10.0.0" @@ -8374,6 +9246,16 @@ dependencies = [ "sp-arithmetic 22.0.0", ] +[[package]] +name = "pallet-staking-reward-fn" +version = "20.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "505d45e08bad052f55fb51f00a6b6244d23ee46ffdc8091f6cddf4e3a880319d" +dependencies = [ + "log", + "sp-arithmetic 24.0.0", +] + [[package]] name = "pallet-staking-runtime-api" version = "13.0.0" @@ -8462,6 +9344,27 @@ dependencies = [ "sp-timestamp 25.0.0", ] +[[package]] +name = "pallet-timestamp" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1b8810ddfb254c7fb8cd7698229cce513d309a43ff117b38798dae6120f477b" +dependencies = [ + "docify", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "sp-timestamp 27.0.0", +] + [[package]] name = "pallet-tips" version = "26.0.0" @@ -8516,6 +9419,23 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-transaction-payment" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39f690f5c287ad34b28ca951ef7fae80b08cc9218d970723b7a70e4d29396872" +dependencies = [ + "frame-support 29.0.0", + "frame-system 29.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "25.0.0" @@ -8582,6 +9502,26 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-treasury" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1605eb5083a2cd172544f33c6e59eca2e23ac49f02f13d1562b1b8a409df9c60" +dependencies = [ + "docify", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "impl-trait-for-tuples", + "pallet-balances 29.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-uniques" version = "27.0.0" @@ -8664,6 +9604,22 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-vesting" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4525f3038cdf078fea39d913c563ca626f09a615e7724f0c9eac97743c75ff44" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-whitelist" version = "26.0.0" @@ -8686,7 +9642,7 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04d5e5404d9dadb39390949aadc2c641c16ce4cb0f47ed7a7ff584ab914c2984" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "frame-benchmarking 25.0.0", "frame-support 25.0.0", "frame-system 25.0.0", @@ -8708,7 +9664,7 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76c4eb9211a13bffe31ba0555c382b2e377213ccf7bfd800b115e222cb349142" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "frame-benchmarking 27.0.0", "frame-support 27.0.0", "frame-system 27.0.0", @@ -8726,6 +9682,30 @@ dependencies = [ "staging-xcm-executor 6.0.2", ] +[[package]] +name = "pallet-xcm" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16bda69e8f69123ff81a6d60479fd91b9794f07a24959ced406f5fccbf77482c" +dependencies = [ + "bounded-collections 0.2.0", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "pallet-balances 29.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + [[package]] name = "pallet-xcm-benchmarks" version = "4.0.1" @@ -8766,6 +9746,26 @@ dependencies = [ "staging-xcm-executor 6.0.2", ] +[[package]] +name = "pallet-xcm-benchmarks" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c8e616fcc03682d06f6127f8ae6e31082fc97f795fc4adf8ce67735d7342aea" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + [[package]] name = "pallet-xcm-bridge-hub" version = "0.1.0" @@ -8773,7 +9773,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ac06adbe492bda1c840e3a775b69d619391fe1a631cebd76010dc8394fed75f" dependencies = [ "bp-messages", - "bp-runtime", + "bp-runtime 0.6.0", "bp-xcm-bridge-hub", "bridge-runtime-common", "frame-support 27.0.0", @@ -8881,13 +9881,45 @@ dependencies = [ "westend-runtime-constants 6.0.0", ] +[[package]] +name = "parachains-common" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34aa00981a24a2b772afaa49e258f9bcd6bb372db060a05614becc1c74d4456" +dependencies = [ + "cumulus-primitives-core 0.8.0", + "cumulus-primitives-utility 0.8.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "pallet-asset-tx-payment 29.0.0", + "pallet-assets 30.0.0", + "pallet-authorship 29.0.0", + "pallet-balances 29.0.0", + "pallet-collator-selection 10.0.0", + "pallet-message-queue 32.0.0", + "pallet-xcm 8.0.0", + "parity-scale-codec", + "polkadot-primitives 8.0.0", + "scale-info", + "sp-consensus-aura 0.33.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-parachain-info 0.8.0", + "staging-xcm 8.0.0", + "staging-xcm-executor 8.0.0", + "substrate-wasm-builder 18.0.0", +] + [[package]] name = "parachains-runtimes-test-utils" version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34682787ee935f35aa45044637f9557c0b313d91453b41016724574e6193f493" dependencies = [ - "assets-common", + "assets-common 0.6.0", "cumulus-pallet-parachain-system 0.6.0", "cumulus-pallet-xcmp-queue 0.6.0", "cumulus-primitives-core 0.6.0", @@ -8915,6 +9947,12 @@ dependencies = [ "substrate-wasm-builder 16.0.0", ] +[[package]] +name = "parity-bytes" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b56e3a2420138bdb970f84dfb9c774aea80fa0e7371549eedec0d80c209c67" + [[package]] name = "parity-db" version = "0.4.13" @@ -8957,7 +9995,7 @@ version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate 2.0.1", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 1.0.109", @@ -9172,6 +10210,17 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "pest" +version = "2.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + [[package]] name = "petgraph" version = "0.6.4" @@ -9268,6 +10317,19 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "polkadot-core-primitives" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6a08e4e014c853b252ecbbe3ccd67b2d33d78e46988d309b8cccf4ac06e25ef" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "polkadot-node-jaeger" version = "4.0.0" @@ -9407,7 +10469,7 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives 3.0.0", "polkadot-primitives 4.0.0", - "schnorrkel", + "schnorrkel 0.9.1", "serde", "sp-application-crypto 27.0.0", "sp-consensus-babe 0.29.0", @@ -9431,7 +10493,7 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives 5.0.0", "polkadot-primitives 6.0.0", - "schnorrkel", + "schnorrkel 0.9.1", "serde", "sp-application-crypto 29.0.0", "sp-consensus-babe 0.31.0", @@ -9550,7 +10612,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42265630c0c48e25d7ee5a9f4bdcafd003be65c0a44deeb6541620ca169fa519" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "derive_more", "frame-support 25.0.0", "parity-scale-codec", @@ -9568,7 +10630,7 @@ version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47b0b8521215ec97799c75a7531c2ac0627fa2b8916fde2bdc6c79bf05b93645" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "derive_more", "parity-scale-codec", "polkadot-core-primitives 6.0.0", @@ -9580,6 +10642,24 @@ dependencies = [ "sp-weights 26.0.0", ] +[[package]] +name = "polkadot-parachain-primitives" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248ab090959a92e61493277e33b7e85104280a4beb4cb0815137d3c8c50a07f4" +dependencies = [ + "bounded-collections 0.2.0", + "derive_more", + "parity-scale-codec", + "polkadot-core-primitives 8.0.0", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-weights 28.0.0", +] + [[package]] name = "polkadot-primitives" version = "4.0.0" @@ -9634,6 +10714,33 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "polkadot-primitives" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f66d047db81997a1ec9526987031b0d8f146edb0bdcdc0f9af73f6a2aa62fbce" +dependencies = [ + "bitvec", + "hex-literal", + "parity-scale-codec", + "polkadot-core-primitives 8.0.0", + "polkadot-parachain-primitives 7.0.0", + "scale-info", + "serde", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", + "sp-authority-discovery 27.0.0", + "sp-consensus-slots 0.33.0", + "sp-core 29.0.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", + "sp-std 14.0.0", +] + [[package]] name = "polkadot-runtime" version = "1.0.0" @@ -9669,7 +10776,7 @@ dependencies = [ "pallet-elections-phragmen", "pallet-fast-unstake 26.0.0", "pallet-grandpa", - "pallet-identity", + "pallet-identity 27.0.0", "pallet-im-online", "pallet-indices", "pallet-membership 27.0.0", @@ -9817,7 +10924,7 @@ dependencies = [ "pallet-balances 27.0.0", "pallet-election-provider-multi-phase 26.0.0", "pallet-fast-unstake 26.0.0", - "pallet-identity", + "pallet-identity 27.0.0", "pallet-session 27.0.0", "pallet-staking 27.0.0", "pallet-staking-reward-fn 18.0.0", @@ -9849,6 +10956,59 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "polkadot-runtime-common" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4332f736bf9859c2f66d4db0f68f686a764c1e185392ecfc5e98efb53af05af" +dependencies = [ + "bitvec", + "frame-benchmarking 29.0.0", + "frame-election-provider-support 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "impl-trait-for-tuples", + "libsecp256k1", + "log", + "pallet-asset-rate 8.0.0", + "pallet-authorship 29.0.0", + "pallet-babe 29.0.0", + "pallet-balances 29.0.0", + "pallet-broker", + "pallet-election-provider-multi-phase 28.0.0", + "pallet-fast-unstake 28.0.0", + "pallet-identity 29.0.0", + "pallet-session 29.0.0", + "pallet-staking 29.0.0", + "pallet-staking-reward-fn 20.0.0", + "pallet-timestamp 28.0.0", + "pallet-transaction-payment 29.0.0", + "pallet-treasury 28.0.0", + "pallet-vesting 29.0.0", + "pallet-xcm-benchmarks 8.0.0", + "parity-scale-codec", + "polkadot-primitives 8.0.0", + "polkadot-runtime-parachains 8.0.0", + "rustc-hex", + "scale-info", + "serde", + "serde_derive", + "slot-range-helper 8.0.0", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-npos-elections 27.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-staking 27.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", + "static_assertions", +] + [[package]] name = "polkadot-runtime-constants" version = "1.0.0" @@ -9891,6 +11051,20 @@ dependencies = [ "sp-tracing 15.0.0", ] +[[package]] +name = "polkadot-runtime-metrics" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3566c6fd0c21b5dd555309427c984cf506f875ee90f710acea295b478fecbe0" +dependencies = [ + "bs58 0.5.0", + "frame-benchmarking 29.0.0", + "parity-scale-codec", + "polkadot-primitives 8.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", +] + [[package]] name = "polkadot-runtime-parachains" version = "4.0.0" @@ -9988,6 +11162,56 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "polkadot-runtime-parachains" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef42b7542a9c5b41ebf925d52bc0ce431232e01b0991b8c01a95f0f5f4eac0cf" +dependencies = [ + "bitflags 1.3.2", + "bitvec", + "derive_more", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "impl-trait-for-tuples", + "log", + "pallet-authority-discovery 29.0.0", + "pallet-authorship 29.0.0", + "pallet-babe 29.0.0", + "pallet-balances 29.0.0", + "pallet-broker", + "pallet-message-queue 32.0.0", + "pallet-session 29.0.0", + "pallet-staking 29.0.0", + "pallet-timestamp 28.0.0", + "pallet-vesting 29.0.0", + "parity-scale-codec", + "polkadot-core-primitives 8.0.0", + "polkadot-parachain-primitives 7.0.0", + "polkadot-primitives 8.0.0", + "polkadot-runtime-metrics 8.0.0", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rustc-hex", + "scale-info", + "serde", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-staking 27.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-executor 8.0.0", + "static_assertions", +] + [[package]] name = "polkadot-statement-table" version = "4.0.0" @@ -10158,14 +11382,22 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" dependencies = [ - "toml_datetime", "toml_edit 0.20.2", ] +[[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]] name = "proc-macro-error" version = "1.0.4" @@ -10247,6 +11479,26 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.4.1", + "lazy_static", + "num-traits", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax 0.8.2", + "rusty-fork", + "tempfile", + "unarray", +] + [[package]] name = "prost" version = "0.11.9" @@ -10472,6 +11724,15 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -10762,8 +12023,38 @@ dependencies = [ ] [[package]] -name = "rustc-demangle" -version = "0.1.23" +name = "ruint" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608a5726529f2f0ef81b8fde9873c4bb829d6b5b5ca6be4d97345ddf0749c825" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand 0.8.5", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e666a5496a0b2186dbcd0ff6106e29e093c15591bde62c20d3842007c6978a09" + +[[package]] +name = "rustc-demangle" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" @@ -10788,6 +12079,15 @@ dependencies = [ "semver 0.9.0", ] +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + [[package]] name = "rustc_version" version = "0.4.0" @@ -10894,6 +12194,18 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -11144,7 +12456,7 @@ dependencies = [ "sp-core 25.0.0", "sp-keyring 28.0.0", "sp-keystore 0.31.0", - "sp-panic-handler", + "sp-panic-handler 12.0.0", "sp-runtime 28.0.0", "sp-version 26.0.0", "thiserror", @@ -11187,7 +12499,7 @@ dependencies = [ "sp-core 27.0.0", "sp-keyring 30.0.0", "sp-keystore 0.33.0", - "sp-panic-handler", + "sp-panic-handler 12.0.0", "sp-runtime 30.0.1", "sp-version 28.0.0", "thiserror", @@ -11414,7 +12726,7 @@ dependencies = [ "sp-core 25.0.0", "sp-externalities 0.23.0", "sp-io 27.0.0", - "sp-panic-handler", + "sp-panic-handler 12.0.0", "sp-runtime-interface 21.0.0", "sp-trie 26.0.0", "sp-version 26.0.0", @@ -11437,7 +12749,7 @@ dependencies = [ "sp-core 27.0.0", "sp-externalities 0.24.0", "sp-io 29.0.0", - "sp-panic-handler", + "sp-panic-handler 12.0.0", "sp-runtime-interface 23.0.0", "sp-trie 28.0.0", "sp-version 28.0.0", @@ -12639,7 +13951,7 @@ dependencies = [ "arrayvec 0.5.2", "curve25519-dalek 2.1.3", "getrandom 0.1.16", - "merlin", + "merlin 2.0.1", "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", @@ -12647,6 +13959,25 @@ dependencies = [ "zeroize", ] +[[package]] +name = "schnorrkel" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" +dependencies = [ + "aead", + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek 4.1.2", + "getrandom_or_panic", + "merlin 3.0.0", + "rand_core 0.6.4", + "serde_bytes", + "sha2 0.10.8", + "subtle 2.5.0", + "zeroize", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -12757,7 +14088,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", ] [[package]] @@ -12766,7 +14097,16 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser 0.10.2", ] [[package]] @@ -12784,6 +14124,15 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + [[package]] name = "separator" version = "0.4.1" @@ -12799,6 +14148,24 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-big-array" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd31f59f6fe2b0c055371bb2f16d7f0aa7d8881676c04a55b1596d1a17cd10a4" +dependencies = [ + "serde", +] + +[[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.195" @@ -13000,6 +14367,19 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "slot-range-helper" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d40fa5e14772407fd2ccffdd5971bf055bbf46a40727c0ea96d2bb6563d17e1c" +dependencies = [ + "enumn", + "parity-scale-codec", + "paste", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "smallvec" version = "1.13.1" @@ -13029,6 +14409,331 @@ dependencies = [ "subtle 2.5.0", ] +[[package]] +name = "snowbridge-amcl" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460a9ed63cdf03c1b9847e8a12a5f5ba19c4efd5869e4a737e05be25d7c427e5" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "snowbridge-beacon-primitives" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a73ef707257064bc4ecce8323cdb7c30e8ecd1ce74aa89a6e82e81fa8b9970" +dependencies = [ + "byte-slice-cast", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex", + "parity-scale-codec", + "rlp", + "scale-info", + "serde", + "snowbridge-ethereum", + "snowbridge-milagro-bls", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "ssz_rs", + "ssz_rs_derive", + "static_assertions", +] + +[[package]] +name = "snowbridge-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d3615664be8525d6f23e42dce1c314abc7f961a7f862b74012444e16d5dde5c" +dependencies = [ + "ethabi-decode", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "parity-scale-codec", + "polkadot-parachain-primitives 7.0.0", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", +] + +[[package]] +name = "snowbridge-ethereum" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "315ad74f081734cb51f48bb10cd18a3f83cfec3c09a551bc936027708635e808" +dependencies = [ + "ethabi-decode", + "ethbloom", + "ethereum-types", + "hex-literal", + "parity-bytes", + "parity-scale-codec", + "rlp", + "rustc-hex", + "scale-info", + "serde", + "serde-big-array", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + +[[package]] +name = "snowbridge-milagro-bls" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "026aa8638f690a53e3f7676024b9e913b1cab0111d1b7b92669d40a188f9d7e6" +dependencies = [ + "hex", + "lazy_static", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "snowbridge-amcl", + "zeroize", +] + +[[package]] +name = "snowbridge-outbound-queue-merkle-tree" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5382cf77aeb8a92a142751949cdea1f230b7864e1ea687352c28439faabcf69d" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core 29.0.0", + "sp-runtime 32.0.0", +] + +[[package]] +name = "snowbridge-outbound-queue-runtime-api" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4933810488df1660cf60f53a7952ce1dff6aaef72d9fc740e1274e937136444e" +dependencies = [ + "frame-support 29.0.0", + "parity-scale-codec", + "snowbridge-core", + "snowbridge-outbound-queue-merkle-tree", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", +] + +[[package]] +name = "snowbridge-pallet-ethereum-client" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0fd437cd5db8b7d16cdd4da110d674d245532afa31df10108a11858a07844a6" +dependencies = [ + "bp-runtime 0.8.0", + "byte-slice-cast", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "log", + "pallet-timestamp 28.0.0", + "parity-scale-codec", + "rlp", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-ethereum", + "snowbridge-pallet-ethereum-client-fixtures", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "ssz_rs", + "ssz_rs_derive", + "static_assertions", +] + +[[package]] +name = "snowbridge-pallet-ethereum-client-fixtures" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3d5b4b7e17eaadbc52ac3fc9fbcce63dfc60c05a1b19604cd009d6595c1175e" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "snowbridge-beacon-primitives", + "snowbridge-core", + "sp-core 29.0.0", + "sp-std 14.0.0", +] + +[[package]] +name = "snowbridge-pallet-inbound-queue" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79c1fbfd32dbba082a9312c02c3ef35de929741f78f48e88b7668909350ef9e2" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "log", + "num-traits", + "pallet-balances 29.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-ethereum", + "snowbridge-pallet-inbound-queue-fixtures", + "snowbridge-router-primitives", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + +[[package]] +name = "snowbridge-pallet-inbound-queue-fixtures" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d8fff63b0a64d1dd06571ad074e664594bd9392481cd3489edde36e1d2dcc96" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "snowbridge-beacon-primitives", + "snowbridge-core", + "sp-core 29.0.0", + "sp-std 14.0.0", +] + +[[package]] +name = "snowbridge-pallet-outbound-queue" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c7498ba5bc2b15e1d032b3e44659cd117cad24eab457a40dc5e17acfaac0aff" +dependencies = [ + "bridge-hub-common", + "ethabi-decode", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-core", + "snowbridge-outbound-queue-merkle-tree", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", +] + +[[package]] +name = "snowbridge-pallet-system" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6a410d9312bdcc3ba5944abb7d21f6b25065b32c7f8b39b9c7a4b0bd0dacfb4" +dependencies = [ + "ethabi-decode", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "snowbridge-core", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + +[[package]] +name = "snowbridge-router-primitives" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee5cc8e156f033971c5435676be92ab6f70a926b3497ca9c28c0dde9697b8da9" +dependencies = [ + "ethabi-decode", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-core", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + +[[package]] +name = "snowbridge-runtime-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d751007be1c9c68b075b0b1f9b02c25a02f458903a2c7893ba6e4231a00c24a" +dependencies = [ + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "snowbridge-core", + "sp-arithmetic 24.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + +[[package]] +name = "snowbridge-system-runtime-api" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5c3c4e6e87b76ae1f9639bbc1528e1ae4e5a8d6a16d02d8d48e56d4a89f4ca" +dependencies = [ + "parity-scale-codec", + "snowbridge-core", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", +] + [[package]] name = "socket2" version = "0.4.10" @@ -13110,6 +14815,28 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sp-api" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ef42aa652381ade883c14ffbbb5c0fec36d382d2217b5bace01b8a0e8634778" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "scale-info", + "sp-api-proc-macro 15.0.0", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-metadata-ir 0.6.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", + "sp-std 14.0.0", + "sp-trie 30.0.0", + "sp-version 30.0.0", + "thiserror", +] + [[package]] name = "sp-api-proc-macro" version = "12.0.0" @@ -13134,15 +14861,30 @@ dependencies = [ "Inflector", "blake2 0.10.6", "expander 2.0.0", - "proc-macro-crate 2.0.1", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 2.0.48", ] [[package]] -name = "sp-application-crypto" -version = "27.0.0" +name = "sp-api-proc-macro" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0694be2891593450916d6b53a274d234bccbc86bcbada36ba23fc356989070c7" +dependencies = [ + "Inflector", + "blake2 0.10.6", + "expander 2.0.0", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "sp-application-crypto" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a93da025616ab59639f8e378df579c5aaa2c8b9999f328a0239156a57c991b53" dependencies = [ @@ -13168,6 +14910,20 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "sp-application-crypto" +version = "31.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "547cad7a6eabb52c639ec117b3db9c6b43cf1b29a9393b18feb19e101a91833f" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-std 14.0.0", +] + [[package]] name = "sp-arithmetic" version = "20.0.0" @@ -13198,6 +14954,21 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "sp-arithmetic" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afa823ca5adc490d47dccb41d69ad482bc57a317bd341de275868378f48f131c" +dependencies = [ + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-std 14.0.0", + "static_assertions", +] + [[package]] name = "sp-authority-discovery" version = "23.0.0" @@ -13226,6 +14997,20 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "sp-authority-discovery" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92b177c72b5d2973c36d60f6ef942d791d9fd91eae8b08c71882e4118d4fbfc" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "sp-block-builder" version = "23.0.0" @@ -13356,6 +15141,24 @@ dependencies = [ "sp-timestamp 25.0.0", ] +[[package]] +name = "sp-consensus-aura" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bf13c293685319751f72fa5216c7fb5f25f3e8e8fe29b4503296ed5f5466b3d" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-consensus-slots 0.33.0", + "sp-inherents 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-timestamp 27.0.0", +] + [[package]] name = "sp-consensus-babe" version = "0.29.0" @@ -13396,6 +15199,26 @@ dependencies = [ "sp-timestamp 25.0.0", ] +[[package]] +name = "sp-consensus-babe" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9be2f86a2f0ce2a78b455feb547aa27604fd76a7f7a691995cbad44e0b1b9dd" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-consensus-slots 0.33.0", + "sp-core 29.0.0", + "sp-inherents 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-timestamp 27.0.0", +] + [[package]] name = "sp-consensus-beefy" version = "12.0.0" @@ -13480,6 +15303,19 @@ dependencies = [ "sp-timestamp 25.0.0", ] +[[package]] +name = "sp-consensus-slots" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73a5bd1fcd84bbdc7255528c7cdb92f9357fd555f06ee553af7e340cbdab517c" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-std 14.0.0", + "sp-timestamp 27.0.0", +] + [[package]] name = "sp-core" version = "25.0.0" @@ -13489,7 +15325,7 @@ dependencies = [ "array-bytes 6.2.2", "bitflags 1.3.2", "blake2 0.10.6", - "bounded-collections", + "bounded-collections 0.1.9", "bs58 0.5.0", "dyn-clonable", "ed25519-zebra", @@ -13500,7 +15336,7 @@ dependencies = [ "lazy_static", "libsecp256k1", "log", - "merlin", + "merlin 2.0.1", "parity-scale-codec", "parking_lot 0.12.1", "paste", @@ -13508,7 +15344,7 @@ dependencies = [ "rand 0.8.5", "regex", "scale-info", - "schnorrkel", + "schnorrkel 0.9.1", "secp256k1 0.24.3", "secrecy", "serde", @@ -13537,7 +15373,7 @@ dependencies = [ "bip39", "bitflags 1.3.2", "blake2 0.10.6", - "bounded-collections", + "bounded-collections 0.1.9", "bs58 0.5.0", "dyn-clonable", "ed25519-zebra", @@ -13548,14 +15384,14 @@ dependencies = [ "itertools 0.10.5", "libsecp256k1", "log", - "merlin", + "merlin 2.0.1", "parity-scale-codec", "parking_lot 0.12.1", "paste", "primitive-types", "rand 0.8.5", "scale-info", - "schnorrkel", + "schnorrkel 0.9.1", "secp256k1 0.28.1", "secrecy", "serde", @@ -13573,6 +15409,52 @@ dependencies = [ "zeroize", ] +[[package]] +name = "sp-core" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c33c7a1568175250628567d50c4e1c54a6ac5bc1190413b9be29a9e810cbe73" +dependencies = [ + "array-bytes 6.2.2", + "bip39", + "bitflags 1.3.2", + "blake2 0.10.6", + "bounded-collections 0.2.0", + "bs58 0.5.0", + "dyn-clonable", + "ed25519-zebra", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "itertools 0.10.5", + "libsecp256k1", + "log", + "merlin 3.0.0", + "parity-scale-codec", + "parking_lot 0.12.1", + "paste", + "primitive-types", + "rand 0.8.5", + "scale-info", + "schnorrkel 0.11.4", + "secp256k1 0.28.1", + "secrecy", + "serde", + "sp-crypto-hashing", + "sp-debug-derive 14.0.0", + "sp-externalities 0.26.0", + "sp-runtime-interface 25.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "ss58-registry", + "substrate-bip39", + "thiserror", + "tracing", + "w3f-bls", + "zeroize", +] + [[package]] name = "sp-core-hashing" version = "13.0.0" @@ -13623,6 +15505,31 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "sp-crypto-hashing" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9927a7f81334ed5b8a98a4a978c81324d12bd9713ec76b5c68fd410174c5eb" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.8", + "sha3", + "twox-hash", +] + +[[package]] +name = "sp-crypto-hashing-proc-macro" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b85d0f1f1e44bd8617eb2a48203ee854981229e3e79e6f468c7175d5fd37489b" +dependencies = [ + "quote", + "sp-crypto-hashing", + "syn 2.0.48", +] + [[package]] name = "sp-database" version = "9.0.0" @@ -13655,6 +15562,17 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "sp-debug-derive" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d09fa0a5f7299fb81ee25ae3853d26200f7a348148aed6de76be905c007dbe" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "sp-externalities" version = "0.23.0" @@ -13679,6 +15597,18 @@ dependencies = [ "sp-storage 18.0.0", ] +[[package]] +name = "sp-externalities" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7096ed024cec397804864898b093b51e14c7299f1d00c67dd5800330e02bb82" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 14.0.0", + "sp-storage 20.0.0", +] + [[package]] name = "sp-genesis-builder" version = "0.4.0" @@ -13703,6 +15633,18 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "sp-genesis-builder" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd865540ec19479c7349b584ccd78cc34c3f3a628a2a69dbb6365ceec36295ee" +dependencies = [ + "serde_json", + "sp-api 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "sp-inherents" version = "23.0.0" @@ -13733,6 +15675,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sp-inherents" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "607c9e35e96966645ff180a9e9f976433b96e905d0a91d8d5315e605a21f4bc0" +dependencies = [ + "async-trait", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "thiserror", +] + [[package]] name = "sp-io" version = "27.0.0" @@ -13783,6 +15740,32 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "sp-io" +version = "31.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec43aa073eab35fcb920d7592474d5427ea3be2bf938706a3ad955d7ba54fd8d" +dependencies = [ + "bytes", + "ed25519-dalek", + "libsecp256k1", + "log", + "parity-scale-codec", + "rustversion", + "secp256k1 0.28.1", + "sp-core 29.0.0", + "sp-crypto-hashing", + "sp-externalities 0.26.0", + "sp-keystore 0.35.0", + "sp-runtime-interface 25.0.0", + "sp-state-machine 0.36.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", + "sp-trie 30.0.0", + "tracing", + "tracing-core", +] + [[package]] name = "sp-keyring" version = "28.0.0" @@ -13833,6 +15816,19 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sp-keystore" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "444f2d53968b1ce5e908882710ff1f3873fcf3e95f59d57432daf685bbacb959" +dependencies = [ + "parity-scale-codec", + "parking_lot 0.12.1", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "thiserror", +] + [[package]] name = "sp-maybe-compressed-blob" version = "9.0.0" @@ -13853,6 +15849,16 @@ dependencies = [ "zstd 0.12.4", ] +[[package]] +name = "sp-maybe-compressed-blob" +version = "11.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c768c11afbe698a090386876911da4236af199cd38a5866748df4d8628aeff" +dependencies = [ + "thiserror", + "zstd 0.12.4", +] + [[package]] name = "sp-metadata-ir" version = "0.4.0" @@ -13877,6 +15883,18 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "sp-metadata-ir" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa0b5e87e56c1bb26d9524d48dd127121d630f895bd5914a34f0b017489f7c1d" +dependencies = [ + "frame-metadata", + "parity-scale-codec", + "scale-info", + "sp-std 14.0.0", +] + [[package]] name = "sp-mixnet" version = "0.1.0" @@ -13952,6 +15970,21 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "sp-npos-elections" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "195d7e1154c91cce5c3abc8c778689c3e5799da6411328dd32ac7a974c68e526" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "sp-offchain" version = "23.0.0" @@ -13985,6 +16018,17 @@ dependencies = [ "regex", ] +[[package]] +name = "sp-panic-handler" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8f5a17a0a11de029a8b811cb6e8b32ce7e02183cc04a3e965c383246798c416" +dependencies = [ + "backtrace", + "lazy_static", + "regex", +] + [[package]] name = "sp-rpc" version = "23.0.0" @@ -14055,6 +16099,31 @@ dependencies = [ "sp-weights 26.0.0", ] +[[package]] +name = "sp-runtime" +version = "32.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a95e71603a6281e91b0f1fd3d68057644be16d75a4602013187b8137db8abee" +dependencies = [ + "docify", + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "paste", + "rand 0.8.5", + "scale-info", + "serde", + "simple-mermaid", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-std 14.0.0", + "sp-weights 28.0.0", +] + [[package]] name = "sp-runtime-interface" version = "21.0.0" @@ -14093,6 +16162,25 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "sp-runtime-interface" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e2321ab29d4bcc31f1ba1b4f076a81fb2a666465231e5c981c72320d74dbe63" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.26.0", + "sp-runtime-interface-proc-macro 17.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "sp-tracing 16.0.0", + "sp-wasm-interface 20.0.0", + "static_assertions", +] + [[package]] name = "sp-runtime-interface-proc-macro" version = "15.0.0" @@ -14114,7 +16202,21 @@ checksum = "5ebdb4aff8286f5095871b2f950037d690edb0fed0590af5f6735352533a53b6" dependencies = [ "Inflector", "expander 2.0.0", - "proc-macro-crate 2.0.1", + "proc-macro-crate 2.0.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "17.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfaf6e85b2ec12a4b99cd6d8d57d083e30c94b7f1b0d8f93547121495aae6f0c" +dependencies = [ + "Inflector", + "expander 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 2.0.48", @@ -14152,6 +16254,22 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "sp-session" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b86531090cc04d2ab3535df07146258e2fb3ab6257b0a77ef14aa08282c3d4a" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", + "sp-std 14.0.0", +] + [[package]] name = "sp-staking" version = "23.0.0" @@ -14182,6 +16300,21 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "sp-staking" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e14d003ecf0b610bf1305a92bdab875289b39d514c073f30e75e78c2763a788" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "sp-state-machine" version = "0.32.0" @@ -14196,7 +16329,7 @@ dependencies = [ "smallvec", "sp-core 25.0.0", "sp-externalities 0.23.0", - "sp-panic-handler", + "sp-panic-handler 12.0.0", "sp-std 12.0.0", "sp-trie 26.0.0", "thiserror", @@ -14216,11 +16349,33 @@ dependencies = [ "parking_lot 0.12.1", "rand 0.8.5", "smallvec", - "sp-core 27.0.0", - "sp-externalities 0.24.0", - "sp-panic-handler", - "sp-std 13.0.0", - "sp-trie 28.0.0", + "sp-core 27.0.0", + "sp-externalities 0.24.0", + "sp-panic-handler 12.0.0", + "sp-std 13.0.0", + "sp-trie 28.0.0", + "thiserror", + "tracing", + "trie-db", +] + +[[package]] +name = "sp-state-machine" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a67297e702aa32027d7766803f362a420d6d3ec9e2f84961f3c64e2e52b5aaf9" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "smallvec", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-panic-handler 13.0.0", + "sp-std 14.0.0", + "sp-trie 30.0.0", "thiserror", "tracing", "trie-db", @@ -14288,6 +16443,12 @@ version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71323a3b5f189085d11123ce397b3cdfaec4437071243b51f68a38a4833fbaa7" +[[package]] +name = "sp-std" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" + [[package]] name = "sp-storage" version = "17.0.0" @@ -14316,6 +16477,20 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "sp-storage" +version = "20.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dba5791cb3978e95daf99dad919ecb3ec35565604e88cd38d805d9d4981e8bd" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 14.0.0", + "sp-std 14.0.0", +] + [[package]] name = "sp-timestamp" version = "23.0.0" @@ -14344,6 +16519,20 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sp-timestamp" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "249cd06624f2edb53b25af528ab216a508dc9d0870e158b43caac3a97e86699f" +dependencies = [ + "async-trait", + "parity-scale-codec", + "sp-inherents 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "thiserror", +] + [[package]] name = "sp-tracing" version = "14.0.0" @@ -14370,6 +16559,19 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "sp-tracing" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0351810b9d074df71c4514c5228ed05c250607cba131c1c9d1526760ab69c05c" +dependencies = [ + "parity-scale-codec", + "sp-std 14.0.0", + "tracing", + "tracing-core", + "tracing-subscriber", +] + [[package]] name = "sp-transaction-pool" version = "23.0.0" @@ -14473,6 +16675,31 @@ dependencies = [ "trie-root", ] +[[package]] +name = "sp-trie" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed48dfd05081e8b36741b10ce4eb686c135a2952227a11fe71caec89890ddbb" +dependencies = [ + "ahash 0.8.8", + "hash-db", + "lazy_static", + "memory-db", + "nohash-hasher", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "scale-info", + "schnellru", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-std 14.0.0", + "thiserror", + "tracing", + "trie-db", + "trie-root", +] + [[package]] name = "sp-version" version = "26.0.0" @@ -14487,7 +16714,7 @@ dependencies = [ "sp-core-hashing-proc-macro 13.0.0", "sp-runtime 28.0.0", "sp-std 12.0.0", - "sp-version-proc-macro", + "sp-version-proc-macro 12.0.0", "thiserror", ] @@ -14505,7 +16732,25 @@ dependencies = [ "sp-core-hashing-proc-macro 14.0.0", "sp-runtime 30.0.1", "sp-std 13.0.0", - "sp-version-proc-macro", + "sp-version-proc-macro 12.0.0", + "thiserror", +] + +[[package]] +name = "sp-version" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff4a660c68995663d6778df324f4e2b4efc48d55a8e9c92c22a5fb7dae7899cd" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "parity-wasm", + "scale-info", + "serde", + "sp-crypto-hashing-proc-macro", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-version-proc-macro 13.0.0", "thiserror", ] @@ -14521,6 +16766,18 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "sp-version-proc-macro" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9bc3fed32d6dacbbbfb28dd1fe0224affbb737cb6cbfca1d9149351c2b69a7d" +dependencies = [ + "parity-scale-codec", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "sp-wasm-interface" version = "18.0.0" @@ -14549,6 +16806,20 @@ dependencies = [ "wasmtime", ] +[[package]] +name = "sp-wasm-interface" +version = "20.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ef97172c42eb4c6c26506f325f48463e9bc29b2034a587f1b9e48c751229bee" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std 14.0.0", + "wasmtime", +] + [[package]] name = "sp-weights" version = "24.0.0" @@ -14571,7 +16842,7 @@ version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8813a9942a3b900d5ce109875b91ff8ae7eb5849545ebb6464c22aa21e42622e" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "parity-scale-codec", "scale-info", "serde", @@ -14581,6 +16852,22 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "sp-weights" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3be30aec904994451dcacf841a9168cfbbaf817de6b24b6a1c1418cbf1af2fe" +dependencies = [ + "bounded-collections 0.2.0", + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic 24.0.0", + "sp-debug-derive 14.0.0", + "sp-std 14.0.0", +] + [[package]] name = "spin" version = "0.5.2" @@ -14629,6 +16916,29 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "ssz_rs" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "057291e5631f280978fa9c8009390663ca4613359fc1318e36a8c24c392f6d1f" +dependencies = [ + "bitvec", + "num-bigint", + "sha2 0.9.9", + "ssz_rs_derive", +] + +[[package]] +name = "ssz_rs_derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f07d54c4d01a1713eb363b55ba51595da15f6f1211435b71466460da022aa140" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -14671,7 +16981,7 @@ dependencies = [ "pallet-elections-phragmen", "pallet-fast-unstake 26.0.0", "pallet-grandpa", - "pallet-identity", + "pallet-identity 27.0.0", "pallet-im-online", "pallet-indices", "pallet-membership 27.0.0", @@ -14780,13 +17090,28 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "staging-parachain-info" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7dc139d104f676a18c13380a09c3f72d59450a7471116387cbf8cb5f845a0e" +dependencies = [ + "cumulus-primitives-core 0.8.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "parity-scale-codec", + "scale-info", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "staging-xcm" version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abd0c2e401a1e264379131c27676bc65c9631aaa508044bc04d8ce60a7d8524" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "derivative", "environmental", "impl-trait-for-tuples", @@ -14804,7 +17129,7 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "407cc6e4b9cd1b62df9270d921d94ed375e697d65a782975d5e5a5f85bbeafb5" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "derivative", "environmental", "impl-trait-for-tuples", @@ -14816,6 +17141,25 @@ dependencies = [ "xcm-procedural 6.0.0", ] +[[package]] +name = "staging-xcm" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ccecaeae5eca8453760e96fcf65481b19898459971842004732e88cd3570741" +dependencies = [ + "array-bytes 6.2.2", + "bounded-collections 0.2.0", + "derivative", + "environmental", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-weights 28.0.0", + "xcm-procedural 8.0.0", +] + [[package]] name = "staging-xcm-builder" version = "4.0.1" @@ -14862,6 +17206,29 @@ dependencies = [ "staging-xcm-executor 6.0.2", ] +[[package]] +name = "staging-xcm-builder" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e8c74e3d5b47173a22ad468ab28aeb88cfb92b742fa91a95fe1a8230c2365f" +dependencies = [ + "frame-support 29.0.0", + "frame-system 29.0.0", + "impl-trait-for-tuples", + "log", + "pallet-transaction-payment 29.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 7.0.0", + "scale-info", + "sp-arithmetic 24.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-weights 28.0.0", + "staging-xcm 8.0.0", + "staging-xcm-executor 8.0.0", +] + [[package]] name = "staging-xcm-executor" version = "4.0.2" @@ -14905,6 +17272,28 @@ dependencies = [ "staging-xcm 6.0.0", ] +[[package]] +name = "staging-xcm-executor" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "666e4c4fb7b1e91342a54281cb15bda81e17b795c6072f8b4892946249c03922" +dependencies = [ + "environmental", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-weights 28.0.0", + "staging-xcm 8.0.0", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -14988,7 +17377,7 @@ checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", - "schnorrkel", + "schnorrkel 0.9.1", "sha2 0.9.9", "zeroize", ] @@ -15091,6 +17480,25 @@ dependencies = [ "wasm-opt", ] +[[package]] +name = "substrate-wasm-builder" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "511bbc2df035f5fe2556d855369a1bbb45df620360391a1f6e3fa1a1d64af79a" +dependencies = [ + "build-helper", + "cargo_metadata", + "console", + "filetime", + "parity-wasm", + "sp-maybe-compressed-blob 11.0.0", + "strum", + "tempfile", + "toml 0.8.10", + "walkdir", + "wasm-opt", +] + [[package]] name = "subtle" version = "1.0.0" @@ -15125,6 +17533,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn-solidity" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b837ef12ab88835251726eb12237655e61ec8dc8a280085d1961cdc3dfd047" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "synstructure" version = "0.12.6" @@ -15170,6 +17590,7 @@ dependencies = [ "polkadot-runtime-constants", "smallvec", "sp-runtime 30.0.1", + "staging-xcm 6.0.0", ] [[package]] @@ -15468,21 +17889,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.2" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.20.2", + "toml_edit 0.22.5", ] [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] @@ -15497,7 +17918,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.5.33", ] [[package]] @@ -15505,12 +17926,34 @@ name = "toml_edit" version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow 0.5.33", +] + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow 0.5.33", +] + +[[package]] +name = "toml_edit" +version = "0.22.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99e68c159e8f5ba8a28c4eb7b0c0c190d77bb479047ca713270048145a9ad28a" dependencies = [ "indexmap 2.1.0", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.0", ] [[package]] @@ -15777,6 +18220,12 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + [[package]] name = "uint" version = "0.9.5" @@ -15789,6 +18238,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + [[package]] name = "unicode-bidi" version = "0.3.14" @@ -15906,8 +18361,8 @@ dependencies = [ "ark-bls12-377", "ark-bls12-381", "ark-ec", - "ark-ff", - "ark-serialize", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", "ark-serialize-derive", "arrayref", "constcat", @@ -15921,6 +18376,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + [[package]] name = "walkdir" version = "2.4.0" @@ -16639,6 +19103,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1dbce9e90e5404c5a52ed82b1d13fc8cfbdad85033b6f57546ffd1265f8451" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.50.0" @@ -16757,6 +19230,18 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "xcm-procedural" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4717a97970a9cda70d7db53cf50d2615c2f6f6b7c857445325b4a39ea7aa2cd" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "yamux" version = "0.10.2" diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 5f68bb1e70..3e52c3122c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -100,6 +100,18 @@ pallet-bridge-parachains = { default-features = false , version = "0.6.0" } pallet-bridge-relayers = { default-features = false , version = "0.6.0" } pallet-xcm-bridge-hub = { default-features = false , version = "0.1.0" } +# Ethereum Bridge (Snowbridge) +snowbridge-beacon-primitives = { default-features = false , version = "0.1.0" } +snowbridge-pallet-system = { default-features = false , version = "0.1.0" } +snowbridge-system-runtime-api = { default-features = false , version = "0.1.0" } +snowbridge-core = { default-features = false , version = "0.1.0" } +snowbridge-pallet-ethereum-client = { default-features = false , version = "0.1.0" } +snowbridge-pallet-inbound-queue = { default-features = false , version = "0.1.0" } +snowbridge-pallet-outbound-queue = { default-features = false , version = "0.1.0" } +snowbridge-outbound-queue-runtime-api = { default-features = false , version = "0.1.0" } +snowbridge-router-primitives = { default-features = false , version = "0.1.0" } +snowbridge-runtime-common = { default-features = false , version = "0.1.0" } + [dev-dependencies] bridge-hub-test-utils = { version = "0.6.0" } bridge-runtime-common = { version = "0.6.0", features = ["integrity-test"] } From e4adc62442e3deec079f3e5d80d9e819abe34db7 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 15 Feb 2024 10:41:36 +0200 Subject: [PATCH 116/316] update lock file --- Cargo.lock | 1932 ++++++++++++++++- .../bridge-hub-polkadot/Cargo.toml | 1 + 2 files changed, 1834 insertions(+), 99 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aa1e3b9fae..297859b802 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -110,6 +110,77 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +[[package]] +name = "alloy-primitives" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0628ec0ba5b98b3370bb6be17b12f23bfce8ee4ad83823325a20546d9b03b78" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "proptest", + "rand 0.8.5", + "ruint", + "serde", + "tiny-keccak", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" +dependencies = [ + "alloy-rlp-derive", + "arrayvec 0.7.4", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a98ad1696a2e17f010ae8e43e9f2a1e930ed176a8e3ff77acfeff6dfb07b42c" +dependencies = [ + "const-hex", + "dunce", + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.48", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-types" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98d7107bed88e8f09f0ddcc3335622d87bfb6821f3e0c7473329fb1cfad5e015" +dependencies = [ + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + [[package]] name = "android-tzdata" version = "0.1.1" @@ -211,6 +282,20 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "aquamarine" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" +dependencies = [ + "include_dir", + "itertools 0.10.5", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "ark-bls12-377" version = "0.4.0" @@ -218,8 +303,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" dependencies = [ "ark-ec", - "ark-ff", - "ark-std", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -229,9 +314,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" dependencies = [ "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -240,10 +325,10 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" dependencies = [ - "ark-ff", + "ark-ff 0.4.2", "ark-poly", - "ark-serialize", - "ark-std", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", "itertools 0.10.5", @@ -251,16 +336,34 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + [[package]] name = "ark-ff" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "digest 0.10.7", "itertools 0.10.5", @@ -271,6 +374,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-asm" version = "0.4.2" @@ -281,6 +394,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-macros" version = "0.4.2" @@ -300,13 +425,23 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", ] +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + [[package]] name = "ark-serialize" version = "0.4.2" @@ -314,7 +449,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ "ark-serialize-derive", - "ark-std", + "ark-std 0.4.0", "digest 0.10.7", "num-bigint", ] @@ -330,6 +465,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + [[package]] name = "ark-std" version = "0.4.0" @@ -500,6 +645,7 @@ dependencies = [ "polkadot-runtime-constants", "primitive-types", "scale-info", + "snowbridge-router-primitives", "sp-api 25.0.0", "sp-block-builder 25.0.0", "sp-consensus-aura 0.31.0", @@ -602,6 +748,8 @@ dependencies = [ "polkadot-runtime-common 6.0.0", "polkadot-runtime-constants", "scale-info", + "smallvec", + "snowbridge-router-primitives", "sp-api 25.0.0", "sp-block-builder 25.0.0", "sp-consensus-aura 0.31.0", @@ -771,6 +919,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "auto_impl" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "823b8bb275161044e2ac7a25879cb3e2480cb403e3943022c7c769c599b756aa" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -884,6 +1043,21 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitcoin_hashes" version = "0.11.0" @@ -1022,6 +1196,18 @@ dependencies = [ "serde", ] +[[package]] +name = "bounded-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32385ecb91a31bddaf908e8dcf4a15aef1bcd3913cc03ebfad02ff6d568abc1" +dependencies = [ + "log", + "parity-scale-codec", + "scale-info", + "serde", +] + [[package]] name = "bounded-vec" version = "0.7.1" @@ -1063,7 +1249,7 @@ checksum = "4d76abad1eafb53d1377365c3004456bb61abb5795d06498323770c5647290a2" dependencies = [ "bp-messages", "bp-polkadot-core", - "bp-runtime", + "bp-runtime 0.6.0", "frame-support 27.0.0", "frame-system 27.0.0", "polkadot-primitives 6.0.0", @@ -1077,7 +1263,7 @@ version = "1.0.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", - "bp-runtime", + "bp-runtime 0.6.0", "frame-support 27.0.0", "kusama-runtime-constants", "polkadot-runtime-constants", @@ -1092,7 +1278,7 @@ version = "1.0.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", - "bp-runtime", + "bp-runtime 0.6.0", "frame-support 27.0.0", "kusama-runtime-constants", "polkadot-runtime-constants", @@ -1107,7 +1293,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0135eafdf5d8ee896e875c7f403417b7e8c1a60794daa03ea8d4614ad11bc2e" dependencies = [ - "bp-runtime", + "bp-runtime 0.6.0", "finality-grandpa", "frame-support 27.0.0", "parity-scale-codec", @@ -1127,7 +1313,7 @@ checksum = "f8c318068ab7f4d07cf122d4227a7951be7007b70029f160885b86527d3c1d64" dependencies = [ "bp-header-chain", "bp-polkadot-core", - "bp-runtime", + "bp-runtime 0.6.0", "frame-support 27.0.0", "sp-api 25.0.0", "sp-std 13.0.0", @@ -1140,7 +1326,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ba0e3d7c760f6121f93286f4cbee7fa50c86a6b5a230b3b357bc81e5c1826d9" dependencies = [ "bp-header-chain", - "bp-runtime", + "bp-runtime 0.6.0", "frame-support 27.0.0", "parity-scale-codec", "scale-info", @@ -1157,7 +1343,7 @@ checksum = "b615d01bc99346daa91aea18c18bb7edfca5d29ab5730d04060753d5b59afc73" dependencies = [ "bp-header-chain", "bp-polkadot-core", - "bp-runtime", + "bp-runtime 0.6.0", "frame-support 27.0.0", "impl-trait-for-tuples", "parity-scale-codec", @@ -1175,7 +1361,7 @@ checksum = "d1af8ed56bc7dddc4a3b30ca1568cf406df77ed0b883e0c55e21917b2396460e" dependencies = [ "bp-header-chain", "bp-polkadot-core", - "bp-runtime", + "bp-runtime 0.6.0", "frame-support 27.0.0", "sp-api 25.0.0", "sp-std 13.0.0", @@ -1188,7 +1374,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eca2fa4991db1c5bf9f8ec4c5e0e320a19e76cfe197f850d353f3abae84ae98a" dependencies = [ "bp-messages", - "bp-runtime", + "bp-runtime 0.6.0", "frame-support 27.0.0", "frame-system 27.0.0", "parity-scale-codec", @@ -1207,7 +1393,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4736fdf102aca9ff3e656905557427668e0f339d8b0702b245d354eba63c7186" dependencies = [ "bp-messages", - "bp-runtime", + "bp-runtime 0.6.0", "frame-support 27.0.0", "parity-scale-codec", "scale-info", @@ -1239,6 +1425,30 @@ dependencies = [ "trie-db", ] +[[package]] +name = "bp-runtime" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b29668fffbc3e4a7ad789b498424ed6d8a313f93544a090bbaaef8a1f7fd243" +dependencies = [ + "frame-support 29.0.0", + "frame-system 29.0.0", + "hash-db", + "impl-trait-for-tuples", + "log", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", + "sp-std 14.0.0", + "sp-trie 30.0.0", + "trie-db", +] + [[package]] name = "bp-test-utils" version = "0.6.0" @@ -1248,7 +1458,7 @@ dependencies = [ "bp-header-chain", "bp-parachains", "bp-polkadot-core", - "bp-runtime", + "bp-runtime 0.6.0", "ed25519-dalek", "finality-grandpa", "parity-scale-codec", @@ -1293,6 +1503,24 @@ dependencies = [ "sp-runtime 30.0.1", ] +[[package]] +name = "bridge-hub-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e69c25ec3db0ef22ae409cc60f5c42364124264ce6640e17dbcfc0280e4b5dd9" +dependencies = [ + "cumulus-primitives-core 0.8.0", + "frame-support 29.0.0", + "pallet-message-queue 32.0.0", + "parity-scale-codec", + "scale-info", + "snowbridge-core", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", +] + [[package]] name = "bridge-hub-kusama-runtime" version = "1.0.0" @@ -1308,7 +1536,8 @@ dependencies = [ "bp-polkadot", "bp-polkadot-core", "bp-relayers", - "bp-runtime", + "bp-runtime 0.6.0", + "bridge-hub-common", "bridge-hub-test-utils", "bridge-runtime-common", "cumulus-pallet-aura-ext 0.6.0", @@ -1355,6 +1584,16 @@ dependencies = [ "polkadot-runtime-constants", "scale-info", "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-runtime-common", + "snowbridge-system-runtime-api", "sp-api 25.0.0", "sp-block-builder 25.0.0", "sp-consensus-aura 0.31.0", @@ -1394,7 +1633,8 @@ dependencies = [ "bp-polkadot", "bp-polkadot-core", "bp-relayers", - "bp-runtime", + "bp-runtime 0.6.0", + "bridge-hub-common", "bridge-hub-test-utils", "bridge-runtime-common", "cumulus-pallet-aura-ext 0.6.0", @@ -1441,6 +1681,16 @@ dependencies = [ "polkadot-runtime-constants", "scale-info", "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-runtime-common", + "snowbridge-system-runtime-api", "sp-api 25.0.0", "sp-block-builder 25.0.0", "sp-consensus-aura 0.31.0", @@ -1477,7 +1727,7 @@ dependencies = [ "bp-parachains", "bp-polkadot-core", "bp-relayers", - "bp-runtime", + "bp-runtime 0.6.0", "bp-test-utils", "bridge-runtime-common", "cumulus-pallet-parachain-system 0.6.0", @@ -1522,7 +1772,7 @@ dependencies = [ "bp-parachains", "bp-polkadot-core", "bp-relayers", - "bp-runtime", + "bp-runtime 0.6.0", "bp-xcm-bridge-hub", "bp-xcm-bridge-hub-router 0.5.0", "frame-support 27.0.0", @@ -2018,6 +2268,19 @@ dependencies = [ "windows-sys 0.45.0", ] +[[package]] +name = "const-hex" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d59688ad0945eaf6b84cb44fedbe93484c81b48970e98f09db8a22832d7961" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + [[package]] name = "const-oid" version = "0.9.5" @@ -2490,7 +2753,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bc86fdc17ef11f9adcd7565a4238107a3538426990fa4ffed8e6dc1d40582a2" dependencies = [ - "proc-macro-crate 2.0.1", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 2.0.48", @@ -2576,7 +2839,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9eda7f0f2644ef02fa18054a483650dfd7085caad7137221cbc05747c13ad7d7" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "bp-xcm-bridge-hub-router 0.5.0", "cumulus-primitives-core 0.6.0", "frame-benchmarking 27.0.0", @@ -2632,6 +2895,24 @@ dependencies = [ "staging-xcm 6.0.0", ] +[[package]] +name = "cumulus-primitives-core" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9df07f6825fd50ea30aae335e43dc1a615a05de7465f5f329b9e414f2c886a12" +dependencies = [ + "parity-scale-codec", + "polkadot-core-primitives 8.0.0", + "polkadot-parachain-primitives 7.0.0", + "polkadot-primitives 8.0.0", + "scale-info", + "sp-api 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-trie 30.0.0", + "staging-xcm 8.0.0", +] + [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.4.0" @@ -3135,6 +3416,12 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + [[package]] name = "dyn-clonable" version = "0.9.0" @@ -3527,6 +3814,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "ethabi-decode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d398648d65820a727d6a81e58b962f874473396a047e4c30bafe3240953417" +dependencies = [ + "ethereum-types", + "tiny-keccak", +] + [[package]] name = "ethbloom" version = "0.13.0" @@ -3535,8 +3832,10 @@ checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", + "scale-info", "tiny-keccak", ] @@ -3548,9 +3847,11 @@ checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ "ethbloom", "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", "primitive-types", + "scale-info", "uint", ] @@ -3633,6 +3934,17 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec 0.7.4", + "auto_impl", + "bytes", +] + [[package]] name = "fatality" version = "0.0.6" @@ -3851,6 +4163,32 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "frame-benchmarking" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4090659c6aaa3c4d5b6c6ec909b4b0a25dec10ad92aad5f729efa8d5bd4d806a" +dependencies = [ + "frame-support 29.0.0", + "frame-support-procedural 24.0.0", + "frame-system 29.0.0", + "linregress", + "log", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-runtime-interface 25.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "static_assertions", +] + [[package]] name = "frame-election-provider-solution-type" version = "12.0.0" @@ -3977,7 +4315,7 @@ version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "023504bbdd0e8d1ebe3d9d289b009337cdb9a24c5e74615ffd7b188aa1664c2d" dependencies = [ - "aquamarine", + "aquamarine 0.3.2", "bitflags 1.3.2", "docify", "environmental", @@ -4018,7 +4356,7 @@ version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "654f8001ac929387a460ed2b1dd9ef70af81221ef2b3519bf4c91ecef88f68e4" dependencies = [ - "aquamarine", + "aquamarine 0.3.2", "array-bytes 6.2.2", "bitflags 1.3.2", "docify", @@ -4054,6 +4392,48 @@ dependencies = [ "tt-call", ] +[[package]] +name = "frame-support" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3b24824d29c43d0af94be3356bbf30338ededed649f6841d315a9ae067ce872" +dependencies = [ + "aquamarine 0.5.0", + "array-bytes 6.2.2", + "bitflags 1.3.2", + "docify", + "environmental", + "frame-metadata", + "frame-support-procedural 24.0.0", + "impl-trait-for-tuples", + "k256", + "log", + "macro_magic", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "serde_json", + "smallvec", + "sp-api 27.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-crypto-hashing-proc-macro", + "sp-debug-derive 14.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-metadata-ir 0.6.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", + "sp-state-machine 0.36.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", + "sp-weights 28.0.0", + "static_assertions", + "tt-call", +] + [[package]] name = "frame-support-procedural" version = "20.0.0" @@ -4064,7 +4444,7 @@ dependencies = [ "cfg-expr", "derive-syn-parse", "expander 2.0.0", - "frame-support-procedural-tools", + "frame-support-procedural-tools 9.0.0", "itertools 0.10.5", "macro_magic", "proc-macro-warning", @@ -4084,7 +4464,7 @@ dependencies = [ "cfg-expr", "derive-syn-parse", "expander 2.0.0", - "frame-support-procedural-tools", + "frame-support-procedural-tools 9.0.0", "itertools 0.10.5", "macro_magic", "proc-macro-warning", @@ -4095,19 +4475,52 @@ dependencies = [ ] [[package]] -name = "frame-support-procedural-tools" -version = "9.0.0" +name = "frame-support-procedural" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3ac1266522a8c9a2d2d26d205ec3028b88582d5f3cd5cbc75d0ec8271d197b7" +checksum = "3bf1d648c4007d421b9677b3c893256913498fff159dc2d85022cdd9cc432f3c" dependencies = [ - "frame-support-procedural-tools-derive", - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] + "Inflector", + "cfg-expr", + "derive-syn-parse", + "expander 2.0.0", + "frame-support-procedural-tools 10.0.0", + "itertools 0.10.5", + "macro_magic", + "proc-macro-warning", + "proc-macro2", + "quote", + "sp-crypto-hashing", + "syn 2.0.48", +] + +[[package]] +name = "frame-support-procedural-tools" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3ac1266522a8c9a2d2d26d205ec3028b88582d5f3cd5cbc75d0ec8271d197b7" +dependencies = [ + "frame-support-procedural-tools-derive 10.0.0", + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "frame-support-procedural-tools" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3363df38464c47a73eb521a4f648bfcc7537a82d70347ef8af3f73b6d019e910" +dependencies = [ + "frame-support-procedural-tools-derive 11.0.0", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] name = "frame-support-procedural-tools-derive" version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4118,6 +4531,17 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "frame-support-procedural-tools-derive" +version = "11.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68672b9ec6fe72d259d3879dc212c5e42e977588cdac830c76f54d9f492aeb58" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "frame-system" version = "25.0.0" @@ -4159,6 +4583,27 @@ dependencies = [ "sp-weights 26.0.0", ] +[[package]] +name = "frame-system" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bc20a793c3cec0b11165c1075fe11a255b2491f3eef8230bb3073cb296e7383" +dependencies = [ + "cfg-if", + "docify", + "frame-support 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-version 30.0.0", + "sp-weights 28.0.0", +] + [[package]] name = "frame-system-benchmarking" version = "25.0.0" @@ -4430,6 +4875,16 @@ dependencies = [ "wasi 0.11.0+wasi-snapshot-preview1", ] +[[package]] +name = "getrandom_or_panic" +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.5.0" @@ -6115,6 +6570,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + [[package]] name = "mick-jaeger" version = "0.1.8" @@ -6990,7 +7457,7 @@ version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46d48f60b6da70607edc794cc05e72ae70ea532ec539094ffcc4c7c9250a453b" dependencies = [ - "aquamarine", + "aquamarine 0.3.2", "docify", "frame-benchmarking 27.0.0", "frame-election-provider-support 27.0.0", @@ -7039,6 +7506,23 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-balances" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "942007f4f7aace74b77009db1675e7ca98683a42dde5e2d85bba2a9f404d2e5a" +dependencies = [ + "docify", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-beefy" version = "27.0.0" @@ -7112,7 +7596,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17d6a612927f39c3a92a426fe0d226cc17b2bc8b60122e767d186d5e210ed12a" dependencies = [ "bp-header-chain", - "bp-runtime", + "bp-runtime 0.6.0", "bp-test-utils", "finality-grandpa", "frame-benchmarking 27.0.0", @@ -7134,7 +7618,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cfc14baf0e65041a2cf9874c08d3e82212fe5d10f6a3ac1d0f40fcffac188f" dependencies = [ "bp-messages", - "bp-runtime", + "bp-runtime 0.6.0", "frame-benchmarking 27.0.0", "frame-support 27.0.0", "frame-system 27.0.0", @@ -7155,7 +7639,7 @@ dependencies = [ "bp-header-chain", "bp-parachains", "bp-polkadot-core", - "bp-runtime", + "bp-runtime 0.6.0", "frame-benchmarking 27.0.0", "frame-support 27.0.0", "frame-system 27.0.0", @@ -7176,7 +7660,7 @@ checksum = "273095478c3a09de73b7a01db3b2f938070621bc47e92cbbdadd31b7ba73f94c" dependencies = [ "bp-messages", "bp-relayers", - "bp-runtime", + "bp-runtime 0.6.0", "frame-benchmarking 27.0.0", "frame-support 27.0.0", "frame-system 27.0.0", @@ -7852,6 +8336,27 @@ dependencies = [ "sp-weights 26.0.0", ] +[[package]] +name = "pallet-message-queue" +version = "32.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ccb23dee70b184a214d729db550117a0965a69107d466d35181d60a6feede38" +dependencies = [ + "environmental", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-weights 28.0.0", +] + [[package]] name = "pallet-mmr" version = "26.0.0" @@ -8181,6 +8686,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3508a51d359c6640577feead9dc00667f38cec385baad77b636c61ff746ffe24" dependencies = [ "docify", + "frame-benchmarking 25.0.0", "frame-support 25.0.0", "frame-system 25.0.0", "log", @@ -8462,6 +8968,27 @@ dependencies = [ "sp-timestamp 25.0.0", ] +[[package]] +name = "pallet-timestamp" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1b8810ddfb254c7fb8cd7698229cce513d309a43ff117b38798dae6120f477b" +dependencies = [ + "docify", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "sp-timestamp 27.0.0", +] + [[package]] name = "pallet-tips" version = "26.0.0" @@ -8516,6 +9043,23 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "pallet-transaction-payment" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39f690f5c287ad34b28ca951ef7fae80b08cc9218d970723b7a70e4d29396872" +dependencies = [ + "frame-support 29.0.0", + "frame-system 29.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "25.0.0" @@ -8686,7 +9230,7 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04d5e5404d9dadb39390949aadc2c641c16ce4cb0f47ed7a7ff584ab914c2984" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "frame-benchmarking 25.0.0", "frame-support 25.0.0", "frame-system 25.0.0", @@ -8708,7 +9252,7 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76c4eb9211a13bffe31ba0555c382b2e377213ccf7bfd800b115e222cb349142" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "frame-benchmarking 27.0.0", "frame-support 27.0.0", "frame-system 27.0.0", @@ -8773,7 +9317,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ac06adbe492bda1c840e3a775b69d619391fe1a631cebd76010dc8394fed75f" dependencies = [ "bp-messages", - "bp-runtime", + "bp-runtime 0.6.0", "bp-xcm-bridge-hub", "bridge-runtime-common", "frame-support 27.0.0", @@ -8915,6 +9459,12 @@ dependencies = [ "substrate-wasm-builder 16.0.0", ] +[[package]] +name = "parity-bytes" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b56e3a2420138bdb970f84dfb9c774aea80fa0e7371549eedec0d80c209c67" + [[package]] name = "parity-db" version = "0.4.13" @@ -8957,7 +9507,7 @@ version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate 2.0.1", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 1.0.109", @@ -9172,6 +9722,17 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "pest" +version = "2.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + [[package]] name = "petgraph" version = "0.6.4" @@ -9268,6 +9829,19 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "polkadot-core-primitives" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6a08e4e014c853b252ecbbe3ccd67b2d33d78e46988d309b8cccf4ac06e25ef" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "polkadot-node-jaeger" version = "4.0.0" @@ -9407,7 +9981,7 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives 3.0.0", "polkadot-primitives 4.0.0", - "schnorrkel", + "schnorrkel 0.9.1", "serde", "sp-application-crypto 27.0.0", "sp-consensus-babe 0.29.0", @@ -9431,7 +10005,7 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives 5.0.0", "polkadot-primitives 6.0.0", - "schnorrkel", + "schnorrkel 0.9.1", "serde", "sp-application-crypto 29.0.0", "sp-consensus-babe 0.31.0", @@ -9550,7 +10124,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42265630c0c48e25d7ee5a9f4bdcafd003be65c0a44deeb6541620ca169fa519" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "derive_more", "frame-support 25.0.0", "parity-scale-codec", @@ -9568,7 +10142,7 @@ version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47b0b8521215ec97799c75a7531c2ac0627fa2b8916fde2bdc6c79bf05b93645" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "derive_more", "parity-scale-codec", "polkadot-core-primitives 6.0.0", @@ -9580,6 +10154,24 @@ dependencies = [ "sp-weights 26.0.0", ] +[[package]] +name = "polkadot-parachain-primitives" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248ab090959a92e61493277e33b7e85104280a4beb4cb0815137d3c8c50a07f4" +dependencies = [ + "bounded-collections 0.2.0", + "derive_more", + "parity-scale-codec", + "polkadot-core-primitives 8.0.0", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-weights 28.0.0", +] + [[package]] name = "polkadot-primitives" version = "4.0.0" @@ -9634,6 +10226,33 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "polkadot-primitives" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f66d047db81997a1ec9526987031b0d8f146edb0bdcdc0f9af73f6a2aa62fbce" +dependencies = [ + "bitvec", + "hex-literal", + "parity-scale-codec", + "polkadot-core-primitives 8.0.0", + "polkadot-parachain-primitives 7.0.0", + "scale-info", + "serde", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", + "sp-authority-discovery 27.0.0", + "sp-consensus-slots 0.33.0", + "sp-core 29.0.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", + "sp-staking 27.0.0", + "sp-std 14.0.0", +] + [[package]] name = "polkadot-runtime" version = "1.0.0" @@ -10158,14 +10777,22 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" dependencies = [ - "toml_datetime", "toml_edit 0.20.2", ] +[[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]] name = "proc-macro-error" version = "1.0.4" @@ -10247,6 +10874,26 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.4.1", + "lazy_static", + "num-traits", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax 0.8.2", + "rusty-fork", + "tempfile", + "unarray", +] + [[package]] name = "prost" version = "0.11.9" @@ -10472,6 +11119,15 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -10761,6 +11417,36 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ruint" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608a5726529f2f0ef81b8fde9873c4bb829d6b5b5ca6be4d97345ddf0749c825" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand 0.8.5", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e666a5496a0b2186dbcd0ff6106e29e093c15591bde62c20d3842007c6978a09" + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -10788,6 +11474,15 @@ dependencies = [ "semver 0.9.0", ] +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + [[package]] name = "rustc_version" version = "0.4.0" @@ -10894,6 +11589,18 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -11144,7 +11851,7 @@ dependencies = [ "sp-core 25.0.0", "sp-keyring 28.0.0", "sp-keystore 0.31.0", - "sp-panic-handler", + "sp-panic-handler 12.0.0", "sp-runtime 28.0.0", "sp-version 26.0.0", "thiserror", @@ -11187,7 +11894,7 @@ dependencies = [ "sp-core 27.0.0", "sp-keyring 30.0.0", "sp-keystore 0.33.0", - "sp-panic-handler", + "sp-panic-handler 12.0.0", "sp-runtime 30.0.1", "sp-version 28.0.0", "thiserror", @@ -11414,7 +12121,7 @@ dependencies = [ "sp-core 25.0.0", "sp-externalities 0.23.0", "sp-io 27.0.0", - "sp-panic-handler", + "sp-panic-handler 12.0.0", "sp-runtime-interface 21.0.0", "sp-trie 26.0.0", "sp-version 26.0.0", @@ -11437,7 +12144,7 @@ dependencies = [ "sp-core 27.0.0", "sp-externalities 0.24.0", "sp-io 29.0.0", - "sp-panic-handler", + "sp-panic-handler 12.0.0", "sp-runtime-interface 23.0.0", "sp-trie 28.0.0", "sp-version 28.0.0", @@ -12639,7 +13346,7 @@ dependencies = [ "arrayvec 0.5.2", "curve25519-dalek 2.1.3", "getrandom 0.1.16", - "merlin", + "merlin 2.0.1", "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", @@ -12647,6 +13354,25 @@ dependencies = [ "zeroize", ] +[[package]] +name = "schnorrkel" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" +dependencies = [ + "aead", + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek 4.1.2", + "getrandom_or_panic", + "merlin 3.0.0", + "rand_core 0.6.4", + "serde_bytes", + "sha2 0.10.8", + "subtle 2.5.0", + "zeroize", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -12757,7 +13483,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", ] [[package]] @@ -12766,7 +13492,16 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser 0.10.2", ] [[package]] @@ -12784,6 +13519,15 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + [[package]] name = "separator" version = "0.4.1" @@ -12799,6 +13543,24 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-big-array" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd31f59f6fe2b0c055371bb2f16d7f0aa7d8881676c04a55b1596d1a17cd10a4" +dependencies = [ + "serde", +] + +[[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.195" @@ -13029,6 +13791,331 @@ dependencies = [ "subtle 2.5.0", ] +[[package]] +name = "snowbridge-amcl" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460a9ed63cdf03c1b9847e8a12a5f5ba19c4efd5869e4a737e05be25d7c427e5" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "snowbridge-beacon-primitives" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a73ef707257064bc4ecce8323cdb7c30e8ecd1ce74aa89a6e82e81fa8b9970" +dependencies = [ + "byte-slice-cast", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex", + "parity-scale-codec", + "rlp", + "scale-info", + "serde", + "snowbridge-ethereum", + "snowbridge-milagro-bls", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "ssz_rs", + "ssz_rs_derive", + "static_assertions", +] + +[[package]] +name = "snowbridge-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d3615664be8525d6f23e42dce1c314abc7f961a7f862b74012444e16d5dde5c" +dependencies = [ + "ethabi-decode", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "parity-scale-codec", + "polkadot-parachain-primitives 7.0.0", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", +] + +[[package]] +name = "snowbridge-ethereum" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "315ad74f081734cb51f48bb10cd18a3f83cfec3c09a551bc936027708635e808" +dependencies = [ + "ethabi-decode", + "ethbloom", + "ethereum-types", + "hex-literal", + "parity-bytes", + "parity-scale-codec", + "rlp", + "rustc-hex", + "scale-info", + "serde", + "serde-big-array", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + +[[package]] +name = "snowbridge-milagro-bls" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "026aa8638f690a53e3f7676024b9e913b1cab0111d1b7b92669d40a188f9d7e6" +dependencies = [ + "hex", + "lazy_static", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "snowbridge-amcl", + "zeroize", +] + +[[package]] +name = "snowbridge-outbound-queue-merkle-tree" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5382cf77aeb8a92a142751949cdea1f230b7864e1ea687352c28439faabcf69d" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core 29.0.0", + "sp-runtime 32.0.0", +] + +[[package]] +name = "snowbridge-outbound-queue-runtime-api" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4933810488df1660cf60f53a7952ce1dff6aaef72d9fc740e1274e937136444e" +dependencies = [ + "frame-support 29.0.0", + "parity-scale-codec", + "snowbridge-core", + "snowbridge-outbound-queue-merkle-tree", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", +] + +[[package]] +name = "snowbridge-pallet-ethereum-client" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0fd437cd5db8b7d16cdd4da110d674d245532afa31df10108a11858a07844a6" +dependencies = [ + "bp-runtime 0.8.0", + "byte-slice-cast", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "log", + "pallet-timestamp 28.0.0", + "parity-scale-codec", + "rlp", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-ethereum", + "snowbridge-pallet-ethereum-client-fixtures", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "ssz_rs", + "ssz_rs_derive", + "static_assertions", +] + +[[package]] +name = "snowbridge-pallet-ethereum-client-fixtures" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3d5b4b7e17eaadbc52ac3fc9fbcce63dfc60c05a1b19604cd009d6595c1175e" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "snowbridge-beacon-primitives", + "snowbridge-core", + "sp-core 29.0.0", + "sp-std 14.0.0", +] + +[[package]] +name = "snowbridge-pallet-inbound-queue" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79c1fbfd32dbba082a9312c02c3ef35de929741f78f48e88b7668909350ef9e2" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "log", + "num-traits", + "pallet-balances 29.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-ethereum", + "snowbridge-pallet-inbound-queue-fixtures", + "snowbridge-router-primitives", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + +[[package]] +name = "snowbridge-pallet-inbound-queue-fixtures" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d8fff63b0a64d1dd06571ad074e664594bd9392481cd3489edde36e1d2dcc96" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "snowbridge-beacon-primitives", + "snowbridge-core", + "sp-core 29.0.0", + "sp-std 14.0.0", +] + +[[package]] +name = "snowbridge-pallet-outbound-queue" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c7498ba5bc2b15e1d032b3e44659cd117cad24eab457a40dc5e17acfaac0aff" +dependencies = [ + "bridge-hub-common", + "ethabi-decode", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-core", + "snowbridge-outbound-queue-merkle-tree", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", +] + +[[package]] +name = "snowbridge-pallet-system" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6a410d9312bdcc3ba5944abb7d21f6b25065b32c7f8b39b9c7a4b0bd0dacfb4" +dependencies = [ + "ethabi-decode", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "snowbridge-core", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + +[[package]] +name = "snowbridge-router-primitives" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee5cc8e156f033971c5435676be92ab6f70a926b3497ca9c28c0dde9697b8da9" +dependencies = [ + "ethabi-decode", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-core", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + +[[package]] +name = "snowbridge-runtime-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d751007be1c9c68b075b0b1f9b02c25a02f458903a2c7893ba6e4231a00c24a" +dependencies = [ + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "snowbridge-core", + "sp-arithmetic 24.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + +[[package]] +name = "snowbridge-system-runtime-api" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5c3c4e6e87b76ae1f9639bbc1528e1ae4e5a8d6a16d02d8d48e56d4a89f4ca" +dependencies = [ + "parity-scale-codec", + "snowbridge-core", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", +] + [[package]] name = "socket2" version = "0.4.10" @@ -13110,6 +14197,28 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sp-api" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ef42aa652381ade883c14ffbbb5c0fec36d382d2217b5bace01b8a0e8634778" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "scale-info", + "sp-api-proc-macro 15.0.0", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-metadata-ir 0.6.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", + "sp-std 14.0.0", + "sp-trie 30.0.0", + "sp-version 30.0.0", + "thiserror", +] + [[package]] name = "sp-api-proc-macro" version = "12.0.0" @@ -13134,7 +14243,22 @@ dependencies = [ "Inflector", "blake2 0.10.6", "expander 2.0.0", - "proc-macro-crate 2.0.1", + "proc-macro-crate 2.0.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "sp-api-proc-macro" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0694be2891593450916d6b53a274d234bccbc86bcbada36ba23fc356989070c7" +dependencies = [ + "Inflector", + "blake2 0.10.6", + "expander 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 2.0.48", @@ -13168,6 +14292,20 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "sp-application-crypto" +version = "31.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "547cad7a6eabb52c639ec117b3db9c6b43cf1b29a9393b18feb19e101a91833f" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-std 14.0.0", +] + [[package]] name = "sp-arithmetic" version = "20.0.0" @@ -13198,6 +14336,21 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "sp-arithmetic" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afa823ca5adc490d47dccb41d69ad482bc57a317bd341de275868378f48f131c" +dependencies = [ + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-std 14.0.0", + "static_assertions", +] + [[package]] name = "sp-authority-discovery" version = "23.0.0" @@ -13226,6 +14379,20 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "sp-authority-discovery" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92b177c72b5d2973c36d60f6ef942d791d9fd91eae8b08c71882e4118d4fbfc" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api 27.0.0", + "sp-application-crypto 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "sp-block-builder" version = "23.0.0" @@ -13480,6 +14647,19 @@ dependencies = [ "sp-timestamp 25.0.0", ] +[[package]] +name = "sp-consensus-slots" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73a5bd1fcd84bbdc7255528c7cdb92f9357fd555f06ee553af7e340cbdab517c" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-std 14.0.0", + "sp-timestamp 27.0.0", +] + [[package]] name = "sp-core" version = "25.0.0" @@ -13489,7 +14669,7 @@ dependencies = [ "array-bytes 6.2.2", "bitflags 1.3.2", "blake2 0.10.6", - "bounded-collections", + "bounded-collections 0.1.9", "bs58 0.5.0", "dyn-clonable", "ed25519-zebra", @@ -13500,7 +14680,7 @@ dependencies = [ "lazy_static", "libsecp256k1", "log", - "merlin", + "merlin 2.0.1", "parity-scale-codec", "parking_lot 0.12.1", "paste", @@ -13508,7 +14688,7 @@ dependencies = [ "rand 0.8.5", "regex", "scale-info", - "schnorrkel", + "schnorrkel 0.9.1", "secp256k1 0.24.3", "secrecy", "serde", @@ -13537,7 +14717,7 @@ dependencies = [ "bip39", "bitflags 1.3.2", "blake2 0.10.6", - "bounded-collections", + "bounded-collections 0.1.9", "bs58 0.5.0", "dyn-clonable", "ed25519-zebra", @@ -13548,14 +14728,14 @@ dependencies = [ "itertools 0.10.5", "libsecp256k1", "log", - "merlin", + "merlin 2.0.1", "parity-scale-codec", "parking_lot 0.12.1", "paste", "primitive-types", "rand 0.8.5", "scale-info", - "schnorrkel", + "schnorrkel 0.9.1", "secp256k1 0.28.1", "secrecy", "serde", @@ -13573,6 +14753,52 @@ dependencies = [ "zeroize", ] +[[package]] +name = "sp-core" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c33c7a1568175250628567d50c4e1c54a6ac5bc1190413b9be29a9e810cbe73" +dependencies = [ + "array-bytes 6.2.2", + "bip39", + "bitflags 1.3.2", + "blake2 0.10.6", + "bounded-collections 0.2.0", + "bs58 0.5.0", + "dyn-clonable", + "ed25519-zebra", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "itertools 0.10.5", + "libsecp256k1", + "log", + "merlin 3.0.0", + "parity-scale-codec", + "parking_lot 0.12.1", + "paste", + "primitive-types", + "rand 0.8.5", + "scale-info", + "schnorrkel 0.11.4", + "secp256k1 0.28.1", + "secrecy", + "serde", + "sp-crypto-hashing", + "sp-debug-derive 14.0.0", + "sp-externalities 0.26.0", + "sp-runtime-interface 25.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "ss58-registry", + "substrate-bip39", + "thiserror", + "tracing", + "w3f-bls", + "zeroize", +] + [[package]] name = "sp-core-hashing" version = "13.0.0" @@ -13623,6 +14849,31 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "sp-crypto-hashing" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9927a7f81334ed5b8a98a4a978c81324d12bd9713ec76b5c68fd410174c5eb" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.8", + "sha3", + "twox-hash", +] + +[[package]] +name = "sp-crypto-hashing-proc-macro" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b85d0f1f1e44bd8617eb2a48203ee854981229e3e79e6f468c7175d5fd37489b" +dependencies = [ + "quote", + "sp-crypto-hashing", + "syn 2.0.48", +] + [[package]] name = "sp-database" version = "9.0.0" @@ -13655,6 +14906,17 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "sp-debug-derive" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d09fa0a5f7299fb81ee25ae3853d26200f7a348148aed6de76be905c007dbe" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "sp-externalities" version = "0.23.0" @@ -13679,6 +14941,18 @@ dependencies = [ "sp-storage 18.0.0", ] +[[package]] +name = "sp-externalities" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7096ed024cec397804864898b093b51e14c7299f1d00c67dd5800330e02bb82" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 14.0.0", + "sp-storage 20.0.0", +] + [[package]] name = "sp-genesis-builder" version = "0.4.0" @@ -13703,6 +14977,18 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "sp-genesis-builder" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd865540ec19479c7349b584ccd78cc34c3f3a628a2a69dbb6365ceec36295ee" +dependencies = [ + "serde_json", + "sp-api 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "sp-inherents" version = "23.0.0" @@ -13733,6 +15019,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sp-inherents" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "607c9e35e96966645ff180a9e9f976433b96e905d0a91d8d5315e605a21f4bc0" +dependencies = [ + "async-trait", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "thiserror", +] + [[package]] name = "sp-io" version = "27.0.0" @@ -13783,6 +15084,32 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "sp-io" +version = "31.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec43aa073eab35fcb920d7592474d5427ea3be2bf938706a3ad955d7ba54fd8d" +dependencies = [ + "bytes", + "ed25519-dalek", + "libsecp256k1", + "log", + "parity-scale-codec", + "rustversion", + "secp256k1 0.28.1", + "sp-core 29.0.0", + "sp-crypto-hashing", + "sp-externalities 0.26.0", + "sp-keystore 0.35.0", + "sp-runtime-interface 25.0.0", + "sp-state-machine 0.36.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", + "sp-trie 30.0.0", + "tracing", + "tracing-core", +] + [[package]] name = "sp-keyring" version = "28.0.0" @@ -13833,6 +15160,19 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sp-keystore" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "444f2d53968b1ce5e908882710ff1f3873fcf3e95f59d57432daf685bbacb959" +dependencies = [ + "parity-scale-codec", + "parking_lot 0.12.1", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "thiserror", +] + [[package]] name = "sp-maybe-compressed-blob" version = "9.0.0" @@ -13877,6 +15217,18 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "sp-metadata-ir" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa0b5e87e56c1bb26d9524d48dd127121d630f895bd5914a34f0b017489f7c1d" +dependencies = [ + "frame-metadata", + "parity-scale-codec", + "scale-info", + "sp-std 14.0.0", +] + [[package]] name = "sp-mixnet" version = "0.1.0" @@ -13985,6 +15337,17 @@ dependencies = [ "regex", ] +[[package]] +name = "sp-panic-handler" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8f5a17a0a11de029a8b811cb6e8b32ce7e02183cc04a3e965c383246798c416" +dependencies = [ + "backtrace", + "lazy_static", + "regex", +] + [[package]] name = "sp-rpc" version = "23.0.0" @@ -14055,6 +15418,31 @@ dependencies = [ "sp-weights 26.0.0", ] +[[package]] +name = "sp-runtime" +version = "32.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a95e71603a6281e91b0f1fd3d68057644be16d75a4602013187b8137db8abee" +dependencies = [ + "docify", + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "paste", + "rand 0.8.5", + "scale-info", + "serde", + "simple-mermaid", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-std 14.0.0", + "sp-weights 28.0.0", +] + [[package]] name = "sp-runtime-interface" version = "21.0.0" @@ -14076,20 +15464,39 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "23.0.0" +version = "23.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0093f419cb2ef80c8ecb583ac54e05d1105710eb84add7f9483c8ea882cbaff" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.24.0", + "sp-runtime-interface-proc-macro 16.0.0", + "sp-std 13.0.0", + "sp-storage 18.0.0", + "sp-tracing 15.0.0", + "sp-wasm-interface 19.0.0", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0093f419cb2ef80c8ecb583ac54e05d1105710eb84add7f9483c8ea882cbaff" +checksum = "4e2321ab29d4bcc31f1ba1b4f076a81fb2a666465231e5c981c72320d74dbe63" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities 0.24.0", - "sp-runtime-interface-proc-macro 16.0.0", - "sp-std 13.0.0", - "sp-storage 18.0.0", - "sp-tracing 15.0.0", - "sp-wasm-interface 19.0.0", + "sp-externalities 0.26.0", + "sp-runtime-interface-proc-macro 17.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "sp-tracing 16.0.0", + "sp-wasm-interface 20.0.0", "static_assertions", ] @@ -14114,7 +15521,21 @@ checksum = "5ebdb4aff8286f5095871b2f950037d690edb0fed0590af5f6735352533a53b6" dependencies = [ "Inflector", "expander 2.0.0", - "proc-macro-crate 2.0.1", + "proc-macro-crate 2.0.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "17.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfaf6e85b2ec12a4b99cd6d8d57d083e30c94b7f1b0d8f93547121495aae6f0c" +dependencies = [ + "Inflector", + "expander 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 2.0.48", @@ -14182,6 +15603,21 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "sp-staking" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e14d003ecf0b610bf1305a92bdab875289b39d514c073f30e75e78c2763a788" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + [[package]] name = "sp-state-machine" version = "0.32.0" @@ -14196,7 +15632,7 @@ dependencies = [ "smallvec", "sp-core 25.0.0", "sp-externalities 0.23.0", - "sp-panic-handler", + "sp-panic-handler 12.0.0", "sp-std 12.0.0", "sp-trie 26.0.0", "thiserror", @@ -14218,7 +15654,7 @@ dependencies = [ "smallvec", "sp-core 27.0.0", "sp-externalities 0.24.0", - "sp-panic-handler", + "sp-panic-handler 12.0.0", "sp-std 13.0.0", "sp-trie 28.0.0", "thiserror", @@ -14226,6 +15662,28 @@ dependencies = [ "trie-db", ] +[[package]] +name = "sp-state-machine" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a67297e702aa32027d7766803f362a420d6d3ec9e2f84961f3c64e2e52b5aaf9" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "smallvec", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-panic-handler 13.0.0", + "sp-std 14.0.0", + "sp-trie 30.0.0", + "thiserror", + "tracing", + "trie-db", +] + [[package]] name = "sp-statement-store" version = "7.0.0" @@ -14288,6 +15746,12 @@ version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71323a3b5f189085d11123ce397b3cdfaec4437071243b51f68a38a4833fbaa7" +[[package]] +name = "sp-std" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" + [[package]] name = "sp-storage" version = "17.0.0" @@ -14316,6 +15780,20 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "sp-storage" +version = "20.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dba5791cb3978e95daf99dad919ecb3ec35565604e88cd38d805d9d4981e8bd" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 14.0.0", + "sp-std 14.0.0", +] + [[package]] name = "sp-timestamp" version = "23.0.0" @@ -14344,6 +15822,20 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sp-timestamp" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "249cd06624f2edb53b25af528ab216a508dc9d0870e158b43caac3a97e86699f" +dependencies = [ + "async-trait", + "parity-scale-codec", + "sp-inherents 27.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "thiserror", +] + [[package]] name = "sp-tracing" version = "14.0.0" @@ -14370,6 +15862,19 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "sp-tracing" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0351810b9d074df71c4514c5228ed05c250607cba131c1c9d1526760ab69c05c" +dependencies = [ + "parity-scale-codec", + "sp-std 14.0.0", + "tracing", + "tracing-core", + "tracing-subscriber", +] + [[package]] name = "sp-transaction-pool" version = "23.0.0" @@ -14473,6 +15978,31 @@ dependencies = [ "trie-root", ] +[[package]] +name = "sp-trie" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed48dfd05081e8b36741b10ce4eb686c135a2952227a11fe71caec89890ddbb" +dependencies = [ + "ahash 0.8.8", + "hash-db", + "lazy_static", + "memory-db", + "nohash-hasher", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "scale-info", + "schnellru", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-std 14.0.0", + "thiserror", + "tracing", + "trie-db", + "trie-root", +] + [[package]] name = "sp-version" version = "26.0.0" @@ -14487,7 +16017,7 @@ dependencies = [ "sp-core-hashing-proc-macro 13.0.0", "sp-runtime 28.0.0", "sp-std 12.0.0", - "sp-version-proc-macro", + "sp-version-proc-macro 12.0.0", "thiserror", ] @@ -14505,7 +16035,25 @@ dependencies = [ "sp-core-hashing-proc-macro 14.0.0", "sp-runtime 30.0.1", "sp-std 13.0.0", - "sp-version-proc-macro", + "sp-version-proc-macro 12.0.0", + "thiserror", +] + +[[package]] +name = "sp-version" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff4a660c68995663d6778df324f4e2b4efc48d55a8e9c92c22a5fb7dae7899cd" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "parity-wasm", + "scale-info", + "serde", + "sp-crypto-hashing-proc-macro", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-version-proc-macro 13.0.0", "thiserror", ] @@ -14521,6 +16069,18 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "sp-version-proc-macro" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9bc3fed32d6dacbbbfb28dd1fe0224affbb737cb6cbfca1d9149351c2b69a7d" +dependencies = [ + "parity-scale-codec", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "sp-wasm-interface" version = "18.0.0" @@ -14549,6 +16109,20 @@ dependencies = [ "wasmtime", ] +[[package]] +name = "sp-wasm-interface" +version = "20.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ef97172c42eb4c6c26506f325f48463e9bc29b2034a587f1b9e48c751229bee" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std 14.0.0", + "wasmtime", +] + [[package]] name = "sp-weights" version = "24.0.0" @@ -14571,7 +16145,7 @@ version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8813a9942a3b900d5ce109875b91ff8ae7eb5849545ebb6464c22aa21e42622e" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "parity-scale-codec", "scale-info", "serde", @@ -14581,6 +16155,22 @@ dependencies = [ "sp-std 13.0.0", ] +[[package]] +name = "sp-weights" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3be30aec904994451dcacf841a9168cfbbaf817de6b24b6a1c1418cbf1af2fe" +dependencies = [ + "bounded-collections 0.2.0", + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic 24.0.0", + "sp-debug-derive 14.0.0", + "sp-std 14.0.0", +] + [[package]] name = "spin" version = "0.5.2" @@ -14629,6 +16219,29 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "ssz_rs" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "057291e5631f280978fa9c8009390663ca4613359fc1318e36a8c24c392f6d1f" +dependencies = [ + "bitvec", + "num-bigint", + "sha2 0.9.9", + "ssz_rs_derive", +] + +[[package]] +name = "ssz_rs_derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f07d54c4d01a1713eb363b55ba51595da15f6f1211435b71466460da022aa140" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -14786,7 +16399,7 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abd0c2e401a1e264379131c27676bc65c9631aaa508044bc04d8ce60a7d8524" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "derivative", "environmental", "impl-trait-for-tuples", @@ -14804,7 +16417,7 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "407cc6e4b9cd1b62df9270d921d94ed375e697d65a782975d5e5a5f85bbeafb5" dependencies = [ - "bounded-collections", + "bounded-collections 0.1.9", "derivative", "environmental", "impl-trait-for-tuples", @@ -14816,6 +16429,25 @@ dependencies = [ "xcm-procedural 6.0.0", ] +[[package]] +name = "staging-xcm" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ccecaeae5eca8453760e96fcf65481b19898459971842004732e88cd3570741" +dependencies = [ + "array-bytes 6.2.2", + "bounded-collections 0.2.0", + "derivative", + "environmental", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-weights 28.0.0", + "xcm-procedural 8.0.0", +] + [[package]] name = "staging-xcm-builder" version = "4.0.1" @@ -14862,6 +16494,29 @@ dependencies = [ "staging-xcm-executor 6.0.2", ] +[[package]] +name = "staging-xcm-builder" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e8c74e3d5b47173a22ad468ab28aeb88cfb92b742fa91a95fe1a8230c2365f" +dependencies = [ + "frame-support 29.0.0", + "frame-system 29.0.0", + "impl-trait-for-tuples", + "log", + "pallet-transaction-payment 29.0.0", + "parity-scale-codec", + "polkadot-parachain-primitives 7.0.0", + "scale-info", + "sp-arithmetic 24.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-weights 28.0.0", + "staging-xcm 8.0.0", + "staging-xcm-executor 8.0.0", +] + [[package]] name = "staging-xcm-executor" version = "4.0.2" @@ -14905,6 +16560,28 @@ dependencies = [ "staging-xcm 6.0.0", ] +[[package]] +name = "staging-xcm-executor" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "666e4c4fb7b1e91342a54281cb15bda81e17b795c6072f8b4892946249c03922" +dependencies = [ + "environmental", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "sp-weights 28.0.0", + "staging-xcm 8.0.0", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -14988,7 +16665,7 @@ checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", - "schnorrkel", + "schnorrkel 0.9.1", "sha2 0.9.9", "zeroize", ] @@ -15125,6 +16802,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn-solidity" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b837ef12ab88835251726eb12237655e61ec8dc8a280085d1961cdc3dfd047" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "synstructure" version = "0.12.6" @@ -15170,6 +16859,7 @@ dependencies = [ "polkadot-runtime-constants", "smallvec", "sp-runtime 30.0.1", + "staging-xcm 6.0.0", ] [[package]] @@ -15480,9 +17170,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] @@ -15513,6 +17203,17 @@ dependencies = [ "winnow", ] +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + [[package]] name = "tower" version = "0.4.13" @@ -15777,6 +17478,12 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + [[package]] name = "uint" version = "0.9.5" @@ -15789,6 +17496,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + [[package]] name = "unicode-bidi" version = "0.3.14" @@ -15906,8 +17619,8 @@ dependencies = [ "ark-bls12-377", "ark-bls12-381", "ark-ec", - "ark-ff", - "ark-serialize", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", "ark-serialize-derive", "arrayref", "constcat", @@ -15921,6 +17634,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + [[package]] name = "walkdir" version = "2.4.0" @@ -16757,6 +18479,18 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "xcm-procedural" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4717a97970a9cda70d7db53cf50d2615c2f6f6b7c857445325b4a39ea7aa2cd" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "yamux" version = "0.10.2" diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 62088f3ed3..3e52c3122c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -92,6 +92,7 @@ bp-relayers = { default-features = false , version = "0.6.0" } bp-runtime = { default-features = false , version = "0.6.0" } bp-kusama = { default-features = false , version = "0.4.0" } bp-polkadot = { default-features = false , version = "0.4.0" } +bridge-hub-common = { default-features = false , version = "0.1.0" } bridge-runtime-common = { default-features = false , version = "0.6.0" } pallet-bridge-grandpa = { default-features = false , version = "0.6.0" } pallet-bridge-messages = { default-features = false , version = "0.6.0" } From be4ceb4e96f1e2a118018fc81d0bec925d7eb51a Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Thu, 15 Feb 2024 10:11:08 +0100 Subject: [PATCH 117/316] chore(encointer): Remove ConstU64 import --- system-parachains/encointer/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index a84583643b..eb04d4753d 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -77,7 +77,7 @@ pub use parachains_common::{ }; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use sp_api::impl_runtime_apis; -use sp_core::{crypto::KeyTypeId, ConstU32, ConstU64, OpaqueMetadata}; +use sp_core::{crypto::KeyTypeId, ConstU32, OpaqueMetadata}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; use sp_runtime::{ From 3864204adb2542488bcfced64b6be29ebbb91560 Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Thu, 15 Feb 2024 10:11:41 +0100 Subject: [PATCH 118/316] chore: fmt --- relay/kusama/src/xcm_config.rs | 9 +++++---- relay/polkadot/src/xcm_config.rs | 8 ++++---- .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 6 +++--- .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 6 +++--- .../bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 10 +++++----- .../bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs | 10 +++++----- .../collectives/collectives-polkadot/src/xcm_config.rs | 4 ++-- 7 files changed, 27 insertions(+), 26 deletions(-) diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index bd1ff9adb7..883633c47f 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -38,10 +38,11 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, DescribeAllTerminal, DescribeFamily, FrameTransactionalProcessor, - HashedDescription, IsChildSystemParachain, IsConcrete, MintLocation, OriginToPluralityVoice, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, FungibleAdapter, + FungibleAdapter, HashedDescription, IsChildSystemParachain, IsConcrete, MintLocation, + OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, + XcmFeeToAccount, }; parameter_types! { diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index e202f5ba4b..21c654a326 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -43,10 +43,10 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, DescribeAllTerminal, DescribeFamily, FrameTransactionalProcessor, - HashedDescription, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, - UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, FungibleAdapter, + FungibleAdapter, HashedDescription, IsConcrete, MintLocation, OriginToPluralityVoice, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + XcmFeeManagerFromComponents, XcmFeeToAccount, }; parameter_types! { diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index a95383feb2..8d8665c0dd 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -43,12 +43,12 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor, - FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, - LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + FungibleAdapter, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, + IsConcrete, LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, - WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, FungibleAdapter, + WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index f2a15296fb..1391ec1266 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -43,12 +43,12 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor, - FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, - LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + FungibleAdapter, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, + IsConcrete, LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, - WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, FungibleAdapter, + WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index a8cce05d61..dff1b23071 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -41,11 +41,11 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor, - HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, - UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, FungibleAdapter, + FungibleAdapter, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 7a533be7a2..35db46788f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -41,11 +41,11 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor, - HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, - UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, FungibleAdapter, + FungibleAdapter, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 4971126944..a67316518d 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -38,12 +38,12 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, DescribeTerminus, EnsureXcmOrigin, - FixedWeightBounds, FrameTransactionalProcessor, HashedDescription, IsConcrete, + FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, HashedDescription, IsConcrete, OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, - XcmFeeToAccount, FungibleAdapter, + XcmFeeToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; From c62423201808f5208e302eeb0d65d1f3fd37e5d3 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 15 Feb 2024 11:11:51 +0100 Subject: [PATCH 119/316] Added changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11337e88b2..dbaf86f4b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fixed the lowering of Asset Hub existential deposits. - MMR leaves generated by `pallet_mmr` point to the next-authority-set of the current block instead of the prior block [polkadot-fellows/runtimes#169](https://github.com/polkadot-fellows/runtimes/pull/169) - Upgrade dependencies to the `polkadot-sdk@1.5.0` release ([polkadot-fellows/runtimes#137](https://github.com/polkadot-fellows/runtimes/pull/137)) +- Upgrade dependencies to the `polkadot-sdk@1.6.0` release ([polkadot-fellows/runtimes#159](https://github.com/polkadot-fellows/runtimes/pull/159)) ### Removed From 349fb522b8e9a5dd9cc58bed2f8909d351dae9ba Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 15 Feb 2024 13:27:13 +0100 Subject: [PATCH 120/316] [xcm] adapt https://github.com/paritytech/polkadot-sdk/pull/2422 (IsChildSystemParachain) --- Cargo.lock | 4 +-- relay/kusama/constants/Cargo.toml | 4 +-- relay/kusama/constants/src/lib.rs | 18 +++---------- relay/polkadot/constants/Cargo.toml | 4 +-- relay/polkadot/constants/src/lib.rs | 18 +++---------- .../asset-hub-kusama/src/xcm_config.rs | 27 ++++++------------- .../asset-hub-polkadot/src/xcm_config.rs | 23 ++++------------ .../bridge-hub-kusama/src/xcm_config.rs | 23 +++++----------- .../bridge-hub-polkadot/src/xcm_config.rs | 19 +++---------- .../collectives-polkadot/src/xcm_config.rs | 20 ++++---------- 10 files changed, 43 insertions(+), 117 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6e16ddddc3..7878e8b480 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5418,7 +5418,7 @@ dependencies = [ "sp-core 29.0.0", "sp-runtime 32.0.0", "sp-weights 28.0.0", - "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", ] [[package]] @@ -9811,7 +9811,7 @@ dependencies = [ "sp-core 29.0.0", "sp-runtime 32.0.0", "sp-weights 28.0.0", - "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", ] [[package]] diff --git a/relay/kusama/constants/Cargo.toml b/relay/kusama/constants/Cargo.toml index 5d19e4a1f6..f1087781d3 100644 --- a/relay/kusama/constants/Cargo.toml +++ b/relay/kusama/constants/Cargo.toml @@ -16,7 +16,7 @@ sp-runtime = { default-features = false , version = "32.0.0" } sp-weights = { default-features = false , version = "28.0.0" } sp-core = { default-features = false , version = "29.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "8.0.0" } [features] default = [ "std" ] @@ -27,5 +27,5 @@ std = [ "sp-core/std", "sp-runtime/std", "sp-weights/std", - "xcm/std" + "xcm-builder/std" ] diff --git a/relay/kusama/constants/src/lib.rs b/relay/kusama/constants/src/lib.rs index 342359608b..cda697ace0 100644 --- a/relay/kusama/constants/src/lib.rs +++ b/relay/kusama/constants/src/lib.rs @@ -99,7 +99,8 @@ pub mod fee { /// System Parachains. pub mod system_parachain { - use xcm::latest::prelude::*; + use primitives::Id; + use xcm_builder::IsChildSystemParachain; /// Asset Hub parachain ID. pub const ASSET_HUB_ID: u32 = 1000; @@ -108,19 +109,8 @@ pub mod system_parachain { /// Bridge Hub parachain ID. pub const BRIDGE_HUB_ID: u32 = 1002; - frame_support::match_types! { - // System parachains from Kusama point of view. - pub type SystemParachains: impl Contains = { - MultiLocation { - parents: 0, - interior: X1(Parachain( - ASSET_HUB_ID | - ENCOINTER_ID | - BRIDGE_HUB_ID - )), - } - }; - } + // System parachains from Kusama point of view. + pub type SystemParachains = IsChildSystemParachain; } /// Kusama Treasury pallet instance. diff --git a/relay/polkadot/constants/Cargo.toml b/relay/polkadot/constants/Cargo.toml index 332126e86e..473b2e35b8 100644 --- a/relay/polkadot/constants/Cargo.toml +++ b/relay/polkadot/constants/Cargo.toml @@ -16,7 +16,7 @@ sp-runtime = { default-features = false , version = "32.0.0" } sp-weights = { default-features = false , version = "28.0.0" } sp-core = { default-features = false , version = "29.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "8.0.0" } [features] default = [ "std" ] @@ -27,5 +27,5 @@ std = [ "sp-core/std", "sp-runtime/std", "sp-weights/std", - "xcm/std" + "xcm-builder/std" ] diff --git a/relay/polkadot/constants/src/lib.rs b/relay/polkadot/constants/src/lib.rs index 113c825ac6..e64b27d7b9 100644 --- a/relay/polkadot/constants/src/lib.rs +++ b/relay/polkadot/constants/src/lib.rs @@ -115,7 +115,8 @@ pub mod xcm { /// System Parachains. pub mod system_parachain { - use xcm::latest::prelude::*; + use primitives::Id; + use xcm_builder::IsChildSystemParachain; /// Asset Hub parachain ID. pub const ASSET_HUB_ID: u32 = 1000; @@ -124,19 +125,8 @@ pub mod system_parachain { /// Bridge Hub parachain ID. pub const BRIDGE_HUB_ID: u32 = 1002; - frame_support::match_types! { - // System parachains from Polkadot point of view. - pub type SystemParachains: impl Contains = { - MultiLocation { - parents: 0, - interior: X1(Parachain( - ASSET_HUB_ID | - COLLECTIVES_ID | - BRIDGE_HUB_ID - )), - } - }; - } + // System parachains from Polkadot point of view. + pub type SystemParachains = IsChildSystemParachain; } /// Polkadot Treasury pallet instance. diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 8d8665c0dd..774edf68b4 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -26,13 +26,12 @@ use frame_support::{ traits::{ConstU32, Contains, Equals, Everything, Nothing, PalletInfoAccess}, }; use frame_system::EnsureRoot; -use kusama_runtime_constants::system_parachain; use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, xcm_config::{ - AssetFeeAsExistentialDepositMultiplier, ConcreteAssetFromSystem, - RelayOrOtherSystemParachains, + AllSiblingSystemParachains, AssetFeeAsExistentialDepositMultiplier, + ConcreteAssetFromSystem, RelayOrOtherSystemParachains, }, }; use polkadot_parachain_primitives::primitives::Sibling; @@ -130,8 +129,8 @@ pub type ForeignAssetsConvertedConcreteId = assets_common::ForeignAssetsConverte // Ignore `TrustBackedAssets` explicitly StartsWith, // Ignore assets that start explicitly with our `GlobalConsensus(NetworkId)`, means: - // - foreign assets from our consensus should be: `MultiLocation {parents: 1, - // X*(Parachain(xyz), ..)}` + // - foreign assets from our consensus should be: `Location {parents: 1, X*(Parachain(xyz), + // ..)}` // - foreign assets outside our consensus with the same `GlobalConsensus(NetworkId)` won't // be accepted here StartsWithExplicitGlobalConsensus, @@ -479,23 +478,13 @@ pub type AssetFeeAsExistentialDepositMultiplierFeeCharger = AssetFeeAsExistentia TrustBackedAssetsInstance, >; -match_types! { - pub type SystemParachains: impl Contains = { - MultiLocation { - parents: 1, - interior: X1(Parachain( - system_parachain::ENCOINTER_ID | - system_parachain::BRIDGE_HUB_ID - )), - } - }; -} - /// Locations that will not be charged fees in the executor, /// either execution or delivery. /// We only waive fees for system functions, which these locations represent. -pub type WaivedLocations = - (RelayOrOtherSystemParachains, Equals); +pub type WaivedLocations = ( + RelayOrOtherSystemParachains, + Equals, +); /// Cases where a remote origin is accepted as trusted Teleporter for a given asset: /// diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 1391ec1266..606ef93034 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -30,12 +30,11 @@ use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, xcm_config::{ - AssetFeeAsExistentialDepositMultiplier, ConcreteAssetFromSystem, - RelayOrOtherSystemParachains, + AllSiblingSystemParachains, AssetFeeAsExistentialDepositMultiplier, + ConcreteAssetFromSystem, RelayOrOtherSystemParachains, }, }; use polkadot_parachain_primitives::primitives::Sibling; -use polkadot_runtime_constants::system_parachain; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; @@ -126,8 +125,8 @@ pub type ForeignAssetsConvertedConcreteId = assets_common::ForeignAssetsConverte // Ignore `TrustBackedAssets` explicitly StartsWith, // Ignore assets that start explicitly with our `GlobalConsensus(NetworkId)`, means: - // - foreign assets from our consensus should be: `MultiLocation {parents: 1, - // X*(Parachain(xyz), ..)}` + // - foreign assets from our consensus should be: `Location {parents: 1, X*(Parachain(xyz), + // ..)}` // - foreign assets outside our consensus with the same `GlobalConsensus(NetworkId)` won't // be accepted here StartsWithExplicitGlobalConsensus, @@ -422,23 +421,11 @@ pub type AssetFeeAsExistentialDepositMultiplierFeeCharger = AssetFeeAsExistentia TrustBackedAssetsInstance, >; -match_types! { - pub type SystemParachains: impl Contains = { - MultiLocation { - parents: 1, - interior: X1(Parachain( - system_parachain::COLLECTIVES_ID | - system_parachain::BRIDGE_HUB_ID - )), - } - }; -} - /// Locations that will not be charged fees in the executor, /// either execution or delivery. /// We only waive fees for system functions, which these locations represent. pub type WaivedLocations = ( - RelayOrOtherSystemParachains, + RelayOrOtherSystemParachains, Equals, FellowshipEntities, ); diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index dff1b23071..ae322290ad 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -27,11 +27,12 @@ use frame_support::{ traits::{ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; -use kusama_runtime_constants::system_parachain; use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, - xcm_config::{ConcreteAssetFromSystem, RelayOrOtherSystemParachains}, + xcm_config::{ + AllSiblingSystemParachains, ConcreteAssetFromSystem, RelayOrOtherSystemParachains, + }, }; use polkadot_parachain_primitives::primitives::Sibling; use sp_runtime::traits::AccountIdConversion; @@ -226,23 +227,13 @@ pub type Barrier = TrailingSetTopicAsId< >, >; -match_types! { - pub type SystemParachains: impl Contains = { - MultiLocation { - parents: 1, - interior: X1(Parachain( - system_parachain::ASSET_HUB_ID | - system_parachain::ENCOINTER_ID - )), - } - }; -} - /// Locations that will not be charged fees in the executor, /// either execution or delivery. /// We only waive fees for system functions, which these locations represent. -pub type WaivedLocations = - (RelayOrOtherSystemParachains, Equals); +pub type WaivedLocations = ( + RelayOrOtherSystemParachains, + Equals, +); /// Cases where a remote origin is accepted as trusted Teleporter for a given asset: /// - KSM with the parent Relay Chain and sibling parachains. diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 35db46788f..6fd603a1f0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -30,10 +30,11 @@ use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, - xcm_config::{ConcreteAssetFromSystem, RelayOrOtherSystemParachains}, + xcm_config::{ + AllSiblingSystemParachains, ConcreteAssetFromSystem, RelayOrOtherSystemParachains, + }, }; use polkadot_parachain_primitives::primitives::Sibling; -use polkadot_runtime_constants::system_parachain; use sp_runtime::traits::AccountIdConversion; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; @@ -230,23 +231,11 @@ pub type Barrier = TrailingSetTopicAsId< >, >; -match_types! { - pub type SystemParachains: impl Contains = { - MultiLocation { - parents: 1, - interior: X1(Parachain( - system_parachain::ASSET_HUB_ID | - system_parachain::COLLECTIVES_ID - )), - } - }; -} - /// Locations that will not be charged fees in the executor, /// either execution or delivery. /// We only waive fees for system functions, which these locations represent. pub type WaivedLocations = ( - RelayOrOtherSystemParachains, + RelayOrOtherSystemParachains, Equals, FellowsPlurality, ); diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index a67316518d..e0ce22e858 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -27,10 +27,12 @@ use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, - xcm_config::{ConcreteAssetFromSystem, RelayOrOtherSystemParachains}, + xcm_config::{ + AllSiblingSystemParachains, ConcreteAssetFromSystem, RelayOrOtherSystemParachains, + }, }; use polkadot_parachain_primitives::primitives::Sibling; -use polkadot_runtime_constants::{system_parachain, xcm as xcm_constants}; +use polkadot_runtime_constants::xcm as xcm_constants; use sp_runtime::traits::AccountIdConversion; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; @@ -253,23 +255,11 @@ pub type Barrier = TrailingSetTopicAsId< >, >; -match_types! { - pub type SystemParachains: impl Contains = { - MultiLocation { - parents: 1, - interior: X1(Parachain( - system_parachain::ASSET_HUB_ID | - system_parachain::BRIDGE_HUB_ID - )), - } - }; -} - /// Locations that will not be charged fees in the executor, /// either execution or delivery. /// We only waive fees for system functions, which these locations represent. pub type WaivedLocations = ( - RelayOrOtherSystemParachains, + RelayOrOtherSystemParachains, Equals, Equals, LocalPlurality, From a29757dea0392d6faa115ec4cad4a942e614ba33 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 15 Feb 2024 13:44:36 +0100 Subject: [PATCH 121/316] [xcm] adapt https://github.com/paritytech/polkadot-sdk/pull/2428 (ParentRelayOrSiblingParachains) --- .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 8 ++------ .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 10 +++------- .../bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 9 +++------ .../bridge-hub-polkadot/src/xcm_config.rs | 13 +++++-------- .../collectives-polkadot/src/xcm_config.rs | 13 +++++-------- 5 files changed, 18 insertions(+), 35 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 774edf68b4..3820d5c793 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -31,7 +31,7 @@ use parachains_common::{ impls::ToStakingPot, xcm_config::{ AllSiblingSystemParachains, AssetFeeAsExistentialDepositMultiplier, - ConcreteAssetFromSystem, RelayOrOtherSystemParachains, + ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, RelayOrOtherSystemParachains, }, }; use polkadot_parachain_primitives::primitives::Sibling; @@ -214,10 +214,6 @@ match_types! { MultiLocation { parents: 1, interior: Here } | MultiLocation { parents: 1, interior: X1(Plurality { .. }) } }; - pub type ParentOrSiblings: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(_) } - }; } /// A call filter for the XCM Transact instruction. This is a temporary measure until we properly @@ -462,7 +458,7 @@ pub type Barrier = TrailingSetTopicAsId< Equals, )>, // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, + AllowSubscriptionsFrom, ), UniversalLocation, ConstU32<8>, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 606ef93034..32bbadda4b 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -31,7 +31,7 @@ use parachains_common::{ impls::ToStakingPot, xcm_config::{ AllSiblingSystemParachains, AssetFeeAsExistentialDepositMultiplier, - ConcreteAssetFromSystem, RelayOrOtherSystemParachains, + ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, RelayOrOtherSystemParachains, }, }; use polkadot_parachain_primitives::primitives::Sibling; @@ -188,11 +188,7 @@ match_types! { MultiLocation { parents: 1, interior: Here } | MultiLocation { parents: 1, interior: X1(Plurality { .. }) } }; - pub type ParentOrSiblings: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(_) } - }; - pub type FellowshipEntities: impl Contains = { + pub type FellowshipEntities: impl Contains = { // Fellowship Plurality MultiLocation { parents: 1, interior: X2(Parachain(1001), Plurality { id: BodyId::Technical, ..}) } | // Fellowship Salary Pallet @@ -405,7 +401,7 @@ pub type Barrier = TrailingSetTopicAsId< Equals, )>, // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, + AllowSubscriptionsFrom, ), UniversalLocation, ConstU32<8>, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index ae322290ad..8d2dbf762d 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -31,7 +31,8 @@ use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, xcm_config::{ - AllSiblingSystemParachains, ConcreteAssetFromSystem, RelayOrOtherSystemParachains, + AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, + RelayOrOtherSystemParachains, }, }; use polkadot_parachain_primitives::primitives::Sibling; @@ -121,10 +122,6 @@ match_types! { MultiLocation { parents: 1, interior: Here } | MultiLocation { parents: 1, interior: X1(Plurality { .. }) } }; - pub type ParentOrSiblings: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(_) } - }; } /// A call filter for the XCM Transact instruction. This is a temporary measure until we properly /// account for proof size weights. @@ -218,7 +215,7 @@ pub type Barrier = TrailingSetTopicAsId< Equals, )>, // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, + AllowSubscriptionsFrom, ), UniversalLocation, ConstU32<8>, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 6fd603a1f0..cc96e98598 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -31,7 +31,8 @@ use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, xcm_config::{ - AllSiblingSystemParachains, ConcreteAssetFromSystem, RelayOrOtherSystemParachains, + AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, + RelayOrOtherSystemParachains, }, }; use polkadot_parachain_primitives::primitives::Sibling; @@ -121,12 +122,8 @@ match_types! { MultiLocation { parents: 1, interior: Here } | MultiLocation { parents: 1, interior: X1(Plurality { .. }) } }; - pub type ParentOrSiblings: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(_) } - }; - pub type FellowsPlurality: impl Contains = { - MultiLocation { parents: 1, interior: X2(Parachain(1001), Plurality { id: BodyId::Technical, ..}) } + pub type FellowsPlurality: impl Contains = { + Location { parents: 1, interior: X2(Parachain(1001), Plurality { id: BodyId::Technical, ..}) } }; } /// A call filter for the XCM Transact instruction. This is a temporary measure until we properly @@ -222,7 +219,7 @@ pub type Barrier = TrailingSetTopicAsId< Equals, )>, // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, + AllowSubscriptionsFrom, ), UniversalLocation, ConstU32<8>, diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index e0ce22e858..3d2f689552 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -28,7 +28,8 @@ use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, xcm_config::{ - AllSiblingSystemParachains, ConcreteAssetFromSystem, RelayOrOtherSystemParachains, + AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, + RelayOrOtherSystemParachains, }, }; use polkadot_parachain_primitives::primitives::Sibling; @@ -134,12 +135,8 @@ match_types! { MultiLocation { parents: 1, interior: Here } | MultiLocation { parents: 1, interior: X1(Plurality { .. }) } }; - pub type ParentOrSiblings: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(_) } - }; - pub type LocalPlurality: impl Contains = { - MultiLocation { parents: 0, interior: X1(Plurality { .. }) } + pub type LocalPlurality: impl Contains = { + Location { parents: 0, interior: X1(Plurality { .. }) } }; } @@ -246,7 +243,7 @@ pub type Barrier = TrailingSetTopicAsId< Equals, )>, // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, + AllowSubscriptionsFrom, ), UniversalLocation, ConstU32<8>, From 38ca49148e70839b4d3456079d36a7838a1241a6 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 15 Feb 2024 14:59:49 +0100 Subject: [PATCH 122/316] [bridges] adapt https://github.com/paritytech/polkadot-sdk/pull/2996 --- .../bridge-hub-kusama/primitives/src/lib.rs | 13 ++++++++++++- .../src/bridge_to_polkadot_config.rs | 10 +++------- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 2 +- .../bridge-hub-polkadot/primitives/src/lib.rs | 13 ++++++++++++- .../src/bridge_to_kusama_config.rs | 10 +++------- .../bridge-hubs/bridge-hub-polkadot/src/lib.rs | 2 +- 6 files changed, 32 insertions(+), 18 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs index a746c2e022..f2c8cfeb56 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs @@ -22,7 +22,7 @@ pub use bp_bridge_hub_cumulus::*; use bp_messages::*; use bp_runtime::{ - decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, Parachain, + decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Parachain, }; use frame_support::{ dispatch::DispatchClass, @@ -35,6 +35,8 @@ use sp_runtime::{FixedPointNumber, FixedU128, RuntimeDebug, Saturating}; pub struct BridgeHubKusama; impl Chain for BridgeHubKusama { + const ID: ChainId = *b"bhks"; + type BlockNumber = BlockNumber; type Hash = Hash; type Hasher = Hasher; @@ -61,6 +63,15 @@ impl Parachain for BridgeHubKusama { const PARACHAIN_ID: u32 = BRIDGE_HUB_KUSAMA_PARACHAIN_ID; } +impl ChainWithMessages for BridgeHubKusama { + const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str = + WITH_BRIDGE_HUB_KUSAMA_MESSAGES_PALLET_NAME; + const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = + MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; + const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = + MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; +} + /// Public key of the chain account that may be used to verify signatures. pub type AccountSigner = MultiSigner; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs index 477a9ac12c..94110e7dc2 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs @@ -24,6 +24,7 @@ use crate::{ }; use bp_messages::LaneId; use bp_parachains::SingleParaStoredHeaderDataBuilder; +use bp_runtime::Chain; use bridge_runtime_common::{ messages, messages::{ @@ -137,7 +138,7 @@ parameter_types! { pub const MaxParaHeadDataSize: u32 = bp_polkadot::MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE; /// Bridge specific chain (network) identifier of the Polkadot Bridge Hub. - pub const BridgeHubPolkadotChainId: bp_runtime::ChainId = bp_runtime::BRIDGE_HUB_POLKADOT_CHAIN_ID; + pub const BridgeHubPolkadotChainId: bp_runtime::ChainId = bp_bridge_hub_polkadot::BridgeHubPolkadot::ID; /// Name of the `paras` pallet at Polkadot that tracks all parachain heads. pub const ParachainPalletNameAtPolkadot: &'static str = bp_polkadot::PARAS_PALLET_NAME; @@ -221,7 +222,6 @@ impl pallet_bridge_messages::Config for R type DeliveryPayments = (); type TargetHeaderChain = TargetHeaderChainAdapter; - type LaneMessageVerifier = ToBridgeHubPolkadotMessageVerifier; type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter< Runtime, WithBridgeHubPolkadotMessagesInstance, @@ -300,10 +300,6 @@ impl MessageBridge for WithBridgeHubPolkadotMessageBridge { >; } -/// Message verifier for BridgeHubPolkadot messages sent from BridgeHubKusama -pub type ToBridgeHubPolkadotMessageVerifier = - messages::source::FromThisChainMessageVerifier; - /// Maximal outbound payload size of BridgeHubKusama -> BridgeHubPolkadot messages. pub type ToBridgeHubPolkadotMaximalOutboundPayloadSize = messages::source::FromThisChainMaximalOutboundPayloadSize; @@ -412,7 +408,7 @@ mod tests { bp_bridge_hub_polkadot::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, max_unconfirmed_messages_in_bridged_confirmation_tx: bp_bridge_hub_polkadot::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, - bridged_chain_id: bp_runtime::BRIDGE_HUB_POLKADOT_CHAIN_ID, + bridged_chain_id: bp_bridge_hub_polkadot::BridgeHubPolkadot::ID, }, pallet_names: AssertBridgePalletNames { with_this_chain_messages_pallet_name: diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index f7c004c661..c71a50d5a0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -1050,7 +1050,7 @@ impl_runtime_apis! { impl BridgeMessagesConfig for Runtime { fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool { let bench_lane_id = >::bench_lane_id(); - let bridged_chain_id = bp_runtime::BRIDGE_HUB_POLKADOT_CHAIN_ID; + let bridged_chain_id = bridge_to_polkadot_config::BridgeHubPolkadotChainId::get(); pallet_bridge_relayers::Pallet::::relayer_reward( relayer, bp_relayers::RewardsAccountParams::new( diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs index b02f6107d6..9dbdeb7eb1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs @@ -22,7 +22,7 @@ pub use bp_bridge_hub_cumulus::*; use bp_messages::*; use bp_runtime::{ - decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, Parachain, + decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Parachain, }; use frame_support::dispatch::DispatchClass; use sp_runtime::{FixedPointNumber, FixedU128, RuntimeDebug, Saturating}; @@ -32,6 +32,8 @@ use sp_runtime::{FixedPointNumber, FixedU128, RuntimeDebug, Saturating}; pub struct BridgeHubPolkadot; impl Chain for BridgeHubPolkadot { + const ID: ChainId = *b"bhpd"; + type BlockNumber = BlockNumber; type Hash = Hash; type Hasher = Hasher; @@ -58,6 +60,15 @@ impl Parachain for BridgeHubPolkadot { const PARACHAIN_ID: u32 = BRIDGE_HUB_POLKADOT_PARACHAIN_ID; } +impl ChainWithMessages for BridgeHubPolkadot { + const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str = + WITH_BRIDGE_HUB_POLKADOT_MESSAGES_PALLET_NAME; + const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = + MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; + const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = + MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; +} + /// Identifier of BridgeHubPolkadot in the Polkadot relay chain. pub const BRIDGE_HUB_POLKADOT_PARACHAIN_ID: u32 = 1002; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs index b862a9ed4c..6d9e2af9fc 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs @@ -24,6 +24,7 @@ use crate::{ }; use bp_messages::LaneId; use bp_parachains::SingleParaStoredHeaderDataBuilder; +use bp_runtime::Chain; use bridge_runtime_common::{ messages, messages::{ @@ -137,7 +138,7 @@ parameter_types! { pub const MaxParaHeadDataSize: u32 = bp_kusama::MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE; /// Bridge specific chain (network) identifier of the Kusama Bridge Hub. - pub const BridgeHubKusamaChainId: bp_runtime::ChainId = bp_runtime::BRIDGE_HUB_KUSAMA_CHAIN_ID; + pub const BridgeHubKusamaChainId: bp_runtime::ChainId = bp_bridge_hub_kusama::BridgeHubKusama::ID; /// Name of the `paras` pallet at Kusama that tracks all parachain heads. pub const ParachainPalletNameAtKusama: &'static str = bp_kusama::PARAS_PALLET_NAME; @@ -221,7 +222,6 @@ impl pallet_bridge_messages::Config for Run type DeliveryPayments = (); type TargetHeaderChain = TargetHeaderChainAdapter; - type LaneMessageVerifier = ToBridgeHubKusamaMessageVerifier; type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter< Runtime, WithBridgeHubKusamaMessagesInstance, @@ -299,10 +299,6 @@ impl MessageBridge for WithBridgeHubKusamaMessageBridge { >; } -/// Message verifier for BridgeHubKusama messages sent from BridgeHubPolkadot -pub type ToBridgeHubKusamaMessageVerifier = - messages::source::FromThisChainMessageVerifier; - /// Maximal outbound payload size of BridgeHubPolkadot -> BridgeHubKusama messages. pub type ToBridgeHubKusamaMaximalOutboundPayloadSize = messages::source::FromThisChainMaximalOutboundPayloadSize; @@ -408,7 +404,7 @@ mod tests { bp_bridge_hub_kusama::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, max_unconfirmed_messages_in_bridged_confirmation_tx: bp_bridge_hub_kusama::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, - bridged_chain_id: bp_runtime::BRIDGE_HUB_KUSAMA_CHAIN_ID, + bridged_chain_id: bp_bridge_hub_kusama::BridgeHubKusama::ID, }, pallet_names: AssertBridgePalletNames { with_this_chain_messages_pallet_name: diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 6b712213a9..b6be1aca02 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -1050,7 +1050,7 @@ impl_runtime_apis! { impl BridgeMessagesConfig for Runtime { fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool { let bench_lane_id = >::bench_lane_id(); - let bridged_chain_id = bp_runtime::BRIDGE_HUB_KUSAMA_CHAIN_ID; + let bridged_chain_id = bridge_to_kusama_config::BridgeHubKusamaChainId::get(); pallet_bridge_relayers::Pallet::::relayer_reward( relayer, bp_relayers::RewardsAccountParams::new( From 8365351a2c827309a0223ad92fc08fb88cd2836c Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 15 Feb 2024 12:30:40 +0100 Subject: [PATCH 123/316] WIP: XCMv4 --- .../assets/asset-hub-kusama/src/lib.rs | 8 +-- .../src/tests/reserve_transfer.rs | 4 +- .../src/tests/set_xcm_versions.rs | 3 +- .../assets/asset-hub-kusama/src/tests/swap.rs | 4 +- .../asset-hub-kusama/src/tests/teleport.rs | 2 +- .../assets/asset-hub-polkadot/src/lib.rs | 8 +-- .../src/tests/reserve_transfer.rs | 4 +- .../src/tests/set_xcm_versions.rs | 2 +- .../asset-hub-polkadot/src/tests/teleport.rs | 2 +- .../emulated/common/src/impls.rs | 10 +-- .../emulated/common/src/macros.rs | 8 +-- .../emulated/common/src/xcm_helpers.rs | 4 +- relay/kusama/src/lib.rs | 43 +++++++------ relay/kusama/src/weights/xcm/mod.rs | 42 +++++-------- relay/kusama/src/xcm_config.rs | 44 ++++++------- relay/polkadot/src/lib.rs | 43 +++++++------ relay/polkadot/src/weights/xcm/mod.rs | 42 +++++-------- relay/polkadot/src/xcm_config.rs | 62 +++++++++---------- .../asset-hubs/asset-hub-kusama/src/lib.rs | 56 ++++++++--------- .../asset-hub-kusama/src/weights/xcm/mod.rs | 40 +++++------- .../asset-hub-kusama/src/xcm_config.rs | 56 ++++++++--------- .../asset-hub-kusama/tests/tests.rs | 10 +-- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 42 ++++++------- .../asset-hub-polkadot/src/weights/xcm/mod.rs | 40 +++++------- .../asset-hub-polkadot/src/xcm_config.rs | 56 ++++++++--------- .../asset-hub-polkadot/tests/tests.rs | 10 +-- .../src/bridge_to_polkadot_config.rs | 10 +-- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 30 ++++----- .../bridge-hub-kusama/src/weights/xcm/mod.rs | 40 +++++------- .../bridge-hub-kusama/src/xcm_config.rs | 20 +++--- .../src/bridge_to_kusama_config.rs | 10 +-- .../bridge-hub-polkadot/src/lib.rs | 30 ++++----- .../src/weights/xcm/mod.rs | 40 +++++------- .../bridge-hub-polkadot/src/xcm_config.rs | 20 +++--- .../src/fellowship/mod.rs | 14 ++--- .../collectives-polkadot/src/impls.rs | 4 +- .../collectives-polkadot/src/lib.rs | 8 +-- .../collectives-polkadot/src/xcm_config.rs | 22 +++---- system-parachains/encointer/src/lib.rs | 4 +- system-parachains/encointer/src/xcm_config.rs | 26 ++++---- .../gluttons/glutton-kusama/src/xcm_config.rs | 6 +- 41 files changed, 435 insertions(+), 494 deletions(-) diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs index c0d8309201..9004a7b4e4 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs @@ -66,11 +66,7 @@ pub type SystemParaToParaTest = Test; pub type ParaToSystemParaTest = Test; /// Returns a `TestArgs` instance to be used for the Relay Chain across integration tests -pub fn relay_test_args( - dest: MultiLocation, - beneficiary_id: AccountId32, - amount: Balance, -) -> TestArgs { +pub fn relay_test_args(dest: Location, beneficiary_id: AccountId32, amount: Balance) -> TestArgs { TestArgs { dest, beneficiary: AccountId32Junction { network: None, id: beneficiary_id.into() }.into(), @@ -84,7 +80,7 @@ pub fn relay_test_args( /// Returns a `TestArgs` instance to be used by parachains across integration tests pub fn para_test_args( - dest: MultiLocation, + dest: Location, beneficiary_id: AccountId32, amount: Balance, assets: MultiAssets, diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs index e99f9e422d..e27d7a6621 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs @@ -192,7 +192,7 @@ fn para_to_system_para_reserve_transfer_assets(t: ParaToSystemParaTest) -> Dispa fn reserve_transfer_native_asset_from_relay_to_system_para_fails() { let signed_origin = ::RuntimeOrigin::signed(KusamaSender::get().into()); let destination = Kusama::child_location_of(AssetHubKusama::para_id()); - let beneficiary: MultiLocation = + let beneficiary: Location = AccountId32Junction { network: None, id: AssetHubKusamaReceiver::get().into() }.into(); let amount_to_send: Balance = KUSAMA_ED * 1000; let assets: MultiAssets = (Here, amount_to_send).into(); @@ -227,7 +227,7 @@ fn reserve_transfer_native_asset_from_system_para_to_relay_fails() { ::RuntimeOrigin::signed(AssetHubKusamaSender::get().into()); let destination = AssetHubKusama::parent_location(); let beneficiary_id = KusamaReceiver::get(); - let beneficiary: MultiLocation = + let beneficiary: Location = AccountId32Junction { network: None, id: beneficiary_id.into() }.into(); let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs index 9b914622ba..9d695b1bd6 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs @@ -19,8 +19,7 @@ use crate::*; fn relay_sets_system_para_xcm_supported_version() { // Init tests variables let sudo_origin = ::RuntimeOrigin::root(); - let system_para_destination: MultiLocation = - Kusama::child_location_of(AssetHubKusama::para_id()); + let system_para_destination: Location = Kusama::child_location_of(AssetHubKusama::para_id()); // Relay Chain sets supported version for Asset Parachain Kusama::execute_with(|| { diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs index fc0159df14..be5caec6a0 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs @@ -19,7 +19,7 @@ use sp_runtime::ModuleError; #[test] fn swap_locally_on_chain_using_local_assets() { let asset_native = Box::new(asset_hub_kusama_runtime::xcm_config::KsmLocation::get()); - let asset_one = Box::new(MultiLocation { + let asset_one = Box::new(Location { parents: 0, interior: X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), }); @@ -119,7 +119,7 @@ fn swap_locally_on_chain_using_foreign_assets() { }; let asset_owner_on_penpal = PenpalKusamaASender::get(); let foreign_asset_at_asset_hub_kusama = - MultiLocation { parents: 1, interior: X1(Parachain(PenpalKusamaA::para_id().into())) } + Location { parents: 1, interior: X1(Parachain(PenpalKusamaA::para_id().into())) } .appended_with(asset_location_on_penpal) .unwrap(); diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs index b940c4e2eb..2db6732faa 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs @@ -562,7 +562,7 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { }; let asset_owner_on_penpal = PenpalKusamaASender::get(); let foreign_asset_at_asset_hub_kusama = - MultiLocation { parents: 1, interior: X1(Parachain(PenpalKusamaA::para_id().into())) } + Location { parents: 1, interior: X1(Parachain(PenpalKusamaA::para_id().into())) } .appended_with(asset_location_on_penpal) .unwrap(); super::penpal_create_foreign_asset_on_asset_hub( diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs index f006fc54b3..dfb7acc893 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs @@ -66,11 +66,7 @@ pub type SystemParaToParaTest = Test; pub type ParaToSystemParaTest = Test; /// Returns a `TestArgs` instance to be used for the Relay Chain across integration tests -pub fn relay_test_args( - dest: MultiLocation, - beneficiary_id: AccountId32, - amount: Balance, -) -> TestArgs { +pub fn relay_test_args(dest: Location, beneficiary_id: AccountId32, amount: Balance) -> TestArgs { TestArgs { dest, beneficiary: AccountId32Junction { network: None, id: beneficiary_id.into() }.into(), @@ -84,7 +80,7 @@ pub fn relay_test_args( /// Returns a `TestArgs` instance to be used by parachains across integration tests pub fn para_test_args( - dest: MultiLocation, + dest: Location, beneficiary_id: AccountId32, amount: Balance, assets: MultiAssets, diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs index e9fa92ff34..adde1b681a 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs @@ -192,7 +192,7 @@ fn para_to_system_para_reserve_transfer_assets(t: ParaToSystemParaTest) -> Dispa fn reserve_transfer_native_asset_from_relay_to_system_para_fails() { let signed_origin = ::RuntimeOrigin::signed(PolkadotSender::get().into()); let destination = Polkadot::child_location_of(AssetHubPolkadot::para_id()); - let beneficiary: MultiLocation = + let beneficiary: Location = AccountId32Junction { network: None, id: AssetHubPolkadotReceiver::get().into() }.into(); let amount_to_send: Balance = POLKADOT_ED * 1000; let assets: MultiAssets = (Here, amount_to_send).into(); @@ -227,7 +227,7 @@ fn reserve_transfer_native_asset_from_system_para_to_relay_fails() { ::RuntimeOrigin::signed(AssetHubPolkadotSender::get().into()); let destination = AssetHubPolkadot::parent_location(); let beneficiary_id = PolkadotReceiver::get(); - let beneficiary: MultiLocation = + let beneficiary: Location = AccountId32Junction { network: None, id: beneficiary_id.into() }.into(); let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs index e7b752ad4f..319052b66a 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs @@ -19,7 +19,7 @@ use crate::*; fn relay_sets_system_para_xcm_supported_version() { // Init tests variables let sudo_origin = ::RuntimeOrigin::root(); - let system_para_destination: MultiLocation = + let system_para_destination: Location = Polkadot::child_location_of(AssetHubPolkadot::para_id()); // Relay Chain sets supported version for Asset Parachain diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs index ed49e09b9a..e8a74fc3b3 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs @@ -562,7 +562,7 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { }; let asset_owner_on_penpal = PenpalPolkadotASender::get(); let foreign_asset_at_asset_hub_polkadot = - MultiLocation { parents: 1, interior: X1(Parachain(PenpalPolkadotA::para_id().into())) } + Location { parents: 1, interior: X1(Parachain(PenpalPolkadotA::para_id().into())) } .appended_with(asset_location_on_penpal) .unwrap(); super::penpal_create_foreign_asset_on_asset_hub( diff --git a/integration-tests/emulated/common/src/impls.rs b/integration-tests/emulated/common/src/impls.rs index 076e8d7e7a..af6b6f396f 100644 --- a/integration-tests/emulated/common/src/impls.rs +++ b/integration-tests/emulated/common/src/impls.rs @@ -58,7 +58,7 @@ pub use polkadot_runtime_parachains::{ inclusion::{AggregateMessageOrigin, UmpQueueId}, }; pub use xcm::{ - prelude::{Junction, Junctions, MultiLocation, NetworkId, OriginKind, Outcome, VersionedXcm}, + prelude::{Junction, Junctions, Location, NetworkId, OriginKind, Outcome, VersionedXcm}, v3::Error, DoubleEncoded, }; @@ -366,7 +366,7 @@ macro_rules! impl_send_transact_helpers_for_relay_chain { ::execute_with(|| { let root_origin = ::RuntimeOrigin::root(); - let destination: $crate::impls::MultiLocation = ::child_location_of(recipient); + let destination: $crate::impls::Location = ::child_location_of(recipient); let xcm = $crate::impls::xcm_transact_unpaid_execution(call, $crate::impls::OriginKind::Superuser); // Send XCM `Transact` @@ -406,7 +406,7 @@ macro_rules! impl_accounts_helpers_for_parachain { network_id: $crate::impls::NetworkId, para_id: $crate::impls::ParaId, ) -> $crate::impls::AccountId { - let remote_location = $crate::impls::MultiLocation { + let remote_location = $crate::impls::Location { parents: 2, interior: $crate::impls::Junctions::X2( $crate::impls::Junction::GlobalConsensus(network_id), @@ -710,7 +710,7 @@ macro_rules! impl_foreign_assets_helpers_for_parachain { impl $chain { /// Create foreign assets using sudo `ForeignAssets::force_create()` pub fn force_create_foreign_asset( - id: $crate::impls::MultiLocation, + id: $crate::impls::Location, owner: $crate::impls::AccountId, is_sufficient: bool, min_balance: u128, @@ -752,7 +752,7 @@ macro_rules! impl_foreign_assets_helpers_for_parachain { /// Mint assets making use of the ForeignAssets pallet-assets instance pub fn mint_foreign_asset( signed_origin: ::RuntimeOrigin, - id: $crate::impls::MultiLocation, + id: $crate::impls::Location, beneficiary: $crate::impls::AccountId, amount_to_mint: u128, ) { diff --git a/integration-tests/emulated/common/src/macros.rs b/integration-tests/emulated/common/src/macros.rs index ffcf2bc346..5dbe1cf89f 100644 --- a/integration-tests/emulated/common/src/macros.rs +++ b/integration-tests/emulated/common/src/macros.rs @@ -48,7 +48,7 @@ macro_rules! test_parachain_is_trusted_teleporter { <$receiver_para as $crate::macros::Chain>::account_data_of(receiver.clone()).free; let para_destination = <$sender_para>::sibling_location_of(<$receiver_para>::para_id()); - let beneficiary: MultiLocation = + let beneficiary: Location = $crate::macros::AccountId32 { network: None, id: receiver.clone().into() }.into(); // Send XCM message from Origin Parachain @@ -127,8 +127,8 @@ macro_rules! include_penpal_create_foreign_asset_on_asset_hub { $crate::impls::paste::paste! { pub fn penpal_create_foreign_asset_on_asset_hub( asset_id_on_penpal: u32, - foreign_asset_at_asset_hub: MultiLocation, - ah_as_seen_by_penpal: MultiLocation, + foreign_asset_at_asset_hub: Location, + ah_as_seen_by_penpal: Location, is_sufficient: bool, asset_owner: AccountId, prefund_amount: u128, @@ -184,7 +184,7 @@ macro_rules! include_penpal_create_foreign_asset_on_asset_hub { &Weight::from_parts(10_100_000_000_000, 300_000), ); let buy_execution_fee = MultiAsset { - id: Concrete(MultiLocation { parents: 1, interior: Here }), + id: Concrete(Location { parents: 1, interior: Here }), fun: Fungible(buy_execution_fee_amount), }; let xcm = VersionedXcm::from(Xcm(vec![ diff --git a/integration-tests/emulated/common/src/xcm_helpers.rs b/integration-tests/emulated/common/src/xcm_helpers.rs index c40f51a440..48dd975f77 100644 --- a/integration-tests/emulated/common/src/xcm_helpers.rs +++ b/integration-tests/emulated/common/src/xcm_helpers.rs @@ -35,7 +35,7 @@ pub fn xcm_transact_paid_execution( RefundSurplus, DepositAsset { assets: All.into(), - beneficiary: MultiLocation { + beneficiary: Location { parents: 0, interior: X1(AccountId32 { network: None, id: beneficiary.into() }), }, @@ -58,7 +58,7 @@ pub fn xcm_transact_unpaid_execution( ])) } /// Helper method to get the non-fee asset used in multiple assets transfer -pub fn non_fee_asset(assets: &MultiAssets, fee_idx: usize) -> Option<(MultiLocation, u128)> { +pub fn non_fee_asset(assets: &MultiAssets, fee_idx: usize) -> Option<(Location, u128)> { let asset = assets.inner().into_iter().enumerate().find(|a| a.0 != fee_idx)?.1.clone(); let asset_id = match asset.id { Concrete(id) => id, diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 1575a1c0d2..106f5ac121 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -33,8 +33,7 @@ use primitives::{ use runtime_common::{ auctions, claims, crowdloan, impl_runtime_weights, impls::{ - DealWithFees, LocatableAssetConverter, VersionedLocatableAsset, - VersionedMultiLocationConverter, + DealWithFees, LocatableAssetConverter, VersionedLocatableAsset, VersionedLocationConverter, }, paras_registrar, prod_or_fast, slots, BalanceToU256, BlockHashCount, BlockLength, CurrencyToVote, SlowAdjustingFeeUpdate, U256ToBalance, @@ -99,8 +98,8 @@ use sp_staking::SessionIndex; use sp_version::NativeVersion; use sp_version::RuntimeVersion; use xcm::{ - latest::{InteriorMultiLocation, Junction, Junction::PalletInstance}, - VersionedMultiLocation, + latest::{InteriorLocation, Junction, Junction::PalletInstance}, + VersionedLocation, }; use xcm_builder::PayOverXcm; @@ -711,7 +710,7 @@ parameter_types! { pub const PayoutSpendPeriod: BlockNumber = 30 * DAYS; // The asset's interior location for the paying account. This is the Treasury // pallet instance (which sits at index 18). - pub TreasuryInteriorLocation: InteriorMultiLocation = PalletInstance(TREASURY_PALLET_ID).into(); + pub TreasuryInteriorLocation: InteriorLocation = PalletInstance(TREASURY_PALLET_ID).into(); pub const TipCountdown: BlockNumber = 1 * DAYS; pub const TipFindersFee: Percent = Percent::from_percent(20); @@ -741,7 +740,7 @@ impl pallet_treasury::Config for Runtime { type SpendFunds = Bounties; type SpendOrigin = TreasurySpender; type AssetKind = VersionedLocatableAsset; - type Beneficiary = VersionedMultiLocation; + type Beneficiary = VersionedLocation; type BeneficiaryLookup = IdentityLookup; type Paymaster = PayOverXcm< TreasuryInteriorLocation, @@ -751,7 +750,7 @@ impl pallet_treasury::Config for Runtime { Self::Beneficiary, Self::AssetKind, LocatableAssetConverter, - VersionedMultiLocationConverter, + VersionedLocationConverter, >; type BalanceConverter = AssetRate; type PayoutPeriod = PayoutSpendPeriod; @@ -2355,11 +2354,11 @@ sp_api::impl_runtime_apis! { use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; impl pallet_xcm::benchmarking::Config for Runtime { - fn reachable_dest() -> Option { + fn reachable_dest() -> Option { Some(crate::xcm_config::AssetHubLocation::get()) } - fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + fn teleportable_asset_and_dest() -> Option<(MultiAsset, Location)> { // Relay/native token can be teleported to/from AH. Some(( MultiAsset { fun: Fungible(EXISTENTIAL_DEPOSIT), id: Concrete(Here.into()) }, @@ -2367,7 +2366,7 @@ sp_api::impl_runtime_apis! { )) } - fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, Location)> { // Relay can reserve transfer native token to some random parachain. Some(( MultiAsset { @@ -2379,7 +2378,7 @@ sp_api::impl_runtime_apis! { } fn set_up_complex_asset_transfer( - ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + ) -> Option<(MultiAssets, u32, Location, Box)> { // Relay supports only native token, either reserve transfer it to non-system parachains, // or teleport it to system parachain. Use the teleport case for benchmarking as it's // slightly heavier. @@ -2411,7 +2410,7 @@ sp_api::impl_runtime_apis! { ToParachain, (), >; - fn valid_destination() -> Result { + fn valid_destination() -> Result { Ok(AssetHubLocation::get()) } fn worst_case_holding(_depositable_count: u32) -> MultiAssets { @@ -2424,11 +2423,11 @@ sp_api::impl_runtime_apis! { } parameter_types! { - pub const TrustedTeleporter: Option<(MultiLocation, MultiAsset)> = Some(( + pub const TrustedTeleporter: Option<(Location, MultiAsset)> = Some(( AssetHubLocation::get(), MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(TokenLocation::get()) }, )); - pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None; + pub const TrustedReserve: Option<(Location, MultiAsset)> = None; } impl pallet_xcm_benchmarks::fungible::Config for Runtime { @@ -2459,23 +2458,23 @@ sp_api::impl_runtime_apis! { Err(BenchmarkError::Skip) } - fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> { + fn universal_alias() -> Result<(Location, Junction), BenchmarkError> { // The XCM executor of Kusama doesn't have a configured `UniversalAliases` Err(BenchmarkError::Skip) } - fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { + fn transact_origin_and_runtime_call() -> Result<(Location, RuntimeCall), BenchmarkError> { Ok((AssetHubLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) } - fn subscribe_origin() -> Result { + fn subscribe_origin() -> Result { Ok(AssetHubLocation::get()) } - fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> { + fn claimable_asset() -> Result<(Location, Location, MultiAssets), BenchmarkError> { let origin = AssetHubLocation::get(); let assets: MultiAssets = (Concrete(TokenLocation::get()), 1_000 * UNITS).into(); - let ticket = MultiLocation { parents: 0, interior: Here }; + let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } @@ -2486,18 +2485,18 @@ sp_api::impl_runtime_apis! { }) } - fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { + fn unlockable_asset() -> Result<(Location, Location, MultiAsset), BenchmarkError> { // Kusama doesn't support asset locking Err(BenchmarkError::Skip) } fn export_message_origin_and_destination( - ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { + ) -> Result<(Location, NetworkId, InteriorLocation), BenchmarkError> { // Kusama doesn't support exporting messages Err(BenchmarkError::Skip) } - fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { + fn alias_origin() -> Result<(Location, Location), BenchmarkError> { // The XCM executor of Kusama doesn't have a configured `Aliasers` Err(BenchmarkError::Skip) } diff --git a/relay/kusama/src/weights/xcm/mod.rs b/relay/kusama/src/weights/xcm/mod.rs index ec73d891ec..585e32429c 100644 --- a/relay/kusama/src/weights/xcm/mod.rs +++ b/relay/kusama/src/weights/xcm/mod.rs @@ -36,7 +36,7 @@ pub enum AssetTypes { impl From<&MultiAsset> for AssetTypes { fn from(asset: &MultiAsset) -> Self { match asset { - MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), .. } => + MultiAsset { id: Concrete(Location { parents: 0, interior: Here }), .. } => AssetTypes::Balances, _ => AssetTypes::Unknown, } @@ -100,18 +100,14 @@ impl XcmWeightInfo for KusamaXcmWeight { _query_id: &u64, _response: &Response, _max_weight: &Weight, - _querier: &Option, + _querier: &Option, ) -> Weight { XcmGeneric::::query_response() } - fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight { + fn transfer_asset(assets: &MultiAssets, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::transfer_asset()) } - fn transfer_reserve_asset( - assets: &MultiAssets, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { + fn transfer_reserve_asset(assets: &MultiAssets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::transfer_reserve_asset()) } fn transact( @@ -140,19 +136,19 @@ impl XcmWeightInfo for KusamaXcmWeight { fn clear_origin() -> Weight { XcmGeneric::::clear_origin() } - fn descend_origin(_who: &InteriorMultiLocation) -> Weight { + fn descend_origin(_who: &InteriorLocation) -> Weight { XcmGeneric::::descend_origin() } fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { XcmGeneric::::report_error() } - fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { + fn deposit_asset(assets: &MultiAssetFilter, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::deposit_asset()) } fn deposit_reserve_asset( assets: &MultiAssetFilter, - _dest: &MultiLocation, + _dest: &Location, _xcm: &Xcm<()>, ) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::deposit_reserve_asset()) @@ -163,16 +159,12 @@ impl XcmWeightInfo for KusamaXcmWeight { } fn initiate_reserve_withdraw( assets: &MultiAssetFilter, - _reserve: &MultiLocation, + _reserve: &Location, _xcm: &Xcm<()>, ) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::initiate_reserve_withdraw()) } - fn initiate_teleport( - assets: &MultiAssetFilter, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { + fn initiate_teleport(assets: &MultiAssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::initiate_teleport()) } fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { @@ -193,7 +185,7 @@ impl XcmWeightInfo for KusamaXcmWeight { fn clear_error() -> Weight { XcmGeneric::::clear_error() } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { + fn claim_asset(_assets: &MultiAssets, _ticket: &Location) -> Weight { XcmGeneric::::claim_asset() } fn trap(_code: &u64) -> Weight { @@ -211,7 +203,7 @@ impl XcmWeightInfo for KusamaXcmWeight { fn expect_asset(assets: &MultiAssets) -> 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 { @@ -246,19 +238,19 @@ impl XcmWeightInfo for KusamaXcmWeight { // Kusama relay should not support export message operations Weight::MAX } - fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn lock_asset(_: &MultiAsset, _: &Location) -> Weight { // Kusama does not currently support asset locking operations Weight::MAX } - fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn unlock_asset(_: &MultiAsset, _: &Location) -> Weight { // Kusama does not currently support asset locking operations Weight::MAX } - fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn note_unlockable(_: &MultiAsset, _: &Location) -> Weight { // Kusama does not currently support asset locking operations Weight::MAX } - fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn request_unlock(_: &MultiAsset, _: &Location) -> Weight { // Kusama does not currently support asset locking operations Weight::MAX } @@ -271,11 +263,11 @@ impl XcmWeightInfo for KusamaXcmWeight { 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/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index 883633c47f..5a2f1fa12b 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -46,17 +46,17 @@ use xcm_builder::{ }; parameter_types! { - pub const RootLocation: MultiLocation = Here.into_location(); + pub const RootLocation: Location = Here.into_location(); /// The location of the KSM token, from the context of this chain. Since this token is native to this /// chain, we make it synonymous with it and thus it is the `Here` location, which means "equivalent to /// the context". - pub const TokenLocation: MultiLocation = Here.into_location(); + pub const TokenLocation: Location = Here.into_location(); /// The Kusama network ID. This is named. pub const ThisNetwork: NetworkId = Kusama; /// Our XCM location ancestry - i.e. our location within the Consensus Universe. /// /// Since Kusama is a top-level relay-chain with its own consensus, it's just our network ID. - pub UniversalLocation: InteriorMultiLocation = ThisNetwork::get().into(); + pub UniversalLocation: InteriorLocation = ThisNetwork::get().into(); /// The check account, which holds any native assets that have been teleported out and not back in (yet). pub CheckAccount: AccountId = XcmPallet::check_account(); /// The check account that is allowed to mint assets locally. @@ -65,7 +65,7 @@ parameter_types! { pub TreasuryAccount: AccountId = Treasury::account_id(); } -/// The canonical means of converting a `MultiLocation` into an `AccountId`, used when we want to +/// The canonical means of converting a `Location` into an `AccountId`, used when we want to /// determine the sovereign account controlled by a location. pub type SovereignAccountOf = ( // We can convert a child parachain using the standard `AccountId` conversion. @@ -77,7 +77,7 @@ pub type SovereignAccountOf = ( ); /// Our asset transactor. This is what allows us to interest with the runtime facilities from the -/// point of view of XCM-only concepts like `MultiLocation` and `MultiAsset`. +/// point of view of XCM-only concepts like `Location` and `MultiAsset`. /// /// Ours is only aware of the Balances pallet, which is mapped to `TokenLocation`. pub type LocalAssetTransactor = FungibleAdapter< @@ -85,7 +85,7 @@ pub type LocalAssetTransactor = FungibleAdapter< Balances, // Use this currency when it is a fungible asset matching the given location or name: IsConcrete, - // We can convert the MultiLocations with our converter above: + // We can convert the Locations with our converter above: SovereignAccountOf, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, @@ -127,12 +127,12 @@ pub type XcmRouter = WithUniqueTopic<( parameter_types! { pub const Ksm: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) }); - pub const AssetHubLocation: MultiLocation = Parachain(ASSET_HUB_ID).into_location(); - pub const KsmForAssetHub: (MultiAssetFilter, MultiLocation) = (Ksm::get(), AssetHubLocation::get()); - pub const Encointer: MultiLocation = Parachain(ENCOINTER_ID).into_location(); - pub const KsmForEncointer: (MultiAssetFilter, MultiLocation) = (Ksm::get(), Encointer::get()); - pub const BridgeHubLocation: MultiLocation = Parachain(BRIDGE_HUB_ID).into_location(); - pub const KsmForBridgeHub: (MultiAssetFilter, MultiLocation) = (Ksm::get(), BridgeHubLocation::get()); + pub const AssetHubLocation: Location = Parachain(ASSET_HUB_ID).into_location(); + pub const KsmForAssetHub: (MultiAssetFilter, Location) = (Ksm::get(), AssetHubLocation::get()); + pub const Encointer: Location = Parachain(ENCOINTER_ID).into_location(); + pub const KsmForEncointer: (MultiAssetFilter, Location) = (Ksm::get(), Encointer::get()); + pub const BridgeHubLocation: Location = Parachain(BRIDGE_HUB_ID).into_location(); + pub const KsmForBridgeHub: (MultiAssetFilter, Location) = (Ksm::get(), BridgeHubLocation::get()); pub const MaxAssetsIntoHolding: u32 = 64; } @@ -144,11 +144,11 @@ pub type TrustedTeleporters = ( ); match_types! { - pub type OnlyParachains: impl Contains = { - MultiLocation { parents: 0, interior: X1(Parachain(_)) } + pub type OnlyParachains: impl Contains = { + Location { parents: 0, interior: X1(Parachain(_)) } }; - pub type LocalPlurality: impl Contains = { - MultiLocation { parents: 0, interior: X1(Plurality { .. }) } + pub type LocalPlurality: impl Contains = { + Location { parents: 0, interior: X1(Plurality { .. }) } }; } @@ -222,26 +222,26 @@ parameter_types! { pub const FellowsBodyId: BodyId = BodyId::Technical; } -/// Type to convert an `Origin` type value into a `MultiLocation` value which represents an interior +/// Type to convert an `Origin` type value into a `Location` value which represents an interior /// location of this chain. pub type LocalOriginToLocation = ( // And a usual Signed origin to be used in XCM as a corresponding AccountId32 SignedToAccountId32, ); -/// Type to convert the `StakingAdmin` origin to a Plurality `MultiLocation` value. +/// Type to convert the `StakingAdmin` origin to a Plurality `Location` value. pub type StakingAdminToPlurality = OriginToPluralityVoice; -/// Type to convert the Fellows origin to a Plurality `MultiLocation` value. +/// Type to convert the Fellows origin to a Plurality `Location` value. pub type FellowsToPlurality = OriginToPluralityVoice; -/// Type to convert a pallet `Origin` type value into a `MultiLocation` value which represents an +/// Type to convert a pallet `Origin` type value into a `Location` value which represents an /// interior location of this chain for a destination chain. pub type LocalPalletOriginToLocation = ( - // StakingAdmin origin to be used in XCM as a corresponding Plurality `MultiLocation` value. + // StakingAdmin origin to be used in XCM as a corresponding Plurality `Location` value. StakingAdminToPlurality, - // Fellows origin to be used in XCM as a corresponding Plurality `MultiLocation` value. + // Fellows origin to be used in XCM as a corresponding Plurality `Location` value. FellowsToPlurality, ); diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 64f119c129..c13a841645 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -24,8 +24,7 @@ use pallet_transaction_payment::CurrencyAdapter; use runtime_common::{ auctions, claims, crowdloan, impl_runtime_weights, impls::{ - DealWithFees, LocatableAssetConverter, VersionedLocatableAsset, - VersionedMultiLocationConverter, + DealWithFees, LocatableAssetConverter, VersionedLocatableAsset, VersionedLocationConverter, }, paras_registrar, prod_or_fast, slots, BlockHashCount, BlockLength, CurrencyToVote, SlowAdjustingFeeUpdate, @@ -97,8 +96,8 @@ use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; use sp_version::NativeVersion; use sp_version::RuntimeVersion; use xcm::{ - latest::{InteriorMultiLocation, Junction, Junction::PalletInstance}, - VersionedMultiLocation, + latest::{InteriorLocation, Junction, Junction::PalletInstance}, + VersionedLocation, }; use xcm_builder::PayOverXcm; @@ -837,7 +836,7 @@ parameter_types! { pub const PayoutSpendPeriod: BlockNumber = 30 * DAYS; // The asset's interior location for the paying account. This is the Treasury // pallet instance (which sits at index 19). - pub TreasuryInteriorLocation: InteriorMultiLocation = PalletInstance(TREASURY_PALLET_ID).into(); + pub TreasuryInteriorLocation: InteriorLocation = PalletInstance(TREASURY_PALLET_ID).into(); pub const TipCountdown: BlockNumber = 1 * DAYS; pub const TipFindersFee: Percent = Percent::from_percent(20); @@ -869,7 +868,7 @@ impl pallet_treasury::Config for Runtime { type WeightInfo = weights::pallet_treasury::WeightInfo; type SpendOrigin = TreasurySpender; type AssetKind = VersionedLocatableAsset; - type Beneficiary = VersionedMultiLocation; + type Beneficiary = VersionedLocation; type BeneficiaryLookup = IdentityLookup; type Paymaster = PayOverXcm< TreasuryInteriorLocation, @@ -879,7 +878,7 @@ impl pallet_treasury::Config for Runtime { Self::Beneficiary, Self::AssetKind, LocatableAssetConverter, - VersionedMultiLocationConverter, + VersionedLocationConverter, >; type BalanceConverter = AssetRate; type PayoutPeriod = PayoutSpendPeriod; @@ -2357,11 +2356,11 @@ sp_api::impl_runtime_apis! { use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; impl pallet_xcm::benchmarking::Config for Runtime { - fn reachable_dest() -> Option { + fn reachable_dest() -> Option { Some(crate::xcm_config::AssetHubLocation::get()) } - fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + fn teleportable_asset_and_dest() -> Option<(MultiAsset, Location)> { // Relay/native token can be teleported to/from AH. Some(( MultiAsset { fun: Fungible(EXISTENTIAL_DEPOSIT), id: Concrete(Here.into()) }, @@ -2369,7 +2368,7 @@ sp_api::impl_runtime_apis! { )) } - fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, Location)> { // Relay can reserve transfer native token to some random parachain. Some(( MultiAsset { @@ -2381,7 +2380,7 @@ sp_api::impl_runtime_apis! { } fn set_up_complex_asset_transfer( - ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + ) -> Option<(MultiAssets, u32, Location, Box)> { // Relay supports only native token, either reserve transfer it to non-system parachains, // or teleport it to system parachain. Use the teleport case for benchmarking as it's // slightly heavier. @@ -2413,7 +2412,7 @@ sp_api::impl_runtime_apis! { ToParachain, (), >; - fn valid_destination() -> Result { + fn valid_destination() -> Result { Ok(AssetHubLocation::get()) } fn worst_case_holding(_depositable_count: u32) -> MultiAssets { @@ -2423,11 +2422,11 @@ sp_api::impl_runtime_apis! { } parameter_types! { - pub const TrustedTeleporter: Option<(MultiLocation, MultiAsset)> = Some(( + pub const TrustedTeleporter: Option<(Location, MultiAsset)> = Some(( AssetHubLocation::get(), MultiAsset { id: Concrete(TokenLocation::get()), fun: Fungible(1 * UNITS) } )); - pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None; + pub const TrustedReserve: Option<(Location, MultiAsset)> = None; } impl pallet_xcm_benchmarks::fungible::Config for Runtime { @@ -2458,23 +2457,23 @@ sp_api::impl_runtime_apis! { Err(BenchmarkError::Skip) } - fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> { + fn universal_alias() -> Result<(Location, Junction), BenchmarkError> { // The XCM executor of Polkadot doesn't have a configured `UniversalAliases` Err(BenchmarkError::Skip) } - fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { + fn transact_origin_and_runtime_call() -> Result<(Location, RuntimeCall), BenchmarkError> { Ok((AssetHubLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) } - fn subscribe_origin() -> Result { + fn subscribe_origin() -> Result { Ok(AssetHubLocation::get()) } - fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> { + fn claimable_asset() -> Result<(Location, Location, MultiAssets), BenchmarkError> { let origin = AssetHubLocation::get(); let assets: MultiAssets = (Concrete(TokenLocation::get()), 1_000 * UNITS).into(); - let ticket = MultiLocation { parents: 0, interior: Here }; + let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } @@ -2485,18 +2484,18 @@ sp_api::impl_runtime_apis! { }) } - fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { + fn unlockable_asset() -> Result<(Location, Location, MultiAsset), BenchmarkError> { // Polkadot doesn't support asset locking Err(BenchmarkError::Skip) } fn export_message_origin_and_destination( - ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { + ) -> Result<(Location, NetworkId, InteriorLocation), BenchmarkError> { // Polkadot doesn't support exporting messages Err(BenchmarkError::Skip) } - fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { + fn alias_origin() -> Result<(Location, Location), BenchmarkError> { // The XCM executor of Polkadot doesn't have a configured `Aliasers` Err(BenchmarkError::Skip) } diff --git a/relay/polkadot/src/weights/xcm/mod.rs b/relay/polkadot/src/weights/xcm/mod.rs index 98c12fa7db..c12cb5adfb 100644 --- a/relay/polkadot/src/weights/xcm/mod.rs +++ b/relay/polkadot/src/weights/xcm/mod.rs @@ -36,7 +36,7 @@ pub enum AssetTypes { impl From<&MultiAsset> for AssetTypes { fn from(asset: &MultiAsset) -> Self { match asset { - MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), .. } => + MultiAsset { id: Concrete(Location { parents: 0, interior: Here }), .. } => AssetTypes::Balances, _ => AssetTypes::Unknown, } @@ -100,18 +100,14 @@ impl XcmWeightInfo for PolkadotXcmWeight _query_id: &u64, _response: &Response, _max_weight: &Weight, - _querier: &Option, + _querier: &Option, ) -> Weight { XcmGeneric::::query_response() } - fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight { + fn transfer_asset(assets: &MultiAssets, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::transfer_asset()) } - fn transfer_reserve_asset( - assets: &MultiAssets, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { + fn transfer_reserve_asset(assets: &MultiAssets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::transfer_reserve_asset()) } fn transact( @@ -140,19 +136,19 @@ impl XcmWeightInfo for PolkadotXcmWeight fn clear_origin() -> Weight { XcmGeneric::::clear_origin() } - fn descend_origin(_who: &InteriorMultiLocation) -> Weight { + fn descend_origin(_who: &InteriorLocation) -> Weight { XcmGeneric::::descend_origin() } fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { XcmGeneric::::report_error() } - fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { + fn deposit_asset(assets: &MultiAssetFilter, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::deposit_asset()) } fn deposit_reserve_asset( assets: &MultiAssetFilter, - _dest: &MultiLocation, + _dest: &Location, _xcm: &Xcm<()>, ) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::deposit_reserve_asset()) @@ -163,16 +159,12 @@ impl XcmWeightInfo for PolkadotXcmWeight } fn initiate_reserve_withdraw( assets: &MultiAssetFilter, - _reserve: &MultiLocation, + _reserve: &Location, _xcm: &Xcm<()>, ) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::initiate_reserve_withdraw()) } - fn initiate_teleport( - assets: &MultiAssetFilter, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { + fn initiate_teleport(assets: &MultiAssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::initiate_teleport()) } fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { @@ -193,7 +185,7 @@ impl XcmWeightInfo for PolkadotXcmWeight fn clear_error() -> Weight { XcmGeneric::::clear_error() } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { + fn claim_asset(_assets: &MultiAssets, _ticket: &Location) -> Weight { XcmGeneric::::claim_asset() } fn trap(_code: &u64) -> Weight { @@ -211,7 +203,7 @@ impl XcmWeightInfo for PolkadotXcmWeight fn expect_asset(assets: &MultiAssets) -> 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 { @@ -246,19 +238,19 @@ impl XcmWeightInfo for PolkadotXcmWeight // Polkadot relay should not support export message operations Weight::MAX } - fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn lock_asset(_: &MultiAsset, _: &Location) -> Weight { // Polkadot does not currently support asset locking operations Weight::MAX } - fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn unlock_asset(_: &MultiAsset, _: &Location) -> Weight { // Polkadot does not currently support asset locking operations Weight::MAX } - fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn note_unlockable(_: &MultiAsset, _: &Location) -> Weight { // Polkadot does not currently support asset locking operations Weight::MAX } - fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn request_unlock(_: &MultiAsset, _: &Location) -> Weight { // Polkadot does not currently support asset locking operations Weight::MAX } @@ -271,11 +263,11 @@ impl XcmWeightInfo for PolkadotXcmWeight 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/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index 21c654a326..d0e60b4b3b 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -50,15 +50,15 @@ use xcm_builder::{ }; parameter_types! { - pub const RootLocation: MultiLocation = Here.into_location(); + pub const RootLocation: Location = Here.into_location(); /// The location of the DOT token, from the context of this chain. Since this token is native to this /// chain, we make it synonymous with it and thus it is the `Here` location, which means "equivalent to /// the context". - pub const TokenLocation: MultiLocation = Here.into_location(); + pub const TokenLocation: Location = Here.into_location(); /// The Polkadot network ID. This is named. pub const ThisNetwork: NetworkId = NetworkId::Polkadot; /// Our location in the universe of consensus systems. - pub const UniversalLocation: InteriorMultiLocation = X1(GlobalConsensus(ThisNetwork::get())); + pub const UniversalLocation: InteriorLocation = X1(GlobalConsensus(ThisNetwork::get())); /// The Checking Account, which holds any native assets that have been teleported out and not back in (yet). pub CheckAccount: AccountId = XcmPallet::check_account(); /// The Checking Account along with the indication that the local chain is able to mint tokens. @@ -67,7 +67,7 @@ parameter_types! { pub TreasuryAccount: AccountId = Treasury::account_id(); } -/// The canonical means of converting a `MultiLocation` into an `AccountId`, used when we want to +/// The canonical means of converting a `Location` into an `AccountId`, used when we want to /// determine the sovereign account controlled by a location. pub type SovereignAccountOf = ( // We can convert a child parachain using the standard `AccountId` conversion. @@ -79,7 +79,7 @@ pub type SovereignAccountOf = ( ); /// Our asset transactor. This is what allows us to interact with the runtime assets from the point -/// of view of XCM-only concepts like `MultiLocation` and `MultiAsset`. +/// of view of XCM-only concepts like `Location` and `MultiAsset`. /// /// Ours is only aware of the Balances pallet, which is mapped to `TokenLocation`. pub type LocalAssetTransactor = FungibleAdapter< @@ -87,7 +87,7 @@ pub type LocalAssetTransactor = FungibleAdapter< Balances, // Use this currency when it is a fungible asset matching the given location or name: IsConcrete, - // We can convert the MultiLocations with our converter above: + // We can convert the Locations with our converter above: SovereignAccountOf, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, @@ -95,9 +95,9 @@ pub type LocalAssetTransactor = FungibleAdapter< LocalCheckAccount, >; -/// The means that we convert an XCM origin `MultiLocation` into the runtime's `Origin` type for +/// The means that we convert an XCM origin `Location` into the runtime's `Origin` type for /// local dispatch. This is a conversion function from an `OriginKind` type along with the -/// `MultiLocation` value and returns an `Origin` value or an error. +/// `Location` value and returns an `Origin` value or an error. type LocalOriginConverter = ( // If the origin kind is `Sovereign`, then return a `Signed` origin with the account determined // by the `SovereignAccountOf` converter. @@ -136,12 +136,12 @@ pub type XcmRouter = WithUniqueTopic<( parameter_types! { pub const Dot: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) }); - pub const AssetHubLocation: MultiLocation = Parachain(ASSET_HUB_ID).into_location(); - pub const DotForAssetHub: (MultiAssetFilter, MultiLocation) = (Dot::get(), AssetHubLocation::get()); - pub const CollectivesLocation: MultiLocation = Parachain(COLLECTIVES_ID).into_location(); - pub const DotForCollectives: (MultiAssetFilter, MultiLocation) = (Dot::get(), CollectivesLocation::get()); - pub const BridgeHubLocation: MultiLocation = Parachain(BRIDGE_HUB_ID).into_location(); - pub const DotForBridgeHub: (MultiAssetFilter, MultiLocation) = (Dot::get(), BridgeHubLocation::get()); + pub const AssetHubLocation: Location = Parachain(ASSET_HUB_ID).into_location(); + pub const DotForAssetHub: (MultiAssetFilter, Location) = (Dot::get(), AssetHubLocation::get()); + pub const CollectivesLocation: Location = Parachain(COLLECTIVES_ID).into_location(); + pub const DotForCollectives: (MultiAssetFilter, Location) = (Dot::get(), CollectivesLocation::get()); + pub const BridgeHubLocation: Location = Parachain(BRIDGE_HUB_ID).into_location(); + pub const DotForBridgeHub: (MultiAssetFilter, Location) = (Dot::get(), BridgeHubLocation::get()); pub const MaxAssetsIntoHolding: u32 = 64; } @@ -153,15 +153,15 @@ pub type TrustedTeleporters = ( ); match_types! { - pub type OnlyParachains: impl Contains = { - MultiLocation { parents: 0, interior: X1(Parachain(_)) } + pub type OnlyParachains: impl Contains = { + Location { parents: 0, interior: X1(Parachain(_)) } }; - pub type CollectivesOrFellows: impl Contains = { - MultiLocation { parents: 0, interior: X1(Parachain(COLLECTIVES_ID)) } | - MultiLocation { parents: 0, interior: X2(Parachain(COLLECTIVES_ID), Plurality { id: BodyId::Technical, .. }) } + pub type CollectivesOrFellows: impl Contains = { + Location { parents: 0, interior: X1(Parachain(COLLECTIVES_ID)) } | + Location { parents: 0, interior: X2(Parachain(COLLECTIVES_ID), Plurality { id: BodyId::Technical, .. }) } }; - pub type LocalPlurality: impl Contains = { - MultiLocation { parents: 0, interior: X1(Plurality { .. }) } + pub type LocalPlurality: impl Contains = { + Location { parents: 0, interior: X1(Plurality { .. }) } }; } @@ -240,11 +240,11 @@ parameter_types! { pub const TreasurerBodyId: BodyId = BodyId::Index(TREASURER_INDEX); } -/// Type to convert the `GeneralAdmin` origin to a Plurality `MultiLocation` value. +/// Type to convert the `GeneralAdmin` origin to a Plurality `Location` value. pub type GeneralAdminToPlurality = OriginToPluralityVoice; -/// Type to convert an `Origin` type value into a `MultiLocation` value which represents an interior +/// Type to convert an `Origin` type value into a `Location` value which represents an interior /// location of this chain. pub type LocalOriginToLocation = ( GeneralAdminToPlurality, @@ -252,27 +252,27 @@ pub type LocalOriginToLocation = ( SignedToAccountId32, ); -/// Type to convert the `StakingAdmin` origin to a Plurality `MultiLocation` value. +/// Type to convert the `StakingAdmin` origin to a Plurality `Location` value. pub type StakingAdminToPlurality = OriginToPluralityVoice; -/// Type to convert the `FellowshipAdmin` origin to a Plurality `MultiLocation` value. +/// Type to convert the `FellowshipAdmin` origin to a Plurality `Location` value. pub type FellowshipAdminToPlurality = OriginToPluralityVoice; -/// Type to convert the `Treasurer` origin to a Plurality `MultiLocation` value. +/// Type to convert the `Treasurer` origin to a Plurality `Location` value. pub type TreasurerToPlurality = OriginToPluralityVoice; -/// Type to convert a pallet `Origin` type value into a `MultiLocation` value which represents an +/// Type to convert a pallet `Origin` type value into a `Location` value which represents an /// interior location of this chain for a destination chain. pub type LocalPalletOriginToLocation = ( - // GeneralAdmin origin to be used in XCM as a corresponding Plurality `MultiLocation` value. + // GeneralAdmin origin to be used in XCM as a corresponding Plurality `Location` value. GeneralAdminToPlurality, - // StakingAdmin origin to be used in XCM as a corresponding Plurality `MultiLocation` value. + // StakingAdmin origin to be used in XCM as a corresponding Plurality `Location` value. StakingAdminToPlurality, - // FellowshipAdmin origin to be used in XCM as a corresponding Plurality `MultiLocation` value. + // FellowshipAdmin origin to be used in XCM as a corresponding Plurality `Location` value. FellowshipAdminToPlurality, - // `Treasurer` origin to be used in XCM as a corresponding Plurality `MultiLocation` value. + // `Treasurer` origin to be used in XCM as a corresponding Plurality `Location` value. TreasurerToPlurality, ); diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 2050234005..0c8715a2f2 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -31,7 +31,7 @@ use assets_common::{ foreign_creators::ForeignCreators, local_and_foreign_assets::{LocalFromLeft, TargetFromLeft}, matching::FromSiblingParachain, - AssetIdForTrustBackedAssetsConvert, MultiLocationForAssetId, + AssetIdForTrustBackedAssetsConvert, LocationForAssetId, }; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; @@ -79,7 +79,7 @@ use system_parachains_constants::{ AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; -use xcm::opaque::v3::MultiLocation; +use xcm::opaque::v3::Location; use xcm_config::{ FellowshipLocation, ForeignAssetsConvertedConcreteId, ForeignCreatorsSovereignAccountOf, GovernanceLocation, KsmLocation, PoolAssetsConvertedConcreteId, @@ -333,7 +333,7 @@ pub type LocalAndForeignAssets = fungibles::UnionOf< AssetIdForTrustBackedAssetsConvert, AssetIdForTrustBackedAssets, >, - MultiLocation, + Location, AccountId, >; @@ -341,7 +341,7 @@ impl pallet_asset_conversion::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; type HigherPrecisionBalance = sp_core::U256; - type AssetKind = MultiLocation; + type AssetKind = Location; type Assets = fungible::UnionOf< Balances, LocalAndForeignAssets, @@ -388,8 +388,8 @@ pub type ForeignAssetsInstance = pallet_assets::Instance2; impl pallet_assets::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; - type AssetId = MultiLocationForAssetId; - type AssetIdParameter = MultiLocationForAssetId; + type AssetId = LocationForAssetId; + type AssetIdParameter = LocationForAssetId; type Currency = Balances; type CreateOrigin = ForeignCreators< (FromSiblingParachain>,), @@ -1125,18 +1125,18 @@ impl_runtime_apis! { impl pallet_asset_conversion::AssetConversionApi< Block, Balance, - MultiLocation, + Location, > for Runtime { - fn quote_price_exact_tokens_for_tokens(asset1: MultiLocation, asset2: MultiLocation, amount: Balance, include_fee: bool) -> Option { + fn quote_price_exact_tokens_for_tokens(asset1: Location, asset2: Location, amount: Balance, include_fee: bool) -> Option { AssetConversion::quote_price_exact_tokens_for_tokens(asset1, asset2, amount, include_fee) } - fn quote_price_tokens_for_exact_tokens(asset1: MultiLocation, asset2: MultiLocation, amount: Balance, include_fee: bool) -> Option { + fn quote_price_tokens_for_exact_tokens(asset1: Location, asset2: Location, amount: Balance, include_fee: bool) -> Option { AssetConversion::quote_price_tokens_for_exact_tokens(asset1, asset2, amount, include_fee) } - fn get_reserves(asset1: MultiLocation, asset2: MultiLocation) -> Option<(Balance, Balance)> { + fn get_reserves(asset1: Location, asset2: Location) -> Option<(Balance, Balance)> { AssetConversion::get_reserves(asset1, asset2).ok() } } @@ -1323,11 +1323,11 @@ impl_runtime_apis! { use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; impl pallet_xcm::benchmarking::Config for Runtime { - fn reachable_dest() -> Option { + fn reachable_dest() -> Option { Some(Parent.into()) } - fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + fn teleportable_asset_and_dest() -> Option<(MultiAsset, Location)> { // Relay/native token can be teleported between AH and Relay. Some(( MultiAsset { @@ -1338,7 +1338,7 @@ impl_runtime_apis! { )) } - fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, Location)> { // AH can reserve transfer native token to some random parachain. let random_para_id = 43211234; ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests( @@ -1354,14 +1354,14 @@ impl_runtime_apis! { } fn set_up_complex_asset_transfer( - ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + ) -> Option<(MultiAssets, u32, Location, Box)> { // Transfer to Relay some local AH asset (local-reserve-transfer) while paying // fees using teleported native token. // (We don't care that Relay doesn't accept incoming unknown AH local asset) let dest = Parent.into(); let fee_amount = ExistentialDeposit::get(); - let fee_asset: MultiAsset = (MultiLocation::parent(), fee_amount).into(); + let fee_asset: MultiAsset = (Location::parent(), fee_amount).into(); let who = frame_benchmarking::whitelisted_caller(); // Give some multiple of the existential deposit @@ -1379,7 +1379,7 @@ impl_runtime_apis! { Runtime, pallet_assets::Instance1 >(true, initial_asset_amount); - let asset_location = MultiLocation::new( + let asset_location = Location::new( 0, X2(PalletInstance(50), GeneralIndex(u32::from(asset_id).into())) ); @@ -1418,7 +1418,7 @@ impl_runtime_apis! { ExistentialDepositMultiAsset, PriceForParentDelivery, >; - fn valid_destination() -> Result { + fn valid_destination() -> Result { Ok(KsmLocation::get()) } fn worst_case_holding(depositable_count: u32) -> MultiAssets { @@ -1449,13 +1449,13 @@ impl_runtime_apis! { } parameter_types! { - pub const TrustedTeleporter: Option<(MultiLocation, MultiAsset)> = Some(( + pub const TrustedTeleporter: Option<(Location, MultiAsset)> = Some(( KsmLocation::get(), MultiAsset { fun: Fungible(UNITS), id: Concrete(KsmLocation::get()) }, )); pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; // AssetHubKusama trusts AssetHubPolkadot as reserve for DOTs - pub TrustedReserve: Option<(MultiLocation, MultiAsset)> = Some( + pub TrustedReserve: Option<(Location, MultiAsset)> = Some( ( xcm_config::bridging::to_polkadot::AssetHubPolkadot::get(), MultiAsset::from((xcm_config::bridging::to_polkadot::DotLocation::get(), 1000000000000 as u128)) @@ -1490,23 +1490,23 @@ impl_runtime_apis! { Err(BenchmarkError::Skip) } - fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> { + fn universal_alias() -> Result<(Location, Junction), BenchmarkError> { xcm_config::bridging::BridgingBenchmarksHelper::prepare_universal_alias() .ok_or(BenchmarkError::Skip) } - fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { + fn transact_origin_and_runtime_call() -> Result<(Location, RuntimeCall), BenchmarkError> { Ok((KsmLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) } - fn subscribe_origin() -> Result { + fn subscribe_origin() -> Result { Ok(KsmLocation::get()) } - fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> { + fn claimable_asset() -> Result<(Location, Location, MultiAssets), BenchmarkError> { let origin = KsmLocation::get(); let assets: MultiAssets = (Concrete(KsmLocation::get()), 1_000 * UNITS).into(); - let ticket = MultiLocation { parents: 0, interior: Here }; + let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } @@ -1517,16 +1517,16 @@ impl_runtime_apis! { }) } - fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { + fn unlockable_asset() -> Result<(Location, Location, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) } fn export_message_origin_and_destination( - ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { + ) -> Result<(Location, NetworkId, InteriorLocation), BenchmarkError> { Err(BenchmarkError::Skip) } - fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { + fn alias_origin() -> Result<(Location, Location), BenchmarkError> { Err(BenchmarkError::Skip) } } @@ -1543,7 +1543,7 @@ impl_runtime_apis! { ); } - fn ensure_bridged_target_destination() -> Result { + fn ensure_bridged_target_destination() -> Result { ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests( xcm_config::bridging::SiblingBridgeHubParaId::get().into() ); diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/mod.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/mod.rs index ffae9fb6c3..8360638976 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/mod.rs @@ -71,18 +71,14 @@ impl XcmWeightInfo for AssetHubKusamaXcmWeight { _query_id: &u64, _response: &Response, _max_weight: &Weight, - _querier: &Option, + _querier: &Option, ) -> Weight { XcmGeneric::::query_response() } - fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight { + fn transfer_asset(assets: &MultiAssets, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_asset()) } - fn transfer_reserve_asset( - assets: &MultiAssets, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { + fn transfer_reserve_asset(assets: &MultiAssets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_reserve_asset()) } fn transact( @@ -111,19 +107,19 @@ impl XcmWeightInfo for AssetHubKusamaXcmWeight { fn clear_origin() -> Weight { XcmGeneric::::clear_origin() } - fn descend_origin(_who: &InteriorMultiLocation) -> Weight { + fn descend_origin(_who: &InteriorLocation) -> Weight { XcmGeneric::::descend_origin() } fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { XcmGeneric::::report_error() } - fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { + fn deposit_asset(assets: &MultiAssetFilter, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()) } fn deposit_reserve_asset( assets: &MultiAssetFilter, - _dest: &MultiLocation, + _dest: &Location, _xcm: &Xcm<()>, ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) @@ -133,16 +129,12 @@ impl XcmWeightInfo for AssetHubKusamaXcmWeight { } fn initiate_reserve_withdraw( assets: &MultiAssetFilter, - _reserve: &MultiLocation, + _reserve: &Location, _xcm: &Xcm<()>, ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::initiate_reserve_withdraw()) } - fn initiate_teleport( - assets: &MultiAssetFilter, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { + fn initiate_teleport(assets: &MultiAssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::initiate_teleport()) } fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { @@ -163,7 +155,7 @@ impl XcmWeightInfo for AssetHubKusamaXcmWeight { fn clear_error() -> Weight { XcmGeneric::::clear_error() } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { + fn claim_asset(_assets: &MultiAssets, _ticket: &Location) -> Weight { XcmGeneric::::claim_asset() } fn trap(_code: &u64) -> Weight { @@ -181,7 +173,7 @@ impl XcmWeightInfo for AssetHubKusamaXcmWeight { fn expect_asset(assets: &MultiAssets) -> 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 { @@ -214,16 +206,16 @@ impl XcmWeightInfo for AssetHubKusamaXcmWeight { fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { Weight::MAX } - fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn lock_asset(_: &MultiAsset, _: &Location) -> Weight { Weight::MAX } - fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn unlock_asset(_: &MultiAsset, _: &Location) -> Weight { Weight::MAX } - fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn note_unlockable(_: &MultiAsset, _: &Location) -> Weight { Weight::MAX } - fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn request_unlock(_: &MultiAsset, _: &Location) -> Weight { Weight::MAX } fn set_fees_mode(_: &bool) -> Weight { @@ -235,11 +227,11 @@ impl XcmWeightInfo for AssetHubKusamaXcmWeight { 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/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 3820d5c793..e554e7be55 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -52,26 +52,26 @@ use xcm_builder::{ use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { - pub const KsmLocation: MultiLocation = MultiLocation::parent(); + pub const KsmLocation: Location = Location::parent(); pub const RelayNetwork: Option = Some(NetworkId::Kusama); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub UniversalLocation: InteriorMultiLocation = + pub UniversalLocation: InteriorLocation = X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())); pub UniversalLocationNetworkId: NetworkId = UniversalLocation::get().global_consensus().unwrap(); pub AssetsPalletIndex: u32 = ::index() as u32; - pub TrustBackedAssetsPalletLocation: MultiLocation = PalletInstance(AssetsPalletIndex::get() as u8).into(); - pub ForeignAssetsPalletLocation: MultiLocation = + pub TrustBackedAssetsPalletLocation: Location = PalletInstance(AssetsPalletIndex::get() as u8).into(); + pub ForeignAssetsPalletLocation: Location = PalletInstance(::index() as u8).into(); - pub PoolAssetsPalletLocation: MultiLocation = + pub PoolAssetsPalletLocation: Location = PalletInstance(::index() as u8).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); - pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); - pub const FellowshipLocation: MultiLocation = MultiLocation::parent(); - pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(kusama_runtime_constants::TREASURY_PALLET_ID)).into(); + pub const GovernanceLocation: Location = Location::parent(); + pub const FellowshipLocation: Location = Location::parent(); + pub RelayTreasuryLocation: Location = (Parent, PalletInstance(kusama_runtime_constants::TREASURY_PALLET_ID)).into(); pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); } -/// 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 = ( @@ -94,7 +94,7 @@ pub type CurrencyTransactor = FungibleAdapter< 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, @@ -112,7 +112,7 @@ pub type FungiblesTransactor = FungiblesAdapter< Assets, // Use this currency when it is a fungible asset matching the given location or name: TrustBackedAssetsConvertedConcreteId, - // 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, @@ -144,7 +144,7 @@ pub type ForeignFungiblesTransactor = FungiblesAdapter< ForeignAssets, // Use this currency when it is a fungible asset matching the given location or name: ForeignAssetsConvertedConcreteId, - // 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, @@ -164,7 +164,7 @@ pub type PoolFungiblesTransactor = FungiblesAdapter< PoolAssets, // Use this currency when it is a fungible asset matching the given location or name: PoolAssetsConvertedConcreteId, - // 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, @@ -210,9 +210,9 @@ parameter_types! { } match_types! { - pub type ParentOrParentsPlurality: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(Plurality { .. }) } + pub type ParentOrParentsPlurality: impl Contains = { + Location { parents: 1, interior: Here } | + Location { parents: 1, interior: X1(Plurality { .. }) } }; } @@ -639,9 +639,9 @@ pub type ForeignCreatorsSovereignAccountOf = ( /// Simple conversion of `u32` into an `AssetId` for use in benchmarking. pub struct XcmBenchmarkHelper; #[cfg(feature = "runtime-benchmarks")] -impl pallet_assets::BenchmarkHelper for XcmBenchmarkHelper { - fn create_asset_id_parameter(id: u32) -> MultiLocation { - MultiLocation { parents: 1, interior: X1(Parachain(id)) } +impl pallet_assets::BenchmarkHelper for XcmBenchmarkHelper { + fn create_asset_id_parameter(id: u32) -> Location { + Location { parents: 1, interior: X1(Parachain(id)) } } } @@ -663,7 +663,7 @@ pub mod bridging { pub storage XcmBridgeHubRouterByteFee: Balance = TransactionByteFee::get(); pub SiblingBridgeHubParaId: u32 = bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID; - pub SiblingBridgeHub: MultiLocation = MultiLocation::new(1, X1(Parachain(SiblingBridgeHubParaId::get()))); + pub SiblingBridgeHub: Location = Location::new(1, X1(Parachain(SiblingBridgeHubParaId::get()))); /// Router expects payment with this `AssetId`. /// (`AssetId` has to be aligned with `BridgeTable`) pub XcmBridgeHubRouterFeeAssetId: AssetId = KsmLocation::get().into(); @@ -680,7 +680,7 @@ pub mod bridging { use super::*; parameter_types! { - pub SiblingBridgeHubWithBridgeHubPolkadotInstance: MultiLocation = MultiLocation::new( + pub SiblingBridgeHubWithBridgeHubPolkadotInstance: Location = Location::new( 1, X2( Parachain(SiblingBridgeHubParaId::get()), @@ -689,16 +689,16 @@ pub mod bridging { ); pub const PolkadotNetwork: NetworkId = NetworkId::Polkadot; - pub AssetHubPolkadot: MultiLocation = MultiLocation::new( + pub AssetHubPolkadot: Location = Location::new( 2, X2( GlobalConsensus(PolkadotNetwork::get()), Parachain(polkadot_runtime_constants::system_parachain::ASSET_HUB_ID), ), ); - pub DotLocation: MultiLocation = MultiLocation::new(2, X1(GlobalConsensus(PolkadotNetwork::get()))); + pub DotLocation: Location = Location::new(2, X1(GlobalConsensus(PolkadotNetwork::get()))); - pub DotFromAssetHubPolkadot: (MultiAssetFilter, MultiLocation) = ( + pub DotFromAssetHubPolkadot: (MultiAssetFilter, Location) = ( Wild(AllOf { fun: WildFungible, id: Concrete(DotLocation::get()) }), AssetHubPolkadot::get() ); @@ -721,15 +721,15 @@ pub mod bridging { ]; /// Universal aliases - pub UniversalAliases: BTreeSet<(MultiLocation, Junction)> = BTreeSet::from_iter( + pub UniversalAliases: BTreeSet<(Location, Junction)> = BTreeSet::from_iter( sp_std::vec![ (SiblingBridgeHubWithBridgeHubPolkadotInstance::get(), GlobalConsensus(PolkadotNetwork::get())) ] ); } - impl Contains<(MultiLocation, Junction)> for UniversalAliases { - fn contains(alias: &(MultiLocation, Junction)) -> bool { + impl Contains<(Location, Junction)> for UniversalAliases { + fn contains(alias: &(Location, Junction)) -> bool { UniversalAliases::get().contains(alias) } } @@ -753,7 +753,7 @@ pub mod bridging { #[cfg(feature = "runtime-benchmarks")] impl BridgingBenchmarksHelper { - pub fn prepare_universal_alias() -> Option<(MultiLocation, Junction)> { + pub fn prepare_universal_alias() -> Option<(Location, Junction)> { let alias = to_polkadot::UniversalAliases::get().into_iter().find_map( |(location, junction)| { match to_polkadot::SiblingBridgeHubWithBridgeHubPolkadotInstance::get() diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index 1d2b5daa0d..294c673823 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -437,7 +437,7 @@ fn test_assets_balances_api_works() { .execute_with(|| { let local_asset_id = 1; let foreign_asset_id_multilocation = - MultiLocation { parents: 1, interior: X2(Parachain(1234), GeneralIndex(12345)) }; + Location { parents: 1, interior: X2(Parachain(1234), GeneralIndex(12345)) }; // check before assert_eq!(Assets::balance(local_asset_id, AccountId::from(ALICE)), 0); @@ -613,11 +613,11 @@ asset_test_utils::include_asset_transactor_transfer_with_pallet_assets_instance_ Runtime, XcmConfig, ForeignAssetsInstance, - MultiLocation, + Location, JustTry, collator_session_keys(), ExistentialDeposit::get(), - MultiLocation { parents: 1, interior: X2(Parachain(1313), GeneralIndex(12345)) }, + Location { parents: 1, interior: X2(Parachain(1313), GeneralIndex(12345)) }, Box::new(|| { assert!(Assets::asset_ids().collect::>().is_empty()); }), @@ -632,7 +632,7 @@ asset_test_utils::include_create_and_manage_foreign_assets_for_local_consensus_p WeightToFee, ForeignCreatorsSovereignAccountOf, ForeignAssetsInstance, - MultiLocation, + Location, JustTry, collator_session_keys(), ExistentialDeposit::get(), @@ -718,7 +718,7 @@ fn receive_reserve_asset_deposited_roc_from_asset_hub_polkadot_works() { AccountId::from([73; 32]), AccountId::from(BLOCK_AUTHOR_ACCOUNT), // receiving ROCs - (MultiLocation { parents: 2, interior: X1(GlobalConsensus(Polkadot)) }, 1000000000000, 1_000_000_000), + (Location { parents: 2, interior: X1(GlobalConsensus(Polkadot)) }, 1000000000000, 1_000_000_000), bridging_to_asset_hub_polkadot, ( X1(PalletInstance(bp_bridge_hub_kusama::WITH_BRIDGE_KUSAMA_TO_POLKADOT_MESSAGES_PALLET_INDEX)), diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 45d0250e71..8cd1978cc0 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -63,7 +63,7 @@ mod weights; pub mod xcm_config; use assets_common::{ - foreign_creators::ForeignCreators, matching::FromSiblingParachain, MultiLocationForAssetId, + foreign_creators::ForeignCreators, matching::FromSiblingParachain, LocationForAssetId, }; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; @@ -319,8 +319,8 @@ pub type ForeignAssetsInstance = pallet_assets::Instance2; impl pallet_assets::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; - type AssetId = MultiLocationForAssetId; - type AssetIdParameter = MultiLocationForAssetId; + type AssetId = LocationForAssetId; + type AssetIdParameter = LocationForAssetId; type Currency = Balances; type CreateOrigin = ForeignCreators< (FromSiblingParachain>,), @@ -1202,11 +1202,11 @@ impl_runtime_apis! { use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; impl pallet_xcm::benchmarking::Config for Runtime { - fn reachable_dest() -> Option { + fn reachable_dest() -> Option { Some(Parent.into()) } - fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + fn teleportable_asset_and_dest() -> Option<(MultiAsset, Location)> { // Relay/native token can be teleported between AH and Relay. Some(( MultiAsset { @@ -1217,7 +1217,7 @@ impl_runtime_apis! { )) } - fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, Location)> { // AH can reserve transfer native token to some random parachain. let random_para_id = 43211234; ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests( @@ -1233,14 +1233,14 @@ impl_runtime_apis! { } fn set_up_complex_asset_transfer( - ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + ) -> Option<(MultiAssets, u32, Location, Box)> { // Transfer to Relay some local AH asset (local-reserve-transfer) while paying // fees using teleported native token. // (We don't care that Relay doesn't accept incoming unknown AH local asset) let dest = Parent.into(); let fee_amount = ExistentialDeposit::get(); - let fee_asset: MultiAsset = (MultiLocation::parent(), fee_amount).into(); + let fee_asset: MultiAsset = (Location::parent(), fee_amount).into(); let who = frame_benchmarking::whitelisted_caller(); // Give some multiple of the existential deposit @@ -1258,7 +1258,7 @@ impl_runtime_apis! { Runtime, pallet_assets::Instance1 >(true, initial_asset_amount); - let asset_location = MultiLocation::new( + let asset_location = Location::new( 0, X2(PalletInstance(50), GeneralIndex(u32::from(asset_id).into())) ); @@ -1297,7 +1297,7 @@ impl_runtime_apis! { ExistentialDepositMultiAsset, PriceForParentDelivery, >; - fn valid_destination() -> Result { + fn valid_destination() -> Result { Ok(DotLocation::get()) } fn worst_case_holding(depositable_count: u32) -> MultiAssets { @@ -1328,13 +1328,13 @@ impl_runtime_apis! { } parameter_types! { - pub const TrustedTeleporter: Option<(MultiLocation, MultiAsset)> = Some(( + pub const TrustedTeleporter: Option<(Location, MultiAsset)> = Some(( DotLocation::get(), MultiAsset { fun: Fungible(UNITS), id: Concrete(DotLocation::get()) }, )); pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; // AssetHubPolkadot trusts AssetHubKusama as reserve for KSMs - pub TrustedReserve: Option<(MultiLocation, MultiAsset)> = Some( + pub TrustedReserve: Option<(Location, MultiAsset)> = Some( ( xcm_config::bridging::to_kusama::AssetHubKusama::get(), MultiAsset::from((xcm_config::bridging::to_kusama::KsmLocation::get(), 1000000000000 as u128)) @@ -1369,23 +1369,23 @@ impl_runtime_apis! { Err(BenchmarkError::Skip) } - fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> { + fn universal_alias() -> Result<(Location, Junction), BenchmarkError> { xcm_config::bridging::BridgingBenchmarksHelper::prepare_universal_alias() .ok_or(BenchmarkError::Skip) } - fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { + fn transact_origin_and_runtime_call() -> Result<(Location, RuntimeCall), BenchmarkError> { Ok((DotLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) } - fn subscribe_origin() -> Result { + fn subscribe_origin() -> Result { Ok(DotLocation::get()) } - fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> { + fn claimable_asset() -> Result<(Location, Location, MultiAssets), BenchmarkError> { let origin = DotLocation::get(); let assets: MultiAssets = (Concrete(DotLocation::get()), 1_000 * UNITS).into(); - let ticket = MultiLocation { parents: 0, interior: Here }; + let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } @@ -1396,16 +1396,16 @@ impl_runtime_apis! { }) } - fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { + fn unlockable_asset() -> Result<(Location, Location, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) } fn export_message_origin_and_destination( - ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { + ) -> Result<(Location, NetworkId, InteriorLocation), BenchmarkError> { Err(BenchmarkError::Skip) } - fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { + fn alias_origin() -> Result<(Location, Location), BenchmarkError> { Err(BenchmarkError::Skip) } } @@ -1422,7 +1422,7 @@ impl_runtime_apis! { ); } - fn ensure_bridged_target_destination() -> Result { + fn ensure_bridged_target_destination() -> Result { ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests( xcm_config::bridging::SiblingBridgeHubParaId::get().into() ); diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/mod.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/mod.rs index b34f4ed16c..19dc4a8ea1 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/mod.rs @@ -71,18 +71,14 @@ impl XcmWeightInfo for AssetHubPolkadotXcmWeight { _query_id: &u64, _response: &Response, _max_weight: &Weight, - _querier: &Option, + _querier: &Option, ) -> Weight { XcmGeneric::::query_response() } - fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight { + fn transfer_asset(assets: &MultiAssets, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_asset()) } - fn transfer_reserve_asset( - assets: &MultiAssets, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { + fn transfer_reserve_asset(assets: &MultiAssets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_reserve_asset()) } fn transact( @@ -111,19 +107,19 @@ impl XcmWeightInfo for AssetHubPolkadotXcmWeight { fn clear_origin() -> Weight { XcmGeneric::::clear_origin() } - fn descend_origin(_who: &InteriorMultiLocation) -> Weight { + fn descend_origin(_who: &InteriorLocation) -> Weight { XcmGeneric::::descend_origin() } fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { XcmGeneric::::report_error() } - fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { + fn deposit_asset(assets: &MultiAssetFilter, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()) } fn deposit_reserve_asset( assets: &MultiAssetFilter, - _dest: &MultiLocation, + _dest: &Location, _xcm: &Xcm<()>, ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) @@ -133,16 +129,12 @@ impl XcmWeightInfo for AssetHubPolkadotXcmWeight { } fn initiate_reserve_withdraw( assets: &MultiAssetFilter, - _reserve: &MultiLocation, + _reserve: &Location, _xcm: &Xcm<()>, ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::initiate_reserve_withdraw()) } - fn initiate_teleport( - assets: &MultiAssetFilter, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { + fn initiate_teleport(assets: &MultiAssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::initiate_teleport()) } fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { @@ -163,7 +155,7 @@ impl XcmWeightInfo for AssetHubPolkadotXcmWeight { fn clear_error() -> Weight { XcmGeneric::::clear_error() } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { + fn claim_asset(_assets: &MultiAssets, _ticket: &Location) -> Weight { XcmGeneric::::claim_asset() } fn trap(_code: &u64) -> Weight { @@ -181,7 +173,7 @@ impl XcmWeightInfo for AssetHubPolkadotXcmWeight { fn expect_asset(assets: &MultiAssets) -> 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 { @@ -214,16 +206,16 @@ impl XcmWeightInfo for AssetHubPolkadotXcmWeight { fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { Weight::MAX } - fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn lock_asset(_: &MultiAsset, _: &Location) -> Weight { Weight::MAX } - fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn unlock_asset(_: &MultiAsset, _: &Location) -> Weight { Weight::MAX } - fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn note_unlockable(_: &MultiAsset, _: &Location) -> Weight { Weight::MAX } - fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn request_unlock(_: &MultiAsset, _: &Location) -> Weight { Weight::MAX } fn set_fees_mode(_: &bool) -> Weight { @@ -235,11 +227,11 @@ impl XcmWeightInfo for AssetHubPolkadotXcmWeight { 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/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 32bbadda4b..1ce9647629 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -52,22 +52,22 @@ use xcm_builder::{ use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { - pub const DotLocation: MultiLocation = MultiLocation::parent(); + pub const DotLocation: Location = Location::parent(); pub const RelayNetwork: Option = Some(NetworkId::Polkadot); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub UniversalLocation: InteriorMultiLocation = + pub UniversalLocation: InteriorLocation = X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())); pub UniversalLocationNetworkId: NetworkId = UniversalLocation::get().global_consensus().unwrap(); - pub TrustBackedAssetsPalletLocation: MultiLocation = + pub TrustBackedAssetsPalletLocation: Location = PalletInstance(::index() as u8).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); - pub FellowshipLocation: MultiLocation = MultiLocation::new(1, Parachain(1001)); - pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); - pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); + pub FellowshipLocation: Location = Location::new(1, Parachain(1001)); + pub const GovernanceLocation: Location = Location::parent(); + pub RelayTreasuryLocation: Location = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); } -/// 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 = ( @@ -90,7 +90,7 @@ pub type FungibleTransactor = FungibleAdapter< 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, @@ -108,7 +108,7 @@ pub type FungiblesTransactor = FungiblesAdapter< Assets, // Use this currency when it is a fungible asset matching the given location or name: TrustBackedAssetsConvertedConcreteId, - // 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, @@ -140,7 +140,7 @@ pub type ForeignFungiblesTransactor = FungiblesAdapter< ForeignAssets, // Use this currency when it is a fungible asset matching the given location or name: ForeignAssetsConvertedConcreteId, - // 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, @@ -184,17 +184,17 @@ parameter_types! { } match_types! { - pub type ParentOrParentsPlurality: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(Plurality { .. }) } + pub type ParentOrParentsPlurality: impl Contains = { + Location { parents: 1, interior: Here } | + Location { parents: 1, interior: X1(Plurality { .. }) } }; pub type FellowshipEntities: impl Contains = { // Fellowship Plurality - MultiLocation { parents: 1, interior: X2(Parachain(1001), Plurality { id: BodyId::Technical, ..}) } | + Location { parents: 1, interior: X2(Parachain(1001), Plurality { id: BodyId::Technical, ..}) } | // Fellowship Salary Pallet - MultiLocation { parents: 1, interior: X2(Parachain(1001), PalletInstance(64)) } | + Location { parents: 1, interior: X2(Parachain(1001), PalletInstance(64)) } | // Fellowship Treasury Pallet - MultiLocation { parents: 1, interior: X2(Parachain(1001), PalletInstance(65)) } + Location { parents: 1, interior: X2(Parachain(1001), PalletInstance(65)) } }; } @@ -583,9 +583,9 @@ pub type ForeignCreatorsSovereignAccountOf = ( /// Simple conversion of `u32` into an `AssetId` for use in benchmarking. pub struct XcmBenchmarkHelper; #[cfg(feature = "runtime-benchmarks")] -impl pallet_assets::BenchmarkHelper for XcmBenchmarkHelper { - fn create_asset_id_parameter(id: u32) -> MultiLocation { - MultiLocation { parents: 1, interior: X1(Parachain(id)) } +impl pallet_assets::BenchmarkHelper for XcmBenchmarkHelper { + fn create_asset_id_parameter(id: u32) -> Location { + Location { parents: 1, interior: X1(Parachain(id)) } } } @@ -607,7 +607,7 @@ pub mod bridging { pub storage XcmBridgeHubRouterByteFee: Balance = TransactionByteFee::get(); pub SiblingBridgeHubParaId: u32 = bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID; - pub SiblingBridgeHub: MultiLocation = MultiLocation::new(1, X1(Parachain(SiblingBridgeHubParaId::get()))); + pub SiblingBridgeHub: Location = Location::new(1, X1(Parachain(SiblingBridgeHubParaId::get()))); /// Router expects payment with this `AssetId`. /// (`AssetId` has to be aligned with `BridgeTable`) pub XcmBridgeHubRouterFeeAssetId: AssetId = DotLocation::get().into(); @@ -624,7 +624,7 @@ pub mod bridging { use super::*; parameter_types! { - pub SiblingBridgeHubWithBridgeHubKusamaInstance: MultiLocation = MultiLocation::new( + pub SiblingBridgeHubWithBridgeHubKusamaInstance: Location = Location::new( 1, X2( Parachain(SiblingBridgeHubParaId::get()), @@ -633,16 +633,16 @@ pub mod bridging { ); pub const KusamaNetwork: NetworkId = NetworkId::Kusama; - pub AssetHubKusama: MultiLocation = MultiLocation::new( + pub AssetHubKusama: Location = Location::new( 2, X2( GlobalConsensus(KusamaNetwork::get()), Parachain(kusama_runtime_constants::system_parachain::ASSET_HUB_ID), ), ); - pub KsmLocation: MultiLocation = MultiLocation::new(2, X1(GlobalConsensus(KusamaNetwork::get()))); + pub KsmLocation: Location = Location::new(2, X1(GlobalConsensus(KusamaNetwork::get()))); - pub KsmFromAssetHubKusama: (MultiAssetFilter, MultiLocation) = ( + pub KsmFromAssetHubKusama: (MultiAssetFilter, Location) = ( Wild(AllOf { fun: WildFungible, id: Concrete(KsmLocation::get()) }), AssetHubKusama::get() ); @@ -665,15 +665,15 @@ pub mod bridging { ]; /// Universal aliases - pub UniversalAliases: BTreeSet<(MultiLocation, Junction)> = BTreeSet::from_iter( + pub UniversalAliases: BTreeSet<(Location, Junction)> = BTreeSet::from_iter( sp_std::vec![ (SiblingBridgeHubWithBridgeHubKusamaInstance::get(), GlobalConsensus(KusamaNetwork::get())) ] ); } - impl Contains<(MultiLocation, Junction)> for UniversalAliases { - fn contains(alias: &(MultiLocation, Junction)) -> bool { + impl Contains<(Location, Junction)> for UniversalAliases { + fn contains(alias: &(Location, Junction)) -> bool { UniversalAliases::get().contains(alias) } } @@ -697,7 +697,7 @@ pub mod bridging { #[cfg(feature = "runtime-benchmarks")] impl BridgingBenchmarksHelper { - pub fn prepare_universal_alias() -> Option<(MultiLocation, Junction)> { + pub fn prepare_universal_alias() -> Option<(Location, Junction)> { let alias = to_kusama::UniversalAliases::get().into_iter().find_map(|(location, junction)| { match to_kusama::SiblingBridgeHubWithBridgeHubKusamaInstance::get() diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index 5b36c1ed18..37b36e8b15 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -451,7 +451,7 @@ fn test_assets_balances_api_works() { .execute_with(|| { let local_asset_id = 1; let foreign_asset_id_multilocation = - MultiLocation { parents: 1, interior: X2(Parachain(1234), GeneralIndex(12345)) }; + Location { parents: 1, interior: X2(Parachain(1234), GeneralIndex(12345)) }; // check before assert_eq!(Assets::balance(local_asset_id, AccountId::from(ALICE)), 0); @@ -631,7 +631,7 @@ asset_test_utils::include_asset_transactor_transfer_with_pallet_assets_instance_ Runtime, XcmConfig, ForeignAssetsInstance, - MultiLocation, + Location, JustTry, asset_test_utils::CollatorSessionKeys::new( AccountId::from(ALICE), @@ -639,7 +639,7 @@ asset_test_utils::include_asset_transactor_transfer_with_pallet_assets_instance_ SessionKeys { aura: AuraId::from(sp_core::ed25519::Public::from_raw(ALICE)) } ), ExistentialDeposit::get(), - MultiLocation { parents: 1, interior: X2(Parachain(1313), GeneralIndex(12345)) }, + Location { parents: 1, interior: X2(Parachain(1313), GeneralIndex(12345)) }, Box::new(|| { assert!(Assets::asset_ids().collect::>().is_empty()); }), @@ -654,7 +654,7 @@ asset_test_utils::include_create_and_manage_foreign_assets_for_local_consensus_p WeightToFee, ForeignCreatorsSovereignAccountOf, ForeignAssetsInstance, - MultiLocation, + Location, JustTry, asset_test_utils::CollatorSessionKeys::new( AccountId::from(ALICE), @@ -743,7 +743,7 @@ fn receive_reserve_asset_deposited_roc_from_asset_hub_kusama_works() { AccountId::from([73; 32]), AccountId::from(BLOCK_AUTHOR_ACCOUNT), // receiving ROCs - (MultiLocation { parents: 2, interior: X1(GlobalConsensus(Kusama)) }, 1000000000000, 1_000_000_000), + (Location { parents: 2, interior: X1(GlobalConsensus(Kusama)) }, 1000000000000, 1_000_000_000), bridging_to_asset_hub_kusama, ( X1(PalletInstance(bp_bridge_hub_polkadot::WITH_BRIDGE_POLKADOT_TO_KUSAMA_MESSAGES_PALLET_INDEX)), diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs index 94110e7dc2..60a80c7bad 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs @@ -47,7 +47,7 @@ use kusama_runtime_constants as constants; use sp_runtime::{traits::ConstU32, RuntimeDebug}; use xcm::{ latest::prelude::*, - prelude::{InteriorMultiLocation, NetworkId}, + prelude::{InteriorLocation, NetworkId}, }; use xcm_builder::BridgeBlobDispatcher; @@ -77,12 +77,12 @@ parameter_types! { /// Polkadot Network identifier. pub PolkadotGlobalConsensusNetwork: NetworkId = NetworkId::Polkadot; /// Polkadot Network as `Location`. - pub PolkadotGlobalConsensusNetworkLocation: MultiLocation = MultiLocation { + pub PolkadotGlobalConsensusNetworkLocation: Location = Location { parents: 2, interior: X1(GlobalConsensus(PolkadotGlobalConsensusNetwork::get())) }; /// Interior location (relative to this runtime) of the with-Polkadot messages pallet. - pub BridgeKusamaToPolkadotMessagesPalletInstance: InteriorMultiLocation = X1( + pub BridgeKusamaToPolkadotMessagesPalletInstance: InteriorLocation = X1( PalletInstance(::index() as u8), ); @@ -91,7 +91,7 @@ parameter_types! { /// Identifier of the bridged Polkadot Asset Hub parachain. pub AssetHubPolkadotParaId: cumulus_primitives_core::ParaId = polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(); /// Location of the bridged Polkadot Bridge Hub parachain. - pub BridgeHubPolkadotLocation: MultiLocation = MultiLocation { + pub BridgeHubPolkadotLocation: Location = Location { parents: 2, interior: X2( GlobalConsensus(PolkadotGlobalConsensusNetwork::get()), @@ -114,7 +114,7 @@ parameter_types! { = &[XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT]; /// Lanes - pub ActiveLanes: sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorMultiLocation))> = sp_std::vec![ + pub ActiveLanes: sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorLocation))> = sp_std::vec![ ( FromAssetHubKusamaToAssetHubPolkadotRoute::get(), (PolkadotGlobalConsensusNetwork::get(), X1(Parachain(AssetHubPolkadotParaId::get().into()))) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index c71a50d5a0..7ff2559be0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -819,11 +819,11 @@ impl_runtime_apis! { use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; impl pallet_xcm::benchmarking::Config for Runtime { - fn reachable_dest() -> Option { + fn reachable_dest() -> Option { Some(Parent.into()) } - fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + fn teleportable_asset_and_dest() -> Option<(MultiAsset, Location)> { // Relay/native token can be teleported between BH and Relay. Some(( MultiAsset { @@ -834,13 +834,13 @@ impl_runtime_apis! { )) } - fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, Location)> { // Reserve transfers are disabled on BH. None } fn set_up_complex_asset_transfer( - ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + ) -> Option<(MultiAssets, u32, Location, Box)> { // BH only supports teleports to system parachain. // Relay/native token can be teleported between BH and Relay. let native_location = Parent.into(); @@ -867,7 +867,7 @@ impl_runtime_apis! { ExistentialDepositMultiAsset, PriceForParentDelivery, >; - fn valid_destination() -> Result { + fn valid_destination() -> Result { Ok(KsmRelayLocation::get()) } fn worst_case_holding(_depositable_count: u32) -> MultiAssets { @@ -883,12 +883,12 @@ impl_runtime_apis! { } parameter_types! { - pub const TrustedTeleporter: Option<(MultiLocation, MultiAsset)> = Some(( + pub const TrustedTeleporter: Option<(Location, MultiAsset)> = Some(( KsmRelayLocation::get(), MultiAsset { fun: Fungible(UNITS), id: Concrete(KsmRelayLocation::get()) }, )); pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; - pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None; + pub const TrustedReserve: Option<(Location, MultiAsset)> = None; } impl pallet_xcm_benchmarks::fungible::Config for Runtime { @@ -918,22 +918,22 @@ impl_runtime_apis! { Err(BenchmarkError::Skip) } - fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> { + fn universal_alias() -> Result<(Location, Junction), 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((KsmRelayLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) } - fn subscribe_origin() -> Result { + fn subscribe_origin() -> Result { Ok(KsmRelayLocation::get()) } - fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> { + fn claimable_asset() -> Result<(Location, Location, MultiAssets), BenchmarkError> { let origin = KsmRelayLocation::get(); let assets: MultiAssets = (Concrete(KsmRelayLocation::get()), 1_000 * UNITS).into(); - let ticket = MultiLocation { parents: 0, interior: Here }; + let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } @@ -944,12 +944,12 @@ impl_runtime_apis! { }) } - fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { + fn unlockable_asset() -> Result<(Location, Location, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) } fn export_message_origin_and_destination( - ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { + ) -> Result<(Location, NetworkId, InteriorLocation), BenchmarkError> { // save XCM version for remote bridge hub let _ = PolkadotXcm::force_xcm_version( RuntimeOrigin::root(), @@ -974,7 +974,7 @@ impl_runtime_apis! { ) } - fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { + fn alias_origin() -> Result<(Location, Location), BenchmarkError> { Err(BenchmarkError::Skip) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs index dce4cc9c4a..8e749a8f4b 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs @@ -72,18 +72,14 @@ impl XcmWeightInfo for BridgeHubKusamaXcmWeight { _query_id: &u64, _response: &Response, _max_weight: &Weight, - _querier: &Option, + _querier: &Option, ) -> Weight { XcmGeneric::::query_response() } - fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight { + fn transfer_asset(assets: &MultiAssets, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_asset()) } - fn transfer_reserve_asset( - assets: &MultiAssets, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { + fn transfer_reserve_asset(assets: &MultiAssets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_reserve_asset()) } fn transact( @@ -112,19 +108,19 @@ impl XcmWeightInfo for BridgeHubKusamaXcmWeight { fn clear_origin() -> Weight { XcmGeneric::::clear_origin() } - fn descend_origin(_who: &InteriorMultiLocation) -> Weight { + fn descend_origin(_who: &InteriorLocation) -> Weight { XcmGeneric::::descend_origin() } fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { XcmGeneric::::report_error() } - fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { + fn deposit_asset(assets: &MultiAssetFilter, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()) } fn deposit_reserve_asset( assets: &MultiAssetFilter, - _dest: &MultiLocation, + _dest: &Location, _xcm: &Xcm<()>, ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) @@ -134,16 +130,12 @@ impl XcmWeightInfo for BridgeHubKusamaXcmWeight { } fn initiate_reserve_withdraw( assets: &MultiAssetFilter, - _reserve: &MultiLocation, + _reserve: &Location, _xcm: &Xcm<()>, ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::initiate_reserve_withdraw()) } - fn initiate_teleport( - assets: &MultiAssetFilter, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { + fn initiate_teleport(assets: &MultiAssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::initiate_teleport()) } fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { @@ -164,7 +156,7 @@ impl XcmWeightInfo for BridgeHubKusamaXcmWeight { fn clear_error() -> Weight { XcmGeneric::::clear_error() } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { + fn claim_asset(_assets: &MultiAssets, _ticket: &Location) -> Weight { XcmGeneric::::claim_asset() } fn trap(_code: &u64) -> Weight { @@ -182,7 +174,7 @@ impl XcmWeightInfo for BridgeHubKusamaXcmWeight { fn expect_asset(assets: &MultiAssets) -> 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 { @@ -216,16 +208,16 @@ impl XcmWeightInfo for BridgeHubKusamaXcmWeight { let inner_encoded_len = inner.encode().len() as u32; XcmGeneric::::export_message(inner_encoded_len) } - fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn lock_asset(_: &MultiAsset, _: &Location) -> Weight { Weight::MAX } - fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn unlock_asset(_: &MultiAsset, _: &Location) -> Weight { Weight::MAX } - fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn note_unlockable(_: &MultiAsset, _: &Location) -> Weight { Weight::MAX } - fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn request_unlock(_: &MultiAsset, _: &Location) -> Weight { Weight::MAX } fn set_fees_mode(_: &bool) -> Weight { @@ -237,11 +229,11 @@ impl XcmWeightInfo for BridgeHubKusamaXcmWeight { 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/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 8d2dbf762d..6b014abedb 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -52,20 +52,20 @@ use xcm_builder::{ use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { - pub const KsmRelayLocation: MultiLocation = MultiLocation::parent(); + pub const KsmRelayLocation: 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(ParachainInfo::parachain_id().into())); pub const MaxInstructions: u32 = 100; pub const MaxAssetsIntoHolding: u32 = 64; - pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); - pub const FellowshipLocation: MultiLocation = MultiLocation::parent(); - pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(kusama_runtime_constants::TREASURY_PALLET_ID)).into(); + pub const GovernanceLocation: Location = Location::parent(); + pub const FellowshipLocation: Location = Location::parent(); + pub RelayTreasuryLocation: Location = (Parent, PalletInstance(kusama_runtime_constants::TREASURY_PALLET_ID)).into(); pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); } -/// 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 = ( @@ -85,7 +85,7 @@ pub type FungibleTransactor = FungibleAdapter< Balances, // Use this currency when it is a fungible asset matching the given location or name: IsConcrete, - // 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, @@ -118,9 +118,9 @@ pub type XcmOriginToTransactDispatchOrigin = ( ); match_types! { - pub type ParentOrParentsPlurality: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(Plurality { .. }) } + pub type ParentOrParentsPlurality: impl Contains = { + Location { parents: 1, interior: Here } | + Location { parents: 1, interior: X1(Plurality { .. }) } }; } /// A call filter for the XCM Transact instruction. This is a temporary measure until we properly diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs index 6d9e2af9fc..d3a17e0748 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs @@ -47,7 +47,7 @@ use polkadot_runtime_constants as constants; use sp_runtime::{traits::ConstU32, RuntimeDebug}; use xcm::{ latest::prelude::*, - prelude::{InteriorMultiLocation, NetworkId}, + prelude::{InteriorLocation, NetworkId}, }; use xcm_builder::BridgeBlobDispatcher; @@ -77,12 +77,12 @@ parameter_types! { /// Kusama Network identifier. pub KusamaGlobalConsensusNetwork: NetworkId = NetworkId::Kusama; /// Kusama Network as `Location`. - pub KusamaGlobalConsensusNetworkLocation: MultiLocation = MultiLocation { + pub KusamaGlobalConsensusNetworkLocation: Location = Location { parents: 2, interior: X1(GlobalConsensus(KusamaGlobalConsensusNetwork::get())) }; /// Interior location (relative to this runtime) of the with-Kusama messages pallet. - pub BridgePolkadotToKusamaMessagesPalletInstance: InteriorMultiLocation = X1( + pub BridgePolkadotToKusamaMessagesPalletInstance: InteriorLocation = X1( PalletInstance(::index() as u8), ); @@ -91,7 +91,7 @@ parameter_types! { /// Identifier of the bridged Kusama Asset Hub parachain. pub AssetHubKusamaParaId: cumulus_primitives_core::ParaId = kusama_runtime_constants::system_parachain::ASSET_HUB_ID.into(); /// Location of the bridged Kusama Bridge Hub parachain. - pub BridgeHubKusamaLocation: MultiLocation = MultiLocation { + pub BridgeHubKusamaLocation: Location = Location { parents: 2, interior: X2( GlobalConsensus(KusamaGlobalConsensusNetwork::get()), @@ -114,7 +114,7 @@ parameter_types! { = &[XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA]; /// Lanes - pub ActiveLanes: sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorMultiLocation))> = sp_std::vec![ + pub ActiveLanes: sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorLocation))> = sp_std::vec![ ( FromAssetHubPolkadotToAssetHubKusamaRoute::get(), (KusamaGlobalConsensusNetwork::get(), X1(Parachain(AssetHubKusamaParaId::get().into()))) diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index b6be1aca02..18c6439953 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -819,11 +819,11 @@ impl_runtime_apis! { use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; impl pallet_xcm::benchmarking::Config for Runtime { - fn reachable_dest() -> Option { + fn reachable_dest() -> Option { Some(Parent.into()) } - fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + fn teleportable_asset_and_dest() -> Option<(MultiAsset, Location)> { // Relay/native token can be teleported between BH and Relay. Some(( MultiAsset { @@ -834,13 +834,13 @@ impl_runtime_apis! { )) } - fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, Location)> { // Reserve transfers are disabled on BH. None } fn set_up_complex_asset_transfer( - ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + ) -> Option<(MultiAssets, u32, Location, Box)> { // BH only supports teleports to system parachain. // Relay/native token can be teleported between BH and Relay. let native_location = Parent.into(); @@ -867,7 +867,7 @@ impl_runtime_apis! { ExistentialDepositMultiAsset, PriceForParentDelivery, >; - fn valid_destination() -> Result { + fn valid_destination() -> Result { Ok(DotRelayLocation::get()) } fn worst_case_holding(_depositable_count: u32) -> MultiAssets { @@ -883,12 +883,12 @@ impl_runtime_apis! { } parameter_types! { - pub const TrustedTeleporter: Option<(MultiLocation, MultiAsset)> = Some(( + pub const TrustedTeleporter: Option<(Location, MultiAsset)> = Some(( DotRelayLocation::get(), MultiAsset { fun: Fungible(UNITS), id: Concrete(DotRelayLocation::get()) }, )); pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; - pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None; + pub const TrustedReserve: Option<(Location, MultiAsset)> = None; } impl pallet_xcm_benchmarks::fungible::Config for Runtime { @@ -918,22 +918,22 @@ impl_runtime_apis! { Err(BenchmarkError::Skip) } - fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> { + fn universal_alias() -> Result<(Location, Junction), 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((DotRelayLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) } - fn subscribe_origin() -> Result { + fn subscribe_origin() -> Result { Ok(DotRelayLocation::get()) } - fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> { + fn claimable_asset() -> Result<(Location, Location, MultiAssets), BenchmarkError> { let origin = DotRelayLocation::get(); let assets: MultiAssets = (Concrete(DotRelayLocation::get()), 1_000 * UNITS).into(); - let ticket = MultiLocation { parents: 0, interior: Here }; + let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } @@ -944,12 +944,12 @@ impl_runtime_apis! { }) } - fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { + fn unlockable_asset() -> Result<(Location, Location, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) } fn export_message_origin_and_destination( - ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { + ) -> Result<(Location, NetworkId, InteriorLocation), BenchmarkError> { // save XCM version for remote bridge hub let _ = PolkadotXcm::force_xcm_version( RuntimeOrigin::root(), @@ -974,7 +974,7 @@ impl_runtime_apis! { ) } - fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { + fn alias_origin() -> Result<(Location, Location), BenchmarkError> { Err(BenchmarkError::Skip) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs index 3a07ef123f..f4dbe966ed 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs @@ -72,18 +72,14 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { _query_id: &u64, _response: &Response, _max_weight: &Weight, - _querier: &Option, + _querier: &Option, ) -> Weight { XcmGeneric::::query_response() } - fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight { + fn transfer_asset(assets: &MultiAssets, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_asset()) } - fn transfer_reserve_asset( - assets: &MultiAssets, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { + fn transfer_reserve_asset(assets: &MultiAssets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_reserve_asset()) } fn transact( @@ -112,19 +108,19 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { fn clear_origin() -> Weight { XcmGeneric::::clear_origin() } - fn descend_origin(_who: &InteriorMultiLocation) -> Weight { + fn descend_origin(_who: &InteriorLocation) -> Weight { XcmGeneric::::descend_origin() } fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { XcmGeneric::::report_error() } - fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { + fn deposit_asset(assets: &MultiAssetFilter, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()) } fn deposit_reserve_asset( assets: &MultiAssetFilter, - _dest: &MultiLocation, + _dest: &Location, _xcm: &Xcm<()>, ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) @@ -134,16 +130,12 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { } fn initiate_reserve_withdraw( assets: &MultiAssetFilter, - _reserve: &MultiLocation, + _reserve: &Location, _xcm: &Xcm<()>, ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::initiate_reserve_withdraw()) } - fn initiate_teleport( - assets: &MultiAssetFilter, - _dest: &MultiLocation, - _xcm: &Xcm<()>, - ) -> Weight { + fn initiate_teleport(assets: &MultiAssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::initiate_teleport()) } fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { @@ -164,7 +156,7 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { fn clear_error() -> Weight { XcmGeneric::::clear_error() } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { + fn claim_asset(_assets: &MultiAssets, _ticket: &Location) -> Weight { XcmGeneric::::claim_asset() } fn trap(_code: &u64) -> Weight { @@ -182,7 +174,7 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { fn expect_asset(assets: &MultiAssets) -> 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 { @@ -216,16 +208,16 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { let inner_encoded_len = inner.encode().len() as u32; XcmGeneric::::export_message(inner_encoded_len) } - fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn lock_asset(_: &MultiAsset, _: &Location) -> Weight { Weight::MAX } - fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn unlock_asset(_: &MultiAsset, _: &Location) -> Weight { Weight::MAX } - fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn note_unlockable(_: &MultiAsset, _: &Location) -> Weight { Weight::MAX } - fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { + fn request_unlock(_: &MultiAsset, _: &Location) -> Weight { Weight::MAX } fn set_fees_mode(_: &bool) -> Weight { @@ -237,11 +229,11 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { 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/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index cc96e98598..216ebdc3d6 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -52,20 +52,20 @@ use xcm_builder::{ use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { - pub const DotRelayLocation: MultiLocation = MultiLocation::parent(); + pub const DotRelayLocation: Location = Location::parent(); 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(ParachainInfo::parachain_id().into())); pub const MaxInstructions: u32 = 100; pub const MaxAssetsIntoHolding: u32 = 64; - pub FellowshipLocation: MultiLocation = MultiLocation::new(1, Parachain(1001)); - pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); - pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); + pub FellowshipLocation: Location = Location::new(1, Parachain(1001)); + pub const GovernanceLocation: Location = Location::parent(); + pub RelayTreasuryLocation: Location = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); } -/// 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 = ( @@ -85,7 +85,7 @@ pub type FungibleTransactor = FungibleAdapter< Balances, // Use this currency when it is a fungible asset matching the given location or name: IsConcrete, - // 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, @@ -118,9 +118,9 @@ pub type XcmOriginToTransactDispatchOrigin = ( ); match_types! { - pub type ParentOrParentsPlurality: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(Plurality { .. }) } + pub type ParentOrParentsPlurality: impl Contains = { + Location { parents: 1, interior: Here } | + Location { parents: 1, interior: X1(Plurality { .. }) } }; pub type FellowsPlurality: impl Contains = { Location { parents: 1, interior: X2(Parachain(1001), Plurality { id: BodyId::Technical, ..}) } diff --git a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs index 8af872a2a2..c797e53acd 100644 --- a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs @@ -42,7 +42,7 @@ pub use origins::{ use pallet_ranked_collective::EnsureOfRank; use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use polkadot_runtime_common::impls::{ - LocatableAssetConverter, VersionedLocatableAsset, VersionedMultiLocationConverter, + LocatableAssetConverter, VersionedLocatableAsset, VersionedLocationConverter, }; use polkadot_runtime_constants::{currency::GRAND, time::HOURS, xcm::body::FELLOWSHIP_ADMIN_INDEX}; use sp_arithmetic::Permill; @@ -206,7 +206,7 @@ pub type FellowshipSalaryInstance = pallet_salary::Instance1; use xcm::prelude::*; parameter_types! { - pub AssetHub: MultiLocation = (Parent, Parachain(1000)).into(); + pub AssetHub: Location = (Parent, Parachain(1000)).into(); pub AssetHubUsdtId: AssetId = (PalletInstance(50), GeneralIndex(1984)).into(); pub UsdtAsset: LocatableAssetId = LocatableAssetId { location: AssetHub::get(), @@ -214,7 +214,7 @@ parameter_types! { }; // The interior location on AssetHub for the paying account. This is the Fellowship Salary // pallet instance (which sits at index 64). This sovereign account will need funding. - pub Interior: InteriorMultiLocation = PalletInstance(64).into(); + pub Interior: InteriorLocation = PalletInstance(64).into(); } const USDT_UNITS: u128 = 1_000_000; @@ -262,7 +262,7 @@ parameter_types! { pub const MaxBalance: Balance = Balance::max_value(); // The asset's interior location for the paying account. This is the Fellowship Treasury // pallet instance (which sits at index 65). - pub FellowshipTreasuryInteriorLocation: InteriorMultiLocation = + pub FellowshipTreasuryInteriorLocation: InteriorLocation = PalletInstance(::index() as u8).into(); } @@ -277,10 +277,10 @@ pub type FellowshipTreasuryPaymaster = PayOverXcm< crate::xcm_config::XcmRouter, crate::PolkadotXcm, ConstU32<{ 6 * HOURS }>, - VersionedMultiLocation, + VersionedLocation, VersionedLocatableAsset, LocatableAssetConverter, - VersionedMultiLocationConverter, + VersionedLocationConverter, >; pub type FellowshipTreasuryInstance = pallet_treasury::Instance1; @@ -336,7 +336,7 @@ impl pallet_treasury::Config for Runtime { >, >; type AssetKind = VersionedLocatableAsset; - type Beneficiary = VersionedMultiLocation; + type Beneficiary = VersionedLocation; type BeneficiaryLookup = IdentityLookup; #[cfg(not(feature = "runtime-benchmarks"))] type Paymaster = FellowshipTreasuryPaymaster; diff --git a/system-parachains/collectives/collectives-polkadot/src/impls.rs b/system-parachains/collectives/collectives-polkadot/src/impls.rs index a59c181db6..d4f1fd8ecc 100644 --- a/system-parachains/collectives/collectives-polkadot/src/impls.rs +++ b/system-parachains/collectives/collectives-polkadot/src/impls.rs @@ -24,7 +24,7 @@ use pallet_alliance::{ProposalIndex, ProposalProvider}; use parachains_common::impls::NegativeImbalance; use sp_runtime::DispatchError; use sp_std::{cmp::Ordering, marker::PhantomData, prelude::*}; -use xcm::latest::{Fungibility, Junction, Junctions::Here, MultiLocation, Parent, WeightLimit}; +use xcm::latest::{Fungibility, Junction, Junctions::Here, Location, Parent, WeightLimit}; use xcm_executor::traits::ConvertLocation; type AccountIdOf = ::AccountId; @@ -59,7 +59,7 @@ where Err(amount) => amount, }; let imbalance = amount.peek(); - let root_location: MultiLocation = Here.into(); + let root_location: Location = Here.into(); let root_account: AccountIdOf = match AccountIdConverter::convert_location(&root_location) { Some(a) => a, diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 962a29652c..bd8e02192d 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -976,11 +976,11 @@ impl_runtime_apis! { use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; impl pallet_xcm::benchmarking::Config for Runtime { - fn reachable_dest() -> Option { + fn reachable_dest() -> Option { Some(Parent.into()) } - fn teleportable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + fn teleportable_asset_and_dest() -> Option<(MultiAsset, Location)> { // Relay/native token can be teleported between Collectives and Relay. Some(( MultiAsset { @@ -991,13 +991,13 @@ impl_runtime_apis! { )) } - fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, MultiLocation)> { + fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, Location)> { // Reserve transfers are disabled on Collectives. None } fn set_up_complex_asset_transfer( - ) -> Option<(MultiAssets, u32, MultiLocation, Box)> { + ) -> Option<(MultiAssets, u32, Location, Box)> { // Collectives only supports teleports to system parachain. // Relay/native token can be teleported between Collectives and Relay. let native_location = Parent.into(); diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 3d2f689552..72e4df97f3 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -51,20 +51,20 @@ use xcm_builder::{ use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { - pub const RootLocation: MultiLocation = MultiLocation::here(); - pub const DotLocation: MultiLocation = MultiLocation::parent(); + pub const RootLocation: Location = Location::here(); + pub const DotLocation: Location = Location::parent(); pub const RelayNetwork: Option = Some(NetworkId::Polkadot); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub UniversalLocation: InteriorMultiLocation = + pub UniversalLocation: InteriorLocation = X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); - pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); - pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); + pub const GovernanceLocation: Location = Location::parent(); + pub RelayTreasuryLocation: Location = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); pub const TreasurerBodyId: BodyId = BodyId::Index(xcm_constants::body::TREASURER_INDEX); } -/// 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 = ( @@ -86,7 +86,7 @@ pub type FungibleTransactor = FungibleAdapter< 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, @@ -131,9 +131,9 @@ parameter_types! { } match_types! { - pub type ParentOrParentsPlurality: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(Plurality { .. }) } + pub type ParentOrParentsPlurality: impl Contains = { + Location { parents: 1, interior: Here } | + Location { parents: 1, interior: X1(Plurality { .. }) } }; pub type LocalPlurality: impl Contains = { Location { parents: 0, interior: X1(Plurality { .. }) } @@ -314,7 +314,7 @@ pub type XcmRouter = WithUniqueTopic<( XcmpQueue, )>; -/// Type to convert the Fellows origin to a Plurality `MultiLocation` value. +/// Type to convert the Fellows origin to a Plurality `Location` value. pub type FellowsToPlurality = OriginToPluralityVoice; impl pallet_xcm::Config for Runtime { diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index eb04d4753d..22a6c715d7 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -97,7 +97,7 @@ use system_parachains_constants::{ }; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::{ - latest::{BodyId, InteriorMultiLocation, Junction::PalletInstance}, + latest::{BodyId, InteriorLocation, Junction::PalletInstance}, v3::AssetId as XcmAssetId, }; @@ -339,7 +339,7 @@ parameter_types! { pub const PayoutSpendPeriod: BlockNumber = 30 * DAYS; // The asset's interior location for the paying account. This is the Treasury // pallet instance (which sits at index 18). - pub TreasuryInteriorLocation: InteriorMultiLocation = PalletInstance(ENCOINTER_TREASURY_PALLET_ID).into(); + pub TreasuryInteriorLocation: InteriorLocation = PalletInstance(ENCOINTER_TREASURY_PALLET_ID).into(); pub const MaxApprovals: u32 = 10; pub TreasuryAccount: AccountId = Treasury::account_id(); } diff --git a/system-parachains/encointer/src/xcm_config.rs b/system-parachains/encointer/src/xcm_config.rs index 8cb8dd0785..875df7d893 100644 --- a/system-parachains/encointer/src/xcm_config.rs +++ b/system-parachains/encointer/src/xcm_config.rs @@ -44,16 +44,16 @@ use xcm_builder::{ use xcm_executor::XcmExecutor; 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 Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); + pub Ancestry: Location = Parachain(ParachainInfo::parachain_id().into()).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); - pub UniversalLocation: InteriorMultiLocation = + pub UniversalLocation: InteriorLocation = X2(GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().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 = ( @@ -73,7 +73,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, @@ -112,13 +112,13 @@ 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, .. }) } }; - 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: X1(_) } }; } @@ -148,7 +148,7 @@ impl frame_support::traits::Contains for SafeCallFilter { parameter_types! { pub const MaxAssetsIntoHolding: u32 = 64; - pub const RelayLocation: MultiLocation = MultiLocation::parent(); + pub const RelayLocation: Location = Location::parent(); } pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { @@ -197,7 +197,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 { diff --git a/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs b/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs index d278a859cb..5c179faa3a 100644 --- a/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs +++ b/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs @@ -29,9 +29,9 @@ use xcm_builder::{ }; parameter_types! { - pub const KusamaLocation: MultiLocation = MultiLocation::parent(); + pub const KusamaLocation: Location = Location::parent(); pub const KusamaNetwork: Option = Some(NetworkId::Kusama); - pub UniversalLocation: InteriorMultiLocation = X1(Parachain(ParachainInfo::parachain_id().into())); + pub UniversalLocation: InteriorLocation = X1(Parachain(ParachainInfo::parachain_id().into())); } /// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, @@ -48,7 +48,7 @@ pub type XcmOriginToTransactDispatchOrigin = ( ); match_types! { - pub type JustTheParent: impl Contains = { MultiLocation { parents:1, interior: Here } }; + pub type JustTheParent: impl Contains = { Location { parents:1, interior: Here } }; } parameter_types! { From 2b197180ad488a9ec6168f95854e66f7152ce328 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 16 Feb 2024 14:09:07 +0100 Subject: [PATCH 124/316] Update relay/kusama/src/lib.rs --- relay/kusama/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 1575a1c0d2..e60c698f5e 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -936,7 +936,6 @@ impl pallet_identity::Config for Runtime { type Slashed = Treasury; type ForceOrigin = EitherOf, GeneralAdmin>; type RegistrarOrigin = EitherOf, GeneralAdmin>; - // TODO:(PR#159) check adds bellow and remove this comment! type OffchainSignature = Signature; type SigningPublicKey = ::Signer; type UsernameAuthorityOrigin = EnsureRoot; From 54e8b05ff94f8197c8a82946ab0ce364360ee2bb Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 16 Feb 2024 14:09:12 +0100 Subject: [PATCH 125/316] Update relay/polkadot/src/lib.rs --- relay/polkadot/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 64f119c129..8541e240f0 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -817,7 +817,6 @@ impl pallet_identity::Config for Runtime { type Slashed = Treasury; type ForceOrigin = EitherOf, GeneralAdmin>; type RegistrarOrigin = EitherOf, GeneralAdmin>; - // TODO:(PR#159) check adds bellow and remove this comment! type OffchainSignature = Signature; type SigningPublicKey = ::Signer; type UsernameAuthorityOrigin = EnsureRoot; From 36e80203e9842f9d50971f3aae8a5f85792e974f Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 16 Feb 2024 13:56:41 +0100 Subject: [PATCH 126/316] [xcm] adapt https://github.com/paritytech/polkadot-sdk/pull/2422 (IsChildSystemParachain) --- Cargo.lock | 4 +-- relay/kusama/constants/Cargo.toml | 4 +-- relay/kusama/constants/src/lib.rs | 18 +++---------- relay/polkadot/constants/Cargo.toml | 4 +-- relay/polkadot/constants/src/lib.rs | 18 +++---------- .../asset-hub-kusama/src/xcm_config.rs | 27 ++++++------------- .../asset-hub-polkadot/src/xcm_config.rs | 23 ++++------------ .../bridge-hub-kusama/src/xcm_config.rs | 23 +++++----------- .../bridge-hub-polkadot/src/xcm_config.rs | 19 +++---------- .../collectives-polkadot/src/xcm_config.rs | 20 ++++---------- 10 files changed, 43 insertions(+), 117 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ac1ac8e0f1..ea4889ec5d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5332,7 +5332,7 @@ dependencies = [ "sp-core 28.0.0", "sp-runtime 31.0.1", "sp-weights 27.0.0", - "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.3", ] [[package]] @@ -9722,7 +9722,7 @@ dependencies = [ "sp-core 28.0.0", "sp-runtime 31.0.1", "sp-weights 27.0.0", - "staging-xcm 7.0.0", + "staging-xcm-builder 7.0.3", ] [[package]] diff --git a/relay/kusama/constants/Cargo.toml b/relay/kusama/constants/Cargo.toml index 99e9e84975..f62cc11612 100644 --- a/relay/kusama/constants/Cargo.toml +++ b/relay/kusama/constants/Cargo.toml @@ -16,7 +16,7 @@ sp-runtime = { default-features = false , version = "31.0.1" } sp-weights = { default-features = false , version = "27.0.0" } sp-core = { default-features = false , version = "28.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "7.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "7.0.3" } [features] default = [ "std" ] @@ -27,5 +27,5 @@ std = [ "sp-core/std", "sp-runtime/std", "sp-weights/std", - "xcm/std" + "xcm-builder/std" ] diff --git a/relay/kusama/constants/src/lib.rs b/relay/kusama/constants/src/lib.rs index 342359608b..cda697ace0 100644 --- a/relay/kusama/constants/src/lib.rs +++ b/relay/kusama/constants/src/lib.rs @@ -99,7 +99,8 @@ pub mod fee { /// System Parachains. pub mod system_parachain { - use xcm::latest::prelude::*; + use primitives::Id; + use xcm_builder::IsChildSystemParachain; /// Asset Hub parachain ID. pub const ASSET_HUB_ID: u32 = 1000; @@ -108,19 +109,8 @@ pub mod system_parachain { /// Bridge Hub parachain ID. pub const BRIDGE_HUB_ID: u32 = 1002; - frame_support::match_types! { - // System parachains from Kusama point of view. - pub type SystemParachains: impl Contains = { - MultiLocation { - parents: 0, - interior: X1(Parachain( - ASSET_HUB_ID | - ENCOINTER_ID | - BRIDGE_HUB_ID - )), - } - }; - } + // System parachains from Kusama point of view. + pub type SystemParachains = IsChildSystemParachain; } /// Kusama Treasury pallet instance. diff --git a/relay/polkadot/constants/Cargo.toml b/relay/polkadot/constants/Cargo.toml index 9aca9fd84a..1c7250e884 100644 --- a/relay/polkadot/constants/Cargo.toml +++ b/relay/polkadot/constants/Cargo.toml @@ -16,7 +16,7 @@ sp-runtime = { default-features = false , version = "31.0.1" } sp-weights = { default-features = false , version = "27.0.0" } sp-core = { default-features = false , version = "28.0.0" } -xcm = { package = "staging-xcm", default-features = false , version = "7.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "7.0.3" } [features] default = [ "std" ] @@ -27,5 +27,5 @@ std = [ "sp-core/std", "sp-runtime/std", "sp-weights/std", - "xcm/std" + "xcm-builder/std" ] diff --git a/relay/polkadot/constants/src/lib.rs b/relay/polkadot/constants/src/lib.rs index 113c825ac6..e64b27d7b9 100644 --- a/relay/polkadot/constants/src/lib.rs +++ b/relay/polkadot/constants/src/lib.rs @@ -115,7 +115,8 @@ pub mod xcm { /// System Parachains. pub mod system_parachain { - use xcm::latest::prelude::*; + use primitives::Id; + use xcm_builder::IsChildSystemParachain; /// Asset Hub parachain ID. pub const ASSET_HUB_ID: u32 = 1000; @@ -124,19 +125,8 @@ pub mod system_parachain { /// Bridge Hub parachain ID. pub const BRIDGE_HUB_ID: u32 = 1002; - frame_support::match_types! { - // System parachains from Polkadot point of view. - pub type SystemParachains: impl Contains = { - MultiLocation { - parents: 0, - interior: X1(Parachain( - ASSET_HUB_ID | - COLLECTIVES_ID | - BRIDGE_HUB_ID - )), - } - }; - } + // System parachains from Polkadot point of view. + pub type SystemParachains = IsChildSystemParachain; } /// Polkadot Treasury pallet instance. diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 8d8665c0dd..774edf68b4 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -26,13 +26,12 @@ use frame_support::{ traits::{ConstU32, Contains, Equals, Everything, Nothing, PalletInfoAccess}, }; use frame_system::EnsureRoot; -use kusama_runtime_constants::system_parachain; use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, xcm_config::{ - AssetFeeAsExistentialDepositMultiplier, ConcreteAssetFromSystem, - RelayOrOtherSystemParachains, + AllSiblingSystemParachains, AssetFeeAsExistentialDepositMultiplier, + ConcreteAssetFromSystem, RelayOrOtherSystemParachains, }, }; use polkadot_parachain_primitives::primitives::Sibling; @@ -130,8 +129,8 @@ pub type ForeignAssetsConvertedConcreteId = assets_common::ForeignAssetsConverte // Ignore `TrustBackedAssets` explicitly StartsWith, // Ignore assets that start explicitly with our `GlobalConsensus(NetworkId)`, means: - // - foreign assets from our consensus should be: `MultiLocation {parents: 1, - // X*(Parachain(xyz), ..)}` + // - foreign assets from our consensus should be: `Location {parents: 1, X*(Parachain(xyz), + // ..)}` // - foreign assets outside our consensus with the same `GlobalConsensus(NetworkId)` won't // be accepted here StartsWithExplicitGlobalConsensus, @@ -479,23 +478,13 @@ pub type AssetFeeAsExistentialDepositMultiplierFeeCharger = AssetFeeAsExistentia TrustBackedAssetsInstance, >; -match_types! { - pub type SystemParachains: impl Contains = { - MultiLocation { - parents: 1, - interior: X1(Parachain( - system_parachain::ENCOINTER_ID | - system_parachain::BRIDGE_HUB_ID - )), - } - }; -} - /// Locations that will not be charged fees in the executor, /// either execution or delivery. /// We only waive fees for system functions, which these locations represent. -pub type WaivedLocations = - (RelayOrOtherSystemParachains, Equals); +pub type WaivedLocations = ( + RelayOrOtherSystemParachains, + Equals, +); /// Cases where a remote origin is accepted as trusted Teleporter for a given asset: /// diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 1391ec1266..606ef93034 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -30,12 +30,11 @@ use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, xcm_config::{ - AssetFeeAsExistentialDepositMultiplier, ConcreteAssetFromSystem, - RelayOrOtherSystemParachains, + AllSiblingSystemParachains, AssetFeeAsExistentialDepositMultiplier, + ConcreteAssetFromSystem, RelayOrOtherSystemParachains, }, }; use polkadot_parachain_primitives::primitives::Sibling; -use polkadot_runtime_constants::system_parachain; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; @@ -126,8 +125,8 @@ pub type ForeignAssetsConvertedConcreteId = assets_common::ForeignAssetsConverte // Ignore `TrustBackedAssets` explicitly StartsWith, // Ignore assets that start explicitly with our `GlobalConsensus(NetworkId)`, means: - // - foreign assets from our consensus should be: `MultiLocation {parents: 1, - // X*(Parachain(xyz), ..)}` + // - foreign assets from our consensus should be: `Location {parents: 1, X*(Parachain(xyz), + // ..)}` // - foreign assets outside our consensus with the same `GlobalConsensus(NetworkId)` won't // be accepted here StartsWithExplicitGlobalConsensus, @@ -422,23 +421,11 @@ pub type AssetFeeAsExistentialDepositMultiplierFeeCharger = AssetFeeAsExistentia TrustBackedAssetsInstance, >; -match_types! { - pub type SystemParachains: impl Contains = { - MultiLocation { - parents: 1, - interior: X1(Parachain( - system_parachain::COLLECTIVES_ID | - system_parachain::BRIDGE_HUB_ID - )), - } - }; -} - /// Locations that will not be charged fees in the executor, /// either execution or delivery. /// We only waive fees for system functions, which these locations represent. pub type WaivedLocations = ( - RelayOrOtherSystemParachains, + RelayOrOtherSystemParachains, Equals, FellowshipEntities, ); diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index dff1b23071..ae322290ad 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -27,11 +27,12 @@ use frame_support::{ traits::{ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; -use kusama_runtime_constants::system_parachain; use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, - xcm_config::{ConcreteAssetFromSystem, RelayOrOtherSystemParachains}, + xcm_config::{ + AllSiblingSystemParachains, ConcreteAssetFromSystem, RelayOrOtherSystemParachains, + }, }; use polkadot_parachain_primitives::primitives::Sibling; use sp_runtime::traits::AccountIdConversion; @@ -226,23 +227,13 @@ pub type Barrier = TrailingSetTopicAsId< >, >; -match_types! { - pub type SystemParachains: impl Contains = { - MultiLocation { - parents: 1, - interior: X1(Parachain( - system_parachain::ASSET_HUB_ID | - system_parachain::ENCOINTER_ID - )), - } - }; -} - /// Locations that will not be charged fees in the executor, /// either execution or delivery. /// We only waive fees for system functions, which these locations represent. -pub type WaivedLocations = - (RelayOrOtherSystemParachains, Equals); +pub type WaivedLocations = ( + RelayOrOtherSystemParachains, + Equals, +); /// Cases where a remote origin is accepted as trusted Teleporter for a given asset: /// - KSM with the parent Relay Chain and sibling parachains. diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 35db46788f..6fd603a1f0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -30,10 +30,11 @@ use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, - xcm_config::{ConcreteAssetFromSystem, RelayOrOtherSystemParachains}, + xcm_config::{ + AllSiblingSystemParachains, ConcreteAssetFromSystem, RelayOrOtherSystemParachains, + }, }; use polkadot_parachain_primitives::primitives::Sibling; -use polkadot_runtime_constants::system_parachain; use sp_runtime::traits::AccountIdConversion; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; @@ -230,23 +231,11 @@ pub type Barrier = TrailingSetTopicAsId< >, >; -match_types! { - pub type SystemParachains: impl Contains = { - MultiLocation { - parents: 1, - interior: X1(Parachain( - system_parachain::ASSET_HUB_ID | - system_parachain::COLLECTIVES_ID - )), - } - }; -} - /// Locations that will not be charged fees in the executor, /// either execution or delivery. /// We only waive fees for system functions, which these locations represent. pub type WaivedLocations = ( - RelayOrOtherSystemParachains, + RelayOrOtherSystemParachains, Equals, FellowsPlurality, ); diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index a67316518d..e0ce22e858 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -27,10 +27,12 @@ use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, - xcm_config::{ConcreteAssetFromSystem, RelayOrOtherSystemParachains}, + xcm_config::{ + AllSiblingSystemParachains, ConcreteAssetFromSystem, RelayOrOtherSystemParachains, + }, }; use polkadot_parachain_primitives::primitives::Sibling; -use polkadot_runtime_constants::{system_parachain, xcm as xcm_constants}; +use polkadot_runtime_constants::xcm as xcm_constants; use sp_runtime::traits::AccountIdConversion; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; @@ -253,23 +255,11 @@ pub type Barrier = TrailingSetTopicAsId< >, >; -match_types! { - pub type SystemParachains: impl Contains = { - MultiLocation { - parents: 1, - interior: X1(Parachain( - system_parachain::ASSET_HUB_ID | - system_parachain::BRIDGE_HUB_ID - )), - } - }; -} - /// Locations that will not be charged fees in the executor, /// either execution or delivery. /// We only waive fees for system functions, which these locations represent. pub type WaivedLocations = ( - RelayOrOtherSystemParachains, + RelayOrOtherSystemParachains, Equals, Equals, LocalPlurality, From 44eefcca721585627ebda8dc87c7710abff24c12 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 15 Feb 2024 13:44:36 +0100 Subject: [PATCH 127/316] [xcm] adapt https://github.com/paritytech/polkadot-sdk/pull/2428 (ParentRelayOrSiblingParachains) --- .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 8 ++------ .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 8 ++------ .../bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 9 +++------ .../bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs | 9 +++------ .../collectives/collectives-polkadot/src/xcm_config.rs | 9 +++------ 5 files changed, 13 insertions(+), 30 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 774edf68b4..3820d5c793 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -31,7 +31,7 @@ use parachains_common::{ impls::ToStakingPot, xcm_config::{ AllSiblingSystemParachains, AssetFeeAsExistentialDepositMultiplier, - ConcreteAssetFromSystem, RelayOrOtherSystemParachains, + ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, RelayOrOtherSystemParachains, }, }; use polkadot_parachain_primitives::primitives::Sibling; @@ -214,10 +214,6 @@ match_types! { MultiLocation { parents: 1, interior: Here } | MultiLocation { parents: 1, interior: X1(Plurality { .. }) } }; - pub type ParentOrSiblings: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(_) } - }; } /// A call filter for the XCM Transact instruction. This is a temporary measure until we properly @@ -462,7 +458,7 @@ pub type Barrier = TrailingSetTopicAsId< Equals, )>, // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, + AllowSubscriptionsFrom, ), UniversalLocation, ConstU32<8>, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 606ef93034..6b50feb0d3 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -31,7 +31,7 @@ use parachains_common::{ impls::ToStakingPot, xcm_config::{ AllSiblingSystemParachains, AssetFeeAsExistentialDepositMultiplier, - ConcreteAssetFromSystem, RelayOrOtherSystemParachains, + ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, RelayOrOtherSystemParachains, }, }; use polkadot_parachain_primitives::primitives::Sibling; @@ -188,10 +188,6 @@ match_types! { MultiLocation { parents: 1, interior: Here } | MultiLocation { parents: 1, interior: X1(Plurality { .. }) } }; - pub type ParentOrSiblings: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(_) } - }; pub type FellowshipEntities: impl Contains = { // Fellowship Plurality MultiLocation { parents: 1, interior: X2(Parachain(1001), Plurality { id: BodyId::Technical, ..}) } | @@ -405,7 +401,7 @@ pub type Barrier = TrailingSetTopicAsId< Equals, )>, // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, + AllowSubscriptionsFrom, ), UniversalLocation, ConstU32<8>, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index ae322290ad..8d2dbf762d 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -31,7 +31,8 @@ use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, xcm_config::{ - AllSiblingSystemParachains, ConcreteAssetFromSystem, RelayOrOtherSystemParachains, + AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, + RelayOrOtherSystemParachains, }, }; use polkadot_parachain_primitives::primitives::Sibling; @@ -121,10 +122,6 @@ match_types! { MultiLocation { parents: 1, interior: Here } | MultiLocation { parents: 1, interior: X1(Plurality { .. }) } }; - pub type ParentOrSiblings: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(_) } - }; } /// A call filter for the XCM Transact instruction. This is a temporary measure until we properly /// account for proof size weights. @@ -218,7 +215,7 @@ pub type Barrier = TrailingSetTopicAsId< Equals, )>, // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, + AllowSubscriptionsFrom, ), UniversalLocation, ConstU32<8>, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 6fd603a1f0..d0bb97438c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -31,7 +31,8 @@ use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, xcm_config::{ - AllSiblingSystemParachains, ConcreteAssetFromSystem, RelayOrOtherSystemParachains, + AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, + RelayOrOtherSystemParachains, }, }; use polkadot_parachain_primitives::primitives::Sibling; @@ -121,10 +122,6 @@ match_types! { MultiLocation { parents: 1, interior: Here } | MultiLocation { parents: 1, interior: X1(Plurality { .. }) } }; - pub type ParentOrSiblings: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(_) } - }; pub type FellowsPlurality: impl Contains = { MultiLocation { parents: 1, interior: X2(Parachain(1001), Plurality { id: BodyId::Technical, ..}) } }; @@ -222,7 +219,7 @@ pub type Barrier = TrailingSetTopicAsId< Equals, )>, // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, + AllowSubscriptionsFrom, ), UniversalLocation, ConstU32<8>, diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index e0ce22e858..0325fea242 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -28,7 +28,8 @@ use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, xcm_config::{ - AllSiblingSystemParachains, ConcreteAssetFromSystem, RelayOrOtherSystemParachains, + AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, + RelayOrOtherSystemParachains, }, }; use polkadot_parachain_primitives::primitives::Sibling; @@ -134,10 +135,6 @@ match_types! { MultiLocation { parents: 1, interior: Here } | MultiLocation { parents: 1, interior: X1(Plurality { .. }) } }; - pub type ParentOrSiblings: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(_) } - }; pub type LocalPlurality: impl Contains = { MultiLocation { parents: 0, interior: X1(Plurality { .. }) } }; @@ -246,7 +243,7 @@ pub type Barrier = TrailingSetTopicAsId< Equals, )>, // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, + AllowSubscriptionsFrom, ), UniversalLocation, ConstU32<8>, From 31707332a9c8b3ce32c31ef4c52a4a34a99620e9 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 16 Feb 2024 15:33:18 +0100 Subject: [PATCH 128/316] Change TreasuryArguments for collectives --- .../collectives/collectives-polkadot/src/fellowship/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs index 8af872a2a2..088e6437f9 100644 --- a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs @@ -345,5 +345,8 @@ impl pallet_treasury::Config for Runtime { type BalanceConverter = AssetRate; type PayoutPeriod = ConstU32<{ 30 * DAYS }>; #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = polkadot_runtime_common::impls::benchmarks::TreasuryArguments; + type BenchmarkHelper = polkadot_runtime_common::impls::benchmarks::TreasuryArguments< + sp_core::ConstU8<1>, + ConstU32<1000>, + >; } From a0a61ae1e9613b6e9a6079dd9ad0ecbb341e89e3 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 16 Feb 2024 15:59:07 +0100 Subject: [PATCH 129/316] [bridges] Removed older TODO for bridges fees estimation --- .../bridge-hub-kusama/primitives/src/lib.rs | 6 +- .../bridge-hub-kusama/tests/tests.rs | 146 +++++++++++++----- .../bridge-hub-polkadot/primitives/src/lib.rs | 6 +- .../bridge-hub-polkadot/tests/tests.rs | 145 ++++++++++++----- 4 files changed, 227 insertions(+), 76 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs index a746c2e022..d1faa0e11a 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs @@ -87,15 +87,15 @@ frame_support::parameter_types! { /// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Kusama /// BridgeHub. /// (initially was calculated by test `BridgeHubKusama::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`) - pub const BridgeHubKusamaBaseXcmFeeInKsms: u128 = 16_196_533_317; + pub const BridgeHubKusamaBaseXcmFeeInKsms: u128 = 16_156_041_984; /// Transaction fee that is paid at the Kusama BridgeHub for delivering single inbound message. /// (initially was calculated by test `BridgeHubKusama::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`) - pub const BridgeHubKusamaBaseDeliveryFeeInKsms: u128 = 56_516_280_489; + pub const BridgeHubKusamaBaseDeliveryFeeInKsms: u128 = 56_374_989_788; /// Transaction fee that is paid at the Kusama BridgeHub for delivering single outbound message confirmation. /// (initially was calculated by test `BridgeHubKusama::can_calculate_fee_for_complex_message_confirmation_transaction` + `33%`) - pub const BridgeHubKusamaBaseConfirmationFeeInKsms: u128 = 53_943_614_276; + pub const BridgeHubKusamaBaseConfirmationFeeInKsms: u128 = 53_808_755_240; } /// Compute the total estimated fee that needs to be paid in KSMs by the sender when sending diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index bf614b2096..4b93dd7e73 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -26,11 +26,11 @@ use bridge_hub_kusama_runtime::{ xcm_config::{KsmRelayLocation, RelayNetwork, XcmConfig}, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, - SignedExtra, UncheckedExtrinsic, + SignedExtra, TransactionPayment, UncheckedExtrinsic, }; use bridge_hub_test_utils::test_cases::from_parachain; use codec::{Decode, Encode}; -use frame_support::{parameter_types, traits::ConstU8}; +use frame_support::{dispatch::GetDispatchInfo, parameter_types, traits::ConstU8}; use parachains_common::{AccountId, AuraId, Balance}; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ @@ -97,6 +97,13 @@ fn construct_and_apply_extrinsic( r.unwrap() } +fn construct_and_estimate_extrinsic_fee(batch: pallet_utility::Call) -> Balance { + let batch_call = RuntimeCall::Utility(batch); + let batch_info = batch_call.get_dispatch_info(); + let xt = construct_extrinsic(Alice, batch_call); + TransactionPayment::compute_fee(xt.encoded_size() as _, &batch_info, 0) +} + fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys { bridge_hub_test_utils::CollatorSessionKeys::new( AccountId::from(Alice), @@ -261,42 +268,111 @@ pub fn complex_relay_extrinsic_works() { #[test] pub fn can_calculate_weight_for_paid_export_message_with_reserve_transfer() { - let estimated = bridge_hub_test_utils::test_cases::can_calculate_weight_for_paid_export_message_with_reserve_transfer::< - Runtime, - XcmConfig, - WeightToFee, - >(); + check_sane_fees_values( + "bp_bridge_hub_kusama::BridgeHubKusamaBaseXcmFeeInKsms", + bp_bridge_hub_kusama::BridgeHubKusamaBaseXcmFeeInKsms::get(), + || { + bridge_hub_test_utils::test_cases::can_calculate_weight_for_paid_export_message_with_reserve_transfer::< + Runtime, + XcmConfig, + WeightToFee, + >() + }, + Perbill::from_percent(33), + Some(-33), + &format!( + "Estimate fee for `ExportMessage` for runtime: {:?}", + ::Version::get() + ), + ) +} + +#[test] +pub fn can_calculate_fee_for_complex_message_delivery_transaction() { + check_sane_fees_values( + "bp_bridge_hub_kusama::BridgeHubKusamaBaseDeliveryFeeInKsms", + bp_bridge_hub_kusama::BridgeHubKusamaBaseDeliveryFeeInKsms::get(), + || { + from_parachain::can_calculate_fee_for_complex_message_delivery_transaction::< + RuntimeTestsAdapter, + >(collator_session_keys(), construct_and_estimate_extrinsic_fee) + }, + Perbill::from_percent(33), + Some(-33), + &format!( + "Estimate fee for `single message delivery` for runtime: {:?}", + ::Version::get() + ), + ) +} + +#[test] +pub fn can_calculate_fee_for_complex_message_confirmation_transaction() { + check_sane_fees_values( + "bp_bridge_hub_kusama::BridgeHubKusamaBaseConfirmationFeeInKsms", + bp_bridge_hub_kusama::BridgeHubKusamaBaseConfirmationFeeInKsms::get(), + || { + from_parachain::can_calculate_fee_for_complex_message_confirmation_transaction::< + RuntimeTestsAdapter, + >(collator_session_keys(), construct_and_estimate_extrinsic_fee) + }, + Perbill::from_percent(33), + Some(-33), + &format!( + "Estimate fee for `single message confirmation` for runtime: {:?}", + ::Version::get() + ), + ) +} + +use sp_runtime::Perbill; + +// TODO:(PR#159): remove when `polkadot-sdk@1.8.0` bump +/// A helper function for comparing the actual value of a fee constant with its estimated value. The +/// estimated value can be overestimated (`overestimate_in_percent`), and if the difference to the +/// actual value is below `margin_overestimate_diff_in_percent_for_lowering`, we should lower the +/// actual value. +pub fn check_sane_fees_values( + const_name: &str, + actual: u128, + calculate_estimated_fee: fn() -> u128, + overestimate_in_percent: Perbill, + margin_overestimate_diff_in_percent_for_lowering: Option, + label: &str, +) { + let estimated = calculate_estimated_fee(); + let estimated_plus_overestimate = estimated + (overestimate_in_percent * estimated); + let diff_to_estimated = diff_as_percent(actual, estimated); + let diff_to_estimated_plus_overestimate = diff_as_percent(actual, estimated_plus_overestimate); + + log::error!( + target: "bridges::estimate", + "{label}:\nconstant: {const_name}\n[+] actual: {actual}\n[+] estimated: {estimated} ({diff_to_estimated:.2?})\n[+] estimated(+33%): {estimated_plus_overestimate} ({diff_to_estimated_plus_overestimate:.2?})", + ); // check if estimated value is sane - let max_expected = bp_bridge_hub_kusama::BridgeHubKusamaBaseXcmFeeInKsms::get(); assert!( - estimated <= max_expected, - "calculated: {:?}, max_expected: {:?}, please adjust `bp_bridge_hub_kusama::BridgeHubKusamaBaseXcmFeeInKsms` value", - estimated, - max_expected + estimated <= actual, + "estimated: {estimated}, actual: {actual}, please adjust `{const_name}` to the value: {estimated_plus_overestimate}", + ); + assert!( + estimated_plus_overestimate <= actual, + "estimated_plus_overestimate: {estimated_plus_overestimate}, actual: {actual}, please adjust `{const_name}` to the value: {estimated_plus_overestimate}", + ); + + if let Some(margin_overestimate_diff_in_percent_for_lowering) = + margin_overestimate_diff_in_percent_for_lowering + { + assert!( + diff_to_estimated_plus_overestimate > margin_overestimate_diff_in_percent_for_lowering as f64, + "diff_to_estimated_plus_overestimate: {diff_to_estimated_plus_overestimate:.2}, overestimate_diff_in_percent_for_lowering: {margin_overestimate_diff_in_percent_for_lowering}, please adjust `{const_name}` to the value: {estimated_plus_overestimate}", ); + } } -// TODO: replace me with direct usages of `bridge_hub_test_utils` after deps are bumped to (at -// least) 1.4 -// -// Following two tests have to be implemented properly after upgrade to 1.6. -// See https://github.com/paritytech/polkadot-sdk/pull/2139/ and https://github.com/paritytech/parity-bridges-common/pull/2728 -// for impl details -// -// Until that, anyone can run it manually by doing following: -// -// 1) cargo vendor ../vendored-dependencies -// 2) apply relevant changes from above PRs -// 3) change workspace Cargo.toml: -// [patch.crates-io] -// bp-polkadot-core = { path = "../vendored-dependencies/bp-polkadot-core" } -// bridge-hub-test-utils = { path = "../vendored-dependencies/bridge-hub-test-utils" } -// bridge-runtime-common = { path = "../vendored-dependencies/bridge-runtime-common" } -// 4) add actual tests code and do `cargo test -p bridge-hub-polkadot-runtime` - -#[test] -pub fn can_calculate_fee_for_complex_message_delivery_transaction() {} - -#[test] -pub fn can_calculate_fee_for_complex_message_confirmation_transaction() {} +// TODO:(PR#159): remove when `polkadot-sdk@1.8.0` bump +pub fn diff_as_percent(left: u128, right: u128) -> f64 { + let left = left as f64; + let right = right as f64; + ((left - right).abs() / left) * 100f64 * (if left >= right { -1 } else { 1 }) as f64 +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs index b02f6107d6..50c7713549 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs @@ -78,15 +78,15 @@ frame_support::parameter_types! { /// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Polkadot /// BridgeHub. /// (initially was calculated by test `BridgeHubPolkadot::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`) - pub const BridgeHubPolkadotBaseXcmFeeInDots: Balance = 4_858_960_000; + pub const BridgeHubPolkadotBaseXcmFeeInDots: Balance = 4_846_812_600; /// Transaction fee that is paid at the Polkadot BridgeHub for delivering single inbound message. /// (initially was calculated by test `BridgeHubPolkadot::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`) - pub const BridgeHubPolkadotBaseDeliveryFeeInDots: Balance = 16_954_899_613; + pub const BridgeHubPolkadotBaseDeliveryFeeInDots: Balance = 16_912_512_364; /// Transaction fee that is paid at the Polkadot BridgeHub for delivering single outbound message confirmation. /// (initially was calculated by test `BridgeHubPolkadot::can_calculate_fee_for_complex_message_confirmation_transaction` + `33%`) - pub const BridgeHubPolkadotBaseConfirmationFeeInDots: Balance = 16_183_099_613; + pub const BridgeHubPolkadotBaseConfirmationFeeInDots: Balance = 16_142_641_864; } /// Compute the total estimated fee that needs to be paid in DOTs by the sender when sending diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index c3a3517318..0832d31d4b 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . +use bp_bridge_hub_kusama::Perbill; use bp_polkadot_core::Signature; use bridge_hub_polkadot_runtime::{ bridge_to_kusama_config::{ @@ -26,11 +27,11 @@ use bridge_hub_polkadot_runtime::{ xcm_config::{DotRelayLocation, RelayNetwork, XcmConfig}, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, - SignedExtra, UncheckedExtrinsic, + SignedExtra, TransactionPayment, UncheckedExtrinsic, }; use bridge_hub_test_utils::test_cases::from_parachain; use codec::{Decode, Encode}; -use frame_support::{parameter_types, traits::ConstU8}; +use frame_support::{dispatch::GetDispatchInfo, parameter_types, traits::ConstU8}; use parachains_common::{AccountId, AuraId, Balance}; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ @@ -97,6 +98,13 @@ fn construct_and_apply_extrinsic( r.unwrap() } +fn construct_and_estimate_extrinsic_fee(batch: pallet_utility::Call) -> Balance { + let batch_call = RuntimeCall::Utility(batch); + let batch_info = batch_call.get_dispatch_info(); + let xt = construct_extrinsic(Alice, batch_call); + TransactionPayment::compute_fee(xt.encoded_size() as _, &batch_info, 0) +} + fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys { bridge_hub_test_utils::CollatorSessionKeys::new( AccountId::from(Alice), @@ -261,42 +269,109 @@ pub fn complex_relay_extrinsic_works() { #[test] pub fn can_calculate_weight_for_paid_export_message_with_reserve_transfer() { - let estimated = bridge_hub_test_utils::test_cases::can_calculate_weight_for_paid_export_message_with_reserve_transfer::< - Runtime, - XcmConfig, - WeightToFee, - >(); + check_sane_fees_values( + "bp_bridge_hub_polkadot::BridgeHubPolkadotBaseXcmFeeInDots", + bp_bridge_hub_polkadot::BridgeHubPolkadotBaseXcmFeeInDots::get(), + || { + bridge_hub_test_utils::test_cases::can_calculate_weight_for_paid_export_message_with_reserve_transfer::< + Runtime, + XcmConfig, + WeightToFee, + >() + }, + Perbill::from_percent(33), + Some(-33), + &format!( + "Estimate fee for `ExportMessage` for runtime: {:?}", + ::Version::get() + ), + ) +} + +#[test] +pub fn can_calculate_fee_for_complex_message_delivery_transaction() { + check_sane_fees_values( + "bp_bridge_hub_polkadot::BridgeHubPolkadotBaseDeliveryFeeInDots", + bp_bridge_hub_polkadot::BridgeHubPolkadotBaseDeliveryFeeInDots::get(), + || { + from_parachain::can_calculate_fee_for_complex_message_delivery_transaction::< + RuntimeTestsAdapter, + >(collator_session_keys(), construct_and_estimate_extrinsic_fee) + }, + Perbill::from_percent(33), + Some(-33), + &format!( + "Estimate fee for `single message delivery` for runtime: {:?}", + ::Version::get() + ), + ) +} + +#[test] +pub fn can_calculate_fee_for_complex_message_confirmation_transaction() { + check_sane_fees_values( + "bp_bridge_hub_polkadot::BridgeHubPolkadotBaseConfirmationFeeInDots", + bp_bridge_hub_polkadot::BridgeHubPolkadotBaseConfirmationFeeInDots::get(), + || { + from_parachain::can_calculate_fee_for_complex_message_confirmation_transaction::< + RuntimeTestsAdapter, + >(collator_session_keys(), construct_and_estimate_extrinsic_fee) + }, + Perbill::from_percent(33), + Some(-33), + &format!( + "Estimate fee for `single message confirmation` for runtime: {:?}", + ::Version::get() + ), + ) +} + +// TODO:(PR#159): remove when `polkadot-sdk@1.8.0` bump +/// A helper function for comparing the actual value of a fee constant with its estimated value. The +/// estimated value can be overestimated (`overestimate_in_percent`), and if the difference to the +/// actual value is below `margin_overestimate_diff_in_percent_for_lowering`, we should lower the +/// actual value. +pub fn check_sane_fees_values( + const_name: &str, + actual: u128, + calculate_estimated_fee: fn() -> u128, + overestimate_in_percent: Perbill, + margin_overestimate_diff_in_percent_for_lowering: Option, + label: &str, +) { + let estimated = calculate_estimated_fee(); + let estimated_plus_overestimate = estimated + (overestimate_in_percent * estimated); + let diff_to_estimated = diff_as_percent(actual, estimated); + let diff_to_estimated_plus_overestimate = diff_as_percent(actual, estimated_plus_overestimate); + + log::error!( + target: "bridges::estimate", + "{label}:\nconstant: {const_name}\n[+] actual: {actual}\n[+] estimated: {estimated} ({diff_to_estimated:.2?})\n[+] estimated(+33%): {estimated_plus_overestimate} ({diff_to_estimated_plus_overestimate:.2?})", + ); // check if estimated value is sane - let max_expected = bp_bridge_hub_polkadot::BridgeHubPolkadotBaseXcmFeeInDots::get(); assert!( - estimated <= max_expected, - "calculated: {:?}, max_expected: {:?}, please adjust `bp_bridge_hub_polkadot::BridgeHubPolkadotBaseXcmFeeInDots` value", - estimated, - max_expected + estimated <= actual, + "estimated: {estimated}, actual: {actual}, please adjust `{const_name}` to the value: {estimated_plus_overestimate}", + ); + assert!( + estimated_plus_overestimate <= actual, + "estimated_plus_overestimate: {estimated_plus_overestimate}, actual: {actual}, please adjust `{const_name}` to the value: {estimated_plus_overestimate}", + ); + + if let Some(margin_overestimate_diff_in_percent_for_lowering) = + margin_overestimate_diff_in_percent_for_lowering + { + assert!( + diff_to_estimated_plus_overestimate > margin_overestimate_diff_in_percent_for_lowering as f64, + "diff_to_estimated_plus_overestimate: {diff_to_estimated_plus_overestimate:.2}, overestimate_diff_in_percent_for_lowering: {margin_overestimate_diff_in_percent_for_lowering}, please adjust `{const_name}` to the value: {estimated_plus_overestimate}", ); + } } -// TODO: replace me with direct usages of `bridge_hub_test_utils` after deps are bumped to (at -// least) 1.4 -// -// Following two tests have to be implemented properly after upgrade to 1.6. -// See https://github.com/paritytech/polkadot-sdk/pull/2139/ and https://github.com/paritytech/parity-bridges-common/pull/2728 -// for impl details -// -// Until that, anyone can run it manually by doing following: -// -// 1) cargo vendor ../vendored-dependencies -// 2) apply relevant changes from above PRs -// 3) change workspace Cargo.toml: -// [patch.crates-io] -// bp-polkadot-core = { path = "../vendored-dependencies/bp-polkadot-core" } -// bridge-hub-test-utils = { path = "../vendored-dependencies/bridge-hub-test-utils" } -// bridge-runtime-common = { path = "../vendored-dependencies/bridge-runtime-common" } -// 4) add actual tests code and do `cargo test -p bridge-hub-polkadot-runtime` - -#[test] -pub fn can_calculate_fee_for_complex_message_delivery_transaction() {} - -#[test] -pub fn can_calculate_fee_for_complex_message_confirmation_transaction() {} +// TODO:(PR#159): remove when `polkadot-sdk@1.8.0` bump +pub fn diff_as_percent(left: u128, right: u128) -> f64 { + let left = left as f64; + let right = right as f64; + ((left - right).abs() / left) * 100f64 * (if left >= right { -1 } else { 1 }) as f64 +} From b987e8d885b7db7c9897d6a7194f65c1b973ece8 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 16 Feb 2024 16:03:42 +0100 Subject: [PATCH 130/316] Updated TODOs --- .../bridge-hubs/bridge-hub-kusama/tests/tests.rs | 4 ++-- .../bridge-hubs/bridge-hub-polkadot/tests/tests.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index 4b93dd7e73..a69892be80 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -327,7 +327,7 @@ pub fn can_calculate_fee_for_complex_message_confirmation_transaction() { use sp_runtime::Perbill; -// TODO:(PR#159): remove when `polkadot-sdk@1.8.0` bump +// TODO:(PR#159): remove when `polkadot-sdk@1.8.0` bump (https://github.com/polkadot-fellows/runtimes/issues/186) /// A helper function for comparing the actual value of a fee constant with its estimated value. The /// estimated value can be overestimated (`overestimate_in_percent`), and if the difference to the /// actual value is below `margin_overestimate_diff_in_percent_for_lowering`, we should lower the @@ -370,7 +370,7 @@ pub fn check_sane_fees_values( } } -// TODO:(PR#159): remove when `polkadot-sdk@1.8.0` bump +// TODO:(PR#159): remove when `polkadot-sdk@1.8.0` bump (https://github.com/polkadot-fellows/runtimes/issues/186) pub fn diff_as_percent(left: u128, right: u128) -> f64 { let left = left as f64; let right = right as f64; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index 0832d31d4b..8d0423f4ee 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -326,7 +326,7 @@ pub fn can_calculate_fee_for_complex_message_confirmation_transaction() { ) } -// TODO:(PR#159): remove when `polkadot-sdk@1.8.0` bump +// TODO:(PR#159): remove when `polkadot-sdk@1.8.0` bump (https://github.com/polkadot-fellows/runtimes/issues/186) /// A helper function for comparing the actual value of a fee constant with its estimated value. The /// estimated value can be overestimated (`overestimate_in_percent`), and if the difference to the /// actual value is below `margin_overestimate_diff_in_percent_for_lowering`, we should lower the @@ -369,7 +369,7 @@ pub fn check_sane_fees_values( } } -// TODO:(PR#159): remove when `polkadot-sdk@1.8.0` bump +// TODO:(PR#159): remove when `polkadot-sdk@1.8.0` bump (https://github.com/polkadot-fellows/runtimes/issues/186) pub fn diff_as_percent(left: u128, right: u128) -> f64 { let left = left as f64; let right = right as f64; From 4cb2d2ae3943260c755b34c9c4e3e0bc38d7d565 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 16 Feb 2024 21:19:47 +0100 Subject: [PATCH 131/316] Update relay/kusama/src/lib.rs Co-authored-by: Ross Bulat --- relay/kusama/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index e60c698f5e..29cbe7ff9e 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -683,7 +683,6 @@ impl pallet_staking::Config for Runtime { type NominationsQuota = pallet_staking::FixedNominationsQuota<{ MaxNominations::get() }>; type MaxUnlockingChunks = frame_support::traits::ConstU32<32>; type HistoryDepth = frame_support::traits::ConstU32<84>; - // TODO:(PR#159) check/set correct constant and remove this comment! type MaxControllersInDeprecationBatch = ConstU32<751>; type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig; type EventListeners = NominationPools; From c724e91b1ac308a4d074f81976df02d3fe120a69 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 16 Feb 2024 21:19:58 +0100 Subject: [PATCH 132/316] Update relay/polkadot/src/lib.rs Co-authored-by: Ross Bulat --- relay/polkadot/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 8541e240f0..4b07c9d98c 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -777,7 +777,6 @@ impl pallet_staking::Config for Runtime { type NominationsQuota = pallet_staking::FixedNominationsQuota<{ MaxNominations::get() }>; type MaxUnlockingChunks = frame_support::traits::ConstU32<32>; type HistoryDepth = frame_support::traits::ConstU32<84>; - // TODO:(PR#159) check/set correct constant and remove this comment! type MaxControllersInDeprecationBatch = ConstU32<751>; type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig; type EventListeners = NominationPools; From b6293a7aed427ba4336f7af59c06b4a4fd55ac1c Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 16 Feb 2024 21:20:08 +0100 Subject: [PATCH 133/316] Update relay/polkadot/src/lib.rs Co-authored-by: Ross Bulat --- relay/polkadot/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 4b07c9d98c..2a562ae2c8 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -777,7 +777,7 @@ impl pallet_staking::Config for Runtime { type NominationsQuota = pallet_staking::FixedNominationsQuota<{ MaxNominations::get() }>; type MaxUnlockingChunks = frame_support::traits::ConstU32<32>; type HistoryDepth = frame_support::traits::ConstU32<84>; - type MaxControllersInDeprecationBatch = ConstU32<751>; + type MaxControllersInDeprecationBatch = ConstU32<5314>; type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig; type EventListeners = NominationPools; type WeightInfo = weights::pallet_staking::WeightInfo; From e3a80b572c730baaff4dfe6256fcf2fc1c66cd46 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 16 Feb 2024 21:20:17 +0100 Subject: [PATCH 134/316] Update relay/kusama/src/lib.rs Co-authored-by: Ross Bulat --- relay/kusama/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 29cbe7ff9e..3fdf7f7a76 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -683,7 +683,7 @@ impl pallet_staking::Config for Runtime { type NominationsQuota = pallet_staking::FixedNominationsQuota<{ MaxNominations::get() }>; type MaxUnlockingChunks = frame_support::traits::ConstU32<32>; type HistoryDepth = frame_support::traits::ConstU32<84>; - type MaxControllersInDeprecationBatch = ConstU32<751>; + type MaxControllersInDeprecationBatch = ConstU32<5169>; type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig; type EventListeners = NominationPools; type WeightInfo = weights::pallet_staking::WeightInfo; From 703e674666b07d26aad31911a546081f1ba4253b Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 16 Feb 2024 22:04:15 +0100 Subject: [PATCH 135/316] [pallet_balances] adapt https://github.com/paritytech/polkadot-sdk/pull/2657 (removed MaxHolds) --- relay/kusama/src/lib.rs | 2 -- relay/polkadot/src/lib.rs | 1 - system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs | 3 --- system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs | 1 - system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 1 - system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 1 - system-parachains/collectives/collectives-polkadot/src/lib.rs | 1 - system-parachains/encointer/src/lib.rs | 1 - 8 files changed, 11 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 98ce127bdb..3506b98fad 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -326,7 +326,6 @@ impl pallet_balances::Config for Runtime { type MaxFreezes = ConstU32<8>; type RuntimeHoldReason = RuntimeHoldReason; type RuntimeFreezeReason = RuntimeFreezeReason; - type MaxHolds = ConstU32<2>; } parameter_types! { @@ -1417,7 +1416,6 @@ impl pallet_balances::Config for Runtime { type RuntimeHoldReason = RuntimeHoldReason; type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); - type MaxHolds = ConstU32<2>; type MaxFreezes = ConstU32<1>; } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 636627ac79..76bc7719ab 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -319,7 +319,6 @@ impl pallet_balances::Config for Runtime { type RuntimeHoldReason = RuntimeHoldReason; type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = RuntimeFreezeReason; - type MaxHolds = ConstU32<1>; type MaxFreezes = ConstU32<8>; } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 0c8715a2f2..6d347d95cf 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -227,9 +227,6 @@ impl pallet_balances::Config for Runtime { type RuntimeHoldReason = RuntimeHoldReason; type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); - // We allow each account to have holds on it from: - // - `NftFractionalization`: 1 - type MaxHolds = ConstU32<1>; type MaxFreezes = ConstU32<0>; } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 8cd1978cc0..23a5a48f90 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -242,7 +242,6 @@ impl pallet_balances::Config for Runtime { type RuntimeHoldReason = RuntimeHoldReason; type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 7ff2559be0..b1919ce9e8 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -268,7 +268,6 @@ impl pallet_balances::Config for Runtime { type RuntimeHoldReason = RuntimeHoldReason; type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 18c6439953..9d9dc72f48 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -268,7 +268,6 @@ impl pallet_balances::Config for Runtime { type RuntimeHoldReason = RuntimeHoldReason; type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; } diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index bd8e02192d..7aca847ef7 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -216,7 +216,6 @@ impl pallet_balances::Config for Runtime { type RuntimeHoldReason = RuntimeHoldReason; type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); - type MaxHolds = ConstU32<1>; type MaxFreezes = ConstU32<0>; } diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 22a6c715d7..ff010a8fb5 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -306,7 +306,6 @@ impl pallet_balances::Config for Runtime { type RuntimeHoldReason = (); type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; } From 494849bd5e3032a1baa69ec4a3294d5562e313e3 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 16 Feb 2024 22:08:33 +0100 Subject: [PATCH 136/316] WIP: XCMv4 renaming --- .../assets/asset-hub-kusama/src/lib.rs | 2 +- .../src/tests/reserve_transfer.rs | 6 +- .../asset-hub-kusama/src/tests/teleport.rs | 6 +- .../assets/asset-hub-polkadot/src/lib.rs | 2 +- .../src/tests/reserve_transfer.rs | 6 +- .../asset-hub-polkadot/src/tests/teleport.rs | 6 +- .../emulated/common/src/macros.rs | 2 +- .../emulated/common/src/xcm_helpers.rs | 6 +- relay/kusama/src/lib.rs | 40 ++++++------- relay/kusama/src/weights/xcm/mod.rs | 58 +++++++++---------- relay/kusama/src/xcm_config.rs | 10 ++-- relay/polkadot/src/lib.rs | 40 ++++++------- relay/polkadot/src/weights/xcm/mod.rs | 58 +++++++++---------- relay/polkadot/src/xcm_config.rs | 10 ++-- .../asset-hubs/asset-hub-kusama/src/lib.rs | 56 +++++++++--------- .../asset-hub-kusama/src/weights/xcm/mod.rs | 48 +++++++-------- .../asset-hub-kusama/src/xcm_config.rs | 6 +- .../asset-hub-kusama/tests/tests.rs | 47 +++++++-------- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 56 +++++++++--------- .../asset-hub-polkadot/src/weights/xcm/mod.rs | 48 +++++++-------- .../asset-hub-polkadot/src/xcm_config.rs | 6 +- .../asset-hub-polkadot/tests/tests.rs | 47 +++++++-------- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 40 ++++++------- .../bridge-hub-kusama/src/weights/xcm/mod.rs | 48 +++++++-------- .../bridge-hub-kusama/src/xcm_config.rs | 2 +- .../bridge-hub-polkadot/src/lib.rs | 40 ++++++------- .../src/weights/xcm/mod.rs | 48 +++++++-------- .../bridge-hub-polkadot/src/xcm_config.rs | 2 +- .../collectives-polkadot/src/lib.rs | 8 +-- .../collectives-polkadot/src/xcm_config.rs | 2 +- system-parachains/encointer/src/xcm_config.rs | 2 +- 31 files changed, 364 insertions(+), 394 deletions(-) diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs index 9004a7b4e4..9577fd270b 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs @@ -83,7 +83,7 @@ pub fn para_test_args( dest: Location, beneficiary_id: AccountId32, amount: Balance, - assets: MultiAssets, + assets: Assets, asset_id: Option, fee_asset_item: u32, ) -> TestArgs { diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs index e27d7a6621..eaed6c8801 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs @@ -195,7 +195,7 @@ fn reserve_transfer_native_asset_from_relay_to_system_para_fails() { let beneficiary: Location = AccountId32Junction { network: None, id: AssetHubKusamaReceiver::get().into() }.into(); let amount_to_send: Balance = KUSAMA_ED * 1000; - let assets: MultiAssets = (Here, amount_to_send).into(); + let assets: Assets = (Here, amount_to_send).into(); let fee_asset_item = 0; // this should fail @@ -231,7 +231,7 @@ fn reserve_transfer_native_asset_from_system_para_to_relay_fails() { AccountId32Junction { network: None, id: beneficiary_id.into() }.into(); let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; - let assets: MultiAssets = (Parent, amount_to_send).into(); + let assets: Assets = (Parent, amount_to_send).into(); let fee_asset_item = 0; // this should fail @@ -421,7 +421,7 @@ fn reserve_transfer_assets_from_system_para_to_para() { let beneficiary_id = PenpalKusamaAReceiver::get(); let fee_amount_to_send = ASSET_HUB_KUSAMA_ED * 1000; let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; - let assets: MultiAssets = vec![ + let assets: Assets = vec![ (Parent, fee_amount_to_send).into(), (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), asset_amount_to_send) .into(), diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs index 2db6732faa..64841a7603 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs +++ b/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs @@ -540,7 +540,7 @@ fn teleport_native_assets_from_system_para_to_relay_fails() { #[test] fn teleport_to_other_system_parachains_works() { let amount = ASSET_HUB_KUSAMA_ED * 100; - let native_asset: MultiAssets = (Parent, amount).into(); + let native_asset: Assets = (Parent, amount).into(); test_parachain_is_trusted_teleporter!( AssetHubKusama, // Origin @@ -578,7 +578,7 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { let fee_amount_to_send = ASSET_HUB_KUSAMA_ED * 10_000; let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; - let penpal_assets: MultiAssets = vec![ + let penpal_assets: Assets = vec![ (Parent, fee_amount_to_send).into(), (asset_location_on_penpal, asset_amount_to_send).into(), ] @@ -670,7 +670,7 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { let ah_to_penpal_beneficiary_id = PenpalKusamaAReceiver::get(); let penpal_as_seen_by_ah = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); - let ah_assets: MultiAssets = vec![ + let ah_assets: Assets = vec![ (Parent, fee_amount_to_send).into(), (foreign_asset_at_asset_hub_kusama, asset_amount_to_send).into(), ] diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs index dfb7acc893..c722328ce1 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs @@ -83,7 +83,7 @@ pub fn para_test_args( dest: Location, beneficiary_id: AccountId32, amount: Balance, - assets: MultiAssets, + assets: Assets, asset_id: Option, fee_asset_item: u32, ) -> TestArgs { diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs index adde1b681a..a8af2f8370 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs @@ -195,7 +195,7 @@ fn reserve_transfer_native_asset_from_relay_to_system_para_fails() { let beneficiary: Location = AccountId32Junction { network: None, id: AssetHubPolkadotReceiver::get().into() }.into(); let amount_to_send: Balance = POLKADOT_ED * 1000; - let assets: MultiAssets = (Here, amount_to_send).into(); + let assets: Assets = (Here, amount_to_send).into(); let fee_asset_item = 0; // this should fail @@ -231,7 +231,7 @@ fn reserve_transfer_native_asset_from_system_para_to_relay_fails() { AccountId32Junction { network: None, id: beneficiary_id.into() }.into(); let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; - let assets: MultiAssets = (Parent, amount_to_send).into(); + let assets: Assets = (Parent, amount_to_send).into(); let fee_asset_item = 0; // this should fail @@ -422,7 +422,7 @@ fn reserve_transfer_assets_from_system_para_to_para() { let beneficiary_id = PenpalPolkadotAReceiver::get(); let fee_amount_to_send = ASSET_HUB_POLKADOT_ED * 1000; let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; - let assets: MultiAssets = vec![ + let assets: Assets = vec![ (Parent, fee_amount_to_send).into(), (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), asset_amount_to_send) .into(), diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs index e8a74fc3b3..eb66e37b92 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs +++ b/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs @@ -540,7 +540,7 @@ fn teleport_native_assets_from_system_para_to_relay_fails() { #[test] fn teleport_to_other_system_parachains_works() { let amount = ASSET_HUB_POLKADOT_ED * 100; - let native_asset: MultiAssets = (Parent, amount).into(); + let native_asset: Assets = (Parent, amount).into(); test_parachain_is_trusted_teleporter!( AssetHubPolkadot, // Origin @@ -578,7 +578,7 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { let fee_amount_to_send = ASSET_HUB_POLKADOT_ED * 10_000; let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; - let penpal_assets: MultiAssets = vec![ + let penpal_assets: Assets = vec![ (Parent, fee_amount_to_send).into(), (asset_location_on_penpal, asset_amount_to_send).into(), ] @@ -670,7 +670,7 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { let ah_to_penpal_beneficiary_id = PenpalPolkadotAReceiver::get(); let penpal_as_seen_by_ah = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); - let ah_assets: MultiAssets = vec![ + let ah_assets: Assets = vec![ (Parent, fee_amount_to_send).into(), (foreign_asset_at_asset_hub_polkadot, asset_amount_to_send).into(), ] diff --git a/integration-tests/emulated/common/src/macros.rs b/integration-tests/emulated/common/src/macros.rs index 5dbe1cf89f..0818ab9872 100644 --- a/integration-tests/emulated/common/src/macros.rs +++ b/integration-tests/emulated/common/src/macros.rs @@ -183,7 +183,7 @@ macro_rules! include_penpal_create_foreign_asset_on_asset_hub { let buy_execution_fee_amount = $weight_to_fee::weight_to_fee( &Weight::from_parts(10_100_000_000_000, 300_000), ); - let buy_execution_fee = MultiAsset { + let buy_execution_fee = Asset { id: Concrete(Location { parents: 1, interior: Here }), fun: Fungible(buy_execution_fee_amount), }; diff --git a/integration-tests/emulated/common/src/xcm_helpers.rs b/integration-tests/emulated/common/src/xcm_helpers.rs index 48dd975f77..e503f6c64e 100644 --- a/integration-tests/emulated/common/src/xcm_helpers.rs +++ b/integration-tests/emulated/common/src/xcm_helpers.rs @@ -21,12 +21,12 @@ use xcm::{prelude::*, DoubleEncoded}; pub fn xcm_transact_paid_execution( call: DoubleEncoded<()>, origin_kind: OriginKind, - native_asset: MultiAsset, + native_asset: Asset, beneficiary: AccountId, ) -> VersionedXcm<()> { let weight_limit = WeightLimit::Unlimited; let require_weight_at_most = Weight::from_parts(1000000000, 200000); - let native_assets: MultiAssets = native_asset.clone().into(); + let native_assets: Assets = native_asset.clone().into(); VersionedXcm::from(Xcm(vec![ WithdrawAsset(native_assets), @@ -58,7 +58,7 @@ pub fn xcm_transact_unpaid_execution( ])) } /// Helper method to get the non-fee asset used in multiple assets transfer -pub fn non_fee_asset(assets: &MultiAssets, fee_idx: usize) -> Option<(Location, u128)> { +pub fn non_fee_asset(assets: &Assets, fee_idx: usize) -> Option<(Location, u128)> { let asset = assets.inner().into_iter().enumerate().find(|a| a.0 != fee_idx)?.1.clone(); let asset_id = match asset.id { Concrete(id) => id, diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 3506b98fad..fe4c1e11f6 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -2354,18 +2354,18 @@ sp_api::impl_runtime_apis! { Some(crate::xcm_config::AssetHubLocation::get()) } - fn teleportable_asset_and_dest() -> Option<(MultiAsset, Location)> { + fn teleportable_asset_and_dest() -> Option<(Asset, Location)> { // Relay/native token can be teleported to/from AH. Some(( - MultiAsset { fun: Fungible(EXISTENTIAL_DEPOSIT), id: Concrete(Here.into()) }, + Asset { fun: Fungible(EXISTENTIAL_DEPOSIT), id: Concrete(Here.into()) }, crate::xcm_config::AssetHubLocation::get(), )) } - fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, Location)> { + fn reserve_transferable_asset_and_dest() -> Option<(Asset, Location)> { // Relay can reserve transfer native token to some random parachain. Some(( - MultiAsset { + Asset { fun: Fungible(EXISTENTIAL_DEPOSIT), id: Concrete(Here.into()) }, @@ -2374,7 +2374,7 @@ sp_api::impl_runtime_apis! { } fn set_up_complex_asset_transfer( - ) -> Option<(MultiAssets, u32, Location, Box)> { + ) -> Option<(Assets, u32, Location, Box)> { // Relay supports only native token, either reserve transfer it to non-system parachains, // or teleport it to system parachain. Use the teleport case for benchmarking as it's // slightly heavier. @@ -2389,7 +2389,7 @@ sp_api::impl_runtime_apis! { } parameter_types! { - pub ExistentialDepositMultiAsset: Option = Some(( + pub ExistentialDepositAsset: Option = Some(( TokenLocation::get(), ExistentialDeposit::get() ).into()); @@ -2401,7 +2401,7 @@ sp_api::impl_runtime_apis! { type AccountIdConverter = SovereignAccountOf; type DeliveryHelper = runtime_common::xcm_sender::ToParachainDeliveryHelper< XcmConfig, - ExistentialDepositMultiAsset, + ExistentialDepositAsset, xcm_config::PriceForChildParachainDelivery, ToParachain, (), @@ -2409,9 +2409,9 @@ sp_api::impl_runtime_apis! { fn valid_destination() -> Result { Ok(AssetHubLocation::get()) } - fn worst_case_holding(_depositable_count: u32) -> MultiAssets { + fn worst_case_holding(_depositable_count: u32) -> Assets { // Kusama only knows about KSM. - vec![MultiAsset{ + vec![Asset{ id: Concrete(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS), }].into() @@ -2419,11 +2419,11 @@ sp_api::impl_runtime_apis! { } parameter_types! { - pub const TrustedTeleporter: Option<(Location, MultiAsset)> = Some(( + pub const TrustedTeleporter: Option<(Location, Asset)> = Some(( AssetHubLocation::get(), - MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(TokenLocation::get()) }, + Asset { fun: Fungible(1 * UNITS), id: Concrete(TokenLocation::get()) }, )); - pub const TrustedReserve: Option<(Location, MultiAsset)> = None; + pub const TrustedReserve: Option<(Location, Asset)> = None; } impl pallet_xcm_benchmarks::fungible::Config for Runtime { @@ -2433,8 +2433,8 @@ sp_api::impl_runtime_apis! { type TrustedTeleporter = TrustedTeleporter; type TrustedReserve = TrustedReserve; - fn get_multi_asset() -> MultiAsset { - MultiAsset { + fn get_multi_asset() -> Asset { + Asset { id: Concrete(TokenLocation::get()), fun: Fungible(1 * UNITS), } @@ -2449,7 +2449,7 @@ sp_api::impl_runtime_apis! { (0u64, Response::Version(Default::default())) } - fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + fn worst_case_asset_exchange() -> Result<(Assets, Assets), BenchmarkError> { // Kusama doesn't support asset exchanges Err(BenchmarkError::Skip) } @@ -2467,21 +2467,21 @@ sp_api::impl_runtime_apis! { Ok(AssetHubLocation::get()) } - fn claimable_asset() -> Result<(Location, Location, MultiAssets), BenchmarkError> { + fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError> { let origin = AssetHubLocation::get(); - let assets: MultiAssets = (Concrete(TokenLocation::get()), 1_000 * UNITS).into(); + let assets: Assets = (Concrete(TokenLocation::get()), 1_000 * UNITS).into(); let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(MultiAsset { + fn fee_asset() -> Result { + Ok(Asset { id: Concrete(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS), }) } - fn unlockable_asset() -> Result<(Location, Location, MultiAsset), BenchmarkError> { + fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { // Kusama doesn't support asset locking Err(BenchmarkError::Skip) } diff --git a/relay/kusama/src/weights/xcm/mod.rs b/relay/kusama/src/weights/xcm/mod.rs index 585e32429c..0aa0728f54 100644 --- a/relay/kusama/src/weights/xcm/mod.rs +++ b/relay/kusama/src/weights/xcm/mod.rs @@ -33,24 +33,24 @@ pub enum AssetTypes { Unknown, } -impl From<&MultiAsset> for AssetTypes { - fn from(asset: &MultiAsset) -> Self { +impl From<&Asset> for AssetTypes { + fn from(asset: &Asset) -> Self { match asset { - MultiAsset { id: Concrete(Location { parents: 0, interior: Here }), .. } => + Asset { id: Concrete(Location { parents: 0, interior: Here }), .. } => AssetTypes::Balances, _ => AssetTypes::Unknown, } } } -trait WeighMultiAssets { +trait WeighAssets { fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight; } // Kusama only knows about one asset, the balances pallet. const MAX_ASSETS: u64 = 1; -impl WeighMultiAssets for MultiAssetFilter { +impl WeighAssets for AssetFilter { fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight { match self { Self::Definite(assets) => assets @@ -72,11 +72,11 @@ impl WeighMultiAssets for MultiAssetFilter { } } -impl WeighMultiAssets for MultiAssets { +impl WeighAssets for Assets { fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight { self.inner() .into_iter() - .map(|m| >::from(m)) + .map(|m| >::from(m)) .map(|t| match t { AssetTypes::Balances => balances_weight, AssetTypes::Unknown => Weight::MAX, @@ -87,13 +87,13 @@ impl WeighMultiAssets for MultiAssets { pub struct KusamaXcmWeight(core::marker::PhantomData); impl XcmWeightInfo for KusamaXcmWeight { - fn withdraw_asset(assets: &MultiAssets) -> Weight { + fn withdraw_asset(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::withdraw_asset()) } - fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { + fn reserve_asset_deposited(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::reserve_asset_deposited()) } - fn receive_teleported_asset(assets: &MultiAssets) -> Weight { + fn receive_teleported_asset(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::receive_teleported_asset()) } fn query_response( @@ -104,10 +104,10 @@ impl XcmWeightInfo for KusamaXcmWeight { ) -> Weight { XcmGeneric::::query_response() } - fn transfer_asset(assets: &MultiAssets, _dest: &Location) -> Weight { + fn transfer_asset(assets: &Assets, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::transfer_asset()) } - fn transfer_reserve_asset(assets: &MultiAssets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { + fn transfer_reserve_asset(assets: &Assets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::transfer_reserve_asset()) } fn transact( @@ -143,34 +143,30 @@ impl XcmWeightInfo for KusamaXcmWeight { XcmGeneric::::report_error() } - fn deposit_asset(assets: &MultiAssetFilter, _dest: &Location) -> Weight { + fn deposit_asset(assets: &AssetFilter, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::deposit_asset()) } - fn deposit_reserve_asset( - assets: &MultiAssetFilter, - _dest: &Location, - _xcm: &Xcm<()>, - ) -> Weight { + fn deposit_reserve_asset(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::deposit_reserve_asset()) } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { + fn exchange_asset(_give: &AssetFilter, _receive: &Assets, _maximal: &bool) -> Weight { // Kusama does not currently support exchange asset operations Weight::MAX } fn initiate_reserve_withdraw( - assets: &MultiAssetFilter, + assets: &AssetFilter, _reserve: &Location, _xcm: &Xcm<()>, ) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::initiate_reserve_withdraw()) } - fn initiate_teleport(assets: &MultiAssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { + fn initiate_teleport(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::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) -> Weight { + fn buy_execution(_fees: &Asset, _weight_limit: &WeightLimit) -> Weight { XcmGeneric::::buy_execution() } fn refund_surplus() -> Weight { @@ -185,7 +181,7 @@ impl XcmWeightInfo for KusamaXcmWeight { fn clear_error() -> Weight { XcmGeneric::::clear_error() } - fn claim_asset(_assets: &MultiAssets, _ticket: &Location) -> Weight { + fn claim_asset(_assets: &Assets, _ticket: &Location) -> Weight { XcmGeneric::::claim_asset() } fn trap(_code: &u64) -> Weight { @@ -197,10 +193,10 @@ impl XcmWeightInfo for KusamaXcmWeight { fn unsubscribe_version() -> Weight { 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 { @@ -238,19 +234,19 @@ impl XcmWeightInfo for KusamaXcmWeight { // Kusama relay should not support export message operations Weight::MAX } - fn lock_asset(_: &MultiAsset, _: &Location) -> Weight { + fn lock_asset(_: &Asset, _: &Location) -> Weight { // Kusama does not currently support asset locking operations Weight::MAX } - fn unlock_asset(_: &MultiAsset, _: &Location) -> Weight { + fn unlock_asset(_: &Asset, _: &Location) -> Weight { // Kusama does not currently support asset locking operations Weight::MAX } - fn note_unlockable(_: &MultiAsset, _: &Location) -> Weight { + fn note_unlockable(_: &Asset, _: &Location) -> Weight { // Kusama does not currently support asset locking operations Weight::MAX } - fn request_unlock(_: &MultiAsset, _: &Location) -> Weight { + fn request_unlock(_: &Asset, _: &Location) -> Weight { // Kusama does not currently support asset locking operations Weight::MAX } @@ -274,7 +270,7 @@ impl XcmWeightInfo for KusamaXcmWeight { #[test] fn all_counted_has_a_sane_weight_upper_limit() { - let assets = MultiAssetFilter::Wild(AllCounted(4294967295)); + let assets = AssetFilter::Wild(AllCounted(4294967295)); let weight = Weight::from_parts(1000, 1000); assert_eq!(assets.weigh_multi_assets(weight), weight * MAX_ASSETS); diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index 5a2f1fa12b..d464ef68bd 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -77,7 +77,7 @@ pub type SovereignAccountOf = ( ); /// Our asset transactor. This is what allows us to interest with the runtime facilities from the -/// point of view of XCM-only concepts like `Location` and `MultiAsset`. +/// point of view of XCM-only concepts like `Location` and `Asset`. /// /// Ours is only aware of the Balances pallet, which is mapped to `TokenLocation`. pub type LocalAssetTransactor = FungibleAdapter< @@ -126,13 +126,13 @@ pub type XcmRouter = WithUniqueTopic<( )>; parameter_types! { - pub const Ksm: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) }); + pub const Ksm: AssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) }); pub const AssetHubLocation: Location = Parachain(ASSET_HUB_ID).into_location(); - pub const KsmForAssetHub: (MultiAssetFilter, Location) = (Ksm::get(), AssetHubLocation::get()); + pub const KsmForAssetHub: (AssetFilter, Location) = (Ksm::get(), AssetHubLocation::get()); pub const Encointer: Location = Parachain(ENCOINTER_ID).into_location(); - pub const KsmForEncointer: (MultiAssetFilter, Location) = (Ksm::get(), Encointer::get()); + pub const KsmForEncointer: (AssetFilter, Location) = (Ksm::get(), Encointer::get()); pub const BridgeHubLocation: Location = Parachain(BRIDGE_HUB_ID).into_location(); - pub const KsmForBridgeHub: (MultiAssetFilter, Location) = (Ksm::get(), BridgeHubLocation::get()); + pub const KsmForBridgeHub: (AssetFilter, Location) = (Ksm::get(), BridgeHubLocation::get()); pub const MaxAssetsIntoHolding: u32 = 64; } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 76bc7719ab..ef789e2b5b 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -2357,18 +2357,18 @@ sp_api::impl_runtime_apis! { Some(crate::xcm_config::AssetHubLocation::get()) } - fn teleportable_asset_and_dest() -> Option<(MultiAsset, Location)> { + fn teleportable_asset_and_dest() -> Option<(Asset, Location)> { // Relay/native token can be teleported to/from AH. Some(( - MultiAsset { fun: Fungible(EXISTENTIAL_DEPOSIT), id: Concrete(Here.into()) }, + Asset { fun: Fungible(EXISTENTIAL_DEPOSIT), id: Concrete(Here.into()) }, crate::xcm_config::AssetHubLocation::get(), )) } - fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, Location)> { + fn reserve_transferable_asset_and_dest() -> Option<(Asset, Location)> { // Relay can reserve transfer native token to some random parachain. Some(( - MultiAsset { + Asset { fun: Fungible(EXISTENTIAL_DEPOSIT), id: Concrete(Here.into()) }, @@ -2377,7 +2377,7 @@ sp_api::impl_runtime_apis! { } fn set_up_complex_asset_transfer( - ) -> Option<(MultiAssets, u32, Location, Box)> { + ) -> Option<(Assets, u32, Location, Box)> { // Relay supports only native token, either reserve transfer it to non-system parachains, // or teleport it to system parachain. Use the teleport case for benchmarking as it's // slightly heavier. @@ -2392,7 +2392,7 @@ sp_api::impl_runtime_apis! { } parameter_types! { - pub ExistentialDepositMultiAsset: Option = Some(( + pub ExistentialDepositAsset: Option = Some(( TokenLocation::get(), ExistentialDeposit::get() ).into()); @@ -2404,7 +2404,7 @@ sp_api::impl_runtime_apis! { type AccountIdConverter = SovereignAccountOf; type DeliveryHelper = runtime_common::xcm_sender::ToParachainDeliveryHelper< XcmConfig, - ExistentialDepositMultiAsset, + ExistentialDepositAsset, xcm_config::PriceForChildParachainDelivery, ToParachain, (), @@ -2412,18 +2412,18 @@ sp_api::impl_runtime_apis! { fn valid_destination() -> Result { Ok(AssetHubLocation::get()) } - fn worst_case_holding(_depositable_count: u32) -> MultiAssets { + fn worst_case_holding(_depositable_count: u32) -> Assets { // Polkadot only knows about DOT - vec![MultiAsset { id: Concrete(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS) }].into() + vec![Asset { id: Concrete(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS) }].into() } } parameter_types! { - pub const TrustedTeleporter: Option<(Location, MultiAsset)> = Some(( + pub const TrustedTeleporter: Option<(Location, Asset)> = Some(( AssetHubLocation::get(), - MultiAsset { id: Concrete(TokenLocation::get()), fun: Fungible(1 * UNITS) } + Asset { id: Concrete(TokenLocation::get()), fun: Fungible(1 * UNITS) } )); - pub const TrustedReserve: Option<(Location, MultiAsset)> = None; + pub const TrustedReserve: Option<(Location, Asset)> = None; } impl pallet_xcm_benchmarks::fungible::Config for Runtime { @@ -2433,8 +2433,8 @@ sp_api::impl_runtime_apis! { type TrustedTeleporter = TrustedTeleporter; type TrustedReserve = TrustedReserve; - fn get_multi_asset() -> MultiAsset { - MultiAsset { + fn get_multi_asset() -> Asset { + Asset { id: Concrete(TokenLocation::get()), fun: Fungible(1 * UNITS) } @@ -2449,7 +2449,7 @@ sp_api::impl_runtime_apis! { (0u64, Response::Version(Default::default())) } - fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + fn worst_case_asset_exchange() -> Result<(Assets, Assets), BenchmarkError> { // Polkadot doesn't support asset exchanges Err(BenchmarkError::Skip) } @@ -2467,21 +2467,21 @@ sp_api::impl_runtime_apis! { Ok(AssetHubLocation::get()) } - fn claimable_asset() -> Result<(Location, Location, MultiAssets), BenchmarkError> { + fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError> { let origin = AssetHubLocation::get(); - let assets: MultiAssets = (Concrete(TokenLocation::get()), 1_000 * UNITS).into(); + let assets: Assets = (Concrete(TokenLocation::get()), 1_000 * UNITS).into(); let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(MultiAsset { + fn fee_asset() -> Result { + Ok(Asset { id: Concrete(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS), }) } - fn unlockable_asset() -> Result<(Location, Location, MultiAsset), BenchmarkError> { + fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { // Polkadot doesn't support asset locking Err(BenchmarkError::Skip) } diff --git a/relay/polkadot/src/weights/xcm/mod.rs b/relay/polkadot/src/weights/xcm/mod.rs index c12cb5adfb..0c60276c04 100644 --- a/relay/polkadot/src/weights/xcm/mod.rs +++ b/relay/polkadot/src/weights/xcm/mod.rs @@ -33,24 +33,24 @@ pub enum AssetTypes { Unknown, } -impl From<&MultiAsset> for AssetTypes { - fn from(asset: &MultiAsset) -> Self { +impl From<&Asset> for AssetTypes { + fn from(asset: &Asset) -> Self { match asset { - MultiAsset { id: Concrete(Location { parents: 0, interior: Here }), .. } => + Asset { id: Concrete(Location { parents: 0, interior: Here }), .. } => AssetTypes::Balances, _ => AssetTypes::Unknown, } } } -trait WeighMultiAssets { +trait WeighAssets { fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight; } // Polkadot only knows about one asset, the balances pallet. const MAX_ASSETS: u64 = 1; -impl WeighMultiAssets for MultiAssetFilter { +impl WeighAssets for AssetFilter { fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight { match self { Self::Definite(assets) => assets @@ -72,11 +72,11 @@ impl WeighMultiAssets for MultiAssetFilter { } } -impl WeighMultiAssets for MultiAssets { +impl WeighAssets for Assets { fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight { self.inner() .into_iter() - .map(|m| >::from(m)) + .map(|m| >::from(m)) .map(|t| match t { AssetTypes::Balances => balances_weight, AssetTypes::Unknown => Weight::MAX, @@ -87,13 +87,13 @@ impl WeighMultiAssets for MultiAssets { pub struct PolkadotXcmWeight(core::marker::PhantomData); impl XcmWeightInfo for PolkadotXcmWeight { - fn withdraw_asset(assets: &MultiAssets) -> Weight { + fn withdraw_asset(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::withdraw_asset()) } - fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { + fn reserve_asset_deposited(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::reserve_asset_deposited()) } - fn receive_teleported_asset(assets: &MultiAssets) -> Weight { + fn receive_teleported_asset(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::receive_teleported_asset()) } fn query_response( @@ -104,10 +104,10 @@ impl XcmWeightInfo for PolkadotXcmWeight ) -> Weight { XcmGeneric::::query_response() } - fn transfer_asset(assets: &MultiAssets, _dest: &Location) -> Weight { + fn transfer_asset(assets: &Assets, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::transfer_asset()) } - fn transfer_reserve_asset(assets: &MultiAssets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { + fn transfer_reserve_asset(assets: &Assets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::transfer_reserve_asset()) } fn transact( @@ -143,34 +143,30 @@ impl XcmWeightInfo for PolkadotXcmWeight XcmGeneric::::report_error() } - fn deposit_asset(assets: &MultiAssetFilter, _dest: &Location) -> Weight { + fn deposit_asset(assets: &AssetFilter, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::deposit_asset()) } - fn deposit_reserve_asset( - assets: &MultiAssetFilter, - _dest: &Location, - _xcm: &Xcm<()>, - ) -> Weight { + fn deposit_reserve_asset(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::deposit_reserve_asset()) } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { + fn exchange_asset(_give: &AssetFilter, _receive: &Assets, _maximal: &bool) -> Weight { // Polkadot does not currently support exchange asset operations Weight::MAX } fn initiate_reserve_withdraw( - assets: &MultiAssetFilter, + assets: &AssetFilter, _reserve: &Location, _xcm: &Xcm<()>, ) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::initiate_reserve_withdraw()) } - fn initiate_teleport(assets: &MultiAssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { + fn initiate_teleport(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmBalancesWeight::::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) -> Weight { + fn buy_execution(_fees: &Asset, _weight_limit: &WeightLimit) -> Weight { XcmGeneric::::buy_execution() } fn refund_surplus() -> Weight { @@ -185,7 +181,7 @@ impl XcmWeightInfo for PolkadotXcmWeight fn clear_error() -> Weight { XcmGeneric::::clear_error() } - fn claim_asset(_assets: &MultiAssets, _ticket: &Location) -> Weight { + fn claim_asset(_assets: &Assets, _ticket: &Location) -> Weight { XcmGeneric::::claim_asset() } fn trap(_code: &u64) -> Weight { @@ -197,10 +193,10 @@ impl XcmWeightInfo for PolkadotXcmWeight fn unsubscribe_version() -> Weight { 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 { @@ -238,19 +234,19 @@ impl XcmWeightInfo for PolkadotXcmWeight // Polkadot relay should not support export message operations Weight::MAX } - fn lock_asset(_: &MultiAsset, _: &Location) -> Weight { + fn lock_asset(_: &Asset, _: &Location) -> Weight { // Polkadot does not currently support asset locking operations Weight::MAX } - fn unlock_asset(_: &MultiAsset, _: &Location) -> Weight { + fn unlock_asset(_: &Asset, _: &Location) -> Weight { // Polkadot does not currently support asset locking operations Weight::MAX } - fn note_unlockable(_: &MultiAsset, _: &Location) -> Weight { + fn note_unlockable(_: &Asset, _: &Location) -> Weight { // Polkadot does not currently support asset locking operations Weight::MAX } - fn request_unlock(_: &MultiAsset, _: &Location) -> Weight { + fn request_unlock(_: &Asset, _: &Location) -> Weight { // Polkadot does not currently support asset locking operations Weight::MAX } @@ -274,7 +270,7 @@ impl XcmWeightInfo for PolkadotXcmWeight #[test] fn all_counted_has_a_sane_weight_upper_limit() { - let assets = MultiAssetFilter::Wild(AllCounted(4294967295)); + let assets = AssetFilter::Wild(AllCounted(4294967295)); let weight = Weight::from_parts(1000, 1000); assert_eq!(assets.weigh_multi_assets(weight), weight * MAX_ASSETS); diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index d0e60b4b3b..11a95bfe3d 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -79,7 +79,7 @@ pub type SovereignAccountOf = ( ); /// Our asset transactor. This is what allows us to interact with the runtime assets from the point -/// of view of XCM-only concepts like `Location` and `MultiAsset`. +/// of view of XCM-only concepts like `Location` and `Asset`. /// /// Ours is only aware of the Balances pallet, which is mapped to `TokenLocation`. pub type LocalAssetTransactor = FungibleAdapter< @@ -135,13 +135,13 @@ pub type XcmRouter = WithUniqueTopic<( )>; parameter_types! { - pub const Dot: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) }); + pub const Dot: AssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) }); pub const AssetHubLocation: Location = Parachain(ASSET_HUB_ID).into_location(); - pub const DotForAssetHub: (MultiAssetFilter, Location) = (Dot::get(), AssetHubLocation::get()); + pub const DotForAssetHub: (AssetFilter, Location) = (Dot::get(), AssetHubLocation::get()); pub const CollectivesLocation: Location = Parachain(COLLECTIVES_ID).into_location(); - pub const DotForCollectives: (MultiAssetFilter, Location) = (Dot::get(), CollectivesLocation::get()); + pub const DotForCollectives: (AssetFilter, Location) = (Dot::get(), CollectivesLocation::get()); pub const BridgeHubLocation: Location = Parachain(BRIDGE_HUB_ID).into_location(); - pub const DotForBridgeHub: (MultiAssetFilter, Location) = (Dot::get(), BridgeHubLocation::get()); + pub const DotForBridgeHub: (AssetFilter, Location) = (Dot::get(), BridgeHubLocation::get()); pub const MaxAssetsIntoHolding: u32 = 64; } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 6d347d95cf..52bb87c7de 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -1187,7 +1187,7 @@ impl_runtime_apis! { AccountId, > for Runtime { - fn query_account_balances(account: AccountId) -> Result { + fn query_account_balances(account: AccountId) -> Result { use assets_common::fungible_conversion::{convert, convert_balance}; Ok([ // collect pallet_balance @@ -1324,10 +1324,10 @@ impl_runtime_apis! { Some(Parent.into()) } - fn teleportable_asset_and_dest() -> Option<(MultiAsset, Location)> { + fn teleportable_asset_and_dest() -> Option<(Asset, Location)> { // Relay/native token can be teleported between AH and Relay. Some(( - MultiAsset { + Asset { fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }, @@ -1335,14 +1335,14 @@ impl_runtime_apis! { )) } - fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, Location)> { + fn reserve_transferable_asset_and_dest() -> Option<(Asset, Location)> { // AH can reserve transfer native token to some random parachain. let random_para_id = 43211234; ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests( random_para_id.into() ); Some(( - MultiAsset { + Asset { fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }, @@ -1351,14 +1351,14 @@ impl_runtime_apis! { } fn set_up_complex_asset_transfer( - ) -> Option<(MultiAssets, u32, Location, Box)> { + ) -> Option<(Assets, u32, Location, Box)> { // Transfer to Relay some local AH asset (local-reserve-transfer) while paying // fees using teleported native token. // (We don't care that Relay doesn't accept incoming unknown AH local asset) let dest = Parent.into(); let fee_amount = ExistentialDeposit::get(); - let fee_asset: MultiAsset = (Location::parent(), fee_amount).into(); + let fee_asset: Asset = (Location::parent(), fee_amount).into(); let who = frame_benchmarking::whitelisted_caller(); // Give some multiple of the existential deposit @@ -1380,9 +1380,9 @@ impl_runtime_apis! { 0, X2(PalletInstance(50), GeneralIndex(u32::from(asset_id).into())) ); - let transfer_asset: MultiAsset = (asset_location, asset_amount).into(); + let transfer_asset: Asset = (asset_location, asset_amount).into(); - let assets: MultiAssets = vec![fee_asset.clone(), transfer_asset].into(); + let assets: Assets = vec![fee_asset.clone(), transfer_asset].into(); let fee_index = if assets.get(0).unwrap().eq(&fee_asset) { 0 } else { 1 }; // verify transferred successfully @@ -1401,7 +1401,7 @@ impl_runtime_apis! { } parameter_types! { - pub ExistentialDepositMultiAsset: Option = Some(( + pub ExistentialDepositAsset: Option = Some(( KsmLocation::get(), ExistentialDeposit::get() ).into()); @@ -1412,32 +1412,32 @@ impl_runtime_apis! { type AccountIdConverter = xcm_config::LocationToAccountId; type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper< xcm_config::XcmConfig, - ExistentialDepositMultiAsset, + ExistentialDepositAsset, PriceForParentDelivery, >; fn valid_destination() -> Result { Ok(KsmLocation::get()) } - fn worst_case_holding(depositable_count: u32) -> MultiAssets { + fn worst_case_holding(depositable_count: u32) -> Assets { // A mix of fungible, non-fungible, and concrete assets. let holding_non_fungibles = MaxAssetsIntoHolding::get() / 2 - depositable_count; let holding_fungibles = holding_non_fungibles.saturating_sub(1); let fungibles_amount: u128 = 100; let mut assets = (0..holding_fungibles) .map(|i| { - MultiAsset { + Asset { id: Concrete(GeneralIndex(i as u128).into()), fun: Fungible(fungibles_amount * i as u128), } }) - .chain(core::iter::once(MultiAsset { id: Concrete(Here.into()), fun: Fungible(u128::MAX) })) - .chain((0..holding_non_fungibles).map(|i| MultiAsset { + .chain(core::iter::once(Asset { id: Concrete(Here.into()), fun: Fungible(u128::MAX) })) + .chain((0..holding_non_fungibles).map(|i| Asset { id: Concrete(GeneralIndex(i as u128).into()), fun: NonFungible(asset_instance_from(i)), })) .collect::>(); - assets.push(MultiAsset { + assets.push(Asset { id: Concrete(KsmLocation::get()), fun: Fungible(1_000_000 * UNITS), }); @@ -1446,16 +1446,16 @@ impl_runtime_apis! { } parameter_types! { - pub const TrustedTeleporter: Option<(Location, MultiAsset)> = Some(( + pub const TrustedTeleporter: Option<(Location, Asset)> = Some(( KsmLocation::get(), - MultiAsset { fun: Fungible(UNITS), id: Concrete(KsmLocation::get()) }, + Asset { fun: Fungible(UNITS), id: Concrete(KsmLocation::get()) }, )); pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; // AssetHubKusama trusts AssetHubPolkadot as reserve for DOTs - pub TrustedReserve: Option<(Location, MultiAsset)> = Some( + pub TrustedReserve: Option<(Location, Asset)> = Some( ( xcm_config::bridging::to_polkadot::AssetHubPolkadot::get(), - MultiAsset::from((xcm_config::bridging::to_polkadot::DotLocation::get(), 1000000000000 as u128)) + Asset::from((xcm_config::bridging::to_polkadot::DotLocation::get(), 1000000000000 as u128)) ) ); } @@ -1467,8 +1467,8 @@ impl_runtime_apis! { type TrustedTeleporter = TrustedTeleporter; type TrustedReserve = TrustedReserve; - fn get_multi_asset() -> MultiAsset { - MultiAsset { + fn get_multi_asset() -> Asset { + Asset { id: Concrete(KsmLocation::get()), fun: Fungible(UNITS), } @@ -1483,7 +1483,7 @@ impl_runtime_apis! { (0u64, Response::Version(Default::default())) } - fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + fn worst_case_asset_exchange() -> Result<(Assets, Assets), BenchmarkError> { Err(BenchmarkError::Skip) } @@ -1500,21 +1500,21 @@ impl_runtime_apis! { Ok(KsmLocation::get()) } - fn claimable_asset() -> Result<(Location, Location, MultiAssets), BenchmarkError> { + fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError> { let origin = KsmLocation::get(); - let assets: MultiAssets = (Concrete(KsmLocation::get()), 1_000 * UNITS).into(); + let assets: Assets = (Concrete(KsmLocation::get()), 1_000 * UNITS).into(); let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(MultiAsset { + fn fee_asset() -> Result { + Ok(Asset { id: Concrete(KsmLocation::get()), fun: Fungible(1_000_000 * UNITS), }) } - fn unlockable_asset() -> Result<(Location, Location, MultiAsset), BenchmarkError> { + fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { Err(BenchmarkError::Skip) } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/mod.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/mod.rs index 8360638976..7383a55a8f 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/xcm/mod.rs @@ -24,13 +24,13 @@ use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_std::prelude::*; use xcm::{latest::prelude::*, DoubleEncoded}; -trait WeighMultiAssets { +trait WeighAssets { fn weigh_multi_assets(&self, weight: Weight) -> Weight; } const MAX_ASSETS: u64 = 100; -impl WeighMultiAssets for MultiAssetFilter { +impl WeighAssets for AssetFilter { fn weigh_multi_assets(&self, weight: Weight) -> Weight { match self { Self::Definite(assets) => weight.saturating_mul(assets.inner().iter().count() as u64), @@ -50,7 +50,7 @@ impl WeighMultiAssets for MultiAssetFilter { } } -impl WeighMultiAssets for MultiAssets { +impl WeighAssets for Assets { fn weigh_multi_assets(&self, weight: Weight) -> Weight { weight.saturating_mul(self.inner().iter().count() as u64) } @@ -58,13 +58,13 @@ impl WeighMultiAssets for MultiAssets { pub struct AssetHubKusamaXcmWeight(core::marker::PhantomData); impl XcmWeightInfo for AssetHubKusamaXcmWeight { - fn withdraw_asset(assets: &MultiAssets) -> Weight { + fn withdraw_asset(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::withdraw_asset()) } - fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { + fn reserve_asset_deposited(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::reserve_asset_deposited()) } - fn receive_teleported_asset(assets: &MultiAssets) -> Weight { + fn receive_teleported_asset(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) } fn query_response( @@ -75,10 +75,10 @@ impl XcmWeightInfo for AssetHubKusamaXcmWeight { ) -> Weight { XcmGeneric::::query_response() } - fn transfer_asset(assets: &MultiAssets, _dest: &Location) -> Weight { + fn transfer_asset(assets: &Assets, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_asset()) } - fn transfer_reserve_asset(assets: &MultiAssets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { + fn transfer_reserve_asset(assets: &Assets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_reserve_asset()) } fn transact( @@ -114,33 +114,29 @@ impl XcmWeightInfo for AssetHubKusamaXcmWeight { XcmGeneric::::report_error() } - fn deposit_asset(assets: &MultiAssetFilter, _dest: &Location) -> Weight { + fn deposit_asset(assets: &AssetFilter, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()) } - fn deposit_reserve_asset( - assets: &MultiAssetFilter, - _dest: &Location, - _xcm: &Xcm<()>, - ) -> Weight { + fn deposit_reserve_asset(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { + fn exchange_asset(_give: &AssetFilter, _receive: &Assets, _maximal: &bool) -> Weight { Weight::MAX } fn initiate_reserve_withdraw( - assets: &MultiAssetFilter, + assets: &AssetFilter, _reserve: &Location, _xcm: &Xcm<()>, ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::initiate_reserve_withdraw()) } - fn initiate_teleport(assets: &MultiAssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { + fn initiate_teleport(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(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) -> Weight { + fn buy_execution(_fees: &Asset, _weight_limit: &WeightLimit) -> Weight { XcmGeneric::::buy_execution() } fn refund_surplus() -> Weight { @@ -155,7 +151,7 @@ impl XcmWeightInfo for AssetHubKusamaXcmWeight { fn clear_error() -> Weight { XcmGeneric::::clear_error() } - fn claim_asset(_assets: &MultiAssets, _ticket: &Location) -> Weight { + fn claim_asset(_assets: &Assets, _ticket: &Location) -> Weight { XcmGeneric::::claim_asset() } fn trap(_code: &u64) -> Weight { @@ -167,10 +163,10 @@ impl XcmWeightInfo for AssetHubKusamaXcmWeight { fn unsubscribe_version() -> Weight { 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 { @@ -206,16 +202,16 @@ impl XcmWeightInfo for AssetHubKusamaXcmWeight { fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { Weight::MAX } - fn lock_asset(_: &MultiAsset, _: &Location) -> Weight { + fn lock_asset(_: &Asset, _: &Location) -> Weight { Weight::MAX } - fn unlock_asset(_: &MultiAsset, _: &Location) -> Weight { + fn unlock_asset(_: &Asset, _: &Location) -> Weight { Weight::MAX } - fn note_unlockable(_: &MultiAsset, _: &Location) -> Weight { + fn note_unlockable(_: &Asset, _: &Location) -> Weight { Weight::MAX } - fn request_unlock(_: &MultiAsset, _: &Location) -> Weight { + fn request_unlock(_: &Asset, _: &Location) -> Weight { Weight::MAX } fn set_fees_mode(_: &bool) -> Weight { diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index e554e7be55..d42df29fd5 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -568,7 +568,7 @@ impl xcm_executor::Config for XcmConfig { type TransactionalProcessor = FrameTransactionalProcessor; } -/// Converts a local signed origin into an XCM multilocation. +/// Converts a local signed origin into an XCM location. /// Forms the basis for local origins sending/executing XCMs. pub type LocalOriginToLocation = SignedToAccountId32; @@ -698,13 +698,13 @@ pub mod bridging { ); pub DotLocation: Location = Location::new(2, X1(GlobalConsensus(PolkadotNetwork::get()))); - pub DotFromAssetHubPolkadot: (MultiAssetFilter, Location) = ( + pub DotFromAssetHubPolkadot: (AssetFilter, Location) = ( Wild(AllOf { fun: WildFungible, id: Concrete(DotLocation::get()) }), AssetHubPolkadot::get() ); /// Set up exporters configuration. - /// `Option` represents static "base fee" which is used for total delivery fee calculation. + /// `Option` represents static "base fee" which is used for total delivery fee calculation. pub BridgeTable: sp_std::vec::Vec = sp_std::vec![ NetworkExportTableItem::new( PolkadotNetwork::get(), diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index 294c673823..a8f0413445 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -116,8 +116,8 @@ fn test_asset_xcm_trader() { minimum_asset_balance )); - // get asset id as multilocation - let asset_multilocation = + // get asset id as location + let asset_location = AssetIdForTrustBackedAssetsConvert::convert_back(&local_asset_id).unwrap(); // Set Alice as block author, who will receive fees @@ -136,8 +136,7 @@ fn test_asset_xcm_trader() { // Lets pay with: asset_amount_needed + asset_amount_extra let asset_amount_extra = 100_u128; - let asset: MultiAsset = - (asset_multilocation, asset_amount_needed + asset_amount_extra).into(); + let asset: Asset = (asset_location, asset_amount_needed + asset_amount_extra).into(); let mut trader = ::Trader::new(); let ctx = XcmContext { origin: None, message_id: XcmHash::default(), topic: None }; @@ -145,9 +144,7 @@ fn test_asset_xcm_trader() { // Lets buy_weight and make sure buy_weight does not return an error let unused_assets = trader.buy_weight(bought, asset.into(), &ctx).expect("Expected Ok"); // Check whether a correct amount of unused assets is returned - assert_ok!( - unused_assets.ensure_contains(&(asset_multilocation, asset_amount_extra).into()) - ); + assert_ok!(unused_assets.ensure_contains(&(asset_location, asset_amount_extra).into())); // Drop trader drop(trader); @@ -204,12 +201,12 @@ fn test_asset_xcm_trader_with_refund() { // We are going to buy 4e9 weight let bought = Weight::from_parts(4_000_000_000u64, 0); - let asset_multilocation = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); + let asset_location = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); // lets calculate amount needed let amount_bought = WeightToFee::weight_to_fee(&bought); - let asset: MultiAsset = (asset_multilocation, amount_bought).into(); + let asset: Asset = (asset_location, amount_bought).into(); // Make sure buy_weight does not return an error assert_ok!(trader.buy_weight(bought, asset.clone().into(), &ctx)); @@ -227,7 +224,7 @@ fn test_asset_xcm_trader_with_refund() { assert_eq!( trader.refund_weight(bought - weight_used, &ctx), - Some((asset_multilocation, amount_refunded).into()) + Some((asset_location, amount_refunded).into()) ); // Drop trader @@ -276,7 +273,7 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { // We are going to buy small amount let bought = Weight::from_parts(50_000_000u64, 0); - let asset_multilocation = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); + let asset_location = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -285,7 +282,7 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { "we are testing what happens when the amount does not exceed ED" ); - let asset: MultiAsset = (asset_multilocation, amount_bought).into(); + let asset: Asset = (asset_location, amount_bought).into(); // Buy weight should return an error assert_noop!(trader.buy_weight(bought, asset.into(), &ctx), XcmError::TooExpensive); @@ -328,7 +325,7 @@ fn test_that_buying_ed_refund_does_not_refund() { // We are gonna buy ED let bought = Weight::from_parts(ExistentialDeposit::get().try_into().unwrap(), 0); - let asset_multilocation = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); + let asset_location = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -339,11 +336,11 @@ fn test_that_buying_ed_refund_does_not_refund() { // We know we will have to buy at least ED, so lets make sure first it will // fail with a payment of less than ED - let asset: MultiAsset = (asset_multilocation, amount_bought).into(); + let asset: Asset = (asset_location, amount_bought).into(); assert_noop!(trader.buy_weight(bought, asset.into(), &ctx), XcmError::TooExpensive); // Now lets buy ED at least - let asset: MultiAsset = (asset_multilocation, ExistentialDeposit::get()).into(); + let asset: Asset = (asset_location, ExistentialDeposit::get()).into(); // Buy weight should work assert_ok!(trader.buy_weight(bought, asset.into(), &ctx)); @@ -404,9 +401,9 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { // lets calculate amount needed let asset_amount_needed = WeightToFee::weight_to_fee(&bought); - let asset_multilocation = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); + let asset_location = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); - let asset: MultiAsset = (asset_multilocation, asset_amount_needed).into(); + let asset: Asset = (asset_location, asset_amount_needed).into(); // Make sure again buy_weight does return an error assert_noop!(trader.buy_weight(bought, asset.into(), &ctx), XcmError::TooExpensive); @@ -436,19 +433,19 @@ fn test_assets_balances_api_works() { .build() .execute_with(|| { let local_asset_id = 1; - let foreign_asset_id_multilocation = + let foreign_asset_id_location = Location { parents: 1, interior: X2(Parachain(1234), GeneralIndex(12345)) }; // check before assert_eq!(Assets::balance(local_asset_id, AccountId::from(ALICE)), 0); assert_eq!( - ForeignAssets::balance(foreign_asset_id_multilocation, AccountId::from(ALICE)), + ForeignAssets::balance(foreign_asset_id_location, AccountId::from(ALICE)), 0 ); assert_eq!(Balances::free_balance(AccountId::from(ALICE)), 0); assert!(Runtime::query_account_balances(AccountId::from(ALICE)) .unwrap() - .try_as::() + .try_as::() .unwrap() .is_none()); @@ -479,7 +476,7 @@ fn test_assets_balances_api_works() { let foreign_asset_minimum_asset_balance = 3333333_u128; assert_ok!(ForeignAssets::force_create( RuntimeHelper::root_origin(), - foreign_asset_id_multilocation, + foreign_asset_id_location, AccountId::from(SOME_ASSET_ADMIN).into(), false, foreign_asset_minimum_asset_balance @@ -488,7 +485,7 @@ fn test_assets_balances_api_works() { // We first mint enough asset for the account to exist for assets assert_ok!(ForeignAssets::mint( RuntimeHelper::origin_of(AccountId::from(SOME_ASSET_ADMIN)), - foreign_asset_id_multilocation, + foreign_asset_id_location, AccountId::from(ALICE).into(), 6 * foreign_asset_minimum_asset_balance )); @@ -499,12 +496,12 @@ fn test_assets_balances_api_works() { minimum_asset_balance ); assert_eq!( - ForeignAssets::balance(foreign_asset_id_multilocation, AccountId::from(ALICE)), + ForeignAssets::balance(foreign_asset_id_location, AccountId::from(ALICE)), 6 * minimum_asset_balance ); assert_eq!(Balances::free_balance(AccountId::from(ALICE)), some_currency); - let result: MultiAssets = Runtime::query_account_balances(AccountId::from(ALICE)) + let result: Assets = Runtime::query_account_balances(AccountId::from(ALICE)) .unwrap() .try_into() .unwrap(); @@ -525,7 +522,7 @@ fn test_assets_balances_api_works() { .into()))); // check foreign asset assert!(result.inner().iter().any(|asset| asset.eq(&( - Identity::convert_back(&foreign_asset_id_multilocation).unwrap(), + Identity::convert_back(&foreign_asset_id_location).unwrap(), 6 * foreign_asset_minimum_asset_balance ) .into()))); diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 23a5a48f90..72b69e3b50 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -1075,7 +1075,7 @@ impl_runtime_apis! { AccountId, > for Runtime { - fn query_account_balances(account: AccountId) -> Result { + fn query_account_balances(account: AccountId) -> Result { use assets_common::fungible_conversion::{convert, convert_balance}; Ok([ // collect pallet_balance @@ -1205,10 +1205,10 @@ impl_runtime_apis! { Some(Parent.into()) } - fn teleportable_asset_and_dest() -> Option<(MultiAsset, Location)> { + fn teleportable_asset_and_dest() -> Option<(Asset, Location)> { // Relay/native token can be teleported between AH and Relay. Some(( - MultiAsset { + Asset { fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }, @@ -1216,14 +1216,14 @@ impl_runtime_apis! { )) } - fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, Location)> { + fn reserve_transferable_asset_and_dest() -> Option<(Asset, Location)> { // AH can reserve transfer native token to some random parachain. let random_para_id = 43211234; ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests( random_para_id.into() ); Some(( - MultiAsset { + Asset { fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }, @@ -1232,14 +1232,14 @@ impl_runtime_apis! { } fn set_up_complex_asset_transfer( - ) -> Option<(MultiAssets, u32, Location, Box)> { + ) -> Option<(Assets, u32, Location, Box)> { // Transfer to Relay some local AH asset (local-reserve-transfer) while paying // fees using teleported native token. // (We don't care that Relay doesn't accept incoming unknown AH local asset) let dest = Parent.into(); let fee_amount = ExistentialDeposit::get(); - let fee_asset: MultiAsset = (Location::parent(), fee_amount).into(); + let fee_asset: Asset = (Location::parent(), fee_amount).into(); let who = frame_benchmarking::whitelisted_caller(); // Give some multiple of the existential deposit @@ -1261,9 +1261,9 @@ impl_runtime_apis! { 0, X2(PalletInstance(50), GeneralIndex(u32::from(asset_id).into())) ); - let transfer_asset: MultiAsset = (asset_location, asset_amount).into(); + let transfer_asset: Asset = (asset_location, asset_amount).into(); - let assets: MultiAssets = vec![fee_asset.clone(), transfer_asset].into(); + let assets: Assets = vec![fee_asset.clone(), transfer_asset].into(); let fee_index = if assets.get(0).unwrap().eq(&fee_asset) { 0 } else { 1 }; // verify transferred successfully @@ -1282,7 +1282,7 @@ impl_runtime_apis! { } parameter_types! { - pub ExistentialDepositMultiAsset: Option = Some(( + pub ExistentialDepositAsset: Option = Some(( DotLocation::get(), ExistentialDeposit::get() ).into()); @@ -1293,32 +1293,32 @@ impl_runtime_apis! { type AccountIdConverter = xcm_config::LocationToAccountId; type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper< xcm_config::XcmConfig, - ExistentialDepositMultiAsset, + ExistentialDepositAsset, PriceForParentDelivery, >; fn valid_destination() -> Result { Ok(DotLocation::get()) } - fn worst_case_holding(depositable_count: u32) -> MultiAssets { + fn worst_case_holding(depositable_count: u32) -> Assets { // A mix of fungible, non-fungible, and concrete assets. let holding_non_fungibles = MaxAssetsIntoHolding::get() / 2 - depositable_count; let holding_fungibles = holding_non_fungibles - 1; let fungibles_amount: u128 = 100; let mut assets = (0..holding_fungibles) .map(|i| { - MultiAsset { + Asset { id: Concrete(GeneralIndex(i as u128).into()), fun: Fungible(fungibles_amount * i as u128), } }) - .chain(core::iter::once(MultiAsset { id: Concrete(Here.into()), fun: Fungible(u128::MAX) })) - .chain((0..holding_non_fungibles).map(|i| MultiAsset { + .chain(core::iter::once(Asset { id: Concrete(Here.into()), fun: Fungible(u128::MAX) })) + .chain((0..holding_non_fungibles).map(|i| Asset { id: Concrete(GeneralIndex(i as u128).into()), fun: NonFungible(asset_instance_from(i)), })) .collect::>(); - assets.push(MultiAsset { + assets.push(Asset { id: Concrete(DotLocation::get()), fun: Fungible(1_000_000 * UNITS), }); @@ -1327,16 +1327,16 @@ impl_runtime_apis! { } parameter_types! { - pub const TrustedTeleporter: Option<(Location, MultiAsset)> = Some(( + pub const TrustedTeleporter: Option<(Location, Asset)> = Some(( DotLocation::get(), - MultiAsset { fun: Fungible(UNITS), id: Concrete(DotLocation::get()) }, + Asset { fun: Fungible(UNITS), id: Concrete(DotLocation::get()) }, )); pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; // AssetHubPolkadot trusts AssetHubKusama as reserve for KSMs - pub TrustedReserve: Option<(Location, MultiAsset)> = Some( + pub TrustedReserve: Option<(Location, Asset)> = Some( ( xcm_config::bridging::to_kusama::AssetHubKusama::get(), - MultiAsset::from((xcm_config::bridging::to_kusama::KsmLocation::get(), 1000000000000 as u128)) + Asset::from((xcm_config::bridging::to_kusama::KsmLocation::get(), 1000000000000 as u128)) ) ); } @@ -1348,8 +1348,8 @@ impl_runtime_apis! { type TrustedTeleporter = TrustedTeleporter; type TrustedReserve = TrustedReserve; - fn get_multi_asset() -> MultiAsset { - MultiAsset { + fn get_multi_asset() -> Asset { + Asset { id: Concrete(DotLocation::get()), fun: Fungible(UNITS), } @@ -1364,7 +1364,7 @@ impl_runtime_apis! { (0u64, Response::Version(Default::default())) } - fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + fn worst_case_asset_exchange() -> Result<(Assets, Assets), BenchmarkError> { Err(BenchmarkError::Skip) } @@ -1381,21 +1381,21 @@ impl_runtime_apis! { Ok(DotLocation::get()) } - fn claimable_asset() -> Result<(Location, Location, MultiAssets), BenchmarkError> { + fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError> { let origin = DotLocation::get(); - let assets: MultiAssets = (Concrete(DotLocation::get()), 1_000 * UNITS).into(); + let assets: Assets = (Concrete(DotLocation::get()), 1_000 * UNITS).into(); let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(MultiAsset { + fn fee_asset() -> Result { + Ok(Asset { id: Concrete(DotLocation::get()), fun: Fungible(1_000_000 * UNITS), }) } - fn unlockable_asset() -> Result<(Location, Location, MultiAsset), BenchmarkError> { + fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { Err(BenchmarkError::Skip) } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/mod.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/mod.rs index 19dc4a8ea1..563135f9b8 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/xcm/mod.rs @@ -24,13 +24,13 @@ use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_std::prelude::*; use xcm::{latest::prelude::*, DoubleEncoded}; -trait WeighMultiAssets { +trait WeighAssets { fn weigh_multi_assets(&self, weight: Weight) -> Weight; } const MAX_ASSETS: u64 = 100; -impl WeighMultiAssets for MultiAssetFilter { +impl WeighAssets for AssetFilter { fn weigh_multi_assets(&self, weight: Weight) -> Weight { match self { Self::Definite(assets) => weight.saturating_mul(assets.inner().iter().count() as u64), @@ -50,7 +50,7 @@ impl WeighMultiAssets for MultiAssetFilter { } } -impl WeighMultiAssets for MultiAssets { +impl WeighAssets for Assets { fn weigh_multi_assets(&self, weight: Weight) -> Weight { weight.saturating_mul(self.inner().iter().count() as u64) } @@ -58,13 +58,13 @@ impl WeighMultiAssets for MultiAssets { pub struct AssetHubPolkadotXcmWeight(core::marker::PhantomData); impl XcmWeightInfo for AssetHubPolkadotXcmWeight { - fn withdraw_asset(assets: &MultiAssets) -> Weight { + fn withdraw_asset(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::withdraw_asset()) } - fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { + fn reserve_asset_deposited(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::reserve_asset_deposited()) } - fn receive_teleported_asset(assets: &MultiAssets) -> Weight { + fn receive_teleported_asset(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) } fn query_response( @@ -75,10 +75,10 @@ impl XcmWeightInfo for AssetHubPolkadotXcmWeight { ) -> Weight { XcmGeneric::::query_response() } - fn transfer_asset(assets: &MultiAssets, _dest: &Location) -> Weight { + fn transfer_asset(assets: &Assets, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_asset()) } - fn transfer_reserve_asset(assets: &MultiAssets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { + fn transfer_reserve_asset(assets: &Assets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_reserve_asset()) } fn transact( @@ -114,33 +114,29 @@ impl XcmWeightInfo for AssetHubPolkadotXcmWeight { XcmGeneric::::report_error() } - fn deposit_asset(assets: &MultiAssetFilter, _dest: &Location) -> Weight { + fn deposit_asset(assets: &AssetFilter, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()) } - fn deposit_reserve_asset( - assets: &MultiAssetFilter, - _dest: &Location, - _xcm: &Xcm<()>, - ) -> Weight { + fn deposit_reserve_asset(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { + fn exchange_asset(_give: &AssetFilter, _receive: &Assets, _maximal: &bool) -> Weight { Weight::MAX } fn initiate_reserve_withdraw( - assets: &MultiAssetFilter, + assets: &AssetFilter, _reserve: &Location, _xcm: &Xcm<()>, ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::initiate_reserve_withdraw()) } - fn initiate_teleport(assets: &MultiAssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { + fn initiate_teleport(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(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) -> Weight { + fn buy_execution(_fees: &Asset, _weight_limit: &WeightLimit) -> Weight { XcmGeneric::::buy_execution() } fn refund_surplus() -> Weight { @@ -155,7 +151,7 @@ impl XcmWeightInfo for AssetHubPolkadotXcmWeight { fn clear_error() -> Weight { XcmGeneric::::clear_error() } - fn claim_asset(_assets: &MultiAssets, _ticket: &Location) -> Weight { + fn claim_asset(_assets: &Assets, _ticket: &Location) -> Weight { XcmGeneric::::claim_asset() } fn trap(_code: &u64) -> Weight { @@ -167,10 +163,10 @@ impl XcmWeightInfo for AssetHubPolkadotXcmWeight { fn unsubscribe_version() -> Weight { 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 { @@ -206,16 +202,16 @@ impl XcmWeightInfo for AssetHubPolkadotXcmWeight { fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { Weight::MAX } - fn lock_asset(_: &MultiAsset, _: &Location) -> Weight { + fn lock_asset(_: &Asset, _: &Location) -> Weight { Weight::MAX } - fn unlock_asset(_: &MultiAsset, _: &Location) -> Weight { + fn unlock_asset(_: &Asset, _: &Location) -> Weight { Weight::MAX } - fn note_unlockable(_: &MultiAsset, _: &Location) -> Weight { + fn note_unlockable(_: &Asset, _: &Location) -> Weight { Weight::MAX } - fn request_unlock(_: &MultiAsset, _: &Location) -> Weight { + fn request_unlock(_: &Asset, _: &Location) -> Weight { Weight::MAX } fn set_fees_mode(_: &bool) -> Weight { diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 1ce9647629..621cdddc67 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -512,7 +512,7 @@ impl xcm_executor::Config for XcmConfig { type TransactionalProcessor = FrameTransactionalProcessor; } -/// Converts a local signed origin into an XCM multilocation. +/// Converts a local signed origin into an XCM location. /// Forms the basis for local origins sending/executing XCMs. pub type LocalOriginToLocation = SignedToAccountId32; @@ -642,13 +642,13 @@ pub mod bridging { ); pub KsmLocation: Location = Location::new(2, X1(GlobalConsensus(KusamaNetwork::get()))); - pub KsmFromAssetHubKusama: (MultiAssetFilter, Location) = ( + pub KsmFromAssetHubKusama: (AssetFilter, Location) = ( Wild(AllOf { fun: WildFungible, id: Concrete(KsmLocation::get()) }), AssetHubKusama::get() ); /// Set up exporters configuration. - /// `Option` represents static "base fee" which is used for total delivery fee calculation. + /// `Option` represents static "base fee" which is used for total delivery fee calculation. pub BridgeTable: sp_std::vec::Vec = sp_std::vec![ NetworkExportTableItem::new( KusamaNetwork::get(), diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index 37b36e8b15..159c248300 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -118,8 +118,8 @@ fn test_asset_xcm_trader() { minimum_asset_balance )); - // get asset id as multilocation - let asset_multilocation = + // get asset id as location + let asset_location = AssetIdForTrustBackedAssetsConvert::convert_back(&local_asset_id).unwrap(); // Set Alice as block author, who will receive fees @@ -141,8 +141,7 @@ fn test_asset_xcm_trader() { // Lets pay with: asset_amount_needed + asset_amount_extra let asset_amount_extra = 100_u128; - let asset: MultiAsset = - (asset_multilocation, asset_amount_needed + asset_amount_extra).into(); + let asset: Asset = (asset_location, asset_amount_needed + asset_amount_extra).into(); let mut trader = ::Trader::new(); let ctx = XcmContext { origin: None, message_id: XcmHash::default(), topic: None }; @@ -150,9 +149,7 @@ fn test_asset_xcm_trader() { // Lets buy_weight and make sure buy_weight does not return an error let unused_assets = trader.buy_weight(bought, asset.into(), &ctx).expect("Expected Ok"); // Check whether a correct amount of unused assets is returned - assert_ok!( - unused_assets.ensure_contains(&(asset_multilocation, asset_amount_extra).into()) - ); + assert_ok!(unused_assets.ensure_contains(&(asset_location, asset_amount_extra).into())); // Drop trader drop(trader); @@ -212,12 +209,12 @@ fn test_asset_xcm_trader_with_refund() { // bit more of weight let bought = Weight::from_parts(400_000_000_000u64, 0); - let asset_multilocation = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); + let asset_location = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); // lets calculate amount needed let amount_bought = WeightToFee::weight_to_fee(&bought); - let asset: MultiAsset = (asset_multilocation, amount_bought).into(); + let asset: Asset = (asset_location, amount_bought).into(); // Make sure buy_weight does not return an error assert_ok!(trader.buy_weight(bought, asset.clone().into(), &ctx)); @@ -235,7 +232,7 @@ fn test_asset_xcm_trader_with_refund() { assert_eq!( trader.refund_weight(bought - weight_used, &ctx), - Some((asset_multilocation, amount_refunded).into()) + Some((asset_location, amount_refunded).into()) ); // Drop trader @@ -287,7 +284,7 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { // bit more of weight let bought = Weight::from_parts(5_000_000_000u64, 0); - let asset_multilocation = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); + let asset_location = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -296,7 +293,7 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { "we are testing what happens when the amount does not exceed ED" ); - let asset: MultiAsset = (asset_multilocation, amount_bought).into(); + let asset: Asset = (asset_location, amount_bought).into(); // Buy weight should return an error assert_noop!(trader.buy_weight(bought, asset.into(), &ctx), XcmError::TooExpensive); @@ -339,7 +336,7 @@ fn test_that_buying_ed_refund_does_not_refund() { // We are gonna buy ED let bought = Weight::from_parts(ExistentialDeposit::get().try_into().unwrap(), 0); - let asset_multilocation = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); + let asset_location = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -350,11 +347,11 @@ fn test_that_buying_ed_refund_does_not_refund() { // We know we will have to buy at least ED, so lets make sure first it will // fail with a payment of less than ED - let asset: MultiAsset = (asset_multilocation, amount_bought).into(); + let asset: Asset = (asset_location, amount_bought).into(); assert_noop!(trader.buy_weight(bought, asset.into(), &ctx), XcmError::TooExpensive); // Now lets buy ED at least - let asset: MultiAsset = (asset_multilocation, ExistentialDeposit::get()).into(); + let asset: Asset = (asset_location, ExistentialDeposit::get()).into(); // Buy weight should work assert_ok!(trader.buy_weight(bought, asset.into(), &ctx)); @@ -418,9 +415,9 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { // lets calculate amount needed let asset_amount_needed = WeightToFee::weight_to_fee(&bought); - let asset_multilocation = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); + let asset_location = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); - let asset: MultiAsset = (asset_multilocation, asset_amount_needed).into(); + let asset: Asset = (asset_location, asset_amount_needed).into(); // Make sure again buy_weight does return an error assert_noop!(trader.buy_weight(bought, asset.into(), &ctx), XcmError::TooExpensive); @@ -450,19 +447,19 @@ fn test_assets_balances_api_works() { .build() .execute_with(|| { let local_asset_id = 1; - let foreign_asset_id_multilocation = + let foreign_asset_id_location = Location { parents: 1, interior: X2(Parachain(1234), GeneralIndex(12345)) }; // check before assert_eq!(Assets::balance(local_asset_id, AccountId::from(ALICE)), 0); assert_eq!( - ForeignAssets::balance(foreign_asset_id_multilocation, AccountId::from(ALICE)), + ForeignAssets::balance(foreign_asset_id_location, AccountId::from(ALICE)), 0 ); assert_eq!(Balances::free_balance(AccountId::from(ALICE)), 0); assert!(Runtime::query_account_balances(AccountId::from(ALICE)) .unwrap() - .try_as::() + .try_as::() .unwrap() .is_none()); @@ -493,7 +490,7 @@ fn test_assets_balances_api_works() { let foreign_asset_minimum_asset_balance = 3333333_u128; assert_ok!(ForeignAssets::force_create( RuntimeHelper::root_origin(), - foreign_asset_id_multilocation, + foreign_asset_id_location, AccountId::from(SOME_ASSET_ADMIN).into(), false, foreign_asset_minimum_asset_balance @@ -502,7 +499,7 @@ fn test_assets_balances_api_works() { // We first mint enough asset for the account to exist for assets assert_ok!(ForeignAssets::mint( RuntimeHelper::origin_of(AccountId::from(SOME_ASSET_ADMIN)), - foreign_asset_id_multilocation, + foreign_asset_id_location, AccountId::from(ALICE).into(), 6 * foreign_asset_minimum_asset_balance )); @@ -513,12 +510,12 @@ fn test_assets_balances_api_works() { minimum_asset_balance ); assert_eq!( - ForeignAssets::balance(foreign_asset_id_multilocation, AccountId::from(ALICE)), + ForeignAssets::balance(foreign_asset_id_location, AccountId::from(ALICE)), 6 * minimum_asset_balance ); assert_eq!(Balances::free_balance(AccountId::from(ALICE)), some_currency); - let result: MultiAssets = Runtime::query_account_balances(AccountId::from(ALICE)) + let result: Assets = Runtime::query_account_balances(AccountId::from(ALICE)) .unwrap() .try_into() .unwrap(); @@ -539,7 +536,7 @@ fn test_assets_balances_api_works() { .into()))); // check foreign asset assert!(result.inner().iter().any(|asset| asset.eq(&( - Identity::convert_back(&foreign_asset_id_multilocation).unwrap(), + Identity::convert_back(&foreign_asset_id_location).unwrap(), 6 * foreign_asset_minimum_asset_balance ) .into()))); diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index b1919ce9e8..04fd2936de 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -822,10 +822,10 @@ impl_runtime_apis! { Some(Parent.into()) } - fn teleportable_asset_and_dest() -> Option<(MultiAsset, Location)> { + fn teleportable_asset_and_dest() -> Option<(Asset, Location)> { // Relay/native token can be teleported between BH and Relay. Some(( - MultiAsset { + Asset { fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }, @@ -833,13 +833,13 @@ impl_runtime_apis! { )) } - fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, Location)> { + fn reserve_transferable_asset_and_dest() -> Option<(Asset, Location)> { // Reserve transfers are disabled on BH. None } fn set_up_complex_asset_transfer( - ) -> Option<(MultiAssets, u32, Location, Box)> { + ) -> Option<(Assets, u32, Location, Box)> { // BH only supports teleports to system parachain. // Relay/native token can be teleported between BH and Relay. let native_location = Parent.into(); @@ -852,7 +852,7 @@ impl_runtime_apis! { } parameter_types! { - pub ExistentialDepositMultiAsset: Option = Some(( + pub ExistentialDepositAsset: Option = Some(( KsmRelayLocation::get(), ExistentialDeposit::get() ).into()); @@ -863,16 +863,16 @@ impl_runtime_apis! { type AccountIdConverter = xcm_config::LocationToAccountId; type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper< xcm_config::XcmConfig, - ExistentialDepositMultiAsset, + ExistentialDepositAsset, PriceForParentDelivery, >; fn valid_destination() -> Result { Ok(KsmRelayLocation::get()) } - fn worst_case_holding(_depositable_count: u32) -> MultiAssets { + fn worst_case_holding(_depositable_count: u32) -> Assets { // just concrete assets according to relay chain. - let assets: Vec = vec![ - MultiAsset { + let assets: Vec = vec![ + Asset { id: Concrete(KsmRelayLocation::get()), fun: Fungible(1_000_000 * UNITS), } @@ -882,12 +882,12 @@ impl_runtime_apis! { } parameter_types! { - pub const TrustedTeleporter: Option<(Location, MultiAsset)> = Some(( + pub const TrustedTeleporter: Option<(Location, Asset)> = Some(( KsmRelayLocation::get(), - MultiAsset { fun: Fungible(UNITS), id: Concrete(KsmRelayLocation::get()) }, + Asset { fun: Fungible(UNITS), id: Concrete(KsmRelayLocation::get()) }, )); pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; - pub const TrustedReserve: Option<(Location, MultiAsset)> = None; + pub const TrustedReserve: Option<(Location, Asset)> = None; } impl pallet_xcm_benchmarks::fungible::Config for Runtime { @@ -897,8 +897,8 @@ impl_runtime_apis! { type TrustedTeleporter = TrustedTeleporter; type TrustedReserve = TrustedReserve; - fn get_multi_asset() -> MultiAsset { - MultiAsset { + fn get_multi_asset() -> Asset { + Asset { id: Concrete(KsmRelayLocation::get()), fun: Fungible(UNITS), } @@ -913,7 +913,7 @@ impl_runtime_apis! { (0u64, Response::Version(Default::default())) } - fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + fn worst_case_asset_exchange() -> Result<(Assets, Assets), BenchmarkError> { Err(BenchmarkError::Skip) } @@ -929,21 +929,21 @@ impl_runtime_apis! { Ok(KsmRelayLocation::get()) } - fn claimable_asset() -> Result<(Location, Location, MultiAssets), BenchmarkError> { + fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError> { let origin = KsmRelayLocation::get(); - let assets: MultiAssets = (Concrete(KsmRelayLocation::get()), 1_000 * UNITS).into(); + let assets: Assets = (Concrete(KsmRelayLocation::get()), 1_000 * UNITS).into(); let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(MultiAsset { + fn fee_asset() -> Result { + Ok(Asset { id: Concrete(KsmRelayLocation::get()), fun: Fungible(1_000_000 * UNITS), }) } - fn unlockable_asset() -> Result<(Location, Location, MultiAsset), BenchmarkError> { + fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { Err(BenchmarkError::Skip) } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs index 8e749a8f4b..9d9afd530d 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs @@ -25,13 +25,13 @@ use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_std::prelude::*; use xcm::{latest::prelude::*, DoubleEncoded}; -trait WeighMultiAssets { +trait WeighAssets { fn weigh_multi_assets(&self, weight: Weight) -> Weight; } const MAX_ASSETS: u64 = 100; -impl WeighMultiAssets for MultiAssetFilter { +impl WeighAssets for AssetFilter { fn weigh_multi_assets(&self, weight: Weight) -> Weight { match self { Self::Definite(assets) => weight.saturating_mul(assets.inner().iter().count() as u64), @@ -51,7 +51,7 @@ impl WeighMultiAssets for MultiAssetFilter { } } -impl WeighMultiAssets for MultiAssets { +impl WeighAssets for Assets { fn weigh_multi_assets(&self, weight: Weight) -> Weight { weight.saturating_mul(self.inner().iter().count() as u64) } @@ -59,13 +59,13 @@ impl WeighMultiAssets for MultiAssets { pub struct BridgeHubKusamaXcmWeight(core::marker::PhantomData); impl XcmWeightInfo for BridgeHubKusamaXcmWeight { - fn withdraw_asset(assets: &MultiAssets) -> Weight { + fn withdraw_asset(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::withdraw_asset()) } - fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { + fn reserve_asset_deposited(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::reserve_asset_deposited()) } - fn receive_teleported_asset(assets: &MultiAssets) -> Weight { + fn receive_teleported_asset(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) } fn query_response( @@ -76,10 +76,10 @@ impl XcmWeightInfo for BridgeHubKusamaXcmWeight { ) -> Weight { XcmGeneric::::query_response() } - fn transfer_asset(assets: &MultiAssets, _dest: &Location) -> Weight { + fn transfer_asset(assets: &Assets, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_asset()) } - fn transfer_reserve_asset(assets: &MultiAssets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { + fn transfer_reserve_asset(assets: &Assets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_reserve_asset()) } fn transact( @@ -115,33 +115,29 @@ impl XcmWeightInfo for BridgeHubKusamaXcmWeight { XcmGeneric::::report_error() } - fn deposit_asset(assets: &MultiAssetFilter, _dest: &Location) -> Weight { + fn deposit_asset(assets: &AssetFilter, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()) } - fn deposit_reserve_asset( - assets: &MultiAssetFilter, - _dest: &Location, - _xcm: &Xcm<()>, - ) -> Weight { + fn deposit_reserve_asset(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { + fn exchange_asset(_give: &AssetFilter, _receive: &Assets, _maximal: &bool) -> Weight { Weight::MAX } fn initiate_reserve_withdraw( - assets: &MultiAssetFilter, + assets: &AssetFilter, _reserve: &Location, _xcm: &Xcm<()>, ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::initiate_reserve_withdraw()) } - fn initiate_teleport(assets: &MultiAssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { + fn initiate_teleport(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(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) -> Weight { + fn buy_execution(_fees: &Asset, _weight_limit: &WeightLimit) -> Weight { XcmGeneric::::buy_execution() } fn refund_surplus() -> Weight { @@ -156,7 +152,7 @@ impl XcmWeightInfo for BridgeHubKusamaXcmWeight { fn clear_error() -> Weight { XcmGeneric::::clear_error() } - fn claim_asset(_assets: &MultiAssets, _ticket: &Location) -> Weight { + fn claim_asset(_assets: &Assets, _ticket: &Location) -> Weight { XcmGeneric::::claim_asset() } fn trap(_code: &u64) -> Weight { @@ -168,10 +164,10 @@ impl XcmWeightInfo for BridgeHubKusamaXcmWeight { fn unsubscribe_version() -> Weight { 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 { @@ -208,16 +204,16 @@ impl XcmWeightInfo for BridgeHubKusamaXcmWeight { let inner_encoded_len = inner.encode().len() as u32; XcmGeneric::::export_message(inner_encoded_len) } - fn lock_asset(_: &MultiAsset, _: &Location) -> Weight { + fn lock_asset(_: &Asset, _: &Location) -> Weight { Weight::MAX } - fn unlock_asset(_: &MultiAsset, _: &Location) -> Weight { + fn unlock_asset(_: &Asset, _: &Location) -> Weight { Weight::MAX } - fn note_unlockable(_: &MultiAsset, _: &Location) -> Weight { + fn note_unlockable(_: &Asset, _: &Location) -> Weight { Weight::MAX } - fn request_unlock(_: &MultiAsset, _: &Location) -> Weight { + fn request_unlock(_: &Asset, _: &Location) -> Weight { Weight::MAX } fn set_fees_mode(_: &bool) -> Weight { diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 6b014abedb..eb16e8572d 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -275,7 +275,7 @@ impl xcm_executor::Config for XcmConfig { type TransactionalProcessor = FrameTransactionalProcessor; } -/// Converts a local signed origin into an XCM multilocation. +/// Converts a local signed origin into an XCM location. /// Forms the basis for local origins sending/executing XCMs. pub type LocalOriginToLocation = SignedToAccountId32; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 9d9dc72f48..dc448c413c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -822,10 +822,10 @@ impl_runtime_apis! { Some(Parent.into()) } - fn teleportable_asset_and_dest() -> Option<(MultiAsset, Location)> { + fn teleportable_asset_and_dest() -> Option<(Asset, Location)> { // Relay/native token can be teleported between BH and Relay. Some(( - MultiAsset { + Asset { fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }, @@ -833,13 +833,13 @@ impl_runtime_apis! { )) } - fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, Location)> { + fn reserve_transferable_asset_and_dest() -> Option<(Asset, Location)> { // Reserve transfers are disabled on BH. None } fn set_up_complex_asset_transfer( - ) -> Option<(MultiAssets, u32, Location, Box)> { + ) -> Option<(Assets, u32, Location, Box)> { // BH only supports teleports to system parachain. // Relay/native token can be teleported between BH and Relay. let native_location = Parent.into(); @@ -852,7 +852,7 @@ impl_runtime_apis! { } parameter_types! { - pub ExistentialDepositMultiAsset: Option = Some(( + pub ExistentialDepositAsset: Option = Some(( DotRelayLocation::get(), ExistentialDeposit::get() ).into()); @@ -863,16 +863,16 @@ impl_runtime_apis! { type AccountIdConverter = xcm_config::LocationToAccountId; type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper< xcm_config::XcmConfig, - ExistentialDepositMultiAsset, + ExistentialDepositAsset, PriceForParentDelivery, >; fn valid_destination() -> Result { Ok(DotRelayLocation::get()) } - fn worst_case_holding(_depositable_count: u32) -> MultiAssets { + fn worst_case_holding(_depositable_count: u32) -> Assets { // just concrete assets according to relay chain. - let assets: Vec = vec![ - MultiAsset { + let assets: Vec = vec![ + Asset { id: Concrete(DotRelayLocation::get()), fun: Fungible(1_000_000 * UNITS), } @@ -882,12 +882,12 @@ impl_runtime_apis! { } parameter_types! { - pub const TrustedTeleporter: Option<(Location, MultiAsset)> = Some(( + pub const TrustedTeleporter: Option<(Location, Asset)> = Some(( DotRelayLocation::get(), - MultiAsset { fun: Fungible(UNITS), id: Concrete(DotRelayLocation::get()) }, + Asset { fun: Fungible(UNITS), id: Concrete(DotRelayLocation::get()) }, )); pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; - pub const TrustedReserve: Option<(Location, MultiAsset)> = None; + pub const TrustedReserve: Option<(Location, Asset)> = None; } impl pallet_xcm_benchmarks::fungible::Config for Runtime { @@ -897,8 +897,8 @@ impl_runtime_apis! { type TrustedTeleporter = TrustedTeleporter; type TrustedReserve = TrustedReserve; - fn get_multi_asset() -> MultiAsset { - MultiAsset { + fn get_multi_asset() -> Asset { + Asset { id: Concrete(DotRelayLocation::get()), fun: Fungible(UNITS), } @@ -913,7 +913,7 @@ impl_runtime_apis! { (0u64, Response::Version(Default::default())) } - fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + fn worst_case_asset_exchange() -> Result<(Assets, Assets), BenchmarkError> { Err(BenchmarkError::Skip) } @@ -929,21 +929,21 @@ impl_runtime_apis! { Ok(DotRelayLocation::get()) } - fn claimable_asset() -> Result<(Location, Location, MultiAssets), BenchmarkError> { + fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError> { let origin = DotRelayLocation::get(); - let assets: MultiAssets = (Concrete(DotRelayLocation::get()), 1_000 * UNITS).into(); + let assets: Assets = (Concrete(DotRelayLocation::get()), 1_000 * UNITS).into(); let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(MultiAsset { + fn fee_asset() -> Result { + Ok(Asset { id: Concrete(DotRelayLocation::get()), fun: Fungible(1_000_000 * UNITS), }) } - fn unlockable_asset() -> Result<(Location, Location, MultiAsset), BenchmarkError> { + fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { Err(BenchmarkError::Skip) } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs index f4dbe966ed..b577150e77 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/mod.rs @@ -25,13 +25,13 @@ use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_std::prelude::*; use xcm::{latest::prelude::*, DoubleEncoded}; -trait WeighMultiAssets { +trait WeighAssets { fn weigh_multi_assets(&self, weight: Weight) -> Weight; } const MAX_ASSETS: u64 = 100; -impl WeighMultiAssets for MultiAssetFilter { +impl WeighAssets for AssetFilter { fn weigh_multi_assets(&self, weight: Weight) -> Weight { match self { Self::Definite(assets) => weight.saturating_mul(assets.inner().iter().count() as u64), @@ -51,7 +51,7 @@ impl WeighMultiAssets for MultiAssetFilter { } } -impl WeighMultiAssets for MultiAssets { +impl WeighAssets for Assets { fn weigh_multi_assets(&self, weight: Weight) -> Weight { weight.saturating_mul(self.inner().iter().count() as u64) } @@ -59,13 +59,13 @@ impl WeighMultiAssets for MultiAssets { pub struct BridgeHubPolkadotXcmWeight(core::marker::PhantomData); impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { - fn withdraw_asset(assets: &MultiAssets) -> Weight { + fn withdraw_asset(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::withdraw_asset()) } - fn reserve_asset_deposited(assets: &MultiAssets) -> Weight { + fn reserve_asset_deposited(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::reserve_asset_deposited()) } - fn receive_teleported_asset(assets: &MultiAssets) -> Weight { + fn receive_teleported_asset(assets: &Assets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) } fn query_response( @@ -76,10 +76,10 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { ) -> Weight { XcmGeneric::::query_response() } - fn transfer_asset(assets: &MultiAssets, _dest: &Location) -> Weight { + fn transfer_asset(assets: &Assets, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_asset()) } - fn transfer_reserve_asset(assets: &MultiAssets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { + fn transfer_reserve_asset(assets: &Assets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_reserve_asset()) } fn transact( @@ -115,33 +115,29 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { XcmGeneric::::report_error() } - fn deposit_asset(assets: &MultiAssetFilter, _dest: &Location) -> Weight { + fn deposit_asset(assets: &AssetFilter, _dest: &Location) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()) } - fn deposit_reserve_asset( - assets: &MultiAssetFilter, - _dest: &Location, - _xcm: &Xcm<()>, - ) -> Weight { + fn deposit_reserve_asset(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { + fn exchange_asset(_give: &AssetFilter, _receive: &Assets, _maximal: &bool) -> Weight { Weight::MAX } fn initiate_reserve_withdraw( - assets: &MultiAssetFilter, + assets: &AssetFilter, _reserve: &Location, _xcm: &Xcm<()>, ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::initiate_reserve_withdraw()) } - fn initiate_teleport(assets: &MultiAssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { + fn initiate_teleport(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { assets.weigh_multi_assets(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) -> Weight { + fn buy_execution(_fees: &Asset, _weight_limit: &WeightLimit) -> Weight { XcmGeneric::::buy_execution() } fn refund_surplus() -> Weight { @@ -156,7 +152,7 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { fn clear_error() -> Weight { XcmGeneric::::clear_error() } - fn claim_asset(_assets: &MultiAssets, _ticket: &Location) -> Weight { + fn claim_asset(_assets: &Assets, _ticket: &Location) -> Weight { XcmGeneric::::claim_asset() } fn trap(_code: &u64) -> Weight { @@ -168,10 +164,10 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { fn unsubscribe_version() -> Weight { 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 { @@ -208,16 +204,16 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { let inner_encoded_len = inner.encode().len() as u32; XcmGeneric::::export_message(inner_encoded_len) } - fn lock_asset(_: &MultiAsset, _: &Location) -> Weight { + fn lock_asset(_: &Asset, _: &Location) -> Weight { Weight::MAX } - fn unlock_asset(_: &MultiAsset, _: &Location) -> Weight { + fn unlock_asset(_: &Asset, _: &Location) -> Weight { Weight::MAX } - fn note_unlockable(_: &MultiAsset, _: &Location) -> Weight { + fn note_unlockable(_: &Asset, _: &Location) -> Weight { Weight::MAX } - fn request_unlock(_: &MultiAsset, _: &Location) -> Weight { + fn request_unlock(_: &Asset, _: &Location) -> Weight { Weight::MAX } fn set_fees_mode(_: &bool) -> Weight { diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 216ebdc3d6..d9f4534853 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -280,7 +280,7 @@ impl xcm_executor::Config for XcmConfig { type TransactionalProcessor = FrameTransactionalProcessor; } -/// Converts a local signed origin into an XCM multilocation. +/// Converts a local signed origin into an XCM location. /// Forms the basis for local origins sending/executing XCMs. pub type LocalOriginToLocation = SignedToAccountId32; diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 7aca847ef7..d14287a05f 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -979,10 +979,10 @@ impl_runtime_apis! { Some(Parent.into()) } - fn teleportable_asset_and_dest() -> Option<(MultiAsset, Location)> { + fn teleportable_asset_and_dest() -> Option<(Asset, Location)> { // Relay/native token can be teleported between Collectives and Relay. Some(( - MultiAsset { + Asset { fun: Fungible(ExistentialDeposit::get()), id: Concrete(Parent.into()) }.into(), @@ -990,13 +990,13 @@ impl_runtime_apis! { )) } - fn reserve_transferable_asset_and_dest() -> Option<(MultiAsset, Location)> { + fn reserve_transferable_asset_and_dest() -> Option<(Asset, Location)> { // Reserve transfers are disabled on Collectives. None } fn set_up_complex_asset_transfer( - ) -> Option<(MultiAssets, u32, Location, Box)> { + ) -> Option<(Assets, u32, Location, Box)> { // Collectives only supports teleports to system parachain. // Relay/native token can be teleported between Collectives and Relay. let native_location = Parent.into(); diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 72e4df97f3..03732972f2 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -301,7 +301,7 @@ impl xcm_executor::Config for XcmConfig { type TransactionalProcessor = FrameTransactionalProcessor; } -/// Converts a local signed origin into an XCM multilocation. +/// Converts a local signed origin into an XCM location. /// Forms the basis for local origins sending/executing XCMs. pub type LocalOriginToLocation = SignedToAccountId32; diff --git a/system-parachains/encointer/src/xcm_config.rs b/system-parachains/encointer/src/xcm_config.rs index 875df7d893..ff5e6ed71d 100644 --- a/system-parachains/encointer/src/xcm_config.rs +++ b/system-parachains/encointer/src/xcm_config.rs @@ -182,7 +182,7 @@ impl xcm_executor::Config for XcmConfig { type TransactionalProcessor = FrameTransactionalProcessor; } -/// Converts a local signed origin into an XCM multilocation. +/// Converts a local signed origin into an XCM location. /// Forms the basis for local origins sending/executing XCMs. pub type LocalOriginToLocation = SignedToAccountId32; From f24c8219f0087c5c728c70c4d3bc794720111918 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Sun, 18 Feb 2024 23:06:17 +0100 Subject: [PATCH 137/316] [pallet_balances] adjust https://github.com/paritytech/polkadot-sdk/pull/3001 (force_adjust_total_issuance) --- relay/kusama/src/weights/pallet_balances_native.rs | 11 +++++++++++ relay/kusama/src/weights/pallet_balances_nis.rs | 11 +++++++++++ relay/polkadot/src/weights/pallet_balances.rs | 11 +++++++++++ .../asset-hub-kusama/src/weights/pallet_balances.rs | 11 +++++++++++ .../asset-hub-polkadot/src/weights/pallet_balances.rs | 11 +++++++++++ .../bridge-hub-kusama/src/weights/pallet_balances.rs | 11 +++++++++++ .../src/weights/pallet_balances.rs | 11 +++++++++++ .../src/weights/pallet_balances.rs | 11 +++++++++++ 8 files changed, 88 insertions(+) diff --git a/relay/kusama/src/weights/pallet_balances_native.rs b/relay/kusama/src/weights/pallet_balances_native.rs index fc835945d4..50399badbd 100644 --- a/relay/kusama/src/weights/pallet_balances_native.rs +++ b/relay/kusama/src/weights/pallet_balances_native.rs @@ -152,4 +152,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, 2603).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 { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1501` + // Minimum execution time: 5_208_000 picoseconds. + Weight::from_parts(5_619_000, 0) + .saturating_add(Weight::from_parts(0, 1501)) + .saturating_add(T::DbWeight::get().reads(1)) + } } diff --git a/relay/kusama/src/weights/pallet_balances_nis.rs b/relay/kusama/src/weights/pallet_balances_nis.rs index 9f14c6ce74..358303cbd3 100644 --- a/relay/kusama/src/weights/pallet_balances_nis.rs +++ b/relay/kusama/src/weights/pallet_balances_nis.rs @@ -166,4 +166,15 @@ impl pallet_balances::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).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 { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1501` + // Minimum execution time: 5_208_000 picoseconds. + Weight::from_parts(5_619_000, 0) + .saturating_add(Weight::from_parts(0, 1501)) + .saturating_add(T::DbWeight::get().reads(1)) + } } diff --git a/relay/polkadot/src/weights/pallet_balances.rs b/relay/polkadot/src/weights/pallet_balances.rs index f29983fe02..866261abd2 100644 --- a/relay/polkadot/src/weights/pallet_balances.rs +++ b/relay/polkadot/src/weights/pallet_balances.rs @@ -151,4 +151,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, 2603).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 { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1501` + // Minimum execution time: 5_208_000 picoseconds. + Weight::from_parts(5_619_000, 0) + .saturating_add(Weight::from_parts(0, 1501)) + .saturating_add(T::DbWeight::get().reads(1)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_balances.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_balances.rs index 72c3704db5..c32d3f9d7d 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_balances.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_balances.rs @@ -147,4 +147,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, 2603).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 { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1501` + // Minimum execution time: 5_208_000 picoseconds. + Weight::from_parts(5_619_000, 0) + .saturating_add(Weight::from_parts(0, 1501)) + .saturating_add(T::DbWeight::get().reads(1)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_balances.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_balances.rs index c9d931eec3..b1e22cf3bf 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_balances.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_balances.rs @@ -147,4 +147,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, 2603).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 { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1501` + // Minimum execution time: 5_208_000 picoseconds. + Weight::from_parts(5_619_000, 0) + .saturating_add(Weight::from_parts(0, 1501)) + .saturating_add(T::DbWeight::get().reads(1)) + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_balances.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_balances.rs index 554eb9952e..e78e0e82f5 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_balances.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_balances.rs @@ -147,4 +147,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, 2603).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 { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1501` + // Minimum execution time: 5_208_000 picoseconds. + Weight::from_parts(5_619_000, 0) + .saturating_add(Weight::from_parts(0, 1501)) + .saturating_add(T::DbWeight::get().reads(1)) + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_balances.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_balances.rs index d6bcc10ea0..7efd063962 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_balances.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_balances.rs @@ -147,4 +147,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, 2603).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 { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1501` + // Minimum execution time: 5_208_000 picoseconds. + Weight::from_parts(5_619_000, 0) + .saturating_add(Weight::from_parts(0, 1501)) + .saturating_add(T::DbWeight::get().reads(1)) + } } diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_balances.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_balances.rs index 16b63d0cb2..fc6bb1bedb 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_balances.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_balances.rs @@ -147,4 +147,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, 2603).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 { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1501` + // Minimum execution time: 5_208_000 picoseconds. + Weight::from_parts(5_619_000, 0) + .saturating_add(Weight::from_parts(0, 1501)) + .saturating_add(T::DbWeight::get().reads(1)) + } } From 8dccb71b9c4a937479e925b3cc667dddeba9e5ae Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Sun, 18 Feb 2024 23:09:04 +0100 Subject: [PATCH 138/316] [parachains_shared] adapt https://github.com/paritytech/polkadot-sdk/pull/2889 (DisabledValidators) --- relay/kusama/src/lib.rs | 4 +++- relay/polkadot/src/lib.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index fe4c1e11f6..c9d9ecd307 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1197,7 +1197,9 @@ impl parachains_configuration::Config for Runtime { type WeightInfo = weights::runtime_parachains_configuration::WeightInfo; } -impl parachains_shared::Config for Runtime {} +impl parachains_shared::Config for Runtime { + type DisabledValidators = Session; +} impl parachains_session_info::Config for Runtime { type ValidatorSet = Historical; diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index ef789e2b5b..d2a445f27a 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1279,7 +1279,9 @@ impl parachains_configuration::Config for Runtime { type WeightInfo = weights::runtime_parachains_configuration::WeightInfo; } -impl parachains_shared::Config for Runtime {} +impl parachains_shared::Config for Runtime { + type DisabledValidators = Session; +} impl parachains_session_info::Config for Runtime { type ValidatorSet = Historical; From 838bfde576d697ec04c81eec76ece114b4903ca8 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 19 Feb 2024 09:50:45 +0200 Subject: [PATCH 139/316] merge fixes --- Cargo.lock | 873 +++++++++++++++++- .../bridge-hub-polkadot/src/lib.rs | 1 - 2 files changed, 851 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7878e8b480..31b7460132 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -110,6 +110,77 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +[[package]] +name = "alloy-primitives" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0628ec0ba5b98b3370bb6be17b12f23bfce8ee4ad83823325a20546d9b03b78" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "proptest", + "rand 0.8.5", + "ruint", + "serde", + "tiny-keccak", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" +dependencies = [ + "alloy-rlp-derive", + "arrayvec 0.7.4", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a98ad1696a2e17f010ae8e43e9f2a1e930ed176a8e3ff77acfeff6dfb07b42c" +dependencies = [ + "const-hex", + "dunce", + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.48", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-types" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98d7107bed88e8f09f0ddcc3335622d87bfb6821f3e0c7473329fb1cfad5e015" +dependencies = [ + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + [[package]] name = "android-tzdata" version = "0.1.1" @@ -232,8 +303,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" dependencies = [ "ark-ec", - "ark-ff", - "ark-std", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -243,9 +314,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" dependencies = [ "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -254,10 +325,10 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" dependencies = [ - "ark-ff", + "ark-ff 0.4.2", "ark-poly", - "ark-serialize", - "ark-std", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", "itertools 0.10.5", @@ -265,16 +336,34 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + [[package]] name = "ark-ff" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "digest 0.10.7", "itertools 0.10.5", @@ -285,6 +374,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-asm" version = "0.4.2" @@ -295,6 +394,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-macros" version = "0.4.2" @@ -314,13 +425,23 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", ] +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + [[package]] name = "ark-serialize" version = "0.4.2" @@ -328,7 +449,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ "ark-serialize-derive", - "ark-std", + "ark-std 0.4.0", "digest 0.10.7", "num-bigint", ] @@ -344,6 +465,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + [[package]] name = "ark-std" version = "0.4.0" @@ -514,6 +645,7 @@ dependencies = [ "polkadot-runtime-constants", "primitive-types", "scale-info", + "snowbridge-router-primitives", "sp-api 27.0.0", "sp-block-builder 27.0.0", "sp-consensus-aura 0.33.0", @@ -616,6 +748,8 @@ dependencies = [ "polkadot-runtime-common 8.0.0", "polkadot-runtime-constants", "scale-info", + "smallvec", + "snowbridge-router-primitives", "sp-api 27.0.0", "sp-block-builder 27.0.0", "sp-consensus-aura 0.33.0", @@ -779,6 +913,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "auto_impl" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "823b8bb275161044e2ac7a25879cb3e2480cb403e3943022c7c769c599b756aa" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -892,6 +1037,21 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitcoin_hashes" version = "0.11.0" @@ -1313,6 +1473,24 @@ dependencies = [ "sp-runtime 32.0.0", ] +[[package]] +name = "bridge-hub-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e69c25ec3db0ef22ae409cc60f5c42364124264ce6640e17dbcfc0280e4b5dd9" +dependencies = [ + "cumulus-primitives-core 0.8.0", + "frame-support 29.0.0", + "pallet-message-queue 32.0.0", + "parity-scale-codec", + "scale-info", + "snowbridge-core", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", +] + [[package]] name = "bridge-hub-kusama-runtime" version = "1.0.0" @@ -1329,6 +1507,7 @@ dependencies = [ "bp-polkadot-core", "bp-relayers", "bp-runtime", + "bridge-hub-common", "bridge-hub-test-utils", "bridge-runtime-common", "cumulus-pallet-aura-ext 0.8.0", @@ -1375,6 +1554,16 @@ dependencies = [ "polkadot-runtime-constants", "scale-info", "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-runtime-common", + "snowbridge-system-runtime-api", "sp-api 27.0.0", "sp-block-builder 27.0.0", "sp-consensus-aura 0.33.0", @@ -1415,6 +1604,7 @@ dependencies = [ "bp-polkadot-core", "bp-relayers", "bp-runtime", + "bridge-hub-common", "bridge-hub-test-utils", "bridge-runtime-common", "cumulus-pallet-aura-ext 0.8.0", @@ -1461,6 +1651,16 @@ dependencies = [ "polkadot-runtime-constants", "scale-info", "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-runtime-common", + "snowbridge-system-runtime-api", "sp-api 27.0.0", "sp-block-builder 27.0.0", "sp-consensus-aura 0.33.0", @@ -2030,6 +2230,19 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "const-hex" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d59688ad0945eaf6b84cb44fedbe93484c81b48970e98f09db8a22832d7961" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + [[package]] name = "const-oid" version = "0.9.5" @@ -3120,6 +3333,12 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + [[package]] name = "dyn-clonable" version = "0.9.0" @@ -3513,6 +3732,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "ethabi-decode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d398648d65820a727d6a81e58b962f874473396a047e4c30bafe3240953417" +dependencies = [ + "ethereum-types", + "tiny-keccak", +] + [[package]] name = "ethbloom" version = "0.13.0" @@ -3521,8 +3750,10 @@ checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", + "scale-info", "tiny-keccak", ] @@ -3534,9 +3765,11 @@ checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ "ethbloom", "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", "primitive-types", + "scale-info", "uint", ] @@ -3619,6 +3852,17 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec 0.7.4", + "auto_impl", + "bytes", +] + [[package]] name = "fatality" version = "0.0.6" @@ -8277,6 +8521,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3508a51d359c6640577feead9dc00667f38cec385baad77b636c61ff746ffe24" dependencies = [ "docify", + "frame-benchmarking 25.0.0", "frame-support 25.0.0", "frame-system 25.0.0", "log", @@ -9004,6 +9249,12 @@ dependencies = [ "substrate-wasm-builder 18.0.0", ] +[[package]] +name = "parity-bytes" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b56e3a2420138bdb970f84dfb9c774aea80fa0e7371549eedec0d80c209c67" + [[package]] name = "parity-db" version = "0.4.13" @@ -9262,6 +9513,17 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "pest" +version = "2.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + [[package]] name = "petgraph" version = "0.6.4" @@ -10213,6 +10475,26 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.4.1", + "lazy_static", + "num-traits", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax 0.8.2", + "rusty-fork", + "tempfile", + "unarray", +] + [[package]] name = "prost" version = "0.11.9" @@ -10461,6 +10743,15 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -10748,6 +11039,36 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ruint" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608a5726529f2f0ef81b8fde9873c4bb829d6b5b5ca6be4d97345ddf0749c825" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand 0.8.5", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e666a5496a0b2186dbcd0ff6106e29e093c15591bde62c20d3842007c6978a09" + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -10775,6 +11096,15 @@ dependencies = [ "semver 0.9.0", ] +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + [[package]] name = "rustc_version" version = "0.4.0" @@ -10881,6 +11211,18 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -12364,7 +12706,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", ] [[package]] @@ -12373,7 +12715,16 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser 0.10.2", ] [[package]] @@ -12391,6 +12742,15 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + [[package]] name = "separator" version = "0.4.1" @@ -12406,6 +12766,15 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-big-array" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd31f59f6fe2b0c055371bb2f16d7f0aa7d8881676c04a55b1596d1a17cd10a4" +dependencies = [ + "serde", +] + [[package]] name = "serde_bytes" version = "0.11.14" @@ -12635,8 +13004,333 @@ dependencies = [ ] [[package]] -name = "socket2" -version = "0.4.10" +name = "snowbridge-amcl" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460a9ed63cdf03c1b9847e8a12a5f5ba19c4efd5869e4a737e05be25d7c427e5" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "snowbridge-beacon-primitives" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a73ef707257064bc4ecce8323cdb7c30e8ecd1ce74aa89a6e82e81fa8b9970" +dependencies = [ + "byte-slice-cast", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex", + "parity-scale-codec", + "rlp", + "scale-info", + "serde", + "snowbridge-ethereum", + "snowbridge-milagro-bls", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "ssz_rs", + "ssz_rs_derive", + "static_assertions", +] + +[[package]] +name = "snowbridge-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d3615664be8525d6f23e42dce1c314abc7f961a7f862b74012444e16d5dde5c" +dependencies = [ + "ethabi-decode", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "parity-scale-codec", + "polkadot-parachain-primitives 7.0.0", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", +] + +[[package]] +name = "snowbridge-ethereum" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "315ad74f081734cb51f48bb10cd18a3f83cfec3c09a551bc936027708635e808" +dependencies = [ + "ethabi-decode", + "ethbloom", + "ethereum-types", + "hex-literal", + "parity-bytes", + "parity-scale-codec", + "rlp", + "rustc-hex", + "scale-info", + "serde", + "serde-big-array", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", +] + +[[package]] +name = "snowbridge-milagro-bls" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "026aa8638f690a53e3f7676024b9e913b1cab0111d1b7b92669d40a188f9d7e6" +dependencies = [ + "hex", + "lazy_static", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "snowbridge-amcl", + "zeroize", +] + +[[package]] +name = "snowbridge-outbound-queue-merkle-tree" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5382cf77aeb8a92a142751949cdea1f230b7864e1ea687352c28439faabcf69d" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core 29.0.0", + "sp-runtime 32.0.0", +] + +[[package]] +name = "snowbridge-outbound-queue-runtime-api" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4933810488df1660cf60f53a7952ce1dff6aaef72d9fc740e1274e937136444e" +dependencies = [ + "frame-support 29.0.0", + "parity-scale-codec", + "snowbridge-core", + "snowbridge-outbound-queue-merkle-tree", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", +] + +[[package]] +name = "snowbridge-pallet-ethereum-client" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0fd437cd5db8b7d16cdd4da110d674d245532afa31df10108a11858a07844a6" +dependencies = [ + "bp-runtime", + "byte-slice-cast", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "log", + "pallet-timestamp 28.0.0", + "parity-scale-codec", + "rlp", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-ethereum", + "snowbridge-pallet-ethereum-client-fixtures", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "ssz_rs", + "ssz_rs_derive", + "static_assertions", +] + +[[package]] +name = "snowbridge-pallet-ethereum-client-fixtures" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3d5b4b7e17eaadbc52ac3fc9fbcce63dfc60c05a1b19604cd009d6595c1175e" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "snowbridge-beacon-primitives", + "snowbridge-core", + "sp-core 29.0.0", + "sp-std 14.0.0", +] + +[[package]] +name = "snowbridge-pallet-inbound-queue" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79c1fbfd32dbba082a9312c02c3ef35de929741f78f48e88b7668909350ef9e2" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "log", + "num-traits", + "pallet-balances 29.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-ethereum", + "snowbridge-pallet-inbound-queue-fixtures", + "snowbridge-router-primitives", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + +[[package]] +name = "snowbridge-pallet-inbound-queue-fixtures" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d8fff63b0a64d1dd06571ad074e664594bd9392481cd3489edde36e1d2dcc96" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "snowbridge-beacon-primitives", + "snowbridge-core", + "sp-core 29.0.0", + "sp-std 14.0.0", +] + +[[package]] +name = "snowbridge-pallet-outbound-queue" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c7498ba5bc2b15e1d032b3e44659cd117cad24eab457a40dc5e17acfaac0aff" +dependencies = [ + "bridge-hub-common", + "ethabi-decode", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-core", + "snowbridge-outbound-queue-merkle-tree", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", +] + +[[package]] +name = "snowbridge-pallet-system" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6a410d9312bdcc3ba5944abb7d21f6b25065b32c7f8b39b9c7a4b0bd0dacfb4" +dependencies = [ + "ethabi-decode", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "snowbridge-core", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + +[[package]] +name = "snowbridge-router-primitives" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee5cc8e156f033971c5435676be92ab6f70a926b3497ca9c28c0dde9697b8da9" +dependencies = [ + "ethabi-decode", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-core", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + +[[package]] +name = "snowbridge-runtime-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d751007be1c9c68b075b0b1f9b02c25a02f458903a2c7893ba6e4231a00c24a" +dependencies = [ + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "snowbridge-core", + "sp-arithmetic 24.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.0", +] + +[[package]] +name = "snowbridge-system-runtime-api" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5c3c4e6e87b76ae1f9639bbc1528e1ae4e5a8d6a16d02d8d48e56d4a89f4ca" +dependencies = [ + "parity-scale-codec", + "snowbridge-core", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-std 14.0.0", + "staging-xcm 8.0.0", +] + +[[package]] +name = "socket2" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ @@ -12788,6 +13482,21 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "sp-arithmetic" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dec3290d64ec9994457abe974f82fe7260c9cc32e920e4cf20611346ca7464" +dependencies = [ + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-std 13.0.0", + "static_assertions", +] + [[package]] name = "sp-arithmetic" version = "24.0.0" @@ -13260,6 +13969,17 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "sp-debug-derive" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fd2c660c3e940df93f4920b183cc103443d66503f68189fa7e4b3f09996a18" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "sp-debug-derive" version = "14.0.0" @@ -13910,6 +14630,12 @@ version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54c78c5a66682568cc7b153603c5d01a2cc8f5c221c7b1e921517a0eef18ae05" +[[package]] +name = "sp-std" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71323a3b5f189085d11123ce397b3cdfaec4437071243b51f68a38a4833fbaa7" + [[package]] name = "sp-std" version = "14.0.0" @@ -14188,6 +14914,22 @@ dependencies = [ "sp-std 12.0.0", ] +[[package]] +name = "sp-weights" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8813a9942a3b900d5ce109875b91ff8ae7eb5849545ebb6464c22aa21e42622e" +dependencies = [ + "bounded-collections 0.1.9", + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic 22.0.0", + "sp-debug-derive 13.0.0", + "sp-std 13.0.0", +] + [[package]] name = "sp-weights" version = "28.0.0" @@ -14252,6 +14994,29 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "ssz_rs" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "057291e5631f280978fa9c8009390663ca4613359fc1318e36a8c24c392f6d1f" +dependencies = [ + "bitvec", + "num-bigint", + "sha2 0.9.9", + "ssz_rs_derive", +] + +[[package]] +name = "ssz_rs_derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f07d54c4d01a1713eb363b55ba51595da15f6f1211435b71466460da022aa140" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -14421,6 +15186,24 @@ dependencies = [ "xcm-procedural 4.0.0", ] +[[package]] +name = "staging-xcm" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "407cc6e4b9cd1b62df9270d921d94ed375e697d65a782975d5e5a5f85bbeafb5" +dependencies = [ + "bounded-collections 0.1.9", + "derivative", + "environmental", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-weights 26.0.0", + "xcm-procedural 6.0.0", +] + [[package]] name = "staging-xcm" version = "8.0.0" @@ -14749,6 +15532,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn-solidity" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b837ef12ab88835251726eb12237655e61ec8dc8a280085d1961cdc3dfd047" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "synstructure" version = "0.12.6" @@ -14794,6 +15589,7 @@ dependencies = [ "polkadot-runtime-constants", "smallvec", "sp-runtime 32.0.0", + "staging-xcm 6.0.0", ] [[package]] @@ -15420,6 +16216,12 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + [[package]] name = "uint" version = "0.9.5" @@ -15432,6 +16234,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + [[package]] name = "unicode-bidi" version = "0.3.14" @@ -15549,8 +16357,8 @@ dependencies = [ "ark-bls12-377", "ark-bls12-381", "ark-ec", - "ark-ff", - "ark-serialize", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", "ark-serialize-derive", "arrayref", "constcat", @@ -15564,6 +16372,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + [[package]] name = "walkdir" version = "2.4.0" @@ -16411,6 +17228,18 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "xcm-procedural" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37861444391815dfe05f3ee1039d19e7c82db319976832e8233729bd355de223" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "xcm-procedural" version = "8.0.0" diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index a15e0e9302..77971aaecc 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -701,7 +701,6 @@ construct_runtime!( // TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) // Temporary to migrate the remaining DMP messages: DmpQueue: cumulus_pallet_dmp_queue = 33, - MessageQueue: pallet_message_queue = 34, // Handy utilities. Utility: pallet_utility = 40, From 502808b35d0159ebe6f66e0945b4766f30038c46 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 19 Feb 2024 08:51:08 +0100 Subject: [PATCH 140/316] WIP: more XCMv4 --- .../emulated/common/src/macros.rs | 2 +- .../emulated/common/src/xcm_helpers.rs | 2 +- relay/kusama/src/lib.rs | 14 ++--- relay/kusama/src/weights/xcm/mod.rs | 2 +- relay/kusama/src/xcm_config.rs | 39 +++++++------ relay/polkadot/src/lib.rs | 14 ++--- relay/polkadot/src/weights/xcm/mod.rs | 2 +- relay/polkadot/src/xcm_config.rs | 56 +++++++++++-------- .../asset-hubs/asset-hub-kusama/src/lib.rs | 22 ++++---- .../asset-hub-kusama/src/xcm_config.rs | 14 ++--- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 22 ++++---- .../asset-hub-polkadot/src/xcm_config.rs | 15 +++-- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 14 ++--- .../bridge-hub-kusama/src/xcm_config.rs | 13 +++-- .../bridge-hub-polkadot/src/lib.rs | 14 ++--- .../bridge-hub-polkadot/src/xcm_config.rs | 13 +++-- .../collectives-polkadot/src/lib.rs | 4 +- .../collectives-polkadot/src/xcm_config.rs | 22 +++++--- system-parachains/encointer/src/lib.rs | 2 +- .../gluttons/glutton-kusama/src/xcm_config.rs | 2 +- 20 files changed, 158 insertions(+), 130 deletions(-) diff --git a/integration-tests/emulated/common/src/macros.rs b/integration-tests/emulated/common/src/macros.rs index 0818ab9872..c25ac9a0ef 100644 --- a/integration-tests/emulated/common/src/macros.rs +++ b/integration-tests/emulated/common/src/macros.rs @@ -184,7 +184,7 @@ macro_rules! include_penpal_create_foreign_asset_on_asset_hub { &Weight::from_parts(10_100_000_000_000, 300_000), ); let buy_execution_fee = Asset { - id: Concrete(Location { parents: 1, interior: Here }), + id: AssetId(Location { parents: 1, interior: Here }), fun: Fungible(buy_execution_fee_amount), }; let xcm = VersionedXcm::from(Xcm(vec![ diff --git a/integration-tests/emulated/common/src/xcm_helpers.rs b/integration-tests/emulated/common/src/xcm_helpers.rs index e503f6c64e..501ba502bd 100644 --- a/integration-tests/emulated/common/src/xcm_helpers.rs +++ b/integration-tests/emulated/common/src/xcm_helpers.rs @@ -61,7 +61,7 @@ pub fn xcm_transact_unpaid_execution( pub fn non_fee_asset(assets: &Assets, fee_idx: usize) -> Option<(Location, u128)> { let asset = assets.inner().into_iter().enumerate().find(|a| a.0 != fee_idx)?.1.clone(); let asset_id = match asset.id { - Concrete(id) => id, + AssetId(id) => id, _ => return None, }; let asset_amount = match asset.fun { diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index c9d9ecd307..9f39789823 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -2359,7 +2359,7 @@ sp_api::impl_runtime_apis! { fn teleportable_asset_and_dest() -> Option<(Asset, Location)> { // Relay/native token can be teleported to/from AH. Some(( - Asset { fun: Fungible(EXISTENTIAL_DEPOSIT), id: Concrete(Here.into()) }, + Asset { fun: Fungible(EXISTENTIAL_DEPOSIT), id: AssetId(Here.into()) }, crate::xcm_config::AssetHubLocation::get(), )) } @@ -2369,7 +2369,7 @@ sp_api::impl_runtime_apis! { Some(( Asset { fun: Fungible(EXISTENTIAL_DEPOSIT), - id: Concrete(Here.into()) + id: AssetId(Here.into()) }, crate::Junction::Parachain(43211234).into(), )) @@ -2414,7 +2414,7 @@ sp_api::impl_runtime_apis! { fn worst_case_holding(_depositable_count: u32) -> Assets { // Kusama only knows about KSM. vec![Asset{ - id: Concrete(TokenLocation::get()), + id: AssetId(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS), }].into() } @@ -2423,7 +2423,7 @@ sp_api::impl_runtime_apis! { parameter_types! { pub const TrustedTeleporter: Option<(Location, Asset)> = Some(( AssetHubLocation::get(), - Asset { fun: Fungible(1 * UNITS), id: Concrete(TokenLocation::get()) }, + Asset { fun: Fungible(1 * UNITS), id: AssetId(TokenLocation::get()) }, )); pub const TrustedReserve: Option<(Location, Asset)> = None; } @@ -2437,7 +2437,7 @@ sp_api::impl_runtime_apis! { fn get_multi_asset() -> Asset { Asset { - id: Concrete(TokenLocation::get()), + id: AssetId(TokenLocation::get()), fun: Fungible(1 * UNITS), } } @@ -2471,14 +2471,14 @@ sp_api::impl_runtime_apis! { fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError> { let origin = AssetHubLocation::get(); - let assets: Assets = (Concrete(TokenLocation::get()), 1_000 * UNITS).into(); + let assets: Assets = (AssetId(TokenLocation::get()), 1_000 * UNITS).into(); let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } fn fee_asset() -> Result { Ok(Asset { - id: Concrete(TokenLocation::get()), + id: AssetId(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS), }) } diff --git a/relay/kusama/src/weights/xcm/mod.rs b/relay/kusama/src/weights/xcm/mod.rs index 0aa0728f54..321e1eac27 100644 --- a/relay/kusama/src/weights/xcm/mod.rs +++ b/relay/kusama/src/weights/xcm/mod.rs @@ -36,7 +36,7 @@ pub enum AssetTypes { impl From<&Asset> for AssetTypes { fn from(asset: &Asset) -> Self { match asset { - Asset { id: Concrete(Location { parents: 0, interior: Here }), .. } => + Asset { id: AssetId(Location { parents: 0, interior: Here }), .. } => AssetTypes::Balances, _ => AssetTypes::Unknown, } diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index d464ef68bd..3f8d81603f 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -22,8 +22,8 @@ use super::{ WeightToFee, XcmPallet, }; use frame_support::{ - match_types, parameter_types, - traits::{Equals, Everything, Nothing}, + parameter_types, + traits::{Contains, Equals, Everything, Nothing}, weights::Weight, }; use frame_system::EnsureRoot; @@ -110,7 +110,7 @@ parameter_types! { /// calculations getting too crazy. pub const MaxInstructions: u32 = 100; /// The asset ID for the asset that we use to pay for message delivery fees. - pub FeeAssetId: AssetId = Concrete(TokenLocation::get()); + pub FeeAssetId: AssetId = AssetId(TokenLocation::get()); /// The base fee for the message delivery fees. pub const BaseDeliveryFee: u128 = CENTS.saturating_mul(3); } @@ -126,13 +126,13 @@ pub type XcmRouter = WithUniqueTopic<( )>; parameter_types! { - pub const Ksm: AssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) }); - pub const AssetHubLocation: Location = Parachain(ASSET_HUB_ID).into_location(); - pub const KsmForAssetHub: (AssetFilter, Location) = (Ksm::get(), AssetHubLocation::get()); - pub const Encointer: Location = Parachain(ENCOINTER_ID).into_location(); - pub const KsmForEncointer: (AssetFilter, Location) = (Ksm::get(), Encointer::get()); - pub const BridgeHubLocation: Location = Parachain(BRIDGE_HUB_ID).into_location(); - pub const KsmForBridgeHub: (AssetFilter, Location) = (Ksm::get(), BridgeHubLocation::get()); + pub const Ksm: AssetFilter = Wild(AllOf { fun: WildFungible, id: AssetId(TokenLocation::get()) }); + pub AssetHubLocation: Location = Parachain(ASSET_HUB_ID).into_location(); + pub KsmForAssetHub: (AssetFilter, Location) = (Ksm::get(), AssetHubLocation::get()); + pub Encointer: Location = Parachain(ENCOINTER_ID).into_location(); + pub KsmForEncointer: (AssetFilter, Location) = (Ksm::get(), Encointer::get()); + pub BridgeHubLocation: Location = Parachain(BRIDGE_HUB_ID).into_location(); + pub KsmForBridgeHub: (AssetFilter, Location) = (Ksm::get(), BridgeHubLocation::get()); pub const MaxAssetsIntoHolding: u32 = 64; } @@ -143,13 +143,18 @@ pub type TrustedTeleporters = ( xcm_builder::Case, ); -match_types! { - pub type OnlyParachains: impl Contains = { - Location { parents: 0, interior: X1(Parachain(_)) } - }; - pub type LocalPlurality: impl Contains = { - Location { parents: 0, interior: X1(Plurality { .. }) } - }; +pub struct OnlyParachains; +impl Contains for OnlyParachains { + fn contains(loc: &Location) -> bool { + matches!(loc.unpack(), (0, [Parachain(_)])) + } +} + +pub struct LocalPlurality; +impl Contains for LocalPlurality { + fn contains(loc: &Location) -> bool { + matches!(loc.unpack(), (0, [Plurality { .. }])) + } } /// The barriers one of which must be passed for an XCM message to be executed. diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index d2a445f27a..0dee1a4c14 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -2362,7 +2362,7 @@ sp_api::impl_runtime_apis! { fn teleportable_asset_and_dest() -> Option<(Asset, Location)> { // Relay/native token can be teleported to/from AH. Some(( - Asset { fun: Fungible(EXISTENTIAL_DEPOSIT), id: Concrete(Here.into()) }, + Asset { fun: Fungible(EXISTENTIAL_DEPOSIT), id: AssetId(Here.into()) }, crate::xcm_config::AssetHubLocation::get(), )) } @@ -2372,7 +2372,7 @@ sp_api::impl_runtime_apis! { Some(( Asset { fun: Fungible(EXISTENTIAL_DEPOSIT), - id: Concrete(Here.into()) + id: AssetId(Here.into()) }, crate::Junction::Parachain(43211234).into(), )) @@ -2416,14 +2416,14 @@ sp_api::impl_runtime_apis! { } fn worst_case_holding(_depositable_count: u32) -> Assets { // Polkadot only knows about DOT - vec![Asset { id: Concrete(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS) }].into() + vec![Asset { id: AssetId(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS) }].into() } } parameter_types! { pub const TrustedTeleporter: Option<(Location, Asset)> = Some(( AssetHubLocation::get(), - Asset { id: Concrete(TokenLocation::get()), fun: Fungible(1 * UNITS) } + Asset { id: AssetId(TokenLocation::get()), fun: Fungible(1 * UNITS) } )); pub const TrustedReserve: Option<(Location, Asset)> = None; } @@ -2437,7 +2437,7 @@ sp_api::impl_runtime_apis! { fn get_multi_asset() -> Asset { Asset { - id: Concrete(TokenLocation::get()), + id: AssetId(TokenLocation::get()), fun: Fungible(1 * UNITS) } } @@ -2471,14 +2471,14 @@ sp_api::impl_runtime_apis! { fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError> { let origin = AssetHubLocation::get(); - let assets: Assets = (Concrete(TokenLocation::get()), 1_000 * UNITS).into(); + let assets: Assets = (AssetId(TokenLocation::get()), 1_000 * UNITS).into(); let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } fn fee_asset() -> Result { Ok(Asset { - id: Concrete(TokenLocation::get()), + id: AssetId(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS), }) } diff --git a/relay/polkadot/src/weights/xcm/mod.rs b/relay/polkadot/src/weights/xcm/mod.rs index 0c60276c04..2aff001c59 100644 --- a/relay/polkadot/src/weights/xcm/mod.rs +++ b/relay/polkadot/src/weights/xcm/mod.rs @@ -36,7 +36,7 @@ pub enum AssetTypes { impl From<&Asset> for AssetTypes { fn from(asset: &Asset) -> Self { match asset { - Asset { id: Concrete(Location { parents: 0, interior: Here }), .. } => + Asset { id: AssetId(Location { parents: 0, interior: Here }), .. } => AssetTypes::Balances, _ => AssetTypes::Unknown, } diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index 11a95bfe3d..b9e55fab20 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -22,8 +22,8 @@ use super::{ TransactionByteFee, Treasurer, Treasury, WeightToFee, XcmPallet, }; use frame_support::{ - match_types, parameter_types, - traits::{Equals, Everything, Nothing}, + parameter_types, + traits::{Contains, Equals, Everything, Nothing}, weights::Weight, }; use frame_system::EnsureRoot; @@ -58,7 +58,7 @@ parameter_types! { /// The Polkadot network ID. This is named. pub const ThisNetwork: NetworkId = NetworkId::Polkadot; /// Our location in the universe of consensus systems. - pub const UniversalLocation: InteriorLocation = X1(GlobalConsensus(ThisNetwork::get())); + pub UniversalLocation: InteriorLocation = [GlobalConsensus(ThisNetwork::get())].into(); /// The Checking Account, which holds any native assets that have been teleported out and not back in (yet). pub CheckAccount: AccountId = XcmPallet::check_account(); /// The Checking Account along with the indication that the local chain is able to mint tokens. @@ -119,7 +119,7 @@ parameter_types! { /// calculations getting too crazy. pub const MaxInstructions: u32 = 100; /// The asset ID for the asset that we use to pay for message delivery fees. - pub FeeAssetId: AssetId = Concrete(TokenLocation::get()); + pub FeeAssetId: AssetId = AssetId(TokenLocation::get()); /// The base fee for the message delivery fees. pub const BaseDeliveryFee: u128 = CENTS.saturating_mul(3); } @@ -135,13 +135,13 @@ pub type XcmRouter = WithUniqueTopic<( )>; parameter_types! { - pub const Dot: AssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) }); - pub const AssetHubLocation: Location = Parachain(ASSET_HUB_ID).into_location(); - pub const DotForAssetHub: (AssetFilter, Location) = (Dot::get(), AssetHubLocation::get()); - pub const CollectivesLocation: Location = Parachain(COLLECTIVES_ID).into_location(); - pub const DotForCollectives: (AssetFilter, Location) = (Dot::get(), CollectivesLocation::get()); - pub const BridgeHubLocation: Location = Parachain(BRIDGE_HUB_ID).into_location(); - pub const DotForBridgeHub: (AssetFilter, Location) = (Dot::get(), BridgeHubLocation::get()); + pub const Dot: AssetFilter = Wild(AllOf { fun: WildFungible, id: AssetId(TokenLocation::get()) }); + pub AssetHubLocation: Location = Parachain(ASSET_HUB_ID).into_location(); + pub DotForAssetHub: (AssetFilter, Location) = (Dot::get(), AssetHubLocation::get()); + pub CollectivesLocation: Location = Parachain(COLLECTIVES_ID).into_location(); + pub DotForCollectives: (AssetFilter, Location) = (Dot::get(), CollectivesLocation::get()); + pub BridgeHubLocation: Location = Parachain(BRIDGE_HUB_ID).into_location(); + pub DotForBridgeHub: (AssetFilter, Location) = (Dot::get(), BridgeHubLocation::get()); pub const MaxAssetsIntoHolding: u32 = 64; } @@ -152,17 +152,29 @@ pub type TrustedTeleporters = ( xcm_builder::Case, ); -match_types! { - pub type OnlyParachains: impl Contains = { - Location { parents: 0, interior: X1(Parachain(_)) } - }; - pub type CollectivesOrFellows: impl Contains = { - Location { parents: 0, interior: X1(Parachain(COLLECTIVES_ID)) } | - Location { parents: 0, interior: X2(Parachain(COLLECTIVES_ID), Plurality { id: BodyId::Technical, .. }) } - }; - pub type LocalPlurality: impl Contains = { - Location { parents: 0, interior: X1(Plurality { .. }) } - }; +pub struct CollectivesOrFellows; +impl Contains for CollectivesOrFellows { + fn contains(loc: &Location) -> bool { + matches!( + loc.unpack(), + (0, [Parachain(COLLECTIVES_ID)]) | + (0, [Parachain(COLLECTIVES_ID), Plurality { id: BodyId::Technical, .. }]) + ) + } +} + +pub struct OnlyParachains; +impl Contains for OnlyParachains { + fn contains(loc: &Location) -> bool { + matches!(loc.unpack(), (0, [Parachain(_)])) + } +} + +pub struct LocalPlurality; +impl Contains for LocalPlurality { + fn contains(loc: &Location) -> bool { + matches!(loc.unpack(), (0, [Plurality { .. }])) + } } /// The barriers one of which must be passed for an XCM message to be executed. diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 52bb87c7de..288f0e5e42 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -670,7 +670,7 @@ parameter_types! { // Fellows pluralistic body. pub const FellowsBodyId: BodyId = BodyId::Technical; /// The asset ID for the asset that we use to pay for message delivery fees. - pub FeeAssetId: AssetId = Concrete(xcm_config::KsmLocation::get()); + pub FeeAssetId: AssetId = AssetId(xcm_config::KsmLocation::get()); /// The base fee for the message delivery fees. pub const ToSiblingBaseDeliveryFee: u128 = CENTS.saturating_mul(3); pub const ToParentBaseDeliveryFee: u128 = CENTS.saturating_mul(3); @@ -1329,7 +1329,7 @@ impl_runtime_apis! { Some(( Asset { fun: Fungible(ExistentialDeposit::get()), - id: Concrete(Parent.into()) + id: AssetId(Parent.into()) }, Parent.into(), )) @@ -1344,7 +1344,7 @@ impl_runtime_apis! { Some(( Asset { fun: Fungible(ExistentialDeposit::get()), - id: Concrete(Parent.into()) + id: AssetId(Parent.into()) }, ParentThen(Parachain(random_para_id).into()).into(), )) @@ -1426,19 +1426,19 @@ impl_runtime_apis! { let mut assets = (0..holding_fungibles) .map(|i| { Asset { - id: Concrete(GeneralIndex(i as u128).into()), + id: AssetId(GeneralIndex(i as u128).into()), fun: Fungible(fungibles_amount * i as u128), } }) - .chain(core::iter::once(Asset { id: Concrete(Here.into()), fun: Fungible(u128::MAX) })) + .chain(core::iter::once(Asset { id: AssetId(Here.into()), fun: Fungible(u128::MAX) })) .chain((0..holding_non_fungibles).map(|i| Asset { - id: Concrete(GeneralIndex(i as u128).into()), + id: AssetId(GeneralIndex(i as u128).into()), fun: NonFungible(asset_instance_from(i)), })) .collect::>(); assets.push(Asset { - id: Concrete(KsmLocation::get()), + id: AssetId(KsmLocation::get()), fun: Fungible(1_000_000 * UNITS), }); assets.into() @@ -1448,7 +1448,7 @@ impl_runtime_apis! { parameter_types! { pub const TrustedTeleporter: Option<(Location, Asset)> = Some(( KsmLocation::get(), - Asset { fun: Fungible(UNITS), id: Concrete(KsmLocation::get()) }, + Asset { fun: Fungible(UNITS), id: AssetId(KsmLocation::get()) }, )); pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; // AssetHubKusama trusts AssetHubPolkadot as reserve for DOTs @@ -1469,7 +1469,7 @@ impl_runtime_apis! { fn get_multi_asset() -> Asset { Asset { - id: Concrete(KsmLocation::get()), + id: AssetId(KsmLocation::get()), fun: Fungible(UNITS), } } @@ -1502,14 +1502,14 @@ impl_runtime_apis! { fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError> { let origin = KsmLocation::get(); - let assets: Assets = (Concrete(KsmLocation::get()), 1_000 * UNITS).into(); + let assets: Assets = (AssetId(KsmLocation::get()), 1_000 * UNITS).into(); let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } fn fee_asset() -> Result { Ok(Asset { - id: Concrete(KsmLocation::get()), + id: AssetId(KsmLocation::get()), fun: Fungible(1_000_000 * UNITS), }) } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index d42df29fd5..9602a6b41c 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -56,7 +56,7 @@ parameter_types! { pub const RelayNetwork: Option = Some(NetworkId::Kusama); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorLocation = - X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())); + [GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())].into(); pub UniversalLocationNetworkId: NetworkId = UniversalLocation::get().global_consensus().unwrap(); pub AssetsPalletIndex: u32 = ::index() as u32; pub TrustBackedAssetsPalletLocation: Location = PalletInstance(AssetsPalletIndex::get() as u8).into(); @@ -209,11 +209,11 @@ parameter_types! { pub XcmAssetFeesReceiver: Option = Authorship::author(); } -match_types! { - pub type ParentOrParentsPlurality: impl Contains = { - Location { parents: 1, interior: Here } | - Location { parents: 1, interior: X1(Plurality { .. }) } - }; +pub struct ParentOrParentsPlurality; +impl Contains for ParentOrParentsPlurality { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, []) | (1, [Plurality { .. }])) + } } /// A call filter for the XCM Transact instruction. This is a temporary measure until we properly @@ -699,7 +699,7 @@ pub mod bridging { pub DotLocation: Location = Location::new(2, X1(GlobalConsensus(PolkadotNetwork::get()))); pub DotFromAssetHubPolkadot: (AssetFilter, Location) = ( - Wild(AllOf { fun: WildFungible, id: Concrete(DotLocation::get()) }), + Wild(AllOf { fun: WildFungible, id: AssetId(DotLocation::get()) }), AssetHubPolkadot::get() ); diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 72b69e3b50..8c59c5e9bb 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -601,7 +601,7 @@ parameter_types! { // Fellows pluralistic body. pub const FellowsBodyId: BodyId = BodyId::Technical; /// The asset ID for the asset that we use to pay for message delivery fees. - pub FeeAssetId: AssetId = Concrete(xcm_config::DotLocation::get()); + pub FeeAssetId: AssetId = AssetId(xcm_config::DotLocation::get()); /// The base fee for the message delivery fees. pub const ToSiblingBaseDeliveryFee: u128 = CENTS.saturating_mul(3); pub const ToParentBaseDeliveryFee: u128 = CENTS.saturating_mul(3); @@ -1210,7 +1210,7 @@ impl_runtime_apis! { Some(( Asset { fun: Fungible(ExistentialDeposit::get()), - id: Concrete(Parent.into()) + id: AssetId(Parent.into()) }, Parent.into(), )) @@ -1225,7 +1225,7 @@ impl_runtime_apis! { Some(( Asset { fun: Fungible(ExistentialDeposit::get()), - id: Concrete(Parent.into()) + id: AssetId(Parent.into()) }, ParentThen(Parachain(random_para_id).into()).into(), )) @@ -1307,19 +1307,19 @@ impl_runtime_apis! { let mut assets = (0..holding_fungibles) .map(|i| { Asset { - id: Concrete(GeneralIndex(i as u128).into()), + id: AssetId(GeneralIndex(i as u128).into()), fun: Fungible(fungibles_amount * i as u128), } }) - .chain(core::iter::once(Asset { id: Concrete(Here.into()), fun: Fungible(u128::MAX) })) + .chain(core::iter::once(Asset { id: AssetId(Here.into()), fun: Fungible(u128::MAX) })) .chain((0..holding_non_fungibles).map(|i| Asset { - id: Concrete(GeneralIndex(i as u128).into()), + id: AssetId(GeneralIndex(i as u128).into()), fun: NonFungible(asset_instance_from(i)), })) .collect::>(); assets.push(Asset { - id: Concrete(DotLocation::get()), + id: AssetId(DotLocation::get()), fun: Fungible(1_000_000 * UNITS), }); assets.into() @@ -1329,7 +1329,7 @@ impl_runtime_apis! { parameter_types! { pub const TrustedTeleporter: Option<(Location, Asset)> = Some(( DotLocation::get(), - Asset { fun: Fungible(UNITS), id: Concrete(DotLocation::get()) }, + Asset { fun: Fungible(UNITS), id: AssetId(DotLocation::get()) }, )); pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; // AssetHubPolkadot trusts AssetHubKusama as reserve for KSMs @@ -1350,7 +1350,7 @@ impl_runtime_apis! { fn get_multi_asset() -> Asset { Asset { - id: Concrete(DotLocation::get()), + id: AssetId(DotLocation::get()), fun: Fungible(UNITS), } } @@ -1383,14 +1383,14 @@ impl_runtime_apis! { fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError> { let origin = DotLocation::get(); - let assets: Assets = (Concrete(DotLocation::get()), 1_000 * UNITS).into(); + let assets: Assets = (AssetId(DotLocation::get()), 1_000 * UNITS).into(); let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } fn fee_asset() -> Result { Ok(Asset { - id: Concrete(DotLocation::get()), + id: AssetId(DotLocation::get()), fun: Fungible(1_000_000 * UNITS), }) } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 621cdddc67..9b880af5f8 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -56,7 +56,7 @@ parameter_types! { pub const RelayNetwork: Option = Some(NetworkId::Polkadot); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorLocation = - X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())); + [GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())].into(); pub UniversalLocationNetworkId: NetworkId = UniversalLocation::get().global_consensus().unwrap(); pub TrustBackedAssetsPalletLocation: Location = PalletInstance(::index() as u8).into(); @@ -184,10 +184,6 @@ parameter_types! { } match_types! { - pub type ParentOrParentsPlurality: impl Contains = { - Location { parents: 1, interior: Here } | - Location { parents: 1, interior: X1(Plurality { .. }) } - }; pub type FellowshipEntities: impl Contains = { // Fellowship Plurality Location { parents: 1, interior: X2(Parachain(1001), Plurality { id: BodyId::Technical, ..}) } | @@ -198,6 +194,13 @@ match_types! { }; } +pub struct ParentOrParentsPlurality; +impl Contains for ParentOrParentsPlurality { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, []) | (1, [Plurality { .. }])) + } +} + /// A call filter for the XCM Transact instruction. This is a temporary measure until we properly /// account for proof size weights. /// @@ -643,7 +646,7 @@ pub mod bridging { pub KsmLocation: Location = Location::new(2, X1(GlobalConsensus(KusamaNetwork::get()))); pub KsmFromAssetHubKusama: (AssetFilter, Location) = ( - Wild(AllOf { fun: WildFungible, id: Concrete(KsmLocation::get()) }), + Wild(AllOf { fun: WildFungible, id: AssetId(KsmLocation::get()) }), AssetHubKusama::get() ); diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 04fd2936de..0c00a5840e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -345,7 +345,7 @@ parameter_types! { // Fellows pluralistic body. pub const FellowsBodyId: BodyId = BodyId::Technical; /// The asset ID for the asset that we use to pay for message delivery fees. - pub FeeAssetId: AssetId = Concrete(xcm_config::KsmRelayLocation::get()); + pub FeeAssetId: AssetId = AssetId(xcm_config::KsmRelayLocation::get()); /// The base fee for the message delivery fees. pub const ToSiblingBaseDeliveryFee: u128 = CENTS.saturating_mul(3); pub const ToParentBaseDeliveryFee: u128 = CENTS.saturating_mul(3); @@ -827,7 +827,7 @@ impl_runtime_apis! { Some(( Asset { fun: Fungible(ExistentialDeposit::get()), - id: Concrete(Parent.into()) + id: AssetId(Parent.into()) }, Parent.into(), )) @@ -873,7 +873,7 @@ impl_runtime_apis! { // just concrete assets according to relay chain. let assets: Vec = vec![ Asset { - id: Concrete(KsmRelayLocation::get()), + id: AssetId(KsmRelayLocation::get()), fun: Fungible(1_000_000 * UNITS), } ]; @@ -884,7 +884,7 @@ impl_runtime_apis! { parameter_types! { pub const TrustedTeleporter: Option<(Location, Asset)> = Some(( KsmRelayLocation::get(), - Asset { fun: Fungible(UNITS), id: Concrete(KsmRelayLocation::get()) }, + Asset { fun: Fungible(UNITS), id: AssetId(KsmRelayLocation::get()) }, )); pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; pub const TrustedReserve: Option<(Location, Asset)> = None; @@ -899,7 +899,7 @@ impl_runtime_apis! { fn get_multi_asset() -> Asset { Asset { - id: Concrete(KsmRelayLocation::get()), + id: AssetId(KsmRelayLocation::get()), fun: Fungible(UNITS), } } @@ -931,14 +931,14 @@ impl_runtime_apis! { fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError> { let origin = KsmRelayLocation::get(); - let assets: Assets = (Concrete(KsmRelayLocation::get()), 1_000 * UNITS).into(); + let assets: Assets = (AssetId(KsmRelayLocation::get()), 1_000 * UNITS).into(); let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } fn fee_asset() -> Result { Ok(Asset { - id: Concrete(KsmRelayLocation::get()), + id: AssetId(KsmRelayLocation::get()), fun: Fungible(1_000_000 * UNITS), }) } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index eb16e8572d..bb14daa8b2 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -56,7 +56,7 @@ 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(ParachainInfo::parachain_id().into())); + [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())].into(); pub const MaxInstructions: u32 = 100; pub const MaxAssetsIntoHolding: u32 = 64; pub const GovernanceLocation: Location = Location::parent(); @@ -117,12 +117,13 @@ pub type XcmOriginToTransactDispatchOrigin = ( XcmPassthrough, ); -match_types! { - pub type ParentOrParentsPlurality: impl Contains = { - Location { parents: 1, interior: Here } | - Location { parents: 1, interior: X1(Plurality { .. }) } - }; +pub struct ParentOrParentsPlurality; +impl Contains for ParentOrParentsPlurality { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, []) | (1, [Plurality { .. }])) + } } + /// A call filter for the XCM Transact instruction. This is a temporary measure until we properly /// account for proof size weights. /// diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index dc448c413c..127aaae5ea 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -345,7 +345,7 @@ parameter_types! { // Fellows pluralistic body. pub const FellowsBodyId: BodyId = BodyId::Technical; /// The asset ID for the asset that we use to pay for message delivery fees. - pub FeeAssetId: AssetId = Concrete(xcm_config::DotRelayLocation::get()); + pub FeeAssetId: AssetId = AssetId(xcm_config::DotRelayLocation::get()); /// The base fee for the message delivery fees. pub const ToSiblingBaseDeliveryFee: u128 = CENTS.saturating_mul(3); pub const ToParentBaseDeliveryFee: u128 = CENTS.saturating_mul(3); @@ -827,7 +827,7 @@ impl_runtime_apis! { Some(( Asset { fun: Fungible(ExistentialDeposit::get()), - id: Concrete(Parent.into()) + id: AssetId(Parent.into()) }, Parent.into(), )) @@ -873,7 +873,7 @@ impl_runtime_apis! { // just concrete assets according to relay chain. let assets: Vec = vec![ Asset { - id: Concrete(DotRelayLocation::get()), + id: AssetId(DotRelayLocation::get()), fun: Fungible(1_000_000 * UNITS), } ]; @@ -884,7 +884,7 @@ impl_runtime_apis! { parameter_types! { pub const TrustedTeleporter: Option<(Location, Asset)> = Some(( DotRelayLocation::get(), - Asset { fun: Fungible(UNITS), id: Concrete(DotRelayLocation::get()) }, + Asset { fun: Fungible(UNITS), id: AssetId(DotRelayLocation::get()) }, )); pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; pub const TrustedReserve: Option<(Location, Asset)> = None; @@ -899,7 +899,7 @@ impl_runtime_apis! { fn get_multi_asset() -> Asset { Asset { - id: Concrete(DotRelayLocation::get()), + id: AssetId(DotRelayLocation::get()), fun: Fungible(UNITS), } } @@ -931,14 +931,14 @@ impl_runtime_apis! { fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError> { let origin = DotRelayLocation::get(); - let assets: Assets = (Concrete(DotRelayLocation::get()), 1_000 * UNITS).into(); + let assets: Assets = (AssetId(DotRelayLocation::get()), 1_000 * UNITS).into(); let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } fn fee_asset() -> Result { Ok(Asset { - id: Concrete(DotRelayLocation::get()), + id: AssetId(DotRelayLocation::get()), fun: Fungible(1_000_000 * UNITS), }) } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index d9f4534853..aef5094889 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -56,7 +56,7 @@ 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(ParachainInfo::parachain_id().into())); + [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())].into(); pub const MaxInstructions: u32 = 100; pub const MaxAssetsIntoHolding: u32 = 64; pub FellowshipLocation: Location = Location::new(1, Parachain(1001)); @@ -117,11 +117,14 @@ pub type XcmOriginToTransactDispatchOrigin = ( XcmPassthrough, ); +pub struct ParentOrParentsPlurality; +impl Contains for ParentOrParentsPlurality { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, []) | (1, [Plurality { .. }])) + } +} + match_types! { - pub type ParentOrParentsPlurality: impl Contains = { - Location { parents: 1, interior: Here } | - Location { parents: 1, interior: X1(Plurality { .. }) } - }; pub type FellowsPlurality: impl Contains = { Location { parents: 1, interior: X2(Parachain(1001), Plurality { id: BodyId::Technical, ..}) } }; diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index d14287a05f..4998e602ef 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -417,7 +417,7 @@ impl cumulus_pallet_aura_ext::Config for Runtime {} parameter_types! { /// The asset ID for the asset that we use to pay for message delivery fees. - pub FeeAssetId: AssetId = Concrete(xcm_config::DotLocation::get()); + pub FeeAssetId: AssetId = AssetId(xcm_config::DotLocation::get()); /// The base fee for the message delivery fees. pub const ToSiblingBaseDeliveryFee: u128 = CENTS.saturating_mul(3); pub const ToParentBaseDeliveryFee: u128 = CENTS.saturating_mul(3); @@ -984,7 +984,7 @@ impl_runtime_apis! { Some(( Asset { fun: Fungible(ExistentialDeposit::get()), - id: Concrete(Parent.into()) + id: AssetId(Parent.into()) }.into(), Parent.into(), )) diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 03732972f2..a1a8cb89da 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -56,7 +56,7 @@ parameter_types! { pub const RelayNetwork: Option = Some(NetworkId::Polkadot); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorLocation = - X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())); + [GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())].into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); pub const GovernanceLocation: Location = Location::parent(); pub RelayTreasuryLocation: Location = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); @@ -130,14 +130,18 @@ parameter_types! { pub const FellowsBodyId: BodyId = BodyId::Technical; } -match_types! { - pub type ParentOrParentsPlurality: impl Contains = { - Location { parents: 1, interior: Here } | - Location { parents: 1, interior: X1(Plurality { .. }) } - }; - pub type LocalPlurality: impl Contains = { - Location { parents: 0, interior: X1(Plurality { .. }) } - }; +pub struct ParentOrParentsPlurality; +impl Contains for ParentOrParentsPlurality { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, []) | (1, [Plurality { .. }])) + } +} + +pub struct LocalPlurality; +impl Contains for LocalPlurality { + fn contains(loc: &Location) -> bool { + matches!(loc.unpack(), (0, [Plurality { .. }])) + } } /// A call filter for the XCM Transact instruction. This is a temporary measure until we properly diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index ff010a8fb5..798669e9b4 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -439,7 +439,7 @@ impl cumulus_pallet_aura_ext::Config for Runtime {} parameter_types! { pub const ExecutiveBody: BodyId = BodyId::Executive; /// The asset ID for the asset that we use to pay for message delivery fees. - pub FeeAssetId: XcmAssetId = XcmAssetId::Concrete(xcm_config::KsmLocation::get()); + pub FeeAssetId: XcmAssetId = XcmAssetId::AssetId(xcm_config::KsmLocation::get()); /// The base fee for the message delivery fees. pub const ToSiblingBaseDeliveryFee: u128 = CENTS.saturating_mul(3); pub const ToParentBaseDeliveryFee: u128 = CENTS.saturating_mul(3); diff --git a/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs b/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs index 5c179faa3a..d79f1b98a5 100644 --- a/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs +++ b/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs @@ -31,7 +31,7 @@ use xcm_builder::{ parameter_types! { pub const KusamaLocation: Location = Location::parent(); pub const KusamaNetwork: Option = Some(NetworkId::Kusama); - pub UniversalLocation: InteriorLocation = X1(Parachain(ParachainInfo::parachain_id().into())); + pub UniversalLocation: InteriorLocation = [Parachain(ParachainInfo::parachain_id().into())].into(); } /// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, From 23c200b4816c66c746dc9f7bf5e7a006f2549af7 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 19 Feb 2024 10:10:10 +0200 Subject: [PATCH 141/316] fixes --- Cargo.lock | 80 +------------------ .../asset-hub-kusama/src/xcm_config.rs | 13 --- .../asset-hub-polkadot/src/xcm_config.rs | 13 --- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 1 - .../bridge-hub-kusama/src/xcm_config.rs | 6 +- .../bridge-hub-polkadot/src/xcm_config.rs | 6 +- system-parachains/constants/Cargo.toml | 2 +- 7 files changed, 8 insertions(+), 113 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 31b7460132..66dc87fa9d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13482,21 +13482,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "sp-arithmetic" -version = "22.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56dec3290d64ec9994457abe974f82fe7260c9cc32e920e4cf20611346ca7464" -dependencies = [ - "integer-sqrt", - "num-traits", - "parity-scale-codec", - "scale-info", - "serde", - "sp-std 13.0.0", - "static_assertions", -] - [[package]] name = "sp-arithmetic" version = "24.0.0" @@ -13969,17 +13954,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "sp-debug-derive" -version = "13.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fd2c660c3e940df93f4920b183cc103443d66503f68189fa7e4b3f09996a18" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "sp-debug-derive" version = "14.0.0" @@ -14630,12 +14604,6 @@ version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54c78c5a66682568cc7b153603c5d01a2cc8f5c221c7b1e921517a0eef18ae05" -[[package]] -name = "sp-std" -version = "13.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71323a3b5f189085d11123ce397b3cdfaec4437071243b51f68a38a4833fbaa7" - [[package]] name = "sp-std" version = "14.0.0" @@ -14914,22 +14882,6 @@ dependencies = [ "sp-std 12.0.0", ] -[[package]] -name = "sp-weights" -version = "26.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8813a9942a3b900d5ce109875b91ff8ae7eb5849545ebb6464c22aa21e42622e" -dependencies = [ - "bounded-collections 0.1.9", - "parity-scale-codec", - "scale-info", - "serde", - "smallvec", - "sp-arithmetic 22.0.0", - "sp-debug-derive 13.0.0", - "sp-std 13.0.0", -] - [[package]] name = "sp-weights" version = "28.0.0" @@ -15186,24 +15138,6 @@ dependencies = [ "xcm-procedural 4.0.0", ] -[[package]] -name = "staging-xcm" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "407cc6e4b9cd1b62df9270d921d94ed375e697d65a782975d5e5a5f85bbeafb5" -dependencies = [ - "bounded-collections 0.1.9", - "derivative", - "environmental", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-weights 26.0.0", - "xcm-procedural 6.0.0", -] - [[package]] name = "staging-xcm" version = "8.0.0" @@ -15589,7 +15523,7 @@ dependencies = [ "polkadot-runtime-constants", "smallvec", "sp-runtime 32.0.0", - "staging-xcm 6.0.0", + "staging-xcm 8.0.0", ] [[package]] @@ -17228,18 +17162,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "xcm-procedural" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37861444391815dfe05f3ee1039d19e7c82db319976832e8233729bd355de223" -dependencies = [ - "Inflector", - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "xcm-procedural" version = "8.0.0" diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index f0491d772b..6ed4ff3300 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -555,19 +555,6 @@ impl xcm_executor::Config for XcmConfig { XcmAssetFeesReceiver, >, >, - // This trader allows to pay with `is_sufficient=true` "Foreign" assets from dedicated - // `pallet_assets` instance - `ForeignAssets`. - cumulus_primitives_utility::TakeFirstAssetTrader< - AccountId, - ForeignAssetFeeAsExistentialDepositMultiplierFeeCharger, - ForeignAssetsConvertedConcreteId, - ForeignAssets, - cumulus_primitives_utility::XcmFeesTo32ByteAccount< - ForeignFungiblesTransactor, - AccountId, - XcmAssetFeesReceiver, - >, - >, ); type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 2ef87bf3ef..ec19391c84 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -499,19 +499,6 @@ impl xcm_executor::Config for XcmConfig { XcmAssetFeesReceiver, >, >, - // This trader allows to pay with `is_sufficient=true` "Foreign" assets from dedicated - // `pallet_assets` instance - `ForeignAssets`. - cumulus_primitives_utility::TakeFirstAssetTrader< - AccountId, - ForeignAssetFeeAsExistentialDepositMultiplierFeeCharger, - ForeignAssetsConvertedConcreteId, - ForeignAssets, - cumulus_primitives_utility::XcmFeesTo32ByteAccount< - ForeignFungiblesTransactor, - AccountId, - XcmAssetFeesReceiver, - >, - >, ); type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 101bcc2099..e0860fc82a 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -698,7 +698,6 @@ construct_runtime!( // TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) // Temporary to migrate the remaining DMP messages: DmpQueue: cumulus_pallet_dmp_queue = 33, - MessageQueue: pallet_message_queue = 34, // Handy utilities. Utility: pallet_utility = 40, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index c190b2744c..2d81470e55 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -366,10 +366,10 @@ impl cumulus_pallet_xcm::Config for Runtime { pub struct XcmFeeManagerFromComponentsBridgeHub( PhantomData<(WaivedLocations, HandleFee)>, ); -impl, FeeHandler: HandleFee> FeeManager +impl, FeeHandler: HandleFee> FeeManager for XcmFeeManagerFromComponentsBridgeHub { - fn is_waived(origin: Option<&MultiLocation>, fee_reason: FeeReason) -> bool { + fn is_waived(origin: Option<&Location>, fee_reason: FeeReason) -> bool { let Some(loc) = origin else { return false }; if let Export { network, destination: Here } = fee_reason { return !(network == EthereumNetwork::get()) @@ -377,7 +377,7 @@ impl, FeeHandler: HandleFee> FeeManager WaivedLocations::contains(loc) } - fn handle_fee(fee: MultiAssets, context: Option<&XcmContext>, reason: FeeReason) { + fn handle_fee(fee: Assets, context: Option<&XcmContext>, reason: FeeReason) { FeeHandler::handle_fee(fee, context, reason); } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index a1abdd8ebe..1a86eaccfb 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -371,10 +371,10 @@ impl cumulus_pallet_xcm::Config for Runtime { pub struct XcmFeeManagerFromComponentsBridgeHub( PhantomData<(WaivedLocations, HandleFee)>, ); -impl, FeeHandler: HandleFee> FeeManager +impl, FeeHandler: HandleFee> FeeManager for XcmFeeManagerFromComponentsBridgeHub { - fn is_waived(origin: Option<&MultiLocation>, fee_reason: FeeReason) -> bool { + fn is_waived(origin: Option<&Location>, fee_reason: FeeReason) -> bool { let Some(loc) = origin else { return false }; if let Export { network, destination: Here } = fee_reason { return !(network == EthereumNetwork::get()) @@ -382,7 +382,7 @@ impl, FeeHandler: HandleFee> FeeManager WaivedLocations::contains(loc) } - fn handle_fee(fee: MultiAssets, context: Option<&XcmContext>, reason: FeeReason) { + fn handle_fee(fee: Assets, context: Option<&XcmContext>, reason: FeeReason) { FeeHandler::handle_fee(fee, context, reason); } } diff --git a/system-parachains/constants/Cargo.toml b/system-parachains/constants/Cargo.toml index 1b65c40c56..7d2719e823 100644 --- a/system-parachains/constants/Cargo.toml +++ b/system-parachains/constants/Cargo.toml @@ -17,7 +17,7 @@ polkadot-core-primitives = { default-features = false, version = "8.0.0"} polkadot-primitives = { default-features = false , version = "8.0.0" } polkadot-runtime-constants = { path = "../../relay/polkadot/constants", default-features = false} sp-runtime = { default-features = false , version = "32.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "6.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } [features] default = [ "std" ] From 7272865be49bd235fb6cffe8d19de57c3669337a Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 19 Feb 2024 09:16:38 +0100 Subject: [PATCH 142/316] (ranked_collective) adapt https://github.com/paritytech/polkadot-sdk/pull/2587 (ExchangeOrigin) --- relay/kusama/src/governance/fellowship.rs | 6 ++++++ .../src/weights/pallet_ranked_collective.rs | 18 ++++++++++++++++++ .../collectives-polkadot/src/fellowship/mod.rs | 6 ++++++ .../src/weights/pallet_ranked_collective.rs | 18 ++++++++++++++++++ 4 files changed, 48 insertions(+) diff --git a/relay/kusama/src/governance/fellowship.rs b/relay/kusama/src/governance/fellowship.rs index 8837c19e0e..483aff2519 100644 --- a/relay/kusama/src/governance/fellowship.rs +++ b/relay/kusama/src/governance/fellowship.rs @@ -352,6 +352,12 @@ impl pallet_ranked_collective::Config for Runtime TryMapSuccess>>, >, >; + // TODO:(PR#187)(PR#2587): check ExchangeOrigin + // Exchange is by any of: + // - Root can exchange arbitrarily. + // - the Fellows origin + type ExchangeOrigin = + EitherOf>, Fellows>; type Polls = FellowshipReferenda; type MinRankOfClass = sp_runtime::traits::Identity; type VoteWeight = pallet_ranked_collective::Geometric; diff --git a/relay/kusama/src/weights/pallet_ranked_collective.rs b/relay/kusama/src/weights/pallet_ranked_collective.rs index 7365a41dad..c9e22d8d7a 100644 --- a/relay/kusama/src/weights/pallet_ranked_collective.rs +++ b/relay/kusama/src/weights/pallet_ranked_collective.rs @@ -174,4 +174,22 @@ impl pallet_ranked_collective::WeightInfo for WeightInf .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2540).saturating_mul(n.into())) } + /// Storage: `FellowshipCollective::Members` (r:2 w:2) + /// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`) + /// Storage: `FellowshipCollective::MemberCount` (r:2 w:2) + /// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`) + /// Storage: `FellowshipCollective::IdToIndex` (r:2 w:4) + /// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`) + /// Storage: `FellowshipCollective::IndexToId` (r:0 w:2) + /// Proof: `FellowshipCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`) + fn exchange_member() -> Weight { + // Proof Size summary in bytes: + // Measured: `337` + // Estimated: `6048` + // Minimum execution time: 44_601_000 picoseconds. + Weight::from_parts(45_714_000, 0) + .saturating_add(Weight::from_parts(0, 6048)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(10)) + } } diff --git a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs index 2f118915f6..b6618225e1 100644 --- a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs @@ -140,6 +140,12 @@ impl pallet_ranked_collective::Config for Runtime Replace>, >, >; + // TODO:(PR#187)(PR#2587): check ExchangeOrigin + // Exchange is by any of: + // - Root can exchange arbitrarily. + // - the Fellows origin + type ExchangeOrigin = + EitherOf>>; type Polls = FellowshipReferenda; type MinRankOfClass = tracks::MinRankOfClass; type VoteWeight = pallet_ranked_collective::Geometric; diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_ranked_collective.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_ranked_collective.rs index 1d6c10b05c..10e1cbaeb6 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_ranked_collective.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_ranked_collective.rs @@ -170,4 +170,22 @@ impl pallet_ranked_collective::WeightInfo for WeightInf .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2540).saturating_mul(n.into())) } + /// Storage: `FellowshipCollective::Members` (r:2 w:2) + /// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`) + /// Storage: `FellowshipCollective::MemberCount` (r:2 w:2) + /// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`) + /// Storage: `FellowshipCollective::IdToIndex` (r:2 w:4) + /// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`) + /// Storage: `FellowshipCollective::IndexToId` (r:0 w:2) + /// Proof: `FellowshipCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`) + fn exchange_member() -> Weight { + // Proof Size summary in bytes: + // Measured: `337` + // Estimated: `6048` + // Minimum execution time: 44_601_000 picoseconds. + Weight::from_parts(45_714_000, 0) + .saturating_add(Weight::from_parts(0, 6048)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(10)) + } } From 630d58f5974cda6e08c9608227794e076cebb47b Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 19 Feb 2024 09:23:46 +0100 Subject: [PATCH 143/316] (ranked_collective) adapt https://github.com/paritytech/polkadot-sdk/pull/3156 (MemberSwappedHandler) --- relay/kusama/src/governance/fellowship.rs | 4 ++++ .../collectives/collectives-polkadot/src/fellowship/mod.rs | 3 +++ 2 files changed, 7 insertions(+) diff --git a/relay/kusama/src/governance/fellowship.rs b/relay/kusama/src/governance/fellowship.rs index 483aff2519..1e141df3db 100644 --- a/relay/kusama/src/governance/fellowship.rs +++ b/relay/kusama/src/governance/fellowship.rs @@ -360,5 +360,9 @@ impl pallet_ranked_collective::Config for Runtime EitherOf>, Fellows>; type Polls = FellowshipReferenda; type MinRankOfClass = sp_runtime::traits::Identity; + // TODO:(PR#187)(PR#3156): check MemberSwappedHandler/BenchmarkSetup + type MemberSwappedHandler = (); type VoteWeight = pallet_ranked_collective::Geometric; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkSetup = (); } diff --git a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs index b6618225e1..9ba2798757 100644 --- a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs @@ -148,7 +148,10 @@ impl pallet_ranked_collective::Config for Runtime EitherOf>>; type Polls = FellowshipReferenda; type MinRankOfClass = tracks::MinRankOfClass; + type MemberSwappedHandler = (crate::FellowshipCore, crate::FellowshipSalary); type VoteWeight = pallet_ranked_collective::Geometric; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkSetup = (crate::FellowshipCore, crate::FellowshipSalary); } pub type FellowshipCoreInstance = pallet_core_fellowship::Instance1; From 79b80e1b64d9fc30bf1ffa861507618fb1d35ffb Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 19 Feb 2024 09:34:27 +0100 Subject: [PATCH 144/316] (state-trie-migration) adapt https://github.com/paritytech/polkadot-sdk/pull/1801 (RuntimeHoldReason) --- relay/kusama/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 9f39789823..b2f76835f7 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1488,6 +1488,7 @@ parameter_types! { impl pallet_state_trie_migration::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; + type RuntimeHoldReason = RuntimeHoldReason; type SignedDepositPerItem = MigrationSignedDepositPerItem; type SignedDepositBase = MigrationSignedDepositBase; type ControlOrigin = EnsureRoot; @@ -2740,8 +2741,6 @@ mod init_state_migration { use super::Runtime; use frame_support::traits::OnRuntimeUpgrade; use pallet_state_trie_migration::{AutoLimits, MigrationLimits, MigrationProcess}; - #[cfg(not(feature = "std"))] - use sp_std::prelude::*; /// Initialize an automatic migration process. pub struct InitMigrate; From f8b04af41b106f345c9ce7e9f33291ad0770594d Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 19 Feb 2024 09:44:50 +0100 Subject: [PATCH 145/316] Fix compilation test for Kusama (finally relays compile and tests work) --- relay/kusama/src/xcm_config.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index 3f8d81603f..77a9f4c6ff 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -298,12 +298,14 @@ fn karura_liquid_staking_xcm_has_sane_weight_upper_limt() { // should be [WithdrawAsset, BuyExecution, Transact, RefundSurplus, DepositAsset] let blob = hex_literal::hex!("02140004000000000700e40b540213000000000700e40b54020006010700c817a804341801000006010b00c490bf4302140d010003ffffffff000100411f"); - let Ok(VersionedXcm::V2(old_xcm)) = VersionedXcm::::decode(&mut &blob[..]) + let Ok(VersionedXcm::V2(old_xcm_v2)) = VersionedXcm::::decode(&mut &blob[..]) else { panic!("can't decode XCM blob") }; + let old_xcm_v3: xcm::v3::Xcm = + old_xcm_v2.try_into().expect("conversion from v2 to v3 failed"); let mut xcm: Xcm = - old_xcm.try_into().expect("conversion from v2 to v3 failed"); + old_xcm_v3.try_into().expect("conversion from v3 to latest failed"); let weight = ::Weigher::weight(&mut xcm) .expect("weighing XCM failed"); From 195b779662f4aac9735db6f18f65c0ec5908a5ca Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 19 Feb 2024 10:55:40 +0200 Subject: [PATCH 146/316] fixes and cleanup --- Cargo.lock | 1 - relay/kusama/src/lib.rs | 300 ----------------- relay/kusama/src/xcm_config.rs | 2 +- relay/polkadot/src/lib.rs | 301 ------------------ .../asset-hubs/asset-hub-kusama/src/lib.rs | 2 +- .../asset-hub-kusama/src/xcm_config.rs | 9 +- .../asset-hubs/asset-hub-polkadot/Cargo.toml | 1 - .../asset-hubs/asset-hub-polkadot/src/lib.rs | 3 +- .../asset-hub-polkadot/src/xcm_config.rs | 13 +- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 11 +- .../bridge-hub-kusama/src/xcm_config.rs | 5 +- .../bridge-hub-polkadot/src/lib.rs | 4 +- 12 files changed, 28 insertions(+), 624 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 66dc87fa9d..90055cab37 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -748,7 +748,6 @@ dependencies = [ "polkadot-runtime-common 8.0.0", "polkadot-runtime-constants", "scale-info", - "smallvec", "snowbridge-router-primitives", "sp-api 27.0.0", "sp-block-builder 27.0.0", diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 24726b5483..c9d9ecd307 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -2797,303 +2797,3 @@ mod init_state_migration { } } } - -// TODO:(PR#137) - replace with fixed/released version -mod test_oliverfix_migration { - use super::*; - use frame_support::{ - traits::OnRuntimeUpgrade, DebugNoBound, RuntimeDebugNoBound, Twox64Concat, - }; - use frame_system::pallet_prelude::BlockNumberFor; - use pallet_nomination_pools::*; - use sp_runtime::Saturating; - - pub type V7ToV8 = frame_support::migrations::VersionedMigration< - 7, - 8, - v8::VersionUncheckedMigrateV7ToV8, - pallet_nomination_pools::pallet::Pallet, - ::DbWeight, - >; - - pub type V6ToV7 = frame_support::migrations::VersionedMigration< - 6, - 7, - v7::VersionUncheckedMigrateV6ToV7, - pallet_nomination_pools::pallet::Pallet, - ::DbWeight, - >; - - pub mod v8 { - use super::{v7::V7BondedPoolInner, *}; - - impl V7BondedPoolInner { - fn migrate_to_v8(self) -> BondedPoolInner { - BondedPoolInner { - commission: Commission { - current: self.commission.current, - max: self.commission.max, - change_rate: self.commission.change_rate, - throttle_from: self.commission.throttle_from, - // `claim_permission` is a new field. - claim_permission: None, - }, - member_counter: self.member_counter, - points: self.points, - roles: self.roles, - state: self.state, - } - } - } - - pub struct VersionUncheckedMigrateV7ToV8(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for VersionUncheckedMigrateV7ToV8 { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - Ok(Vec::new()) - } - - fn on_runtime_upgrade() -> Weight { - let mut translated = 0u64; - BondedPools::::translate::, _>(|_key, old_value| { - translated.saturating_inc(); - Some(old_value.migrate_to_v8()) - }); - T::DbWeight::get().reads_writes(translated, translated + 1) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_: Vec) -> Result<(), sp_runtime::TryRuntimeError> { - // Check new `claim_permission` field is present. - frame_support::ensure!( - BondedPools::::iter() - .all(|(_, inner)| inner.commission.claim_permission.is_none()), - "`claim_permission` value has not been set correctly." - ); - use frame_support::traits::GetStorageVersion; - frame_support::ensure!( - Pallet::::on_chain_storage_version() >= 8, - "nomination-pools::migration::v8: wrong storage version" - ); - Ok(()) - } - } - } - - /// This migration accumulates and initializes the [`TotalValueLocked`] for all pools. - /// - /// WARNING: This migration works under the assumption that the [`BondedPools`] cannot be - /// inflated arbitrarily. Otherwise this migration could fail due to too high weight. - pub(crate) mod v7 { - use super::*; - use frame_support::{BoundedBTreeMap, DefaultNoBound}; - use sp_runtime::traits::{Convert, Zero}; - use sp_staking::EraIndex; - - #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] - #[codec(mel_bound(T: Config))] - #[scale_info(skip_type_params(T))] - pub struct V7Commission { - pub current: Option<(Perbill, T::AccountId)>, - pub max: Option, - pub change_rate: Option>>, - pub throttle_from: Option>, - } - - #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] - #[codec(mel_bound(T: Config))] - #[scale_info(skip_type_params(T))] - pub struct V7BondedPoolInner { - pub commission: V7Commission, - pub member_counter: u32, - pub points: BalanceOf, - pub roles: PoolRoles, - pub state: PoolState, - } - - #[allow(dead_code)] - #[derive(RuntimeDebugNoBound)] - #[cfg_attr(feature = "std", derive(Clone, PartialEq))] - pub struct V7BondedPool { - /// The identifier of the pool. - id: PoolId, - /// The inner fields. - inner: V7BondedPoolInner, - } - - impl V7BondedPool { - fn bonded_account(&self) -> T::AccountId { - Pallet::::create_bonded_account(self.id) - } - fn points_to_balance(&self, points: BalanceOf) -> BalanceOf { - use sp_staking::StakingInterface; - let bonded_balance = - T::Staking::active_stake(&self.bonded_account()).unwrap_or(Zero::zero()); - point_to_balance::(bonded_balance, self.inner.points, points) - } - } - - // NOTE: We cannot put a V7 prefix here since that would change the storage key. - #[frame_support::storage_alias] - pub type BondedPools = - CountedStorageMap, Twox64Concat, PoolId, V7BondedPoolInner>; - - pub struct VersionUncheckedMigrateV6ToV7(sp_std::marker::PhantomData); - impl VersionUncheckedMigrateV6ToV7 { - fn calculate_tvl_by_total_stake() -> BalanceOf { - use sp_staking::StakingInterface; - BondedPools::::iter() - .map(|(id, inner)| { - T::Staking::total_stake( - &V7BondedPool { id, inner: inner.clone() }.bonded_account(), - ) - .unwrap_or_default() - }) - .reduce(|acc, total_balance| acc + total_balance) - .unwrap_or_default() - } - } - - impl OnRuntimeUpgrade for VersionUncheckedMigrateV6ToV7 { - fn on_runtime_upgrade() -> Weight { - let migrated = BondedPools::::count(); - // The TVL should be the sum of all the funds that are actively staked and in the - // unbonding process of the account of each pool. - let tvl: BalanceOf = Self::calculate_tvl_by_total_stake(); - - TotalValueLocked::::set(tvl); - - log!(info, "Upgraded {} pools with a TVL of {:?}", migrated, tvl); - - // reads: migrated * (BondedPools + Staking::total_stake) + count + onchain - // version - // - // writes: current version + TVL - T::DbWeight::get() - .reads_writes(migrated.saturating_mul(2).saturating_add(2).into(), 2) - } - - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - Ok(Vec::new()) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_data: Vec) -> Result<(), sp_runtime::TryRuntimeError> { - // check that the `TotalValueLocked` written is actually the sum of `total_stake` of - // the `BondedPools`` - let tvl: BalanceOf = Self::calculate_tvl_by_total_stake(); - frame_support::ensure!( - TotalValueLocked::::get() == tvl, - "TVL written is not equal to `Staking::total_stake` of all `BondedPools`." - ); - - // calculate the sum of `total_balance` of all `PoolMember` as the upper bound for - // the `TotalValueLocked`. - let total_balance_members: BalanceOf = PoolMembers::::iter() - .map(|(_, member)| total_balance(&member)) - .reduce(|acc, total_balance| acc + total_balance) - .unwrap_or_default(); - - frame_support::ensure!( - TotalValueLocked::::get() <= total_balance_members, - "TVL is greater than the balance of all PoolMembers." - ); - - use frame_support::traits::GetStorageVersion; - frame_support::ensure!( - Pallet::::on_chain_storage_version() >= 7, - "nomination-pools::migration::v7: wrong storage version" - ); - - Ok(()) - } - } - - #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, RuntimeDebugNoBound)] - #[cfg_attr(feature = "std", derive(Clone, PartialEq, Eq))] - #[codec(mel_bound(T: Config))] - #[scale_info(skip_type_params(T))] - pub struct UnbondPool { - /// The points in this pool. - points: BalanceOf, - /// The funds in the pool. - balance: BalanceOf, - } - - impl UnbondPool { - fn point_to_balance(&self, points: BalanceOf) -> BalanceOf { - point_to_balance::(self.balance, self.points, points) - } - } - - #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, RuntimeDebugNoBound)] - #[cfg_attr(feature = "std", derive(Clone, PartialEq))] - #[codec(mel_bound(T: Config))] - #[scale_info(skip_type_params(T))] - pub struct SubPools { - /// A general, era agnostic pool of funds that have fully unbonded. The pools - /// of `Self::with_era` will lazily be merged into into this pool if they are - /// older then `current_era - TotalUnbondingPools`. - no_era: UnbondPool, - /// Map of era in which a pool becomes unbonded in => unbond pools. - with_era: BoundedBTreeMap, TotalUnbondingPools>, - } - - #[frame_support::storage_alias] - pub type SubPoolsStorage = - CountedStorageMap, Twox64Concat, PoolId, SubPools>; - - // TODO:(PR#137) - hacky copy of pallet-nomination-pools, because lots of this stuff is - // private there. - fn total_balance(self_as_member: &PoolMember) -> BalanceOf { - // let pool = V7BondedPool::::get(self_as_member.pool_id).unwrap(); - let id = self_as_member.pool_id; - let pool = BondedPools::::try_get(id) - .ok() - .map(|inner| V7BondedPool { id, inner }) - .unwrap(); - let active_balance = pool.points_to_balance(self_as_member.points); - - let sub_pools = match SubPoolsStorage::::get(self_as_member.pool_id) { - Some(sub_pools) => sub_pools, - None => return active_balance, - }; - - let unbonding_balance = self_as_member.unbonding_eras.iter().fold( - BalanceOf::::zero(), - |accumulator, (era, unlocked_points)| { - // if the `SubPools::with_era` has already been merged into the - // `SubPools::no_era` use this pool instead. - let era_pool = sub_pools.with_era.get(era).unwrap_or(&sub_pools.no_era); - accumulator + (era_pool.point_to_balance(*unlocked_points)) - }, - ); - - active_balance + unbonding_balance - } - - fn point_to_balance( - current_balance: BalanceOf, - current_points: BalanceOf, - points: BalanceOf, - ) -> BalanceOf { - let u256 = T::BalanceToU256::convert; - let balance = T::U256ToBalance::convert; - if current_balance.is_zero() || current_points.is_zero() || points.is_zero() { - // There is nothing to unbond - return Zero::zero() - } - - use sp_std::ops::Div; - - // Equivalent of (current_balance / current_points) * points - balance( - u256(current_balance) - .saturating_mul(u256(points)) - // We check for zero above - .div(u256(current_points)), - ) - } - } -} diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index 19b6976c25..d464ef68bd 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -136,7 +136,7 @@ parameter_types! { pub const MaxAssetsIntoHolding: u32 = 64; } -/// Kusama Relay recognizes/respects AssetHub, Encointer and BridgeHub chains as teleporters. +/// Kusama Relay recognizes/respects AssetHub, Encointer, and BridgeHub chains as teleporters. pub type TrustedTeleporters = ( xcm_builder::Case, xcm_builder::Case, diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 9ec28e406a..d2a445f27a 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -2976,304 +2976,3 @@ mod remote_tests { }); } } - -// TODO:(PR#137) - replace with fixed/released version -mod test_oliverfix_migration { - use super::*; - use frame_support::{ - pallet_prelude::TypeInfo, traits::OnRuntimeUpgrade, DebugNoBound, RuntimeDebugNoBound, - Twox64Concat, - }; - use frame_system::pallet_prelude::BlockNumberFor; - use pallet_nomination_pools::*; - use sp_runtime::Saturating; - - pub type V7ToV8 = frame_support::migrations::VersionedMigration< - 7, - 8, - v8::VersionUncheckedMigrateV7ToV8, - pallet_nomination_pools::pallet::Pallet, - ::DbWeight, - >; - - pub type V6ToV7 = frame_support::migrations::VersionedMigration< - 6, - 7, - v7::VersionUncheckedMigrateV6ToV7, - pallet_nomination_pools::pallet::Pallet, - ::DbWeight, - >; - - pub mod v8 { - use super::{v7::V7BondedPoolInner, *}; - - impl V7BondedPoolInner { - fn migrate_to_v8(self) -> BondedPoolInner { - BondedPoolInner { - commission: Commission { - current: self.commission.current, - max: self.commission.max, - change_rate: self.commission.change_rate, - throttle_from: self.commission.throttle_from, - // `claim_permission` is a new field. - claim_permission: None, - }, - member_counter: self.member_counter, - points: self.points, - roles: self.roles, - state: self.state, - } - } - } - - pub struct VersionUncheckedMigrateV7ToV8(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for VersionUncheckedMigrateV7ToV8 { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - Ok(Vec::new()) - } - - fn on_runtime_upgrade() -> Weight { - let mut translated = 0u64; - BondedPools::::translate::, _>(|_key, old_value| { - translated.saturating_inc(); - Some(old_value.migrate_to_v8()) - }); - T::DbWeight::get().reads_writes(translated, translated + 1) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_: Vec) -> Result<(), sp_runtime::TryRuntimeError> { - // Check new `claim_permission` field is present. - frame_support::ensure!( - BondedPools::::iter() - .all(|(_, inner)| inner.commission.claim_permission.is_none()), - "`claim_permission` value has not been set correctly." - ); - use frame_support::traits::GetStorageVersion; - frame_support::ensure!( - Pallet::::on_chain_storage_version() >= 8, - "nomination-pools::migration::v8: wrong storage version" - ); - Ok(()) - } - } - } - - /// This migration accumulates and initializes the [`TotalValueLocked`] for all pools. - /// - /// WARNING: This migration works under the assumption that the [`BondedPools`] cannot be - /// inflated arbitrarily. Otherwise this migration could fail due to too high weight. - pub(crate) mod v7 { - use super::*; - use frame_support::{BoundedBTreeMap, DefaultNoBound}; - use sp_runtime::traits::{Convert, Zero}; - use sp_staking::EraIndex; - - #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] - #[codec(mel_bound(T: Config))] - #[scale_info(skip_type_params(T))] - pub struct V7Commission { - pub current: Option<(Perbill, T::AccountId)>, - pub max: Option, - pub change_rate: Option>>, - pub throttle_from: Option>, - } - - #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DebugNoBound, PartialEq, Clone)] - #[codec(mel_bound(T: Config))] - #[scale_info(skip_type_params(T))] - pub struct V7BondedPoolInner { - pub commission: V7Commission, - pub member_counter: u32, - pub points: BalanceOf, - pub roles: PoolRoles, - pub state: PoolState, - } - - #[allow(dead_code)] - #[derive(RuntimeDebugNoBound)] - #[cfg_attr(feature = "std", derive(Clone, PartialEq))] - pub struct V7BondedPool { - /// The identifier of the pool. - id: PoolId, - /// The inner fields. - inner: V7BondedPoolInner, - } - - impl V7BondedPool { - fn bonded_account(&self) -> T::AccountId { - Pallet::::create_bonded_account(self.id) - } - fn points_to_balance(&self, points: BalanceOf) -> BalanceOf { - use sp_staking::StakingInterface; - let bonded_balance = - T::Staking::active_stake(&self.bonded_account()).unwrap_or(Zero::zero()); - point_to_balance::(bonded_balance, self.inner.points, points) - } - } - - // NOTE: We cannot put a V7 prefix here since that would change the storage key. - #[frame_support::storage_alias] - pub type BondedPools = - CountedStorageMap, Twox64Concat, PoolId, V7BondedPoolInner>; - - pub struct VersionUncheckedMigrateV6ToV7(sp_std::marker::PhantomData); - impl VersionUncheckedMigrateV6ToV7 { - fn calculate_tvl_by_total_stake() -> BalanceOf { - use sp_staking::StakingInterface; - BondedPools::::iter() - .map(|(id, inner)| { - T::Staking::total_stake( - &V7BondedPool { id, inner: inner.clone() }.bonded_account(), - ) - .unwrap_or_default() - }) - .reduce(|acc, total_balance| acc + total_balance) - .unwrap_or_default() - } - } - - impl OnRuntimeUpgrade for VersionUncheckedMigrateV6ToV7 { - fn on_runtime_upgrade() -> Weight { - let migrated = BondedPools::::count(); - // The TVL should be the sum of all the funds that are actively staked and in the - // unbonding process of the account of each pool. - let tvl: BalanceOf = Self::calculate_tvl_by_total_stake(); - - TotalValueLocked::::set(tvl); - - log!(info, "Upgraded {} pools with a TVL of {:?}", migrated, tvl); - - // reads: migrated * (BondedPools + Staking::total_stake) + count + onchain - // version - // - // writes: current version + TVL - T::DbWeight::get() - .reads_writes(migrated.saturating_mul(2).saturating_add(2).into(), 2) - } - - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - Ok(Vec::new()) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_data: Vec) -> Result<(), sp_runtime::TryRuntimeError> { - // check that the `TotalValueLocked` written is actually the sum of `total_stake` of - // the `BondedPools`` - let tvl: BalanceOf = Self::calculate_tvl_by_total_stake(); - frame_support::ensure!( - TotalValueLocked::::get() == tvl, - "TVL written is not equal to `Staking::total_stake` of all `BondedPools`." - ); - - // calculate the sum of `total_balance` of all `PoolMember` as the upper bound for - // the `TotalValueLocked`. - let total_balance_members: BalanceOf = PoolMembers::::iter() - .map(|(_, member)| total_balance(&member)) - .reduce(|acc, total_balance| acc + total_balance) - .unwrap_or_default(); - - frame_support::ensure!( - TotalValueLocked::::get() <= total_balance_members, - "TVL is greater than the balance of all PoolMembers." - ); - - use frame_support::traits::GetStorageVersion; - frame_support::ensure!( - Pallet::::on_chain_storage_version() >= 7, - "nomination-pools::migration::v7: wrong storage version" - ); - - Ok(()) - } - } - - #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, RuntimeDebugNoBound)] - #[cfg_attr(feature = "std", derive(Clone, PartialEq, Eq))] - #[codec(mel_bound(T: Config))] - #[scale_info(skip_type_params(T))] - pub struct UnbondPool { - /// The points in this pool. - points: BalanceOf, - /// The funds in the pool. - balance: BalanceOf, - } - - impl UnbondPool { - fn point_to_balance(&self, points: BalanceOf) -> BalanceOf { - point_to_balance::(self.balance, self.points, points) - } - } - - #[derive(Encode, Decode, MaxEncodedLen, TypeInfo, DefaultNoBound, RuntimeDebugNoBound)] - #[cfg_attr(feature = "std", derive(Clone, PartialEq))] - #[codec(mel_bound(T: Config))] - #[scale_info(skip_type_params(T))] - pub struct SubPools { - /// A general, era agnostic pool of funds that have fully unbonded. The pools - /// of `Self::with_era` will lazily be merged into into this pool if they are - /// older then `current_era - TotalUnbondingPools`. - no_era: UnbondPool, - /// Map of era in which a pool becomes unbonded in => unbond pools. - with_era: BoundedBTreeMap, TotalUnbondingPools>, - } - - #[frame_support::storage_alias] - pub type SubPoolsStorage = - CountedStorageMap, Twox64Concat, PoolId, SubPools>; - - // TODO:(PR#137) - hacky copy of pallet-nomination-pools, because lots of this stuff is - // private there. - fn total_balance(self_as_member: &PoolMember) -> BalanceOf { - // let pool = V7BondedPool::::get(self_as_member.pool_id).unwrap(); - let id = self_as_member.pool_id; - let pool = BondedPools::::try_get(id) - .ok() - .map(|inner| V7BondedPool { id, inner }) - .unwrap(); - let active_balance = pool.points_to_balance(self_as_member.points); - - let sub_pools = match SubPoolsStorage::::get(self_as_member.pool_id) { - Some(sub_pools) => sub_pools, - None => return active_balance, - }; - - let unbonding_balance = self_as_member.unbonding_eras.iter().fold( - BalanceOf::::zero(), - |accumulator, (era, unlocked_points)| { - // if the `SubPools::with_era` has already been merged into the - // `SubPools::no_era` use this pool instead. - let era_pool = sub_pools.with_era.get(era).unwrap_or(&sub_pools.no_era); - accumulator + (era_pool.point_to_balance(*unlocked_points)) - }, - ); - - active_balance + unbonding_balance - } - - fn point_to_balance( - current_balance: BalanceOf, - current_points: BalanceOf, - points: BalanceOf, - ) -> BalanceOf { - let u256 = T::BalanceToU256::convert; - let balance = T::U256ToBalance::convert; - if current_balance.is_zero() || current_points.is_zero() || points.is_zero() { - // There is nothing to unbond - return Zero::zero() - } - - use sp_std::ops::Div; - - // Equivalent of (current_balance / current_points) * points - balance( - u256(current_balance) - .saturating_mul(u256(points)) - // We check for zero above - .div(u256(current_points)), - ) - } - } -} diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index cdd6a04376..6fbe9d3754 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -30,7 +30,7 @@ pub mod xcm_config; use assets_common::{ foreign_creators::ForeignCreators, local_and_foreign_assets::{LocalFromLeft, TargetFromLeft}, - matching::FromSiblingParachain, + matching::{FromNetwork, FromSiblingParachain}, AssetIdForTrustBackedAssetsConvert, LocationForAssetId, }; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 6ed4ff3300..b536fc2749 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -45,10 +45,11 @@ use xcm_builder::{ DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor, FungibleAdapter, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SovereignPaidRemoteExporter - SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, - TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, - WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignPaidRemoteExporter, SovereignSignedViaLocation, StartsWith, + StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, + XcmFeeToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index a9d6f8a308..20bd237d94 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -13,7 +13,6 @@ codec = { package = "parity-scale-codec", version = "3.6.9", default-features = hex-literal = { version = "0.4.1", optional = true } log = { version = "0.4.20", default-features = false } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } -smallvec = "1.11.2" # Local bp-asset-hub-kusama = { path = "../asset-hub-kusama/primitives", default-features = false} diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 04fc5c7c4d..15c475558b 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -64,7 +64,8 @@ pub mod xcm_config; use assets_common::{ foreign_creators::ForeignCreators, - matching::{FromNetwork, FromSiblingParachain}, LocationForAssetId + matching::{FromNetwork, FromSiblingParachain}, + LocationForAssetId, }; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index ec19391c84..40d81d7690 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -43,12 +43,13 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor, - FungibleAdapter, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, - LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SovereignPaidRemoteExporter, - SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, - TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, - WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, + FungibleAdapter, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, + IsConcrete, LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignPaidRemoteExporter, SovereignSignedViaLocation, StartsWith, + StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, + XcmFeeToAccount, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index e0860fc82a..f4eceacf13 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -27,6 +27,7 @@ pub mod bridge_to_polkadot_config; mod weights; pub mod xcm_config; +use bridge_hub_common::AggregateMessageOrigin; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::ParaId; use snowbridge_beacon_primitives::{Fork, ForkVersions}; @@ -67,8 +68,8 @@ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; use xcm_config::{ - FellowshipLocation, GovernanceLocation, TreasuryAccount, XcmConfig, - XcmOriginToTransactDispatchOrigin, + FellowshipLocation, GovernanceLocation, TreasuryAccount, XcmOriginToTransactDispatchOrigin, + XcmRouter, }; #[cfg(any(feature = "std", test))] @@ -86,7 +87,11 @@ use parachains_common::{ use polkadot_runtime_common::prod_or_fast; use system_parachains_constants::{ - kusama::{consensus::*, currency::*, fee::WeightToFee}, + kusama::{ + consensus::*, + currency::{EXISTENTIAL_DEPOSIT, *}, + fee::WeightToFee, + }, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 2d81470e55..c5ca703cc0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -36,9 +36,8 @@ use parachains_common::{ }, }; use polkadot_parachain_primitives::primitives::Sibling; -use snowbridge_core::DescribeHere; use snowbridge_runtime_common::XcmExportFeeToSibling; -use sp_core::{Get, H256}; +use sp_core::Get; use sp_runtime::traits::AccountIdConversion; use sp_std::marker::PhantomData; use system_parachains_constants::{kusama::snowbridge::EthereumNetwork, TREASURY_PALLET_ID}; @@ -51,7 +50,7 @@ use xcm_builder::{ RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, + XcmFeeToAccount, }; use xcm_executor::{ traits::{FeeManager, FeeReason, FeeReason::Export, WithOriginFilter}, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 77971aaecc..c8d88bbeb8 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -31,6 +31,7 @@ use crate::xcm_config::XcmRouter; use bridge_hub_common::AggregateMessageOrigin; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::ParaId; +use parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; use snowbridge_beacon_primitives::{Fork, ForkVersions}; use snowbridge_core::{ gwei, meth, outbound::Message, AgentId, AllowSiblingsOnly, PricingParameters, Rewards, @@ -42,9 +43,8 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, Keccak256}, transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, FixedU128 + ApplyExtrinsicResult, FixedU128, }; -use parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; use sp_std::prelude::*; #[cfg(feature = "std")] From 05ec9e709268a2f7d3ba4b86fdb64131ebd0e13d Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 19 Feb 2024 11:00:56 +0200 Subject: [PATCH 147/316] more fixes --- .../bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 1a86eaccfb..24a390e8b6 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -47,7 +47,7 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor, - FungibleAdapter, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, + FungibleAdapter, HandleFee, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, From e2f77aa07d9ab58a83982f17996fa7594fdaa8d8 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 19 Feb 2024 10:04:30 +0100 Subject: [PATCH 148/316] Fix benchmarks compilation test for Kusama/Polkadot --- relay/kusama/src/lib.rs | 4 ++-- relay/kusama/src/xcm_config.rs | 3 ++- relay/polkadot/src/lib.rs | 4 ++-- system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs | 2 +- system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs | 2 +- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 2 +- system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 2 +- 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index b2f76835f7..ca902cabd9 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -2422,7 +2422,7 @@ sp_api::impl_runtime_apis! { } parameter_types! { - pub const TrustedTeleporter: Option<(Location, Asset)> = Some(( + pub TrustedTeleporter: Option<(Location, Asset)> = Some(( AssetHubLocation::get(), Asset { fun: Fungible(1 * UNITS), id: AssetId(TokenLocation::get()) }, )); @@ -2436,7 +2436,7 @@ sp_api::impl_runtime_apis! { type TrustedTeleporter = TrustedTeleporter; type TrustedReserve = TrustedReserve; - fn get_multi_asset() -> Asset { + fn get_asset() -> Asset { Asset { id: AssetId(TokenLocation::get()), fun: Fungible(1 * UNITS), diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index 77a9f4c6ff..d717959e69 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -298,7 +298,8 @@ fn karura_liquid_staking_xcm_has_sane_weight_upper_limt() { // should be [WithdrawAsset, BuyExecution, Transact, RefundSurplus, DepositAsset] let blob = hex_literal::hex!("02140004000000000700e40b540213000000000700e40b54020006010700c817a804341801000006010b00c490bf4302140d010003ffffffff000100411f"); - let Ok(VersionedXcm::V2(old_xcm_v2)) = VersionedXcm::::decode(&mut &blob[..]) + let Ok(VersionedXcm::V2(old_xcm_v2)) = + VersionedXcm::::decode(&mut &blob[..]) else { panic!("can't decode XCM blob") }; diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 0dee1a4c14..784c8d90aa 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -2421,7 +2421,7 @@ sp_api::impl_runtime_apis! { } parameter_types! { - pub const TrustedTeleporter: Option<(Location, Asset)> = Some(( + pub TrustedTeleporter: Option<(Location, Asset)> = Some(( AssetHubLocation::get(), Asset { id: AssetId(TokenLocation::get()), fun: Fungible(1 * UNITS) } )); @@ -2435,7 +2435,7 @@ sp_api::impl_runtime_apis! { type TrustedTeleporter = TrustedTeleporter; type TrustedReserve = TrustedReserve; - fn get_multi_asset() -> Asset { + fn get_asset() -> Asset { Asset { id: AssetId(TokenLocation::get()), fun: Fungible(1 * UNITS) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 288f0e5e42..c4b5c41607 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -1467,7 +1467,7 @@ impl_runtime_apis! { type TrustedTeleporter = TrustedTeleporter; type TrustedReserve = TrustedReserve; - fn get_multi_asset() -> Asset { + fn get_asset() -> Asset { Asset { id: AssetId(KsmLocation::get()), fun: Fungible(UNITS), diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 8c59c5e9bb..390e0f798b 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -1348,7 +1348,7 @@ impl_runtime_apis! { type TrustedTeleporter = TrustedTeleporter; type TrustedReserve = TrustedReserve; - fn get_multi_asset() -> Asset { + fn get_asset() -> Asset { Asset { id: AssetId(DotLocation::get()), fun: Fungible(UNITS), diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 0c00a5840e..68f5176145 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -897,7 +897,7 @@ impl_runtime_apis! { type TrustedTeleporter = TrustedTeleporter; type TrustedReserve = TrustedReserve; - fn get_multi_asset() -> Asset { + fn get_asset() -> Asset { Asset { id: AssetId(KsmRelayLocation::get()), fun: Fungible(UNITS), diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 127aaae5ea..d758677eec 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -897,7 +897,7 @@ impl_runtime_apis! { type TrustedTeleporter = TrustedTeleporter; type TrustedReserve = TrustedReserve; - fn get_multi_asset() -> Asset { + fn get_asset() -> Asset { Asset { id: AssetId(DotRelayLocation::get()), fun: Fungible(UNITS), From 84fea8e44a9b392a334087e06898b2c5c861d6fc Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 19 Feb 2024 11:06:54 +0200 Subject: [PATCH 149/316] minor fixes --- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 1 + .../bridge-hubs/bridge-hub-polkadot/src/lib.rs | 7 +++---- .../bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs | 7 +++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index f4eceacf13..f56898e35e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -30,6 +30,7 @@ pub mod xcm_config; use bridge_hub_common::AggregateMessageOrigin; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::ParaId; +use parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; use snowbridge_beacon_primitives::{Fork, ForkVersions}; use snowbridge_core::{ gwei, meth, outbound::Message, AgentId, AllowSiblingsOnly, PricingParameters, Rewards, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index c8d88bbeb8..275e6df00e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -27,7 +27,6 @@ pub mod bridge_to_kusama_config; mod weights; pub mod xcm_config; -use crate::xcm_config::XcmRouter; use bridge_hub_common::AggregateMessageOrigin; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::ParaId; @@ -70,8 +69,8 @@ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; use xcm_config::{ - FellowshipLocation, GovernanceLocation, TreasuryAccount, XcmConfig, - XcmOriginToTransactDispatchOrigin, + FellowshipLocation, GovernanceLocation, TreasuryAccount, XcmOriginToTransactDispatchOrigin, + XcmRouter, }; #[cfg(any(feature = "std", test))] @@ -643,7 +642,7 @@ parameter_types! { }, deneb: Fork { version: [4, 0, 0, 0], // 0x04000000 - epoch: 269568, // TODO update when epoch becomes known + epoch: 269568, }, }; } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 24a390e8b6..9335d92991 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -36,9 +36,8 @@ use parachains_common::{ }, }; use polkadot_parachain_primitives::primitives::Sibling; -use snowbridge_core::DescribeHere; use snowbridge_runtime_common::XcmExportFeeToSibling; -use sp_core::{Get, H256}; +use sp_core::Get; use sp_runtime::traits::AccountIdConversion; use sp_std::marker::PhantomData; use system_parachains_constants::{polkadot::snowbridge::EthereumNetwork, TREASURY_PALLET_ID}; @@ -47,11 +46,11 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor, - FungibleAdapter, HandleFee, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, + FungibleAdapter, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, + XcmFeeToAccount, }; use xcm_executor::{ traits::{FeeManager, FeeReason, FeeReason::Export, WithOriginFilter}, From 5fe639287b5f905d3cbd8e830fd50113a10fb5eb Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 19 Feb 2024 10:42:55 +0100 Subject: [PATCH 150/316] More fixes --- .../src/fellowship/mod.rs | 6 +++-- .../collectives-polkadot/src/xcm_config.rs | 2 +- system-parachains/encointer/src/lib.rs | 7 +++--- system-parachains/encointer/src/xcm_config.rs | 22 +++++++++---------- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs index 9ba2798757..0100de040d 100644 --- a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs @@ -144,8 +144,10 @@ impl pallet_ranked_collective::Config for Runtime // Exchange is by any of: // - Root can exchange arbitrarily. // - the Fellows origin - type ExchangeOrigin = - EitherOf>>; + type ExchangeOrigin = EitherOf< + frame_system::EnsureRootWithSuccess>, + frame_system::EnsureRootWithSuccess>, + >; type Polls = FellowshipReferenda; type MinRankOfClass = tracks::MinRankOfClass; type MemberSwappedHandler = (crate::FellowshipCore, crate::FellowshipSalary); diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index a1a8cb89da..0e9b517d18 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -19,7 +19,7 @@ use super::{ WeightToFee, XcmpQueue, }; use frame_support::{ - match_types, parameter_types, + parameter_types, traits::{ConstU32, Contains, Equals, Everything, Nothing}, weights::Weight, }; diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 798669e9b4..3e78fffb18 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -97,7 +97,7 @@ use system_parachains_constants::{ }; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::{ - latest::{BodyId, InteriorLocation, Junction::PalletInstance}, + latest::{BodyId, InteriorMultiLocation, Junction::PalletInstance}, v3::AssetId as XcmAssetId, }; @@ -306,6 +306,7 @@ impl pallet_balances::Config for Runtime { type RuntimeHoldReason = (); type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); + type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; } @@ -338,7 +339,7 @@ parameter_types! { pub const PayoutSpendPeriod: BlockNumber = 30 * DAYS; // The asset's interior location for the paying account. This is the Treasury // pallet instance (which sits at index 18). - pub TreasuryInteriorLocation: InteriorLocation = PalletInstance(ENCOINTER_TREASURY_PALLET_ID).into(); + pub TreasuryInteriorMultiLocation: InteriorMultiLocation = PalletInstance(ENCOINTER_TREASURY_PALLET_ID).into(); pub const MaxApprovals: u32 = 10; pub TreasuryAccount: AccountId = Treasury::account_id(); } @@ -439,7 +440,7 @@ impl cumulus_pallet_aura_ext::Config for Runtime {} parameter_types! { pub const ExecutiveBody: BodyId = BodyId::Executive; /// The asset ID for the asset that we use to pay for message delivery fees. - pub FeeAssetId: XcmAssetId = XcmAssetId::AssetId(xcm_config::KsmLocation::get()); + pub FeeAssetId: XcmAssetId = XcmAssetId::Concrete(xcm_config::KsmLocation::get()); /// The base fee for the message delivery fees. pub const ToSiblingBaseDeliveryFee: u128 = CENTS.saturating_mul(3); pub const ToParentBaseDeliveryFee: u128 = CENTS.saturating_mul(3); diff --git a/system-parachains/encointer/src/xcm_config.rs b/system-parachains/encointer/src/xcm_config.rs index ff5e6ed71d..c0dfd86dad 100644 --- a/system-parachains/encointer/src/xcm_config.rs +++ b/system-parachains/encointer/src/xcm_config.rs @@ -44,12 +44,12 @@ use xcm_builder::{ use xcm_executor::XcmExecutor; parameter_types! { - pub const KsmLocation: Location = Location::parent(); + pub const KsmLocation: MultiLocation = MultiLocation::parent(); pub const RelayNetwork: NetworkId = NetworkId::Kusama; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub Ancestry: Location = Parachain(ParachainInfo::parachain_id().into()).into(); + pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); - pub UniversalLocation: InteriorLocation = + pub UniversalLocation: InteriorMultiLocation = X2(GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())); } @@ -112,13 +112,13 @@ parameter_types! { } match_types! { - pub type ParentOrParentsExecutivePlurality: impl Contains = { - Location { parents: 1, interior: Here } | - Location { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } + pub type ParentOrParentsExecutivePlurality: impl Contains = { + MultiLocation { parents: 1, interior: Here } | + MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } }; - pub type ParentOrSiblings: impl Contains = { - Location { parents: 1, interior: Here } | - Location { parents: 1, interior: X1(_) } + pub type ParentOrSiblings: impl Contains = { + MultiLocation { parents: 1, interior: Here } | + MultiLocation { parents: 1, interior: X1(_) } }; } @@ -148,7 +148,7 @@ impl frame_support::traits::Contains for SafeCallFilter { parameter_types! { pub const MaxAssetsIntoHolding: u32 = 64; - pub const RelayLocation: Location = Location::parent(); + pub const RelayLocation: MultiLocation = MultiLocation::parent(); } pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { @@ -197,7 +197,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 { From 701cbf3d48044b7a9bd88322a4995eba94354074 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 19 Feb 2024 11:45:54 +0100 Subject: [PATCH 151/316] More XCMv4 --- .../asset-hubs/asset-hub-kusama/src/lib.rs | 2 +- .../asset-hub-kusama/src/xcm_config.rs | 16 +++---- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 2 +- .../asset-hub-polkadot/src/xcm_config.rs | 43 +++++++++++-------- .../src/bridge_to_polkadot_config.rs | 18 ++++---- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 4 +- .../bridge-hub-kusama/src/xcm_config.rs | 2 +- .../src/bridge_to_kusama_config.rs | 16 +++---- .../bridge-hub-polkadot/src/lib.rs | 4 +- .../bridge-hub-polkadot/src/xcm_config.rs | 24 ++++++++--- 10 files changed, 73 insertions(+), 58 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index c4b5c41607..e2db1ede32 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -1378,7 +1378,7 @@ impl_runtime_apis! { >(true, initial_asset_amount); let asset_location = Location::new( 0, - X2(PalletInstance(50), GeneralIndex(u32::from(asset_id).into())) + [PalletInstance(50), GeneralIndex(u32::from(asset_id).into())] ); let transfer_asset: Asset = (asset_location, asset_amount).into(); diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 9602a6b41c..44da3077fd 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -22,7 +22,7 @@ use super::{ use crate::{ForeignAssets, ForeignAssetsInstance}; use assets_common::matching::{FromSiblingParachain, IsForeignConcreteAsset}; use frame_support::{ - match_types, parameter_types, + parameter_types, traits::{ConstU32, Contains, Equals, Everything, Nothing, PalletInfoAccess}, }; use frame_system::EnsureRoot; @@ -641,7 +641,7 @@ pub struct XcmBenchmarkHelper; #[cfg(feature = "runtime-benchmarks")] impl pallet_assets::BenchmarkHelper for XcmBenchmarkHelper { fn create_asset_id_parameter(id: u32) -> Location { - Location { parents: 1, interior: X1(Parachain(id)) } + Location { parents: 1, interior: Parachain(id).into() } } } @@ -663,7 +663,7 @@ pub mod bridging { pub storage XcmBridgeHubRouterByteFee: Balance = TransactionByteFee::get(); pub SiblingBridgeHubParaId: u32 = bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID; - pub SiblingBridgeHub: Location = Location::new(1, X1(Parachain(SiblingBridgeHubParaId::get()))); + pub SiblingBridgeHub: Location = Location::new(1, Parachain(SiblingBridgeHubParaId::get())); /// Router expects payment with this `AssetId`. /// (`AssetId` has to be aligned with `BridgeTable`) pub XcmBridgeHubRouterFeeAssetId: AssetId = KsmLocation::get().into(); @@ -682,21 +682,21 @@ pub mod bridging { parameter_types! { pub SiblingBridgeHubWithBridgeHubPolkadotInstance: Location = Location::new( 1, - X2( + [ Parachain(SiblingBridgeHubParaId::get()), PalletInstance(bp_bridge_hub_kusama::WITH_BRIDGE_KUSAMA_TO_POLKADOT_MESSAGES_PALLET_INDEX), - ) + ] ); pub const PolkadotNetwork: NetworkId = NetworkId::Polkadot; pub AssetHubPolkadot: Location = Location::new( 2, - X2( + [ GlobalConsensus(PolkadotNetwork::get()), Parachain(polkadot_runtime_constants::system_parachain::ASSET_HUB_ID), - ), + ], ); - pub DotLocation: Location = Location::new(2, X1(GlobalConsensus(PolkadotNetwork::get()))); + pub DotLocation: Location = Location::new(2, GlobalConsensus(PolkadotNetwork::get())); pub DotFromAssetHubPolkadot: (AssetFilter, Location) = ( Wild(AllOf { fun: WildFungible, id: AssetId(DotLocation::get()) }), diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 390e0f798b..a53434abba 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -1259,7 +1259,7 @@ impl_runtime_apis! { >(true, initial_asset_amount); let asset_location = Location::new( 0, - X2(PalletInstance(50), GeneralIndex(u32::from(asset_id).into())) + [PalletInstance(50), GeneralIndex(u32::from(asset_id).into())] ); let transfer_asset: Asset = (asset_location, asset_amount).into(); diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 9b880af5f8..838fcdc426 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -22,7 +22,7 @@ use super::{ use crate::ForeignAssetsInstance; use assets_common::matching::{FromSiblingParachain, IsForeignConcreteAsset}; use frame_support::{ - match_types, parameter_types, + parameter_types, traits::{ConstU32, Contains, Equals, Everything, Nothing, PalletInfoAccess}, }; use frame_system::EnsureRoot; @@ -35,6 +35,7 @@ use parachains_common::{ }, }; use polkadot_parachain_primitives::primitives::Sibling; +use polkadot_runtime_constants::system_parachain; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; @@ -61,7 +62,7 @@ parameter_types! { pub TrustBackedAssetsPalletLocation: Location = PalletInstance(::index() as u8).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); - pub FellowshipLocation: Location = Location::new(1, Parachain(1001)); + pub FellowshipLocation: Location = Location::new(1, Parachain(system_parachain::COLLECTIVES_ID)); pub const GovernanceLocation: Location = Location::parent(); pub RelayTreasuryLocation: Location = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); @@ -183,15 +184,21 @@ parameter_types! { pub XcmAssetFeesReceiver: Option = Authorship::author(); } -match_types! { - pub type FellowshipEntities: impl Contains = { - // Fellowship Plurality - Location { parents: 1, interior: X2(Parachain(1001), Plurality { id: BodyId::Technical, ..}) } | - // Fellowship Salary Pallet - Location { parents: 1, interior: X2(Parachain(1001), PalletInstance(64)) } | - // Fellowship Treasury Pallet - Location { parents: 1, interior: X2(Parachain(1001), PalletInstance(65)) } - }; +pub struct FellowshipEntities; +impl Contains for FellowshipEntities { + fn contains(location: &Location) -> bool { + matches!( + location.unpack(), + ( + 1, + [ + Parachain(system_parachain::COLLECTIVES_ID), + Plurality { id: BodyId::Technical, .. } + ] + ) | (1, [Parachain(system_parachain::COLLECTIVES_ID), PalletInstance(64)]) | + (1, [Parachain(system_parachain::COLLECTIVES_ID), PalletInstance(65)]) + ) + } } pub struct ParentOrParentsPlurality; @@ -588,7 +595,7 @@ pub struct XcmBenchmarkHelper; #[cfg(feature = "runtime-benchmarks")] impl pallet_assets::BenchmarkHelper for XcmBenchmarkHelper { fn create_asset_id_parameter(id: u32) -> Location { - Location { parents: 1, interior: X1(Parachain(id)) } + Location { parents: 1, interior: Parachain(id).into() } } } @@ -610,7 +617,7 @@ pub mod bridging { pub storage XcmBridgeHubRouterByteFee: Balance = TransactionByteFee::get(); pub SiblingBridgeHubParaId: u32 = bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID; - pub SiblingBridgeHub: Location = Location::new(1, X1(Parachain(SiblingBridgeHubParaId::get()))); + pub SiblingBridgeHub: Location = Location::new(1, Parachain(SiblingBridgeHubParaId::get())); /// Router expects payment with this `AssetId`. /// (`AssetId` has to be aligned with `BridgeTable`) pub XcmBridgeHubRouterFeeAssetId: AssetId = DotLocation::get().into(); @@ -629,21 +636,21 @@ pub mod bridging { parameter_types! { pub SiblingBridgeHubWithBridgeHubKusamaInstance: Location = Location::new( 1, - X2( + [ Parachain(SiblingBridgeHubParaId::get()), PalletInstance(bp_bridge_hub_polkadot::WITH_BRIDGE_POLKADOT_TO_KUSAMA_MESSAGES_PALLET_INDEX), - ) + ] ); pub const KusamaNetwork: NetworkId = NetworkId::Kusama; pub AssetHubKusama: Location = Location::new( 2, - X2( + [ GlobalConsensus(KusamaNetwork::get()), Parachain(kusama_runtime_constants::system_parachain::ASSET_HUB_ID), - ), + ], ); - pub KsmLocation: Location = Location::new(2, X1(GlobalConsensus(KusamaNetwork::get()))); + pub KsmLocation: Location = Location::new(2, GlobalConsensus(KusamaNetwork::get())); pub KsmFromAssetHubKusama: (AssetFilter, Location) = ( Wild(AllOf { fun: WildFungible, id: AssetId(KsmLocation::get()) }), diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs index 60a80c7bad..bcce5bd144 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs @@ -79,12 +79,10 @@ parameter_types! { /// Polkadot Network as `Location`. pub PolkadotGlobalConsensusNetworkLocation: Location = Location { parents: 2, - interior: X1(GlobalConsensus(PolkadotGlobalConsensusNetwork::get())) + interior: [GlobalConsensus(PolkadotGlobalConsensusNetwork::get())].into() }; /// Interior location (relative to this runtime) of the with-Polkadot messages pallet. - pub BridgeKusamaToPolkadotMessagesPalletInstance: InteriorLocation = X1( - PalletInstance(::index() as u8), - ); + pub BridgeKusamaToPolkadotMessagesPalletInstance: InteriorLocation = PalletInstance(::index() as u8).into(); /// Identifier of the sibling Kusama Asset Hub parachain. pub AssetHubKusamaParaId: cumulus_primitives_core::ParaId = kusama_runtime_constants::system_parachain::ASSET_HUB_ID.into(); @@ -93,16 +91,16 @@ parameter_types! { /// Location of the bridged Polkadot Bridge Hub parachain. pub BridgeHubPolkadotLocation: Location = Location { parents: 2, - interior: X2( + interior: [ GlobalConsensus(PolkadotGlobalConsensusNetwork::get()), Parachain(::PARACHAIN_ID) - ) + ].into() }; /// A route (XCM location and bridge lane) that the Kusama Asset Hub -> Polkadot Asset Hub /// message is following. pub FromAssetHubKusamaToAssetHubPolkadotRoute: SenderAndLane = SenderAndLane::new( - ParentThen(X1(Parachain(AssetHubKusamaParaId::get().into()))).into(), + ParentThen(Parachain(AssetHubKusamaParaId::get().into()).into()).into(), XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, ); @@ -117,7 +115,7 @@ parameter_types! { pub ActiveLanes: sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorLocation))> = sp_std::vec![ ( FromAssetHubKusamaToAssetHubPolkadotRoute::get(), - (PolkadotGlobalConsensusNetwork::get(), X1(Parachain(AssetHubPolkadotParaId::get().into()))) + (PolkadotGlobalConsensusNetwork::get(), Parachain(AssetHubPolkadotParaId::get().into()).into()) ) ]; } @@ -428,8 +426,8 @@ mod tests { assert_eq!( BridgeKusamaToPolkadotMessagesPalletInstance::get(), - X1(PalletInstance( - bp_bridge_hub_kusama::WITH_BRIDGE_KUSAMA_TO_POLKADOT_MESSAGES_PALLET_INDEX + Into::::into(PalletInstance( + bp_bridge_hub_kusama::WITH_BRIDGE_KUSAMA_TO_POLKADOT_MESSAGES_PALLET_INDEX, )) ); diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 68f5176145..8a358e94e7 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -968,7 +968,7 @@ impl_runtime_apis! { ( bridge_to_polkadot_config::FromAssetHubKusamaToAssetHubPolkadotRoute::get().location, NetworkId::Polkadot, - X1(Parachain(bridge_to_polkadot_config::AssetHubPolkadotParaId::get().into())) + Parachain(bridge_to_polkadot_config::AssetHubPolkadotParaId::get().into()).into() ) ) } @@ -1070,7 +1070,7 @@ impl_runtime_apis! { Runtime, bridge_to_polkadot_config::BridgeGrandpaPolkadotInstance, bridge_to_polkadot_config::WithBridgeHubPolkadotMessageBridge, - >(params, generate_xcm_builder_bridge_message_sample(X2(GlobalConsensus(Kusama), Parachain(42)))) + >(params, generate_xcm_builder_bridge_message_sample([GlobalConsensus(Kusama), Parachain(42)].into())) } fn prepare_message_delivery_proof( diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index bb14daa8b2..8e0d5a9562 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -23,7 +23,7 @@ use super::{ XcmpQueue, }; use frame_support::{ - match_types, parameter_types, + parameter_types, traits::{ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs index d3a17e0748..b53da25e62 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs @@ -79,12 +79,10 @@ parameter_types! { /// Kusama Network as `Location`. pub KusamaGlobalConsensusNetworkLocation: Location = Location { parents: 2, - interior: X1(GlobalConsensus(KusamaGlobalConsensusNetwork::get())) + interior: [GlobalConsensus(KusamaGlobalConsensusNetwork::get())].into() }; /// Interior location (relative to this runtime) of the with-Kusama messages pallet. - pub BridgePolkadotToKusamaMessagesPalletInstance: InteriorLocation = X1( - PalletInstance(::index() as u8), - ); + pub BridgePolkadotToKusamaMessagesPalletInstance: InteriorLocation = PalletInstance(::index() as u8).into(); /// Identifier of the sibling Polkadot Asset Hub parachain. pub AssetHubPolkadotParaId: cumulus_primitives_core::ParaId = polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(); @@ -93,16 +91,16 @@ parameter_types! { /// Location of the bridged Kusama Bridge Hub parachain. pub BridgeHubKusamaLocation: Location = Location { parents: 2, - interior: X2( + interior: [ GlobalConsensus(KusamaGlobalConsensusNetwork::get()), Parachain(::PARACHAIN_ID) - ) + ].into() }; /// A route (XCM location and bridge lane) that the Polkadot Asset Hub -> Kusama Asset Hub /// message is following. pub FromAssetHubPolkadotToAssetHubKusamaRoute: SenderAndLane = SenderAndLane::new( - ParentThen(X1(Parachain(AssetHubPolkadotParaId::get().into()))).into(), + ParentThen(Parachain(AssetHubPolkadotParaId::get().into()).into()).into(), XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, ); @@ -117,7 +115,7 @@ parameter_types! { pub ActiveLanes: sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorLocation))> = sp_std::vec![ ( FromAssetHubPolkadotToAssetHubKusamaRoute::get(), - (KusamaGlobalConsensusNetwork::get(), X1(Parachain(AssetHubKusamaParaId::get().into()))) + (KusamaGlobalConsensusNetwork::get(), Parachain(AssetHubKusamaParaId::get().into()).into()) ) ]; } @@ -423,7 +421,7 @@ mod tests { assert_eq!( BridgePolkadotToKusamaMessagesPalletInstance::get(), - X1(PalletInstance( + Into::::into(PalletInstance( bp_bridge_hub_polkadot::WITH_BRIDGE_POLKADOT_TO_KUSAMA_MESSAGES_PALLET_INDEX )) ); diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index d758677eec..dbceca4264 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -968,7 +968,7 @@ impl_runtime_apis! { ( bridge_to_kusama_config::FromAssetHubPolkadotToAssetHubKusamaRoute::get().location, NetworkId::Kusama, - X1(Parachain(bridge_to_kusama_config::AssetHubKusamaParaId::get().into())) + Parachain(bridge_to_kusama_config::AssetHubKusamaParaId::get().into()).into() ) ) } @@ -1070,7 +1070,7 @@ impl_runtime_apis! { Runtime, bridge_to_kusama_config::BridgeGrandpaKusamaInstance, bridge_to_kusama_config::WithBridgeHubKusamaMessageBridge, - >(params, generate_xcm_builder_bridge_message_sample(X2(GlobalConsensus(Polkadot), Parachain(42)))) + >(params, generate_xcm_builder_bridge_message_sample([GlobalConsensus(Polkadot), Parachain(42)].into())) } fn prepare_message_delivery_proof( diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index aef5094889..2051bca78e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -23,7 +23,7 @@ use super::{ XcmpQueue, }; use frame_support::{ - match_types, parameter_types, + parameter_types, traits::{ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; @@ -36,6 +36,7 @@ use parachains_common::{ }, }; use polkadot_parachain_primitives::primitives::Sibling; +use polkadot_runtime_constants::system_parachain; use sp_runtime::traits::AccountIdConversion; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; @@ -59,7 +60,7 @@ parameter_types! { [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())].into(); pub const MaxInstructions: u32 = 100; pub const MaxAssetsIntoHolding: u32 = 64; - pub FellowshipLocation: Location = Location::new(1, Parachain(1001)); + pub FellowshipLocation: Location = Location::new(1, Parachain(system_parachain::COLLECTIVES_ID)); pub const GovernanceLocation: Location = Location::parent(); pub RelayTreasuryLocation: Location = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); @@ -124,11 +125,22 @@ impl Contains for ParentOrParentsPlurality { } } -match_types! { - pub type FellowsPlurality: impl Contains = { - Location { parents: 1, interior: X2(Parachain(1001), Plurality { id: BodyId::Technical, ..}) } - }; +pub struct FellowsPlurality; +impl Contains for FellowsPlurality { + fn contains(location: &Location) -> bool { + matches!( + location.unpack(), + ( + 1, + [ + Parachain(system_parachain::COLLECTIVES_ID), + Plurality { id: BodyId::Technical, .. } + ] + ) + ) + } } + /// A call filter for the XCM Transact instruction. This is a temporary measure until we properly /// account for proof size weights. /// From 11b565d0f91c4c6f5217c57aa3bba1fc2ccfc206 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 19 Feb 2024 12:18:39 +0100 Subject: [PATCH 152/316] [bridges] Fixed BridgeHub unit-tests --- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 3 +- .../bridge-hub-kusama/tests/tests.rs | 30 ++++++++++++------- .../bridge-hub-polkadot/src/lib.rs | 4 ++- .../bridge-hub-polkadot/tests/tests.rs | 30 ++++++++++++------- 4 files changed, 43 insertions(+), 24 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 8a358e94e7..1beb0cef18 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -73,9 +73,10 @@ use parachains_common::{ impls::DealWithFees, message_queue::*, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, }; +pub use system_parachains_constants::SLOT_DURATION; use system_parachains_constants::{ kusama::{consensus::*, currency::*, fee::WeightToFee}, - AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, + AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, }; // XCM Imports diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index a69892be80..a51288756c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -26,22 +26,23 @@ use bridge_hub_kusama_runtime::{ xcm_config::{KsmRelayLocation, RelayNetwork, XcmConfig}, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, - SignedExtra, TransactionPayment, UncheckedExtrinsic, + SignedExtra, TransactionPayment, UncheckedExtrinsic, SLOT_DURATION, }; -use bridge_hub_test_utils::test_cases::from_parachain; +use bridge_hub_test_utils::{test_cases::from_parachain, SlotDurations}; use codec::{Decode, Encode}; use frame_support::{dispatch::GetDispatchInfo, parameter_types, traits::ConstU8}; use parachains_common::{AccountId, AuraId, Balance}; +use sp_consensus_aura::SlotDuration; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ generic::{Era, SignedPayload}, AccountId32, }; -use system_parachains_constants::kusama::fee::WeightToFee; +use system_parachains_constants::kusama::{ + consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee, +}; use xcm::latest::prelude::*; -const ALICE: [u8; 32] = [1u8; 32]; - // Para id of sibling chain used in tests. pub const SIBLING_PARACHAIN_ID: u32 = 1000; @@ -112,6 +113,13 @@ fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys SlotDurations { + SlotDurations { + relay: SlotDuration::from_millis(RELAY_CHAIN_SLOT_DURATION_MILLIS.into()), + para: SlotDuration::from_millis(SLOT_DURATION), + } +} + bridge_hub_test_utils::test_cases::include_teleports_for_native_asset_works!( Runtime, AllPalletsWithoutSystem, @@ -119,11 +127,8 @@ bridge_hub_test_utils::test_cases::include_teleports_for_native_asset_works!( CheckingAccount, WeightToFee, ParachainSystem, - bridge_hub_test_utils::CollatorSessionKeys::new( - AccountId::from(ALICE), - AccountId::from(ALICE), - SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) } - ), + collator_session_keys(), + slot_durations(), ExistentialDeposit::get(), Box::new(|runtime_event_encoded: Vec| { match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { @@ -195,7 +200,7 @@ fn handle_export_message_from_system_parachain_add_to_outbound_queue_works() { _ => None, } }), - || ExportMessage { network: Polkadot, destination: X1(Parachain(AssetHubPolkadotParaId::get().into())), xcm: Xcm(vec![]) }, + || ExportMessage { network: Polkadot, destination: Parachain(AssetHubPolkadotParaId::get().into()).into(), xcm: Xcm(vec![]) }, XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, Some((KsmRelayLocation::get(), ExistentialDeposit::get()).into()), // value should be >= than value generated by `can_calculate_weight_for_paid_export_message_with_reserve_transfer` @@ -217,6 +222,7 @@ fn message_dispatch_routing_works() { ConstU8<2>, >( collator_session_keys(), + slot_durations(), bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, SIBLING_PARACHAIN_ID, Box::new(|runtime_event_encoded: Vec| { @@ -240,6 +246,7 @@ fn message_dispatch_routing_works() { fn relayed_incoming_message_works() { from_parachain::relayed_incoming_message_works::( collator_session_keys(), + slot_durations(), bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, BridgeHubPolkadotChainId::get(), @@ -255,6 +262,7 @@ fn relayed_incoming_message_works() { pub fn complex_relay_extrinsic_works() { from_parachain::complex_relay_extrinsic_works::( collator_session_keys(), + slot_durations(), bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, SIBLING_PARACHAIN_ID, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index dbceca4264..df483fa27b 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -74,10 +74,12 @@ use parachains_common::{ impls::DealWithFees, message_queue::*, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, }; +pub use system_parachains_constants::SLOT_DURATION; use system_parachains_constants::{ polkadot::{consensus::*, currency::*, fee::WeightToFee}, - AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, + AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, }; + // XCM Imports use xcm::prelude::*; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index 8d0423f4ee..492ca96769 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -27,22 +27,23 @@ use bridge_hub_polkadot_runtime::{ xcm_config::{DotRelayLocation, RelayNetwork, XcmConfig}, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, - SignedExtra, TransactionPayment, UncheckedExtrinsic, + SignedExtra, TransactionPayment, UncheckedExtrinsic, SLOT_DURATION, }; -use bridge_hub_test_utils::test_cases::from_parachain; +use bridge_hub_test_utils::{test_cases::from_parachain, SlotDurations}; use codec::{Decode, Encode}; use frame_support::{dispatch::GetDispatchInfo, parameter_types, traits::ConstU8}; use parachains_common::{AccountId, AuraId, Balance}; +use sp_consensus_aura::SlotDuration; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ generic::{Era, SignedPayload}, AccountId32, }; -use system_parachains_constants::polkadot::fee::WeightToFee; +use system_parachains_constants::polkadot::{ + consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee, +}; use xcm::latest::prelude::*; -const ALICE: [u8; 32] = [1u8; 32]; - // Para id of sibling chain used in tests. pub const SIBLING_PARACHAIN_ID: u32 = 1000; @@ -113,6 +114,13 @@ fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys SlotDurations { + SlotDurations { + relay: SlotDuration::from_millis(RELAY_CHAIN_SLOT_DURATION_MILLIS.into()), + para: SlotDuration::from_millis(SLOT_DURATION), + } +} + bridge_hub_test_utils::test_cases::include_teleports_for_native_asset_works!( Runtime, AllPalletsWithoutSystem, @@ -120,11 +128,8 @@ bridge_hub_test_utils::test_cases::include_teleports_for_native_asset_works!( CheckingAccount, WeightToFee, ParachainSystem, - bridge_hub_test_utils::CollatorSessionKeys::new( - AccountId::from(ALICE), - AccountId::from(ALICE), - SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) } - ), + collator_session_keys(), + slot_durations(), ExistentialDeposit::get(), Box::new(|runtime_event_encoded: Vec| { match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { @@ -196,7 +201,7 @@ fn handle_export_message_from_system_parachain_add_to_outbound_queue_works() { _ => None, } }), - || ExportMessage { network: Kusama, destination: X1(Parachain(AssetHubKusamaParaId::get().into())), xcm: Xcm(vec![]) }, + || ExportMessage { network: Kusama, destination: Parachain(AssetHubKusamaParaId::get().into()).into(), xcm: Xcm(vec![]) }, XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, Some((DotRelayLocation::get(), ExistentialDeposit::get()).into()), // value should be >= than value generated by `can_calculate_weight_for_paid_export_message_with_reserve_transfer` @@ -218,6 +223,7 @@ fn message_dispatch_routing_works() { ConstU8<2>, >( collator_session_keys(), + slot_durations(), bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, SIBLING_PARACHAIN_ID, Box::new(|runtime_event_encoded: Vec| { @@ -241,6 +247,7 @@ fn message_dispatch_routing_works() { fn relayed_incoming_message_works() { from_parachain::relayed_incoming_message_works::( collator_session_keys(), + slot_durations(), bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, BridgeHubKusamaChainId::get(), @@ -256,6 +263,7 @@ fn relayed_incoming_message_works() { pub fn complex_relay_extrinsic_works() { from_parachain::complex_relay_extrinsic_works::( collator_session_keys(), + slot_durations(), bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, SIBLING_PARACHAIN_ID, From 273557cfb0854ccd8305eea4e44982f7af822ea1 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 19 Feb 2024 13:45:19 +0200 Subject: [PATCH 153/316] updates after pulling from 1.7.0 --- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 4 ++-- .../bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 793d165edc..188c6bb99f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -30,7 +30,7 @@ pub mod xcm_config; use bridge_hub_common::AggregateMessageOrigin; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::ParaId; -use parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; +use parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; use snowbridge_beacon_primitives::{Fork, ForkVersions}; use snowbridge_core::{ gwei, meth, outbound::Message, AgentId, AllowSiblingsOnly, PricingParameters, Rewards, @@ -90,7 +90,7 @@ use polkadot_runtime_common::prod_or_fast; use system_parachains_constants::{ kusama::{ consensus::*, - currency::{EXISTENTIAL_DEPOSIT, *}, + currency::*, fee::WeightToFee, }, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 121ead404b..d74eae60c2 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -46,7 +46,7 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor, - FungibleAdapter, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, + FungibleAdapter, HandleFee, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, @@ -295,7 +295,7 @@ impl xcm_executor::Config for XcmConfig { XcmExportFeeToSibling< bp_kusama::Balance, AccountId, - TokenLocation, + KsmRelayLocation, EthereumNetwork, Self::AssetTransactor, crate::EthereumOutboundQueue, From 1c8b80f06ee6299ed8684f50b35f5c641362b221 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 19 Feb 2024 13:48:47 +0200 Subject: [PATCH 154/316] fmt --- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 188c6bb99f..ff00e7b281 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -88,11 +88,7 @@ use parachains_common::{ use polkadot_runtime_common::prod_or_fast; use system_parachains_constants::{ - kusama::{ - consensus::*, - currency::*, - fee::WeightToFee, - }, + kusama::{consensus::*, currency::*, fee::WeightToFee}, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; From d3813893dc5048c2f2fb8054e88ce81cf0d056a1 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 19 Feb 2024 16:06:04 +0100 Subject: [PATCH 155/316] WIP: more XCMv4 and AssetHubKusama tests fix --- .../asset-hubs/asset-hub-kusama/src/lib.rs | 84 ++++++++++-------- .../asset-hub-kusama/src/xcm_config.rs | 18 ++-- .../asset-hub-kusama/tests/tests.rs | 85 ++++++++++++------- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 15 ++-- .../asset-hub-polkadot/src/xcm_config.rs | 6 +- .../asset-hub-polkadot/tests/tests.rs | 4 +- 6 files changed, 125 insertions(+), 87 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index e2db1ede32..d8f4173aeb 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -31,7 +31,7 @@ use assets_common::{ foreign_creators::ForeignCreators, local_and_foreign_assets::{LocalFromLeft, TargetFromLeft}, matching::FromSiblingParachain, - AssetIdForTrustBackedAssetsConvert, LocationForAssetId, + AssetIdForTrustBackedAssetsConvert, }; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; @@ -74,16 +74,16 @@ use parachains_common::{ BlockNumber, Hash, Header, Nonce, Signature, }; use sp_runtime::RuntimeDebug; +pub use system_parachains_constants::SLOT_DURATION; use system_parachains_constants::{ kusama::{consensus::*, currency::*, fee::WeightToFee}, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, - SLOT_DURATION, }; -use xcm::opaque::v3::Location; +use xcm::latest::prelude::{AssetId, BodyId}; use xcm_config::{ FellowshipLocation, ForeignAssetsConvertedConcreteId, ForeignCreatorsSovereignAccountOf, - GovernanceLocation, KsmLocation, PoolAssetsConvertedConcreteId, - TrustBackedAssetsConvertedConcreteId, TrustBackedAssetsPalletLocation, + GovernanceLocation, KsmLocation, KsmLocationV3, PoolAssetsConvertedConcreteId, + TrustBackedAssetsConvertedConcreteId, TrustBackedAssetsPalletLocationV3, }; #[cfg(any(feature = "std", test))] @@ -92,7 +92,6 @@ pub use sp_runtime::BuildStorage; // Polkadot imports use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; -use xcm::prelude::*; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; @@ -322,15 +321,25 @@ impl pallet_assets::Config for Runtime { type BenchmarkHelper = (); } -/// Union fungibles implementation for `Assets`` and `ForeignAssets`. +/// Union fungibles implementation for `Assets` and `ForeignAssets`. pub type LocalAndForeignAssets = fungibles::UnionOf< Assets, ForeignAssets, LocalFromLeft< - AssetIdForTrustBackedAssetsConvert, + AssetIdForTrustBackedAssetsConvert, AssetIdForTrustBackedAssets, + xcm::v3::Location, >, - Location, + xcm::v3::Location, + AccountId, +>; + +/// Union fungibles implementation for [`LocalAndForeignAssets`] and `Balances`. +pub type NativeAndAssets = fungible::UnionOf< + Balances, + LocalAndForeignAssets, + TargetFromLeft, + xcm::v3::Location, AccountId, >; @@ -338,21 +347,15 @@ impl pallet_asset_conversion::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; type HigherPrecisionBalance = sp_core::U256; - type AssetKind = Location; - type Assets = fungible::UnionOf< - Balances, - LocalAndForeignAssets, - TargetFromLeft, - Self::AssetKind, - Self::AccountId, - >; + type AssetKind = xcm::v3::Location; + type Assets = NativeAndAssets; type PoolId = (Self::AssetKind, Self::AssetKind); type PoolLocator = - pallet_asset_conversion::WithFirstAsset; + pallet_asset_conversion::WithFirstAsset; type PoolAssetId = u32; type PoolAssets = PoolAssets; type PoolSetupFee = ConstU128<0>; // Asset class deposit fees are sufficient to prevent spam - type PoolSetupFeeAsset = KsmLocation; + type PoolSetupFeeAsset = KsmLocationV3; type PoolSetupFeeTarget = ResolveAssetTo; type LiquidityWithdrawalFee = LiquidityWithdrawalFee; type LPFee = ConstU32<3>; @@ -362,9 +365,10 @@ impl pallet_asset_conversion::Config for Runtime { type WeightInfo = weights::pallet_asset_conversion::WeightInfo; #[cfg(feature = "runtime-benchmarks")] type BenchmarkHelper = assets_common::benchmarks::AssetPairFactory< - KsmLocation, + KsmLocationV3, parachain_info::Pallet, - xcm_config::AssetsPalletIndex, + xcm_config::TrustBackedAssetsPalletIndex, + xcm::v3::Location, >; } @@ -385,13 +389,14 @@ pub type ForeignAssetsInstance = pallet_assets::Instance2; impl pallet_assets::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; - type AssetId = LocationForAssetId; - type AssetIdParameter = LocationForAssetId; + type AssetId = xcm::v3::Location; + type AssetIdParameter = xcm::v3::Location; type Currency = Balances; type CreateOrigin = ForeignCreators< - (FromSiblingParachain>,), + (FromSiblingParachain, xcm::v3::Location>,), ForeignCreatorsSovereignAccountOf, AccountId, + xcm::v3::Location, >; type ForceOrigin = AssetsForceOrigin; type AssetDeposit = ForeignAssetsAssetDeposit; @@ -772,7 +777,8 @@ impl pallet_collator_selection::Config for Runtime { impl pallet_asset_conversion_tx_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Fungibles = LocalAndForeignAssets; - type OnChargeAssetTransaction = AssetConversionAdapter; + type OnChargeAssetTransaction = + AssetConversionAdapter; } parameter_types! { @@ -1122,18 +1128,18 @@ impl_runtime_apis! { impl pallet_asset_conversion::AssetConversionApi< Block, Balance, - Location, + xcm::v3::Location, > for Runtime { - fn quote_price_exact_tokens_for_tokens(asset1: Location, asset2: Location, amount: Balance, include_fee: bool) -> Option { + fn quote_price_exact_tokens_for_tokens(asset1: xcm::v3::Location, asset2: xcm::v3::Location, amount: Balance, include_fee: bool) -> Option { AssetConversion::quote_price_exact_tokens_for_tokens(asset1, asset2, amount, include_fee) } - fn quote_price_tokens_for_exact_tokens(asset1: Location, asset2: Location, amount: Balance, include_fee: bool) -> Option { + fn quote_price_tokens_for_exact_tokens(asset1: xcm::v3::Location, asset2: xcm::v3::Location, amount: Balance, include_fee: bool) -> Option { AssetConversion::quote_price_tokens_for_exact_tokens(asset1, asset2, amount, include_fee) } - fn get_reserves(asset1: Location, asset2: Location) -> Option<(Balance, Balance)> { + fn get_reserves(asset1: xcm::v3::Location, asset2: xcm::v3::Location) -> Option<(Balance, Balance)> { AssetConversion::get_reserves(asset1, asset2).ok() } } @@ -1298,6 +1304,10 @@ impl_runtime_apis! { ) -> Result, sp_runtime::RuntimeString> { use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; use sp_storage::TrackedStorageKey; + use xcm::latest::prelude::{ + Asset, Fungible, Here, InteriorLocation, Junction, Junction::*, Location, NetworkId, + NonFungible, Parent, ParentThen, Response, XCM_VERSION, + }; use frame_system_benchmarking::Pallet as SystemBench; impl frame_system_benchmarking::Config for Runtime { @@ -1314,7 +1324,6 @@ impl_runtime_apis! { use cumulus_pallet_session_benchmarking::Pallet as SessionBench; impl cumulus_pallet_session_benchmarking::Config for Runtime {} - use xcm::latest::prelude::*; use xcm_config::{KsmLocation, MaxAssetsIntoHolding}; use pallet_xcm_benchmarks::asset_instance_from; @@ -1351,7 +1360,7 @@ impl_runtime_apis! { } fn set_up_complex_asset_transfer( - ) -> Option<(Assets, u32, Location, Box)> { + ) -> Option<(xcm::v4::Assets, u32, Location, Box)> { // Transfer to Relay some local AH asset (local-reserve-transfer) while paying // fees using teleported native token. // (We don't care that Relay doesn't accept incoming unknown AH local asset) @@ -1382,7 +1391,7 @@ impl_runtime_apis! { ); let transfer_asset: Asset = (asset_location, asset_amount).into(); - let assets: Assets = vec![fee_asset.clone(), transfer_asset].into(); + let assets: xcm::v4::Assets = vec![fee_asset.clone(), transfer_asset].into(); let fee_index = if assets.get(0).unwrap().eq(&fee_asset) { 0 } else { 1 }; // verify transferred successfully @@ -1418,7 +1427,7 @@ impl_runtime_apis! { fn valid_destination() -> Result { Ok(KsmLocation::get()) } - fn worst_case_holding(depositable_count: u32) -> Assets { + fn worst_case_holding(depositable_count: u32) -> xcm::v4::Assets { // A mix of fungible, non-fungible, and concrete assets. let holding_non_fungibles = MaxAssetsIntoHolding::get() / 2 - depositable_count; let holding_fungibles = holding_non_fungibles.saturating_sub(1); @@ -1483,7 +1492,7 @@ impl_runtime_apis! { (0u64, Response::Version(Default::default())) } - fn worst_case_asset_exchange() -> Result<(Assets, Assets), BenchmarkError> { + fn worst_case_asset_exchange() -> Result<(xcm::v4::Assets, xcm::v4::Assets), BenchmarkError> { Err(BenchmarkError::Skip) } @@ -1500,9 +1509,9 @@ impl_runtime_apis! { Ok(KsmLocation::get()) } - fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError> { + fn claimable_asset() -> Result<(Location, Location, xcm::v4::Assets), BenchmarkError> { let origin = KsmLocation::get(); - let assets: Assets = (AssetId(KsmLocation::get()), 1_000 * UNITS).into(); + let assets: xcm::v4::Assets = (AssetId(KsmLocation::get()), 1_000 * UNITS).into(); let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } @@ -1547,7 +1556,7 @@ impl_runtime_apis! { let bridged_asset_hub = xcm_config::bridging::to_polkadot::AssetHubPolkadot::get(); let _ = PolkadotXcm::force_xcm_version( RuntimeOrigin::root(), - Box::new(bridged_asset_hub), + Box::new(bridged_asset_hub.clone()), XCM_VERSION, ).map_err(|e| { log::error!( @@ -1613,6 +1622,7 @@ parameter_types! { impl pallet_state_trie_migration::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; + type RuntimeHoldReason = RuntimeHoldReason; type SignedDepositPerItem = MigrationSignedDepositPerItem; type SignedDepositBase = MigrationSignedDepositBase; // An origin that can control the whole pallet: should be Root, or a part of your council. diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 44da3077fd..b08d3e6b08 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -53,13 +53,17 @@ use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { pub const KsmLocation: Location = Location::parent(); + pub const KsmLocationV3: xcm::v3::Location = xcm::v3::Location::parent(); pub const RelayNetwork: Option = Some(NetworkId::Kusama); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())].into(); pub UniversalLocationNetworkId: NetworkId = UniversalLocation::get().global_consensus().unwrap(); - pub AssetsPalletIndex: u32 = ::index() as u32; - pub TrustBackedAssetsPalletLocation: Location = PalletInstance(AssetsPalletIndex::get() as u8).into(); + + pub TrustBackedAssetsPalletIndex: u8 = ::index() as u8; + pub TrustBackedAssetsPalletLocation: Location = PalletInstance(TrustBackedAssetsPalletIndex::get()).into(); + pub TrustBackedAssetsPalletLocationV3: xcm::v3::Location = xcm::v3::Junction::PalletInstance(TrustBackedAssetsPalletIndex::get()).into(); + pub ForeignAssetsPalletLocation: Location = PalletInstance(::index() as u8).into(); pub PoolAssetsPalletLocation: Location = @@ -89,7 +93,7 @@ pub type LocationToAccountId = ( ); /// Means for transacting the native currency on this chain. -pub type CurrencyTransactor = FungibleAdapter< +pub type FungibleTransactor = FungibleAdapter< // Use this currency: Balances, // Use this currency when it is a fungible asset matching the given location or name: @@ -177,7 +181,7 @@ pub type PoolFungiblesTransactor = FungiblesAdapter< /// Means for transacting assets on this chain. pub type AssetTransactors = - (CurrencyTransactor, FungiblesTransactor, ForeignFungiblesTransactor, PoolFungiblesTransactor); + (FungibleTransactor, FungiblesTransactor, ForeignFungiblesTransactor, PoolFungiblesTransactor); /// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, /// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can @@ -639,9 +643,9 @@ pub type ForeignCreatorsSovereignAccountOf = ( /// Simple conversion of `u32` into an `AssetId` for use in benchmarking. pub struct XcmBenchmarkHelper; #[cfg(feature = "runtime-benchmarks")] -impl pallet_assets::BenchmarkHelper for XcmBenchmarkHelper { - fn create_asset_id_parameter(id: u32) -> Location { - Location { parents: 1, interior: Parachain(id).into() } +impl pallet_assets::BenchmarkHelper for XcmBenchmarkHelper { + fn create_asset_id_parameter(id: u32) -> xcm::v3::Location { + xcm::v3::Location::new(1, xcm::v3::Junction::Parachain(id)) } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index a8f0413445..a9eed57c25 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -27,7 +27,7 @@ use asset_hub_kusama_runtime::{ AllPalletsWithoutSystem, AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets, ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, - ToPolkadotXcmRouterInstance, TrustBackedAssetsInstance, XcmpQueue, + ToPolkadotXcmRouterInstance, TrustBackedAssetsInstance, XcmpQueue, SLOT_DURATION, }; use asset_test_utils::{ test_cases_over_bridge::TestBridgingConfig, CollatorSessionKey, CollatorSessionKeys, ExtBuilder, @@ -40,16 +40,21 @@ use frame_support::{ weights::{Weight, WeightToFee as WeightToFeeT}, }; use parachains_common::{AccountId, AssetIdForTrustBackedAssets, AuraId, Balance}; +use parachains_runtimes_test_utils::SlotDurations; +use sp_consensus_aura::SlotDuration; use sp_runtime::traits::MaybeEquivalence; -use system_parachains_constants::kusama::fee::WeightToFee; -use xcm::latest::prelude::*; -use xcm_executor::traits::{Identity, JustTry, WeightTrader}; +use system_parachains_constants::kusama::{ + consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee, +}; +use xcm::latest::prelude::{Assets as XcmAssets, *}; +use xcm_builder::V4V3LocationConverter; +use xcm_executor::traits::{JustTry, WeightTrader}; const ALICE: [u8; 32] = [1u8; 32]; const SOME_ASSET_ADMIN: [u8; 32] = [5u8; 32]; -type AssetIdForTrustBackedAssetsConvert = - assets_common::AssetIdForTrustBackedAssetsConvert; +type AssetIdForTrustBackedAssetsConvertLatest = + assets_common::AssetIdForTrustBackedAssetsConvertLatest; type RuntimeHelper = asset_test_utils::RuntimeHelper; @@ -69,6 +74,13 @@ fn collator_session_keys() -> CollatorSessionKeys { ) } +fn slot_durations() -> SlotDurations { + SlotDurations { + relay: SlotDuration::from_millis(RELAY_CHAIN_SLOT_DURATION_MILLIS.into()), + para: SlotDuration::from_millis(SLOT_DURATION), + } +} + #[test] fn test_ed_is_one_hundredth_of_relay() { ExtBuilder::::default() @@ -118,7 +130,7 @@ fn test_asset_xcm_trader() { // get asset id as location let asset_location = - AssetIdForTrustBackedAssetsConvert::convert_back(&local_asset_id).unwrap(); + AssetIdForTrustBackedAssetsConvertLatest::convert_back(&local_asset_id).unwrap(); // Set Alice as block author, who will receive fees RuntimeHelper::run_to_block(2, AccountId::from(ALICE)); @@ -136,7 +148,8 @@ fn test_asset_xcm_trader() { // Lets pay with: asset_amount_needed + asset_amount_extra let asset_amount_extra = 100_u128; - let asset: Asset = (asset_location, asset_amount_needed + asset_amount_extra).into(); + let asset: Asset = + (asset_location.clone(), asset_amount_needed + asset_amount_extra).into(); let mut trader = ::Trader::new(); let ctx = XcmContext { origin: None, message_id: XcmHash::default(), topic: None }; @@ -201,12 +214,13 @@ fn test_asset_xcm_trader_with_refund() { // We are going to buy 4e9 weight let bought = Weight::from_parts(4_000_000_000u64, 0); - let asset_location = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); + let asset_location = + AssetIdForTrustBackedAssetsConvertLatest::convert_back(&1).unwrap(); // lets calculate amount needed let amount_bought = WeightToFee::weight_to_fee(&bought); - let asset: Asset = (asset_location, amount_bought).into(); + let asset: Asset = (asset_location.clone(), amount_bought).into(); // Make sure buy_weight does not return an error assert_ok!(trader.buy_weight(bought, asset.clone().into(), &ctx)); @@ -273,7 +287,8 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { // We are going to buy small amount let bought = Weight::from_parts(50_000_000u64, 0); - let asset_location = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); + let asset_location = + AssetIdForTrustBackedAssetsConvertLatest::convert_back(&1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -325,7 +340,8 @@ fn test_that_buying_ed_refund_does_not_refund() { // We are gonna buy ED let bought = Weight::from_parts(ExistentialDeposit::get().try_into().unwrap(), 0); - let asset_location = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); + let asset_location = + AssetIdForTrustBackedAssetsConvertLatest::convert_back(&1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -336,7 +352,7 @@ fn test_that_buying_ed_refund_does_not_refund() { // We know we will have to buy at least ED, so lets make sure first it will // fail with a payment of less than ED - let asset: Asset = (asset_location, amount_bought).into(); + let asset: Asset = (asset_location.clone(), amount_bought).into(); assert_noop!(trader.buy_weight(bought, asset.into(), &ctx), XcmError::TooExpensive); // Now lets buy ED at least @@ -401,7 +417,8 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { // lets calculate amount needed let asset_amount_needed = WeightToFee::weight_to_fee(&bought); - let asset_location = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); + let asset_location = + AssetIdForTrustBackedAssetsConvertLatest::convert_back(&1).unwrap(); let asset: Asset = (asset_location, asset_amount_needed).into(); @@ -433,8 +450,10 @@ fn test_assets_balances_api_works() { .build() .execute_with(|| { let local_asset_id = 1; - let foreign_asset_id_location = - Location { parents: 1, interior: X2(Parachain(1234), GeneralIndex(12345)) }; + let foreign_asset_id_location = xcm::v3::Location::new( + 1, + [xcm::v3::Junction::Parachain(1234), xcm::v3::Junction::GeneralIndex(12345)], + ); // check before assert_eq!(Assets::balance(local_asset_id, AccountId::from(ALICE)), 0); @@ -445,7 +464,7 @@ fn test_assets_balances_api_works() { assert_eq!(Balances::free_balance(AccountId::from(ALICE)), 0); assert!(Runtime::query_account_balances(AccountId::from(ALICE)) .unwrap() - .try_as::() + .try_as::() .unwrap() .is_none()); @@ -501,7 +520,7 @@ fn test_assets_balances_api_works() { ); assert_eq!(Balances::free_balance(AccountId::from(ALICE)), some_currency); - let result: Assets = Runtime::query_account_balances(AccountId::from(ALICE)) + let result: XcmAssets = Runtime::query_account_balances(AccountId::from(ALICE)) .unwrap() .try_into() .unwrap(); @@ -516,13 +535,13 @@ fn test_assets_balances_api_works() { ))); // check trusted asset assert!(result.inner().iter().any(|asset| asset.eq(&( - AssetIdForTrustBackedAssetsConvert::convert_back(&local_asset_id).unwrap(), + AssetIdForTrustBackedAssetsConvertLatest::convert_back(&local_asset_id).unwrap(), minimum_asset_balance ) .into()))); // check foreign asset assert!(result.inner().iter().any(|asset| asset.eq(&( - Identity::convert_back(&foreign_asset_id_location).unwrap(), + V4V3LocationConverter::convert_back(&foreign_asset_id_location).unwrap(), 6 * foreign_asset_minimum_asset_balance ) .into()))); @@ -537,6 +556,7 @@ asset_test_utils::include_teleports_for_native_asset_works!( WeightToFee, ParachainSystem, collator_session_keys(), + slot_durations(), ExistentialDeposit::get(), Box::new(|runtime_event_encoded: Vec| { match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { @@ -557,6 +577,7 @@ asset_test_utils::include_teleports_for_foreign_assets_works!( ForeignCreatorsSovereignAccountOf, ForeignAssetsInstance, collator_session_keys(), + slot_durations(), ExistentialDeposit::get(), Box::new(|runtime_event_encoded: Vec| { match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { @@ -593,7 +614,7 @@ asset_test_utils::include_asset_transactor_transfer_with_pallet_assets_instance_ XcmConfig, TrustBackedAssetsInstance, AssetIdForTrustBackedAssets, - AssetIdForTrustBackedAssetsConvert, + AssetIdForTrustBackedAssetsConvertLatest, collator_session_keys(), ExistentialDeposit::get(), 12345, @@ -610,11 +631,14 @@ asset_test_utils::include_asset_transactor_transfer_with_pallet_assets_instance_ Runtime, XcmConfig, ForeignAssetsInstance, - Location, + xcm::v3::Location, JustTry, collator_session_keys(), ExistentialDeposit::get(), - Location { parents: 1, interior: X2(Parachain(1313), GeneralIndex(12345)) }, + xcm::v3::Location::new( + 1, + [xcm::v3::Junction::Parachain(1313), xcm::v3::Junction::GeneralIndex(12345)] + ), Box::new(|| { assert!(Assets::asset_ids().collect::>().is_empty()); }), @@ -629,8 +653,8 @@ asset_test_utils::include_create_and_manage_foreign_assets_for_local_consensus_p WeightToFee, ForeignCreatorsSovereignAccountOf, ForeignAssetsInstance, - Location, - JustTry, + xcm::v3::Location, + V4V3LocationConverter, collator_session_keys(), ExistentialDeposit::get(), AssetDeposit::get(), @@ -679,6 +703,7 @@ fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_polkadot_works( LocationToAccountId, >( collator_session_keys(), + slot_durations(), ExistentialDeposit::get(), AccountId::from(ALICE), Box::new(|runtime_event_encoded: Vec| { @@ -701,7 +726,7 @@ fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_polkadot_works( } #[test] -fn receive_reserve_asset_deposited_roc_from_asset_hub_polkadot_works() { +fn receive_reserve_asset_deposited_dot_from_asset_hub_polkadot_works() { const BLOCK_AUTHOR_ACCOUNT: [u8; 32] = [13; 32]; asset_test_utils::test_cases_over_bridge::receive_reserve_asset_deposited_from_different_consensus_works::< Runtime, @@ -714,13 +739,13 @@ fn receive_reserve_asset_deposited_roc_from_asset_hub_polkadot_works() { ExistentialDeposit::get(), AccountId::from([73; 32]), AccountId::from(BLOCK_AUTHOR_ACCOUNT), - // receiving ROCs - (Location { parents: 2, interior: X1(GlobalConsensus(Polkadot)) }, 1000000000000, 1_000_000_000), + // receiving DOTs + (xcm::v3::Location::new(2, [xcm::v3::Junction::GlobalConsensus(xcm::v3::NetworkId::Polkadot)]), 1000000000000, 1_000_000_000), bridging_to_asset_hub_polkadot, ( - X1(PalletInstance(bp_bridge_hub_kusama::WITH_BRIDGE_KUSAMA_TO_POLKADOT_MESSAGES_PALLET_INDEX)), + PalletInstance(bp_bridge_hub_kusama::WITH_BRIDGE_KUSAMA_TO_POLKADOT_MESSAGES_PALLET_INDEX).into(), GlobalConsensus(Polkadot), - X1(Parachain(1000)) + Parachain(1000).into() ) ) } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index a53434abba..2e7875f698 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -62,9 +62,7 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); mod weights; pub mod xcm_config; -use assets_common::{ - foreign_creators::ForeignCreators, matching::FromSiblingParachain, LocationForAssetId, -}; +use assets_common::{foreign_creators::ForeignCreators, matching::FromSiblingParachain}; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use sp_api::impl_runtime_apis; @@ -318,13 +316,14 @@ pub type ForeignAssetsInstance = pallet_assets::Instance2; impl pallet_assets::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; - type AssetId = LocationForAssetId; - type AssetIdParameter = LocationForAssetId; + type AssetId = xcm::v3::Location; + type AssetIdParameter = xcm::v3::Location; type Currency = Balances; type CreateOrigin = ForeignCreators< - (FromSiblingParachain>,), + (FromSiblingParachain, xcm::v3::Location>,), ForeignCreatorsSovereignAccountOf, AccountId, + xcm::v3::Location, >; type ForceOrigin = AssetsForceOrigin; type AssetDeposit = ForeignAssetsAssetDeposit; @@ -1232,7 +1231,7 @@ impl_runtime_apis! { } fn set_up_complex_asset_transfer( - ) -> Option<(Assets, u32, Location, Box)> { + ) -> Option<(xcm::v4::Assets, u32, Location, Box)> { // Transfer to Relay some local AH asset (local-reserve-transfer) while paying // fees using teleported native token. // (We don't care that Relay doesn't accept incoming unknown AH local asset) @@ -1263,7 +1262,7 @@ impl_runtime_apis! { ); let transfer_asset: Asset = (asset_location, asset_amount).into(); - let assets: Assets = vec![fee_asset.clone(), transfer_asset].into(); + let assets: xcm::v4::Assets = vec![fee_asset.clone(), transfer_asset].into(); let fee_index = if assets.get(0).unwrap().eq(&fee_asset) { 0 } else { 1 }; // verify transferred successfully diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 838fcdc426..a52aebedbe 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -593,9 +593,9 @@ pub type ForeignCreatorsSovereignAccountOf = ( /// Simple conversion of `u32` into an `AssetId` for use in benchmarking. pub struct XcmBenchmarkHelper; #[cfg(feature = "runtime-benchmarks")] -impl pallet_assets::BenchmarkHelper for XcmBenchmarkHelper { - fn create_asset_id_parameter(id: u32) -> Location { - Location { parents: 1, interior: Parachain(id).into() } +impl pallet_assets::BenchmarkHelper for XcmBenchmarkHelper { + fn create_asset_id_parameter(id: u32) -> xcm::v3::Location { + xcm::v3::Location::new(1, xcm::v3::Junction::Parachain(id)) } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index 159c248300..af84db4a54 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -726,7 +726,7 @@ fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_kusama_works() ) } #[test] -fn receive_reserve_asset_deposited_roc_from_asset_hub_kusama_works() { +fn receive_reserve_asset_deposited_ksm_from_asset_hub_kusama_works() { const BLOCK_AUTHOR_ACCOUNT: [u8; 32] = [13; 32]; asset_test_utils::test_cases_over_bridge::receive_reserve_asset_deposited_from_different_consensus_works::< Runtime, @@ -739,7 +739,7 @@ fn receive_reserve_asset_deposited_roc_from_asset_hub_kusama_works() { ExistentialDeposit::get(), AccountId::from([73; 32]), AccountId::from(BLOCK_AUTHOR_ACCOUNT), - // receiving ROCs + // receiving KSMs (Location { parents: 2, interior: X1(GlobalConsensus(Kusama)) }, 1000000000000, 1_000_000_000), bridging_to_asset_hub_kusama, ( From 2d59678a133b920fb1ce5492b0780d7f645aa413 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 19 Feb 2024 23:11:42 +0100 Subject: [PATCH 156/316] Fix Kusama compilation --- relay/kusama/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index ca902cabd9..b810fd8dbc 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -2746,7 +2746,7 @@ mod init_state_migration { pub struct InitMigrate; impl OnRuntimeUpgrade for InitMigrate { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::DispatchError> { + fn pre_upgrade() -> Result, sp_runtime::DispatchError> { use parity_scale_codec::Encode; let migration_should_start = AutoLimits::::get().is_none() && MigrationProcess::::get() == Default::default(); @@ -2778,7 +2778,7 @@ mod init_state_migration { #[cfg(feature = "try-runtime")] fn post_upgrade( - migration_should_start_bytes: Vec, + migration_should_start_bytes: sp_std::vec::Vec, ) -> Result<(), sp_runtime::DispatchError> { use parity_scale_codec::Decode; let migration_should_start: bool = From a4c749728d4fd881cd61662a5c7858e441f65328 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 20 Feb 2024 09:03:48 +0200 Subject: [PATCH 157/316] fmt --- system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index a5a1a7c85b..d863ea0e3d 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -62,7 +62,10 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); mod weights; pub mod xcm_config; -use assets_common::{foreign_creators::ForeignCreators, matching::{FromNetwork, FromSiblingParachain}}; +use assets_common::{ + foreign_creators::ForeignCreators, + matching::{FromNetwork, FromSiblingParachain}, +}; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use sp_api::impl_runtime_apis; From 3d61bd3f59ad833b15d98339a568420f356b5ed4 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 20 Feb 2024 09:04:41 +0200 Subject: [PATCH 158/316] remove zepter --- .config/zepter.yaml | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 .config/zepter.yaml diff --git a/.config/zepter.yaml b/.config/zepter.yaml deleted file mode 100644 index f701392d16..0000000000 --- a/.config/zepter.yaml +++ /dev/null @@ -1,40 +0,0 @@ -version: - format: 1 - # Minimum version of the binary that is expected to work. This is just for printing a nice error - # message when someone tries to use an older version. - binary: 0.13.2 - -# The examples in this file assume crate `A` to have a dependency on crate `B`. -workflows: - check: - - [ - 'lint', - # Check that `A` activates the features of `B`. - 'propagate-feature', - # These are the features to check: - '--features=try-runtime,runtime-benchmarks,std', - # Do not try to add a new section into `[features]` of `A` only because `B` expose that feature. There are edge-cases where this is still needed, but we can add them manually. - '--left-side-feature-missing=ignore', - # Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on. - '--left-side-outside-workspace=ignore', - # Some features imply that they activate a specific dependency as non-optional. Otherwise the default behaviour with a `?` is used. - '--feature-enables-dep=try-runtime:frame-try-runtime,runtime-benchmarks:frame-benchmarking', - # Auxillary flags: - '--offline', - '--locked', - '--show-path', - '--quiet', - ] - # Same as `check`, but with the `--fix` flag. - default: - - [ $check.0, '--fix' ] - -# Will be displayed when any workflow fails: -help: - text: | - Polkadot-SDK uses the Zepter CLI to detect abnormalities in the feature configuration. - It looks like one more more checks failed; please check the console output. You can try to automatically address them by running `zepter`. - Otherwise please ask directly in the Merge Request, GitHub Discussions or on Matrix Chat, thank you. - links: - - "https://github.com/paritytech/polkadot-sdk/issues/1831" - - "https://github.com/ggwpez/zepter" From 83feb8b05347a99c3ad96e61f90ca1a49ffb76a8 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 20 Feb 2024 09:13:16 +0200 Subject: [PATCH 159/316] fixes after 1.7 updates --- system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs | 2 +- .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 6 +++--- system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs | 2 +- .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 85256e3eda..7c0eaf5e09 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -395,7 +395,7 @@ impl pallet_assets::Config for Runtime { type CreateOrigin = ForeignCreators< ( FromSiblingParachain, xcm::v3::Location>, - FromNetwork, + FromNetwork, ), ForeignCreatorsSovereignAccountOf, AccountId, diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 1a385f593a..68278c73c7 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -834,8 +834,8 @@ pub mod bridging { pub type IsTrustedBridgedReserveLocationForForeignAsset = matching::IsForeignConcreteAsset>; - impl Contains<(MultiLocation, Junction)> for UniversalAliases { - fn contains(alias: &(MultiLocation, Junction)) -> bool { + impl Contains<(Location, Junction)> for UniversalAliases { + fn contains(alias: &(Location, Junction)) -> bool { UniversalAliases::get().contains(alias) } } @@ -847,7 +847,7 @@ pub mod bridging { #[cfg(feature = "runtime-benchmarks")] impl BridgingBenchmarksHelper { - pub fn prepare_universal_alias() -> Option<(MultiLocation, Junction)> { + pub fn prepare_universal_alias() -> Option<(Location, Junction)> { let alias = to_polkadot::UniversalAliases::get().into_iter().find_map( |(location, junction)| { match to_polkadot::SiblingBridgeHubWithBridgeHubPolkadotInstance::get() diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index d863ea0e3d..1b73a7475c 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -325,7 +325,7 @@ impl pallet_assets::Config for Runtime { type CreateOrigin = ForeignCreators< ( FromSiblingParachain, xcm::v3::Location>, - FromNetwork, + FromNetwork, ), ForeignCreatorsSovereignAccountOf, AccountId, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 9bbb9044c7..013461041f 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -763,8 +763,8 @@ pub mod bridging { pub type IsTrustedBridgedReserveLocationForForeignAsset = matching::IsForeignConcreteAsset>; - impl Contains<(MultiLocation, Junction)> for UniversalAliases { - fn contains(alias: &(MultiLocation, Junction)) -> bool { + impl Contains<(Location, Junction)> for UniversalAliases { + fn contains(alias: &(Location, Junction)) -> bool { UniversalAliases::get().contains(alias) } } From 996e1995cc8338456a323359db1d68cf7ad2e868 Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Tue, 20 Feb 2024 09:24:17 +0100 Subject: [PATCH 160/316] upgrade encointer to 1.6.0 --- Cargo.toml | 21 +++ system-parachains/encointer/Cargo.toml | 140 +++++++++--------- system-parachains/encointer/src/lib.rs | 5 - .../src/weights/cumulus_pallet_xcmp_queue.rs | 12 -- 4 files changed, 87 insertions(+), 91 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 01efeb50b9..e16ed53c7d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,3 +41,24 @@ opt-level = 3 inherits = "release" lto = true codegen-units = 1 + +[patch.crates-io] +encointer-balances-tx-payment = { path = "../pallets/balances-tx-payment" } +encointer-balances-tx-payment-rpc = { path = "../pallets/balances-tx-payment/rpc" } +encointer-balances-tx-payment-rpc-runtime-api = { path = "../pallets/balances-tx-payment/rpc/runtime-api" } +encointer-ceremonies-assignment = { path = "../pallets/ceremonies/assignment" } +encointer-primitives = { path = "../pallets/primitives" } +pallet-encointer-balances = { path = "../pallets/balances" } +pallet-encointer-bazaar = { path = "../pallets/bazaar" } +pallet-encointer-bazaar-rpc = { path = "../pallets/bazaar/rpc" } +pallet-encointer-bazaar-rpc-runtime-api = { path = "../pallets/bazaar/rpc/runtime-api" } +pallet-encointer-ceremonies = { path = "../pallets/ceremonies" } +pallet-encointer-ceremonies-rpc = { path = "../pallets/ceremonies/rpc" } +pallet-encointer-ceremonies-rpc-runtime-api = { path = "../pallets/ceremonies/rpc/runtime-api" } +pallet-encointer-communities = { path = "../pallets/communities" } +pallet-encointer-communities-rpc = { path = "../pallets/communities/rpc" } +pallet-encointer-communities-rpc-runtime-api = { path = "../pallets/communities/rpc/runtime-api" } +pallet-encointer-democracy = { path = "../pallets/democracy" } +pallet-encointer-faucet = { path = "../pallets/faucet" } +pallet-encointer-reputation-commitments = { path = "../pallets/reputation-commitments" } +pallet-encointer-scheduler = { path = "../pallets/scheduler" } diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml index 52f7b22fee..68a64cc98f 100644 --- a/system-parachains/encointer/Cargo.toml +++ b/system-parachains/encointer/Cargo.toml @@ -20,89 +20,85 @@ scale-info = { version = "2.10.0", default-features = false, features = [ smallvec = "1.13.1" # encointer deps -encointer-balances-tx-payment = { default-features = false, version = "3.0.2" } -encointer-balances-tx-payment-rpc-runtime-api = { default-features = false, version = "3.0.2" } -encointer-primitives = { default-features = false, version = "3.0.2" } -pallet-encointer-balances = { default-features = false, version = "3.0.2" } -pallet-encointer-bazaar = { default-features = false, version = "3.0.3" } -pallet-encointer-bazaar-rpc-runtime-api = { default-features = false, version = "3.0.2" } -pallet-encointer-ceremonies = { default-features = false, version = "3.0.4" } -pallet-encointer-ceremonies-rpc-runtime-api = { default-features = false, version = "3.0.2" } -pallet-encointer-communities = { default-features = false, version = "3.0.3" } -pallet-encointer-communities-rpc-runtime-api = { default-features = false, version = "3.0.2" } -pallet-encointer-faucet = { default-features = false, version = "3.0.3" } -pallet-encointer-reputation-commitments = { default-features = false, version = "3.0.2" } -pallet-encointer-scheduler = { default-features = false, version = "3.0.3" } +encointer-balances-tx-payment = { default-features = false, version = "5.0.0" } +encointer-balances-tx-payment-rpc-runtime-api = { default-features = false, version = "5.0.0" } +encointer-primitives = { default-features = false, version = "5.0.0" } +pallet-encointer-balances = { default-features = false, version = "5.0.0" } +pallet-encointer-bazaar = { default-features = false, version = "5.0.0" } +pallet-encointer-bazaar-rpc-runtime-api = { default-features = false, version = "5.0.0" } +pallet-encointer-ceremonies = { default-features = false, version = "5.0.0" } +pallet-encointer-ceremonies-rpc-runtime-api = { default-features = false, version = "5.0.0" } +pallet-encointer-communities = { default-features = false, version = "5.0.0" } +pallet-encointer-communities-rpc-runtime-api = { default-features = false, version = "5.0.0" } +pallet-encointer-faucet = { default-features = false, version = "5.0.0" } +pallet-encointer-reputation-commitments = { default-features = false, version = "5.0.0" } +pallet-encointer-scheduler = { default-features = false, version = "5.0.0" } # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-executive = { default-features = false, version = "25.0.0" } -frame-support = { default-features = false, version = "25.0.0" } -frame-system = { default-features = false, version = "25.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "25.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "23.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.31.0" } -pallet-asset-tx-payment = { default-features = false, version = "25.0.0" } -pallet-aura = { default-features = false, version = "24.0.0" } -pallet-balances = { default-features = false, version = "25.0.0" } -pallet-collective = { default-features = false, version = "25.0.0" } -pallet-insecure-randomness-collective-flip = { default-features = false, version = "13.0.0" } -pallet-membership = { default-features = false, version = "25.0.0" } -pallet-proxy = { default-features = false, version = "25.0.0" } -pallet-scheduler = { default-features = false, version = "26.0.0" } -pallet-timestamp = { default-features = false, version = "24.0.0" } -pallet-transaction-payment = { default-features = false, version = "25.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" } -pallet-treasury = { default-features = false, version = "24.0.0" } -pallet-utility = { default-features = false, version = "25.0.0" } -sp-api = { default-features = false, version = "23.0.0" } -sp-block-builder = { default-features = false, version = "23.0.0" } -sp-consensus-aura = { default-features = false, version = "0.29.0" } -sp-core = { default-features = false, version = "25.0.0" } -sp-inherents = { default-features = false, version = "23.0.0" } -sp-offchain = { default-features = false, version = "23.0.0" } -sp-runtime = { default-features = false, version = "28.0.0" } -sp-session = { default-features = false, version = "24.0.0" } -sp-std = { default-features = false, version = "12.0.0" } -sp-transaction-pool = { default-features = false, version = "23.0.0" } -sp-version = { default-features = false, version = "26.0.0" } -sp-genesis-builder = { default-features = false , version = "0.4.0" } +frame-benchmarking = { default-features = false, optional = true, version = "28.0.0" } +frame-executive = { default-features = false, version = "28.0.0" } +frame-support = { default-features = false, version = "28.0.0" } +frame-system = { default-features = false, version = "28.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "28.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "26.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.34.0" } +pallet-asset-tx-payment = { default-features = false, version = "28.0.0" } +pallet-aura = { default-features = false, version = "27.0.0" } +pallet-balances = { default-features = false, version = "28.0.0" } +pallet-collective = { default-features = false, version = "28.0.0" } +pallet-insecure-randomness-collective-flip = { default-features = false, version = "16.0.0" } +pallet-membership = { default-features = false, version = "28.0.0" } +pallet-proxy = { default-features = false, version = "28.0.0" } +pallet-scheduler = { default-features = false, version = "29.0.0" } +pallet-timestamp = { default-features = false, version = "27.0.0" } +pallet-transaction-payment = { default-features = false, version = "28.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "28.0.0" } +pallet-treasury = { default-features = false, version = "28.0.0" } +pallet-utility = { default-features = false, version = "28.0.0" } +sp-api = { default-features = false, version = "26.0.0" } +sp-block-builder = { default-features = false, version = "26.0.0" } +sp-consensus-aura = { default-features = false, version = "0.32.0" } +sp-core = { default-features = false, version = "28.0.0" } +sp-inherents = { default-features = false, version = "26.0.0" } +sp-offchain = { default-features = false, version = "26.0.0" } +sp-runtime = { default-features = false, version = "31.0.0" } +sp-session = { default-features = false, version = "27.0.0" } +sp-std = { default-features = false, version = "14.0.0" } +sp-transaction-pool = { default-features = false, version = "26.0.0" } +sp-version = { default-features = false, version = "29.0.0" } +sp-genesis-builder = { default-features = false , version = "0.7.0" } # Polkadot dependencies -pallet-xcm = { default-features = false, version = "4.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "3.0.0" } -polkadot-runtime-common = { default-features = false, version = "4.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.2" } +pallet-xcm = { default-features = false, version = "7.0.0" } +polkadot-parachain-primitives = { default-features = false, version = "6.0.0" } +polkadot-runtime-common = { default-features = false, version = "7.0.0" } +xcm = { package = "staging-xcm", default-features = false, version = "7.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.0" } # Cumulus dependencies -cumulus-pallet-aura-ext = { default-features = false, version = "0.4.0" } -cumulus-pallet-dmp-queue = { default-features = false, version = "0.4.0" } +cumulus-pallet-aura-ext = { default-features = false, version = "0.7.0" } +cumulus-pallet-dmp-queue = { default-features = false, version = "0.7.0" } cumulus-pallet-parachain-system = { default-features = false, features = [ "parameterized-consensus-hook", -], version = "0.4.0" } -cumulus-pallet-xcm = { default-features = false, version = "0.4.0" } -cumulus-pallet-xcmp-queue = { default-features = false, version = "0.4.0" } -cumulus-primitives-core = { default-features = false, version = "0.4.0" } -cumulus-primitives-timestamp = { default-features = false, version = "0.4.0" } -cumulus-primitives-utility = { default-features = false, version = "0.4.0" } -parachain-info = { package = "staging-parachain-info", default-features = false, version = "0.4.0" } -parachains-common = { default-features = false, version = "4.0.0" } +], version = "0.7.0" } +cumulus-pallet-xcm = { default-features = false, version = "0.7.0" } +cumulus-pallet-xcmp-queue = { default-features = false, version = "0.7.0" } +cumulus-primitives-core = { default-features = false, version = "0.7.0" } +cumulus-primitives-timestamp = { default-features = false, version = "0.7.0" } +cumulus-primitives-utility = { default-features = false, version = "0.7.0" } +parachain-info = { package = "staging-parachain-info", default-features = false, version = "0.7.0" } +parachains-common = { default-features = false, version = "7.0.0" } +system-parachains-constants = { path = "../constants", default-features = false } + +# Used for runtime benchmarking -# TODO: Encointer pallets does not have compatible `polkadot-sdk` versions, -# so we need to copy all the stuff from `system-parachains-constants` and `kusama-runtime-constants`. -#system-parachains-constants = { path = "../constants", default-features = false } -#kusama-runtime-constants = { path = "../../relay/kusama/constants", default-features = false} -polkadot-core-primitives = { default-features = false, version = "4.0.0"} -polkadot-primitives = { default-features = false , version = "4.0.0" } [build-dependencies] -substrate-wasm-builder = { optional = true, version = "14.0.0" } +substrate-wasm-builder = { optional = true, version = "17.0.0" } [dev-dependencies] -system-parachains-constants = { path = "../constants" } -kusama-runtime-constants = { path = "../../relay/kusama/constants" } +kusama-runtime-constants = { path = "../../relay/kusama/constants", default-features = false} [features] default = ["std"] @@ -153,7 +149,6 @@ std = [ "frame-system-rpc-runtime-api/std", "frame-system/std", "frame-try-runtime/std", -# "kusama-runtime-constants/std", "log/std", "pallet-asset-tx-payment/std", "pallet-aura/std", @@ -180,8 +175,6 @@ std = [ "pallet-xcm/std", "parachain-info/std", "parachains-common/std", - "polkadot-core-primitives/std", - "polkadot-primitives/std", "scale-info/std", "sp-api/std", "sp-block-builder/std", @@ -195,7 +188,6 @@ std = [ "sp-std/std", "sp-transaction-pool/std", "sp-version/std", -# "system-parachains-constants/std", "substrate-wasm-builder", "xcm-builder/std", "xcm-executor/std", diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index eb04d4753d..7b1cc1a92f 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -417,7 +417,6 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OnSystemEvent = (); type SelfParaId = parachain_info::Pallet; - type DmpMessageHandler = DmpQueue; type ReservedDmpWeight = ReservedDmpWeight; type OutboundXcmpMessageSource = XcmpQueue; type XcmpMessageHandler = XcmpQueue; @@ -455,10 +454,8 @@ pub type PriceForSiblingParachainDelivery = polkadot_runtime_common::xcm_sender: impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRoot; type ControllerOrigin = EitherOfDiverse< EnsureRoot, EnsureXcm>, @@ -471,8 +468,6 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { // TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) impl cumulus_pallet_dmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRoot; } parameter_types! { diff --git a/system-parachains/encointer/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/encointer/src/weights/cumulus_pallet_xcmp_queue.rs index f10766cb91..95c03085b6 100644 --- a/system-parachains/encointer/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/encointer/src/weights/cumulus_pallet_xcmp_queue.rs @@ -44,16 +44,4 @@ 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 Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) - fn set_config_with_weight() -> Weight { - // Proof Size summary in bytes: - // Measured: `42` - // Estimated: `1527` - // Minimum execution time: 4_285_000 picoseconds. - Weight::from_parts(4_439_000, 0) - .saturating_add(Weight::from_parts(0, 1527)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } } From c32bfbbbd08a08143cc6d166dc8f5fa3a8261fee Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 20 Feb 2024 09:51:55 +0100 Subject: [PATCH 161/316] Adjust fee accroding to the DepositAsset fix for SovereignPaidRemoteExporter --- .../bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs | 2 +- .../bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs index 7bd5797223..2dee00e9b2 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs @@ -98,7 +98,7 @@ frame_support::parameter_types! { /// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Kusama /// BridgeHub. /// (initially was calculated by test `BridgeHubKusama::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`) - pub const BridgeHubKusamaBaseXcmFeeInKsms: u128 = 16_156_041_984; + pub const BridgeHubKusamaBaseXcmFeeInKsms: u128 = 386_365_000; /// Transaction fee that is paid at the Kusama BridgeHub for delivering single inbound message. /// (initially was calculated by test `BridgeHubKusama::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`) diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs index 1926c7c009..5e4b36f658 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs @@ -89,7 +89,7 @@ frame_support::parameter_types! { /// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Polkadot /// BridgeHub. /// (initially was calculated by test `BridgeHubPolkadot::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`) - pub const BridgeHubPolkadotBaseXcmFeeInDots: Balance = 4_846_812_600; + pub const BridgeHubPolkadotBaseXcmFeeInDots: Balance = 115_909_500; /// Transaction fee that is paid at the Polkadot BridgeHub for delivering single inbound message. /// (initially was calculated by test `BridgeHubPolkadot::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`) From 2cbd31ba7096b005189838a509bfa2208082f6c6 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 20 Feb 2024 10:36:13 +0100 Subject: [PATCH 162/316] Fix AssetHubs compilation --- .../asset-hub-kusama/tests/tests.rs | 32 ++++ .../asset-hubs/asset-hub-polkadot/src/lib.rs | 19 +- .../asset-hub-polkadot/tests/tests.rs | 179 +++++++++++------- .../collectives-polkadot/src/lib.rs | 2 +- 4 files changed, 159 insertions(+), 73 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index a9eed57c25..e62859354f 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -805,6 +805,38 @@ fn check_sane_weight_report_bridge_status() { ); } +#[test] +fn change_xcm_bridge_hub_router_base_fee_by_governance_works() { + asset_test_utils::test_cases::change_storage_constant_by_governance_works::< + Runtime, + bridging::XcmBridgeHubRouterBaseFee, + Balance, + >( + collator_session_keys(), + 1000, + Box::new(|call| RuntimeCall::System(call).encode()), + || { + log::error!( + target: "bridges::estimate", + "`bridging::XcmBridgeHubRouterBaseFee` actual value: {} for runtime: {}", + bridging::XcmBridgeHubRouterBaseFee::get(), + ::Version::get(), + ); + ( + bridging::XcmBridgeHubRouterBaseFee::key().to_vec(), + bridging::XcmBridgeHubRouterBaseFee::get(), + ) + }, + |old_value| { + if let Some(new_value) = old_value.checked_add(1) { + new_value + } else { + old_value.checked_sub(1).unwrap() + } + }, + ) +} + #[test] fn change_xcm_bridge_hub_router_byte_fee_by_governance_works() { asset_test_utils::test_cases::change_storage_constant_by_governance_works::< diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 2e7875f698..a5c5384698 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -105,11 +105,12 @@ use parachains_common::{ }; use sp_runtime::RuntimeDebug; +pub use system_parachains_constants::SLOT_DURATION; use system_parachains_constants::{ polkadot::{consensus::*, currency::*, fee::WeightToFee}, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, - SLOT_DURATION, }; +use xcm::latest::prelude::{AssetId, BodyId}; use xcm_config::{ DotLocation, FellowshipLocation, ForeignAssetsConvertedConcreteId, ForeignCreatorsSovereignAccountOf, GovernanceLocation, TrustBackedAssetsConvertedConcreteId, @@ -122,7 +123,6 @@ pub use sp_runtime::BuildStorage; // Polkadot imports use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; -use xcm::prelude::*; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; @@ -1178,6 +1178,10 @@ impl_runtime_apis! { ) -> Result, sp_runtime::RuntimeString> { use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; use sp_storage::TrackedStorageKey; + use xcm::latest::prelude::{ + Asset, Fungible, Here, InteriorLocation, Junction, Junction::*, Location, NetworkId, + NonFungible, Parent, ParentThen, Response, XCM_VERSION, + }; use frame_system_benchmarking::Pallet as SystemBench; impl frame_system_benchmarking::Config for Runtime { @@ -1194,7 +1198,6 @@ impl_runtime_apis! { use cumulus_pallet_session_benchmarking::Pallet as SessionBench; impl cumulus_pallet_session_benchmarking::Config for Runtime {} - use xcm::latest::prelude::*; use xcm_config::{DotLocation, MaxAssetsIntoHolding}; use pallet_xcm_benchmarks::asset_instance_from; @@ -1298,7 +1301,7 @@ impl_runtime_apis! { fn valid_destination() -> Result { Ok(DotLocation::get()) } - fn worst_case_holding(depositable_count: u32) -> Assets { + fn worst_case_holding(depositable_count: u32) -> xcm::v4::Assets { // A mix of fungible, non-fungible, and concrete assets. let holding_non_fungibles = MaxAssetsIntoHolding::get() / 2 - depositable_count; let holding_fungibles = holding_non_fungibles - 1; @@ -1363,7 +1366,7 @@ impl_runtime_apis! { (0u64, Response::Version(Default::default())) } - fn worst_case_asset_exchange() -> Result<(Assets, Assets), BenchmarkError> { + fn worst_case_asset_exchange() -> Result<(xcm::v4::Assets, xcm::v4::Assets), BenchmarkError> { Err(BenchmarkError::Skip) } @@ -1380,9 +1383,9 @@ impl_runtime_apis! { Ok(DotLocation::get()) } - fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError> { + fn claimable_asset() -> Result<(Location, Location, xcm::v4::Assets), BenchmarkError> { let origin = DotLocation::get(); - let assets: Assets = (AssetId(DotLocation::get()), 1_000 * UNITS).into(); + let assets: xcm::v4::Assets = (AssetId(DotLocation::get()), 1_000 * UNITS).into(); let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } @@ -1427,7 +1430,7 @@ impl_runtime_apis! { let bridged_asset_hub = xcm_config::bridging::to_kusama::AssetHubKusama::get(); let _ = PolkadotXcm::force_xcm_version( RuntimeOrigin::root(), - Box::new(bridged_asset_hub), + Box::new(bridged_asset_hub.clone()), XCM_VERSION, ).map_err(|e| { log::error!( diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index af84db4a54..a634415b39 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -27,7 +27,7 @@ use asset_hub_polkadot_runtime::{ AllPalletsWithoutSystem, AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets, ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, - ToKusamaXcmRouterInstance, TrustBackedAssetsInstance, XcmpQueue, + ToKusamaXcmRouterInstance, TrustBackedAssetsInstance, XcmpQueue, SLOT_DURATION, }; use asset_test_utils::{ test_cases_over_bridge::TestBridgingConfig, CollatorSessionKey, CollatorSessionKeys, ExtBuilder, @@ -42,19 +42,27 @@ use frame_support::{ use parachains_common::{ AccountId, AssetHubPolkadotAuraId as AuraId, AssetIdForTrustBackedAssets, Balance, }; +use parachains_runtimes_test_utils::SlotDurations; +use sp_consensus_aura::SlotDuration; use sp_runtime::traits::MaybeEquivalence; -use system_parachains_constants::polkadot::fee::WeightToFee; -use xcm::latest::prelude::*; -use xcm_executor::traits::{Identity, JustTry, WeightTrader}; +use system_parachains_constants::{ + kusama::consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, polkadot::fee::WeightToFee, +}; +use xcm::latest::prelude::{Assets as XcmAssets, *}; +use xcm_builder::V4V3LocationConverter; +use xcm_executor::traits::{JustTry, WeightTrader}; const ALICE: [u8; 32] = [1u8; 32]; const SOME_ASSET_ADMIN: [u8; 32] = [5u8; 32]; -type AssetIdForTrustBackedAssetsConvert = - assets_common::AssetIdForTrustBackedAssetsConvert; +type AssetIdForTrustBackedAssetsConvertLatest = + assets_common::AssetIdForTrustBackedAssetsConvertLatest; type RuntimeHelper = asset_test_utils::RuntimeHelper; +// TODO:(PR#187) needs patched generic test not requiring pallet_asset_conversion (remove also +// #[allow(dead_code)] +#[allow(dead_code)] fn collator_session_key(account: [u8; 32]) -> CollatorSessionKey { CollatorSessionKey::new( AccountId::from(account), @@ -71,6 +79,13 @@ fn collator_session_keys() -> CollatorSessionKeys { ) } +fn slot_durations() -> SlotDurations { + SlotDurations { + relay: SlotDuration::from_millis(RELAY_CHAIN_SLOT_DURATION_MILLIS.into()), + para: SlotDuration::from_millis(SLOT_DURATION), + } +} + #[test] fn test_ed_is_one_hundredth_of_relay() { ExtBuilder::::default() @@ -120,7 +135,7 @@ fn test_asset_xcm_trader() { // get asset id as location let asset_location = - AssetIdForTrustBackedAssetsConvert::convert_back(&local_asset_id).unwrap(); + AssetIdForTrustBackedAssetsConvertLatest::convert_back(&local_asset_id).unwrap(); // Set Alice as block author, who will receive fees RuntimeHelper::run_to_block(2, AccountId::from(ALICE)); @@ -141,7 +156,8 @@ fn test_asset_xcm_trader() { // Lets pay with: asset_amount_needed + asset_amount_extra let asset_amount_extra = 100_u128; - let asset: Asset = (asset_location, asset_amount_needed + asset_amount_extra).into(); + let asset: Asset = + (asset_location.clone(), asset_amount_needed + asset_amount_extra).into(); let mut trader = ::Trader::new(); let ctx = XcmContext { origin: None, message_id: XcmHash::default(), topic: None }; @@ -209,12 +225,13 @@ fn test_asset_xcm_trader_with_refund() { // bit more of weight let bought = Weight::from_parts(400_000_000_000u64, 0); - let asset_location = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); + let asset_location = + AssetIdForTrustBackedAssetsConvertLatest::convert_back(&1).unwrap(); // lets calculate amount needed let amount_bought = WeightToFee::weight_to_fee(&bought); - let asset: Asset = (asset_location, amount_bought).into(); + let asset: Asset = (asset_location.clone(), amount_bought).into(); // Make sure buy_weight does not return an error assert_ok!(trader.buy_weight(bought, asset.clone().into(), &ctx)); @@ -284,7 +301,8 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { // bit more of weight let bought = Weight::from_parts(5_000_000_000u64, 0); - let asset_location = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); + let asset_location = + AssetIdForTrustBackedAssetsConvertLatest::convert_back(&1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -336,7 +354,8 @@ fn test_that_buying_ed_refund_does_not_refund() { // We are gonna buy ED let bought = Weight::from_parts(ExistentialDeposit::get().try_into().unwrap(), 0); - let asset_location = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); + let asset_location = + AssetIdForTrustBackedAssetsConvertLatest::convert_back(&1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -347,7 +366,7 @@ fn test_that_buying_ed_refund_does_not_refund() { // We know we will have to buy at least ED, so lets make sure first it will // fail with a payment of less than ED - let asset: Asset = (asset_location, amount_bought).into(); + let asset: Asset = (asset_location.clone(), amount_bought).into(); assert_noop!(trader.buy_weight(bought, asset.into(), &ctx), XcmError::TooExpensive); // Now lets buy ED at least @@ -415,7 +434,8 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { // lets calculate amount needed let asset_amount_needed = WeightToFee::weight_to_fee(&bought); - let asset_location = AssetIdForTrustBackedAssetsConvert::convert_back(&1).unwrap(); + let asset_location = + AssetIdForTrustBackedAssetsConvertLatest::convert_back(&1).unwrap(); let asset: Asset = (asset_location, asset_amount_needed).into(); @@ -447,8 +467,10 @@ fn test_assets_balances_api_works() { .build() .execute_with(|| { let local_asset_id = 1; - let foreign_asset_id_location = - Location { parents: 1, interior: X2(Parachain(1234), GeneralIndex(12345)) }; + let foreign_asset_id_location = xcm::v3::Location::new( + 1, + [xcm::v3::Junction::Parachain(1234), xcm::v3::Junction::GeneralIndex(12345)], + ); // check before assert_eq!(Assets::balance(local_asset_id, AccountId::from(ALICE)), 0); @@ -459,7 +481,7 @@ fn test_assets_balances_api_works() { assert_eq!(Balances::free_balance(AccountId::from(ALICE)), 0); assert!(Runtime::query_account_balances(AccountId::from(ALICE)) .unwrap() - .try_as::() + .try_as::() .unwrap() .is_none()); @@ -515,7 +537,7 @@ fn test_assets_balances_api_works() { ); assert_eq!(Balances::free_balance(AccountId::from(ALICE)), some_currency); - let result: Assets = Runtime::query_account_balances(AccountId::from(ALICE)) + let result: XcmAssets = Runtime::query_account_balances(AccountId::from(ALICE)) .unwrap() .try_into() .unwrap(); @@ -530,13 +552,13 @@ fn test_assets_balances_api_works() { ))); // check trusted asset assert!(result.inner().iter().any(|asset| asset.eq(&( - AssetIdForTrustBackedAssetsConvert::convert_back(&local_asset_id).unwrap(), + AssetIdForTrustBackedAssetsConvertLatest::convert_back(&local_asset_id).unwrap(), minimum_asset_balance ) .into()))); // check foreign asset assert!(result.inner().iter().any(|asset| asset.eq(&( - Identity::convert_back(&foreign_asset_id_location).unwrap(), + V4V3LocationConverter::convert_back(&foreign_asset_id_location).unwrap(), 6 * foreign_asset_minimum_asset_balance ) .into()))); @@ -551,6 +573,7 @@ asset_test_utils::include_teleports_for_native_asset_works!( WeightToFee, ParachainSystem, collator_session_keys(), + slot_durations(), ExistentialDeposit::get(), Box::new(|runtime_event_encoded: Vec| { match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { @@ -570,11 +593,8 @@ asset_test_utils::include_teleports_for_foreign_assets_works!( ParachainSystem, ForeignCreatorsSovereignAccountOf, ForeignAssetsInstance, - asset_test_utils::CollatorSessionKeys::new( - AccountId::from(ALICE), - AccountId::from(ALICE), - SessionKeys { aura: AuraId::from(sp_core::ed25519::Public::from_raw(ALICE)) } - ), + collator_session_keys(), + slot_durations(), ExistentialDeposit::get(), Box::new(|runtime_event_encoded: Vec| { match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { @@ -611,7 +631,7 @@ asset_test_utils::include_asset_transactor_transfer_with_pallet_assets_instance_ XcmConfig, TrustBackedAssetsInstance, AssetIdForTrustBackedAssets, - AssetIdForTrustBackedAssetsConvert, + AssetIdForTrustBackedAssetsConvertLatest, collator_session_keys(), ExistentialDeposit::get(), 12345, @@ -628,15 +648,14 @@ asset_test_utils::include_asset_transactor_transfer_with_pallet_assets_instance_ Runtime, XcmConfig, ForeignAssetsInstance, - Location, + xcm::v3::Location, JustTry, - asset_test_utils::CollatorSessionKeys::new( - AccountId::from(ALICE), - AccountId::from(ALICE), - SessionKeys { aura: AuraId::from(sp_core::ed25519::Public::from_raw(ALICE)) } - ), + collator_session_keys(), ExistentialDeposit::get(), - Location { parents: 1, interior: X2(Parachain(1313), GeneralIndex(12345)) }, + xcm::v3::Location::new( + 1, + [xcm::v3::Junction::Parachain(1313), xcm::v3::Junction::GeneralIndex(12345)] + ), Box::new(|| { assert!(Assets::asset_ids().collect::>().is_empty()); }), @@ -651,13 +670,9 @@ asset_test_utils::include_create_and_manage_foreign_assets_for_local_consensus_p WeightToFee, ForeignCreatorsSovereignAccountOf, ForeignAssetsInstance, - Location, - JustTry, - asset_test_utils::CollatorSessionKeys::new( - AccountId::from(ALICE), - AccountId::from(ALICE), - SessionKeys { aura: AuraId::from(sp_core::ed25519::Public::from_raw(ALICE)) } - ), + xcm::v3::Location, + V4V3LocationConverter, + collator_session_keys(), ExistentialDeposit::get(), AssetDeposit::get(), MetadataDepositBase::get(), @@ -705,6 +720,7 @@ fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_kusama_works() LocationToAccountId, >( collator_session_keys(), + slot_durations(), ExistentialDeposit::get(), AccountId::from(ALICE), Box::new(|runtime_event_encoded: Vec| { @@ -725,30 +741,33 @@ fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_kusama_works() Some(TreasuryAccount::get()), ) } -#[test] -fn receive_reserve_asset_deposited_ksm_from_asset_hub_kusama_works() { - const BLOCK_AUTHOR_ACCOUNT: [u8; 32] = [13; 32]; - asset_test_utils::test_cases_over_bridge::receive_reserve_asset_deposited_from_different_consensus_works::< - Runtime, - AllPalletsWithoutSystem, - XcmConfig, - LocationToAccountId, - ForeignAssetsInstance, - >( - collator_session_keys().add(collator_session_key(BLOCK_AUTHOR_ACCOUNT)), - ExistentialDeposit::get(), - AccountId::from([73; 32]), - AccountId::from(BLOCK_AUTHOR_ACCOUNT), - // receiving KSMs - (Location { parents: 2, interior: X1(GlobalConsensus(Kusama)) }, 1000000000000, 1_000_000_000), - bridging_to_asset_hub_kusama, - ( - X1(PalletInstance(bp_bridge_hub_polkadot::WITH_BRIDGE_POLKADOT_TO_KUSAMA_MESSAGES_PALLET_INDEX)), - GlobalConsensus(Kusama), - X1(Parachain(1000)) - ) - ) -} + +// TODO:(PR#187) needs patched generic test not requiring pallet_asset_conversion +// #[test] +// fn receive_reserve_asset_deposited_ksm_from_asset_hub_kusama_works() { +// const BLOCK_AUTHOR_ACCOUNT: [u8; 32] = [13; 32]; +// asset_test_utils::test_cases_over_bridge::receive_reserve_asset_deposited_from_different_consensus_works::< +// Runtime, +// AllPalletsWithoutSystem, +// XcmConfig, +// LocationToAccountId, +// ForeignAssetsInstance, +// >( +// collator_session_keys().add(collator_session_key(BLOCK_AUTHOR_ACCOUNT)), +// ExistentialDeposit::get(), +// AccountId::from([73; 32]), +// AccountId::from(BLOCK_AUTHOR_ACCOUNT), +// // receiving KSMs +// (xcm::v3::Location::new(2, [xcm::v3::Junction::GlobalConsensus(xcm::v3::NetworkId::Kusama)]), +// 1000000000000, 1_000_000_000), bridging_to_asset_hub_kusama, +// ( +// PalletInstance(bp_bridge_hub_polkadot::WITH_BRIDGE_POLKADOT_TO_KUSAMA_MESSAGES_PALLET_INDEX). +// into(), GlobalConsensus(Kusama), +// Parachain(1000).into() +// ) +// ) +// } + #[test] fn report_bridge_status_from_xcm_bridge_router_for_kusama_works() { asset_test_utils::test_cases_over_bridge::report_bridge_status_from_xcm_bridge_router_works::< @@ -805,6 +824,38 @@ fn check_sane_weight_report_bridge_status() { ); } +#[test] +fn change_xcm_bridge_hub_router_base_fee_by_governance_works() { + asset_test_utils::test_cases::change_storage_constant_by_governance_works::< + Runtime, + bridging::XcmBridgeHubRouterBaseFee, + Balance, + >( + collator_session_keys(), + 1000, + Box::new(|call| RuntimeCall::System(call).encode()), + || { + log::error!( + target: "bridges::estimate", + "`bridging::XcmBridgeHubRouterBaseFee` actual value: {} for runtime: {}", + bridging::XcmBridgeHubRouterBaseFee::get(), + ::Version::get(), + ); + ( + bridging::XcmBridgeHubRouterBaseFee::key().to_vec(), + bridging::XcmBridgeHubRouterBaseFee::get(), + ) + }, + |old_value| { + if let Some(new_value) = old_value.checked_add(1) { + new_value + } else { + old_value.checked_sub(1).unwrap() + } + }, + ) +} + #[test] fn change_xcm_bridge_hub_router_byte_fee_by_governance_works() { asset_test_utils::test_cases::change_storage_constant_by_governance_works::< diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 4998e602ef..547070bd55 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -486,7 +486,7 @@ impl pallet_aura::Config for Runtime { parameter_types! { pub const PotId: PalletId = PalletId(*b"PotStake"); pub const SessionLength: BlockNumber = 6 * HOURS; - // `StakingAdmin` pluralistic body. + // StakingAdmin pluralistic body. pub const StakingAdminBodyId: BodyId = BodyId::Defense; } From 437115e766f49b884aa1b5633dc83893b4a76fd1 Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Tue, 20 Feb 2024 11:38:35 +0100 Subject: [PATCH 163/316] fix novelties --- Cargo.lock | 7178 +++++------------ Cargo.toml | 20 - .../asset-hubs/asset-hub-kusama/src/lib.rs | 2 +- system-parachains/encointer/Cargo.toml | 10 +- system-parachains/encointer/src/lib.rs | 49 +- .../src/weights/cumulus_pallet_dmp_queue.rs | 131 + .../cumulus_pallet_parachain_system.rs | 80 + .../src/weights/cumulus_pallet_xcmp_queue.rs | 131 +- .../encointer/src/weights/frame_system.rs | 95 +- .../encointer/src/weights/mod.rs | 3 + .../src/weights/pallet_message_queue.rs | 179 + system-parachains/encointer/src/xcm_config.rs | 2 - 12 files changed, 2423 insertions(+), 5457 deletions(-) create mode 100644 system-parachains/encointer/src/weights/cumulus_pallet_dmp_queue.rs create mode 100644 system-parachains/encointer/src/weights/cumulus_pallet_parachain_system.rs create mode 100644 system-parachains/encointer/src/weights/pallet_message_queue.rs diff --git a/Cargo.lock b/Cargo.lock index 121a932fc7..baa1472778 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -197,20 +197,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "aquamarine" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df752953c49ce90719c7bf1fc587bc8227aed04732ea0c0f85e5397d7fdbd1a1" -dependencies = [ - "include_dir", - "itertools 0.10.5", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "aquamarine" version = "0.4.0" @@ -218,7 +204,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "074b80d14d0240b6ce94d68f059a2d26a5d77280ae142662365a21ef6e2594ef" dependencies = [ "include_dir", - "itertools 0.10.5", + "itertools", "proc-macro-error", "proc-macro2", "quote", @@ -260,7 +246,7 @@ dependencies = [ "ark-std", "derivative", "hashbrown 0.13.2", - "itertools 0.10.5", + "itertools", "num-traits", "zeroize", ] @@ -277,7 +263,7 @@ dependencies = [ "ark-std", "derivative", "digest 0.10.7", - "itertools 0.10.5", + "itertools", "num-bigint", "num-traits", "paste", @@ -437,19 +423,19 @@ dependencies = [ "asset-hub-kusama-runtime", "asset-test-utils", "emulated-chains", - "frame-support 28.0.0", + "frame-support", "integration-tests-common", "pallet-asset-conversion", - "pallet-assets 29.0.0", - "pallet-balances 28.0.0", - "pallet-message-queue 31.0.0", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", + "pallet-assets", + "pallet-balances", + "pallet-message-queue", + "pallet-xcm", + "parachains-common", "parity-scale-codec", - "sp-runtime 31.0.1", + "sp-runtime", "staging-kusama-runtime", - "staging-xcm 7.0.0", - "staging-xcm-executor 7.0.3", + "staging-xcm", + "staging-xcm-executor", "system-parachains-constants", "xcm-emulator", ] @@ -464,76 +450,76 @@ dependencies = [ "bp-asset-hub-polkadot", "bp-bridge-hub-kusama", "bp-bridge-hub-polkadot", - "cumulus-pallet-aura-ext 0.7.0", - "cumulus-pallet-dmp-queue 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.3", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "hex-literal", "kusama-runtime-constants", "log", "pallet-asset-conversion", "pallet-asset-conversion-tx-payment", - "pallet-assets 29.0.0", - "pallet-aura 27.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-message-queue 31.0.0", + "pallet-assets", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-message-queue", "pallet-multisig", "pallet-nft-fractionalization", "pallet-nfts", "pallet-nfts-runtime-api", - "pallet-proxy 28.0.0", - "pallet-session 28.0.0", + "pallet-proxy", + "pallet-session", "pallet-state-trie-migration", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", "pallet-uniques", - "pallet-utility 28.0.0", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", "pallet-xcm-bridge-hub-router", - "parachains-common 7.0.0", + "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-runtime-common 7.0.0", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-common", "polkadot-runtime-constants", "primitive-types", "scale-info", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-aura 0.32.0", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", "sp-core 28.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-offchain", + "sp-runtime", + "sp-session", "sp-std 14.0.0", "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "sp-weights 27.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "sp-transaction-pool", + "sp-version", + "sp-weights", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", "system-parachains-constants", ] @@ -544,18 +530,18 @@ dependencies = [ "asset-hub-polkadot-runtime", "asset-test-utils", "emulated-chains", - "frame-support 28.0.0", + "frame-support", "integration-tests-common", - "pallet-assets 29.0.0", - "pallet-balances 28.0.0", - "pallet-message-queue 31.0.0", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", + "pallet-assets", + "pallet-balances", + "pallet-message-queue", + "pallet-xcm", + "parachains-common", "parity-scale-codec", "polkadot-runtime", - "sp-runtime 31.0.1", - "staging-xcm 7.0.0", - "staging-xcm-executor 7.0.3", + "sp-runtime", + "staging-xcm", + "staging-xcm-executor", "system-parachains-constants", "xcm-emulator", ] @@ -570,72 +556,72 @@ dependencies = [ "bp-asset-hub-polkadot", "bp-bridge-hub-kusama", "bp-bridge-hub-polkadot", - "cumulus-pallet-aura-ext 0.7.0", - "cumulus-pallet-dmp-queue 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.3", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-tx-payment 28.0.0", - "pallet-assets 29.0.0", - "pallet-aura 27.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-message-queue 31.0.0", + "pallet-asset-tx-payment", + "pallet-assets", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-message-queue", "pallet-multisig", "pallet-nfts", "pallet-nfts-runtime-api", - "pallet-proxy 28.0.0", - "pallet-session 28.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "pallet-proxy", + "pallet-session", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", "pallet-uniques", - "pallet-utility 28.0.0", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", "pallet-xcm-bridge-hub-router", - "parachains-common 7.0.0", + "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-runtime-common 7.0.0", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-common", "polkadot-runtime-constants", "scale-info", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-aura 0.32.0", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", "sp-core 28.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-offchain", + "sp-runtime", + "sp-session", "sp-std 14.0.0", "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "sp-weights 27.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "sp-transaction-pool", + "sp-version", + "sp-weights", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", "system-parachains-constants", ] @@ -646,33 +632,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcb8a236738d24ef9006c6d775540a433a9d5573d41fa96b49aa305673c3e535" dependencies = [ "assets-common", - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-parachain-inherent 0.7.0", - "cumulus-test-relay-sproof-builder 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-assets 29.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-session 28.0.0", - "pallet-xcm 7.0.0", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-test-relay-sproof-builder", + "frame-support", + "frame-system", + "pallet-assets", + "pallet-balances", + "pallet-collator-selection", + "pallet-session", + "pallet-xcm", "pallet-xcm-bridge-hub-router", - "parachains-common 7.0.0", + "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "sp-consensus-aura 0.32.0", + "polkadot-parachain-primitives", + "sp-consensus-aura", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", ] [[package]] @@ -681,23 +667,23 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7d2d5b75d36daec8ffad11f121f581cc3aec2b7b117d8ab68f6e3ac914a5569" dependencies = [ - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", + "cumulus-primitives-core", + "frame-support", "impl-trait-for-tuples", "log", "pallet-asset-conversion", - "pallet-asset-tx-payment 28.0.0", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", + "pallet-asset-tx-payment", + "pallet-xcm", + "parachains-common", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api", + "sp-runtime", "sp-std 14.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", ] [[package]] @@ -774,17 +760,6 @@ dependencies = [ "pin-project-lite 0.2.13", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -864,27 +839,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bindgen" -version = "0.65.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" -dependencies = [ - "bitflags 1.3.2", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "peeking_take_while", - "prettyplease 0.2.16", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.48", -] - [[package]] name = "bip39" version = "2.0.0" @@ -961,30 +915,6 @@ dependencies = [ "constant_time_eq", ] -[[package]] -name = "blake2s_simd" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" -dependencies = [ - "arrayref", - "arrayvec 0.7.4", - "constant_time_eq", -] - -[[package]] -name = "blake3" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" -dependencies = [ - "arrayref", - "arrayvec 0.7.4", - "cc", - "cfg-if", - "constant_time_eq", -] - [[package]] name = "block-buffer" version = "0.7.3" @@ -1036,37 +966,28 @@ dependencies = [ "serde", ] -[[package]] -name = "bounded-vec" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68534a48cbf63a4b1323c433cf21238c9ec23711e0df13b08c33e5c2082663ce" -dependencies = [ - "thiserror", -] - [[package]] name = "bp-asset-hub-kusama" version = "1.0.0" dependencies = [ - "bp-xcm-bridge-hub-router 0.6.0", - "frame-support 28.0.0", + "bp-xcm-bridge-hub-router", + "frame-support", "parity-scale-codec", "scale-info", "sp-std 14.0.0", - "staging-xcm 7.0.0", + "staging-xcm", ] [[package]] name = "bp-asset-hub-polkadot" version = "1.0.0" dependencies = [ - "bp-xcm-bridge-hub-router 0.6.0", - "frame-support 28.0.0", + "bp-xcm-bridge-hub-router", + "frame-support", "parity-scale-codec", "scale-info", "sp-std 14.0.0", - "staging-xcm 7.0.0", + "staging-xcm", ] [[package]] @@ -1078,10 +999,10 @@ dependencies = [ "bp-messages", "bp-polkadot-core", "bp-runtime", - "frame-support 28.0.0", - "frame-system 28.0.0", - "polkadot-primitives 7.0.0", - "sp-api 26.0.0", + "frame-support", + "frame-system", + "polkadot-primitives", + "sp-api", "sp-std 14.0.0", ] @@ -1092,11 +1013,11 @@ dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", "bp-runtime", - "frame-support 28.0.0", + "frame-support", "kusama-runtime-constants", "polkadot-runtime-constants", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api", + "sp-runtime", "sp-std 14.0.0", ] @@ -1107,11 +1028,11 @@ dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", "bp-runtime", - "frame-support 28.0.0", + "frame-support", "kusama-runtime-constants", "polkadot-runtime-constants", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api", + "sp-runtime", "sp-std 14.0.0", ] @@ -1123,13 +1044,13 @@ checksum = "13815b42c75e06a6f6b19521a824cb6bf1624654b041ae0b4abeb279df0e2588" dependencies = [ "bp-runtime", "finality-grandpa", - "frame-support 28.0.0", + "frame-support", "parity-scale-codec", "scale-info", "serde", - "sp-consensus-grandpa 13.0.0", + "sp-consensus-grandpa", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] @@ -1142,8 +1063,8 @@ dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", - "frame-support 28.0.0", - "sp-api 26.0.0", + "frame-support", + "sp-api", "sp-std 14.0.0", ] @@ -1155,7 +1076,7 @@ checksum = "220c494acdb350a79a7268f4a73d7a6b6cd3f2138f301856a6f6c4a5c09ef926" dependencies = [ "bp-header-chain", "bp-runtime", - "frame-support 28.0.0", + "frame-support", "parity-scale-codec", "scale-info", "serde", @@ -1172,12 +1093,12 @@ dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", - "frame-support 28.0.0", + "frame-support", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] @@ -1190,8 +1111,8 @@ dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", - "frame-support 28.0.0", - "sp-api 26.0.0", + "frame-support", + "sp-api", "sp-std 14.0.0", ] @@ -1203,14 +1124,14 @@ checksum = "80145cd18bd06347b5571a767112163e1da41e8b10a90bf9d2d982bf0ba5fcb7" dependencies = [ "bp-messages", "bp-runtime", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support", + "frame-system", "parity-scale-codec", "parity-util-mem", "scale-info", "serde", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] @@ -1222,10 +1143,10 @@ checksum = "cf10c05632fad95ba4c6c3d1b2f3a3109bde6aa8f295098351a6e5b1270ba201" dependencies = [ "bp-messages", "bp-runtime", - "frame-support 28.0.0", + "frame-support", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] @@ -1235,8 +1156,8 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fad9aefbc3e6cb63e0ac82a4dae9f1404416b41fb45931a4b43946cfa23c814" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support", + "frame-system", "hash-db", "impl-trait-for-tuples", "log", @@ -1245,11 +1166,11 @@ dependencies = [ "scale-info", "serde", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-io", + "sp-runtime", + "sp-state-machine", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie", "trie-db", ] @@ -1266,12 +1187,12 @@ dependencies = [ "ed25519-dalek", "finality-grandpa", "parity-scale-codec", - "sp-application-crypto 30.0.0", - "sp-consensus-grandpa 13.0.0", + "sp-application-crypto", + "sp-consensus-grandpa", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie", ] [[package]] @@ -1283,18 +1204,6 @@ dependencies = [ "sp-std 14.0.0", ] -[[package]] -name = "bp-xcm-bridge-hub-router" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be3b4fafc31f17da1b4ea403c4118e4f4f1d9a5a696729b374551d582e48633b" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-core 25.0.0", - "sp-runtime 28.0.0", -] - [[package]] name = "bp-xcm-bridge-hub-router" version = "0.6.0" @@ -1304,7 +1213,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", ] [[package]] @@ -1325,71 +1234,71 @@ dependencies = [ "bp-runtime", "bridge-hub-test-utils", "bridge-runtime-common", - "cumulus-pallet-aura-ext 0.7.0", - "cumulus-pallet-dmp-queue 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.3", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "hex-literal", "kusama-runtime-constants", "log", - "pallet-aura 27.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", + "pallet-aura", + "pallet-authorship", + "pallet-balances", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-collator-selection 9.0.0", - "pallet-message-queue 31.0.0", + "pallet-collator-selection", + "pallet-message-queue", "pallet-multisig", - "pallet-session 28.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-utility 28.0.0", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-session", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", "pallet-xcm-bridge-hub", - "parachains-common 7.0.0", + "parachains-common", "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-runtime-common 7.0.0", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-common", "polkadot-runtime-constants", "scale-info", "serde", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-aura 0.32.0", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", "sp-core 28.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-offchain", + "sp-runtime", + "sp-session", "sp-std 14.0.0", "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", - "substrate-wasm-builder 17.0.0", + "substrate-wasm-builder", "system-parachains-constants", ] @@ -1411,71 +1320,71 @@ dependencies = [ "bp-runtime", "bridge-hub-test-utils", "bridge-runtime-common", - "cumulus-pallet-aura-ext 0.7.0", - "cumulus-pallet-dmp-queue 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.3", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "hex-literal", "kusama-runtime-constants", "log", - "pallet-aura 27.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", + "pallet-aura", + "pallet-authorship", + "pallet-balances", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-collator-selection 9.0.0", - "pallet-message-queue 31.0.0", + "pallet-collator-selection", + "pallet-message-queue", "pallet-multisig", - "pallet-session 28.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-utility 28.0.0", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-session", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", "pallet-xcm-bridge-hub", - "parachains-common 7.0.0", + "parachains-common", "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-runtime-common 7.0.0", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-common", "polkadot-runtime-constants", "scale-info", "serde", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-aura 0.32.0", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", "sp-core 28.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-offchain", + "sp-runtime", + "sp-session", "sp-std 14.0.0", "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", - "substrate-wasm-builder 17.0.0", + "substrate-wasm-builder", "system-parachains-constants", ] @@ -1494,37 +1403,37 @@ dependencies = [ "bp-runtime", "bp-test-utils", "bridge-runtime-common", - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", - "pallet-balances 28.0.0", + "pallet-balances", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-collator-selection 9.0.0", - "pallet-session 28.0.0", - "pallet-utility 28.0.0", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", - "parachains-common 7.0.0", + "pallet-collator-selection", + "pallet-session", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-keyring", + "sp-runtime", "sp-std 14.0.0", "sp-tracing 16.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] @@ -1540,27 +1449,27 @@ dependencies = [ "bp-relayers", "bp-runtime", "bp-xcm-bridge-hub", - "bp-xcm-bridge-hub-router 0.6.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "bp-xcm-bridge-hub-router", + "frame-support", + "frame-system", "hash-db", "log", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-transaction-payment 28.0.0", - "pallet-utility 28.0.0", + "pallet-transaction-payment", + "pallet-utility", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", + "sp-api", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", - "sp-trie 29.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", + "sp-trie", + "staging-xcm", + "staging-xcm-builder", "static_assertions", ] @@ -1634,17 +1543,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" -[[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - [[package]] name = "c2-chacha" version = "0.3.3" @@ -1697,15 +1595,6 @@ dependencies = [ "libc", ] -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfg-expr" version = "0.15.5" @@ -1721,12 +1610,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - [[package]] name = "chacha" version = "0.3.0" @@ -1771,30 +1654,30 @@ dependencies = [ "bridge-hub-polkadot-runtime", "clap", "collectives-polkadot-runtime", - "cumulus-primitives-core 0.7.0", + "cumulus-primitives-core", "encointer-kusama-runtime", "glutton-kusama-runtime", "hex-literal", "kusama-runtime-constants", "pallet-im-online", - "pallet-staking 28.0.0", - "parachains-common 7.0.0", - "polkadot-primitives 7.0.0", + "pallet-staking", + "parachains-common", + "polkadot-primitives", "polkadot-runtime", "polkadot-runtime-constants", - "polkadot-runtime-parachains 7.0.0", - "sc-chain-spec 27.0.0", + "polkadot-runtime-parachains", + "sc-chain-spec", "sc-consensus-grandpa", "serde", "serde_json", - "sp-authority-discovery 26.0.0", - "sp-consensus-babe 0.32.0", + "sp-authority-discovery", + "sp-consensus-babe", "sp-consensus-beefy", "sp-core 25.0.0", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "staging-kusama-runtime", - "staging-xcm 7.0.0", + "staging-xcm", ] [[package]] @@ -1811,19 +1694,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "cid" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" -dependencies = [ - "core2", - "multibase", - "multihash", - "serde", - "unsigned-varint", -] - [[package]] name = "cipher" version = "0.2.5" @@ -1853,17 +1723,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "clang-sys" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "clap" version = "4.4.18" @@ -1904,18 +1763,6 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" -[[package]] -name = "coarsetime" -version = "0.1.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71367d3385c716342014ad17e3d19f7788ae514885a1f4c24f500260fb365e1a" -dependencies = [ - "libc", - "once_cell", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - [[package]] name = "codespan-reporting" version = "0.11.1" @@ -1930,72 +1777,72 @@ dependencies = [ name = "collectives-polkadot-runtime" version = "1.0.0" dependencies = [ - "cumulus-pallet-aura-ext 0.7.0", - "cumulus-pallet-dmp-queue 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.3", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "hex-literal", "log", "pallet-alliance", - "pallet-asset-rate 7.0.0", - "pallet-aura 27.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-collective 28.0.0", + "pallet-asset-rate", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-collective", "pallet-core-fellowship", - "pallet-message-queue 31.0.0", + "pallet-message-queue", "pallet-multisig", "pallet-preimage", - "pallet-proxy 28.0.0", + "pallet-proxy", "pallet-ranked-collective", "pallet-referenda", "pallet-salary", - "pallet-scheduler 29.0.0", - "pallet-session 28.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-treasury 27.0.0", - "pallet-utility 28.0.0", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", - "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-runtime-common 7.0.0", + "pallet-scheduler", + "pallet-session", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-common", "polkadot-runtime-constants", "scale-info", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-aura 0.32.0", + "sp-api", + "sp-arithmetic", + "sp-block-builder", + "sp-consensus-aura", "sp-core 28.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", + "sp-genesis-builder", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", "sp-std 14.0.0", "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", "system-parachains-constants", ] @@ -2211,7 +2058,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools 0.10.5", + "itertools", "log", "smallvec", "wasmparser", @@ -2261,15 +2108,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "crossbeam-queue" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-utils" version = "0.8.19" @@ -2344,111 +2182,42 @@ dependencies = [ "cipher 0.4.4", ] -[[package]] -name = "cumulus-pallet-aura-ext" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071cdddd31e2b0d47a74249675de828857f61eb5f6afa36cfcf63ea6ee2b60f2" -dependencies = [ - "cumulus-pallet-parachain-system 0.4.1", - "frame-support 25.0.0", - "frame-system 25.0.0", - "pallet-aura 24.0.0", - "pallet-timestamp 24.0.0", - "parity-scale-codec", - "scale-info", - "sp-application-crypto 27.0.0", - "sp-consensus-aura 0.29.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "cumulus-pallet-aura-ext" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8100a3283be2c46905345141e9a063f092949c6630a1fb70993b04c97f309e55" dependencies = [ - "cumulus-pallet-parachain-system 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-aura 27.0.0", - "pallet-timestamp 27.0.0", + "cumulus-pallet-parachain-system", + "frame-support", + "frame-system", + "pallet-aura", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-consensus-aura 0.32.0", - "sp-runtime 31.0.1", + "sp-application-crypto", + "sp-consensus-aura", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "cumulus-pallet-dmp-queue" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1cb9d43cdfeedea19b4f6b8386e5b6264a97938b29f5c711a84e9dc7105ff7" -dependencies = [ - "cumulus-primitives-core 0.4.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "staging-xcm 4.0.0", -] - [[package]] name = "cumulus-pallet-dmp-queue" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f461956a4a85c053657fe64e73852940c8a52e7d8fc20ccb4f91688e73f0820b" dependencies = [ - "cumulus-primitives-core 0.7.0", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "cumulus-primitives-core", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", - "staging-xcm 7.0.0", -] - -[[package]] -name = "cumulus-pallet-parachain-system" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d20d2280051998fcf113f04d25d4b39f27b449570b6350fdfb7e92541cb0aae7" -dependencies = [ - "bytes", - "cumulus-pallet-parachain-system-proc-macro 0.4.0", - "cumulus-primitives-core 0.4.0", - "cumulus-primitives-parachain-inherent 0.4.0", - "environmental", - "frame-support 25.0.0", - "frame-system 25.0.0", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "polkadot-parachain-primitives 3.0.0", - "polkadot-runtime-parachains 4.0.0", - "scale-info", - "sp-core 25.0.0", - "sp-externalities 0.23.0", - "sp-inherents 23.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-state-machine 0.32.0", - "sp-std 12.0.0", - "sp-trie 26.0.0", - "sp-version 26.0.0", - "staging-xcm 4.0.0", - "trie-db", + "staging-xcm", ] [[package]] @@ -2458,46 +2227,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a1a0e6800ea92447eab2c9170cc77d21987fd0e61ed79a6e1318f7b127b3e2c" dependencies = [ "bytes", - "cumulus-pallet-parachain-system-proc-macro 0.6.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-parachain-inherent 0.7.0", + "cumulus-pallet-parachain-system-proc-macro", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", "cumulus-primitives-proof-size-hostfunction", "environmental", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", - "pallet-message-queue 31.0.0", + "pallet-message-queue", "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "polkadot-runtime-parachains 7.0.0", + "polkadot-parachain-primitives", + "polkadot-runtime-parachains", "scale-info", "sp-core 28.0.0", "sp-externalities 0.25.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-std 14.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "staging-xcm 7.0.0", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-std 14.0.0", + "sp-trie", + "sp-version", + "staging-xcm", "trie-db", ] -[[package]] -name = "cumulus-pallet-parachain-system-proc-macro" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84baea20d10325b2501b6fa06d4a7902a43d6a6c62c71b5309e75c3ad8ae1441" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.6.0" @@ -2516,72 +2273,30 @@ version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b90c6389bd56472581a2b9510c97e6fe869fe6c73c58d3d533ee3c74b92cce14" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-session 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-session", "parity-scale-codec", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "cumulus-pallet-xcm" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ff03e14a0f5847bdee67a673ee945d3acd5c1d7238d46993208dcbfb774e27f" -dependencies = [ - "cumulus-primitives-core 0.4.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "parity-scale-codec", - "scale-info", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "staging-xcm 4.0.0", -] - [[package]] name = "cumulus-pallet-xcm" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9e5e8dd3f9c98620e32cbb1783725a3e75a3147cb351b43de37663824311cd9" dependencies = [ - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "cumulus-primitives-core", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", - "staging-xcm 7.0.0", -] - -[[package]] -name = "cumulus-pallet-xcmp-queue" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6af9816dd6564149729ba133c2c984c88fb15c4a2cb66f57be06b9147744e51" -dependencies = [ - "bp-xcm-bridge-hub-router 0.3.0", - "cumulus-primitives-core 0.4.0", - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "parity-scale-codec", - "polkadot-runtime-common 4.0.0", - "polkadot-runtime-parachains 4.0.0", - "rand_chacha 0.3.1", - "scale-info", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "staging-xcm 4.0.0", - "staging-xcm-executor 4.0.2", + "staging-xcm", ] [[package]] @@ -2591,41 +2306,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "439cdba45813623e7f45374f160f3356d27fb1aaca2536dd7f60ef2a7e9b30cd" dependencies = [ "bounded-collections", - "bp-xcm-bridge-hub-router 0.6.0", - "cumulus-primitives-core 0.7.0", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "bp-xcm-bridge-hub-router", + "cumulus-primitives-core", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-message-queue 31.0.0", + "pallet-message-queue", "parity-scale-codec", - "polkadot-runtime-common 7.0.0", - "polkadot-runtime-parachains 7.0.0", + "polkadot-runtime-common", + "polkadot-runtime-parachains", "scale-info", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", - "staging-xcm 7.0.0", - "staging-xcm-executor 7.0.3", -] - -[[package]] -name = "cumulus-primitives-core" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d40f62add2352287be4cb58b0017a91f61d953e2c6d2777c20d93185558196e1" -dependencies = [ - "parity-scale-codec", - "polkadot-core-primitives 4.0.0", - "polkadot-parachain-primitives 3.0.0", - "polkadot-primitives 4.0.0", - "scale-info", - "sp-api 23.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "sp-trie 26.0.0", - "staging-xcm 4.0.0", + "staging-xcm", + "staging-xcm-executor", ] [[package]] @@ -2635,39 +2332,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "036b64697b5fd04c8039ccf15b9891104c496afb6c418c2cea1234d4898d0a28" dependencies = [ "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", "scale-info", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api", + "sp-runtime", "sp-std 14.0.0", - "sp-trie 29.0.0", - "staging-xcm 7.0.0", -] - -[[package]] -name = "cumulus-primitives-parachain-inherent" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0b1e0e6dcf393dbf05b31122a8c4739acf407a96ec8fd707886f36ee95c355" -dependencies = [ - "async-trait", - "cumulus-primitives-core 0.4.0", - "cumulus-relay-chain-interface", - "cumulus-test-relay-sproof-builder 0.4.0", - "parity-scale-codec", - "sc-client-api 25.0.0", - "scale-info", - "sp-api 23.0.0", - "sp-core 25.0.0", - "sp-inherents 23.0.0", - "sp-runtime 28.0.0", - "sp-state-machine 0.32.0", - "sp-std 12.0.0", - "sp-storage 17.0.0", - "sp-trie 26.0.0", - "tracing", + "sp-trie", + "staging-xcm", ] [[package]] @@ -2677,13 +2350,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cb6fe06744fed6e84682c48816181ad63652003570c2135c425481440fcd2f2" dependencies = [ "async-trait", - "cumulus-primitives-core 0.7.0", + "cumulus-primitives-core", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-inherents 26.0.0", + "sp-inherents", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie", ] [[package]] @@ -2694,42 +2367,21 @@ checksum = "a132e17ac2c79436bc5004b0d56cb35ca65b966434f14e5ff8a9bc1afcfca5a4" dependencies = [ "sp-externalities 0.25.0", "sp-runtime-interface 24.0.0", - "sp-trie 29.0.0", + "sp-trie", ] [[package]] name = "cumulus-primitives-timestamp" -version = "0.4.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771ef4a34f7bcd4e8782f73d8dbd0df031b1c1c82e54b06af69f88df2cddc316" +checksum = "f6d1d900bd9e76607a4a0734cbb2b004d86177d2d6938b5d25eb812c6c1b7500" dependencies = [ - "cumulus-primitives-core 0.4.0", + "cumulus-primitives-core", "futures", "parity-scale-codec", - "sp-inherents 23.0.0", - "sp-std 12.0.0", - "sp-timestamp 23.0.0", -] - -[[package]] -name = "cumulus-primitives-utility" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d0ad7498cb748684f0f309ee037e9a29a91fb3ec5b5276b5fc723c3716bdd8a" -dependencies = [ - "cumulus-primitives-core 0.4.0", - "frame-support 25.0.0", - "log", - "pallet-xcm-benchmarks 4.0.1", - "parity-scale-codec", - "polkadot-runtime-common 4.0.0", - "polkadot-runtime-parachains 4.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "staging-xcm 4.0.0", - "staging-xcm-builder 4.0.1", - "staging-xcm-executor 4.0.2", + "sp-inherents", + "sp-std 14.0.0", + "sp-timestamp", ] [[package]] @@ -2738,53 +2390,19 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2ece52eeb7e87faea0d374356571ebc13f279df3bf79a1dc8a0db6c49d6ba23" dependencies = [ - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", + "cumulus-primitives-core", + "frame-support", "log", - "pallet-xcm-benchmarks 7.0.3", + "pallet-xcm-benchmarks", "parity-scale-codec", - "polkadot-runtime-common 7.0.0", - "polkadot-runtime-parachains 7.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "polkadot-runtime-common", + "polkadot-runtime-parachains", + "sp-io", + "sp-runtime", "sp-std 14.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", -] - -[[package]] -name = "cumulus-relay-chain-interface" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af081ef8885042e7ae96e9d1cf32ec6f0616fe4cb78f0325ed7c5accded687fb" -dependencies = [ - "async-trait", - "cumulus-primitives-core 0.4.0", - "futures", - "jsonrpsee-core", - "parity-scale-codec", - "polkadot-overseer", - "sc-client-api 25.0.0", - "sp-api 23.0.0", - "sp-blockchain 25.0.0", - "sp-state-machine 0.32.0", - "thiserror", -] - -[[package]] -name = "cumulus-test-relay-sproof-builder" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b921a9cb6758faa1c739f135fd87aa1e10a4e86a1c1db3119b396a62287cf2" -dependencies = [ - "cumulus-primitives-core 0.4.0", - "parity-scale-codec", - "polkadot-primitives 4.0.0", - "sp-runtime 28.0.0", - "sp-state-machine 0.32.0", - "sp-std 12.0.0", - "sp-trie 26.0.0", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] @@ -2793,13 +2411,13 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ec12490a40b00427119fd1e12a6d1fe0652d2df3e992dea1bc4f331effed12" dependencies = [ - "cumulus-primitives-core 0.7.0", + "cumulus-primitives-core", "parity-scale-codec", - "polkadot-primitives 7.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "polkadot-primitives", + "sp-runtime", + "sp-state-machine", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie", ] [[package]] @@ -3030,15 +2648,6 @@ dependencies = [ "subtle 2.5.0", ] -[[package]] -name = "directories" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" -dependencies = [ - "dirs-sys", -] - [[package]] name = "directories-next" version = "2.0.0" @@ -3049,18 +2658,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -3236,25 +2833,25 @@ dependencies = [ "bridge-hub-kusama-runtime", "bridge-hub-polkadot-runtime", "collectives-polkadot-runtime", - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", + "cumulus-primitives-core", + "frame-support", "integration-tests-common", "kusama-runtime-constants", "pallet-im-online", - "pallet-staking 28.0.0", - "parachains-common 7.0.0", + "pallet-staking", + "parachains-common", "penpal-runtime", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", + "polkadot-parachain-primitives", + "polkadot-primitives", "polkadot-runtime", "polkadot-runtime-constants", - "polkadot-runtime-parachains 7.0.0", - "sp-authority-discovery 26.0.0", - "sp-consensus-babe 0.32.0", + "polkadot-runtime-parachains", + "sp-authority-discovery", + "sp-consensus-babe", "sp-consensus-beefy", - "sp-consensus-grandpa 13.0.0", + "sp-consensus-grandpa", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "staging-kusama-runtime", "xcm-emulator", ] @@ -3267,75 +2864,75 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encointer-balances-tx-payment" -version = "3.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "574a256785661fe0353b6664a896b03eaac804e01de3b7146a1e68bea23823c6" +checksum = "407d7faa8fd1d242602012e6b6d51a8edc99321ac5a20425efa64c7ec432f868" dependencies = [ "encointer-primitives", - "frame-support 25.0.0", - "frame-system 25.0.0", + "frame-support", + "frame-system", "log", - "pallet-asset-tx-payment 25.0.0", + "pallet-asset-tx-payment", "pallet-encointer-balances", "pallet-encointer-ceremonies", - "pallet-transaction-payment 25.0.0", - "sp-runtime 28.0.0", + "pallet-transaction-payment", + "sp-runtime", ] [[package]] name = "encointer-balances-tx-payment-rpc-runtime-api" -version = "3.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cc19094858c453d1622fee74cd5ac4aeafc5afcc1695c442361528604f3a3cd" +checksum = "4eb7b235a2ecbec5b913ee30c4372a9bb01c27cbca1368662ad9629df788a1be" dependencies = [ "encointer-primitives", - "frame-support 25.0.0", + "frame-support", "parity-scale-codec", "scale-info", - "sp-api 23.0.0", - "sp-std 12.0.0", + "sp-api", + "sp-std 14.0.0", ] [[package]] name = "encointer-ceremonies-assignment" -version = "3.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0e915dfb90455b04de86863d5e8c28727b88a5e79035d1592f5340befc2d31a" +checksum = "3f5e534e5d624f17a34ae5c6cf61ddbfd68b6a2d3900d855760ebb551f9d4fdd" dependencies = [ "encointer-primitives", - "sp-runtime 28.0.0", - "sp-std 12.0.0", + "sp-runtime", + "sp-std 14.0.0", ] [[package]] name = "encointer-kusama-runtime" version = "1.0.0" dependencies = [ - "cumulus-pallet-aura-ext 0.4.0", - "cumulus-pallet-dmp-queue 0.4.0", - "cumulus-pallet-parachain-system 0.4.1", - "cumulus-pallet-xcm 0.4.0", - "cumulus-pallet-xcmp-queue 0.4.0", - "cumulus-primitives-core 0.4.0", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", "cumulus-primitives-timestamp", - "cumulus-primitives-utility 0.4.1", + "cumulus-primitives-utility", "encointer-balances-tx-payment", "encointer-balances-tx-payment-rpc-runtime-api", "encointer-primitives", - "frame-benchmarking 25.0.0", - "frame-executive 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "frame-system-benchmarking 25.0.0", - "frame-system-rpc-runtime-api 23.0.0", - "frame-try-runtime 0.31.0", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-tx-payment 25.0.0", - "pallet-aura 24.0.0", - "pallet-balances 25.0.0", - "pallet-collective 25.0.0", + "pallet-asset-tx-payment", + "pallet-aura", + "pallet-balances", + "pallet-collective", "pallet-encointer-balances", "pallet-encointer-bazaar", "pallet-encointer-bazaar-rpc-runtime-api", @@ -3347,75 +2944,76 @@ dependencies = [ "pallet-encointer-reputation-commitments", "pallet-encointer-scheduler", "pallet-insecure-randomness-collective-flip", - "pallet-membership 25.0.0", - "pallet-proxy 25.0.0", - "pallet-scheduler 26.0.0", - "pallet-timestamp 24.0.0", - "pallet-transaction-payment 25.0.0", - "pallet-transaction-payment-rpc-runtime-api 25.0.0", - "pallet-treasury 24.0.0", - "pallet-utility 25.0.0", - "pallet-xcm 4.0.0", - "parachains-common 4.0.0", - "parity-scale-codec", - "polkadot-core-primitives 4.0.0", - "polkadot-parachain-primitives 3.0.0", - "polkadot-primitives 4.0.0", - "polkadot-runtime-common 4.0.0", + "pallet-membership", + "pallet-message-queue", + "pallet-proxy", + "pallet-scheduler", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-common", "scale-info", "smallvec", - "sp-api 23.0.0", - "sp-block-builder 23.0.0", - "sp-consensus-aura 0.29.0", - "sp-core 25.0.0", - "sp-genesis-builder 0.4.0", - "sp-inherents 23.0.0", - "sp-offchain 23.0.0", - "sp-runtime 28.0.0", - "sp-session 24.0.0", - "sp-std 12.0.0", - "sp-transaction-pool 23.0.0", - "sp-version 26.0.0", - "staging-parachain-info 0.4.0", - "staging-xcm 4.0.0", - "staging-xcm-builder 4.0.1", - "staging-xcm-executor 4.0.2", - "substrate-wasm-builder 14.0.0", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core 28.0.0", + "sp-genesis-builder", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std 14.0.0", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", "system-parachains-constants", ] [[package]] name = "encointer-meetup-validation" -version = "3.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bef78af8c5897da00bb93d7d77573ad7d4e6169f3daac2a36ba450760611c94" +checksum = "01d27e886abe0f6fb716dcf7ee0b4e91ae624d96dce6e87c1d5bada9a4bf76d3" dependencies = [ "encointer-primitives", "parity-scale-codec", "scale-info", "serde", - "sp-runtime 28.0.0", - "sp-std 12.0.0", + "sp-runtime", + "sp-std 14.0.0", ] [[package]] name = "encointer-primitives" -version = "3.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "306cf10a0e74f42080c064fdc1d827b5c3fd6e0c40ee5f4e36bb2f5ee76c51dc" +checksum = "9db298e46082c2f9692d6e8d5365fde266ac09ed18dd1c72c109281acad1b2fb" dependencies = [ "bs58 0.4.0", "crc", "ep-core", - "frame-support 25.0.0", + "frame-support", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", + "sp-core 28.0.0", + "sp-io", + "sp-runtime", + "sp-std 14.0.0", "substrate-geohash", ] @@ -3483,19 +3081,19 @@ checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" [[package]] name = "ep-core" -version = "3.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfa4c3869cba69547a6cf0b80faf892822cee70027f86439ea7d145286fc6ba" +checksum = "84eac7952f21e9d5a28e5e3074a2ed1e7d26bbc08da770e43ec538ba2ee0d124" dependencies = [ "array-bytes 6.2.2", "impl-serde", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 20.0.0", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", + "sp-arithmetic", + "sp-core 28.0.0", + "sp-runtime", + "sp-std 14.0.0", "substrate-fixed", ] @@ -3569,27 +3167,6 @@ dependencies = [ "pin-project-lite 0.2.13", ] -[[package]] -name = "exit-future" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" -dependencies = [ - "futures", -] - -[[package]] -name = "expander" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a718c0675c555c5f976fff4ea9e2c150fa06cefa201cadef87cfbf9324075881" -dependencies = [ - "blake3", - "fs-err", - "proc-macro2", - "quote", -] - [[package]] name = "expander" version = "2.0.0" @@ -3621,40 +3198,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" -[[package]] -name = "fatality" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ad875162843b0d046276327afe0136e9ed3a23d5a754210fb6f1f33610d39ab" -dependencies = [ - "fatality-proc-macro", - "thiserror", -] - -[[package]] -name = "fatality-proc-macro" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5aa1e3ae159e592ad222dc90c5acbad632b527779ba88486abe92782ab268bd" -dependencies = [ - "expander 0.0.4", - "indexmap 1.9.3", - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", - "thiserror", -] - -[[package]] -name = "fdlimit" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b" -dependencies = [ - "libc", -] - [[package]] name = "ff" version = "0.13.0" @@ -3753,15 +3296,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "fork-tree" -version = "11.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c2d0a4310dcf0e5cce78e35e60dc2fda80ef61c8f8fc382e685dfc24fcf5db9" -dependencies = [ - "parity-scale-codec", -] - [[package]] name = "fork-tree" version = "12.0.0" @@ -3786,70 +3320,32 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" -[[package]] -name = "frame-benchmarking" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dd4946d63eab00d899f08a7e74e965cc6785c2298efaea6a2752905f4810407" -dependencies = [ - "frame-support 25.0.0", - "frame-support-procedural 20.0.0", - "frame-system 25.0.0", - "linregress", - "log", - "parity-scale-codec", - "paste", - "scale-info", - "serde", - "sp-api 23.0.0", - "sp-application-crypto 27.0.0", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-runtime-interface 21.0.0", - "sp-std 12.0.0", - "sp-storage 17.0.0", - "static_assertions", -] - [[package]] name = "frame-benchmarking" version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b16f7f853f64ec6fbc981b3e224cc3400752662da140ec62c160b5b859bab68" dependencies = [ - "frame-support 28.0.0", - "frame-support-procedural 23.0.0", - "frame-system 28.0.0", + "frame-support", + "frame-support-procedural", + "frame-system", "linregress", "log", "parity-scale-codec", "paste", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api", + "sp-application-crypto", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-runtime-interface 24.0.0", "sp-std 14.0.0", "sp-storage 19.0.0", "static_assertions", ] -[[package]] -name = "frame-election-provider-solution-type" -version = "12.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03911cf3675af64252a6de7b4f383eafa80d5ea5830184e7a0739aeb0b95272d" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "frame-election-provider-solution-type" version = "13.0.0" @@ -3862,76 +3358,39 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "frame-election-provider-support" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebad507fb038db2f7ce982d30bd9828a59785c9a4780348d59cd6cceaee80d1a" -dependencies = [ - "frame-election-provider-solution-type 12.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "parity-scale-codec", - "scale-info", - "sp-arithmetic 20.0.0", - "sp-core 25.0.0", - "sp-npos-elections 23.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "frame-election-provider-support" version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c596d956c4eedaffbe2fd6f75562e63e3e60001222bc6f8cc45fa77f3ea51791" dependencies = [ - "frame-election-provider-solution-type 13.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-election-provider-solution-type", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", + "sp-arithmetic", "sp-core 28.0.0", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", + "sp-npos-elections", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "frame-executive" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dda2c20ea3267ee20c9a5482f320236510c4ade6aec1dd930cb57dc5651c64f" -dependencies = [ - "frame-support 25.0.0", - "frame-system 25.0.0", - "frame-try-runtime 0.31.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "sp-tracing 14.0.0", -] - [[package]] name = "frame-executive" version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a5247e367912fe95f813e96542921ab4edf671860fd557625b55f40155abf90" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-try-runtime 0.34.0", + "frame-support", + "frame-system", + "frame-try-runtime", "log", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", "sp-tracing 16.0.0", ] @@ -3961,69 +3420,28 @@ dependencies = [ "parity-scale-codec", "serde", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-io", + "sp-runtime", + "sp-state-machine", "spinners", "substrate-rpc-client", "tokio", "tokio-retry", ] -[[package]] -name = "frame-support" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023504bbdd0e8d1ebe3d9d289b009337cdb9a24c5e74615ffd7b188aa1664c2d" -dependencies = [ - "aquamarine 0.3.2", - "bitflags 1.3.2", - "docify", - "environmental", - "frame-metadata", - "frame-support-procedural 20.0.0", - "impl-trait-for-tuples", - "k256", - "log", - "macro_magic", - "parity-scale-codec", - "paste", - "scale-info", - "serde", - "serde_json", - "smallvec", - "sp-api 23.0.0", - "sp-arithmetic 20.0.0", - "sp-core 25.0.0", - "sp-core-hashing-proc-macro 13.0.0", - "sp-debug-derive 12.0.0", - "sp-genesis-builder 0.4.0", - "sp-inherents 23.0.0", - "sp-io 27.0.0", - "sp-metadata-ir 0.4.0", - "sp-runtime 28.0.0", - "sp-staking 23.0.0", - "sp-state-machine 0.32.0", - "sp-std 12.0.0", - "sp-tracing 14.0.0", - "sp-weights 24.0.0", - "static_assertions", - "tt-call", -] - [[package]] name = "frame-support" version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48b00bb3e82c465a435b08827e7abe5144345bc1a998848bdd7ce72fa203bb5" dependencies = [ - "aquamarine 0.4.0", + "aquamarine", "array-bytes 6.2.2", "bitflags 1.3.2", "docify", "environmental", "frame-metadata", - "frame-support-procedural 23.0.0", + "frame-support-procedural", "impl-trait-for-tuples", "k256", "log", @@ -4034,45 +3452,25 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", + "sp-api", + "sp-arithmetic", "sp-core 28.0.0", - "sp-core-hashing-proc-macro 15.0.0", + "sp-core-hashing-proc-macro", "sp-debug-derive 14.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-metadata-ir 0.6.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", - "sp-state-machine 0.35.0", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-metadata-ir", + "sp-runtime", + "sp-staking", + "sp-state-machine", "sp-std 14.0.0", "sp-tracing 16.0.0", - "sp-weights 27.0.0", + "sp-weights", "static_assertions", "tt-call", ] -[[package]] -name = "frame-support-procedural" -version = "20.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6bc383298353ff2790ac1a301262c21ac196dbc26ef67a2213c46524a06dd1" -dependencies = [ - "Inflector", - "cfg-expr", - "derive-syn-parse", - "expander 2.0.0", - "frame-support-procedural-tools 9.0.0", - "itertools 0.10.5", - "macro_magic", - "proc-macro-warning", - "proc-macro2", - "quote", - "sp-core-hashing 13.0.0", - "syn 2.0.48", -] - [[package]] name = "frame-support-procedural" version = "23.0.0" @@ -4082,9 +3480,9 @@ dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", - "expander 2.0.0", - "frame-support-procedural-tools 10.0.0", - "itertools 0.10.5", + "expander", + "frame-support-procedural-tools", + "itertools", "macro_magic", "proc-macro-warning", "proc-macro2", @@ -4093,43 +3491,19 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "frame-support-procedural-tools" -version = "9.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3ac1266522a8c9a2d2d26d205ec3028b88582d5f3cd5cbc75d0ec8271d197b7" -dependencies = [ - "frame-support-procedural-tools-derive 10.0.0", - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "frame-support-procedural-tools" version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3363df38464c47a73eb521a4f648bfcc7537a82d70347ef8af3f73b6d019e910" dependencies = [ - "frame-support-procedural-tools-derive 11.0.0", + "frame-support-procedural-tools-derive", "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 2.0.48", ] -[[package]] -name = "frame-support-procedural-tools-derive" -version = "10.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c078db2242ea7265faa486004e7fd8daaf1a577cfcac0070ce55d926922883" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "frame-support-procedural-tools-derive" version = "11.0.0" @@ -4141,26 +3515,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "frame-system" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e316407c45a5093c833966a906301aa0dcbd05048061cd9cde2548d017bfd9" -dependencies = [ - "cfg-if", - "frame-support 25.0.0", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "sp-version 26.0.0", - "sp-weights 24.0.0", -] - [[package]] name = "frame-system" version = "28.0.0" @@ -4169,33 +3523,17 @@ checksum = "983b3215c8d97775b90dc1db88f858c46401682bd2fb8572bdd102ff8c2ca2a6" dependencies = [ "cfg-if", "docify", - "frame-support 28.0.0", + "frame-support", "log", "parity-scale-codec", "scale-info", "serde", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", - "sp-version 29.0.0", - "sp-weights 27.0.0", -] - -[[package]] -name = "frame-system-benchmarking" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b1388055d29a7a1c4d41b1623d3fcbc9d7f31d17abe04500b270b26901d926" -dependencies = [ - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "parity-scale-codec", - "scale-info", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", + "sp-version", + "sp-weights", ] [[package]] @@ -4204,26 +3542,16 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f78a2fe203b01b596156b2514e0b890b4a628dbdb50925316e755aa623b6fe53" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "frame-system-rpc-runtime-api" -version = "23.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17572a34fd866ad6cab6977a2c30b38645e0a499b3486de00ae9103f7002d6d3" -dependencies = [ - "parity-scale-codec", - "sp-api 23.0.0", -] - [[package]] name = "frame-system-rpc-runtime-api" version = "26.0.0" @@ -4231,20 +3559,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28d183819ea7df1d89acd61fe423ae6bec24a29d87db5c18182339a751c0837a" dependencies = [ "parity-scale-codec", - "sp-api 26.0.0", -] - -[[package]] -name = "frame-try-runtime" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f082e770275f9b46ddf46b09bc7a993f84db691c39d9e4d038ac07443cb17a18" -dependencies = [ - "frame-support 25.0.0", - "parity-scale-codec", - "sp-api 23.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", + "sp-api", ] [[package]] @@ -4253,10 +3568,10 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5b3dab79d14d2e8f6329d7e5cb49f2bdb81b9ef3019b1c405d94defa137a353" dependencies = [ - "frame-support 28.0.0", + "frame-support", "parity-scale-codec", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api", + "sp-runtime", "sp-std 14.0.0", ] @@ -4269,16 +3584,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "fs2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "funty" version = "2.0.0" @@ -4490,12 +3795,6 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "globset" version = "0.4.14" @@ -4513,39 +3812,39 @@ dependencies = [ name = "glutton-kusama-runtime" version = "1.0.0" dependencies = [ - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-xcm 0.7.0", - "cumulus-primitives-core 0.7.0", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcm", + "cumulus-primitives-core", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "pallet-glutton", - "pallet-message-queue 31.0.0", + "pallet-message-queue", "pallet-sudo", - "parachains-common 7.0.0", + "parachains-common", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", + "sp-api", + "sp-block-builder", "sp-core 28.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", + "sp-genesis-builder", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", "sp-std 14.0.0", "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", "system-parachains-constants", ] @@ -4637,15 +3936,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[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" @@ -4755,12 +4045,6 @@ dependencies = [ "pin-project-lite 0.2.13", ] -[[package]] -name = "http-range-header" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" - [[package]] name = "httparse" version = "1.8.0" @@ -5013,12 +4297,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "integer-encoding" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" - [[package]] name = "integer-sqrt" version = "0.1.5" @@ -5035,29 +4313,29 @@ dependencies = [ "asset-test-utils", "bp-messages", "bridge-runtime-common", - "cumulus-pallet-dmp-queue 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", - "pallet-assets 29.0.0", - "pallet-balances 28.0.0", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "frame-support", + "pallet-assets", + "pallet-balances", "pallet-bridge-messages", "pallet-im-online", - "pallet-message-queue 31.0.0", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", + "pallet-message-queue", + "pallet-xcm", + "parachains-common", "parity-scale-codec", "paste", - "polkadot-primitives 7.0.0", - "polkadot-runtime-parachains 7.0.0", - "sp-authority-discovery 26.0.0", - "sp-consensus-babe 0.32.0", + "polkadot-primitives", + "polkadot-runtime-parachains", + "sp-authority-discovery", + "sp-consensus-babe", "sp-consensus-beefy", - "sp-consensus-grandpa 13.0.0", + "sp-consensus-grandpa", "sp-core 28.0.0", - "sp-runtime 31.0.1", - "staging-xcm 7.0.0", + "sp-runtime", + "staging-xcm", "xcm-emulator", ] @@ -5067,7 +4345,7 @@ 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", ] @@ -5102,7 +4380,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi", "rustix 0.38.28", "windows-sys 0.48.0", ] @@ -5116,15 +4394,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.10" @@ -5325,14 +4594,14 @@ checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" name = "kusama-runtime-constants" version = "1.0.0" dependencies = [ - "frame-support 28.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", "smallvec", "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", - "staging-xcm-builder 7.0.3", + "sp-runtime", + "sp-weights", + "staging-xcm-builder", ] [[package]] @@ -5344,58 +4613,18 @@ dependencies = [ "smallvec", ] -[[package]] -name = "kvdb-memorydb" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" -dependencies = [ - "kvdb", - "parking_lot 0.12.1", -] - -[[package]] -name = "kvdb-rocksdb" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b644c70b92285f66bfc2032922a79000ea30af7bc2ab31902992a5dcb9b434f6" -dependencies = [ - "kvdb", - "num_cpus", - "parking_lot 0.12.1", - "regex", - "rocksdb", - "smallvec", -] - [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "libc" version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" -[[package]] -name = "libloading" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "libm" version = "0.2.8" @@ -5806,21 +5035,6 @@ dependencies = [ "redox_syscall 0.4.1", ] -[[package]] -name = "librocksdb-sys" -version = "0.11.0+8.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" -dependencies = [ - "bindgen", - "bzip2-sys", - "cc", - "glob", - "libc", - "libz-sys", - "tikv-jemalloc-sys", -] - [[package]] name = "libsecp256k1" version = "0.7.1" @@ -5980,26 +5194,6 @@ dependencies = [ "linked-hash-map", ] -[[package]] -name = "lz4" -version = "1.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" -dependencies = [ - "libc", - "lz4-sys", -] - -[[package]] -name = "lz4-sys" -version = "1.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "mach" version = "0.3.2" @@ -6160,17 +5354,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "mick-jaeger" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532" -dependencies = [ - "futures", - "rand 0.8.5", - "thrift", -] - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -6285,14 +5468,8 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" dependencies = [ - "blake2b_simd", - "blake2s_simd", - "blake3", "core2", - "digest 0.10.7", "multihash-derive", - "sha2 0.10.8", - "sha3", "unsigned-varint", ] @@ -6357,21 +5534,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "names" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d66043b25d4a6cccb23619d10c19c25304b355a7dccd4a8e11423dd2382146" -dependencies = [ - "rand 0.8.5", -] - -[[package]] -name = "nanorand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" - [[package]] name = "netlink-packet-core" version = "0.4.2" @@ -6538,7 +5700,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", ] @@ -6602,54 +5764,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "orchestra" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5edee0c1917703f8a28cd229cf6a5c91a7ee34be139ced16509ac5b53b9d0c51" -dependencies = [ - "async-trait", - "dyn-clonable", - "futures", - "futures-timer", - "orchestra-proc-macro", - "pin-project", - "prioritized-metered-channel 0.6.1", - "thiserror", - "tracing", -] - -[[package]] -name = "orchestra-proc-macro" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f60e64a3808b5bb2786b9da09fc70714952aabcdd0eeba6f1718e3dbc34ad5b" -dependencies = [ - "expander 2.0.0", - "indexmap 2.1.0", - "itertools 0.11.0", - "petgraph", - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ordered-float" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3305af35278dd29f46fcdd139e0b1fbfae2153f0e5928b39b035542dd31e37b7" -dependencies = [ - "num-traits", -] - [[package]] name = "pallet-alliance" version = "27.0.0" @@ -6657,18 +5771,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40fbbd9263e776fbb907283928363c82857a97b3c78120ce15a9ea06ece6570a" dependencies = [ "array-bytes 6.2.2", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-collective 28.0.0", + "pallet-collective", "pallet-identity", "parity-scale-codec", "scale-info", "sp-core 28.0.0", "sp-core-hashing 15.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] @@ -6678,16 +5792,16 @@ version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa2139677a59351fbd8513ddd92be4a7443d7d92f8f6897b2bbc78f55d1c6b8a" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", + "sp-api", + "sp-arithmetic", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] @@ -6697,267 +5811,140 @@ version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95388ffba6e39a34d9e95db0d7f776f36225fac387f3edbcc33856aa2df7913a" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support", + "frame-system", "pallet-asset-conversion", - "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-asset-rate" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740aebbcfefe8528f56ff8a339f810520a28df3ec159d016ef719aaa9f131af4" -dependencies = [ - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "parity-scale-codec", - "scale-info", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "pallet-asset-rate" version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e6f4917bc6c9ed6864813bbb828e94c63e1878a21af89d25dd0ff7da742f53e" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-asset-tx-payment" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028e30633114612160fc4e7add46504790abb3780db79eae1efae98c034dca0b" -dependencies = [ - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "pallet-transaction-payment 25.0.0", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "pallet-asset-tx-payment" version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e967664d86219ca9f7d33504e8d914225cdb92e9e793d35edaab1fd2574f162f" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-transaction-payment 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-transaction-payment", "parity-scale-codec", "scale-info", "serde", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-assets" -version = "26.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b91035c82dc9e64eaf52f3f6a39f4674bcb56333553882d6ff5d12500a9182" -dependencies = [ - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "pallet-assets" version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aca79db2bc70c269170893604d8a56d0f32d52c75a23a3d887b6b4df132366b7" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-aura" -version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04fbef67cf62445b7fd8e68241e6b71d9fb8c77abb3d52259eebf525a4cd5586" -dependencies = [ - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "pallet-timestamp 24.0.0", - "parity-scale-codec", - "scale-info", - "sp-application-crypto 27.0.0", - "sp-consensus-aura 0.29.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "pallet-aura" version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10c6ecf016520a6883df14b2f1d469d98166377eba4b299af7b76eee0130e3a6" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support", + "frame-system", "log", - "pallet-timestamp 27.0.0", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-consensus-aura 0.32.0", - "sp-runtime 31.0.1", + "sp-application-crypto", + "sp-consensus-aura", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-authority-discovery" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda272a66bbf1602579efcede67606ac43cda6d462ad551c527d8cadc871813d" -dependencies = [ - "frame-support 25.0.0", - "frame-system 25.0.0", - "pallet-session 25.0.0", - "parity-scale-codec", - "scale-info", - "sp-application-crypto 27.0.0", - "sp-authority-discovery 23.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "pallet-authority-discovery" version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9224b0a0bb4fa721d51f56947c73d4189710691b4cb40e7f7a8abf59795759a" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-session 28.0.0", + "frame-support", + "frame-system", + "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-authority-discovery 26.0.0", - "sp-runtime 31.0.1", + "sp-application-crypto", + "sp-authority-discovery", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-authorship" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d38eab59f7d15fe43c81fc3cd92f4c1f895ca6d0efb74fc2a6d6d7d3d34d413" -dependencies = [ - "frame-support 25.0.0", - "frame-system 25.0.0", - "impl-trait-for-tuples", - "parity-scale-codec", - "scale-info", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "pallet-authorship" version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "817b0420f9c14bd9bfbaf9e2f769a7e8124ab4fe3da0d07c80485c0901947ab8" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support", + "frame-system", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-babe" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b12430ca4b79b27231acb1ff3f99d33d6503fbeba40bfc8380e42d59b6d52b0" -dependencies = [ - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "pallet-authorship 25.0.0", - "pallet-session 25.0.0", - "pallet-timestamp 24.0.0", - "parity-scale-codec", - "scale-info", - "sp-application-crypto 27.0.0", - "sp-consensus-babe 0.29.0", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-session 24.0.0", - "sp-staking 23.0.0", - "sp-std 12.0.0", -] - [[package]] name = "pallet-babe" version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ba445228a941062d7c4d6295810a359df7757d6182c36ddb824f8c3bf350380" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-authorship 28.0.0", - "pallet-session 28.0.0", - "pallet-timestamp 27.0.0", + "pallet-authorship", + "pallet-session", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-consensus-babe 0.32.0", + "sp-application-crypto", + "sp-consensus-babe", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", "sp-std 14.0.0", ] @@ -6967,52 +5954,36 @@ version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0d7b6922a6bed960591efb49da6637312c034337faf4c85d8b35f2e2c611a" dependencies = [ - "aquamarine 0.4.0", + "aquamarine", "docify", - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", "log", - "pallet-balances 28.0.0", + "pallet-balances", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", "sp-tracing 16.0.0", ] -[[package]] -name = "pallet-balances" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de2915b425ae77d63ba25c194780599b7be25307454a138cfb316c16d001e68" -dependencies = [ - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "pallet-balances" version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8406b5616e468d80972b6365f3cd8211d0dbf4d107b379fac85fddcfdf0b5562" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] @@ -7022,18 +5993,18 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03f71d32d9681e9d78102dad00377629cac24b4bf43f6371c0dc7e5b25981eb4" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support", + "frame-system", "log", - "pallet-authorship 28.0.0", - "pallet-session 28.0.0", + "pallet-authorship", + "pallet-session", "parity-scale-codec", "scale-info", "serde", "sp-consensus-beefy", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", + "sp-runtime", + "sp-session", + "sp-staking", "sp-std 14.0.0", ] @@ -7045,21 +6016,21 @@ checksum = "d8b8eaa5c053d9cbf20faa397f21b80b9b5bafbe428890b0171fd1bba16f52ce" dependencies = [ "array-bytes 6.2.2", "binary-merkle-tree", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support", + "frame-system", "log", "pallet-beefy", "pallet-mmr", - "pallet-session 28.0.0", + "pallet-session", "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", + "sp-api", "sp-consensus-beefy", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-io", + "sp-runtime", + "sp-state-machine", "sp-std 14.0.0", ] @@ -7069,16 +6040,16 @@ version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5d421e3228bc4e8170d817d657aa87761b77ee4675a9e16328e1ca070cb4c41" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-treasury 27.0.0", + "pallet-treasury", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] @@ -7092,16 +6063,16 @@ dependencies = [ "bp-runtime", "bp-test-utils", "finality-grandpa", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-consensus-grandpa 13.0.0", - "sp-runtime 31.0.1", + "sp-consensus-grandpa", + "sp-runtime", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie", ] [[package]] @@ -7112,14 +6083,14 @@ checksum = "ca7058e4135266d55f71251996857832656eaa392a0b526f396ff06666921cc6" dependencies = [ "bp-messages", "bp-runtime", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "num-traits", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] @@ -7133,16 +6104,16 @@ dependencies = [ "bp-parachains", "bp-polkadot-core", "bp-runtime", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-bridge-grandpa", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie", ] [[package]] @@ -7154,15 +6125,15 @@ dependencies = [ "bp-messages", "bp-relayers", "bp-runtime", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic", + "sp-runtime", "sp-std 14.0.0", ] @@ -7173,14 +6144,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "904983f117ff92ee24b251f2a883ff01b6f8e9063649877f3892ecbb516e3cbd" dependencies = [ "bitvec", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", + "sp-arithmetic", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] @@ -7190,93 +6161,55 @@ version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb62c44d3ab8dcbf106b22acc138eaea6e51563d16a8d4a246303f2e20eeb9e5" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-bounties", - "pallet-treasury 27.0.0", + "pallet-treasury", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-collator-selection" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c093c8867dbdb540da33076566605320b2eda78da5062d3d954f05862db18d" -dependencies = [ - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "pallet-authorship 25.0.0", - "pallet-session 25.0.0", - "parity-scale-codec", - "rand 0.8.5", - "scale-info", - "sp-runtime 28.0.0", - "sp-staking 23.0.0", - "sp-std 12.0.0", -] - [[package]] name = "pallet-collator-selection" version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4199122c135e161d2e2f4cbc9339c54a11ac4b11e0beb67e53b49a3c90d566b" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-authorship 28.0.0", - "pallet-session 28.0.0", + "pallet-authorship", + "pallet-session", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-runtime", + "sp-staking", "sp-std 14.0.0", ] -[[package]] -name = "pallet-collective" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dddb120b5ee520146617a8c49b4d4c980ba9188918d43085539bf78815e7ec1d" -dependencies = [ - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "pallet-collective" version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ed22cf9d91c120695063cfa95ae0ffabcadefdf2581657ddb5fd68555b3a2e0" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] @@ -7287,14 +6220,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a189b5fb4a473edc7b2d52109fe10d0017b9b56f7c0324018b5970125db3ce3" dependencies = [ "assert_matches", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", "serde", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] @@ -7304,16 +6237,16 @@ version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8b59821d4508572c7b7cf9f044b1c87b7aa857acca1af2ec712d901a0002649" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", + "sp-arithmetic", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] @@ -7323,95 +6256,56 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b687c8a22b37f9b8444a29959f9cd0cf0be2f8efb8cd9bf91860d5dbafdab8b3" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "serde", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-election-provider-multi-phase" -version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "481178ef558a9409d9c12fc01279b517e3a0a7797664e89761447dba3a182ce6" -dependencies = [ - "frame-benchmarking 25.0.0", - "frame-election-provider-support 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "pallet-election-provider-support-benchmarking 24.0.0", - "parity-scale-codec", - "rand 0.8.5", - "scale-info", - "sp-arithmetic 20.0.0", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-npos-elections 23.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "strum", -] - [[package]] name = "pallet-election-provider-multi-phase" version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc5e1f80bb4ce08b27f5a8a733d5c2d72d083a7d48afa4bdbb1ef3594a31e353" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", "log", - "pallet-election-provider-support-benchmarking 27.0.0", + "pallet-election-provider-support-benchmarking", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-arithmetic 23.0.0", + "sp-arithmetic", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-npos-elections", + "sp-runtime", "sp-std 14.0.0", "strum", ] [[package]] name = "pallet-election-provider-support-benchmarking" -version = "24.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5ab6413ec88b64acf849a202795c67940dc3bcc846ce03bd0893b90e2119ecf" +checksum = "193a8592c5fd534d56d07b2abe14e830d23947fb66f31867083e4f3ef80c8caa" dependencies = [ - "frame-benchmarking 25.0.0", - "frame-election-provider-support 25.0.0", - "frame-system 25.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-system", "parity-scale-codec", - "sp-npos-elections 23.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - -[[package]] -name = "pallet-election-provider-support-benchmarking" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193a8592c5fd534d56d07b2abe14e830d23947fb66f31867083e4f3ef80c8caa" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-system 28.0.0", - "parity-scale-codec", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0", + "sp-npos-elections", + "sp-runtime", + "sp-std 14.0.0", ] [[package]] @@ -7420,221 +6314,204 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dd2f70c57cbb3dcde39f141721dd34a8c852e0caaf61ae6b0bbd23138b6e1d3" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-io", + "sp-npos-elections", + "sp-runtime", + "sp-staking", "sp-std 14.0.0", ] [[package]] name = "pallet-encointer-balances" -version = "3.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a2ea2b74c36582daf64b632064b3525da8aa2cdced57581272264ebd811a7a" +checksum = "3abd8385b727858b9eac996991bb6bc2967ee51a5f1bdfd178455f073b1985c5" dependencies = [ "approx", "encointer-primitives", - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-asset-tx-payment 25.0.0", - "pallet-transaction-payment 25.0.0", + "pallet-asset-tx-payment", + "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "sp-runtime 28.0.0", - "sp-std 12.0.0", + "sp-runtime", + "sp-std 14.0.0", ] [[package]] name = "pallet-encointer-bazaar" -version = "3.0.3" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f5797985a0a1d94338ab69659e62fb3b9435f070db39a0e610fd1757cf77fd" +checksum = "59c2f8fd0131a9e1c997e9f634c04e40af131a1c62c75ecd22d4f2fe25d6d1c0" dependencies = [ "encointer-primitives", - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-encointer-communities", "parity-scale-codec", "scale-info", - "sp-core 25.0.0", - "sp-std 12.0.0", + "sp-core 28.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-encointer-bazaar-rpc-runtime-api" -version = "3.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6471fa29e940363ff8090bb620ad82564286f955bfaa33a15147190438542aa6" +checksum = "1ca4fe43766549ed1261113039bbe44bc4b429fdd32db2848213e1918587134d" dependencies = [ "encointer-primitives", - "frame-support 25.0.0", - "sp-api 23.0.0", - "sp-std 12.0.0", + "frame-support", + "parity-scale-codec", + "sp-api", + "sp-std 14.0.0", ] [[package]] name = "pallet-encointer-ceremonies" -version = "3.0.4" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3712bb0ba1f1645cf1744d56c2fcb237a1b82319709db7d383a2d219449a5383" +checksum = "c4638e64ecc2823182d42fb3e26f280c4f5c7c15a03e76de5a4471509268ef7e" dependencies = [ "encointer-ceremonies-assignment", "encointer-meetup-validation", "encointer-primitives", - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-encointer-balances", "pallet-encointer-communities", "pallet-encointer-scheduler", - "pallet-timestamp 24.0.0", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 27.0.0", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", + "sp-application-crypto", + "sp-core 28.0.0", + "sp-io", + "sp-runtime", + "sp-std 14.0.0", ] [[package]] name = "pallet-encointer-ceremonies-rpc-runtime-api" -version = "3.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af85c19a7b83a255348a95ee0b691810088320c36319eb4446eb527f0e854a04" +checksum = "9649454f58e1ce8019d33b733ef82098d8830d3e629d13a73e25013246e59ce2" dependencies = [ "encointer-primitives", - "frame-support 25.0.0", - "sp-api 23.0.0", - "sp-std 12.0.0", + "frame-support", + "parity-scale-codec", + "sp-api", + "sp-std 14.0.0", ] [[package]] name = "pallet-encointer-communities" -version = "3.0.3" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88164fe398f45a0af98c74115e27c2c19cbdb218da7a1ba2269c12e92574779c" +checksum = "f07f8f9108f2527999c88a935e3e8a4dff693dc41fe03ae537e0654f06d1e76b" dependencies = [ "encointer-primitives", - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-encointer-balances", "pallet-encointer-scheduler", "parity-scale-codec", "scale-info", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", + "sp-io", + "sp-runtime", + "sp-std 14.0.0", ] [[package]] name = "pallet-encointer-communities-rpc-runtime-api" -version = "3.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1808d7908167315f12204db923a35f4af851e7c53b73351ed7d1b9e53a8c948d" +checksum = "49b6fc07a3baa660dd2522b00c8ca9959fd56145852c84700c83472c0328c061" dependencies = [ "encointer-primitives", - "sp-api 23.0.0", - "sp-std 12.0.0", + "parity-scale-codec", + "sp-api", + "sp-std 14.0.0", ] [[package]] name = "pallet-encointer-faucet" -version = "3.0.3" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "749e2e516dd7d0c5901920c866f8ae0c6d76665df07e5acd5fbccc5938bb9193" +checksum = "12f315745473e6572629cf27cf41f29994b945116b516b2fb6503ab7bb784f05" dependencies = [ "approx", "encointer-primitives", - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-encointer-communities", "pallet-encointer-reputation-commitments", - "pallet-treasury 24.0.0", + "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", + "sp-core 28.0.0", + "sp-runtime", + "sp-std 14.0.0", ] [[package]] name = "pallet-encointer-reputation-commitments" -version = "3.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27da548ae6f6070797c3270160cc0c76d4ddc20575d63e5a615d6f28d99c7cb5" +checksum = "4f89a194a51ec7326ac10908ea4a8840270a9bc0c3a12ae80cea46995f49c73d" dependencies = [ "approx", "encointer-primitives", - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-encointer-ceremonies", "pallet-encointer-communities", "pallet-encointer-scheduler", - "pallet-timestamp 24.0.0", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", + "sp-core 28.0.0", + "sp-runtime", + "sp-std 14.0.0", ] [[package]] name = "pallet-encointer-scheduler" -version = "3.0.3" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a90e9127e0ed2392545ea4178b82f25ac987cb1228e6d90c77875d559a7a1578" +checksum = "7d5804270f9ad33a67317bd52be71eca756d7307026ba399b096e1f3e330be4c" dependencies = [ "encointer-primitives", - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", - "pallet-timestamp 24.0.0", - "parity-scale-codec", - "scale-info", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - -[[package]] -name = "pallet-fast-unstake" -version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05634a197738c999a3032393916182fedccce13cb063fc330ee9bf810cd53b49" -dependencies = [ - "docify", - "frame-benchmarking 25.0.0", - "frame-election-provider-support 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-staking 23.0.0", - "sp-std 12.0.0", + "sp-runtime", + "sp-std 14.0.0", ] [[package]] @@ -7644,16 +6521,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd6e0b51b82075b046792cdde2d4a2f6c9301f3deba44c26d30ab152060b9028" dependencies = [ "docify", - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-io", + "sp-runtime", + "sp-staking", "sp-std 14.0.0", ] @@ -7664,15 +6541,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8140a1a715bb76151ac58bb6617e7a506ec3a89f842c3f6904179cbf6940b987" dependencies = [ "blake2 0.10.6", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] @@ -7682,21 +6559,21 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "935e91fa8936381aff2b88d8a7dad38ac30a1c8d2310340d73ce1c07b5ae72ce" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-authorship 28.0.0", - "pallet-session 28.0.0", + "pallet-authorship", + "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-consensus-grandpa 13.0.0", + "sp-application-crypto", + "sp-consensus-grandpa", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", "sp-std 14.0.0", ] @@ -7707,14 +6584,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3259bb87d50529027fa40267c3662dc80c683f253f121f391c032b019c88fcb" dependencies = [ "enumflags2", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] @@ -7724,18 +6601,18 @@ version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4be3f0165158828e4e77fae106a93bc1f48cc751755bdb012edb3ac0ef1d246" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-authorship 28.0.0", + "pallet-authorship", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", + "sp-application-crypto", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-io", + "sp-runtime", + "sp-staking", "sp-std 14.0.0", ] @@ -7745,49 +6622,31 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ead239524e40e55d172f024ff6795998068a2ba1c0950e74c4db7f347cfa91e" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-keyring", + "sp-runtime", "sp-std 14.0.0", ] [[package]] name = "pallet-insecure-randomness-collective-flip" -version = "13.0.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df4d7fab2948940925d4c0076ec542b2c67b37a5332449f102241993d31a8b41" +checksum = "9e3812708354757694bf127a89ab043ce80b2016a3b4d1eda2f762fbc4da9904" dependencies = [ - "frame-support 25.0.0", - "frame-system 25.0.0", + "frame-support", + "frame-system", "parity-scale-codec", "safe-mix", "scale-info", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - -[[package]] -name = "pallet-membership" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e1504034588eb733f8ce98b77757e9a7390662313aa133ef1e3b9fbb94359c7" -dependencies = [ - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", + "sp-runtime", + "sp-std 14.0.0", ] [[package]] @@ -7796,38 +6655,18 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bc2dfdff5a7e5b21355b34245312ba2ea687444d9003960e7b876e1df518dab" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-message-queue" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0776bf51d03bd746159063fa1357234feb85114273d40ef3aa3efba65d091eb4" -dependencies = [ - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-arithmetic 20.0.0", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "sp-weights 24.0.0", -] - [[package]] name = "pallet-message-queue" version = "31.0.0" @@ -7835,18 +6674,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab6302efb264a65fd175f3082b72004df125f646a3c68b72fd08e657a468c0d6" dependencies = [ "environmental", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", + "sp-arithmetic", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", - "sp-weights 27.0.0", + "sp-weights", ] [[package]] @@ -7855,16 +6694,16 @@ version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6565b91d1d585047648793feece7c2c70080b37e1f55ab3a4fb50b4c1bec86" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-io", "sp-mmr-primitives", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] @@ -7874,14 +6713,14 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14dbcdea9d3d7963aab57078a5bd6f3596186bfcf181d666db6ea2bfdc0184ec" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] @@ -7891,15 +6730,15 @@ version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948a03e2f5d2202a4bb8f7d701a2f29f557c50582bf6f8ccd7824863092012f" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-assets 29.0.0", + "pallet-assets", "pallet-nfts", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] @@ -7910,15 +6749,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71368a2a22a266fac11104f41334fc82e2b94c3f26a70b13eca98cdecf2e106f" dependencies = [ "enumflags2", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] @@ -7930,7 +6769,7 @@ checksum = "e342996c6bcb1e6a3258b18b1aebf4d77d9c2dd011863393478329e7e8d67128" dependencies = [ "pallet-nfts", "parity-scale-codec", - "sp-api 26.0.0", + "sp-api", "sp-std 14.0.0", ] @@ -7940,14 +6779,14 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86c541b2785051ebe1ae378be4b086055fbb8b13ee18fd949dfcf68dbd1c3325" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", + "sp-arithmetic", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] @@ -7957,16 +6796,16 @@ version = "25.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5989ca1100694371c9951118d58e84e93b60c1919006e9d4ad0f7537952c388" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support", + "frame-system", "log", - "pallet-balances 28.0.0", + "pallet-balances", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-io", + "sp-runtime", + "sp-staking", "sp-std 14.0.0", "sp-tracing 16.0.0", ] @@ -7977,18 +6816,18 @@ version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d01847415cd33a92c65e8d13cb0041a32b2f2523c84d9d944287ae5c0d920c82" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", "pallet-bags-list", "pallet-nomination-pools", - "pallet-staking 28.0.0", + "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime", "sp-runtime-interface 24.0.0", - "sp-staking 26.0.0", + "sp-staking", "sp-std 14.0.0", ] @@ -8000,7 +6839,7 @@ checksum = "a64b17d862b833ca07a375646ecc80e164e5618c3aed4e5631816aa7288bf9b1" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", - "sp-api 26.0.0", + "sp-api", "sp-std 14.0.0", ] @@ -8010,15 +6849,15 @@ version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de7b17230f58ff6b1ec2a70b3c639c49f585841dacf63f30c78db6387a833e0b" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support", + "frame-system", "log", - "pallet-balances 28.0.0", + "pallet-balances", "parity-scale-codec", "scale-info", "serde", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-runtime", + "sp-staking", "sp-std 14.0.0", ] @@ -8028,22 +6867,22 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "060483993358293d041e5173635082c68c7783a800c0874e8df87c324232f0d1" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", "log", - "pallet-babe 28.0.0", - "pallet-balances 28.0.0", + "pallet-babe", + "pallet-balances", "pallet-grandpa", "pallet-im-online", "pallet-offences", - "pallet-session 28.0.0", - "pallet-staking 28.0.0", + "pallet-session", + "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-runtime", + "sp-staking", "sp-std 14.0.0", ] @@ -8053,47 +6892,31 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce688c68f117b1916a844579aa5a945d786059b119a1cc80ace370afd1e50da4" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-proxy" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fbc0b550f5cbbad51f9daf795cc7046d40bbff256dae8d6072fd710ab40fd3a" -dependencies = [ - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "parity-scale-codec", - "scale-info", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "pallet-proxy" version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3162924576a70509136eb4d8513497fb640a8b3ea753883fe29bd454c511485" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] @@ -8103,16 +6926,16 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86c6d11592a6ba9039bd3486dba15f0cb045889b2746f4619f5ec78188fdd151" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", + "sp-arithmetic", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] @@ -8122,13 +6945,13 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8649310b8f00e3b2983331cdb7173d1e66e5eeb3a3d21479e7a65386244f883" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] @@ -8139,16 +6962,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c6645c0c09ff8484c6c7ac1546d908202ed555b18169ea956955e4e2d77b210" dependencies = [ "assert_matches", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 23.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] @@ -8158,37 +6981,19 @@ version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ad8b06d101931f335ea32f7c0e91bd1241c7b74d856cccf0b4fad8ab7177c" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", + "sp-arithmetic", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-scheduler" -version = "26.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3508a51d359c6640577feead9dc00667f38cec385baad77b636c61ff746ffe24" -dependencies = [ - "docify", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "sp-weights 24.0.0", -] - [[package]] name = "pallet-scheduler" version = "29.0.0" @@ -8196,39 +7001,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc26a27b77170c18261af7be04a6569e3d0d58788255b9f283ccd089aac37887" dependencies = [ "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", - "sp-weights 27.0.0", -] - -[[package]] -name = "pallet-session" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "768a6fb5333efc2bd2a3538c1d6ffa4178398660d4e3be89f2eb82d4e9088ae6" -dependencies = [ - "frame-support 25.0.0", - "frame-system 25.0.0", - "impl-trait-for-tuples", - "log", - "pallet-timestamp 24.0.0", - "parity-scale-codec", - "scale-info", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-session 24.0.0", - "sp-staking 23.0.0", - "sp-state-machine 0.32.0", - "sp-std 12.0.0", - "sp-trie 26.0.0", + "sp-weights", ] [[package]] @@ -8237,21 +7019,21 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e23ca2bfcffb5194de952050557bdd1fe9bce18b2bc81e8f8c01c8a3c3c3e5d8" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", - "pallet-timestamp 27.0.0", + "pallet-timestamp", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", - "sp-state-machine 0.35.0", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-state-machine", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie", ] [[package]] @@ -8260,15 +7042,15 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc660786028d46e03fb0a419d6a15df3fa556db7ce74efebf5a35037b32b4bc4" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-session 28.0.0", - "pallet-staking 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-session", + "pallet-staking", "parity-scale-codec", "rand 0.8.5", - "sp-runtime 31.0.1", - "sp-session 27.0.0", + "sp-runtime", + "sp-session", "sp-std 14.0.0", ] @@ -8278,64 +7060,40 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33c19c1f5a410c0b03dc1e3245ffc0269e6c9085e6f6a64ee023f7515b6f8d9b" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", - "sp-arithmetic 23.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-staking" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bed335abd32d357dd9750dae7fb87b01dfd8fe69faadcb94a6e0e0a43057d923" -dependencies = [ - "frame-benchmarking 25.0.0", - "frame-election-provider-support 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "pallet-authorship 25.0.0", - "pallet-session 25.0.0", - "parity-scale-codec", - "rand_chacha 0.2.2", - "scale-info", - "serde", - "sp-application-crypto 27.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-staking 23.0.0", - "sp-std 12.0.0", -] - [[package]] name = "pallet-staking" version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8883bbca2bd6ee41f81382418372ce44fd771ac53591ce9be4018ea43f8c5eda" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", "log", - "pallet-authorship 28.0.0", - "pallet-session 28.0.0", + "pallet-authorship", + "pallet-session", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", "serde", - "sp-application-crypto 30.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-application-crypto", + "sp-io", + "sp-runtime", + "sp-staking", "sp-std 14.0.0", ] @@ -8351,16 +7109,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "pallet-staking-reward-fn" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45b6f832653badb5f70bdfecc1ded64b02b8159b27f18515af03f8b80f1b023b" -dependencies = [ - "log", - "sp-arithmetic 20.0.0", -] - [[package]] name = "pallet-staking-reward-fn" version = "19.0.0" @@ -8368,7 +7116,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e23336e4da87101633f95f9932946564c926ca7f87499654b38923b1579c605e" dependencies = [ "log", - "sp-arithmetic 23.0.0", + "sp-arithmetic", ] [[package]] @@ -8378,8 +7126,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e27156b772eccb539cb1a1ea1b1b6e98d9c6589e18b913a30f67913fcf67fe7e" dependencies = [ "parity-scale-codec", - "sp-api 26.0.0", - "sp-staking 26.0.0", + "sp-api", + "sp-staking", ] [[package]] @@ -8388,15 +7136,15 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a48713905a318b0307e523fd3d3ca4b197ce74b2520203ded0d02e8a6c6bbd7" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] @@ -8407,37 +7155,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "053dae9119d2d828af80e8ac98f497dc27155d6b5d42264dab8fae40f2314c41" dependencies = [ "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-timestamp" -version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b25ec8749cf3f481b5e5199be701bac0dea835851b83fc7c455192762711858d" -dependencies = [ - "docify", - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-inherents 23.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "sp-storage 17.0.0", - "sp-timestamp 23.0.0", -] - [[package]] name = "pallet-timestamp" version = "27.0.0" @@ -8445,18 +7172,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "688b89bdd377609b592bd094b304ebca33f4767fe72935465e2fd7db0e797968" dependencies = [ "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-inherents", + "sp-io", + "sp-runtime", "sp-std 14.0.0", "sp-storage 19.0.0", - "sp-timestamp 26.0.0", + "sp-timestamp", ] [[package]] @@ -8465,98 +7192,48 @@ version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "facf64cab7f7a4762c57e5827597b2ca073755de4c9716444cf0847db34836df" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-treasury 27.0.0", + "pallet-treasury", "parity-scale-codec", "scale-info", "serde", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-transaction-payment" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ef7ceaac786e41613731e3bc48284f1aa3ec260934abda2daed949de6e5ada" -dependencies = [ - "frame-support 25.0.0", - "frame-system 25.0.0", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "pallet-transaction-payment" version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18b4ca7a1af9b1f091900a354a96319c7614d7a32106ba86cb7f0b6f90239065" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", "serde", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-transaction-payment-rpc-runtime-api" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07d87fdc4028155367c6ea98143054a6c00b38bfd77ec08681e289e429e35505" -dependencies = [ - "pallet-transaction-payment 25.0.0", - "parity-scale-codec", - "sp-api 23.0.0", - "sp-runtime 28.0.0", - "sp-weights 24.0.0", -] - [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acdfd7c882439b8198c99ece57b5bf785965545a6fa6d0bb7b56b264df1e437a" dependencies = [ - "pallet-transaction-payment 28.0.0", - "parity-scale-codec", - "sp-api 26.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", -] - -[[package]] -name = "pallet-treasury" -version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd462af11574485864023849e0622916b611dbc88111192fb39b1e6d7e666ba" -dependencies = [ - "docify", - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "impl-trait-for-tuples", - "pallet-balances 25.0.0", + "pallet-transaction-payment", "parity-scale-codec", - "scale-info", - "serde", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", + "sp-api", + "sp-runtime", + "sp-weights", ] [[package]] @@ -8566,16 +7243,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75cb7498228e1a150fa09ce64acafe7105ff39b75dae1c266ba58b7e3eb225e" dependencies = [ "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "impl-trait-for-tuples", - "pallet-balances 28.0.0", + "pallet-balances", "parity-scale-codec", "scale-info", "serde", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] @@ -8585,79 +7262,46 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faf5e6bf708cc4d7efe8d66a8bb80da4875724edbcf1f624bd34b6937c0af452" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-utility" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a8a6941da32837e4297e0d8abe0a5c94f348a119cccbf27b0f99ee01246c0e" -dependencies = [ - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "parity-scale-codec", - "scale-info", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "pallet-utility" version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384c1d740c019410f6b40586cc387726c2e3c417c0e3e6f7e4774cd46bc6c1d0" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-vesting" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd29411ef24eb6a856adf1bc33b37ead4835a25dafb1c4c8c95b13fa5247748f" -dependencies = [ - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "pallet-vesting" version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55f3ac517a10c14beee86a737b9ea5d592af9ab21cc5354474bc5f7019210358" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] @@ -8667,38 +7311,16 @@ version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de259e3329422bf3eb10b7e966f4b1c5caadcb29cd2d45af3a000cb2d184e60d" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "pallet-xcm" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04d5e5404d9dadb39390949aadc2c641c16ce4cb0f47ed7a7ff584ab914c2984" -dependencies = [ - "bounded-collections", - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "staging-xcm 4.0.0", - "staging-xcm-executor 4.0.2", -] - [[package]] name = "pallet-xcm" version = "7.0.0" @@ -8706,41 +7328,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cee3520e03ac679125e8dcaa00ce4afeeb106a9623e79b5acf970d72af7f5d02" dependencies = [ "bounded-collections", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-balances 28.0.0", + "pallet-balances", "parity-scale-codec", "scale-info", "serde", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", -] - -[[package]] -name = "pallet-xcm-benchmarks" -version = "4.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f50852380d3272accbf4532dc2e46cdc7f66f5452600bfd7d33fc208a5ff1e" -dependencies = [ - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "staging-xcm 4.0.0", - "staging-xcm-builder 4.0.1", - "staging-xcm-executor 4.0.2", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] @@ -8749,18 +7351,18 @@ version = "7.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "890bbad7a5752c8d4c3681457bac4e87fafc79cd9dd5b1a94e6f237f93a795a3" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] @@ -8773,18 +7375,18 @@ dependencies = [ "bp-runtime", "bp-xcm-bridge-hub", "bridge-runtime-common", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support", + "frame-system", "log", "pallet-bridge-messages", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] @@ -8793,53 +7395,18 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21f10cb76e759fbb672f132d72d9c4f75895ce3c9c9f50d68cd902bc88b043fc" dependencies = [ - "bp-xcm-bridge-hub-router 0.6.0", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "bp-xcm-bridge-hub-router", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", -] - -[[package]] -name = "parachains-common" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7ab598917585ae55b892dbfb6fa5073eb40454c47504a0d0db2634505538632" -dependencies = [ - "cumulus-primitives-core 0.4.0", - "cumulus-primitives-utility 0.4.1", - "frame-support 25.0.0", - "frame-system 25.0.0", - "log", - "num-traits", - "pallet-asset-tx-payment 25.0.0", - "pallet-assets 26.0.0", - "pallet-authorship 25.0.0", - "pallet-balances 25.0.0", - "pallet-collator-selection 6.0.0", - "parity-scale-codec", - "polkadot-core-primitives 4.0.0", - "polkadot-primitives 4.0.0", - "rococo-runtime-constants 4.0.0", - "scale-info", - "smallvec", - "sp-consensus-aura 0.29.0", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "staging-parachain-info 0.4.0", - "staging-xcm 4.0.0", - "staging-xcm-builder 4.0.1", - "substrate-wasm-builder 14.0.0", - "westend-runtime-constants 4.0.0", + "staging-xcm", + "staging-xcm-builder", ] [[package]] @@ -8848,36 +7415,36 @@ version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ceadd4f51620023871ece5eeda64734acd17d84d49b45473d335e900a012fdde" dependencies = [ - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.3", - "frame-support 28.0.0", - "frame-system 28.0.0", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-support", + "frame-system", "log", "num-traits", - "pallet-asset-tx-payment 28.0.0", - "pallet-assets 29.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-message-queue 31.0.0", - "pallet-xcm 7.0.0", - "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-primitives 7.0.0", - "rococo-runtime-constants 7.0.0", + "pallet-asset-tx-payment", + "pallet-assets", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-message-queue", + "pallet-xcm", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-primitives", + "rococo-runtime-constants", "scale-info", "smallvec", - "sp-consensus-aura 0.32.0", + "sp-consensus-aura", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", - "westend-runtime-constants 7.0.0", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", + "westend-runtime-constants", ] [[package]] @@ -8886,59 +7453,38 @@ version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef11e21280cf0825bdb5563f242a06dc78fb3765d2b9d5f6210fc15442abfe4a" dependencies = [ - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-parachain-inherent 0.7.0", - "cumulus-test-relay-sproof-builder 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-assets 29.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-session 28.0.0", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "sp-consensus-aura 0.32.0", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-test-relay-sproof-builder", + "frame-support", + "frame-system", + "pallet-assets", + "pallet-balances", + "pallet-collator-selection", + "pallet-session", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "polkadot-parachain-primitives", + "sp-consensus-aura", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", "sp-tracing 16.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-executor", + "substrate-wasm-builder", ] [[package]] -name = "parity-db" -version = "0.4.13" +name = "parity-scale-codec" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "592a28a24b09c9dc20ac8afaa6839abc417c720afe42c12e1e4a9d6aa2508d2e" -dependencies = [ - "blake2 0.10.6", - "crc32fast", - "fs2", - "hex", - "libc", - "log", - "lz4", - "memmap2", - "parking_lot 0.12.1", - "rand 0.8.5", - "siphasher", - "snap", - "winapi", -] - -[[package]] -name = "parity-scale-codec" -version = "3.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -9086,12 +7632,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "pem" version = "1.1.1" @@ -9108,61 +7648,61 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73556f5783be7b2045e55625ae72da8c9ca255bbd9c14184c8c18b76ef6f81e2" dependencies = [ "assets-common", - "cumulus-pallet-aura-ext 0.7.0", - "cumulus-pallet-dmp-queue 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.3", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", - "log", - "pallet-asset-tx-payment 28.0.0", - "pallet-assets 29.0.0", - "pallet-aura 27.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-message-queue 31.0.0", - "pallet-session 28.0.0", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "log", + "pallet-asset-tx-payment", + "pallet-assets", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-message-queue", + "pallet-session", "pallet-sudo", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-xcm", + "parachains-common", "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-common", "scale-info", "smallvec", "snowbridge-rococo-common", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-aura 0.32.0", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", "sp-core 28.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", + "sp-genesis-builder", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", "sp-std 14.0.0", "sp-storage 19.0.0", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", ] [[package]] @@ -9241,19 +7781,6 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" -[[package]] -name = "polkadot-core-primitives" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b08d1d6ca24e1b13f8069e015cfab794344212dd7436aadd61de8086a82664ef" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "polkadot-core-primitives" version = "7.0.0" @@ -9263,164 +7790,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "polkadot-node-jaeger" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfe6d4769181dce55b1b8fc53f0bd85bb4aa20473702fbce95a94abafa19379" -dependencies = [ - "lazy_static", - "log", - "mick-jaeger", - "parity-scale-codec", - "parking_lot 0.12.1", - "polkadot-node-primitives", - "polkadot-primitives 4.0.0", - "sc-network 0.31.0", - "sp-core 25.0.0", - "thiserror", - "tokio", -] - -[[package]] -name = "polkadot-node-metrics" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51a586fc3ef87c685588a650c18882b4cf069d8adc0d7d9bd2670749cb4e82b" -dependencies = [ - "bs58 0.5.0", - "futures", - "futures-timer", - "log", - "parity-scale-codec", - "polkadot-primitives 4.0.0", - "prioritized-metered-channel 0.5.1", - "sc-cli", - "sc-service", - "sc-tracing", - "substrate-prometheus-endpoint 0.16.0", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-network-protocol" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6de513655bf71400299cda1ccaebfa612fd3965e7ce5a9120b4ff37bfc80931" -dependencies = [ - "async-channel", - "async-trait", - "bitvec", - "derive_more", - "fatality", - "futures", - "hex", - "parity-scale-codec", - "polkadot-node-jaeger", - "polkadot-node-primitives", - "polkadot-primitives 4.0.0", - "rand 0.8.5", - "sc-authority-discovery", - "sc-network 0.31.0", - "strum", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-primitives" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e82ee5edac871310bd1ce16a035ad2fc901d6ddd69ea0bbabc7f0a70a02770a" -dependencies = [ - "bounded-vec", - "futures", - "parity-scale-codec", - "polkadot-parachain-primitives 3.0.0", - "polkadot-primitives 4.0.0", - "schnorrkel 0.9.1", - "serde", - "sp-application-crypto 27.0.0", - "sp-consensus-babe 0.29.0", - "sp-core 25.0.0", - "sp-keystore 0.31.0", - "sp-maybe-compressed-blob 9.0.0", - "sp-runtime 28.0.0", - "thiserror", - "zstd 0.12.4", -] - -[[package]] -name = "polkadot-node-subsystem-types" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1013b3bac6e9b76bbd71433c3eba36b5c0fa9306bfc473ec02e3a104e156d2" -dependencies = [ - "async-trait", - "derive_more", - "futures", - "orchestra", - "polkadot-node-jaeger", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-primitives 4.0.0", - "polkadot-statement-table", - "sc-client-api 25.0.0", - "sc-network 0.31.0", - "sc-transaction-pool-api 25.0.0", - "smallvec", - "sp-api 23.0.0", - "sp-authority-discovery 23.0.0", - "sp-consensus-babe 0.29.0", - "substrate-prometheus-endpoint 0.16.0", - "thiserror", -] - -[[package]] -name = "polkadot-overseer" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2f547e981cbd72357ba30952193844d30de5063e9d304c117c9b941f12b5f84" -dependencies = [ - "async-trait", - "futures", - "futures-timer", - "orchestra", - "parking_lot 0.12.1", - "polkadot-node-metrics", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem-types", - "polkadot-primitives 4.0.0", - "sc-client-api 25.0.0", - "sp-api 23.0.0", - "sp-core 25.0.0", - "tikv-jemalloc-ctl", - "tracing-gum", -] - -[[package]] -name = "polkadot-parachain-primitives" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42265630c0c48e25d7ee5a9f4bdcafd003be65c0a44deeb6541620ca169fa519" -dependencies = [ - "bounded-collections", - "derive_more", - "frame-support 25.0.0", - "parity-scale-codec", - "polkadot-core-primitives 4.0.0", - "scale-info", - "serde", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "polkadot-parachain-primitives" version = "6.0.0" @@ -9430,40 +7803,13 @@ dependencies = [ "bounded-collections", "derive_more", "parity-scale-codec", - "polkadot-core-primitives 7.0.0", + "polkadot-core-primitives", "scale-info", "serde", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", - "sp-weights 27.0.0", -] - -[[package]] -name = "polkadot-primitives" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4508ff6b035edc08c54bb61238500179963f6f1eb8266dce6a5625509124bc" -dependencies = [ - "bitvec", - "hex-literal", - "parity-scale-codec", - "polkadot-core-primitives 4.0.0", - "polkadot-parachain-primitives 3.0.0", - "scale-info", - "serde", - "sp-api 23.0.0", - "sp-application-crypto 27.0.0", - "sp-arithmetic 20.0.0", - "sp-authority-discovery 23.0.0", - "sp-consensus-slots 0.29.0", - "sp-core 25.0.0", - "sp-inherents 23.0.0", - "sp-io 27.0.0", - "sp-keystore 0.31.0", - "sp-runtime 28.0.0", - "sp-staking 23.0.0", - "sp-std 12.0.0", + "sp-weights", ] [[package]] @@ -9475,21 +7821,21 @@ dependencies = [ "bitvec", "hex-literal", "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", + "polkadot-core-primitives", + "polkadot-parachain-primitives", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-authority-discovery 26.0.0", - "sp-consensus-slots 0.32.0", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-authority-discovery", + "sp-consensus-slots", "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-staking", "sp-std 14.0.0", ] @@ -9499,40 +7845,40 @@ version = "1.0.0" dependencies = [ "binary-merkle-tree", "bitvec", - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-executive 28.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-executive", "frame-remote-externalities", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "hex-literal", "log", - "pallet-asset-rate 7.0.0", - "pallet-authority-discovery 28.0.0", - "pallet-authorship 28.0.0", - "pallet-babe 28.0.0", + "pallet-asset-rate", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", "pallet-bags-list", - "pallet-balances 28.0.0", + "pallet-balances", "pallet-beefy", "pallet-beefy-mmr", "pallet-bounties", "pallet-child-bounties", - "pallet-collective 28.0.0", + "pallet-collective", "pallet-conviction-voting", "pallet-democracy", - "pallet-election-provider-multi-phase 27.0.0", - "pallet-election-provider-support-benchmarking 27.0.0", + "pallet-election-provider-multi-phase", + "pallet-election-provider-support-benchmarking", "pallet-elections-phragmen", - "pallet-fast-unstake 27.0.0", + "pallet-fast-unstake", "pallet-grandpa", "pallet-identity", "pallet-im-online", "pallet-indices", - "pallet-membership 28.0.0", - "pallet-message-queue 31.0.0", + "pallet-membership", + "pallet-message-queue", "pallet-mmr", "pallet-multisig", "pallet-nomination-pools", @@ -9541,121 +7887,70 @@ dependencies = [ "pallet-offences", "pallet-offences-benchmarking", "pallet-preimage", - "pallet-proxy 28.0.0", + "pallet-proxy", "pallet-referenda", - "pallet-scheduler 29.0.0", - "pallet-session 28.0.0", + "pallet-scheduler", + "pallet-session", "pallet-session-benchmarking", - "pallet-staking 28.0.0", + "pallet-staking", "pallet-staking-reward-curve", - "pallet-staking-reward-fn 19.0.0", + "pallet-staking-reward-fn", "pallet-staking-runtime-api", - "pallet-timestamp 27.0.0", + "pallet-timestamp", "pallet-tips", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-treasury 27.0.0", - "pallet-utility 28.0.0", - "pallet-vesting 28.0.0", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", "pallet-whitelist", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-xcm", + "pallet-xcm-benchmarks", "parity-scale-codec", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", + "polkadot-primitives", + "polkadot-runtime-common", "polkadot-runtime-constants", - "polkadot-runtime-parachains 7.0.0", + "polkadot-runtime-parachains", "rustc-hex", "scale-info", "separator", "serde", "serde_derive", "serde_json", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-authority-discovery 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-babe 0.32.0", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", "sp-consensus-beefy", "sp-core 28.0.0", "sp-debug-derive 14.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-keyring", "sp-mmr-primitives", - "sp-npos-elections 26.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", + "sp-npos-elections", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", "sp-std 14.0.0", "sp-storage 19.0.0", "sp-tracing 16.0.0", - "sp-transaction-pool 26.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "sp-transaction-pool", + "sp-trie", + "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", - "substrate-wasm-builder 17.0.0", + "substrate-wasm-builder", "tiny-keccak", "tokio", ] -[[package]] -name = "polkadot-runtime-common" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a788f8ed8b33262c33f72d78e3416c5991e40d333178ae43000a92181ee44bca" -dependencies = [ - "bitvec", - "frame-benchmarking 25.0.0", - "frame-election-provider-support 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "impl-trait-for-tuples", - "libsecp256k1", - "log", - "pallet-asset-rate 4.0.0", - "pallet-authorship 25.0.0", - "pallet-babe 25.0.0", - "pallet-balances 25.0.0", - "pallet-election-provider-multi-phase 24.0.0", - "pallet-fast-unstake 24.0.0", - "pallet-session 25.0.0", - "pallet-staking 25.0.0", - "pallet-staking-reward-fn 16.0.0", - "pallet-timestamp 24.0.0", - "pallet-transaction-payment 25.0.0", - "pallet-treasury 24.0.0", - "pallet-vesting 25.0.0", - "pallet-xcm-benchmarks 4.0.1", - "parity-scale-codec", - "polkadot-primitives 4.0.0", - "polkadot-runtime-parachains 4.0.0", - "rustc-hex", - "scale-info", - "serde", - "serde_derive", - "slot-range-helper 4.0.0", - "sp-api 23.0.0", - "sp-core 25.0.0", - "sp-inherents 23.0.0", - "sp-io 27.0.0", - "sp-npos-elections 23.0.0", - "sp-runtime 28.0.0", - "sp-session 24.0.0", - "sp-staking 23.0.0", - "sp-std 12.0.0", - "staging-xcm 4.0.0", - "staging-xcm-builder 4.0.1", - "staging-xcm-executor 4.0.2", - "static_assertions", -] - [[package]] name = "polkadot-runtime-common" version = "7.0.0" @@ -9663,49 +7958,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4641a850b7415a42e56bd262aba243ed77a9280cb2b825a427c425bdc8961d70" dependencies = [ "bitvec", - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", "impl-trait-for-tuples", "libsecp256k1", "log", - "pallet-asset-rate 7.0.0", - "pallet-authorship 28.0.0", - "pallet-babe 28.0.0", - "pallet-balances 28.0.0", + "pallet-asset-rate", + "pallet-authorship", + "pallet-babe", + "pallet-balances", "pallet-broker", - "pallet-election-provider-multi-phase 27.0.0", - "pallet-fast-unstake 27.0.0", + "pallet-election-provider-multi-phase", + "pallet-fast-unstake", "pallet-identity", - "pallet-session 28.0.0", - "pallet-staking 28.0.0", - "pallet-staking-reward-fn 19.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-treasury 27.0.0", - "pallet-vesting 28.0.0", - "pallet-xcm-benchmarks 7.0.3", - "parity-scale-codec", - "polkadot-primitives 7.0.0", - "polkadot-runtime-parachains 7.0.0", + "pallet-session", + "pallet-staking", + "pallet-staking-reward-fn", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-treasury", + "pallet-vesting", + "pallet-xcm-benchmarks", + "parity-scale-codec", + "polkadot-primitives", + "polkadot-runtime-parachains", "rustc-hex", "scale-info", "serde", "serde_derive", - "slot-range-helper 7.0.0", - "sp-api 26.0.0", + "slot-range-helper", + "sp-api", "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", - "sp-std 14.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "sp-inherents", + "sp-io", + "sp-npos-elections", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std 14.0.0", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", ] @@ -9713,28 +8008,14 @@ dependencies = [ name = "polkadot-runtime-constants" version = "1.0.0" dependencies = [ - "frame-support 28.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", "smallvec", "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", - "staging-xcm-builder 7.0.3", -] - -[[package]] -name = "polkadot-runtime-metrics" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfe45b01d9d621174c9c0eef0871aeead5986393838206fe58df3ae414bcb8d2" -dependencies = [ - "bs58 0.5.0", - "frame-benchmarking 25.0.0", - "parity-scale-codec", - "polkadot-primitives 4.0.0", - "sp-std 12.0.0", - "sp-tracing 14.0.0", + "sp-runtime", + "sp-weights", + "staging-xcm-builder", ] [[package]] @@ -9744,61 +8025,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ac3c6ee03f38556274b26049c51c5c7095abfd4ebfd11cd492918a4344f2851" dependencies = [ "bs58 0.5.0", - "frame-benchmarking 28.0.0", + "frame-benchmarking", "parity-scale-codec", - "polkadot-primitives 7.0.0", + "polkadot-primitives", "sp-std 14.0.0", "sp-tracing 16.0.0", ] -[[package]] -name = "polkadot-runtime-parachains" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936dbae8a7a88dba07da726d779126716e05364d8475ced1c313f32755050a02" -dependencies = [ - "bitflags 1.3.2", - "bitvec", - "derive_more", - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "impl-trait-for-tuples", - "log", - "pallet-authority-discovery 25.0.0", - "pallet-authorship 25.0.0", - "pallet-babe 25.0.0", - "pallet-balances 25.0.0", - "pallet-message-queue 28.0.0", - "pallet-session 25.0.0", - "pallet-staking 25.0.0", - "pallet-timestamp 24.0.0", - "pallet-vesting 25.0.0", - "parity-scale-codec", - "polkadot-core-primitives 4.0.0", - "polkadot-parachain-primitives 3.0.0", - "polkadot-primitives 4.0.0", - "polkadot-runtime-metrics 4.0.0", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rustc-hex", - "scale-info", - "serde", - "sp-api 23.0.0", - "sp-application-crypto 27.0.0", - "sp-core 25.0.0", - "sp-inherents 23.0.0", - "sp-io 27.0.0", - "sp-keystore 0.31.0", - "sp-runtime 28.0.0", - "sp-session 24.0.0", - "sp-staking 23.0.0", - "sp-std 12.0.0", - "staging-xcm 4.0.0", - "staging-xcm-executor 4.0.2", - "static_assertions", -] - [[package]] name = "polkadot-runtime-parachains" version = "7.0.0" @@ -9808,59 +8041,48 @@ dependencies = [ "bitflags 1.3.2", "bitvec", "derive_more", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", - "pallet-authority-discovery 28.0.0", - "pallet-authorship 28.0.0", - "pallet-babe 28.0.0", - "pallet-balances 28.0.0", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-balances", "pallet-broker", - "pallet-message-queue 31.0.0", - "pallet-session 28.0.0", - "pallet-staking 28.0.0", - "pallet-timestamp 27.0.0", - "pallet-vesting 28.0.0", - "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-metrics 7.0.0", + "pallet-message-queue", + "pallet-session", + "pallet-staking", + "pallet-timestamp", + "pallet-vesting", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-metrics", "rand 0.8.5", "rand_chacha 0.3.1", "rustc-hex", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-session", + "sp-staking", "sp-std 14.0.0", "sp-tracing 16.0.0", - "staging-xcm 7.0.0", - "staging-xcm-executor 7.0.3", + "staging-xcm", + "staging-xcm-executor", "static_assertions", ] -[[package]] -name = "polkadot-statement-table" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22b2a11cb8871f7e30a8f5e455c92d19a186065644ee00f9acda550ff89dacce" -dependencies = [ - "parity-scale-codec", - "polkadot-primitives 4.0.0", - "sp-core 25.0.0", -] - [[package]] name = "polling" version = "3.3.1" @@ -9924,7 +8146,7 @@ checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", "float-cmp", - "itertools 0.10.5", + "itertools", "normalize-line-endings", "predicates-core", "regex", @@ -9956,16 +8178,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "prettyplease" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" -dependencies = [ - "proc-macro2", - "syn 2.0.48", -] - [[package]] name = "primitive-types" version = "0.12.2" @@ -9981,38 +8193,6 @@ dependencies = [ "uint", ] -[[package]] -name = "prioritized-metered-channel" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e99f0c89bd88f393aab44a4ab949351f7bc7e7e1179d11ecbfe50cbe4c47e342" -dependencies = [ - "coarsetime", - "crossbeam-queue", - "derive_more", - "futures", - "futures-timer", - "nanorand", - "thiserror", - "tracing", -] - -[[package]] -name = "prioritized-metered-channel" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a172e6cc603231f2cf004232eabcecccc0da53ba576ab286ef7baa0cfc7927ad" -dependencies = [ - "coarsetime", - "crossbeam-queue", - "derive_more", - "futures", - "futures-timer", - "nanorand", - "thiserror", - "tracing", -] - [[package]] name = "proc-macro-crate" version = "1.3.1" @@ -10140,12 +8320,12 @@ checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", "heck", - "itertools 0.10.5", + "itertools", "lazy_static", "log", "multimap", "petgraph", - "prettyplease 0.1.25", + "prettyplease", "prost", "prost-types", "regex", @@ -10161,7 +8341,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools", "proc-macro2", "quote", "syn 1.0.109", @@ -10338,15 +8518,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_pcg" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" -dependencies = [ - "rand_core 0.6.4", -] - [[package]] name = "rawpointer" version = "0.2.1" @@ -10549,58 +8720,21 @@ dependencies = [ "rustc-hex", ] -[[package]] -name = "rocksdb" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" -dependencies = [ - "libc", - "librocksdb-sys", -] - -[[package]] -name = "rococo-runtime-constants" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "272eaa4f1b4b5357d89d1f8f504cb5ee81a105bf7e5c295f053c6e521f2a199b" -dependencies = [ - "frame-support 25.0.0", - "polkadot-primitives 4.0.0", - "polkadot-runtime-common 4.0.0", - "smallvec", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-weights 24.0.0", - "staging-xcm 4.0.0", -] - [[package]] name = "rococo-runtime-constants" version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b5b507493a19b5061eb2860c394847261216c7ea7f8f62ba2cb02e55c27d611" dependencies = [ - "frame-support 28.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", "smallvec", "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", -] - -[[package]] -name = "rpassword" -version = "7.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" -dependencies = [ - "libc", - "rtoolbox", - "windows-sys 0.48.0", + "sp-runtime", + "sp-weights", + "staging-xcm", + "staging-xcm-builder", ] [[package]] @@ -10618,16 +8752,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "rtoolbox" -version = "0.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "rustc-demangle" version = "0.1.23" @@ -10805,18 +8929,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "sc-allocator" -version = "20.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66b4c5976a9cff7fcf24c946276a62ea7837862b6f3bf9f8011f08faf4f08474" -dependencies = [ - "log", - "sp-core 25.0.0", - "sp-wasm-interface 18.0.0", - "thiserror", -] - [[package]] name = "sc-allocator" version = "23.0.0" @@ -10829,51 +8941,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sc-authority-discovery" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb7e0e8a4ea5304b65d49c0085a458ed2e43394f95457689875d3e0c6e118dee" -dependencies = [ - "async-trait", - "futures", - "futures-timer", - "ip_network", - "libp2p", - "log", - "multihash", - "parity-scale-codec", - "prost", - "prost-build", - "rand 0.8.5", - "sc-client-api 25.0.0", - "sc-network 0.31.0", - "sp-api 23.0.0", - "sp-authority-discovery 23.0.0", - "sp-blockchain 25.0.0", - "sp-core 25.0.0", - "sp-keystore 0.31.0", - "sp-runtime 28.0.0", - "substrate-prometheus-endpoint 0.16.0", - "thiserror", -] - -[[package]] -name = "sc-block-builder" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d3999b9b758c09a6c1155e481b683ee87712f071cc5a0679f9ee4906a14a404" -dependencies = [ - "parity-scale-codec", - "sc-client-api 25.0.0", - "sp-api 23.0.0", - "sp-block-builder 23.0.0", - "sp-blockchain 25.0.0", - "sp-core 25.0.0", - "sp-inherents 23.0.0", - "sp-runtime 28.0.0", -] - [[package]] name = "sc-block-builder" version = "0.33.0" @@ -10881,33 +8948,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "656b85de8aad8dd758f2e5f250f300e4711f294f238c9299064fbd624cb263f7" dependencies = [ "parity-scale-codec", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", - "sp-blockchain 28.0.0", + "sp-api", + "sp-block-builder", + "sp-blockchain", "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", - "sp-trie 29.0.0", -] - -[[package]] -name = "sc-chain-spec" -version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec7e711ea9870d3fb8e2a3ea5b601a9e20c63d0d2f457f40146407721e246a77" -dependencies = [ - "memmap2", - "sc-chain-spec-derive 10.0.0", - "sc-client-api 25.0.0", - "sc-executor 0.29.0", - "sc-network 0.31.0", - "sc-telemetry 12.0.0", - "serde", - "serde_json", - "sp-blockchain 25.0.0", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-state-machine 0.32.0", + "sp-inherents", + "sp-runtime", + "sp-trie", ] [[package]] @@ -10921,31 +8968,19 @@ dependencies = [ "log", "memmap2", "parity-scale-codec", - "sc-chain-spec-derive 11.0.0", - "sc-client-api 28.0.0", - "sc-executor 0.32.0", - "sc-network 0.34.0", - "sc-telemetry 15.0.0", + "sc-chain-spec-derive", + "sc-client-api", + "sc-executor", + "sc-network", + "sc-telemetry", "serde", "serde_json", - "sp-blockchain 28.0.0", + "sp-blockchain", "sp-core 28.0.0", - "sp-genesis-builder 0.7.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", -] - -[[package]] -name = "sc-chain-spec-derive" -version = "10.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f25158f791eb48715da9322375598b541cadd1f193674e8a4d77c79ffa3d95d" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 2.0.48", + "sp-genesis-builder", + "sp-io", + "sp-runtime", + "sp-state-machine", ] [[package]] @@ -10960,75 +8995,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "sc-cli" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22c61058223f80c1f961b03f7737529609a3283eef91129e971a1966101c18ea" -dependencies = [ - "array-bytes 6.2.2", - "chrono", - "clap", - "fdlimit", - "futures", - "libp2p-identity", - "log", - "names", - "parity-scale-codec", - "rand 0.8.5", - "regex", - "rpassword", - "sc-client-api 25.0.0", - "sc-client-db", - "sc-keystore", - "sc-mixnet 0.1.0", - "sc-network 0.31.0", - "sc-service", - "sc-telemetry 12.0.0", - "sc-tracing", - "sc-utils 11.0.0", - "serde", - "serde_json", - "sp-blockchain 25.0.0", - "sp-core 25.0.0", - "sp-keyring 28.0.0", - "sp-keystore 0.31.0", - "sp-panic-handler 12.0.0", - "sp-runtime 28.0.0", - "sp-version 26.0.0", - "thiserror", - "tiny-bip39", - "tokio", -] - -[[package]] -name = "sc-client-api" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d32101f415f4d7ddbe8b5de1c1387a78d6dce070e26407ec605fe9f3fc9e23" -dependencies = [ - "fnv", - "futures", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-executor 0.29.0", - "sc-transaction-pool-api 25.0.0", - "sc-utils 11.0.0", - "sp-api 23.0.0", - "sp-blockchain 25.0.0", - "sp-consensus 0.29.0", - "sp-core 25.0.0", - "sp-database 9.0.0", - "sp-externalities 0.23.0", - "sp-runtime 28.0.0", - "sp-state-machine 0.32.0", - "sp-statement-store 7.0.0", - "sp-storage 17.0.0", - "sp-trie 26.0.0", - "substrate-prometheus-endpoint 0.16.0", -] - [[package]] name = "sc-client-api" version = "28.0.0" @@ -11040,74 +9006,21 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sc-executor 0.32.0", - "sc-transaction-pool-api 28.0.0", - "sc-utils 14.0.0", - "sp-api 26.0.0", - "sp-blockchain 28.0.0", - "sp-consensus 0.32.0", + "sc-executor", + "sc-transaction-pool-api", + "sc-utils", + "sp-api", + "sp-blockchain", + "sp-consensus", "sp-core 28.0.0", - "sp-database 10.0.0", + "sp-database", "sp-externalities 0.25.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-statement-store 10.0.0", + "sp-runtime", + "sp-state-machine", + "sp-statement-store", "sp-storage 19.0.0", - "sp-trie 29.0.0", - "substrate-prometheus-endpoint 0.17.0", -] - -[[package]] -name = "sc-client-db" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4ced79f609a44782874d856cf39d256838957195ef34f4fb8ced90bf4b725d0" -dependencies = [ - "hash-db", - "kvdb", - "kvdb-memorydb", - "kvdb-rocksdb", - "linked-hash-map", - "log", - "parity-db", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-client-api 25.0.0", - "sc-state-db", - "schnellru", - "sp-arithmetic 20.0.0", - "sp-blockchain 25.0.0", - "sp-core 25.0.0", - "sp-database 9.0.0", - "sp-runtime 28.0.0", - "sp-state-machine 0.32.0", - "sp-trie 26.0.0", -] - -[[package]] -name = "sc-consensus" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86e4100cc8fb3876708e1ec5a7c63af3baa75febd5051beb9ddd1e4835fdfc27" -dependencies = [ - "async-trait", - "futures", - "futures-timer", - "libp2p-identity", - "log", - "mockall", - "parking_lot 0.12.1", - "sc-client-api 25.0.0", - "sc-utils 11.0.0", - "serde", - "sp-api 23.0.0", - "sp-blockchain 25.0.0", - "sp-consensus 0.29.0", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-state-machine 0.32.0", - "substrate-prometheus-endpoint 0.16.0", - "thiserror", + "sp-trie", + "substrate-prometheus-endpoint", ] [[package]] @@ -11123,16 +9036,16 @@ dependencies = [ "log", "mockall", "parking_lot 0.12.1", - "sc-client-api 28.0.0", - "sc-utils 14.0.0", + "sc-client-api", + "sc-utils", "serde", - "sp-api 26.0.0", - "sp-blockchain 28.0.0", - "sp-consensus 0.32.0", + "sp-api", + "sp-blockchain", + "sp-consensus", "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "substrate-prometheus-endpoint 0.17.0", + "sp-runtime", + "sp-state-machine", + "substrate-prometheus-endpoint", "thiserror", ] @@ -11147,61 +9060,38 @@ dependencies = [ "async-trait", "dyn-clone", "finality-grandpa", - "fork-tree 12.0.0", + "fork-tree", "futures", "futures-timer", "log", "parity-scale-codec", "parking_lot 0.12.1", "rand 0.8.5", - "sc-block-builder 0.33.0", - "sc-chain-spec 27.0.0", - "sc-client-api 28.0.0", - "sc-consensus 0.33.0", - "sc-network 0.34.0", - "sc-network-common 0.33.0", + "sc-block-builder", + "sc-chain-spec", + "sc-client-api", + "sc-consensus", + "sc-network", + "sc-network-common", "sc-network-gossip", - "sc-network-sync 0.33.0", - "sc-telemetry 15.0.0", - "sc-transaction-pool-api 28.0.0", - "sc-utils 14.0.0", + "sc-network-sync", + "sc-telemetry", + "sc-transaction-pool-api", + "sc-utils", "serde_json", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-blockchain 28.0.0", - "sp-consensus 0.32.0", - "sp-consensus-grandpa 13.0.0", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-consensus-grandpa", "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "substrate-prometheus-endpoint 0.17.0", + "sp-keystore", + "sp-runtime", + "substrate-prometheus-endpoint", "thiserror", ] -[[package]] -name = "sc-executor" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225f2ad733bc7234a6638d5203624194824b2f78ab631bc911223f536a66b9c8" -dependencies = [ - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-executor-common 0.26.0", - "sc-executor-wasmtime 0.26.0", - "schnellru", - "sp-api 23.0.0", - "sp-core 25.0.0", - "sp-externalities 0.23.0", - "sp-io 27.0.0", - "sp-panic-handler 12.0.0", - "sp-runtime-interface 21.0.0", - "sp-trie 26.0.0", - "sp-version 26.0.0", - "sp-wasm-interface 18.0.0", - "tracing", -] - [[package]] name = "sc-executor" version = "0.32.0" @@ -11210,66 +9100,34 @@ checksum = "3129f8af1f8aa5b05829ffec942feff61163054a536704ba48fdcc2276f6042a" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "sc-executor-common 0.29.0", - "sc-executor-wasmtime 0.29.0", + "sc-executor-common", + "sc-executor-wasmtime", "schnellru", - "sp-api 26.0.0", + "sp-api", "sp-core 28.0.0", "sp-externalities 0.25.0", - "sp-io 30.0.0", - "sp-panic-handler 13.0.0", + "sp-io", + "sp-panic-handler", "sp-runtime-interface 24.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", + "sp-trie", + "sp-version", "sp-wasm-interface 20.0.0", "tracing", ] -[[package]] -name = "sc-executor-common" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "169c1cfe81ba0e0d44ab4ada1600e30b6a9de588c792db73e32a854a6e3e1a87" -dependencies = [ - "sc-allocator 20.0.0", - "sp-maybe-compressed-blob 9.0.0", - "sp-wasm-interface 18.0.0", - "thiserror", - "wasm-instrument", -] - [[package]] name = "sc-executor-common" version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0285a4a14c0d2c1d04380ff83cddd79181ded510c605d36804cb9c6eb3bbf2ae" dependencies = [ - "sc-allocator 23.0.0", - "sp-maybe-compressed-blob 11.0.0", + "sc-allocator", + "sp-maybe-compressed-blob", "sp-wasm-interface 20.0.0", "thiserror", "wasm-instrument", ] -[[package]] -name = "sc-executor-wasmtime" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9167d733e928c528273be63b905ec750cfda85d740453071463da69f7d633bc" -dependencies = [ - "anyhow", - "cfg-if", - "libc", - "log", - "parking_lot 0.12.1", - "rustix 0.36.17", - "sc-allocator 20.0.0", - "sc-executor-common 0.26.0", - "sp-runtime-interface 21.0.0", - "sp-wasm-interface 18.0.0", - "wasmtime", -] - [[package]] name = "sc-executor-wasmtime" version = "0.29.0" @@ -11282,74 +9140,13 @@ dependencies = [ "log", "parking_lot 0.12.1", "rustix 0.36.17", - "sc-allocator 23.0.0", - "sc-executor-common 0.29.0", + "sc-allocator", + "sc-executor-common", "sp-runtime-interface 24.0.0", "sp-wasm-interface 20.0.0", "wasmtime", ] -[[package]] -name = "sc-informant" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7189a0b95fe5d79895a107c6c057bc9351cd9c867552200815199cde25bcdb9d" -dependencies = [ - "ansi_term", - "futures", - "futures-timer", - "log", - "sc-client-api 25.0.0", - "sc-network 0.31.0", - "sc-network-common 0.30.0", - "sp-blockchain 25.0.0", - "sp-runtime 28.0.0", -] - -[[package]] -name = "sc-keystore" -version = "22.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abecdf9778fccc254c0b5e227ea8b90fd59247044a30ad293a068b180427d244" -dependencies = [ - "array-bytes 6.2.2", - "parking_lot 0.12.1", - "serde_json", - "sp-application-crypto 27.0.0", - "sp-core 25.0.0", - "sp-keystore 0.31.0", - "thiserror", -] - -[[package]] -name = "sc-mixnet" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53ea71ec60601c18d6adcaf7a62698fc2e886c16dc8fdf8d61b3b76244dea38" -dependencies = [ - "array-bytes 4.2.0", - "arrayvec 0.7.4", - "blake2 0.10.6", - "futures", - "futures-timer", - "libp2p-identity", - "log", - "mixnet", - "multiaddr", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-client-api 25.0.0", - "sc-network 0.31.0", - "sc-transaction-pool-api 25.0.0", - "sp-api 23.0.0", - "sp-consensus 0.29.0", - "sp-core 25.0.0", - "sp-keystore 0.31.0", - "sp-mixnet 0.1.0", - "sp-runtime 28.0.0", - "thiserror", -] - [[package]] name = "sc-mixnet" version = "0.4.0" @@ -11368,58 +9165,16 @@ dependencies = [ "multiaddr", "parity-scale-codec", "parking_lot 0.12.1", - "sc-client-api 28.0.0", - "sc-network 0.34.0", - "sc-transaction-pool-api 28.0.0", - "sp-api 26.0.0", - "sp-consensus 0.32.0", + "sc-client-api", + "sc-network", + "sc-transaction-pool-api", + "sp-api", + "sp-consensus", "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-mixnet 0.4.0", - "sp-runtime 31.0.1", - "thiserror", -] - -[[package]] -name = "sc-network" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01f519592a971199c486d412dbf38ba54096857080bf4b9d29c9ffabcfee3745" -dependencies = [ - "array-bytes 6.2.2", - "async-channel", - "async-trait", - "asynchronous-codec", - "bytes", - "either", - "fnv", - "futures", - "futures-timer", - "ip_network", - "libp2p", - "linked_hash_set", - "log", - "mockall", - "parity-scale-codec", - "parking_lot 0.12.1", - "partial_sort", - "pin-project", - "rand 0.8.5", - "sc-client-api 25.0.0", - "sc-network-common 0.30.0", - "sc-utils 11.0.0", - "serde", - "serde_json", - "smallvec", - "sp-arithmetic 20.0.0", - "sp-blockchain 25.0.0", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "substrate-prometheus-endpoint 0.16.0", + "sp-keystore", + "sp-mixnet", + "sp-runtime", "thiserror", - "unsigned-varint", - "wasm-timer", - "zeroize", ] [[package]] @@ -11447,17 +9202,17 @@ dependencies = [ "partial_sort", "pin-project", "rand 0.8.5", - "sc-client-api 28.0.0", - "sc-network-common 0.33.0", - "sc-utils 14.0.0", + "sc-client-api", + "sc-network-common", + "sc-utils", "serde", "serde_json", "smallvec", - "sp-arithmetic 23.0.0", - "sp-blockchain 28.0.0", + "sp-arithmetic", + "sp-blockchain", "sp-core 28.0.0", - "sp-runtime 31.0.1", - "substrate-prometheus-endpoint 0.17.0", + "sp-runtime", + "substrate-prometheus-endpoint", "thiserror", "tokio", "tokio-stream", @@ -11466,32 +9221,11 @@ dependencies = [ "zeroize", ] -[[package]] -name = "sc-network-bitswap" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fe63a55e03d8bc796ff1e94e7fb62a62acfd7a80a47865a97b55c13371c3e05" -dependencies = [ - "async-channel", - "cid", - "futures", - "libp2p-identity", - "log", - "prost", - "prost-build", - "sc-client-api 25.0.0", - "sc-network 0.31.0", - "sp-blockchain 25.0.0", - "sp-runtime 28.0.0", - "thiserror", - "unsigned-varint", -] - [[package]] name = "sc-network-common" -version = "0.30.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d236686d15275e4aa49ca929a06fb6fac28aa70e35ee185b981036c149f9e9d" +checksum = "9b798acc12d5b3120b2d5e8a078fcec39d6732089261136ac31c993235ade917" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -11499,33 +9233,15 @@ dependencies = [ "libp2p-identity", "parity-scale-codec", "prost-build", - "sc-consensus 0.30.0", - "sp-consensus 0.29.0", - "sp-consensus-grandpa 10.0.0", - "sp-runtime 28.0.0", + "sc-consensus", + "sp-consensus", + "sp-consensus-grandpa", + "sp-runtime", ] [[package]] -name = "sc-network-common" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b798acc12d5b3120b2d5e8a078fcec39d6732089261136ac31c993235ade917" -dependencies = [ - "async-trait", - "bitflags 1.3.2", - "futures", - "libp2p-identity", - "parity-scale-codec", - "prost-build", - "sc-consensus 0.33.0", - "sp-consensus 0.32.0", - "sp-consensus-grandpa 13.0.0", - "sp-runtime 31.0.1", -] - -[[package]] -name = "sc-network-gossip" -version = "0.34.0" +name = "sc-network-gossip" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd92792f3a04fcb1f21018c9f8a5d6d438d705a2548ffcdc7730280c667b8386" dependencies = [ @@ -11534,470 +9250,91 @@ dependencies = [ "futures-timer", "libp2p", "log", - "sc-network 0.34.0", - "sc-network-common 0.33.0", - "sc-network-sync 0.33.0", + "sc-network", + "sc-network-common", + "sc-network-sync", "schnellru", - "sp-runtime 31.0.1", - "substrate-prometheus-endpoint 0.17.0", + "sp-runtime", + "substrate-prometheus-endpoint", "tracing", ] [[package]] -name = "sc-network-light" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aac888fd720ef8bb2ff7d2b7f7b2e54d17bb85a417cf1e1b6f0f64f7e644936d" -dependencies = [ - "array-bytes 6.2.2", - "async-channel", - "futures", - "libp2p-identity", - "log", - "parity-scale-codec", - "prost", - "prost-build", - "sc-client-api 25.0.0", - "sc-network 0.31.0", - "sp-blockchain 25.0.0", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "thiserror", -] - -[[package]] -name = "sc-network-sync" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10c697aa8f52cf194b9f00113a7d0d3ce5d1456bedd6169a9caae10737f02907" -dependencies = [ - "array-bytes 6.2.2", - "async-channel", - "async-trait", - "fork-tree 11.0.0", - "futures", - "futures-timer", - "libp2p", - "log", - "mockall", - "parity-scale-codec", - "prost", - "prost-build", - "sc-client-api 25.0.0", - "sc-consensus 0.30.0", - "sc-network 0.31.0", - "sc-network-common 0.30.0", - "sc-utils 11.0.0", - "schnellru", - "smallvec", - "sp-arithmetic 20.0.0", - "sp-blockchain 25.0.0", - "sp-consensus 0.29.0", - "sp-consensus-grandpa 10.0.0", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "substrate-prometheus-endpoint 0.16.0", - "thiserror", - "tokio-stream", -] - -[[package]] -name = "sc-network-sync" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4c92fd35c49f748abf0bf420e1e99aa76b0f48ab43c183ea5dacef951116d7e" -dependencies = [ - "array-bytes 6.2.2", - "async-channel", - "async-trait", - "fork-tree 12.0.0", - "futures", - "futures-timer", - "libp2p", - "log", - "mockall", - "parity-scale-codec", - "prost", - "prost-build", - "sc-client-api 28.0.0", - "sc-consensus 0.33.0", - "sc-network 0.34.0", - "sc-network-common 0.33.0", - "sc-utils 14.0.0", - "schnellru", - "smallvec", - "sp-arithmetic 23.0.0", - "sp-blockchain 28.0.0", - "sp-consensus 0.32.0", - "sp-consensus-grandpa 13.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "substrate-prometheus-endpoint 0.17.0", - "thiserror", - "tokio", - "tokio-stream", -] - -[[package]] -name = "sc-network-transactions" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7c9bfc7b58ce229d1512158b8f13dc849ec24857d1c29a41a867fb8afb5c09" -dependencies = [ - "array-bytes 6.2.2", - "futures", - "libp2p", - "log", - "parity-scale-codec", - "sc-network 0.31.0", - "sc-network-common 0.30.0", - "sc-utils 11.0.0", - "sp-consensus 0.29.0", - "sp-runtime 28.0.0", - "substrate-prometheus-endpoint 0.16.0", -] - -[[package]] -name = "sc-rpc" -version = "26.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb277280b6b3519e4a2e693b75d4ca516ebb4a928162e6a1791b217b2be60c9f" -dependencies = [ - "futures", - "jsonrpsee", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-block-builder 0.30.0", - "sc-chain-spec 24.0.0", - "sc-client-api 25.0.0", - "sc-mixnet 0.1.0", - "sc-rpc-api 0.30.0", - "sc-tracing", - "sc-transaction-pool-api 25.0.0", - "sc-utils 11.0.0", - "serde_json", - "sp-api 23.0.0", - "sp-blockchain 25.0.0", - "sp-core 25.0.0", - "sp-keystore 0.31.0", - "sp-offchain 23.0.0", - "sp-rpc 23.0.0", - "sp-runtime 28.0.0", - "sp-session 24.0.0", - "sp-statement-store 7.0.0", - "sp-version 26.0.0", - "tokio", -] - -[[package]] -name = "sc-rpc-api" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def499ac717db8442fe18543e52330d5f105027b666df73c0b38e81e9105078b" -dependencies = [ - "jsonrpsee", - "parity-scale-codec", - "sc-chain-spec 24.0.0", - "sc-mixnet 0.1.0", - "sc-transaction-pool-api 25.0.0", - "scale-info", - "serde", - "serde_json", - "sp-core 25.0.0", - "sp-rpc 23.0.0", - "sp-runtime 28.0.0", - "sp-version 26.0.0", - "thiserror", -] - -[[package]] -name = "sc-rpc-api" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630e81a436f32487452ae1a57ad0ba31f320ddf864bb7faefd7490fe16b3e139" -dependencies = [ - "jsonrpsee", - "parity-scale-codec", - "sc-chain-spec 27.0.0", - "sc-mixnet 0.4.0", - "sc-transaction-pool-api 28.0.0", - "scale-info", - "serde", - "serde_json", - "sp-core 28.0.0", - "sp-rpc 26.0.0", - "sp-runtime 31.0.1", - "sp-version 29.0.0", - "thiserror", -] - -[[package]] -name = "sc-rpc-server" -version = "10.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8083e1b026dcf397f8c1122b3fba6cc744c6962996df6a30e0fb75223f7637" -dependencies = [ - "http", - "jsonrpsee", - "log", - "serde_json", - "substrate-prometheus-endpoint 0.16.0", - "tokio", - "tower", - "tower-http", -] - -[[package]] -name = "sc-rpc-spec-v2" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "198ea9287111b4060ce1d70dce99804b99d1a92b5fb23a79d94bf0cb460ca3ce" -dependencies = [ - "array-bytes 6.2.2", - "futures", - "futures-util", - "hex", - "jsonrpsee", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-chain-spec 24.0.0", - "sc-client-api 25.0.0", - "sc-transaction-pool-api 25.0.0", - "sc-utils 11.0.0", - "serde", - "sp-api 23.0.0", - "sp-blockchain 25.0.0", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-version 26.0.0", - "thiserror", - "tokio", - "tokio-stream", -] - -[[package]] -name = "sc-service" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3623ae5bd7b089da9796a3f1edd974c94f34dd4b4b527146662ef409ae9cd38c" -dependencies = [ - "async-trait", - "directories", - "exit-future", - "futures", - "futures-timer", - "jsonrpsee", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "pin-project", - "rand 0.8.5", - "sc-block-builder 0.30.0", - "sc-chain-spec 24.0.0", - "sc-client-api 25.0.0", - "sc-client-db", - "sc-consensus 0.30.0", - "sc-executor 0.29.0", - "sc-informant", - "sc-keystore", - "sc-network 0.31.0", - "sc-network-bitswap", - "sc-network-common 0.30.0", - "sc-network-light", - "sc-network-sync 0.30.0", - "sc-network-transactions", - "sc-rpc", - "sc-rpc-server", - "sc-rpc-spec-v2", - "sc-sysinfo", - "sc-telemetry 12.0.0", - "sc-tracing", - "sc-transaction-pool", - "sc-transaction-pool-api 25.0.0", - "sc-utils 11.0.0", - "serde", - "serde_json", - "sp-api 23.0.0", - "sp-blockchain 25.0.0", - "sp-consensus 0.29.0", - "sp-core 25.0.0", - "sp-externalities 0.23.0", - "sp-keystore 0.31.0", - "sp-runtime 28.0.0", - "sp-session 24.0.0", - "sp-state-machine 0.32.0", - "sp-storage 17.0.0", - "sp-transaction-pool 23.0.0", - "sp-transaction-storage-proof", - "sp-trie 26.0.0", - "sp-version 26.0.0", - "static_init", - "substrate-prometheus-endpoint 0.16.0", - "tempfile", - "thiserror", - "tokio", - "tracing", - "tracing-futures", -] - -[[package]] -name = "sc-state-db" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3635fe572adfe796886e18910c8b94f7ce67f9ae3e2c161176e122ddf0baa7e4" -dependencies = [ - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sp-core 25.0.0", -] - -[[package]] -name = "sc-sysinfo" -version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60967710b85e650652832df73915b64c315f7b437e53c4635bd26106d6d05c21" -dependencies = [ - "futures", - "libc", - "log", - "rand 0.8.5", - "rand_pcg", - "regex", - "sc-telemetry 12.0.0", - "serde", - "serde_json", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-std 12.0.0", -] - -[[package]] -name = "sc-telemetry" -version = "12.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28e214e4d46cac02321bc3dc6fd72f019ac10819d1ac8f24f6935a4ae74ef273" -dependencies = [ - "chrono", - "futures", - "libp2p", - "log", - "parking_lot 0.12.1", - "pin-project", - "rand 0.8.5", - "sc-utils 11.0.0", - "serde", - "serde_json", - "thiserror", - "wasm-timer", -] - -[[package]] -name = "sc-telemetry" -version = "15.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96841bdc22e1ad5931e6cb7557b06ef33aeda7f5eef3864653359840f9fd025a" -dependencies = [ - "chrono", - "futures", - "libp2p", - "log", - "parking_lot 0.12.1", - "pin-project", - "rand 0.8.5", - "sc-utils 14.0.0", - "serde", - "serde_json", - "thiserror", - "wasm-timer", -] - -[[package]] -name = "sc-tracing" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bcd745ea216ba0c0a344cff2c41b12e27846d5fca4b28f56ff77e1d3ff3634" -dependencies = [ - "ansi_term", - "atty", - "chrono", - "lazy_static", - "libc", - "log", - "parking_lot 0.12.1", - "regex", - "rustc-hash", - "sc-client-api 25.0.0", - "sc-tracing-proc-macro", - "serde", - "sp-api 23.0.0", - "sp-blockchain 25.0.0", - "sp-core 25.0.0", - "sp-rpc 23.0.0", - "sp-runtime 28.0.0", - "sp-tracing 14.0.0", - "thiserror", - "tracing", - "tracing-log", - "tracing-subscriber", -] - -[[package]] -name = "sc-tracing-proc-macro" -version = "10.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c4ae9e4f957d7274ac6b59d667b66262caf6482dbb1b63f1c370528626b1272" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "sc-transaction-pool" -version = "25.0.0" +name = "sc-network-sync" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f6db45a057a619670e07deefb4e69aab83386f076363db424907da2b2e82590" +checksum = "c4c92fd35c49f748abf0bf420e1e99aa76b0f48ab43c183ea5dacef951116d7e" dependencies = [ + "array-bytes 6.2.2", + "async-channel", "async-trait", + "fork-tree", "futures", "futures-timer", - "linked-hash-map", + "libp2p", "log", + "mockall", "parity-scale-codec", - "parking_lot 0.12.1", - "sc-client-api 25.0.0", - "sc-transaction-pool-api 25.0.0", - "sc-utils 11.0.0", + "prost", + "prost-build", + "sc-client-api", + "sc-consensus", + "sc-network", + "sc-network-common", + "sc-utils", + "schnellru", + "smallvec", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-consensus-grandpa", + "sp-core 28.0.0", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", + "tokio", + "tokio-stream", +] + +[[package]] +name = "sc-rpc-api" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630e81a436f32487452ae1a57ad0ba31f320ddf864bb7faefd7490fe16b3e139" +dependencies = [ + "jsonrpsee", + "parity-scale-codec", + "sc-chain-spec", + "sc-mixnet", + "sc-transaction-pool-api", + "scale-info", "serde", - "sp-api 23.0.0", - "sp-blockchain 25.0.0", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-tracing 14.0.0", - "sp-transaction-pool 23.0.0", - "substrate-prometheus-endpoint 0.16.0", + "serde_json", + "sp-core 28.0.0", + "sp-rpc", + "sp-runtime", + "sp-version", "thiserror", ] [[package]] -name = "sc-transaction-pool-api" -version = "25.0.0" +name = "sc-telemetry" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1491607f296bb8cce09a5eb3a03320c60ad52bb8120127b26f69c32bcaccd8f2" +checksum = "96841bdc22e1ad5931e6cb7557b06ef33aeda7f5eef3864653359840f9fd025a" dependencies = [ - "async-trait", + "chrono", "futures", + "libp2p", "log", - "parity-scale-codec", + "parking_lot 0.12.1", + "pin-project", + "rand 0.8.5", + "sc-utils", "serde", - "sp-blockchain 25.0.0", - "sp-core 25.0.0", - "sp-runtime 28.0.0", + "serde_json", "thiserror", + "wasm-timer", ] [[package]] @@ -12011,28 +9348,12 @@ dependencies = [ "log", "parity-scale-codec", "serde", - "sp-blockchain 28.0.0", + "sp-blockchain", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "thiserror", ] -[[package]] -name = "sc-utils" -version = "11.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a4769c82dde62b9243dcc166be52e0c5d2d61cf2599923271118d9c8b997b1" -dependencies = [ - "async-channel", - "futures", - "futures-timer", - "lazy_static", - "log", - "parking_lot 0.12.1", - "prometheus", - "sp-arithmetic 20.0.0", -] - [[package]] name = "sc-utils" version = "14.0.0" @@ -12046,7 +9367,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "prometheus", - "sp-arithmetic 23.0.0", + "sp-arithmetic", ] [[package]] @@ -12392,21 +9713,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - [[package]] name = "signature" version = "2.2.0" @@ -12436,12 +9742,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "620a1d43d70e142b1d46a929af51d44f383db9c7a2ec122de2cd992ccfcf3c18" -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - [[package]] name = "slab" version = "0.4.9" @@ -12457,19 +9757,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" -[[package]] -name = "slot-range-helper" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e902c6b7e8f86718aee7989d6c8ea851d9772cb54a3389f2d729d8df41167ec" -dependencies = [ - "enumn", - "parity-scale-codec", - "paste", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "slot-range-helper" version = "7.0.0" @@ -12479,7 +9766,7 @@ dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] @@ -12489,12 +9776,6 @@ version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" -[[package]] -name = "snap" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" - [[package]] name = "snow" version = "0.9.4" @@ -12518,9 +9799,9 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dc8ddfb7bec2140079a788c312010f793d75fde1f996128517b0c14270296a4" dependencies = [ - "frame-support 28.0.0", + "frame-support", "log", - "staging-xcm 7.0.0", + "staging-xcm", ] [[package]] @@ -12560,28 +9841,6 @@ dependencies = [ "sha-1", ] -[[package]] -name = "sp-api" -version = "23.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f582f92ce47c86e4ffffe81fdd5120fea7c850dc0800653a7fa203bcc1532335" -dependencies = [ - "hash-db", - "log", - "parity-scale-codec", - "scale-info", - "sp-api-proc-macro 12.0.0", - "sp-core 25.0.0", - "sp-externalities 0.23.0", - "sp-metadata-ir 0.4.0", - "sp-runtime 28.0.0", - "sp-state-machine 0.32.0", - "sp-std 12.0.0", - "sp-trie 26.0.0", - "sp-version 26.0.0", - "thiserror", -] - [[package]] name = "sp-api" version = "26.0.0" @@ -12592,33 +9851,18 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-api-proc-macro 15.0.0", + "sp-api-proc-macro", "sp-core 28.0.0", "sp-externalities 0.25.0", - "sp-metadata-ir 0.6.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-metadata-ir", + "sp-runtime", + "sp-state-machine", "sp-std 14.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", + "sp-trie", + "sp-version", "thiserror", ] -[[package]] -name = "sp-api-proc-macro" -version = "12.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a896941b2d27365a6f937ebce11e36d55132dc32104f6a48b4cd765b55efd252" -dependencies = [ - "Inflector", - "blake2 0.10.6", - "expander 2.0.0", - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "sp-api-proc-macro" version = "15.0.0" @@ -12627,27 +9871,13 @@ checksum = "0694be2891593450916d6b53a274d234bccbc86bcbada36ba23fc356989070c7" dependencies = [ "Inflector", "blake2 0.10.6", - "expander 2.0.0", + "expander", "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 2.0.48", ] -[[package]] -name = "sp-application-crypto" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a93da025616ab59639f8e378df579c5aaa2c8b9999f328a0239156a57c991b53" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-std 12.0.0", -] - [[package]] name = "sp-application-crypto" version = "30.0.0" @@ -12658,25 +9888,10 @@ dependencies = [ "scale-info", "serde", "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-io", "sp-std 14.0.0", ] -[[package]] -name = "sp-arithmetic" -version = "20.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f80b5c16afb61dde1037a469d570adcc686440036429e50abe2301ba9d61aad5" -dependencies = [ - "integer-sqrt", - "num-traits", - "parity-scale-codec", - "scale-info", - "serde", - "sp-std 12.0.0", - "static_assertions", -] - [[package]] name = "sp-arithmetic" version = "23.0.0" @@ -12692,20 +9907,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "sp-authority-discovery" -version = "23.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e204d85bad6f02a5ae8fbba83c365e20459e979fd69db5575ba4b3ea1025ab3c" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-api 23.0.0", - "sp-application-crypto 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "sp-authority-discovery" version = "26.0.0" @@ -12714,55 +9915,24 @@ checksum = "22a740c05e9096eb17e93b5ab6aa5fe8ce0c9b4243777826d92133b3dd682e14" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-runtime 31.0.1", + "sp-api", + "sp-application-crypto", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "sp-block-builder" -version = "23.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cd16df3d1cdad862d3e764f10f7675876b011e032907423fdfa377ae2ec8575" -dependencies = [ - "sp-api 23.0.0", - "sp-inherents 23.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "sp-block-builder" version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6d2aa0943101367b955f5806c3ecea2e23df7c90059708107470dbfb9d3d7ab" dependencies = [ - "sp-api 26.0.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", + "sp-api", + "sp-inherents", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "sp-blockchain" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4932b97cde61874f395bab9b02443e3bd2046943abb280b63f83da9d0b623ea7" -dependencies = [ - "futures", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "schnellru", - "sp-api 23.0.0", - "sp-consensus 0.29.0", - "sp-database 9.0.0", - "sp-runtime 28.0.0", - "sp-state-machine 0.32.0", - "thiserror", -] - [[package]] name = "sp-blockchain" version = "28.0.0" @@ -12774,27 +9944,11 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "schnellru", - "sp-api 26.0.0", - "sp-consensus 0.32.0", - "sp-database 10.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "thiserror", -] - -[[package]] -name = "sp-consensus" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c5d7170fb7cfb18024ef7eeb40d272d22b9c3587d85cde2d091e8463b397f06" -dependencies = [ - "async-trait", - "futures", - "log", - "sp-core 25.0.0", - "sp-inherents 23.0.0", - "sp-runtime 28.0.0", - "sp-state-machine 0.32.0", + "sp-api", + "sp-consensus", + "sp-database", + "sp-runtime", + "sp-state-machine", "thiserror", ] @@ -12808,30 +9962,12 @@ dependencies = [ "futures", "log", "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-inherents", + "sp-runtime", + "sp-state-machine", "thiserror", ] -[[package]] -name = "sp-consensus-aura" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643a7c486a645f398d219d1fbcc8a416cad5018164a212fefde5c2ef00a182e4" -dependencies = [ - "async-trait", - "parity-scale-codec", - "scale-info", - "sp-api 23.0.0", - "sp-application-crypto 27.0.0", - "sp-consensus-slots 0.29.0", - "sp-inherents 23.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "sp-timestamp 23.0.0", -] - [[package]] name = "sp-consensus-aura" version = "0.32.0" @@ -12841,33 +9977,13 @@ dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-consensus-slots 0.32.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", + "sp-inherents", + "sp-runtime", "sp-std 14.0.0", - "sp-timestamp 26.0.0", -] - -[[package]] -name = "sp-consensus-babe" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "268f9b2e36d4e136c09ad87876cdcfd7ff734cb5917f333fefebff248f95a24f" -dependencies = [ - "async-trait", - "parity-scale-codec", - "scale-info", - "serde", - "sp-api 23.0.0", - "sp-application-crypto 27.0.0", - "sp-consensus-slots 0.29.0", - "sp-core 25.0.0", - "sp-inherents 23.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "sp-timestamp 23.0.0", + "sp-timestamp", ] [[package]] @@ -12880,14 +9996,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-consensus-slots 0.32.0", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", + "sp-inherents", + "sp-runtime", "sp-std 14.0.0", - "sp-timestamp 26.0.0", + "sp-timestamp", ] [[package]] @@ -12900,35 +10016,16 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api", + "sp-application-crypto", "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-io", "sp-mmr-primitives", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", "strum", ] -[[package]] -name = "sp-consensus-grandpa" -version = "10.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28bbee685900110419913f281ce0f29457fbc17418f00d15f0212c8043aba167" -dependencies = [ - "finality-grandpa", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-api 23.0.0", - "sp-application-crypto 27.0.0", - "sp-core 25.0.0", - "sp-keystore 0.31.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "sp-consensus-grandpa" version = "13.0.0" @@ -12940,27 +10037,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api", + "sp-application-crypto", "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-keystore", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "sp-consensus-slots" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "895b0c176d4eead833ddee5251d3cccbaeb0191ca3f33f84b11d347bebc6e21f" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-std 12.0.0", - "sp-timestamp 23.0.0", -] - [[package]] name = "sp-consensus-slots" version = "0.32.0" @@ -12971,7 +10055,7 @@ dependencies = [ "scale-info", "serde", "sp-std 14.0.0", - "sp-timestamp 26.0.0", + "sp-timestamp", ] [[package]] @@ -13039,7 +10123,7 @@ dependencies = [ "hash-db", "hash256-std-hasher", "impl-serde", - "itertools 0.10.5", + "itertools", "libsecp256k1", "log", "merlin 3.0.0", @@ -13095,36 +10179,15 @@ dependencies = [ "twox-hash", ] -[[package]] -name = "sp-core-hashing-proc-macro" -version = "13.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ce3e6931303769197da81facefa86159fa1085dcd96ecb7e7407b5b93582a0" -dependencies = [ - "quote", - "sp-core-hashing 13.0.0", - "syn 2.0.48", -] - [[package]] name = "sp-core-hashing-proc-macro" version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7527f8dda7667c41009b2cd0efaddcb81709b9741bd5ee6d17b11bad835cc698" dependencies = [ - "quote", - "sp-core-hashing 15.0.0", - "syn 2.0.48", -] - -[[package]] -name = "sp-database" -version = "9.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c6e8c710d6a71512af6f42d9dba9c3d1f6ad793846480babf459bbde3d60a94" -dependencies = [ - "kvdb", - "parking_lot 0.12.1", + "quote", + "sp-core-hashing 15.0.0", + "syn 2.0.48", ] [[package]] @@ -13183,18 +10246,6 @@ dependencies = [ "sp-storage 19.0.0", ] -[[package]] -name = "sp-genesis-builder" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0cb71d40ad47e40bdcce5ae5531c7d7ba579cd495a0e0413642fb063fa66f84" -dependencies = [ - "serde_json", - "sp-api 23.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "sp-genesis-builder" version = "0.7.0" @@ -13202,26 +10253,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfdc79df83221ec5a279cbbd08fd6f8be164b9b081c8e84593ce2c2ebd5d66c0" dependencies = [ "serde_json", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "sp-inherents" -version = "23.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604229aa145be0cff853b47ffed8bc2c62eb08ec6974d6307b9a559c378e6dc5" -dependencies = [ - "async-trait", - "impl-trait-for-tuples", - "parity-scale-codec", - "scale-info", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "thiserror", -] - [[package]] name = "sp-inherents" version = "26.0.0" @@ -13232,36 +10268,11 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", "thiserror", ] -[[package]] -name = "sp-io" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ced350da15e8ba3a106206840acc42a6d3eb0d7e8bf7aa43ab00eac0bdf956f" -dependencies = [ - "bytes", - "ed25519-dalek", - "libsecp256k1", - "log", - "parity-scale-codec", - "rustversion", - "secp256k1 0.24.3", - "sp-core 25.0.0", - "sp-externalities 0.23.0", - "sp-keystore 0.31.0", - "sp-runtime-interface 21.0.0", - "sp-state-machine 0.32.0", - "sp-std 12.0.0", - "sp-tracing 14.0.0", - "sp-trie 26.0.0", - "tracing", - "tracing-core", -] - [[package]] name = "sp-io" version = "30.0.0" @@ -13277,28 +10288,16 @@ dependencies = [ "secp256k1 0.28.1", "sp-core 28.0.0", "sp-externalities 0.25.0", - "sp-keystore 0.34.0", + "sp-keystore", "sp-runtime-interface 24.0.0", - "sp-state-machine 0.35.0", + "sp-state-machine", "sp-std 14.0.0", "sp-tracing 16.0.0", - "sp-trie 29.0.0", + "sp-trie", "tracing", "tracing-core", ] -[[package]] -name = "sp-keyring" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655ec0b35cb9cb9029fb323aa676b07d58deb872cecc7566e50278409a00ee95" -dependencies = [ - "lazy_static", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "strum", -] - [[package]] name = "sp-keyring" version = "31.0.0" @@ -13306,23 +10305,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98165ce7c625a8cdb88d39c6bbd56fe8b32ada64ed0894032beba99795f557da" dependencies = [ "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "strum", ] -[[package]] -name = "sp-keystore" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8ec5ebbba70bee83d79c3fe5e49f12df0a4bb6029858ddf9a15eea7539a592" -dependencies = [ - "parity-scale-codec", - "parking_lot 0.12.1", - "sp-core 25.0.0", - "sp-externalities 0.23.0", - "thiserror", -] - [[package]] name = "sp-keystore" version = "0.34.0" @@ -13336,16 +10322,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sp-maybe-compressed-blob" -version = "9.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8846768f036429227e49f6ab523fbee4bc6edfee278a361bf27999590fe020d4" -dependencies = [ - "thiserror", - "zstd 0.12.4", -] - [[package]] name = "sp-maybe-compressed-blob" version = "11.0.0" @@ -13356,18 +10332,6 @@ dependencies = [ "zstd 0.12.4", ] -[[package]] -name = "sp-metadata-ir" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ca9ff0e522a74725ac92f009d38deeb12e880f5296afbd78a6c6b970b773278" -dependencies = [ - "frame-metadata", - "parity-scale-codec", - "scale-info", - "sp-std 12.0.0", -] - [[package]] name = "sp-metadata-ir" version = "0.6.0" @@ -13380,19 +10344,6 @@ dependencies = [ "sp-std 14.0.0", ] -[[package]] -name = "sp-mixnet" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf61f28ca97aab6c21a3c6e0ed496e60d505e5de1f43fd4ba748c9afaa4fc85" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-api 23.0.0", - "sp-application-crypto 27.0.0", - "sp-std 12.0.0", -] - [[package]] name = "sp-mixnet" version = "0.4.0" @@ -13401,8 +10352,8 @@ checksum = "85ed83d2f899484bde61c72cbae6edfb25708d43e6b19934e206f3c706df67df" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api", + "sp-application-crypto", "sp-std 14.0.0", ] @@ -13417,29 +10368,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", + "sp-api", "sp-core 28.0.0", "sp-debug-derive 14.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", "thiserror", ] -[[package]] -name = "sp-npos-elections" -version = "23.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee3536d7fd990c30864ca545d7bdbee02dc66a92ac2a7a66ab4e21521992a7b" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-arithmetic 20.0.0", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "sp-npos-elections" version = "26.0.0" @@ -13449,43 +10385,21 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 23.0.0", + "sp-arithmetic", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "sp-offchain" -version = "23.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9310227f043ed99877b0449a683025a7461431a00995dcd6ef423a273d0fd85d" -dependencies = [ - "sp-api 23.0.0", - "sp-core 25.0.0", - "sp-runtime 28.0.0", -] - [[package]] name = "sp-offchain" version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb45b3e397dc9c7b81cb2d8d641d0bcb1f525b60e83835783413ba73b3f61ac9" dependencies = [ - "sp-api 26.0.0", + "sp-api", "sp-core 28.0.0", - "sp-runtime 31.0.1", -] - -[[package]] -name = "sp-panic-handler" -version = "12.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00e40857ed3e0187f145b037c733545c5633859f1bd1d1b09deb52805fa696a" -dependencies = [ - "backtrace", - "lazy_static", - "regex", + "sp-runtime", ] [[package]] @@ -13499,17 +10413,6 @@ dependencies = [ "regex", ] -[[package]] -name = "sp-rpc" -version = "23.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51867fea921f54bbaa2bf505f373559b5f3b80e8d7f38ecb9677f0d3795a3e6a" -dependencies = [ - "rustc-hash", - "serde", - "sp-core 25.0.0", -] - [[package]] name = "sp-rpc" version = "26.0.0" @@ -13521,29 +10424,6 @@ dependencies = [ "sp-core 28.0.0", ] -[[package]] -name = "sp-runtime" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d9c40ff7303e62219b55635e5245d963358cb77d6916250991ebcb82c0be2c6" -dependencies = [ - "either", - "hash256-std-hasher", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "paste", - "rand 0.8.5", - "scale-info", - "serde", - "sp-application-crypto 27.0.0", - "sp-arithmetic 20.0.0", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-std 12.0.0", - "sp-weights 24.0.0", -] - [[package]] name = "sp-runtime" version = "31.0.1" @@ -13561,12 +10441,12 @@ dependencies = [ "scale-info", "serde", "simple-mermaid", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", + "sp-application-crypto", + "sp-arithmetic", "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-io", "sp-std 14.0.0", - "sp-weights 27.0.0", + "sp-weights", ] [[package]] @@ -13627,29 +10507,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfaf6e85b2ec12a4b99cd6d8d57d083e30c94b7f1b0d8f93547121495aae6f0c" dependencies = [ "Inflector", - "expander 2.0.0", + "expander", "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 2.0.48", ] -[[package]] -name = "sp-session" -version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248dd8f49aa96b56bf0a7d513691ddb4194f9359fdb93e94397eabdef1036085" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-api 23.0.0", - "sp-core 25.0.0", - "sp-keystore 0.31.0", - "sp-runtime 28.0.0", - "sp-staking 23.0.0", - "sp-std 12.0.0", -] - [[package]] name = "sp-session" version = "27.0.0" @@ -13658,29 +10522,14 @@ checksum = "8048981db53d4f5171e6003f5e11fbfc27a8c196b0827619907a4214746a623b" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 26.0.0", + "sp-api", "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-keystore", + "sp-runtime", + "sp-staking", "sp-std 14.0.0", ] -[[package]] -name = "sp-staking" -version = "23.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee0feed0137234598bd1f76d0b468c585ea16619ea9ed1acbba82dd24ac79788" -dependencies = [ - "impl-trait-for-tuples", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "sp-staking" version = "26.0.0" @@ -13692,32 +10541,10 @@ dependencies = [ "scale-info", "serde", "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "sp-state-machine" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96e087fa4430befd2047b61d912c9d6fa4eaed408c4b58b46c6e9acd7965f2d3" -dependencies = [ - "hash-db", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "rand 0.8.5", - "smallvec", - "sp-core 25.0.0", - "sp-externalities 0.23.0", - "sp-panic-handler 12.0.0", - "sp-std 12.0.0", - "sp-trie 26.0.0", - "thiserror", - "tracing", - "trie-db", -] - [[package]] name = "sp-state-machine" version = "0.35.0" @@ -13732,39 +10559,14 @@ dependencies = [ "smallvec", "sp-core 28.0.0", "sp-externalities 0.25.0", - "sp-panic-handler 13.0.0", + "sp-panic-handler", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie", "thiserror", "tracing", "trie-db", ] -[[package]] -name = "sp-statement-store" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8654bcd37602b1811414050d34d14f543873bd4e64e50d210a0116b660c600" -dependencies = [ - "aes-gcm", - "curve25519-dalek 4.1.2", - "ed25519-dalek", - "hkdf", - "parity-scale-codec", - "rand 0.8.5", - "scale-info", - "sha2 0.10.8", - "sp-api 23.0.0", - "sp-application-crypto 27.0.0", - "sp-core 25.0.0", - "sp-externalities 0.23.0", - "sp-runtime 28.0.0", - "sp-runtime-interface 21.0.0", - "sp-std 12.0.0", - "thiserror", - "x25519-dalek 2.0.0", -] - [[package]] name = "sp-statement-store" version = "10.0.0" @@ -13779,11 +10581,11 @@ dependencies = [ "rand 0.8.5", "scale-info", "sha2 0.10.8", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api", + "sp-application-crypto", "sp-core 28.0.0", "sp-externalities 0.25.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-runtime-interface 24.0.0", "sp-std 14.0.0", "thiserror", @@ -13830,20 +10632,6 @@ dependencies = [ "sp-std 14.0.0", ] -[[package]] -name = "sp-timestamp" -version = "23.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004a7f453240db80b2967c0e1c6411836efc7daa7afae98fd16202caa51460e0" -dependencies = [ - "async-trait", - "parity-scale-codec", - "sp-inherents 23.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "thiserror", -] - [[package]] name = "sp-timestamp" version = "26.0.0" @@ -13852,8 +10640,8 @@ checksum = "347eaddd5b07856ccec69ac3300e72e392a5efc3aea5fb4b7230888a0b447b9e" dependencies = [ "async-trait", "parity-scale-codec", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", + "sp-inherents", + "sp-runtime", "sp-std 14.0.0", "thiserror", ] @@ -13886,63 +10674,12 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "23.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7cd2afe89c474339d15d06e73639171ebe4d280be6904d9349072103da21427" -dependencies = [ - "sp-api 23.0.0", - "sp-runtime 28.0.0", -] - -[[package]] -name = "sp-transaction-pool" -version = "26.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97c4052e69eacdb7a411e050c56a838f460b8a879071125451e9bb2d4814df34" -dependencies = [ - "sp-api 26.0.0", - "sp-runtime 31.0.1", -] - -[[package]] -name = "sp-transaction-storage-proof" -version = "23.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ae7c4954431b8479f7b2b6b82f0551cc360a1ee59b6a5276eef86a1099eaed" -dependencies = [ - "async-trait", - "parity-scale-codec", - "scale-info", - "sp-core 25.0.0", - "sp-inherents 23.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "sp-trie 26.0.0", -] - -[[package]] -name = "sp-trie" version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e359b358263cc322c3f678c272a3a519621d9853dcfa1374dfcbdb5f54c6f85" +checksum = "97c4052e69eacdb7a411e050c56a838f460b8a879071125451e9bb2d4814df34" dependencies = [ - "ahash 0.8.8", - "hash-db", - "hashbrown 0.13.2", - "lazy_static", - "memory-db", - "nohash-hasher", - "parity-scale-codec", - "parking_lot 0.12.1", - "rand 0.8.5", - "scale-info", - "schnellru", - "sp-core 25.0.0", - "sp-std 12.0.0", - "thiserror", - "tracing", - "trie-db", - "trie-root", + "sp-api", + "sp-runtime", ] [[package]] @@ -13970,24 +10707,6 @@ dependencies = [ "trie-root", ] -[[package]] -name = "sp-version" -version = "26.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e93da332eba3cb59a65f128da5edd5c70e1475692b45470104e7465b1278471" -dependencies = [ - "impl-serde", - "parity-scale-codec", - "parity-wasm", - "scale-info", - "serde", - "sp-core-hashing-proc-macro 13.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "sp-version-proc-macro 12.0.0", - "thiserror", -] - [[package]] name = "sp-version" version = "29.0.0" @@ -13999,25 +10718,13 @@ dependencies = [ "parity-wasm", "scale-info", "serde", - "sp-core-hashing-proc-macro 15.0.0", - "sp-runtime 31.0.1", + "sp-core-hashing-proc-macro", + "sp-runtime", "sp-std 14.0.0", - "sp-version-proc-macro 13.0.0", + "sp-version-proc-macro", "thiserror", ] -[[package]] -name = "sp-version-proc-macro" -version = "12.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49535d8c7184dab46d15639c68374a30cbb1534e392fa09a1ebb059a993ad436" -dependencies = [ - "parity-scale-codec", - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "sp-version-proc-macro" version = "13.0.0" @@ -14058,22 +10765,6 @@ dependencies = [ "wasmtime", ] -[[package]] -name = "sp-weights" -version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "751676c1263e7f3600af16bad26a7978a816bc532676fe05eafa23b862c05b9e" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "smallvec", - "sp-arithmetic 20.0.0", - "sp-core 25.0.0", - "sp-debug-derive 12.0.0", - "sp-std 12.0.0", -] - [[package]] name = "sp-weights" version = "27.0.0" @@ -14085,7 +10776,7 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-arithmetic 23.0.0", + "sp-arithmetic", "sp-debug-derive 14.0.0", "sp-std 14.0.0", ] @@ -14150,41 +10841,41 @@ version = "1.0.0" dependencies = [ "binary-merkle-tree", "bitvec", - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-executive 28.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-executive", "frame-remote-externalities", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-rate 7.0.0", - "pallet-authority-discovery 28.0.0", - "pallet-authorship 28.0.0", - "pallet-babe 28.0.0", + "pallet-asset-rate", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", "pallet-bags-list", - "pallet-balances 28.0.0", + "pallet-balances", "pallet-beefy", "pallet-beefy-mmr", "pallet-bounties", "pallet-child-bounties", - "pallet-collective 28.0.0", + "pallet-collective", "pallet-conviction-voting", "pallet-democracy", - "pallet-election-provider-multi-phase 27.0.0", - "pallet-election-provider-support-benchmarking 27.0.0", + "pallet-election-provider-multi-phase", + "pallet-election-provider-support-benchmarking", "pallet-elections-phragmen", - "pallet-fast-unstake 27.0.0", + "pallet-fast-unstake", "pallet-grandpa", "pallet-identity", "pallet-im-online", "pallet-indices", - "pallet-membership 28.0.0", - "pallet-message-queue 31.0.0", + "pallet-membership", + "pallet-message-queue", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -14194,119 +10885,86 @@ dependencies = [ "pallet-offences", "pallet-offences-benchmarking", "pallet-preimage", - "pallet-proxy 28.0.0", + "pallet-proxy", "pallet-ranked-collective", "pallet-recovery", "pallet-referenda", - "pallet-scheduler 29.0.0", - "pallet-session 28.0.0", + "pallet-scheduler", + "pallet-session", "pallet-session-benchmarking", "pallet-society", - "pallet-staking 28.0.0", + "pallet-staking", "pallet-staking-runtime-api", "pallet-state-trie-migration", - "pallet-timestamp 27.0.0", + "pallet-timestamp", "pallet-tips", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-treasury 27.0.0", - "pallet-utility 28.0.0", - "pallet-vesting 28.0.0", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", "pallet-whitelist", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-xcm", + "pallet-xcm-benchmarks", "parity-scale-codec", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", - "polkadot-runtime-parachains 7.0.0", + "polkadot-primitives", + "polkadot-runtime-common", + "polkadot-runtime-parachains", "rustc-hex", "scale-info", "separator", "serde", "serde_derive", "serde_json", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-authority-discovery 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-babe 0.32.0", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", "sp-consensus-beefy", "sp-core 28.0.0", "sp-debug-derive 14.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-keyring", "sp-mmr-primitives", - "sp-npos-elections 26.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", + "sp-npos-elections", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", "sp-std 14.0.0", "sp-storage 19.0.0", "sp-tracing 16.0.0", - "sp-transaction-pool 26.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "sp-transaction-pool", + "sp-trie", + "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", - "substrate-wasm-builder 17.0.0", + "substrate-wasm-builder", "tiny-keccak", "tokio", ] -[[package]] -name = "staging-parachain-info" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a1bcf863664ca5708d92894fc30d2c6606c7dbb7d7cfcf43b9ae69d5b83f4fb" -dependencies = [ - "cumulus-primitives-core 0.4.0", - "frame-support 25.0.0", - "frame-system 25.0.0", - "parity-scale-codec", - "scale-info", - "sp-runtime 28.0.0", - "sp-std 12.0.0", -] - [[package]] name = "staging-parachain-info" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad554ffd27fbcafd82e234d7e7188e458e51bfe2b3b5000dd236dce762e3e95f" dependencies = [ - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "cumulus-primitives-core", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std 14.0.0", ] -[[package]] -name = "staging-xcm" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abd0c2e401a1e264379131c27676bc65c9631aaa508044bc04d8ce60a7d8524" -dependencies = [ - "bounded-collections", - "derivative", - "environmental", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-weights 24.0.0", - "xcm-procedural 4.0.0", -] - [[package]] name = "staging-xcm" version = "7.0.0" @@ -14322,31 +10980,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-weights 27.0.0", - "xcm-procedural 7.0.0", -] - -[[package]] -name = "staging-xcm-builder" -version = "4.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8628fd8878df3978a34da0ef75722b118f4bc40bb47fb3c687cc0899f7ede43c" -dependencies = [ - "frame-support 25.0.0", - "frame-system 25.0.0", - "impl-trait-for-tuples", - "log", - "pallet-transaction-payment 25.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 3.0.0", - "scale-info", - "sp-arithmetic 20.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "sp-weights 24.0.0", - "staging-xcm 4.0.0", - "staging-xcm-executor 4.0.2", + "sp-weights", + "xcm-procedural", ] [[package]] @@ -14355,42 +10990,21 @@ version = "7.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ba4f214fe99d79ffcc266f431abbb32d3596788327b925d469c7bb6a3c84d3c" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", - "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment", "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", + "polkadot-parachain-primitives", "scale-info", - "sp-arithmetic 23.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic", + "sp-io", + "sp-runtime", "sp-std 14.0.0", - "sp-weights 27.0.0", - "staging-xcm 7.0.0", - "staging-xcm-executor 7.0.3", -] - -[[package]] -name = "staging-xcm-executor" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49bc3b2b8429aacca1897c72b786e7c21d36170a919e9333fe533868d32d2774" -dependencies = [ - "environmental", - "frame-benchmarking 25.0.0", - "frame-support 25.0.0", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "sp-arithmetic 20.0.0", - "sp-core 25.0.0", - "sp-io 27.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", - "sp-weights 24.0.0", - "staging-xcm 4.0.0", + "sp-weights", + "staging-xcm", + "staging-xcm-executor", ] [[package]] @@ -14400,19 +11014,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f1dea1e33eefee513c197c24255670951a2c515a6ce2c7049fe86385400074f" dependencies = [ "environmental", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", + "frame-benchmarking", + "frame-support", "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", + "sp-arithmetic", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", - "sp-weights 27.0.0", - "staging-xcm 7.0.0", + "sp-weights", + "staging-xcm", ] [[package]] @@ -14421,34 +11035,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "static_init" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a2a1c578e98c1c16fc3b8ec1328f7659a500737d7a0c6d625e73e830ff9c1f6" -dependencies = [ - "bitflags 1.3.2", - "cfg_aliases", - "libc", - "parking_lot 0.11.2", - "parking_lot_core 0.8.6", - "static_init_macro", - "winapi", -] - -[[package]] -name = "static_init_macro" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a2595fc3aa78f2d0e45dd425b22282dd863273761cc77780914b2cf3003acf" -dependencies = [ - "cfg_aliases", - "memchr", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "strsim" version = "0.10.0" @@ -14513,19 +11099,6 @@ dependencies = [ "substrate-fixed", ] -[[package]] -name = "substrate-prometheus-endpoint" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ededbe617291db8a47d6e5155486ff1e5425f0bbf5dcb7f752730466a62bd293" -dependencies = [ - "hyper", - "log", - "prometheus", - "thiserror", - "tokio", -] - [[package]] name = "substrate-prometheus-endpoint" version = "0.17.0" @@ -14548,9 +11121,9 @@ dependencies = [ "async-trait", "jsonrpsee", "log", - "sc-rpc-api 0.33.0", + "sc-rpc-api", "serde", - "sp-runtime 31.0.1", + "sp-runtime", ] [[package]] @@ -14563,25 +11136,6 @@ dependencies = [ "scale-info", ] -[[package]] -name = "substrate-wasm-builder" -version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ab1707dbbd129622b771a9b80b25f0ebf1c04854b907bc44b51ec96fb4005b" -dependencies = [ - "ansi_term", - "build-helper", - "cargo_metadata", - "filetime", - "parity-wasm", - "sp-maybe-compressed-blob 9.0.0", - "strum", - "tempfile", - "toml 0.7.8", - "walkdir", - "wasm-opt", -] - [[package]] name = "substrate-wasm-builder" version = "17.0.0" @@ -14593,7 +11147,7 @@ dependencies = [ "cargo_metadata", "filetime", "parity-wasm", - "sp-maybe-compressed-blob 11.0.0", + "sp-maybe-compressed-blob", "strum", "tempfile", "toml 0.8.2", @@ -14672,14 +11226,14 @@ dependencies = [ name = "system-parachains-constants" version = "1.0.0" dependencies = [ - "frame-support 28.0.0", + "frame-support", "kusama-runtime-constants", - "parachains-common 7.0.0", - "polkadot-core-primitives 7.0.0", - "polkadot-primitives 7.0.0", + "parachains-common", + "polkadot-core-primitives", + "polkadot-primitives", "polkadot-runtime-constants", "smallvec", - "sp-runtime 31.0.1", + "sp-runtime", ] [[package]] @@ -14752,49 +11306,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "thrift" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b82ca8f46f95b3ce96081fe3dd89160fdea970c254bb72925255d1b62aae692e" -dependencies = [ - "byteorder", - "integer-encoding", - "log", - "ordered-float", - "threadpool", -] - -[[package]] -name = "tikv-jemalloc-ctl" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "619bfed27d807b54f7f776b9430d4f8060e66ee138a28632ca898584d462c31c" -dependencies = [ - "libc", - "paste", - "tikv-jemalloc-sys", -] - -[[package]] -name = "tikv-jemalloc-sys" -version = "0.5.4+5.3.0-patched" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "time" version = "0.3.30" @@ -14880,7 +11391,6 @@ dependencies = [ "num_cpus", "parking_lot 0.12.1", "pin-project-lite 0.2.13", - "signal-hook-registry", "socket2 0.5.5", "tokio-macros", "windows-sys 0.48.0", @@ -14927,7 +11437,6 @@ dependencies = [ "futures-core", "pin-project-lite 0.2.13", "tokio", - "tokio-util", ] [[package]] @@ -14954,18 +11463,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.19.15", -] - [[package]] name = "toml" version = "0.8.2" @@ -14994,8 +11491,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap 2.1.0", - "serde", - "serde_spanned", "toml_datetime", "winnow", ] @@ -15035,24 +11530,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tower-http" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" -dependencies = [ - "bitflags 2.4.1", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-range-header", - "pin-project-lite 0.2.13", - "tower-layer", - "tower-service", -] - [[package]] name = "tower-layer" version = "0.3.2" @@ -15098,42 +11575,6 @@ dependencies = [ "valuable", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - -[[package]] -name = "tracing-gum" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32c0555bd635d9adbf8dec0bf45f7c2aef7541121d648ba37f5f792a211077b6" -dependencies = [ - "coarsetime", - "polkadot-node-jaeger", - "polkadot-primitives 4.0.0", - "tracing", - "tracing-gum-proc-macro", -] - -[[package]] -name = "tracing-gum-proc-macro" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35756d8c1a227ec525853a1080bf890d03d939deb2bc50d4d43c96516c795d0d" -dependencies = [ - "expander 2.0.0", - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "tracing-log" version = "0.1.4" @@ -15165,7 +11606,6 @@ dependencies = [ "chrono", "lazy_static", "matchers", - "parking_lot 0.11.2", "regex", "serde", "serde_json", @@ -15821,37 +12261,21 @@ version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" -[[package]] -name = "westend-runtime-constants" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "682c32c5f5e6d51c431bf66c33fc502c66e7b25488c0bd92f5ee020c329f2beb" -dependencies = [ - "frame-support 25.0.0", - "polkadot-primitives 4.0.0", - "polkadot-runtime-common 4.0.0", - "smallvec", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-weights 24.0.0", - "staging-xcm 4.0.0", -] - [[package]] name = "westend-runtime-constants" version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c410b8a17b87e5228f9c27ba4a8020e7ece4a8afb0f452b989834623afe84a2" dependencies = [ - "frame-support 28.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", "smallvec", "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", + "sp-runtime", + "sp-weights", + "staging-xcm", + "staging-xcm-builder", ] [[package]] @@ -16205,44 +12629,32 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfe27508d4304447fdb7419b769ed9fbeab56bcd41ecf9193e43a33fb8f5588a" dependencies = [ - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-parachain-inherent 0.7.0", - "cumulus-test-relay-sproof-builder 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-test-relay-sproof-builder", + "frame-support", + "frame-system", "impl-trait-for-tuples", "lazy_static", "log", - "pallet-balances 28.0.0", - "pallet-message-queue 31.0.0", - "parachains-common 7.0.0", + "pallet-balances", + "pallet-message-queue", + "parachains-common", "parity-scale-codec", "paste", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-parachains 7.0.0", - "sp-arithmetic 23.0.0", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-parachains", + "sp-arithmetic", "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std 14.0.0", "sp-tracing 16.0.0", - "staging-xcm 7.0.0", - "staging-xcm-executor 7.0.3", -] - -[[package]] -name = "xcm-procedural" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "401e2b62628da9246dececb06fe58118196557dd8deb9ce12d95cc4aaf56003f" -dependencies = [ - "Inflector", - "proc-macro2", - "quote", - "syn 2.0.48", + "staging-xcm", + "staging-xcm-executor", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index e16ed53c7d..580d33dcce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,23 +42,3 @@ inherits = "release" lto = true codegen-units = 1 -[patch.crates-io] -encointer-balances-tx-payment = { path = "../pallets/balances-tx-payment" } -encointer-balances-tx-payment-rpc = { path = "../pallets/balances-tx-payment/rpc" } -encointer-balances-tx-payment-rpc-runtime-api = { path = "../pallets/balances-tx-payment/rpc/runtime-api" } -encointer-ceremonies-assignment = { path = "../pallets/ceremonies/assignment" } -encointer-primitives = { path = "../pallets/primitives" } -pallet-encointer-balances = { path = "../pallets/balances" } -pallet-encointer-bazaar = { path = "../pallets/bazaar" } -pallet-encointer-bazaar-rpc = { path = "../pallets/bazaar/rpc" } -pallet-encointer-bazaar-rpc-runtime-api = { path = "../pallets/bazaar/rpc/runtime-api" } -pallet-encointer-ceremonies = { path = "../pallets/ceremonies" } -pallet-encointer-ceremonies-rpc = { path = "../pallets/ceremonies/rpc" } -pallet-encointer-ceremonies-rpc-runtime-api = { path = "../pallets/ceremonies/rpc/runtime-api" } -pallet-encointer-communities = { path = "../pallets/communities" } -pallet-encointer-communities-rpc = { path = "../pallets/communities/rpc" } -pallet-encointer-communities-rpc-runtime-api = { path = "../pallets/communities/rpc/runtime-api" } -pallet-encointer-democracy = { path = "../pallets/democracy" } -pallet-encointer-faucet = { path = "../pallets/faucet" } -pallet-encointer-reputation-commitments = { path = "../pallets/reputation-commitments" } -pallet-encointer-scheduler = { path = "../pallets/scheduler" } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 2050234005..60e47fb5c3 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -1389,7 +1389,7 @@ impl_runtime_apis! { let fee_index = if assets.get(0).unwrap().eq(&fee_asset) { 0 } else { 1 }; // verify transferred successfully - let verify = Box::new(move || { + let verify = Box::new(move || {let verify = Box::new(move || { // verify native balance after transfer, decreased by transferred fee amount // (plus transport fees) assert!(Balances::free_balance(&who) <= balance - fee_amount); diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml index 68a64cc98f..e8bf2d15b6 100644 --- a/system-parachains/encointer/Cargo.toml +++ b/system-parachains/encointer/Cargo.toml @@ -48,12 +48,13 @@ pallet-balances = { default-features = false, version = "28.0.0" } pallet-collective = { default-features = false, version = "28.0.0" } pallet-insecure-randomness-collective-flip = { default-features = false, version = "16.0.0" } pallet-membership = { default-features = false, version = "28.0.0" } +pallet-message-queue = { default-features = false, version = "31.0.0" } pallet-proxy = { default-features = false, version = "28.0.0" } pallet-scheduler = { default-features = false, version = "29.0.0" } pallet-timestamp = { default-features = false, version = "27.0.0" } pallet-transaction-payment = { default-features = false, version = "28.0.0" } pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "28.0.0" } -pallet-treasury = { default-features = false, version = "28.0.0" } +pallet-treasury = { default-features = false, version = "27.0.0" } pallet-utility = { default-features = false, version = "28.0.0" } sp-api = { default-features = false, version = "26.0.0" } sp-block-builder = { default-features = false, version = "26.0.0" } @@ -90,7 +91,8 @@ cumulus-primitives-utility = { default-features = false, version = "0.7.0" } parachain-info = { package = "staging-parachain-info", default-features = false, version = "0.7.0" } parachains-common = { default-features = false, version = "7.0.0" } system-parachains-constants = { path = "../constants", default-features = false } - +polkadot-core-primitives = { default-features = false, version = "7.0.0"} +polkadot-primitives = { default-features = false , version = "7.0.0" } # Used for runtime benchmarking @@ -103,6 +105,7 @@ kusama-runtime-constants = { path = "../../relay/kusama/constants", default-feat [features] default = ["std"] runtime-benchmarks = [ + "cumulus-pallet-dmp-queue/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", "cumulus-pallet-parachain-system/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", @@ -119,6 +122,7 @@ runtime-benchmarks = [ "pallet-encointer-faucet/runtime-benchmarks", "pallet-encointer-reputation-commitments/runtime-benchmarks", "pallet-encointer-scheduler/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-membership/runtime-benchmarks", "pallet-proxy/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", @@ -165,6 +169,7 @@ std = [ "pallet-encointer-reputation-commitments/std", "pallet-encointer-scheduler/std", "pallet-insecure-randomness-collective-flip/std", + "pallet-message-queue/std", "pallet-membership/std", "pallet-proxy/std", "pallet-timestamp/std", @@ -216,6 +221,7 @@ try-runtime = [ "pallet-encointer-reputation-commitments/try-runtime", "pallet-encointer-scheduler/try-runtime", "pallet-insecure-randomness-collective-flip/try-runtime", + "pallet-message-queue/try-runtime", "pallet-membership/try-runtime", "pallet-proxy/try-runtime", "pallet-scheduler/try-runtime", diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 7b1cc1a92f..01b92ec558 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -47,6 +47,14 @@ pub use encointer_primitives::{ communities::{CommunityIdentifier, Location}, scheduler::CeremonyPhaseType, }; +use parachains_common::message_queue::NarrowOriginToSibling; +use cumulus_primitives_core::AggregateMessageOrigin; +use parachains_common::message_queue::ParaIdToSibling; +use cumulus_primitives_core::ParaId; +use frame_support::traits::TransformOrigin; + + + use frame_support::{ construct_runtime, dispatch::DispatchClass, @@ -101,8 +109,7 @@ use xcm::{ v3::AssetId as XcmAssetId, }; -use xcm_config::{KsmLocation, XcmConfig, XcmOriginToTransactDispatchOrigin}; -use xcm_executor::XcmExecutor; +use xcm_config::{KsmLocation, XcmOriginToTransactDispatchOrigin}; /// A type to hold UTC unix epoch [ms] pub type Moment = u64; @@ -254,6 +261,7 @@ impl frame_system::Config for Runtime { type BlockLength = RuntimeBlockLength; type AccountId = AccountId; type RuntimeCall = RuntimeCall; + type RuntimeTask = RuntimeTask; type Lookup = AccountIdLookup; type Nonce = Nonce; type Hash = Hash; @@ -411,12 +419,14 @@ impl pallet_scheduler::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 = parachain_info::Pallet; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type ReservedDmpWeight = ReservedDmpWeight; type OutboundXcmpMessageSource = XcmpQueue; type XcmpMessageHandler = XcmpQueue; @@ -428,6 +438,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { BLOCK_PROCESSING_VELOCITY, UNINCLUDED_SEGMENT_CAPACITY, >; + type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; } impl pallet_insecure_randomness_collective_flip::Config for Runtime {} @@ -456,6 +467,8 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = EitherOfDiverse< EnsureRoot, EnsureXcm>, @@ -468,6 +481,34 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { // TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) impl cumulus_pallet_dmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::cumulus_pallet_dmp_queue::WeightInfo; + type DmpSink = frame_support::traits::EnqueueWithOrigin; +} + +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_message_queue::WeightInfo; + #[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< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >; + type Size = u32; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; } parameter_types! { @@ -626,6 +667,7 @@ construct_runtime! { CumulusXcm: cumulus_pallet_xcm = 32, // TODO: remove dmp with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) DmpQueue: cumulus_pallet_dmp_queue = 33, + MessageQueue: pallet_message_queue = 35, // Handy utilities. Utility: pallet_utility = 40, @@ -706,6 +748,7 @@ mod benches { [frame_system, SystemBench::] [pallet_balances, Balances] [pallet_collective, Collective] + [pallet_message_queue, MessageQueue] [pallet_membership, Membership] [pallet_timestamp, Timestamp] // todo: treasury will be removed in separate PR, so no need to fix broken benchmarks: https://github.com/polkadot-fellows/runtimes/issues/176 @@ -719,6 +762,8 @@ mod benches { [pallet_encointer_faucet, EncointerFaucet] [pallet_encointer_reputation_commitments, EncointerReputationCommitments] [pallet_encointer_scheduler, EncointerScheduler] + [cumulus_pallet_dmp_queue, DmpQueue] + [cumulus_pallet_parachain_system, ParachainSystem] [cumulus_pallet_xcmp_queue, XcmpQueue] ); } diff --git a/system-parachains/encointer/src/weights/cumulus_pallet_dmp_queue.rs b/system-parachains/encointer/src/weights/cumulus_pallet_dmp_queue.rs new file mode 100644 index 0000000000..cc41dcd6cb --- /dev/null +++ b/system-parachains/encointer/src/weights/cumulus_pallet_dmp_queue.rs @@ -0,0 +1,131 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +//! Autogenerated weights for `cumulus_pallet_dmp_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-kusama-dev")`, DB CACHE: 1024 + +// Executed Command: +// target/production/polkadot-parachain +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json +// --pallet=cumulus_pallet_dmp_queue +// --chain=asset-hub-kusama-dev +// --header=./cumulus/file_header.txt +// --output=./cumulus/parachains/runtimes/assets/asset-hub-kusama/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_dmp_queue`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_dmp_queue::WeightInfo for WeightInfo { + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (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: `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 { + // Proof Size summary in bytes: + // Measured: `65696` + // Estimated: `69161` + // Minimum execution time: 124_651_000 picoseconds. + Weight::from_parts(127_857_000, 0) + .saturating_add(Weight::from_parts(0, 69161)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca7d95d3e948effbeccff2de2c182672836` (r:1 w:1) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65659` + // Estimated: `69124` + // Minimum execution time: 65_684_000 picoseconds. + Weight::from_parts(68_039_000, 0) + .saturating_add(Weight::from_parts(0, 69124)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (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: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn on_idle_overweight_good_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65726` + // Estimated: `69191` + // Minimum execution time: 117_657_000 picoseconds. + Weight::from_parts(122_035_000, 0) + .saturating_add(Weight::from_parts(0, 69191)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `DmpQueue::MigrationStatus` (r:1 w:1) + /// Proof: `DmpQueue::MigrationStatus` (`max_values`: Some(1), `max_size`: Some(1028), added: 1523, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca754904d6d8c6fe06c4e5965f9b8397421` (r:1 w:0) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca70f923ef3252d0166429d36d20ed665a8` (r:1 w:1) + /// Storage: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + /// Proof: UNKNOWN KEY `0xcd5c1f6df63bc97f4a8ce37f14a50ca772275f64c354954352b71eea39cfaca2` (r:1 w:1) + fn on_idle_overweight_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65689` + // Estimated: `69154` + // Minimum execution time: 59_799_000 picoseconds. + Weight::from_parts(61_354_000, 0) + .saturating_add(Weight::from_parts(0, 69154)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/system-parachains/encointer/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/encointer/src/weights/cumulus_pallet_parachain_system.rs new file mode 100644 index 0000000000..c1e5c6a742 --- /dev/null +++ b/system-parachains/encointer/src/weights/cumulus_pallet_parachain_system.rs @@ -0,0 +1,80 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `cumulus_pallet_parachain_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// cumulus_pallet_parachain_system +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights +// --steps +// 50 +// --repeat +// 20 + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `cumulus_pallet_parachain_system`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_parachain_system::WeightInfo for WeightInfo { + /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1) + /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0) + /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (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: ParachainSystem ProcessedDownwardMessages (r:0 w:1) + /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: MessageQueue Pages (r:0 w:16) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `12` + // Estimated: `8013` + // Minimum execution time: 1_622_000 picoseconds. + Weight::from_parts(1_709_000, 0) + .saturating_add(Weight::from_parts(0, 8013)) + // Standard Error: 22_138 + .saturating_add(Weight::from_parts(23_923_169, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/encointer/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/encointer/src/weights/cumulus_pallet_xcmp_queue.rs index 95c03085b6..d669fa0489 100644 --- a/system-parachains/encointer/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/encointer/src/weights/cumulus_pallet_xcmp_queue.rs @@ -1,25 +1,40 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// target/release/encointer-collator +// ./target/production/polkadot // benchmark // pallet -// --chain=encointer-rococo-local-dev +// --chain=../asset-hub-kusama-chain-spec.json // --steps=50 // --repeat=20 // --pallet=cumulus_pallet_xcmp_queue // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=polkadot-parachains/encointer-runtime/src/weights/cumulus_pallet_xcmp_queue.rs +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,16 +47,104 @@ use core::marker::PhantomData; /// Weight functions for `cumulus_pallet_xcmp_queue`. pub struct WeightInfo(PhantomData); impl cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo { - /// Storage: XcmpQueue QueueConfig (r:1 w:1) - /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:1) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_config_with_u32() -> Weight { // Proof Size summary in bytes: - // Measured: `42` - // Estimated: `1527` - // Minimum execution time: 4_338_000 picoseconds. - Weight::from_parts(4_474_000, 0) - .saturating_add(Weight::from_parts(0, 1527)) + // Measured: `76` + // Estimated: `1561` + // Minimum execution time: 5_027_000 picoseconds. + Weight::from_parts(5_194_000, 0) + .saturating_add(Weight::from_parts(0, 1561)) + .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 { + // Proof Size summary in bytes: + // Measured: `118` + // Estimated: `3517` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_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 { + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `1561` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) + .saturating_add(Weight::from_parts(0, 1561)) .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 { + // Proof Size summary in bytes: + // Measured: `111` + // Estimated: `1596` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(0, 1596)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn take_first_concatenated_xcm() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 44_000_000 picoseconds. + Weight::from_parts(45_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: `XcmpQueue::InboundXcmpMessages` (r:1 w:1) + /// Proof: `XcmpQueue::InboundXcmpMessages` (`max_values`: None, `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::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 { + // Proof Size summary in bytes: + // Measured: `65747` + // Estimated: `69212` + // Minimum execution time: 62_000_000 picoseconds. + Weight::from_parts(66_000_000, 0) + .saturating_add(Weight::from_parts(0, 69212)) + .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) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65710` + // Estimated: `69175` + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(43_000_000, 0) + .saturating_add(Weight::from_parts(0, 69175)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } diff --git a/system-parachains/encointer/src/weights/frame_system.rs b/system-parachains/encointer/src/weights/frame_system.rs index ee7995b4ac..3bbf793fb2 100644 --- a/system-parachains/encointer/src/weights/frame_system.rs +++ b/system-parachains/encointer/src/weights/frame_system.rs @@ -17,22 +17,24 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-asset-hub-kusama.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// /builds/polkadot-sdk/target/production/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=spec-asset-hub-kusama.json +// --chain=../asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=frame_system -// --extrinsic= -// --output=/builds/runtimes/system-parachains/asset-hubs/asset-hub-kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,22 +52,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_815_000 picoseconds. - Weight::from_parts(1_241_063, 0) + // Minimum execution time: 1_782_000 picoseconds. + Weight::from_parts(844_700, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_parts(387, 0).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(389, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_962_000 picoseconds. - Weight::from_parts(128_782_669, 0) + // Minimum execution time: 5_246_000 picoseconds. + Weight::from_parts(50_763_605, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 10 - .saturating_add(Weight::from_parts(1_587, 0).saturating_mul(b.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_682, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -75,8 +77,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 3_517_000 picoseconds. - Weight::from_parts(3_750_000, 0) + // Minimum execution time: 3_158_000 picoseconds. + Weight::from_parts(3_329_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -97,8 +99,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `164` // Estimated: `1649` - // Minimum execution time: 97_863_204_000 picoseconds. - Weight::from_parts(101_385_669_000, 0) + // Minimum execution time: 112_475_580_000 picoseconds. + Weight::from_parts(118_917_296_000, 0) .saturating_add(Weight::from_parts(0, 1649)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -110,11 +112,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_919_000 picoseconds. - Weight::from_parts(2_055_000, 0) + // Minimum execution time: 1_913_000 picoseconds. + Weight::from_parts(1_956_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_130 - .saturating_add(Weight::from_parts(718_734, 0).saturating_mul(i.into())) + // Standard Error: 2_072 + .saturating_add(Weight::from_parts(803_678, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -124,11 +126,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_943_000 picoseconds. - Weight::from_parts(2_123_000, 0) + // Minimum execution time: 1_948_000 picoseconds. + Weight::from_parts(2_011_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 931 - .saturating_add(Weight::from_parts(541_111, 0).saturating_mul(i.into())) + // Standard Error: 1_108 + .saturating_add(Weight::from_parts(578_044, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -138,13 +140,40 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `83 + p * (69 ±0)` // Estimated: `86 + p * (70 ±0)` - // Minimum execution time: 3_533_000 picoseconds. - Weight::from_parts(3_617_000, 0) + // Minimum execution time: 3_632_000 picoseconds. + Weight::from_parts(3_737_000, 0) .saturating_add(Weight::from_parts(0, 86)) - // Standard Error: 1_337 - .saturating_add(Weight::from_parts(1_236_860, 0).saturating_mul(p.into())) + // Standard Error: 1_915 + .saturating_add(Weight::from_parts(1_196_737, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } + /// Storage: `System::AuthorizedUpgrade` (r:0 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + fn authorize_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 33_027_000 picoseconds. + Weight::from_parts(33_027_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::AuthorizedUpgrade` (r:1 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn apply_authorized_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `22` + // Estimated: `1518` + // Minimum execution time: 118_101_992_000 picoseconds. + Weight::from_parts(118_101_992_000, 0) + .saturating_add(Weight::from_parts(0, 1518)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } } diff --git a/system-parachains/encointer/src/weights/mod.rs b/system-parachains/encointer/src/weights/mod.rs index b0f75efdc0..ec61f38ee0 100644 --- a/system-parachains/encointer/src/weights/mod.rs +++ b/system-parachains/encointer/src/weights/mod.rs @@ -20,6 +20,8 @@ #![allow(clippy::all)] pub mod block_weights; +pub mod cumulus_pallet_dmp_queue; +pub mod cumulus_pallet_parachain_system; pub mod cumulus_pallet_xcmp_queue; pub mod extrinsic_weights; pub mod frame_system; @@ -33,6 +35,7 @@ pub mod pallet_encointer_faucet; pub mod pallet_encointer_reputation_commitments; pub mod pallet_encointer_scheduler; pub mod pallet_membership; +pub mod pallet_message_queue; pub mod pallet_proxy; pub mod pallet_timestamp; pub mod pallet_treasury; diff --git a/system-parachains/encointer/src/weights/pallet_message_queue.rs b/system-parachains/encointer/src/weights/pallet_message_queue.rs new file mode 100644 index 0000000000..45531ccfa7 --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_message_queue.rs @@ -0,0 +1,179 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-03-24, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot-parachain +// benchmark +// pallet +// --chain +// statemine-dev +// --pallet +// pallet_message_queue +// --extrinsic +// * +// --execution +// wasm +// --wasm-execution +// compiled +// --output +// parachains/runtimes/assets/statemine/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `189` + // Estimated: `7534` + // Minimum execution time: 13_668_000 picoseconds. + Weight::from_parts(13_668_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// 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) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `184` + // Estimated: `7534` + // Minimum execution time: 11_106_000 picoseconds. + Weight::from_parts(11_106_000, 0) + .saturating_add(Weight::from_parts(0, 7534)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3517` + // Minimum execution time: 4_921_000 picoseconds. + Weight::from_parts(4_921_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 6_879_000 picoseconds. + Weight::from_parts(6_879_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 7_564_000 picoseconds. + Weight::from_parts(7_564_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 59_963_000 picoseconds. + Weight::from_parts(59_963_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:0) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `99` + // Estimated: `5007` + // Minimum execution time: 7_200_000 picoseconds. + Weight::from_parts(7_200_000, 0) + .saturating_add(Weight::from_parts(0, 5007)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 41_366_000 picoseconds. + Weight::from_parts(41_366_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 60_538_000 picoseconds. + Weight::from_parts(60_538_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `72567` + // Minimum execution time: 73_665_000 picoseconds. + Weight::from_parts(73_665_000, 0) + .saturating_add(Weight::from_parts(0, 72567)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/encointer/src/xcm_config.rs b/system-parachains/encointer/src/xcm_config.rs index 8cb8dd0785..c72ccaff05 100644 --- a/system-parachains/encointer/src/xcm_config.rs +++ b/system-parachains/encointer/src/xcm_config.rs @@ -224,8 +224,6 @@ impl pallet_xcm::Config for Runtime { type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; type WeightInfo = pallet_xcm::TestWeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; type UniversalLocation = UniversalLocation; type MaxRemoteLockConsumers = ConstU32<0>; From 2ab60459a1448f0a22850a876516d111f6ed2234 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 20 Feb 2024 17:25:00 +0100 Subject: [PATCH 164/316] [pallet_xcm] Added `pallet_xcm::migration::MigrateToLatestXcmVersion` --- relay/kusama/src/lib.rs | 5 ++++- relay/polkadot/src/lib.rs | 5 ++++- system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs | 2 ++ system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs | 2 ++ system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 2 ++ system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 2 ++ .../collectives/collectives-polkadot/src/lib.rs | 2 ++ 7 files changed, 18 insertions(+), 2 deletions(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index b810fd8dbc..0af63f42d0 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1676,7 +1676,7 @@ impl Get for NominationPoolsMigrationV4OldPallet { /// /// This contains the combined migrations of the last 10 releases. It allows to skip runtime /// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = migrations::Unreleased; +pub type Migrations = (migrations::Unreleased, migrations::Permanent); /// The runtime migrations per release. #[allow(deprecated, missing_docs)] @@ -1701,6 +1701,9 @@ pub mod migrations { // this comment! parachains_scheduler::migration::MigrateV1ToV2, ); + + /// Migrations/checks that do not need to be versioned and can run on every update. + pub type Permanent = (pallet_xcm::migration::MigrateToLatestXcmVersion,); } /// Unchecked extrinsic type as expected by this runtime. diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 784c8d90aa..9c278d5090 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1697,7 +1697,7 @@ impl Get for NominationPoolsMigrationV4OldPallet { /// /// This contains the combined migrations of the last 10 releases. It allows to skip runtime /// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = migrations::Unreleased; +pub type Migrations = (migrations::Unreleased, migrations::Permanent); /// The runtime migrations per release. #[allow(deprecated, missing_docs)] @@ -1734,6 +1734,9 @@ pub mod migrations { // this comment! parachains_scheduler::migration::MigrateV1ToV2, ); + + /// Migrations/checks that do not need to be versioned and can run on every update. + pub type Permanent = (pallet_xcm::migration::MigrateToLatestXcmVersion,); } /// Unchecked extrinsic type as expected by this runtime. diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index d8f4173aeb..5b0bb6157b 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -987,6 +987,8 @@ pub type UncheckedExtrinsic = pub type Migrations = ( // unreleased cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, + // permanent + pallet_xcm::migration::MigrateToLatestXcmVersion, ); /// Executive: handles dispatch to the various modules. diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index a5c5384698..acb62c5f90 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -887,6 +887,8 @@ pub type Migrations = ( UniquesMigration, // unreleased cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, + // permanent + pallet_xcm::migration::MigrateToLatestXcmVersion, ); /// Migration for Uniques to V1 diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 1beb0cef18..32f08ba2a0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -126,6 +126,8 @@ pub type UncheckedExtrinsic = pub type Migrations = ( // unreleased cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, + // permanent + pallet_xcm::migration::MigrateToLatestXcmVersion, ); /// Executive: handles dispatch to the various modules. diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index df483fa27b..7ad452ab27 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -127,6 +127,8 @@ pub type UncheckedExtrinsic = pub type Migrations = ( // unreleased cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, + // permanent + pallet_xcm::migration::MigrateToLatestXcmVersion, ); /// Executive: handles dispatch to the various modules. diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 547070bd55..273b995962 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -717,6 +717,8 @@ pub type UncheckedExtrinsic = type Migrations = ( // unreleased cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, + // permanent + pallet_xcm::migration::MigrateToLatestXcmVersion, ); /// Executive: handles dispatch to the various modules. From d45db7edb2f4d0f5d397b2925b0359568e64a3e2 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 20 Feb 2024 20:36:04 +0100 Subject: [PATCH 165/316] [xcm-executor,asset-test-utils] Apply patches (AssetHub tests) --- Cargo.lock | 59 +++++++------ .../assets/asset-hub-kusama/Cargo.toml | 4 +- .../assets/asset-hub-polkadot/Cargo.toml | 4 +- integration-tests/emulated/common/Cargo.toml | 2 +- relay/kusama/Cargo.toml | 2 +- relay/polkadot/Cargo.toml | 2 +- .../asset-hubs/asset-hub-kusama/Cargo.toml | 4 +- .../asset-hub-kusama/tests/tests.rs | 47 +++++++++-- .../asset-hubs/asset-hub-polkadot/Cargo.toml | 4 +- .../asset-hub-polkadot/tests/tests.rs | 83 +++++++++++++------ .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 2 +- .../bridge-hub-polkadot/Cargo.toml | 2 +- .../collectives-polkadot/Cargo.toml | 2 +- .../gluttons/glutton-kusama/Cargo.toml | 2 +- 14 files changed, 142 insertions(+), 77 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b857c3aa52..64f0e5d517 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -449,7 +449,7 @@ dependencies = [ "sp-runtime 32.0.0", "staging-kusama-runtime", "staging-xcm 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", "system-parachains-constants", "xcm-emulator", ] @@ -532,7 +532,7 @@ dependencies = [ "staging-parachain-info 0.8.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", "system-parachains-constants", ] @@ -555,7 +555,7 @@ dependencies = [ "polkadot-runtime", "sp-runtime 32.0.0", "staging-xcm 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", "system-parachains-constants", "xcm-emulator", ] @@ -634,23 +634,22 @@ dependencies = [ "staging-parachain-info 0.8.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", "system-parachains-constants", ] [[package]] name = "asset-test-utils" -version = "8.0.0" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6a5ef8ee6dcf362ec170bed2bd56c2b7a2a92d79489f08892f704846cae0dd5" +checksum = "6d78501ca6b4c848efe233672124ebab9293d8efefc44a728d70f3245a8ef595" dependencies = [ "cumulus-pallet-parachain-system 0.8.0", "cumulus-pallet-xcmp-queue 0.8.0", "cumulus-primitives-core 0.8.0", "frame-support 29.0.0", "frame-system 29.0.0", - "pallet-asset-conversion", "pallet-assets 30.0.0", "pallet-balances 29.0.0", "pallet-collator-selection 10.0.0", @@ -666,7 +665,7 @@ dependencies = [ "staging-parachain-info 0.8.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", ] @@ -690,7 +689,7 @@ dependencies = [ "sp-std 14.0.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", ] @@ -1393,7 +1392,7 @@ dependencies = [ "staging-parachain-info 0.8.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", "static_assertions", "substrate-wasm-builder 18.0.0", "system-parachains-constants", @@ -1479,7 +1478,7 @@ dependencies = [ "staging-parachain-info 0.8.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", "static_assertions", "substrate-wasm-builder 18.0.0", "system-parachains-constants", @@ -1522,7 +1521,7 @@ dependencies = [ "sp-tracing 16.0.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", ] [[package]] @@ -1991,7 +1990,7 @@ dependencies = [ "staging-parachain-info 0.8.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", "system-parachains-constants", ] @@ -2604,7 +2603,7 @@ dependencies = [ "sp-runtime 32.0.0", "sp-std 14.0.0", "staging-xcm 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", ] [[package]] @@ -2748,7 +2747,7 @@ dependencies = [ "sp-std 14.0.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", ] [[package]] @@ -4543,7 +4542,7 @@ dependencies = [ "staging-parachain-info 0.8.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", "system-parachains-constants", ] @@ -8819,7 +8818,7 @@ dependencies = [ "sp-std 14.0.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", ] [[package]] @@ -8859,7 +8858,7 @@ dependencies = [ "sp-std 14.0.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", ] [[package]] @@ -8883,7 +8882,7 @@ dependencies = [ "sp-std 14.0.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", ] [[package]] @@ -8969,7 +8968,7 @@ dependencies = [ "sp-std 14.0.0", "staging-parachain-info 0.8.0", "staging-xcm 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", ] @@ -9000,7 +8999,7 @@ dependencies = [ "sp-tracing 16.0.0", "staging-parachain-info 0.8.0", "staging-xcm 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", ] @@ -9250,7 +9249,7 @@ dependencies = [ "staging-parachain-info 0.8.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", "testnet-parachains-constants", ] @@ -9688,7 +9687,7 @@ dependencies = [ "sp-version 30.0.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", "static_assertions", "substrate-wasm-builder 18.0.0", "tiny-keccak", @@ -9795,7 +9794,7 @@ dependencies = [ "sp-std 14.0.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", "static_assertions", ] @@ -9936,7 +9935,7 @@ dependencies = [ "sp-std 14.0.0", "sp-tracing 16.0.0", "staging-xcm 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", "static_assertions", ] @@ -14365,7 +14364,7 @@ dependencies = [ "sp-version 30.0.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", "static_assertions", "substrate-wasm-builder 18.0.0", "tiny-keccak", @@ -14482,7 +14481,7 @@ dependencies = [ "sp-std 14.0.0", "sp-weights 28.0.0", "staging-xcm 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", ] [[package]] @@ -14508,9 +14507,9 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "8.0.0" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "666e4c4fb7b1e91342a54281cb15bda81e17b795c6072f8b4892946249c03922" +checksum = "a638f4c8735cc04b5c93920a1f59e679f48b131315a07d146798e0decebf7720" dependencies = [ "environmental", "frame-benchmarking 29.0.0", @@ -16395,7 +16394,7 @@ dependencies = [ "sp-std 14.0.0", "sp-tracing 16.0.0", "staging-xcm 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", ] [[package]] diff --git a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml index a5c7a6a016..5698e8b852 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml @@ -21,13 +21,13 @@ pallet-message-queue = { version = "32.0.0" } # Polkadot xcm = { package = "staging-xcm", version = "8.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } pallet-xcm = { version = "8.0.0" } # Cumulus parachains-common = { version = "8.0.0" } xcm-emulator = { version = "0.6.0" } -asset-test-utils = { version = "8.0.0" } +asset-test-utils = { version = "8.0.1" } # Local emulated-chains = { path = "../../chains" } diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml index b7b36538d0..ac13aa62a9 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml @@ -19,13 +19,13 @@ pallet-message-queue = { version = "32.0.0" } # Polkadot xcm = { package = "staging-xcm", version = "8.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } pallet-xcm = { version = "8.0.0" } # Cumulus parachains-common = { version = "8.0.0" } xcm-emulator = { version = "0.6.0" } -asset-test-utils = { version = "8.0.0" } +asset-test-utils = { version = "8.0.1" } # Local emulated-chains = { path = "../../chains" } diff --git a/integration-tests/emulated/common/Cargo.toml b/integration-tests/emulated/common/Cargo.toml index 444e71ec93..2a770ae8b6 100644 --- a/integration-tests/emulated/common/Cargo.toml +++ b/integration-tests/emulated/common/Cargo.toml @@ -35,7 +35,7 @@ cumulus-primitives-core = { version = "0.8.0" } xcm-emulator = { version = "0.6.0" } cumulus-pallet-xcmp-queue = { version = "0.8.0" } cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook",] , version = "0.8.0" } -asset-test-utils = { version = "8.0.0" } +asset-test-utils = { version = "8.0.1" } cumulus-pallet-dmp-queue = { version = "0.8.0" } # Bridges diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index 2f1fbb1e02..4d50c2dbf4 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -111,7 +111,7 @@ runtime-parachains = { package = "polkadot-runtime-parachains", default-features primitives = { package = "polkadot-primitives", default-features = false , version = "8.0.0" } xcm = { package = "staging-xcm", default-features = false , version = "8.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "8.0.1" } xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "8.0.0" } sp-debug-derive = { default-features = false, version = "14.0.0" } diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index aa014804d6..6b59fd2ce6 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -107,7 +107,7 @@ runtime-parachains = { package = "polkadot-runtime-parachains", default-features primitives = { package = "polkadot-primitives", default-features = false , version = "8.0.0" } xcm = { package = "staging-xcm", default-features = false , version = "8.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "8.0.1" } xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "8.0.0" } sp-debug-derive = { default-features = false, version = "14.0.0" } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index 7ab9d97f5a..31f932aaff 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -74,7 +74,7 @@ polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } polkadot-runtime-common = { default-features = false, version = "8.0.0" } xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } # Cumulus cumulus-pallet-aura-ext = { default-features = false , version = "0.8.0" } @@ -95,7 +95,7 @@ assets-common = { default-features = false , version = "0.8.0" } pallet-xcm-bridge-hub-router = { default-features = false , version = "0.6.0" } [dev-dependencies] -asset-test-utils = { version = "8.0.0" } +asset-test-utils = { version = "8.0.1" } parachains-runtimes-test-utils = { version = "8.0.0" } sp-io = { version = "31.0.0" } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index e62859354f..0e6984a056 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -48,7 +48,7 @@ use system_parachains_constants::kusama::{ }; use xcm::latest::prelude::{Assets as XcmAssets, *}; use xcm_builder::V4V3LocationConverter; -use xcm_executor::traits::{JustTry, WeightTrader}; +use xcm_executor::traits::{ConvertLocation, JustTry, WeightTrader}; const ALICE: [u8; 32] = [1u8; 32]; const SOME_ASSET_ADMIN: [u8; 32] = [5u8; 32]; @@ -726,27 +726,62 @@ fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_polkadot_works( } #[test] -fn receive_reserve_asset_deposited_dot_from_asset_hub_polkadot_works() { +fn receive_reserve_asset_deposited_dot_from_asset_hub_polkadot_fees_paid_by_sufficient_asset_works() +{ const BLOCK_AUTHOR_ACCOUNT: [u8; 32] = [13; 32]; + let block_author_account = AccountId::from(BLOCK_AUTHOR_ACCOUNT); + let staking_pot = >::account_id(); + + let foreign_asset_id_location = xcm::v3::Location::new( + 2, + [xcm::v3::Junction::GlobalConsensus(xcm::v3::NetworkId::Polkadot)], + ); + let foreign_asset_id_minimum_balance = 1_000_000_000; + // sovereign account as foreign asset owner (can be whoever for this scenario) + let foreign_asset_owner = LocationToAccountId::convert_location(&Location::parent()).unwrap(); + let foreign_asset_create_params = + (foreign_asset_owner, foreign_asset_id_location, foreign_asset_id_minimum_balance); + asset_test_utils::test_cases_over_bridge::receive_reserve_asset_deposited_from_different_consensus_works::< Runtime, AllPalletsWithoutSystem, XcmConfig, - LocationToAccountId, ForeignAssetsInstance, >( collator_session_keys().add(collator_session_key(BLOCK_AUTHOR_ACCOUNT)), ExistentialDeposit::get(), AccountId::from([73; 32]), - AccountId::from(BLOCK_AUTHOR_ACCOUNT), + block_author_account.clone(), // receiving DOTs - (xcm::v3::Location::new(2, [xcm::v3::Junction::GlobalConsensus(xcm::v3::NetworkId::Polkadot)]), 1000000000000, 1_000_000_000), + foreign_asset_create_params, + 1000000000000, bridging_to_asset_hub_polkadot, ( PalletInstance(bp_bridge_hub_kusama::WITH_BRIDGE_KUSAMA_TO_POLKADOT_MESSAGES_PALLET_INDEX).into(), GlobalConsensus(Polkadot), Parachain(1000).into() - ) + ), + || { + // check block author before + assert_eq!( + ForeignAssets::balance( + foreign_asset_id_location.into(), + &block_author_account + ), + 0 + ); + }, + || { + // `TakeFirstAssetTrader` puts fees to the block author + assert!( + ForeignAssets::balance( + foreign_asset_id_location.into(), + &block_author_account + ) > 0 + ); + // nothing adds fees to stakting_pot (e.g. `SwapFirstAssetTrader`, ...) + assert_eq!(Balances::free_balance(&staking_pot), 0); + } ) } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 290f139d9d..e0f8181e69 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -69,7 +69,7 @@ polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } polkadot-runtime-common = { default-features = false, version = "8.0.0" } xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } # Cumulus cumulus-pallet-aura-ext = { default-features = false , version = "0.8.0" } @@ -91,7 +91,7 @@ pallet-xcm-bridge-hub-router = { default-features = false , version = "0.6.0" } [dev-dependencies] hex-literal = "0.4.1" -asset-test-utils = { version = "8.0.0" } +asset-test-utils = { version = "8.0.1" } parachains-runtimes-test-utils = { version = "8.0.0" } sp-io = { version = "31.0.0" } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index a634415b39..e7a7de6729 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -50,7 +50,7 @@ use system_parachains_constants::{ }; use xcm::latest::prelude::{Assets as XcmAssets, *}; use xcm_builder::V4V3LocationConverter; -use xcm_executor::traits::{JustTry, WeightTrader}; +use xcm_executor::traits::{ConvertLocation, JustTry, WeightTrader}; const ALICE: [u8; 32] = [1u8; 32]; const SOME_ASSET_ADMIN: [u8; 32] = [5u8; 32]; @@ -742,31 +742,62 @@ fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_kusama_works() ) } -// TODO:(PR#187) needs patched generic test not requiring pallet_asset_conversion -// #[test] -// fn receive_reserve_asset_deposited_ksm_from_asset_hub_kusama_works() { -// const BLOCK_AUTHOR_ACCOUNT: [u8; 32] = [13; 32]; -// asset_test_utils::test_cases_over_bridge::receive_reserve_asset_deposited_from_different_consensus_works::< -// Runtime, -// AllPalletsWithoutSystem, -// XcmConfig, -// LocationToAccountId, -// ForeignAssetsInstance, -// >( -// collator_session_keys().add(collator_session_key(BLOCK_AUTHOR_ACCOUNT)), -// ExistentialDeposit::get(), -// AccountId::from([73; 32]), -// AccountId::from(BLOCK_AUTHOR_ACCOUNT), -// // receiving KSMs -// (xcm::v3::Location::new(2, [xcm::v3::Junction::GlobalConsensus(xcm::v3::NetworkId::Kusama)]), -// 1000000000000, 1_000_000_000), bridging_to_asset_hub_kusama, -// ( -// PalletInstance(bp_bridge_hub_polkadot::WITH_BRIDGE_POLKADOT_TO_KUSAMA_MESSAGES_PALLET_INDEX). -// into(), GlobalConsensus(Kusama), -// Parachain(1000).into() -// ) -// ) -// } +#[test] +fn receive_reserve_asset_deposited_ksm_from_asset_hub_kusama_fees_paid_by_sufficient_asset_works() { + const BLOCK_AUTHOR_ACCOUNT: [u8; 32] = [13; 32]; + let block_author_account = AccountId::from(BLOCK_AUTHOR_ACCOUNT); + let staking_pot = >::account_id(); + + let foreign_asset_id_location = + xcm::v3::Location::new(2, [xcm::v3::Junction::GlobalConsensus(xcm::v3::NetworkId::Kusama)]); + let foreign_asset_id_minimum_balance = 1_000_000_000; + // sovereign account as foreign asset owner (can be whoever for this scenario) + let foreign_asset_owner = LocationToAccountId::convert_location(&Location::parent()).unwrap(); + let foreign_asset_create_params = + (foreign_asset_owner, foreign_asset_id_location, foreign_asset_id_minimum_balance); + + asset_test_utils::test_cases_over_bridge::receive_reserve_asset_deposited_from_different_consensus_works::< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + ForeignAssetsInstance, + >( + collator_session_keys().add(collator_session_key(BLOCK_AUTHOR_ACCOUNT)), + ExistentialDeposit::get(), + AccountId::from([73; 32]), + block_author_account.clone(), + // receiving KSMs + foreign_asset_create_params, + 1000000000000, + bridging_to_asset_hub_kusama, + ( + PalletInstance(bp_bridge_hub_polkadot::WITH_BRIDGE_POLKADOT_TO_KUSAMA_MESSAGES_PALLET_INDEX).into(), + GlobalConsensus(Kusama), + Parachain(1000).into() + ), + || { + // check block author before + assert_eq!( + ForeignAssets::balance( + foreign_asset_id_location.into(), + &block_author_account + ), + 0 + ); + }, + || { + // `TakeFirstAssetTrader` puts fees to the block author + assert!( + ForeignAssets::balance( + foreign_asset_id_location.into(), + &block_author_account + ) > 0 + ); + // nothing adds fees to stakting_pot (e.g. `SwapFirstAssetTrader`, ...) + assert_eq!(Balances::free_balance(&staking_pot), 0); + } + ) +} #[test] fn report_bridge_status_from_xcm_bridge_router_for_kusama_works() { diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 9a0f9342c5..5a9450ef24 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -67,7 +67,7 @@ polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } polkadot-runtime-common = { default-features = false, version = "8.0.0" } xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } # Cumulus cumulus-pallet-aura-ext = { default-features = false , version = "0.8.0" } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index d39c334251..d6120dc391 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -67,7 +67,7 @@ polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } polkadot-runtime-common = { default-features = false, version = "8.0.0" } xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } # Cumulus cumulus-pallet-aura-ext = { default-features = false , version = "0.8.0" } diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index 9e06ee75aa..e0d75cc5dd 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -66,7 +66,7 @@ polkadot-runtime-common = { default-features = false, version = "8.0.0" } polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } # Cumulus cumulus-pallet-aura-ext = { default-features = false , version = "0.8.0" } diff --git a/system-parachains/gluttons/glutton-kusama/Cargo.toml b/system-parachains/gluttons/glutton-kusama/Cargo.toml index 49d2443123..731cdfc4b7 100644 --- a/system-parachains/gluttons/glutton-kusama/Cargo.toml +++ b/system-parachains/gluttons/glutton-kusama/Cargo.toml @@ -39,7 +39,7 @@ sp-version = { default-features = false, version = "30.0.0" } # Polkadot xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.0" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } # Cumulus cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.0" } From 24d61eb117a3bb187da7cfffe3fc76b6b225f172 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 20 Feb 2024 20:52:27 +0100 Subject: [PATCH 166/316] clippy --- .../asset-hubs/asset-hub-kusama/primitives/src/lib.rs | 1 - .../asset-hubs/asset-hub-polkadot/primitives/src/lib.rs | 1 - 2 files changed, 2 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs index 18f8efbf6f..cce3b111bf 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs @@ -19,7 +19,6 @@ #![cfg_attr(not(feature = "std"), no_std)] use codec::{Decode, Encode}; -use frame_support::weights::Weight; use scale_info::TypeInfo; use xcm::prelude::*; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs index c16da851dd..023454b710 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs @@ -19,7 +19,6 @@ #![cfg_attr(not(feature = "std"), no_std)] use codec::{Decode, Encode}; -use frame_support::weights::Weight; use scale_info::TypeInfo; use xcm::prelude::*; From 3d1191104767020d031c5df6e62e5aff559cf62b Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 21 Feb 2024 14:09:14 +0100 Subject: [PATCH 167/316] [glutton-kusama] set `SystemWeightInfo` with unused weight `frame_system` file --- system-parachains/gluttons/glutton-kusama/src/lib.rs | 2 +- system-parachains/gluttons/glutton-kusama/src/weights/mod.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system-parachains/gluttons/glutton-kusama/src/lib.rs b/system-parachains/gluttons/glutton-kusama/src/lib.rs index 6b58934e48..6fa8bfe0b5 100644 --- a/system-parachains/gluttons/glutton-kusama/src/lib.rs +++ b/system-parachains/gluttons/glutton-kusama/src/lib.rs @@ -159,7 +159,7 @@ impl frame_system::Config for Runtime { type OnKilledAccount = (); type DbWeight = (); type BaseCallFilter = frame_support::traits::Everything; - type SystemWeightInfo = (); + type SystemWeightInfo = weights::frame_system::WeightInfo; type BlockWeights = RuntimeBlockWeights; type BlockLength = RuntimeBlockLength; type SS58Prefix = SS58Prefix; diff --git a/system-parachains/gluttons/glutton-kusama/src/weights/mod.rs b/system-parachains/gluttons/glutton-kusama/src/weights/mod.rs index 01562897d3..e080eba04f 100644 --- a/system-parachains/gluttons/glutton-kusama/src/weights/mod.rs +++ b/system-parachains/gluttons/glutton-kusama/src/weights/mod.rs @@ -15,5 +15,6 @@ // along with Cumulus. If not, see . pub mod cumulus_pallet_parachain_system; +pub mod frame_system; pub mod pallet_glutton; pub mod pallet_message_queue; From 9ba3d6d050b67952a7d5132333152bf96264dee6 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Wed, 21 Feb 2024 16:16:40 +0200 Subject: [PATCH 168/316] fixes after 1.7.0 --- Cargo.lock | 86 ++++++++- integration-tests/emulated/chains/Cargo.toml | 1 + integration-tests/emulated/chains/src/lib.rs | 10 +- .../emulated/common/src/xcm_helpers.rs | 2 +- .../asset-hub-kusama/src/xcm_config.rs | 10 +- .../asset-hub-polkadot/src/xcm_config.rs | 12 +- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 2 + .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 9 +- .../bridge-hub-kusama/src/xcm_config.rs | 3 +- .../bridge-hub-kusama/tests/snowbridge.rs | 173 ++++++++++++++++++ .../bridge-hub-kusama/tests/tests.rs | 6 +- .../bridge-hub-polkadot/src/lib.rs | 9 +- .../bridge-hub-polkadot/src/xcm_config.rs | 7 +- 13 files changed, 293 insertions(+), 37 deletions(-) create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs diff --git a/Cargo.lock b/Cargo.lock index 8f42cf178e..d3f8193fc1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1561,6 +1561,7 @@ dependencies = [ "snowbridge-pallet-system", "snowbridge-router-primitives", "snowbridge-runtime-common", + "snowbridge-runtime-test-common", "snowbridge-system-runtime-api", "sp-api 27.0.0", "sp-block-builder 27.0.0", @@ -3448,6 +3449,7 @@ version = "1.0.0" dependencies = [ "asset-hub-kusama-runtime", "asset-hub-polkadot-runtime", + "bridge-hub-common", "bridge-hub-kusama-runtime", "bridge-hub-polkadot-runtime", "collectives-polkadot-runtime", @@ -13202,7 +13204,7 @@ dependencies = [ "sp-std 14.0.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", ] [[package]] @@ -13266,7 +13268,7 @@ dependencies = [ "sp-std 14.0.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", ] [[package]] @@ -13290,7 +13292,7 @@ dependencies = [ "sp-std 14.0.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", ] [[package]] @@ -13308,7 +13310,83 @@ dependencies = [ "sp-std 14.0.0", "staging-xcm 8.0.0", "staging-xcm-builder 8.0.0", - "staging-xcm-executor 8.0.0", + "staging-xcm-executor 8.0.1", +] + +[[package]] +name = "snowbridge-runtime-test-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bce50af98162e76b5ae50a2beb215bcde2a199eb5ea579ba4752b91278e655b1" +dependencies = [ + "assets-common", + "cumulus-pallet-aura-ext 0.8.0", + "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-xcm 0.8.0", + "cumulus-pallet-xcmp-queue 0.8.0", + "cumulus-primitives-core 0.8.0", + "cumulus-primitives-utility 0.8.0", + "frame-benchmarking 29.0.0", + "frame-executive 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "frame-system-benchmarking 29.0.0", + "frame-system-rpc-runtime-api 27.0.0", + "frame-try-runtime 0.35.0", + "hex-literal", + "log", + "pallet-aura 28.0.0", + "pallet-authorship 29.0.0", + "pallet-balances 29.0.0", + "pallet-collator-selection 10.0.0", + "pallet-message-queue 32.0.0", + "pallet-multisig", + "pallet-session 29.0.0", + "pallet-timestamp 28.0.0", + "pallet-transaction-payment 29.0.0", + "pallet-transaction-payment-rpc-runtime-api 29.0.0", + "pallet-utility 29.0.0", + "pallet-xcm 8.0.0", + "pallet-xcm-benchmarks 8.0.0", + "parachains-common 8.0.0", + "parachains-runtimes-test-utils", + "parity-scale-codec", + "polkadot-core-primitives 8.0.0", + "polkadot-parachain-primitives 7.0.0", + "polkadot-runtime-common 8.0.0", + "scale-info", + "serde", + "smallvec", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-ethereum-client-fixtures", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-system-runtime-api", + "sp-api 27.0.0", + "sp-block-builder 27.0.0", + "sp-consensus-aura 0.33.0", + "sp-core 29.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-keyring 32.0.0", + "sp-offchain 27.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-std 14.0.0", + "sp-storage 20.0.0", + "sp-transaction-pool 27.0.0", + "sp-version 30.0.0", + "staging-parachain-info 0.8.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.1", ] [[package]] diff --git a/integration-tests/emulated/chains/Cargo.toml b/integration-tests/emulated/chains/Cargo.toml index 71e4becbf8..2aa001e7a8 100644 --- a/integration-tests/emulated/chains/Cargo.toml +++ b/integration-tests/emulated/chains/Cargo.toml @@ -25,6 +25,7 @@ polkadot-runtime-parachains = { version = "8.0.0" } polkadot-parachain-primitives = { version = "7.0.0" } # Cumulus +bridge-hub-common = { version = "0.1.0" } parachains-common = { version = "8.0.0" } cumulus-primitives-core = { version = "0.8.0" } xcm-emulator = { version = "0.6.0" } diff --git a/integration-tests/emulated/chains/src/lib.rs b/integration-tests/emulated/chains/src/lib.rs index 4e09349582..51245dc2dd 100644 --- a/integration-tests/emulated/chains/src/lib.rs +++ b/integration-tests/emulated/chains/src/lib.rs @@ -120,10 +120,13 @@ decl_test_parachains! { XcmpMessageHandler: bridge_hub_polkadot_runtime::XcmpQueue, LocationToAccountId: bridge_hub_polkadot_runtime::xcm_config::LocationToAccountId, ParachainInfo: bridge_hub_polkadot_runtime::ParachainInfo, - MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, + MessageOrigin: bridge_hub_common::AggregateMessageOrigin, }, pallets = { PolkadotXcm: bridge_hub_polkadot_runtime::PolkadotXcm, + EthereumSystem: bridge_hub_polkadot_runtime::EthereumSystem, + EthereumInboundQueue: bridge_hub_polkadot_runtime::EthereumInboundQueue, + EthereumOutboundQueue: bridge_hub_polkadot_runtime::EthereumOutboundQueue, } }, pub struct PenpalPolkadotA { @@ -194,10 +197,13 @@ decl_test_parachains! { XcmpMessageHandler: bridge_hub_kusama_runtime::XcmpQueue, LocationToAccountId: bridge_hub_kusama_runtime::xcm_config::LocationToAccountId, ParachainInfo: bridge_hub_kusama_runtime::ParachainInfo, - MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, + MessageOrigin: bridge_hub_common::AggregateMessageOrigin, }, pallets = { PolkadotXcm: bridge_hub_kusama_runtime::PolkadotXcm, + EthereumSystem: bridge_hub_kusama_runtime::EthereumSystem, + EthereumInboundQueue: bridge_hub_kusama_runtime::EthereumInboundQueue, + EthereumOutboundQueue: bridge_hub_kusama_runtime::EthereumOutboundQueue, } }, pub struct PenpalKusamaA { diff --git a/integration-tests/emulated/common/src/xcm_helpers.rs b/integration-tests/emulated/common/src/xcm_helpers.rs index 501ba502bd..cf3590cc3d 100644 --- a/integration-tests/emulated/common/src/xcm_helpers.rs +++ b/integration-tests/emulated/common/src/xcm_helpers.rs @@ -37,7 +37,7 @@ pub fn xcm_transact_paid_execution( assets: All.into(), beneficiary: Location { parents: 0, - interior: X1(AccountId32 { network: None, id: beneficiary.into() }), + interior: [ AccountId32 { network: None, id: beneficiary.into() }].into(), }, }, ])) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 68278c73c7..c4ca4bf47d 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -801,12 +801,12 @@ pub mod bridging { /// Configure the fee to max Balance so that it is disabled. pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX; pub storage BridgeHubEthereumBaseFee: Balance = DefaultBridgeHubEthereumBaseFee::get(); - pub SiblingBridgeHubWithEthereumInboundQueueInstance: MultiLocation = MultiLocation::new( - 1, - X2( + pub SiblingBridgeHubWithEthereumInboundQueueInstance: Location = Location::new( + 2, + [ Parachain(SiblingBridgeHubParaId::get()), PalletInstance(system_parachains_constants::kusama::snowbridge::INBOUND_QUEUE_PALLET_INDEX), - ) + ] ); /// Set up exporters configuration. @@ -824,7 +824,7 @@ pub mod bridging { ]; /// Universal aliases - pub UniversalAliases: BTreeSet<(MultiLocation, Junction)> = BTreeSet::from_iter( + pub UniversalAliases: BTreeSet<(Location, Junction)> = BTreeSet::from_iter( sp_std::vec![ (SiblingBridgeHubWithEthereumInboundQueueInstance::get(), GlobalConsensus(EthereumNetwork::get())), ] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 013461041f..687fdf686b 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -730,12 +730,12 @@ pub mod bridging { /// Configure the fee to max Balance so that it is disabled. pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX; pub storage BridgeHubEthereumBaseFee: Balance = DefaultBridgeHubEthereumBaseFee::get(); - pub SiblingBridgeHubWithEthereumInboundQueueInstance: MultiLocation = MultiLocation::new( - 1, - X2( + pub SiblingBridgeHubWithEthereumInboundQueueInstance: Location = Location::new( + 2, + [ Parachain(SiblingBridgeHubParaId::get()), - PalletInstance(system_parachains_constants::polkadot::snowbridge::INBOUND_QUEUE_PALLET_INDEX) - ) + PalletInstance(system_parachains_constants::polkadot::snowbridge::INBOUND_QUEUE_PALLET_INDEX), + ], ); /// Set up exporters configuration. @@ -753,7 +753,7 @@ pub mod bridging { ]; /// Universal aliases - pub UniversalAliases: BTreeSet<(MultiLocation, Junction)> = BTreeSet::from_iter( + pub UniversalAliases: BTreeSet<(Location, Junction)> = BTreeSet::from_iter( sp_std::vec![ (SiblingBridgeHubWithEthereumInboundQueueInstance::get(), GlobalConsensus(EthereumNetwork::get())), ] diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 415a9a085d..a453bb5680 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -117,6 +117,7 @@ bridge-hub-test-utils = { version = "0.8.0" } bridge-runtime-common = { version = "0.8.0", features = ["integrity-test"] } sp-keyring = { version = "32.0.0" } static_assertions = { version = "1.1.0" } +snowbridge-runtime-test-common = { version = "0.1.0" } [features] default = [ "std" ] @@ -244,6 +245,7 @@ runtime-benchmarks = [ "snowbridge-pallet-outbound-queue/runtime-benchmarks", "snowbridge-router-primitives/runtime-benchmarks", "snowbridge-runtime-common/runtime-benchmarks", + "snowbridge-runtime-test-common/runtime-benchmarks", "snowbridge-pallet-system/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index bc9e6a0dbe..f5050fa377 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -27,10 +27,9 @@ pub mod bridge_to_polkadot_config; mod weights; pub mod xcm_config; -use bridge_hub_common::AggregateMessageOrigin; +use bridge_hub_common::message_queue::{AggregateMessageOrigin, NarrowOriginToSibling, ParaIdToSibling}; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::ParaId; -use parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; use snowbridge_beacon_primitives::{Fork, ForkVersions}; use snowbridge_core::{ gwei, meth, outbound::Message, AgentId, AllowSiblingsOnly, PricingParameters, Rewards, @@ -77,12 +76,12 @@ use xcm_config::{ pub use sp_runtime::BuildStorage; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; -use polkadot_runtime_constants::system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}; +use kusama_runtime_constants::{currency::EXISTENTIAL_DEPOSIT, system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use parachains_common::{ - impls::DealWithFees, message_queue::*, AccountId, Balance, BlockNumber, Hash, Header, Nonce, + impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, }; @@ -718,7 +717,7 @@ construct_runtime!( // Ethereum bridge pallets. EthereumInboundQueue: snowbridge_pallet_inbound_queue = 80, - EthereumOutboundQueue: snowbridge_pallet_inbound_queue = 81, + EthereumOutboundQueue: snowbridge_pallet_outbound_queue = 81, EthereumBeaconClient: snowbridge_pallet_ethereum_client = 82, EthereumSystem: snowbridge_pallet_system = 83, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index d74eae60c2..de5348c5f4 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -23,7 +23,7 @@ use super::{ RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ - parameter_types, + parameter_types, StoragePrefixedMap, traits::{ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; @@ -37,7 +37,6 @@ use parachains_common::{ }; use polkadot_parachain_primitives::primitives::Sibling; use snowbridge_runtime_common::XcmExportFeeToSibling; -use sp_core::Get; use sp_runtime::traits::AccountIdConversion; use sp_std::marker::PhantomData; use system_parachains_constants::{kusama::snowbridge::EthereumNetwork, TREASURY_PALLET_ID}; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs new file mode 100644 index 0000000000..ee24797049 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs @@ -0,0 +1,173 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +#![cfg(test)] + +use bp_polkadot_core::Signature; +use bridge_hub_kusama_runtime::{ + bridge_to_polkadot_config::RefundBridgeHubPolkadotMessages, + xcm_config::XcmConfig, BridgeRejectObsoleteHeadersAndMessages, Executive, + MessageQueueServiceWeight, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, + UncheckedExtrinsic, +}; +use codec::{Decode, Encode}; +use cumulus_primitives_core::XcmError::{FailedToTransactAsset, NotHoldingFees}; +use frame_support::parameter_types; +use parachains_common::{AccountId, AuraId, Balance}; +use snowbridge_pallet_ethereum_client::WeightInfo; +use sp_core::H160; +use sp_keyring::AccountKeyring::Alice; +use sp_runtime::{ + generic::{Era, SignedPayload}, + AccountId32, +}; + +parameter_types! { + pub const DefaultBridgeHubEthereumBaseFee: Balance = 2_750_872_500_000; +} + +fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys { + bridge_hub_test_utils::CollatorSessionKeys::new( + AccountId::from(Alice), + AccountId::from(Alice), + SessionKeys { aura: AuraId::from(Alice.public()) }, + ) +} + +#[test] +pub fn transfer_token_to_ethereum_works() { + snowbridge_runtime_test_common::send_transfer_token_message_success::( + collator_session_keys(), + 1013, + 1000, + H160::random(), + H160::random(), + DefaultBridgeHubEthereumBaseFee::get(), + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::EthereumOutboundQueue(event)) => Some(event), + _ => None, + } + }), + ) +} + +#[test] +pub fn unpaid_transfer_token_to_ethereum_fails_with_barrier() { + snowbridge_runtime_test_common::send_unpaid_transfer_token_message::( + collator_session_keys(), + 1013, + 1000, + H160::random(), + H160::random(), + ) +} + +#[test] +pub fn transfer_token_to_ethereum_fee_not_enough() { + snowbridge_runtime_test_common::send_transfer_token_message_failure::( + collator_session_keys(), + 1013, + 1000, + DefaultBridgeHubEthereumBaseFee::get() + 1_000_000_000, + H160::random(), + H160::random(), + // fee not enough + 1_000_000_000, + NotHoldingFees, + ) +} + +#[test] +pub fn transfer_token_to_ethereum_insufficient_fund() { + snowbridge_runtime_test_common::send_transfer_token_message_failure::( + collator_session_keys(), + 1013, + 1000, + 1_000_000_000, + H160::random(), + H160::random(), + DefaultBridgeHubEthereumBaseFee::get(), + FailedToTransactAsset("Funds are unavailable"), + ) +} + +#[test] +fn max_message_queue_service_weight_is_more_than_beacon_extrinsic_weights() { + let max_message_queue_weight = MessageQueueServiceWeight::get(); + let force_checkpoint = + ::WeightInfo::force_checkpoint(); + let submit_checkpoint = + ::WeightInfo::submit(); + max_message_queue_weight.all_gt(force_checkpoint); + max_message_queue_weight.all_gt(submit_checkpoint); +} + +#[test] +fn ethereum_client_consensus_extrinsics_work() { + snowbridge_runtime_test_common::ethereum_extrinsic( + collator_session_keys(), + 1013, + construct_and_apply_extrinsic, + ); +} + +#[test] +fn ethereum_to_polkadot_message_extrinsics_work() { + snowbridge_runtime_test_common::ethereum_to_polkadot_message_extrinsics_work( + collator_session_keys(), + 1013, + construct_and_apply_extrinsic, + ); +} + +fn construct_extrinsic( + sender: sp_keyring::AccountKeyring, + call: RuntimeCall, +) -> UncheckedExtrinsic { + let account_id = AccountId32::from(sender.public()); + let extra: SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckEra::::from(Era::immortal()), + frame_system::CheckNonce::::from( + frame_system::Pallet::::account(&account_id).nonce, + ), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), + BridgeRejectObsoleteHeadersAndMessages::default(), + (RefundBridgeHubPolkadotMessages::default()), + ); + let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); + let signature = payload.using_encoded(|e| sender.sign(e)); + UncheckedExtrinsic::new_signed( + call, + account_id.into(), + Signature::Sr25519(signature.clone()), + extra, + ) +} + +fn construct_and_apply_extrinsic( + origin: sp_keyring::AccountKeyring, + call: RuntimeCall, +) -> sp_runtime::DispatchOutcome { + let xt = construct_extrinsic(origin, call); + let r = Executive::apply_extrinsic(xt); + r.unwrap() +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index 499e884a66..b4d2ab8fe1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -26,7 +26,7 @@ use bridge_hub_kusama_runtime::{ xcm_config::{KsmRelayLocation, RelayNetwork, XcmConfig}, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, - SignedExtra, TransactionPayment, UncheckedExtrinsic, SLOT_DURATION, + SignedExtra, TransactionPayment, UncheckedExtrinsic, EthereumGatewayAddress, }; use bridge_hub_test_utils::{test_cases::from_parachain, SlotDurations}; use codec::{Decode, Encode}; @@ -39,9 +39,9 @@ use sp_runtime::{ generic::{Era, SignedPayload}, AccountId32, }; -use system_parachains_constants::kusama::{ +use system_parachains_constants::{kusama::{ consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee, -}; +}, SLOT_DURATION}; use xcm::latest::prelude::*; // Para id of sibling chain used in tests. diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 31aeddae6b..6f1c740561 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -27,10 +27,9 @@ pub mod bridge_to_kusama_config; mod weights; pub mod xcm_config; -use bridge_hub_common::AggregateMessageOrigin; +use bridge_hub_common::message_queue::{AggregateMessageOrigin, NarrowOriginToSibling, ParaIdToSibling}; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::ParaId; -use parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; use snowbridge_beacon_primitives::{Fork, ForkVersions}; use snowbridge_core::{ gwei, meth, outbound::Message, AgentId, AllowSiblingsOnly, PricingParameters, Rewards, @@ -78,12 +77,12 @@ pub use sp_runtime::BuildStorage; // Polkadot imports use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; -use polkadot_runtime_constants::system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}; +use polkadot_runtime_constants::{currency::EXISTENTIAL_DEPOSIT, system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use parachains_common::{ - impls::DealWithFees, message_queue::*, AccountId, Balance, BlockNumber, Hash, Header, Nonce, + impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, }; @@ -719,7 +718,7 @@ construct_runtime!( // Ethereum bridge pallets. EthereumInboundQueue: snowbridge_pallet_inbound_queue = 80, - EthereumOutboundQueue: snowbridge_pallet_inbound_queue = 81, + EthereumOutboundQueue: snowbridge_pallet_outbound_queue = 81, EthereumBeaconClient: snowbridge_pallet_ethereum_client = 82, EthereumSystem: snowbridge_pallet_system = 83, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index bf4a7fe7e0..fcb5fcad91 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -23,7 +23,7 @@ use super::{ RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ - parameter_types, + parameter_types, StoragePrefixedMap, traits::{ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; @@ -38,7 +38,6 @@ use parachains_common::{ use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_constants::system_parachain; use snowbridge_runtime_common::XcmExportFeeToSibling; -use sp_core::Get; use sp_runtime::traits::AccountIdConversion; use sp_std::marker::PhantomData; use system_parachains_constants::{polkadot::snowbridge::EthereumNetwork, TREASURY_PALLET_ID}; @@ -47,7 +46,7 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor, - FungibleAdapter, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, + FungibleAdapter, HandleFee, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, @@ -314,7 +313,7 @@ impl xcm_executor::Config for XcmConfig { XcmExportFeeToSibling< bp_polkadot::Balance, AccountId, - TokenLocation, + DotRelayLocation, EthereumNetwork, Self::AssetTransactor, crate::EthereumOutboundQueue, From 1c9262addbe2fd516cedf63c920cf537eea02eb6 Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Wed, 21 Feb 2024 15:26:16 +0100 Subject: [PATCH 169/316] fix accidental paste --- system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 60e47fb5c3..2050234005 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -1389,7 +1389,7 @@ impl_runtime_apis! { let fee_index = if assets.get(0).unwrap().eq(&fee_asset) { 0 } else { 1 }; // verify transferred successfully - let verify = Box::new(move || {let verify = Box::new(move || { + let verify = Box::new(move || { // verify native balance after transfer, decreased by transferred fee amount // (plus transport fees) assert!(Balances::free_balance(&who) <= balance - fee_amount); From 620db809ee9b904363b8ff02a8a405b765785b8d Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 21 Feb 2024 15:33:21 +0100 Subject: [PATCH 170/316] [pallet-xcm-benchmarks] Apply patch 7.0.4 --- Cargo.lock | 22 +++++++++---------- relay/kusama/Cargo.toml | 2 +- relay/polkadot/Cargo.toml | 2 +- .../asset-hubs/asset-hub-kusama/Cargo.toml | 2 +- .../asset-hubs/asset-hub-polkadot/Cargo.toml | 2 +- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 2 +- .../bridge-hub-polkadot/Cargo.toml | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 121a932fc7..ed01fac83d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -503,7 +503,7 @@ dependencies = [ "pallet-uniques", "pallet-utility 28.0.0", "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-xcm-benchmarks 7.0.4", "pallet-xcm-bridge-hub-router", "parachains-common 7.0.0", "parachains-runtimes-test-utils", @@ -606,7 +606,7 @@ dependencies = [ "pallet-uniques", "pallet-utility 28.0.0", "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-xcm-benchmarks 7.0.4", "pallet-xcm-bridge-hub-router", "parachains-common 7.0.0", "parachains-runtimes-test-utils", @@ -1359,7 +1359,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api 28.0.0", "pallet-utility 28.0.0", "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-xcm-benchmarks 7.0.4", "pallet-xcm-bridge-hub", "parachains-common 7.0.0", "parity-scale-codec", @@ -1445,7 +1445,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api 28.0.0", "pallet-utility 28.0.0", "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-xcm-benchmarks 7.0.4", "pallet-xcm-bridge-hub", "parachains-common 7.0.0", "parity-scale-codec", @@ -1511,7 +1511,7 @@ dependencies = [ "pallet-session 28.0.0", "pallet-utility 28.0.0", "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-xcm-benchmarks 7.0.4", "parachains-common 7.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", @@ -2741,7 +2741,7 @@ dependencies = [ "cumulus-primitives-core 0.7.0", "frame-support 28.0.0", "log", - "pallet-xcm-benchmarks 7.0.3", + "pallet-xcm-benchmarks 7.0.4", "parity-scale-codec", "polkadot-runtime-common 7.0.0", "polkadot-runtime-parachains 7.0.0", @@ -8745,9 +8745,9 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "7.0.3" +version = "7.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "890bbad7a5752c8d4c3681457bac4e87fafc79cd9dd5b1a94e6f237f93a795a3" +checksum = "da15171c2dc870ad636fcdb16d9aa37eb84cfe6001c3f1c77cf2c97446ebfbe5" dependencies = [ "frame-benchmarking 28.0.0", "frame-support 28.0.0", @@ -9559,7 +9559,7 @@ dependencies = [ "pallet-vesting 28.0.0", "pallet-whitelist", "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-xcm-benchmarks 7.0.4", "parity-scale-codec", "polkadot-primitives 7.0.0", "polkadot-runtime-common 7.0.0", @@ -9685,7 +9685,7 @@ dependencies = [ "pallet-transaction-payment 28.0.0", "pallet-treasury 27.0.0", "pallet-vesting 28.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-xcm-benchmarks 7.0.4", "parity-scale-codec", "polkadot-primitives 7.0.0", "polkadot-runtime-parachains 7.0.0", @@ -14214,7 +14214,7 @@ dependencies = [ "pallet-vesting 28.0.0", "pallet-whitelist", "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.3", + "pallet-xcm-benchmarks 7.0.4", "parity-scale-codec", "polkadot-primitives 7.0.0", "polkadot-runtime-common 7.0.0", diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index 1646933bb6..46d48073a2 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -94,7 +94,7 @@ pallet-utility = { default-features = false , version = "28.0.0" } pallet-vesting = { default-features = false , version = "28.0.0" } pallet-whitelist = { default-features = false , version = "27.0.0" } pallet-xcm = { default-features = false , version = "7.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.3" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.4" } frame-election-provider-support = { default-features = false , version = "28.0.0" } frame-benchmarking = { default-features = false, optional = true , version = "28.0.0" } diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index 431b238f54..c58649a8c6 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -91,7 +91,7 @@ pallet-vesting = { default-features = false , version = "28.0.0" } pallet-utility = { default-features = false , version = "28.0.0" } frame-election-provider-support = { default-features = false , version = "28.0.0" } pallet-xcm = { default-features = false, version = "7.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.3" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.4" } frame-benchmarking = { default-features = false, optional = true , version = "28.0.0" } frame-try-runtime = { default-features = false, optional = true , version = "0.34.0" } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index 2aa3cb1480..1120213d38 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -68,7 +68,7 @@ primitive-types = { version = "0.12.2", default-features = false, features = ["c # Polkadot pallet-xcm = { default-features = false, version = "7.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.3" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.4" } polkadot-core-primitives = { default-features = false, version = "7.0.0" } polkadot-parachain-primitives = { default-features = false, version = "6.0.0" } polkadot-runtime-common = { default-features = false, version = "7.0.0" } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 6e11d449c2..5daf0bf6ec 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -63,7 +63,7 @@ sp-weights = { default-features = false, version = "27.0.0" } # Polkadot pallet-xcm = { default-features = false, version = "7.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.3" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.4" } polkadot-core-primitives = { default-features = false, version = "7.0.0" } polkadot-parachain-primitives = { default-features = false, version = "6.0.0" } polkadot-runtime-common = { default-features = false, version = "7.0.0" } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 6cda2c3015..43678efe79 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -61,7 +61,7 @@ sp-version = { default-features = false, version = "29.0.0" } # Polkadot pallet-xcm = { default-features = false, version = "7.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.3" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.4" } polkadot-core-primitives = { default-features = false, version = "7.0.0" } polkadot-parachain-primitives = { default-features = false, version = "6.0.0" } polkadot-runtime-common = { default-features = false, version = "7.0.0" } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index d82026055d..b304a94545 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -61,7 +61,7 @@ sp-version = { default-features = false, version = "29.0.0" } # Polkadot pallet-xcm = { default-features = false, version = "7.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.3" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "7.0.4" } polkadot-core-primitives = { default-features = false, version = "7.0.0" } polkadot-parachain-primitives = { default-features = false, version = "6.0.0" } polkadot-runtime-common = { default-features = false, version = "7.0.0" } From 49e0e85f07bcc40678a4836ec4a5e6b6d6e4314c Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 21 Feb 2024 16:26:19 +0100 Subject: [PATCH 171/316] [cleaning] Removed unused stuff --- Cargo.lock | 104 +-------------- chain-spec-generator/Cargo.toml | 1 - relay/kusama/Cargo.toml | 33 ----- relay/polkadot/Cargo.toml | 34 ----- relay/polkadot/src/governance/old.rs | 190 --------------------------- 5 files changed, 1 insertion(+), 361 deletions(-) delete mode 100644 relay/polkadot/src/governance/old.rs diff --git a/Cargo.lock b/Cargo.lock index ed01fac83d..fa267bb4da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1774,7 +1774,6 @@ dependencies = [ "cumulus-primitives-core 0.7.0", "encointer-kusama-runtime", "glutton-kusama-runtime", - "hex-literal", "kusama-runtime-constants", "pallet-im-online", "pallet-staking 28.0.0", @@ -3347,7 +3346,7 @@ dependencies = [ "pallet-encointer-reputation-commitments", "pallet-encointer-scheduler", "pallet-insecure-randomness-collective-flip", - "pallet-membership 25.0.0", + "pallet-membership", "pallet-proxy 25.0.0", "pallet-scheduler 26.0.0", "pallet-timestamp 24.0.0", @@ -7317,25 +7316,6 @@ dependencies = [ "sp-std 14.0.0", ] -[[package]] -name = "pallet-democracy" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b687c8a22b37f9b8444a29959f9cd0cf0be2f8efb8cd9bf91860d5dbafdab8b3" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0", -] - [[package]] name = "pallet-election-provider-multi-phase" version = "24.0.0" @@ -7414,26 +7394,6 @@ dependencies = [ "sp-std 14.0.0", ] -[[package]] -name = "pallet-elections-phragmen" -version = "29.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dd2f70c57cbb3dcde39f141721dd34a8c852e0caaf61ae6b0bbd23138b6e1d3" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", - "sp-std 14.0.0", -] - [[package]] name = "pallet-encointer-balances" version = "3.0.2" @@ -7790,24 +7750,6 @@ dependencies = [ "sp-std 12.0.0", ] -[[package]] -name = "pallet-membership" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2dfdff5a7e5b21355b34245312ba2ea687444d9003960e7b876e1df518dab" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0", -] - [[package]] name = "pallet-message-queue" version = "28.0.0" @@ -8459,26 +8401,6 @@ dependencies = [ "sp-timestamp 26.0.0", ] -[[package]] -name = "pallet-tips" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "facf64cab7f7a4762c57e5827597b2ca073755de4c9716444cf0847db34836df" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "pallet-treasury 27.0.0", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0", -] - [[package]] name = "pallet-transaction-payment" version = "25.0.0" @@ -9498,7 +9420,6 @@ name = "polkadot-runtime" version = "1.0.0" dependencies = [ "binary-merkle-tree", - "bitvec", "frame-benchmarking 28.0.0", "frame-election-provider-support 28.0.0", "frame-executive 28.0.0", @@ -9508,7 +9429,6 @@ dependencies = [ "frame-system-benchmarking 28.0.0", "frame-system-rpc-runtime-api 26.0.0", "frame-try-runtime 0.34.0", - "hex-literal", "log", "pallet-asset-rate 7.0.0", "pallet-authority-discovery 28.0.0", @@ -9520,18 +9440,14 @@ dependencies = [ "pallet-beefy-mmr", "pallet-bounties", "pallet-child-bounties", - "pallet-collective 28.0.0", "pallet-conviction-voting", - "pallet-democracy", "pallet-election-provider-multi-phase 27.0.0", "pallet-election-provider-support-benchmarking 27.0.0", - "pallet-elections-phragmen", "pallet-fast-unstake 27.0.0", "pallet-grandpa", "pallet-identity", "pallet-im-online", "pallet-indices", - "pallet-membership 28.0.0", "pallet-message-queue 31.0.0", "pallet-mmr", "pallet-multisig", @@ -9551,7 +9467,6 @@ dependencies = [ "pallet-staking-reward-fn 19.0.0", "pallet-staking-runtime-api", "pallet-timestamp 27.0.0", - "pallet-tips", "pallet-transaction-payment 28.0.0", "pallet-transaction-payment-rpc-runtime-api 28.0.0", "pallet-treasury 27.0.0", @@ -9565,11 +9480,8 @@ dependencies = [ "polkadot-runtime-common 7.0.0", "polkadot-runtime-constants", "polkadot-runtime-parachains 7.0.0", - "rustc-hex", "scale-info", "separator", - "serde", - "serde_derive", "serde_json", "sp-api 26.0.0", "sp-application-crypto 30.0.0", @@ -9584,7 +9496,6 @@ dependencies = [ "sp-inherents 26.0.0", "sp-io 30.0.0", "sp-keyring 31.0.0", - "sp-mmr-primitives", "sp-npos-elections 26.0.0", "sp-offchain 26.0.0", "sp-runtime 31.0.1", @@ -9599,7 +9510,6 @@ dependencies = [ "staging-xcm 7.0.0", "staging-xcm-builder 7.0.3", "staging-xcm-executor 7.0.3", - "static_assertions", "substrate-wasm-builder 17.0.0", "tiny-keccak", "tokio", @@ -14149,7 +14059,6 @@ name = "staging-kusama-runtime" version = "1.0.0" dependencies = [ "binary-merkle-tree", - "bitvec", "frame-benchmarking 28.0.0", "frame-election-provider-support 28.0.0", "frame-executive 28.0.0", @@ -14172,18 +14081,14 @@ dependencies = [ "pallet-beefy-mmr", "pallet-bounties", "pallet-child-bounties", - "pallet-collective 28.0.0", "pallet-conviction-voting", - "pallet-democracy", "pallet-election-provider-multi-phase 27.0.0", "pallet-election-provider-support-benchmarking 27.0.0", - "pallet-elections-phragmen", "pallet-fast-unstake 27.0.0", "pallet-grandpa", "pallet-identity", "pallet-im-online", "pallet-indices", - "pallet-membership 28.0.0", "pallet-message-queue 31.0.0", "pallet-mmr", "pallet-multisig", @@ -14206,7 +14111,6 @@ dependencies = [ "pallet-staking-runtime-api", "pallet-state-trie-migration", "pallet-timestamp 27.0.0", - "pallet-tips", "pallet-transaction-payment 28.0.0", "pallet-transaction-payment-rpc-runtime-api 28.0.0", "pallet-treasury 27.0.0", @@ -14219,14 +14123,10 @@ dependencies = [ "polkadot-primitives 7.0.0", "polkadot-runtime-common 7.0.0", "polkadot-runtime-parachains 7.0.0", - "rustc-hex", "scale-info", "separator", - "serde", - "serde_derive", "serde_json", "sp-api 26.0.0", - "sp-application-crypto 30.0.0", "sp-arithmetic 23.0.0", "sp-authority-discovery 26.0.0", "sp-block-builder 26.0.0", @@ -14238,7 +14138,6 @@ dependencies = [ "sp-inherents 26.0.0", "sp-io 30.0.0", "sp-keyring 31.0.0", - "sp-mmr-primitives", "sp-npos-elections 26.0.0", "sp-offchain 26.0.0", "sp-runtime 31.0.1", @@ -14253,7 +14152,6 @@ dependencies = [ "staging-xcm 7.0.0", "staging-xcm-builder 7.0.3", "staging-xcm-executor 7.0.3", - "static_assertions", "substrate-wasm-builder 17.0.0", "tiny-keccak", "tokio", diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index 6156c2d1b6..c08021cfc7 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -8,7 +8,6 @@ license.workspace = true [dependencies] clap = { version = "4.4.18", features = [ "derive" ] } -hex-literal = "0.4.1" serde_json = "1.0.111" serde = { version = "1.0.195", features = ["derive"] } diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index 46d48073a2..5206f8e8cf 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -9,14 +9,9 @@ repository.workspace = true version.workspace = true [dependencies] -bitvec = { version = "1.0.1", default-features = false, features = ["alloc"] } parity-scale-codec = { version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } log = { version = "0.4.20", default-features = false } -rustc-hex = { version = "2.1.0", default-features = false } -serde = { version = "1.0.195", default-features = false } -serde_derive = { version = "1.0.195", optional = true } -static_assertions = "1.1.0" authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "26.0.0" } babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.32.0" } @@ -27,11 +22,9 @@ sp-api = { default-features = false , version = "26.0.0" } inherents = { package = "sp-inherents", default-features = false , version = "26.0.0" } offchain-primitives = { package = "sp-offchain", default-features = false , version = "26.0.0" } sp-std = { package = "sp-std", default-features = false , version = "14.0.0" } -sp-application-crypto = { default-features = false , version = "30.0.0" } sp-arithmetic = { default-features = false , version = "23.0.0" } sp-genesis-builder = { default-features = false , version = "0.7.0" } sp-io = { default-features = false , version = "30.0.0" } -sp-mmr-primitives = { default-features = false , version = "26.0.0" } sp-runtime = { default-features = false , version = "31.0.1" } sp-staking = { default-features = false , version = "26.0.0" } sp-core = { default-features = false , version = "28.0.0" } @@ -55,10 +48,7 @@ pallet-child-bounties = { default-features = false , version = "27.0.0" } pallet-transaction-payment = { default-features = false , version = "28.0.0" } pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "28.0.0" } pallet-nomination-pools-runtime-api = { default-features = false , version = "23.0.0" } -pallet-collective = { default-features = false , version = "28.0.0" } pallet-conviction-voting = { default-features = false , version = "28.0.0" } -pallet-democracy = { default-features = false , version = "28.0.0" } -pallet-elections-phragmen = { default-features = false , version = "29.0.0" } pallet-election-provider-multi-phase = { default-features = false , version = "27.0.0" } pallet-fast-unstake = { default-features = false , version = "27.0.0" } frame-executive = { default-features = false , version = "28.0.0" } @@ -67,7 +57,6 @@ pallet-nis = { default-features = false , version = "28.0.0" } pallet-identity = { default-features = false , version = "28.0.0" } pallet-im-online = { default-features = false , version = "27.0.0" } pallet-indices = { default-features = false , version = "28.0.0" } -pallet-membership = { default-features = false , version = "28.0.0" } pallet-message-queue = { default-features = false , version = "31.0.0" } pallet-mmr = { default-features = false , version = "27.0.0" } pallet-multisig = { default-features = false , version = "28.0.0" } @@ -88,7 +77,6 @@ pallet-staking-runtime-api = { default-features = false , version = "14.0.0" } frame-system = { default-features = false , version = "28.0.0" } frame-system-rpc-runtime-api = { default-features = false , version = "26.0.0" } pallet-timestamp = { default-features = false , version = "27.0.0" } -pallet-tips = { default-features = false , version = "27.0.0" } pallet-treasury = { default-features = false , version = "27.0.0" } pallet-utility = { default-features = false , version = "28.0.0" } pallet-vesting = { default-features = false , version = "28.0.0" } @@ -138,7 +126,6 @@ std = [ "babe-primitives/std", "beefy-primitives/std", "binary-merkle-tree/std", - "bitvec/std", "block-builder-api/std", "frame-benchmarking?/std", "frame-election-provider-support/std", @@ -162,18 +149,14 @@ std = [ "pallet-beefy/std", "pallet-bounties/std", "pallet-child-bounties/std", - "pallet-collective/std", "pallet-conviction-voting/std", - "pallet-democracy/std", "pallet-election-provider-multi-phase/std", "pallet-election-provider-support-benchmarking?/std", - "pallet-elections-phragmen/std", "pallet-fast-unstake/std", "pallet-grandpa/std", "pallet-identity/std", "pallet-im-online/std", "pallet-indices/std", - "pallet-membership/std", "pallet-message-queue/std", "pallet-mmr/std", "pallet-multisig/std", @@ -196,7 +179,6 @@ std = [ "pallet-staking/std", "pallet-state-trie-migration/std", "pallet-timestamp/std", - "pallet-tips/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", "pallet-treasury/std", @@ -209,18 +191,13 @@ std = [ "primitives/std", "runtime-common/std", "runtime-parachains/std", - "rustc-hex/std", "scale-info/std", - "serde/std", - "serde_derive", "sp-api/std", - "sp-application-crypto/std", "sp-arithmetic/std", "sp-core/std", "sp-debug-derive/std", "sp-genesis-builder/std", "sp-io/std", - "sp-mmr-primitives/std", "sp-npos-elections/std", "sp-runtime/std", "sp-session/std", @@ -246,18 +223,14 @@ runtime-benchmarks = [ "pallet-balances/runtime-benchmarks", "pallet-bounties/runtime-benchmarks", "pallet-child-bounties/runtime-benchmarks", - "pallet-collective/runtime-benchmarks", "pallet-conviction-voting/runtime-benchmarks", - "pallet-democracy/runtime-benchmarks", "pallet-election-provider-multi-phase/runtime-benchmarks", "pallet-election-provider-support-benchmarking/runtime-benchmarks", - "pallet-elections-phragmen/runtime-benchmarks", "pallet-fast-unstake/runtime-benchmarks", "pallet-grandpa/runtime-benchmarks", "pallet-identity/runtime-benchmarks", "pallet-im-online/runtime-benchmarks", "pallet-indices/runtime-benchmarks", - "pallet-membership/runtime-benchmarks", "pallet-message-queue/runtime-benchmarks", "pallet-mmr/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", @@ -277,7 +250,6 @@ runtime-benchmarks = [ "pallet-staking/runtime-benchmarks", "pallet-state-trie-migration/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", - "pallet-tips/runtime-benchmarks", "pallet-treasury/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-vesting/runtime-benchmarks", @@ -309,17 +281,13 @@ try-runtime = [ "pallet-beefy/try-runtime", "pallet-bounties/try-runtime", "pallet-child-bounties/try-runtime", - "pallet-collective/try-runtime", "pallet-conviction-voting/try-runtime", - "pallet-democracy/try-runtime", "pallet-election-provider-multi-phase/try-runtime", - "pallet-elections-phragmen/try-runtime", "pallet-fast-unstake/try-runtime", "pallet-grandpa/try-runtime", "pallet-identity/try-runtime", "pallet-im-online/try-runtime", "pallet-indices/try-runtime", - "pallet-membership/try-runtime", "pallet-message-queue/try-runtime", "pallet-mmr/try-runtime", "pallet-multisig/try-runtime", @@ -337,7 +305,6 @@ try-runtime = [ "pallet-staking/try-runtime", "pallet-state-trie-migration/try-runtime", "pallet-timestamp/try-runtime", - "pallet-tips/try-runtime", "pallet-transaction-payment/try-runtime", "pallet-treasury/try-runtime", "pallet-utility/try-runtime", diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index c58649a8c6..5d71d51891 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -8,14 +8,9 @@ edition.workspace = true license.workspace = true [dependencies] -bitvec = { version = "1.0.1", default-features = false, features = ["alloc"] } parity-scale-codec = { version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } log = { version = "0.4.20", default-features = false } -rustc-hex = { version = "2.1.0", default-features = false } -serde = { version = "1.0.195", default-features = false } -serde_derive = { version = "1.0.195", optional = true } -static_assertions = "1.1.0" authority-discovery-primitives = { package = "sp-authority-discovery", default-features = false , version = "26.0.0" } babe-primitives = { package = "sp-consensus-babe", default-features = false , version = "0.32.0" } @@ -31,7 +26,6 @@ sp-genesis-builder = { default-features = false , version = "0.7.0" } sp-std = { default-features = false , version = "14.0.0" } sp-application-crypto = { default-features = false , version = "30.0.0" } sp-io = { default-features = false , version = "30.0.0" } -sp-mmr-primitives = { default-features = false , version = "26.0.0" } sp-runtime = { default-features = false , version = "31.0.1" } sp-staking = { default-features = false , version = "26.0.0" } sp-core = { default-features = false , version = "28.0.0" } @@ -52,10 +46,7 @@ pallet-bounties = { default-features = false , version = "27.0.0" } pallet-child-bounties = { default-features = false , version = "27.0.0" } pallet-transaction-payment = { default-features = false , version = "28.0.0" } pallet-transaction-payment-rpc-runtime-api = { default-features = false , version = "28.0.0" } -pallet-collective = { default-features = false , version = "28.0.0" } pallet-conviction-voting = { default-features = false , version = "28.0.0" } -pallet-democracy = { default-features = false , version = "28.0.0" } -pallet-elections-phragmen = { default-features = false , version = "29.0.0" } pallet-election-provider-multi-phase = { default-features = false , version = "27.0.0" } pallet-fast-unstake = { default-features = false , version = "27.0.0" } frame-executive = { default-features = false , version = "28.0.0" } @@ -63,7 +54,6 @@ pallet-grandpa = { default-features = false , version = "28.0.0" } pallet-identity = { default-features = false , version = "28.0.0" } pallet-im-online = { default-features = false , version = "27.0.0" } pallet-indices = { default-features = false , version = "28.0.0" } -pallet-membership = { default-features = false , version = "28.0.0" } pallet-message-queue = { default-features = false , version = "31.0.0" } pallet-mmr = { default-features = false , version = "27.0.0" } pallet-multisig = { default-features = false , version = "28.0.0" } @@ -84,7 +74,6 @@ frame-system = { default-features = false , version = "28.0.0" } frame-system-rpc-runtime-api = { default-features = false , version = "26.0.0" } polkadot-runtime-constants = { package = "polkadot-runtime-constants", path = "constants", default-features = false } pallet-timestamp = { default-features = false , version = "27.0.0" } -pallet-tips = { default-features = false , version = "27.0.0" } pallet-treasury = { default-features = false , version = "27.0.0" } pallet-whitelist = { default-features = false , version = "27.0.0" } pallet-vesting = { default-features = false , version = "28.0.0" } @@ -100,7 +89,6 @@ pallet-election-provider-support-benchmarking = { default-features = false, opti pallet-offences-benchmarking = { default-features = false, optional = true , version = "28.0.0" } pallet-session-benchmarking = { default-features = false, optional = true , version = "28.0.0" } pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "26.0.0" } -hex-literal = { version = "0.4.1", optional = true } runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "7.0.0" } runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "7.0.0" } @@ -113,7 +101,6 @@ xcm-builder = { package = "staging-xcm-builder", default-features = false , vers sp-debug-derive = { default-features = false, version = "14.0.0" } [dev-dependencies] -hex-literal = "0.4.1" tiny-keccak = { version = "2.0.2", features = ["keccak"] } keyring = { package = "sp-keyring", version = "31.0.0" } sp-trie = { version = "29.0.0" } @@ -135,7 +122,6 @@ std = [ "babe-primitives/std", "beefy-primitives/std", "binary-merkle-tree/std", - "bitvec/std", "block-builder-api/std", "frame-benchmarking?/std", "frame-election-provider-support/std", @@ -158,18 +144,14 @@ std = [ "pallet-beefy-mmr/std", "pallet-bounties/std", "pallet-child-bounties/std", - "pallet-collective/std", "pallet-conviction-voting/std", - "pallet-democracy/std", "pallet-election-provider-multi-phase/std", "pallet-election-provider-support-benchmarking?/std", - "pallet-elections-phragmen/std", "pallet-fast-unstake/std", "pallet-grandpa/std", "pallet-identity/std", "pallet-im-online/std", "pallet-indices/std", - "pallet-membership/std", "pallet-message-queue/std", "pallet-mmr/std", "pallet-multisig/std", @@ -188,7 +170,6 @@ std = [ "pallet-staking-runtime-api/std", "pallet-staking/std", "pallet-timestamp/std", - "pallet-tips/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", "pallet-treasury/std", @@ -202,10 +183,7 @@ std = [ "primitives/std", "runtime-common/std", "runtime-parachains/std", - "rustc-hex/std", "scale-info/std", - "serde/std", - "serde_derive", "sp-api/std", "sp-application-crypto/std", "sp-arithmetic/std", @@ -213,7 +191,6 @@ std = [ "sp-debug-derive/std", "sp-genesis-builder/std", "sp-io/std", - "sp-mmr-primitives/std", "sp-npos-elections/std", "sp-runtime/std", "sp-session/std", @@ -233,25 +210,20 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", - "hex-literal", "pallet-asset-rate/runtime-benchmarks", "pallet-babe/runtime-benchmarks", "pallet-bags-list/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-bounties/runtime-benchmarks", "pallet-child-bounties/runtime-benchmarks", - "pallet-collective/runtime-benchmarks", "pallet-conviction-voting/runtime-benchmarks", - "pallet-democracy/runtime-benchmarks", "pallet-election-provider-multi-phase/runtime-benchmarks", "pallet-election-provider-support-benchmarking/runtime-benchmarks", - "pallet-elections-phragmen/runtime-benchmarks", "pallet-fast-unstake/runtime-benchmarks", "pallet-grandpa/runtime-benchmarks", "pallet-identity/runtime-benchmarks", "pallet-im-online/runtime-benchmarks", "pallet-indices/runtime-benchmarks", - "pallet-membership/runtime-benchmarks", "pallet-message-queue/runtime-benchmarks", "pallet-mmr/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", @@ -266,7 +238,6 @@ runtime-benchmarks = [ "pallet-session-benchmarking/runtime-benchmarks", "pallet-staking/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", - "pallet-tips/runtime-benchmarks", "pallet-treasury/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-vesting/runtime-benchmarks", @@ -298,17 +269,13 @@ try-runtime = [ "pallet-beefy/try-runtime", "pallet-bounties/try-runtime", "pallet-child-bounties/try-runtime", - "pallet-collective/try-runtime", "pallet-conviction-voting/try-runtime", - "pallet-democracy/try-runtime", "pallet-election-provider-multi-phase/try-runtime", - "pallet-elections-phragmen/try-runtime", "pallet-fast-unstake/try-runtime", "pallet-grandpa/try-runtime", "pallet-identity/try-runtime", "pallet-im-online/try-runtime", "pallet-indices/try-runtime", - "pallet-membership/try-runtime", "pallet-message-queue/try-runtime", "pallet-mmr/try-runtime", "pallet-multisig/try-runtime", @@ -321,7 +288,6 @@ try-runtime = [ "pallet-session/try-runtime", "pallet-staking/try-runtime", "pallet-timestamp/try-runtime", - "pallet-tips/try-runtime", "pallet-transaction-payment/try-runtime", "pallet-treasury/try-runtime", "pallet-utility/try-runtime", diff --git a/relay/polkadot/src/governance/old.rs b/relay/polkadot/src/governance/old.rs deleted file mode 100644 index f4c2655a78..0000000000 --- a/relay/polkadot/src/governance/old.rs +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . - -//! Old governance configurations for the Polkadot runtime. - -use crate::*; -use frame_support::{parameter_types, traits::EitherOfDiverse}; - -parameter_types! { - pub LaunchPeriod: BlockNumber = prod_or_fast!(28 * DAYS, 1, "DOT_LAUNCH_PERIOD"); - pub VotingPeriod: BlockNumber = prod_or_fast!(28 * DAYS, 1 * MINUTES, "DOT_VOTING_PERIOD"); - pub FastTrackVotingPeriod: BlockNumber = prod_or_fast!(3 * HOURS, 1 * MINUTES, "DOT_FAST_TRACK_VOTING_PERIOD"); - pub const MinimumDeposit: Balance = 100 * DOLLARS; - pub EnactmentPeriod: BlockNumber = prod_or_fast!(28 * DAYS, 1, "DOT_ENACTMENT_PERIOD"); - pub CooloffPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1, "DOT_COOLOFF_PERIOD"); - pub const InstantAllowed: bool = true; - pub const MaxVotes: u32 = 100; - pub const MaxProposals: u32 = 100; -} - -impl pallet_democracy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type EnactmentPeriod = EnactmentPeriod; - type VoteLockingPeriod = EnactmentPeriod; - type LaunchPeriod = LaunchPeriod; - type VotingPeriod = VotingPeriod; - type MinimumDeposit = MinimumDeposit; - type SubmitOrigin = frame_system::EnsureSigned; - /// A straight majority of the council can decide what their next motion is. - type ExternalOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - frame_system::EnsureRoot, - >; - /// A 60% super-majority can have the next scheduled referendum be a straight majority-carries vote. - type ExternalMajorityOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - frame_system::EnsureRoot, - >; - /// A unanimous council can have the next scheduled referendum be a straight default-carries - /// (NTB) vote. - type ExternalDefaultOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - frame_system::EnsureRoot, - >; - /// Two thirds of the technical committee can have an `ExternalMajority/ExternalDefault` vote - /// be tabled immediately and with a shorter voting/enactment period. - type FastTrackOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - frame_system::EnsureRoot, - >; - type InstantOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - frame_system::EnsureRoot, - >; - type InstantAllowed = InstantAllowed; - type FastTrackVotingPeriod = FastTrackVotingPeriod; - // To cancel a proposal which has been passed, 2/3 of the council must agree to it. - type CancellationOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - EnsureRoot, - >; - // To cancel a proposal before it has been passed, the technical committee must be unanimous or - // Root must agree. - type CancelProposalOrigin = EitherOfDiverse< - pallet_collective::EnsureProportionAtLeast, - EnsureRoot, - >; - type BlacklistOrigin = EnsureRoot; - // Any single technical committee member may veto a coming council proposal, however they can - // only do it once and it lasts only for the cooloff period. - type VetoOrigin = pallet_collective::EnsureMember; - type CooloffPeriod = CooloffPeriod; - type Slash = Treasury; - type Scheduler = Scheduler; - type PalletsOrigin = OriginCaller; - type MaxVotes = MaxVotes; - type WeightInfo = weights::pallet_democracy::WeightInfo; - type MaxProposals = MaxProposals; - type Preimages = Preimage; - type MaxDeposits = ConstU32<100>; - type MaxBlacklisted = ConstU32<100>; -} - -parameter_types! { - pub CouncilMotionDuration: BlockNumber = prod_or_fast!(7 * DAYS, 2 * MINUTES, "DOT_MOTION_DURATION"); - pub const CouncilMaxProposals: u32 = 100; - pub const CouncilMaxMembers: u32 = 100; - pub MaxProposalWeight: Weight = Perbill::from_percent(50) * BlockWeights::get().max_block; -} - -pub type CouncilCollective = pallet_collective::Instance1; -impl pallet_collective::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type Proposal = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type MotionDuration = CouncilMotionDuration; - type MaxProposals = CouncilMaxProposals; - type MaxMembers = CouncilMaxMembers; - type DefaultVote = pallet_collective::PrimeDefaultVote; - type SetMembersOrigin = EnsureRoot; - type WeightInfo = weights::pallet_collective_council::WeightInfo; - type MaxProposalWeight = MaxProposalWeight; -} - -parameter_types! { - pub const CandidacyBond: Balance = 100 * DOLLARS; - // 1 storage item created, key size is 32 bytes, value size is 16+16. - pub const VotingBondBase: Balance = deposit(1, 64); - // additional data per vote is 32 bytes (account id). - pub const VotingBondFactor: Balance = deposit(0, 32); - /// Weekly council elections; scaling up to monthly eventually. - pub TermDuration: BlockNumber = prod_or_fast!(7 * DAYS, 2 * MINUTES, "DOT_TERM_DURATION"); - /// 13 members initially, to be increased to 23 eventually. - pub const DesiredMembers: u32 = 13; - pub const DesiredRunnersUp: u32 = 20; - pub const MaxVoters: u32 = 10 * 1000; - pub const MaxVotesPerVoter: u32 = 16; - pub const MaxCandidates: u32 = 1000; - pub const PhragmenElectionPalletId: LockIdentifier = *b"phrelect"; -} -// Make sure that there are no more than `MaxMembers` members elected via phragmen. -const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get()); - -impl pallet_elections_phragmen::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type PalletId = PhragmenElectionPalletId; - type Currency = Balances; - type ChangeMembers = Council; - type InitializeMembers = Council; - type CurrencyToVote = runtime_common::CurrencyToVote; - type CandidacyBond = CandidacyBond; - type VotingBondBase = VotingBondBase; - type VotingBondFactor = VotingBondFactor; - type LoserCandidate = Treasury; - type KickedMember = Treasury; - type DesiredMembers = DesiredMembers; - type DesiredRunnersUp = DesiredRunnersUp; - type TermDuration = TermDuration; - type MaxVoters = MaxVoters; - type MaxVotesPerVoter = MaxVotesPerVoter; - type MaxCandidates = MaxCandidates; - type WeightInfo = weights::pallet_elections_phragmen::WeightInfo; -} - -parameter_types! { - pub const TechnicalMotionDuration: BlockNumber = 7 * DAYS; - pub const TechnicalMaxProposals: u32 = 100; - pub const TechnicalMaxMembers: u32 = 100; -} - -pub type TechnicalCollective = pallet_collective::Instance2; -impl pallet_collective::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type Proposal = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type MotionDuration = TechnicalMotionDuration; - type MaxProposals = TechnicalMaxProposals; - type MaxMembers = TechnicalMaxMembers; - type DefaultVote = pallet_collective::PrimeDefaultVote; - type SetMembersOrigin = EnsureRoot; - type WeightInfo = weights::pallet_collective_technical_committee::WeightInfo; - type MaxProposalWeight = MaxProposalWeight; -} - -impl pallet_membership::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type AddOrigin = EnsureRoot; - type RemoveOrigin = EnsureRoot; - type SwapOrigin = EnsureRoot; - type ResetOrigin = EnsureRoot; - type PrimeOrigin = EnsureRoot; - type MembershipInitialized = TechnicalCommittee; - type MembershipChanged = TechnicalCommittee; - type MaxMembers = TechnicalMaxMembers; - type WeightInfo = weights::pallet_membership::WeightInfo; -} From 81735e021b742d610c0356a83470dd32a335bb3e Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 22 Feb 2024 08:56:05 +0200 Subject: [PATCH 172/316] kusama bridge hub snowbridge tests --- Cargo.lock | 2 + .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 2 + .../bridge-hub-kusama/tests/snowbridge.rs | 237 +++++++++++++++++- 3 files changed, 236 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d3f8193fc1..669204d1fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1545,6 +1545,7 @@ dependencies = [ "pallet-xcm-benchmarks 8.0.0", "pallet-xcm-bridge-hub", "parachains-common 8.0.0", + "parachains-runtimes-test-utils", "parity-scale-codec", "polkadot-core-primitives 8.0.0", "polkadot-parachain-primitives 7.0.0", @@ -1556,6 +1557,7 @@ dependencies = [ "snowbridge-core", "snowbridge-outbound-queue-runtime-api", "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-ethereum-client-fixtures", "snowbridge-pallet-inbound-queue", "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index a453bb5680..0d2085d72d 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -81,6 +81,7 @@ cumulus-primitives-utility = { default-features = false , version = "0.8.0" } pallet-collator-selection = { default-features = false , version = "10.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.8.0" } parachains-common = { default-features = false , version = "8.0.0" } +parachains-runtimes-test-utils = { version = "8.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } # Bridges @@ -106,6 +107,7 @@ snowbridge-pallet-system = { default-features = false , version = "0.1.0" } snowbridge-system-runtime-api = { default-features = false , version = "0.1.0" } snowbridge-core = { default-features = false , version = "0.1.0" } snowbridge-pallet-ethereum-client = { default-features = false , version = "0.1.0" } +snowbridge-pallet-ethereum-client-fixtures = { default-features = false , version = "0.9.0" } snowbridge-pallet-inbound-queue = { default-features = false , version = "0.1.0" } snowbridge-pallet-outbound-queue = { default-features = false , version = "0.1.0" } snowbridge-outbound-queue-runtime-api = { default-features = false , version = "0.1.0" } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs index ee24797049..330aba6892 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs @@ -25,15 +25,32 @@ use bridge_hub_kusama_runtime::{ }; use codec::{Decode, Encode}; use cumulus_primitives_core::XcmError::{FailedToTransactAsset, NotHoldingFees}; -use frame_support::parameter_types; +use frame_system::pallet_prelude::BlockNumberFor; +use snowbridge_core::{ChannelId, ParaId}; +use frame_support::{assert_err, assert_ok, parameter_types, traits::{OnFinalize, OnInitialize},}; use parachains_common::{AccountId, AuraId, Balance}; use snowbridge_pallet_ethereum_client::WeightInfo; use sp_core::H160; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ + traits::Header, generic::{Era, SignedPayload}, - AccountId32, + AccountId32, Saturating }; +use bridge_hub_test_utils::ValidatorIdOf; +use parachains_runtimes_test_utils::{ + AccountIdOf, CollatorSessionKeys, ExtBuilder, XcmReceivedFrom, +}; +pub use parachains_runtimes_test_utils::test_cases::change_storage_constant_by_governance_works; +use xcm::{ + latest::prelude::*, + v3::Error::self, +}; +use xcm_executor::XcmExecutor; +use snowbridge_runtime_test_common::initial_fund; + +type RuntimeHelper = +parachains_runtimes_test_utils::RuntimeHelper; parameter_types! { pub const DefaultBridgeHubEthereumBaseFee: Balance = 2_750_872_500_000; @@ -49,7 +66,7 @@ fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys( + send_transfer_token_message_success::( collator_session_keys(), 1013, 1000, @@ -78,7 +95,7 @@ pub fn unpaid_transfer_token_to_ethereum_fails_with_barrier() { #[test] pub fn transfer_token_to_ethereum_fee_not_enough() { - snowbridge_runtime_test_common::send_transfer_token_message_failure::( + send_transfer_token_message_failure::( collator_session_keys(), 1013, 1000, @@ -93,7 +110,7 @@ pub fn transfer_token_to_ethereum_fee_not_enough() { #[test] pub fn transfer_token_to_ethereum_insufficient_fund() { - snowbridge_runtime_test_common::send_transfer_token_message_failure::( + send_transfer_token_message_failure::( collator_session_keys(), 1013, 1000, @@ -105,6 +122,55 @@ pub fn transfer_token_to_ethereum_insufficient_fund() { ) } +#[allow(clippy::too_many_arguments)] +pub fn send_transfer_token_message_failure( + collator_session_key: CollatorSessionKeys, + runtime_para_id: u32, + assethub_parachain_id: u32, + initial_amount: u128, + weth_contract_address: H160, + destination_address: H160, + fee_amount: u128, + expected_error: Error, +) where + Runtime: frame_system::Config + + pallet_balances::Config + + pallet_session::Config + + pallet_xcm::Config + + parachain_info::Config + + pallet_collator_selection::Config + + cumulus_pallet_parachain_system::Config + + snowbridge_pallet_outbound_queue::Config + + snowbridge_pallet_system::Config, + XcmConfig: xcm_executor::Config, + ValidatorIdOf: From>, +{ + ExtBuilder::::default() + .with_collators(collator_session_key.collators()) + .with_session_keys(collator_session_key.session_keys()) + .with_para_id(runtime_para_id.into()) + .with_tracing() + .build() + .execute_with(|| { + >::initialize( + runtime_para_id.into(), + assethub_parachain_id.into(), + ) + .unwrap(); + + // fund asset hub sovereign account enough so it can pay fees + initial_fund::(assethub_parachain_id, initial_amount); + + let outcome = send_transfer_token_message::( + assethub_parachain_id, + weth_contract_address, + destination_address, + fee_amount, + ); + assert_err!(outcome.ensure_complete(), expected_error); + }); +} + #[test] fn max_message_queue_service_weight_is_more_than_beacon_extrinsic_weights() { let max_message_queue_weight = MessageQueueServiceWeight::get(); @@ -171,3 +237,164 @@ fn construct_and_apply_extrinsic( let r = Executive::apply_extrinsic(xt); r.unwrap() } + +// TODO remove when Ethereum network ID has been extracted as a param +pub fn send_transfer_token_message( + assethub_parachain_id: u32, + weth_contract_address: H160, + destination_address: H160, + fee_amount: u128, +) -> Outcome + where + Runtime: frame_system::Config + + pallet_balances::Config + + pallet_session::Config + + pallet_xcm::Config + + parachain_info::Config + + pallet_collator_selection::Config + + cumulus_pallet_parachain_system::Config + + snowbridge_pallet_outbound_queue::Config, + XcmConfig: xcm_executor::Config, +{ + let assethub_parachain_location = Location::new(1, Parachain(assethub_parachain_id)); + let asset = Asset { + id: AssetId(Location::new( + 0, + [AccountKey20 { network: None, key: weth_contract_address.into() }], + )), + fun: Fungible(1000000000), + }; + let assets = vec![asset.clone()]; + + let inner_xcm = Xcm(vec![ + WithdrawAsset(Assets::from(assets.clone())), + ClearOrigin, + BuyExecution { fees: asset, weight_limit: Unlimited }, + DepositAsset { + assets: Wild(All), + beneficiary: Location::new( + 0, + [AccountKey20 { network: None, key: destination_address.into() }], + ), + }, + SetTopic([0; 32]), + ]); + + let fee = + Asset { id: AssetId(Location { parents: 1, interior: Here }), fun: Fungible(fee_amount) }; + + // prepare transfer token message + let xcm = Xcm(vec![ + WithdrawAsset(Assets::from(vec![fee.clone()])), + BuyExecution { fees: fee, weight_limit: Unlimited }, + ExportMessage { + network: Ethereum { chain_id: 1 }, + destination: Here, + xcm: inner_xcm, + }, + ]); + + // execute XCM + let mut hash = xcm.using_encoded(sp_io::hashing::blake2_256); + XcmExecutor::::prepare_and_execute( + assethub_parachain_location, + xcm, + &mut hash, + RuntimeHelper::::xcm_max_weight(XcmReceivedFrom::Sibling), + Weight::zero(), + ) +} + +pub fn send_transfer_token_message_success( + collator_session_key: CollatorSessionKeys, + runtime_para_id: u32, + assethub_parachain_id: u32, + weth_contract_address: H160, + destination_address: H160, + fee_amount: u128, + snowbridge_pallet_outbound_queue: Box< + dyn Fn(Vec) -> Option>, + >, +) where + Runtime: frame_system::Config + + pallet_balances::Config + + pallet_session::Config + + pallet_xcm::Config + + parachain_info::Config + + pallet_collator_selection::Config + + pallet_message_queue::Config + + cumulus_pallet_parachain_system::Config + + snowbridge_pallet_outbound_queue::Config + + snowbridge_pallet_system::Config, + XcmConfig: xcm_executor::Config, + ValidatorIdOf: From>, + ::AccountId: From + AsRef<[u8]>, +{ + ExtBuilder::::default() + .with_collators(collator_session_key.collators()) + .with_session_keys(collator_session_key.session_keys()) + .with_para_id(runtime_para_id.into()) + .with_tracing() + .build() + .execute_with(|| { + >::initialize( + runtime_para_id.into(), + assethub_parachain_id.into(), + ) + .unwrap(); + + // fund asset hub sovereign account enough so it can pay fees + initial_fund::(assethub_parachain_id, 5_000_000_000_000); + + let outcome = send_transfer_token_message::( + assethub_parachain_id, + weth_contract_address, + destination_address, + fee_amount, + ); + + assert_ok!(outcome.ensure_complete()); + + // check events + let mut events = >::events() + .into_iter() + .filter_map(|e| snowbridge_pallet_outbound_queue(e.event.encode())); + assert!(events.any(|e| matches!( + e, + snowbridge_pallet_outbound_queue::Event::MessageQueued { .. } + ))); + + let block_number = >::block_number(); + let next_block_number = >::block_number() + .saturating_add(BlockNumberFor::::from(1u32)); + + // finish current block + >::on_finalize(block_number); + >::on_finalize(block_number); + >::on_finalize(block_number); + + // start next block + >::set_block_number(next_block_number); + >::on_initialize(next_block_number); + >::on_initialize(next_block_number); + >::on_initialize(next_block_number); + + // finish next block + >::on_finalize(next_block_number); + >::on_finalize(next_block_number); + let included_head = >::finalize(); + + let origin: ParaId = assethub_parachain_id.into(); + let channel_id: ChannelId = origin.into(); + + let nonce = snowbridge_pallet_outbound_queue::Nonce::::try_get(channel_id); + assert_ok!(nonce); + assert_eq!(nonce.unwrap(), 1); + + let digest = included_head.digest(); + + //let digest = frame_system::Pallet::::digest(); + let digest_items = digest.logs(); + assert!(digest_items.len() == 1 && digest_items[0].as_other().is_some()); + }); +} From e056d34889af8a84037758c648170ac530611dd6 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 22 Feb 2024 09:04:37 +0200 Subject: [PATCH 173/316] fmt --- .../emulated/common/src/xcm_helpers.rs | 2 +- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 12 +- .../bridge-hub-kusama/src/xcm_config.rs | 3 +- .../bridge-hub-kusama/tests/snowbridge.rs | 587 +++++++++--------- .../bridge-hub-kusama/tests/tests.rs | 13 +- .../bridge-hub-polkadot/src/lib.rs | 12 +- .../bridge-hub-polkadot/src/xcm_config.rs | 3 +- 7 files changed, 319 insertions(+), 313 deletions(-) diff --git a/integration-tests/emulated/common/src/xcm_helpers.rs b/integration-tests/emulated/common/src/xcm_helpers.rs index cf3590cc3d..c830e9cd80 100644 --- a/integration-tests/emulated/common/src/xcm_helpers.rs +++ b/integration-tests/emulated/common/src/xcm_helpers.rs @@ -37,7 +37,7 @@ pub fn xcm_transact_paid_execution( assets: All.into(), beneficiary: Location { parents: 0, - interior: [ AccountId32 { network: None, id: beneficiary.into() }].into(), + interior: [AccountId32 { network: None, id: beneficiary.into() }].into(), }, }, ])) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index f5050fa377..c91caaa6e8 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -27,7 +27,9 @@ pub mod bridge_to_polkadot_config; mod weights; pub mod xcm_config; -use bridge_hub_common::message_queue::{AggregateMessageOrigin, NarrowOriginToSibling, ParaIdToSibling}; +use bridge_hub_common::message_queue::{ + AggregateMessageOrigin, NarrowOriginToSibling, ParaIdToSibling, +}; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::ParaId; use snowbridge_beacon_primitives::{Fork, ForkVersions}; @@ -75,14 +77,16 @@ use xcm_config::{ #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; +use kusama_runtime_constants::{ + currency::EXISTENTIAL_DEPOSIT, + system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}, +}; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; -use kusama_runtime_constants::{currency::EXISTENTIAL_DEPOSIT, system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use parachains_common::{ - impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, - Signature, + impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, }; use polkadot_runtime_common::prod_or_fast; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index de5348c5f4..3125f690a9 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -23,8 +23,9 @@ use super::{ RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ - parameter_types, StoragePrefixedMap, + parameter_types, traits::{ConstU32, Contains, Equals, Everything, Nothing}, + StoragePrefixedMap, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs index 330aba6892..6d8da0ce1e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs @@ -18,383 +18,378 @@ use bp_polkadot_core::Signature; use bridge_hub_kusama_runtime::{ - bridge_to_polkadot_config::RefundBridgeHubPolkadotMessages, - xcm_config::XcmConfig, BridgeRejectObsoleteHeadersAndMessages, Executive, - MessageQueueServiceWeight, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, - UncheckedExtrinsic, + bridge_to_polkadot_config::RefundBridgeHubPolkadotMessages, xcm_config::XcmConfig, + BridgeRejectObsoleteHeadersAndMessages, Executive, MessageQueueServiceWeight, Runtime, + RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, UncheckedExtrinsic, }; +use bridge_hub_test_utils::ValidatorIdOf; use codec::{Decode, Encode}; use cumulus_primitives_core::XcmError::{FailedToTransactAsset, NotHoldingFees}; +use frame_support::{ + assert_err, assert_ok, parameter_types, + traits::{OnFinalize, OnInitialize}, +}; use frame_system::pallet_prelude::BlockNumberFor; -use snowbridge_core::{ChannelId, ParaId}; -use frame_support::{assert_err, assert_ok, parameter_types, traits::{OnFinalize, OnInitialize},}; use parachains_common::{AccountId, AuraId, Balance}; +pub use parachains_runtimes_test_utils::test_cases::change_storage_constant_by_governance_works; +use parachains_runtimes_test_utils::{ + AccountIdOf, CollatorSessionKeys, ExtBuilder, XcmReceivedFrom, +}; +use snowbridge_core::{ChannelId, ParaId}; use snowbridge_pallet_ethereum_client::WeightInfo; +use snowbridge_runtime_test_common::initial_fund; use sp_core::H160; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ - traits::Header, - generic::{Era, SignedPayload}, - AccountId32, Saturating -}; -use bridge_hub_test_utils::ValidatorIdOf; -use parachains_runtimes_test_utils::{ - AccountIdOf, CollatorSessionKeys, ExtBuilder, XcmReceivedFrom, -}; -pub use parachains_runtimes_test_utils::test_cases::change_storage_constant_by_governance_works; -use xcm::{ - latest::prelude::*, - v3::Error::self, + generic::{Era, SignedPayload}, + traits::Header, + AccountId32, Saturating, }; +use xcm::{latest::prelude::*, v3::Error}; use xcm_executor::XcmExecutor; -use snowbridge_runtime_test_common::initial_fund; type RuntimeHelper = -parachains_runtimes_test_utils::RuntimeHelper; + parachains_runtimes_test_utils::RuntimeHelper; parameter_types! { pub const DefaultBridgeHubEthereumBaseFee: Balance = 2_750_872_500_000; } fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys { - bridge_hub_test_utils::CollatorSessionKeys::new( - AccountId::from(Alice), - AccountId::from(Alice), - SessionKeys { aura: AuraId::from(Alice.public()) }, - ) + bridge_hub_test_utils::CollatorSessionKeys::new( + AccountId::from(Alice), + AccountId::from(Alice), + SessionKeys { aura: AuraId::from(Alice.public()) }, + ) } #[test] pub fn transfer_token_to_ethereum_works() { - send_transfer_token_message_success::( - collator_session_keys(), - 1013, - 1000, - H160::random(), - H160::random(), - DefaultBridgeHubEthereumBaseFee::get(), - Box::new(|runtime_event_encoded: Vec| { - match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { - Ok(RuntimeEvent::EthereumOutboundQueue(event)) => Some(event), - _ => None, - } - }), - ) + send_transfer_token_message_success::( + collator_session_keys(), + 1013, + 1000, + H160::random(), + H160::random(), + DefaultBridgeHubEthereumBaseFee::get(), + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::EthereumOutboundQueue(event)) => Some(event), + _ => None, + } + }), + ) } #[test] pub fn unpaid_transfer_token_to_ethereum_fails_with_barrier() { - snowbridge_runtime_test_common::send_unpaid_transfer_token_message::( - collator_session_keys(), - 1013, - 1000, - H160::random(), - H160::random(), - ) + snowbridge_runtime_test_common::send_unpaid_transfer_token_message::( + collator_session_keys(), + 1013, + 1000, + H160::random(), + H160::random(), + ) } #[test] pub fn transfer_token_to_ethereum_fee_not_enough() { - send_transfer_token_message_failure::( - collator_session_keys(), - 1013, - 1000, - DefaultBridgeHubEthereumBaseFee::get() + 1_000_000_000, - H160::random(), - H160::random(), - // fee not enough - 1_000_000_000, - NotHoldingFees, - ) + send_transfer_token_message_failure::( + collator_session_keys(), + 1013, + 1000, + DefaultBridgeHubEthereumBaseFee::get() + 1_000_000_000, + H160::random(), + H160::random(), + // fee not enough + 1_000_000_000, + NotHoldingFees, + ) } #[test] pub fn transfer_token_to_ethereum_insufficient_fund() { - send_transfer_token_message_failure::( - collator_session_keys(), - 1013, - 1000, - 1_000_000_000, - H160::random(), - H160::random(), - DefaultBridgeHubEthereumBaseFee::get(), - FailedToTransactAsset("Funds are unavailable"), - ) + send_transfer_token_message_failure::( + collator_session_keys(), + 1013, + 1000, + 1_000_000_000, + H160::random(), + H160::random(), + DefaultBridgeHubEthereumBaseFee::get(), + FailedToTransactAsset("Funds are unavailable"), + ) } #[allow(clippy::too_many_arguments)] pub fn send_transfer_token_message_failure( - collator_session_key: CollatorSessionKeys, - runtime_para_id: u32, - assethub_parachain_id: u32, - initial_amount: u128, - weth_contract_address: H160, - destination_address: H160, - fee_amount: u128, - expected_error: Error, + collator_session_key: CollatorSessionKeys, + runtime_para_id: u32, + assethub_parachain_id: u32, + initial_amount: u128, + weth_contract_address: H160, + destination_address: H160, + fee_amount: u128, + expected_error: Error, ) where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + cumulus_pallet_parachain_system::Config - + snowbridge_pallet_outbound_queue::Config - + snowbridge_pallet_system::Config, - XcmConfig: xcm_executor::Config, - ValidatorIdOf: From>, + Runtime: frame_system::Config + + pallet_balances::Config + + pallet_session::Config + + pallet_xcm::Config + + parachain_info::Config + + pallet_collator_selection::Config + + cumulus_pallet_parachain_system::Config + + snowbridge_pallet_outbound_queue::Config + + snowbridge_pallet_system::Config, + XcmConfig: xcm_executor::Config, + ValidatorIdOf: From>, { - ExtBuilder::::default() - .with_collators(collator_session_key.collators()) - .with_session_keys(collator_session_key.session_keys()) - .with_para_id(runtime_para_id.into()) - .with_tracing() - .build() - .execute_with(|| { - >::initialize( - runtime_para_id.into(), - assethub_parachain_id.into(), - ) - .unwrap(); - - // fund asset hub sovereign account enough so it can pay fees - initial_fund::(assethub_parachain_id, initial_amount); - - let outcome = send_transfer_token_message::( - assethub_parachain_id, - weth_contract_address, - destination_address, - fee_amount, - ); - assert_err!(outcome.ensure_complete(), expected_error); - }); + ExtBuilder::::default() + .with_collators(collator_session_key.collators()) + .with_session_keys(collator_session_key.session_keys()) + .with_para_id(runtime_para_id.into()) + .with_tracing() + .build() + .execute_with(|| { + >::initialize( + runtime_para_id.into(), + assethub_parachain_id.into(), + ) + .unwrap(); + + // fund asset hub sovereign account enough so it can pay fees + initial_fund::(assethub_parachain_id, initial_amount); + + let outcome = send_transfer_token_message::( + assethub_parachain_id, + weth_contract_address, + destination_address, + fee_amount, + ); + assert_err!(outcome.ensure_complete(), expected_error); + }); } #[test] fn max_message_queue_service_weight_is_more_than_beacon_extrinsic_weights() { - let max_message_queue_weight = MessageQueueServiceWeight::get(); - let force_checkpoint = - ::WeightInfo::force_checkpoint(); - let submit_checkpoint = - ::WeightInfo::submit(); - max_message_queue_weight.all_gt(force_checkpoint); - max_message_queue_weight.all_gt(submit_checkpoint); + let max_message_queue_weight = MessageQueueServiceWeight::get(); + let force_checkpoint = + ::WeightInfo::force_checkpoint(); + let submit_checkpoint = + ::WeightInfo::submit(); + max_message_queue_weight.all_gt(force_checkpoint); + max_message_queue_weight.all_gt(submit_checkpoint); } #[test] fn ethereum_client_consensus_extrinsics_work() { - snowbridge_runtime_test_common::ethereum_extrinsic( - collator_session_keys(), - 1013, - construct_and_apply_extrinsic, - ); + snowbridge_runtime_test_common::ethereum_extrinsic( + collator_session_keys(), + 1013, + construct_and_apply_extrinsic, + ); } #[test] fn ethereum_to_polkadot_message_extrinsics_work() { - snowbridge_runtime_test_common::ethereum_to_polkadot_message_extrinsics_work( - collator_session_keys(), - 1013, - construct_and_apply_extrinsic, - ); + snowbridge_runtime_test_common::ethereum_to_polkadot_message_extrinsics_work( + collator_session_keys(), + 1013, + construct_and_apply_extrinsic, + ); } fn construct_extrinsic( - sender: sp_keyring::AccountKeyring, - call: RuntimeCall, + sender: sp_keyring::AccountKeyring, + call: RuntimeCall, ) -> UncheckedExtrinsic { - let account_id = AccountId32::from(sender.public()); - let extra: SignedExtra = ( - frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckEra::::from(Era::immortal()), - frame_system::CheckNonce::::from( - frame_system::Pallet::::account(&account_id).nonce, - ), - frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from(0), - BridgeRejectObsoleteHeadersAndMessages::default(), - (RefundBridgeHubPolkadotMessages::default()), - ); - let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); - let signature = payload.using_encoded(|e| sender.sign(e)); - UncheckedExtrinsic::new_signed( - call, - account_id.into(), - Signature::Sr25519(signature.clone()), - extra, - ) + let account_id = AccountId32::from(sender.public()); + let extra: SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckEra::::from(Era::immortal()), + frame_system::CheckNonce::::from( + frame_system::Pallet::::account(&account_id).nonce, + ), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), + BridgeRejectObsoleteHeadersAndMessages::default(), + (RefundBridgeHubPolkadotMessages::default()), + ); + let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); + let signature = payload.using_encoded(|e| sender.sign(e)); + UncheckedExtrinsic::new_signed( + call, + account_id.into(), + Signature::Sr25519(signature.clone()), + extra, + ) } fn construct_and_apply_extrinsic( - origin: sp_keyring::AccountKeyring, - call: RuntimeCall, + origin: sp_keyring::AccountKeyring, + call: RuntimeCall, ) -> sp_runtime::DispatchOutcome { - let xt = construct_extrinsic(origin, call); - let r = Executive::apply_extrinsic(xt); - r.unwrap() + let xt = construct_extrinsic(origin, call); + let r = Executive::apply_extrinsic(xt); + r.unwrap() } // TODO remove when Ethereum network ID has been extracted as a param pub fn send_transfer_token_message( - assethub_parachain_id: u32, - weth_contract_address: H160, - destination_address: H160, - fee_amount: u128, + assethub_parachain_id: u32, + weth_contract_address: H160, + destination_address: H160, + fee_amount: u128, ) -> Outcome - where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + cumulus_pallet_parachain_system::Config - + snowbridge_pallet_outbound_queue::Config, - XcmConfig: xcm_executor::Config, +where + Runtime: frame_system::Config + + pallet_balances::Config + + pallet_session::Config + + pallet_xcm::Config + + parachain_info::Config + + pallet_collator_selection::Config + + cumulus_pallet_parachain_system::Config + + snowbridge_pallet_outbound_queue::Config, + XcmConfig: xcm_executor::Config, { - let assethub_parachain_location = Location::new(1, Parachain(assethub_parachain_id)); - let asset = Asset { - id: AssetId(Location::new( - 0, - [AccountKey20 { network: None, key: weth_contract_address.into() }], - )), - fun: Fungible(1000000000), - }; - let assets = vec![asset.clone()]; - - let inner_xcm = Xcm(vec![ - WithdrawAsset(Assets::from(assets.clone())), - ClearOrigin, - BuyExecution { fees: asset, weight_limit: Unlimited }, - DepositAsset { - assets: Wild(All), - beneficiary: Location::new( - 0, - [AccountKey20 { network: None, key: destination_address.into() }], - ), - }, - SetTopic([0; 32]), - ]); - - let fee = - Asset { id: AssetId(Location { parents: 1, interior: Here }), fun: Fungible(fee_amount) }; - - // prepare transfer token message - let xcm = Xcm(vec![ - WithdrawAsset(Assets::from(vec![fee.clone()])), - BuyExecution { fees: fee, weight_limit: Unlimited }, - ExportMessage { - network: Ethereum { chain_id: 1 }, - destination: Here, - xcm: inner_xcm, - }, - ]); - - // execute XCM - let mut hash = xcm.using_encoded(sp_io::hashing::blake2_256); - XcmExecutor::::prepare_and_execute( - assethub_parachain_location, - xcm, - &mut hash, - RuntimeHelper::::xcm_max_weight(XcmReceivedFrom::Sibling), - Weight::zero(), - ) + let assethub_parachain_location = Location::new(1, Parachain(assethub_parachain_id)); + let asset = Asset { + id: AssetId(Location::new( + 0, + [AccountKey20 { network: None, key: weth_contract_address.into() }], + )), + fun: Fungible(1000000000), + }; + let assets = vec![asset.clone()]; + + let inner_xcm = Xcm(vec![ + WithdrawAsset(Assets::from(assets.clone())), + ClearOrigin, + BuyExecution { fees: asset, weight_limit: Unlimited }, + DepositAsset { + assets: Wild(All), + beneficiary: Location::new( + 0, + [AccountKey20 { network: None, key: destination_address.into() }], + ), + }, + SetTopic([0; 32]), + ]); + + let fee = + Asset { id: AssetId(Location { parents: 1, interior: Here }), fun: Fungible(fee_amount) }; + + // prepare transfer token message + let xcm = Xcm(vec![ + WithdrawAsset(Assets::from(vec![fee.clone()])), + BuyExecution { fees: fee, weight_limit: Unlimited }, + ExportMessage { network: Ethereum { chain_id: 1 }, destination: Here, xcm: inner_xcm }, + ]); + + // execute XCM + let mut hash = xcm.using_encoded(sp_io::hashing::blake2_256); + XcmExecutor::::prepare_and_execute( + assethub_parachain_location, + xcm, + &mut hash, + RuntimeHelper::::xcm_max_weight(XcmReceivedFrom::Sibling), + Weight::zero(), + ) } pub fn send_transfer_token_message_success( - collator_session_key: CollatorSessionKeys, - runtime_para_id: u32, - assethub_parachain_id: u32, - weth_contract_address: H160, - destination_address: H160, - fee_amount: u128, - snowbridge_pallet_outbound_queue: Box< - dyn Fn(Vec) -> Option>, - >, + collator_session_key: CollatorSessionKeys, + runtime_para_id: u32, + assethub_parachain_id: u32, + weth_contract_address: H160, + destination_address: H160, + fee_amount: u128, + snowbridge_pallet_outbound_queue: Box< + dyn Fn(Vec) -> Option>, + >, ) where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + pallet_message_queue::Config - + cumulus_pallet_parachain_system::Config - + snowbridge_pallet_outbound_queue::Config - + snowbridge_pallet_system::Config, - XcmConfig: xcm_executor::Config, - ValidatorIdOf: From>, - ::AccountId: From + AsRef<[u8]>, + Runtime: frame_system::Config + + pallet_balances::Config + + pallet_session::Config + + pallet_xcm::Config + + parachain_info::Config + + pallet_collator_selection::Config + + pallet_message_queue::Config + + cumulus_pallet_parachain_system::Config + + snowbridge_pallet_outbound_queue::Config + + snowbridge_pallet_system::Config, + XcmConfig: xcm_executor::Config, + ValidatorIdOf: From>, + ::AccountId: From + AsRef<[u8]>, { - ExtBuilder::::default() - .with_collators(collator_session_key.collators()) - .with_session_keys(collator_session_key.session_keys()) - .with_para_id(runtime_para_id.into()) - .with_tracing() - .build() - .execute_with(|| { - >::initialize( - runtime_para_id.into(), - assethub_parachain_id.into(), - ) - .unwrap(); - - // fund asset hub sovereign account enough so it can pay fees - initial_fund::(assethub_parachain_id, 5_000_000_000_000); - - let outcome = send_transfer_token_message::( - assethub_parachain_id, - weth_contract_address, - destination_address, - fee_amount, - ); - - assert_ok!(outcome.ensure_complete()); - - // check events - let mut events = >::events() - .into_iter() - .filter_map(|e| snowbridge_pallet_outbound_queue(e.event.encode())); - assert!(events.any(|e| matches!( + ExtBuilder::::default() + .with_collators(collator_session_key.collators()) + .with_session_keys(collator_session_key.session_keys()) + .with_para_id(runtime_para_id.into()) + .with_tracing() + .build() + .execute_with(|| { + >::initialize( + runtime_para_id.into(), + assethub_parachain_id.into(), + ) + .unwrap(); + + // fund asset hub sovereign account enough so it can pay fees + initial_fund::(assethub_parachain_id, 5_000_000_000_000); + + let outcome = send_transfer_token_message::( + assethub_parachain_id, + weth_contract_address, + destination_address, + fee_amount, + ); + + assert_ok!(outcome.ensure_complete()); + + // check events + let mut events = >::events() + .into_iter() + .filter_map(|e| snowbridge_pallet_outbound_queue(e.event.encode())); + assert!(events.any(|e| matches!( e, snowbridge_pallet_outbound_queue::Event::MessageQueued { .. } ))); - let block_number = >::block_number(); - let next_block_number = >::block_number() - .saturating_add(BlockNumberFor::::from(1u32)); + let block_number = >::block_number(); + let next_block_number = >::block_number() + .saturating_add(BlockNumberFor::::from(1u32)); - // finish current block - >::on_finalize(block_number); - >::on_finalize(block_number); - >::on_finalize(block_number); + // finish current block + >::on_finalize(block_number); + >::on_finalize(block_number); + >::on_finalize(block_number); - // start next block - >::set_block_number(next_block_number); - >::on_initialize(next_block_number); - >::on_initialize(next_block_number); - >::on_initialize(next_block_number); + // start next block + >::set_block_number(next_block_number); + >::on_initialize(next_block_number); + >::on_initialize(next_block_number); + >::on_initialize(next_block_number); - // finish next block - >::on_finalize(next_block_number); - >::on_finalize(next_block_number); - let included_head = >::finalize(); + // finish next block + >::on_finalize(next_block_number); + >::on_finalize(next_block_number); + let included_head = >::finalize(); - let origin: ParaId = assethub_parachain_id.into(); - let channel_id: ChannelId = origin.into(); + let origin: ParaId = assethub_parachain_id.into(); + let channel_id: ChannelId = origin.into(); - let nonce = snowbridge_pallet_outbound_queue::Nonce::::try_get(channel_id); - assert_ok!(nonce); - assert_eq!(nonce.unwrap(), 1); + let nonce = snowbridge_pallet_outbound_queue::Nonce::::try_get(channel_id); + assert_ok!(nonce); + assert_eq!(nonce.unwrap(), 1); - let digest = included_head.digest(); + let digest = included_head.digest(); - //let digest = frame_system::Pallet::::digest(); - let digest_items = digest.logs(); - assert!(digest_items.len() == 1 && digest_items[0].as_other().is_some()); - }); + //let digest = frame_system::Pallet::::digest(); + let digest_items = digest.logs(); + assert!(digest_items.len() == 1 && digest_items[0].as_other().is_some()); + }); } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index b4d2ab8fe1..bcf0287023 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -24,9 +24,9 @@ use bridge_hub_kusama_runtime::{ WithBridgeHubPolkadotMessagesInstance, XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, }, xcm_config::{KsmRelayLocation, RelayNetwork, XcmConfig}, - AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, - ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, - SignedExtra, TransactionPayment, UncheckedExtrinsic, EthereumGatewayAddress, + AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, EthereumGatewayAddress, + Executive, ExistentialDeposit, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, + RuntimeEvent, RuntimeOrigin, SessionKeys, SignedExtra, TransactionPayment, UncheckedExtrinsic, }; use bridge_hub_test_utils::{test_cases::from_parachain, SlotDurations}; use codec::{Decode, Encode}; @@ -39,9 +39,10 @@ use sp_runtime::{ generic::{Era, SignedPayload}, AccountId32, }; -use system_parachains_constants::{kusama::{ - consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee, -}, SLOT_DURATION}; +use system_parachains_constants::{ + kusama::{consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee}, + SLOT_DURATION, +}; use xcm::latest::prelude::*; // Para id of sibling chain used in tests. diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 6f1c740561..f52df25b9b 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -27,7 +27,9 @@ pub mod bridge_to_kusama_config; mod weights; pub mod xcm_config; -use bridge_hub_common::message_queue::{AggregateMessageOrigin, NarrowOriginToSibling, ParaIdToSibling}; +use bridge_hub_common::message_queue::{ + AggregateMessageOrigin, NarrowOriginToSibling, ParaIdToSibling, +}; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::ParaId; use snowbridge_beacon_primitives::{Fork, ForkVersions}; @@ -77,13 +79,15 @@ pub use sp_runtime::BuildStorage; // Polkadot imports use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; -use polkadot_runtime_constants::{currency::EXISTENTIAL_DEPOSIT, system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}}; +use polkadot_runtime_constants::{ + currency::EXISTENTIAL_DEPOSIT, + system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}, +}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use parachains_common::{ - impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, - Signature, + impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, }; use polkadot_runtime_common::prod_or_fast; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index fcb5fcad91..f6d13f397f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -23,8 +23,9 @@ use super::{ RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ - parameter_types, StoragePrefixedMap, + parameter_types, traits::{ConstU32, Contains, Equals, Everything, Nothing}, + StoragePrefixedMap, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; From 77f714e4f6b1913c3265559d4ffd5d4de1c23b64 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 22 Feb 2024 09:24:13 +0200 Subject: [PATCH 174/316] fixes --- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 2 +- .../bridge-hub-kusama/tests/snowbridge.rs | 1 - .../bridge-hub-polkadot/tests/tests.rs | 24 +++++++++++++++---- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 0d2085d72d..286f17a08b 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -112,7 +112,7 @@ snowbridge-pallet-inbound-queue = { default-features = false , version = "0.1.0" snowbridge-pallet-outbound-queue = { default-features = false , version = "0.1.0" } snowbridge-outbound-queue-runtime-api = { default-features = false , version = "0.1.0" } snowbridge-router-primitives = { default-features = false , version = "0.1.0" } -snowbridge-runtime-common = { default-features = false , version = "0.1.0" } +snowbridge-runtime-common = { default-features = false, version = "0.1.0" } [dev-dependencies] bridge-hub-test-utils = { version = "0.8.0" } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs index 6d8da0ce1e..058b88f5bf 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs @@ -388,7 +388,6 @@ pub fn send_transfer_token_message_success( let digest = included_head.digest(); - //let digest = frame_system::Pallet::::digest(); let digest_items = digest.logs(); assert!(digest_items.len() == 1 && digest_items[0].as_other().is_some()); }); diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index 492ca96769..7c2714af87 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -24,10 +24,10 @@ use bridge_hub_polkadot_runtime::{ WithBridgeHubKusamaMessageBridge, WithBridgeHubKusamaMessagesInstance, XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, }, - xcm_config::{DotRelayLocation, RelayNetwork, XcmConfig}, + xcm_config::{DotRelayLocation, RelayNetwork, XcmConfig}, EthereumGatewayAddress, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, - SignedExtra, TransactionPayment, UncheckedExtrinsic, SLOT_DURATION, + SignedExtra, TransactionPayment, UncheckedExtrinsic, }; use bridge_hub_test_utils::{test_cases::from_parachain, SlotDurations}; use codec::{Decode, Encode}; @@ -35,13 +35,14 @@ use frame_support::{dispatch::GetDispatchInfo, parameter_types, traits::ConstU8} use parachains_common::{AccountId, AuraId, Balance}; use sp_consensus_aura::SlotDuration; use sp_keyring::AccountKeyring::Alice; +use sp_core::H160; use sp_runtime::{ generic::{Era, SignedPayload}, AccountId32, }; -use system_parachains_constants::polkadot::{ +use system_parachains_constants::{polkadot::{ consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee, -}; +}, SLOT_DURATION}; use xcm::latest::prelude::*; // Para id of sibling chain used in tests. @@ -296,6 +297,21 @@ pub fn can_calculate_weight_for_paid_export_message_with_reserve_transfer() { ) } +#[test] +fn change_ethereum_gateway_by_governance_works() { + bridge_hub_test_utils::test_cases::change_storage_constant_by_governance_works::< + Runtime, + EthereumGatewayAddress, + H160, + >( + collator_session_keys(), + bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, + Box::new(|call| RuntimeCall::System(call).encode()), + || (EthereumGatewayAddress::key().to_vec(), EthereumGatewayAddress::get()), + |_| [1; 20].into(), + ) +} + #[test] pub fn can_calculate_fee_for_complex_message_delivery_transaction() { check_sane_fees_values( From afcbaf6e4e6ce4d45dbc94b3bbf7976a35bac767 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 22 Feb 2024 13:38:13 +0200 Subject: [PATCH 175/316] fix wrong dep --- Cargo.lock | 2 +- chain-spec-generator/Cargo.toml | 7 - .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 6 +- system-parachains/encointer/Cargo.toml | 131 +++++++++--------- 4 files changed, 73 insertions(+), 73 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 98494fd2b9..1849a2a38a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13260,7 +13260,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api 29.0.0", "pallet-utility 29.0.0", "pallet-xcm 8.0.0", - "pallet-xcm-benchmarks 8.0.0", + "pallet-xcm-benchmarks 8.0.1", "parachains-common 8.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index 42b27bbd25..6e09c4ceb2 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -53,11 +53,4 @@ runtime-benchmarks = [ "polkadot-runtime/runtime-benchmarks", "encointer-kusama-runtime/runtime-benchmarks", "glutton-kusama-runtime/runtime-benchmarks", - "cumulus-primitives-core/runtime-benchmarks", - "pallet-im-online/runtime-benchmarks", - "pallet-staking/runtime-benchmarks", - "parachains-common/runtime-benchmarks", - "polkadot-primitives/runtime-benchmarks", - "polkadot-runtime-parachains/runtime-benchmarks", - "sp-runtime/runtime-benchmarks" ] diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 11a816f7d8..b995ad4ea5 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -81,7 +81,6 @@ cumulus-primitives-utility = { default-features = false , version = "0.8.0" } pallet-collator-selection = { default-features = false , version = "10.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.8.0" } parachains-common = { default-features = false , version = "8.0.0" } -parachains-runtimes-test-utils = { version = "8.0.0" } system-parachains-constants = { path = "../../constants", default-features = false } # Bridges @@ -120,6 +119,7 @@ bridge-runtime-common = { version = "0.8.0", features = ["integrity-test"] } sp-keyring = { version = "32.0.0" } static_assertions = { version = "1.1.0" } snowbridge-runtime-test-common = { version = "0.1.0" } +parachains-runtimes-test-utils = { version = "8.0.0" } [features] default = [ "std" ] @@ -211,6 +211,7 @@ std = [ "xcm-builder/std", "xcm-executor/std", "xcm/std", + "snowbridge-pallet-ethereum-client-fixtures/std" ] runtime-benchmarks = [ @@ -252,7 +253,8 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", - "cumulus-primitives-core/runtime-benchmarks" + "cumulus-primitives-core/runtime-benchmarks", + "snowbridge-pallet-ethereum-client-fixtures/runtime-benchmarks" ] try-runtime = [ diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml index 835126d667..7e9f9f1d68 100644 --- a/system-parachains/encointer/Cargo.toml +++ b/system-parachains/encointer/Cargo.toml @@ -143,71 +143,76 @@ runtime-benchmarks = [ "polkadot-primitives/runtime-benchmarks" ] std = [ - "codec/std", - "cumulus-pallet-aura-ext/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", - "encointer-balances-tx-payment-rpc-runtime-api/std", - "encointer-balances-tx-payment/std", - "encointer-primitives/serde_derive", - "encointer-primitives/std", - "frame-executive/std", - "frame-support/std", - "frame-system-rpc-runtime-api/std", - "frame-system/std", - "frame-try-runtime/std", + "codec/std", + "cumulus-pallet-aura-ext/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", + "encointer-balances-tx-payment-rpc-runtime-api/std", + "encointer-balances-tx-payment/std", + "encointer-primitives/serde_derive", + "encointer-primitives/std", + "frame-executive/std", + "frame-support/std", + "frame-system-rpc-runtime-api/std", + "frame-system/std", + "frame-try-runtime/std", # "kusama-runtime-constants/std", - "log/std", - "pallet-asset-tx-payment/std", - "pallet-aura/std", - "pallet-balances/std", - "pallet-collective/std", - "pallet-encointer-balances/std", - "pallet-encointer-bazaar-rpc-runtime-api/std", - "pallet-encointer-bazaar/std", - "pallet-encointer-ceremonies-rpc-runtime-api/std", - "pallet-encointer-ceremonies/std", - "pallet-encointer-communities-rpc-runtime-api/std", - "pallet-encointer-communities/std", - "pallet-encointer-faucet/std", - "pallet-encointer-reputation-commitments/std", - "pallet-encointer-scheduler/std", - "pallet-insecure-randomness-collective-flip/std", - "pallet-membership/std", - "pallet-proxy/std", - "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-treasury/std", - "pallet-utility/std", - "pallet-xcm/std", - "parachain-info/std", - "parachains-common/std", - "polkadot-core-primitives/std", - "polkadot-primitives/std", - "scale-info/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-aura/std", - "sp-core/std", - "sp-genesis-builder/std", - "sp-inherents/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", + "log/std", + "pallet-asset-tx-payment/std", + "pallet-aura/std", + "pallet-balances/std", + "pallet-collective/std", + "pallet-encointer-balances/std", + "pallet-encointer-bazaar-rpc-runtime-api/std", + "pallet-encointer-bazaar/std", + "pallet-encointer-ceremonies-rpc-runtime-api/std", + "pallet-encointer-ceremonies/std", + "pallet-encointer-communities-rpc-runtime-api/std", + "pallet-encointer-communities/std", + "pallet-encointer-faucet/std", + "pallet-encointer-reputation-commitments/std", + "pallet-encointer-scheduler/std", + "pallet-insecure-randomness-collective-flip/std", + "pallet-membership/std", + "pallet-proxy/std", + "pallet-timestamp/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", + "pallet-treasury/std", + "pallet-utility/std", + "pallet-xcm/std", + "parachain-info/std", + "parachains-common/std", + "polkadot-core-primitives/std", + "polkadot-primitives/std", + "scale-info/std", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-aura/std", + "sp-core/std", + "sp-genesis-builder/std", + "sp-inherents/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-transaction-pool/std", + "sp-version/std", # "system-parachains-constants/std", - "substrate-wasm-builder", - "xcm-builder/std", - "xcm-executor/std", - "xcm/std", + "substrate-wasm-builder", + "xcm-builder/std", + "xcm-executor/std", + "xcm/std", + "frame-benchmarking?/std", + "frame-system-benchmarking?/std", + "pallet-scheduler/std", + "polkadot-parachain-primitives/std", + "polkadot-runtime-common/std" ] From 35638b3fcddaf59875ec4ec86295f146d3471397 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 22 Feb 2024 14:53:08 +0200 Subject: [PATCH 176/316] fix import --- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index c91caaa6e8..eb43768c9d 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -71,8 +71,9 @@ pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; use xcm_config::{ FellowshipLocation, GovernanceLocation, TreasuryAccount, XcmOriginToTransactDispatchOrigin, - XcmRouter, }; +#[cfg(not(feature = "runtime-benchmarks"))] +use xcm_config::XcmRouter; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; From 3e46fed73e3481ff56b72b519d2a4466897d908e Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 22 Feb 2024 15:04:07 +0200 Subject: [PATCH 177/316] fmt --- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 4 ++-- .../bridge-hub-polkadot/tests/tests.rs | 17 +++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index eb43768c9d..7b9719f223 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -69,11 +69,11 @@ use frame_system::{ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; +#[cfg(not(feature = "runtime-benchmarks"))] +use xcm_config::XcmRouter; use xcm_config::{ FellowshipLocation, GovernanceLocation, TreasuryAccount, XcmOriginToTransactDispatchOrigin, }; -#[cfg(not(feature = "runtime-benchmarks"))] -use xcm_config::XcmRouter; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index 7c2714af87..8c057a53cb 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -24,25 +24,26 @@ use bridge_hub_polkadot_runtime::{ WithBridgeHubKusamaMessageBridge, WithBridgeHubKusamaMessagesInstance, XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, }, - xcm_config::{DotRelayLocation, RelayNetwork, XcmConfig}, EthereumGatewayAddress, - AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, - ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, - SignedExtra, TransactionPayment, UncheckedExtrinsic, + xcm_config::{DotRelayLocation, RelayNetwork, XcmConfig}, + AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, EthereumGatewayAddress, + Executive, ExistentialDeposit, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, + RuntimeEvent, RuntimeOrigin, SessionKeys, SignedExtra, TransactionPayment, UncheckedExtrinsic, }; use bridge_hub_test_utils::{test_cases::from_parachain, SlotDurations}; use codec::{Decode, Encode}; use frame_support::{dispatch::GetDispatchInfo, parameter_types, traits::ConstU8}; use parachains_common::{AccountId, AuraId, Balance}; use sp_consensus_aura::SlotDuration; -use sp_keyring::AccountKeyring::Alice; use sp_core::H160; +use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ generic::{Era, SignedPayload}, AccountId32, }; -use system_parachains_constants::{polkadot::{ - consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee, -}, SLOT_DURATION}; +use system_parachains_constants::{ + polkadot::{consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee}, + SLOT_DURATION, +}; use xcm::latest::prelude::*; // Para id of sibling chain used in tests. From 0a19785a76ab4cc547e5c93bfa91aa1a34ed4660 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 22 Feb 2024 15:27:12 +0200 Subject: [PATCH 178/316] cleanup --- docs/removing-migrations.md | 4 +- relay/kusama/src/lib.rs | 2 + relay/polkadot/src/lib.rs | 119 +++++--- .../collectives-polkadot/Cargo.toml | 3 - system-parachains/encointer/Cargo.toml | 254 ++++++++---------- .../gluttons/glutton-kusama/Cargo.toml | 1 - 6 files changed, 202 insertions(+), 181 deletions(-) diff --git a/docs/removing-migrations.md b/docs/removing-migrations.md index e3b0dc3a6f..67e81a6b43 100644 --- a/docs/removing-migrations.md +++ b/docs/removing-migrations.md @@ -16,10 +16,10 @@ For some chain runtime `spec_version: a_bcd_efg,` (e.g. `spec_version: 1_000_001 2. Check-out **the released** code: `git checkout vX.Y.Z`, - This is required to make sure you are not accidentally removing yet unreleased migrations (PRs merged between `X.Y.Z` release and when you are doing this). 3. Create patch with your changes: `git diff --patch > remove-migrations.patch`, -4. Now `git checkout main` and apply your patch `git am -3 remove-migrations.patch` or `git apply -3 remove-migrations.patch`, +4. Now `git checkout main` and apply your patch `git am -3 remove-migrations.patch`, - thus ensuring you are not removing any migrations merged to main after the release. 5. `git checkout -b `, `git push --set-upstream origin `, then open PR. ## Automation -Currently, all of the above is done manually, but (at least parts of) it could be automated. Prerequisites can definitely be automated, so could the branches/patches dance. Code changes would easily be done manually and that's it. \ No newline at end of file +Currently, all of the above is done manually, but (at least parts of) it could be automated. Prerequisites can definitely be automated, so could the branches/patches dance. Code changes would easily be done manually and that's it. diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 0222c7b155..0af63f42d0 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1688,6 +1688,8 @@ pub mod migrations { /// Unreleased migrations. Add new ones here: pub type Unreleased = ( + pallet_nomination_pools::migration::versioned::V5toV6, + pallet_nomination_pools::migration::versioned::V6ToV7, pallet_nomination_pools::migration::versioned::V7ToV8, pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index a72492d3d0..21cbb314e5 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -282,10 +282,10 @@ impl pallet_babe::Config for Runtime { type MaxNominators = MaxNominators; type KeyOwnerProof = - >::Proof; + >::Proof; type EquivocationReportSystem = - pallet_babe::EquivocationReportSystem; + pallet_babe::EquivocationReportSystem; } parameter_types! { @@ -335,7 +335,7 @@ impl pallet_beefy::Config for Runtime { type WeightInfo = (); type KeyOwnerProof = >::Proof; type EquivocationReportSystem = - pallet_beefy::EquivocationReportSystem; + pallet_beefy::EquivocationReportSystem; } impl pallet_mmr::Config for Runtime { @@ -386,7 +386,7 @@ impl BeefyDataProvider for ParaHeadsRootProvider { binary_merkle_tree::merkle_root::( para_heads.into_iter().map(|pair| pair.encode()), ) - .into() + .into() } } @@ -428,6 +428,17 @@ impl pallet_authorship::Config for Runtime { type EventHandler = (Staking, ImOnline); } +impl_opaque_keys! { + pub struct OldSessionKeys { + pub grandpa: Grandpa, + pub babe: Babe, + pub im_online: ImOnline, + pub para_validator: Initializer, + pub para_assignment: ParaSessionInfo, + pub authority_discovery: AuthorityDiscovery, + } +} + impl_opaque_keys! { pub struct SessionKeys { pub grandpa: Grandpa, @@ -440,6 +451,32 @@ impl_opaque_keys! { } } +// remove this when removing `OldSessionKeys` +fn transform_session_keys(v: AccountId, old: OldSessionKeys) -> SessionKeys { + SessionKeys { + grandpa: old.grandpa, + babe: old.babe, + im_online: old.im_online, + para_validator: old.para_validator, + para_assignment: old.para_assignment, + authority_discovery: old.authority_discovery, + beefy: { + // From Session::upgrade_keys(): + // + // Care should be taken that the raw versions of the + // added keys are unique for every `ValidatorId, KeyTypeId` combination. + // This is an invariant that the session pallet typically maintains internally. + // + // So, produce a dummy value that's unique for the `ValidatorId, KeyTypeId` combination. + let mut id: BeefyId = sp_application_crypto::ecdsa::Public::from_raw([0u8; 33]).into(); + let id_raw: &mut [u8] = id.as_mut(); + id_raw[1..33].copy_from_slice(v.as_ref()); + id_raw[0..4].copy_from_slice(b"beef"); + id + }, + } +} + impl pallet_session::Config for Runtime { type RuntimeEvent = RuntimeEvent; type ValidatorId = AccountId; @@ -521,9 +558,9 @@ impl pallet_election_provider_multi_phase::MinerConfig for Runtime { type MaxWeight = OffchainSolutionWeightLimit; type Solution = NposCompactSolution16; type MaxVotesPerVoter = < - ::DataProvider - as - frame_election_provider_support::ElectionDataProvider + ::DataProvider + as + frame_election_provider_support::ElectionDataProvider >::MaxVotesPerVoter; type MaxWinners = MaxActiveValidators; @@ -531,9 +568,9 @@ impl pallet_election_provider_multi_phase::MinerConfig for Runtime { // weight estimate function is wired to this call's weight. fn solution_weight(v: u32, t: u32, a: u32, d: u32) -> Weight { < - ::WeightInfo - as - pallet_election_provider_multi_phase::WeightInfo + ::WeightInfo + as + pallet_election_provider_multi_phase::WeightInfo >::submit_unsigned(v, t, a, d) } } @@ -548,11 +585,11 @@ impl pallet_election_provider_multi_phase::Config for Runtime { type SignedMaxRefunds = SignedMaxRefunds; type SignedRewardBase = SignedRewardBase; type SignedDepositBase = - GeometricDepositBase; + GeometricDepositBase; type SignedDepositByte = SignedDepositByte; type SignedDepositWeight = (); type SignedMaxWeight = - ::MaxWeight; + ::MaxWeight; type MinerConfig = Self; type SlashHandler = (); // burn slashes type RewardHandler = (); // nothing to do upon rewards @@ -927,14 +964,14 @@ impl pallet_grandpa::Config for Runtime { type KeyOwnerProof = >::Proof; type EquivocationReportSystem = - pallet_grandpa::EquivocationReportSystem; + pallet_grandpa::EquivocationReportSystem; } /// Submits a transaction with the node's public and signature type. Adheres to the signed extension /// format of the chain. impl frame_system::offchain::CreateSignedTransaction for Runtime -where - RuntimeCall: From, + where + RuntimeCall: From, { fn create_transaction>( call: RuntimeCall, @@ -985,8 +1022,8 @@ impl frame_system::offchain::SigningTypes for Runtime { } impl frame_system::offchain::SendTransactionTypes for Runtime -where - RuntimeCall: From, + where + RuntimeCall: From, { type Extrinsic = UncheckedExtrinsic; type OverarchingCall = RuntimeCall; @@ -1066,17 +1103,17 @@ parameter_types! { /// The type used to represent the kinds of proxying allowed. #[derive( - Copy, - Clone, - Eq, - PartialEq, - Ord, - PartialOrd, - Encode, - Decode, - RuntimeDebug, - MaxEncodedLen, - scale_info::TypeInfo, +Copy, +Clone, +Eq, +PartialEq, +Ord, +PartialOrd, +Encode, +Decode, +RuntimeDebug, +MaxEncodedLen, +scale_info::TypeInfo, )] pub enum ProxyType { Any = 0, @@ -1113,7 +1150,7 @@ mod proxy_type_tests { (OldProxyType::Staking, ProxyType::Staking), (OldProxyType::IdentityJudgement, ProxyType::IdentityJudgement), ] - .into_iter() + .into_iter() { assert_eq!(i.encode(), j.encode()); } @@ -1316,7 +1353,7 @@ impl pallet_message_queue::Config for Runtime { type MessageProcessor = MessageProcessor; #[cfg(feature = "runtime-benchmarks")] type MessageProcessor = - pallet_message_queue::mock_helpers::NoopMessageProcessor; + pallet_message_queue::mock_helpers::NoopMessageProcessor; type QueueChangeHandler = ParaInclusion; type QueuePausedQuery = (); type WeightInfo = weights::pallet_message_queue::WeightInfo; @@ -1362,7 +1399,7 @@ impl parachains_disputes::Config for Runtime { impl parachains_slashing::Config for Runtime { type KeyOwnerProofSystem = Historical; type KeyOwnerProof = - >::Proof; + >::Proof; type KeyOwnerIdentification = , + pallet_nomination_pools::migration::versioned::V6ToV7, pallet_nomination_pools::migration::versioned::V7ToV8, pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, @@ -1700,7 +1741,7 @@ pub mod migrations { /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = - generic::UncheckedExtrinsic; +generic::UncheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -2493,7 +2534,7 @@ mod test_fees { ::WeightInfo::payout_stakers_alive_staked( MaxNominators::get(), ) - .ref_time() as f64; + .ref_time() as f64; let block_weight = BlockWeights::get().max_block.ref_time() as f64; println!( @@ -2696,8 +2737,8 @@ mod multiplier_tests { use sp_runtime::traits::Convert; fn run_with_system_weight(w: Weight, mut assertions: F) - where - F: FnMut() -> (), + where + F: FnMut() -> (), { let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() .build_storage() @@ -2730,7 +2771,7 @@ mod multiplier_tests { 300, ::BatchSize::get(), ) - .ref_time() as f32; + .ref_time() as f32; println!("ratio of block weight for full batch fast-unstake {}", on_idle / block_time); assert!(on_idle / block_time <= 0.5f32) } @@ -2881,9 +2922,9 @@ mod remote_tests { // we do more or less what the scheduler will do under the hood, as best as we can // imitate: let (call, _len) = match < - ::Preimages - as - frame_support::traits::QueryPreimage + ::Preimages + as + frame_support::traits::QueryPreimage >::peek(&proposal) { Ok(x) => x, Err(e) => { diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index 80cd97400d..e0d75cc5dd 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -119,9 +119,6 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", - "cumulus-primitives-core/runtime-benchmarks", - "cumulus-primitives-utility/runtime-benchmarks", - "parachains-common/runtime-benchmarks" ] try-runtime = [ "cumulus-pallet-aura-ext/try-runtime", diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml index 7e9f9f1d68..52f7b22fee 100644 --- a/system-parachains/encointer/Cargo.toml +++ b/system-parachains/encointer/Cargo.toml @@ -107,150 +107,132 @@ kusama-runtime-constants = { path = "../../relay/kusama/constants" } [features] default = ["std"] runtime-benchmarks = [ - "cumulus-pallet-xcmp-queue/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", - "pallet-balances/runtime-benchmarks", - "pallet-collective/runtime-benchmarks", - "pallet-encointer-balances/runtime-benchmarks", - "pallet-encointer-bazaar/runtime-benchmarks", - "pallet-encointer-ceremonies/runtime-benchmarks", - "pallet-encointer-communities/runtime-benchmarks", - "pallet-encointer-faucet/runtime-benchmarks", - "pallet-encointer-reputation-commitments/runtime-benchmarks", - "pallet-encointer-scheduler/runtime-benchmarks", - "pallet-membership/runtime-benchmarks", - "pallet-proxy/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-treasury/runtime-benchmarks", - "pallet-utility/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "polkadot-runtime-common/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", - "xcm-executor/runtime-benchmarks", - "cumulus-primitives-utility/runtime-benchmarks", - "encointer-balances-tx-payment/runtime-benchmarks", - "encointer-primitives/runtime-benchmarks", - "pallet-asset-tx-payment/runtime-benchmarks", - "pallet-scheduler/runtime-benchmarks", - "parachains-common/runtime-benchmarks", - "polkadot-parachain-primitives/runtime-benchmarks", - "polkadot-primitives/runtime-benchmarks" + "cumulus-pallet-xcmp-queue/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", + "pallet-balances/runtime-benchmarks", + "pallet-collective/runtime-benchmarks", + "pallet-encointer-balances/runtime-benchmarks", + "pallet-encointer-bazaar/runtime-benchmarks", + "pallet-encointer-ceremonies/runtime-benchmarks", + "pallet-encointer-communities/runtime-benchmarks", + "pallet-encointer-faucet/runtime-benchmarks", + "pallet-encointer-reputation-commitments/runtime-benchmarks", + "pallet-encointer-scheduler/runtime-benchmarks", + "pallet-membership/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "polkadot-runtime-common/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", + "xcm-executor/runtime-benchmarks", ] std = [ - "codec/std", - "cumulus-pallet-aura-ext/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", - "encointer-balances-tx-payment-rpc-runtime-api/std", - "encointer-balances-tx-payment/std", - "encointer-primitives/serde_derive", - "encointer-primitives/std", - "frame-executive/std", - "frame-support/std", - "frame-system-rpc-runtime-api/std", - "frame-system/std", - "frame-try-runtime/std", + "codec/std", + "cumulus-pallet-aura-ext/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", + "encointer-balances-tx-payment-rpc-runtime-api/std", + "encointer-balances-tx-payment/std", + "encointer-primitives/serde_derive", + "encointer-primitives/std", + "frame-executive/std", + "frame-support/std", + "frame-system-rpc-runtime-api/std", + "frame-system/std", + "frame-try-runtime/std", # "kusama-runtime-constants/std", - "log/std", - "pallet-asset-tx-payment/std", - "pallet-aura/std", - "pallet-balances/std", - "pallet-collective/std", - "pallet-encointer-balances/std", - "pallet-encointer-bazaar-rpc-runtime-api/std", - "pallet-encointer-bazaar/std", - "pallet-encointer-ceremonies-rpc-runtime-api/std", - "pallet-encointer-ceremonies/std", - "pallet-encointer-communities-rpc-runtime-api/std", - "pallet-encointer-communities/std", - "pallet-encointer-faucet/std", - "pallet-encointer-reputation-commitments/std", - "pallet-encointer-scheduler/std", - "pallet-insecure-randomness-collective-flip/std", - "pallet-membership/std", - "pallet-proxy/std", - "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-treasury/std", - "pallet-utility/std", - "pallet-xcm/std", - "parachain-info/std", - "parachains-common/std", - "polkadot-core-primitives/std", - "polkadot-primitives/std", - "scale-info/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-aura/std", - "sp-core/std", - "sp-genesis-builder/std", - "sp-inherents/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", + "log/std", + "pallet-asset-tx-payment/std", + "pallet-aura/std", + "pallet-balances/std", + "pallet-collective/std", + "pallet-encointer-balances/std", + "pallet-encointer-bazaar-rpc-runtime-api/std", + "pallet-encointer-bazaar/std", + "pallet-encointer-ceremonies-rpc-runtime-api/std", + "pallet-encointer-ceremonies/std", + "pallet-encointer-communities-rpc-runtime-api/std", + "pallet-encointer-communities/std", + "pallet-encointer-faucet/std", + "pallet-encointer-reputation-commitments/std", + "pallet-encointer-scheduler/std", + "pallet-insecure-randomness-collective-flip/std", + "pallet-membership/std", + "pallet-proxy/std", + "pallet-timestamp/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", + "pallet-treasury/std", + "pallet-utility/std", + "pallet-xcm/std", + "parachain-info/std", + "parachains-common/std", + "polkadot-core-primitives/std", + "polkadot-primitives/std", + "scale-info/std", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-aura/std", + "sp-core/std", + "sp-genesis-builder/std", + "sp-inherents/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-transaction-pool/std", + "sp-version/std", # "system-parachains-constants/std", - "substrate-wasm-builder", - "xcm-builder/std", - "xcm-executor/std", - "xcm/std", - "frame-benchmarking?/std", - "frame-system-benchmarking?/std", - "pallet-scheduler/std", - "polkadot-parachain-primitives/std", - "polkadot-runtime-common/std" + "substrate-wasm-builder", + "xcm-builder/std", + "xcm-executor/std", + "xcm/std", ] try-runtime = [ - "cumulus-pallet-aura-ext/try-runtime", - "cumulus-pallet-dmp-queue/try-runtime", - "cumulus-pallet-parachain-system/try-runtime", - "cumulus-pallet-xcm/try-runtime", - "cumulus-pallet-xcmp-queue/try-runtime", - "frame-executive/try-runtime", - "frame-system/try-runtime", - "frame-try-runtime/try-runtime", - "pallet-asset-tx-payment/try-runtime", - "pallet-aura/try-runtime", - "pallet-balances/try-runtime", - "pallet-collective/try-runtime", - "pallet-encointer-balances/try-runtime", - "pallet-encointer-bazaar/try-runtime", - "pallet-encointer-ceremonies/try-runtime", - "pallet-encointer-communities/try-runtime", - "pallet-encointer-faucet/try-runtime", - "pallet-encointer-reputation-commitments/try-runtime", - "pallet-encointer-scheduler/try-runtime", - "pallet-insecure-randomness-collective-flip/try-runtime", - "pallet-membership/try-runtime", - "pallet-proxy/try-runtime", - "pallet-scheduler/try-runtime", - "pallet-timestamp/try-runtime", - "pallet-transaction-payment/try-runtime", - "pallet-treasury/try-runtime", - "pallet-utility/try-runtime", - "pallet-xcm/try-runtime", - "parachain-info/try-runtime", - "encointer-balances-tx-payment/try-runtime", - "encointer-primitives/try-runtime", - "frame-support/try-runtime", - "polkadot-runtime-common/try-runtime", - "sp-runtime/try-runtime" + "cumulus-pallet-aura-ext/try-runtime", + "cumulus-pallet-dmp-queue/try-runtime", + "cumulus-pallet-parachain-system/try-runtime", + "cumulus-pallet-xcm/try-runtime", + "cumulus-pallet-xcmp-queue/try-runtime", + "frame-executive/try-runtime", + "frame-system/try-runtime", + "frame-try-runtime/try-runtime", + "pallet-asset-tx-payment/try-runtime", + "pallet-aura/try-runtime", + "pallet-balances/try-runtime", + "pallet-collective/try-runtime", + "pallet-encointer-balances/try-runtime", + "pallet-encointer-bazaar/try-runtime", + "pallet-encointer-ceremonies/try-runtime", + "pallet-encointer-communities/try-runtime", + "pallet-encointer-faucet/try-runtime", + "pallet-encointer-reputation-commitments/try-runtime", + "pallet-encointer-scheduler/try-runtime", + "pallet-insecure-randomness-collective-flip/try-runtime", + "pallet-membership/try-runtime", + "pallet-proxy/try-runtime", + "pallet-scheduler/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-transaction-payment/try-runtime", + "pallet-treasury/try-runtime", + "pallet-utility/try-runtime", + "pallet-xcm/try-runtime", + "parachain-info/try-runtime", ] experimental = [ "pallet-aura/experimental" ] diff --git a/system-parachains/gluttons/glutton-kusama/Cargo.toml b/system-parachains/gluttons/glutton-kusama/Cargo.toml index 0ef12393a0..731cdfc4b7 100644 --- a/system-parachains/gluttons/glutton-kusama/Cargo.toml +++ b/system-parachains/gluttons/glutton-kusama/Cargo.toml @@ -67,7 +67,6 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", - "cumulus-primitives-core/runtime-benchmarks" ] std = [ "codec/std", From 0a143157e87b4a087c6e63924e45a0c329d8cc46 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 22 Feb 2024 15:32:43 +0200 Subject: [PATCH 179/316] fmt --- relay/polkadot/src/lib.rs | 60 +++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 21cbb314e5..a86ad72623 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -282,10 +282,10 @@ impl pallet_babe::Config for Runtime { type MaxNominators = MaxNominators; type KeyOwnerProof = - >::Proof; + >::Proof; type EquivocationReportSystem = - pallet_babe::EquivocationReportSystem; + pallet_babe::EquivocationReportSystem; } parameter_types! { @@ -335,7 +335,7 @@ impl pallet_beefy::Config for Runtime { type WeightInfo = (); type KeyOwnerProof = >::Proof; type EquivocationReportSystem = - pallet_beefy::EquivocationReportSystem; + pallet_beefy::EquivocationReportSystem; } impl pallet_mmr::Config for Runtime { @@ -386,7 +386,7 @@ impl BeefyDataProvider for ParaHeadsRootProvider { binary_merkle_tree::merkle_root::( para_heads.into_iter().map(|pair| pair.encode()), ) - .into() + .into() } } @@ -585,11 +585,11 @@ impl pallet_election_provider_multi_phase::Config for Runtime { type SignedMaxRefunds = SignedMaxRefunds; type SignedRewardBase = SignedRewardBase; type SignedDepositBase = - GeometricDepositBase; + GeometricDepositBase; type SignedDepositByte = SignedDepositByte; type SignedDepositWeight = (); type SignedMaxWeight = - ::MaxWeight; + ::MaxWeight; type MinerConfig = Self; type SlashHandler = (); // burn slashes type RewardHandler = (); // nothing to do upon rewards @@ -964,14 +964,14 @@ impl pallet_grandpa::Config for Runtime { type KeyOwnerProof = >::Proof; type EquivocationReportSystem = - pallet_grandpa::EquivocationReportSystem; + pallet_grandpa::EquivocationReportSystem; } /// Submits a transaction with the node's public and signature type. Adheres to the signed extension /// format of the chain. impl frame_system::offchain::CreateSignedTransaction for Runtime - where - RuntimeCall: From, +where + RuntimeCall: From, { fn create_transaction>( call: RuntimeCall, @@ -1022,8 +1022,8 @@ impl frame_system::offchain::SigningTypes for Runtime { } impl frame_system::offchain::SendTransactionTypes for Runtime - where - RuntimeCall: From, +where + RuntimeCall: From, { type Extrinsic = UncheckedExtrinsic; type OverarchingCall = RuntimeCall; @@ -1103,17 +1103,17 @@ parameter_types! { /// The type used to represent the kinds of proxying allowed. #[derive( -Copy, -Clone, -Eq, -PartialEq, -Ord, -PartialOrd, -Encode, -Decode, -RuntimeDebug, -MaxEncodedLen, -scale_info::TypeInfo, + Copy, + Clone, + Eq, + PartialEq, + Ord, + PartialOrd, + Encode, + Decode, + RuntimeDebug, + MaxEncodedLen, + scale_info::TypeInfo, )] pub enum ProxyType { Any = 0, @@ -1150,7 +1150,7 @@ mod proxy_type_tests { (OldProxyType::Staking, ProxyType::Staking), (OldProxyType::IdentityJudgement, ProxyType::IdentityJudgement), ] - .into_iter() + .into_iter() { assert_eq!(i.encode(), j.encode()); } @@ -1353,7 +1353,7 @@ impl pallet_message_queue::Config for Runtime { type MessageProcessor = MessageProcessor; #[cfg(feature = "runtime-benchmarks")] type MessageProcessor = - pallet_message_queue::mock_helpers::NoopMessageProcessor; + pallet_message_queue::mock_helpers::NoopMessageProcessor; type QueueChangeHandler = ParaInclusion; type QueuePausedQuery = (); type WeightInfo = weights::pallet_message_queue::WeightInfo; @@ -1399,7 +1399,7 @@ impl parachains_disputes::Config for Runtime { impl parachains_slashing::Config for Runtime { type KeyOwnerProofSystem = Historical; type KeyOwnerProof = - >::Proof; + >::Proof; type KeyOwnerIdentification = ; + generic::UncheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -2534,7 +2534,7 @@ mod test_fees { ::WeightInfo::payout_stakers_alive_staked( MaxNominators::get(), ) - .ref_time() as f64; + .ref_time() as f64; let block_weight = BlockWeights::get().max_block.ref_time() as f64; println!( @@ -2737,8 +2737,8 @@ mod multiplier_tests { use sp_runtime::traits::Convert; fn run_with_system_weight(w: Weight, mut assertions: F) - where - F: FnMut() -> (), + where + F: FnMut() -> (), { let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() .build_storage() @@ -2771,7 +2771,7 @@ mod multiplier_tests { 300, ::BatchSize::get(), ) - .ref_time() as f32; + .ref_time() as f32; println!("ratio of block weight for full batch fast-unstake {}", on_idle / block_time); assert!(on_idle / block_time <= 0.5f32) } From 7691eaf54e2efe8359490165c88a0a78088f3118 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 22 Feb 2024 15:50:29 +0200 Subject: [PATCH 180/316] fix --- Cargo.lock | 1 - .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 4 +- .../bridge-hub-polkadot/Cargo.toml | 10 +- .../bridge-hub-polkadot/tests/snowbridge.rs | 394 ++++++++++++++++++ 4 files changed, 404 insertions(+), 5 deletions(-) create mode 100644 system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs diff --git a/Cargo.lock b/Cargo.lock index 1849a2a38a..52a2a60cfc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8465,7 +8465,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3508a51d359c6640577feead9dc00667f38cec385baad77b636c61ff746ffe24" dependencies = [ "docify", - "frame-benchmarking 25.0.0", "frame-support 25.0.0", "frame-system 25.0.0", "log", diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index b995ad4ea5..f3821d3aa5 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -185,6 +185,7 @@ std = [ "snowbridge-beacon-primitives/std", "snowbridge-core/std", "snowbridge-pallet-ethereum-client/std", + "snowbridge-pallet-ethereum-client-fixtures/std", "snowbridge-pallet-inbound-queue/std", "snowbridge-outbound-queue-runtime-api/std", "snowbridge-pallet-outbound-queue/std", @@ -211,7 +212,6 @@ std = [ "xcm-builder/std", "xcm-executor/std", "xcm/std", - "snowbridge-pallet-ethereum-client-fixtures/std" ] runtime-benchmarks = [ @@ -244,6 +244,7 @@ runtime-benchmarks = [ "polkadot-runtime-common/runtime-benchmarks", "snowbridge-core/runtime-benchmarks", "snowbridge-pallet-ethereum-client/runtime-benchmarks", + "snowbridge-pallet-ethereum-client-fixtures/runtime-benchmarks" "snowbridge-pallet-inbound-queue/runtime-benchmarks", "snowbridge-pallet-outbound-queue/runtime-benchmarks", "snowbridge-router-primitives/runtime-benchmarks", @@ -254,7 +255,6 @@ runtime-benchmarks = [ "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", "cumulus-primitives-core/runtime-benchmarks", - "snowbridge-pallet-ethereum-client-fixtures/runtime-benchmarks" ] try-runtime = [ diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index d6ff7695c7..1a74d97808 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -106,17 +106,20 @@ snowbridge-pallet-system = { default-features = false , version = "0.1.0" } snowbridge-system-runtime-api = { default-features = false , version = "0.1.0" } snowbridge-core = { default-features = false , version = "0.1.0" } snowbridge-pallet-ethereum-client = { default-features = false , version = "0.1.0" } +snowbridge-pallet-ethereum-client-fixtures = { default-features = false , version = "0.9.0" } snowbridge-pallet-inbound-queue = { default-features = false , version = "0.1.0" } snowbridge-pallet-outbound-queue = { default-features = false , version = "0.1.0" } snowbridge-outbound-queue-runtime-api = { default-features = false , version = "0.1.0" } snowbridge-router-primitives = { default-features = false , version = "0.1.0" } -snowbridge-runtime-common = { default-features = false , version = "0.1.0" } +snowbridge-runtime-common = { default-features = false, version = "0.1.0" } [dev-dependencies] bridge-hub-test-utils = { version = "0.8.0" } bridge-runtime-common = { version = "0.8.0", features = ["integrity-test"] } sp-keyring = { version = "32.0.0" } static_assertions = { version = "1.1.0" } +snowbridge-runtime-test-common = { version = "0.1.0" } +parachains-runtimes-test-utils = { version = "8.0.0" } [features] default = [ "std" ] @@ -182,6 +185,7 @@ std = [ "snowbridge-beacon-primitives/std", "snowbridge-core/std", "snowbridge-pallet-ethereum-client/std", + "snowbridge-pallet-ethereum-client-fixtures/std", "snowbridge-pallet-inbound-queue/std", "snowbridge-outbound-queue-runtime-api/std", "snowbridge-pallet-outbound-queue/std", @@ -235,20 +239,22 @@ runtime-benchmarks = [ "pallet-xcm-benchmarks/runtime-benchmarks", "pallet-xcm-bridge-hub/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", + "parachains-common/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", "snowbridge-core/runtime-benchmarks", "snowbridge-pallet-ethereum-client/runtime-benchmarks", + "snowbridge-pallet-ethereum-client-fixtures/runtime-benchmarks" "snowbridge-pallet-inbound-queue/runtime-benchmarks", "snowbridge-pallet-outbound-queue/runtime-benchmarks", "snowbridge-router-primitives/runtime-benchmarks", "snowbridge-runtime-common/runtime-benchmarks", + "snowbridge-runtime-test-common/runtime-benchmarks", "snowbridge-pallet-system/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", "cumulus-primitives-core/runtime-benchmarks", - "parachains-common/runtime-benchmarks" ] try-runtime = [ diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs new file mode 100644 index 0000000000..4a01635081 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs @@ -0,0 +1,394 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +#![cfg(test)] + +use bp_polkadot_core::Signature; +use bridge_hub_polkadot_runtime::{ + bridge_to_kusama_config::RefundBridgeHubKusamaMessages, xcm_config::XcmConfig, + BridgeRejectObsoleteHeadersAndMessages, Executive, MessageQueueServiceWeight, Runtime, + RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, UncheckedExtrinsic, +}; +use bridge_hub_test_utils::ValidatorIdOf; +use codec::{Decode, Encode}; +use cumulus_primitives_core::XcmError::{FailedToTransactAsset, NotHoldingFees}; +use frame_support::{ + assert_err, assert_ok, parameter_types, + traits::{OnFinalize, OnInitialize}, +}; +use frame_system::pallet_prelude::BlockNumberFor; +use parachains_common::{AccountId, AuraId, Balance}; +pub use parachains_runtimes_test_utils::test_cases::change_storage_constant_by_governance_works; +use parachains_runtimes_test_utils::{ + AccountIdOf, CollatorSessionKeys, ExtBuilder, XcmReceivedFrom, +}; +use snowbridge_core::{ChannelId, ParaId}; +use snowbridge_pallet_ethereum_client::WeightInfo; +use snowbridge_runtime_test_common::initial_fund; +use sp_core::H160; +use sp_keyring::AccountKeyring::Alice; +use sp_runtime::{ + generic::{Era, SignedPayload}, + traits::Header, + AccountId32, Saturating, +}; +use xcm::{latest::prelude::*, v3::Error}; +use xcm_executor::XcmExecutor; + +type RuntimeHelper = + parachains_runtimes_test_utils::RuntimeHelper; + +parameter_types! { + pub const DefaultBridgeHubEthereumBaseFee: Balance = 2_750_872_500_000; +} + +fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys { + bridge_hub_test_utils::CollatorSessionKeys::new( + AccountId::from(Alice), + AccountId::from(Alice), + SessionKeys { aura: AuraId::from(Alice.public()) }, + ) +} + +#[test] +pub fn transfer_token_to_ethereum_works() { + send_transfer_token_message_success::( + collator_session_keys(), + 1013, + 1000, + H160::random(), + H160::random(), + DefaultBridgeHubEthereumBaseFee::get(), + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::EthereumOutboundQueue(event)) => Some(event), + _ => None, + } + }), + ) +} + +#[test] +pub fn unpaid_transfer_token_to_ethereum_fails_with_barrier() { + snowbridge_runtime_test_common::send_unpaid_transfer_token_message::( + collator_session_keys(), + 1013, + 1000, + H160::random(), + H160::random(), + ) +} + +#[test] +pub fn transfer_token_to_ethereum_fee_not_enough() { + send_transfer_token_message_failure::( + collator_session_keys(), + 1013, + 1000, + DefaultBridgeHubEthereumBaseFee::get() + 1_000_000_000, + H160::random(), + H160::random(), + // fee not enough + 1_000_000_000, + NotHoldingFees, + ) +} + +#[test] +pub fn transfer_token_to_ethereum_insufficient_fund() { + send_transfer_token_message_failure::( + collator_session_keys(), + 1013, + 1000, + 1_000_000_000, + H160::random(), + H160::random(), + DefaultBridgeHubEthereumBaseFee::get(), + FailedToTransactAsset("Funds are unavailable"), + ) +} + +#[allow(clippy::too_many_arguments)] +pub fn send_transfer_token_message_failure( + collator_session_key: CollatorSessionKeys, + runtime_para_id: u32, + assethub_parachain_id: u32, + initial_amount: u128, + weth_contract_address: H160, + destination_address: H160, + fee_amount: u128, + expected_error: Error, +) where + Runtime: frame_system::Config + + pallet_balances::Config + + pallet_session::Config + + pallet_xcm::Config + + parachain_info::Config + + pallet_collator_selection::Config + + cumulus_pallet_parachain_system::Config + + snowbridge_pallet_outbound_queue::Config + + snowbridge_pallet_system::Config, + XcmConfig: xcm_executor::Config, + ValidatorIdOf: From>, +{ + ExtBuilder::::default() + .with_collators(collator_session_key.collators()) + .with_session_keys(collator_session_key.session_keys()) + .with_para_id(runtime_para_id.into()) + .with_tracing() + .build() + .execute_with(|| { + >::initialize( + runtime_para_id.into(), + assethub_parachain_id.into(), + ) + .unwrap(); + + // fund asset hub sovereign account enough so it can pay fees + initial_fund::(assethub_parachain_id, initial_amount); + + let outcome = send_transfer_token_message::( + assethub_parachain_id, + weth_contract_address, + destination_address, + fee_amount, + ); + assert_err!(outcome.ensure_complete(), expected_error); + }); +} + +#[test] +fn max_message_queue_service_weight_is_more_than_beacon_extrinsic_weights() { + let max_message_queue_weight = MessageQueueServiceWeight::get(); + let force_checkpoint = + ::WeightInfo::force_checkpoint(); + let submit_checkpoint = + ::WeightInfo::submit(); + max_message_queue_weight.all_gt(force_checkpoint); + max_message_queue_weight.all_gt(submit_checkpoint); +} + +#[test] +fn ethereum_client_consensus_extrinsics_work() { + snowbridge_runtime_test_common::ethereum_extrinsic( + collator_session_keys(), + 1013, + construct_and_apply_extrinsic, + ); +} + +#[test] +fn ethereum_to_polkadot_message_extrinsics_work() { + snowbridge_runtime_test_common::ethereum_to_polkadot_message_extrinsics_work( + collator_session_keys(), + 1013, + construct_and_apply_extrinsic, + ); +} + +fn construct_extrinsic( + sender: sp_keyring::AccountKeyring, + call: RuntimeCall, +) -> UncheckedExtrinsic { + let account_id = AccountId32::from(sender.public()); + let extra: SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckEra::::from(Era::immortal()), + frame_system::CheckNonce::::from( + frame_system::Pallet::::account(&account_id).nonce, + ), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), + BridgeRejectObsoleteHeadersAndMessages::default(), + (RefundBridgeHubKusamaMessages::default()), + ); + let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); + let signature = payload.using_encoded(|e| sender.sign(e)); + UncheckedExtrinsic::new_signed( + call, + account_id.into(), + Signature::Sr25519(signature.clone()), + extra, + ) +} + +fn construct_and_apply_extrinsic( + origin: sp_keyring::AccountKeyring, + call: RuntimeCall, +) -> sp_runtime::DispatchOutcome { + let xt = construct_extrinsic(origin, call); + let r = Executive::apply_extrinsic(xt); + r.unwrap() +} + +// TODO remove when Ethereum network ID has been extracted as a param +pub fn send_transfer_token_message( + assethub_parachain_id: u32, + weth_contract_address: H160, + destination_address: H160, + fee_amount: u128, +) -> Outcome +where + Runtime: frame_system::Config + + pallet_balances::Config + + pallet_session::Config + + pallet_xcm::Config + + parachain_info::Config + + pallet_collator_selection::Config + + cumulus_pallet_parachain_system::Config + + snowbridge_pallet_outbound_queue::Config, + XcmConfig: xcm_executor::Config, +{ + let assethub_parachain_location = Location::new(1, Parachain(assethub_parachain_id)); + let asset = Asset { + id: AssetId(Location::new( + 0, + [AccountKey20 { network: None, key: weth_contract_address.into() }], + )), + fun: Fungible(1000000000), + }; + let assets = vec![asset.clone()]; + + let inner_xcm = Xcm(vec![ + WithdrawAsset(Assets::from(assets.clone())), + ClearOrigin, + BuyExecution { fees: asset, weight_limit: Unlimited }, + DepositAsset { + assets: Wild(All), + beneficiary: Location::new( + 0, + [AccountKey20 { network: None, key: destination_address.into() }], + ), + }, + SetTopic([0; 32]), + ]); + + let fee = + Asset { id: AssetId(Location { parents: 1, interior: Here }), fun: Fungible(fee_amount) }; + + // prepare transfer token message + let xcm = Xcm(vec![ + WithdrawAsset(Assets::from(vec![fee.clone()])), + BuyExecution { fees: fee, weight_limit: Unlimited }, + ExportMessage { network: Ethereum { chain_id: 1 }, destination: Here, xcm: inner_xcm }, + ]); + + // execute XCM + let mut hash = xcm.using_encoded(sp_io::hashing::blake2_256); + XcmExecutor::::prepare_and_execute( + assethub_parachain_location, + xcm, + &mut hash, + RuntimeHelper::::xcm_max_weight(XcmReceivedFrom::Sibling), + Weight::zero(), + ) +} + +pub fn send_transfer_token_message_success( + collator_session_key: CollatorSessionKeys, + runtime_para_id: u32, + assethub_parachain_id: u32, + weth_contract_address: H160, + destination_address: H160, + fee_amount: u128, + snowbridge_pallet_outbound_queue: Box< + dyn Fn(Vec) -> Option>, + >, +) where + Runtime: frame_system::Config + + pallet_balances::Config + + pallet_session::Config + + pallet_xcm::Config + + parachain_info::Config + + pallet_collator_selection::Config + + pallet_message_queue::Config + + cumulus_pallet_parachain_system::Config + + snowbridge_pallet_outbound_queue::Config + + snowbridge_pallet_system::Config, + XcmConfig: xcm_executor::Config, + ValidatorIdOf: From>, + ::AccountId: From + AsRef<[u8]>, +{ + ExtBuilder::::default() + .with_collators(collator_session_key.collators()) + .with_session_keys(collator_session_key.session_keys()) + .with_para_id(runtime_para_id.into()) + .with_tracing() + .build() + .execute_with(|| { + >::initialize( + runtime_para_id.into(), + assethub_parachain_id.into(), + ) + .unwrap(); + + // fund asset hub sovereign account enough so it can pay fees + initial_fund::(assethub_parachain_id, 5_000_000_000_000); + + let outcome = send_transfer_token_message::( + assethub_parachain_id, + weth_contract_address, + destination_address, + fee_amount, + ); + + assert_ok!(outcome.ensure_complete()); + + // check events + let mut events = >::events() + .into_iter() + .filter_map(|e| snowbridge_pallet_outbound_queue(e.event.encode())); + assert!(events.any(|e| matches!( + e, + snowbridge_pallet_outbound_queue::Event::MessageQueued { .. } + ))); + + let block_number = >::block_number(); + let next_block_number = >::block_number() + .saturating_add(BlockNumberFor::::from(1u32)); + + // finish current block + >::on_finalize(block_number); + >::on_finalize(block_number); + >::on_finalize(block_number); + + // start next block + >::set_block_number(next_block_number); + >::on_initialize(next_block_number); + >::on_initialize(next_block_number); + >::on_initialize(next_block_number); + + // finish next block + >::on_finalize(next_block_number); + >::on_finalize(next_block_number); + let included_head = >::finalize(); + + let origin: ParaId = assethub_parachain_id.into(); + let channel_id: ChannelId = origin.into(); + + let nonce = snowbridge_pallet_outbound_queue::Nonce::::try_get(channel_id); + assert_ok!(nonce); + assert_eq!(nonce.unwrap(), 1); + + let digest = included_head.digest(); + + let digest_items = digest.logs(); + assert!(digest_items.len() == 1 && digest_items[0].as_other().is_some()); + }); +} From 6159cb90f7eb899778101eadc104bc2c6bce179a Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 22 Feb 2024 15:52:54 +0200 Subject: [PATCH 181/316] missing comma --- system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml | 2 +- system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index f3821d3aa5..05466ac365 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -244,7 +244,7 @@ runtime-benchmarks = [ "polkadot-runtime-common/runtime-benchmarks", "snowbridge-core/runtime-benchmarks", "snowbridge-pallet-ethereum-client/runtime-benchmarks", - "snowbridge-pallet-ethereum-client-fixtures/runtime-benchmarks" + "snowbridge-pallet-ethereum-client-fixtures/runtime-benchmarks", "snowbridge-pallet-inbound-queue/runtime-benchmarks", "snowbridge-pallet-outbound-queue/runtime-benchmarks", "snowbridge-router-primitives/runtime-benchmarks", diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 1a74d97808..ca6511d2f5 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -244,7 +244,7 @@ runtime-benchmarks = [ "polkadot-runtime-common/runtime-benchmarks", "snowbridge-core/runtime-benchmarks", "snowbridge-pallet-ethereum-client/runtime-benchmarks", - "snowbridge-pallet-ethereum-client-fixtures/runtime-benchmarks" + "snowbridge-pallet-ethereum-client-fixtures/runtime-benchmarks", "snowbridge-pallet-inbound-queue/runtime-benchmarks", "snowbridge-pallet-outbound-queue/runtime-benchmarks", "snowbridge-router-primitives/runtime-benchmarks", From 9fbe6e1485ad7f17e8fc44e76292d9fdfe61b20d Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 22 Feb 2024 15:55:04 +0200 Subject: [PATCH 182/316] update lock --- Cargo.lock | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 52a2a60cfc..071a559469 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1645,6 +1645,7 @@ dependencies = [ "pallet-xcm-benchmarks 8.0.1", "pallet-xcm-bridge-hub", "parachains-common 8.0.0", + "parachains-runtimes-test-utils", "parity-scale-codec", "polkadot-core-primitives 8.0.0", "polkadot-parachain-primitives 7.0.0", @@ -1656,11 +1657,13 @@ dependencies = [ "snowbridge-core", "snowbridge-outbound-queue-runtime-api", "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-ethereum-client-fixtures", "snowbridge-pallet-inbound-queue", "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", "snowbridge-router-primitives", "snowbridge-runtime-common", + "snowbridge-runtime-test-common", "snowbridge-system-runtime-api", "sp-api 27.0.0", "sp-block-builder 27.0.0", From 6a330a15e1d46fd127610351c381106c5ed04573 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 22 Feb 2024 16:19:09 +0200 Subject: [PATCH 183/316] fix benchmark tests --- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 7b9719f223..560f827709 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -354,11 +354,11 @@ parameter_types! { impl pallet_message_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_message_queue::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] + #[cfg(all(not(feature = "std"), feature = "runtime-benchmarks"))] type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; - #[cfg(not(feature = "runtime-benchmarks"))] - type MessageProcessor = BridgeHubMessageRouter< + #[cfg(not(all(not(feature = "std"), feature = "runtime-benchmarks")))] + type MessageProcessor = bridge_hub_common::BridgeHubMessageRouter< xcm_builder::ProcessXcmMessage< AggregateMessageOrigin, xcm_executor::XcmExecutor, From 3a36d95e164d1d8c1cec6cbd3f34cb817f13b8bb Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 22 Feb 2024 19:11:17 +0200 Subject: [PATCH 184/316] various fixes --- .../emulated/common/src/xcm_helpers.rs | 1 - .../asset-hub-kusama/src/xcm_config.rs | 21 --------------- .../asset-hub-kusama/tests/tests.rs | 26 ------------------- .../asset-hub-polkadot/tests/tests.rs | 26 ------------------- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 2 -- .../bridge-hub-polkadot/src/lib.rs | 8 +++--- 6 files changed, 3 insertions(+), 81 deletions(-) diff --git a/integration-tests/emulated/common/src/xcm_helpers.rs b/integration-tests/emulated/common/src/xcm_helpers.rs index c830e9cd80..351af70bc9 100644 --- a/integration-tests/emulated/common/src/xcm_helpers.rs +++ b/integration-tests/emulated/common/src/xcm_helpers.rs @@ -62,7 +62,6 @@ pub fn non_fee_asset(assets: &Assets, fee_idx: usize) -> Option<(Location, u128) let asset = assets.inner().into_iter().enumerate().find(|a| a.0 != fee_idx)?.1.clone(); let asset_id = match asset.id { AssetId(id) => id, - _ => return None, }; let asset_amount = match asset.fun { Fungible(amount) => amount, diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index c4ca4bf47d..07380a22ee 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -772,27 +772,6 @@ pub mod bridging { >; } - /// Benchmarks helper for bridging configuration. - #[cfg(feature = "runtime-benchmarks")] - pub struct BridgingBenchmarksHelper; - - #[cfg(feature = "runtime-benchmarks")] - impl BridgingBenchmarksHelper { - pub fn prepare_universal_alias() -> Option<(Location, Junction)> { - let alias = to_polkadot::UniversalAliases::get().into_iter().find_map( - |(location, junction)| { - match to_polkadot::SiblingBridgeHubWithBridgeHubPolkadotInstance::get() - .eq(&location) - { - true => Some((location, junction)), - false => None, - } - }, - ); - Some(alias.expect("we expect here BridgeHubKusama to Polkadot mapping at least")) - } - } - pub mod to_ethereum { use super::*; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index e23e7b82d9..b9990a58f0 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -898,32 +898,6 @@ fn change_xcm_bridge_hub_router_byte_fee_by_governance_works() { ) } -#[test] -fn change_xcm_bridge_hub_router_base_fee_by_governance_works() { - asset_test_utils::test_cases::change_storage_constant_by_governance_works::< - Runtime, - bridging::XcmBridgeHubRouterBaseFee, - Balance, - >( - collator_session_keys(), - 1000, - Box::new(|call| RuntimeCall::System(call).encode()), - || { - ( - bridging::XcmBridgeHubRouterBaseFee::key().to_vec(), - bridging::XcmBridgeHubRouterBaseFee::get(), - ) - }, - |old_value| { - if let Some(new_value) = old_value.checked_add(1) { - new_value - } else { - old_value.checked_sub(1).unwrap() - } - }, - ) -} - #[test] fn change_xcm_bridge_hub_ethereum_base_fee_by_governance_works() { asset_test_utils::test_cases::change_storage_constant_by_governance_works::< diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index 28872bbb81..e8870beb59 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -913,32 +913,6 @@ fn change_xcm_bridge_hub_router_byte_fee_by_governance_works() { ) } -#[test] -fn change_xcm_bridge_hub_router_base_fee_by_governance_works() { - asset_test_utils::test_cases::change_storage_constant_by_governance_works::< - Runtime, - bridging::XcmBridgeHubRouterBaseFee, - Balance, - >( - collator_session_keys(), - 1000, - Box::new(|call| RuntimeCall::System(call).encode()), - || { - ( - bridging::XcmBridgeHubRouterBaseFee::key().to_vec(), - bridging::XcmBridgeHubRouterBaseFee::get(), - ) - }, - |old_value| { - if let Some(new_value) = old_value.checked_add(1) { - new_value - } else { - old_value.checked_sub(1).unwrap() - } - }, - ) -} - #[test] fn change_xcm_bridge_hub_ethereum_base_fee_by_governance_works() { asset_test_utils::test_cases::change_storage_constant_by_governance_works::< diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 560f827709..9e3301353d 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -101,8 +101,6 @@ use xcm::prelude::*; #[cfg(feature = "runtime-benchmarks")] use benchmark_helpers::DoNothingRouter; -#[cfg(not(feature = "runtime-benchmarks"))] -use bridge_hub_common::BridgeHubMessageRouter; /// The address format for describing accounts. pub type Address = MultiAddress; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index f52df25b9b..2557ef15da 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -101,8 +101,6 @@ use xcm::prelude::*; #[cfg(feature = "runtime-benchmarks")] use benchmark_helpers::DoNothingRouter; -#[cfg(not(feature = "runtime-benchmarks"))] -use bridge_hub_common::BridgeHubMessageRouter; /// The address format for describing accounts. pub type Address = MultiAddress; @@ -354,11 +352,11 @@ parameter_types! { impl pallet_message_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_message_queue::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] + #[cfg(all(not(feature = "std"), feature = "runtime-benchmarks"))] type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; - #[cfg(not(feature = "runtime-benchmarks"))] - type MessageProcessor = BridgeHubMessageRouter< + #[cfg(not(all(not(feature = "std"), feature = "runtime-benchmarks")))] + type MessageProcessor = bridge_hub_common::BridgeHubMessageRouter< xcm_builder::ProcessXcmMessage< AggregateMessageOrigin, xcm_executor::XcmExecutor, From 78f42cc4ae228c08c468ed777ebdac2c1d077c52 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 22 Feb 2024 19:40:02 +0200 Subject: [PATCH 185/316] unused import --- system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 2557ef15da..43ac4e40b4 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -69,9 +69,10 @@ use frame_system::{ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; +#[cfg(not(feature = "runtime-benchmarks"))] +use xcm_config::XcmRouter; use xcm_config::{ FellowshipLocation, GovernanceLocation, TreasuryAccount, XcmOriginToTransactDispatchOrigin, - XcmRouter, }; #[cfg(any(feature = "std", test))] From 6bc0346b4a6ac733aa02ea67d6174d604b0407e2 Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Fri, 23 Feb 2024 08:55:44 +0100 Subject: [PATCH 186/316] add migration for XcmpQueue pallet --- system-parachains/encointer/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 01b92ec558..5753c23f16 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -730,6 +730,7 @@ pub type Migrations = ( pallet_balances::migration::ResetInactive, //then apply the proper migration as we should have done earlier pallet_balances::migration::MigrateToTrackInactive, + cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, ); /// Executive: handles dispatch to the various modules. From b743b799c4da0f847bcbaafb69600a5300e202ac Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Fri, 23 Feb 2024 08:59:11 +0100 Subject: [PATCH 187/316] touch Cargo.lock --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index baa1472778..ad3785b964 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7347,9 +7347,9 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "7.0.3" +version = "7.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "890bbad7a5752c8d4c3681457bac4e87fafc79cd9dd5b1a94e6f237f93a795a3" +checksum = "da15171c2dc870ad636fcdb16d9aa37eb84cfe6001c3f1c77cf2c97446ebfbe5" dependencies = [ "frame-benchmarking", "frame-support", From ff86df60ad81aa9baaa20cb0adb2a4ba072827a5 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 23 Feb 2024 09:17:07 +0100 Subject: [PATCH 188/316] [pallet_asset_conversion] Fix correct value for MaxSwapPathLength (which fixes also failed benchmark) --- system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 2050234005..c4b1dafa94 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -360,7 +360,7 @@ impl pallet_asset_conversion::Config for Runtime { type LiquidityWithdrawalFee = LiquidityWithdrawalFee; type LPFee = ConstU32<3>; type PalletId = AssetConversionPalletId; - type MaxSwapPathLength = ConstU32<4>; + type MaxSwapPathLength = ConstU32<3>; type MintMinLiquidity = ConstU128<100>; type WeightInfo = weights::pallet_asset_conversion::WeightInfo; #[cfg(feature = "runtime-benchmarks")] From 321578f4c38bd7330ccdf98423ca83ea2702c702 Mon Sep 17 00:00:00 2001 From: eskimor Date: Fri, 23 Feb 2024 16:20:02 +0100 Subject: [PATCH 189/316] Tuples-96 feature. --- relay/kusama/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index 5206f8e8cf..87eee79a1b 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -70,7 +70,7 @@ pallet-referenda = { default-features = false , version = "28.0.0" } pallet-scheduler = { default-features = false , version = "29.0.0" } pallet-session = { default-features = false , version = "28.0.0" } pallet-society = { default-features = false, version = "28.0.0" } -frame-support = { default-features = false , version = "28.0.0" } +frame-support = { default-features = false, features = [ "tuples-96" ] , version = "28.0.0" } pallet-staking = { default-features = false , version = "28.0.0" } pallet-state-trie-migration = { default-features = false , version = "29.0.0" } pallet-staking-runtime-api = { default-features = false , version = "14.0.0" } From 8b59085678fe21d923186e367cafb0a8b3e680fa Mon Sep 17 00:00:00 2001 From: eskimor Date: Fri, 23 Feb 2024 16:20:14 +0100 Subject: [PATCH 190/316] Add Broker para ID. --- relay/kusama/constants/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/relay/kusama/constants/src/lib.rs b/relay/kusama/constants/src/lib.rs index cda697ace0..68cad9c3b6 100644 --- a/relay/kusama/constants/src/lib.rs +++ b/relay/kusama/constants/src/lib.rs @@ -108,6 +108,8 @@ pub mod system_parachain { pub const ENCOINTER_ID: u32 = 1001; /// Bridge Hub parachain ID. pub const BRIDGE_HUB_ID: u32 = 1002; + /// Brokerage parachain ID. + pub const BROKER_ID: u32 = 1005; // System parachains from Kusama point of view. pub type SystemParachains = IsChildSystemParachain; From 8ce508dcf5b0154b1c8826ddd67f7ae77ae9caa2 Mon Sep 17 00:00:00 2001 From: eskimor Date: Fri, 23 Feb 2024 16:24:11 +0100 Subject: [PATCH 191/316] Enable coretime on Kusama. --- relay/kusama/src/lib.rs | 85 ++++++++++++++--- relay/kusama/src/weights/mod.rs | 2 + .../runtime_parachains_assigner_on_demand.rs | 91 +++++++++++++++++++ .../weights/runtime_parachains_coretime.rs | 84 +++++++++++++++++ relay/kusama/src/xcm_config.rs | 3 + 5 files changed, 250 insertions(+), 15 deletions(-) create mode 100644 relay/kusama/src/weights/runtime_parachains_assigner_on_demand.rs create mode 100644 relay/kusama/src/weights/runtime_parachains_coretime.rs diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index e84cfea7a2..091ad09370 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -36,15 +36,18 @@ use runtime_common::{ DealWithFees, LocatableAssetConverter, VersionedLocatableAsset, VersionedMultiLocationConverter, }, - paras_registrar, prod_or_fast, slots, BalanceToU256, BlockHashCount, BlockLength, - CurrencyToVote, SlowAdjustingFeeUpdate, U256ToBalance, + paras_registrar, prod_or_fast, slots, + traits::Leaser, + BalanceToU256, BlockHashCount, BlockLength, CurrencyToVote, SlowAdjustingFeeUpdate, + U256ToBalance, }; use scale_info::TypeInfo; use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; use runtime_parachains::{ - assigner_parachains as parachains_assigner_parachains, - configuration as parachains_configuration, disputes as parachains_disputes, + assigner_coretime as parachains_assigner_coretime, + assigner_on_demand as parachains_assigner_on_demand, configuration as parachains_configuration, + coretime, disputes as parachains_disputes, disputes::slashing as parachains_slashing, dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, inclusion::{AggregateMessageOrigin, UmpQueueId}, @@ -115,7 +118,9 @@ use sp_runtime::traits::Get; pub use sp_runtime::BuildStorage; /// Constant values used within the runtime. -use kusama_runtime_constants::{currency::*, fee::*, time::*, TREASURY_PALLET_ID}; +use kusama_runtime_constants::{ + currency::*, fee::*, system_parachain, time::*, TREASURY_PALLET_ID, +}; // Weights used in the runtime. mod weights; @@ -1224,7 +1229,6 @@ impl parachains_paras::Config for Runtime { type QueueFootprinter = ParaInclusion; type NextSessionRotation = Babe; type OnNewHead = Registrar; - // TODO:(PR#159)(PR#1694): check `AssignCoretime` bellow and remove this comment! type AssignCoretime = (); } @@ -1294,17 +1298,40 @@ impl parachains_paras_inherent::Config for Runtime { impl parachains_scheduler::Config for Runtime { // If you change this, make sure the `Assignment` type of the new provider is binary compatible, // otherwise provide a migration. - type AssignmentProvider = ParachainsAssignmentProvider; + type AssignmentProvider = CoretimeAssignmentProvider; +} + +parameter_types! { + pub const BrokerId: u32 = system_parachain::BROKER_ID; +} + +impl coretime::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type BrokerId = BrokerId; + type WeightInfo = weights::runtime_parachains_coretime::WeightInfo; + type SendXcm = crate::xcm_config::XcmRouter; +} + +parameter_types! { + pub const OnDemandTrafficDefaultValue: FixedU128 = FixedU128::from_u32(1); +} + +impl parachains_assigner_on_demand::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type TrafficDefaultValue = OnDemandTrafficDefaultValue; + type WeightInfo = weights::runtime_parachains_assigner_on_demand::WeightInfo; } -impl parachains_assigner_parachains::Config for Runtime {} +impl parachains_assigner_coretime::Config for Runtime {} impl parachains_initializer::Config for Runtime { type Randomness = pallet_babe::RandomnessFromOneEpochAgo; type ForceOrigin = EnsureRoot; type WeightInfo = weights::runtime_parachains_initializer::WeightInfo; - // TODO:(PR#159)(PR#1694): check `CoretimeOnNewSession` bellow and remove this comment! - type CoretimeOnNewSession = (); + type CoretimeOnNewSession = Coretime; } impl parachains_disputes::Config for Runtime { @@ -1613,14 +1640,15 @@ construct_runtime! { ParaSessionInfo: parachains_session_info = 61, ParasDisputes: parachains_disputes = 62, ParasSlashing: parachains_slashing = 63, - // TODO:(PR#159)(PR#1694): check rename `ParachainsAssignmentProvider` and remove `Storage` bellow and remove this comment! - ParachainsAssignmentProvider: parachains_assigner_parachains = 64, + OnDemandAssignmentProvider: parachains_assigner_on_demand = 64, + CoretimeAssignmentProvider: parachains_assigner_coretime = 65, // Parachain Onboarding Pallets. Start indices at 70 to leave room. Registrar: paras_registrar = 70, Slots: slots = 71, Auctions: auctions = 72, Crowdloan: crowdloan = 73, + Coretime: coretime = 74, // State trie migration pallet, only temporary. StateTrieMigration: pallet_state_trie_migration = 98, @@ -1681,11 +1709,32 @@ pub type Migrations = migrations::Unreleased; /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { - use super::{parachains_configuration, parachains_scheduler, Runtime}; + use super::{ + coretime, parachains_configuration, parachains_scheduler, slots, BlockNumber, LeasePeriod, + Leaser, ParaId, Runtime, + }; // We don't have a limit in the Relay Chain. const IDENTITY_MIGRATION_KEY_LIMIT: u64 = u64::MAX; + pub struct GetLegacyLeaseImpl; + impl coretime::migration::GetLegacyLease for GetLegacyLeaseImpl { + fn get_parachain_lease_in_blocks(para: ParaId) -> Option { + let now = frame_system::Pallet::::block_number(); + let lease = slots::Pallet::::lease(para); + if lease.is_empty() { + return None + } + // Lease not yet started, ignore: + if lease.iter().any(Option::is_none) { + return None + } + let (index, _) = + as Leaser>::lease_period_index(now)?; + Some(index.saturating_add(lease.len() as u32).saturating_mul(LeasePeriod::get())) + } + } + /// Unreleased migrations. Add new ones here: pub type Unreleased = ( pallet_nomination_pools::migration::versioned::V7ToV8, @@ -1695,9 +1744,13 @@ pub mod migrations { pallet_grandpa::migrations::MigrateV4ToV5, // Migrate Identity pallet for Usernames pallet_identity::migration::versioned::V0ToV1, - // TODO:(PR#159)(PR#1694): check `parachains_scheduler::MigrateV1ToV2` bellow and remove - // this comment! parachains_scheduler::migration::MigrateV1ToV2, + // Migrate from legacy lease to coretime. Needs to run after configuration v11 + coretime::migration::MigrateToCoretime< + Runtime, + crate::xcm_config::XcmRouter, + GetLegacyLeaseImpl, + >, ); } @@ -1735,6 +1788,8 @@ mod benches { [runtime_parachains::initializer, Initializer] [runtime_parachains::paras_inherent, ParaInherent] [runtime_parachains::paras, Paras] + [runtime_parachains::assigner_on_demand, OnDemandAssignmentProvider] + [runtime_parachains::coretime, Coretime] // Substrate [pallet_balances, Native] [pallet_balances, Nis] diff --git a/relay/kusama/src/weights/mod.rs b/relay/kusama/src/weights/mod.rs index a9a9f4bce7..94f14c40da 100644 --- a/relay/kusama/src/weights/mod.rs +++ b/relay/kusama/src/weights/mod.rs @@ -53,7 +53,9 @@ pub mod runtime_common_claims; pub mod runtime_common_crowdloan; pub mod runtime_common_paras_registrar; pub mod runtime_common_slots; +pub mod runtime_parachains_assigner_on_demand; pub mod runtime_parachains_configuration; +pub mod runtime_parachains_coretime; pub mod runtime_parachains_disputes; pub mod runtime_parachains_disputes_slashing; pub mod runtime_parachains_hrmp; diff --git a/relay/kusama/src/weights/runtime_parachains_assigner_on_demand.rs b/relay/kusama/src/weights/runtime_parachains_assigner_on_demand.rs new file mode 100644 index 0000000000..ac0f05301b --- /dev/null +++ b/relay/kusama/src/weights/runtime_parachains_assigner_on_demand.rs @@ -0,0 +1,91 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Autogenerated weights for `runtime_parachains::assigner_on_demand` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner-fljshgub-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 1024 + +// Executed Command: +// target/production/polkadot +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/builds/parity/mirrors/polkadot/.git/.artifacts/bench.json +// --pallet=runtime_parachains::assigner_on_demand +// --chain=rococo-dev +// --header=./file_header.txt +// --output=./runtime/rococo/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `runtime_parachains::assigner_on_demand`. +pub struct WeightInfo(PhantomData); +impl runtime_parachains::assigner_on_demand::WeightInfo for WeightInfo { + /// Storage: `OnDemandAssignmentProvider::SpotTraffic` (r:1 w:0) + /// Proof: `OnDemandAssignmentProvider::SpotTraffic` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Paras::ParaLifecycles` (r:1 w:0) + /// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OnDemandAssignmentProvider::OnDemandQueue` (r:1 w:1) + /// Proof: `OnDemandAssignmentProvider::OnDemandQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `s` is `[1, 9999]`. + fn place_order_keep_alive(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `297 + s * (4 ±0)` + // Estimated: `3762 + s * (4 ±0)` + // Minimum execution time: 33_522_000 picoseconds. + Weight::from_parts(35_436_835, 0) + .saturating_add(Weight::from_parts(0, 3762)) + // Standard Error: 129 + .saturating_add(Weight::from_parts(14_041, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into())) + } + /// Storage: `OnDemandAssignmentProvider::SpotTraffic` (r:1 w:0) + /// Proof: `OnDemandAssignmentProvider::SpotTraffic` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Paras::ParaLifecycles` (r:1 w:0) + /// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OnDemandAssignmentProvider::OnDemandQueue` (r:1 w:1) + /// Proof: `OnDemandAssignmentProvider::OnDemandQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `s` is `[1, 9999]`. + fn place_order_allow_death(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `297 + s * (4 ±0)` + // Estimated: `3762 + s * (4 ±0)` + // Minimum execution time: 33_488_000 picoseconds. + Weight::from_parts(34_848_934, 0) + .saturating_add(Weight::from_parts(0, 3762)) + // Standard Error: 143 + .saturating_add(Weight::from_parts(14_215, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into())) + } +} diff --git a/relay/kusama/src/weights/runtime_parachains_coretime.rs b/relay/kusama/src/weights/runtime_parachains_coretime.rs new file mode 100644 index 0000000000..aa65a2e903 --- /dev/null +++ b/relay/kusama/src/weights/runtime_parachains_coretime.rs @@ -0,0 +1,84 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Autogenerated weights for `runtime_parachains::coretime` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-02-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner-bn-ce5rx-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("westend-dev")`, DB CACHE: 1024 + +// Executed Command: +// target/production/polkadot +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json +// --pallet=runtime_parachains::coretime +// --chain=westend-dev +// --header=./polkadot/file_header.txt +// --output=./polkadot/runtime/westend/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `runtime_parachains::coretime`. +pub struct WeightInfo(PhantomData); +impl runtime_parachains::coretime::WeightInfo for WeightInfo { + /// Storage: `Configuration::PendingConfigs` (r:1 w:1) + /// Proof: `Configuration::PendingConfigs` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Configuration::BypassConsistencyCheck` (r:1 w:0) + /// Proof: `Configuration::BypassConsistencyCheck` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0) + /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn request_core_count() -> Weight { + // Proof Size summary in bytes: + // Measured: `151` + // Estimated: `1636` + // Minimum execution time: 7_486_000 picoseconds. + Weight::from_parts(7_889_000, 0) + .saturating_add(Weight::from_parts(0, 1636)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CoretimeAssignmentProvider::CoreDescriptors` (r:1 w:1) + /// Proof: `CoretimeAssignmentProvider::CoreDescriptors` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CoretimeAssignmentProvider::CoreSchedules` (r:0 w:1) + /// Proof: `CoretimeAssignmentProvider::CoreSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `s` is `[1, 100]`. + fn assign_core(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `147` + // Estimated: `3612` + // Minimum execution time: 9_409_000 picoseconds. + Weight::from_parts(10_177_115, 0) + .saturating_add(Weight::from_parts(0, 3612)) + // Standard Error: 259 + .saturating_add(Weight::from_parts(13_932, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index 883633c47f..5c609c9cf7 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -133,6 +133,8 @@ parameter_types! { pub const KsmForEncointer: (MultiAssetFilter, MultiLocation) = (Ksm::get(), Encointer::get()); pub const BridgeHubLocation: MultiLocation = Parachain(BRIDGE_HUB_ID).into_location(); pub const KsmForBridgeHub: (MultiAssetFilter, MultiLocation) = (Ksm::get(), BridgeHubLocation::get()); + pub Broker: MultiLocation = Parachain(BROKER_ID).into_location(); + pub KsmForBroker: (MultiAssetFilter, MultiLocation) = (Ksm::get(), Broker::get()); pub const MaxAssetsIntoHolding: u32 = 64; } @@ -141,6 +143,7 @@ pub type TrustedTeleporters = ( xcm_builder::Case, xcm_builder::Case, xcm_builder::Case, + xcm_builder::Case, ); match_types! { From 7f83cd8206a5b13005c5d186aba934455f6458e5 Mon Sep 17 00:00:00 2001 From: eskimor Date: Fri, 23 Feb 2024 16:31:20 +0100 Subject: [PATCH 192/316] Add changelog entry. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 820b1cec1f..b387003f5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Add [Encointer](https://encointer.org) system parachain runtime, completing [RFC22](https://github.com/polkadot-fellows/RFCs/blob/main/text/ 0022-adopt-encointer-runtime.md) ([polkadot-fellows/runtimes#80](https://github.com/polkadot-fellows/runtimes/pull/80)) - Feature for enabling debug prints in the Polkadot and Kusama runtime ([polkadot-fellows/runtimes#85](https://github.com/polkadot-fellows/runtimes/pull/85)) +- Enable Coretime and on-demand on Kusama ([polkadot-fellows/runtimes#159](https://github.com/polkadot-fellows/runtimes/pull/159) ### Changed From 7f848dd37d2c0d6e36921335b6e23b64743e7b88 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Sat, 24 Feb 2024 21:42:13 +0100 Subject: [PATCH 193/316] Revert (Para)AssignmentProvider + remove TODO for Polkadot --- relay/polkadot/src/lib.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 58a961e84b..6ff280ba8e 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1269,7 +1269,6 @@ impl parachains_paras::Config for Runtime { type QueueFootprinter = ParaInclusion; type NextSessionRotation = Babe; type OnNewHead = Registrar; - // TODO:(PR#159)(PR#1694): check `AssignCoretime` bellow and remove this comment! type AssignCoretime = (); } @@ -1337,9 +1336,7 @@ impl parachains_paras_inherent::Config for Runtime { } impl parachains_scheduler::Config for Runtime { - // If you change this, make sure the `Assignment` type of the new provider is binary compatible, - // otherwise provide a migration. - type AssignmentProvider = ParachainsAssignmentProvider; + type AssignmentProvider = ParaAssignmentProvider; } impl parachains_assigner_parachains::Config for Runtime {} @@ -1348,7 +1345,6 @@ impl parachains_initializer::Config for Runtime { type Randomness = pallet_babe::RandomnessFromOneEpochAgo; type ForceOrigin = EnsureRoot; type WeightInfo = weights::runtime_parachains_initializer::WeightInfo; - // TODO:(PR#159)(PR#1694): check `CoretimeOnNewSession` bellow and remove this comment! type CoretimeOnNewSession = (); } @@ -1599,8 +1595,7 @@ construct_runtime! { ParaSessionInfo: parachains_session_info = 61, ParasDisputes: parachains_disputes = 62, ParasSlashing: parachains_slashing = 63, - // TODO:(PR#159)(PR#1694): check rename `ParachainsAssignmentProvider` bellow and remove this comment! - ParachainsAssignmentProvider: parachains_assigner_parachains = 64, + ParaAssignmentProvider: parachains_assigner_parachains = 64, // Parachain Onboarding Pallets. Start indices at 70 to leave room. Registrar: paras_registrar = 70, @@ -1679,8 +1674,6 @@ pub mod migrations { pallet_grandpa::migrations::MigrateV4ToV5, // Migrate Identity pallet for Usernames pallet_identity::migration::versioned::V0ToV1, - // TODO:(PR#159)(PR#1694): check `parachains_scheduler::MigrateV1ToV2` bellow and remove - // this comment! parachains_scheduler::migration::MigrateV1ToV2, ); } From af1de27acd1346fff427131207bdeb42b5ae29e3 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 26 Feb 2024 11:17:40 +0100 Subject: [PATCH 194/316] Accomadate Encointer --- Cargo.lock | 1211 +++++++++++++------------------ chain-spec-generator/Cargo.toml | 5 +- 2 files changed, 500 insertions(+), 716 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5326ca0c5b..d888831f28 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -337,7 +337,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", - "rand 0.8.5", + "rand", ] [[package]] @@ -503,15 +503,15 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core", "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", "sp-runtime", "sp-session", - "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "sp-weights", @@ -605,15 +605,15 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core", "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", "sp-runtime", "sp-session", - "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "sp-weights", @@ -650,10 +650,10 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -679,7 +679,7 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -846,7 +846,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ "bitcoin_hashes", - "rand 0.8.5", + "rand", "rand_core 0.6.4", "serde", "unicode-normalization", @@ -974,7 +974,7 @@ dependencies = [ "frame-support", "parity-scale-codec", "scale-info", - "sp-std 14.0.0", + "sp-std", "staging-xcm", ] @@ -986,7 +986,7 @@ dependencies = [ "frame-support", "parity-scale-codec", "scale-info", - "sp-std 14.0.0", + "sp-std", "staging-xcm", ] @@ -1003,7 +1003,7 @@ dependencies = [ "frame-system", "polkadot-primitives", "sp-api", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -1018,7 +1018,7 @@ dependencies = [ "polkadot-runtime-constants", "sp-api", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -1033,7 +1033,7 @@ dependencies = [ "polkadot-runtime-constants", "sp-api", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -1049,9 +1049,9 @@ dependencies = [ "scale-info", "serde", "sp-consensus-grandpa", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -1065,7 +1065,7 @@ dependencies = [ "bp-runtime", "frame-support", "sp-api", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -1080,8 +1080,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-std 14.0.0", + "sp-core", + "sp-std", ] [[package]] @@ -1097,9 +1097,9 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -1113,7 +1113,7 @@ dependencies = [ "bp-runtime", "frame-support", "sp-api", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -1130,9 +1130,9 @@ dependencies = [ "parity-util-mem", "scale-info", "serde", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -1147,7 +1147,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -1165,11 +1165,11 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", "sp-state-machine", - "sp-std 14.0.0", + "sp-std", "sp-trie", "trie-db", ] @@ -1189,9 +1189,9 @@ dependencies = [ "parity-scale-codec", "sp-application-crypto", "sp-consensus-grandpa", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "sp-trie", ] @@ -1201,7 +1201,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6663e0179d475e30cfcf28cf597cdc8f4bb1c2c39a557b4cbe0057db0657fb67" dependencies = [ - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -1212,7 +1212,7 @@ checksum = "8f58cd5d7880f4bc8fc569e5bb0174302cd3f7e18a322e0fec2a4733cced35cb" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-runtime", ] @@ -1281,7 +1281,7 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -1289,8 +1289,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -1367,7 +1367,7 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -1375,8 +1375,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -1424,12 +1424,12 @@ dependencies = [ "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-keyring", "sp-runtime", - "sp-std 14.0.0", - "sp-tracing 16.0.0", + "sp-std", + "sp-tracing", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -1463,10 +1463,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "sp-trie", "staging-xcm", "staging-xcm-builder", @@ -1672,8 +1672,7 @@ dependencies = [ "sp-authority-discovery", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 25.0.0", - "sp-core 28.0.0", + "sp-core", "sp-runtime", "staging-kusama-runtime", "staging-xcm", @@ -1827,14 +1826,14 @@ dependencies = [ "sp-arithmetic", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core", "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", "sp-session", - "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -2197,7 +2196,7 @@ dependencies = [ "sp-application-crypto", "sp-consensus-aura", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -2215,7 +2214,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "staging-xcm", ] @@ -2241,13 +2240,13 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-runtime-parachains", "scale-info", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "sp-core", + "sp-externalities", "sp-inherents", "sp-io", "sp-runtime", "sp-state-machine", - "sp-std 14.0.0", + "sp-std", "sp-trie", "sp-version", "staging-xcm", @@ -2278,7 +2277,7 @@ dependencies = [ "pallet-session", "parity-scale-codec", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -2294,7 +2293,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "staging-xcm", ] @@ -2316,10 +2315,10 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-parachains", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "staging-xcm", "staging-xcm-executor", ] @@ -2337,7 +2336,7 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "sp-trie", "staging-xcm", ] @@ -2352,9 +2351,9 @@ dependencies = [ "cumulus-primitives-core", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-inherents", - "sp-std 14.0.0", + "sp-std", "sp-trie", ] @@ -2364,8 +2363,8 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a132e17ac2c79436bc5004b0d56cb35ca65b966434f14e5ff8a9bc1afcfca5a4" dependencies = [ - "sp-externalities 0.25.0", - "sp-runtime-interface 24.0.0", + "sp-externalities", + "sp-runtime-interface", "sp-trie", ] @@ -2379,7 +2378,7 @@ dependencies = [ "futures", "parity-scale-codec", "sp-inherents", - "sp-std 14.0.0", + "sp-std", "sp-timestamp", ] @@ -2398,7 +2397,7 @@ dependencies = [ "polkadot-runtime-parachains", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -2415,7 +2414,7 @@ dependencies = [ "polkadot-primitives", "sp-runtime", "sp-state-machine", - "sp-std 14.0.0", + "sp-std", "sp-trie", ] @@ -2849,7 +2848,7 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-beefy", "sp-consensus-grandpa", - "sp-core 28.0.0", + "sp-core", "sp-runtime", "staging-kusama-runtime", "xcm-emulator", @@ -2889,7 +2888,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -2900,7 +2899,7 @@ checksum = "3f5e534e5d624f17a34ae5c6cf61ddbfd68b6a2d3900d855760ebb551f9d4fdd" dependencies = [ "encointer-primitives", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -2964,13 +2963,13 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core", "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", "sp-session", - "sp-std 14.0.0", + "sp-std", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -2992,7 +2991,7 @@ dependencies = [ "scale-info", "serde", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -3009,10 +3008,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "substrate-geohash", ] @@ -3090,9 +3089,9 @@ dependencies = [ "scale-info", "serde", "sp-arithmetic", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "substrate-fixed", ] @@ -3258,7 +3257,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand 0.8.5", + "rand", "rustc-hex", "static_assertions", ] @@ -3336,12 +3335,12 @@ dependencies = [ "serde", "sp-api", "sp-application-crypto", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface 24.0.0", - "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-runtime-interface", + "sp-std", + "sp-storage", "static_assertions", ] @@ -3369,10 +3368,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-arithmetic", - "sp-core 28.0.0", + "sp-core", "sp-npos-elections", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -3387,11 +3386,11 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", - "sp-tracing 16.0.0", + "sp-std", + "sp-tracing", ] [[package]] @@ -3418,7 +3417,7 @@ dependencies = [ "log", "parity-scale-codec", "serde", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", "sp-state-machine", @@ -3453,9 +3452,9 @@ dependencies = [ "smallvec", "sp-api", "sp-arithmetic", - "sp-core 28.0.0", + "sp-core", "sp-core-hashing-proc-macro", - "sp-debug-derive 14.0.0", + "sp-debug-derive", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -3463,8 +3462,8 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std 14.0.0", - "sp-tracing 16.0.0", + "sp-std", + "sp-tracing", "sp-weights", "static_assertions", "tt-call", @@ -3486,7 +3485,7 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "sp-core-hashing 15.0.0", + "sp-core-hashing", "syn 2.0.48", ] @@ -3527,10 +3526,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "sp-version", "sp-weights", ] @@ -3546,9 +3545,9 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -3571,7 +3570,7 @@ dependencies = [ "parity-scale-codec", "sp-api", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -3763,7 +3762,7 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" dependencies = [ - "rand 0.8.5", + "rand", "rand_core 0.6.4", ] @@ -3829,14 +3828,14 @@ dependencies = [ "scale-info", "sp-api", "sp-block-builder", - "sp-core 28.0.0", + "sp-core", "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", "sp-session", - "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -4332,7 +4331,7 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-beefy", "sp-consensus-grandpa", - "sp-core 28.0.0", + "sp-core", "sp-runtime", "staging-xcm", "xcm-emulator", @@ -4471,7 +4470,7 @@ dependencies = [ "hyper", "jsonrpsee-types", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "rustc-hash", "serde", "serde_json", @@ -4597,7 +4596,7 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core 28.0.0", + "sp-core", "sp-runtime", "sp-weights", "staging-xcm-builder", @@ -4707,7 +4706,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "quick-protobuf", - "rand 0.8.5", + "rand", "rw-stream-sink", "smallvec", "thiserror", @@ -4763,7 +4762,7 @@ dependencies = [ "multiaddr", "multihash", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.8", "thiserror", "zeroize", @@ -4788,7 +4787,7 @@ dependencies = [ "libp2p-swarm", "log", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.8", "smallvec", "thiserror", @@ -4810,7 +4809,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm", "log", - "rand 0.8.5", + "rand", "smallvec", "socket2 0.4.10", "tokio", @@ -4846,7 +4845,7 @@ dependencies = [ "log", "once_cell", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.8", "snow", "static_assertions", @@ -4868,7 +4867,7 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "rand 0.8.5", + "rand", "void", ] @@ -4888,7 +4887,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "quinn-proto", - "rand 0.8.5", + "rand", "rustls 0.20.9", "thiserror", "tokio", @@ -4906,7 +4905,7 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm", - "rand 0.8.5", + "rand", "smallvec", ] @@ -4925,7 +4924,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm-derive", "log", - "rand 0.8.5", + "rand", "smallvec", "tokio", "void", @@ -5047,7 +5046,7 @@ dependencies = [ "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", - "rand 0.8.5", + "rand", "serde", "sha2 0.9.9", "typenum", @@ -5396,7 +5395,7 @@ dependencies = [ "lioness", "log", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "rand_distr", "subtle 2.5.0", @@ -5778,11 +5777,11 @@ dependencies = [ "pallet-identity", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-core-hashing 15.0.0", + "sp-core", + "sp-core-hashing", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -5798,10 +5797,10 @@ dependencies = [ "scale-info", "sp-api", "sp-arithmetic", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -5817,7 +5816,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -5831,9 +5830,9 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -5849,10 +5848,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -5867,9 +5866,9 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -5887,7 +5886,7 @@ dependencies = [ "sp-application-crypto", "sp-consensus-aura", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -5904,7 +5903,7 @@ dependencies = [ "sp-application-crypto", "sp-authority-discovery", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -5919,7 +5918,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -5939,12 +5938,12 @@ dependencies = [ "scale-info", "sp-application-crypto", "sp-consensus-babe", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", "sp-session", "sp-staking", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -5963,11 +5962,11 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", - "sp-tracing 16.0.0", + "sp-std", + "sp-tracing", ] [[package]] @@ -5983,7 +5982,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6004,7 +6003,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6026,11 +6025,11 @@ dependencies = [ "serde", "sp-api", "sp-consensus-beefy", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", "sp-state-machine", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6046,10 +6045,10 @@ dependencies = [ "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6070,7 +6069,7 @@ dependencies = [ "scale-info", "sp-consensus-grandpa", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "sp-trie", ] @@ -6090,7 +6089,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6111,7 +6110,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "sp-trie", ] @@ -6133,7 +6132,7 @@ dependencies = [ "scale-info", "sp-arithmetic", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6149,9 +6148,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-arithmetic", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6168,10 +6167,10 @@ dependencies = [ "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6187,11 +6186,11 @@ dependencies = [ "pallet-authorship", "pallet-session", "parity-scale-codec", - "rand 0.8.5", + "rand", "scale-info", "sp-runtime", "sp-staking", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6206,10 +6205,10 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6227,7 +6226,7 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6243,10 +6242,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-arithmetic", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6262,14 +6261,14 @@ dependencies = [ "log", "pallet-election-provider-support-benchmarking", "parity-scale-codec", - "rand 0.8.5", + "rand", "scale-info", "sp-arithmetic", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "strum", ] @@ -6285,7 +6284,7 @@ dependencies = [ "parity-scale-codec", "sp-npos-elections", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6305,7 +6304,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6322,8 +6321,8 @@ dependencies = [ "pallet-encointer-communities", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-std 14.0.0", + "sp-core", + "sp-std", ] [[package]] @@ -6336,7 +6335,7 @@ dependencies = [ "frame-support", "parity-scale-codec", "sp-api", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6359,10 +6358,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-application-crypto", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6375,7 +6374,7 @@ dependencies = [ "frame-support", "parity-scale-codec", "sp-api", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6395,7 +6394,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6407,7 +6406,7 @@ dependencies = [ "encointer-primitives", "parity-scale-codec", "sp-api", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6427,9 +6426,9 @@ dependencies = [ "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6450,9 +6449,9 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6471,7 +6470,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6491,7 +6490,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6507,10 +6506,10 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6529,12 +6528,12 @@ dependencies = [ "scale-info", "sp-application-crypto", "sp-consensus-grandpa", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", "sp-session", "sp-staking", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6552,7 +6551,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6569,11 +6568,11 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-application-crypto", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", "sp-staking", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6587,11 +6586,11 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-keyring", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6606,7 +6605,25 @@ dependencies = [ "safe-mix", "scale-info", "sp-runtime", - "sp-std 14.0.0", + "sp-std", +] + +[[package]] +name = "pallet-membership" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2dfdff5a7e5b21355b34245312ba2ea687444d9003960e7b876e1df518dab" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -6623,10 +6640,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-arithmetic", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "sp-weights", ] @@ -6642,11 +6659,11 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6663,7 +6680,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6681,7 +6698,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6697,10 +6714,10 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6712,7 +6729,7 @@ dependencies = [ "pallet-nfts", "parity-scale-codec", "sp-api", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6727,9 +6744,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-arithmetic", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6744,12 +6761,12 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", "sp-staking", - "sp-std 14.0.0", - "sp-tracing 16.0.0", + "sp-std", + "sp-tracing", ] [[package]] @@ -6768,9 +6785,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-runtime-interface 24.0.0", + "sp-runtime-interface", "sp-staking", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6782,7 +6799,7 @@ dependencies = [ "pallet-nomination-pools", "parity-scale-codec", "sp-api", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6800,7 +6817,7 @@ dependencies = [ "serde", "sp-runtime", "sp-staking", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6825,7 +6842,7 @@ dependencies = [ "scale-info", "sp-runtime", "sp-staking", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6840,10 +6857,10 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6859,7 +6876,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6875,10 +6892,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-arithmetic", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6894,7 +6911,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6914,7 +6931,7 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6930,10 +6947,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-arithmetic", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -6951,7 +6968,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "sp-weights", ] @@ -6968,13 +6985,13 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", "sp-session", "sp-staking", "sp-state-machine", - "sp-std 14.0.0", + "sp-std", "sp-trie", ] @@ -6990,10 +7007,10 @@ dependencies = [ "pallet-session", "pallet-staking", "parity-scale-codec", - "rand 0.8.5", + "rand", "sp-runtime", "sp-session", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -7012,7 +7029,7 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -7036,7 +7053,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -7084,10 +7101,10 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -7104,7 +7121,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -7123,8 +7140,8 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-std", + "sp-storage", "sp-timestamp", ] @@ -7139,10 +7156,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -7173,9 +7190,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -7191,7 +7208,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -7205,10 +7222,10 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -7224,7 +7241,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -7240,7 +7257,7 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -7258,10 +7275,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -7281,7 +7298,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -7303,9 +7320,9 @@ dependencies = [ "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -7324,9 +7341,9 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "staging-xcm", "staging-xcm-builder", ] @@ -7357,10 +7374,10 @@ dependencies = [ "scale-info", "smallvec", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -7391,11 +7408,11 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", - "sp-tracing 16.0.0", + "sp-std", + "sp-tracing", "staging-parachain-info", "staging-xcm", "staging-xcm-executor", @@ -7545,15 +7562,6 @@ dependencies = [ "crypto-mac 0.11.0", ] -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", -] - [[package]] name = "pem" version = "1.1.1" @@ -7610,14 +7618,14 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core", "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", "sp-session", - "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -7711,9 +7719,9 @@ checksum = "bda2b0f0c580c38f12445a4af10e0a23acf48381b2a95653e0be48ba787e10e5" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -7728,9 +7736,9 @@ dependencies = [ "polkadot-core-primitives", "scale-info", "serde", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "sp-weights", ] @@ -7752,13 +7760,13 @@ dependencies = [ "sp-arithmetic", "sp-authority-discovery", "sp-consensus-slots", - "sp-core 28.0.0", + "sp-core", "sp-inherents", "sp-io", "sp-keystore", "sp-runtime", "sp-staking", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -7775,7 +7783,6 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", - "hex-literal", "log", "pallet-asset-rate", "pallet-authority-discovery", @@ -7788,14 +7795,14 @@ dependencies = [ "pallet-bounties", "pallet-child-bounties", "pallet-conviction-voting", - "pallet-election-provider-multi-phase 27.0.0", - "pallet-election-provider-support-benchmarking 27.0.0", - "pallet-fast-unstake 27.0.0", + "pallet-election-provider-multi-phase", + "pallet-election-provider-support-benchmarking", + "pallet-fast-unstake", "pallet-grandpa", "pallet-identity", "pallet-im-online", "pallet-indices", - "pallet-message-queue 31.0.0", + "pallet-message-queue", "pallet-mmr", "pallet-multisig", "pallet-nomination-pools", @@ -7813,20 +7820,20 @@ dependencies = [ "pallet-staking-reward-curve", "pallet-staking-reward-fn", "pallet-staking-runtime-api", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-treasury 27.0.0", - "pallet-utility 28.0.0", - "pallet-vesting 28.0.0", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", "pallet-whitelist", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.4", + "pallet-xcm", + "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-constants", - "polkadot-runtime-parachains 7.0.0", + "polkadot-runtime-parachains", "scale-info", "separator", "serde_json", @@ -7837,27 +7844,27 @@ dependencies = [ "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 28.0.0", - "sp-debug-derive 14.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", - "sp-npos-elections 26.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", - "sp-std 14.0.0", - "sp-storage 19.0.0", - "sp-tracing 16.0.0", - "sp-transaction-pool 26.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "sp-core", + "sp-debug-derive", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-npos-elections", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-transaction-pool", + "sp-trie", + "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", "tiny-keccak", "tokio", ] @@ -7884,31 +7891,31 @@ dependencies = [ "pallet-election-provider-multi-phase", "pallet-fast-unstake", "pallet-identity", - "pallet-session 28.0.0", - "pallet-staking 28.0.0", - "pallet-staking-reward-fn 19.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-treasury 27.0.0", - "pallet-vesting 28.0.0", - "pallet-xcm-benchmarks 7.0.4", - "parity-scale-codec", - "polkadot-primitives 7.0.0", - "polkadot-runtime-parachains 7.0.0", + "pallet-session", + "pallet-staking", + "pallet-staking-reward-fn", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-treasury", + "pallet-vesting", + "pallet-xcm-benchmarks", + "parity-scale-codec", + "polkadot-primitives", + "polkadot-runtime-parachains", "rustc-hex", "scale-info", "serde", "serde_derive", "slot-range-helper", "sp-api", - "sp-core 28.0.0", + "sp-core", "sp-inherents", "sp-io", "sp-npos-elections", "sp-runtime", "sp-session", "sp-staking", - "sp-std 14.0.0", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -7923,7 +7930,7 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core 28.0.0", + "sp-core", "sp-runtime", "sp-weights", "staging-xcm-builder", @@ -7939,8 +7946,8 @@ dependencies = [ "frame-benchmarking", "parity-scale-codec", "polkadot-primitives", - "sp-std 14.0.0", - "sp-tracing 16.0.0", + "sp-std", + "sp-tracing", ] [[package]] @@ -7972,7 +7979,7 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-metrics", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "rustc-hex", "scale-info", @@ -7980,15 +7987,15 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-arithmetic", - "sp-core 28.0.0", + "sp-core", "sp-inherents", "sp-io", "sp-keystore", "sp-runtime", "sp-session", "sp-staking", - "sp-std 14.0.0", - "sp-tracing 16.0.0", + "sp-std", + "sp-tracing", "staging-xcm", "staging-xcm-executor", "static_assertions", @@ -8322,7 +8329,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" dependencies = [ "bytes", - "rand 0.8.5", + "rand", "ring 0.16.20", "rustc-hash", "rustls 0.20.9", @@ -8348,19 +8355,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -8417,16 +8411,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ "num-traits", - "rand 0.8.5", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "rand", ] [[package]] @@ -8641,7 +8626,7 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core 28.0.0", + "sp-core", "sp-runtime", "sp-weights", "staging-xcm", @@ -8847,8 +8832,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43b05714bc70605d5f8983612d1643d875cd4782ef53a8720907a0eb75070cba" dependencies = [ "log", - "sp-core 28.0.0", - "sp-wasm-interface 20.0.0", + "sp-core", + "sp-wasm-interface", "thiserror", ] @@ -8862,7 +8847,7 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-blockchain", - "sp-core 28.0.0", + "sp-core", "sp-inherents", "sp-runtime", "sp-trie", @@ -8887,7 +8872,7 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core 28.0.0", + "sp-core", "sp-genesis-builder", "sp-io", "sp-runtime", @@ -8923,13 +8908,13 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", + "sp-core", "sp-database", - "sp-externalities 0.25.0", + "sp-externalities", "sp-runtime", "sp-state-machine", "sp-statement-store", - "sp-storage 19.0.0", + "sp-storage", "sp-trie", "substrate-prometheus-endpoint", ] @@ -8953,7 +8938,7 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", + "sp-core", "sp-runtime", "sp-state-machine", "substrate-prometheus-endpoint", @@ -8977,7 +8962,7 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -8996,7 +8981,7 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", - "sp-core 28.0.0", + "sp-core", "sp-keystore", "sp-runtime", "substrate-prometheus-endpoint", @@ -9015,14 +9000,14 @@ dependencies = [ "sc-executor-wasmtime", "schnellru", "sp-api", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "sp-core", + "sp-externalities", "sp-io", "sp-panic-handler", - "sp-runtime-interface 24.0.0", + "sp-runtime-interface", "sp-trie", "sp-version", - "sp-wasm-interface 20.0.0", + "sp-wasm-interface", "tracing", ] @@ -9034,7 +9019,7 @@ checksum = "0285a4a14c0d2c1d04380ff83cddd79181ded510c605d36804cb9c6eb3bbf2ae" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface 20.0.0", + "sp-wasm-interface", "thiserror", "wasm-instrument", ] @@ -9053,8 +9038,8 @@ dependencies = [ "rustix 0.36.17", "sc-allocator", "sc-executor-common", - "sp-runtime-interface 24.0.0", - "sp-wasm-interface 20.0.0", + "sp-runtime-interface", + "sp-wasm-interface", "wasmtime", ] @@ -9081,7 +9066,7 @@ dependencies = [ "sc-transaction-pool-api", "sp-api", "sp-consensus", - "sp-core 28.0.0", + "sp-core", "sp-keystore", "sp-mixnet", "sp-runtime", @@ -9112,7 +9097,7 @@ dependencies = [ "parking_lot 0.12.1", "partial_sort", "pin-project", - "rand 0.8.5", + "rand", "sc-client-api", "sc-network-common", "sc-utils", @@ -9121,7 +9106,7 @@ dependencies = [ "smallvec", "sp-arithmetic", "sp-blockchain", - "sp-core 28.0.0", + "sp-core", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", @@ -9199,7 +9184,7 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", - "sp-core 28.0.0", + "sp-core", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", @@ -9221,7 +9206,7 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-core 28.0.0", + "sp-core", "sp-rpc", "sp-runtime", "sp-version", @@ -9240,7 +9225,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "pin-project", - "rand 0.8.5", + "rand", "sc-utils", "serde", "serde_json", @@ -9260,7 +9245,7 @@ dependencies = [ "parity-scale-codec", "serde", "sp-blockchain", - "sp-core 28.0.0", + "sp-core", "sp-runtime", "thiserror", ] @@ -9336,9 +9321,7 @@ 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.5.0", @@ -9400,31 +9383,13 @@ dependencies = [ "zeroize", ] -[[package]] -name = "secp256k1" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" -dependencies = [ - "secp256k1-sys 0.6.1", -] - [[package]] name = "secp256k1" version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f622567e3b4b38154fb8190bcf6b160d7a4301d70595a49195b48c116007a27" dependencies = [ - "secp256k1-sys 0.9.2", -] - -[[package]] -name = "secp256k1-sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" -dependencies = [ - "cc", + "secp256k1-sys", ] [[package]] @@ -9678,7 +9643,7 @@ dependencies = [ "parity-scale-codec", "paste", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -9748,7 +9713,7 @@ dependencies = [ "http", "httparse", "log", - "rand 0.8.5", + "rand", "sha-1", ] @@ -9763,12 +9728,12 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api-proc-macro", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "sp-core", + "sp-externalities", "sp-metadata-ir", "sp-runtime", "sp-state-machine", - "sp-std 14.0.0", + "sp-std", "sp-trie", "sp-version", "thiserror", @@ -9798,9 +9763,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", + "sp-core", "sp-io", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -9814,7 +9779,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std 14.0.0", + "sp-std", "static_assertions", ] @@ -9829,7 +9794,7 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -9841,7 +9806,7 @@ dependencies = [ "sp-api", "sp-inherents", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -9872,7 +9837,7 @@ dependencies = [ "async-trait", "futures", "log", - "sp-core 28.0.0", + "sp-core", "sp-inherents", "sp-runtime", "sp-state-machine", @@ -9893,7 +9858,7 @@ dependencies = [ "sp-consensus-slots", "sp-inherents", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "sp-timestamp", ] @@ -9910,10 +9875,10 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-consensus-slots", - "sp-core 28.0.0", + "sp-core", "sp-inherents", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "sp-timestamp", ] @@ -9929,11 +9894,11 @@ dependencies = [ "serde", "sp-api", "sp-application-crypto", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "strum", ] @@ -9950,10 +9915,10 @@ dependencies = [ "serde", "sp-api", "sp-application-crypto", - "sp-core 28.0.0", + "sp-core", "sp-keystore", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -9965,57 +9930,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std 14.0.0", + "sp-std", "sp-timestamp", ] -[[package]] -name = "sp-core" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9ebb090ead698a6df04347c86a31ba91a387edb8a58534ec70c4f977d1e1e87" -dependencies = [ - "array-bytes 6.2.2", - "bitflags 1.3.2", - "blake2 0.10.6", - "bounded-collections", - "bs58 0.5.0", - "dyn-clonable", - "ed25519-zebra", - "futures", - "hash-db", - "hash256-std-hasher", - "impl-serde", - "lazy_static", - "libsecp256k1", - "log", - "merlin 2.0.1", - "parity-scale-codec", - "parking_lot 0.12.1", - "paste", - "primitive-types", - "rand 0.8.5", - "regex", - "scale-info", - "schnorrkel 0.9.1", - "secp256k1 0.24.3", - "secrecy", - "serde", - "sp-core-hashing 13.0.0", - "sp-debug-derive 12.0.0", - "sp-externalities 0.23.0", - "sp-runtime-interface 21.0.0", - "sp-std 12.0.0", - "sp-storage 17.0.0", - "ss58-registry", - "substrate-bip39", - "thiserror", - "tiny-bip39", - "tracing", - "w3f-bls", - "zeroize", -] - [[package]] name = "sp-core" version = "28.0.0" @@ -10042,18 +9960,18 @@ dependencies = [ "parking_lot 0.12.1", "paste", "primitive-types", - "rand 0.8.5", + "rand", "scale-info", "schnorrkel 0.11.4", - "secp256k1 0.28.1", + "secp256k1", "secrecy", "serde", - "sp-core-hashing 15.0.0", - "sp-debug-derive 14.0.0", - "sp-externalities 0.25.0", - "sp-runtime-interface 24.0.0", - "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-core-hashing", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", "ss58-registry", "substrate-bip39", "thiserror", @@ -10062,20 +9980,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "sp-core-hashing" -version = "13.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb8524f01591ee58b46cd83c9dbc0fcffd2fd730dabec4f59326cd58a00f17e2" -dependencies = [ - "blake2b_simd", - "byteorder", - "digest 0.10.7", - "sha2 0.10.8", - "sha3", - "twox-hash", -] - [[package]] name = "sp-core-hashing" version = "15.0.0" @@ -10097,7 +10001,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7527f8dda7667c41009b2cd0efaddcb81709b9741bd5ee6d17b11bad835cc698" dependencies = [ "quote", - "sp-core-hashing 15.0.0", + "sp-core-hashing", "syn 2.0.48", ] @@ -10111,17 +10015,6 @@ dependencies = [ "parking_lot 0.12.1", ] -[[package]] -name = "sp-debug-derive" -version = "12.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50535e1a5708d3ba5c1195b59ebefac61cc8679c2c24716b87a86e8b7ed2e4a1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "sp-debug-derive" version = "14.0.0" @@ -10133,18 +10026,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "sp-externalities" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884d05160bc89d0943d1c9fb8006c3d44b80f37f8af607aeff8d4d9cc82e279a" -dependencies = [ - "environmental", - "parity-scale-codec", - "sp-std 12.0.0", - "sp-storage 17.0.0", -] - [[package]] name = "sp-externalities" version = "0.25.0" @@ -10153,8 +10034,8 @@ checksum = "63867ec85950ced90d4ab1bba902a47db1b1efdf2829f653945669b2bb470a9c" dependencies = [ "environmental", "parity-scale-codec", - "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-std", + "sp-storage", ] [[package]] @@ -10166,7 +10047,7 @@ dependencies = [ "serde_json", "sp-api", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -10180,7 +10061,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "thiserror", ] @@ -10196,14 +10077,14 @@ dependencies = [ "log", "parity-scale-codec", "rustversion", - "secp256k1 0.28.1", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "secp256k1", + "sp-core", + "sp-externalities", "sp-keystore", - "sp-runtime-interface 24.0.0", + "sp-runtime-interface", "sp-state-machine", - "sp-std 14.0.0", - "sp-tracing 16.0.0", + "sp-std", + "sp-tracing", "sp-trie", "tracing", "tracing-core", @@ -10215,7 +10096,7 @@ version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98165ce7c625a8cdb88d39c6bbd56fe8b32ada64ed0894032beba99795f557da" dependencies = [ - "sp-core 28.0.0", + "sp-core", "sp-runtime", "strum", ] @@ -10228,8 +10109,8 @@ checksum = "96806a28a62ed9ddecd0b28857b1344d029390f7c5c42a2ff9199cbf5638635c" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "sp-core", + "sp-externalities", "thiserror", ] @@ -10252,7 +10133,7 @@ dependencies = [ "frame-metadata", "parity-scale-codec", "scale-info", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -10265,7 +10146,7 @@ dependencies = [ "scale-info", "sp-api", "sp-application-crypto", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -10280,10 +10161,10 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-core 28.0.0", - "sp-debug-derive 14.0.0", + "sp-core", + "sp-debug-derive", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "thiserror", ] @@ -10297,9 +10178,9 @@ dependencies = [ "scale-info", "serde", "sp-arithmetic", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -10309,7 +10190,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb45b3e397dc9c7b81cb2d8d641d0bcb1f525b60e83835783413ba73b3f61ac9" dependencies = [ "sp-api", - "sp-core 28.0.0", + "sp-core", "sp-runtime", ] @@ -10332,7 +10213,7 @@ checksum = "8a55f2c7660b579627d22932ecfe2e5f001a7671d2fa77667387517c7f80e6fb" dependencies = [ "rustc-hash", "serde", - "sp-core 28.0.0", + "sp-core", ] [[package]] @@ -10348,37 +10229,18 @@ dependencies = [ "log", "parity-scale-codec", "paste", - "rand 0.8.5", + "rand", "scale-info", "serde", "simple-mermaid", "sp-application-crypto", "sp-arithmetic", - "sp-core 28.0.0", + "sp-core", "sp-io", - "sp-std 14.0.0", + "sp-std", "sp-weights", ] -[[package]] -name = "sp-runtime-interface" -version = "21.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f365332922a8cfa98ab00c6d08b1b0f24e159e730dd554e720d950ff3371b1f" -dependencies = [ - "bytes", - "impl-trait-for-tuples", - "parity-scale-codec", - "primitive-types", - "sp-externalities 0.23.0", - "sp-runtime-interface-proc-macro 15.0.0", - "sp-std 12.0.0", - "sp-storage 17.0.0", - "sp-tracing 14.0.0", - "sp-wasm-interface 18.0.0", - "static_assertions", -] - [[package]] name = "sp-runtime-interface" version = "24.0.0" @@ -10389,28 +10251,15 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities 0.25.0", - "sp-runtime-interface-proc-macro 17.0.0", - "sp-std 14.0.0", - "sp-storage 19.0.0", - "sp-tracing 16.0.0", - "sp-wasm-interface 20.0.0", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", "static_assertions", ] -[[package]] -name = "sp-runtime-interface-proc-macro" -version = "15.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2afcbd1bd18d323371111b66b7ac2870bdc1c86c3d7b0dae67b112ca52b4d8" -dependencies = [ - "Inflector", - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "sp-runtime-interface-proc-macro" version = "17.0.0" @@ -10434,11 +10283,11 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-core 28.0.0", + "sp-core", "sp-keystore", "sp-runtime", "sp-staking", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -10451,9 +10300,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", + "sp-core", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -10466,12 +10315,12 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "smallvec", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "sp-core", + "sp-externalities", "sp-panic-handler", - "sp-std 14.0.0", + "sp-std", "sp-trie", "thiserror", "tracing", @@ -10489,46 +10338,26 @@ dependencies = [ "ed25519-dalek", "hkdf", "parity-scale-codec", - "rand 0.8.5", + "rand", "scale-info", "sha2 0.10.8", "sp-api", "sp-application-crypto", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "sp-core", + "sp-externalities", "sp-runtime", - "sp-runtime-interface 24.0.0", - "sp-std 14.0.0", + "sp-runtime-interface", + "sp-std", "thiserror", "x25519-dalek 2.0.0", ] -[[package]] -name = "sp-std" -version = "12.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c78c5a66682568cc7b153603c5d01a2cc8f5c221c7b1e921517a0eef18ae05" - [[package]] name = "sp-std" version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" -[[package]] -name = "sp-storage" -version = "17.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "016f20812cc51bd479cc88d048c35d44cd3adde4accdb159d49d6050f2953595" -dependencies = [ - "impl-serde", - "parity-scale-codec", - "ref-cast", - "serde", - "sp-debug-derive 12.0.0", - "sp-std 12.0.0", -] - [[package]] name = "sp-storage" version = "19.0.0" @@ -10539,8 +10368,8 @@ dependencies = [ "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 14.0.0", - "sp-std 14.0.0", + "sp-debug-derive", + "sp-std", ] [[package]] @@ -10553,23 +10382,10 @@ dependencies = [ "parity-scale-codec", "sp-inherents", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "thiserror", ] -[[package]] -name = "sp-tracing" -version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d727cb5265641ffbb7d4e42c18b63e29f6cfdbd240aae3bcf093c3d6eb29a19" -dependencies = [ - "parity-scale-codec", - "sp-std 12.0.0", - "tracing", - "tracing-core", - "tracing-subscriber", -] - [[package]] name = "sp-tracing" version = "16.0.0" @@ -10577,7 +10393,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0351810b9d074df71c4514c5228ed05c250607cba131c1c9d1526760ab69c05c" dependencies = [ "parity-scale-codec", - "sp-std 14.0.0", + "sp-std", "tracing", "tracing-core", "tracing-subscriber", @@ -10606,12 +10422,12 @@ dependencies = [ "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "scale-info", "schnellru", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-std 14.0.0", + "sp-core", + "sp-externalities", + "sp-std", "thiserror", "tracing", "trie-db", @@ -10631,7 +10447,7 @@ dependencies = [ "serde", "sp-core-hashing-proc-macro", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "sp-version-proc-macro", "thiserror", ] @@ -10648,20 +10464,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "sp-wasm-interface" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5d85813d46a22484cdf5e5afddbbe85442dd1b4d84d67a8c7792f92f9f93607" -dependencies = [ - "anyhow", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "sp-std 12.0.0", - "wasmtime", -] - [[package]] name = "sp-wasm-interface" version = "20.0.0" @@ -10672,7 +10474,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std 14.0.0", + "sp-std", "wasmtime", ] @@ -10688,8 +10490,8 @@ dependencies = [ "serde", "smallvec", "sp-arithmetic", - "sp-debug-derive 14.0.0", - "sp-std 14.0.0", + "sp-debug-derive", + "sp-std", ] [[package]] @@ -10751,9 +10553,9 @@ name = "staging-kusama-runtime" version = "1.0.0" dependencies = [ "binary-merkle-tree", - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-executive 28.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-executive", "frame-remote-externalities", "frame-support", "frame-system", @@ -10774,14 +10576,14 @@ dependencies = [ "pallet-bounties", "pallet-child-bounties", "pallet-conviction-voting", - "pallet-election-provider-multi-phase 27.0.0", - "pallet-election-provider-support-benchmarking 27.0.0", - "pallet-fast-unstake 27.0.0", + "pallet-election-provider-multi-phase", + "pallet-election-provider-support-benchmarking", + "pallet-fast-unstake", "pallet-grandpa", "pallet-identity", "pallet-im-online", "pallet-indices", - "pallet-message-queue 31.0.0", + "pallet-message-queue", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -10802,49 +10604,49 @@ dependencies = [ "pallet-staking", "pallet-staking-runtime-api", "pallet-state-trie-migration", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-treasury 27.0.0", - "pallet-utility 28.0.0", - "pallet-vesting 28.0.0", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", "pallet-whitelist", - "pallet-xcm 7.0.0", - "pallet-xcm-benchmarks 7.0.4", + "pallet-xcm", + "pallet-xcm-benchmarks", "parity-scale-codec", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", - "polkadot-runtime-parachains 7.0.0", + "polkadot-primitives", + "polkadot-runtime-common", + "polkadot-runtime-parachains", "scale-info", "separator", "serde_json", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-authority-discovery 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-babe 0.32.0", + "sp-api", + "sp-arithmetic", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 28.0.0", - "sp-debug-derive 14.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keyring 31.0.0", - "sp-npos-elections 26.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", - "sp-std 14.0.0", - "sp-storage 19.0.0", - "sp-tracing 16.0.0", - "sp-transaction-pool 26.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "sp-core", + "sp-debug-derive", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-npos-elections", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-transaction-pool", + "sp-trie", + "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", "tiny-keccak", "tokio", ] @@ -10861,7 +10663,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0", + "sp-std", ] [[package]] @@ -10900,7 +10702,7 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "sp-weights", "staging-xcm", "staging-xcm-executor", @@ -10920,10 +10722,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-arithmetic", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", + "sp-std", "sp-weights", "staging-xcm", ] @@ -10969,7 +10771,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", - "pbkdf2 0.8.0", + "pbkdf2", "schnorrkel 0.9.1", "sha2 0.9.9", "zeroize", @@ -11234,25 +11036,6 @@ dependencies = [ "time-core", ] -[[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" @@ -11313,7 +11096,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" dependencies = [ "pin-project", - "rand 0.8.5", + "rand", "tokio", ] @@ -11555,7 +11338,7 @@ dependencies = [ "idna 0.2.3", "ipnet", "lazy_static", - "rand 0.8.5", + "rand", "smallvec", "socket2 0.4.10", "thiserror", @@ -11605,7 +11388,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.7", - "rand 0.8.5", + "rand", "static_assertions", ] @@ -11750,7 +11533,7 @@ dependencies = [ "arrayref", "constcat", "digest 0.10.7", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "rand_core 0.6.4", "sha2 0.10.8", @@ -12105,7 +11888,7 @@ dependencies = [ "memfd", "memoffset", "paste", - "rand 0.8.5", + "rand", "rustix 0.36.17", "wasmtime-asm-macros", "wasmtime-environ", @@ -12170,7 +11953,7 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core 28.0.0", + "sp-core", "sp-runtime", "sp-weights", "staging-xcm", @@ -12547,11 +12330,11 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-parachains", "sp-arithmetic", - "sp-core 28.0.0", + "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0", - "sp-tracing 16.0.0", + "sp-std", + "sp-tracing", "staging-xcm", "staging-xcm-executor", ] @@ -12578,7 +12361,7 @@ dependencies = [ "log", "nohash-hasher", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "static_assertions", ] diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index d40dde2b16..5de1b773e7 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -39,8 +39,9 @@ bridge-hub-kusama-runtime = { path = "../system-parachains/bridge-hubs/bridge-hu encointer-kusama-runtime = { path = "../system-parachains/encointer" } glutton-kusama-runtime = { path = "../system-parachains/gluttons/glutton-kusama" } -# encointer is not migrated to the latest release, so we use compatible deps, when needed -sp-core-encointer-compatible = { package = "sp-core", version = "25.0.0" } +# Encointer is(could be) not migrated to the latest release, so we use compatible deps, when needed +# (if so, then just set this version according to the actual encointer) +# sp-core-encointer-compatible = { package = "sp-core", version = "28.0.0" } [features] fast-runtime = [ From 88e2f24fd4c31fbe8dbc65220d6977885a8957f0 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 26 Feb 2024 11:23:36 +0100 Subject: [PATCH 195/316] fnt --- system-parachains/encointer/src/lib.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 5753c23f16..e6e1669d22 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -37,6 +37,7 @@ mod weights; pub mod xcm_config; use codec::{Decode, Encode, MaxEncodedLen}; use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use deal_with_fees::FeesToTreasury; use encointer_balances_tx_payment::{AssetBalanceOf, AssetIdOf, BalanceToCommunityBalance}; pub use encointer_primitives::{ @@ -47,13 +48,8 @@ pub use encointer_primitives::{ communities::{CommunityIdentifier, Location}, scheduler::CeremonyPhaseType, }; -use parachains_common::message_queue::NarrowOriginToSibling; -use cumulus_primitives_core::AggregateMessageOrigin; -use parachains_common::message_queue::ParaIdToSibling; -use cumulus_primitives_core::ParaId; use frame_support::traits::TransformOrigin; - - +use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; use frame_support::{ construct_runtime, From 8ed52d8349dff57ac4ae882fd046aad8b4b4cff8 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 26 Feb 2024 11:38:43 +0100 Subject: [PATCH 196/316] More fixes --- chain-spec-generator/Cargo.toml | 4 ++-- .../src/system_parachains_specs.rs | 22 ++++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index 5de1b773e7..bbf235c07f 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -40,8 +40,8 @@ encointer-kusama-runtime = { path = "../system-parachains/encointer" } glutton-kusama-runtime = { path = "../system-parachains/gluttons/glutton-kusama" } # Encointer is(could be) not migrated to the latest release, so we use compatible deps, when needed -# (if so, then just set this version according to the actual encointer) -# sp-core-encointer-compatible = { package = "sp-core", version = "28.0.0" } +# (if so, uncomment and set this version according to the actual encointer + check `fn encointer_kusama_genesis`) +# sp-core-encointer-compatible = { package = "sp-core", version = "29.0.0" } [features] fast-runtime = [ diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index fe3659b5ba..3d551bccd6 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -518,15 +518,17 @@ pub fn glutton_kusama_local_testnet_config() -> Result, Strin // EncointerKusama fn encointer_kusama_genesis(endowed_accounts: Vec, id: u32) -> serde_json::Value { - // The Encointer may not be migrated to the latest release, so we use compatible dependencies. - fn get_from_seed( - seed: &str, - ) -> ::Public { - use sp_core_encointer_compatible::Pair; - TPublic::Pair::from_string(&format!("//{}", seed), None) - .expect("static values are valid; qed") - .public() - } + // The Encointer is(could be) not be migrated to the latest release, so we use compatible + // dependencies. (if so, uncomment this and set version for `sp_core_encointer_compatible` + // according to the actual encointer in Cargo.toml`) use sp_core_encointer_compatible as + // sp_core; fn get_from_seed( + // seed: &str, + // ) -> ::Public { + // use sp_core_encointer_compatible::Pair; + // TPublic::Pair::from_string(&format!("//{}", seed), None) + // .expect("static values are valid; qed") + // .public() + // } serde_json::json!({ "balances": asset_hub_kusama_runtime::BalancesConfig { @@ -544,7 +546,7 @@ fn encointer_kusama_genesis(endowed_accounts: Vec, id: u32) -> serde_ "safeXcmVersion": Some(SAFE_XCM_VERSION), }, "aura": encointer_kusama_runtime::AuraConfig { - authorities: vec![get_from_seed::("Alice").into()], + authorities: vec![get_from_seed::("Alice").into()], }, }) } From 8cc50742f4fea907d105d1e46fa8a06a510c0e16 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 26 Feb 2024 11:42:12 +0100 Subject: [PATCH 197/316] Replace CurrencyAdapter for FungibleAdapter --- system-parachains/encointer/src/xcm_config.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/system-parachains/encointer/src/xcm_config.rs b/system-parachains/encointer/src/xcm_config.rs index c72ccaff05..73cf3222b4 100644 --- a/system-parachains/encointer/src/xcm_config.rs +++ b/system-parachains/encointer/src/xcm_config.rs @@ -34,12 +34,12 @@ use sp_core::ConstU32; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, - DenyReserveTransferToRelayChain, DenyThenTry, DescribeTerminus, EnsureXcmOrigin, - FixedWeightBounds, FrameTransactionalProcessor, HashedDescription, IsConcrete, NativeAsset, - ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, DenyReserveTransferToRelayChain, + DenyThenTry, DescribeTerminus, EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, + FungibleAdapter, HashedDescription, IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, }; use xcm_executor::XcmExecutor; @@ -68,7 +68,7 @@ pub type LocationToAccountId = ( ); /// Means for transacting the native currency on this chain. -pub type CurrencyTransactor = CurrencyAdapter< +pub type FungibleTransactor = FungibleAdapter< // Use this currency: Balances, // Use this currency when it is a fungible asset matching the given location or name: @@ -154,7 +154,7 @@ pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; - type AssetTransactor = CurrencyTransactor; + type AssetTransactor = FungibleTransactor; type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = NativeAsset; /// Only allow teleportation of KSM with other system locations. From 9490a1b23f8fb44918791ed3106b0f0d9c088ad4 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 26 Feb 2024 11:43:57 +0100 Subject: [PATCH 198/316] Removed `cumulus-primitives-timestamp` from Encointer --- Cargo.lock | 15 --------------- system-parachains/encointer/Cargo.toml | 2 -- 2 files changed, 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d888831f28..eba01d6141 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2368,20 +2368,6 @@ dependencies = [ "sp-trie", ] -[[package]] -name = "cumulus-primitives-timestamp" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6d1d900bd9e76607a4a0734cbb2b004d86177d2d6938b5d25eb812c6c1b7500" -dependencies = [ - "cumulus-primitives-core", - "futures", - "parity-scale-codec", - "sp-inherents", - "sp-std", - "sp-timestamp", -] - [[package]] name = "cumulus-primitives-utility" version = "0.7.3" @@ -2912,7 +2898,6 @@ dependencies = [ "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", - "cumulus-primitives-timestamp", "cumulus-primitives-utility", "encointer-balances-tx-payment", "encointer-balances-tx-payment-rpc-runtime-api", diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml index e8bf2d15b6..52c778627f 100644 --- a/system-parachains/encointer/Cargo.toml +++ b/system-parachains/encointer/Cargo.toml @@ -86,7 +86,6 @@ cumulus-pallet-parachain-system = { default-features = false, features = [ cumulus-pallet-xcm = { default-features = false, version = "0.7.0" } cumulus-pallet-xcmp-queue = { default-features = false, version = "0.7.0" } cumulus-primitives-core = { default-features = false, version = "0.7.0" } -cumulus-primitives-timestamp = { default-features = false, version = "0.7.0" } cumulus-primitives-utility = { default-features = false, version = "0.7.0" } parachain-info = { package = "staging-parachain-info", default-features = false, version = "0.7.0" } parachains-common = { default-features = false, version = "7.0.0" } @@ -142,7 +141,6 @@ std = [ "cumulus-pallet-xcm/std", "cumulus-pallet-xcmp-queue/std", "cumulus-primitives-core/std", - "cumulus-primitives-timestamp/std", "cumulus-primitives-utility/std", "encointer-balances-tx-payment-rpc-runtime-api/std", "encointer-balances-tx-payment/std", From 498d0782c08f7cdfe854d8c89988f7f8ceb00e08 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 26 Feb 2024 11:46:19 +0100 Subject: [PATCH 199/316] Fix taplo format for Cargo.toml for encointer --- system-parachains/encointer/Cargo.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml index 52c778627f..86659ef1d2 100644 --- a/system-parachains/encointer/Cargo.toml +++ b/system-parachains/encointer/Cargo.toml @@ -67,7 +67,7 @@ sp-session = { default-features = false, version = "27.0.0" } sp-std = { default-features = false, version = "14.0.0" } sp-transaction-pool = { default-features = false, version = "26.0.0" } sp-version = { default-features = false, version = "29.0.0" } -sp-genesis-builder = { default-features = false , version = "0.7.0" } +sp-genesis-builder = { default-features = false, version = "0.7.0" } # Polkadot dependencies pallet-xcm = { default-features = false, version = "7.0.0" } @@ -90,8 +90,8 @@ cumulus-primitives-utility = { default-features = false, version = "0.7.0" } parachain-info = { package = "staging-parachain-info", default-features = false, version = "0.7.0" } parachains-common = { default-features = false, version = "7.0.0" } system-parachains-constants = { path = "../constants", default-features = false } -polkadot-core-primitives = { default-features = false, version = "7.0.0"} -polkadot-primitives = { default-features = false , version = "7.0.0" } +polkadot-core-primitives = { default-features = false, version = "7.0.0" } +polkadot-primitives = { default-features = false, version = "7.0.0" } # Used for runtime benchmarking @@ -99,7 +99,7 @@ polkadot-primitives = { default-features = false , version = "7.0.0" } substrate-wasm-builder = { optional = true, version = "17.0.0" } [dev-dependencies] -kusama-runtime-constants = { path = "../../relay/kusama/constants", default-features = false} +kusama-runtime-constants = { path = "../../relay/kusama/constants", default-features = false } [features] default = ["std"] @@ -231,9 +231,9 @@ try-runtime = [ "parachain-info/try-runtime", ] -experimental = [ "pallet-aura/experimental" ] +experimental = ["pallet-aura/experimental"] # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = [ "sp-api/disable-logging" ] +on-chain-release-build = ["sp-api/disable-logging"] From 804bfc1cb707c6f55fc38ccc2cc063b5522fc7eb Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 26 Feb 2024 11:50:27 +0100 Subject: [PATCH 200/316] Revert new line --- Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 580d33dcce..01efeb50b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,4 +41,3 @@ opt-level = 3 inherits = "release" lto = true codegen-units = 1 - From 3a88996c46bc7daaad1ec511c993132458d14a70 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 26 Feb 2024 12:14:28 +0100 Subject: [PATCH 201/316] Unify `IsTeleporter` --- system-parachains/encointer/src/xcm_config.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/system-parachains/encointer/src/xcm_config.rs b/system-parachains/encointer/src/xcm_config.rs index 73cf3222b4..2d9c069773 100644 --- a/system-parachains/encointer/src/xcm_config.rs +++ b/system-parachains/encointer/src/xcm_config.rs @@ -148,8 +148,13 @@ impl frame_support::traits::Contains for SafeCallFilter { parameter_types! { pub const MaxAssetsIntoHolding: u32 = 64; - pub const RelayLocation: MultiLocation = MultiLocation::parent(); + pub const KsmRelayLocation: MultiLocation = MultiLocation::parent(); } + +/// Cases where a remote origin is accepted as trusted Teleporter for a given asset: +/// - KSM with the parent Relay Chain and sibling parachains. +pub type TrustedTeleporters = ConcreteAssetFromSystem; + pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; @@ -157,8 +162,7 @@ impl xcm_executor::Config for XcmConfig { type AssetTransactor = FungibleTransactor; type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = NativeAsset; - /// Only allow teleportation of KSM with other system locations. - type IsTeleporter = ConcreteAssetFromSystem; + type IsTeleporter = TrustedTeleporters; type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = FixedWeightBounds; From 111f5c97f9b91e053842e576048bd1ba662d328b Mon Sep 17 00:00:00 2001 From: Adrian Catangiu Date: Mon, 12 Feb 2024 17:52:55 +0200 Subject: [PATCH 202/316] Add P<>K emulated bridge tests Make use of the XCM emulator framework and common components provided by polkadot-sdk@v1.6.0 to reduce amount of boilerplate code in tests. Migrate existing tests to new xcm-emulator format. Add BridgeHubs system parachains emulated tests. Add Polkadot<>Kusama bridge tests, verifying bidirectional transfers of DOT and KSM between Polkadot and Kusama AssetHubs. Signed-off-by: Adrian Catangiu --- Cargo.lock | 2654 +++++++++++++++-- Cargo.toml | 20 +- .../assets/asset-hub-kusama/src/lib.rs | 107 - .../assets/asset-hub-polkadot/Cargo.toml | 35 - .../assets/asset-hub-polkadot/src/lib.rs | 107 - integration-tests/emulated/chains/Cargo.toml | 44 - .../assets/asset-hub-kusama/Cargo.toml | 26 + .../assets/asset-hub-kusama/src/genesis.rs | 71 + .../assets/asset-hub-kusama/src/lib.rs | 59 + .../assets/asset-hub-polkadot/Cargo.toml | 26 + .../assets/asset-hub-polkadot/src/genesis.rs | 68 + .../assets/asset-hub-polkadot/src/lib.rs | 57 + .../bridges/bridge-hub-kusama/Cargo.toml | 25 + .../bridges/bridge-hub-kusama/src/genesis.rs | 77 + .../bridges/bridge-hub-kusama/src/lib.rs | 51 + .../bridges/bridge-hub-polkadot/Cargo.toml | 25 + .../bridge-hub-polkadot/src/genesis.rs | 76 + .../bridges/bridge-hub-polkadot/src/lib.rs | 51 + .../collectives-polkadot/Cargo.toml | 25 + .../collectives-polkadot/src/genesis.rs | 68 + .../collectives-polkadot/src/lib.rs | 52 + .../parachains/testing/penpal/Cargo.toml | 26 + .../parachains/testing/penpal/src/genesis.rs | 71 + .../parachains/testing/penpal/src/lib.rs | 79 + .../emulated/chains/relays/kusama/Cargo.toml | 31 + .../chains/relays/kusama/src/genesis.rs | 127 + .../emulated/chains/relays/kusama/src/lib.rs | 49 + .../chains/relays/polkadot/Cargo.toml | 32 + .../chains/relays/polkadot/src/genesis.rs | 139 + .../chains/relays/polkadot/src/lib.rs | 51 + .../emulated/chains/src/genesis.rs | 650 ---- integration-tests/emulated/chains/src/lib.rs | 348 --- integration-tests/emulated/common/Cargo.toml | 44 - .../emulated/common/src/impls.rs | 786 ----- integration-tests/emulated/common/src/lib.rs | 149 - .../emulated/common/src/macros.rs | 221 -- .../emulated/common/src/xcm_helpers.rs | 72 - integration-tests/emulated/helpers/Cargo.toml | 24 + integration-tests/emulated/helpers/src/lib.rs | 124 + .../kusama-polkadot-system/Cargo.toml | 22 + .../kusama-polkadot-system/src/lib.rs | 100 + .../networks/kusama-system/Cargo.toml | 19 + .../networks/kusama-system/src/lib.rs | 51 + .../networks/polkadot-system/Cargo.toml | 20 + .../networks/polkadot-system/src/lib.rs | 55 + .../assets/asset-hub-kusama/Cargo.toml | 22 +- .../tests/assets/asset-hub-kusama/src/lib.rs | 70 + .../assets/asset-hub-kusama/src/tests/mod.rs | 4 +- .../src/tests/reserve_transfer.rs | 105 +- .../assets/asset-hub-kusama/src/tests/send.rs | 13 +- .../src/tests/set_xcm_versions.rs | 0 .../assets/asset-hub-kusama/src/tests/swap.rs | 46 +- .../asset-hub-kusama/src/tests/teleport.rs | 82 +- .../assets/asset-hub-polkadot/Cargo.toml | 40 + .../assets/asset-hub-polkadot/src/lib.rs | 79 + .../src/tests/fellowship_treasury.rs | 131 + .../asset-hub-polkadot/src/tests/mod.rs | 6 +- .../src/tests/reserve_transfer.rs | 130 +- .../asset-hub-polkadot/src/tests/send.rs | 15 +- .../src/tests/set_xcm_versions.rs | 0 .../asset-hub-polkadot/src/tests/teleport.rs | 116 +- .../asset-hub-polkadot/src/tests/treasury.rs | 126 + .../bridges/bridge-hub-kusama/Cargo.toml | 41 + .../bridges/bridge-hub-kusama/src/lib.rs | 75 + .../src/tests/asset_transfers.rs | 171 ++ .../bridge-hub-kusama/src/tests/mod.rs | 114 + .../bridge-hub-kusama/src/tests/send_xcm.rs | 177 ++ .../bridge-hub-kusama/src/tests/teleport.rs | 30 + .../bridges/bridge-hub-polkadot/Cargo.toml | 37 + .../bridges/bridge-hub-polkadot/src/lib.rs | 71 + .../src/tests/asset_transfers.rs | 173 ++ .../bridge-hub-polkadot/src/tests/mod.rs | 114 + .../bridge-hub-polkadot/src/tests/send_xcm.rs | 177 ++ .../bridge-hub-polkadot/src/tests/teleport.rs | 30 + 74 files changed, 6203 insertions(+), 3006 deletions(-) delete mode 100644 integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs delete mode 100644 integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml delete mode 100644 integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs delete mode 100644 integration-tests/emulated/chains/Cargo.toml create mode 100644 integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/Cargo.toml create mode 100644 integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/src/genesis.rs create mode 100644 integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/src/lib.rs create mode 100644 integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/Cargo.toml create mode 100644 integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/src/genesis.rs create mode 100644 integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/src/lib.rs create mode 100644 integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml create mode 100644 integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/genesis.rs create mode 100644 integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/lib.rs create mode 100644 integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/Cargo.toml create mode 100644 integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/genesis.rs create mode 100644 integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/lib.rs create mode 100644 integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/Cargo.toml create mode 100644 integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/src/genesis.rs create mode 100644 integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/src/lib.rs create mode 100644 integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml create mode 100644 integration-tests/emulated/chains/parachains/testing/penpal/src/genesis.rs create mode 100644 integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs create mode 100644 integration-tests/emulated/chains/relays/kusama/Cargo.toml create mode 100644 integration-tests/emulated/chains/relays/kusama/src/genesis.rs create mode 100644 integration-tests/emulated/chains/relays/kusama/src/lib.rs create mode 100644 integration-tests/emulated/chains/relays/polkadot/Cargo.toml create mode 100644 integration-tests/emulated/chains/relays/polkadot/src/genesis.rs create mode 100644 integration-tests/emulated/chains/relays/polkadot/src/lib.rs delete mode 100644 integration-tests/emulated/chains/src/genesis.rs delete mode 100644 integration-tests/emulated/chains/src/lib.rs delete mode 100644 integration-tests/emulated/common/Cargo.toml delete mode 100644 integration-tests/emulated/common/src/impls.rs delete mode 100644 integration-tests/emulated/common/src/lib.rs delete mode 100644 integration-tests/emulated/common/src/macros.rs delete mode 100644 integration-tests/emulated/common/src/xcm_helpers.rs create mode 100644 integration-tests/emulated/helpers/Cargo.toml create mode 100644 integration-tests/emulated/helpers/src/lib.rs create mode 100644 integration-tests/emulated/networks/kusama-polkadot-system/Cargo.toml create mode 100644 integration-tests/emulated/networks/kusama-polkadot-system/src/lib.rs create mode 100644 integration-tests/emulated/networks/kusama-system/Cargo.toml create mode 100644 integration-tests/emulated/networks/kusama-system/src/lib.rs create mode 100644 integration-tests/emulated/networks/polkadot-system/Cargo.toml create mode 100644 integration-tests/emulated/networks/polkadot-system/src/lib.rs rename integration-tests/emulated/{ => tests}/assets/asset-hub-kusama/Cargo.toml (55%) create mode 100644 integration-tests/emulated/tests/assets/asset-hub-kusama/src/lib.rs rename integration-tests/emulated/{ => tests}/assets/asset-hub-kusama/src/tests/mod.rs (89%) rename integration-tests/emulated/{ => tests}/assets/asset-hub-kusama/src/tests/reserve_transfer.rs (82%) rename integration-tests/emulated/{ => tests}/assets/asset-hub-kusama/src/tests/send.rs (88%) rename integration-tests/emulated/{ => tests}/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs (100%) rename integration-tests/emulated/{ => tests}/assets/asset-hub-kusama/src/tests/swap.rs (88%) rename integration-tests/emulated/{ => tests}/assets/asset-hub-kusama/src/tests/teleport.rs (90%) create mode 100644 integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml create mode 100644 integration-tests/emulated/tests/assets/asset-hub-polkadot/src/lib.rs create mode 100644 integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/fellowship_treasury.rs rename integration-tests/emulated/{ => tests}/assets/asset-hub-polkadot/src/tests/mod.rs (85%) rename integration-tests/emulated/{ => tests}/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs (82%) rename integration-tests/emulated/{ => tests}/assets/asset-hub-polkadot/src/tests/send.rs (87%) rename integration-tests/emulated/{ => tests}/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs (100%) rename integration-tests/emulated/{ => tests}/assets/asset-hub-polkadot/src/tests/teleport.rs (88%) create mode 100644 integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/treasury.rs create mode 100644 integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml create mode 100644 integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/lib.rs create mode 100644 integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/asset_transfers.rs create mode 100644 integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/mod.rs create mode 100644 integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/send_xcm.rs create mode 100644 integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/teleport.rs create mode 100644 integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml create mode 100644 integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs create mode 100644 integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/asset_transfers.rs create mode 100644 integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/mod.rs create mode 100644 integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/send_xcm.rs create mode 100644 integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/teleport.rs diff --git a/Cargo.lock b/Cargo.lock index fa267bb4da..417028b429 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -110,6 +110,12 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +[[package]] +name = "always-assert" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4436e0292ab1bb631b42973c61205e704475fe8126af845c8d923c0996328127" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -429,16 +435,33 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" +[[package]] +name = "asset-hub-kusama-emulated-chain" +version = "0.0.0" +dependencies = [ + "asset-hub-kusama-runtime", + "cumulus-primitives-core 0.7.0", + "emulated-integration-tests-common", + "frame-support 28.0.0", + "kusama-emulated-chain", + "parachains-common 7.0.0", + "serde_json", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "system-parachains-constants", +] + [[package]] name = "asset-hub-kusama-integration-tests" -version = "1.0.0" +version = "0.1.0" dependencies = [ "assert_matches", "asset-hub-kusama-runtime", "asset-test-utils", - "emulated-chains", + "emulated-integration-tests-common", "frame-support 28.0.0", - "integration-tests-common", + "integration-tests-helpers", + "kusama-system-emulated-network", "pallet-asset-conversion", "pallet-assets 29.0.0", "pallet-balances 28.0.0", @@ -451,7 +474,6 @@ dependencies = [ "staging-xcm 7.0.0", "staging-xcm-executor 7.0.3", "system-parachains-constants", - "xcm-emulator", ] [[package]] @@ -537,27 +559,48 @@ dependencies = [ "system-parachains-constants", ] +[[package]] +name = "asset-hub-polkadot-emulated-chain" +version = "0.0.0" +dependencies = [ + "asset-hub-polkadot-runtime", + "cumulus-primitives-core 0.7.0", + "emulated-integration-tests-common", + "frame-support 28.0.0", + "parachains-common 7.0.0", + "polkadot-emulated-chain", + "serde_json", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "system-parachains-constants", +] + [[package]] name = "asset-hub-polkadot-integration-tests" -version = "1.0.0" +version = "0.1.0" dependencies = [ + "assert_matches", "asset-hub-polkadot-runtime", "asset-test-utils", - "emulated-chains", + "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.0", + "emulated-integration-tests-common", "frame-support 28.0.0", - "integration-tests-common", + "integration-tests-helpers", "pallet-assets 29.0.0", "pallet-balances 28.0.0", "pallet-message-queue 31.0.0", + "pallet-treasury 27.0.0", "pallet-xcm 7.0.0", "parachains-common 7.0.0", "parity-scale-codec", "polkadot-runtime", + "polkadot-runtime-common 7.0.0", + "polkadot-system-emulated-network", "sp-runtime 31.0.1", "staging-xcm 7.0.0", "staging-xcm-executor 7.0.3", "system-parachains-constants", - "xcm-emulator", ] [[package]] @@ -1307,6 +1350,48 @@ dependencies = [ "sp-runtime 31.0.1", ] +[[package]] +name = "bridge-hub-kusama-emulated-chain" +version = "0.0.0" +dependencies = [ + "bridge-hub-kusama-runtime", + "cumulus-primitives-core 0.7.0", + "emulated-integration-tests-common", + "frame-support 28.0.0", + "parachains-common 7.0.0", + "serde_json", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "system-parachains-constants", +] + +[[package]] +name = "bridge-hub-kusama-integration-tests" +version = "0.1.0" +dependencies = [ + "bp-messages", + "bridge-hub-kusama-runtime", + "cumulus-pallet-xcmp-queue 0.7.0", + "emulated-integration-tests-common", + "frame-support 28.0.0", + "hex", + "hex-literal", + "integration-tests-helpers", + "kusama-polkadot-system-emulated-network", + "kusama-system-emulated-network", + "pallet-assets 29.0.0", + "pallet-balances 28.0.0", + "pallet-bridge-messages", + "pallet-message-queue 31.0.0", + "pallet-xcm 7.0.0", + "parachains-common 7.0.0", + "parity-scale-codec", + "scale-info", + "sp-runtime 31.0.1", + "staging-xcm 7.0.0", + "staging-xcm-executor 7.0.3", +] + [[package]] name = "bridge-hub-kusama-runtime" version = "1.0.0" @@ -1393,6 +1478,44 @@ dependencies = [ "system-parachains-constants", ] +[[package]] +name = "bridge-hub-polkadot-emulated-chain" +version = "0.0.0" +dependencies = [ + "bridge-hub-polkadot-runtime", + "cumulus-primitives-core 0.7.0", + "emulated-integration-tests-common", + "frame-support 28.0.0", + "parachains-common 7.0.0", + "serde_json", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "system-parachains-constants", +] + +[[package]] +name = "bridge-hub-polkadot-integration-tests" +version = "0.1.0" +dependencies = [ + "bp-messages", + "bridge-hub-polkadot-runtime", + "cumulus-pallet-xcmp-queue 0.7.0", + "emulated-integration-tests-common", + "frame-support 28.0.0", + "integration-tests-helpers", + "kusama-polkadot-system-emulated-network", + "pallet-assets 29.0.0", + "pallet-balances 28.0.0", + "pallet-bridge-messages", + "pallet-message-queue 31.0.0", + "pallet-xcm 7.0.0", + "parachains-common 7.0.0", + "parity-scale-codec", + "sp-runtime 31.0.1", + "staging-xcm 7.0.0", + "staging-xcm-executor 7.0.3", +] + [[package]] name = "bridge-hub-polkadot-runtime" version = "1.0.0" @@ -1818,7 +1941,7 @@ checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" dependencies = [ "core2", "multibase", - "multihash", + "multihash 0.17.0", "serde", "unsigned-varint", ] @@ -1883,6 +2006,7 @@ dependencies = [ "anstyle", "clap_lex", "strsim", + "terminal_size", ] [[package]] @@ -1925,6 +2049,21 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "collectives-polkadot-emulated-chain" +version = "0.0.0" +dependencies = [ + "collectives-polkadot-runtime", + "cumulus-primitives-core 0.7.0", + "emulated-integration-tests-common", + "frame-support 28.0.0", + "parachains-common 7.0.0", + "serde_json", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "system-parachains-constants", +] + [[package]] name = "collectives-polkadot-runtime" version = "1.0.0" @@ -2004,6 +2143,17 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +[[package]] +name = "comfy-table" +version = "7.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" +dependencies = [ + "strum 0.25.0", + "strum_macros 0.25.3", + "unicode-width", +] + [[package]] name = "common-path" version = "1.0.0" @@ -2110,6 +2260,16 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "cpu-time" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9e393a7668fe1fad3075085b86c781883000b4ede868f43627b34a87c8b7ded" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "cpufeatures" version = "0.2.11" @@ -2763,7 +2923,7 @@ dependencies = [ "futures", "jsonrpsee-core", "parity-scale-codec", - "polkadot-overseer", + "polkadot-overseer 4.0.0", "sc-client-api 25.0.0", "sp-api 23.0.0", "sp-blockchain 25.0.0", @@ -3227,34 +3387,38 @@ dependencies = [ ] [[package]] -name = "emulated-chains" -version = "1.0.0" +name = "emulated-integration-tests-common" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff5b923201b2f914787a3d3156826f03879502c09dd8da4471731d0cacef9089" dependencies = [ - "asset-hub-kusama-runtime", - "asset-hub-polkadot-runtime", - "bridge-hub-kusama-runtime", - "bridge-hub-polkadot-runtime", - "collectives-polkadot-runtime", + "asset-test-utils", + "bp-messages", + "bridge-runtime-common", + "cumulus-pallet-parachain-system 0.7.0", + "cumulus-pallet-xcmp-queue 0.7.0", "cumulus-primitives-core 0.7.0", "frame-support 28.0.0", - "integration-tests-common", - "kusama-runtime-constants", + "pallet-assets 29.0.0", + "pallet-balances 28.0.0", + "pallet-bridge-messages", "pallet-im-online", - "pallet-staking 28.0.0", + "pallet-message-queue 31.0.0", + "pallet-xcm 7.0.0", "parachains-common 7.0.0", - "penpal-runtime", - "polkadot-parachain-primitives 6.0.0", + "parity-scale-codec", + "paste", "polkadot-primitives 7.0.0", - "polkadot-runtime", - "polkadot-runtime-constants", "polkadot-runtime-parachains 7.0.0", + "polkadot-service", + "sc-consensus-grandpa", + "serde_json", "sp-authority-discovery 26.0.0", "sp-consensus-babe 0.32.0", "sp-consensus-beefy", - "sp-consensus-grandpa 13.0.0", "sp-core 28.0.0", "sp-runtime 31.0.1", - "staging-kusama-runtime", + "staging-xcm 7.0.0", "xcm-emulator", ] @@ -3654,6 +3818,16 @@ dependencies = [ "libc", ] +[[package]] +name = "fdlimit" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e182f7dbc2ef73d9ef67351c5fbbea084729c48362d3ce9dd44c28e32e277fe5" +dependencies = [ + "libc", + "thiserror", +] + [[package]] name = "ff" version = "0.13.0" @@ -3837,6 +4011,55 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "frame-benchmarking-cli" +version = "32.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69fec078a73892cb5a7146671cf76e3abf23201fefe431a013399ac2e5b03b54" +dependencies = [ + "Inflector", + "array-bytes 6.2.2", + "chrono", + "clap", + "comfy-table", + "frame-benchmarking 28.0.0", + "frame-support 28.0.0", + "frame-system 28.0.0", + "gethostname", + "handlebars", + "itertools 0.10.5", + "lazy_static", + "linked-hash-map", + "log", + "parity-scale-codec", + "rand 0.8.5", + "rand_pcg", + "sc-block-builder 0.33.0", + "sc-cli 0.36.0", + "sc-client-api 28.0.0", + "sc-client-db 0.35.0", + "sc-executor 0.32.0", + "sc-service 0.35.0", + "sc-sysinfo 27.0.0", + "serde", + "serde_json", + "sp-api 26.0.0", + "sp-blockchain 28.0.0", + "sp-core 28.0.0", + "sp-database 10.0.0", + "sp-externalities 0.25.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-storage 19.0.0", + "sp-trie 29.0.0", + "sp-wasm-interface 20.0.0", + "thiserror", + "thousands", +] + [[package]] name = "frame-election-provider-solution-type" version = "12.0.0" @@ -4430,6 +4653,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "gethostname" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "getrandom" version = "0.1.16" @@ -4578,6 +4811,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "handlebars" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faa67bab9ff362228eb3d00bd024a4965d8231bbb7921167f0cfa66c6626b225" +dependencies = [ + "log", + "pest", + "pest_derive", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "hash-db" version = "0.16.0" @@ -5028,34 +5275,15 @@ dependencies = [ ] [[package]] -name = "integration-tests-common" -version = "1.0.0" +name = "integration-tests-helpers" +version = "0.0.1" dependencies = [ "asset-test-utils", - "bp-messages", - "bridge-runtime-common", - "cumulus-pallet-dmp-queue 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", - "pallet-assets 29.0.0", "pallet-balances 28.0.0", - "pallet-bridge-messages", - "pallet-im-online", "pallet-message-queue 31.0.0", "pallet-xcm 7.0.0", - "parachains-common 7.0.0", - "parity-scale-codec", "paste", - "polkadot-primitives 7.0.0", - "polkadot-runtime-parachains 7.0.0", - "sp-authority-discovery 26.0.0", - "sp-consensus-babe 0.32.0", - "sp-consensus-beefy", - "sp-consensus-grandpa 13.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", "staging-xcm 7.0.0", "xcm-emulator", ] @@ -5106,6 +5334,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "is_executable" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa9acdc6d67b75e626ad644734e8bc6df893d9cd2a834129065d3dd6158ea9c8" +dependencies = [ + "winapi", +] + [[package]] name = "itertools" version = "0.10.5" @@ -5321,11 +5558,44 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" [[package]] -name = "kusama-runtime-constants" +name = "kusama-emulated-chain" version = "1.0.0" dependencies = [ - "frame-support 28.0.0", - "polkadot-primitives 7.0.0", + "emulated-integration-tests-common", + "kusama-runtime-constants", + "pallet-im-online", + "parachains-common 7.0.0", + "polkadot-primitives 7.0.0", + "sc-consensus-grandpa", + "serde_json", + "sp-authority-discovery 26.0.0", + "sp-consensus-babe 0.32.0", + "sp-consensus-beefy", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "staging-kusama-runtime", +] + +[[package]] +name = "kusama-polkadot-system-emulated-network" +version = "0.1.0" +dependencies = [ + "asset-hub-kusama-emulated-chain", + "asset-hub-polkadot-emulated-chain", + "bridge-hub-kusama-emulated-chain", + "bridge-hub-polkadot-emulated-chain", + "emulated-integration-tests-common", + "kusama-emulated-chain", + "penpal-emulated-chain", + "polkadot-emulated-chain", +] + +[[package]] +name = "kusama-runtime-constants" +version = "1.0.0" +dependencies = [ + "frame-support 28.0.0", + "polkadot-primitives 7.0.0", "polkadot-runtime-common 7.0.0", "smallvec", "sp-core 28.0.0", @@ -5334,6 +5604,17 @@ dependencies = [ "staging-xcm-builder 7.0.3", ] +[[package]] +name = "kusama-system-emulated-network" +version = "0.1.0" +dependencies = [ + "asset-hub-kusama-emulated-chain", + "bridge-hub-kusama-emulated-chain", + "emulated-integration-tests-common", + "kusama-emulated-chain", + "penpal-emulated-chain", +] + [[package]] name = "kvdb" version = "0.13.0" @@ -5367,6 +5648,17 @@ dependencies = [ "smallvec", ] +[[package]] +name = "landlock" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1530c5b973eeed4ac216af7e24baf5737645a6272e361f1fb95710678b67d9cc" +dependencies = [ + "enumflags2", + "libc", + "thiserror", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -5472,7 +5764,7 @@ dependencies = [ "libp2p-identity", "log", "multiaddr", - "multihash", + "multihash 0.17.0", "multistream-select", "once_cell", "parking_lot 0.12.1", @@ -5532,7 +5824,7 @@ dependencies = [ "ed25519-dalek", "log", "multiaddr", - "multihash", + "multihash 0.17.0", "quick-protobuf", "rand 0.8.5", "sha2 0.10.8", @@ -6221,6 +6513,43 @@ dependencies = [ "zeroize", ] +[[package]] +name = "mmr-gadget" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d0ba6676a84f182dabd7c3ec2c92f0e882fe4e4179ddf76f02ac132e6eb0ab" +dependencies = [ + "futures", + "log", + "parity-scale-codec", + "sc-client-api 28.0.0", + "sc-offchain", + "sp-api 26.0.0", + "sp-blockchain 28.0.0", + "sp-consensus 0.32.0", + "sp-consensus-beefy", + "sp-core 28.0.0", + "sp-mmr-primitives", + "sp-runtime 31.0.1", +] + +[[package]] +name = "mmr-rpc" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19066d17147f6819ec25f5f6fc3b9fca2008ae745ac7fa2d55ddb1d207119eae" +dependencies = [ + "anyhow", + "jsonrpsee", + "parity-scale-codec", + "serde", + "sp-api 26.0.0", + "sp-blockchain 28.0.0", + "sp-core 28.0.0", + "sp-mmr-primitives", + "sp-runtime 31.0.1", +] + [[package]] name = "mockall" version = "0.11.4" @@ -6259,7 +6588,7 @@ dependencies = [ "data-encoding", "log", "multibase", - "multihash", + "multihash 0.17.0", "percent-encoding", "serde", "static_assertions", @@ -6289,12 +6618,55 @@ 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" @@ -6309,6 +6681,31 @@ dependencies = [ "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", + "syn 1.0.109", + "synstructure", +] + [[package]] name = "multimap" version = "0.8.3" @@ -6365,6 +6762,15 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "names" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bddcd3bf5144b6392de80e04c347cd7fab2508f6df16a85fc496ecd5cec39bc" +dependencies = [ + "rand 0.8.5", +] + [[package]] name = "nanorand" version = "0.7.0" @@ -6517,6 +6923,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", + "num-bigint", "num-integer", "num-traits", ] @@ -7337,7 +7744,7 @@ dependencies = [ "sp-npos-elections 23.0.0", "sp-runtime 28.0.0", "sp-std 12.0.0", - "strum", + "strum 0.24.1", ] [[package]] @@ -7361,7 +7768,7 @@ dependencies = [ "sp-npos-elections 26.0.0", "sp-runtime 31.0.1", "sp-std 14.0.0", - "strum", + "strum 0.24.1", ] [[package]] @@ -8435,6 +8842,23 @@ dependencies = [ "sp-std 14.0.0", ] +[[package]] +name = "pallet-transaction-payment-rpc" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba1486d58f38892df779a7812f28ff962d0b0632b955ea3c348f605caa01ba6d" +dependencies = [ + "jsonrpsee", + "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "parity-scale-codec", + "sp-api 26.0.0", + "sp-blockchain 28.0.0", + "sp-core 28.0.0", + "sp-rpc 26.0.0", + "sp-runtime 31.0.1", + "sp-weights 27.0.0", +] + [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "25.0.0" @@ -9023,6 +9447,22 @@ dependencies = [ "base64 0.13.1", ] +[[package]] +name = "penpal-emulated-chain" +version = "0.0.0" +dependencies = [ + "cumulus-primitives-core 0.7.0", + "emulated-integration-tests-common", + "frame-support 28.0.0", + "kusama-emulated-chain", + "parachains-common 7.0.0", + "penpal-runtime", + "polkadot-emulated-chain", + "serde_json", + "sp-core 28.0.0", + "sp-runtime 31.0.1", +] + [[package]] name = "penpal-runtime" version = "0.14.3" @@ -9093,6 +9533,51 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "pest" +version = "2.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e1288dbd7786462961e69bfd4df7848c1e37e8b74303dbdab82c3a9cdd2809" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1381c29a877c6d34b8c176e734f35d7f7f5b3adaefe940cb4d1bb7af94678e2e" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "pest_meta" +version = "2.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0934d6907f148c22a3acbda520c7eed243ad7487a30f51f6ce52b58b7077a8a" +dependencies = [ + "once_cell", + "pest", + "sha2 0.10.8", +] + [[package]] name = "petgraph" version = "0.6.4" @@ -9164,118 +9649,767 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] -name = "polkadot-core-primitives" -version = "4.0.0" +name = "polkadot-approval-distribution" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b08d1d6ca24e1b13f8069e015cfab794344212dd7436aadd61de8086a82664ef" +checksum = "98fd276eccca3ada04cb274f4b8c51f669087d8b334c775f1231a9194d5260d0" dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-core 25.0.0", - "sp-runtime 28.0.0", - "sp-std 12.0.0", + "bitvec", + "futures", + "futures-timer", + "itertools 0.10.5", + "polkadot-node-jaeger 7.0.0", + "polkadot-node-metrics 7.0.0", + "polkadot-node-network-protocol 7.0.0", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives 7.0.0", + "rand 0.8.5", + "tracing-gum 7.0.0", ] [[package]] -name = "polkadot-core-primitives" +name = "polkadot-availability-bitfield-distribution" version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda2b0f0c580c38f12445a4af10e0a23acf48381b2a95653e0be48ba787e10e5" +checksum = "51c43e54e0cc47dfb4f7c3917a774ccc796524087515b212d9fe109bde71846e" dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0", + "always-assert", + "futures", + "futures-timer", + "polkadot-node-network-protocol 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives 7.0.0", + "rand 0.8.5", + "tracing-gum 7.0.0", ] [[package]] -name = "polkadot-node-jaeger" -version = "4.0.0" +name = "polkadot-availability-distribution" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfe6d4769181dce55b1b8fc53f0bd85bb4aa20473702fbce95a94abafa19379" +checksum = "121ded25722b8505335b05a77f1def84278802ed3f4774c7fe6ab7c961affe06" dependencies = [ - "lazy_static", - "log", - "mick-jaeger", + "derive_more", + "fatality", + "futures", "parity-scale-codec", - "parking_lot 0.12.1", - "polkadot-node-primitives", - "polkadot-primitives 4.0.0", - "sc-network 0.31.0", - "sp-core 25.0.0", + "polkadot-erasure-coding", + "polkadot-node-network-protocol 7.0.0", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives 7.0.0", + "rand 0.8.5", + "schnellru", + "sp-core 28.0.0", + "sp-keystore 0.34.0", "thiserror", - "tokio", + "tracing-gum 7.0.0", ] [[package]] -name = "polkadot-node-metrics" -version = "4.0.0" +name = "polkadot-availability-recovery" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51a586fc3ef87c685588a650c18882b4cf069d8adc0d7d9bd2670749cb4e82b" +checksum = "3902495dbba25e7526168c8f88b26cc0dbb96cfe10813238a650c67b34bf9f31" dependencies = [ - "bs58 0.5.0", + "async-trait", + "fatality", "futures", - "futures-timer", - "log", "parity-scale-codec", - "polkadot-primitives 4.0.0", - "prioritized-metered-channel 0.5.1", - "sc-cli", - "sc-service", - "sc-tracing", - "substrate-prometheus-endpoint 0.16.0", - "tracing-gum", + "polkadot-erasure-coding", + "polkadot-node-network-protocol 7.0.0", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives 7.0.0", + "rand 0.8.5", + "sc-network 0.34.0", + "schnellru", + "thiserror", + "tokio", + "tracing-gum 7.0.0", ] [[package]] -name = "polkadot-node-network-protocol" -version = "4.0.0" +name = "polkadot-collator-protocol" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6de513655bf71400299cda1ccaebfa612fd3965e7ce5a9120b4ff37bfc80931" +checksum = "a70007b246c3679ee43f11123bda6d715f659f7b6d4134d0fcbe8980e049386b" dependencies = [ - "async-channel", - "async-trait", "bitvec", - "derive_more", + "fatality", + "futures", + "futures-timer", + "polkadot-node-network-protocol 7.0.0", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives 7.0.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", + "thiserror", + "tokio-util", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-core-primitives" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b08d1d6ca24e1b13f8069e015cfab794344212dd7436aadd61de8086a82664ef" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "polkadot-core-primitives" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda2b0f0c580c38f12445a4af10e0a23acf48381b2a95653e0be48ba787e10e5" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", +] + +[[package]] +name = "polkadot-dispute-distribution" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84a9b173e02d1f600a422269b3b5a1db203d39f436f7db7d7e41ef6dda6f42e0" +dependencies = [ + "derive_more", + "fatality", + "futures", + "futures-timer", + "indexmap 1.9.3", + "parity-scale-codec", + "polkadot-erasure-coding", + "polkadot-node-network-protocol 7.0.0", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives 7.0.0", + "sc-network 0.34.0", + "schnellru", + "sp-application-crypto 30.0.0", + "sp-keystore 0.34.0", + "thiserror", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-emulated-chain" +version = "1.0.0" +dependencies = [ + "emulated-integration-tests-common", + "pallet-im-online", + "pallet-staking 28.0.0", + "parachains-common 7.0.0", + "polkadot-primitives 7.0.0", + "polkadot-runtime", + "polkadot-runtime-constants", + "sc-consensus-grandpa", + "serde_json", + "sp-authority-discovery 26.0.0", + "sp-consensus-babe 0.32.0", + "sp-consensus-beefy", + "sp-core 28.0.0", + "sp-runtime 31.0.1", +] + +[[package]] +name = "polkadot-erasure-coding" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff8347b3528fe94e47ec1b818b06bf821010a5f180d0ac5c89138da0d382debc" +dependencies = [ + "parity-scale-codec", + "polkadot-node-primitives 7.0.0", + "polkadot-primitives 7.0.0", + "reed-solomon-novelpoly", + "sp-core 28.0.0", + "sp-trie 29.0.0", + "thiserror", +] + +[[package]] +name = "polkadot-gossip-support" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4de739371a4b5f036848de5c7185dfee88587016d2bb32af07f38fb909b80d8" +dependencies = [ + "futures", + "futures-timer", + "polkadot-node-network-protocol 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives 7.0.0", + "rand 0.8.5", + "rand_chacha 0.3.1", + "sc-network 0.34.0", + "sc-network-common 0.33.0", + "sp-application-crypto 30.0.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-network-bridge" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4598c9d00dbc017c0f01e82a7c0740805cc500c3b8946ad0b7945ab4d68dd7ee" +dependencies = [ + "always-assert", + "async-trait", + "bytes", + "fatality", + "futures", + "parity-scale-codec", + "parking_lot 0.12.1", + "polkadot-node-metrics 7.0.0", + "polkadot-node-network-protocol 7.0.0", + "polkadot-node-subsystem", + "polkadot-overseer 7.0.0", + "polkadot-primitives 7.0.0", + "sc-network 0.34.0", + "sp-consensus 0.32.0", + "thiserror", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-node-collation-generation" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba987629ab789f529426d6187dbafaa8209f5ee479c645184e4c1e33a59e2135" +dependencies = [ + "futures", + "parity-scale-codec", + "polkadot-erasure-coding", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives 7.0.0", + "sp-core 28.0.0", + "sp-maybe-compressed-blob 11.0.0", + "thiserror", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-node-core-approval-voting" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5910fa99def47accbb4505bef91f74614f62347bc0c53c11296d5ce70d8e255" +dependencies = [ + "bitvec", + "derive_more", + "futures", + "futures-timer", + "itertools 0.10.5", + "kvdb", + "merlin 3.0.0", + "parity-scale-codec", + "polkadot-node-jaeger 7.0.0", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-overseer 7.0.0", + "polkadot-primitives 7.0.0", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "sc-keystore 25.0.0", + "schnellru", + "schnorrkel 0.11.4", + "sp-application-crypto 30.0.0", + "sp-consensus 0.32.0", + "sp-consensus-slots 0.32.0", + "sp-runtime 31.0.1", + "thiserror", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-node-core-av-store" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab1583533dc82a719607323432c013e01c2a8c971eb7e7703ff5eadd762f4e3" +dependencies = [ + "bitvec", + "futures", + "futures-timer", + "kvdb", + "parity-scale-codec", + "polkadot-erasure-coding", + "polkadot-node-jaeger 7.0.0", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-overseer 7.0.0", + "polkadot-primitives 7.0.0", + "sp-consensus 0.32.0", + "thiserror", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-node-core-backing" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7b5468fa618ccbeb4611b073d2c28b9440b51f4012e69c117e43192f9de8b17" +dependencies = [ + "bitvec", + "fatality", + "futures", + "polkadot-erasure-coding", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives 7.0.0", + "polkadot-statement-table 7.0.0", + "sp-keystore 0.34.0", + "thiserror", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-node-core-bitfield-signing" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4975e2ecc81d34605748781e9449a7b7ff956c385b46496005257a1a7dd56f0d" +dependencies = [ + "futures", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives 7.0.0", + "sp-keystore 0.34.0", + "thiserror", + "tracing-gum 7.0.0", + "wasm-timer", +] + +[[package]] +name = "polkadot-node-core-candidate-validation" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcfd720b86c1ddf6616cf083a2cb273147687521c1d13a7f3c991b1d5ae03444" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "parity-scale-codec", + "polkadot-node-core-pvf", + "polkadot-node-metrics 7.0.0", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-overseer 7.0.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", + "sp-maybe-compressed-blob 11.0.0", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-node-core-chain-api" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9f00bd39f433a2e8281524529853a3be54970e799a451e2c14fc5b75cf226f" +dependencies = [ + "futures", + "polkadot-node-metrics 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-types 7.0.0", + "sc-client-api 28.0.0", + "sc-consensus-babe", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-node-core-chain-selection" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea28475a96dfb6419432314d8021780e5c5b0f50a5525fd332e8b2a947a2deb5" +dependencies = [ + "futures", + "futures-timer", + "kvdb", + "parity-scale-codec", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives 7.0.0", + "thiserror", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-node-core-dispute-coordinator" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ad9cfb3e775dc4c611a79e294549fe4b244052ddaacf14133380e793c25a99f" +dependencies = [ + "fatality", + "futures", + "kvdb", + "parity-scale-codec", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives 7.0.0", + "sc-keystore 25.0.0", + "schnellru", + "thiserror", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-node-core-parachains-inherent" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb2535ef374a218b1e9d05b98a903edbdddf4eea47f9e137fcc09c8e1bc199dd" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "polkadot-node-subsystem", + "polkadot-overseer 7.0.0", + "polkadot-primitives 7.0.0", + "sp-blockchain 28.0.0", + "sp-inherents 26.0.0", + "thiserror", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-node-core-prospective-parachains" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15a8876cc0aa627190f1d41c01061a7acee9621703501d9a60118d35e81579f9" +dependencies = [ + "bitvec", + "fatality", + "futures", + "parity-scale-codec", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives 7.0.0", + "thiserror", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-node-core-provisioner" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25c88b17b93bf410a72bfb4543b1ae01bb0d33fd6cba9af1f0e74c4ef2b906ad" +dependencies = [ + "bitvec", + "fatality", + "futures", + "futures-timer", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives 7.0.0", + "thiserror", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-node-core-pvf" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c80f2810b2eb843f3282b11e7ce1624866b6dd1ee6a95541b5882b5df3f36f25" +dependencies = [ + "always-assert", + "array-bytes 6.2.2", + "blake3", + "cfg-if", + "futures", + "futures-timer", + "is_executable", + "libc", + "parity-scale-codec", + "pin-project", + "polkadot-core-primitives 7.0.0", + "polkadot-node-core-pvf-common", + "polkadot-node-metrics 7.0.0", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", + "rand 0.8.5", + "slotmap", + "sp-core 28.0.0", + "sp-maybe-compressed-blob 11.0.0", + "sp-wasm-interface 20.0.0", + "tempfile", + "thiserror", + "tokio", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-node-core-pvf-checker" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14d8ddb21cb3ad1868967b116fbf289610880cb95313b2798762cdd8653d36b7" +dependencies = [ + "futures", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-overseer 7.0.0", + "polkadot-primitives 7.0.0", + "sp-keystore 0.34.0", + "thiserror", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-node-core-pvf-common" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80bbf311b112a8552e89e5be55b0305d86328ba04528e47d3203cd27751405bc" +dependencies = [ + "cfg-if", + "cpu-time", + "futures", + "landlock", + "libc", + "parity-scale-codec", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", + "sc-executor 0.32.0", + "sc-executor-common 0.29.0", + "sc-executor-wasmtime 0.29.0", + "seccompiler", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-io 30.0.0", + "sp-tracing 16.0.0", + "thiserror", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-node-core-runtime-api" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17345f76b7ebcf2f1e1be5411a6420971ef60d69070f115e459b2f017f91bcb5" +dependencies = [ + "futures", + "polkadot-node-metrics 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-types 7.0.0", + "polkadot-primitives 7.0.0", + "schnellru", + "sp-consensus-babe 0.32.0", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-node-jaeger" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cfe6d4769181dce55b1b8fc53f0bd85bb4aa20473702fbce95a94abafa19379" +dependencies = [ + "lazy_static", + "log", + "mick-jaeger", + "parity-scale-codec", + "parking_lot 0.12.1", + "polkadot-node-primitives 4.0.0", + "polkadot-primitives 4.0.0", + "sc-network 0.31.0", + "sp-core 25.0.0", + "thiserror", + "tokio", +] + +[[package]] +name = "polkadot-node-jaeger" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b099624af4597bac5d1617a3cab057785ee47e657de7ad078957bfa397d82c4" +dependencies = [ + "lazy_static", + "log", + "mick-jaeger", + "parity-scale-codec", + "parking_lot 0.12.1", + "polkadot-node-primitives 7.0.0", + "polkadot-primitives 7.0.0", + "sc-network 0.34.0", + "sp-core 28.0.0", + "thiserror", + "tokio", +] + +[[package]] +name = "polkadot-node-metrics" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c51a586fc3ef87c685588a650c18882b4cf069d8adc0d7d9bd2670749cb4e82b" +dependencies = [ + "bs58 0.5.0", + "futures", + "futures-timer", + "log", + "parity-scale-codec", + "polkadot-primitives 4.0.0", + "prioritized-metered-channel 0.5.1", + "sc-cli 0.33.0", + "sc-service 0.32.0", + "sc-tracing 25.0.0", + "substrate-prometheus-endpoint 0.16.0", + "tracing-gum 4.0.0", +] + +[[package]] +name = "polkadot-node-metrics" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b5b00a9646875f22ab45e61ede04f623a3fbbc03bae52263b3d558c964bc32" +dependencies = [ + "bs58 0.5.0", + "futures", + "futures-timer", + "log", + "parity-scale-codec", + "polkadot-primitives 7.0.0", + "prioritized-metered-channel 0.5.1", + "sc-cli 0.36.0", + "sc-service 0.35.0", + "sc-tracing 28.0.0", + "substrate-prometheus-endpoint 0.17.0", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-node-network-protocol" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6de513655bf71400299cda1ccaebfa612fd3965e7ce5a9120b4ff37bfc80931" +dependencies = [ + "async-channel", + "async-trait", + "bitvec", + "derive_more", "fatality", "futures", "hex", "parity-scale-codec", - "polkadot-node-jaeger", - "polkadot-node-primitives", + "polkadot-node-jaeger 4.0.0", + "polkadot-node-primitives 4.0.0", "polkadot-primitives 4.0.0", "rand 0.8.5", - "sc-authority-discovery", + "sc-authority-discovery 0.31.0", "sc-network 0.31.0", - "strum", + "strum 0.24.1", + "thiserror", + "tracing-gum 4.0.0", +] + +[[package]] +name = "polkadot-node-network-protocol" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e420ba9220abaa468a393ff2834b7c2b4d7d87b6d903d9046dfd682c97d35d4c" +dependencies = [ + "async-channel", + "async-trait", + "bitvec", + "derive_more", + "fatality", + "futures", + "hex", + "parity-scale-codec", + "polkadot-node-jaeger 7.0.0", + "polkadot-node-primitives 7.0.0", + "polkadot-primitives 7.0.0", + "rand 0.8.5", + "sc-authority-discovery 0.34.0", + "sc-network 0.34.0", + "strum 0.24.1", "thiserror", - "tracing-gum", + "tracing-gum 7.0.0", ] [[package]] name = "polkadot-node-primitives" version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e82ee5edac871310bd1ce16a035ad2fc901d6ddd69ea0bbabc7f0a70a02770a" +checksum = "3e82ee5edac871310bd1ce16a035ad2fc901d6ddd69ea0bbabc7f0a70a02770a" +dependencies = [ + "bounded-vec", + "futures", + "parity-scale-codec", + "polkadot-parachain-primitives 3.0.0", + "polkadot-primitives 4.0.0", + "schnorrkel 0.9.1", + "serde", + "sp-application-crypto 27.0.0", + "sp-consensus-babe 0.29.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-maybe-compressed-blob 9.0.0", + "sp-runtime 28.0.0", + "thiserror", + "zstd 0.12.4", +] + +[[package]] +name = "polkadot-node-primitives" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "366d18f1498426975c610246063149ad84788eb1e924cab6ee44a4d8958ecf61" dependencies = [ + "bitvec", "bounded-vec", "futures", "parity-scale-codec", - "polkadot-parachain-primitives 3.0.0", - "polkadot-primitives 4.0.0", - "schnorrkel 0.9.1", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", + "schnorrkel 0.11.4", "serde", - "sp-application-crypto 27.0.0", - "sp-consensus-babe 0.29.0", - "sp-core 25.0.0", - "sp-keystore 0.31.0", - "sp-maybe-compressed-blob 9.0.0", - "sp-runtime 28.0.0", + "sp-application-crypto 30.0.0", + "sp-consensus-babe 0.32.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "sp-maybe-compressed-blob 11.0.0", + "sp-runtime 31.0.1", "thiserror", "zstd 0.12.4", ] +[[package]] +name = "polkadot-node-subsystem" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831cf07bf6588d7d8ab872f8f214b4b24b2c4243faf8028534f8a11a3f03c466" +dependencies = [ + "polkadot-node-jaeger 7.0.0", + "polkadot-node-subsystem-types 7.0.0", + "polkadot-overseer 7.0.0", +] + [[package]] name = "polkadot-node-subsystem-types" version = "4.0.0" @@ -9286,11 +10420,11 @@ dependencies = [ "derive_more", "futures", "orchestra", - "polkadot-node-jaeger", - "polkadot-node-network-protocol", - "polkadot-node-primitives", + "polkadot-node-jaeger 4.0.0", + "polkadot-node-network-protocol 4.0.0", + "polkadot-node-primitives 4.0.0", "polkadot-primitives 4.0.0", - "polkadot-statement-table", + "polkadot-statement-table 4.0.0", "sc-client-api 25.0.0", "sc-network 0.31.0", "sc-transaction-pool-api 25.0.0", @@ -9302,6 +10436,71 @@ dependencies = [ "thiserror", ] +[[package]] +name = "polkadot-node-subsystem-types" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd132afdfcdf2e30f7924c9561bbc1208b0838ab9c2275bf0ef32525f63b8bd0" +dependencies = [ + "async-trait", + "bitvec", + "derive_more", + "futures", + "orchestra", + "polkadot-node-jaeger 7.0.0", + "polkadot-node-network-protocol 7.0.0", + "polkadot-node-primitives 7.0.0", + "polkadot-primitives 7.0.0", + "polkadot-statement-table 7.0.0", + "sc-client-api 28.0.0", + "sc-network 0.34.0", + "sc-transaction-pool-api 28.0.0", + "smallvec", + "sp-api 26.0.0", + "sp-authority-discovery 26.0.0", + "sp-blockchain 28.0.0", + "sp-consensus-babe 0.32.0", + "sp-runtime 31.0.1", + "substrate-prometheus-endpoint 0.17.0", + "thiserror", +] + +[[package]] +name = "polkadot-node-subsystem-util" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32c2f2027689777bd61681d769ed5ec726144905c4e3cb16c5f8a4edb55250a" +dependencies = [ + "async-trait", + "derive_more", + "fatality", + "futures", + "futures-channel", + "itertools 0.10.5", + "kvdb", + "parity-db", + "parity-scale-codec", + "parking_lot 0.12.1", + "pin-project", + "polkadot-node-jaeger 7.0.0", + "polkadot-node-metrics 7.0.0", + "polkadot-node-network-protocol 7.0.0", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-types 7.0.0", + "polkadot-overseer 7.0.0", + "polkadot-primitives 7.0.0", + "prioritized-metered-channel 0.5.1", + "rand 0.8.5", + "sc-client-api 28.0.0", + "schnellru", + "sp-application-crypto 30.0.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "thiserror", + "tracing-gum 7.0.0", +] + [[package]] name = "polkadot-overseer" version = "4.0.0" @@ -9313,16 +10512,39 @@ dependencies = [ "futures-timer", "orchestra", "parking_lot 0.12.1", - "polkadot-node-metrics", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem-types", + "polkadot-node-metrics 4.0.0", + "polkadot-node-network-protocol 4.0.0", + "polkadot-node-primitives 4.0.0", + "polkadot-node-subsystem-types 4.0.0", "polkadot-primitives 4.0.0", "sc-client-api 25.0.0", "sp-api 23.0.0", "sp-core 25.0.0", "tikv-jemalloc-ctl", - "tracing-gum", + "tracing-gum 4.0.0", +] + +[[package]] +name = "polkadot-overseer" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa0b71f50f0be1959bcb10a46105ca66b9c6868d549385a247750e5b7a45c77" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "orchestra", + "parking_lot 0.12.1", + "polkadot-node-metrics 7.0.0", + "polkadot-node-network-protocol 7.0.0", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem-types 7.0.0", + "polkadot-primitives 7.0.0", + "sc-client-api 28.0.0", + "sp-api 26.0.0", + "sp-core 28.0.0", + "tikv-jemalloc-ctl", + "tracing-gum 7.0.0", ] [[package]] @@ -9415,6 +10637,40 @@ dependencies = [ "sp-std 14.0.0", ] +[[package]] +name = "polkadot-rpc" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "382eada9005c73375778e1dca58116e0660431cf90989fe0dde54ebe1f621a1e" +dependencies = [ + "jsonrpsee", + "mmr-rpc", + "pallet-transaction-payment-rpc", + "polkadot-primitives 7.0.0", + "sc-chain-spec 27.0.0", + "sc-client-api 28.0.0", + "sc-consensus-babe", + "sc-consensus-babe-rpc", + "sc-consensus-beefy", + "sc-consensus-beefy-rpc", + "sc-consensus-epochs", + "sc-consensus-grandpa", + "sc-consensus-grandpa-rpc", + "sc-rpc 29.0.0", + "sc-rpc-spec-v2 0.34.0", + "sc-sync-state-rpc", + "sc-transaction-pool-api 28.0.0", + "sp-api 26.0.0", + "sp-block-builder 26.0.0", + "sp-blockchain 28.0.0", + "sp-consensus 0.32.0", + "sp-consensus-babe 0.32.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", + "substrate-frame-rpc-system", + "substrate-state-trie-migration-rpc", +] + [[package]] name = "polkadot-runtime" version = "1.0.0" @@ -9760,6 +11016,146 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "polkadot-service" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75bf984471c2608905176b62726b3552bbfdc3e04ebdc7fe75e5179ff215588" +dependencies = [ + "async-trait", + "frame-benchmarking 28.0.0", + "frame-benchmarking-cli", + "frame-support 28.0.0", + "frame-system 28.0.0", + "frame-system-rpc-runtime-api 26.0.0", + "futures", + "hex-literal", + "is_executable", + "kvdb", + "kvdb-rocksdb", + "log", + "mmr-gadget", + "pallet-babe 28.0.0", + "pallet-im-online", + "pallet-staking 28.0.0", + "pallet-transaction-payment 28.0.0", + "pallet-transaction-payment-rpc-runtime-api 28.0.0", + "parity-db", + "parity-scale-codec", + "parking_lot 0.12.1", + "polkadot-approval-distribution", + "polkadot-availability-bitfield-distribution", + "polkadot-availability-distribution", + "polkadot-availability-recovery", + "polkadot-collator-protocol", + "polkadot-core-primitives 7.0.0", + "polkadot-dispute-distribution", + "polkadot-gossip-support", + "polkadot-network-bridge", + "polkadot-node-collation-generation", + "polkadot-node-core-approval-voting", + "polkadot-node-core-av-store", + "polkadot-node-core-backing", + "polkadot-node-core-bitfield-signing", + "polkadot-node-core-candidate-validation", + "polkadot-node-core-chain-api", + "polkadot-node-core-chain-selection", + "polkadot-node-core-dispute-coordinator", + "polkadot-node-core-parachains-inherent", + "polkadot-node-core-prospective-parachains", + "polkadot-node-core-provisioner", + "polkadot-node-core-pvf", + "polkadot-node-core-pvf-checker", + "polkadot-node-core-runtime-api", + "polkadot-node-network-protocol 7.0.0", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-types 7.0.0", + "polkadot-node-subsystem-util", + "polkadot-overseer 7.0.0", + "polkadot-parachain-primitives 6.0.0", + "polkadot-primitives 7.0.0", + "polkadot-rpc", + "polkadot-runtime-parachains 7.0.0", + "polkadot-statement-distribution", + "sc-authority-discovery 0.34.0", + "sc-basic-authorship", + "sc-block-builder 0.33.0", + "sc-chain-spec 27.0.0", + "sc-client-api 28.0.0", + "sc-client-db 0.35.0", + "sc-consensus 0.33.0", + "sc-consensus-babe", + "sc-consensus-beefy", + "sc-consensus-grandpa", + "sc-consensus-slots", + "sc-executor 0.32.0", + "sc-keystore 25.0.0", + "sc-network 0.34.0", + "sc-network-common 0.33.0", + "sc-network-sync 0.33.0", + "sc-offchain", + "sc-service 0.35.0", + "sc-sync-state-rpc", + "sc-sysinfo 27.0.0", + "sc-telemetry 15.0.0", + "sc-transaction-pool 28.0.0", + "sc-transaction-pool-api 28.0.0", + "schnellru", + "serde", + "serde_json", + "sp-api 26.0.0", + "sp-authority-discovery 26.0.0", + "sp-block-builder 26.0.0", + "sp-blockchain 28.0.0", + "sp-consensus 0.32.0", + "sp-consensus-babe 0.32.0", + "sp-consensus-beefy", + "sp-consensus-grandpa 13.0.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-io 30.0.0", + "sp-keyring 31.0.0", + "sp-keystore 0.34.0", + "sp-mmr-primitives", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-state-machine 0.35.0", + "sp-storage 19.0.0", + "sp-timestamp 26.0.0", + "sp-transaction-pool 26.0.0", + "sp-version 29.0.0", + "sp-weights 27.0.0", + "substrate-prometheus-endpoint 0.17.0", + "thiserror", + "tracing-gum 7.0.0", +] + +[[package]] +name = "polkadot-statement-distribution" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b82b48ff9204ea663ccccde78aefa8a524958aadff5c84a4f1fd773c291057d" +dependencies = [ + "arrayvec 0.7.4", + "bitvec", + "fatality", + "futures", + "futures-timer", + "indexmap 1.9.3", + "parity-scale-codec", + "polkadot-node-network-protocol 7.0.0", + "polkadot-node-primitives 7.0.0", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives 7.0.0", + "sp-keystore 0.34.0", + "sp-staking 26.0.0", + "thiserror", + "tracing-gum 7.0.0", +] + [[package]] name = "polkadot-statement-table" version = "4.0.0" @@ -9771,6 +11167,29 @@ dependencies = [ "sp-core 25.0.0", ] +[[package]] +name = "polkadot-statement-table" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478dea03265eb2465010dae149616e4f28fe858e103671b1a96dc19e9e388c8f" +dependencies = [ + "parity-scale-codec", + "polkadot-primitives 7.0.0", + "sp-core 28.0.0", +] + +[[package]] +name = "polkadot-system-emulated-network" +version = "0.1.0" +dependencies = [ + "asset-hub-polkadot-emulated-chain", + "bridge-hub-polkadot-emulated-chain", + "collectives-polkadot-emulated-chain", + "emulated-integration-tests-common", + "penpal-emulated-chain", + "polkadot-emulated-chain", +] + [[package]] name = "polling" version = "3.3.1" @@ -10324,6 +11743,19 @@ dependencies = [ "thiserror", ] +[[package]] +name = "reed-solomon-novelpoly" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58130877ca403ab42c864fbac74bb319a0746c07a634a92a5cfc7f54af272582" +dependencies = [ + "derive_more", + "fs-err", + "itertools 0.11.0", + "static_init", + "thiserror", +] + [[package]] name = "ref-cast" version = "1.0.20" @@ -10449,6 +11881,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "rlp" version = "0.5.2" @@ -10741,9 +12182,38 @@ dependencies = [ [[package]] name = "sc-authority-discovery" -version = "0.31.0" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb7e0e8a4ea5304b65d49c0085a458ed2e43394f95457689875d3e0c6e118dee" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "ip_network", + "libp2p", + "log", + "multihash 0.17.0", + "parity-scale-codec", + "prost", + "prost-build", + "rand 0.8.5", + "sc-client-api 25.0.0", + "sc-network 0.31.0", + "sp-api 23.0.0", + "sp-authority-discovery 23.0.0", + "sp-blockchain 25.0.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", + "substrate-prometheus-endpoint 0.16.0", + "thiserror", +] + +[[package]] +name = "sc-authority-discovery" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb7e0e8a4ea5304b65d49c0085a458ed2e43394f95457689875d3e0c6e118dee" +checksum = "a1c23040352415cdcc22203d3b18e56f3516e51865f106f8bbf7efa95b411a59" dependencies = [ "async-trait", "futures", @@ -10751,23 +12221,47 @@ dependencies = [ "ip_network", "libp2p", "log", - "multihash", + "multihash 0.18.1", + "multihash-codetable", "parity-scale-codec", "prost", "prost-build", "rand 0.8.5", - "sc-client-api 25.0.0", - "sc-network 0.31.0", - "sp-api 23.0.0", - "sp-authority-discovery 23.0.0", - "sp-blockchain 25.0.0", - "sp-core 25.0.0", - "sp-keystore 0.31.0", - "sp-runtime 28.0.0", - "substrate-prometheus-endpoint 0.16.0", + "sc-client-api 28.0.0", + "sc-network 0.34.0", + "sp-api 26.0.0", + "sp-authority-discovery 26.0.0", + "sp-blockchain 28.0.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", + "substrate-prometheus-endpoint 0.17.0", "thiserror", ] +[[package]] +name = "sc-basic-authorship" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c016e38155386e23649a4a995ea67c55a1fe25a54c7cc7509954d454ee75eb3b" +dependencies = [ + "futures", + "futures-timer", + "log", + "parity-scale-codec", + "sc-block-builder 0.33.0", + "sc-proposer-metrics", + "sc-telemetry 15.0.0", + "sc-transaction-pool-api 28.0.0", + "sp-api 26.0.0", + "sp-blockchain 28.0.0", + "sp-consensus 0.32.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "substrate-prometheus-endpoint 0.17.0", +] + [[package]] name = "sc-block-builder" version = "0.30.0" @@ -10879,23 +12373,23 @@ dependencies = [ "array-bytes 6.2.2", "chrono", "clap", - "fdlimit", + "fdlimit 0.2.1", "futures", "libp2p-identity", "log", - "names", + "names 0.13.0", "parity-scale-codec", "rand 0.8.5", "regex", "rpassword", "sc-client-api 25.0.0", - "sc-client-db", - "sc-keystore", + "sc-client-db 0.32.0", + "sc-keystore 22.0.0", "sc-mixnet 0.1.0", "sc-network 0.31.0", - "sc-service", + "sc-service 0.32.0", "sc-telemetry 12.0.0", - "sc-tracing", + "sc-tracing 25.0.0", "sc-utils 11.0.0", "serde", "serde_json", @@ -10911,6 +12405,48 @@ dependencies = [ "tokio", ] +[[package]] +name = "sc-cli" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9819b656041094ca4e97402be145c2bcf3f47d00d854708b25ecd3211eafcd62" +dependencies = [ + "array-bytes 6.2.2", + "bip39", + "chrono", + "clap", + "fdlimit 0.3.0", + "futures", + "itertools 0.10.5", + "libp2p-identity", + "log", + "names 0.14.0", + "parity-scale-codec", + "rand 0.8.5", + "regex", + "rpassword", + "sc-client-api 28.0.0", + "sc-client-db 0.35.0", + "sc-keystore 25.0.0", + "sc-mixnet 0.4.0", + "sc-network 0.34.0", + "sc-service 0.35.0", + "sc-telemetry 15.0.0", + "sc-tracing 28.0.0", + "sc-utils 14.0.0", + "serde", + "serde_json", + "sp-blockchain 28.0.0", + "sp-core 28.0.0", + "sp-keyring 31.0.0", + "sp-keystore 0.34.0", + "sp-panic-handler 13.0.0", + "sp-runtime 31.0.1", + "sp-version 29.0.0", + "thiserror", + "tokio", +] + [[package]] name = "sc-client-api" version = "25.0.0" @@ -10983,7 +12519,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api 25.0.0", - "sc-state-db", + "sc-state-db 0.27.0", "schnellru", "sp-arithmetic 20.0.0", "sp-blockchain 25.0.0", @@ -10994,6 +12530,33 @@ dependencies = [ "sp-trie 26.0.0", ] +[[package]] +name = "sc-client-db" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db9fbd18eb275120fdf2e9558a5006a69022405abb9c260c91d218ddb05db39" +dependencies = [ + "hash-db", + "kvdb", + "kvdb-memorydb", + "kvdb-rocksdb", + "linked-hash-map", + "log", + "parity-db", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api 28.0.0", + "sc-state-db 0.30.0", + "schnellru", + "sp-arithmetic 23.0.0", + "sp-blockchain 28.0.0", + "sp-core 28.0.0", + "sp-database 10.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-trie 29.0.0", +] + [[package]] name = "sc-consensus" version = "0.30.0" @@ -11046,6 +12609,135 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-consensus-babe" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a7d698d9d2bde7e0b80e7ada57ede9255a6382da79d2ad9a4e9e70805c40e74" +dependencies = [ + "async-trait", + "fork-tree 12.0.0", + "futures", + "log", + "num-bigint", + "num-rational", + "num-traits", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api 28.0.0", + "sc-consensus 0.33.0", + "sc-consensus-epochs", + "sc-consensus-slots", + "sc-telemetry 15.0.0", + "sc-transaction-pool-api 28.0.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-block-builder 26.0.0", + "sp-blockchain 28.0.0", + "sp-consensus 0.32.0", + "sp-consensus-babe 0.32.0", + "sp-consensus-slots 0.32.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", + "substrate-prometheus-endpoint 0.17.0", + "thiserror", +] + +[[package]] +name = "sc-consensus-babe-rpc" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f55379d0ce6f87026f896f03bce33862b57f77a46fbb4fb7e974182d20d458" +dependencies = [ + "futures", + "jsonrpsee", + "sc-consensus-babe", + "sc-consensus-epochs", + "sc-rpc-api 0.33.0", + "serde", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-blockchain 28.0.0", + "sp-consensus 0.32.0", + "sp-consensus-babe 0.32.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", + "thiserror", +] + +[[package]] +name = "sc-consensus-beefy" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3664a3cddc718187e058f67d9075ef9078c8f8347c0408304ead8565d4ba8164" +dependencies = [ + "array-bytes 6.2.2", + "async-channel", + "async-trait", + "fnv", + "futures", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api 28.0.0", + "sc-consensus 0.33.0", + "sc-network 0.34.0", + "sc-network-gossip", + "sc-network-sync 0.33.0", + "sc-utils 14.0.0", + "sp-api 26.0.0", + "sp-application-crypto 30.0.0", + "sp-arithmetic 23.0.0", + "sp-blockchain 28.0.0", + "sp-consensus 0.32.0", + "sp-consensus-beefy", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "sp-mmr-primitives", + "sp-runtime 31.0.1", + "substrate-prometheus-endpoint 0.17.0", + "thiserror", + "tokio", + "wasm-timer", +] + +[[package]] +name = "sc-consensus-beefy-rpc" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4e3602efe1e206032164772c24365642e3dab807c5f8db0af166f6ef63af3e" +dependencies = [ + "futures", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-consensus-beefy", + "sc-rpc 29.0.0", + "serde", + "sp-consensus-beefy", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "thiserror", +] + +[[package]] +name = "sc-consensus-epochs" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d0befddf2ca16d5f222968fceeab8625532f2d49303fafd17ae2e5d0e939da6" +dependencies = [ + "fork-tree 12.0.0", + "parity-scale-codec", + "sc-client-api 28.0.0", + "sc-consensus 0.33.0", + "sp-blockchain 28.0.0", + "sp-runtime 31.0.1", +] + [[package]] name = "sc-consensus-grandpa" version = "0.19.0" @@ -11085,8 +12777,53 @@ dependencies = [ "sp-core 28.0.0", "sp-keystore 0.34.0", "sp-runtime 31.0.1", - "substrate-prometheus-endpoint 0.17.0", - "thiserror", + "substrate-prometheus-endpoint 0.17.0", + "thiserror", +] + +[[package]] +name = "sc-consensus-grandpa-rpc" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "694328880bf11fce67f5e066d7884dbdf1f2a41c42a7dfce9b0a6bc6b90448a1" +dependencies = [ + "finality-grandpa", + "futures", + "jsonrpsee", + "log", + "parity-scale-codec", + "sc-client-api 28.0.0", + "sc-consensus-grandpa", + "sc-rpc 29.0.0", + "serde", + "sp-blockchain 28.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "thiserror", +] + +[[package]] +name = "sc-consensus-slots" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6649665fcf91d89c16bfb08e9326baf6547e5fe719d6438197434e5b642d716b" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "log", + "parity-scale-codec", + "sc-client-api 28.0.0", + "sc-consensus 0.33.0", + "sc-telemetry 15.0.0", + "sp-arithmetic 23.0.0", + "sp-blockchain 28.0.0", + "sp-consensus 0.32.0", + "sp-consensus-slots 0.32.0", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", ] [[package]] @@ -11216,6 +12953,24 @@ dependencies = [ "sp-runtime 28.0.0", ] +[[package]] +name = "sc-informant" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e07d2dde727c30974767aed4cddd241447c0a800b702662b529dd2e32a10db1" +dependencies = [ + "ansi_term", + "futures", + "futures-timer", + "log", + "sc-client-api 28.0.0", + "sc-network 0.34.0", + "sc-network-common 0.33.0", + "sc-network-sync 0.33.0", + "sp-blockchain 28.0.0", + "sp-runtime 31.0.1", +] + [[package]] name = "sc-keystore" version = "22.0.0" @@ -11231,6 +12986,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-keystore" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93acb7f7c6e5e4be067e78b782a35d1a6d34dafcd955975a1aec05cab9dbf8fe" +dependencies = [ + "array-bytes 6.2.2", + "parking_lot 0.12.1", + "serde_json", + "sp-application-crypto 30.0.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "thiserror", +] + [[package]] name = "sc-mixnet" version = "0.1.0" @@ -11397,6 +13167,27 @@ dependencies = [ "unsigned-varint", ] +[[package]] +name = "sc-network-bitswap" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2779d97eff742c1ebcce812bfd154a7273c2c2eb02e11fad76cf7eb583365834" +dependencies = [ + "async-channel", + "cid", + "futures", + "libp2p-identity", + "log", + "prost", + "prost-build", + "sc-client-api 28.0.0", + "sc-network 0.34.0", + "sp-blockchain 28.0.0", + "sp-runtime 31.0.1", + "thiserror", + "unsigned-varint", +] + [[package]] name = "sc-network-common" version = "0.30.0" @@ -11475,6 +13266,28 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-network-light" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34e7a126492850dbbd5cf0b77ec3ad350422c2822d165941ddbe618a76af0153" +dependencies = [ + "array-bytes 6.2.2", + "async-channel", + "futures", + "libp2p-identity", + "log", + "parity-scale-codec", + "prost", + "prost-build", + "sc-client-api 28.0.0", + "sc-network 0.34.0", + "sp-blockchain 28.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "thiserror", +] + [[package]] name = "sc-network-sync" version = "0.30.0" @@ -11567,6 +13380,71 @@ dependencies = [ "substrate-prometheus-endpoint 0.16.0", ] +[[package]] +name = "sc-network-transactions" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99a1af3b9e158fa91df0cd92916b3ee5d8b8a14a2b61eb5dd9e36e045808f644" +dependencies = [ + "array-bytes 6.2.2", + "futures", + "libp2p", + "log", + "parity-scale-codec", + "sc-network 0.34.0", + "sc-network-common 0.33.0", + "sc-network-sync 0.33.0", + "sc-utils 14.0.0", + "sp-consensus 0.32.0", + "sp-runtime 31.0.1", + "substrate-prometheus-endpoint 0.17.0", +] + +[[package]] +name = "sc-offchain" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd5408dbdc3fe345813e983bd2b7ecf8f20e996141fa39a36336f511ab1859bb" +dependencies = [ + "array-bytes 6.2.2", + "bytes", + "fnv", + "futures", + "futures-timer", + "hyper", + "hyper-rustls", + "libp2p", + "log", + "num_cpus", + "once_cell", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "sc-client-api 28.0.0", + "sc-network 0.34.0", + "sc-network-common 0.33.0", + "sc-transaction-pool-api 28.0.0", + "sc-utils 14.0.0", + "sp-api 26.0.0", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-keystore 0.34.0", + "sp-offchain 26.0.0", + "sp-runtime 31.0.1", + "threadpool", + "tracing", +] + +[[package]] +name = "sc-proposer-metrics" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb8dadb2ae5a316e4d08cad6aacd5de1dec792f3bd94e3960795ff7ffd07211c" +dependencies = [ + "log", + "substrate-prometheus-endpoint 0.17.0", +] + [[package]] name = "sc-rpc" version = "26.0.0" @@ -11583,7 +13461,7 @@ dependencies = [ "sc-client-api 25.0.0", "sc-mixnet 0.1.0", "sc-rpc-api 0.30.0", - "sc-tracing", + "sc-tracing 25.0.0", "sc-transaction-pool-api 25.0.0", "sc-utils 11.0.0", "serde_json", @@ -11600,6 +13478,39 @@ dependencies = [ "tokio", ] +[[package]] +name = "sc-rpc" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ac0d83b9117c9c004e58331a593a28044eaf6414e5b3c605d1571b4a6981966" +dependencies = [ + "futures", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-block-builder 0.33.0", + "sc-chain-spec 27.0.0", + "sc-client-api 28.0.0", + "sc-mixnet 0.4.0", + "sc-rpc-api 0.33.0", + "sc-tracing 28.0.0", + "sc-transaction-pool-api 28.0.0", + "sc-utils 14.0.0", + "serde_json", + "sp-api 26.0.0", + "sp-blockchain 28.0.0", + "sp-core 28.0.0", + "sp-keystore 0.34.0", + "sp-offchain 26.0.0", + "sp-rpc 26.0.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-statement-store 10.0.0", + "sp-version 29.0.0", + "tokio", +] + [[package]] name = "sc-rpc-api" version = "0.30.0" @@ -11658,6 +13569,22 @@ dependencies = [ "tower-http", ] +[[package]] +name = "sc-rpc-server" +version = "11.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b623908525a2f22aafa079080aa7fbce8b58ca8de53b9f31e3cc8547e0ad8b2" +dependencies = [ + "http", + "jsonrpsee", + "log", + "serde_json", + "substrate-prometheus-endpoint 0.17.0", + "tokio", + "tower", + "tower-http", +] + [[package]] name = "sc-rpc-spec-v2" version = "0.31.0" @@ -11687,6 +13614,36 @@ dependencies = [ "tokio-stream", ] +[[package]] +name = "sc-rpc-spec-v2" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a54150c808fa10364b73faedd97aff0977a911a521d1caa8bad2bdc7943ad579" +dependencies = [ + "array-bytes 6.2.2", + "futures", + "futures-util", + "hex", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-chain-spec 27.0.0", + "sc-client-api 28.0.0", + "sc-transaction-pool-api 28.0.0", + "sc-utils 14.0.0", + "serde", + "sp-api 26.0.0", + "sp-blockchain 28.0.0", + "sp-core 28.0.0", + "sp-rpc 26.0.0", + "sp-runtime 31.0.1", + "sp-version 29.0.0", + "thiserror", + "tokio", + "tokio-stream", +] + [[package]] name = "sc-service" version = "0.32.0" @@ -11707,24 +13664,24 @@ dependencies = [ "sc-block-builder 0.30.0", "sc-chain-spec 24.0.0", "sc-client-api 25.0.0", - "sc-client-db", + "sc-client-db 0.32.0", "sc-consensus 0.30.0", "sc-executor 0.29.0", - "sc-informant", - "sc-keystore", + "sc-informant 0.30.0", + "sc-keystore 22.0.0", "sc-network 0.31.0", - "sc-network-bitswap", + "sc-network-bitswap 0.30.0", "sc-network-common 0.30.0", - "sc-network-light", + "sc-network-light 0.30.0", "sc-network-sync 0.30.0", - "sc-network-transactions", - "sc-rpc", - "sc-rpc-server", - "sc-rpc-spec-v2", - "sc-sysinfo", + "sc-network-transactions 0.30.0", + "sc-rpc 26.0.0", + "sc-rpc-server 10.0.0", + "sc-rpc-spec-v2 0.31.0", + "sc-sysinfo 24.0.0", "sc-telemetry 12.0.0", - "sc-tracing", - "sc-transaction-pool", + "sc-tracing 25.0.0", + "sc-transaction-pool 25.0.0", "sc-transaction-pool-api 25.0.0", "sc-utils 11.0.0", "serde", @@ -11740,11 +13697,75 @@ dependencies = [ "sp-state-machine 0.32.0", "sp-storage 17.0.0", "sp-transaction-pool 23.0.0", - "sp-transaction-storage-proof", + "sp-transaction-storage-proof 23.0.0", "sp-trie 26.0.0", "sp-version 26.0.0", "static_init", - "substrate-prometheus-endpoint 0.16.0", + "substrate-prometheus-endpoint 0.16.0", + "tempfile", + "thiserror", + "tokio", + "tracing", + "tracing-futures", +] + +[[package]] +name = "sc-service" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703bd8b1fc0a137185bfa0b654e04283a58a1d8a2751380e7a0eca919961f150" +dependencies = [ + "async-trait", + "directories", + "exit-future", + "futures", + "futures-timer", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "pin-project", + "rand 0.8.5", + "sc-chain-spec 27.0.0", + "sc-client-api 28.0.0", + "sc-client-db 0.35.0", + "sc-consensus 0.33.0", + "sc-executor 0.32.0", + "sc-informant 0.33.0", + "sc-keystore 25.0.0", + "sc-network 0.34.0", + "sc-network-bitswap 0.33.0", + "sc-network-common 0.33.0", + "sc-network-light 0.33.0", + "sc-network-sync 0.33.0", + "sc-network-transactions 0.33.0", + "sc-rpc 29.0.0", + "sc-rpc-server 11.0.0", + "sc-rpc-spec-v2 0.34.0", + "sc-sysinfo 27.0.0", + "sc-telemetry 15.0.0", + "sc-tracing 28.0.0", + "sc-transaction-pool 28.0.0", + "sc-transaction-pool-api 28.0.0", + "sc-utils 14.0.0", + "serde", + "serde_json", + "sp-api 26.0.0", + "sp-blockchain 28.0.0", + "sp-consensus 0.32.0", + "sp-core 28.0.0", + "sp-externalities 0.25.0", + "sp-keystore 0.34.0", + "sp-runtime 31.0.1", + "sp-session 27.0.0", + "sp-state-machine 0.35.0", + "sp-storage 19.0.0", + "sp-transaction-pool 26.0.0", + "sp-transaction-storage-proof 26.0.0", + "sp-trie 29.0.0", + "sp-version 29.0.0", + "static_init", + "substrate-prometheus-endpoint 0.17.0", "tempfile", "thiserror", "tokio", @@ -11764,6 +13785,38 @@ dependencies = [ "sp-core 25.0.0", ] +[[package]] +name = "sc-state-db" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fac20128b09ac6305aaf482a72c918b35400f3955d7032971df499b0661a5e76" +dependencies = [ + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sp-core 28.0.0", +] + +[[package]] +name = "sc-sync-state-rpc" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb310dce9d2474a74152605dc0ca0f81a46f61ba4e7a39752f1203121f47c0c6" +dependencies = [ + "jsonrpsee", + "parity-scale-codec", + "sc-chain-spec 27.0.0", + "sc-client-api 28.0.0", + "sc-consensus-babe", + "sc-consensus-epochs", + "sc-consensus-grandpa", + "serde", + "serde_json", + "sp-blockchain 28.0.0", + "sp-runtime 31.0.1", + "thiserror", +] + [[package]] name = "sc-sysinfo" version = "24.0.0" @@ -11784,6 +13837,27 @@ dependencies = [ "sp-std 12.0.0", ] +[[package]] +name = "sc-sysinfo" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfc9a5da78281735c6ff3b8d0287e95dcf32fc001415ac20cb2844c0ab4e6d05" +dependencies = [ + "derive_more", + "futures", + "libc", + "log", + "rand 0.8.5", + "rand_pcg", + "regex", + "sc-telemetry 15.0.0", + "serde", + "serde_json", + "sp-core 28.0.0", + "sp-io 30.0.0", + "sp-std 14.0.0", +] + [[package]] name = "sc-telemetry" version = "12.0.0" @@ -11840,7 +13914,7 @@ dependencies = [ "regex", "rustc-hash", "sc-client-api 25.0.0", - "sc-tracing-proc-macro", + "sc-tracing-proc-macro 10.0.0", "serde", "sp-api 23.0.0", "sp-blockchain 25.0.0", @@ -11854,6 +13928,37 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "sc-tracing" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90864e5e042d1238bcb082b0fa73ce58b7eb4897127783dae1dd66eee59cdaef" +dependencies = [ + "ansi_term", + "chrono", + "is-terminal", + "lazy_static", + "libc", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "regex", + "rustc-hash", + "sc-client-api 28.0.0", + "sc-tracing-proc-macro 11.0.0", + "serde", + "sp-api 26.0.0", + "sp-blockchain 28.0.0", + "sp-core 28.0.0", + "sp-rpc 26.0.0", + "sp-runtime 31.0.1", + "sp-tracing 16.0.0", + "thiserror", + "tracing", + "tracing-log", + "tracing-subscriber", +] + [[package]] name = "sc-tracing-proc-macro" version = "10.0.0" @@ -11866,6 +13971,18 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "sc-tracing-proc-macro" +version = "11.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151cdf86d79abf22cf2a240a7ca95041c908dbd96c2ae9a818073042aa210964" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "sc-transaction-pool" version = "25.0.0" @@ -11893,6 +14010,33 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-transaction-pool" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7985fab634814ee28fe3ecd2131fa2cb4c8eee88a7e60f1cd59dc0afa826fe2" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "linked-hash-map", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api 28.0.0", + "sc-transaction-pool-api 28.0.0", + "sc-utils 14.0.0", + "serde", + "sp-api 26.0.0", + "sp-blockchain 28.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-tracing 16.0.0", + "sp-transaction-pool 26.0.0", + "substrate-prometheus-endpoint 0.17.0", + "thiserror", +] + [[package]] name = "sc-transaction-pool-api" version = "25.0.0" @@ -12078,6 +14222,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "seccompiler" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "345a3e4dddf721a478089d4697b83c6c0a8f5bf16086f6c13397e4534eb6e2e5" +dependencies = [ + "libc", +] + [[package]] name = "secp256k1" version = "0.24.3" @@ -12247,6 +14400,17 @@ dependencies = [ "opaque-debug 0.3.0", ] +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + [[package]] name = "sha2" version = "0.8.2" @@ -12393,6 +14557,15 @@ dependencies = [ "sp-std 14.0.0", ] +[[package]] +name = "slotmap" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +dependencies = [ + "version_check", +] + [[package]] name = "smallvec" version = "1.13.1" @@ -12817,7 +14990,7 @@ dependencies = [ "sp-mmr-primitives", "sp-runtime 31.0.1", "sp-std 14.0.0", - "strum", + "strum 0.24.1", ] [[package]] @@ -13206,7 +15379,7 @@ dependencies = [ "lazy_static", "sp-core 25.0.0", "sp-runtime 28.0.0", - "strum", + "strum 0.24.1", ] [[package]] @@ -13217,7 +15390,7 @@ checksum = "98165ce7c625a8cdb88d39c6bbd56fe8b32ada64ed0894032beba99795f557da" dependencies = [ "sp-core 28.0.0", "sp-runtime 31.0.1", - "strum", + "strum 0.24.1", ] [[package]] @@ -13830,6 +16003,22 @@ dependencies = [ "sp-trie 26.0.0", ] +[[package]] +name = "sp-transaction-storage-proof" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b2a2c693bc7ca363c9d2cd412276582aef10c794399aaffbd1fe2351099a1a5" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "sp-core 28.0.0", + "sp-inherents 26.0.0", + "sp-runtime 31.0.1", + "sp-std 14.0.0", + "sp-trie 29.0.0", +] + [[package]] name = "sp-trie" version = "26.0.0" @@ -14020,7 +16209,7 @@ checksum = "a0ef947f358b9c238923f764c72a4a9d42f2d637c46e059dbd319d6e7cfb4f82" dependencies = [ "lazy_static", "maplit", - "strum", + "strum 0.24.1", ] [[package]] @@ -14347,6 +16536,19 @@ dependencies = [ "syn 1.0.109", ] +[[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" @@ -14359,9 +16561,15 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ - "strum_macros", + "strum_macros 0.24.3", ] +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" + [[package]] name = "strum_macros" version = "0.24.3" @@ -14375,6 +16583,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.48", +] + [[package]] name = "substrate-bip39" version = "0.4.5" @@ -14400,6 +16621,26 @@ dependencies = [ "substrate-typenum", ] +[[package]] +name = "substrate-frame-rpc-system" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcee7812a1e1cec85e3095c5d1c1627ceb084c0c81e66c2f9df7cb7b3a5938f3" +dependencies = [ + "frame-system-rpc-runtime-api 26.0.0", + "futures", + "jsonrpsee", + "log", + "parity-scale-codec", + "sc-rpc-api 0.33.0", + "sc-transaction-pool-api 28.0.0", + "sp-api 26.0.0", + "sp-block-builder 26.0.0", + "sp-blockchain 28.0.0", + "sp-core 28.0.0", + "sp-runtime 31.0.1", +] + [[package]] name = "substrate-geohash" version = "0.13.0" @@ -14451,6 +16692,24 @@ dependencies = [ "sp-runtime 31.0.1", ] +[[package]] +name = "substrate-state-trie-migration-rpc" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92c25dcb3e4aee5559c2bd9b4d105786220cad116719d7ebb39e4f359865d44" +dependencies = [ + "jsonrpsee", + "parity-scale-codec", + "sc-client-api 28.0.0", + "sc-rpc-api 0.33.0", + "serde", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "sp-state-machine 0.35.0", + "sp-trie 29.0.0", + "trie-db", +] + [[package]] name = "substrate-typenum" version = "1.16.0" @@ -14473,7 +16732,7 @@ dependencies = [ "filetime", "parity-wasm", "sp-maybe-compressed-blob 9.0.0", - "strum", + "strum 0.24.1", "tempfile", "toml 0.7.8", "walkdir", @@ -14492,7 +16751,7 @@ dependencies = [ "filetime", "parity-wasm", "sp-maybe-compressed-blob 11.0.0", - "strum", + "strum 0.24.1", "tempfile", "toml 0.8.2", "walkdir", @@ -14614,6 +16873,16 @@ 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.28", + "windows-sys 0.48.0", +] + [[package]] name = "termtree" version = "0.4.1" @@ -14640,6 +16909,12 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "thousands" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" + [[package]] name = "thread_local" version = "1.1.7" @@ -15013,10 +17288,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32c0555bd635d9adbf8dec0bf45f7c2aef7541121d648ba37f5f792a211077b6" dependencies = [ "coarsetime", - "polkadot-node-jaeger", + "polkadot-node-jaeger 4.0.0", "polkadot-primitives 4.0.0", "tracing", - "tracing-gum-proc-macro", + "tracing-gum-proc-macro 4.0.0", +] + +[[package]] +name = "tracing-gum" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f134d9dda0e872989ddf57b90ca73bcad27f1fba2cc19cfada7b76549c590b0" +dependencies = [ + "coarsetime", + "polkadot-primitives 7.0.0", + "tracing", + "tracing-gum-proc-macro 5.0.0", ] [[package]] @@ -15032,6 +17319,19 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "tracing-gum-proc-macro" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f074568687ffdfd0adb6005aa8d1d96840197f2c159f80471285f08694cf0ce" +dependencies = [ + "expander 2.0.0", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "tracing-log" version = "0.1.4" @@ -15174,6 +17474,12 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + [[package]] name = "uint" version = "0.9.5" @@ -15432,8 +17738,8 @@ checksum = "fc942673e7684671f0c5708fc18993569d184265fd5223bb51fc8e5b9b6cfd52" dependencies = [ "anyhow", "libc", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", "tempfile", "thiserror", "wasm-opt-cxx-sys", diff --git a/Cargo.toml b/Cargo.toml index 01efeb50b9..daf6373db0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,10 +26,22 @@ members = [ "system-parachains/constants", "system-parachains/encointer", "system-parachains/gluttons/glutton-kusama", - "integration-tests/emulated/assets/asset-hub-kusama", - "integration-tests/emulated/assets/asset-hub-polkadot", - "integration-tests/emulated/chains", - "integration-tests/emulated/common", + "integration-tests/emulated/chains/relays/kusama", + "integration-tests/emulated/chains/relays/polkadot", + "integration-tests/emulated/chains/parachains/assets/asset-hub-kusama", + "integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot", + "integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama", + "integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot", + "integration-tests/emulated/chains/parachains/collectives/collectives-polkadot", + "integration-tests/emulated/chains/parachains/testing/penpal", + "integration-tests/emulated/helpers", + "integration-tests/emulated/networks/kusama-system", + "integration-tests/emulated/networks/polkadot-system", + "integration-tests/emulated/networks/kusama-polkadot-system", + "integration-tests/emulated/tests/assets/asset-hub-kusama", + "integration-tests/emulated/tests/assets/asset-hub-polkadot", + "integration-tests/emulated/tests/bridges/bridge-hub-kusama", + "integration-tests/emulated/tests/bridges/bridge-hub-polkadot", ] [profile.release] diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs b/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs deleted file mode 100644 index c0d8309201..0000000000 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Disable tests when `runtime-benchmarks` is enabled, because of `type MessageProcessor = -// pallet_message_queue::mock_helpers::NoopMessageProcessor`. -#![cfg(not(feature = "runtime-benchmarks"))] - -pub use asset_test_utils::xcm_helpers; -pub use codec::Encode; -pub use emulated_chains::{ - asset_hub_kusama::ED as ASSET_HUB_KUSAMA_ED, kusama::ED as KUSAMA_ED, - AssetHubKusamaPara as AssetHubKusama, AssetHubKusamaParaPallet as AssetHubKusamaPallet, - AssetHubKusamaParaReceiver as AssetHubKusamaReceiver, - AssetHubKusamaParaSender as AssetHubKusamaSender, BridgeHubKusamaPara as BridgeHubKusama, - BridgeHubKusamaParaReceiver as BridgeHubKusamaReceiver, KusamaRelay as Kusama, - KusamaRelayPallet as KusamaPallet, KusamaRelayReceiver as KusamaReceiver, - KusamaRelaySender as KusamaSender, PenpalKusamaAPara as PenpalKusamaA, - PenpalKusamaAParaPallet as PenpalKusamaAPallet, - PenpalKusamaAParaReceiver as PenpalKusamaAReceiver, - PenpalKusamaAParaSender as PenpalKusamaASender, PenpalKusamaBPara as PenpalKusamaB, - PenpalKusamaBParaPallet as PenpalKusamaBPallet, PenpalLocalTeleportableToAssetHub, - PenpalXcmConfig, -}; -pub use frame_support::{ - assert_err, assert_ok, - pallet_prelude::Weight, - sp_runtime::{AccountId32, DispatchError, DispatchResult}, - traits::fungibles::Inspect, -}; -pub use integration_tests_common::{ - test_parachain_is_trusted_teleporter, - xcm_helpers::{non_fee_asset, xcm_transact_paid_execution, xcm_transact_unpaid_execution}, - PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, -}; -pub use parachains_common::{AccountId, Balance}; -pub use xcm::{ - prelude::{AccountId32 as AccountId32Junction, *}, - v3::{Error, NetworkId::Kusama as KusamaId}, -}; -pub use xcm_emulator::{ - assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para, - RelayChain as Relay, Test, TestArgs, TestContext, TestExt, -}; - -pub const ASSET_ID: u32 = 1; -pub const ASSET_MIN_BALANCE: u128 = 1000; -// `Assets` pallet index -pub const ASSETS_PALLET_ID: u8 = 50; - -pub type RelayToSystemParaTest = Test; -pub type RelayToParaTest = Test; -pub type SystemParaToRelayTest = Test; -pub type SystemParaToParaTest = Test; -pub type ParaToSystemParaTest = Test; - -/// Returns a `TestArgs` instance to be used for the Relay Chain across integration tests -pub fn relay_test_args( - dest: MultiLocation, - beneficiary_id: AccountId32, - amount: Balance, -) -> TestArgs { - TestArgs { - dest, - beneficiary: AccountId32Junction { network: None, id: beneficiary_id.into() }.into(), - amount, - assets: (Here, amount).into(), - asset_id: None, - fee_asset_item: 0, - weight_limit: WeightLimit::Unlimited, - } -} - -/// Returns a `TestArgs` instance to be used by parachains across integration tests -pub fn para_test_args( - dest: MultiLocation, - beneficiary_id: AccountId32, - amount: Balance, - assets: MultiAssets, - asset_id: Option, - fee_asset_item: u32, -) -> TestArgs { - TestArgs { - dest, - beneficiary: AccountId32Junction { network: None, id: beneficiary_id.into() }.into(), - amount, - assets, - asset_id, - fee_asset_item, - weight_limit: WeightLimit::Unlimited, - } -} - -#[cfg(test)] -#[cfg(not(feature = "runtime-benchmarks"))] -mod tests; diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml deleted file mode 100644 index 20abd3db11..0000000000 --- a/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml +++ /dev/null @@ -1,35 +0,0 @@ -[package] -name = "asset-hub-polkadot-integration-tests" -version = "1.0.0" -authors.workspace = true -edition.workspace = true -license = "Apache-2.0" -description = "Asset Hub Polkadot runtime integration tests with xcm-emulator" -publish = false - -[dependencies] -codec = { package = "parity-scale-codec", version = "3.6.9" } - -# Substrate -sp-runtime = { version = "31.0.1" } -frame-support = { version = "28.0.0" } -pallet-assets = { version = "29.0.0" } -pallet-balances = { version = "28.0.0" } -pallet-message-queue = { version = "31.0.0" } - -# Polkadot -xcm = { package = "staging-xcm", version = "7.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.0" } -pallet-xcm = { version = "7.0.0" } - -# Cumulus -parachains-common = { version = "7.0.0" } -xcm-emulator = { version = "0.5.0" } -asset-test-utils = { version = "7.0.1" } - -# Local -emulated-chains = { path = "../../chains" } -integration-tests-common = { path = "../../common" } -asset-hub-polkadot-runtime = { path = "../../../../system-parachains/asset-hubs/asset-hub-polkadot" } -polkadot-runtime = { path = "../../../../relay/polkadot" } -system-parachains-constants = { path = "../../../../system-parachains/constants" } diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs b/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs deleted file mode 100644 index f006fc54b3..0000000000 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Disable tests when `runtime-benchmarks` is enabled, because of `type MessageProcessor = -// pallet_message_queue::mock_helpers::NoopMessageProcessor`. -#![cfg(not(feature = "runtime-benchmarks"))] - -pub use asset_test_utils::xcm_helpers; -pub use codec::Encode; -pub use emulated_chains::{ - asset_hub_polkadot::ED as ASSET_HUB_POLKADOT_ED, polkadot::ED as POLKADOT_ED, - AssetHubPolkadotPara as AssetHubPolkadot, AssetHubPolkadotParaPallet as AssetHubPolkadotPallet, - AssetHubPolkadotParaReceiver as AssetHubPolkadotReceiver, - AssetHubPolkadotParaSender as AssetHubPolkadotSender, - BridgeHubPolkadotPara as BridgeHubPolkadot, - BridgeHubPolkadotParaReceiver as BridgeHubPolkadotReceiver, PenpalLocalTeleportableToAssetHub, - PenpalPolkadotAPara as PenpalPolkadotA, PenpalPolkadotAParaPallet as PenpalPolkadotAPallet, - PenpalPolkadotAParaReceiver as PenpalPolkadotAReceiver, - PenpalPolkadotAParaSender as PenpalPolkadotASender, PenpalPolkadotBPara as PenpalPolkadotB, - PenpalPolkadotBParaPallet as PenpalPolkadotBPallet, PenpalXcmConfig, PolkadotRelay as Polkadot, - PolkadotRelayPallet as PolkadotPallet, PolkadotRelayReceiver as PolkadotReceiver, - PolkadotRelaySender as PolkadotSender, -}; -pub use frame_support::{ - assert_err, assert_ok, - pallet_prelude::Weight, - sp_runtime::{AccountId32, DispatchError, DispatchResult}, - traits::fungibles::Inspect, -}; -pub use integration_tests_common::{ - test_parachain_is_trusted_teleporter, - xcm_helpers::{non_fee_asset, xcm_transact_paid_execution, xcm_transact_unpaid_execution}, - PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, -}; -pub use parachains_common::{AccountId, Balance}; -pub use xcm::{ - prelude::{AccountId32 as AccountId32Junction, *}, - v3::{Error, NetworkId::Polkadot as PolkadotId}, -}; -pub use xcm_emulator::{ - assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para, - RelayChain as Relay, Test, TestArgs, TestContext, TestExt, -}; - -pub const ASSET_ID: u32 = 1; -pub const ASSET_MIN_BALANCE: u128 = 1000; -// `Assets` pallet index -pub const ASSETS_PALLET_ID: u8 = 50; - -pub type RelayToSystemParaTest = Test; -pub type RelayToParaTest = Test; -pub type SystemParaToRelayTest = Test; -pub type SystemParaToParaTest = Test; -pub type ParaToSystemParaTest = Test; - -/// Returns a `TestArgs` instance to be used for the Relay Chain across integration tests -pub fn relay_test_args( - dest: MultiLocation, - beneficiary_id: AccountId32, - amount: Balance, -) -> TestArgs { - TestArgs { - dest, - beneficiary: AccountId32Junction { network: None, id: beneficiary_id.into() }.into(), - amount, - assets: (Here, amount).into(), - asset_id: None, - fee_asset_item: 0, - weight_limit: WeightLimit::Unlimited, - } -} - -/// Returns a `TestArgs` instance to be used by parachains across integration tests -pub fn para_test_args( - dest: MultiLocation, - beneficiary_id: AccountId32, - amount: Balance, - assets: MultiAssets, - asset_id: Option, - fee_asset_item: u32, -) -> TestArgs { - TestArgs { - dest, - beneficiary: AccountId32Junction { network: None, id: beneficiary_id.into() }.into(), - amount, - assets, - asset_id, - fee_asset_item, - weight_limit: WeightLimit::Unlimited, - } -} - -#[cfg(test)] -#[cfg(not(feature = "runtime-benchmarks"))] -mod tests; diff --git a/integration-tests/emulated/chains/Cargo.toml b/integration-tests/emulated/chains/Cargo.toml deleted file mode 100644 index 63d3773efb..0000000000 --- a/integration-tests/emulated/chains/Cargo.toml +++ /dev/null @@ -1,44 +0,0 @@ -[package] -name = "emulated-chains" -version = "1.0.0" -authors.workspace = true -edition.workspace = true -license = "Apache-2.0" -description = "Definitions of the fellows emulated relay+para runtimes" - -[dependencies] - -# Substrate -grandpa-primitives = { package = "sp-consensus-grandpa", version = "13.0.0" } -sp-authority-discovery = { version = "26.0.0" } -sp-runtime = { version = "31.0.1" } -frame-support = { version = "28.0.0" } -sp-core = { version = "28.0.0" } -sp-consensus-babe = { version = "0.32.0" } -pallet-im-online = { version = "27.0.0" } -pallet-staking = { version = "28.0.0" } -beefy-primitives = { package = "sp-consensus-beefy", version = "13.0.0" } - -# Polkadot -polkadot-primitives = { version = "7.0.0" } -polkadot-runtime-parachains = { version = "7.0.0" } -polkadot-parachain-primitives = { version = "6.0.0" } - -# Cumulus -parachains-common = { version = "7.0.0" } -cumulus-primitives-core = { version = "0.7.0" } -xcm-emulator = { version = "0.5.0" } -penpal-runtime = { version = "0.14.3" } - -# Local runtimes -kusama-runtime = { package = "staging-kusama-runtime", path = "../../../relay/kusama" } -kusama-runtime-constants = { path = "../../../relay/kusama/constants" } -polkadot-runtime = { path = "../../../relay/polkadot" } -polkadot-runtime-constants = { path = "../../../relay/polkadot/constants" } -asset-hub-polkadot-runtime = { path = "../../../system-parachains/asset-hubs/asset-hub-polkadot" } -asset-hub-kusama-runtime = { path = "../../../system-parachains/asset-hubs/asset-hub-kusama" } -collectives-polkadot-runtime = { path = "../../../system-parachains/collectives/collectives-polkadot" } -bridge-hub-polkadot-runtime = { path = "../../../system-parachains/bridge-hubs/bridge-hub-polkadot" } -bridge-hub-kusama-runtime = { path = "../../../system-parachains/bridge-hubs/bridge-hub-kusama" } -# TODO: replace with `emulated-integration-tests-common@X.Y.Z` from `polkadot-sdk` -integration-tests-common = { path = "../common" } diff --git a/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/Cargo.toml b/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/Cargo.toml new file mode 100644 index 0000000000..0b4f070c48 --- /dev/null +++ b/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "asset-hub-kusama-emulated-chain" +version = "0.0.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Asset Hub Kusama emulated chain used for integration tests" +publish = false + +[dependencies] +serde_json = "1.0.111" + +# Substrate +sp-core = { version = "28.0.0" } +sp-runtime = { version = "31.0.1" } +frame-support = { version = "28.0.0" } + +# Cumulus +parachains-common = { version = "7.0.0" } +cumulus-primitives-core = { version = "0.7.0" } +emulated-integration-tests-common = { version = "3.0.0" } + +# Runtimes +asset-hub-kusama-runtime = { path = "../../../../../../system-parachains/asset-hubs/asset-hub-kusama" } +kusama-emulated-chain = { path = "../../../relays/kusama" } +system-parachains-constants = { path = "../../../../../../system-parachains/constants" } diff --git a/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/src/genesis.rs b/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/src/genesis.rs new file mode 100644 index 0000000000..d49faa57f5 --- /dev/null +++ b/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/src/genesis.rs @@ -0,0 +1,71 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Substrate +use sp_core::storage::Storage; + +// Cumulus +use emulated_integration_tests_common::{ + accounts, build_genesis_storage, collators, SAFE_XCM_VERSION, +}; +use parachains_common::Balance; + +pub const PARA_ID: u32 = 1000; +pub const ED: Balance = + system_parachains_constants::kusama::currency::SYSTEM_PARA_EXISTENTIAL_DEPOSIT; + +pub fn genesis() -> Storage { + let genesis_config = asset_hub_kusama_runtime::RuntimeGenesisConfig { + system: asset_hub_kusama_runtime::SystemConfig::default(), + balances: asset_hub_kusama_runtime::BalancesConfig { + balances: accounts::init_balances() + .iter() + .cloned() + .map(|k| (k, ED * 4096 * 4096)) + .collect(), + }, + parachain_info: asset_hub_kusama_runtime::ParachainInfoConfig { + parachain_id: PARA_ID.into(), + ..Default::default() + }, + collator_selection: asset_hub_kusama_runtime::CollatorSelectionConfig { + invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: ED * 16, + ..Default::default() + }, + session: asset_hub_kusama_runtime::SessionConfig { + keys: collators::invulnerables() + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + asset_hub_kusama_runtime::SessionKeys { aura }, // session keys + ) + }) + .collect(), + }, + polkadot_xcm: asset_hub_kusama_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + ..Default::default() + }; + + build_genesis_storage( + &genesis_config, + asset_hub_kusama_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"), + ) +} diff --git a/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/src/lib.rs b/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/src/lib.rs new file mode 100644 index 0000000000..775e575e7e --- /dev/null +++ b/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/src/lib.rs @@ -0,0 +1,59 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod genesis; + +// Substrate +use frame_support::traits::OnInitialize; + +// Cumulus +use emulated_integration_tests_common::{ + impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain, + impl_assets_helpers_for_parachain, impl_foreign_assets_helpers_for_parachain, + impl_xcm_helpers_for_parachain, impls::Parachain, xcm_emulator::decl_test_parachains, +}; +use kusama_emulated_chain::Kusama; + +// AssetHubKusama Parachain declaration +decl_test_parachains! { + pub struct AssetHubKusama { + genesis = genesis::genesis(), + on_init = { + asset_hub_kusama_runtime::AuraExt::on_initialize(1); + }, + runtime = asset_hub_kusama_runtime, + core = { + XcmpMessageHandler: asset_hub_kusama_runtime::XcmpQueue, + LocationToAccountId: asset_hub_kusama_runtime::xcm_config::LocationToAccountId, + ParachainInfo: asset_hub_kusama_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, + }, + pallets = { + PolkadotXcm: asset_hub_kusama_runtime::PolkadotXcm, + Assets: asset_hub_kusama_runtime::Assets, + ForeignAssets: asset_hub_kusama_runtime::ForeignAssets, + PoolAssets: asset_hub_kusama_runtime::PoolAssets, + AssetConversion: asset_hub_kusama_runtime::AssetConversion, + Balances: asset_hub_kusama_runtime::Balances, + } + }, +} + +// AssetHubKusama implementation +impl_accounts_helpers_for_parachain!(AssetHubKusama); +impl_assert_events_helpers_for_parachain!(AssetHubKusama); +impl_assets_helpers_for_parachain!(AssetHubKusama, Kusama); +impl_foreign_assets_helpers_for_parachain!(AssetHubKusama, Kusama); +impl_xcm_helpers_for_parachain!(AssetHubKusama); diff --git a/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/Cargo.toml new file mode 100644 index 0000000000..ed81adc3b2 --- /dev/null +++ b/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "asset-hub-polkadot-emulated-chain" +version = "0.0.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Asset Hub Polkadot emulated chain used for integration tests" +publish = false + +[dependencies] +serde_json = "1.0.111" + +# Substrate +sp-core = { version = "28.0.0" } +sp-runtime = { version = "31.0.1" } +frame-support = { version = "28.0.0" } + +# Cumulus +parachains-common = { version = "7.0.0" } +cumulus-primitives-core = { version = "0.7.0" } +emulated-integration-tests-common = { version = "3.0.0" } + +# Runtimes +asset-hub-polkadot-runtime = { path = "../../../../../../system-parachains/asset-hubs/asset-hub-polkadot" } +polkadot-emulated-chain = { path = "../../../relays/polkadot" } +system-parachains-constants = { path = "../../../../../../system-parachains/constants" } diff --git a/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/src/genesis.rs b/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/src/genesis.rs new file mode 100644 index 0000000000..1385e66954 --- /dev/null +++ b/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/src/genesis.rs @@ -0,0 +1,68 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Substrate +use sp_core::storage::Storage; + +// Cumulus +use emulated_integration_tests_common::{ + accounts, build_genesis_storage, collators, SAFE_XCM_VERSION, +}; +use parachains_common::Balance; + +pub const PARA_ID: u32 = 1000; +pub const ED: Balance = + system_parachains_constants::polkadot::currency::SYSTEM_PARA_EXISTENTIAL_DEPOSIT; + +pub fn genesis() -> Storage { + let genesis_config = asset_hub_polkadot_runtime::RuntimeGenesisConfig { + system: asset_hub_polkadot_runtime::SystemConfig::default(), + balances: asset_hub_polkadot_runtime::BalancesConfig { + balances: accounts::init_balances().iter().cloned().map(|k| (k, ED * 4096)).collect(), + }, + parachain_info: asset_hub_polkadot_runtime::ParachainInfoConfig { + parachain_id: PARA_ID.into(), + ..Default::default() + }, + collator_selection: asset_hub_polkadot_runtime::CollatorSelectionConfig { + invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: ED * 16, + ..Default::default() + }, + session: asset_hub_polkadot_runtime::SessionConfig { + keys: collators::invulnerables_asset_hub_polkadot() + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + asset_hub_polkadot_runtime::SessionKeys { aura }, // session keys + ) + }) + .collect(), + }, + polkadot_xcm: asset_hub_polkadot_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + ..Default::default() + }; + + build_genesis_storage( + &genesis_config, + asset_hub_polkadot_runtime::WASM_BINARY + .expect("WASM binary was not built, please build it!"), + ) +} diff --git a/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/src/lib.rs b/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/src/lib.rs new file mode 100644 index 0000000000..b0f35b3a6c --- /dev/null +++ b/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/src/lib.rs @@ -0,0 +1,57 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod genesis; + +// Substrate +use frame_support::traits::OnInitialize; + +// Cumulus +use emulated_integration_tests_common::{ + impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain, + impl_assets_helpers_for_parachain, impl_foreign_assets_helpers_for_parachain, + impl_xcm_helpers_for_parachain, impls::Parachain, xcm_emulator::decl_test_parachains, +}; +use polkadot_emulated_chain::Polkadot; + +// AssetHubPolkadot Parachain declaration +decl_test_parachains! { + pub struct AssetHubPolkadot { + genesis = genesis::genesis(), + on_init = { + asset_hub_polkadot_runtime::AuraExt::on_initialize(1); + }, + runtime = asset_hub_polkadot_runtime, + core = { + XcmpMessageHandler: asset_hub_polkadot_runtime::XcmpQueue, + LocationToAccountId: asset_hub_polkadot_runtime::xcm_config::LocationToAccountId, + ParachainInfo: asset_hub_polkadot_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, + }, + pallets = { + PolkadotXcm: asset_hub_polkadot_runtime::PolkadotXcm, + Balances: asset_hub_polkadot_runtime::Balances, + Assets: asset_hub_polkadot_runtime::Assets, + ForeignAssets: asset_hub_polkadot_runtime::ForeignAssets, + } + }, +} + +// AssetHubPolkadot implementation +impl_accounts_helpers_for_parachain!(AssetHubPolkadot); +impl_assert_events_helpers_for_parachain!(AssetHubPolkadot); +impl_assets_helpers_for_parachain!(AssetHubPolkadot, Polkadot); +impl_foreign_assets_helpers_for_parachain!(AssetHubPolkadot, Polkadot); +impl_xcm_helpers_for_parachain!(AssetHubPolkadot); diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml new file mode 100644 index 0000000000..09af5a3ef5 --- /dev/null +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "bridge-hub-kusama-emulated-chain" +version = "0.0.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Bridge Hub Kusama emulated chain used for integration tests" +publish = false + +[dependencies] +serde_json = "1.0.111" + +# Substrate +sp-core = { version = "28.0.0" } +sp-runtime = { version = "31.0.1" } +frame-support = { version = "28.0.0" } + +# Cumulus +parachains-common = { version = "7.0.0" } +cumulus-primitives-core = { version = "0.7.0" } +emulated-integration-tests-common = { version = "3.0.0" } + +# Runtimes +bridge-hub-kusama-runtime = { path = "../../../../../../system-parachains/bridge-hubs/bridge-hub-kusama" } +system-parachains-constants = { path = "../../../../../../system-parachains/constants" } diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/genesis.rs b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/genesis.rs new file mode 100644 index 0000000000..b9f217c38f --- /dev/null +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/genesis.rs @@ -0,0 +1,77 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Substrate +use sp_core::{sr25519, storage::Storage}; + +// Cumulus +use emulated_integration_tests_common::{ + accounts, build_genesis_storage, collators, get_account_id_from_seed, SAFE_XCM_VERSION, +}; +use parachains_common::Balance; + +pub const ASSETHUB_PARA_ID: u32 = 1000; +pub const PARA_ID: u32 = 1002; +pub const ED: Balance = + system_parachains_constants::kusama::currency::SYSTEM_PARA_EXISTENTIAL_DEPOSIT; + +pub fn genesis() -> Storage { + let genesis_config = bridge_hub_kusama_runtime::RuntimeGenesisConfig { + system: bridge_hub_kusama_runtime::SystemConfig::default(), + balances: bridge_hub_kusama_runtime::BalancesConfig { + balances: accounts::init_balances().iter().cloned().map(|k| (k, ED * 4096)).collect(), + }, + parachain_info: bridge_hub_kusama_runtime::ParachainInfoConfig { + parachain_id: PARA_ID.into(), + ..Default::default() + }, + collator_selection: bridge_hub_kusama_runtime::CollatorSelectionConfig { + invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: ED * 16, + ..Default::default() + }, + session: bridge_hub_kusama_runtime::SessionConfig { + keys: collators::invulnerables() + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + bridge_hub_kusama_runtime::SessionKeys { aura }, // session keys + ) + }) + .collect(), + }, + polkadot_xcm: bridge_hub_kusama_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + bridge_polkadot_grandpa: bridge_hub_kusama_runtime::BridgePolkadotGrandpaConfig { + owner: Some(get_account_id_from_seed::(accounts::BOB)), + ..Default::default() + }, + bridge_polkadot_messages: bridge_hub_kusama_runtime::BridgePolkadotMessagesConfig { + owner: Some(get_account_id_from_seed::(accounts::BOB)), + ..Default::default() + }, + ..Default::default() + }; + + build_genesis_storage( + &genesis_config, + bridge_hub_kusama_runtime::WASM_BINARY + .expect("WASM binary was not built, please build it!"), + ) +} diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/lib.rs b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/lib.rs new file mode 100644 index 0000000000..1504f90852 --- /dev/null +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/lib.rs @@ -0,0 +1,51 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod genesis; + +// Substrate +use frame_support::traits::OnInitialize; + +// Cumulus +use emulated_integration_tests_common::{ + impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain, + impl_xcm_helpers_for_parachain, impls::Parachain, xcm_emulator::decl_test_parachains, +}; + +// BridgeHubKusama Parachain declaration +decl_test_parachains! { + pub struct BridgeHubKusama { + genesis = genesis::genesis(), + on_init = { + bridge_hub_kusama_runtime::AuraExt::on_initialize(1); + }, + runtime = bridge_hub_kusama_runtime, + core = { + XcmpMessageHandler: bridge_hub_kusama_runtime::XcmpQueue, + LocationToAccountId: bridge_hub_kusama_runtime::xcm_config::LocationToAccountId, + ParachainInfo: bridge_hub_kusama_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, + }, + pallets = { + PolkadotXcm: bridge_hub_kusama_runtime::PolkadotXcm, + Balances: bridge_hub_kusama_runtime::Balances, + } + }, +} + +// BridgeHubKusama implementation +impl_accounts_helpers_for_parachain!(BridgeHubKusama); +impl_assert_events_helpers_for_parachain!(BridgeHubKusama); +impl_xcm_helpers_for_parachain!(BridgeHubKusama); diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/Cargo.toml b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/Cargo.toml new file mode 100644 index 0000000000..904d6688c7 --- /dev/null +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "bridge-hub-polkadot-emulated-chain" +version = "0.0.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Bridge Hub Polkadot emulated chain used for integration tests" +publish = false + +[dependencies] +serde_json = "1.0.111" + +# Substrate +sp-core = { version = "28.0.0" } +sp-runtime = { version = "31.0.1" } +frame-support = { version = "28.0.0" } + +# Cumulus +parachains-common = { version = "7.0.0" } +cumulus-primitives-core = { version = "0.7.0" } +emulated-integration-tests-common = { version = "3.0.0" } + +# Runtimes +bridge-hub-polkadot-runtime = { path = "../../../../../../system-parachains/bridge-hubs/bridge-hub-polkadot" } +system-parachains-constants = { path = "../../../../../../system-parachains/constants" } diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/genesis.rs b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/genesis.rs new file mode 100644 index 0000000000..30b28c27d2 --- /dev/null +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/genesis.rs @@ -0,0 +1,76 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Substrate +use sp_core::{sr25519, storage::Storage}; + +// Cumulus +use emulated_integration_tests_common::{ + accounts, build_genesis_storage, collators, get_account_id_from_seed, SAFE_XCM_VERSION, +}; +use parachains_common::Balance; + +pub const PARA_ID: u32 = 1002; +pub const ED: Balance = + system_parachains_constants::polkadot::currency::SYSTEM_PARA_EXISTENTIAL_DEPOSIT; + +pub fn genesis() -> Storage { + let genesis_config = bridge_hub_polkadot_runtime::RuntimeGenesisConfig { + system: bridge_hub_polkadot_runtime::SystemConfig::default(), + balances: bridge_hub_polkadot_runtime::BalancesConfig { + balances: accounts::init_balances().iter().cloned().map(|k| (k, ED * 4096)).collect(), + }, + parachain_info: bridge_hub_polkadot_runtime::ParachainInfoConfig { + parachain_id: PARA_ID.into(), + ..Default::default() + }, + collator_selection: bridge_hub_polkadot_runtime::CollatorSelectionConfig { + invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: ED * 16, + ..Default::default() + }, + session: bridge_hub_polkadot_runtime::SessionConfig { + keys: collators::invulnerables() + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + bridge_hub_polkadot_runtime::SessionKeys { aura }, // session keys + ) + }) + .collect(), + }, + polkadot_xcm: bridge_hub_polkadot_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + bridge_kusama_grandpa: bridge_hub_polkadot_runtime::BridgeKusamaGrandpaConfig { + owner: Some(get_account_id_from_seed::(accounts::BOB)), + ..Default::default() + }, + bridge_kusama_messages: bridge_hub_polkadot_runtime::BridgeKusamaMessagesConfig { + owner: Some(get_account_id_from_seed::(accounts::BOB)), + ..Default::default() + }, + ..Default::default() + }; + + build_genesis_storage( + &genesis_config, + bridge_hub_polkadot_runtime::WASM_BINARY + .expect("WASM binary was not built, please build it!"), + ) +} diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/lib.rs b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/lib.rs new file mode 100644 index 0000000000..c448eb7f98 --- /dev/null +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/lib.rs @@ -0,0 +1,51 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod genesis; + +// Substrate +use frame_support::traits::OnInitialize; + +// Cumulus +use emulated_integration_tests_common::{ + impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain, + impl_xcm_helpers_for_parachain, impls::Parachain, xcm_emulator::decl_test_parachains, +}; + +// BridgeHubPolkadot Parachain declaration +decl_test_parachains! { + pub struct BridgeHubPolkadot { + genesis = genesis::genesis(), + on_init = { + bridge_hub_polkadot_runtime::AuraExt::on_initialize(1); + }, + runtime = bridge_hub_polkadot_runtime, + core = { + XcmpMessageHandler: bridge_hub_polkadot_runtime::XcmpQueue, + LocationToAccountId: bridge_hub_polkadot_runtime::xcm_config::LocationToAccountId, + ParachainInfo: bridge_hub_polkadot_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, + }, + pallets = { + PolkadotXcm: bridge_hub_polkadot_runtime::PolkadotXcm, + Balances: bridge_hub_polkadot_runtime::Balances, + } + }, +} + +// BridgeHubPolkadot implementation +impl_accounts_helpers_for_parachain!(BridgeHubPolkadot); +impl_assert_events_helpers_for_parachain!(BridgeHubPolkadot); +impl_xcm_helpers_for_parachain!(BridgeHubPolkadot); diff --git a/integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/Cargo.toml b/integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/Cargo.toml new file mode 100644 index 0000000000..e5111a89d6 --- /dev/null +++ b/integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "collectives-polkadot-emulated-chain" +version = "0.0.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Collectives Polkadot emulated chain used for integration tests" +publish = false + +[dependencies] +serde_json = "1.0.111" + +# Substrate +sp-core = { version = "28.0.0" } +sp-runtime = { version = "31.0.1" } +frame-support = { version = "28.0.0" } + +# Cumulus +parachains-common = { version = "7.0.0" } +cumulus-primitives-core = { version = "0.7.0" } +emulated-integration-tests-common = { version = "3.0.0" } + +# Runtimes +collectives-polkadot-runtime = { path = "../../../../../../system-parachains/collectives/collectives-polkadot" } +system-parachains-constants = { path = "../../../../../../system-parachains/constants" } diff --git a/integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/src/genesis.rs b/integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/src/genesis.rs new file mode 100644 index 0000000000..c1e1fc03e0 --- /dev/null +++ b/integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/src/genesis.rs @@ -0,0 +1,68 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Substrate +use sp_core::storage::Storage; + +// Cumulus +use emulated_integration_tests_common::{ + accounts, build_genesis_storage, collators, SAFE_XCM_VERSION, +}; +use parachains_common::Balance; + +pub const PARA_ID: u32 = 1001; +pub const ED: Balance = + system_parachains_constants::polkadot::currency::SYSTEM_PARA_EXISTENTIAL_DEPOSIT; + +pub fn genesis() -> Storage { + let genesis_config = collectives_polkadot_runtime::RuntimeGenesisConfig { + system: collectives_polkadot_runtime::SystemConfig::default(), + balances: collectives_polkadot_runtime::BalancesConfig { + balances: accounts::init_balances().iter().cloned().map(|k| (k, ED * 4096)).collect(), + }, + parachain_info: collectives_polkadot_runtime::ParachainInfoConfig { + parachain_id: PARA_ID.into(), + ..Default::default() + }, + collator_selection: collectives_polkadot_runtime::CollatorSelectionConfig { + invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: ED * 16, + ..Default::default() + }, + session: collectives_polkadot_runtime::SessionConfig { + keys: collators::invulnerables() + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + collectives_polkadot_runtime::SessionKeys { aura }, // session keys + ) + }) + .collect(), + }, + polkadot_xcm: collectives_polkadot_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + ..Default::default() + }; + + build_genesis_storage( + &genesis_config, + collectives_polkadot_runtime::WASM_BINARY + .expect("WASM binary was not built, please build it!"), + ) +} diff --git a/integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/src/lib.rs b/integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/src/lib.rs new file mode 100644 index 0000000000..d8ffbdcaf6 --- /dev/null +++ b/integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/src/lib.rs @@ -0,0 +1,52 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod genesis; + +// Substrate +use frame_support::traits::OnInitialize; + +// Cumulus +use emulated_integration_tests_common::{ + impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain, + impls::Parachain, xcm_emulator::decl_test_parachains, +}; + +// CollectivesPolkadot Parachain declaration +decl_test_parachains! { + pub struct CollectivesPolkadot { + genesis = genesis::genesis(), + on_init = { + collectives_polkadot_runtime::AuraExt::on_initialize(1); + }, + runtime = collectives_polkadot_runtime, + core = { + XcmpMessageHandler: collectives_polkadot_runtime::XcmpQueue, + LocationToAccountId: collectives_polkadot_runtime::xcm_config::LocationToAccountId, + ParachainInfo: collectives_polkadot_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, + }, + pallets = { + PolkadotXcm: collectives_polkadot_runtime::PolkadotXcm, + Balances: collectives_polkadot_runtime::Balances, + FellowshipTreasury: collectives_polkadot_runtime::FellowshipTreasury, + AssetRate: collectives_polkadot_runtime::AssetRate, + } + }, +} + +// CollectivesPolkadot implementation +impl_accounts_helpers_for_parachain!(CollectivesPolkadot); +impl_assert_events_helpers_for_parachain!(CollectivesPolkadot); diff --git a/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml b/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml new file mode 100644 index 0000000000..8e0b34ec9b --- /dev/null +++ b/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "penpal-emulated-chain" +version = "0.0.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Penpal emulated chain used for integration tests" +publish = false + +[dependencies] +serde_json = "1.0.111" + +# Substrate +sp-core = { version = "28.0.0" } +sp-runtime = { version = "31.0.1" } +frame-support = { version = "28.0.0" } + +# Cumulus +emulated-integration-tests-common = { version = "3.0.0" } +cumulus-primitives-core = { version = "0.7.0" } +parachains-common = { version = "7.0.0" } +penpal-runtime = { version = "0.14.0" } + +# Runtimes +kusama-emulated-chain = { path = "../../../relays/kusama" } +polkadot-emulated-chain = { path = "../../../relays/polkadot" } diff --git a/integration-tests/emulated/chains/parachains/testing/penpal/src/genesis.rs b/integration-tests/emulated/chains/parachains/testing/penpal/src/genesis.rs new file mode 100644 index 0000000000..9ab32a977d --- /dev/null +++ b/integration-tests/emulated/chains/parachains/testing/penpal/src/genesis.rs @@ -0,0 +1,71 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Substrate +use sp_core::{sr25519, storage::Storage}; + +// Cumulus +use emulated_integration_tests_common::{ + accounts, build_genesis_storage, collators, get_account_id_from_seed, SAFE_XCM_VERSION, +}; +use parachains_common::Balance; + +// Penpal +pub const PARA_ID_A: u32 = 2000; +pub const PARA_ID_B: u32 = 2001; +pub const ED: Balance = penpal_runtime::EXISTENTIAL_DEPOSIT; + +pub fn genesis(para_id: u32) -> Storage { + let genesis_config = penpal_runtime::RuntimeGenesisConfig { + system: penpal_runtime::SystemConfig::default(), + balances: penpal_runtime::BalancesConfig { + balances: accounts::init_balances().iter().cloned().map(|k| (k, ED * 4096)).collect(), + }, + parachain_info: penpal_runtime::ParachainInfoConfig { + parachain_id: para_id.into(), + ..Default::default() + }, + collator_selection: penpal_runtime::CollatorSelectionConfig { + invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: ED * 16, + ..Default::default() + }, + session: penpal_runtime::SessionConfig { + keys: collators::invulnerables() + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + penpal_runtime::SessionKeys { aura }, // session keys + ) + }) + .collect(), + }, + polkadot_xcm: penpal_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + sudo: penpal_runtime::SudoConfig { + key: Some(get_account_id_from_seed::("Alice")), + }, + ..Default::default() + }; + + build_genesis_storage( + &genesis_config, + penpal_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"), + ) +} diff --git a/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs b/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs new file mode 100644 index 0000000000..30d6e7bfad --- /dev/null +++ b/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs @@ -0,0 +1,79 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +mod genesis; +pub use genesis::{genesis, ED, PARA_ID_A, PARA_ID_B}; +pub use penpal_runtime::xcm_config::{LocalTeleportableToAssetHub, XcmConfig}; + +// Substrate +use frame_support::traits::OnInitialize; + +// Cumulus +use emulated_integration_tests_common::{ + impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain, + impl_assets_helpers_for_parachain, impls::Parachain, xcm_emulator::decl_test_parachains, +}; +use kusama_emulated_chain::Kusama; +use polkadot_emulated_chain::Polkadot; + +// Penpal Parachain declaration +decl_test_parachains! { + pub struct PenpalA { + genesis = genesis(PARA_ID_A), + on_init = { + penpal_runtime::AuraExt::on_initialize(1); + }, + runtime = penpal_runtime, + core = { + XcmpMessageHandler: penpal_runtime::XcmpQueue, + LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, + ParachainInfo: penpal_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, + }, + pallets = { + PolkadotXcm: penpal_runtime::PolkadotXcm, + Assets: penpal_runtime::Assets, + ForeignAssets: penpal_runtime::ForeignAssets, + Balances: penpal_runtime::Balances, + } + }, + pub struct PenpalB { + genesis = genesis(PARA_ID_B), + on_init = { + penpal_runtime::AuraExt::on_initialize(1); + }, + runtime = penpal_runtime, + core = { + XcmpMessageHandler: penpal_runtime::XcmpQueue, + LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, + ParachainInfo: penpal_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, + }, + pallets = { + PolkadotXcm: penpal_runtime::PolkadotXcm, + Assets: penpal_runtime::Assets, + ForeignAssets: penpal_runtime::ForeignAssets, + Balances: penpal_runtime::Balances, + } + }, +} + +// Penpal implementation +impl_accounts_helpers_for_parachain!(PenpalA); +impl_accounts_helpers_for_parachain!(PenpalB); +impl_assets_helpers_for_parachain!(PenpalA, Kusama); +impl_assets_helpers_for_parachain!(PenpalB, Polkadot); +impl_assert_events_helpers_for_parachain!(PenpalA); +impl_assert_events_helpers_for_parachain!(PenpalB); diff --git a/integration-tests/emulated/chains/relays/kusama/Cargo.toml b/integration-tests/emulated/chains/relays/kusama/Cargo.toml new file mode 100644 index 0000000000..79040a6c8a --- /dev/null +++ b/integration-tests/emulated/chains/relays/kusama/Cargo.toml @@ -0,0 +1,31 @@ +[package] +name = "kusama-emulated-chain" +version = "1.0.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Kusama emulated chain used for integration tests" +publish = false + +[dependencies] +serde_json = "1.0.111" + +# Substrate +sp-core = { version = "28.0.0" } +sp-runtime = { version = "31.0.1" } +authority-discovery-primitives = { package = "sp-authority-discovery", version = "26.0.0" } +babe-primitives = { package = "sp-consensus-babe", version = "0.32.0" } +beefy-primitives = { package = "sp-consensus-beefy", version = "13.0.0" } +grandpa = { package = "sc-consensus-grandpa", version = "0.19.0" } +pallet-im-online = { version = "27.0.0" } + +# Polkadot +polkadot-primitives = { version = "7.0.0" } + +# Cumulus +parachains-common = { version = "7.0.0" } +emulated-integration-tests-common = { version = "3.0.0" } + +# Runtimes +kusama-runtime-constants = { path = "../../../../../relay/kusama/constants" } +kusama-runtime = { package = "staging-kusama-runtime", path = "../../../../../relay/kusama" } diff --git a/integration-tests/emulated/chains/relays/kusama/src/genesis.rs b/integration-tests/emulated/chains/relays/kusama/src/genesis.rs new file mode 100644 index 0000000000..ca1b016511 --- /dev/null +++ b/integration-tests/emulated/chains/relays/kusama/src/genesis.rs @@ -0,0 +1,127 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Substrate +use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; +use babe_primitives::AuthorityId as BabeId; +use beefy_primitives::ecdsa_crypto::AuthorityId as BeefyId; +use grandpa::AuthorityId as GrandpaId; +use pallet_im_online::sr25519::AuthorityId as ImOnlineId; +use sp_core::{sr25519, storage::Storage}; + +// Polkadot +use polkadot_primitives::{AssignmentId, ValidatorId}; + +// Cumulus +use emulated_integration_tests_common::{ + accounts, build_genesis_storage, get_account_id_from_seed, get_from_seed, get_host_config, +}; +use kusama_runtime_constants::currency::UNITS as KSM; +use parachains_common::Balance; + +pub const ED: Balance = kusama_runtime_constants::currency::EXISTENTIAL_DEPOSIT; +const ENDOWMENT: u128 = 1_000_000 * KSM; + +mod validators { + use super::*; + use parachains_common::AccountId; + + pub fn initial_authorities() -> Vec<( + AccountId, + AccountId, + BabeId, + GrandpaId, + ImOnlineId, + ValidatorId, + AssignmentId, + AuthorityDiscoveryId, + BeefyId, + )> { + let seed = "Alice"; + vec![( + get_account_id_from_seed::(&format!("{}//stash", seed)), + get_account_id_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + )] + } +} + +fn session_keys( + babe: BabeId, + grandpa: GrandpaId, + im_online: ImOnlineId, + para_validator: ValidatorId, + para_assignment: AssignmentId, + authority_discovery: AuthorityDiscoveryId, + beefy: BeefyId, +) -> kusama_runtime::SessionKeys { + kusama_runtime::SessionKeys { + grandpa, + babe, + im_online, + para_validator, + para_assignment, + authority_discovery, + beefy, + } +} + +pub fn genesis() -> Storage { + let genesis_config = kusama_runtime::RuntimeGenesisConfig { + system: kusama_runtime::SystemConfig::default(), + balances: kusama_runtime::BalancesConfig { + balances: accounts::init_balances().iter().map(|k| (k.clone(), ENDOWMENT)).collect(), + }, + session: kusama_runtime::SessionConfig { + keys: validators::initial_authorities() + .iter() + .map(|x| { + ( + x.0.clone(), + x.0.clone(), + session_keys( + x.2.clone(), + x.3.clone(), + x.4.clone(), + x.5.clone(), + x.6.clone(), + x.7.clone(), + x.8.clone(), + ), + ) + }) + .collect::>(), + }, + babe: kusama_runtime::BabeConfig { + authorities: Default::default(), + epoch_config: Some(kusama_runtime::BABE_GENESIS_EPOCH_CONFIG), + ..Default::default() + }, + configuration: kusama_runtime::ConfigurationConfig { config: get_host_config() }, + registrar: kusama_runtime::RegistrarConfig { + next_free_para_id: polkadot_primitives::LOWEST_PUBLIC_ID, + ..Default::default() + }, + ..Default::default() + }; + + build_genesis_storage(&genesis_config, kusama_runtime::WASM_BINARY.unwrap()) +} diff --git a/integration-tests/emulated/chains/relays/kusama/src/lib.rs b/integration-tests/emulated/chains/relays/kusama/src/lib.rs new file mode 100644 index 0000000000..58e82a51d0 --- /dev/null +++ b/integration-tests/emulated/chains/relays/kusama/src/lib.rs @@ -0,0 +1,49 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod genesis; + +// Cumulus +use emulated_integration_tests_common::{ + impl_accounts_helpers_for_relay_chain, impl_assert_events_helpers_for_relay_chain, + impl_hrmp_channels_helpers_for_relay_chain, impl_send_transact_helpers_for_relay_chain, + xcm_emulator::decl_test_relay_chains, +}; +use polkadot_primitives::runtime_api::runtime_decl_for_parachain_host::ParachainHostV9; + +// Kusama declaration +decl_test_relay_chains! { + #[api_version(10)] + pub struct Kusama { + genesis = genesis::genesis(), + on_init = (), + runtime = kusama_runtime, + core = { + SovereignAccountOf: kusama_runtime::xcm_config::SovereignAccountOf, + }, + pallets = { + XcmPallet: kusama_runtime::XcmPallet, + Balances: kusama_runtime::Balances, + Hrmp: kusama_runtime::Hrmp, + Identity: kusama_runtime::Identity, + } + }, +} + +// Kusama implementation +impl_accounts_helpers_for_relay_chain!(Kusama); +impl_assert_events_helpers_for_relay_chain!(Kusama); +impl_hrmp_channels_helpers_for_relay_chain!(Kusama); +impl_send_transact_helpers_for_relay_chain!(Kusama); diff --git a/integration-tests/emulated/chains/relays/polkadot/Cargo.toml b/integration-tests/emulated/chains/relays/polkadot/Cargo.toml new file mode 100644 index 0000000000..a161064a15 --- /dev/null +++ b/integration-tests/emulated/chains/relays/polkadot/Cargo.toml @@ -0,0 +1,32 @@ +[package] +name = "polkadot-emulated-chain" +version = "1.0.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Polkadot emulated chain used for integration tests" +publish = false + +[dependencies] +serde_json = "1.0.111" + +# Substrate +sp-core = { version = "28.0.0" } +sp-runtime = { version = "31.0.1" } +authority-discovery-primitives = { package = "sp-authority-discovery", version = "26.0.0" } +babe-primitives = { package = "sp-consensus-babe", version = "0.32.0" } +beefy-primitives = { package = "sp-consensus-beefy", version = "13.0.0" } +grandpa = { package = "sc-consensus-grandpa", version = "0.19.0" } +pallet-im-online = { version = "27.0.0" } +pallet-staking = { version = "28.0.0" } + +# Polkadot +polkadot-primitives = { version = "7.0.0" } + +# Cumulus +parachains-common = { version = "7.0.0" } +emulated-integration-tests-common = { version = "3.0.0" } + +# Runtimes +polkadot-runtime-constants = { path = "../../../../../relay/polkadot/constants" } +polkadot-runtime = { path = "../../../../../relay/polkadot" } diff --git a/integration-tests/emulated/chains/relays/polkadot/src/genesis.rs b/integration-tests/emulated/chains/relays/polkadot/src/genesis.rs new file mode 100644 index 0000000000..6697aa2bad --- /dev/null +++ b/integration-tests/emulated/chains/relays/polkadot/src/genesis.rs @@ -0,0 +1,139 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Substrate +use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; +use babe_primitives::AuthorityId as BabeId; +use beefy_primitives::ecdsa_crypto::AuthorityId as BeefyId; +use grandpa::AuthorityId as GrandpaId; +use pallet_im_online::sr25519::AuthorityId as ImOnlineId; +use sp_core::{sr25519, storage::Storage}; +use sp_runtime::Perbill; + +// Polkadot +use polkadot_primitives::{AssignmentId, ValidatorId}; + +// Cumulus +use emulated_integration_tests_common::{ + accounts, build_genesis_storage, get_account_id_from_seed, get_from_seed, get_host_config, +}; +use parachains_common::Balance; +use polkadot_runtime_constants::currency::UNITS as DOT; + +pub const ED: Balance = polkadot_runtime_constants::currency::EXISTENTIAL_DEPOSIT; +const ENDOWMENT: u128 = 1_000_000 * DOT; +const STASH: u128 = 100 * DOT; + +mod validators { + use super::*; + use parachains_common::AccountId; + + pub fn initial_authorities() -> Vec<( + AccountId, + AccountId, + BabeId, + GrandpaId, + ImOnlineId, + ValidatorId, + AssignmentId, + AuthorityDiscoveryId, + BeefyId, + )> { + let seed = "Alice"; + vec![( + get_account_id_from_seed::(&format!("{}//stash", seed)), + get_account_id_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + )] + } +} + +fn session_keys( + babe: BabeId, + grandpa: GrandpaId, + im_online: ImOnlineId, + para_validator: ValidatorId, + para_assignment: AssignmentId, + authority_discovery: AuthorityDiscoveryId, + beefy: BeefyId, +) -> polkadot_runtime::SessionKeys { + polkadot_runtime::SessionKeys { + babe, + grandpa, + im_online, + para_validator, + para_assignment, + authority_discovery, + beefy, + } +} + +pub fn genesis() -> Storage { + let genesis_config = polkadot_runtime::RuntimeGenesisConfig { + system: polkadot_runtime::SystemConfig::default(), + balances: polkadot_runtime::BalancesConfig { + balances: accounts::init_balances().iter().cloned().map(|k| (k, ENDOWMENT)).collect(), + }, + session: polkadot_runtime::SessionConfig { + keys: validators::initial_authorities() + .iter() + .map(|x| { + ( + x.0.clone(), + x.0.clone(), + session_keys( + x.2.clone(), + x.3.clone(), + x.4.clone(), + x.5.clone(), + x.6.clone(), + x.7.clone(), + x.8.clone(), + ), + ) + }) + .collect::>(), + }, + staking: polkadot_runtime::StakingConfig { + validator_count: validators::initial_authorities().len() as u32, + minimum_validator_count: 1, + stakers: validators::initial_authorities() + .iter() + .map(|x| { + (x.0.clone(), x.1.clone(), STASH, polkadot_runtime::StakerStatus::Validator) + }) + .collect(), + invulnerables: validators::initial_authorities().iter().map(|x| x.0.clone()).collect(), + force_era: pallet_staking::Forcing::ForceNone, + slash_reward_fraction: Perbill::from_percent(10), + ..Default::default() + }, + babe: polkadot_runtime::BabeConfig { + authorities: Default::default(), + epoch_config: Some(polkadot_runtime::BABE_GENESIS_EPOCH_CONFIG), + ..Default::default() + }, + configuration: polkadot_runtime::ConfigurationConfig { config: get_host_config() }, + ..Default::default() + }; + + build_genesis_storage(&genesis_config, polkadot_runtime::WASM_BINARY.unwrap()) +} diff --git a/integration-tests/emulated/chains/relays/polkadot/src/lib.rs b/integration-tests/emulated/chains/relays/polkadot/src/lib.rs new file mode 100644 index 0000000000..9b32e0ac87 --- /dev/null +++ b/integration-tests/emulated/chains/relays/polkadot/src/lib.rs @@ -0,0 +1,51 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod genesis; + +// Cumulus +use emulated_integration_tests_common::{ + impl_accounts_helpers_for_relay_chain, impl_assert_events_helpers_for_relay_chain, + impl_hrmp_channels_helpers_for_relay_chain, impl_send_transact_helpers_for_relay_chain, + xcm_emulator::decl_test_relay_chains, +}; +use polkadot_primitives::runtime_api::runtime_decl_for_parachain_host::ParachainHostV5; + +// Polkadot declaration +decl_test_relay_chains! { + #[api_version(10)] + pub struct Polkadot { + genesis = genesis::genesis(), + on_init = (), + runtime = polkadot_runtime, + core = { + SovereignAccountOf: polkadot_runtime::xcm_config::SovereignAccountOf, + }, + pallets = { + XcmPallet: polkadot_runtime::XcmPallet, + Balances: polkadot_runtime::Balances, + Treasury: polkadot_runtime::Treasury, + AssetRate: polkadot_runtime::AssetRate, + Hrmp: polkadot_runtime::Hrmp, + Identity: polkadot_runtime::Identity, + } + }, +} + +// Polkadot implementation +impl_accounts_helpers_for_relay_chain!(Polkadot); +impl_assert_events_helpers_for_relay_chain!(Polkadot); +impl_hrmp_channels_helpers_for_relay_chain!(Polkadot); +impl_send_transact_helpers_for_relay_chain!(Polkadot); diff --git a/integration-tests/emulated/chains/src/genesis.rs b/integration-tests/emulated/chains/src/genesis.rs deleted file mode 100644 index 76b1692605..0000000000 --- a/integration-tests/emulated/chains/src/genesis.rs +++ /dev/null @@ -1,650 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -use integration_tests_common::{ - accounts, collators, get_account_id_from_seed, validators, SAFE_XCM_VERSION, -}; - -// Substrate -use beefy_primitives::ecdsa_crypto::AuthorityId as BeefyId; -use grandpa_primitives::AuthorityId as GrandpaId; -use pallet_im_online::sr25519::AuthorityId as ImOnlineId; -use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; -use sp_consensus_babe::AuthorityId as BabeId; -use sp_core::{sr25519, storage::Storage}; -use sp_runtime::{BuildStorage, Perbill}; - -// Cumulus -use parachains_common::{AccountId, Balance, BlockNumber}; -use polkadot_parachain_primitives::primitives::{HeadData, ValidationCode}; -use polkadot_primitives::{AssignmentId, ValidatorId}; -use polkadot_runtime_parachains::{ - configuration::HostConfiguration, - paras::{ParaGenesisArgs, ParaKind}, -}; -// Polkadot -pub mod polkadot { - use super::*; - pub const ED: Balance = polkadot_runtime_constants::currency::EXISTENTIAL_DEPOSIT; - const STASH: u128 = 100 * polkadot_runtime_constants::currency::UNITS; - - pub fn get_host_config() -> HostConfiguration { - HostConfiguration { - max_upward_queue_count: 10, - max_upward_queue_size: 51200, - max_upward_message_size: 51200, - max_upward_message_num_per_candidate: 10, - max_downward_message_size: 51200, - hrmp_sender_deposit: 100_000_000_000, - hrmp_recipient_deposit: 100_000_000_000, - hrmp_channel_max_capacity: 1000, - hrmp_channel_max_message_size: 102400, - hrmp_channel_max_total_size: 102400, - hrmp_max_parachain_outbound_channels: 30, - hrmp_max_parachain_inbound_channels: 30, - ..Default::default() - } - } - - fn session_keys( - babe: BabeId, - grandpa: GrandpaId, - im_online: ImOnlineId, - para_validator: ValidatorId, - para_assignment: AssignmentId, - authority_discovery: AuthorityDiscoveryId, - beefy: BeefyId, - ) -> polkadot_runtime::SessionKeys { - polkadot_runtime::SessionKeys { - babe, - grandpa, - im_online, - para_validator, - para_assignment, - authority_discovery, - beefy, - } - } - - pub fn genesis() -> Storage { - let genesis_config = polkadot_runtime::RuntimeGenesisConfig { - system: polkadot_runtime::SystemConfig::default(), - balances: polkadot_runtime::BalancesConfig { - balances: accounts::init_balances() - .iter() - .cloned() - .map(|k| (k, ED * 4096)) - .collect(), - }, - session: polkadot_runtime::SessionConfig { - keys: validators::initial_authorities() - .iter() - .map(|x| { - ( - x.0.clone(), - x.0.clone(), - polkadot::session_keys( - x.2.clone(), - x.3.clone(), - x.4.clone(), - x.5.clone(), - x.6.clone(), - x.7.clone(), - x.8.clone(), - ), - ) - }) - .collect::>(), - }, - staking: polkadot_runtime::StakingConfig { - validator_count: validators::initial_authorities().len() as u32, - minimum_validator_count: 1, - stakers: validators::initial_authorities() - .iter() - .map(|x| { - (x.0.clone(), x.1.clone(), STASH, polkadot_runtime::StakerStatus::Validator) - }) - .collect(), - invulnerables: validators::initial_authorities() - .iter() - .map(|x| x.0.clone()) - .collect(), - force_era: pallet_staking::Forcing::ForceNone, - slash_reward_fraction: Perbill::from_percent(10), - ..Default::default() - }, - babe: polkadot_runtime::BabeConfig { - authorities: Default::default(), - epoch_config: Some(polkadot_runtime::BABE_GENESIS_EPOCH_CONFIG), - ..Default::default() - }, - configuration: polkadot_runtime::ConfigurationConfig { config: get_host_config() }, - paras: polkadot_runtime::ParasConfig { - paras: vec![ - ( - asset_hub_polkadot::PARA_ID.into(), - ParaGenesisArgs { - genesis_head: HeadData::default(), - validation_code: ValidationCode( - asset_hub_polkadot_runtime::WASM_BINARY.unwrap().to_vec(), - ), - para_kind: ParaKind::Parachain, - }, - ), - ( - bridge_hub_polkadot::PARA_ID.into(), - ParaGenesisArgs { - genesis_head: HeadData::default(), - validation_code: ValidationCode( - bridge_hub_polkadot_runtime::WASM_BINARY.unwrap().to_vec(), - ), - para_kind: ParaKind::Parachain, - }, - ), - ( - penpal::PARA_ID_A.into(), - ParaGenesisArgs { - genesis_head: HeadData::default(), - validation_code: ValidationCode( - penpal_runtime::WASM_BINARY.unwrap().to_vec(), - ), - para_kind: ParaKind::Parachain, - }, - ), - ( - penpal::PARA_ID_B.into(), - ParaGenesisArgs { - genesis_head: HeadData::default(), - validation_code: ValidationCode( - penpal_runtime::WASM_BINARY.unwrap().to_vec(), - ), - para_kind: ParaKind::Parachain, - }, - ), - ], - ..Default::default() - }, - ..Default::default() - }; - - genesis_config.build_storage().unwrap() - } -} - -// Kusama -pub mod kusama { - use super::*; - pub const ED: Balance = kusama_runtime_constants::currency::EXISTENTIAL_DEPOSIT; - use kusama_runtime_constants::currency::UNITS as KSM; - const ENDOWMENT: u128 = 1_000_000 * KSM; - const STASH: u128 = 100 * KSM; - - pub fn get_host_config() -> HostConfiguration { - HostConfiguration { - max_upward_queue_count: 10, - max_upward_queue_size: 51200, - max_upward_message_size: 51200, - max_upward_message_num_per_candidate: 10, - max_downward_message_size: 51200, - hrmp_sender_deposit: 5_000_000_000_000, - hrmp_recipient_deposit: 5_000_000_000_000, - hrmp_channel_max_capacity: 1000, - hrmp_channel_max_message_size: 102400, - hrmp_channel_max_total_size: 102400, - hrmp_max_parachain_outbound_channels: 30, - hrmp_max_parachain_inbound_channels: 30, - ..Default::default() - } - } - - fn session_keys( - babe: BabeId, - grandpa: GrandpaId, - im_online: ImOnlineId, - para_validator: ValidatorId, - para_assignment: AssignmentId, - authority_discovery: AuthorityDiscoveryId, - beefy: BeefyId, - ) -> kusama_runtime::SessionKeys { - kusama_runtime::SessionKeys { - babe, - grandpa, - im_online, - para_validator, - para_assignment, - authority_discovery, - beefy, - } - } - - pub fn genesis() -> Storage { - let genesis_config = kusama_runtime::RuntimeGenesisConfig { - system: kusama_runtime::SystemConfig::default(), - balances: kusama_runtime::BalancesConfig { - balances: accounts::init_balances() - .iter() - .map(|k: &AccountId| (k.clone(), ENDOWMENT)) - .collect(), - }, - session: kusama_runtime::SessionConfig { - keys: validators::initial_authorities() - .iter() - .map(|x| { - ( - x.0.clone(), - x.0.clone(), - kusama::session_keys( - x.2.clone(), - x.3.clone(), - x.4.clone(), - x.5.clone(), - x.6.clone(), - x.7.clone(), - x.8.clone(), - ), - ) - }) - .collect::>(), - }, - staking: kusama_runtime::StakingConfig { - validator_count: validators::initial_authorities().len() as u32, - minimum_validator_count: 1, - stakers: validators::initial_authorities() - .iter() - .map(|x| { - (x.0.clone(), x.1.clone(), STASH, kusama_runtime::StakerStatus::Validator) - }) - .collect(), - invulnerables: validators::initial_authorities() - .iter() - .map(|x| x.0.clone()) - .collect(), - force_era: pallet_staking::Forcing::NotForcing, - slash_reward_fraction: Perbill::from_percent(10), - ..Default::default() - }, - babe: kusama_runtime::BabeConfig { - authorities: Default::default(), - epoch_config: Some(kusama_runtime::BABE_GENESIS_EPOCH_CONFIG), - ..Default::default() - }, - configuration: kusama_runtime::ConfigurationConfig { config: get_host_config() }, - paras: kusama_runtime::ParasConfig { - paras: vec![ - ( - asset_hub_kusama::PARA_ID.into(), - ParaGenesisArgs { - genesis_head: HeadData::default(), - validation_code: ValidationCode( - asset_hub_kusama_runtime::WASM_BINARY.unwrap().to_vec(), - ), - para_kind: ParaKind::Parachain, - }, - ), - ( - bridge_hub_kusama::PARA_ID.into(), - ParaGenesisArgs { - genesis_head: HeadData::default(), - validation_code: ValidationCode( - bridge_hub_kusama_runtime::WASM_BINARY.unwrap().to_vec(), - ), - para_kind: ParaKind::Parachain, - }, - ), - ( - penpal::PARA_ID_A.into(), - ParaGenesisArgs { - genesis_head: HeadData::default(), - validation_code: ValidationCode( - penpal_runtime::WASM_BINARY.unwrap().to_vec(), - ), - para_kind: ParaKind::Parachain, - }, - ), - ( - penpal::PARA_ID_B.into(), - ParaGenesisArgs { - genesis_head: HeadData::default(), - validation_code: ValidationCode( - penpal_runtime::WASM_BINARY.unwrap().to_vec(), - ), - para_kind: ParaKind::Parachain, - }, - ), - ], - ..Default::default() - }, - ..Default::default() - }; - - genesis_config.build_storage().unwrap() - } -} - -// Asset Hub Polkadot -pub mod asset_hub_polkadot { - use super::*; - pub const PARA_ID: u32 = 1000; - pub const ED: Balance = asset_hub_polkadot_runtime::ExistentialDeposit::get(); - - pub fn genesis() -> Storage { - let genesis_config = asset_hub_polkadot_runtime::RuntimeGenesisConfig { - system: asset_hub_polkadot_runtime::SystemConfig::default(), - balances: asset_hub_polkadot_runtime::BalancesConfig { - balances: accounts::init_balances() - .iter() - .cloned() - .map(|k| (k, ED * 4096 * 4096)) - .collect(), - }, - parachain_info: asset_hub_polkadot_runtime::ParachainInfoConfig { - parachain_id: PARA_ID.into(), - ..Default::default() - }, - collator_selection: asset_hub_polkadot_runtime::CollatorSelectionConfig { - invulnerables: collators::invulnerables_asset_hub_polkadot() - .iter() - .cloned() - .map(|(acc, _)| acc) - .collect(), - candidacy_bond: ED * 16, - ..Default::default() - }, - session: asset_hub_polkadot_runtime::SessionConfig { - keys: collators::invulnerables_asset_hub_polkadot() - .into_iter() - .map(|(acc, aura)| { - ( - acc.clone(), // account id - acc, // validator id - asset_hub_polkadot_runtime::SessionKeys { aura }, // session keys - ) - }) - .collect(), - }, - polkadot_xcm: asset_hub_polkadot_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() - }, - ..Default::default() - }; - - genesis_config.build_storage().unwrap() - } -} - -// Asset Hub Kusama -pub mod asset_hub_kusama { - use super::*; - pub const PARA_ID: u32 = 1000; - pub const ED: Balance = asset_hub_kusama_runtime::ExistentialDeposit::get(); - - pub fn genesis() -> Storage { - let genesis_config = asset_hub_kusama_runtime::RuntimeGenesisConfig { - system: asset_hub_kusama_runtime::SystemConfig::default(), - balances: asset_hub_kusama_runtime::BalancesConfig { - balances: accounts::init_balances() - .iter() - .cloned() - .map(|k| (k, ED * 4096 * 4096)) - .collect(), - }, - parachain_info: asset_hub_kusama_runtime::ParachainInfoConfig { - parachain_id: PARA_ID.into(), - ..Default::default() - }, - collator_selection: asset_hub_kusama_runtime::CollatorSelectionConfig { - invulnerables: collators::invulnerables() - .iter() - .cloned() - .map(|(acc, _)| acc) - .collect(), - candidacy_bond: ED * 16, - ..Default::default() - }, - session: asset_hub_kusama_runtime::SessionConfig { - keys: collators::invulnerables() - .into_iter() - .map(|(acc, aura)| { - ( - acc.clone(), // account id - acc, // validator id - asset_hub_kusama_runtime::SessionKeys { aura }, // session keys - ) - }) - .collect(), - }, - polkadot_xcm: asset_hub_kusama_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() - }, - ..Default::default() - }; - - genesis_config.build_storage().unwrap() - } -} - -// Bridge Hub Polkadot -pub mod bridge_hub_polkadot { - use super::*; - pub const PARA_ID: u32 = 1002; - pub const ED: Balance = bridge_hub_polkadot_runtime::ExistentialDeposit::get(); - - pub fn genesis() -> Storage { - let genesis_config = bridge_hub_polkadot_runtime::RuntimeGenesisConfig { - system: bridge_hub_polkadot_runtime::SystemConfig::default(), - balances: bridge_hub_polkadot_runtime::BalancesConfig { - balances: accounts::init_balances() - .iter() - .cloned() - .map(|k| (k, ED * 4096)) - .collect(), - }, - parachain_info: bridge_hub_polkadot_runtime::ParachainInfoConfig { - parachain_id: PARA_ID.into(), - ..Default::default() - }, - collator_selection: bridge_hub_polkadot_runtime::CollatorSelectionConfig { - invulnerables: collators::invulnerables() - .iter() - .cloned() - .map(|(acc, _)| acc) - .collect(), - candidacy_bond: ED * 16, - ..Default::default() - }, - session: bridge_hub_polkadot_runtime::SessionConfig { - keys: collators::invulnerables() - .into_iter() - .map(|(acc, aura)| { - ( - acc.clone(), // account id - acc, // validator id - bridge_hub_polkadot_runtime::SessionKeys { aura }, // session keys - ) - }) - .collect(), - }, - polkadot_xcm: bridge_hub_polkadot_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() - }, - ..Default::default() - }; - - genesis_config.build_storage().unwrap() - } -} - -// Bridge Hub Kusama -pub mod bridge_hub_kusama { - use super::*; - pub const PARA_ID: u32 = 1002; - pub const ED: Balance = bridge_hub_kusama_runtime::ExistentialDeposit::get(); - - pub fn genesis() -> Storage { - let genesis_config = bridge_hub_kusama_runtime::RuntimeGenesisConfig { - system: bridge_hub_kusama_runtime::SystemConfig::default(), - balances: bridge_hub_kusama_runtime::BalancesConfig { - balances: accounts::init_balances() - .iter() - .cloned() - .map(|k| (k, ED * 4096)) - .collect(), - }, - parachain_info: bridge_hub_kusama_runtime::ParachainInfoConfig { - parachain_id: PARA_ID.into(), - ..Default::default() - }, - collator_selection: bridge_hub_kusama_runtime::CollatorSelectionConfig { - invulnerables: collators::invulnerables() - .iter() - .cloned() - .map(|(acc, _)| acc) - .collect(), - candidacy_bond: ED * 16, - ..Default::default() - }, - session: bridge_hub_kusama_runtime::SessionConfig { - keys: collators::invulnerables() - .into_iter() - .map(|(acc, aura)| { - ( - acc.clone(), // account id - acc, // validator id - bridge_hub_kusama_runtime::SessionKeys { aura }, // session keys - ) - }) - .collect(), - }, - polkadot_xcm: bridge_hub_kusama_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() - }, - ..Default::default() - }; - - genesis_config.build_storage().unwrap() - } -} - -// Collectives -pub mod collectives { - use super::*; - pub const PARA_ID: u32 = 1001; - pub const ED: Balance = collectives_polkadot_runtime::ExistentialDeposit::get(); - - pub fn genesis() -> Storage { - let genesis_config = collectives_polkadot_runtime::RuntimeGenesisConfig { - system: collectives_polkadot_runtime::SystemConfig::default(), - balances: collectives_polkadot_runtime::BalancesConfig { - balances: accounts::init_balances() - .iter() - .cloned() - .map(|k| (k, ED * 4096)) - .collect(), - }, - parachain_info: collectives_polkadot_runtime::ParachainInfoConfig { - parachain_id: PARA_ID.into(), - ..Default::default() - }, - collator_selection: collectives_polkadot_runtime::CollatorSelectionConfig { - invulnerables: collators::invulnerables() - .iter() - .cloned() - .map(|(acc, _)| acc) - .collect(), - candidacy_bond: ED * 16, - ..Default::default() - }, - session: collectives_polkadot_runtime::SessionConfig { - keys: collators::invulnerables() - .into_iter() - .map(|(acc, aura)| { - ( - acc.clone(), // account id - acc, // validator id - collectives_polkadot_runtime::SessionKeys { aura }, // session keys - ) - }) - .collect(), - }, - polkadot_xcm: collectives_polkadot_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() - }, - ..Default::default() - }; - - genesis_config.build_storage().unwrap() - } -} - -// Penpal -pub mod penpal { - use super::*; - pub const PARA_ID_A: u32 = 2000; - pub const PARA_ID_B: u32 = 2001; - pub const ED: Balance = penpal_runtime::EXISTENTIAL_DEPOSIT; - - pub fn genesis(para_id: u32) -> Storage { - let genesis_config = penpal_runtime::RuntimeGenesisConfig { - system: penpal_runtime::SystemConfig::default(), - balances: penpal_runtime::BalancesConfig { - balances: accounts::init_balances() - .iter() - .cloned() - .map(|k| (k, ED * 4096 * 4096)) - .collect(), - }, - parachain_info: penpal_runtime::ParachainInfoConfig { - parachain_id: para_id.into(), - ..Default::default() - }, - collator_selection: penpal_runtime::CollatorSelectionConfig { - invulnerables: collators::invulnerables() - .iter() - .cloned() - .map(|(acc, _)| acc) - .collect(), - candidacy_bond: ED * 16, - ..Default::default() - }, - session: penpal_runtime::SessionConfig { - keys: collators::invulnerables() - .into_iter() - .map(|(acc, aura)| { - ( - acc.clone(), // account id - acc, // validator id - penpal_runtime::SessionKeys { aura }, // session keys - ) - }) - .collect(), - }, - polkadot_xcm: penpal_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() - }, - sudo: penpal_runtime::SudoConfig { - key: Some(get_account_id_from_seed::("Alice")), - }, - ..Default::default() - }; - - genesis_config.build_storage().unwrap() - } -} diff --git a/integration-tests/emulated/chains/src/lib.rs b/integration-tests/emulated/chains/src/lib.rs deleted file mode 100644 index ac4bddcfab..0000000000 --- a/integration-tests/emulated/chains/src/lib.rs +++ /dev/null @@ -1,348 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -pub mod genesis; - -pub use genesis::{ - asset_hub_kusama, asset_hub_polkadot, bridge_hub_kusama, bridge_hub_polkadot, collectives, - kusama, penpal, polkadot, -}; - -use integration_tests_common::{ - accounts::{ALICE, BOB}, - impl_accounts_helpers_for_parachain, impl_accounts_helpers_for_relay_chain, - impl_assert_events_helpers_for_parachain, impl_assert_events_helpers_for_relay_chain, - impl_assets_helpers_for_parachain, impl_foreign_assets_helpers_for_parachain, - impl_hrmp_channels_helpers_for_relay_chain, impl_send_transact_helpers_for_relay_chain, - impls::Parachain, -}; - -// Substrate -use frame_support::traits::OnInitialize; - -// Cumulus -use xcm_emulator::{ - // decl_test_bridges, - decl_test_networks, - decl_test_parachains, - decl_test_relay_chains, - decl_test_sender_receiver_accounts_parameter_types, -}; - -decl_test_relay_chains! { - #[api_version(5)] - pub struct Polkadot { - genesis = polkadot::genesis(), - on_init = (), - runtime = polkadot_runtime, - core = { - SovereignAccountOf: polkadot_runtime::xcm_config::SovereignAccountOf, - }, - pallets = { - XcmPallet: polkadot_runtime::XcmPallet, - Balances: polkadot_runtime::Balances, - Hrmp: polkadot_runtime::Hrmp, - } - }, - #[api_version(9)] - pub struct Kusama { - genesis = kusama::genesis(), - on_init = (), - runtime = kusama_runtime, - core = { - SovereignAccountOf: kusama_runtime::xcm_config::SovereignAccountOf, - }, - pallets = { - XcmPallet: kusama_runtime::XcmPallet, - Balances: kusama_runtime::Balances, - Hrmp: kusama_runtime::Hrmp, - } - }, -} - -decl_test_parachains! { - // Polkadot Parachains - pub struct AssetHubPolkadot { - genesis = asset_hub_polkadot::genesis(), - on_init = { - asset_hub_polkadot_runtime::AuraExt::on_initialize(1); - }, - runtime = asset_hub_polkadot_runtime, - core = { - XcmpMessageHandler: asset_hub_polkadot_runtime::XcmpQueue, - LocationToAccountId: asset_hub_polkadot_runtime::xcm_config::LocationToAccountId, - ParachainInfo: asset_hub_polkadot_runtime::ParachainInfo, - MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, - }, - pallets = { - PolkadotXcm: asset_hub_polkadot_runtime::PolkadotXcm, - Assets: asset_hub_polkadot_runtime::Assets, - ForeignAssets: asset_hub_polkadot_runtime::ForeignAssets, - Balances: asset_hub_polkadot_runtime::Balances, - } - }, - pub struct Collectives { - genesis = collectives::genesis(), - on_init = { - collectives_polkadot_runtime::AuraExt::on_initialize(1); - }, - runtime = collectives_polkadot_runtime, - core = { - XcmpMessageHandler: collectives_polkadot_runtime::XcmpQueue, - LocationToAccountId: collectives_polkadot_runtime::xcm_config::LocationToAccountId, - ParachainInfo: collectives_polkadot_runtime::ParachainInfo, - MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, - }, - pallets = { - PolkadotXcm: collectives_polkadot_runtime::PolkadotXcm, - Balances: collectives_polkadot_runtime::Balances, - } - }, - pub struct BridgeHubPolkadot { - genesis = bridge_hub_polkadot::genesis(), - on_init = { - bridge_hub_polkadot_runtime::AuraExt::on_initialize(1); - }, - runtime = bridge_hub_polkadot_runtime, - core = { - XcmpMessageHandler: bridge_hub_polkadot_runtime::XcmpQueue, - LocationToAccountId: bridge_hub_polkadot_runtime::xcm_config::LocationToAccountId, - ParachainInfo: bridge_hub_polkadot_runtime::ParachainInfo, - MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, - }, - pallets = { - PolkadotXcm: bridge_hub_polkadot_runtime::PolkadotXcm, - } - }, - pub struct PenpalPolkadotA { - genesis = penpal::genesis(penpal::PARA_ID_A), - on_init = { - penpal_runtime::AuraExt::on_initialize(1); - }, - runtime = penpal_runtime, - core = { - XcmpMessageHandler: penpal_runtime::XcmpQueue, - LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, - ParachainInfo: penpal_runtime::ParachainInfo, - MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, - }, - pallets = { - PolkadotXcm: penpal_runtime::PolkadotXcm, - Assets: penpal_runtime::Assets, - Balances: penpal_runtime::Balances, - } - }, - pub struct PenpalPolkadotB { - genesis = penpal::genesis(penpal::PARA_ID_B), - on_init = { - penpal_runtime::AuraExt::on_initialize(1); - }, - runtime = penpal_runtime, - core = { - XcmpMessageHandler: penpal_runtime::XcmpQueue, - LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, - ParachainInfo: penpal_runtime::ParachainInfo, - MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, - }, - pallets = { - PolkadotXcm: penpal_runtime::PolkadotXcm, - Assets: penpal_runtime::Assets, - Balances: penpal_runtime::Balances, - } - }, - // Kusama Parachains - pub struct AssetHubKusama { - genesis = asset_hub_kusama::genesis(), - on_init = { - asset_hub_kusama_runtime::AuraExt::on_initialize(1); - }, - runtime = asset_hub_kusama_runtime, - core = { - XcmpMessageHandler: asset_hub_kusama_runtime::XcmpQueue, - LocationToAccountId: asset_hub_kusama_runtime::xcm_config::LocationToAccountId, - ParachainInfo: asset_hub_kusama_runtime::ParachainInfo, - MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, - }, - pallets = { - PolkadotXcm: asset_hub_kusama_runtime::PolkadotXcm, - Assets: asset_hub_kusama_runtime::Assets, - ForeignAssets: asset_hub_kusama_runtime::ForeignAssets, - PoolAssets: asset_hub_kusama_runtime::PoolAssets, - AssetConversion: asset_hub_kusama_runtime::AssetConversion, - Balances: asset_hub_kusama_runtime::Balances, - } - }, - pub struct BridgeHubKusama { - genesis = bridge_hub_kusama::genesis(), - on_init = { - bridge_hub_kusama_runtime::AuraExt::on_initialize(1); - }, - runtime = bridge_hub_kusama_runtime, - core = { - XcmpMessageHandler: bridge_hub_kusama_runtime::XcmpQueue, - LocationToAccountId: bridge_hub_kusama_runtime::xcm_config::LocationToAccountId, - ParachainInfo: bridge_hub_kusama_runtime::ParachainInfo, - MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, - }, - pallets = { - PolkadotXcm: bridge_hub_kusama_runtime::PolkadotXcm, - } - }, - pub struct PenpalKusamaA { - genesis = penpal::genesis(penpal::PARA_ID_A), - on_init = { - penpal_runtime::AuraExt::on_initialize(1); - }, - runtime = penpal_runtime, - core = { - XcmpMessageHandler: penpal_runtime::XcmpQueue, - LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, - ParachainInfo: penpal_runtime::ParachainInfo, - MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, - }, - pallets = { - PolkadotXcm: penpal_runtime::PolkadotXcm, - Assets: penpal_runtime::Assets, - Balances: penpal_runtime::Balances, - } - }, - pub struct PenpalKusamaB { - genesis = penpal::genesis(penpal::PARA_ID_B), - on_init = { - penpal_runtime::AuraExt::on_initialize(1); - }, - runtime = penpal_runtime, - core = { - XcmpMessageHandler: penpal_runtime::XcmpQueue, - LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId, - ParachainInfo: penpal_runtime::ParachainInfo, - MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, - }, - pallets = { - PolkadotXcm: penpal_runtime::PolkadotXcm, - Assets: penpal_runtime::Assets, - Balances: penpal_runtime::Balances, - } - }, -} - -decl_test_networks! { - pub struct PolkadotMockNet { - relay_chain = Polkadot, - parachains = vec![ - AssetHubPolkadot, - Collectives, - BridgeHubPolkadot, - PenpalPolkadotA, - PenpalPolkadotB, - ], - // TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged - // bridge = PolkadotKusamaMockBridge - bridge = () - }, - pub struct KusamaMockNet { - relay_chain = Kusama, - parachains = vec![ - AssetHubKusama, - BridgeHubKusama, - PenpalKusamaA, - PenpalKusamaB, - ], - // TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged - // bridge = KusamaPolkadotMockBridge - bridge = () - }, -} - -// TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged -// decl_test_bridges! { -// pub struct PolkadotKusamaMockBridge { -// source = BridgeHubPolkadot, -// target = BridgeHubKusama, -// handler = PolkadotKusamaMessageHandler -// }, -// pub struct KusamaPolkadotMockBridge { -// source = BridgeHubKusama, -// target = BridgeHubPolkadot, -// handler = KusamaPolkadotMessageHandler -// } -// } - -// Polkadot implementation -impl_accounts_helpers_for_relay_chain!(Polkadot); -impl_assert_events_helpers_for_relay_chain!(Polkadot); -impl_hrmp_channels_helpers_for_relay_chain!(Polkadot); -impl_send_transact_helpers_for_relay_chain!(Polkadot); - -// Kusama implementation -impl_accounts_helpers_for_relay_chain!(Kusama); -impl_assert_events_helpers_for_relay_chain!(Kusama); -impl_hrmp_channels_helpers_for_relay_chain!(Kusama); -impl_send_transact_helpers_for_relay_chain!(Kusama); - -// AssetHubPolkadot implementation -impl_accounts_helpers_for_parachain!(AssetHubPolkadot); -impl_assets_helpers_for_parachain!(AssetHubPolkadot, Polkadot); -impl_assert_events_helpers_for_parachain!(AssetHubPolkadot); -impl_foreign_assets_helpers_for_parachain!(AssetHubPolkadot, Polkadot); - -// AssetHubKusama implementation -impl_accounts_helpers_for_parachain!(AssetHubKusama); -impl_assets_helpers_for_parachain!(AssetHubKusama, Kusama); -impl_assert_events_helpers_for_parachain!(AssetHubKusama); -impl_foreign_assets_helpers_for_parachain!(AssetHubKusama, Kusama); - -// PenpalPolkadot implementations -impl_accounts_helpers_for_parachain!(PenpalPolkadotA); -impl_accounts_helpers_for_parachain!(PenpalPolkadotB); -impl_assets_helpers_for_parachain!(PenpalPolkadotA, Polkadot); -impl_assets_helpers_for_parachain!(PenpalPolkadotB, Polkadot); -impl_assert_events_helpers_for_parachain!(PenpalPolkadotA); -impl_assert_events_helpers_for_parachain!(PenpalPolkadotB); - -// PenpalKusama implementations -impl_accounts_helpers_for_parachain!(PenpalKusamaA); -impl_accounts_helpers_for_parachain!(PenpalKusamaB); -impl_assets_helpers_for_parachain!(PenpalKusamaA, Kusama); -impl_assets_helpers_for_parachain!(PenpalKusamaB, Kusama); -impl_assert_events_helpers_for_parachain!(PenpalKusamaA); -impl_assert_events_helpers_for_parachain!(PenpalKusamaB); - -// Collectives implementation -impl_accounts_helpers_for_parachain!(Collectives); -impl_assert_events_helpers_for_parachain!(Collectives); - -decl_test_sender_receiver_accounts_parameter_types! { - // Relays - PolkadotRelay { sender: ALICE, receiver: BOB }, - KusamaRelay { sender: ALICE, receiver: BOB }, - // Asset Hubs - AssetHubPolkadotPara { sender: ALICE, receiver: BOB }, - AssetHubKusamaPara { sender: ALICE, receiver: BOB }, - // Collectives - CollectivesPara { sender: ALICE, receiver: BOB }, - // Bridged Hubs - BridgeHubPolkadotPara { sender: ALICE, receiver: BOB }, - BridgeHubKusamaPara { sender: ALICE, receiver: BOB }, - // Penpals - PenpalPolkadotAPara { sender: ALICE, receiver: BOB }, - PenpalPolkadotBPara { sender: ALICE, receiver: BOB }, - PenpalKusamaAPara { sender: ALICE, receiver: BOB }, - PenpalKusamaBPara { sender: ALICE, receiver: BOB } -} - -pub type PenpalLocalTeleportableToAssetHub = - penpal_runtime::xcm_config::LocalTeleportableToAssetHub; -pub type PenpalXcmConfig = penpal_runtime::xcm_config::XcmConfig; diff --git a/integration-tests/emulated/common/Cargo.toml b/integration-tests/emulated/common/Cargo.toml deleted file mode 100644 index 8f9137cc5b..0000000000 --- a/integration-tests/emulated/common/Cargo.toml +++ /dev/null @@ -1,44 +0,0 @@ -[package] -name = "integration-tests-common" -version = "1.0.0" -authors.workspace = true -edition.workspace = true -license = "Apache-2.0" -description = "Common resources for integration testing with xcm-emulator" - -[dependencies] -codec = { package = "parity-scale-codec", version = "3.6.9" } -paste = "1.0.14" - -# Substrate -grandpa-primitives = { package = "sp-consensus-grandpa", version = "13.0.0" } -sp-authority-discovery = { version = "26.0.0" } -sp-runtime = { version = "31.0.1" } -frame-support = { version = "28.0.0" } -sp-core = { version = "28.0.0" } -sp-consensus-babe = { version = "0.32.0" } -pallet-assets = { version = "29.0.0" } -pallet-balances = { version = "28.0.0" } -pallet-message-queue = { version = "31.0.0" } -pallet-im-online = { version = "27.0.0" } -beefy-primitives = { package = "sp-consensus-beefy", version = "13.0.0" } - -# Polkadot -polkadot-primitives = { version = "7.0.0" } -polkadot-runtime-parachains = { version = "7.0.0" } -xcm = { package = "staging-xcm", version = "7.0.0" } -pallet-xcm = { version = "7.0.0" } - -# Cumulus -parachains-common = { version = "7.0.0" } -cumulus-primitives-core = { version = "0.7.0" } -xcm-emulator = { version = "0.5.0" } -cumulus-pallet-xcmp-queue = { version = "0.7.0" } -cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook",] , version = "0.7.0" } -asset-test-utils = { version = "7.0.1" } -cumulus-pallet-dmp-queue = { version = "0.7.0" } - -# Bridges -bp-messages = { version = "0.7.0" } -pallet-bridge-messages = { version = "0.7.0" } -bridge-runtime-common = { version = "0.7.0" } diff --git a/integration-tests/emulated/common/src/impls.rs b/integration-tests/emulated/common/src/impls.rs deleted file mode 100644 index 076e8d7e7a..0000000000 --- a/integration-tests/emulated/common/src/impls.rs +++ /dev/null @@ -1,786 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -pub use codec::{Decode, Encode}; -pub use paste; - -pub use crate::{ - xcm_helpers::xcm_transact_unpaid_execution, PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, -}; - -// Substrate -pub use frame_support::{ - assert_ok, - sp_runtime::AccountId32, - traits::fungibles::Inspect, - weights::{Weight, WeightMeter}, -}; -pub use pallet_assets; -pub use pallet_message_queue; -use sp_core::Get; - -// Cumulus -use bp_messages::{ - target_chain::{DispatchMessage, DispatchMessageData, MessageDispatch}, - LaneId, MessageKey, OutboundLaneData, -}; -use bridge_runtime_common::messages_xcm_extension::XcmBlobMessageDispatchResult; -pub use cumulus_pallet_dmp_queue; -pub use cumulus_pallet_parachain_system; -pub use cumulus_pallet_xcmp_queue; -pub use cumulus_primitives_core::{ - relay_chain::HrmpChannelId, DmpMessageHandler, ParaId, XcmpMessageHandler, -}; -use pallet_bridge_messages::{Config, Instance1, OutboundLanes, Pallet}; -pub use parachains_common::{AccountId, Balance}; -pub use xcm_emulator::{ - assert_expected_events, bx, helpers::weight_within_threshold, BridgeMessage, - BridgeMessageDispatchError, BridgeMessageHandler, Chain, Network, Parachain, RelayChain, - TestExt, -}; - -// Polkadot -pub use pallet_xcm; -pub use polkadot_runtime_parachains::{ - dmp, hrmp, - inclusion::{AggregateMessageOrigin, UmpQueueId}, -}; -pub use xcm::{ - prelude::{Junction, Junctions, MultiLocation, NetworkId, OriginKind, Outcome, VersionedXcm}, - v3::Error, - DoubleEncoded, -}; - -pub struct BridgeHubMessageHandler { - _marker: std::marker::PhantomData<(S, T, I)>, -} - -struct LaneIdWrapper(LaneId); - -impl From for u32 { - fn from(lane_id: LaneIdWrapper) -> u32 { - u32::from_be_bytes(lane_id.0 .0) - } -} - -impl From for LaneIdWrapper { - fn from(id: u32) -> LaneIdWrapper { - LaneIdWrapper(LaneId(id.to_be_bytes())) - } -} - -// TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged -// type BridgeHubPolkadotRuntime = ::Runtime; -// type BridgeHubKusamaRuntime = ::Runtime; - -// TODO: uncomment when https://github.com/polkadot-fellows/runtimes/pull/108 is merged -// pub type PolkadotKusamaMessageHandler -// = BridgeHubMessageHandler; -// pub type KusamaPolkadotMessageHandler -// = BridgeHubMessageHandler; - -impl BridgeMessageHandler for BridgeHubMessageHandler -where - S: Config, - T: Config, - I: 'static, - >::InboundPayload: From>, - >::MessageDispatch: - MessageDispatch, -{ - fn get_source_outbound_messages() -> Vec { - // get the source active outbound lanes - let active_lanes = S::ActiveOutboundLanes::get(); - - let mut messages: Vec = Default::default(); - - // collect messages from `OutboundMessages` for each active outbound lane in the source - for lane in active_lanes { - let latest_generated_nonce = - OutboundLanes::::get(lane).latest_generated_nonce; - let latest_received_nonce = - OutboundLanes::::get(lane).latest_received_nonce; - - (latest_received_nonce + 1..=latest_generated_nonce).for_each(|nonce| { - let encoded_payload: Vec = - Pallet::::outbound_message_data(*lane, nonce) - .expect("Bridge message does not exist") - .into(); - let payload = Vec::::decode(&mut &encoded_payload[..]) - .expect("Decodign XCM message failed"); - let id: u32 = LaneIdWrapper(*lane).into(); - let message = BridgeMessage { id, nonce, payload }; - - messages.push(message); - }); - } - messages - } - - fn dispatch_target_inbound_message( - message: BridgeMessage, - ) -> Result<(), BridgeMessageDispatchError> { - type TargetMessageDispatch = >::MessageDispatch; - type InboundPayload = >::InboundPayload; - - let lane_id = LaneIdWrapper::from(message.id).0; - let nonce = message.nonce; - let payload = Ok(From::from(message.payload)); - - // Directly dispatch outbound messages assuming everything is correct - // and bypassing the `Relayers` and `InboundLane` logic - let dispatch_result = TargetMessageDispatch::::dispatch(DispatchMessage { - key: MessageKey { lane_id, nonce }, - data: DispatchMessageData::> { payload }, - }); - - let result = match dispatch_result.dispatch_level_result { - XcmBlobMessageDispatchResult::Dispatched => Ok(()), - XcmBlobMessageDispatchResult::InvalidPayload => Err(BridgeMessageDispatchError( - Box::new(XcmBlobMessageDispatchResult::InvalidPayload), - )), - XcmBlobMessageDispatchResult::NotDispatched(e) => Err(BridgeMessageDispatchError( - Box::new(XcmBlobMessageDispatchResult::NotDispatched(e)), - )), - }; - result - } - - fn notify_source_message_delivery(lane_id: u32) { - let data = OutboundLanes::::get(LaneIdWrapper::from(lane_id).0); - let new_data = OutboundLaneData { - oldest_unpruned_nonce: data.oldest_unpruned_nonce + 1, - latest_received_nonce: data.latest_received_nonce + 1, - ..data - }; - - OutboundLanes::::insert(LaneIdWrapper::from(lane_id).0, new_data); - } -} - -#[macro_export] -macro_rules! impl_accounts_helpers_for_relay_chain { - ( $chain:ident ) => { - $crate::impls::paste::paste! { - impl $chain { - /// Fund a set of accounts with a balance - pub fn fund_accounts(accounts: Vec<($crate::impls::AccountId, $crate::impls::Balance)>) { - ::execute_with(|| { - for account in accounts { - $crate::impls::assert_ok!(]>::Balances::force_set_balance( - ::RuntimeOrigin::root(), - account.0.into(), - account.1, - )); - } - }); - } - /// Fund a sovereign account based on its Parachain Id - pub fn fund_para_sovereign(amount: $crate::impls::Balance, para_id: $crate::impls::ParaId) -> $crate::impls::AccountId32 { - let sovereign_account = ::sovereign_account_id_of_child_para(para_id); - Self::fund_accounts(vec![(sovereign_account.clone(), amount)]); - sovereign_account - } - } - } - }; -} - -#[macro_export] -macro_rules! impl_assert_events_helpers_for_relay_chain { - ( $chain:ident ) => { - $crate::impls::paste::paste! { - type [<$chain RuntimeEvent>] = <$chain as $crate::impls::Chain>::RuntimeEvent; - - impl $chain { - /// Asserts a dispatchable is completely executed and XCM sent - pub fn assert_xcm_pallet_attempted_complete(expected_weight: Option<$crate::impls::Weight>) { - $crate::impls::assert_expected_events!( - Self, - vec![ - [<$chain RuntimeEvent>]::::XcmPallet( - $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Complete(weight) } - ) => { - weight: $crate::impls::weight_within_threshold( - ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), - expected_weight.unwrap_or(*weight), - *weight - ), - }, - ] - ); - } - - /// Asserts a dispatchable is incompletely executed and XCM sent - pub fn assert_xcm_pallet_attempted_incomplete( - expected_weight: Option<$crate::impls::Weight>, - expected_error: Option<$crate::impls::Error>, - ) { - $crate::impls::assert_expected_events!( - Self, - vec![ - // Dispatchable is properly executed and XCM message sent - [<$chain RuntimeEvent>]::::XcmPallet( - $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Incomplete(weight, error) } - ) => { - weight: $crate::impls::weight_within_threshold( - ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), - expected_weight.unwrap_or(*weight), - *weight - ), - error: *error == expected_error.unwrap_or(*error), - }, - ] - ); - } - - /// Asserts a XCM message is sent - pub fn assert_xcm_pallet_sent() { - $crate::impls::assert_expected_events!( - Self, - vec![ - [<$chain RuntimeEvent>]::::XcmPallet($crate::impls::pallet_xcm::Event::Sent { .. }) => {}, - ] - ); - } - - /// Asserts a XCM from System Parachain is succesfully received and proccessed - pub fn assert_ump_queue_processed( - expected_success: bool, - expected_id: Option<$crate::impls::ParaId>, - expected_weight: Option<$crate::impls::Weight>, - ) { - $crate::impls::assert_expected_events!( - Self, - vec![ - // XCM is succesfully received and proccessed - [<$chain RuntimeEvent>]::::MessageQueue($crate::impls::pallet_message_queue::Event::Processed { - origin: $crate::impls::AggregateMessageOrigin::Ump($crate::impls::UmpQueueId::Para(id)), - weight_used, - success, - .. - }) => { - id: *id == expected_id.unwrap_or(*id), - weight_used: $crate::impls::weight_within_threshold( - ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), - expected_weight.unwrap_or(*weight_used), - *weight_used - ), - success: *success == expected_success, - }, - ] - ); - } - } - } - }; -} - -#[macro_export] -macro_rules! impl_hrmp_channels_helpers_for_relay_chain { - ( $chain:ident ) => { - $crate::impls::paste::paste! { - impl $chain { - /// Init open channel request with another Parachain - pub fn init_open_channel_call( - recipient_para_id: $crate::impls::ParaId, - max_capacity: u32, - max_message_size: u32, - ) -> $crate::impls::DoubleEncoded<()> { - use $crate::impls::Encode; - - ::RuntimeCall::Hrmp($crate::impls::hrmp::Call::< - ::Runtime, - >::hrmp_init_open_channel { - recipient: recipient_para_id, - proposed_max_capacity: max_capacity, - proposed_max_message_size: max_message_size, - }) - .encode() - .into() - } - /// Recipient Parachain accept the open request from another Parachain - pub fn accept_open_channel_call(sender_para_id: $crate::impls::ParaId) -> $crate::impls::DoubleEncoded<()> { - use $crate::impls::Encode; - - ::RuntimeCall::Hrmp($crate::impls::hrmp::Call::< - ::Runtime, - >::hrmp_accept_open_channel { - sender: sender_para_id, - }) - .encode() - .into() - } - - /// A root origin force to open a channel between two Parachains - pub fn force_process_hrmp_open(sender: $crate::impls::ParaId, recipient: $crate::impls::ParaId) { - use $crate::impls::Chain; - - ::execute_with(|| { - let relay_root_origin = ::RuntimeOrigin::root(); - - // Force process HRMP open channel requests without waiting for the next session - $crate::impls::assert_ok!(]>::Hrmp::force_process_hrmp_open( - relay_root_origin, - 0 - )); - - let channel_id = $crate::impls::HrmpChannelId { sender, recipient }; - - let hrmp_channel_exist = $crate::impls::hrmp::HrmpChannels::< - ::Runtime, - >::contains_key(&channel_id); - - // Check the HRMP channel has been successfully registrered - assert!(hrmp_channel_exist) - }); - } - } - } - }; -} - -#[macro_export] -macro_rules! impl_send_transact_helpers_for_relay_chain { - ( $chain:ident ) => { - $crate::impls::paste::paste! { - impl $chain { - /// A root origin (as governance) sends `xcm::Transact` with `UnpaidExecution` and encoded `call` to child parachain. - pub fn send_unpaid_transact_to_parachain_as_root( - recipient: $crate::impls::ParaId, - call: $crate::impls::DoubleEncoded<()> - ) { - use $crate::impls::{bx, Chain, RelayChain}; - - ::execute_with(|| { - let root_origin = ::RuntimeOrigin::root(); - let destination: $crate::impls::MultiLocation = ::child_location_of(recipient); - let xcm = $crate::impls::xcm_transact_unpaid_execution(call, $crate::impls::OriginKind::Superuser); - - // Send XCM `Transact` - $crate::impls::assert_ok!(]>::XcmPallet::send( - root_origin, - bx!(destination.into()), - bx!(xcm), - )); - Self::assert_xcm_pallet_sent(); - }); - } - } - } - }; -} - -#[macro_export] -macro_rules! impl_accounts_helpers_for_parachain { - ( $chain:ident ) => { - $crate::impls::paste::paste! { - impl $chain { - /// Fund a set of accounts with a balance - pub fn fund_accounts(accounts: Vec<($crate::impls::AccountId, $crate::impls::Balance)>) { - ::execute_with(|| { - for account in accounts { - $crate::impls::assert_ok!(]>::Balances::force_set_balance( - ::RuntimeOrigin::root(), - account.0.into(), - account.1, - )); - } - }); - } - - /// Return local sovereign account of `para_id` on other `network_id` - pub fn sovereign_account_of_parachain_on_other_global_consensus( - network_id: $crate::impls::NetworkId, - para_id: $crate::impls::ParaId, - ) -> $crate::impls::AccountId { - let remote_location = $crate::impls::MultiLocation { - parents: 2, - interior: $crate::impls::Junctions::X2( - $crate::impls::Junction::GlobalConsensus(network_id), - $crate::impls::Junction::Parachain(para_id.into()), - ), - }; - ::execute_with(|| { - Self::sovereign_account_id_of(remote_location) - }) - } - } - } - }; -} - -#[macro_export] -macro_rules! impl_assert_events_helpers_for_parachain { - ( $chain:ident ) => { - $crate::impls::paste::paste! { - type [<$chain RuntimeEvent>] = <$chain as $crate::impls::Chain>::RuntimeEvent; - - impl $chain { - /// Asserts a dispatchable is completely executed and XCM sent - pub fn assert_xcm_pallet_attempted_complete(expected_weight: Option<$crate::impls::Weight>) { - $crate::impls::assert_expected_events!( - Self, - vec![ - [<$chain RuntimeEvent>]::::PolkadotXcm( - $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Complete(weight) } - ) => { - weight: $crate::impls::weight_within_threshold( - ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), - expected_weight.unwrap_or(*weight), - *weight - ), - }, - ] - ); - } - - /// Asserts a dispatchable is incompletely executed and XCM sent - pub fn assert_xcm_pallet_attempted_incomplete( - expected_weight: Option<$crate::impls::Weight>, - expected_error: Option<$crate::impls::Error>, - ) { - $crate::impls::assert_expected_events!( - Self, - vec![ - // Dispatchable is properly executed and XCM message sent - [<$chain RuntimeEvent>]::::PolkadotXcm( - $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Incomplete(weight, error) } - ) => { - weight: $crate::impls::weight_within_threshold( - ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), - expected_weight.unwrap_or(*weight), - *weight - ), - error: *error == expected_error.unwrap_or(*error), - }, - ] - ); - } - - /// Asserts a dispatchable throws and error when trying to be sent - pub fn assert_xcm_pallet_attempted_error(expected_error: Option<$crate::impls::Error>) { - $crate::impls::assert_expected_events!( - Self, - vec![ - // Execution fails in the origin with `Barrier` - [<$chain RuntimeEvent>]::::PolkadotXcm( - $crate::impls::pallet_xcm::Event::Attempted { outcome: $crate::impls::Outcome::Error(error) } - ) => { - error: *error == expected_error.unwrap_or(*error), - }, - ] - ); - } - - /// Asserts a XCM message is sent - pub fn assert_xcm_pallet_sent() { - $crate::impls::assert_expected_events!( - Self, - vec![ - [<$chain RuntimeEvent>]::::PolkadotXcm($crate::impls::pallet_xcm::Event::Sent { .. }) => {}, - ] - ); - } - - /// Asserts a XCM message is sent to Relay Chain - pub fn assert_parachain_system_ump_sent() { - $crate::impls::assert_expected_events!( - Self, - vec![ - [<$chain RuntimeEvent>]::::ParachainSystem( - $crate::impls::cumulus_pallet_parachain_system::Event::UpwardMessageSent { .. } - ) => {}, - ] - ); - } - - /// Asserts a XCM from Relay Chain is completely executed - pub fn assert_dmp_queue_complete(expected_weight: Option<$crate::impls::Weight>) { - $crate::impls::assert_expected_events!( - Self, - vec![ - [<$chain RuntimeEvent>]::::MessageQueue($crate::impls::pallet_message_queue::Event::Processed { - success: true, weight_used: weight, .. - }) => { - weight: $crate::impls::weight_within_threshold( - ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), - expected_weight.unwrap_or(*weight), - *weight - ), - }, - ] - ); - } - - /// Asserts a XCM from Relay Chain is incompletely executed - pub fn assert_dmp_queue_incomplete( - expected_weight: Option<$crate::impls::Weight>, - expected_error: Option<$crate::impls::Error>, - ) { - $crate::impls::assert_expected_events!( - Self, - vec![ - [<$chain RuntimeEvent>]::::MessageQueue($crate::impls::pallet_message_queue::Event::Processed { - success: false, weight_used: weight, .. - }) => { - weight: $crate::impls::weight_within_threshold( - ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), - expected_weight.unwrap_or(*weight), - *weight - ), - }, - ] - ); - } - - /// Asserts a XCM from another Parachain is completely executed - pub fn assert_xcmp_queue_success(expected_weight: Option<$crate::impls::Weight>) { - $crate::impls::assert_expected_events!( - Self, - vec![ - [<$chain RuntimeEvent>]::::MessageQueue($crate::impls::pallet_message_queue::Event::Processed { success: true, weight_used: weight, .. } - - ) => { - weight: $crate::impls::weight_within_threshold( - ($crate::impls::REF_TIME_THRESHOLD, $crate::impls::PROOF_SIZE_THRESHOLD), - expected_weight.unwrap_or(*weight), - *weight - ), - }, - ] - ); - } - } - } - }; -} - -#[macro_export] -macro_rules! impl_assets_helpers_for_parachain { - ( $chain:ident, $relay_chain:ident ) => { - $crate::impls::paste::paste! { - impl $chain { - /// Returns the encoded call for `force_create` from the assets pallet - pub fn force_create_asset_call( - asset_id: u32, - owner: $crate::impls::AccountId, - is_sufficient: bool, - min_balance: $crate::impls::Balance, - ) -> $crate::impls::DoubleEncoded<()> { - use $crate::impls::{Chain, Encode}; - - ::RuntimeCall::Assets($crate::impls::pallet_assets::Call::< - ::Runtime, - $crate::impls::pallet_assets::Instance1, - >::force_create { - id: asset_id.into(), - owner: owner.into(), - is_sufficient, - min_balance, - }) - .encode() - .into() - } - - /// Returns a `VersionedXcm` for `force_create` from the assets pallet - pub fn force_create_asset_xcm( - origin_kind: $crate::impls::OriginKind, - asset_id: u32, - owner: $crate::impls::AccountId, - is_sufficient: bool, - min_balance: $crate::impls::Balance, - ) -> $crate::impls::VersionedXcm<()> { - let call = Self::force_create_asset_call(asset_id, owner, is_sufficient, min_balance); - $crate::impls::xcm_transact_unpaid_execution(call, origin_kind) - } - - /// Mint assets making use of the assets pallet - pub fn mint_asset( - signed_origin: ::RuntimeOrigin, - id: u32, - beneficiary: $crate::impls::AccountId, - amount_to_mint: u128, - ) { - ::execute_with(|| { - $crate::impls::assert_ok!(]>::Assets::mint( - signed_origin, - id.into(), - beneficiary.clone().into(), - amount_to_mint - )); - - type RuntimeEvent = <$chain as $crate::impls::Chain>::RuntimeEvent; - - $crate::impls::assert_expected_events!( - Self, - vec![ - RuntimeEvent::::Assets( - $crate::impls::pallet_assets::Event::Issued { asset_id, owner, amount } - ) => { - asset_id: *asset_id == id, - owner: *owner == beneficiary.clone().into(), - amount: *amount == amount_to_mint, - }, - ] - ); - }); - } - - /// Force create and mint assets making use of the assets pallet - pub fn force_create_and_mint_asset( - id: u32, - min_balance: u128, - is_sufficient: bool, - asset_owner: $crate::impls::AccountId, - dmp_weight_threshold: Option<$crate::impls::Weight>, - amount_to_mint: u128, - ) { - use $crate::impls::Chain; - - // Force create asset - Self::force_create_asset_from_relay_as_root( - id, - min_balance, - is_sufficient, - asset_owner.clone(), - dmp_weight_threshold - ); - - // Mint asset for System Parachain's sender - let signed_origin = ::RuntimeOrigin::signed(asset_owner.clone()); - Self::mint_asset(signed_origin, id, asset_owner, amount_to_mint); - } - - /// Relay Chain sends `Transact` instruction with `force_create_asset` to Parachain with `Assets` instance of `pallet_assets` . - pub fn force_create_asset_from_relay_as_root( - id: u32, - min_balance: u128, - is_sufficient: bool, - asset_owner: $crate::impls::AccountId, - dmp_weight_threshold: Option<$crate::impls::Weight>, - ) { - use $crate::impls::{Parachain, Inspect, TestExt}; - - <$relay_chain>::send_unpaid_transact_to_parachain_as_root( - Self::para_id(), - Self::force_create_asset_call(id, asset_owner.clone(), is_sufficient, min_balance), - ); - - // Receive XCM message in Assets Parachain - Self::execute_with(|| { - type RuntimeEvent = <$chain as $crate::impls::Chain>::RuntimeEvent; - - Self::assert_dmp_queue_complete(dmp_weight_threshold); - - $crate::impls::assert_expected_events!( - Self, - vec![ - RuntimeEvent::::Assets($crate::impls::pallet_assets::Event::ForceCreated { asset_id, owner }) => { - asset_id: *asset_id == id, - owner: *owner == asset_owner, - }, - ] - ); - - assert!(]>::Assets::asset_exists(id.into())); - }); - } - } - } - }; -} - -#[macro_export] -macro_rules! impl_foreign_assets_helpers_for_parachain { - ( $chain:ident, $relay_chain:ident ) => { - $crate::impls::paste::paste! { - impl $chain { - /// Create foreign assets using sudo `ForeignAssets::force_create()` - pub fn force_create_foreign_asset( - id: $crate::impls::MultiLocation, - owner: $crate::impls::AccountId, - is_sufficient: bool, - min_balance: u128, - prefund_accounts: Vec<($crate::impls::AccountId, u128)>, - ) { - use $crate::impls::Inspect; - let sudo_origin = <$chain as $crate::impls::Chain>::RuntimeOrigin::root(); - ::execute_with(|| { - $crate::impls::assert_ok!( - ]>::ForeignAssets::force_create( - sudo_origin, - id, - owner.clone().into(), - is_sufficient, - min_balance, - ) - ); - assert!(]>::ForeignAssets::asset_exists(id)); - type RuntimeEvent = <$chain as $crate::impls::Chain>::RuntimeEvent; - $crate::impls::assert_expected_events!( - Self, - vec![ - RuntimeEvent::::ForeignAssets( - $crate::impls::pallet_assets::Event::ForceCreated { - asset_id, - .. - } - ) => { asset_id: *asset_id == id, }, - ] - ); - }); - for (beneficiary, amount) in prefund_accounts.into_iter() { - let signed_origin = - <$chain as $crate::impls::Chain>::RuntimeOrigin::signed(owner.clone()); - Self::mint_foreign_asset(signed_origin, id, beneficiary, amount); - } - } - - /// Mint assets making use of the ForeignAssets pallet-assets instance - pub fn mint_foreign_asset( - signed_origin: ::RuntimeOrigin, - id: $crate::impls::MultiLocation, - beneficiary: $crate::impls::AccountId, - amount_to_mint: u128, - ) { - ::execute_with(|| { - $crate::impls::assert_ok!(]>::ForeignAssets::mint( - signed_origin, - id.into(), - beneficiary.clone().into(), - amount_to_mint - )); - - type RuntimeEvent = <$chain as $crate::impls::Chain>::RuntimeEvent; - - $crate::impls::assert_expected_events!( - Self, - vec![ - RuntimeEvent::::ForeignAssets( - $crate::impls::pallet_assets::Event::Issued { asset_id, owner, amount } - ) => { - asset_id: *asset_id == id, - owner: *owner == beneficiary.clone().into(), - amount: *amount == amount_to_mint, - }, - ] - ); - }); - } - } - } - }; -} diff --git a/integration-tests/emulated/common/src/lib.rs b/integration-tests/emulated/common/src/lib.rs deleted file mode 100644 index 8058f88b58..0000000000 --- a/integration-tests/emulated/common/src/lib.rs +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -pub mod impls; -pub mod macros; -pub mod xcm_helpers; - -// Substrate -use beefy_primitives::ecdsa_crypto::AuthorityId as BeefyId; -use grandpa_primitives::AuthorityId as GrandpaId; -use pallet_im_online::sr25519::AuthorityId as ImOnlineId; -use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; -use sp_consensus_babe::AuthorityId as BabeId; -use sp_core::{sr25519, Pair, Public}; -use sp_runtime::{ - traits::{IdentifyAccount, Verify}, - MultiSignature, -}; - -// Cumulus -use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId}; -use polkadot_primitives::{AssignmentId, ValidatorId}; - -/// The default XCM version to set in genesis config. -pub const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; - -pub const XCM_V2: u32 = 3; -pub const XCM_V3: u32 = 2; -pub const REF_TIME_THRESHOLD: u64 = 33; -pub const PROOF_SIZE_THRESHOLD: u64 = 33; - -type AccountPublic = ::Signer; - -/// Helper function to generate a crypto pair from seed -fn get_from_seed(seed: &str) -> ::Public { - TPublic::Pair::from_string(&format!("//{}", seed), None) - .expect("static values are valid; qed") - .public() -} - -/// Helper function to generate an account ID from seed. -pub fn get_account_id_from_seed(seed: &str) -> AccountId -where - AccountPublic: From<::Public>, -{ - AccountPublic::from(get_from_seed::(seed)).into_account() -} - -pub mod accounts { - use super::*; - pub const ALICE: &str = "Alice"; - pub const BOB: &str = "Bob"; - pub const CHARLIE: &str = "Charlie"; - pub const DAVE: &str = "Dave"; - pub const EVE: &str = "Eve"; - pub const FERDIE: &str = "Ferdei"; - pub const ALICE_STASH: &str = "Alice//stash"; - pub const BOB_STASH: &str = "Bob//stash"; - pub const CHARLIE_STASH: &str = "Charlie//stash"; - pub const DAVE_STASH: &str = "Dave//stash"; - pub const EVE_STASH: &str = "Eve//stash"; - pub const FERDIE_STASH: &str = "Ferdie//stash"; - pub const FERDIE_BEEFY: &str = "Ferdie//stash"; - - pub fn init_balances() -> Vec { - vec![ - get_account_id_from_seed::(ALICE), - get_account_id_from_seed::(BOB), - get_account_id_from_seed::(CHARLIE), - get_account_id_from_seed::(DAVE), - get_account_id_from_seed::(EVE), - get_account_id_from_seed::(FERDIE), - get_account_id_from_seed::(ALICE_STASH), - get_account_id_from_seed::(BOB_STASH), - get_account_id_from_seed::(CHARLIE_STASH), - get_account_id_from_seed::(DAVE_STASH), - get_account_id_from_seed::(EVE_STASH), - get_account_id_from_seed::(FERDIE_STASH), - ] - } -} - -pub mod collators { - use super::*; - - pub fn invulnerables_asset_hub_polkadot() -> Vec<(AccountId, AssetHubPolkadotAuraId)> { - vec![ - ( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - ), - ( - get_account_id_from_seed::("Bob"), - get_from_seed::("Bob"), - ), - ] - } - - pub fn invulnerables() -> Vec<(AccountId, AuraId)> { - vec![ - ( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - ), - (get_account_id_from_seed::("Bob"), get_from_seed::("Bob")), - ] - } -} - -pub mod validators { - use super::*; - - pub fn initial_authorities() -> Vec<( - AccountId, - AccountId, - BabeId, - GrandpaId, - ImOnlineId, - ValidatorId, - AssignmentId, - AuthorityDiscoveryId, - BeefyId, - )> { - let seed = "Alice"; - vec![( - get_account_id_from_seed::(&format!("{}//stash", seed)), - get_account_id_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - get_from_seed::(seed), - )] - } -} diff --git a/integration-tests/emulated/common/src/macros.rs b/integration-tests/emulated/common/src/macros.rs deleted file mode 100644 index ffcf2bc346..0000000000 --- a/integration-tests/emulated/common/src/macros.rs +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -pub use paste; - -// Substrate -pub use pallet_balances; -pub use pallet_message_queue; -pub use pallet_xcm; - -// Polkadot -pub use xcm::prelude::{AccountId32, WeightLimit}; - -// Cumulus -pub use asset_test_utils; -pub use cumulus_pallet_xcmp_queue; -pub use xcm_emulator::Chain; - -#[macro_export] -macro_rules! test_parachain_is_trusted_teleporter { - ( $sender_para:ty, $sender_xcm_config:ty, vec![$( $receiver_para:ty ),+], ($assets:expr, $amount:expr) ) => { - $crate::macros::paste::paste! { - // init Origin variables - let sender = [<$sender_para Sender>]::get(); - let mut para_sender_balance_before = - <$sender_para as $crate::macros::Chain>::account_data_of(sender.clone()).free; - let origin = <$sender_para as $crate::macros::Chain>::RuntimeOrigin::signed(sender.clone()); - let fee_asset_item = 0; - let weight_limit = $crate::macros::WeightLimit::Unlimited; - - $( - { - // init Destination variables - let receiver = [<$receiver_para Receiver>]::get(); - let para_receiver_balance_before = - <$receiver_para as $crate::macros::Chain>::account_data_of(receiver.clone()).free; - let para_destination = - <$sender_para>::sibling_location_of(<$receiver_para>::para_id()); - let beneficiary: MultiLocation = - $crate::macros::AccountId32 { network: None, id: receiver.clone().into() }.into(); - - // Send XCM message from Origin Parachain - // We are only testing the limited teleport version, which should be ok since success will - // depend only on a proper `XcmConfig` at destination. - <$sender_para>::execute_with(|| { - assert_ok!(<$sender_para as [<$sender_para Pallet>]>::PolkadotXcm::limited_teleport_assets( - origin.clone(), - bx!(para_destination.into()), - bx!(beneficiary.into()), - bx!($assets.clone().into()), - fee_asset_item, - weight_limit.clone(), - )); - - type RuntimeEvent = <$sender_para as $crate::macros::Chain>::RuntimeEvent; - - assert_expected_events!( - $sender_para, - vec![ - RuntimeEvent::PolkadotXcm( - $crate::macros::pallet_xcm::Event::Attempted { outcome: Outcome::Complete { .. } } - ) => {}, - RuntimeEvent::XcmpQueue( - $crate::macros::cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. } - ) => {}, - RuntimeEvent::Balances( - $crate::macros::pallet_balances::Event::Burned { who: sender, amount } - ) => {}, - ] - ); - }); - - // Receive XCM message in Destination Parachain - <$receiver_para>::execute_with(|| { - type RuntimeEvent = <$receiver_para as $crate::macros::Chain>::RuntimeEvent; - - assert_expected_events!( - $receiver_para, - vec![ - RuntimeEvent::Balances( - $crate::macros::pallet_balances::Event::Minted { who: receiver, .. } - ) => {}, - RuntimeEvent::MessageQueue( - $crate::macros::pallet_message_queue::Event::Processed { success: true, .. } - ) => {}, - ] - ); - }); - - // Check if balances are updated accordingly in Origin and Destination Parachains - let para_sender_balance_after = - <$sender_para as $crate::macros::Chain>::account_data_of(sender.clone()).free; - let para_receiver_balance_after = - <$receiver_para as $crate::macros::Chain>::account_data_of(receiver.clone()).free; - let delivery_fees = <$sender_para>::execute_with(|| { - $crate::macros::asset_test_utils::xcm_helpers::transfer_assets_delivery_fees::< - <$sender_xcm_config as xcm_executor::Config>::XcmSender, - >($assets.clone(), fee_asset_item, weight_limit.clone(), beneficiary, para_destination) - }); - - assert_eq!(para_sender_balance_before - $amount - delivery_fees, para_sender_balance_after); - assert!(para_receiver_balance_after > para_receiver_balance_before); - - // Update sender balance - para_sender_balance_before = <$sender_para as $crate::macros::Chain>::account_data_of(sender.clone()).free; - } - )+ - } - }; -} - -#[macro_export] -macro_rules! include_penpal_create_foreign_asset_on_asset_hub { - ( $penpal:ident, $asset_hub:ident, $relay_ed:expr, $weight_to_fee:expr) => { - $crate::impls::paste::paste! { - pub fn penpal_create_foreign_asset_on_asset_hub( - asset_id_on_penpal: u32, - foreign_asset_at_asset_hub: MultiLocation, - ah_as_seen_by_penpal: MultiLocation, - is_sufficient: bool, - asset_owner: AccountId, - prefund_amount: u128, - ) { - use frame_support::weights::WeightToFee; - let ah_check_account = $asset_hub::execute_with(|| { - <$asset_hub as [<$asset_hub Pallet>]>::PolkadotXcm::check_account() - }); - let penpal_check_account = - $penpal::execute_with(|| <$penpal as [<$penpal Pallet>]>::PolkadotXcm::check_account()); - let penpal_as_seen_by_ah = $asset_hub::sibling_location_of($penpal::para_id()); - - // prefund SA of Penpal on AssetHub with enough native tokens to pay for creating - // new foreign asset, also prefund CheckingAccount with ED, because teleported asset - // itself might not be sufficient and CheckingAccount cannot be created otherwise - let sov_penpal_on_ah = $asset_hub::sovereign_account_id_of(penpal_as_seen_by_ah); - $asset_hub::fund_accounts(vec![ - (sov_penpal_on_ah.clone().into(), $relay_ed * 100_000_000_000), - (ah_check_account.clone().into(), $relay_ed * 1000), - ]); - - // prefund SA of AssetHub on Penpal with native asset - let sov_ah_on_penpal = $penpal::sovereign_account_id_of(ah_as_seen_by_penpal); - $penpal::fund_accounts(vec![ - (sov_ah_on_penpal.into(), $relay_ed * 1_000_000_000), - (penpal_check_account.clone().into(), $relay_ed * 1000), - ]); - - // Force create asset on $penpal and prefund [<$penpal Sender>] - $penpal::force_create_and_mint_asset( - asset_id_on_penpal, - ASSET_MIN_BALANCE, - is_sufficient, - asset_owner, - None, - prefund_amount, - ); - - let require_weight_at_most = Weight::from_parts(1_100_000_000_000, 30_000); - // `OriginKind::Xcm` required by ForeignCreators pallet-assets origin filter - let origin_kind = OriginKind::Xcm; - let call_create_foreign_assets = - <$asset_hub as Chain>::RuntimeCall::ForeignAssets(pallet_assets::Call::< - <$asset_hub as Chain>::Runtime, - pallet_assets::Instance2, - >::create { - id: foreign_asset_at_asset_hub, - min_balance: ASSET_MIN_BALANCE, - admin: sov_penpal_on_ah.into(), - }) - .encode(); - let buy_execution_fee_amount = $weight_to_fee::weight_to_fee( - &Weight::from_parts(10_100_000_000_000, 300_000), - ); - let buy_execution_fee = MultiAsset { - id: Concrete(MultiLocation { parents: 1, interior: Here }), - fun: Fungible(buy_execution_fee_amount), - }; - let xcm = VersionedXcm::from(Xcm(vec![ - WithdrawAsset { 0: vec![buy_execution_fee.clone()].into() }, - BuyExecution { fees: buy_execution_fee.clone(), weight_limit: Unlimited }, - Transact { require_weight_at_most, origin_kind, call: call_create_foreign_assets.into() }, - ExpectTransactStatus(MaybeErrorCode::Success), - RefundSurplus, - DepositAsset { assets: All.into(), beneficiary: penpal_as_seen_by_ah }, - ])); - // Send XCM message from penpal => asset_hub - let sudo_penpal_origin = <$penpal as Chain>::RuntimeOrigin::root(); - $penpal::execute_with(|| { - assert_ok!(<$penpal as [<$penpal Pallet>]>::PolkadotXcm::send( - sudo_penpal_origin.clone(), - bx!(ah_as_seen_by_penpal.into()), - bx!(xcm), - )); - type RuntimeEvent = <$penpal as Chain>::RuntimeEvent; - assert_expected_events!( - $penpal, - vec![ - RuntimeEvent::PolkadotXcm(pallet_xcm::Event::Sent { .. }) => {}, - ] - ); - }); - $asset_hub::execute_with(|| { - type ForeignAssets = <$asset_hub as [<$asset_hub Pallet>]>::ForeignAssets; - assert!(ForeignAssets::asset_exists(foreign_asset_at_asset_hub)); - }); - } - } - }; -} diff --git a/integration-tests/emulated/common/src/xcm_helpers.rs b/integration-tests/emulated/common/src/xcm_helpers.rs deleted file mode 100644 index c40f51a440..0000000000 --- a/integration-tests/emulated/common/src/xcm_helpers.rs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright Parity Technologies (UK) Ltd. -// This file is part of Cumulus. - -// Cumulus is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Cumulus is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Cumulus. If not, see . - -use parachains_common::AccountId; -use xcm::{prelude::*, DoubleEncoded}; - -/// Helper method to build a XCM with a `Transact` instruction and paying for its execution -pub fn xcm_transact_paid_execution( - call: DoubleEncoded<()>, - origin_kind: OriginKind, - native_asset: MultiAsset, - beneficiary: AccountId, -) -> VersionedXcm<()> { - let weight_limit = WeightLimit::Unlimited; - let require_weight_at_most = Weight::from_parts(1000000000, 200000); - let native_assets: MultiAssets = native_asset.clone().into(); - - VersionedXcm::from(Xcm(vec![ - WithdrawAsset(native_assets), - BuyExecution { fees: native_asset, weight_limit }, - Transact { require_weight_at_most, origin_kind, call }, - RefundSurplus, - DepositAsset { - assets: All.into(), - beneficiary: MultiLocation { - parents: 0, - interior: X1(AccountId32 { network: None, id: beneficiary.into() }), - }, - }, - ])) -} - -/// Helper method to build a XCM with a `Transact` instruction without paying for its execution -pub fn xcm_transact_unpaid_execution( - call: DoubleEncoded<()>, - origin_kind: OriginKind, -) -> VersionedXcm<()> { - let weight_limit = WeightLimit::Unlimited; - let require_weight_at_most = Weight::from_parts(1000000000, 200000); - let check_origin = None; - - VersionedXcm::from(Xcm(vec![ - UnpaidExecution { weight_limit, check_origin }, - Transact { require_weight_at_most, origin_kind, call }, - ])) -} -/// Helper method to get the non-fee asset used in multiple assets transfer -pub fn non_fee_asset(assets: &MultiAssets, fee_idx: usize) -> Option<(MultiLocation, u128)> { - let asset = assets.inner().into_iter().enumerate().find(|a| a.0 != fee_idx)?.1.clone(); - let asset_id = match asset.id { - Concrete(id) => id, - _ => return None, - }; - let asset_amount = match asset.fun { - Fungible(amount) => amount, - _ => return None, - }; - Some((asset_id, asset_amount)) -} diff --git a/integration-tests/emulated/helpers/Cargo.toml b/integration-tests/emulated/helpers/Cargo.toml new file mode 100644 index 0000000000..600ae8da65 --- /dev/null +++ b/integration-tests/emulated/helpers/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "integration-tests-helpers" +version = "0.0.1" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Emulated integration tests helpers" +publish = false + +[dependencies] +paste = "1.0.14" + +# Substrate +pallet-balances = { version = "28.0.0" } +pallet-message-queue = { version = "31.0.0" } + +# Polkadot +xcm = { package = "staging-xcm", version = "7.0.0" } +pallet-xcm = { version = "7.0.0" } + +# Cumulus +xcm-emulator = { version = "0.5.0" } +cumulus-pallet-xcmp-queue = { version = "0.7.0" } +asset-test-utils = { version = "7.0.0" } diff --git a/integration-tests/emulated/helpers/src/lib.rs b/integration-tests/emulated/helpers/src/lib.rs new file mode 100644 index 0000000000..ba85425eba --- /dev/null +++ b/integration-tests/emulated/helpers/src/lib.rs @@ -0,0 +1,124 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub use paste; + +// Substrate +pub use pallet_balances; +pub use pallet_message_queue; + +// Polkadot +pub use pallet_xcm; +pub use xcm::prelude::{AccountId32, WeightLimit}; + +// Cumulus +pub use asset_test_utils; +pub use cumulus_pallet_xcmp_queue; +pub use xcm_emulator::Chain; + +/// TODO: when bumping to polkadot-sdk v1.8.0, +/// remove this crate altogether and get the macros from `emulated-integration-tests-common`. +#[macro_export] +macro_rules! test_parachain_is_trusted_teleporter { + ( $sender_para:ty, $sender_xcm_config:ty, vec![$( $receiver_para:ty ),+], ($assets:expr, $amount:expr) ) => { + $crate::paste::paste! { + // init Origin variables + let sender = [<$sender_para Sender>]::get(); + let mut para_sender_balance_before = + <$sender_para as $crate::Chain>::account_data_of(sender.clone()).free; + let origin = <$sender_para as $crate::Chain>::RuntimeOrigin::signed(sender.clone()); + let fee_asset_item = 0; + let weight_limit = $crate::WeightLimit::Unlimited; + + $( + { + // init Destination variables + let receiver = [<$receiver_para Receiver>]::get(); + let para_receiver_balance_before = + <$receiver_para as $crate::Chain>::account_data_of(receiver.clone()).free; + let para_destination = + <$sender_para>::sibling_location_of(<$receiver_para>::para_id()); + let beneficiary: MultiLocation = + $crate::AccountId32 { network: None, id: receiver.clone().into() }.into(); + + // Send XCM message from Origin Parachain + // We are only testing the limited teleport version, which should be ok since success will + // depend only on a proper `XcmConfig` at destination. + <$sender_para>::execute_with(|| { + assert_ok!(<$sender_para as [<$sender_para Pallet>]>::PolkadotXcm::limited_teleport_assets( + origin.clone(), + bx!(para_destination.clone().into()), + bx!(beneficiary.clone().into()), + bx!($assets.clone().into()), + fee_asset_item, + weight_limit.clone(), + )); + + type RuntimeEvent = <$sender_para as $crate::Chain>::RuntimeEvent; + + assert_expected_events!( + $sender_para, + vec![ + RuntimeEvent::PolkadotXcm( + $crate::pallet_xcm::Event::Attempted { outcome: Outcome::Complete { .. } } + ) => {}, + RuntimeEvent::XcmpQueue( + $crate::cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. } + ) => {}, + RuntimeEvent::Balances( + $crate::pallet_balances::Event::Burned { who: sender, amount } + ) => {}, + ] + ); + }); + + // Receive XCM message in Destination Parachain + <$receiver_para>::execute_with(|| { + type RuntimeEvent = <$receiver_para as $crate::Chain>::RuntimeEvent; + + assert_expected_events!( + $receiver_para, + vec![ + RuntimeEvent::Balances( + $crate::pallet_balances::Event::Minted { who: receiver, .. } + ) => {}, + RuntimeEvent::MessageQueue( + $crate::pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); + }); + + // Check if balances are updated accordingly in Origin and Destination Parachains + let para_sender_balance_after = + <$sender_para as $crate::Chain>::account_data_of(sender.clone()).free; + let para_receiver_balance_after = + <$receiver_para as $crate::Chain>::account_data_of(receiver.clone()).free; + let delivery_fees = <$sender_para>::execute_with(|| { + $crate::asset_test_utils::xcm_helpers::transfer_assets_delivery_fees::< + <$sender_xcm_config as xcm_executor::Config>::XcmSender, + >($assets.clone(), fee_asset_item, weight_limit.clone(), beneficiary, para_destination) + }); + + assert_eq!(para_sender_balance_before - $amount - delivery_fees, para_sender_balance_after); + assert!(para_receiver_balance_after > para_receiver_balance_before); + + // Update sender balance + para_sender_balance_before = <$sender_para as $crate::Chain>::account_data_of(sender.clone()).free; + } + )+ + } + }; +} diff --git a/integration-tests/emulated/networks/kusama-polkadot-system/Cargo.toml b/integration-tests/emulated/networks/kusama-polkadot-system/Cargo.toml new file mode 100644 index 0000000000..004ba93c2b --- /dev/null +++ b/integration-tests/emulated/networks/kusama-polkadot-system/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "kusama-polkadot-system-emulated-network" +version = "0.1.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Kusama<>Polkadot emulated bridged network" +publish = false + +[dependencies] + +# Cumulus +emulated-integration-tests-common = { version = "3.0.0" } + +# Runtimes +asset-hub-kusama-emulated-chain = { path = "../../chains/parachains/assets/asset-hub-kusama" } +asset-hub-polkadot-emulated-chain = { path = "../../chains/parachains/assets/asset-hub-polkadot" } +bridge-hub-kusama-emulated-chain = { path = "../../chains/parachains/bridges/bridge-hub-kusama" } +bridge-hub-polkadot-emulated-chain = { path = "../../chains/parachains/bridges/bridge-hub-polkadot" } +kusama-emulated-chain = { path = "../../chains/relays/kusama" } +penpal-emulated-chain = { path = "../../chains/parachains/testing/penpal" } +polkadot-emulated-chain = { path = "../../chains/relays/polkadot" } diff --git a/integration-tests/emulated/networks/kusama-polkadot-system/src/lib.rs b/integration-tests/emulated/networks/kusama-polkadot-system/src/lib.rs new file mode 100644 index 0000000000..dbdb453718 --- /dev/null +++ b/integration-tests/emulated/networks/kusama-polkadot-system/src/lib.rs @@ -0,0 +1,100 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub use asset_hub_kusama_emulated_chain; +pub use asset_hub_polkadot_emulated_chain; +pub use bridge_hub_kusama_emulated_chain; +pub use bridge_hub_polkadot_emulated_chain; +pub use kusama_emulated_chain; +pub use penpal_emulated_chain; +pub use polkadot_emulated_chain; + +use asset_hub_kusama_emulated_chain::AssetHubKusama; +use asset_hub_polkadot_emulated_chain::AssetHubPolkadot; +use bridge_hub_kusama_emulated_chain::BridgeHubKusama; +use bridge_hub_polkadot_emulated_chain::BridgeHubPolkadot; +use kusama_emulated_chain::Kusama; +use penpal_emulated_chain::PenpalA; +use polkadot_emulated_chain::Polkadot; + +// Cumulus +use emulated_integration_tests_common::{ + accounts::{ALICE, BOB}, + impls::{BridgeHubMessageHandler, BridgeMessagesInstance1}, + xcm_emulator::{ + decl_test_bridges, decl_test_networks, decl_test_sender_receiver_accounts_parameter_types, + Chain, + }, +}; + +decl_test_networks! { + pub struct KusamaMockNet { + relay_chain = Kusama, + parachains = vec![ + AssetHubKusama, + BridgeHubKusama, + PenpalA, + ], + bridge = KusamaPolkadotMockBridge + + }, + pub struct PolkadotMockNet { + relay_chain = Polkadot, + parachains = vec![ + AssetHubPolkadot, + BridgeHubPolkadot, + ], + bridge = PolkadotKusamaMockBridge + }, +} + +decl_test_bridges! { + pub struct KusamaPolkadotMockBridge { + source = BridgeHubKusamaPara, + target = BridgeHubPolkadotPara, + handler = KusamaPolkadotMessageHandler + }, + pub struct PolkadotKusamaMockBridge { + source = BridgeHubPolkadotPara, + target = BridgeHubKusamaPara, + handler = PolkadotKusamaMessageHandler + } +} + +type BridgeHubKusamaRuntime = ::Runtime; +type BridgeHubPolkadotRuntime = ::Runtime; + +pub type KusamaPolkadotMessageHandler = BridgeHubMessageHandler< + BridgeHubKusamaRuntime, + BridgeMessagesInstance1, + BridgeHubPolkadotRuntime, + BridgeMessagesInstance1, +>; +pub type PolkadotKusamaMessageHandler = BridgeHubMessageHandler< + BridgeHubPolkadotRuntime, + BridgeMessagesInstance1, + BridgeHubKusamaRuntime, + BridgeMessagesInstance1, +>; + +decl_test_sender_receiver_accounts_parameter_types! { + KusamaRelay { sender: ALICE, receiver: BOB }, + AssetHubKusamaPara { sender: ALICE, receiver: BOB }, + BridgeHubKusamaPara { sender: ALICE, receiver: BOB }, + PolkadotRelay { sender: ALICE, receiver: BOB }, + AssetHubPolkadotPara { sender: ALICE, receiver: BOB }, + BridgeHubPolkadotPara { sender: ALICE, receiver: BOB }, + PenpalAPara { sender: ALICE, receiver: BOB } +} diff --git a/integration-tests/emulated/networks/kusama-system/Cargo.toml b/integration-tests/emulated/networks/kusama-system/Cargo.toml new file mode 100644 index 0000000000..e575d21a5d --- /dev/null +++ b/integration-tests/emulated/networks/kusama-system/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "kusama-system-emulated-network" +version = "0.1.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Kusama System emulated network" +publish = false + +[dependencies] + +# Cumulus +emulated-integration-tests-common = { version = "3.0.0" } + +# Runtimes +asset-hub-kusama-emulated-chain = { path = "../../chains/parachains/assets/asset-hub-kusama" } +bridge-hub-kusama-emulated-chain = { path = "../../chains/parachains/bridges/bridge-hub-kusama" } +kusama-emulated-chain = { path = "../../chains/relays/kusama" } +penpal-emulated-chain = { path = "../../chains/parachains/testing/penpal" } diff --git a/integration-tests/emulated/networks/kusama-system/src/lib.rs b/integration-tests/emulated/networks/kusama-system/src/lib.rs new file mode 100644 index 0000000000..b6a3cdc3e5 --- /dev/null +++ b/integration-tests/emulated/networks/kusama-system/src/lib.rs @@ -0,0 +1,51 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub use asset_hub_kusama_emulated_chain; +pub use bridge_hub_kusama_emulated_chain; +pub use kusama_emulated_chain; +pub use penpal_emulated_chain; + +use asset_hub_kusama_emulated_chain::AssetHubKusama; +use bridge_hub_kusama_emulated_chain::BridgeHubKusama; +use kusama_emulated_chain::Kusama; +use penpal_emulated_chain::{PenpalA, PenpalB}; + +// Cumulus +use emulated_integration_tests_common::{ + accounts::{ALICE, BOB}, + xcm_emulator::{decl_test_networks, decl_test_sender_receiver_accounts_parameter_types}, +}; + +decl_test_networks! { + pub struct KusamaMockNet { + relay_chain = Kusama, + parachains = vec![ + AssetHubKusama, + BridgeHubKusama, + PenpalA, + PenpalB, + ], + bridge = () + }, +} + +decl_test_sender_receiver_accounts_parameter_types! { + KusamaRelay { sender: ALICE, receiver: BOB }, + AssetHubKusamaPara { sender: ALICE, receiver: BOB }, + BridgeHubKusamaPara { sender: ALICE, receiver: BOB }, + PenpalAPara { sender: ALICE, receiver: BOB }, + PenpalBPara { sender: ALICE, receiver: BOB } +} diff --git a/integration-tests/emulated/networks/polkadot-system/Cargo.toml b/integration-tests/emulated/networks/polkadot-system/Cargo.toml new file mode 100644 index 0000000000..ddc400b973 --- /dev/null +++ b/integration-tests/emulated/networks/polkadot-system/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "polkadot-system-emulated-network" +version = "0.1.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Polkadot System emulated network" +publish = false + +[dependencies] + +# Cumulus +emulated-integration-tests-common = { version = "3.0.0" } + +# Runtimes +asset-hub-polkadot-emulated-chain = { path = "../../chains/parachains/assets/asset-hub-polkadot" } +bridge-hub-polkadot-emulated-chain = { path = "../../chains/parachains/bridges/bridge-hub-polkadot" } +collectives-polkadot-emulated-chain = { path = "../../chains/parachains/collectives/collectives-polkadot" } +penpal-emulated-chain = { path = "../../chains/parachains/testing/penpal" } +polkadot-emulated-chain = { path = "../../chains/relays/polkadot" } diff --git a/integration-tests/emulated/networks/polkadot-system/src/lib.rs b/integration-tests/emulated/networks/polkadot-system/src/lib.rs new file mode 100644 index 0000000000..bed1b549e2 --- /dev/null +++ b/integration-tests/emulated/networks/polkadot-system/src/lib.rs @@ -0,0 +1,55 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub use asset_hub_polkadot_emulated_chain; +pub use bridge_hub_polkadot_emulated_chain; +pub use collectives_polkadot_emulated_chain; +pub use penpal_emulated_chain; +pub use polkadot_emulated_chain; + +use asset_hub_polkadot_emulated_chain::AssetHubPolkadot; +use bridge_hub_polkadot_emulated_chain::BridgeHubPolkadot; +use collectives_polkadot_emulated_chain::CollectivesPolkadot; +use penpal_emulated_chain::{PenpalA, PenpalB}; +use polkadot_emulated_chain::Polkadot; + +// Cumulus +use emulated_integration_tests_common::{ + accounts::{ALICE, BOB}, + xcm_emulator::{decl_test_networks, decl_test_sender_receiver_accounts_parameter_types}, +}; + +decl_test_networks! { + pub struct PolkadotMockNet { + relay_chain = Polkadot, + parachains = vec![ + AssetHubPolkadot, + BridgeHubPolkadot, + CollectivesPolkadot, + PenpalA, + PenpalB, + ], + bridge = () + }, +} + +decl_test_sender_receiver_accounts_parameter_types! { + PolkadotRelay { sender: ALICE, receiver: BOB }, + AssetHubPolkadotPara { sender: ALICE, receiver: BOB }, + BridgeHubPolkadotPara { sender: ALICE, receiver: BOB }, + CollectivesPolkadotPara { sender: ALICE, receiver: BOB }, + PenpalAPara { sender: ALICE, receiver: BOB }, + PenpalBPara { sender: ALICE, receiver: BOB } +} diff --git a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml b/integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml similarity index 55% rename from integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml rename to integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml index c23f244896..c36fc42b31 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "asset-hub-kusama-integration-tests" -version = "1.0.0" +version = "0.1.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -8,30 +8,30 @@ description = "Asset Hub Kusama runtime integration tests with xcm-emulator" publish = false [dependencies] -codec = { package = "parity-scale-codec", version = "3.6.9" } +codec = { package = "parity-scale-codec", version = "3.4.0" } assert_matches = "1.5.0" # Substrate sp-runtime = { version = "31.0.1" } frame-support = { version = "28.0.0" } -pallet-assets = { version = "29.0.0" } pallet-balances = { version = "28.0.0" } +pallet-assets = { version = "29.0.0" } pallet-asset-conversion = { version = "10.0.0" } pallet-message-queue = { version = "31.0.0" } # Polkadot xcm = { package = "staging-xcm", version = "7.0.0" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.0" } pallet-xcm = { version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", version = "7.0.0" } # Cumulus +asset-test-utils = { version = "7.0.0" } +emulated-integration-tests-common = { version = "3.0.0" } parachains-common = { version = "7.0.0" } -xcm-emulator = { version = "0.5.0" } -asset-test-utils = { version = "7.0.1" } # Local -emulated-chains = { path = "../../chains" } -integration-tests-common = { path = "../../common" } -asset-hub-kusama-runtime = { path = "../../../../system-parachains/asset-hubs/asset-hub-kusama" } -kusama-runtime = { package = "staging-kusama-runtime", path = "../../../../relay/kusama" } -system-parachains-constants = { path = "../../../../system-parachains/constants" } +asset-hub-kusama-runtime = { path = "../../../../../system-parachains/asset-hubs/asset-hub-kusama" } +integration-tests-helpers = { path = "../../../helpers" } +kusama-runtime = { package = "staging-kusama-runtime", path = "../../../../../relay/kusama" } +kusama-system-emulated-network = { path = "../../../networks/kusama-system" } +system-parachains-constants = { path = "../../../../../system-parachains/constants" } diff --git a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/lib.rs b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/lib.rs new file mode 100644 index 0000000000..b028b4bd53 --- /dev/null +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/lib.rs @@ -0,0 +1,70 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub use codec::Encode; + +// Substrate +pub use frame_support::{ + assert_err, assert_ok, + pallet_prelude::Weight, + sp_runtime::{AccountId32, DispatchError, DispatchResult}, + traits::fungibles::Inspect, +}; + +// Polkadot +pub use xcm::{ + prelude::{AccountId32 as AccountId32Junction, *}, + v3::{Error, NetworkId::Kusama as KusamaId}, +}; + +// Cumulus +pub use asset_test_utils::xcm_helpers; +pub use emulated_integration_tests_common::{ + xcm_emulator::{ + assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para, + RelayChain as Relay, Test, TestArgs, TestContext, TestExt, + }, + xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, + PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, +}; +pub use integration_tests_helpers::test_parachain_is_trusted_teleporter; +pub use kusama_system_emulated_network::{ + asset_hub_kusama_emulated_chain::{ + genesis::ED as ASSET_HUB_KUSAMA_ED, AssetHubKusamaParaPallet as AssetHubKusamaPallet, + }, + kusama_emulated_chain::{genesis::ED as KUSAMA_ED, KusamaRelayPallet as KusamaPallet}, + penpal_emulated_chain::PenpalAParaPallet as PenpalAPallet, + AssetHubKusamaPara as AssetHubKusama, AssetHubKusamaParaReceiver as AssetHubKusamaReceiver, + AssetHubKusamaParaSender as AssetHubKusamaSender, BridgeHubKusamaPara as BridgeHubKusama, + BridgeHubKusamaParaReceiver as BridgeHubKusamaReceiver, KusamaRelay as Kusama, + KusamaRelayReceiver as KusamaReceiver, KusamaRelaySender as KusamaSender, + PenpalAPara as PenpalA, PenpalAParaReceiver as PenpalAReceiver, + PenpalAParaSender as PenpalASender, +}; +pub use parachains_common::{AccountId, Balance}; + +pub const ASSET_ID: u32 = 1; +pub const ASSET_MIN_BALANCE: u128 = 1000; +// `Assets` pallet index +pub const ASSETS_PALLET_ID: u8 = 50; + +pub type RelayToSystemParaTest = Test; +pub type RelayToParaTest = Test; +pub type SystemParaToRelayTest = Test; +pub type SystemParaToParaTest = Test; +pub type ParaToSystemParaTest = Test; + +#[cfg(test)] +mod tests; diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/mod.rs similarity index 89% rename from integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs rename to integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/mod.rs index c51ed79e71..4b7498c1c6 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/mod.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/mod.rs @@ -20,8 +20,8 @@ mod swap; mod teleport; use crate::*; -integration_tests_common::include_penpal_create_foreign_asset_on_asset_hub!( - PenpalKusamaA, +emulated_integration_tests_common::include_penpal_create_foreign_asset_on_asset_hub!( + PenpalA, AssetHubKusama, KUSAMA_ED, system_parachains_constants::kusama::fee::WeightToFee diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/reserve_transfer.rs similarity index 82% rename from integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs rename to integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/reserve_transfer.rs index e99f9e422d..3e2b92c20e 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/reserve_transfer.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/reserve_transfer.rs @@ -16,6 +16,7 @@ use crate::*; use asset_hub_kusama_runtime::xcm_config::XcmConfig as AssetHubKusamaXcmConfig; use kusama_runtime::xcm_config::XcmConfig as KusamaXcmConfig; +use kusama_system_emulated_network::penpal_emulated_chain::XcmConfig as PenpalKusamaXcmConfig; fn relay_to_para_sender_assertions(t: RelayToParaTest) { type RuntimeEvent = ::RuntimeEvent; @@ -61,9 +62,9 @@ fn system_para_to_para_sender_assertions(t: SystemParaToParaTest) { } fn para_receiver_assertions(_: Test) { - type RuntimeEvent = ::RuntimeEvent; + type RuntimeEvent = ::RuntimeEvent; assert_expected_events!( - PenpalKusamaA, + PenpalA, vec![ RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, RuntimeEvent::MessageQueue( @@ -74,13 +75,10 @@ fn para_receiver_assertions(_: Test) { } fn para_to_system_para_sender_assertions(t: ParaToSystemParaTest) { - type RuntimeEvent = ::RuntimeEvent; - PenpalKusamaA::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 864_610_000, - 8_799, - ))); + type RuntimeEvent = ::RuntimeEvent; + PenpalA::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(864_610_000, 8_799))); assert_expected_events!( - PenpalKusamaA, + PenpalA, vec![ // Amount to reserve transfer is transferred to Parachain's Sovereign account RuntimeEvent::Balances( @@ -95,8 +93,8 @@ fn para_to_system_para_sender_assertions(t: ParaToSystemParaTest) { fn para_to_system_para_receiver_assertions(t: ParaToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; - let sov_penpal_on_ahr = AssetHubKusama::sovereign_account_id_of( - AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()), + let sov_penpal_on_ahk = AssetHubKusama::sovereign_account_id_of( + AssetHubKusama::sibling_location_of(PenpalA::para_id()), ); assert_expected_events!( AssetHubKusama, @@ -105,7 +103,7 @@ fn para_to_system_para_receiver_assertions(t: ParaToSystemParaTest) { RuntimeEvent::Balances( pallet_balances::Event::Burned { who, amount } ) => { - who: *who == sov_penpal_on_ahr.clone().into(), + who: *who == sov_penpal_on_ahk.clone().into(), amount: *amount == t.args.amount, }, RuntimeEvent::Balances(pallet_balances::Event::Minted { .. }) => {}, @@ -141,9 +139,9 @@ fn system_para_to_para_assets_sender_assertions(t: SystemParaToParaTest) { } fn system_para_to_para_assets_receiver_assertions(_: Test) { - type RuntimeEvent = ::RuntimeEvent; + type RuntimeEvent = ::RuntimeEvent; assert_expected_events!( - PenpalKusamaA, + PenpalA, vec![ RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, RuntimeEvent::Assets(pallet_assets::Event::Issued { .. }) => {}, @@ -177,7 +175,7 @@ fn system_para_to_para_reserve_transfer_assets(t: SystemParaToParaTest) -> Dispa } fn para_to_system_para_reserve_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { - ::PolkadotXcm::limited_reserve_transfer_assets( + ::PolkadotXcm::limited_reserve_transfer_assets( t.signed_origin, bx!(t.args.dest.into()), bx!(t.args.beneficiary.into()), @@ -260,14 +258,14 @@ fn reserve_transfer_native_asset_from_system_para_to_relay_fails() { #[test] fn reserve_transfer_native_asset_from_relay_to_para() { // Init values for Relay - let destination = Kusama::child_location_of(PenpalKusamaA::para_id()); - let beneficiary_id = PenpalKusamaAReceiver::get(); + let destination = Kusama::child_location_of(PenpalA::para_id()); + let beneficiary_id = PenpalAReceiver::get(); let amount_to_send: Balance = KUSAMA_ED * 1000; let test_args = TestContext { sender: KusamaSender::get(), - receiver: PenpalKusamaAReceiver::get(), - args: relay_test_args(destination, beneficiary_id, amount_to_send), + receiver: PenpalAReceiver::get(), + args: TestArgs::new_relay(destination, beneficiary_id, amount_to_send), }; let mut test = RelayToParaTest::new(test_args); @@ -276,7 +274,7 @@ fn reserve_transfer_native_asset_from_relay_to_para() { let receiver_balance_before = test.receiver.balance; test.set_assertion::(relay_to_para_sender_assertions); - test.set_assertion::(para_receiver_assertions); + test.set_assertion::(para_receiver_assertions); test.set_dispatchable::(relay_to_para_reserve_transfer_assets); test.assert(); @@ -303,15 +301,15 @@ fn reserve_transfer_native_asset_from_relay_to_para() { #[test] fn reserve_transfer_native_asset_from_system_para_to_para() { // Init values for System Parachain - let destination = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); - let beneficiary_id = PenpalKusamaAReceiver::get(); + let destination = AssetHubKusama::sibling_location_of(PenpalA::para_id()); + let beneficiary_id = PenpalAReceiver::get(); let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; let assets = (Parent, amount_to_send).into(); let test_args = TestContext { sender: AssetHubKusamaSender::get(), - receiver: PenpalKusamaAReceiver::get(), - args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + receiver: PenpalAReceiver::get(), + args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = SystemParaToParaTest::new(test_args); @@ -320,7 +318,7 @@ fn reserve_transfer_native_asset_from_system_para_to_para() { let receiver_balance_before = test.receiver.balance; test.set_assertion::(system_para_to_para_sender_assertions); - test.set_assertion::(para_receiver_assertions); + test.set_assertion::(para_receiver_assertions); test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); test.assert(); @@ -347,15 +345,15 @@ fn reserve_transfer_native_asset_from_system_para_to_para() { #[test] fn reserve_transfer_native_asset_from_para_to_system_para() { // Init values for Penpal Parachain - let destination = PenpalKusamaA::sibling_location_of(AssetHubKusama::para_id()); + let destination = PenpalA::sibling_location_of(AssetHubKusama::para_id()); let beneficiary_id = AssetHubKusamaReceiver::get(); let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; let assets = (Parent, amount_to_send).into(); let test_args = TestContext { - sender: PenpalKusamaASender::get(), + sender: PenpalASender::get(), receiver: AssetHubKusamaReceiver::get(), - args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = ParaToSystemParaTest::new(test_args); @@ -363,24 +361,23 @@ fn reserve_transfer_native_asset_from_para_to_system_para() { let sender_balance_before = test.sender.balance; let receiver_balance_before = test.receiver.balance; - let penpal_location_as_seen_by_ahr = - AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); - let sov_penpal_on_ahr = AssetHubKusama::sovereign_account_id_of(penpal_location_as_seen_by_ahr); + let penpal_location_as_seen_by_ahk = AssetHubKusama::sibling_location_of(PenpalA::para_id()); + let sov_penpal_on_ahk = AssetHubKusama::sovereign_account_id_of(penpal_location_as_seen_by_ahk); - // fund the Penpal's SA on AHR with the native tokens held in reserve - AssetHubKusama::fund_accounts(vec![(sov_penpal_on_ahr.into(), amount_to_send * 2)]); + // fund the Penpal's SA on AHK with the native tokens held in reserve + AssetHubKusama::fund_accounts(vec![(sov_penpal_on_ahk.into(), amount_to_send * 2)]); - test.set_assertion::(para_to_system_para_sender_assertions); + test.set_assertion::(para_to_system_para_sender_assertions); test.set_assertion::(para_to_system_para_receiver_assertions); - test.set_dispatchable::(para_to_system_para_reserve_transfer_assets); + test.set_dispatchable::(para_to_system_para_reserve_transfer_assets); test.assert(); let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; - let delivery_fees = PenpalKusamaA::execute_with(|| { + let delivery_fees = PenpalA::execute_with(|| { xcm_helpers::transfer_assets_delivery_fees::< - ::XcmSender, + ::XcmSender, >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) }); @@ -398,7 +395,7 @@ fn reserve_transfer_native_asset_from_para_to_system_para() { /// work #[test] fn reserve_transfer_assets_from_system_para_to_para() { - // Force create asset on AssetHubKusama and PenpalKusamaA from Relay Chain + // Force create asset on AssetHubKusama and PenpalA from Relay Chain AssetHubKusama::force_create_and_mint_asset( ASSET_ID, ASSET_MIN_BALANCE, @@ -407,18 +404,18 @@ fn reserve_transfer_assets_from_system_para_to_para() { Some(Weight::from_parts(1_019_445_000, 200_000)), ASSET_MIN_BALANCE * 1_000_000, ); - PenpalKusamaA::force_create_and_mint_asset( + PenpalA::force_create_and_mint_asset( ASSET_ID, ASSET_MIN_BALANCE, false, - PenpalKusamaASender::get(), + PenpalASender::get(), None, 0, ); // Init values for System Parachain - let destination = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); - let beneficiary_id = PenpalKusamaAReceiver::get(); + let destination = AssetHubKusama::sibling_location_of(PenpalA::para_id()); + let beneficiary_id = PenpalAReceiver::get(); let fee_amount_to_send = ASSET_HUB_KUSAMA_ED * 1000; let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; let assets: MultiAssets = vec![ @@ -435,8 +432,8 @@ fn reserve_transfer_assets_from_system_para_to_para() { let para_test_args = TestContext { sender: AssetHubKusamaSender::get(), - receiver: PenpalKusamaAReceiver::get(), - args: para_test_args( + receiver: PenpalAReceiver::get(), + args: TestArgs::new_para( destination, beneficiary_id, asset_amount_to_send, @@ -448,10 +445,10 @@ fn reserve_transfer_assets_from_system_para_to_para() { let mut test = SystemParaToParaTest::new(para_test_args); - // Create SA-of-Penpal-on-AHR with ED. - let penpal_location = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); - let sov_penpal_on_ahr = AssetHubKusama::sovereign_account_id_of(penpal_location); - AssetHubKusama::fund_accounts(vec![(sov_penpal_on_ahr.into(), KUSAMA_ED)]); + // Create SA-of-Penpal-on-AHK with ED. + let penpal_location = AssetHubKusama::sibling_location_of(PenpalA::para_id()); + let sov_penpal_on_ahk = AssetHubKusama::sovereign_account_id_of(penpal_location); + AssetHubKusama::fund_accounts(vec![(sov_penpal_on_ahk.into(), KUSAMA_ED)]); let sender_balance_before = test.sender.balance; let receiver_balance_before = test.receiver.balance; @@ -460,13 +457,13 @@ fn reserve_transfer_assets_from_system_para_to_para() { type Assets = ::Assets; >::balance(ASSET_ID, &AssetHubKusamaSender::get()) }); - let receiver_assets_before = PenpalKusamaA::execute_with(|| { - type Assets = ::Assets; - >::balance(ASSET_ID, &PenpalKusamaAReceiver::get()) + let receiver_assets_before = PenpalA::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &PenpalAReceiver::get()) }); test.set_assertion::(system_para_to_para_assets_sender_assertions); - test.set_assertion::(system_para_to_para_assets_receiver_assertions); + test.set_assertion::(system_para_to_para_assets_receiver_assertions); test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); test.assert(); @@ -486,9 +483,9 @@ fn reserve_transfer_assets_from_system_para_to_para() { type Assets = ::Assets; >::balance(ASSET_ID, &AssetHubKusamaSender::get()) }); - let receiver_assets_after = PenpalKusamaA::execute_with(|| { - type Assets = ::Assets; - >::balance(ASSET_ID, &PenpalKusamaAReceiver::get()) + let receiver_assets_after = PenpalA::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &PenpalAReceiver::get()) }); // Sender's balance is reduced by exact amount diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/send.rs b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/send.rs similarity index 88% rename from integration-tests/emulated/assets/asset-hub-kusama/src/tests/send.rs rename to integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/send.rs index 1b9a79f8c2..6dfa40d261 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/send.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/send.rs @@ -33,7 +33,7 @@ fn send_transact_as_superuser_from_relay_to_system_para_works() { #[test] fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() { let para_sovereign_account = AssetHubKusama::sovereign_account_id_of( - AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()), + AssetHubKusama::sibling_location_of(PenpalA::para_id()), ); // Force create and mint assets for Parachain's sovereign account @@ -60,9 +60,8 @@ fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() { let native_asset = (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), fee_amount).into(); - let root_origin = ::RuntimeOrigin::root(); - let system_para_destination = - PenpalKusamaA::sibling_location_of(AssetHubKusama::para_id()).into(); + let root_origin = ::RuntimeOrigin::root(); + let system_para_destination = PenpalA::sibling_location_of(AssetHubKusama::para_id()).into(); let xcm = xcm_transact_paid_execution( call, origin_kind, @@ -70,14 +69,14 @@ fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() { para_sovereign_account.clone(), ); - PenpalKusamaA::execute_with(|| { - assert_ok!(::PolkadotXcm::send( + PenpalA::execute_with(|| { + assert_ok!(::PolkadotXcm::send( root_origin, bx!(system_para_destination), bx!(xcm), )); - PenpalKusamaA::assert_xcm_pallet_sent(); + PenpalA::assert_xcm_pallet_sent(); }); AssetHubKusama::execute_with(|| { diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs similarity index 100% rename from integration-tests/emulated/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs rename to integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/set_xcm_versions.rs diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/swap.rs similarity index 88% rename from integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs rename to integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/swap.rs index fc0159df14..63e2b624ad 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/swap.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/swap.rs @@ -14,15 +14,17 @@ // limitations under the License. use crate::*; +use kusama_system_emulated_network::penpal_emulated_chain::LocalTeleportableToAssetHub as PenpalLocalTeleportableToAssetHub; use sp_runtime::ModuleError; +use system_parachains_constants::kusama::currency::SYSTEM_PARA_EXISTENTIAL_DEPOSIT; #[test] fn swap_locally_on_chain_using_local_assets() { - let asset_native = Box::new(asset_hub_kusama_runtime::xcm_config::KsmLocation::get()); - let asset_one = Box::new(MultiLocation { + let asset_native = asset_hub_kusama_runtime::xcm_config::KsmLocation::get(); + let asset_one = MultiLocation { parents: 0, interior: X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), - }); + }; AssetHubKusama::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; @@ -44,8 +46,8 @@ fn swap_locally_on_chain_using_local_assets() { assert_ok!(::AssetConversion::create_pool( ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), - asset_native.clone(), - asset_one.clone(), + Box::new(asset_native), + Box::new(asset_one), )); assert_expected_events!( @@ -57,8 +59,8 @@ fn swap_locally_on_chain_using_local_assets() { assert_ok!(::AssetConversion::add_liquidity( ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), - asset_native.clone(), - asset_one.clone(), + Box::new(asset_native), + Box::new(asset_one), 1_000_000_000_000, 2_000_000_000_000, 0, @@ -73,7 +75,7 @@ fn swap_locally_on_chain_using_local_assets() { ] ); - let path = vec![asset_native.clone(), asset_one.clone()]; + let path = vec![Box::new(asset_native), Box::new(asset_one)]; assert_ok!( ::AssetConversion::swap_exact_tokens_for_tokens( @@ -98,9 +100,9 @@ fn swap_locally_on_chain_using_local_assets() { assert_ok!(::AssetConversion::remove_liquidity( ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), - asset_native, - asset_one, - 1414213562273 - ASSET_HUB_KUSAMA_ED * 2, // all but the 2 EDs can't be retrieved. + Box::new(asset_native), + Box::new(asset_one), + 1414213562273 - SYSTEM_PARA_EXISTENTIAL_DEPOSIT * 2, // all but the 2 EDs can't be retrieved. 0, 0, AssetHubKusamaSender::get().into(), @@ -111,15 +113,15 @@ fn swap_locally_on_chain_using_local_assets() { #[test] fn swap_locally_on_chain_using_foreign_assets() { let asset_native = asset_hub_kusama_runtime::xcm_config::KsmLocation::get(); - let ah_as_seen_by_penpal = PenpalKusamaA::sibling_location_of(AssetHubKusama::para_id()); + let ah_as_seen_by_penpal = PenpalA::sibling_location_of(AssetHubKusama::para_id()); let asset_location_on_penpal = PenpalLocalTeleportableToAssetHub::get(); let asset_id_on_penpal = match asset_location_on_penpal.last() { Some(GeneralIndex(id)) => *id as u32, _ => unreachable!(), }; - let asset_owner_on_penpal = PenpalKusamaASender::get(); + let asset_owner_on_penpal = PenpalASender::get(); let foreign_asset_at_asset_hub_kusama = - MultiLocation { parents: 1, interior: X1(Parachain(PenpalKusamaA::para_id().into())) } + MultiLocation { parents: 1, interior: X1(Parachain(PenpalA::para_id().into())) } .appended_with(asset_location_on_penpal) .unwrap(); @@ -133,8 +135,8 @@ fn swap_locally_on_chain_using_foreign_assets() { ASSET_MIN_BALANCE * 1_000_000, ); - let penpal_as_seen_by_ah = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); - let sov_penpal_on_ahr = AssetHubKusama::sovereign_account_id_of(penpal_as_seen_by_ah); + let penpal_as_seen_by_ah = AssetHubKusama::sibling_location_of(PenpalA::para_id()); + let sov_penpal_on_ahk = AssetHubKusama::sovereign_account_id_of(penpal_as_seen_by_ah); AssetHubKusama::fund_accounts(vec![ (AssetHubKusamaSender::get().into(), 5_000_000 * KUSAMA_ED), /* An account to swap dot * for something else. */ @@ -149,9 +151,9 @@ fn swap_locally_on_chain_using_foreign_assets() { type RuntimeEvent = ::RuntimeEvent; // 3. Mint foreign asset (in reality this should be a teleport or some such) assert_ok!(::ForeignAssets::mint( - ::RuntimeOrigin::signed(sov_penpal_on_ahr.clone().into()), + ::RuntimeOrigin::signed(sov_penpal_on_ahk.clone().into()), foreign_asset_at_asset_hub_kusama, - sov_penpal_on_ahr.clone().into(), + sov_penpal_on_ahk.clone().into(), 3_000_000_000_000, )); @@ -178,14 +180,14 @@ fn swap_locally_on_chain_using_foreign_assets() { // 5. Add liquidity: assert_ok!(::AssetConversion::add_liquidity( - ::RuntimeOrigin::signed(sov_penpal_on_ahr.clone()), + ::RuntimeOrigin::signed(sov_penpal_on_ahk.clone()), Box::new(asset_native), Box::new(foreign_asset_at_asset_hub_kusama), 1_000_000_000_000, 2_000_000_000_000, 0, 0, - sov_penpal_on_ahr.clone().into() + sov_penpal_on_ahk.clone().into() )); assert_expected_events!( @@ -223,13 +225,13 @@ fn swap_locally_on_chain_using_foreign_assets() { // 7. Remove liquidity assert_ok!(::AssetConversion::remove_liquidity( - ::RuntimeOrigin::signed(sov_penpal_on_ahr.clone()), + ::RuntimeOrigin::signed(sov_penpal_on_ahk.clone()), Box::new(asset_native), Box::new(foreign_asset_at_asset_hub_kusama), 1414213562273 - 2_000_000_000, // all but the 2 EDs can't be retrieved. 0, 0, - sov_penpal_on_ahr.clone().into(), + sov_penpal_on_ahk.clone().into(), )); }); } diff --git a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/teleport.rs similarity index 90% rename from integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs rename to integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/teleport.rs index b940c4e2eb..c298686016 100644 --- a/integration-tests/emulated/assets/asset-hub-kusama/src/tests/teleport.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/teleport.rs @@ -15,7 +15,9 @@ use crate::*; use asset_hub_kusama_runtime::xcm_config::XcmConfig as AssetHubKusamaXcmConfig; +use emulated_integration_tests_common::xcm_helpers::non_fee_asset; use kusama_runtime::xcm_config::XcmConfig as KusamaXcmConfig; +use kusama_system_emulated_network::penpal_emulated_chain::LocalTeleportableToAssetHub as PenpalLocalTeleportableToAssetHub; fn relay_origin_assertions(t: RelayToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; @@ -111,13 +113,13 @@ fn para_dest_assertions(t: RelayToSystemParaTest) { } fn penpal_to_ah_foreign_assets_sender_assertions(t: ParaToSystemParaTest) { - type RuntimeEvent = ::RuntimeEvent; - PenpalKusamaA::assert_xcm_pallet_attempted_complete(None); + type RuntimeEvent = ::RuntimeEvent; + PenpalA::assert_xcm_pallet_attempted_complete(None); let expected_asset_id = t.args.asset_id.unwrap(); let (_, expected_asset_amount) = non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); assert_expected_events!( - PenpalKusamaA, + PenpalA, vec![ RuntimeEvent::Balances( pallet_balances::Event::Withdraw { who, amount } @@ -136,8 +138,8 @@ fn penpal_to_ah_foreign_assets_sender_assertions(t: ParaToSystemParaTest) { fn penpal_to_ah_foreign_assets_receiver_assertions(t: ParaToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; - let sov_penpal_on_ahr = AssetHubKusama::sovereign_account_id_of( - AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()), + let sov_penpal_on_ahk = AssetHubKusama::sovereign_account_id_of( + AssetHubKusama::sibling_location_of(PenpalA::para_id()), ); let (expected_foreign_asset_id, expected_foreign_asset_amount) = non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); @@ -148,7 +150,7 @@ fn penpal_to_ah_foreign_assets_receiver_assertions(t: ParaToSystemParaTest) { RuntimeEvent::Balances( pallet_balances::Event::Burned { who, amount } ) => { - who: *who == sov_penpal_on_ahr.clone().into(), + who: *who == sov_penpal_on_ahk.clone().into(), amount: *amount == t.args.amount, }, RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => { @@ -196,13 +198,13 @@ fn ah_to_penpal_foreign_assets_sender_assertions(t: SystemParaToParaTest) { } fn ah_to_penpal_foreign_assets_receiver_assertions(t: SystemParaToParaTest) { - type RuntimeEvent = ::RuntimeEvent; + type RuntimeEvent = ::RuntimeEvent; let expected_asset_id = t.args.asset_id.unwrap(); let (_, expected_asset_amount) = non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); - let checking_account = ::PolkadotXcm::check_account(); + let checking_account = ::PolkadotXcm::check_account(); assert_expected_events!( - PenpalKusamaA, + PenpalA, vec![ // checking account burns local asset as part of incoming teleport RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { @@ -270,7 +272,7 @@ fn system_para_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult { } fn para_to_system_para_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { - ::PolkadotXcm::transfer_assets( + ::PolkadotXcm::transfer_assets( t.signed_origin, bx!(t.args.dest.into()), bx!(t.args.beneficiary.into()), @@ -301,7 +303,7 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() { let test_args = TestContext { sender: KusamaSender::get(), receiver: AssetHubKusamaReceiver::get(), - args: relay_test_args(dest, beneficiary_id, amount_to_send), + args: TestArgs::new_relay(dest, beneficiary_id, amount_to_send), }; let mut test = RelayToSystemParaTest::new(test_args); @@ -345,7 +347,7 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() { let test_args = TestContext { sender: AssetHubKusamaSender::get(), receiver: KusamaReceiver::get(), - args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = SystemParaToRelayTest::new(test_args); @@ -386,7 +388,7 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() { let test_args = TestContext { sender: AssetHubKusamaSender::get(), receiver: KusamaReceiver::get(), - args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = SystemParaToRelayTest::new(test_args); @@ -424,7 +426,7 @@ fn teleport_native_assets_from_relay_to_system_para_works() { let test_args = TestContext { sender: KusamaSender::get(), receiver: AssetHubKusamaReceiver::get(), - args: relay_test_args(dest, beneficiary_id, amount_to_send), + args: TestArgs::new_relay(dest, beneficiary_id, amount_to_send), }; let mut test = RelayToSystemParaTest::new(test_args); @@ -468,7 +470,7 @@ fn teleport_native_assets_back_from_system_para_to_relay_works() { let test_args = TestContext { sender: AssetHubKusamaSender::get(), receiver: KusamaReceiver::get(), - args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = SystemParaToRelayTest::new(test_args); @@ -509,7 +511,7 @@ fn teleport_native_assets_from_system_para_to_relay_fails() { let test_args = TestContext { sender: AssetHubKusamaSender::get(), receiver: KusamaReceiver::get(), - args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = SystemParaToRelayTest::new(test_args); @@ -554,15 +556,15 @@ fn teleport_to_other_system_parachains_works() { /// (using native reserve-based transfer for fees) #[test] fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { - let ah_as_seen_by_penpal = PenpalKusamaA::sibling_location_of(AssetHubKusama::para_id()); + let ah_as_seen_by_penpal = PenpalA::sibling_location_of(AssetHubKusama::para_id()); let asset_location_on_penpal = PenpalLocalTeleportableToAssetHub::get(); let asset_id_on_penpal = match asset_location_on_penpal.last() { Some(GeneralIndex(id)) => *id as u32, _ => unreachable!(), }; - let asset_owner_on_penpal = PenpalKusamaASender::get(); + let asset_owner_on_penpal = PenpalASender::get(); let foreign_asset_at_asset_hub_kusama = - MultiLocation { parents: 1, interior: X1(Parachain(PenpalKusamaA::para_id().into())) } + MultiLocation { parents: 1, interior: X1(Parachain(PenpalA::para_id().into())) } .appended_with(asset_location_on_penpal) .unwrap(); super::penpal_create_foreign_asset_on_asset_hub( @@ -591,9 +593,9 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { // Penpal to AH test args let penpal_to_ah_test_args = TestContext { - sender: PenpalKusamaASender::get(), + sender: PenpalASender::get(), receiver: AssetHubKusamaReceiver::get(), - args: para_test_args( + args: TestArgs::new_para( ah_as_seen_by_penpal, penpal_to_ah_beneficiary_id, asset_amount_to_send, @@ -607,9 +609,9 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { let penpal_sender_balance_before = penpal_to_ah.sender.balance; let ah_receiver_balance_before = penpal_to_ah.receiver.balance; - let penpal_sender_assets_before = PenpalKusamaA::execute_with(|| { - type Assets = ::Assets; - >::balance(asset_id_on_penpal, &PenpalKusamaASender::get()) + let penpal_sender_assets_before = PenpalA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalASender::get()) }); let ah_receiver_assets_before = AssetHubKusama::execute_with(|| { type Assets = ::ForeignAssets; @@ -619,17 +621,17 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { ) }); - penpal_to_ah.set_assertion::(penpal_to_ah_foreign_assets_sender_assertions); + penpal_to_ah.set_assertion::(penpal_to_ah_foreign_assets_sender_assertions); penpal_to_ah.set_assertion::(penpal_to_ah_foreign_assets_receiver_assertions); - penpal_to_ah.set_dispatchable::(para_to_system_para_transfer_assets); + penpal_to_ah.set_dispatchable::(para_to_system_para_transfer_assets); penpal_to_ah.assert(); let penpal_sender_balance_after = penpal_to_ah.sender.balance; let ah_receiver_balance_after = penpal_to_ah.receiver.balance; - let penpal_sender_assets_after = PenpalKusamaA::execute_with(|| { - type Assets = ::Assets; - >::balance(asset_id_on_penpal, &PenpalKusamaASender::get()) + let penpal_sender_assets_after = PenpalA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalASender::get()) }); let ah_receiver_assets_after = AssetHubKusama::execute_with(|| { type Assets = ::ForeignAssets; @@ -668,8 +670,8 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { )); }); - let ah_to_penpal_beneficiary_id = PenpalKusamaAReceiver::get(); - let penpal_as_seen_by_ah = AssetHubKusama::sibling_location_of(PenpalKusamaA::para_id()); + let ah_to_penpal_beneficiary_id = PenpalAReceiver::get(); + let penpal_as_seen_by_ah = AssetHubKusama::sibling_location_of(PenpalA::para_id()); let ah_assets: MultiAssets = vec![ (Parent, fee_amount_to_send).into(), (foreign_asset_at_asset_hub_kusama, asset_amount_to_send).into(), @@ -684,8 +686,8 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { // AH to Penpal test args let ah_to_penpal_test_args = TestContext { sender: AssetHubKusamaSender::get(), - receiver: PenpalKusamaAReceiver::get(), - args: para_test_args( + receiver: PenpalAReceiver::get(), + args: TestArgs::new_para( penpal_as_seen_by_ah, ah_to_penpal_beneficiary_id, asset_amount_to_send, @@ -706,13 +708,13 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { &AssetHubKusamaSender::get(), ) }); - let penpal_receiver_assets_before = PenpalKusamaA::execute_with(|| { - type Assets = ::Assets; - >::balance(asset_id_on_penpal, &PenpalKusamaAReceiver::get()) + let penpal_receiver_assets_before = PenpalA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalAReceiver::get()) }); ah_to_penpal.set_assertion::(ah_to_penpal_foreign_assets_sender_assertions); - ah_to_penpal.set_assertion::(ah_to_penpal_foreign_assets_receiver_assertions); + ah_to_penpal.set_assertion::(ah_to_penpal_foreign_assets_receiver_assertions); ah_to_penpal.set_dispatchable::(system_para_to_para_transfer_assets); ah_to_penpal.assert(); @@ -726,9 +728,9 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { &AssetHubKusamaSender::get(), ) }); - let penpal_receiver_assets_after = PenpalKusamaA::execute_with(|| { - type Assets = ::Assets; - >::balance(asset_id_on_penpal, &PenpalKusamaAReceiver::get()) + let penpal_receiver_assets_after = PenpalA::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalAReceiver::get()) }); // Sender's balance is reduced diff --git a/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml new file mode 100644 index 0000000000..a97665d6eb --- /dev/null +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml @@ -0,0 +1,40 @@ +[package] +name = "asset-hub-polkadot-integration-tests" +version = "0.1.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Asset Hub Polkadot runtime integration tests with xcm-emulator" +publish = false + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.4.0" } +assert_matches = "1.5.0" + +# Substrate +sp-runtime = { version = "31.0.1" } +frame-support = { version = "28.0.0" } +pallet-balances = { version = "28.0.0" } +pallet-assets = { version = "29.0.0" } +pallet-treasury = { version = "27.0.0" } +pallet-message-queue = { version = "31.0.0" } + +# Polkadot +polkadot-runtime-common = { version = "7.0.0" } +xcm = { package = "staging-xcm", version = "7.0.0" } +pallet-xcm = { version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", version = "7.0.0" } + +# Cumulus +asset-test-utils = { version = "7.0.0" } +emulated-integration-tests-common = { version = "3.0.0" } +parachains-common = { version = "7.0.0" } +cumulus-pallet-xcmp-queue = { version = "0.7.0" } +cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook"], version = "0.7.0" } + +# Local +asset-hub-polkadot-runtime = { path = "../../../../../system-parachains/asset-hubs/asset-hub-polkadot" } +integration-tests-helpers = { path = "../../../helpers" } +polkadot-runtime = { path = "../../../../../relay/polkadot" } +polkadot-system-emulated-network = { path = "../../../networks/polkadot-system" } +system-parachains-constants = { path = "../../../../../system-parachains/constants" } diff --git a/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/lib.rs b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/lib.rs new file mode 100644 index 0000000000..f41329a77d --- /dev/null +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/lib.rs @@ -0,0 +1,79 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub use codec::Encode; + +// Substrate +pub use frame_support::{ + assert_err, assert_ok, + instances::Instance2, + pallet_prelude::Weight, + sp_runtime::{AccountId32, DispatchError, DispatchResult, ModuleError}, + traits::fungibles::Inspect, + BoundedVec, +}; + +// Polkadot +pub use xcm::{ + prelude::{AccountId32 as AccountId32Junction, *}, + v3::{Error, NetworkId::Polkadot as PolkadotId}, +}; + +// Cumulus +pub use asset_test_utils::xcm_helpers; +pub use emulated_integration_tests_common::{ + xcm_emulator::{ + assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para, + RelayChain as Relay, Test, TestArgs, TestContext, TestExt, + }, + xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, + PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, +}; +pub use integration_tests_helpers::test_parachain_is_trusted_teleporter; +pub use parachains_common::{AccountId, Balance}; +pub use polkadot_system_emulated_network::{ + asset_hub_polkadot_emulated_chain::{ + genesis::ED as ASSET_HUB_POLKADOT_ED, AssetHubPolkadotParaPallet as AssetHubPolkadotPallet, + }, + collectives_polkadot_emulated_chain::{ + genesis::ED as COLLECTIVES_POLKADOT_ED, + CollectivesPolkadotParaPallet as CollectivesPolkadotPallet, + }, + penpal_emulated_chain::PenpalBParaPallet as PenpalBPallet, + polkadot_emulated_chain::{genesis::ED as POLKADOT_ED, PolkadotRelayPallet as PolkadotPallet}, + AssetHubPolkadotPara as AssetHubPolkadot, + AssetHubPolkadotParaReceiver as AssetHubPolkadotReceiver, + AssetHubPolkadotParaSender as AssetHubPolkadotSender, + BridgeHubPolkadotPara as BridgeHubPolkadot, + BridgeHubPolkadotParaReceiver as BridgeHubPolkadotReceiver, + CollectivesPolkadotPara as CollectivesPolkadot, PenpalBPara as PenpalB, + PenpalBParaReceiver as PenpalBReceiver, PenpalBParaSender as PenpalBSender, + PolkadotRelay as Polkadot, PolkadotRelayReceiver as PolkadotReceiver, + PolkadotRelaySender as PolkadotSender, +}; + +pub const ASSET_ID: u32 = 1; +pub const ASSET_MIN_BALANCE: u128 = 1000; +// `Assets` pallet index +pub const ASSETS_PALLET_ID: u8 = 50; + +pub type RelayToSystemParaTest = Test; +pub type RelayToParaTest = Test; +pub type SystemParaToRelayTest = Test; +pub type SystemParaToParaTest = Test; +pub type ParaToSystemParaTest = Test; + +#[cfg(test)] +mod tests; diff --git a/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/fellowship_treasury.rs b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/fellowship_treasury.rs new file mode 100644 index 0000000000..188174c0d1 --- /dev/null +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/fellowship_treasury.rs @@ -0,0 +1,131 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate::*; +use emulated_integration_tests_common::accounts::{ALICE, BOB}; +use frame_support::traits::fungibles::{Create, Inspect, Mutate}; +use polkadot_runtime_common::impls::VersionedLocatableAsset; +use xcm_executor::traits::ConvertLocation; + +#[test] +fn create_and_claim_treasury_spend() { + const ASSET_ID: u32 = 1984; + const SPEND_AMOUNT: u128 = 1_000_000; + // treasury location from a sibling parachain. + let treasury_location: MultiLocation = MultiLocation::new( + 1, + X2(Parachain(CollectivesPolkadot::para_id().into()), PalletInstance(65)), + ); + // treasury account on a sibling parachain. + let treasury_account = + asset_hub_polkadot_runtime::xcm_config::LocationToAccountId::convert_location( + &treasury_location, + ) + .unwrap(); + let asset_hub_location = MultiLocation::new(1, Parachain(AssetHubPolkadot::para_id().into())); + let root = ::RuntimeOrigin::root(); + // asset kind to be spent from the treasury. + let asset_kind = VersionedLocatableAsset::V3 { + location: asset_hub_location, + asset_id: AssetId::Concrete((PalletInstance(50), GeneralIndex(ASSET_ID.into())).into()), + }; + // treasury spend beneficiary. + let alice: AccountId = Polkadot::account_id_of(ALICE); + let bob: AccountId = CollectivesPolkadot::account_id_of(BOB); + let bob_signed = ::RuntimeOrigin::signed(bob.clone()); + + AssetHubPolkadot::execute_with(|| { + type Assets = ::Assets; + + // create an asset class and mint some assets to the treasury account. + assert_ok!(>::create( + ASSET_ID, + treasury_account.clone(), + true, + SPEND_AMOUNT / 2 + )); + assert_ok!(>::mint_into(ASSET_ID, &treasury_account, SPEND_AMOUNT * 4)); + // beneficiary has zero balance. + assert_eq!(>::balance(ASSET_ID, &alice,), 0u128,); + }); + + CollectivesPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + type FellowshipTreasury = + ::FellowshipTreasury; + type AssetRate = ::AssetRate; + + // create a conversion rate from `asset_kind` to the native currency. + assert_ok!(AssetRate::create(root.clone(), Box::new(asset_kind.clone()), 2.into())); + + // create and approve a treasury spend. + assert_ok!(FellowshipTreasury::spend( + root, + Box::new(asset_kind), + SPEND_AMOUNT, + Box::new(MultiLocation::new(0, Into::<[u8; 32]>::into(alice.clone())).into()), + None, + )); + // claim the spend. + assert_ok!(FellowshipTreasury::payout(bob_signed.clone(), 0)); + + assert_expected_events!( + CollectivesPolkadot, + vec![ + RuntimeEvent::FellowshipTreasury(pallet_treasury::Event::Paid { .. }) => {}, + ] + ); + }); + + AssetHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + type Assets = ::Assets; + + // assert events triggered by xcm pay program + // 1. treasury asset transferred to spend beneficiary + // 2. response to the Fellowship treasury pallet instance sent back + // 3. XCM program completed + assert_expected_events!( + AssetHubPolkadot, + vec![ + RuntimeEvent::Assets(pallet_assets::Event::Transferred { asset_id: id, from, to, amount }) => { + id: id == &ASSET_ID, + from: from == &treasury_account, + to: to == &alice, + amount: amount == &SPEND_AMOUNT, + }, + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {}, + RuntimeEvent::MessageQueue(pallet_message_queue::Event::Processed { success: true ,.. }) => {}, + ] + ); + // beneficiary received the assets from the treasury. + assert_eq!(>::balance(ASSET_ID, &alice,), SPEND_AMOUNT,); + }); + + CollectivesPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + type FellowshipTreasury = + ::FellowshipTreasury; + + // check the payment status to ensure the response from the AssetHub was received. + assert_ok!(FellowshipTreasury::check_status(bob_signed, 0)); + assert_expected_events!( + CollectivesPolkadot, + vec![ + RuntimeEvent::FellowshipTreasury(pallet_treasury::Event::SpendProcessed { .. }) => {}, + ] + ); + }); +} diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/mod.rs similarity index 85% rename from integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs rename to integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/mod.rs index 2b1a263e01..eaf2a15e11 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/mod.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/mod.rs @@ -13,14 +13,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +mod fellowship_treasury; mod reserve_transfer; mod send; mod set_xcm_versions; mod teleport; +mod treasury; use crate::*; -integration_tests_common::include_penpal_create_foreign_asset_on_asset_hub!( - PenpalPolkadotA, +emulated_integration_tests_common::include_penpal_create_foreign_asset_on_asset_hub!( + PenpalB, AssetHubPolkadot, POLKADOT_ED, system_parachains_constants::polkadot::fee::WeightToFee diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs similarity index 82% rename from integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs rename to integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs index e9fa92ff34..235b09858c 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs @@ -16,10 +16,13 @@ use crate::*; use asset_hub_polkadot_runtime::xcm_config::XcmConfig as AssetHubPolkadotXcmConfig; use polkadot_runtime::xcm_config::XcmConfig as PolkadotXcmConfig; +use polkadot_system_emulated_network::penpal_emulated_chain::XcmConfig as PenpalPolkadotXcmConfig; fn relay_to_para_sender_assertions(t: RelayToParaTest) { type RuntimeEvent = ::RuntimeEvent; + Polkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(864_610_000, 8_799))); + assert_expected_events!( Polkadot, vec![ @@ -39,10 +42,12 @@ fn relay_to_para_sender_assertions(t: RelayToParaTest) { fn system_para_to_para_sender_assertions(t: SystemParaToParaTest) { type RuntimeEvent = ::RuntimeEvent; + AssetHubPolkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 864_610_000, - 8_799, + 676_119_000, + 6196, ))); + assert_expected_events!( AssetHubPolkadot, vec![ @@ -61,9 +66,9 @@ fn system_para_to_para_sender_assertions(t: SystemParaToParaTest) { } fn para_receiver_assertions(_: Test) { - type RuntimeEvent = ::RuntimeEvent; + type RuntimeEvent = ::RuntimeEvent; assert_expected_events!( - PenpalPolkadotA, + PenpalB, vec![ RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, RuntimeEvent::MessageQueue( @@ -74,13 +79,12 @@ fn para_receiver_assertions(_: Test) { } fn para_to_system_para_sender_assertions(t: ParaToSystemParaTest) { - type RuntimeEvent = ::RuntimeEvent; - PenpalPolkadotA::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 864_610_000, - 8_799, - ))); + type RuntimeEvent = ::RuntimeEvent; + + PenpalB::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(864_610_000, 8_799))); + assert_expected_events!( - PenpalPolkadotA, + PenpalB, vec![ // Amount to reserve transfer is transferred to Parachain's Sovereign account RuntimeEvent::Balances( @@ -95,17 +99,19 @@ fn para_to_system_para_sender_assertions(t: ParaToSystemParaTest) { fn para_to_system_para_receiver_assertions(t: ParaToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; - let sov_penpal_on_ahr = AssetHubPolkadot::sovereign_account_id_of( - AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()), + + let sov_penpal_on_ahp = AssetHubPolkadot::sovereign_account_id_of( + AssetHubPolkadot::sibling_location_of(PenpalB::para_id()), ); + assert_expected_events!( AssetHubPolkadot, vec![ - // Amount to reserve transfer is withdrawn from Parachain's Sovereign account + // Amount to reserve transfer is transferred to Parachain's Sovereign account RuntimeEvent::Balances( pallet_balances::Event::Burned { who, amount } ) => { - who: *who == sov_penpal_on_ahr.clone().into(), + who: *who == sov_penpal_on_ahp.clone().into(), amount: *amount == t.args.amount, }, RuntimeEvent::Balances(pallet_balances::Event::Minted { .. }) => {}, @@ -118,10 +124,12 @@ fn para_to_system_para_receiver_assertions(t: ParaToSystemParaTest) { fn system_para_to_para_assets_sender_assertions(t: SystemParaToParaTest) { type RuntimeEvent = ::RuntimeEvent; + AssetHubPolkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 864_610_000, - 8799, + 676_119_000, + 6196, ))); + assert_expected_events!( AssetHubPolkadot, vec![ @@ -141,9 +149,9 @@ fn system_para_to_para_assets_sender_assertions(t: SystemParaToParaTest) { } fn system_para_to_para_assets_receiver_assertions(_: Test) { - type RuntimeEvent = ::RuntimeEvent; + type RuntimeEvent = ::RuntimeEvent; assert_expected_events!( - PenpalPolkadotA, + PenpalB, vec![ RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, RuntimeEvent::Assets(pallet_assets::Event::Issued { .. }) => {}, @@ -177,7 +185,7 @@ fn system_para_to_para_reserve_transfer_assets(t: SystemParaToParaTest) -> Dispa } fn para_to_system_para_reserve_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { - ::PolkadotXcm::limited_reserve_transfer_assets( + ::PolkadotXcm::limited_reserve_transfer_assets( t.signed_origin, bx!(t.args.dest.into()), bx!(t.args.beneficiary.into()), @@ -230,7 +238,6 @@ fn reserve_transfer_native_asset_from_system_para_to_relay_fails() { let beneficiary: MultiLocation = AccountId32Junction { network: None, id: beneficiary_id.into() }.into(); let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; - let assets: MultiAssets = (Parent, amount_to_send).into(); let fee_asset_item = 0; @@ -260,14 +267,14 @@ fn reserve_transfer_native_asset_from_system_para_to_relay_fails() { #[test] fn reserve_transfer_native_asset_from_relay_to_para() { // Init values for Relay - let destination = Polkadot::child_location_of(PenpalPolkadotA::para_id()); - let beneficiary_id = PenpalPolkadotAReceiver::get(); + let destination = Polkadot::child_location_of(PenpalB::para_id()); + let beneficiary_id = PenpalBReceiver::get(); let amount_to_send: Balance = POLKADOT_ED * 1000; let test_args = TestContext { sender: PolkadotSender::get(), - receiver: PenpalPolkadotAReceiver::get(), - args: relay_test_args(destination, beneficiary_id, amount_to_send), + receiver: PenpalBReceiver::get(), + args: TestArgs::new_relay(destination, beneficiary_id, amount_to_send), }; let mut test = RelayToParaTest::new(test_args); @@ -276,7 +283,7 @@ fn reserve_transfer_native_asset_from_relay_to_para() { let receiver_balance_before = test.receiver.balance; test.set_assertion::(relay_to_para_sender_assertions); - test.set_assertion::(para_receiver_assertions); + test.set_assertion::(para_receiver_assertions); test.set_dispatchable::(relay_to_para_reserve_transfer_assets); test.assert(); @@ -303,15 +310,15 @@ fn reserve_transfer_native_asset_from_relay_to_para() { #[test] fn reserve_transfer_native_asset_from_system_para_to_para() { // Init values for System Parachain - let destination = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); - let beneficiary_id = PenpalPolkadotAReceiver::get(); + let destination = AssetHubPolkadot::sibling_location_of(PenpalB::para_id()); + let beneficiary_id = PenpalBReceiver::get(); let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; let assets = (Parent, amount_to_send).into(); let test_args = TestContext { sender: AssetHubPolkadotSender::get(), - receiver: PenpalPolkadotAReceiver::get(), - args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + receiver: PenpalBReceiver::get(), + args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = SystemParaToParaTest::new(test_args); @@ -320,7 +327,7 @@ fn reserve_transfer_native_asset_from_system_para_to_para() { let receiver_balance_before = test.receiver.balance; test.set_assertion::(system_para_to_para_sender_assertions); - test.set_assertion::(para_receiver_assertions); + test.set_assertion::(para_receiver_assertions); test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); test.assert(); @@ -347,15 +354,15 @@ fn reserve_transfer_native_asset_from_system_para_to_para() { #[test] fn reserve_transfer_native_asset_from_para_to_system_para() { // Init values for Penpal Parachain - let destination = PenpalPolkadotA::sibling_location_of(AssetHubPolkadot::para_id()); + let destination = PenpalB::sibling_location_of(AssetHubPolkadot::para_id()); let beneficiary_id = AssetHubPolkadotReceiver::get(); let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; let assets = (Parent, amount_to_send).into(); let test_args = TestContext { - sender: PenpalPolkadotASender::get(), + sender: PenpalBSender::get(), receiver: AssetHubPolkadotReceiver::get(), - args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = ParaToSystemParaTest::new(test_args); @@ -363,25 +370,24 @@ fn reserve_transfer_native_asset_from_para_to_system_para() { let sender_balance_before = test.sender.balance; let receiver_balance_before = test.receiver.balance; - let penpal_location_as_seen_by_ahr = - AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); - let sov_penpal_on_ahr = - AssetHubPolkadot::sovereign_account_id_of(penpal_location_as_seen_by_ahr); + let penpal_location_as_seen_by_ahp = AssetHubPolkadot::sibling_location_of(PenpalB::para_id()); + let sov_penpal_on_ahp = + AssetHubPolkadot::sovereign_account_id_of(penpal_location_as_seen_by_ahp); - // fund the Penpal's SA on AHR with the native tokens held in reserve - AssetHubPolkadot::fund_accounts(vec![(sov_penpal_on_ahr.into(), amount_to_send * 2)]); + // fund the Penpal's SA on AHP with the native tokens held in reserve + AssetHubPolkadot::fund_accounts(vec![(sov_penpal_on_ahp.into(), amount_to_send * 2)]); - test.set_assertion::(para_to_system_para_sender_assertions); + test.set_assertion::(para_to_system_para_sender_assertions); test.set_assertion::(para_to_system_para_receiver_assertions); - test.set_dispatchable::(para_to_system_para_reserve_transfer_assets); + test.set_dispatchable::(para_to_system_para_reserve_transfer_assets); test.assert(); let sender_balance_after = test.sender.balance; let receiver_balance_after = test.receiver.balance; - let delivery_fees = PenpalPolkadotA::execute_with(|| { + let delivery_fees = PenpalB::execute_with(|| { xcm_helpers::transfer_assets_delivery_fees::< - ::XcmSender, + ::XcmSender, >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) }); @@ -399,27 +405,27 @@ fn reserve_transfer_native_asset_from_para_to_system_para() { /// work #[test] fn reserve_transfer_assets_from_system_para_to_para() { - // Force create asset on AssetHubPolkadot and PenpalPolkadotA from Relay Chain + // Force create asset on AssetHubPolkadot and PenpalB from Relay Chain AssetHubPolkadot::force_create_and_mint_asset( ASSET_ID, ASSET_MIN_BALANCE, - false, + true, AssetHubPolkadotSender::get(), Some(Weight::from_parts(1_019_445_000, 200_000)), ASSET_MIN_BALANCE * 1_000_000, ); - PenpalPolkadotA::force_create_and_mint_asset( + PenpalB::force_create_and_mint_asset( ASSET_ID, ASSET_MIN_BALANCE, false, - PenpalPolkadotASender::get(), + PenpalBSender::get(), None, 0, ); // Init values for System Parachain - let destination = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); - let beneficiary_id = PenpalPolkadotAReceiver::get(); + let destination = AssetHubPolkadot::sibling_location_of(PenpalB::para_id()); + let beneficiary_id = PenpalBReceiver::get(); let fee_amount_to_send = ASSET_HUB_POLKADOT_ED * 1000; let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; let assets: MultiAssets = vec![ @@ -436,8 +442,8 @@ fn reserve_transfer_assets_from_system_para_to_para() { let para_test_args = TestContext { sender: AssetHubPolkadotSender::get(), - receiver: PenpalPolkadotAReceiver::get(), - args: para_test_args( + receiver: PenpalBReceiver::get(), + args: TestArgs::new_para( destination, beneficiary_id, asset_amount_to_send, @@ -449,10 +455,10 @@ fn reserve_transfer_assets_from_system_para_to_para() { let mut test = SystemParaToParaTest::new(para_test_args); - // Create SA-of-Penpal-on-AHR with ED. - let penpal_location = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); - let sov_penpal_on_ahr = AssetHubPolkadot::sovereign_account_id_of(penpal_location); - AssetHubPolkadot::fund_accounts(vec![(sov_penpal_on_ahr.into(), POLKADOT_ED)]); + // Create SA-of-Penpal-on-AHP with ED. + let penpal_location = AssetHubPolkadot::sibling_location_of(PenpalB::para_id()); + let sov_penpal_on_ahp = AssetHubPolkadot::sovereign_account_id_of(penpal_location); + AssetHubPolkadot::fund_accounts(vec![(sov_penpal_on_ahp.into(), POLKADOT_ED)]); let sender_balance_before = test.sender.balance; let receiver_balance_before = test.receiver.balance; @@ -461,13 +467,13 @@ fn reserve_transfer_assets_from_system_para_to_para() { type Assets = ::Assets; >::balance(ASSET_ID, &AssetHubPolkadotSender::get()) }); - let receiver_assets_before = PenpalPolkadotA::execute_with(|| { - type Assets = ::Assets; - >::balance(ASSET_ID, &PenpalPolkadotAReceiver::get()) + let receiver_assets_before = PenpalB::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &PenpalBReceiver::get()) }); test.set_assertion::(system_para_to_para_assets_sender_assertions); - test.set_assertion::(system_para_to_para_assets_receiver_assertions); + test.set_assertion::(system_para_to_para_assets_receiver_assertions); test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); test.assert(); @@ -487,9 +493,9 @@ fn reserve_transfer_assets_from_system_para_to_para() { type Assets = ::Assets; >::balance(ASSET_ID, &AssetHubPolkadotSender::get()) }); - let receiver_assets_after = PenpalPolkadotA::execute_with(|| { - type Assets = ::Assets; - >::balance(ASSET_ID, &PenpalPolkadotAReceiver::get()) + let receiver_assets_after = PenpalB::execute_with(|| { + type Assets = ::Assets; + >::balance(ASSET_ID, &PenpalBReceiver::get()) }); // Sender's balance is reduced by exact amount diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/send.rs b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/send.rs similarity index 87% rename from integration-tests/emulated/assets/asset-hub-polkadot/src/tests/send.rs rename to integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/send.rs index adbb28f024..403ad7d1d1 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/send.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/send.rs @@ -33,7 +33,7 @@ fn send_transact_as_superuser_from_relay_to_system_para_works() { #[test] fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() { let para_sovereign_account = AssetHubPolkadot::sovereign_account_id_of( - AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()), + AssetHubPolkadot::sibling_location_of(PenpalB::para_id()), ); // Force create and mint assets for Parachain's sovereign account @@ -60,9 +60,8 @@ fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() { let native_asset = (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), fee_amount).into(); - let root_origin = ::RuntimeOrigin::root(); - let system_para_destination = - PenpalPolkadotA::sibling_location_of(AssetHubPolkadot::para_id()).into(); + let root_origin = ::RuntimeOrigin::root(); + let system_para_destination = PenpalB::sibling_location_of(AssetHubPolkadot::para_id()).into(); let xcm = xcm_transact_paid_execution( call, origin_kind, @@ -70,21 +69,21 @@ fn send_xcm_from_para_to_system_para_paying_fee_with_assets_works() { para_sovereign_account.clone(), ); - PenpalPolkadotA::execute_with(|| { - assert_ok!(::PolkadotXcm::send( + PenpalB::execute_with(|| { + assert_ok!(::PolkadotXcm::send( root_origin, bx!(system_para_destination), bx!(xcm), )); - PenpalPolkadotA::assert_xcm_pallet_sent(); + PenpalB::assert_xcm_pallet_sent(); }); AssetHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; AssetHubPolkadot::assert_xcmp_queue_success(Some(Weight::from_parts( - 15_594_564_000, + 16_290_336_000, 562_893, ))); diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs similarity index 100% rename from integration-tests/emulated/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs rename to integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/set_xcm_versions.rs diff --git a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/teleport.rs similarity index 88% rename from integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs rename to integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/teleport.rs index ed49e09b9a..ae48670843 100644 --- a/integration-tests/emulated/assets/asset-hub-polkadot/src/tests/teleport.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/teleport.rs @@ -15,12 +15,14 @@ use crate::*; use asset_hub_polkadot_runtime::xcm_config::XcmConfig as AssetHubPolkadotXcmConfig; +use emulated_integration_tests_common::xcm_helpers::non_fee_asset; use polkadot_runtime::xcm_config::XcmConfig as PolkadotXcmConfig; +use polkadot_system_emulated_network::penpal_emulated_chain::LocalTeleportableToAssetHub as PenpalLocalTeleportableToAssetHub; fn relay_origin_assertions(t: RelayToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; - Polkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(631_531_000, 7_186))); + Polkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(632_207_000, 7_186))); assert_expected_events!( Polkadot, @@ -45,7 +47,7 @@ fn relay_dest_assertions(t: SystemParaToRelayTest) { Polkadot::assert_ump_queue_processed( true, Some(AssetHubPolkadot::para_id()), - Some(Weight::from_parts(307_225_000, 7_186)), + Some(Weight::from_parts(308_222_000, 7_186)), ); assert_expected_events!( @@ -68,7 +70,7 @@ fn relay_dest_assertions_fail(_t: SystemParaToRelayTest) { Polkadot::assert_ump_queue_processed( false, Some(AssetHubPolkadot::para_id()), - Some(Weight::from_parts(157_718_000, 3_593)), + Some(Weight::from_parts(148_705_000, 3_593)), ); } @@ -76,8 +78,8 @@ fn para_origin_assertions(t: SystemParaToRelayTest) { type RuntimeEvent = ::RuntimeEvent; AssetHubPolkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 720_053_000, - 7_203, + 533_910_000, + 7167, ))); AssetHubPolkadot::assert_parachain_system_ump_sent(); @@ -97,7 +99,7 @@ fn para_origin_assertions(t: SystemParaToRelayTest) { fn para_dest_assertions(t: RelayToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; - AssetHubPolkadot::assert_dmp_queue_complete(Some(Weight::from_parts(157_718_000, 3593))); + AssetHubPolkadot::assert_dmp_queue_complete(Some(Weight::from_parts(164_793_000, 3593))); assert_expected_events!( AssetHubPolkadot, @@ -111,13 +113,13 @@ fn para_dest_assertions(t: RelayToSystemParaTest) { } fn penpal_to_ah_foreign_assets_sender_assertions(t: ParaToSystemParaTest) { - type RuntimeEvent = ::RuntimeEvent; - PenpalPolkadotA::assert_xcm_pallet_attempted_complete(None); + type RuntimeEvent = ::RuntimeEvent; + PenpalB::assert_xcm_pallet_attempted_complete(None); let expected_asset_id = t.args.asset_id.unwrap(); let (_, expected_asset_amount) = non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); assert_expected_events!( - PenpalPolkadotA, + PenpalB, vec![ RuntimeEvent::Balances( pallet_balances::Event::Withdraw { who, amount } @@ -136,8 +138,8 @@ fn penpal_to_ah_foreign_assets_sender_assertions(t: ParaToSystemParaTest) { fn penpal_to_ah_foreign_assets_receiver_assertions(t: ParaToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; - let sov_penpal_on_ahr = AssetHubPolkadot::sovereign_account_id_of( - AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()), + let sov_penpal_on_ahk = AssetHubPolkadot::sovereign_account_id_of( + AssetHubPolkadot::sibling_location_of(PenpalB::para_id()), ); let (expected_foreign_asset_id, expected_foreign_asset_amount) = non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); @@ -148,7 +150,7 @@ fn penpal_to_ah_foreign_assets_receiver_assertions(t: ParaToSystemParaTest) { RuntimeEvent::Balances( pallet_balances::Event::Burned { who, amount } ) => { - who: *who == sov_penpal_on_ahr.clone().into(), + who: *who == sov_penpal_on_ahk.clone().into(), amount: *amount == t.args.amount, }, RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => { @@ -196,13 +198,13 @@ fn ah_to_penpal_foreign_assets_sender_assertions(t: SystemParaToParaTest) { } fn ah_to_penpal_foreign_assets_receiver_assertions(t: SystemParaToParaTest) { - type RuntimeEvent = ::RuntimeEvent; + type RuntimeEvent = ::RuntimeEvent; let expected_asset_id = t.args.asset_id.unwrap(); let (_, expected_asset_amount) = non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); - let checking_account = ::PolkadotXcm::check_account(); + let checking_account = ::PolkadotXcm::check_account(); assert_expected_events!( - PenpalPolkadotA, + PenpalB, vec![ // checking account burns local asset as part of incoming teleport RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { @@ -269,8 +271,8 @@ fn system_para_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult { ) } -fn para_to_system_para_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { - ::PolkadotXcm::transfer_assets( +fn system_para_to_para_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { + ::PolkadotXcm::transfer_assets( t.signed_origin, bx!(t.args.dest.into()), bx!(t.args.beneficiary.into()), @@ -280,8 +282,8 @@ fn para_to_system_para_transfer_assets(t: ParaToSystemParaTest) -> DispatchResul ) } -fn system_para_to_para_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { - ::PolkadotXcm::transfer_assets( +fn para_to_system_para_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { + ::PolkadotXcm::transfer_assets( t.signed_origin, bx!(t.args.dest.into()), bx!(t.args.beneficiary.into()), @@ -297,11 +299,11 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() { // Init values for Relay Chain let amount_to_send: Balance = POLKADOT_ED * 1000; let dest = Polkadot::child_location_of(AssetHubPolkadot::para_id()); - let beneficiary_id = AssetHubPolkadotReceiver::get(); + let beneficiary = AssetHubPolkadotReceiver::get(); let test_args = TestContext { sender: PolkadotSender::get(), - receiver: AssetHubPolkadotReceiver::get(), - args: relay_test_args(dest, beneficiary_id, amount_to_send), + receiver: beneficiary.clone(), + args: TestArgs::new_relay(dest, beneficiary, amount_to_send), }; let mut test = RelayToSystemParaTest::new(test_args); @@ -345,7 +347,7 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() { let test_args = TestContext { sender: AssetHubPolkadotSender::get(), receiver: PolkadotReceiver::get(), - args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = SystemParaToRelayTest::new(test_args); @@ -386,7 +388,7 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() { let test_args = TestContext { sender: AssetHubPolkadotSender::get(), receiver: PolkadotReceiver::get(), - args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = SystemParaToRelayTest::new(test_args); @@ -420,11 +422,11 @@ fn teleport_native_assets_from_relay_to_system_para_works() { // Init values for Relay Chain let amount_to_send: Balance = POLKADOT_ED * 1000; let dest = Polkadot::child_location_of(AssetHubPolkadot::para_id()); - let beneficiary_id = AssetHubPolkadotReceiver::get(); + let beneficiary = AssetHubPolkadotReceiver::get(); let test_args = TestContext { sender: PolkadotSender::get(), - receiver: AssetHubPolkadotReceiver::get(), - args: relay_test_args(dest, beneficiary_id, amount_to_send), + receiver: beneficiary.clone(), + args: TestArgs::new_relay(dest, beneficiary, amount_to_send), }; let mut test = RelayToSystemParaTest::new(test_args); @@ -468,7 +470,7 @@ fn teleport_native_assets_back_from_system_para_to_relay_works() { let test_args = TestContext { sender: AssetHubPolkadotSender::get(), receiver: PolkadotReceiver::get(), - args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = SystemParaToRelayTest::new(test_args); @@ -481,15 +483,15 @@ fn teleport_native_assets_back_from_system_para_to_relay_works() { test.set_dispatchable::(system_para_teleport_assets); test.assert(); - let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - let delivery_fees = AssetHubPolkadot::execute_with(|| { xcm_helpers::transfer_assets_delivery_fees::< ::XcmSender, >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) }); + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + // Sender's balance is reduced assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); // Receiver's balance is increased @@ -509,7 +511,7 @@ fn teleport_native_assets_from_system_para_to_relay_fails() { let test_args = TestContext { sender: AssetHubPolkadotSender::get(), receiver: PolkadotReceiver::get(), - args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), }; let mut test = SystemParaToRelayTest::new(test_args); @@ -554,15 +556,15 @@ fn teleport_to_other_system_parachains_works() { /// (using native reserve-based transfer for fees) #[test] fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { - let ah_as_seen_by_penpal = PenpalPolkadotA::sibling_location_of(AssetHubPolkadot::para_id()); + let ah_as_seen_by_penpal = PenpalB::sibling_location_of(AssetHubPolkadot::para_id()); let asset_location_on_penpal = PenpalLocalTeleportableToAssetHub::get(); let asset_id_on_penpal = match asset_location_on_penpal.last() { Some(GeneralIndex(id)) => *id as u32, _ => unreachable!(), }; - let asset_owner_on_penpal = PenpalPolkadotASender::get(); + let asset_owner_on_penpal = PenpalBSender::get(); let foreign_asset_at_asset_hub_polkadot = - MultiLocation { parents: 1, interior: X1(Parachain(PenpalPolkadotA::para_id().into())) } + MultiLocation { parents: 1, interior: X1(Parachain(PenpalB::para_id().into())) } .appended_with(asset_location_on_penpal) .unwrap(); super::penpal_create_foreign_asset_on_asset_hub( @@ -575,7 +577,7 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { ); let penpal_to_ah_beneficiary_id = AssetHubPolkadotReceiver::get(); - let fee_amount_to_send = ASSET_HUB_POLKADOT_ED * 10_000; + let fee_amount_to_send = ASSET_HUB_POLKADOT_ED * 1000; let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; let penpal_assets: MultiAssets = vec![ @@ -591,9 +593,9 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { // Penpal to AH test args let penpal_to_ah_test_args = TestContext { - sender: PenpalPolkadotASender::get(), + sender: PenpalBSender::get(), receiver: AssetHubPolkadotReceiver::get(), - args: para_test_args( + args: TestArgs::new_para( ah_as_seen_by_penpal, penpal_to_ah_beneficiary_id, asset_amount_to_send, @@ -607,9 +609,9 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { let penpal_sender_balance_before = penpal_to_ah.sender.balance; let ah_receiver_balance_before = penpal_to_ah.receiver.balance; - let penpal_sender_assets_before = PenpalPolkadotA::execute_with(|| { - type Assets = ::Assets; - >::balance(asset_id_on_penpal, &PenpalPolkadotASender::get()) + let penpal_sender_assets_before = PenpalB::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalBSender::get()) }); let ah_receiver_assets_before = AssetHubPolkadot::execute_with(|| { type Assets = ::ForeignAssets; @@ -619,17 +621,17 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { ) }); - penpal_to_ah.set_assertion::(penpal_to_ah_foreign_assets_sender_assertions); + penpal_to_ah.set_assertion::(penpal_to_ah_foreign_assets_sender_assertions); penpal_to_ah.set_assertion::(penpal_to_ah_foreign_assets_receiver_assertions); - penpal_to_ah.set_dispatchable::(para_to_system_para_transfer_assets); + penpal_to_ah.set_dispatchable::(para_to_system_para_transfer_assets); penpal_to_ah.assert(); let penpal_sender_balance_after = penpal_to_ah.sender.balance; let ah_receiver_balance_after = penpal_to_ah.receiver.balance; - let penpal_sender_assets_after = PenpalPolkadotA::execute_with(|| { - type Assets = ::Assets; - >::balance(asset_id_on_penpal, &PenpalPolkadotASender::get()) + let penpal_sender_assets_after = PenpalB::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalBSender::get()) }); let ah_receiver_assets_after = AssetHubPolkadot::execute_with(|| { type Assets = ::ForeignAssets; @@ -668,8 +670,8 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { )); }); - let ah_to_penpal_beneficiary_id = PenpalPolkadotAReceiver::get(); - let penpal_as_seen_by_ah = AssetHubPolkadot::sibling_location_of(PenpalPolkadotA::para_id()); + let ah_to_penpal_beneficiary_id = PenpalBReceiver::get(); + let penpal_as_seen_by_ah = AssetHubPolkadot::sibling_location_of(PenpalB::para_id()); let ah_assets: MultiAssets = vec![ (Parent, fee_amount_to_send).into(), (foreign_asset_at_asset_hub_polkadot, asset_amount_to_send).into(), @@ -684,8 +686,8 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { // AH to Penpal test args let ah_to_penpal_test_args = TestContext { sender: AssetHubPolkadotSender::get(), - receiver: PenpalPolkadotAReceiver::get(), - args: para_test_args( + receiver: PenpalBReceiver::get(), + args: TestArgs::new_para( penpal_as_seen_by_ah, ah_to_penpal_beneficiary_id, asset_amount_to_send, @@ -706,13 +708,13 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { &AssetHubPolkadotSender::get(), ) }); - let penpal_receiver_assets_before = PenpalPolkadotA::execute_with(|| { - type Assets = ::Assets; - >::balance(asset_id_on_penpal, &PenpalPolkadotAReceiver::get()) + let penpal_receiver_assets_before = PenpalB::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalBReceiver::get()) }); ah_to_penpal.set_assertion::(ah_to_penpal_foreign_assets_sender_assertions); - ah_to_penpal.set_assertion::(ah_to_penpal_foreign_assets_receiver_assertions); + ah_to_penpal.set_assertion::(ah_to_penpal_foreign_assets_receiver_assertions); ah_to_penpal.set_dispatchable::(system_para_to_para_transfer_assets); ah_to_penpal.assert(); @@ -726,9 +728,9 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { &AssetHubPolkadotSender::get(), ) }); - let penpal_receiver_assets_after = PenpalPolkadotA::execute_with(|| { - type Assets = ::Assets; - >::balance(asset_id_on_penpal, &PenpalPolkadotAReceiver::get()) + let penpal_receiver_assets_after = PenpalB::execute_with(|| { + type Assets = ::Assets; + >::balance(asset_id_on_penpal, &PenpalBReceiver::get()) }); // Sender's balance is reduced diff --git a/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/treasury.rs b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/treasury.rs new file mode 100644 index 0000000000..03e34b234d --- /dev/null +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/treasury.rs @@ -0,0 +1,126 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate::*; +use emulated_integration_tests_common::accounts::{ALICE, BOB}; +use frame_support::traits::fungibles::{Create, Inspect, Mutate}; +use polkadot_runtime_common::impls::VersionedLocatableAsset; +use xcm_executor::traits::ConvertLocation; + +#[test] +fn create_and_claim_treasury_spend() { + const ASSET_ID: u32 = 1984; + const SPEND_AMOUNT: u128 = 1_000_000; + // treasury location from a sibling parachain. + let treasury_location: MultiLocation = MultiLocation::new(1, PalletInstance(19)); + // treasury account on a sibling parachain. + let treasury_account = + asset_hub_polkadot_runtime::xcm_config::LocationToAccountId::convert_location( + &treasury_location, + ) + .unwrap(); + let asset_hub_location = MultiLocation::new(0, Parachain(AssetHubPolkadot::para_id().into())); + let root = ::RuntimeOrigin::root(); + // asset kind to be spend from the treasury. + let asset_kind = VersionedLocatableAsset::V3 { + location: asset_hub_location, + asset_id: AssetId::Concrete((PalletInstance(50), GeneralIndex(ASSET_ID.into())).into()), + }; + // treasury spend beneficiary. + let alice: AccountId = Polkadot::account_id_of(ALICE); + let bob: AccountId = Polkadot::account_id_of(BOB); + let bob_signed = ::RuntimeOrigin::signed(bob.clone()); + + AssetHubPolkadot::execute_with(|| { + type Assets = ::Assets; + + // create an asset class and mint some assets to the treasury account. + assert_ok!(>::create( + ASSET_ID, + treasury_account.clone(), + true, + SPEND_AMOUNT / 2 + )); + assert_ok!(>::mint_into(ASSET_ID, &treasury_account, SPEND_AMOUNT * 4)); + // beneficiary has zero balance. + assert_eq!(>::balance(ASSET_ID, &alice,), 0u128,); + }); + + Polkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + type Treasury = ::Treasury; + type AssetRate = ::AssetRate; + + // create a conversion rate from `asset_kind` to the native currency. + assert_ok!(AssetRate::create(root.clone(), Box::new(asset_kind.clone()), 2.into())); + + // create and approve a treasury spend. + assert_ok!(Treasury::spend( + root, + Box::new(asset_kind), + SPEND_AMOUNT, + Box::new(MultiLocation::new(0, Into::<[u8; 32]>::into(alice.clone())).into()), + None, + )); + // claim the spend. + assert_ok!(Treasury::payout(bob_signed.clone(), 0)); + + assert_expected_events!( + Polkadot, + vec![ + RuntimeEvent::Treasury(pallet_treasury::Event::Paid { .. }) => {}, + ] + ); + }); + + AssetHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + type Assets = ::Assets; + + // assert events triggered by xcm pay program + // 1. treasury asset transferred to spend beneficiary + // 2. response to Relay Chain treasury pallet instance sent back + // 3. XCM program completed + assert_expected_events!( + AssetHubPolkadot, + vec![ + RuntimeEvent::Assets(pallet_assets::Event::Transferred { asset_id: id, from, to, amount }) => { + id: id == &ASSET_ID, + from: from == &treasury_account, + to: to == &alice, + amount: amount == &SPEND_AMOUNT, + }, + RuntimeEvent::ParachainSystem(cumulus_pallet_parachain_system::Event::UpwardMessageSent { .. }) => {}, + RuntimeEvent::MessageQueue(pallet_message_queue::Event::Processed { success: true ,.. }) => {}, + ] + ); + // beneficiary received the assets from the treasury. + assert_eq!(>::balance(ASSET_ID, &alice,), SPEND_AMOUNT,); + }); + + Polkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + type Treasury = ::Treasury; + + // check the payment status to ensure the response from the AssetHub was received. + assert_ok!(Treasury::check_status(bob_signed, 0)); + assert_expected_events!( + Polkadot, + vec![ + RuntimeEvent::Treasury(pallet_treasury::Event::SpendProcessed { .. }) => {}, + ] + ); + }); +} diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml new file mode 100644 index 0000000000..dbb8482514 --- /dev/null +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml @@ -0,0 +1,41 @@ +[package] +name = "bridge-hub-kusama-integration-tests" +version = "0.1.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Bridge Hub Kusama runtime integration tests with xcm-emulator" +publish = false + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.4.0" } +scale-info = { version = "2.10.0", features = ["derive"] } +hex = "0.4.3" +hex-literal = "0.4.1" + +# Substrate +sp-runtime = { version = "31.0.1" } +frame-support = { version = "28.0.0" } +pallet-balances = { version = "28.0.0" } +pallet-assets = { version = "29.0.0" } +pallet-message-queue = { version = "31.0.0" } + +# Polkadot +xcm = { package = "staging-xcm", version = "7.0.0" } +pallet-xcm = { version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", version = "7.0.0" } + +# Cumulus +emulated-integration-tests-common = { version = "3.0.0" } +parachains-common = { version = "7.0.0" } +cumulus-pallet-xcmp-queue = { version = "0.7.0" } + +# Bridges +bp-messages = { version = "0.7.0" } +pallet-bridge-messages = { version = "0.7.0" } + +# Local +bridge-hub-kusama-runtime = { path = "../../../../../system-parachains/bridge-hubs/bridge-hub-kusama" } +integration-tests-helpers = { path = "../../../helpers" } +kusama-polkadot-system-emulated-network = { path = "../../../networks/kusama-polkadot-system" } +kusama-system-emulated-network = { path = "../../../networks/kusama-system" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/lib.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/lib.rs new file mode 100644 index 0000000000..1c7d1e1682 --- /dev/null +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/lib.rs @@ -0,0 +1,75 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Substrate +pub use frame_support::{assert_err, assert_ok, pallet_prelude::DispatchResult}; +pub use sp_runtime::DispatchError; + +// Polkadot +pub use xcm::{ + latest::ParentThen, + prelude::{AccountId32 as AccountId32Junction, *}, + v3::{ + Error, + NetworkId::{Kusama as KusamaId, Polkadot as PolkadotId}, + }, +}; + +// Bridges +pub use bp_messages::LaneId; + +// Cumulus +pub use emulated_integration_tests_common::{ + accounts::ALICE, + impls::Inspect, + xcm_emulator::{ + assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para, + RelayChain as Relay, Test, TestArgs, TestContext, TestExt, + }, + xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, + PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, +}; +pub use integration_tests_helpers::test_parachain_is_trusted_teleporter; +pub use kusama_polkadot_system_emulated_network::{ + asset_hub_kusama_emulated_chain::{ + genesis::ED as ASSET_HUB_KUSAMA_ED, AssetHubKusamaParaPallet as AssetHubKusamaPallet, + }, + asset_hub_polkadot_emulated_chain::{ + genesis::ED as ASSET_HUB_POLKADOT_ED, AssetHubPolkadotParaPallet as AssetHubPolkadotPallet, + }, + bridge_hub_kusama_emulated_chain::{ + genesis::ED as BRIDGE_HUB_KUSAMA_ED, BridgeHubKusamaParaPallet as BridgeHubKusamaPallet, + }, + kusama_emulated_chain::{genesis::ED as KUSAMA_ED, KusamaRelayPallet as KusamaPallet}, + AssetHubKusamaPara as AssetHubKusama, AssetHubKusamaParaReceiver as AssetHubKusamaReceiver, + AssetHubKusamaParaSender as AssetHubKusamaSender, AssetHubPolkadotPara as AssetHubPolkadot, + AssetHubPolkadotParaReceiver as AssetHubPolkadotReceiver, + BridgeHubKusamaPara as BridgeHubKusama, BridgeHubKusamaParaSender as BridgeHubKusamaSender, + BridgeHubPolkadotPara as BridgeHubPolkadot, KusamaRelay as Kusama, + KusamaRelayReceiver as KusamaReceiver, KusamaRelaySender as KusamaSender, +}; +pub use kusama_system_emulated_network::{ + penpal_emulated_chain::PenpalAParaPallet as PenpalAPallet, + BridgeHubKusamaParaReceiver as BridgeHubKusamaReceiver, PenpalAPara as PenpalA, + PenpalAParaReceiver as PenpalAReceiver, PenpalAParaSender as PenpalASender, +}; +pub use parachains_common::{AccountId, Balance}; + +pub const ASSET_ID: u32 = 1; +pub const ASSET_MIN_BALANCE: u128 = 1000; +pub const ASSETS_PALLET_ID: u8 = 50; + +#[cfg(test)] +mod tests; diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/asset_transfers.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/asset_transfers.rs new file mode 100644 index 0000000000..148c8b3ba9 --- /dev/null +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/asset_transfers.rs @@ -0,0 +1,171 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate::tests::*; + +fn send_asset_from_asset_hub_kusama_to_asset_hub_polkadot(id: MultiLocation, amount: u128) { + let destination = asset_hub_polkadot_location(); + + // fund the AHK's SA on BHK for paying bridge transport fees + BridgeHubKusama::fund_para_sovereign(AssetHubKusama::para_id(), 10_000_000_000_000u128); + + // set XCM versions + AssetHubKusama::force_xcm_version(destination, XCM_VERSION); + BridgeHubKusama::force_xcm_version(bridge_hub_polkadot_location(), XCM_VERSION); + + // send message over bridge + assert_ok!(send_asset_from_asset_hub_kusama(destination, (id, amount))); + assert_bridge_hub_kusama_message_accepted(true); + assert_bridge_hub_polkadot_message_received(); +} + +#[test] +fn send_ksms_from_asset_hub_kusama_to_asset_hub_polkadot() { + let ksm_at_asset_hub_kusama: MultiLocation = Parent.into(); + let ksm_at_asset_hub_polkadot = + MultiLocation { parents: 2, interior: X1(GlobalConsensus(NetworkId::Kusama)) }; + let owner: AccountId = AssetHubPolkadot::account_id_of(ALICE); + AssetHubPolkadot::force_create_foreign_asset( + ksm_at_asset_hub_polkadot, + owner, + true, + ASSET_MIN_BALANCE, + vec![], + ); + let sov_ahp_on_ahk = AssetHubKusama::sovereign_account_of_parachain_on_other_global_consensus( + NetworkId::Polkadot, + AssetHubPolkadot::para_id(), + ); + + let ksms_in_reserve_on_ahk_before = + ::account_data_of(sov_ahp_on_ahk.clone()).free; + let sender_ksms_before = + ::account_data_of(AssetHubKusamaSender::get()).free; + let receiver_ksms_before = AssetHubPolkadot::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance(ksm_at_asset_hub_polkadot, &AssetHubPolkadotReceiver::get()) + }); + + let amount = ASSET_HUB_KUSAMA_ED * 1_000; + send_asset_from_asset_hub_kusama_to_asset_hub_polkadot(ksm_at_asset_hub_kusama, amount); + AssetHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + AssetHubPolkadot, + vec![ + // issue KSMs on AHP + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, .. }) => { + asset_id: *asset_id == ksm_at_asset_hub_kusama, + owner: *owner == AssetHubPolkadotReceiver::get(), + }, + // message processed successfully + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); + }); + + let sender_ksms_after = + ::account_data_of(AssetHubKusamaSender::get()).free; + let receiver_ksms_after = AssetHubPolkadot::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance(ksm_at_asset_hub_polkadot, &AssetHubPolkadotReceiver::get()) + }); + let ksms_in_reserve_on_ahk_after = + ::account_data_of(sov_ahp_on_ahk.clone()).free; + + // Sender's balance is reduced + assert!(sender_ksms_before > sender_ksms_after); + // Receiver's balance is increased + assert!(receiver_ksms_after > receiver_ksms_before); + // Reserve balance is reduced by sent amount + assert_eq!(ksms_in_reserve_on_ahk_after, ksms_in_reserve_on_ahk_before + amount); +} + +#[test] +fn send_dots_from_asset_hub_kusama_to_asset_hub_polkadot() { + let prefund_amount = 10_000_000_000_000u128; + let dot_at_asset_hub_kusama = + MultiLocation { parents: 2, interior: X1(GlobalConsensus(NetworkId::Polkadot)) }; + let owner: AccountId = AssetHubPolkadot::account_id_of(ALICE); + AssetHubKusama::force_create_foreign_asset( + dot_at_asset_hub_kusama, + owner, + true, + ASSET_MIN_BALANCE, + vec![(AssetHubKusamaSender::get(), prefund_amount)], + ); + + // fund the AHK's SA on AHP with the DOT tokens held in reserve + let sov_ahk_on_ahp = AssetHubPolkadot::sovereign_account_of_parachain_on_other_global_consensus( + NetworkId::Kusama, + AssetHubKusama::para_id(), + ); + AssetHubPolkadot::fund_accounts(vec![(sov_ahk_on_ahp.clone(), prefund_amount)]); + + let dots_in_reserve_on_ahp_before = + ::account_data_of(sov_ahk_on_ahp.clone()).free; + assert_eq!(dots_in_reserve_on_ahp_before, prefund_amount); + let sender_dots_before = AssetHubKusama::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance(dot_at_asset_hub_kusama, &AssetHubKusamaSender::get()) + }); + assert_eq!(sender_dots_before, prefund_amount); + let receiver_dots_before = + ::account_data_of(AssetHubPolkadotReceiver::get()).free; + + let amount_to_send = ASSET_HUB_POLKADOT_ED * 1_000; + send_asset_from_asset_hub_kusama_to_asset_hub_polkadot(dot_at_asset_hub_kusama, amount_to_send); + AssetHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + AssetHubPolkadot, + vec![ + // DOT is withdrawn from AHK's SA on AHP + RuntimeEvent::Balances( + pallet_balances::Event::Burned { who, amount } + ) => { + who: *who == sov_ahk_on_ahp, + amount: *amount == amount_to_send, + }, + // DOTs deposited to beneficiary + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => { + who: *who == AssetHubPolkadotReceiver::get(), + }, + // message processed successfully + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); + }); + + let sender_dots_after = AssetHubKusama::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance(dot_at_asset_hub_kusama, &AssetHubKusamaSender::get()) + }); + let receiver_dots_after = + ::account_data_of(AssetHubPolkadotReceiver::get()).free; + let dots_in_reserve_on_ahp_after = + ::account_data_of(sov_ahk_on_ahp).free; + + // Sender's balance is reduced + assert!(sender_dots_before > sender_dots_after); + // Receiver's balance is increased + assert!(receiver_dots_after > receiver_dots_before); + // Reserve balance is reduced by sent amount + assert_eq!(dots_in_reserve_on_ahp_after, dots_in_reserve_on_ahp_before - amount_to_send); +} diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/mod.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/mod.rs new file mode 100644 index 0000000000..3e3f63297c --- /dev/null +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/mod.rs @@ -0,0 +1,114 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate::*; + +mod asset_transfers; +mod send_xcm; +mod teleport; + +pub(crate) fn asset_hub_polkadot_location() -> MultiLocation { + MultiLocation { + parents: 2, + interior: X2( + GlobalConsensus(NetworkId::Polkadot), + Parachain(AssetHubPolkadot::para_id().into()), + ), + } +} + +pub(crate) fn bridge_hub_polkadot_location() -> MultiLocation { + MultiLocation { + parents: 2, + interior: X2( + GlobalConsensus(NetworkId::Polkadot), + Parachain(BridgeHubPolkadot::para_id().into()), + ), + } +} + +pub(crate) fn send_asset_from_asset_hub_kusama( + destination: MultiLocation, + (id, amount): (MultiLocation, u128), +) -> DispatchResult { + let signed_origin = + ::RuntimeOrigin::signed(AssetHubKusamaSender::get().into()); + + let beneficiary: MultiLocation = + AccountId32Junction { network: None, id: AssetHubPolkadotReceiver::get().into() }.into(); + + let assets: MultiAssets = (id, amount).into(); + let fee_asset_item = 0; + + AssetHubKusama::execute_with(|| { + ::PolkadotXcm::limited_reserve_transfer_assets( + signed_origin, + bx!(destination.into()), + bx!(beneficiary.into()), + bx!(assets.into()), + fee_asset_item, + WeightLimit::Unlimited, + ) + }) +} + +pub(crate) fn assert_bridge_hub_kusama_message_accepted(expected_processed: bool) { + BridgeHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + if expected_processed { + assert_expected_events!( + BridgeHubKusama, + vec![ + // pay for bridge fees + RuntimeEvent::Balances(pallet_balances::Event::Burned { .. }) => {}, + // message exported + RuntimeEvent::BridgePolkadotMessages( + pallet_bridge_messages::Event::MessageAccepted { .. } + ) => {}, + // message processed successfully + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); + } else { + assert_expected_events!( + BridgeHubKusama, + vec![ + RuntimeEvent::MessageQueue(pallet_message_queue::Event::Processed { + success: false, + .. + }) => {}, + ] + ); + } + }); +} + +pub(crate) fn assert_bridge_hub_polkadot_message_received() { + BridgeHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + BridgeHubPolkadot, + vec![ + // message sent to destination + RuntimeEvent::XcmpQueue( + cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. } + ) => {}, + ] + ); + }) +} diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/send_xcm.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/send_xcm.rs new file mode 100644 index 0000000000..e1c64ef580 --- /dev/null +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/send_xcm.rs @@ -0,0 +1,177 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate::tests::*; + +#[test] +fn send_xcm_from_kusama_relay_to_polkadot_asset_hub_should_fail_on_not_applicable() { + // Init tests variables + // XcmPallet send arguments + let sudo_origin = ::RuntimeOrigin::root(); + let destination = Kusama::child_location_of(BridgeHubKusama::para_id()).into(); + let weight_limit = WeightLimit::Unlimited; + let check_origin = None; + + let remote_xcm = Xcm(vec![ClearOrigin]); + + let xcm = VersionedXcm::from(Xcm(vec![ + UnpaidExecution { weight_limit, check_origin }, + ExportMessage { + network: PolkadotId, + destination: X1(Parachain(AssetHubPolkadot::para_id().into())), + xcm: remote_xcm, + }, + ])); + + // Kusama Global Consensus + // Send XCM message from Relay Chain to Bridge Hub source Parachain + Kusama::execute_with(|| { + assert_ok!(::XcmPallet::send( + sudo_origin, + bx!(destination), + bx!(xcm), + )); + + type RuntimeEvent = ::RuntimeEvent; + + assert_expected_events!( + Kusama, + vec![ + RuntimeEvent::XcmPallet(pallet_xcm::Event::Sent { .. }) => {}, + ] + ); + }); + // Receive XCM message in Bridge Hub source Parachain, it should fail, because we don't have + // opened bridge/lane. + assert_bridge_hub_kusama_message_accepted(false); +} + +#[test] +fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { + // Initially set only default version on all runtimes + AssetHubKusama::force_default_xcm_version(Some(xcm::v2::prelude::XCM_VERSION)); + BridgeHubKusama::force_default_xcm_version(Some(xcm::v2::prelude::XCM_VERSION)); + BridgeHubPolkadot::force_default_xcm_version(Some(xcm::v2::prelude::XCM_VERSION)); + AssetHubPolkadot::force_default_xcm_version(Some(xcm::v2::prelude::XCM_VERSION)); + + // prepare data + let destination = asset_hub_polkadot_location(); + let native_token = MultiLocation::parent(); + let amount = ASSET_HUB_KUSAMA_ED * 1_000; + + // fund the AHK's SA on BHK for paying bridge transport fees + BridgeHubKusama::fund_para_sovereign(AssetHubKusama::para_id(), 10_000_000_000_000u128); + // fund sender + AssetHubKusama::fund_accounts(vec![(AssetHubKusamaSender::get().into(), amount * 10)]); + + // send XCM from AssetHubKusama - fails - destination version not known + assert_err!( + send_asset_from_asset_hub_kusama(destination, (native_token, amount)), + DispatchError::Module(sp_runtime::ModuleError { + index: 31, + error: [1, 0, 0, 0], + message: Some("SendFailure") + }) + ); + + // set destination version + AssetHubKusama::force_xcm_version(destination, xcm::v3::prelude::XCM_VERSION); + + // TODO: remove this block, when removing `xcm:v2` + { + // send XCM from AssetHubKusama - fails - AssetHubKusama is set to the default/safe `2` + // version, which does not have the `ExportMessage` instruction. If the default `2` is + // changed to `3`, then this assert can go away" + assert_err!( + send_asset_from_asset_hub_kusama(destination, (native_token, amount)), + DispatchError::Module(sp_runtime::ModuleError { + index: 31, + error: [1, 0, 0, 0], + message: Some("SendFailure") + }) + ); + + // set exact version for BridgeHubPolkadot to `2` without `ExportMessage` instruction + AssetHubKusama::force_xcm_version( + ParentThen(Parachain(BridgeHubKusama::para_id().into()).into()).into(), + xcm::v2::prelude::XCM_VERSION, + ); + // send XCM from AssetHubKusama - fails - `ExportMessage` is not in `2` + assert_err!( + send_asset_from_asset_hub_kusama(destination, (native_token, amount)), + DispatchError::Module(sp_runtime::ModuleError { + index: 31, + error: [1, 0, 0, 0], + message: Some("SendFailure") + }) + ); + } + + // set version with `ExportMessage` for BridgeHubKusama + AssetHubKusama::force_xcm_version( + ParentThen(Parachain(BridgeHubKusama::para_id().into()).into()).into(), + xcm::v3::prelude::XCM_VERSION, + ); + // send XCM from AssetHubKusama - ok + assert_ok!(send_asset_from_asset_hub_kusama(destination, (native_token, amount))); + + // `ExportMessage` on local BridgeHub - fails - remote BridgeHub version not known + assert_bridge_hub_kusama_message_accepted(false); + + // set version for remote BridgeHub on BridgeHubKusama + BridgeHubKusama::force_xcm_version( + bridge_hub_polkadot_location(), + xcm::v3::prelude::XCM_VERSION, + ); + // set version for AssetHubPolkadot on BridgeHubPolkadot + BridgeHubPolkadot::force_xcm_version( + ParentThen(Parachain(AssetHubPolkadot::para_id().into()).into()).into(), + xcm::v3::prelude::XCM_VERSION, + ); + + // send XCM from AssetHubKusama - ok + assert_ok!(send_asset_from_asset_hub_kusama(destination, (native_token, amount))); + assert_bridge_hub_kusama_message_accepted(true); + assert_bridge_hub_polkadot_message_received(); + // message delivered and processed at destination + AssetHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + AssetHubPolkadot, + vec![ + // message processed with failure, but for this scenario it is ok, important is that was delivered + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: false, .. } + ) => {}, + ] + ); + }); + + // TODO: remove this block, when removing `xcm:v2` + { + // set `2` version for remote BridgeHub on BridgeHubKusama, which does not have + // `UniversalOrigin` and `DescendOrigin` + BridgeHubKusama::force_xcm_version( + bridge_hub_polkadot_location(), + xcm::v2::prelude::XCM_VERSION, + ); + + // send XCM from AssetHubKusama - ok + assert_ok!(send_asset_from_asset_hub_kusama(destination, (native_token, amount))); + // message is not accepted on the local BridgeHub (`DestinationUnsupported`) because we + // cannot add `UniversalOrigin` and `DescendOrigin` + assert_bridge_hub_kusama_message_accepted(false); + } +} diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/teleport.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/teleport.rs new file mode 100644 index 0000000000..eac53a7ed2 --- /dev/null +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/teleport.rs @@ -0,0 +1,30 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate::*; +use bridge_hub_kusama_runtime::xcm_config::XcmConfig; + +#[test] +fn teleport_to_other_system_parachains_works() { + let amount = BRIDGE_HUB_KUSAMA_ED * 100; + let native_asset: MultiAssets = (Parent, amount).into(); + + test_parachain_is_trusted_teleporter!( + BridgeHubKusama, // Origin + XcmConfig, // XCM configuration + vec![AssetHubKusama], // Destinations + (native_asset, amount) + ); +} diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml new file mode 100644 index 0000000000..5ed8b6ec43 --- /dev/null +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml @@ -0,0 +1,37 @@ +[package] +name = "bridge-hub-polkadot-integration-tests" +version = "0.1.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Bridge Hub Polkadot runtime integration tests with xcm-emulator" +publish = false + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.4.0" } + +# Substrate +sp-runtime = { version = "31.0.1" } +frame-support = { version = "28.0.0" } +pallet-balances = { version = "28.0.0" } +pallet-assets = { version = "29.0.0" } +pallet-message-queue = { version = "31.0.0" } + +# Polkadot +xcm = { package = "staging-xcm", version = "7.0.0" } +pallet-xcm = { version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", version = "7.0.0" } + +# Cumulus +emulated-integration-tests-common = { version = "3.0.0" } +parachains-common = { version = "7.0.0" } +cumulus-pallet-xcmp-queue = { version = "0.7.0" } + +# Bridges +bp-messages = { version = "0.7.0" } +pallet-bridge-messages = { version = "0.7.0" } + +# Runtimes +bridge-hub-polkadot-runtime = { path = "../../../../../system-parachains/bridge-hubs/bridge-hub-polkadot" } +integration-tests-helpers = { path = "../../../helpers" } +kusama-polkadot-system-emulated-network = { path = "../../../networks/kusama-polkadot-system" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs new file mode 100644 index 0000000000..2919efed42 --- /dev/null +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs @@ -0,0 +1,71 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Substrate +pub use frame_support::{assert_err, assert_ok, pallet_prelude::DispatchResult}; +pub use sp_runtime::DispatchError; + +// Polkadot +pub use xcm::{ + latest::ParentThen, + prelude::{AccountId32 as AccountId32Junction, *}, + v3::{ + Error, + NetworkId::{Kusama as KusamaId, Polkadot as PolkadotId}, + }, +}; + +// Bridges +pub use bp_messages::LaneId; + +// Cumulus +pub use emulated_integration_tests_common::{ + accounts::ALICE, + impls::Inspect, + xcm_emulator::{ + assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para, + RelayChain as Relay, Test, TestArgs, TestContext, TestExt, + }, + xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, + PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, +}; +pub use integration_tests_helpers::test_parachain_is_trusted_teleporter; +pub use kusama_polkadot_system_emulated_network::{ + asset_hub_kusama_emulated_chain::{ + genesis::ED as ASSET_HUB_KUSAMA_ED, AssetHubKusamaParaPallet as AssetHubKusamaPallet, + }, + asset_hub_polkadot_emulated_chain::{ + genesis::ED as ASSET_HUB_POLKADOT_ED, AssetHubPolkadotParaPallet as AssetHubPolkadotPallet, + }, + bridge_hub_polkadot_emulated_chain::{ + genesis::ED as BRIDGE_HUB_POLKADOT_ED, + BridgeHubPolkadotParaPallet as BridgeHubPolkadotPallet, + }, + polkadot_emulated_chain::PolkadotRelayPallet as PolkadotPallet, + AssetHubKusamaPara as AssetHubKusama, AssetHubKusamaParaReceiver as AssetHubKusamaReceiver, + AssetHubPolkadotPara as AssetHubPolkadot, + AssetHubPolkadotParaReceiver as AssetHubPolkadotReceiver, + AssetHubPolkadotParaSender as AssetHubPolkadotSender, BridgeHubKusamaPara as BridgeHubKusama, + BridgeHubPolkadotPara as BridgeHubPolkadot, + BridgeHubPolkadotParaSender as BridgeHubPolkadotSender, PolkadotRelay as Polkadot, +}; +pub use parachains_common::{AccountId, Balance}; + +pub const ASSET_ID: u32 = 1; +pub const ASSET_MIN_BALANCE: u128 = 1000; +pub const ASSETS_PALLET_ID: u8 = 50; + +#[cfg(test)] +mod tests; diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/asset_transfers.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/asset_transfers.rs new file mode 100644 index 0000000000..8c653c0900 --- /dev/null +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/asset_transfers.rs @@ -0,0 +1,173 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +use crate::tests::*; + +fn send_asset_from_asset_hub_polkadot_to_asset_hub_kusama(id: MultiLocation, amount: u128) { + let destination = asset_hub_kusama_location(); + + // fund the AHP's SA on BHP for paying bridge transport fees + BridgeHubPolkadot::fund_para_sovereign(AssetHubPolkadot::para_id(), 10_000_000_000_000u128); + + // set XCM versions + AssetHubPolkadot::force_xcm_version(destination, XCM_VERSION); + BridgeHubPolkadot::force_xcm_version(bridge_hub_kusama_location(), XCM_VERSION); + + // send message over bridge + assert_ok!(send_asset_from_asset_hub_polkadot(destination, (id, amount))); + assert_bridge_hub_polkadot_message_accepted(true); + assert_bridge_hub_kusama_message_received(); +} + +#[test] +fn send_dots_from_asset_hub_polkadot_to_asset_hub_kusama() { + let dot_at_asset_hub_polkadot: MultiLocation = Parent.into(); + let dot_at_asset_hub_kusama = + MultiLocation { parents: 2, interior: X1(GlobalConsensus(NetworkId::Polkadot)) }; + let owner: AccountId = AssetHubKusama::account_id_of(ALICE); + AssetHubKusama::force_create_foreign_asset( + dot_at_asset_hub_kusama, + owner, + true, + ASSET_MIN_BALANCE, + vec![], + ); + let sov_ahk_on_ahp = AssetHubPolkadot::sovereign_account_of_parachain_on_other_global_consensus( + NetworkId::Kusama, + AssetHubKusama::para_id(), + ); + + let dots_in_reserve_on_ahp_before = + ::account_data_of(sov_ahk_on_ahp.clone()).free; + let sender_dots_before = + ::account_data_of(AssetHubPolkadotSender::get()).free; + let receiver_dots_before = AssetHubKusama::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance(dot_at_asset_hub_kusama, &AssetHubKusamaReceiver::get()) + }); + + let amount = ASSET_HUB_POLKADOT_ED * 1_000; + send_asset_from_asset_hub_polkadot_to_asset_hub_kusama(dot_at_asset_hub_polkadot, amount); + AssetHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + AssetHubKusama, + vec![ + // issue DOTs on AHK + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, .. }) => { + asset_id: *asset_id == dot_at_asset_hub_kusama, + owner: *owner == AssetHubKusamaReceiver::get(), + }, + // message processed successfully + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); + }); + + let sender_dots_after = + ::account_data_of(AssetHubPolkadotSender::get()).free; + let receiver_dots_after = AssetHubKusama::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance(dot_at_asset_hub_kusama, &AssetHubKusamaReceiver::get()) + }); + let dots_in_reserve_on_ahp_after = + ::account_data_of(sov_ahk_on_ahp).free; + + // Sender's balance is reduced + assert!(sender_dots_before > sender_dots_after); + // Receiver's balance is increased + assert!(receiver_dots_after > receiver_dots_before); + // Reserve balance is increased by sent amount + assert_eq!(dots_in_reserve_on_ahp_after, dots_in_reserve_on_ahp_before + amount); +} + +#[test] +fn send_ksms_from_asset_hub_polkadot_to_asset_hub_kusama() { + let prefund_amount = 10_000_000_000_000u128; + let ksm_at_asset_hub_polkadot = + MultiLocation { parents: 2, interior: X1(GlobalConsensus(NetworkId::Kusama)) }; + let owner: AccountId = AssetHubPolkadot::account_id_of(ALICE); + AssetHubPolkadot::force_create_foreign_asset( + ksm_at_asset_hub_polkadot, + owner, + true, + ASSET_MIN_BALANCE, + vec![(AssetHubPolkadotSender::get(), prefund_amount)], + ); + + // fund the AHP's SA on AHK with the KSM tokens held in reserve + let sov_ahp_on_ahk = AssetHubKusama::sovereign_account_of_parachain_on_other_global_consensus( + NetworkId::Polkadot, + AssetHubPolkadot::para_id(), + ); + AssetHubKusama::fund_accounts(vec![(sov_ahp_on_ahk.clone(), prefund_amount)]); + + let ksms_in_reserve_on_ahk_before = + ::account_data_of(sov_ahp_on_ahk.clone()).free; + assert_eq!(ksms_in_reserve_on_ahk_before, prefund_amount); + let sender_ksms_before = AssetHubPolkadot::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance(ksm_at_asset_hub_polkadot, &AssetHubPolkadotSender::get()) + }); + assert_eq!(sender_ksms_before, prefund_amount); + let receiver_ksms_before = + ::account_data_of(AssetHubKusamaReceiver::get()).free; + + let amount_to_send = ASSET_HUB_KUSAMA_ED * 1_000; + send_asset_from_asset_hub_polkadot_to_asset_hub_kusama( + ksm_at_asset_hub_polkadot, + amount_to_send, + ); + AssetHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + AssetHubKusama, + vec![ + // KSM is withdrawn from AHP's SA on AHK + RuntimeEvent::Balances( + pallet_balances::Event::Burned { who, amount } + ) => { + who: *who == sov_ahp_on_ahk, + amount: *amount == amount_to_send, + }, + // KSMs deposited to beneficiary + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => { + who: *who == AssetHubKusamaReceiver::get(), + }, + // message processed successfully + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); + }); + + let sender_ksms_after = AssetHubPolkadot::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance(ksm_at_asset_hub_polkadot, &AssetHubPolkadotSender::get()) + }); + let receiver_ksms_after = + ::account_data_of(AssetHubKusamaReceiver::get()).free; + let ksms_in_reserve_on_ahk_after = + ::account_data_of(sov_ahp_on_ahk.clone()).free; + + // Sender's balance is reduced + assert!(sender_ksms_before > sender_ksms_after); + // Receiver's balance is increased + assert!(receiver_ksms_after > receiver_ksms_before); + // Reserve balance is reduced by sent amount + assert_eq!(ksms_in_reserve_on_ahk_after, ksms_in_reserve_on_ahk_before - amount_to_send); +} diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/mod.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/mod.rs new file mode 100644 index 0000000000..e53c1ff66a --- /dev/null +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/mod.rs @@ -0,0 +1,114 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate::*; + +mod asset_transfers; +mod send_xcm; +mod teleport; + +pub(crate) fn asset_hub_kusama_location() -> MultiLocation { + MultiLocation { + parents: 2, + interior: X2( + GlobalConsensus(NetworkId::Kusama), + Parachain(AssetHubKusama::para_id().into()), + ), + } +} + +pub(crate) fn bridge_hub_kusama_location() -> MultiLocation { + MultiLocation { + parents: 2, + interior: X2( + GlobalConsensus(NetworkId::Kusama), + Parachain(BridgeHubKusama::para_id().into()), + ), + } +} + +pub(crate) fn send_asset_from_asset_hub_polkadot( + destination: MultiLocation, + (id, amount): (MultiLocation, u128), +) -> DispatchResult { + let signed_origin = + ::RuntimeOrigin::signed(AssetHubPolkadotSender::get().into()); + + let beneficiary: MultiLocation = + AccountId32Junction { network: None, id: AssetHubKusamaReceiver::get().into() }.into(); + + let assets: MultiAssets = (id, amount).into(); + let fee_asset_item = 0; + + AssetHubPolkadot::execute_with(|| { + ::PolkadotXcm::limited_reserve_transfer_assets( + signed_origin, + bx!(destination.into()), + bx!(beneficiary.into()), + bx!(assets.into()), + fee_asset_item, + WeightLimit::Unlimited, + ) + }) +} + +pub(crate) fn assert_bridge_hub_polkadot_message_accepted(expected_processed: bool) { + BridgeHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + if expected_processed { + assert_expected_events!( + BridgeHubPolkadot, + vec![ + // pay for bridge fees + RuntimeEvent::Balances(pallet_balances::Event::Burned { .. }) => {}, + // message exported + RuntimeEvent::BridgeKusamaMessages( + pallet_bridge_messages::Event::MessageAccepted { .. } + ) => {}, + // message processed successfully + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); + } else { + assert_expected_events!( + BridgeHubPolkadot, + vec![ + RuntimeEvent::MessageQueue(pallet_message_queue::Event::Processed { + success: false, + .. + }) => {}, + ] + ); + } + }); +} + +pub(crate) fn assert_bridge_hub_kusama_message_received() { + BridgeHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + BridgeHubKusama, + vec![ + // message sent to destination + RuntimeEvent::XcmpQueue( + cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. } + ) => {}, + ] + ); + }) +} diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/send_xcm.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/send_xcm.rs new file mode 100644 index 0000000000..ef30c0b758 --- /dev/null +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/send_xcm.rs @@ -0,0 +1,177 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate::tests::*; + +#[test] +fn send_xcm_from_polkadot_relay_to_kusama_asset_hub_should_fail_on_not_applicable() { + // Init tests variables + // XcmPallet send arguments + let sudo_origin = ::RuntimeOrigin::root(); + let destination = Polkadot::child_location_of(BridgeHubPolkadot::para_id()).into(); + let weight_limit = WeightLimit::Unlimited; + let check_origin = None; + + let remote_xcm = Xcm(vec![ClearOrigin]); + + let xcm = VersionedXcm::from(Xcm(vec![ + UnpaidExecution { weight_limit, check_origin }, + ExportMessage { + network: KusamaId, + destination: X1(Parachain(AssetHubKusama::para_id().into())), + xcm: remote_xcm, + }, + ])); + + // Polkadot Global Consensus + // Send XCM message from Relay Chain to Bridge Hub source Parachain + Polkadot::execute_with(|| { + assert_ok!(::XcmPallet::send( + sudo_origin, + bx!(destination), + bx!(xcm), + )); + + type RuntimeEvent = ::RuntimeEvent; + + assert_expected_events!( + Polkadot, + vec![ + RuntimeEvent::XcmPallet(pallet_xcm::Event::Sent { .. }) => {}, + ] + ); + }); + // Receive XCM message in Bridge Hub source Parachain, it should fail, because we don't have + // opened bridge/lane. + assert_bridge_hub_polkadot_message_accepted(false); +} + +#[test] +fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { + // Initially set only default version on all runtimes + AssetHubKusama::force_default_xcm_version(Some(xcm::v2::prelude::XCM_VERSION)); + BridgeHubKusama::force_default_xcm_version(Some(xcm::v2::prelude::XCM_VERSION)); + BridgeHubPolkadot::force_default_xcm_version(Some(xcm::v2::prelude::XCM_VERSION)); + AssetHubPolkadot::force_default_xcm_version(Some(xcm::v2::prelude::XCM_VERSION)); + + // prepare data + let destination = asset_hub_kusama_location(); + let native_token = MultiLocation::parent(); + let amount = ASSET_HUB_POLKADOT_ED * 1_000; + + // fund the AHK's SA on BHK for paying bridge transport fees + BridgeHubPolkadot::fund_para_sovereign(AssetHubPolkadot::para_id(), 10_000_000_000_000u128); + // fund sender + AssetHubPolkadot::fund_accounts(vec![(AssetHubPolkadotSender::get().into(), amount * 10)]); + + // send XCM from AssetHubPolkadot - fails - destination version not known + assert_err!( + send_asset_from_asset_hub_polkadot(destination, (native_token, amount)), + DispatchError::Module(sp_runtime::ModuleError { + index: 31, + error: [1, 0, 0, 0], + message: Some("SendFailure") + }) + ); + + // set destination version + AssetHubPolkadot::force_xcm_version(destination, xcm::v3::prelude::XCM_VERSION); + + // TODO: remove this block, when removing `xcm:v2` + { + // send XCM from AssetHubKusama - fails - AssetHubKusama is set to the default/safe `2` + // version, which does not have the `ExportMessage` instruction. If the default `2` is + // changed to `3`, then this assert can go away" + assert_err!( + send_asset_from_asset_hub_polkadot(destination, (native_token, amount)), + DispatchError::Module(sp_runtime::ModuleError { + index: 31, + error: [1, 0, 0, 0], + message: Some("SendFailure") + }) + ); + + // set exact version for BridgeHubPolkadot to `2` without `ExportMessage` instruction + AssetHubPolkadot::force_xcm_version( + ParentThen(Parachain(BridgeHubPolkadot::para_id().into()).into()).into(), + xcm::v2::prelude::XCM_VERSION, + ); + // send XCM from AssetHubPolkadot - fails - `ExportMessage` is not in `2` + assert_err!( + send_asset_from_asset_hub_polkadot(destination, (native_token, amount)), + DispatchError::Module(sp_runtime::ModuleError { + index: 31, + error: [1, 0, 0, 0], + message: Some("SendFailure") + }) + ); + } + + // set version with `ExportMessage` for BridgeHubPolkadot + AssetHubPolkadot::force_xcm_version( + ParentThen(Parachain(BridgeHubPolkadot::para_id().into()).into()).into(), + xcm::v3::prelude::XCM_VERSION, + ); + // send XCM from AssetHubPolkadot - ok + assert_ok!(send_asset_from_asset_hub_polkadot(destination, (native_token, amount))); + + // `ExportMessage` on local BridgeHub - fails - remote BridgeHub version not known + assert_bridge_hub_polkadot_message_accepted(false); + + // set version for remote BridgeHub on BridgeHubPolkadot + BridgeHubPolkadot::force_xcm_version( + bridge_hub_kusama_location(), + xcm::v3::prelude::XCM_VERSION, + ); + // set version for AssetHubKusama on BridgeHubKusama + BridgeHubKusama::force_xcm_version( + ParentThen(Parachain(AssetHubKusama::para_id().into()).into()).into(), + xcm::v3::prelude::XCM_VERSION, + ); + + // send XCM from AssetHubPolkadot - ok + assert_ok!(send_asset_from_asset_hub_polkadot(destination, (native_token, amount))); + assert_bridge_hub_polkadot_message_accepted(true); + assert_bridge_hub_kusama_message_received(); + // message delivered and processed at destination + AssetHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + AssetHubKusama, + vec![ + // message processed with failure, but for this scenario it is ok, important is that was delivered + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: false, .. } + ) => {}, + ] + ); + }); + + // TODO: remove this block, when removing `xcm:v2` + { + // set `2` version for remote BridgeHub on BridgeHubKusama, which does not have + // `UniversalOrigin` and `DescendOrigin` + BridgeHubPolkadot::force_xcm_version( + bridge_hub_kusama_location(), + xcm::v2::prelude::XCM_VERSION, + ); + + // send XCM from AssetHubPolkadot - ok + assert_ok!(send_asset_from_asset_hub_polkadot(destination, (native_token, amount))); + // message is not accepted on the local BridgeHub (`DestinationUnsupported`) because we + // cannot add `UniversalOrigin` and `DescendOrigin` + assert_bridge_hub_polkadot_message_accepted(false); + } +} diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/teleport.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/teleport.rs new file mode 100644 index 0000000000..eb915c3110 --- /dev/null +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/teleport.rs @@ -0,0 +1,30 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate::*; +use bridge_hub_polkadot_runtime::xcm_config::XcmConfig; + +#[test] +fn teleport_to_other_system_parachains_works() { + let amount = BRIDGE_HUB_POLKADOT_ED * 100; + let native_asset: MultiAssets = (Parent, amount).into(); + + test_parachain_is_trusted_teleporter!( + BridgeHubPolkadot, // Origin + XcmConfig, // XCM configuration + vec![AssetHubPolkadot], // Destinations + (native_asset, amount) + ); +} From 598ae51253358c5ce65d0eb56bd2a8dbb26d79a8 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 26 Feb 2024 15:11:30 +0100 Subject: [PATCH 203/316] fmt --- .../emulated/tests/assets/asset-hub-kusama/src/tests/swap.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/swap.rs b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/swap.rs index 63e2b624ad..d9f885e5f6 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/swap.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/swap.rs @@ -102,7 +102,8 @@ fn swap_locally_on_chain_using_local_assets() { ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), Box::new(asset_native), Box::new(asset_one), - 1414213562273 - SYSTEM_PARA_EXISTENTIAL_DEPOSIT * 2, // all but the 2 EDs can't be retrieved. + 1414213562273 - SYSTEM_PARA_EXISTENTIAL_DEPOSIT * 2, /* all but the 2 EDs can't be + * retrieved. */ 0, 0, AssetHubKusamaSender::get().into(), From 06cd27b1bfc172b15ec96c36f3e4b611acac4c03 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 26 Feb 2024 15:21:45 +0100 Subject: [PATCH 204/316] Version nits --- integration-tests/emulated/helpers/Cargo.toml | 2 +- .../emulated/tests/assets/asset-hub-kusama/Cargo.toml | 4 ++-- .../emulated/tests/assets/asset-hub-polkadot/Cargo.toml | 4 ++-- .../emulated/tests/bridges/bridge-hub-kusama/Cargo.toml | 2 +- .../emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/integration-tests/emulated/helpers/Cargo.toml b/integration-tests/emulated/helpers/Cargo.toml index 600ae8da65..8c30a59c32 100644 --- a/integration-tests/emulated/helpers/Cargo.toml +++ b/integration-tests/emulated/helpers/Cargo.toml @@ -21,4 +21,4 @@ pallet-xcm = { version = "7.0.0" } # Cumulus xcm-emulator = { version = "0.5.0" } cumulus-pallet-xcmp-queue = { version = "0.7.0" } -asset-test-utils = { version = "7.0.0" } +asset-test-utils = { version = "7.0.1" } diff --git a/integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml b/integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml index c36fc42b31..72d1866a33 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml @@ -22,10 +22,10 @@ pallet-message-queue = { version = "31.0.0" } # Polkadot xcm = { package = "staging-xcm", version = "7.0.0" } pallet-xcm = { version = "7.0.0" } -xcm-executor = { package = "staging-xcm-executor", version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", version = "7.0.3" } # Cumulus -asset-test-utils = { version = "7.0.0" } +asset-test-utils = { version = "7.0.1" } emulated-integration-tests-common = { version = "3.0.0" } parachains-common = { version = "7.0.0" } diff --git a/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml index a97665d6eb..191501c6e0 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml @@ -23,10 +23,10 @@ pallet-message-queue = { version = "31.0.0" } polkadot-runtime-common = { version = "7.0.0" } xcm = { package = "staging-xcm", version = "7.0.0" } pallet-xcm = { version = "7.0.0" } -xcm-executor = { package = "staging-xcm-executor", version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", version = "7.0.3" } # Cumulus -asset-test-utils = { version = "7.0.0" } +asset-test-utils = { version = "7.0.1" } emulated-integration-tests-common = { version = "3.0.0" } parachains-common = { version = "7.0.0" } cumulus-pallet-xcmp-queue = { version = "0.7.0" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml index dbb8482514..ee4e95c369 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml @@ -23,7 +23,7 @@ pallet-message-queue = { version = "31.0.0" } # Polkadot xcm = { package = "staging-xcm", version = "7.0.0" } pallet-xcm = { version = "7.0.0" } -xcm-executor = { package = "staging-xcm-executor", version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", version = "7.0.3" } # Cumulus emulated-integration-tests-common = { version = "3.0.0" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml index 5ed8b6ec43..98b2fc0fd1 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml @@ -20,7 +20,7 @@ pallet-message-queue = { version = "31.0.0" } # Polkadot xcm = { package = "staging-xcm", version = "7.0.0" } pallet-xcm = { version = "7.0.0" } -xcm-executor = { package = "staging-xcm-executor", version = "7.0.0" } +xcm-executor = { package = "staging-xcm-executor", version = "7.0.3" } # Cumulus emulated-integration-tests-common = { version = "3.0.0" } From ee694807706fb7022448510ea51072b00ad46f02 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 26 Feb 2024 16:11:27 +0100 Subject: [PATCH 205/316] Forgotten new integration tests to the matrix --- .github/workflows/integration-tests-matrix.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/integration-tests-matrix.json b/.github/workflows/integration-tests-matrix.json index f5f50521a5..f16c7f0f3a 100644 --- a/.github/workflows/integration-tests-matrix.json +++ b/.github/workflows/integration-tests-matrix.json @@ -6,5 +6,13 @@ { "name": "asset-hub-polkadot", "package": "asset-hub-polkadot-integration-tests" + }, + { + "name": "bridge-hub-kusama", + "package": "bridge-hub-kusama-integration-tests" + }, + { + "name": "bridge-hub-polkadot", + "package": "bridge-hub-polkadot-integration-tests" } ] From bbf7c5bde3aad2b5b97b18744068e89d6925d9ae Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 27 Feb 2024 13:51:06 +0100 Subject: [PATCH 206/316] Replaced Encointer hack with fix to avoid potential collisions caused by different versions of crates --- chain-spec-generator/Cargo.toml | 4 ---- .../src/system_parachains_specs.rs | 16 +------------- system-parachains/encointer/src/lib.rs | 22 +++++++++++++++---- 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index bbf235c07f..bfb49761fa 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -39,10 +39,6 @@ bridge-hub-kusama-runtime = { path = "../system-parachains/bridge-hubs/bridge-hu encointer-kusama-runtime = { path = "../system-parachains/encointer" } glutton-kusama-runtime = { path = "../system-parachains/gluttons/glutton-kusama" } -# Encointer is(could be) not migrated to the latest release, so we use compatible deps, when needed -# (if so, uncomment and set this version according to the actual encointer + check `fn encointer_kusama_genesis`) -# sp-core-encointer-compatible = { package = "sp-core", version = "29.0.0" } - [features] fast-runtime = [ "kusama-runtime/fast-runtime", diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 3d551bccd6..e02a581bb3 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -518,18 +518,6 @@ pub fn glutton_kusama_local_testnet_config() -> Result, Strin // EncointerKusama fn encointer_kusama_genesis(endowed_accounts: Vec, id: u32) -> serde_json::Value { - // The Encointer is(could be) not be migrated to the latest release, so we use compatible - // dependencies. (if so, uncomment this and set version for `sp_core_encointer_compatible` - // according to the actual encointer in Cargo.toml`) use sp_core_encointer_compatible as - // sp_core; fn get_from_seed( - // seed: &str, - // ) -> ::Public { - // use sp_core_encointer_compatible::Pair; - // TPublic::Pair::from_string(&format!("//{}", seed), None) - // .expect("static values are valid; qed") - // .public() - // } - serde_json::json!({ "balances": asset_hub_kusama_runtime::BalancesConfig { balances: endowed_accounts @@ -545,9 +533,7 @@ fn encointer_kusama_genesis(endowed_accounts: Vec, id: u32) -> serde_ "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - "aura": encointer_kusama_runtime::AuraConfig { - authorities: vec![get_from_seed::("Alice").into()], - }, + "aura": encointer_kusama_runtime::aura_config_for_chain_spec(&["Alice"]), }) } diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index e6e1669d22..672dd8b619 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -1030,6 +1030,21 @@ cumulus_pallet_parachain_system::register_validate_block! { BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::, } +/// The function is dedicated to the `chain-spec-generator`. Yes, it contains some duplicated code, +/// but it avoids potential collisions caused by different versions of crates. +pub fn aura_config_for_chain_spec(seeds: &[&str]) -> AuraConfig { + use sp_core::{sr25519, Pair, Public}; + fn get_from_seed(seed: &str) -> ::Public { + TPublic::Pair::from_string(&format!("//{}", seed), None) + .expect("static values are valid; qed") + .public() + } + + AuraConfig { + authorities: seeds.iter().map(|s| get_from_seed::(s).into()).collect(), + } +} + #[cfg(test)] mod multiplier_tests { use super::*; @@ -1107,8 +1122,9 @@ fn test_constants_compatiblity() { ); } -// TODO: Encointer pallets does not have compatible `polkadot-sdk` versions, -// so we cannot easily reuse `system-parachains-constants` module. +// The Encointer pallets do not have compatible versions with `polkadot-sdk`, making it difficult +// for us to reuse the `system-parachains-constants` module. Therefore, we have copies of it here +// with `test_constants_compatiblity`. mod system_parachains_constants { use super::*; use frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND; @@ -1260,8 +1276,6 @@ mod system_parachains_constants { } } - // TODO: Encointer pallets does not have compatible `polkadot-sdk` versions, - // so we cannot easily reuse `kusama-runtime-constants` module. pub(crate) mod kusama_runtime_constants { /// Money matters. pub mod currency { From 157788cdcd43b8cababf91be83dcbfe200a8bff9 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 27 Feb 2024 15:06:25 +0100 Subject: [PATCH 207/316] CI fix compilation for encointer? --- system-parachains/encointer/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 672dd8b619..4a68f33fce 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -1032,8 +1032,12 @@ cumulus_pallet_parachain_system::register_validate_block! { /// The function is dedicated to the `chain-spec-generator`. Yes, it contains some duplicated code, /// but it avoids potential collisions caused by different versions of crates. +#[cfg(feature = "std")] pub fn aura_config_for_chain_spec(seeds: &[&str]) -> AuraConfig { - use sp_core::{sr25519, Pair, Public}; + use sp_core::{ + crypto::{Pair, Public}, + sr25519, + }; fn get_from_seed(seed: &str) -> ::Public { TPublic::Pair::from_string(&format!("//{}", seed), None) .expect("static values are valid; qed") From 5e336f68dba0cc83586f5be1a8221f09e497f577 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 27 Feb 2024 15:06:46 +0100 Subject: [PATCH 208/316] Added `Based on Polkadot-SDK` to Changelog.md --- CHANGELOG.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b8aa5c8ce..ca331bdf94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,15 +20,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Upgrade parachains runtime API from v7 to v8 in Kusama ([context](https://paritytech.github.io/polkadot-sdk/book/protocol-validator-disabling.html), [polkadot-fellows/runtimes#148](https://github.com/polkadot-fellows/runtimes/pull/148)). - Fixed the lowering of Asset Hub existential deposits. - MMR leaves generated by `pallet_mmr` point to the next-authority-set of the current block instead of the prior block [polkadot-fellows/runtimes#169](https://github.com/polkadot-fellows/runtimes/pull/169) -- Upgrade dependencies to the `polkadot-sdk@1.5.0` release ([polkadot-fellows/runtimes#137](https://github.com/polkadot-fellows/runtimes/pull/137)) - Deprecate the `xcm::body::TREASURER_INDEX` constant and use the standard `Treasury` variant from the `xcm::BodyId` type instead ([polkadot-fellows/runtimes#149](https://github.com/polkadot-fellows/runtimes/pull/149)) - Bump parachains runtime API to v9 in Kusama to enable the `node_features` function [polkadot-fellows/runtimes#194](https://github.com/polkadot-fellows/runtimes/pull/194) -- Upgrade dependencies to the `polkadot-sdk@1.6.0` release ([polkadot-fellows/runtimes#159](https://github.com/polkadot-fellows/runtimes/pull/159)) ### Removed - Removed the `SafeCallFilter` from the Relay Chain XCM config ([polkadot-fellows/runtimes#172](https://github.com/polkadot-fellows/runtimes/pull/172)). +### Based on Polkadot-SDK + +- Upgrade dependencies to the [polkadot-sdk@1.5.0](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.5.0) release ([polkadot-fellows/runtimes#137](https://github.com/polkadot-fellows/runtimes/pull/137)) +- Upgrade dependencies to the [polkadot-sdk@1.6.0](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.6.0) release ([polkadot-fellows/runtimes#159](https://github.com/polkadot-fellows/runtimes/pull/159)) + ## [1.1.1] 25.01.2024 ### Fixed From 4a0a1244bfbd25b571b3fa7fd2a348c9c4ef6d30 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 28 Feb 2024 10:37:20 +0100 Subject: [PATCH 209/316] Fix BridgeHubs integration tests --- .../bridges/bridge-hub-kusama/src/lib.rs | 2 +- .../src/tests/asset_transfers.rs | 19 +++++++---- .../bridge-hub-kusama/src/tests/mod.rs | 34 ++++++++----------- .../bridge-hub-kusama/src/tests/send_xcm.rs | 24 ++++++++----- .../bridge-hub-kusama/src/tests/teleport.rs | 2 +- .../bridges/bridge-hub-polkadot/src/lib.rs | 2 +- .../src/tests/asset_transfers.rs | 19 +++++++---- .../bridge-hub-polkadot/src/tests/mod.rs | 34 ++++++++----------- .../bridge-hub-polkadot/src/tests/send_xcm.rs | 24 ++++++++----- .../bridge-hub-polkadot/src/tests/teleport.rs | 2 +- 10 files changed, 86 insertions(+), 76 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/lib.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/lib.rs index 1c7d1e1682..f0a4056cb5 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/lib.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/lib.rs @@ -22,7 +22,7 @@ pub use xcm::{ latest::ParentThen, prelude::{AccountId32 as AccountId32Junction, *}, v3::{ - Error, + self, Error, NetworkId::{Kusama as KusamaId, Polkadot as PolkadotId}, }, }; diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/asset_transfers.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/asset_transfers.rs index 148c8b3ba9..49fb9aba9b 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/asset_transfers.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/asset_transfers.rs @@ -15,14 +15,14 @@ use crate::tests::*; -fn send_asset_from_asset_hub_kusama_to_asset_hub_polkadot(id: MultiLocation, amount: u128) { +fn send_asset_from_asset_hub_kusama_to_asset_hub_polkadot(id: Location, amount: u128) { let destination = asset_hub_polkadot_location(); // fund the AHK's SA on BHK for paying bridge transport fees BridgeHubKusama::fund_para_sovereign(AssetHubKusama::para_id(), 10_000_000_000_000u128); // set XCM versions - AssetHubKusama::force_xcm_version(destination, XCM_VERSION); + AssetHubKusama::force_xcm_version(destination.clone(), XCM_VERSION); BridgeHubKusama::force_xcm_version(bridge_hub_polkadot_location(), XCM_VERSION); // send message over bridge @@ -33,9 +33,9 @@ fn send_asset_from_asset_hub_kusama_to_asset_hub_polkadot(id: MultiLocation, amo #[test] fn send_ksms_from_asset_hub_kusama_to_asset_hub_polkadot() { - let ksm_at_asset_hub_kusama: MultiLocation = Parent.into(); + let ksm_at_asset_hub_kusama: v3::Location = v3::Parent.into(); let ksm_at_asset_hub_polkadot = - MultiLocation { parents: 2, interior: X1(GlobalConsensus(NetworkId::Kusama)) }; + v3::Location::new(2, [v3::Junction::GlobalConsensus(v3::NetworkId::Kusama)]); let owner: AccountId = AssetHubPolkadot::account_id_of(ALICE); AssetHubPolkadot::force_create_foreign_asset( ksm_at_asset_hub_polkadot, @@ -58,8 +58,9 @@ fn send_ksms_from_asset_hub_kusama_to_asset_hub_polkadot() { >::balance(ksm_at_asset_hub_polkadot, &AssetHubPolkadotReceiver::get()) }); + let ksm_at_asset_hub_kusama_latest: Location = ksm_at_asset_hub_kusama.try_into().unwrap(); let amount = ASSET_HUB_KUSAMA_ED * 1_000; - send_asset_from_asset_hub_kusama_to_asset_hub_polkadot(ksm_at_asset_hub_kusama, amount); + send_asset_from_asset_hub_kusama_to_asset_hub_polkadot(ksm_at_asset_hub_kusama_latest, amount); AssetHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; assert_expected_events!( @@ -99,7 +100,7 @@ fn send_ksms_from_asset_hub_kusama_to_asset_hub_polkadot() { fn send_dots_from_asset_hub_kusama_to_asset_hub_polkadot() { let prefund_amount = 10_000_000_000_000u128; let dot_at_asset_hub_kusama = - MultiLocation { parents: 2, interior: X1(GlobalConsensus(NetworkId::Polkadot)) }; + v3::Location::new(2, [v3::Junction::GlobalConsensus(v3::NetworkId::Polkadot)]); let owner: AccountId = AssetHubPolkadot::account_id_of(ALICE); AssetHubKusama::force_create_foreign_asset( dot_at_asset_hub_kusama, @@ -127,8 +128,12 @@ fn send_dots_from_asset_hub_kusama_to_asset_hub_polkadot() { let receiver_dots_before = ::account_data_of(AssetHubPolkadotReceiver::get()).free; + let dot_at_asset_hub_kusama_latest: Location = dot_at_asset_hub_kusama.try_into().unwrap(); let amount_to_send = ASSET_HUB_POLKADOT_ED * 1_000; - send_asset_from_asset_hub_kusama_to_asset_hub_polkadot(dot_at_asset_hub_kusama, amount_to_send); + send_asset_from_asset_hub_kusama_to_asset_hub_polkadot( + dot_at_asset_hub_kusama_latest.clone(), + amount_to_send, + ); AssetHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; assert_expected_events!( diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/mod.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/mod.rs index 3e3f63297c..4bd2c77fc2 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/mod.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/mod.rs @@ -19,37 +19,31 @@ mod asset_transfers; mod send_xcm; mod teleport; -pub(crate) fn asset_hub_polkadot_location() -> MultiLocation { - MultiLocation { - parents: 2, - interior: X2( - GlobalConsensus(NetworkId::Polkadot), - Parachain(AssetHubPolkadot::para_id().into()), - ), - } +pub(crate) fn asset_hub_polkadot_location() -> Location { + Location::new( + 2, + [GlobalConsensus(NetworkId::Polkadot), Parachain(AssetHubPolkadot::para_id().into())], + ) } -pub(crate) fn bridge_hub_polkadot_location() -> MultiLocation { - MultiLocation { - parents: 2, - interior: X2( - GlobalConsensus(NetworkId::Polkadot), - Parachain(BridgeHubPolkadot::para_id().into()), - ), - } +pub(crate) fn bridge_hub_polkadot_location() -> Location { + Location::new( + 2, + [GlobalConsensus(NetworkId::Polkadot), Parachain(BridgeHubPolkadot::para_id().into())], + ) } pub(crate) fn send_asset_from_asset_hub_kusama( - destination: MultiLocation, - (id, amount): (MultiLocation, u128), + destination: Location, + (id, amount): (Location, u128), ) -> DispatchResult { let signed_origin = ::RuntimeOrigin::signed(AssetHubKusamaSender::get().into()); - let beneficiary: MultiLocation = + let beneficiary: Location = AccountId32Junction { network: None, id: AssetHubPolkadotReceiver::get().into() }.into(); - let assets: MultiAssets = (id, amount).into(); + let assets: Assets = (id, amount).into(); let fee_asset_item = 0; AssetHubKusama::execute_with(|| { diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/send_xcm.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/send_xcm.rs index e1c64ef580..a700d61122 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/send_xcm.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/send_xcm.rs @@ -29,8 +29,8 @@ fn send_xcm_from_kusama_relay_to_polkadot_asset_hub_should_fail_on_not_applicabl let xcm = VersionedXcm::from(Xcm(vec![ UnpaidExecution { weight_limit, check_origin }, ExportMessage { - network: PolkadotId, - destination: X1(Parachain(AssetHubPolkadot::para_id().into())), + network: PolkadotId.into(), + destination: [Parachain(AssetHubPolkadot::para_id().into())].into(), xcm: remote_xcm, }, ])); @@ -68,7 +68,7 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { // prepare data let destination = asset_hub_polkadot_location(); - let native_token = MultiLocation::parent(); + let native_token = Location::parent(); let amount = ASSET_HUB_KUSAMA_ED * 1_000; // fund the AHK's SA on BHK for paying bridge transport fees @@ -78,7 +78,7 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { // send XCM from AssetHubKusama - fails - destination version not known assert_err!( - send_asset_from_asset_hub_kusama(destination, (native_token, amount)), + send_asset_from_asset_hub_kusama(destination.clone(), (native_token.clone(), amount)), DispatchError::Module(sp_runtime::ModuleError { index: 31, error: [1, 0, 0, 0], @@ -87,7 +87,7 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { ); // set destination version - AssetHubKusama::force_xcm_version(destination, xcm::v3::prelude::XCM_VERSION); + AssetHubKusama::force_xcm_version(destination.clone(), xcm::v3::prelude::XCM_VERSION); // TODO: remove this block, when removing `xcm:v2` { @@ -95,7 +95,7 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { // version, which does not have the `ExportMessage` instruction. If the default `2` is // changed to `3`, then this assert can go away" assert_err!( - send_asset_from_asset_hub_kusama(destination, (native_token, amount)), + send_asset_from_asset_hub_kusama(destination.clone(), (native_token.clone(), amount)), DispatchError::Module(sp_runtime::ModuleError { index: 31, error: [1, 0, 0, 0], @@ -110,7 +110,7 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { ); // send XCM from AssetHubKusama - fails - `ExportMessage` is not in `2` assert_err!( - send_asset_from_asset_hub_kusama(destination, (native_token, amount)), + send_asset_from_asset_hub_kusama(destination.clone(), (native_token.clone(), amount)), DispatchError::Module(sp_runtime::ModuleError { index: 31, error: [1, 0, 0, 0], @@ -125,7 +125,10 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { xcm::v3::prelude::XCM_VERSION, ); // send XCM from AssetHubKusama - ok - assert_ok!(send_asset_from_asset_hub_kusama(destination, (native_token, amount))); + assert_ok!(send_asset_from_asset_hub_kusama( + destination.clone(), + (native_token.clone(), amount) + )); // `ExportMessage` on local BridgeHub - fails - remote BridgeHub version not known assert_bridge_hub_kusama_message_accepted(false); @@ -142,7 +145,10 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { ); // send XCM from AssetHubKusama - ok - assert_ok!(send_asset_from_asset_hub_kusama(destination, (native_token, amount))); + assert_ok!(send_asset_from_asset_hub_kusama( + destination.clone(), + (native_token.clone(), amount) + )); assert_bridge_hub_kusama_message_accepted(true); assert_bridge_hub_polkadot_message_received(); // message delivered and processed at destination diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/teleport.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/teleport.rs index eac53a7ed2..c1aebaabfc 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/teleport.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/teleport.rs @@ -19,7 +19,7 @@ use bridge_hub_kusama_runtime::xcm_config::XcmConfig; #[test] fn teleport_to_other_system_parachains_works() { let amount = BRIDGE_HUB_KUSAMA_ED * 100; - let native_asset: MultiAssets = (Parent, amount).into(); + let native_asset: Assets = (Parent, amount).into(); test_parachain_is_trusted_teleporter!( BridgeHubKusama, // Origin diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs index 2919efed42..31eac92781 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs @@ -22,7 +22,7 @@ pub use xcm::{ latest::ParentThen, prelude::{AccountId32 as AccountId32Junction, *}, v3::{ - Error, + self, Error, NetworkId::{Kusama as KusamaId, Polkadot as PolkadotId}, }, }; diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/asset_transfers.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/asset_transfers.rs index 8c653c0900..7d6e8053fa 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/asset_transfers.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/asset_transfers.rs @@ -14,14 +14,14 @@ // limitations under the License. use crate::tests::*; -fn send_asset_from_asset_hub_polkadot_to_asset_hub_kusama(id: MultiLocation, amount: u128) { +fn send_asset_from_asset_hub_polkadot_to_asset_hub_kusama(id: Location, amount: u128) { let destination = asset_hub_kusama_location(); // fund the AHP's SA on BHP for paying bridge transport fees BridgeHubPolkadot::fund_para_sovereign(AssetHubPolkadot::para_id(), 10_000_000_000_000u128); // set XCM versions - AssetHubPolkadot::force_xcm_version(destination, XCM_VERSION); + AssetHubPolkadot::force_xcm_version(destination.clone(), XCM_VERSION); BridgeHubPolkadot::force_xcm_version(bridge_hub_kusama_location(), XCM_VERSION); // send message over bridge @@ -32,9 +32,9 @@ fn send_asset_from_asset_hub_polkadot_to_asset_hub_kusama(id: MultiLocation, amo #[test] fn send_dots_from_asset_hub_polkadot_to_asset_hub_kusama() { - let dot_at_asset_hub_polkadot: MultiLocation = Parent.into(); + let dot_at_asset_hub_polkadot: v3::Location = v3::Parent.into(); let dot_at_asset_hub_kusama = - MultiLocation { parents: 2, interior: X1(GlobalConsensus(NetworkId::Polkadot)) }; + v3::Location::new(2, [v3::Junction::GlobalConsensus(v3::NetworkId::Polkadot)]); let owner: AccountId = AssetHubKusama::account_id_of(ALICE); AssetHubKusama::force_create_foreign_asset( dot_at_asset_hub_kusama, @@ -57,8 +57,12 @@ fn send_dots_from_asset_hub_polkadot_to_asset_hub_kusama() { >::balance(dot_at_asset_hub_kusama, &AssetHubKusamaReceiver::get()) }); + let dot_at_asset_hub_polkadot_latest: Location = dot_at_asset_hub_polkadot.try_into().unwrap(); let amount = ASSET_HUB_POLKADOT_ED * 1_000; - send_asset_from_asset_hub_polkadot_to_asset_hub_kusama(dot_at_asset_hub_polkadot, amount); + send_asset_from_asset_hub_polkadot_to_asset_hub_kusama( + dot_at_asset_hub_polkadot_latest, + amount, + ); AssetHubKusama::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; assert_expected_events!( @@ -98,7 +102,7 @@ fn send_dots_from_asset_hub_polkadot_to_asset_hub_kusama() { fn send_ksms_from_asset_hub_polkadot_to_asset_hub_kusama() { let prefund_amount = 10_000_000_000_000u128; let ksm_at_asset_hub_polkadot = - MultiLocation { parents: 2, interior: X1(GlobalConsensus(NetworkId::Kusama)) }; + v3::Location::new(2, [v3::Junction::GlobalConsensus(v3::NetworkId::Kusama)]); let owner: AccountId = AssetHubPolkadot::account_id_of(ALICE); AssetHubPolkadot::force_create_foreign_asset( ksm_at_asset_hub_polkadot, @@ -126,9 +130,10 @@ fn send_ksms_from_asset_hub_polkadot_to_asset_hub_kusama() { let receiver_ksms_before = ::account_data_of(AssetHubKusamaReceiver::get()).free; + let ksm_at_asset_hub_polkadot_latest: Location = ksm_at_asset_hub_polkadot.try_into().unwrap(); let amount_to_send = ASSET_HUB_KUSAMA_ED * 1_000; send_asset_from_asset_hub_polkadot_to_asset_hub_kusama( - ksm_at_asset_hub_polkadot, + ksm_at_asset_hub_polkadot_latest, amount_to_send, ); AssetHubKusama::execute_with(|| { diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/mod.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/mod.rs index e53c1ff66a..1884e8cc2d 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/mod.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/mod.rs @@ -19,37 +19,31 @@ mod asset_transfers; mod send_xcm; mod teleport; -pub(crate) fn asset_hub_kusama_location() -> MultiLocation { - MultiLocation { - parents: 2, - interior: X2( - GlobalConsensus(NetworkId::Kusama), - Parachain(AssetHubKusama::para_id().into()), - ), - } +pub(crate) fn asset_hub_kusama_location() -> Location { + Location::new( + 2, + [GlobalConsensus(NetworkId::Kusama), Parachain(AssetHubKusama::para_id().into())], + ) } -pub(crate) fn bridge_hub_kusama_location() -> MultiLocation { - MultiLocation { - parents: 2, - interior: X2( - GlobalConsensus(NetworkId::Kusama), - Parachain(BridgeHubKusama::para_id().into()), - ), - } +pub(crate) fn bridge_hub_kusama_location() -> Location { + Location::new( + 2, + [GlobalConsensus(NetworkId::Kusama), Parachain(BridgeHubKusama::para_id().into())], + ) } pub(crate) fn send_asset_from_asset_hub_polkadot( - destination: MultiLocation, - (id, amount): (MultiLocation, u128), + destination: Location, + (id, amount): (Location, u128), ) -> DispatchResult { let signed_origin = ::RuntimeOrigin::signed(AssetHubPolkadotSender::get().into()); - let beneficiary: MultiLocation = + let beneficiary: Location = AccountId32Junction { network: None, id: AssetHubKusamaReceiver::get().into() }.into(); - let assets: MultiAssets = (id, amount).into(); + let assets: Assets = (id, amount).into(); let fee_asset_item = 0; AssetHubPolkadot::execute_with(|| { diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/send_xcm.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/send_xcm.rs index ef30c0b758..587f6f7291 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/send_xcm.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/send_xcm.rs @@ -29,8 +29,8 @@ fn send_xcm_from_polkadot_relay_to_kusama_asset_hub_should_fail_on_not_applicabl let xcm = VersionedXcm::from(Xcm(vec![ UnpaidExecution { weight_limit, check_origin }, ExportMessage { - network: KusamaId, - destination: X1(Parachain(AssetHubKusama::para_id().into())), + network: KusamaId.into(), + destination: [Parachain(AssetHubKusama::para_id().into())].into(), xcm: remote_xcm, }, ])); @@ -68,7 +68,7 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { // prepare data let destination = asset_hub_kusama_location(); - let native_token = MultiLocation::parent(); + let native_token = Location::parent(); let amount = ASSET_HUB_POLKADOT_ED * 1_000; // fund the AHK's SA on BHK for paying bridge transport fees @@ -78,7 +78,7 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { // send XCM from AssetHubPolkadot - fails - destination version not known assert_err!( - send_asset_from_asset_hub_polkadot(destination, (native_token, amount)), + send_asset_from_asset_hub_polkadot(destination.clone(), (native_token.clone(), amount)), DispatchError::Module(sp_runtime::ModuleError { index: 31, error: [1, 0, 0, 0], @@ -87,7 +87,7 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { ); // set destination version - AssetHubPolkadot::force_xcm_version(destination, xcm::v3::prelude::XCM_VERSION); + AssetHubPolkadot::force_xcm_version(destination.clone(), xcm::v3::prelude::XCM_VERSION); // TODO: remove this block, when removing `xcm:v2` { @@ -95,7 +95,7 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { // version, which does not have the `ExportMessage` instruction. If the default `2` is // changed to `3`, then this assert can go away" assert_err!( - send_asset_from_asset_hub_polkadot(destination, (native_token, amount)), + send_asset_from_asset_hub_polkadot(destination.clone(), (native_token.clone(), amount)), DispatchError::Module(sp_runtime::ModuleError { index: 31, error: [1, 0, 0, 0], @@ -110,7 +110,7 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { ); // send XCM from AssetHubPolkadot - fails - `ExportMessage` is not in `2` assert_err!( - send_asset_from_asset_hub_polkadot(destination, (native_token, amount)), + send_asset_from_asset_hub_polkadot(destination.clone(), (native_token.clone(), amount)), DispatchError::Module(sp_runtime::ModuleError { index: 31, error: [1, 0, 0, 0], @@ -125,7 +125,10 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { xcm::v3::prelude::XCM_VERSION, ); // send XCM from AssetHubPolkadot - ok - assert_ok!(send_asset_from_asset_hub_polkadot(destination, (native_token, amount))); + assert_ok!(send_asset_from_asset_hub_polkadot( + destination.clone(), + (native_token.clone(), amount) + )); // `ExportMessage` on local BridgeHub - fails - remote BridgeHub version not known assert_bridge_hub_polkadot_message_accepted(false); @@ -142,7 +145,10 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { ); // send XCM from AssetHubPolkadot - ok - assert_ok!(send_asset_from_asset_hub_polkadot(destination, (native_token, amount))); + assert_ok!(send_asset_from_asset_hub_polkadot( + destination.clone(), + (native_token.clone(), amount) + )); assert_bridge_hub_polkadot_message_accepted(true); assert_bridge_hub_kusama_message_received(); // message delivered and processed at destination diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/teleport.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/teleport.rs index eb915c3110..62ada3debc 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/teleport.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/teleport.rs @@ -19,7 +19,7 @@ use bridge_hub_polkadot_runtime::xcm_config::XcmConfig; #[test] fn teleport_to_other_system_parachains_works() { let amount = BRIDGE_HUB_POLKADOT_ED * 100; - let native_asset: MultiAssets = (Parent, amount).into(); + let native_asset: Assets = (Parent, amount).into(); test_parachain_is_trusted_teleporter!( BridgeHubPolkadot, // Origin From f8edcf66a8c248c0dea6fce88c9aa29b3be287e3 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 28 Feb 2024 11:58:26 +0100 Subject: [PATCH 210/316] Removed unnecessery tiny-keccak --- Cargo.lock | 2 -- relay/kusama/Cargo.toml | 1 - relay/polkadot/Cargo.toml | 1 - 3 files changed, 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4414f7a445..68d989cc32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10522,7 +10522,6 @@ dependencies = [ "staging-xcm-builder 8.0.0", "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", - "tiny-keccak", "tokio", ] @@ -15000,7 +14999,6 @@ dependencies = [ "staging-xcm-builder 8.0.0", "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", - "tiny-keccak", "tokio", ] diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index 8608ff4cad..e9979ae479 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -105,7 +105,6 @@ xcm-builder = { package = "staging-xcm-builder", default-features = false , vers sp-debug-derive = { default-features = false, version = "14.0.0" } [dev-dependencies] -tiny-keccak = { version = "2.0.2", features = ["keccak"] } keyring = { package = "sp-keyring", version = "32.0.0" } sp-trie = { version = "30.0.0" } separator = "0.4.1" diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index 5d246ad6bc..a8084b97d2 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -101,7 +101,6 @@ xcm-builder = { package = "staging-xcm-builder", default-features = false , vers sp-debug-derive = { default-features = false, version = "14.0.0" } [dev-dependencies] -tiny-keccak = { version = "2.0.2", features = ["keccak"] } keyring = { package = "sp-keyring", version = "32.0.0" } sp-trie = { version = "30.0.0" } serde_json = "1.0.113" From d4e71631a0118afb80c4c6636e02d90dde5b9788 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 28 Feb 2024 12:27:34 +0100 Subject: [PATCH 211/316] Removed unnecessery stuff from integration tests --- Cargo.lock | 25 ------------------- .../assets/asset-hub-kusama/Cargo.toml | 3 --- .../assets/asset-hub-polkadot/Cargo.toml | 3 --- .../bridges/bridge-hub-kusama/Cargo.toml | 3 --- .../bridges/bridge-hub-polkadot/Cargo.toml | 3 --- .../collectives-polkadot/Cargo.toml | 3 --- .../parachains/testing/penpal/Cargo.toml | 2 -- .../emulated/chains/relays/kusama/Cargo.toml | 2 -- .../chains/relays/polkadot/Cargo.toml | 1 - .../bridges/bridge-hub-kusama/Cargo.toml | 4 --- .../bridges/bridge-hub-polkadot/Cargo.toml | 1 - 11 files changed, 50 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 68d989cc32..d0e611b922 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -445,10 +445,7 @@ dependencies = [ "frame-support 29.0.0", "kusama-emulated-chain", "parachains-common 8.0.0", - "serde_json", "sp-core 29.0.0", - "sp-runtime 32.0.0", - "system-parachains-constants", ] [[package]] @@ -570,10 +567,7 @@ dependencies = [ "frame-support 29.0.0", "parachains-common 8.0.0", "polkadot-emulated-chain", - "serde_json", "sp-core 29.0.0", - "sp-runtime 32.0.0", - "system-parachains-constants", ] [[package]] @@ -1354,10 +1348,7 @@ dependencies = [ "emulated-integration-tests-common", "frame-support 29.0.0", "parachains-common 8.0.0", - "serde_json", "sp-core 29.0.0", - "sp-runtime 32.0.0", - "system-parachains-constants", ] [[package]] @@ -1369,8 +1360,6 @@ dependencies = [ "cumulus-pallet-xcmp-queue 0.8.0", "emulated-integration-tests-common", "frame-support 29.0.0", - "hex", - "hex-literal", "integration-tests-helpers", "kusama-polkadot-system-emulated-network", "kusama-system-emulated-network", @@ -1380,8 +1369,6 @@ dependencies = [ "pallet-message-queue 32.0.0", "pallet-xcm 8.0.0", "parachains-common 8.0.0", - "parity-scale-codec", - "scale-info", "sp-runtime 32.0.0", "staging-xcm 8.0.0", "staging-xcm-executor 8.0.1", @@ -1482,10 +1469,7 @@ dependencies = [ "emulated-integration-tests-common", "frame-support 29.0.0", "parachains-common 8.0.0", - "serde_json", "sp-core 29.0.0", - "sp-runtime 32.0.0", - "system-parachains-constants", ] [[package]] @@ -1505,7 +1489,6 @@ dependencies = [ "pallet-message-queue 32.0.0", "pallet-xcm 8.0.0", "parachains-common 8.0.0", - "parity-scale-codec", "sp-runtime 32.0.0", "staging-xcm 8.0.0", "staging-xcm-executor 8.0.1", @@ -2033,10 +2016,7 @@ dependencies = [ "emulated-integration-tests-common", "frame-support 29.0.0", "parachains-common 8.0.0", - "serde_json", "sp-core 29.0.0", - "sp-runtime 32.0.0", - "system-parachains-constants", ] [[package]] @@ -5414,12 +5394,10 @@ dependencies = [ "parachains-common 8.0.0", "polkadot-primitives 8.0.0", "sc-consensus-grandpa", - "serde_json", "sp-authority-discovery 27.0.0", "sp-consensus-babe 0.33.0", "sp-consensus-beefy", "sp-core 29.0.0", - "sp-runtime 32.0.0", "staging-kusama-runtime", ] @@ -9347,9 +9325,7 @@ dependencies = [ "parachains-common 8.0.0", "penpal-runtime", "polkadot-emulated-chain", - "serde_json", "sp-core 29.0.0", - "sp-runtime 32.0.0", ] [[package]] @@ -9709,7 +9685,6 @@ dependencies = [ "polkadot-runtime", "polkadot-runtime-constants", "sc-consensus-grandpa", - "serde_json", "sp-authority-discovery 27.0.0", "sp-consensus-babe 0.33.0", "sp-consensus-beefy", diff --git a/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/Cargo.toml b/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/Cargo.toml index fb9ffff319..2ffc015ad7 100644 --- a/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/Cargo.toml @@ -8,11 +8,9 @@ description = "Asset Hub Kusama emulated chain used for integration tests" publish = false [dependencies] -serde_json = "1.0.113" # Substrate sp-core = { version = "29.0.0" } -sp-runtime = { version = "32.0.0" } frame-support = { version = "29.0.0" } # Cumulus @@ -23,4 +21,3 @@ emulated-integration-tests-common = { version = "4.0.0" } # Runtimes asset-hub-kusama-runtime = { path = "../../../../../../system-parachains/asset-hubs/asset-hub-kusama" } kusama-emulated-chain = { path = "../../../relays/kusama" } -system-parachains-constants = { path = "../../../../../../system-parachains/constants" } diff --git a/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/Cargo.toml index dbc771990d..8d1c0ed500 100644 --- a/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/Cargo.toml @@ -8,11 +8,9 @@ description = "Asset Hub Polkadot emulated chain used for integration tests" publish = false [dependencies] -serde_json = "1.0.113" # Substrate sp-core = { version = "29.0.0" } -sp-runtime = { version = "32.0.0" } frame-support = { version = "29.0.0" } # Cumulus @@ -23,4 +21,3 @@ emulated-integration-tests-common = { version = "4.0.0" } # Runtimes asset-hub-polkadot-runtime = { path = "../../../../../../system-parachains/asset-hubs/asset-hub-polkadot" } polkadot-emulated-chain = { path = "../../../relays/polkadot" } -system-parachains-constants = { path = "../../../../../../system-parachains/constants" } diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml index 4a7ed74ea6..089dfe898c 100644 --- a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml @@ -8,11 +8,9 @@ description = "Bridge Hub Kusama emulated chain used for integration tests" publish = false [dependencies] -serde_json = "1.0.113" # Substrate sp-core = { version = "29.0.0" } -sp-runtime = { version = "32.0.0" } frame-support = { version = "29.0.0" } # Cumulus @@ -22,4 +20,3 @@ emulated-integration-tests-common = { version = "4.0.0" } # Runtimes bridge-hub-kusama-runtime = { path = "../../../../../../system-parachains/bridge-hubs/bridge-hub-kusama" } -system-parachains-constants = { path = "../../../../../../system-parachains/constants" } diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/Cargo.toml b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/Cargo.toml index 7efbc7c821..b9ff11a527 100644 --- a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/Cargo.toml @@ -8,11 +8,9 @@ description = "Bridge Hub Polkadot emulated chain used for integration tests" publish = false [dependencies] -serde_json = "1.0.113" # Substrate sp-core = { version = "29.0.0" } -sp-runtime = { version = "32.0.0" } frame-support = { version = "29.0.0" } # Cumulus @@ -22,4 +20,3 @@ emulated-integration-tests-common = { version = "4.0.0" } # Runtimes bridge-hub-polkadot-runtime = { path = "../../../../../../system-parachains/bridge-hubs/bridge-hub-polkadot" } -system-parachains-constants = { path = "../../../../../../system-parachains/constants" } diff --git a/integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/Cargo.toml b/integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/Cargo.toml index ce21bc5075..2d70aa570b 100644 --- a/integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/Cargo.toml @@ -8,11 +8,9 @@ description = "Collectives Polkadot emulated chain used for integration tests" publish = false [dependencies] -serde_json = "1.0.113" # Substrate sp-core = { version = "29.0.0" } -sp-runtime = { version = "32.0.0" } frame-support = { version = "29.0.0" } # Cumulus @@ -22,4 +20,3 @@ emulated-integration-tests-common = { version = "4.0.0" } # Runtimes collectives-polkadot-runtime = { path = "../../../../../../system-parachains/collectives/collectives-polkadot" } -system-parachains-constants = { path = "../../../../../../system-parachains/constants" } diff --git a/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml b/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml index d7db331ffc..63f26d7552 100644 --- a/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml @@ -8,11 +8,9 @@ description = "Penpal emulated chain used for integration tests" publish = false [dependencies] -serde_json = "1.0.113" # Substrate sp-core = { version = "29.0.0" } -sp-runtime = { version = "32.0.0" } frame-support = { version = "29.0.0" } # Cumulus diff --git a/integration-tests/emulated/chains/relays/kusama/Cargo.toml b/integration-tests/emulated/chains/relays/kusama/Cargo.toml index 7975a7944f..0caba1eda9 100644 --- a/integration-tests/emulated/chains/relays/kusama/Cargo.toml +++ b/integration-tests/emulated/chains/relays/kusama/Cargo.toml @@ -8,11 +8,9 @@ description = "Kusama emulated chain used for integration tests" publish = false [dependencies] -serde_json = "1.0.113" # Substrate sp-core = { version = "29.0.0" } -sp-runtime = { version = "32.0.0" } authority-discovery-primitives = { package = "sp-authority-discovery", version = "27.0.0" } babe-primitives = { package = "sp-consensus-babe", version = "0.33.0" } beefy-primitives = { package = "sp-consensus-beefy", version = "14.0.0" } diff --git a/integration-tests/emulated/chains/relays/polkadot/Cargo.toml b/integration-tests/emulated/chains/relays/polkadot/Cargo.toml index 406bff2432..2ad9fc1dce 100644 --- a/integration-tests/emulated/chains/relays/polkadot/Cargo.toml +++ b/integration-tests/emulated/chains/relays/polkadot/Cargo.toml @@ -8,7 +8,6 @@ description = "Polkadot emulated chain used for integration tests" publish = false [dependencies] -serde_json = "1.0.113" # Substrate sp-core = { version = "29.0.0" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml index 717b0f6dc5..66af41fbff 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml @@ -8,10 +8,6 @@ description = "Bridge Hub Kusama runtime integration tests with xcm-emulator" publish = false [dependencies] -codec = { package = "parity-scale-codec", version = "3.6.9" } -scale-info = { version = "2.10.0", features = ["derive"] } -hex = "0.4.3" -hex-literal = "0.4.1" # Substrate sp-runtime = { version = "32.0.0" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml index 4a0fa10827..07a87e6e12 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml @@ -8,7 +8,6 @@ description = "Bridge Hub Polkadot runtime integration tests with xcm-emulator" publish = false [dependencies] -codec = { package = "parity-scale-codec", version = "3.6.9" } # Substrate sp-runtime = { version = "32.0.0" } From fa89aad2dea8d6586af603c57223b0a04d05733a Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Wed, 28 Feb 2024 13:43:05 +0200 Subject: [PATCH 212/316] add comment --- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 4 ++++ system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 9e3301353d..1a1965eac4 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -352,6 +352,10 @@ parameter_types! { impl pallet_message_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_message_queue::WeightInfo; + // Use the NoopMessageProcessor exclusively for benchmarks, not for tests with the + // runtime-benchmarks feature as tests require the BridgeHubMessageRouter to process messages. + // The "test" feature flag doesn't work, hence the reliance on the "std" feature, which is + // enabled during tests. #[cfg(all(not(feature = "std"), feature = "runtime-benchmarks"))] type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 43ac4e40b4..a0579dc819 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -353,6 +353,10 @@ parameter_types! { impl pallet_message_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_message_queue::WeightInfo; + // Use the NoopMessageProcessor exclusively for benchmarks, not for tests with the + // runtime-benchmarks feature as tests require the BridgeHubMessageRouter to process messages. + // The "test" feature flag doesn't work, hence the reliance on the "std" feature, which is + // enabled during tests. #[cfg(all(not(feature = "std"), feature = "runtime-benchmarks"))] type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; From 82eb0f4361c16a38029ce0811f450a973fc20a8f Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Wed, 28 Feb 2024 13:46:39 +0200 Subject: [PATCH 213/316] update cargo lock --- Cargo.lock | 864 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 839 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d0e611b922..5f17ab8ca6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -110,6 +110,77 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +[[package]] +name = "alloy-primitives" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0628ec0ba5b98b3370bb6be17b12f23bfce8ee4ad83823325a20546d9b03b78" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "proptest", + "rand", + "ruint", + "serde", + "tiny-keccak", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" +dependencies = [ + "alloy-rlp-derive", + "arrayvec 0.7.4", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a98ad1696a2e17f010ae8e43e9f2a1e930ed176a8e3ff77acfeff6dfb07b42c" +dependencies = [ + "const-hex", + "dunce", + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.48", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-types" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98d7107bed88e8f09f0ddcc3335622d87bfb6821f3e0c7473329fb1cfad5e015" +dependencies = [ + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + [[package]] name = "always-assert" version = "0.1.3" @@ -238,8 +309,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" dependencies = [ "ark-ec", - "ark-ff", - "ark-std", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -249,9 +320,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" dependencies = [ "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -260,10 +331,10 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" dependencies = [ - "ark-ff", + "ark-ff 0.4.2", "ark-poly", - "ark-serialize", - "ark-std", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", "itertools 0.10.5", @@ -271,16 +342,34 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + [[package]] name = "ark-ff" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "digest 0.10.7", "itertools 0.10.5", @@ -291,6 +380,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-asm" version = "0.4.2" @@ -301,6 +400,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-macros" version = "0.4.2" @@ -320,13 +431,23 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", ] +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + [[package]] name = "ark-serialize" version = "0.4.2" @@ -334,7 +455,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ "ark-serialize-derive", - "ark-std", + "ark-std 0.4.0", "digest 0.10.7", "num-bigint", ] @@ -350,6 +471,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand", +] + [[package]] name = "ark-std" version = "0.4.0" @@ -534,6 +665,7 @@ dependencies = [ "polkadot-runtime-constants", "primitive-types", "scale-info", + "snowbridge-router-primitives", "sp-api 27.0.0", "sp-block-builder 27.0.0", "sp-consensus-aura 0.33.0", @@ -654,6 +786,7 @@ dependencies = [ "polkadot-runtime-common 8.0.0", "polkadot-runtime-constants", "scale-info", + "snowbridge-router-primitives", "sp-api 27.0.0", "sp-block-builder 27.0.0", "sp-consensus-aura 0.33.0", @@ -805,6 +938,17 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -918,6 +1062,21 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitcoin_hashes" version = "0.11.0" @@ -1339,6 +1498,24 @@ dependencies = [ "sp-runtime 32.0.0", ] +[[package]] +name = "bridge-hub-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e69c25ec3db0ef22ae409cc60f5c42364124264ce6640e17dbcfc0280e4b5dd9" +dependencies = [ + "cumulus-primitives-core 0.8.0", + "frame-support 29.0.0", + "pallet-message-queue 32.0.0", + "parity-scale-codec", + "scale-info", + "snowbridge-core", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-std", + "staging-xcm 8.0.0", +] + [[package]] name = "bridge-hub-kusama-emulated-chain" version = "1.0.0" @@ -1390,6 +1567,7 @@ dependencies = [ "bp-polkadot-core", "bp-relayers", "bp-runtime", + "bridge-hub-common", "bridge-hub-test-utils", "bridge-runtime-common", "cumulus-pallet-aura-ext 0.8.0", @@ -1429,6 +1607,7 @@ dependencies = [ "pallet-xcm-benchmarks 8.0.1", "pallet-xcm-bridge-hub", "parachains-common 8.0.0", + "parachains-runtimes-test-utils", "parity-scale-codec", "polkadot-core-primitives 8.0.0", "polkadot-parachain-primitives 7.0.0", @@ -1436,6 +1615,18 @@ dependencies = [ "polkadot-runtime-constants", "scale-info", "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-ethereum-client-fixtures", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-runtime-common", + "snowbridge-runtime-test-common", + "snowbridge-system-runtime-api", "sp-api 27.0.0", "sp-block-builder 27.0.0", "sp-consensus-aura 0.33.0", @@ -1510,6 +1701,7 @@ dependencies = [ "bp-polkadot-core", "bp-relayers", "bp-runtime", + "bridge-hub-common", "bridge-hub-test-utils", "bridge-runtime-common", "cumulus-pallet-aura-ext 0.8.0", @@ -1549,6 +1741,7 @@ dependencies = [ "pallet-xcm-benchmarks 8.0.1", "pallet-xcm-bridge-hub", "parachains-common 8.0.0", + "parachains-runtimes-test-utils", "parity-scale-codec", "polkadot-core-primitives 8.0.0", "polkadot-parachain-primitives 7.0.0", @@ -1556,6 +1749,18 @@ dependencies = [ "polkadot-runtime-constants", "scale-info", "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-ethereum-client-fixtures", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-runtime-common", + "snowbridge-runtime-test-common", + "snowbridge-system-runtime-api", "sp-api 27.0.0", "sp-block-builder 27.0.0", "sp-consensus-aura 0.33.0", @@ -2137,6 +2342,19 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "const-hex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efbd12d49ab0eaf8193ba9175e45f56bbc2e4b27d57b8cfe62aa47942a46b9a9" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + [[package]] name = "const-oid" version = "0.9.5" @@ -3185,6 +3403,12 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + [[package]] name = "dyn-clonable" version = "0.9.0" @@ -3579,6 +3803,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "ethabi-decode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d398648d65820a727d6a81e58b962f874473396a047e4c30bafe3240953417" +dependencies = [ + "ethereum-types", + "tiny-keccak", +] + [[package]] name = "ethbloom" version = "0.13.0" @@ -3587,8 +3821,10 @@ checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", + "scale-info", "tiny-keccak", ] @@ -3600,9 +3836,11 @@ checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ "ethbloom", "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", "primitive-types", + "scale-info", "uint", ] @@ -3685,6 +3923,17 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec 0.7.4", + "auto_impl", + "bytes", +] + [[package]] name = "fatality" version = "0.0.6" @@ -9135,6 +9384,12 @@ dependencies = [ "substrate-wasm-builder 18.0.0", ] +[[package]] +name = "parity-bytes" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b56e3a2420138bdb970f84dfb9c774aea80fa0e7371549eedec0d80c209c67" + [[package]] name = "parity-db" version = "0.4.13" @@ -11157,6 +11412,26 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.4.1", + "lazy_static", + "num-traits", + "rand", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax 0.8.2", + "rusty-fork", + "tempfile", + "unarray", +] + [[package]] name = "prost" version = "0.11.9" @@ -11383,6 +11658,15 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -11692,6 +11976,36 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ruint" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b1d9521f889713d1221270fdd63370feca7e5c71a18745343402fa86e4f04f" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -11719,6 +12033,15 @@ dependencies = [ "semver 0.9.0", ] +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + [[package]] name = "rustc_version" version = "0.4.0" @@ -11825,6 +12148,18 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -13202,7 +13537,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", ] [[package]] @@ -13211,7 +13546,16 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser 0.10.2", ] [[package]] @@ -13229,6 +13573,15 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + [[package]] name = "separator" version = "0.4.1" @@ -13244,6 +13597,15 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-big-array" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd31f59f6fe2b0c055371bb2f16d7f0aa7d8881676c04a55b1596d1a17cd10a4" +dependencies = [ + "serde", +] + [[package]] name = "serde_bytes" version = "0.11.14" @@ -13493,13 +13855,414 @@ dependencies = [ ] [[package]] -name = "socket2" -version = "0.4.10" +name = "snowbridge-amcl" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +checksum = "460a9ed63cdf03c1b9847e8a12a5f5ba19c4efd5869e4a737e05be25d7c427e5" dependencies = [ - "libc", - "winapi", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "snowbridge-beacon-primitives" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a73ef707257064bc4ecce8323cdb7c30e8ecd1ce74aa89a6e82e81fa8b9970" +dependencies = [ + "byte-slice-cast", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex", + "parity-scale-codec", + "rlp", + "scale-info", + "serde", + "snowbridge-ethereum", + "snowbridge-milagro-bls", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std", + "ssz_rs", + "ssz_rs_derive", + "static_assertions", +] + +[[package]] +name = "snowbridge-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d3615664be8525d6f23e42dce1c314abc7f961a7f862b74012444e16d5dde5c" +dependencies = [ + "ethabi-decode", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "parity-scale-codec", + "polkadot-parachain-primitives 7.0.0", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", +] + +[[package]] +name = "snowbridge-ethereum" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "315ad74f081734cb51f48bb10cd18a3f83cfec3c09a551bc936027708635e808" +dependencies = [ + "ethabi-decode", + "ethbloom", + "ethereum-types", + "hex-literal", + "parity-bytes", + "parity-scale-codec", + "rlp", + "rustc-hex", + "scale-info", + "serde", + "serde-big-array", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std", +] + +[[package]] +name = "snowbridge-milagro-bls" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "026aa8638f690a53e3f7676024b9e913b1cab0111d1b7b92669d40a188f9d7e6" +dependencies = [ + "hex", + "lazy_static", + "parity-scale-codec", + "rand", + "scale-info", + "snowbridge-amcl", + "zeroize", +] + +[[package]] +name = "snowbridge-outbound-queue-merkle-tree" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5382cf77aeb8a92a142751949cdea1f230b7864e1ea687352c28439faabcf69d" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core 29.0.0", + "sp-runtime 32.0.0", +] + +[[package]] +name = "snowbridge-outbound-queue-runtime-api" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4933810488df1660cf60f53a7952ce1dff6aaef72d9fc740e1274e937136444e" +dependencies = [ + "frame-support 29.0.0", + "parity-scale-codec", + "snowbridge-core", + "snowbridge-outbound-queue-merkle-tree", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-std", + "staging-xcm 8.0.0", +] + +[[package]] +name = "snowbridge-pallet-ethereum-client" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0fd437cd5db8b7d16cdd4da110d674d245532afa31df10108a11858a07844a6" +dependencies = [ + "bp-runtime", + "byte-slice-cast", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "log", + "pallet-timestamp 28.0.0", + "parity-scale-codec", + "rlp", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-ethereum", + "snowbridge-pallet-ethereum-client-fixtures", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std", + "ssz_rs", + "ssz_rs_derive", + "static_assertions", +] + +[[package]] +name = "snowbridge-pallet-ethereum-client-fixtures" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3d5b4b7e17eaadbc52ac3fc9fbcce63dfc60c05a1b19604cd009d6595c1175e" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "snowbridge-beacon-primitives", + "snowbridge-core", + "sp-core 29.0.0", + "sp-std", +] + +[[package]] +name = "snowbridge-pallet-inbound-queue" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79c1fbfd32dbba082a9312c02c3ef35de929741f78f48e88b7668909350ef9e2" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "log", + "num-traits", + "pallet-balances 29.0.0", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-ethereum", + "snowbridge-pallet-inbound-queue-fixtures", + "snowbridge-router-primitives", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.1", +] + +[[package]] +name = "snowbridge-pallet-inbound-queue-fixtures" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d8fff63b0a64d1dd06571ad074e664594bd9392481cd3489edde36e1d2dcc96" +dependencies = [ + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "snowbridge-beacon-primitives", + "snowbridge-core", + "sp-core 29.0.0", + "sp-std", +] + +[[package]] +name = "snowbridge-pallet-outbound-queue" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c7498ba5bc2b15e1d032b3e44659cd117cad24eab457a40dc5e17acfaac0aff" +dependencies = [ + "bridge-hub-common", + "ethabi-decode", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-core", + "snowbridge-outbound-queue-merkle-tree", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std", + "staging-xcm 8.0.0", +] + +[[package]] +name = "snowbridge-pallet-system" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6a410d9312bdcc3ba5944abb7d21f6b25065b32c7f8b39b9c7a4b0bd0dacfb4" +dependencies = [ + "ethabi-decode", + "frame-benchmarking 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "scale-info", + "snowbridge-core", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.1", +] + +[[package]] +name = "snowbridge-router-primitives" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee5cc8e156f033971c5435676be92ab6f70a926b3497ca9c28c0dde9697b8da9" +dependencies = [ + "ethabi-decode", + "frame-support 29.0.0", + "frame-system 29.0.0", + "hex-literal", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-core", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-std", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.1", +] + +[[package]] +name = "snowbridge-runtime-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d751007be1c9c68b075b0b1f9b02c25a02f458903a2c7893ba6e4231a00c24a" +dependencies = [ + "frame-support 29.0.0", + "frame-system 29.0.0", + "log", + "parity-scale-codec", + "snowbridge-core", + "sp-arithmetic 24.0.0", + "sp-std", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.1", +] + +[[package]] +name = "snowbridge-runtime-test-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bce50af98162e76b5ae50a2beb215bcde2a199eb5ea579ba4752b91278e655b1" +dependencies = [ + "assets-common", + "cumulus-pallet-aura-ext 0.8.0", + "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-xcm 0.8.0", + "cumulus-pallet-xcmp-queue 0.8.0", + "cumulus-primitives-core 0.8.0", + "cumulus-primitives-utility 0.8.0", + "frame-benchmarking 29.0.0", + "frame-executive 29.0.0", + "frame-support 29.0.0", + "frame-system 29.0.0", + "frame-system-benchmarking 29.0.0", + "frame-system-rpc-runtime-api 27.0.0", + "frame-try-runtime 0.35.0", + "hex-literal", + "log", + "pallet-aura 28.0.0", + "pallet-authorship 29.0.0", + "pallet-balances 29.0.0", + "pallet-collator-selection 10.0.0", + "pallet-message-queue 32.0.0", + "pallet-multisig", + "pallet-session 29.0.0", + "pallet-timestamp 28.0.0", + "pallet-transaction-payment 29.0.0", + "pallet-transaction-payment-rpc-runtime-api 29.0.0", + "pallet-utility 29.0.0", + "pallet-xcm 8.0.0", + "pallet-xcm-benchmarks 8.0.1", + "parachains-common 8.0.0", + "parachains-runtimes-test-utils", + "parity-scale-codec", + "polkadot-core-primitives 8.0.0", + "polkadot-parachain-primitives 7.0.0", + "polkadot-runtime-common 8.0.0", + "scale-info", + "serde", + "smallvec", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-ethereum-client-fixtures", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-system-runtime-api", + "sp-api 27.0.0", + "sp-block-builder 27.0.0", + "sp-consensus-aura 0.33.0", + "sp-core 29.0.0", + "sp-genesis-builder 0.8.0", + "sp-inherents 27.0.0", + "sp-io 31.0.0", + "sp-keyring", + "sp-offchain 27.0.0", + "sp-runtime 32.0.0", + "sp-session 28.0.0", + "sp-std", + "sp-storage 20.0.0", + "sp-transaction-pool 27.0.0", + "sp-version 30.0.0", + "staging-parachain-info 0.8.0", + "staging-xcm 8.0.0", + "staging-xcm-builder 8.0.0", + "staging-xcm-executor 8.0.1", +] + +[[package]] +name = "snowbridge-system-runtime-api" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5c3c4e6e87b76ae1f9639bbc1528e1ae4e5a8d6a16d02d8d48e56d4a89f4ca" +dependencies = [ + "parity-scale-codec", + "snowbridge-core", + "sp-api 27.0.0", + "sp-core 29.0.0", + "sp-std", + "staging-xcm 8.0.0", +] + +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", ] [[package]] @@ -14869,6 +15632,29 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "ssz_rs" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "057291e5631f280978fa9c8009390663ca4613359fc1318e36a8c24c392f6d1f" +dependencies = [ + "bitvec", + "num-bigint", + "sha2 0.9.9", + "ssz_rs_derive", +] + +[[package]] +name = "ssz_rs_derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f07d54c4d01a1713eb363b55ba51595da15f6f1211435b71466460da022aa140" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -15412,6 +16198,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn-solidity" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b837ef12ab88835251726eb12237655e61ec8dc8a280085d1961cdc3dfd047" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "synstructure" version = "0.12.6" @@ -15457,6 +16255,7 @@ dependencies = [ "polkadot-runtime-constants", "smallvec", "sp-runtime 32.0.0", + "staging-xcm 8.0.0", ] [[package]] @@ -16083,6 +16882,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + [[package]] name = "unicode-bidi" version = "0.3.14" @@ -16200,8 +17005,8 @@ dependencies = [ "ark-bls12-377", "ark-bls12-381", "ark-ec", - "ark-ff", - "ark-serialize", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", "ark-serialize-derive", "arrayref", "constcat", @@ -16215,6 +17020,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + [[package]] name = "walkdir" version = "2.4.0" From 68441dce179603ace2ca1fb6ea41511451d624af Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Wed, 28 Feb 2024 13:50:59 +0200 Subject: [PATCH 214/316] 1.7 updates --- docs/removing-migrations.md | 2 +- relay/kusama/src/lib.rs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/removing-migrations.md b/docs/removing-migrations.md index 67e81a6b43..43a3812c6a 100644 --- a/docs/removing-migrations.md +++ b/docs/removing-migrations.md @@ -16,7 +16,7 @@ For some chain runtime `spec_version: a_bcd_efg,` (e.g. `spec_version: 1_000_001 2. Check-out **the released** code: `git checkout vX.Y.Z`, - This is required to make sure you are not accidentally removing yet unreleased migrations (PRs merged between `X.Y.Z` release and when you are doing this). 3. Create patch with your changes: `git diff --patch > remove-migrations.patch`, -4. Now `git checkout main` and apply your patch `git am -3 remove-migrations.patch`, +4. Now `git checkout main` and apply your patch `git am -3 remove-migrations.patch` or `git apply -3 remove-migrations.patch`, - thus ensuring you are not removing any migrations merged to main after the release. 5. `git checkout -b `, `git push --set-upstream origin `, then open PR. diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 7548ecc51e..df98d9dd03 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1737,8 +1737,6 @@ pub mod migrations { /// Unreleased migrations. Add new ones here: pub type Unreleased = ( - pallet_nomination_pools::migration::versioned::V5toV6, - pallet_nomination_pools::migration::versioned::V6ToV7, pallet_nomination_pools::migration::versioned::V7ToV8, pallet_staking::migrations::v14::MigrateToV14, parachains_configuration::migration::v10::MigrateToV10, From dd2ee7a29c8b3d49c38f743e451a7659dedfad31 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Wed, 28 Feb 2024 13:54:51 +0200 Subject: [PATCH 215/316] space --- docs/removing-migrations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/removing-migrations.md b/docs/removing-migrations.md index 43a3812c6a..e3b0dc3a6f 100644 --- a/docs/removing-migrations.md +++ b/docs/removing-migrations.md @@ -22,4 +22,4 @@ For some chain runtime `spec_version: a_bcd_efg,` (e.g. `spec_version: 1_000_001 ## Automation -Currently, all of the above is done manually, but (at least parts of) it could be automated. Prerequisites can definitely be automated, so could the branches/patches dance. Code changes would easily be done manually and that's it. +Currently, all of the above is done manually, but (at least parts of) it could be automated. Prerequisites can definitely be automated, so could the branches/patches dance. Code changes would easily be done manually and that's it. \ No newline at end of file From a846ceba7c0ce8981425bf41cf4ffa40a1667a62 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 28 Feb 2024 13:04:29 +0100 Subject: [PATCH 216/316] CHangelog + Encointer fix --- CHANGELOG.md | 1 + system-parachains/encointer/Cargo.toml | 10 ++++++---- system-parachains/encointer/src/lib.rs | 3 --- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca331bdf94..5792dcbb86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Upgrade dependencies to the [polkadot-sdk@1.5.0](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.5.0) release ([polkadot-fellows/runtimes#137](https://github.com/polkadot-fellows/runtimes/pull/137)) - Upgrade dependencies to the [polkadot-sdk@1.6.0](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.6.0) release ([polkadot-fellows/runtimes#159](https://github.com/polkadot-fellows/runtimes/pull/159)) +- Upgrade dependencies to the [polkadot-sdk@1.7.0](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.7.0) release ([polkadot-fellows/runtimes#187](https://github.com/polkadot-fellows/runtimes/pull/187)) ## [1.1.1] 25.01.2024 diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml index b65489981c..c54c555759 100644 --- a/system-parachains/encointer/Cargo.toml +++ b/system-parachains/encointer/Cargo.toml @@ -89,17 +89,19 @@ cumulus-primitives-core = { default-features = false, version = "0.7.0" } cumulus-primitives-utility = { default-features = false, version = "0.7.0" } parachain-info = { package = "staging-parachain-info", default-features = false, version = "0.7.0" } parachains-common = { default-features = false, version = "7.0.0" } -system-parachains-constants = { path = "../constants", default-features = false } polkadot-core-primitives = { default-features = false, version = "7.0.0" } polkadot-primitives = { default-features = false, version = "7.0.0" } -# Used for runtime benchmarking - [build-dependencies] substrate-wasm-builder = { optional = true, version = "17.0.0" } [dev-dependencies] -kusama-runtime-constants = { path = "../../relay/kusama/constants", default-features = false } +# The Encointer pallets might not have compatible versions of `polkadot-sdk` with the rest of the system parachains, +# so we need to copy all the contents from `system-parachains-constants` and `kusama-runtime-constants`. +# We use these crates only for testing to ensure compatible values. +# NOTE: Do not add this to the `[dependencies]` +kusama-runtime-constants = { path = "../../relay/kusama/constants" } +system-parachains-constants = { path = "../constants" } [features] default = ["std"] diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 1535d6059a..185523b5b2 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -341,9 +341,6 @@ parameter_types! { pub const Burn: Permill = Permill::from_percent(1); pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); pub const PayoutSpendPeriod: BlockNumber = 30 * DAYS; - // The asset's interior location for the paying account. This is the Treasury - // pallet instance (which sits at index 18). - pub TreasuryInteriorMultiLocation: InteriorMultiLocation = PalletInstance(ENCOINTER_TREASURY_PALLET_ID).into(); pub const MaxApprovals: u32 = 10; pub TreasuryAccount: AccountId = Treasury::account_id(); } From 8450968a8ec83720d4e17fd420756fd1e2cb689a Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 28 Feb 2024 13:05:51 +0100 Subject: [PATCH 217/316] fmt --- system-parachains/encointer/src/lib.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 185523b5b2..7b89827999 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -100,10 +100,7 @@ use system_parachains_constants::{ SLOT_DURATION, }; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; -use xcm::{ - latest::{BodyId, InteriorMultiLocation, Junction::PalletInstance}, - v3::AssetId as XcmAssetId, -}; +use xcm::{latest::BodyId, v3::AssetId as XcmAssetId}; use xcm_config::{KsmLocation, XcmOriginToTransactDispatchOrigin}; From 16521a7da79a9e7069cb1856b8997a19e23b9102 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 28 Feb 2024 15:17:05 +0100 Subject: [PATCH 218/316] [pallet_xcm] Apply patch for benchmarks https://github.com/paritytech/polkadot-sdk/pull/3465 --- Cargo.lock | 195 +++++++++--------- integration-tests/emulated/helpers/Cargo.toml | 2 +- .../tests/assets/asset-hub-kusama/Cargo.toml | 4 +- .../assets/asset-hub-polkadot/Cargo.toml | 6 +- .../bridges/bridge-hub-kusama/Cargo.toml | 2 +- .../bridges/bridge-hub-polkadot/Cargo.toml | 2 +- relay/kusama/Cargo.toml | 8 +- relay/kusama/constants/Cargo.toml | 4 +- relay/kusama/src/lib.rs | 42 ++-- relay/polkadot/Cargo.toml | 8 +- relay/polkadot/constants/Cargo.toml | 4 +- relay/polkadot/src/lib.rs | 42 ++-- .../asset-hubs/asset-hub-kusama/Cargo.toml | 12 +- .../asset-hubs/asset-hub-kusama/src/lib.rs | 36 ++-- .../asset-hubs/asset-hub-polkadot/Cargo.toml | 12 +- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 36 ++-- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 12 +- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 20 +- .../bridge-hub-polkadot/Cargo.toml | 12 +- .../bridge-hub-polkadot/src/lib.rs | 20 +- .../collectives-polkadot/Cargo.toml | 10 +- .../collectives-polkadot/src/lib.rs | 13 ++ .../gluttons/glutton-kusama/Cargo.toml | 4 +- 23 files changed, 295 insertions(+), 211 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d0e611b922..496a1d0aa6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -455,7 +455,7 @@ dependencies = [ "assert_matches", "asset-hub-kusama-runtime", "asset-test-utils", - "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-parachain-system 0.8.1", "emulated-integration-tests-common", "frame-support 29.0.0", "integration-tests-helpers", @@ -464,7 +464,7 @@ dependencies = [ "pallet-assets 30.0.0", "pallet-balances 29.0.0", "pallet-message-queue 32.0.0", - "pallet-xcm 8.0.0", + "pallet-xcm 8.0.1", "parachains-common 8.0.0", "parity-scale-codec", "sp-runtime 32.0.0", @@ -486,12 +486,12 @@ dependencies = [ "bp-bridge-hub-polkadot", "cumulus-pallet-aura-ext 0.8.0", "cumulus-pallet-dmp-queue 0.8.0", - "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-parachain-system 0.8.1", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm 0.8.0", "cumulus-pallet-xcmp-queue 0.8.0", "cumulus-primitives-core 0.8.0", - "cumulus-primitives-utility 0.8.0", + "cumulus-primitives-utility 0.8.1", "frame-benchmarking 29.0.0", "frame-executive 29.0.0", "frame-support 29.0.0", @@ -522,15 +522,15 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api 29.0.0", "pallet-uniques", "pallet-utility 29.0.0", - "pallet-xcm 8.0.0", - "pallet-xcm-benchmarks 8.0.1", + "pallet-xcm 8.0.1", + "pallet-xcm-benchmarks 8.0.2", "pallet-xcm-bridge-hub-router", "parachains-common 8.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", "polkadot-core-primitives 8.0.0", "polkadot-parachain-primitives 7.0.0", - "polkadot-runtime-common 8.0.0", + "polkadot-runtime-common 8.0.1", "polkadot-runtime-constants", "primitive-types", "scale-info", @@ -551,7 +551,7 @@ dependencies = [ "sp-weights 28.0.0", "staging-parachain-info 0.8.0", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", "system-parachains-constants", @@ -577,7 +577,7 @@ dependencies = [ "assert_matches", "asset-hub-polkadot-runtime", "asset-test-utils", - "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-parachain-system 0.8.1", "cumulus-pallet-xcmp-queue 0.8.0", "emulated-integration-tests-common", "frame-support 29.0.0", @@ -586,11 +586,11 @@ dependencies = [ "pallet-balances 29.0.0", "pallet-message-queue 32.0.0", "pallet-treasury 28.0.0", - "pallet-xcm 8.0.0", + "pallet-xcm 8.0.1", "parachains-common 8.0.0", "parity-scale-codec", "polkadot-runtime", - "polkadot-runtime-common 8.0.0", + "polkadot-runtime-common 8.0.1", "polkadot-system-emulated-network", "sp-runtime 32.0.0", "staging-xcm 8.0.0", @@ -610,12 +610,12 @@ dependencies = [ "bp-bridge-hub-polkadot", "cumulus-pallet-aura-ext 0.8.0", "cumulus-pallet-dmp-queue 0.8.0", - "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-parachain-system 0.8.1", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm 0.8.0", "cumulus-pallet-xcmp-queue 0.8.0", "cumulus-primitives-core 0.8.0", - "cumulus-primitives-utility 0.8.0", + "cumulus-primitives-utility 0.8.1", "frame-benchmarking 29.0.0", "frame-executive 29.0.0", "frame-support 29.0.0", @@ -643,15 +643,15 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api 29.0.0", "pallet-uniques", "pallet-utility 29.0.0", - "pallet-xcm 8.0.0", - "pallet-xcm-benchmarks 8.0.1", + "pallet-xcm 8.0.1", + "pallet-xcm-benchmarks 8.0.2", "pallet-xcm-bridge-hub-router", "parachains-common 8.0.0", "parachains-runtimes-test-utils", "parity-scale-codec", "polkadot-core-primitives 8.0.0", "polkadot-parachain-primitives 7.0.0", - "polkadot-runtime-common 8.0.0", + "polkadot-runtime-common 8.0.1", "polkadot-runtime-constants", "scale-info", "sp-api 27.0.0", @@ -671,7 +671,7 @@ dependencies = [ "sp-weights 28.0.0", "staging-parachain-info 0.8.0", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", "system-parachains-constants", @@ -683,7 +683,7 @@ version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d78501ca6b4c848efe233672124ebab9293d8efefc44a728d70f3245a8ef595" dependencies = [ - "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-parachain-system 0.8.1", "cumulus-pallet-xcmp-queue 0.8.0", "cumulus-primitives-core 0.8.0", "frame-support 29.0.0", @@ -692,7 +692,7 @@ dependencies = [ "pallet-balances 29.0.0", "pallet-collator-selection 10.0.0", "pallet-session 29.0.0", - "pallet-xcm 8.0.0", + "pallet-xcm 8.0.1", "pallet-xcm-bridge-hub-router", "parachains-common 8.0.0", "parachains-runtimes-test-utils", @@ -702,7 +702,7 @@ dependencies = [ "sp-std", "staging-parachain-info 0.8.0", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", ] @@ -718,7 +718,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "pallet-asset-conversion", - "pallet-xcm 8.0.0", + "pallet-xcm 8.0.1", "parachains-common 8.0.0", "parity-scale-codec", "scale-info", @@ -726,7 +726,7 @@ dependencies = [ "sp-runtime 32.0.0", "sp-std", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", ] @@ -1367,7 +1367,7 @@ dependencies = [ "pallet-balances 29.0.0", "pallet-bridge-messages", "pallet-message-queue 32.0.0", - "pallet-xcm 8.0.0", + "pallet-xcm 8.0.1", "parachains-common 8.0.0", "sp-runtime 32.0.0", "staging-xcm 8.0.0", @@ -1394,12 +1394,12 @@ dependencies = [ "bridge-runtime-common", "cumulus-pallet-aura-ext 0.8.0", "cumulus-pallet-dmp-queue 0.8.0", - "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-parachain-system 0.8.1", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm 0.8.0", "cumulus-pallet-xcmp-queue 0.8.0", "cumulus-primitives-core 0.8.0", - "cumulus-primitives-utility 0.8.0", + "cumulus-primitives-utility 0.8.1", "frame-benchmarking 29.0.0", "frame-executive 29.0.0", "frame-support 29.0.0", @@ -1425,14 +1425,14 @@ dependencies = [ "pallet-transaction-payment 29.0.0", "pallet-transaction-payment-rpc-runtime-api 29.0.0", "pallet-utility 29.0.0", - "pallet-xcm 8.0.0", - "pallet-xcm-benchmarks 8.0.1", + "pallet-xcm 8.0.1", + "pallet-xcm-benchmarks 8.0.2", "pallet-xcm-bridge-hub", "parachains-common 8.0.0", "parity-scale-codec", "polkadot-core-primitives 8.0.0", "polkadot-parachain-primitives 7.0.0", - "polkadot-runtime-common 8.0.0", + "polkadot-runtime-common 8.0.1", "polkadot-runtime-constants", "scale-info", "serde", @@ -1453,7 +1453,7 @@ dependencies = [ "sp-version 30.0.0", "staging-parachain-info 0.8.0", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", "staging-xcm-executor 8.0.1", "static_assertions", "substrate-wasm-builder 18.0.0", @@ -1487,7 +1487,7 @@ dependencies = [ "pallet-balances 29.0.0", "pallet-bridge-messages", "pallet-message-queue 32.0.0", - "pallet-xcm 8.0.0", + "pallet-xcm 8.0.1", "parachains-common 8.0.0", "sp-runtime 32.0.0", "staging-xcm 8.0.0", @@ -1514,12 +1514,12 @@ dependencies = [ "bridge-runtime-common", "cumulus-pallet-aura-ext 0.8.0", "cumulus-pallet-dmp-queue 0.8.0", - "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-parachain-system 0.8.1", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm 0.8.0", "cumulus-pallet-xcmp-queue 0.8.0", "cumulus-primitives-core 0.8.0", - "cumulus-primitives-utility 0.8.0", + "cumulus-primitives-utility 0.8.1", "frame-benchmarking 29.0.0", "frame-executive 29.0.0", "frame-support 29.0.0", @@ -1545,14 +1545,14 @@ dependencies = [ "pallet-transaction-payment 29.0.0", "pallet-transaction-payment-rpc-runtime-api 29.0.0", "pallet-utility 29.0.0", - "pallet-xcm 8.0.0", - "pallet-xcm-benchmarks 8.0.1", + "pallet-xcm 8.0.1", + "pallet-xcm-benchmarks 8.0.2", "pallet-xcm-bridge-hub", "parachains-common 8.0.0", "parity-scale-codec", "polkadot-core-primitives 8.0.0", "polkadot-parachain-primitives 7.0.0", - "polkadot-runtime-common 8.0.0", + "polkadot-runtime-common 8.0.1", "polkadot-runtime-constants", "scale-info", "serde", @@ -1573,7 +1573,7 @@ dependencies = [ "sp-version 30.0.0", "staging-parachain-info 0.8.0", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", "staging-xcm-executor 8.0.1", "static_assertions", "substrate-wasm-builder 18.0.0", @@ -1594,7 +1594,7 @@ dependencies = [ "bp-runtime", "bp-test-utils", "bridge-runtime-common", - "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-parachain-system 0.8.1", "cumulus-pallet-xcmp-queue 0.8.0", "frame-support 29.0.0", "frame-system 29.0.0", @@ -1616,7 +1616,7 @@ dependencies = [ "sp-std", "sp-tracing", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", "staging-xcm-executor 8.0.1", ] @@ -1653,7 +1653,7 @@ dependencies = [ "sp-std", "sp-trie 30.0.0", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", "static_assertions", ] @@ -2025,12 +2025,12 @@ version = "1.0.0" dependencies = [ "cumulus-pallet-aura-ext 0.8.0", "cumulus-pallet-dmp-queue 0.8.0", - "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-parachain-system 0.8.1", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm 0.8.0", "cumulus-pallet-xcmp-queue 0.8.0", "cumulus-primitives-core 0.8.0", - "cumulus-primitives-utility 0.8.0", + "cumulus-primitives-utility 0.8.1", "frame-benchmarking 29.0.0", "frame-executive 29.0.0", "frame-support 29.0.0", @@ -2062,12 +2062,12 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api 29.0.0", "pallet-treasury 28.0.0", "pallet-utility 29.0.0", - "pallet-xcm 8.0.0", + "pallet-xcm 8.0.1", "parachains-common 8.0.0", "parity-scale-codec", "polkadot-core-primitives 8.0.0", "polkadot-parachain-primitives 7.0.0", - "polkadot-runtime-common 8.0.0", + "polkadot-runtime-common 8.0.1", "polkadot-runtime-constants", "scale-info", "sp-api 27.0.0", @@ -2086,7 +2086,7 @@ dependencies = [ "sp-version 30.0.0", "staging-parachain-info 0.8.0", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", "system-parachains-constants", @@ -2483,7 +2483,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8e78b18548ae3454bc8a46e2bc2e3f521ea547844cbaecc9344d4741f4b1ef" dependencies = [ - "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-parachain-system 0.8.1", "frame-support 29.0.0", "frame-system 29.0.0", "pallet-aura 28.0.0", @@ -2571,9 +2571,9 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c253dcebafba5fa2e98f9d7afc313686ab0f54ab90785347a9de2b62b323f7" +checksum = "1a215fe4d66d23e8f3956bd21b9d80d2b33239f3b150b36d56fa238cfc9421a5" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -2589,6 +2589,7 @@ dependencies = [ "pallet-message-queue 32.0.0", "parity-scale-codec", "polkadot-parachain-primitives 7.0.0", + "polkadot-runtime-common 8.0.1", "polkadot-runtime-parachains 8.0.0", "scale-info", "sp-core 29.0.0", @@ -2706,7 +2707,7 @@ dependencies = [ "log", "pallet-message-queue 32.0.0", "parity-scale-codec", - "polkadot-runtime-common 8.0.0", + "polkadot-runtime-common 8.0.1", "polkadot-runtime-parachains 8.0.0", "scale-info", "sp-core 29.0.0", @@ -2830,23 +2831,22 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "610400dd0bbafde20db3dfccc50540f7ace05e169d93acce2b86008984ea70f7" +checksum = "e65466e56d642f979b556d098a03755ae51972fff5fa0f9b1cdcfdb3df062ea3" dependencies = [ "cumulus-primitives-core 0.8.0", "frame-support 29.0.0", "log", "pallet-asset-conversion", - "pallet-xcm-benchmarks 8.0.1", "parity-scale-codec", - "polkadot-runtime-common 8.0.0", + "polkadot-runtime-common 8.0.1", "polkadot-runtime-parachains 8.0.0", "sp-io 31.0.0", "sp-runtime 32.0.0", "sp-std", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", "staging-xcm-executor 8.0.1", ] @@ -3299,7 +3299,7 @@ dependencies = [ "asset-test-utils", "bp-messages", "bridge-runtime-common", - "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-parachain-system 0.8.1", "cumulus-pallet-xcmp-queue 0.8.0", "cumulus-primitives-core 0.8.0", "frame-support 29.0.0", @@ -3307,7 +3307,7 @@ dependencies = [ "pallet-balances 29.0.0", "pallet-bridge-messages", "pallet-message-queue 32.0.0", - "pallet-xcm 8.0.0", + "pallet-xcm 8.0.1", "parachains-common 8.0.0", "parity-scale-codec", "paste", @@ -4582,7 +4582,7 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" name = "glutton-kusama-runtime" version = "1.0.0" dependencies = [ - "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-parachain-system 0.8.1", "cumulus-pallet-xcm 0.8.0", "cumulus-primitives-core 0.8.0", "frame-benchmarking 29.0.0", @@ -4612,7 +4612,7 @@ dependencies = [ "sp-version 30.0.0", "staging-parachain-info 0.8.0", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", "system-parachains-constants", @@ -5109,7 +5109,7 @@ dependencies = [ "cumulus-pallet-xcmp-queue 0.8.0", "pallet-balances 29.0.0", "pallet-message-queue 32.0.0", - "pallet-xcm 8.0.0", + "pallet-xcm 8.0.1", "paste", "staging-xcm 8.0.0", "xcm-emulator", @@ -5421,12 +5421,12 @@ version = "1.0.0" dependencies = [ "frame-support 29.0.0", "polkadot-primitives 8.0.0", - "polkadot-runtime-common 8.0.0", + "polkadot-runtime-common 8.0.1", "smallvec", "sp-core 29.0.0", "sp-runtime 32.0.0", "sp-weights 28.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", ] [[package]] @@ -8928,9 +8928,9 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "8.0.0" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16bda69e8f69123ff81a6d60479fd91b9794f07a24959ced406f5fccbf77482c" +checksum = "2b0bade2eb6ce40af35a5af150692b4e150638f7f68c15735ab9cdf79650d68e" dependencies = [ "bounded-collections 0.2.0", "frame-benchmarking 29.0.0", @@ -8946,7 +8946,7 @@ dependencies = [ "sp-runtime 32.0.0", "sp-std", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", "staging-xcm-executor 8.0.1", ] @@ -8972,9 +8972,9 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "8.0.1" +version = "8.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23fd87994bbe3333ba81436e68b7574e598fe568a06bc59b53a6178c5ce8d71d" +checksum = "3c10e1c92086ce2069a3d2387d9431f48660b6ec92054c4d0a4e30a9f54e7ad3" dependencies = [ "frame-benchmarking 29.0.0", "frame-support 29.0.0", @@ -8986,7 +8986,7 @@ dependencies = [ "sp-runtime 32.0.0", "sp-std", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", "staging-xcm-executor 8.0.1", ] @@ -9010,7 +9010,7 @@ dependencies = [ "sp-runtime 32.0.0", "sp-std", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", "staging-xcm-executor 8.0.1", ] @@ -9031,7 +9031,7 @@ dependencies = [ "sp-runtime 32.0.0", "sp-std", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", ] [[package]] @@ -9079,7 +9079,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34aa00981a24a2b772afaa49e258f9bcd6bb372db060a05614becc1c74d4456" dependencies = [ "cumulus-primitives-core 0.8.0", - "cumulus-primitives-utility 0.8.0", + "cumulus-primitives-utility 0.8.1", "frame-support 29.0.0", "frame-system 29.0.0", "log", @@ -9089,7 +9089,7 @@ dependencies = [ "pallet-balances 29.0.0", "pallet-collator-selection 10.0.0", "pallet-message-queue 32.0.0", - "pallet-xcm 8.0.0", + "pallet-xcm 8.0.1", "parity-scale-codec", "polkadot-primitives 8.0.0", "scale-info", @@ -9110,7 +9110,7 @@ version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d295b9c391ce15f68ddcd7b0d428eb2d3338643a4d1f471b3dd8a15538865e17" dependencies = [ - "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-parachain-system 0.8.1", "cumulus-pallet-xcmp-queue 0.8.0", "cumulus-primitives-core 0.8.0", "cumulus-primitives-parachain-inherent 0.8.0", @@ -9120,7 +9120,7 @@ dependencies = [ "pallet-balances 29.0.0", "pallet-collator-selection 10.0.0", "pallet-session 29.0.0", - "pallet-xcm 8.0.0", + "pallet-xcm 8.0.1", "parity-scale-codec", "polkadot-parachain-primitives 7.0.0", "sp-consensus-aura 0.33.0", @@ -9336,12 +9336,12 @@ checksum = "c804f33306e47153a4bad6a9cd33bbd537fa4b5f9434d505c8a6fc321a0bb71a" dependencies = [ "assets-common", "cumulus-pallet-aura-ext 0.8.0", - "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-parachain-system 0.8.1", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm 0.8.0", "cumulus-pallet-xcmp-queue 0.8.0", "cumulus-primitives-core 0.8.0", - "cumulus-primitives-utility 0.8.0", + "cumulus-primitives-utility 0.8.1", "frame-benchmarking 29.0.0", "frame-executive 29.0.0", "frame-support 29.0.0", @@ -9362,12 +9362,12 @@ dependencies = [ "pallet-timestamp 28.0.0", "pallet-transaction-payment 29.0.0", "pallet-transaction-payment-rpc-runtime-api 29.0.0", - "pallet-xcm 8.0.0", + "pallet-xcm 8.0.1", "parachains-common 8.0.0", "parity-scale-codec", "polkadot-parachain-primitives 7.0.0", "polkadot-primitives 8.0.0", - "polkadot-runtime-common 8.0.0", + "polkadot-runtime-common 8.0.1", "scale-info", "smallvec", "sp-api 27.0.0", @@ -9385,7 +9385,7 @@ dependencies = [ "sp-version 30.0.0", "staging-parachain-info 0.8.0", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", "testnet-parachains-constants", @@ -10459,11 +10459,11 @@ dependencies = [ "pallet-utility 29.0.0", "pallet-vesting 29.0.0", "pallet-whitelist", - "pallet-xcm 8.0.0", - "pallet-xcm-benchmarks 8.0.1", + "pallet-xcm 8.0.1", + "pallet-xcm-benchmarks 8.0.2", "parity-scale-codec", "polkadot-primitives 8.0.0", - "polkadot-runtime-common 8.0.0", + "polkadot-runtime-common 8.0.1", "polkadot-runtime-constants", "polkadot-runtime-parachains 8.0.0", "scale-info", @@ -10494,7 +10494,7 @@ dependencies = [ "sp-trie 30.0.0", "sp-version 30.0.0", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", "tokio", @@ -10555,9 +10555,9 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "8.0.0" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4332f736bf9859c2f66d4db0f68f686a764c1e185392ecfc5e98efb53af05af" +checksum = "06afbb3bd10245ad1907242a98ddffc3c0c1e209738b8382bc5bcfc1f28c0429" dependencies = [ "bitvec", "frame-benchmarking 29.0.0", @@ -10582,7 +10582,6 @@ dependencies = [ "pallet-transaction-payment 29.0.0", "pallet-treasury 28.0.0", "pallet-vesting 29.0.0", - "pallet-xcm-benchmarks 8.0.1", "parity-scale-codec", "polkadot-primitives 8.0.0", "polkadot-runtime-parachains 8.0.0", @@ -10601,7 +10600,7 @@ dependencies = [ "sp-staking 27.0.0", "sp-std", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", "staging-xcm-executor 8.0.1", "static_assertions", ] @@ -10612,12 +10611,12 @@ version = "1.0.0" dependencies = [ "frame-support 29.0.0", "polkadot-primitives 8.0.0", - "polkadot-runtime-common 8.0.0", + "polkadot-runtime-common 8.0.1", "smallvec", "sp-core 29.0.0", "sp-runtime 32.0.0", "sp-weights 28.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", ] [[package]] @@ -11641,13 +11640,13 @@ checksum = "0b45c21ccb0f8777512a65510c106aeee4b59682944b9a5cb31cd7b8ed4ccb47" dependencies = [ "frame-support 29.0.0", "polkadot-primitives 8.0.0", - "polkadot-runtime-common 8.0.0", + "polkadot-runtime-common 8.0.1", "smallvec", "sp-core 29.0.0", "sp-runtime 32.0.0", "sp-weights 28.0.0", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", ] [[package]] @@ -14938,11 +14937,11 @@ dependencies = [ "pallet-utility 29.0.0", "pallet-vesting 29.0.0", "pallet-whitelist", - "pallet-xcm 8.0.0", - "pallet-xcm-benchmarks 8.0.1", + "pallet-xcm 8.0.1", + "pallet-xcm-benchmarks 8.0.2", "parity-scale-codec", "polkadot-primitives 8.0.0", - "polkadot-runtime-common 8.0.0", + "polkadot-runtime-common 8.0.1", "polkadot-runtime-parachains 8.0.0", "scale-info", "separator", @@ -14971,7 +14970,7 @@ dependencies = [ "sp-trie 30.0.0", "sp-version 30.0.0", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", "staging-xcm-executor 8.0.1", "substrate-wasm-builder 18.0.0", "tokio", @@ -15070,9 +15069,9 @@ dependencies = [ [[package]] name = "staging-xcm-builder" -version = "8.0.0" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e8c74e3d5b47173a22ad468ab28aeb88cfb92b742fa91a95fe1a8230c2365f" +checksum = "a8f6cfc27c1d45f9a67e20ed3f7e60296299688825350291606add10bf3bbff2" dependencies = [ "frame-support 29.0.0", "frame-system 29.0.0", @@ -16644,13 +16643,13 @@ checksum = "3b080c193714605ce1033311d85035247adca170181cd68a3ad7e3ca87755a14" dependencies = [ "frame-support 29.0.0", "polkadot-primitives 8.0.0", - "polkadot-runtime-common 8.0.0", + "polkadot-runtime-common 8.0.1", "smallvec", "sp-core 29.0.0", "sp-runtime 32.0.0", "sp-weights 28.0.0", "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.0", + "staging-xcm-builder 8.0.1", ] [[package]] @@ -17013,7 +17012,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b49681988880dd6d08a4d5f6b7cb612a0f12172270349655c1e2f870b3526fd" dependencies = [ - "cumulus-pallet-parachain-system 0.8.0", + "cumulus-pallet-parachain-system 0.8.1", "cumulus-pallet-xcmp-queue 0.8.0", "cumulus-primitives-core 0.8.0", "cumulus-primitives-parachain-inherent 0.8.0", diff --git a/integration-tests/emulated/helpers/Cargo.toml b/integration-tests/emulated/helpers/Cargo.toml index e1d6990e1b..b486f9c160 100644 --- a/integration-tests/emulated/helpers/Cargo.toml +++ b/integration-tests/emulated/helpers/Cargo.toml @@ -16,7 +16,7 @@ pallet-message-queue = { version = "32.0.0" } # Polkadot xcm = { package = "staging-xcm", version = "8.0.0" } -pallet-xcm = { version = "8.0.0" } +pallet-xcm = { version = "8.0.1" } # Cumulus xcm-emulator = { version = "0.6.0" } diff --git a/integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml b/integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml index 9fec2e7c04..866b6c5840 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml @@ -22,13 +22,13 @@ pallet-message-queue = { version = "32.0.0" } # Polkadot xcm = { package = "staging-xcm", version = "8.0.0" } xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } -pallet-xcm = { version = "8.0.0" } +pallet-xcm = { version = "8.0.1" } # Cumulus parachains-common = { version = "8.0.0" } emulated-integration-tests-common = { version = "4.0.0" } asset-test-utils = { version = "8.0.1" } -cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook"], version = "0.8.0" } +cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook"], version = "0.8.1" } # Local asset-hub-kusama-runtime = { path = "../../../../../system-parachains/asset-hubs/asset-hub-kusama" } diff --git a/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml index 7550cb8d47..77b977f577 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml @@ -20,9 +20,9 @@ pallet-treasury = { version = "28.0.0" } pallet-message-queue = { version = "32.0.0" } # Polkadot -polkadot-runtime-common = { version = "8.0.0" } +polkadot-runtime-common = { version = "8.0.1" } xcm = { package = "staging-xcm", version = "8.0.0" } -pallet-xcm = { version = "8.0.0" } +pallet-xcm = { version = "8.0.1" } xcm-executor = { package = "staging-xcm-executor", version = "8.0.1" } # Cumulus @@ -30,7 +30,7 @@ asset-test-utils = { version = "8.0.1" } emulated-integration-tests-common = { version = "4.0.0" } parachains-common = { version = "8.0.0" } cumulus-pallet-xcmp-queue = { version = "0.8.0" } -cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook"], version = "0.8.0" } +cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook"], version = "0.8.1" } # Local asset-hub-polkadot-runtime = { path = "../../../../../system-parachains/asset-hubs/asset-hub-polkadot" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml index 66af41fbff..bf134f8400 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml @@ -18,7 +18,7 @@ pallet-message-queue = { version = "32.0.0" } # Polkadot xcm = { package = "staging-xcm", version = "8.0.0" } -pallet-xcm = { version = "8.0.0" } +pallet-xcm = { version = "8.0.1" } xcm-executor = { package = "staging-xcm-executor", version = "8.0.1" } # Cumulus diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml index 07a87e6e12..18026e77e3 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml @@ -18,7 +18,7 @@ pallet-message-queue = { version = "32.0.0" } # Polkadot xcm = { package = "staging-xcm", version = "8.0.0" } -pallet-xcm = { version = "8.0.0" } +pallet-xcm = { version = "8.0.1" } xcm-executor = { package = "staging-xcm-executor", version = "8.0.1" } # Cumulus diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index e9979ae479..a594b4d05c 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -81,8 +81,8 @@ pallet-treasury = { default-features = false , version = "28.0.0" } pallet-utility = { default-features = false , version = "29.0.0" } pallet-vesting = { default-features = false , version = "29.0.0" } pallet-whitelist = { default-features = false , version = "28.0.0" } -pallet-xcm = { default-features = false , version = "8.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.1" } +pallet-xcm = { default-features = false , version = "8.0.1" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.2" } frame-election-provider-support = { default-features = false , version = "29.0.0" } frame-benchmarking = { default-features = false, optional = true , version = "29.0.0" } @@ -94,13 +94,13 @@ frame-system-benchmarking = { default-features = false, optional = true , versio pallet-election-provider-support-benchmarking = { default-features = false, optional = true , version = "28.0.0" } hex-literal = "0.4.1" -runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "8.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "8.0.1" } runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "8.0.0" } primitives = { package = "polkadot-primitives", default-features = false , version = "8.0.0" } xcm = { package = "staging-xcm", default-features = false , version = "8.0.0" } xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "8.0.1" } -xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "8.0.1" } sp-debug-derive = { default-features = false, version = "14.0.0" } diff --git a/relay/kusama/constants/Cargo.toml b/relay/kusama/constants/Cargo.toml index f1087781d3..6cc9536760 100644 --- a/relay/kusama/constants/Cargo.toml +++ b/relay/kusama/constants/Cargo.toml @@ -11,12 +11,12 @@ smallvec = "1.13.1" frame-support = { default-features = false , version = "29.0.0" } primitives = { package = "polkadot-primitives", default-features = false , version = "8.0.0" } -runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "8.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "8.0.1" } sp-runtime = { default-features = false , version = "32.0.0" } sp-weights = { default-features = false , version = "28.0.0" } sp-core = { default-features = false , version = "29.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "8.0.1" } [features] default = [ "std" ] diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index df98d9dd03..449f2b3300 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -2411,8 +2411,34 @@ sp_api::impl_runtime_apis! { impl pallet_nomination_pools_benchmarking::Config for Runtime {} impl runtime_parachains::disputes::slashing::benchmarking::Config for Runtime {} + parameter_types! { + pub ExistentialDepositAsset: Option = Some(( + TokenLocation::get(), + ExistentialDeposit::get() + ).into()); + pub AssetHubParaId: ParaId = kusama_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + pub const RandomParaId: ParaId = ParaId::new(43211234); + } + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; impl pallet_xcm::benchmarking::Config for Runtime { + type DeliveryHelper = ( + runtime_common::xcm_sender::ToParachainDeliveryHelper< + XcmConfig, + ExistentialDepositAsset, + xcm_config::PriceForChildParachainDelivery, + AssetHubParaId, + (), + >, + runtime_common::xcm_sender::ToParachainDeliveryHelper< + XcmConfig, + ExistentialDepositAsset, + xcm_config::PriceForChildParachainDelivery, + RandomParaId, + (), + > + ); + fn reachable_dest() -> Option { Some(crate::xcm_config::AssetHubLocation::get()) } @@ -2420,7 +2446,7 @@ sp_api::impl_runtime_apis! { fn teleportable_asset_and_dest() -> Option<(Asset, Location)> { // Relay/native token can be teleported to/from AH. Some(( - Asset { fun: Fungible(EXISTENTIAL_DEPOSIT), id: AssetId(Here.into()) }, + Asset { fun: Fungible(ExistentialDeposit::get()), id: AssetId(Here.into()) }, crate::xcm_config::AssetHubLocation::get(), )) } @@ -2429,10 +2455,10 @@ sp_api::impl_runtime_apis! { // Relay can reserve transfer native token to some random parachain. Some(( Asset { - fun: Fungible(EXISTENTIAL_DEPOSIT), + fun: Fungible(ExistentialDeposit::get()), id: AssetId(Here.into()) }, - crate::Junction::Parachain(43211234).into(), + Parachain(RandomParaId::get().into()).into(), )) } @@ -2451,14 +2477,6 @@ sp_api::impl_runtime_apis! { } } - parameter_types! { - pub ExistentialDepositAsset: Option = Some(( - TokenLocation::get(), - ExistentialDeposit::get() - ).into()); - pub ToParachain: ParaId = kusama_runtime_constants::system_parachain::ASSET_HUB_ID.into(); - } - impl pallet_xcm_benchmarks::Config for Runtime { type XcmConfig = XcmConfig; type AccountIdConverter = SovereignAccountOf; @@ -2466,7 +2484,7 @@ sp_api::impl_runtime_apis! { XcmConfig, ExistentialDepositAsset, xcm_config::PriceForChildParachainDelivery, - ToParachain, + AssetHubParaId, (), >; fn valid_destination() -> Result { diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index a8084b97d2..c7aeb5c806 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -79,8 +79,8 @@ pallet-whitelist = { default-features = false , version = "28.0.0" } pallet-vesting = { default-features = false , version = "29.0.0" } pallet-utility = { default-features = false , version = "29.0.0" } frame-election-provider-support = { default-features = false , version = "29.0.0" } -pallet-xcm = { default-features = false, version = "8.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.1" } +pallet-xcm = { default-features = false, version = "8.0.1" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.2" } frame-benchmarking = { default-features = false, optional = true , version = "29.0.0" } frame-try-runtime = { default-features = false, optional = true , version = "0.35.0" } @@ -90,13 +90,13 @@ pallet-offences-benchmarking = { default-features = false, optional = true , ver pallet-session-benchmarking = { default-features = false, optional = true , version = "29.0.0" } pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "27.0.0" } -runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "8.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "8.0.1" } runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "8.0.0" } primitives = { package = "polkadot-primitives", default-features = false , version = "8.0.0" } xcm = { package = "staging-xcm", default-features = false , version = "8.0.0" } xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "8.0.1" } -xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "8.0.1" } sp-debug-derive = { default-features = false, version = "14.0.0" } diff --git a/relay/polkadot/constants/Cargo.toml b/relay/polkadot/constants/Cargo.toml index 473b2e35b8..0edbbecf33 100644 --- a/relay/polkadot/constants/Cargo.toml +++ b/relay/polkadot/constants/Cargo.toml @@ -11,12 +11,12 @@ smallvec = "1.13.1" frame-support = { default-features = false , version = "29.0.0" } primitives = { package = "polkadot-primitives", default-features = false , version = "8.0.0" } -runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "8.0.0" } +runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "8.0.1" } sp-runtime = { default-features = false , version = "32.0.0" } sp-weights = { default-features = false , version = "28.0.0" } sp-core = { default-features = false , version = "29.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "8.0.1" } [features] default = [ "std" ] diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 11661cd447..9059a2ddc6 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -2298,8 +2298,34 @@ sp_api::impl_runtime_apis! { impl pallet_nomination_pools_benchmarking::Config for Runtime {} impl runtime_parachains::disputes::slashing::benchmarking::Config for Runtime {} + parameter_types! { + pub ExistentialDepositAsset: Option = Some(( + TokenLocation::get(), + ExistentialDeposit::get() + ).into()); + pub AssetHubParaId: ParaId = polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + pub const RandomParaId: ParaId = ParaId::new(43211234); + } + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; impl pallet_xcm::benchmarking::Config for Runtime { + type DeliveryHelper = ( + runtime_common::xcm_sender::ToParachainDeliveryHelper< + XcmConfig, + ExistentialDepositAsset, + xcm_config::PriceForChildParachainDelivery, + AssetHubParaId, + (), + >, + runtime_common::xcm_sender::ToParachainDeliveryHelper< + XcmConfig, + ExistentialDepositAsset, + xcm_config::PriceForChildParachainDelivery, + RandomParaId, + (), + > + ); + fn reachable_dest() -> Option { Some(crate::xcm_config::AssetHubLocation::get()) } @@ -2307,7 +2333,7 @@ sp_api::impl_runtime_apis! { fn teleportable_asset_and_dest() -> Option<(Asset, Location)> { // Relay/native token can be teleported to/from AH. Some(( - Asset { fun: Fungible(EXISTENTIAL_DEPOSIT), id: AssetId(Here.into()) }, + Asset { fun: Fungible(ExistentialDeposit::get()), id: AssetId(Here.into()) }, crate::xcm_config::AssetHubLocation::get(), )) } @@ -2316,10 +2342,10 @@ sp_api::impl_runtime_apis! { // Relay can reserve transfer native token to some random parachain. Some(( Asset { - fun: Fungible(EXISTENTIAL_DEPOSIT), + fun: Fungible(ExistentialDeposit::get()), id: AssetId(Here.into()) }, - crate::Junction::Parachain(43211234).into(), + Parachain(RandomParaId::get().into()).into(), )) } @@ -2338,14 +2364,6 @@ sp_api::impl_runtime_apis! { } } - parameter_types! { - pub ExistentialDepositAsset: Option = Some(( - TokenLocation::get(), - ExistentialDeposit::get() - ).into()); - pub ToParachain: ParaId = polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(); - } - impl pallet_xcm_benchmarks::Config for Runtime { type XcmConfig = XcmConfig; type AccountIdConverter = SovereignAccountOf; @@ -2353,7 +2371,7 @@ sp_api::impl_runtime_apis! { XcmConfig, ExistentialDepositAsset, xcm_config::PriceForChildParachainDelivery, - ToParachain, + AssetHubParaId, (), >; fn valid_destination() -> Result { diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index 4ab0e63615..2a773ae560 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -67,24 +67,24 @@ sp-weights = { default-features = false, version = "28.0.0" } primitive-types = { version = "0.12.2", default-features = false, features = ["codec", "scale-info", "num-traits"] } # Polkadot -pallet-xcm = { default-features = false, version = "8.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.1" } +pallet-xcm = { default-features = false, version = "8.0.1" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.2" } polkadot-core-primitives = { default-features = false, version = "8.0.0" } polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } -polkadot-runtime-common = { default-features = false, version = "8.0.0" } +polkadot-runtime-common = { default-features = false, version = "8.0.1" } xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.1" } xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } # Cumulus cumulus-pallet-aura-ext = { default-features = false , version = "0.8.0" } cumulus-pallet-dmp-queue = { default-features = false , version = "0.8.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.1" } cumulus-pallet-session-benchmarking = { default-features = false, version = "10.0.0" } cumulus-pallet-xcm = { default-features = false , version = "0.8.0" } cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.8.0" } cumulus-primitives-core = { default-features = false , version = "0.8.0" } -cumulus-primitives-utility = { default-features = false , version = "0.8.0" } +cumulus-primitives-utility = { default-features = false , version = "0.8.1" } pallet-collator-selection = { default-features = false , version = "10.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.8.0" } parachains-common = { default-features = false , version = "8.0.0" } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 84fcfc7470..44f3bc19b4 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -1329,8 +1329,31 @@ impl_runtime_apis! { use xcm_config::{KsmLocation, MaxAssetsIntoHolding}; use pallet_xcm_benchmarks::asset_instance_from; + parameter_types! { + pub ExistentialDepositAsset: Option = Some(( + KsmLocation::get(), + ExistentialDeposit::get() + ).into()); + pub const RandomParaId: ParaId = ParaId::new(43211234); + } + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; impl pallet_xcm::benchmarking::Config for Runtime { + type DeliveryHelper = ( + cumulus_primitives_utility::ToParentDeliveryHelper< + xcm_config::XcmConfig, + ExistentialDepositAsset, + PriceForParentDelivery, + >, + polkadot_runtime_common::xcm_sender::ToParachainDeliveryHelper< + xcm_config::XcmConfig, + ExistentialDepositAsset, + PriceForSiblingParachainDelivery, + RandomParaId, + ParachainSystem, + > + ); + fn reachable_dest() -> Option { Some(Parent.into()) } @@ -1348,16 +1371,12 @@ impl_runtime_apis! { fn reserve_transferable_asset_and_dest() -> Option<(Asset, Location)> { // AH can reserve transfer native token to some random parachain. - let random_para_id = 43211234; - ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests( - random_para_id.into() - ); Some(( Asset { fun: Fungible(ExistentialDeposit::get()), id: AssetId(Parent.into()) }, - ParentThen(Parachain(random_para_id).into()).into(), + ParentThen(Parachain(RandomParaId::get().into()).into()).into(), )) } @@ -1411,13 +1430,6 @@ impl_runtime_apis! { } } - parameter_types! { - pub ExistentialDepositAsset: Option = Some(( - KsmLocation::get(), - ExistentialDeposit::get() - ).into()); - } - impl pallet_xcm_benchmarks::Config for Runtime { type XcmConfig = xcm_config::XcmConfig; type AccountIdConverter = xcm_config::LocationToAccountId; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index fe509fb4bd..62e8223ff0 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -62,24 +62,24 @@ sp-version = { default-features = false, version = "30.0.0" } sp-weights = { default-features = false, version = "28.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "8.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.1" } +pallet-xcm = { default-features = false, version = "8.0.1" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.2" } polkadot-core-primitives = { default-features = false, version = "8.0.0" } polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } -polkadot-runtime-common = { default-features = false, version = "8.0.0" } +polkadot-runtime-common = { default-features = false, version = "8.0.1" } xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.1" } xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } # Cumulus cumulus-pallet-aura-ext = { default-features = false , version = "0.8.0" } cumulus-pallet-dmp-queue = { default-features = false , version = "0.8.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.1" } cumulus-pallet-session-benchmarking = { default-features = false, version = "10.0.0" } cumulus-pallet-xcm = { default-features = false , version = "0.8.0" } cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.8.0" } cumulus-primitives-core = { default-features = false , version = "0.8.0" } -cumulus-primitives-utility = { default-features = false , version = "0.8.0" } +cumulus-primitives-utility = { default-features = false , version = "0.8.1" } pallet-collator-selection = { default-features = false , version = "10.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.8.0" } parachains-common = { default-features = false , version = "8.0.0" } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index a966b24ddf..7897012857 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -1199,8 +1199,31 @@ impl_runtime_apis! { use xcm_config::{DotLocation, MaxAssetsIntoHolding}; use pallet_xcm_benchmarks::asset_instance_from; + parameter_types! { + pub ExistentialDepositAsset: Option = Some(( + DotLocation::get(), + ExistentialDeposit::get() + ).into()); + pub const RandomParaId: ParaId = ParaId::new(43211234); + } + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; impl pallet_xcm::benchmarking::Config for Runtime { + type DeliveryHelper = ( + cumulus_primitives_utility::ToParentDeliveryHelper< + xcm_config::XcmConfig, + ExistentialDepositAsset, + PriceForParentDelivery, + >, + polkadot_runtime_common::xcm_sender::ToParachainDeliveryHelper< + xcm_config::XcmConfig, + ExistentialDepositAsset, + PriceForSiblingParachainDelivery, + RandomParaId, + ParachainSystem, + > + ); + fn reachable_dest() -> Option { Some(Parent.into()) } @@ -1218,16 +1241,12 @@ impl_runtime_apis! { fn reserve_transferable_asset_and_dest() -> Option<(Asset, Location)> { // AH can reserve transfer native token to some random parachain. - let random_para_id = 43211234; - ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests( - random_para_id.into() - ); Some(( Asset { fun: Fungible(ExistentialDeposit::get()), id: AssetId(Parent.into()) }, - ParentThen(Parachain(random_para_id).into()).into(), + ParentThen(Parachain(RandomParaId::get().into()).into()).into(), )) } @@ -1281,13 +1300,6 @@ impl_runtime_apis! { } } - parameter_types! { - pub ExistentialDepositAsset: Option = Some(( - DotLocation::get(), - ExistentialDeposit::get() - ).into()); - } - impl pallet_xcm_benchmarks::Config for Runtime { type XcmConfig = xcm_config::XcmConfig; type AccountIdConverter = xcm_config::LocationToAccountId; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index a7c3fbe6ca..c8dcfc8aca 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -60,24 +60,24 @@ sp-transaction-pool = { default-features = false, version = "27.0.0" } sp-version = { default-features = false, version = "30.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "8.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.1" } +pallet-xcm = { default-features = false, version = "8.0.1" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.2" } polkadot-core-primitives = { default-features = false, version = "8.0.0" } polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } -polkadot-runtime-common = { default-features = false, version = "8.0.0" } +polkadot-runtime-common = { default-features = false, version = "8.0.1" } xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.1" } xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } # Cumulus cumulus-pallet-aura-ext = { default-features = false , version = "0.8.0" } cumulus-pallet-dmp-queue = { default-features = false , version = "0.8.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.1" } cumulus-pallet-session-benchmarking = { default-features = false, version = "10.0.0" } cumulus-pallet-xcm = { default-features = false , version = "0.8.0" } cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.8.0" } cumulus-primitives-core = { default-features = false , version = "0.8.0" } -cumulus-primitives-utility = { default-features = false , version = "0.8.0" } +cumulus-primitives-utility = { default-features = false , version = "0.8.1" } pallet-collator-selection = { default-features = false , version = "10.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.8.0" } parachains-common = { default-features = false , version = "8.0.0" } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 32f08ba2a0..773f242dd0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -819,8 +819,21 @@ impl_runtime_apis! { use xcm::latest::prelude::*; use xcm_config::KsmRelayLocation; + parameter_types! { + pub ExistentialDepositAsset: Option = Some(( + KsmRelayLocation::get(), + ExistentialDeposit::get() + ).into()); + } + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; impl pallet_xcm::benchmarking::Config for Runtime { + type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper< + xcm_config::XcmConfig, + ExistentialDepositAsset, + PriceForParentDelivery, + >; + fn reachable_dest() -> Option { Some(Parent.into()) } @@ -854,13 +867,6 @@ impl_runtime_apis! { } } - parameter_types! { - pub ExistentialDepositAsset: Option = Some(( - KsmRelayLocation::get(), - ExistentialDeposit::get() - ).into()); - } - impl pallet_xcm_benchmarks::Config for Runtime { type XcmConfig = xcm_config::XcmConfig; type AccountIdConverter = xcm_config::LocationToAccountId; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 6cbaedf00a..3d5dcdf978 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -60,24 +60,24 @@ sp-transaction-pool = { default-features = false, version = "27.0.0" } sp-version = { default-features = false, version = "30.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "8.0.0" } -pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.1" } +pallet-xcm = { default-features = false, version = "8.0.1" } +pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.2" } polkadot-core-primitives = { default-features = false, version = "8.0.0" } polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } -polkadot-runtime-common = { default-features = false, version = "8.0.0" } +polkadot-runtime-common = { default-features = false, version = "8.0.1" } xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.1" } xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } # Cumulus cumulus-pallet-aura-ext = { default-features = false , version = "0.8.0" } cumulus-pallet-dmp-queue = { default-features = false , version = "0.8.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.1" } cumulus-pallet-session-benchmarking = { default-features = false, version = "10.0.0" } cumulus-pallet-xcm = { default-features = false , version = "0.8.0" } cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.8.0" } cumulus-primitives-core = { default-features = false , version = "0.8.0" } -cumulus-primitives-utility = { default-features = false , version = "0.8.0" } +cumulus-primitives-utility = { default-features = false , version = "0.8.1" } pallet-collator-selection = { default-features = false , version = "10.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.8.0" } parachains-common = { default-features = false , version = "8.0.0" } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 7ad452ab27..7ea0b32089 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -820,8 +820,21 @@ impl_runtime_apis! { use xcm::latest::prelude::*; use xcm_config::DotRelayLocation; + parameter_types! { + pub ExistentialDepositAsset: Option = Some(( + DotRelayLocation::get(), + ExistentialDeposit::get() + ).into()); + } + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; impl pallet_xcm::benchmarking::Config for Runtime { + type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper< + xcm_config::XcmConfig, + ExistentialDepositAsset, + PriceForParentDelivery, + >; + fn reachable_dest() -> Option { Some(Parent.into()) } @@ -855,13 +868,6 @@ impl_runtime_apis! { } } - parameter_types! { - pub ExistentialDepositAsset: Option = Some(( - DotRelayLocation::get(), - ExistentialDeposit::get() - ).into()); - } - impl pallet_xcm_benchmarks::Config for Runtime { type XcmConfig = xcm_config::XcmConfig; type AccountIdConverter = xcm_config::LocationToAccountId; diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index e0d75cc5dd..703fe81fc0 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -59,24 +59,24 @@ sp-transaction-pool = { default-features = false, version = "27.0.0" } sp-version = { default-features = false, version = "30.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "8.0.0" } +pallet-xcm = { default-features = false, version = "8.0.1" } polkadot-core-primitives = { default-features = false, version = "8.0.0" } polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } -polkadot-runtime-common = { default-features = false, version = "8.0.0" } +polkadot-runtime-common = { default-features = false, version = "8.0.1" } polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false} xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.1" } xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } # Cumulus cumulus-pallet-aura-ext = { default-features = false , version = "0.8.0" } cumulus-pallet-dmp-queue = { default-features = false , version = "0.8.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.1" } cumulus-pallet-session-benchmarking = { default-features = false, version = "10.0.0" } cumulus-pallet-xcm = { default-features = false , version = "0.8.0" } cumulus-pallet-xcmp-queue = { default-features = false , version = "0.8.0" } cumulus-primitives-core = { default-features = false , version = "0.8.0" } -cumulus-primitives-utility = { default-features = false , version = "0.8.0" } +cumulus-primitives-utility = { default-features = false , version = "0.8.1" } pallet-collator-selection = { default-features = false , version = "10.0.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.8.0" } parachains-common = { default-features = false , version = "8.0.0" } diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 273b995962..05e9f550c6 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -975,8 +975,21 @@ impl_runtime_apis! { use xcm::latest::prelude::*; + parameter_types! { + pub ExistentialDepositAsset: Option = Some(( + xcm_config::DotLocation::get(), + ExistentialDeposit::get() + ).into()); + } + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; impl pallet_xcm::benchmarking::Config for Runtime { + type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper< + xcm_config::XcmConfig, + ExistentialDepositAsset, + PriceForParentDelivery, + >; + fn reachable_dest() -> Option { Some(Parent.into()) } diff --git a/system-parachains/gluttons/glutton-kusama/Cargo.toml b/system-parachains/gluttons/glutton-kusama/Cargo.toml index 731cdfc4b7..7a0dd078ca 100644 --- a/system-parachains/gluttons/glutton-kusama/Cargo.toml +++ b/system-parachains/gluttons/glutton-kusama/Cargo.toml @@ -38,11 +38,11 @@ sp-version = { default-features = false, version = "30.0.0" } # Polkadot xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.1" } xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } # Cumulus -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.1" } cumulus-pallet-xcm = { default-features = false , version = "0.8.0" } cumulus-primitives-core = { default-features = false , version = "0.8.0" } parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.8.0" } From a361a2a79a84ea8656e187b66d39b05e6b952b2a Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 28 Feb 2024 16:36:44 +0100 Subject: [PATCH 219/316] [coretime] Apply patch https://github.com/paritytech/polkadot-sdk/pull/3497 --- Cargo.lock | 141 +++++++++--------- chain-spec-generator/Cargo.toml | 4 +- .../emulated/chains/relays/kusama/Cargo.toml | 2 +- .../chains/relays/polkadot/Cargo.toml | 2 +- relay/kusama/Cargo.toml | 4 +- relay/kusama/constants/Cargo.toml | 2 +- relay/polkadot/Cargo.toml | 4 +- relay/polkadot/constants/Cargo.toml | 2 +- system-parachains/constants/Cargo.toml | 2 +- 9 files changed, 82 insertions(+), 81 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 496a1d0aa6..b7ce2f6833 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1112,7 +1112,7 @@ dependencies = [ "bp-runtime", "frame-support 29.0.0", "frame-system 29.0.0", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sp-api 27.0.0", "sp-std", ] @@ -1861,10 +1861,10 @@ dependencies = [ "pallet-im-online", "pallet-staking 29.0.0", "parachains-common 8.0.0", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "polkadot-runtime", "polkadot-runtime-constants", - "polkadot-runtime-parachains 8.0.0", + "polkadot-runtime-parachains 8.0.1", "sc-chain-spec", "sc-consensus-grandpa", "serde", @@ -2590,7 +2590,7 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives 7.0.0", "polkadot-runtime-common 8.0.1", - "polkadot-runtime-parachains 8.0.0", + "polkadot-runtime-parachains 8.0.1", "scale-info", "sp-core 29.0.0", "sp-externalities 0.26.0", @@ -2708,7 +2708,7 @@ dependencies = [ "pallet-message-queue 32.0.0", "parity-scale-codec", "polkadot-runtime-common 8.0.1", - "polkadot-runtime-parachains 8.0.0", + "polkadot-runtime-parachains 8.0.1", "scale-info", "sp-core 29.0.0", "sp-io 31.0.0", @@ -2745,7 +2745,7 @@ dependencies = [ "parity-scale-codec", "polkadot-core-primitives 8.0.0", "polkadot-parachain-primitives 7.0.0", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "scale-info", "sp-api 27.0.0", "sp-runtime 32.0.0", @@ -2841,7 +2841,7 @@ dependencies = [ "pallet-asset-conversion", "parity-scale-codec", "polkadot-runtime-common 8.0.1", - "polkadot-runtime-parachains 8.0.0", + "polkadot-runtime-parachains 8.0.1", "sp-io 31.0.0", "sp-runtime 32.0.0", "sp-std", @@ -2858,7 +2858,7 @@ checksum = "bfff604ad01c5c0c397f9a971c8cec6443aea3658813778875b4f64de07847d5" dependencies = [ "cumulus-primitives-core 0.8.0", "parity-scale-codec", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sp-runtime 32.0.0", "sp-state-machine 0.36.0", "sp-std", @@ -3311,8 +3311,8 @@ dependencies = [ "parachains-common 8.0.0", "parity-scale-codec", "paste", - "polkadot-primitives 8.0.0", - "polkadot-runtime-parachains 8.0.0", + "polkadot-primitives 8.0.1", + "polkadot-runtime-parachains 8.0.1", "polkadot-service", "sc-consensus-grandpa", "sp-authority-discovery 27.0.0", @@ -5392,7 +5392,7 @@ dependencies = [ "kusama-runtime-constants", "pallet-im-online", "parachains-common 8.0.0", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sc-consensus-grandpa", "sp-authority-discovery 27.0.0", "sp-consensus-babe 0.33.0", @@ -5420,7 +5420,7 @@ name = "kusama-runtime-constants" version = "1.0.0" dependencies = [ "frame-support 29.0.0", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "polkadot-runtime-common 8.0.1", "smallvec", "sp-core 29.0.0", @@ -9091,7 +9091,7 @@ dependencies = [ "pallet-message-queue 32.0.0", "pallet-xcm 8.0.1", "parity-scale-codec", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "scale-info", "sp-consensus-aura 0.33.0", "sp-core 29.0.0", @@ -9366,7 +9366,7 @@ dependencies = [ "parachains-common 8.0.0", "parity-scale-codec", "polkadot-parachain-primitives 7.0.0", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "polkadot-runtime-common 8.0.1", "scale-info", "smallvec", @@ -9528,7 +9528,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "rand", "tracing-gum", ] @@ -9545,7 +9545,7 @@ dependencies = [ "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "rand", "tracing-gum", ] @@ -9565,7 +9565,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "rand", "schnellru", "sp-core 29.0.0", @@ -9589,7 +9589,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "rand", "sc-network", "schnellru", @@ -9612,7 +9612,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sp-core 29.0.0", "sp-keystore 0.35.0", "sp-runtime 32.0.0", @@ -9664,7 +9664,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sc-network", "schnellru", "sp-application-crypto 31.0.0", @@ -9681,7 +9681,7 @@ dependencies = [ "pallet-im-online", "pallet-staking 29.0.0", "parachains-common 8.0.0", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "polkadot-runtime", "polkadot-runtime-constants", "sc-consensus-grandpa", @@ -9700,7 +9700,7 @@ checksum = "1b10514ace3272d38b602e1795a5a340b265285c4af875473d682a5c9d6c831c" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "reed-solomon-novelpoly", "sp-core 29.0.0", "sp-trie 30.0.0", @@ -9718,7 +9718,7 @@ dependencies = [ "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "rand", "rand_chacha 0.3.1", "sc-network", @@ -9747,7 +9747,7 @@ dependencies = [ "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sc-network", "sp-consensus", "thiserror", @@ -9766,7 +9766,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sp-core 29.0.0", "sp-maybe-compressed-blob", "thiserror", @@ -9792,7 +9792,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "rand", "rand_chacha 0.3.1", "rand_core 0.6.4", @@ -9824,7 +9824,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sp-consensus", "thiserror", "tracing-gum", @@ -9843,7 +9843,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "polkadot-statement-table", "sp-keystore 0.35.0", "thiserror", @@ -9859,7 +9859,7 @@ dependencies = [ "futures", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sp-keystore 0.35.0", "thiserror", "tracing-gum", @@ -9883,7 +9883,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-parachain-primitives 7.0.0", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sp-maybe-compressed-blob", "tracing-gum", ] @@ -9916,7 +9916,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "thiserror", "tracing-gum", ] @@ -9934,7 +9934,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sc-keystore", "schnellru", "thiserror", @@ -9952,7 +9952,7 @@ dependencies = [ "futures-timer", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sp-blockchain", "sp-inherents 27.0.0", "thiserror", @@ -9972,7 +9972,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "thiserror", "tracing-gum", ] @@ -9990,7 +9990,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "thiserror", "tracing-gum", ] @@ -10017,7 +10017,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-parachain-primitives 7.0.0", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "rand", "slotmap", "sp-core 29.0.0", @@ -10040,7 +10040,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sp-keystore 0.35.0", "thiserror", "tracing-gum", @@ -10060,7 +10060,7 @@ dependencies = [ "nix 0.27.1", "parity-scale-codec", "polkadot-parachain-primitives 7.0.0", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sc-executor", "sc-executor-common", "sc-executor-wasmtime", @@ -10084,7 +10084,7 @@ dependencies = [ "polkadot-node-metrics", "polkadot-node-subsystem", "polkadot-node-subsystem-types", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "schnellru", "sp-consensus-babe 0.33.0", "tracing-gum", @@ -10102,7 +10102,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "polkadot-node-primitives", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sc-network", "sp-core 29.0.0", "thiserror", @@ -10120,7 +10120,7 @@ dependencies = [ "futures-timer", "log", "parity-scale-codec", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "prioritized-metered-channel", "sc-cli", "sc-service", @@ -10145,7 +10145,7 @@ dependencies = [ "parity-scale-codec", "polkadot-node-jaeger", "polkadot-node-primitives", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "rand", "sc-authority-discovery", "sc-network", @@ -10165,7 +10165,7 @@ dependencies = [ "futures", "parity-scale-codec", "polkadot-parachain-primitives 7.0.0", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "schnorrkel 0.11.4", "serde", "sp-application-crypto 31.0.0", @@ -10203,7 +10203,7 @@ dependencies = [ "polkadot-node-jaeger", "polkadot-node-network-protocol", "polkadot-node-primitives", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "polkadot-statement-table", "sc-client-api", "sc-network", @@ -10242,7 +10242,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-types", "polkadot-overseer", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "prioritized-metered-channel", "rand", "sc-client-api", @@ -10269,7 +10269,7 @@ dependencies = [ "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem-types", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sc-client-api", "sp-api 27.0.0", "sp-core 29.0.0", @@ -10342,12 +10342,13 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "8.0.0" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f66d047db81997a1ec9526987031b0d8f146edb0bdcdc0f9af73f6a2aa62fbce" +checksum = "e0d5f9930210cab0233d81204415c9ef4a8889cdf3e60de1435250481a2773ca" dependencies = [ "bitvec", "hex-literal", + "log", "parity-scale-codec", "polkadot-core-primitives 8.0.0", "polkadot-parachain-primitives 7.0.0", @@ -10376,7 +10377,7 @@ dependencies = [ "jsonrpsee", "mmr-rpc", "pallet-transaction-payment-rpc", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sc-chain-spec", "sc-client-api", "sc-consensus-babe", @@ -10462,10 +10463,10 @@ dependencies = [ "pallet-xcm 8.0.1", "pallet-xcm-benchmarks 8.0.2", "parity-scale-codec", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "polkadot-runtime-common 8.0.1", "polkadot-runtime-constants", - "polkadot-runtime-parachains 8.0.0", + "polkadot-runtime-parachains 8.0.1", "scale-info", "separator", "serde_json", @@ -10583,8 +10584,8 @@ dependencies = [ "pallet-treasury 28.0.0", "pallet-vesting 29.0.0", "parity-scale-codec", - "polkadot-primitives 8.0.0", - "polkadot-runtime-parachains 8.0.0", + "polkadot-primitives 8.0.1", + "polkadot-runtime-parachains 8.0.1", "rustc-hex", "scale-info", "serde", @@ -10610,7 +10611,7 @@ name = "polkadot-runtime-constants" version = "1.0.0" dependencies = [ "frame-support 29.0.0", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "polkadot-runtime-common 8.0.1", "smallvec", "sp-core 29.0.0", @@ -10642,7 +10643,7 @@ dependencies = [ "bs58 0.5.0", "frame-benchmarking 29.0.0", "parity-scale-codec", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sp-std", "sp-tracing", ] @@ -10699,9 +10700,9 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "8.0.0" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef42b7542a9c5b41ebf925d52bc0ce431232e01b0991b8c01a95f0f5f4eac0cf" +checksum = "9bcfd672be236fd1c38c702e7e99fe3f3e54df0ddb8127e542423221d1f50669" dependencies = [ "bitflags 1.3.2", "bitvec", @@ -10724,7 +10725,7 @@ dependencies = [ "parity-scale-codec", "polkadot-core-primitives 8.0.0", "polkadot-parachain-primitives 7.0.0", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "polkadot-runtime-metrics 8.0.0", "rand", "rand_chacha 0.3.1", @@ -10806,9 +10807,9 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-parachain-primitives 7.0.0", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "polkadot-rpc", - "polkadot-runtime-parachains 8.0.0", + "polkadot-runtime-parachains 8.0.1", "polkadot-statement-distribution", "sc-authority-discovery", "sc-basic-authorship", @@ -10881,7 +10882,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sp-keystore 0.35.0", "sp-staking 27.0.0", "thiserror", @@ -10895,7 +10896,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2bfd8ccdbc770e14990e7d4263e2af80930ba0c3197123ac87e1d0775747cb6" dependencies = [ "parity-scale-codec", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "sp-core 29.0.0", ] @@ -11639,7 +11640,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b45c21ccb0f8777512a65510c106aeee4b59682944b9a5cb31cd7b8ed4ccb47" dependencies = [ "frame-support 29.0.0", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "polkadot-runtime-common 8.0.1", "smallvec", "sp-core 29.0.0", @@ -14940,9 +14941,9 @@ dependencies = [ "pallet-xcm 8.0.1", "pallet-xcm-benchmarks 8.0.2", "parity-scale-codec", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "polkadot-runtime-common 8.0.1", - "polkadot-runtime-parachains 8.0.0", + "polkadot-runtime-parachains 8.0.1", "scale-info", "separator", "serde_json", @@ -15452,7 +15453,7 @@ dependencies = [ "kusama-runtime-constants", "parachains-common 8.0.0", "polkadot-core-primitives 8.0.0", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "polkadot-runtime-constants", "smallvec", "sp-runtime 32.0.0", @@ -15904,7 +15905,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9690af7fe11d125786fa1b5ca802192f631b61a4411277865c8e0581c887e286" dependencies = [ "coarsetime", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "tracing", "tracing-gum-proc-macro", ] @@ -16642,7 +16643,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b080c193714605ce1033311d85035247adca170181cd68a3ad7e3ca87755a14" dependencies = [ "frame-support 29.0.0", - "polkadot-primitives 8.0.0", + "polkadot-primitives 8.0.1", "polkadot-runtime-common 8.0.1", "smallvec", "sp-core 29.0.0", @@ -17028,8 +17029,8 @@ dependencies = [ "parity-scale-codec", "paste", "polkadot-parachain-primitives 7.0.0", - "polkadot-primitives 8.0.0", - "polkadot-runtime-parachains 8.0.0", + "polkadot-primitives 8.0.1", + "polkadot-runtime-parachains 8.0.1", "sp-arithmetic 24.0.0", "sp-core 29.0.0", "sp-crypto-hashing", diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index f4563d4fc3..23f97dad89 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -17,8 +17,8 @@ kusama-runtime = { package = "staging-kusama-runtime", path = "../relay/kusama" kusama-runtime-constants = { path = "../relay/kusama/constants" } sc-chain-spec = "28.0.0" -polkadot-runtime-parachains = "8.0.0" -polkadot-primitives = "8.0.0" +polkadot-runtime-parachains = "8.0.1" +polkadot-primitives = "8.0.1" sp-consensus-babe = "0.33.0" sp-authority-discovery = "27.0.0" sp-core = "29.0.0" diff --git a/integration-tests/emulated/chains/relays/kusama/Cargo.toml b/integration-tests/emulated/chains/relays/kusama/Cargo.toml index 0caba1eda9..043c15a24a 100644 --- a/integration-tests/emulated/chains/relays/kusama/Cargo.toml +++ b/integration-tests/emulated/chains/relays/kusama/Cargo.toml @@ -18,7 +18,7 @@ grandpa = { package = "sc-consensus-grandpa", version = "0.20.0" } pallet-im-online = { version = "28.0.0" } # Polkadot -polkadot-primitives = { version = "8.0.0" } +polkadot-primitives = { version = "8.0.1" } # Cumulus parachains-common = { version = "8.0.0" } diff --git a/integration-tests/emulated/chains/relays/polkadot/Cargo.toml b/integration-tests/emulated/chains/relays/polkadot/Cargo.toml index 2ad9fc1dce..82f0cf9639 100644 --- a/integration-tests/emulated/chains/relays/polkadot/Cargo.toml +++ b/integration-tests/emulated/chains/relays/polkadot/Cargo.toml @@ -20,7 +20,7 @@ pallet-im-online = { version = "28.0.0" } pallet-staking = { version = "29.0.0" } # Polkadot -polkadot-primitives = { version = "8.0.0" } +polkadot-primitives = { version = "8.0.1" } # Cumulus parachains-common = { version = "8.0.0" } diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index a594b4d05c..2a41407b8a 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -95,8 +95,8 @@ pallet-election-provider-support-benchmarking = { default-features = false, opti hex-literal = "0.4.1" runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "8.0.1" } -runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "8.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "8.0.0" } +runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "8.0.1" } +primitives = { package = "polkadot-primitives", default-features = false , version = "8.0.1" } xcm = { package = "staging-xcm", default-features = false , version = "8.0.0" } xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "8.0.1" } diff --git a/relay/kusama/constants/Cargo.toml b/relay/kusama/constants/Cargo.toml index 6cc9536760..c9147a3728 100644 --- a/relay/kusama/constants/Cargo.toml +++ b/relay/kusama/constants/Cargo.toml @@ -10,7 +10,7 @@ license.workspace = true smallvec = "1.13.1" frame-support = { default-features = false , version = "29.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "8.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "8.0.1" } runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "8.0.1" } sp-runtime = { default-features = false , version = "32.0.0" } sp-weights = { default-features = false , version = "28.0.0" } diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index c7aeb5c806..5a363430fb 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -91,8 +91,8 @@ pallet-session-benchmarking = { default-features = false, optional = true , vers pallet-nomination-pools-benchmarking = { default-features = false, optional = true , version = "27.0.0" } runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "8.0.1" } -runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "8.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "8.0.0" } +runtime-parachains = { package = "polkadot-runtime-parachains", default-features = false , version = "8.0.1" } +primitives = { package = "polkadot-primitives", default-features = false , version = "8.0.1" } xcm = { package = "staging-xcm", default-features = false , version = "8.0.0" } xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "8.0.1" } diff --git a/relay/polkadot/constants/Cargo.toml b/relay/polkadot/constants/Cargo.toml index 0edbbecf33..76e625f952 100644 --- a/relay/polkadot/constants/Cargo.toml +++ b/relay/polkadot/constants/Cargo.toml @@ -10,7 +10,7 @@ license.workspace = true smallvec = "1.13.1" frame-support = { default-features = false , version = "29.0.0" } -primitives = { package = "polkadot-primitives", default-features = false , version = "8.0.0" } +primitives = { package = "polkadot-primitives", default-features = false , version = "8.0.1" } runtime-common = { package = "polkadot-runtime-common", default-features = false , version = "8.0.1" } sp-runtime = { default-features = false , version = "32.0.0" } sp-weights = { default-features = false , version = "28.0.0" } diff --git a/system-parachains/constants/Cargo.toml b/system-parachains/constants/Cargo.toml index 3137cf2138..89c581e95b 100644 --- a/system-parachains/constants/Cargo.toml +++ b/system-parachains/constants/Cargo.toml @@ -14,7 +14,7 @@ frame-support = { default-features = false , version = "29.0.0" } kusama-runtime-constants = { path = "../../relay/kusama/constants", default-features = false} parachains-common = { default-features = false , version = "8.0.0" } polkadot-core-primitives = { default-features = false, version = "8.0.0"} -polkadot-primitives = { default-features = false , version = "8.0.0" } +polkadot-primitives = { default-features = false , version = "8.0.1" } polkadot-runtime-constants = { path = "../../relay/polkadot/constants", default-features = false} sp-runtime = { default-features = false , version = "32.0.0" } From 5ecbbf2b859cf25e37d9a4fd3f4f5e33749a05bb Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 28 Feb 2024 17:02:16 +0100 Subject: [PATCH 220/316] [coretime] Apply patch https://github.com/paritytech/polkadot-sdk/pull/3497 (part 2) --- Cargo.lock | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b7ce2f6833..9008bf52ea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9832,9 +9832,9 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "8.0.0" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4824ee369a33f69bd2f667a3a9fc8f5bdb5f3f6170c3028c3d0bc58dc824364d" +checksum = "f07f8840f3f2f0bee6264c18ce471c99c925f9afb65952e1d584b6d773cf4115" dependencies = [ "bitvec", "fatality", @@ -9845,6 +9845,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives 8.0.1", "polkadot-statement-table", + "schnellru", "sp-keystore 0.35.0", "thiserror", "tracing-gum", @@ -9979,9 +9980,9 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" -version = "8.0.0" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1e12fff44002ff9b18064888838df26c209c53dc38fafc0d18b714e6912411" +checksum = "b0d0a64371700537c3dc15b3956536e4541f093b7c38ac21737ea9fea3562a83" dependencies = [ "bitvec", "fatality", @@ -10891,13 +10892,14 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "8.0.0" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bfd8ccdbc770e14990e7d4263e2af80930ba0c3197123ac87e1d0775747cb6" +checksum = "de5e010da3c6a65d8f263d0f825a04d995ffc8a37f886f674fcbbc73bf158d01" dependencies = [ "parity-scale-codec", "polkadot-primitives 8.0.1", "sp-core 29.0.0", + "tracing-gum", ] [[package]] From a1ef9f3caf25dc9dac998544ad877ba097a9f7d1 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 28 Feb 2024 17:02:44 +0100 Subject: [PATCH 221/316] Fix collectives-polkadot features propagation for `cumulus-primitives-utility` --- system-parachains/collectives/collectives-polkadot/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index 703fe81fc0..aa4943038c 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -126,6 +126,7 @@ try-runtime = [ "cumulus-pallet-parachain-system/try-runtime", "cumulus-pallet-xcm/try-runtime", "cumulus-pallet-xcmp-queue/try-runtime", + "cumulus-primitives-utility/runtime-benchmarks", "frame-executive/try-runtime", "frame-support/try-runtime", "frame-system/try-runtime", From a8a204e2b7c5e6c5c4db683bb6334533db7344a7 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 28 Feb 2024 19:44:31 +0100 Subject: [PATCH 222/316] Wrong place --- system-parachains/collectives/collectives-polkadot/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index aa4943038c..2f1e0ec511 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -92,6 +92,7 @@ runtime-benchmarks = [ "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", @@ -126,7 +127,6 @@ try-runtime = [ "cumulus-pallet-parachain-system/try-runtime", "cumulus-pallet-xcm/try-runtime", "cumulus-pallet-xcmp-queue/try-runtime", - "cumulus-primitives-utility/runtime-benchmarks", "frame-executive/try-runtime", "frame-support/try-runtime", "frame-system/try-runtime", From 89d89448b99cff44ce3da70da2db385652664644 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 28 Feb 2024 20:39:16 +0100 Subject: [PATCH 223/316] Bump to 1.7 encointer by @brenzi (#6) * bump encointer pallets for sdk 1.7.0 * align sdk crate versions * fix 1.7.0 upgrade changes * nightly fmt * Nit --------- Co-authored-by: Alain Brenzikofer Co-authored-by: brenzi --- Cargo.lock | 5895 ++++++----------- system-parachains/encointer/Cargo.toml | 130 +- system-parachains/encointer/src/lib.rs | 12 +- .../encointer/src/weights/pallet_balances.rs | 116 +- system-parachains/encointer/src/xcm_config.rs | 59 +- 5 files changed, 2219 insertions(+), 3993 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9008bf52ea..e50b95f8fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -203,20 +203,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "aquamarine" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "074b80d14d0240b6ce94d68f059a2d26a5d77280ae142662365a21ef6e2594ef" -dependencies = [ - "include_dir", - "itertools 0.10.5", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "aquamarine" version = "0.5.0" @@ -440,12 +426,12 @@ name = "asset-hub-kusama-emulated-chain" version = "1.0.0" dependencies = [ "asset-hub-kusama-runtime", - "cumulus-primitives-core 0.8.0", + "cumulus-primitives-core", "emulated-integration-tests-common", - "frame-support 29.0.0", + "frame-support", "kusama-emulated-chain", - "parachains-common 8.0.0", - "sp-core 29.0.0", + "parachains-common", + "sp-core", ] [[package]] @@ -455,22 +441,22 @@ dependencies = [ "assert_matches", "asset-hub-kusama-runtime", "asset-test-utils", - "cumulus-pallet-parachain-system 0.8.1", + "cumulus-pallet-parachain-system", "emulated-integration-tests-common", - "frame-support 29.0.0", + "frame-support", "integration-tests-helpers", "kusama-system-emulated-network", "pallet-asset-conversion", - "pallet-assets 30.0.0", - "pallet-balances 29.0.0", - "pallet-message-queue 32.0.0", - "pallet-xcm 8.0.1", - "parachains-common 8.0.0", + "pallet-assets", + "pallet-balances", + "pallet-message-queue", + "pallet-xcm", + "parachains-common", "parity-scale-codec", - "sp-runtime 32.0.0", + "sp-runtime", "staging-kusama-runtime", - "staging-xcm 8.0.0", - "staging-xcm-executor 8.0.1", + "staging-xcm", + "staging-xcm-executor", "system-parachains-constants", ] @@ -484,76 +470,76 @@ dependencies = [ "bp-asset-hub-polkadot", "bp-bridge-hub-kusama", "bp-bridge-hub-polkadot", - "cumulus-pallet-aura-ext 0.8.0", - "cumulus-pallet-dmp-queue 0.8.0", - "cumulus-pallet-parachain-system 0.8.1", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.8.0", - "cumulus-pallet-xcmp-queue 0.8.0", - "cumulus-primitives-core 0.8.0", - "cumulus-primitives-utility 0.8.1", - "frame-benchmarking 29.0.0", - "frame-executive 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "frame-system-benchmarking 29.0.0", - "frame-system-rpc-runtime-api 27.0.0", - "frame-try-runtime 0.35.0", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "hex-literal", "kusama-runtime-constants", "log", "pallet-asset-conversion", "pallet-asset-conversion-tx-payment", - "pallet-assets 30.0.0", - "pallet-aura 28.0.0", - "pallet-authorship 29.0.0", - "pallet-balances 29.0.0", - "pallet-collator-selection 10.0.0", - "pallet-message-queue 32.0.0", + "pallet-assets", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-message-queue", "pallet-multisig", "pallet-nft-fractionalization", "pallet-nfts", "pallet-nfts-runtime-api", - "pallet-proxy 29.0.0", - "pallet-session 29.0.0", + "pallet-proxy", + "pallet-session", "pallet-state-trie-migration", - "pallet-timestamp 28.0.0", - "pallet-transaction-payment 29.0.0", - "pallet-transaction-payment-rpc-runtime-api 29.0.0", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", "pallet-uniques", - "pallet-utility 29.0.0", - "pallet-xcm 8.0.1", - "pallet-xcm-benchmarks 8.0.2", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", "pallet-xcm-bridge-hub-router", - "parachains-common 8.0.0", + "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-core-primitives 8.0.0", - "polkadot-parachain-primitives 7.0.0", - "polkadot-runtime-common 8.0.1", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-common", "polkadot-runtime-constants", "primitive-types", "scale-info", - "sp-api 27.0.0", - "sp-block-builder 27.0.0", - "sp-consensus-aura 0.33.0", - "sp-core 29.0.0", - "sp-genesis-builder 0.8.0", - "sp-inherents 27.0.0", - "sp-io 31.0.0", - "sp-offchain 27.0.0", - "sp-runtime 32.0.0", - "sp-session 28.0.0", - "sp-std", - "sp-storage 20.0.0", - "sp-transaction-pool 27.0.0", - "sp-version 30.0.0", - "sp-weights 28.0.0", - "staging-parachain-info 0.8.0", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", - "staging-xcm-executor 8.0.1", - "substrate-wasm-builder 18.0.0", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "sp-weights", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", "system-parachains-constants", ] @@ -562,12 +548,12 @@ name = "asset-hub-polkadot-emulated-chain" version = "1.0.0" dependencies = [ "asset-hub-polkadot-runtime", - "cumulus-primitives-core 0.8.0", + "cumulus-primitives-core", "emulated-integration-tests-common", - "frame-support 29.0.0", - "parachains-common 8.0.0", + "frame-support", + "parachains-common", "polkadot-emulated-chain", - "sp-core 29.0.0", + "sp-core", ] [[package]] @@ -577,24 +563,24 @@ dependencies = [ "assert_matches", "asset-hub-polkadot-runtime", "asset-test-utils", - "cumulus-pallet-parachain-system 0.8.1", - "cumulus-pallet-xcmp-queue 0.8.0", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", "emulated-integration-tests-common", - "frame-support 29.0.0", + "frame-support", "integration-tests-helpers", - "pallet-assets 30.0.0", - "pallet-balances 29.0.0", - "pallet-message-queue 32.0.0", - "pallet-treasury 28.0.0", - "pallet-xcm 8.0.1", - "parachains-common 8.0.0", + "pallet-assets", + "pallet-balances", + "pallet-message-queue", + "pallet-treasury", + "pallet-xcm", + "parachains-common", "parity-scale-codec", "polkadot-runtime", - "polkadot-runtime-common 8.0.1", + "polkadot-runtime-common", "polkadot-system-emulated-network", - "sp-runtime 32.0.0", - "staging-xcm 8.0.0", - "staging-xcm-executor 8.0.1", + "sp-runtime", + "staging-xcm", + "staging-xcm-executor", "system-parachains-constants", ] @@ -608,72 +594,72 @@ dependencies = [ "bp-asset-hub-polkadot", "bp-bridge-hub-kusama", "bp-bridge-hub-polkadot", - "cumulus-pallet-aura-ext 0.8.0", - "cumulus-pallet-dmp-queue 0.8.0", - "cumulus-pallet-parachain-system 0.8.1", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.8.0", - "cumulus-pallet-xcmp-queue 0.8.0", - "cumulus-primitives-core 0.8.0", - "cumulus-primitives-utility 0.8.1", - "frame-benchmarking 29.0.0", - "frame-executive 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "frame-system-benchmarking 29.0.0", - "frame-system-rpc-runtime-api 27.0.0", - "frame-try-runtime 0.35.0", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-tx-payment 29.0.0", - "pallet-assets 30.0.0", - "pallet-aura 28.0.0", - "pallet-authorship 29.0.0", - "pallet-balances 29.0.0", - "pallet-collator-selection 10.0.0", - "pallet-message-queue 32.0.0", + "pallet-asset-tx-payment", + "pallet-assets", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-message-queue", "pallet-multisig", "pallet-nfts", "pallet-nfts-runtime-api", - "pallet-proxy 29.0.0", - "pallet-session 29.0.0", - "pallet-timestamp 28.0.0", - "pallet-transaction-payment 29.0.0", - "pallet-transaction-payment-rpc-runtime-api 29.0.0", + "pallet-proxy", + "pallet-session", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", "pallet-uniques", - "pallet-utility 29.0.0", - "pallet-xcm 8.0.1", - "pallet-xcm-benchmarks 8.0.2", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", "pallet-xcm-bridge-hub-router", - "parachains-common 8.0.0", + "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-core-primitives 8.0.0", - "polkadot-parachain-primitives 7.0.0", - "polkadot-runtime-common 8.0.1", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-common", "polkadot-runtime-constants", "scale-info", - "sp-api 27.0.0", - "sp-block-builder 27.0.0", - "sp-consensus-aura 0.33.0", - "sp-core 29.0.0", - "sp-genesis-builder 0.8.0", - "sp-inherents 27.0.0", - "sp-io 31.0.0", - "sp-offchain 27.0.0", - "sp-runtime 32.0.0", - "sp-session 28.0.0", - "sp-std", - "sp-storage 20.0.0", - "sp-transaction-pool 27.0.0", - "sp-version 30.0.0", - "sp-weights 28.0.0", - "staging-parachain-info 0.8.0", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", - "staging-xcm-executor 8.0.1", - "substrate-wasm-builder 18.0.0", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "sp-weights", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", "system-parachains-constants", ] @@ -683,28 +669,28 @@ version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d78501ca6b4c848efe233672124ebab9293d8efefc44a728d70f3245a8ef595" dependencies = [ - "cumulus-pallet-parachain-system 0.8.1", - "cumulus-pallet-xcmp-queue 0.8.0", - "cumulus-primitives-core 0.8.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "pallet-assets 30.0.0", - "pallet-balances 29.0.0", - "pallet-collator-selection 10.0.0", - "pallet-session 29.0.0", - "pallet-xcm 8.0.1", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "frame-support", + "frame-system", + "pallet-assets", + "pallet-balances", + "pallet-collator-selection", + "pallet-session", + "pallet-xcm", "pallet-xcm-bridge-hub-router", - "parachains-common 8.0.0", + "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io", + "sp-runtime", "sp-std", - "staging-parachain-info 0.8.0", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", - "staging-xcm-executor 8.0.1", - "substrate-wasm-builder 18.0.0", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", ] [[package]] @@ -713,22 +699,22 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65e90021d772c2dd82d45fd085e05a2cb5866464d4c7421ac6a8007733b350bb" dependencies = [ - "cumulus-primitives-core 0.8.0", - "frame-support 29.0.0", + "cumulus-primitives-core", + "frame-support", "impl-trait-for-tuples", "log", "pallet-asset-conversion", - "pallet-xcm 8.0.1", - "parachains-common 8.0.0", + "pallet-xcm", + "parachains-common", "parity-scale-codec", "scale-info", - "sp-api 27.0.0", - "sp-runtime 32.0.0", + "sp-api", + "sp-runtime", "sp-std", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", - "staging-xcm-executor 8.0.1", - "substrate-wasm-builder 18.0.0", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", ] [[package]] @@ -1044,18 +1030,6 @@ dependencies = [ "byte-tools", ] -[[package]] -name = "bounded-collections" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd" -dependencies = [ - "log", - "parity-scale-codec", - "scale-info", - "serde", -] - [[package]] name = "bounded-collections" version = "0.2.0" @@ -1081,24 +1055,24 @@ dependencies = [ name = "bp-asset-hub-kusama" version = "1.0.0" dependencies = [ - "bp-xcm-bridge-hub-router 0.7.0", - "frame-support 29.0.0", + "bp-xcm-bridge-hub-router", + "frame-support", "parity-scale-codec", "scale-info", "sp-std", - "staging-xcm 8.0.0", + "staging-xcm", ] [[package]] name = "bp-asset-hub-polkadot" version = "1.0.0" dependencies = [ - "bp-xcm-bridge-hub-router 0.7.0", - "frame-support 29.0.0", + "bp-xcm-bridge-hub-router", + "frame-support", "parity-scale-codec", "scale-info", "sp-std", - "staging-xcm 8.0.0", + "staging-xcm", ] [[package]] @@ -1110,10 +1084,10 @@ dependencies = [ "bp-messages", "bp-polkadot-core", "bp-runtime", - "frame-support 29.0.0", - "frame-system 29.0.0", - "polkadot-primitives 8.0.1", - "sp-api 27.0.0", + "frame-support", + "frame-system", + "polkadot-primitives", + "sp-api", "sp-std", ] @@ -1124,11 +1098,11 @@ dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", "bp-runtime", - "frame-support 29.0.0", + "frame-support", "kusama-runtime-constants", "polkadot-runtime-constants", - "sp-api 27.0.0", - "sp-runtime 32.0.0", + "sp-api", + "sp-runtime", "sp-std", ] @@ -1139,11 +1113,11 @@ dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", "bp-runtime", - "frame-support 29.0.0", + "frame-support", "kusama-runtime-constants", "polkadot-runtime-constants", - "sp-api 27.0.0", - "sp-runtime 32.0.0", + "sp-api", + "sp-runtime", "sp-std", ] @@ -1155,13 +1129,13 @@ checksum = "96157f586811969b3911d26cc79e02b28cfbecf859d96d7c12b6af10b9ea9350" dependencies = [ "bp-runtime", "finality-grandpa", - "frame-support 29.0.0", + "frame-support", "parity-scale-codec", "scale-info", "serde", "sp-consensus-grandpa", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", "sp-std", ] @@ -1174,8 +1148,8 @@ dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", - "frame-support 29.0.0", - "sp-api 27.0.0", + "frame-support", + "sp-api", "sp-std", ] @@ -1187,11 +1161,11 @@ checksum = "cf43a49ea13d4c2f141481b6cbff85a197c47fe6aec1f5af21e40b68e8fd02fd" dependencies = [ "bp-header-chain", "bp-runtime", - "frame-support 29.0.0", + "frame-support", "parity-scale-codec", "scale-info", "serde", - "sp-core 29.0.0", + "sp-core", "sp-std", ] @@ -1204,12 +1178,12 @@ dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", - "frame-support 29.0.0", + "frame-support", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", "sp-std", ] @@ -1222,8 +1196,8 @@ dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", - "frame-support 29.0.0", - "sp-api 27.0.0", + "frame-support", + "sp-api", "sp-std", ] @@ -1235,14 +1209,14 @@ checksum = "b862e8dcccc9a3fafb58a1735bc205b7663d3335d7b3dd942503b98f28d6b067" dependencies = [ "bp-messages", "bp-runtime", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-support", + "frame-system", "parity-scale-codec", "parity-util-mem", "scale-info", "serde", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", "sp-std", ] @@ -1254,10 +1228,10 @@ checksum = "74a4b0e2771227611fe9e6a2c37ba2bf7408cf2385a9eb2f44e6096bb0e616ec" dependencies = [ "bp-messages", "bp-runtime", - "frame-support 29.0.0", + "frame-support", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime", "sp-std", ] @@ -1267,8 +1241,8 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b29668fffbc3e4a7ad789b498424ed6d8a313f93544a090bbaaef8a1f7fd243" dependencies = [ - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-support", + "frame-system", "hash-db", "impl-trait-for-tuples", "log", @@ -1276,12 +1250,12 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-state-machine", "sp-std", - "sp-trie 30.0.0", + "sp-trie", "trie-db", ] @@ -1298,12 +1272,12 @@ dependencies = [ "ed25519-dalek", "finality-grandpa", "parity-scale-codec", - "sp-application-crypto 31.0.0", + "sp-application-crypto", "sp-consensus-grandpa", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", "sp-std", - "sp-trie 30.0.0", + "sp-trie", ] [[package]] @@ -1315,18 +1289,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "bp-xcm-bridge-hub-router" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f58cd5d7880f4bc8fc569e5bb0174302cd3f7e18a322e0fec2a4733cced35cb" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", -] - [[package]] name = "bp-xcm-bridge-hub-router" version = "0.7.0" @@ -1335,8 +1297,8 @@ checksum = "86ff4abe93be7bc1663adc41817b1aa3476fbec953ce361537419924310d5dd4" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", ] [[package]] @@ -1344,11 +1306,11 @@ name = "bridge-hub-kusama-emulated-chain" version = "1.0.0" dependencies = [ "bridge-hub-kusama-runtime", - "cumulus-primitives-core 0.8.0", + "cumulus-primitives-core", "emulated-integration-tests-common", - "frame-support 29.0.0", - "parachains-common 8.0.0", - "sp-core 29.0.0", + "frame-support", + "parachains-common", + "sp-core", ] [[package]] @@ -1357,21 +1319,21 @@ version = "1.0.0" dependencies = [ "bp-messages", "bridge-hub-kusama-runtime", - "cumulus-pallet-xcmp-queue 0.8.0", + "cumulus-pallet-xcmp-queue", "emulated-integration-tests-common", - "frame-support 29.0.0", + "frame-support", "integration-tests-helpers", "kusama-polkadot-system-emulated-network", "kusama-system-emulated-network", - "pallet-assets 30.0.0", - "pallet-balances 29.0.0", + "pallet-assets", + "pallet-balances", "pallet-bridge-messages", - "pallet-message-queue 32.0.0", - "pallet-xcm 8.0.1", - "parachains-common 8.0.0", - "sp-runtime 32.0.0", - "staging-xcm 8.0.0", - "staging-xcm-executor 8.0.1", + "pallet-message-queue", + "pallet-xcm", + "parachains-common", + "sp-runtime", + "staging-xcm", + "staging-xcm-executor", ] [[package]] @@ -1392,71 +1354,71 @@ dependencies = [ "bp-runtime", "bridge-hub-test-utils", "bridge-runtime-common", - "cumulus-pallet-aura-ext 0.8.0", - "cumulus-pallet-dmp-queue 0.8.0", - "cumulus-pallet-parachain-system 0.8.1", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.8.0", - "cumulus-pallet-xcmp-queue 0.8.0", - "cumulus-primitives-core 0.8.0", - "cumulus-primitives-utility 0.8.1", - "frame-benchmarking 29.0.0", - "frame-executive 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "frame-system-benchmarking 29.0.0", - "frame-system-rpc-runtime-api 27.0.0", - "frame-try-runtime 0.35.0", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "hex-literal", "kusama-runtime-constants", "log", - "pallet-aura 28.0.0", - "pallet-authorship 29.0.0", - "pallet-balances 29.0.0", + "pallet-aura", + "pallet-authorship", + "pallet-balances", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-collator-selection 10.0.0", - "pallet-message-queue 32.0.0", + "pallet-collator-selection", + "pallet-message-queue", "pallet-multisig", - "pallet-session 29.0.0", - "pallet-timestamp 28.0.0", - "pallet-transaction-payment 29.0.0", - "pallet-transaction-payment-rpc-runtime-api 29.0.0", - "pallet-utility 29.0.0", - "pallet-xcm 8.0.1", - "pallet-xcm-benchmarks 8.0.2", + "pallet-session", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", "pallet-xcm-bridge-hub", - "parachains-common 8.0.0", + "parachains-common", "parity-scale-codec", - "polkadot-core-primitives 8.0.0", - "polkadot-parachain-primitives 7.0.0", - "polkadot-runtime-common 8.0.1", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-common", "polkadot-runtime-constants", "scale-info", "serde", - "sp-api 27.0.0", - "sp-block-builder 27.0.0", - "sp-consensus-aura 0.33.0", - "sp-core 29.0.0", - "sp-genesis-builder 0.8.0", - "sp-inherents 27.0.0", - "sp-io 31.0.0", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", "sp-keyring", - "sp-offchain 27.0.0", - "sp-runtime 32.0.0", - "sp-session 28.0.0", - "sp-std", - "sp-storage 20.0.0", - "sp-transaction-pool 27.0.0", - "sp-version 30.0.0", - "staging-parachain-info 0.8.0", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", - "staging-xcm-executor 8.0.1", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", - "substrate-wasm-builder 18.0.0", + "substrate-wasm-builder", "system-parachains-constants", ] @@ -1465,11 +1427,11 @@ name = "bridge-hub-polkadot-emulated-chain" version = "1.0.0" dependencies = [ "bridge-hub-polkadot-runtime", - "cumulus-primitives-core 0.8.0", + "cumulus-primitives-core", "emulated-integration-tests-common", - "frame-support 29.0.0", - "parachains-common 8.0.0", - "sp-core 29.0.0", + "frame-support", + "parachains-common", + "sp-core", ] [[package]] @@ -1478,20 +1440,20 @@ version = "1.0.0" dependencies = [ "bp-messages", "bridge-hub-polkadot-runtime", - "cumulus-pallet-xcmp-queue 0.8.0", + "cumulus-pallet-xcmp-queue", "emulated-integration-tests-common", - "frame-support 29.0.0", + "frame-support", "integration-tests-helpers", "kusama-polkadot-system-emulated-network", - "pallet-assets 30.0.0", - "pallet-balances 29.0.0", + "pallet-assets", + "pallet-balances", "pallet-bridge-messages", - "pallet-message-queue 32.0.0", - "pallet-xcm 8.0.1", - "parachains-common 8.0.0", - "sp-runtime 32.0.0", - "staging-xcm 8.0.0", - "staging-xcm-executor 8.0.1", + "pallet-message-queue", + "pallet-xcm", + "parachains-common", + "sp-runtime", + "staging-xcm", + "staging-xcm-executor", ] [[package]] @@ -1512,71 +1474,71 @@ dependencies = [ "bp-runtime", "bridge-hub-test-utils", "bridge-runtime-common", - "cumulus-pallet-aura-ext 0.8.0", - "cumulus-pallet-dmp-queue 0.8.0", - "cumulus-pallet-parachain-system 0.8.1", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.8.0", - "cumulus-pallet-xcmp-queue 0.8.0", - "cumulus-primitives-core 0.8.0", - "cumulus-primitives-utility 0.8.1", - "frame-benchmarking 29.0.0", - "frame-executive 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "frame-system-benchmarking 29.0.0", - "frame-system-rpc-runtime-api 27.0.0", - "frame-try-runtime 0.35.0", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "hex-literal", "kusama-runtime-constants", "log", - "pallet-aura 28.0.0", - "pallet-authorship 29.0.0", - "pallet-balances 29.0.0", + "pallet-aura", + "pallet-authorship", + "pallet-balances", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-collator-selection 10.0.0", - "pallet-message-queue 32.0.0", + "pallet-collator-selection", + "pallet-message-queue", "pallet-multisig", - "pallet-session 29.0.0", - "pallet-timestamp 28.0.0", - "pallet-transaction-payment 29.0.0", - "pallet-transaction-payment-rpc-runtime-api 29.0.0", - "pallet-utility 29.0.0", - "pallet-xcm 8.0.1", - "pallet-xcm-benchmarks 8.0.2", + "pallet-session", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", "pallet-xcm-bridge-hub", - "parachains-common 8.0.0", + "parachains-common", "parity-scale-codec", - "polkadot-core-primitives 8.0.0", - "polkadot-parachain-primitives 7.0.0", - "polkadot-runtime-common 8.0.1", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-common", "polkadot-runtime-constants", "scale-info", "serde", - "sp-api 27.0.0", - "sp-block-builder 27.0.0", - "sp-consensus-aura 0.33.0", - "sp-core 29.0.0", - "sp-genesis-builder 0.8.0", - "sp-inherents 27.0.0", - "sp-io 31.0.0", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", "sp-keyring", - "sp-offchain 27.0.0", - "sp-runtime 32.0.0", - "sp-session 28.0.0", - "sp-std", - "sp-storage 20.0.0", - "sp-transaction-pool 27.0.0", - "sp-version 30.0.0", - "staging-parachain-info 0.8.0", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", - "staging-xcm-executor 8.0.1", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", - "substrate-wasm-builder 18.0.0", + "substrate-wasm-builder", "system-parachains-constants", ] @@ -1594,30 +1556,30 @@ dependencies = [ "bp-runtime", "bp-test-utils", "bridge-runtime-common", - "cumulus-pallet-parachain-system 0.8.1", - "cumulus-pallet-xcmp-queue 0.8.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", - "pallet-balances 29.0.0", + "pallet-balances", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-utility 29.0.0", - "parachains-common 8.0.0", + "pallet-utility", + "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "sp-core 29.0.0", - "sp-io 31.0.0", + "sp-core", + "sp-io", "sp-keyring", - "sp-runtime 32.0.0", + "sp-runtime", "sp-std", "sp-tracing", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", - "staging-xcm-executor 8.0.1", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] @@ -1633,27 +1595,27 @@ dependencies = [ "bp-relayers", "bp-runtime", "bp-xcm-bridge-hub", - "bp-xcm-bridge-hub-router 0.7.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "bp-xcm-bridge-hub-router", + "frame-support", + "frame-system", "hash-db", "log", "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-transaction-payment 29.0.0", - "pallet-utility 29.0.0", + "pallet-transaction-payment", + "pallet-utility", "parity-scale-codec", "scale-info", - "sp-api 27.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-api", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", - "sp-trie 30.0.0", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", + "sp-trie", + "staging-xcm", + "staging-xcm-builder", "static_assertions", ] @@ -1854,28 +1816,28 @@ dependencies = [ "bridge-hub-polkadot-runtime", "clap", "collectives-polkadot-runtime", - "cumulus-primitives-core 0.8.0", + "cumulus-primitives-core", "encointer-kusama-runtime", "glutton-kusama-runtime", "kusama-runtime-constants", "pallet-im-online", - "pallet-staking 29.0.0", - "parachains-common 8.0.0", - "polkadot-primitives 8.0.1", + "pallet-staking", + "parachains-common", + "polkadot-primitives", "polkadot-runtime", "polkadot-runtime-constants", - "polkadot-runtime-parachains 8.0.1", + "polkadot-runtime-parachains", "sc-chain-spec", "sc-consensus-grandpa", "serde", "serde_json", - "sp-authority-discovery 27.0.0", - "sp-consensus-babe 0.33.0", + "sp-authority-discovery", + "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", "staging-kusama-runtime", - "staging-xcm 8.0.0", + "staging-xcm", ] [[package]] @@ -2012,83 +1974,83 @@ name = "collectives-polkadot-emulated-chain" version = "0.0.0" dependencies = [ "collectives-polkadot-runtime", - "cumulus-primitives-core 0.8.0", + "cumulus-primitives-core", "emulated-integration-tests-common", - "frame-support 29.0.0", - "parachains-common 8.0.0", - "sp-core 29.0.0", + "frame-support", + "parachains-common", + "sp-core", ] [[package]] name = "collectives-polkadot-runtime" version = "1.0.0" dependencies = [ - "cumulus-pallet-aura-ext 0.8.0", - "cumulus-pallet-dmp-queue 0.8.0", - "cumulus-pallet-parachain-system 0.8.1", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.8.0", - "cumulus-pallet-xcmp-queue 0.8.0", - "cumulus-primitives-core 0.8.0", - "cumulus-primitives-utility 0.8.1", - "frame-benchmarking 29.0.0", - "frame-executive 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "frame-system-benchmarking 29.0.0", - "frame-system-rpc-runtime-api 27.0.0", - "frame-try-runtime 0.35.0", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "hex-literal", "log", "pallet-alliance", - "pallet-asset-rate 8.0.0", - "pallet-aura 28.0.0", - "pallet-authorship 29.0.0", - "pallet-balances 29.0.0", - "pallet-collator-selection 10.0.0", - "pallet-collective 29.0.0", + "pallet-asset-rate", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-collective", "pallet-core-fellowship", - "pallet-message-queue 32.0.0", + "pallet-message-queue", "pallet-multisig", "pallet-preimage", - "pallet-proxy 29.0.0", + "pallet-proxy", "pallet-ranked-collective", "pallet-referenda", "pallet-salary", - "pallet-scheduler 30.0.0", - "pallet-session 29.0.0", - "pallet-timestamp 28.0.0", - "pallet-transaction-payment 29.0.0", - "pallet-transaction-payment-rpc-runtime-api 29.0.0", - "pallet-treasury 28.0.0", - "pallet-utility 29.0.0", - "pallet-xcm 8.0.1", - "parachains-common 8.0.0", - "parity-scale-codec", - "polkadot-core-primitives 8.0.0", - "polkadot-parachain-primitives 7.0.0", - "polkadot-runtime-common 8.0.1", + "pallet-scheduler", + "pallet-session", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-common", "polkadot-runtime-constants", "scale-info", - "sp-api 27.0.0", - "sp-arithmetic 24.0.0", - "sp-block-builder 27.0.0", - "sp-consensus-aura 0.33.0", - "sp-core 29.0.0", - "sp-genesis-builder 0.8.0", - "sp-inherents 27.0.0", - "sp-offchain 27.0.0", - "sp-runtime 32.0.0", - "sp-session 28.0.0", - "sp-std", - "sp-storage 20.0.0", - "sp-transaction-pool 27.0.0", - "sp-version 30.0.0", - "staging-parachain-info 0.8.0", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", - "staging-xcm-executor 8.0.1", - "substrate-wasm-builder 18.0.0", + "sp-api", + "sp-arithmetic", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", "system-parachains-constants", ] @@ -2458,115 +2420,42 @@ dependencies = [ "cipher 0.4.4", ] -[[package]] -name = "cumulus-pallet-aura-ext" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8100a3283be2c46905345141e9a063f092949c6630a1fb70993b04c97f309e55" -dependencies = [ - "cumulus-pallet-parachain-system 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-aura 27.0.0", - "pallet-timestamp 27.0.0", - "parity-scale-codec", - "scale-info", - "sp-application-crypto 30.0.0", - "sp-consensus-aura 0.32.0", - "sp-runtime 31.0.1", - "sp-std", -] - [[package]] name = "cumulus-pallet-aura-ext" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8e78b18548ae3454bc8a46e2bc2e3f521ea547844cbaecc9344d4741f4b1ef" dependencies = [ - "cumulus-pallet-parachain-system 0.8.1", - "frame-support 29.0.0", - "frame-system 29.0.0", - "pallet-aura 28.0.0", - "pallet-timestamp 28.0.0", + "cumulus-pallet-parachain-system", + "frame-support", + "frame-system", + "pallet-aura", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 31.0.0", - "sp-consensus-aura 0.33.0", - "sp-runtime 32.0.0", + "sp-application-crypto", + "sp-consensus-aura", + "sp-runtime", "sp-std", ] -[[package]] -name = "cumulus-pallet-dmp-queue" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f461956a4a85c053657fe64e73852940c8a52e7d8fc20ccb4f91688e73f0820b" -dependencies = [ - "cumulus-primitives-core 0.7.0", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-std", - "staging-xcm 7.0.0", -] - [[package]] name = "cumulus-pallet-dmp-queue" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ebf036bcb1e61c943cf588d14b903234594fb2538f2d7dae36e20fcc3c86e8" dependencies = [ - "cumulus-primitives-core 0.8.0", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-std", - "staging-xcm 8.0.0", -] - -[[package]] -name = "cumulus-pallet-parachain-system" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1a0e6800ea92447eab2c9170cc77d21987fd0e61ed79a6e1318f7b127b3e2c" -dependencies = [ - "bytes", - "cumulus-pallet-parachain-system-proc-macro", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-parachain-inherent 0.7.0", - "cumulus-primitives-proof-size-hostfunction 0.2.0", - "environmental", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "impl-trait-for-tuples", + "cumulus-primitives-core", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-message-queue 31.0.0", "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "polkadot-runtime-parachains 7.0.0", "scale-info", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-io", + "sp-runtime", "sp-std", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "staging-xcm 7.0.0", - "trie-db", + "staging-xcm", ] [[package]] @@ -2577,31 +2466,31 @@ checksum = "1a215fe4d66d23e8f3956bd21b9d80d2b33239f3b150b36d56fa238cfc9421a5" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", - "cumulus-primitives-core 0.8.0", - "cumulus-primitives-parachain-inherent 0.8.0", - "cumulus-primitives-proof-size-hostfunction 0.3.0", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-primitives-proof-size-hostfunction", "environmental", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", - "pallet-message-queue 32.0.0", + "pallet-message-queue", "parity-scale-codec", - "polkadot-parachain-primitives 7.0.0", - "polkadot-runtime-common 8.0.1", - "polkadot-runtime-parachains 8.0.1", + "polkadot-parachain-primitives", + "polkadot-runtime-common", + "polkadot-runtime-parachains", "scale-info", - "sp-core 29.0.0", - "sp-externalities 0.26.0", - "sp-inherents 27.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-core", + "sp-externalities", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-state-machine", "sp-std", - "sp-trie 30.0.0", - "sp-version 30.0.0", - "staging-xcm 8.0.0", + "sp-trie", + "sp-version", + "staging-xcm", "trie-db", ] @@ -2623,30 +2512,13 @@ version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f3259f743f70f39baa3abf2d9d8de864e18120465f8731b99bef039a3bf9329" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "pallet-session 29.0.0", - "parity-scale-codec", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "cumulus-pallet-xcm" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9e5e8dd3f9c98620e32cbb1783725a3e75a3147cb351b43de37663824311cd9" -dependencies = [ - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-session", "parity-scale-codec", - "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std", - "staging-xcm 7.0.0", ] [[package]] @@ -2655,41 +2527,15 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e802291060763f8d1176bf808da97aafe5afe7351f62bb093c317c1d35c5cee" dependencies = [ - "cumulus-primitives-core 0.8.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "parity-scale-codec", - "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-std", - "staging-xcm 8.0.0", -] - -[[package]] -name = "cumulus-pallet-xcmp-queue" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439cdba45813623e7f45374f160f3356d27fb1aaca2536dd7f60ef2a7e9b30cd" -dependencies = [ - "bounded-collections 0.1.9", - "bp-xcm-bridge-hub-router 0.6.0", - "cumulus-primitives-core 0.7.0", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "pallet-message-queue 31.0.0", + "cumulus-primitives-core", + "frame-support", + "frame-system", "parity-scale-codec", - "polkadot-runtime-common 7.0.0", - "polkadot-runtime-parachains 7.0.0", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std", - "staging-xcm 7.0.0", - "staging-xcm-executor 7.0.3", + "staging-xcm", ] [[package]] @@ -2698,42 +2544,24 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fa22d6e479a4d3a2790bab291269ba0917a1ac384255a54a2ebc3f7c37e505e" dependencies = [ - "bounded-collections 0.2.0", - "bp-xcm-bridge-hub-router 0.7.0", - "cumulus-primitives-core 0.8.0", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "bounded-collections", + "bp-xcm-bridge-hub-router", + "cumulus-primitives-core", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-message-queue 32.0.0", + "pallet-message-queue", "parity-scale-codec", - "polkadot-runtime-common 8.0.1", - "polkadot-runtime-parachains 8.0.1", + "polkadot-runtime-common", + "polkadot-runtime-parachains", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", - "staging-xcm 8.0.0", - "staging-xcm-executor 8.0.1", -] - -[[package]] -name = "cumulus-primitives-core" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "036b64697b5fd04c8039ccf15b9891104c496afb6c418c2cea1234d4898d0a28" -dependencies = [ - "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", - "scale-info", - "sp-api 26.0.0", - "sp-runtime 31.0.1", - "sp-std", - "sp-trie 29.0.0", - "staging-xcm 7.0.0", + "staging-xcm", + "staging-xcm-executor", ] [[package]] @@ -2743,31 +2571,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9df07f6825fd50ea30aae335e43dc1a615a05de7465f5f329b9e414f2c886a12" dependencies = [ "parity-scale-codec", - "polkadot-core-primitives 8.0.0", - "polkadot-parachain-primitives 7.0.0", - "polkadot-primitives 8.0.1", - "scale-info", - "sp-api 27.0.0", - "sp-runtime 32.0.0", - "sp-std", - "sp-trie 30.0.0", - "staging-xcm 8.0.0", -] - -[[package]] -name = "cumulus-primitives-parachain-inherent" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cb6fe06744fed6e84682c48816181ad63652003570c2135c425481440fcd2f2" -dependencies = [ - "async-trait", - "cumulus-primitives-core 0.7.0", - "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", "scale-info", - "sp-core 28.0.0", - "sp-inherents 26.0.0", + "sp-api", + "sp-runtime", "sp-std", - "sp-trie 29.0.0", + "sp-trie", + "staging-xcm", ] [[package]] @@ -2777,24 +2589,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38ad140a065a6b8001fb26ec42b91391e90fde120f5b4e57986698249a9b98c8" dependencies = [ "async-trait", - "cumulus-primitives-core 0.8.0", + "cumulus-primitives-core", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-inherents 27.0.0", + "sp-core", + "sp-inherents", "sp-std", - "sp-trie 30.0.0", -] - -[[package]] -name = "cumulus-primitives-proof-size-hostfunction" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a132e17ac2c79436bc5004b0d56cb35ca65b966434f14e5ff8a9bc1afcfca5a4" -dependencies = [ - "sp-externalities 0.25.0", - "sp-runtime-interface 24.0.0", - "sp-trie 29.0.0", + "sp-trie", ] [[package]] @@ -2803,30 +2604,9 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b74f9141190b9f4bf96a947ade46da64097b77f1ebfa8d611c81724250e119" dependencies = [ - "sp-externalities 0.26.0", - "sp-runtime-interface 25.0.0", - "sp-trie 30.0.0", -] - -[[package]] -name = "cumulus-primitives-utility" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ece52eeb7e87faea0d374356571ebc13f279df3bf79a1dc8a0db6c49d6ba23" -dependencies = [ - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", - "log", - "pallet-xcm-benchmarks 7.0.4", - "parity-scale-codec", - "polkadot-runtime-common 7.0.0", - "polkadot-runtime-parachains 7.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-std", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "sp-externalities", + "sp-runtime-interface", + "sp-trie", ] [[package]] @@ -2835,19 +2615,19 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e65466e56d642f979b556d098a03755ae51972fff5fa0f9b1cdcfdb3df062ea3" dependencies = [ - "cumulus-primitives-core 0.8.0", - "frame-support 29.0.0", + "cumulus-primitives-core", + "frame-support", "log", "pallet-asset-conversion", "parity-scale-codec", - "polkadot-runtime-common 8.0.1", - "polkadot-runtime-parachains 8.0.1", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "polkadot-runtime-common", + "polkadot-runtime-parachains", + "sp-io", + "sp-runtime", "sp-std", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", - "staging-xcm-executor 8.0.1", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] @@ -2856,13 +2636,13 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfff604ad01c5c0c397f9a971c8cec6443aea3658813778875b4f64de07847d5" dependencies = [ - "cumulus-primitives-core 0.8.0", + "cumulus-primitives-core", "parity-scale-codec", - "polkadot-primitives 8.0.1", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "polkadot-primitives", + "sp-runtime", + "sp-state-machine", "sp-std", - "sp-trie 30.0.0", + "sp-trie", ] [[package]] @@ -3299,27 +3079,27 @@ dependencies = [ "asset-test-utils", "bp-messages", "bridge-runtime-common", - "cumulus-pallet-parachain-system 0.8.1", - "cumulus-pallet-xcmp-queue 0.8.0", - "cumulus-primitives-core 0.8.0", - "frame-support 29.0.0", - "pallet-assets 30.0.0", - "pallet-balances 29.0.0", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "frame-support", + "pallet-assets", + "pallet-balances", "pallet-bridge-messages", - "pallet-message-queue 32.0.0", - "pallet-xcm 8.0.1", - "parachains-common 8.0.0", + "pallet-message-queue", + "pallet-xcm", + "parachains-common", "parity-scale-codec", "paste", - "polkadot-primitives 8.0.1", - "polkadot-runtime-parachains 8.0.1", + "polkadot-primitives", + "polkadot-runtime-parachains", "polkadot-service", "sc-consensus-grandpa", - "sp-authority-discovery 27.0.0", - "sp-consensus-babe 0.33.0", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "staging-xcm 8.0.0", + "sp-authority-discovery", + "sp-consensus-babe", + "sp-core", + "sp-runtime", + "staging-xcm", "xcm-emulator", ] @@ -3331,43 +3111,43 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encointer-balances-tx-payment" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "407d7faa8fd1d242602012e6b6d51a8edc99321ac5a20425efa64c7ec432f868" +checksum = "4bab150ba5131d8e59e861d21b900d123cc55604160c118fb8b2293af5a40d3a" dependencies = [ "encointer-primitives", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support", + "frame-system", "log", - "pallet-asset-tx-payment 28.0.0", + "pallet-asset-tx-payment", "pallet-encointer-balances", "pallet-encointer-ceremonies", - "pallet-transaction-payment 28.0.0", - "sp-runtime 31.0.1", + "pallet-transaction-payment", + "sp-runtime", ] [[package]] name = "encointer-balances-tx-payment-rpc-runtime-api" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb7b235a2ecbec5b913ee30c4372a9bb01c27cbca1368662ad9629df788a1be" +checksum = "1086972f2ea49903c0f7051ec6ad0180e81df47c2b6699f1ff279afba749bba6" dependencies = [ "encointer-primitives", - "frame-support 28.0.0", + "frame-support", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", + "sp-api", "sp-std", ] [[package]] name = "encointer-ceremonies-assignment" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f5e534e5d624f17a34ae5c6cf61ddbfd68b6a2d3900d855760ebb551f9d4fdd" +checksum = "2ebd5dc49f5f6fb321b2e7315bf29e26f3d5f38a1e344f36213137e58fbd54ea" dependencies = [ "encointer-primitives", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std", ] @@ -3375,30 +3155,30 @@ dependencies = [ name = "encointer-kusama-runtime" version = "1.0.0" dependencies = [ - "cumulus-pallet-aura-ext 0.7.0", - "cumulus-pallet-dmp-queue 0.7.0", - "cumulus-pallet-parachain-system 0.7.0", - "cumulus-pallet-xcm 0.7.0", - "cumulus-pallet-xcmp-queue 0.7.0", - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.3", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", "encointer-balances-tx-payment", "encointer-balances-tx-payment-rpc-runtime-api", "encointer-primitives", - "frame-benchmarking 28.0.0", - "frame-executive 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-system-benchmarking 28.0.0", - "frame-system-rpc-runtime-api 26.0.0", - "frame-try-runtime 0.34.0", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-tx-payment 28.0.0", - "pallet-aura 27.0.0", - "pallet-balances 28.0.0", - "pallet-collective 28.0.0", + "pallet-asset-tx-payment", + "pallet-aura", + "pallet-balances", + "pallet-collective", "pallet-encointer-balances", "pallet-encointer-bazaar", "pallet-encointer-bazaar-rpc-runtime-api", @@ -3411,74 +3191,74 @@ dependencies = [ "pallet-encointer-scheduler", "pallet-insecure-randomness-collective-flip", "pallet-membership", - "pallet-message-queue 31.0.0", - "pallet-proxy 28.0.0", - "pallet-scheduler 29.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-transaction-payment-rpc-runtime-api 28.0.0", - "pallet-treasury 27.0.0", - "pallet-utility 28.0.0", - "pallet-xcm 7.0.0", - "parachains-common 7.0.0", - "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", + "pallet-message-queue", + "pallet-proxy", + "pallet-scheduler", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-common", "scale-info", "smallvec", - "sp-api 26.0.0", - "sp-block-builder 26.0.0", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-offchain 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-std", - "sp-transaction-pool 26.0.0", - "sp-version 29.0.0", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", "system-parachains-constants", ] [[package]] name = "encointer-meetup-validation" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d27e886abe0f6fb716dcf7ee0b4e91ae624d96dce6e87c1d5bada9a4bf76d3" +checksum = "aa8b43179179d387317d14bd69335aafb7663f49b77203950fe4deadf1439ed7" dependencies = [ "encointer-primitives", "parity-scale-codec", "scale-info", "serde", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std", ] [[package]] name = "encointer-primitives" -version = "5.0.0" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9db298e46082c2f9692d6e8d5365fde266ac09ed18dd1c72c109281acad1b2fb" +checksum = "a4d3adcceca350eed739e9677fae4e1bea6c7ad526eee456ca30037cbcfe9b9a" dependencies = [ - "bs58 0.4.0", + "bs58 0.5.0", "crc", "ep-core", - "frame-support 28.0.0", + "frame-support", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", "substrate-geohash", ] @@ -3547,18 +3327,18 @@ checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" [[package]] name = "ep-core" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84eac7952f21e9d5a28e5e3074a2ed1e7d26bbc08da770e43ec538ba2ee0d124" +checksum = "0b20f3b698c54e106bcb0533055bf99d64ae9c53261e7ed24366d1ca729a1259" dependencies = [ "array-bytes 6.2.2", "impl-serde", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic", + "sp-core", + "sp-runtime", "sp-std", "substrate-fixed", ] @@ -3842,55 +3622,29 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" -[[package]] -name = "frame-benchmarking" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b16f7f853f64ec6fbc981b3e224cc3400752662da140ec62c160b5b859bab68" -dependencies = [ - "frame-support 28.0.0", - "frame-support-procedural 23.0.0", - "frame-system 28.0.0", - "linregress", - "log", - "parity-scale-codec", - "paste", - "scale-info", - "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-runtime-interface 24.0.0", - "sp-std", - "sp-storage 19.0.0", - "static_assertions", -] - [[package]] name = "frame-benchmarking" version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4090659c6aaa3c4d5b6c6ec909b4b0a25dec10ad92aad5f729efa8d5bd4d806a" dependencies = [ - "frame-support 29.0.0", - "frame-support-procedural 24.0.0", - "frame-system 29.0.0", + "frame-support", + "frame-support-procedural", + "frame-system", "linregress", "log", "parity-scale-codec", "paste", "scale-info", "serde", - "sp-api 27.0.0", - "sp-application-crypto 31.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-runtime-interface 25.0.0", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-runtime-interface", "sp-std", - "sp-storage 20.0.0", + "sp-storage", "static_assertions", ] @@ -3905,9 +3659,9 @@ dependencies = [ "chrono", "clap", "comfy-table", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "gethostname", "handlebars", "itertools 0.10.5", @@ -3926,18 +3680,18 @@ dependencies = [ "sc-sysinfo", "serde", "serde_json", - "sp-api 27.0.0", + "sp-api", "sp-blockchain", - "sp-core 29.0.0", + "sp-core", "sp-database", - "sp-externalities 0.26.0", - "sp-inherents 27.0.0", - "sp-io 31.0.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", - "sp-storage 20.0.0", - "sp-trie 30.0.0", + "sp-externalities", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-state-machine", + "sp-storage", + "sp-trie", "sp-wasm-interface", "thiserror", "thousands", @@ -3955,24 +3709,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "frame-election-provider-support" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c596d956c4eedaffbe2fd6f75562e63e3e60001222bc6f8cc45fa77f3ea51791" -dependencies = [ - "frame-election-provider-solution-type", - "frame-support 28.0.0", - "frame-system 28.0.0", - "parity-scale-codec", - "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", - "sp-std", -] - [[package]] name = "frame-election-provider-support" version = "29.0.0" @@ -3980,34 +3716,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87da19ee99e6473cd057ead84337d20011fe5e299c6750e88e43b8b7963b8852" dependencies = [ "frame-election-provider-solution-type", - "frame-support 29.0.0", - "frame-system 29.0.0", - "parity-scale-codec", - "scale-info", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-npos-elections 27.0.0", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "frame-executive" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5247e367912fe95f813e96542921ab4edf671860fd557625b55f40155abf90" -dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", - "frame-try-runtime 0.34.0", - "log", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic", + "sp-core", + "sp-npos-elections", + "sp-runtime", "sp-std", - "sp-tracing", ] [[package]] @@ -4016,15 +3733,15 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09bff9574ee2dcc349f646e1d2faadf76afd688c2ea1bbac5e4a0e19a0c19c59" dependencies = [ - "frame-support 29.0.0", - "frame-system 29.0.0", - "frame-try-runtime 0.35.0", + "frame-support", + "frame-system", + "frame-try-runtime", "log", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", "sp-tracing", ] @@ -4053,72 +3770,30 @@ dependencies = [ "log", "parity-scale-codec", "serde", - "sp-core 29.0.0", + "sp-core", "sp-crypto-hashing", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-io", + "sp-runtime", + "sp-state-machine", "spinners", "substrate-rpc-client", "tokio", "tokio-retry", ] -[[package]] -name = "frame-support" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48b00bb3e82c465a435b08827e7abe5144345bc1a998848bdd7ce72fa203bb5" -dependencies = [ - "aquamarine 0.4.0", - "array-bytes 6.2.2", - "bitflags 1.3.2", - "docify", - "environmental", - "frame-metadata", - "frame-support-procedural 23.0.0", - "impl-trait-for-tuples", - "k256", - "log", - "macro_magic", - "parity-scale-codec", - "paste", - "scale-info", - "serde", - "serde_json", - "smallvec", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-core-hashing-proc-macro", - "sp-debug-derive", - "sp-genesis-builder 0.7.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-metadata-ir", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", - "sp-state-machine 0.35.0", - "sp-std", - "sp-tracing", - "sp-weights 27.0.0", - "static_assertions", - "tt-call", -] - [[package]] name = "frame-support" version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3b24824d29c43d0af94be3356bbf30338ededed649f6841d315a9ae067ce872" dependencies = [ - "aquamarine 0.5.0", + "aquamarine", "array-bytes 6.2.2", "bitflags 1.3.2", "docify", "environmental", "frame-metadata", - "frame-support-procedural 24.0.0", + "frame-support-procedural", "impl-trait-for-tuples", "k256", "log", @@ -4129,45 +3804,25 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-api 27.0.0", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", + "sp-api", + "sp-arithmetic", + "sp-core", "sp-crypto-hashing-proc-macro", "sp-debug-derive", - "sp-genesis-builder 0.8.0", - "sp-inherents 27.0.0", - "sp-io 31.0.0", + "sp-genesis-builder", + "sp-inherents", + "sp-io", "sp-metadata-ir", - "sp-runtime 32.0.0", - "sp-staking 27.0.0", - "sp-state-machine 0.36.0", + "sp-runtime", + "sp-staking", + "sp-state-machine", "sp-std", "sp-tracing", - "sp-weights 28.0.0", + "sp-weights", "static_assertions", "tt-call", ] -[[package]] -name = "frame-support-procedural" -version = "23.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0be717139a0da9b31b559356db73f6ce48876d331e833ebdc32de3a9ad581e15" -dependencies = [ - "Inflector", - "cfg-expr", - "derive-syn-parse", - "expander 2.0.0", - "frame-support-procedural-tools", - "itertools 0.10.5", - "macro_magic", - "proc-macro-warning", - "proc-macro2", - "quote", - "sp-core-hashing", - "syn 2.0.48", -] - [[package]] name = "frame-support-procedural" version = "24.0.0" @@ -4214,121 +3869,61 @@ dependencies = [ [[package]] name = "frame-system" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "983b3215c8d97775b90dc1db88f858c46401682bd2fb8572bdd102ff8c2ca2a6" +checksum = "5bc20a793c3cec0b11165c1075fe11a255b2491f3eef8230bb3073cb296e7383" dependencies = [ "cfg-if", "docify", - "frame-support 28.0.0", + "frame-support", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", - "sp-version 29.0.0", - "sp-weights 27.0.0", + "sp-version", + "sp-weights", ] [[package]] -name = "frame-system" +name = "frame-system-benchmarking" version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc20a793c3cec0b11165c1075fe11a255b2491f3eef8230bb3073cb296e7383" +checksum = "ac47ee48fee3a0b49c9ab9ee68997dee3733776a355f780cf2858449cf495d69" dependencies = [ - "cfg-if", - "docify", - "frame-support 29.0.0", - "log", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "serde", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", "sp-std", - "sp-version 30.0.0", - "sp-weights 28.0.0", ] [[package]] -name = "frame-system-benchmarking" -version = "28.0.0" +name = "frame-system-rpc-runtime-api" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f78a2fe203b01b596156b2514e0b890b4a628dbdb50925316e755aa623b6fe53" +checksum = "4c1b20433c3c76b56ce905ed971631ec8c34fa64cf6c20e590afe46455fc0cc8" dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", "parity-scale-codec", - "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-std", + "sp-api", ] [[package]] -name = "frame-system-benchmarking" -version = "29.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac47ee48fee3a0b49c9ab9ee68997dee3733776a355f780cf2858449cf495d69" -dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "parity-scale-codec", - "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "frame-system-rpc-runtime-api" -version = "26.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d183819ea7df1d89acd61fe423ae6bec24a29d87db5c18182339a751c0837a" -dependencies = [ - "parity-scale-codec", - "sp-api 26.0.0", -] - -[[package]] -name = "frame-system-rpc-runtime-api" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c1b20433c3c76b56ce905ed971631ec8c34fa64cf6c20e590afe46455fc0cc8" -dependencies = [ - "parity-scale-codec", - "sp-api 27.0.0", -] - -[[package]] -name = "frame-try-runtime" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5b3dab79d14d2e8f6329d7e5cb49f2bdb81b9ef3019b1c405d94defa137a353" -dependencies = [ - "frame-support 28.0.0", - "parity-scale-codec", - "sp-api 26.0.0", - "sp-runtime 31.0.1", - "sp-std", -] - -[[package]] -name = "frame-try-runtime" -version = "0.35.0" +name = "frame-try-runtime" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eab87d07bc2f9a2160b818d1b7506c303b3b28b6a8a5f01dc5e2641390450b5" dependencies = [ - "frame-support 29.0.0", + "frame-support", "parity-scale-codec", - "sp-api 27.0.0", - "sp-runtime 32.0.0", + "sp-api", + "sp-runtime", "sp-std", ] @@ -4582,39 +4177,39 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" name = "glutton-kusama-runtime" version = "1.0.0" dependencies = [ - "cumulus-pallet-parachain-system 0.8.1", - "cumulus-pallet-xcm 0.8.0", - "cumulus-primitives-core 0.8.0", - "frame-benchmarking 29.0.0", - "frame-executive 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "frame-system-benchmarking 29.0.0", - "frame-system-rpc-runtime-api 27.0.0", - "frame-try-runtime 0.35.0", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcm", + "cumulus-primitives-core", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "pallet-glutton", - "pallet-message-queue 32.0.0", + "pallet-message-queue", "pallet-sudo", - "parachains-common 8.0.0", - "parity-scale-codec", - "scale-info", - "sp-api 27.0.0", - "sp-block-builder 27.0.0", - "sp-core 29.0.0", - "sp-genesis-builder 0.8.0", - "sp-inherents 27.0.0", - "sp-offchain 27.0.0", - "sp-runtime 32.0.0", - "sp-session 28.0.0", - "sp-std", - "sp-storage 20.0.0", - "sp-transaction-pool 27.0.0", - "sp-version 30.0.0", - "staging-parachain-info 0.8.0", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", - "staging-xcm-executor 8.0.1", - "substrate-wasm-builder 18.0.0", + "parachains-common", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-block-builder", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", "system-parachains-constants", ] @@ -5106,12 +4701,12 @@ name = "integration-tests-helpers" version = "1.0.0" dependencies = [ "asset-test-utils", - "cumulus-pallet-xcmp-queue 0.8.0", - "pallet-balances 29.0.0", - "pallet-message-queue 32.0.0", - "pallet-xcm 8.0.1", + "cumulus-pallet-xcmp-queue", + "pallet-balances", + "pallet-message-queue", + "pallet-xcm", "paste", - "staging-xcm 8.0.0", + "staging-xcm", "xcm-emulator", ] @@ -5391,13 +4986,13 @@ dependencies = [ "emulated-integration-tests-common", "kusama-runtime-constants", "pallet-im-online", - "parachains-common 8.0.0", - "polkadot-primitives 8.0.1", + "parachains-common", + "polkadot-primitives", "sc-consensus-grandpa", - "sp-authority-discovery 27.0.0", - "sp-consensus-babe 0.33.0", + "sp-authority-discovery", + "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 29.0.0", + "sp-core", "staging-kusama-runtime", ] @@ -5419,14 +5014,14 @@ dependencies = [ name = "kusama-runtime-constants" version = "1.0.0" dependencies = [ - "frame-support 29.0.0", - "polkadot-primitives 8.0.1", - "polkadot-runtime-common 8.0.1", + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", "smallvec", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "sp-weights 28.0.0", - "staging-xcm-builder 8.0.1", + "sp-core", + "sp-runtime", + "sp-weights", + "staging-xcm-builder", ] [[package]] @@ -6358,13 +5953,13 @@ dependencies = [ "parity-scale-codec", "sc-client-api", "sc-offchain", - "sp-api 27.0.0", + "sp-api", "sp-blockchain", "sp-consensus", "sp-consensus-beefy", - "sp-core 29.0.0", + "sp-core", "sp-mmr-primitives", - "sp-runtime 32.0.0", + "sp-runtime", ] [[package]] @@ -6376,11 +5971,11 @@ dependencies = [ "jsonrpsee", "parity-scale-codec", "serde", - "sp-api 27.0.0", + "sp-api", "sp-blockchain", - "sp-core 29.0.0", + "sp-core", "sp-mmr-primitives", - "sp-runtime 32.0.0", + "sp-runtime", ] [[package]] @@ -6898,18 +6493,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2807a0de560760490eb581095a23a68377308879bd6096b0f100795b53898db6" dependencies = [ "array-bytes 6.2.2", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-collective 29.0.0", - "pallet-identity 29.0.0", + "pallet-collective", + "pallet-identity", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", + "sp-core", "sp-crypto-hashing", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io", + "sp-runtime", "sp-std", ] @@ -6919,16 +6514,16 @@ version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4079f12db3cf98daa717337ab5b7e5ef15aa3bec3b497f501dc715d129b500da" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-api 27.0.0", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", ] @@ -6938,29 +6533,13 @@ version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2019e84d65bf6c6105edb61cd6b6f4c6d9a1b347e05d9380e92b0dcf2a29fd7" dependencies = [ - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-support", + "frame-system", "pallet-asset-conversion", - "pallet-transaction-payment 29.0.0", - "parity-scale-codec", - "scale-info", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "pallet-asset-rate" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6f4917bc6c9ed6864813bbb828e94c63e1878a21af89d25dd0ff7da742f53e" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std", ] @@ -6970,32 +6549,13 @@ version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "571ce57fd846911041749832b46a8c2b01f0b79ffebcd7585e3973865607036d" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "parity-scale-codec", - "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "pallet-asset-tx-payment" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e967664d86219ca9f7d33504e8d914225cdb92e9e793d35edaab1fd2574f162f" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-transaction-payment 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core", + "sp-runtime", "sp-std", ] @@ -7005,33 +6565,16 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed783679921ad8b96807d683d320c314e305753b230d5c04dc713bab7aca64c" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "pallet-transaction-payment 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-transaction-payment", "parity-scale-codec", "scale-info", "serde", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "pallet-assets" -version = "29.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aca79db2bc70c269170893604d8a56d0f32d52c75a23a3d887b6b4df132366b7" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", ] @@ -7041,32 +6584,14 @@ version = "30.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46728a98a910af13f6a77033dd053456650773bb7adc71e0ba845bff7e31b33e" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "pallet-aura" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10c6ecf016520a6883df14b2f1d469d98166377eba4b299af7b76eee0130e3a6" -dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-timestamp 27.0.0", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-consensus-aura 0.32.0", - "sp-runtime 31.0.1", + "sp-core", + "sp-runtime", "sp-std", ] @@ -7076,32 +6601,15 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a611bef3c8cf281e41a43f32a4153260bdc8b7b61b901e65c7a4442529224e11" dependencies = [ - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-support", + "frame-system", "log", - "pallet-timestamp 28.0.0", - "parity-scale-codec", - "scale-info", - "sp-application-crypto 31.0.0", - "sp-consensus-aura 0.33.0", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "pallet-authority-discovery" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9224b0a0bb4fa721d51f56947c73d4189710691b4cb40e7f7a8abf59795759a" -dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", - "pallet-session 28.0.0", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-authority-discovery 26.0.0", - "sp-runtime 31.0.1", + "sp-application-crypto", + "sp-consensus-aura", + "sp-runtime", "sp-std", ] @@ -7111,29 +6619,14 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "904f83f518b396c4fd1634fb675a36db0841f22420d3aa664bc154bee6035f57" dependencies = [ - "frame-support 29.0.0", - "frame-system 29.0.0", - "pallet-session 29.0.0", - "parity-scale-codec", - "scale-info", - "sp-application-crypto 31.0.0", - "sp-authority-discovery 27.0.0", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "pallet-authorship" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "817b0420f9c14bd9bfbaf9e2f769a7e8124ab4fe3da0d07c80485c0901947ab8" -dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", - "impl-trait-for-tuples", + "frame-support", + "frame-system", + "pallet-session", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-application-crypto", + "sp-authority-discovery", + "sp-runtime", "sp-std", ] @@ -7143,37 +6636,12 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d83773e731a1760f99684b09961ed7b92acafe335f36f08ebb8313d3b9c72e2" dependencies = [ - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-support", + "frame-system", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "pallet-babe" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ba445228a941062d7c4d6295810a359df7757d6182c36ddb824f8c3bf350380" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "pallet-authorship 28.0.0", - "pallet-session 28.0.0", - "pallet-timestamp 27.0.0", - "parity-scale-codec", - "scale-info", - "sp-application-crypto 30.0.0", - "sp-consensus-babe 0.32.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", + "sp-runtime", "sp-std", ] @@ -7183,22 +6651,22 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3f2020c52667a650d64e84a4bbb63388e25bc1c9bc872a8243d03bfcb285049" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-authorship 29.0.0", - "pallet-session 29.0.0", - "pallet-timestamp 28.0.0", + "pallet-authorship", + "pallet-session", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 31.0.0", - "sp-consensus-babe 0.33.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-session 28.0.0", - "sp-staking 27.0.0", + "sp-application-crypto", + "sp-consensus-babe", + "sp-core", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", "sp-std", ] @@ -7208,39 +6676,23 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd27bfa4bfa5751652842b81241c7eff3e68f2806d9dacc17b03d2cb20a39756" dependencies = [ - "aquamarine 0.5.0", + "aquamarine", "docify", - "frame-benchmarking 29.0.0", - "frame-election-provider-support 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", "log", - "pallet-balances 29.0.0", + "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", "sp-tracing", ] -[[package]] -name = "pallet-balances" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8406b5616e468d80972b6365f3cd8211d0dbf4d107b379fac85fddcfdf0b5562" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-runtime 31.0.1", - "sp-std", -] - [[package]] name = "pallet-balances" version = "29.0.0" @@ -7248,13 +6700,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "942007f4f7aace74b77009db1675e7ca98683a42dde5e2d85bba2a9f404d2e5a" dependencies = [ "docify", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime", "sp-std", ] @@ -7264,18 +6716,18 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4bedd80e9d8b196f31ea134efd271fdc1b8380ca3aa2d8af6ea8b5a0dc4fa460" dependencies = [ - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-support", + "frame-system", "log", - "pallet-authorship 29.0.0", - "pallet-session 29.0.0", + "pallet-authorship", + "pallet-session", "parity-scale-codec", "scale-info", "serde", "sp-consensus-beefy", - "sp-runtime 32.0.0", - "sp-session 28.0.0", - "sp-staking 27.0.0", + "sp-runtime", + "sp-session", + "sp-staking", "sp-std", ] @@ -7287,21 +6739,21 @@ checksum = "7d334f24d3c0c016d16aa87d069485847d622e8ebebace18ec5cf56609ca3a67" dependencies = [ "array-bytes 6.2.2", "binary-merkle-tree", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-support", + "frame-system", "log", "pallet-beefy", "pallet-mmr", - "pallet-session 29.0.0", + "pallet-session", "parity-scale-codec", "scale-info", "serde", - "sp-api 27.0.0", + "sp-api", "sp-consensus-beefy", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-state-machine", "sp-std", ] @@ -7311,16 +6763,16 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4765879e96676c13cdbed746d66fd59dcde1e9e65fda1f064fa2fffa3bc5d597" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-treasury 28.0.0", + "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", ] @@ -7334,16 +6786,16 @@ dependencies = [ "bp-runtime", "bp-test-utils", "finality-grandpa", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "sp-consensus-grandpa", - "sp-runtime 32.0.0", + "sp-runtime", "sp-std", - "sp-trie 30.0.0", + "sp-trie", ] [[package]] @@ -7354,14 +6806,14 @@ checksum = "6b0aac358f6781471f6fd667d5d5af6ee55c3eb11fc494de76787e942bc43726" dependencies = [ "bp-messages", "bp-runtime", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "num-traits", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime", "sp-std", ] @@ -7375,16 +6827,16 @@ dependencies = [ "bp-parachains", "bp-polkadot-core", "bp-runtime", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-bridge-grandpa", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime", "sp-std", - "sp-trie 30.0.0", + "sp-trie", ] [[package]] @@ -7396,33 +6848,15 @@ dependencies = [ "bp-messages", "bp-relayers", "bp-runtime", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-arithmetic 24.0.0", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "pallet-broker" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904983f117ff92ee24b251f2a883ff01b6f8e9063649877f3892ecbb516e3cbd" -dependencies = [ - "bitvec", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "parity-scale-codec", - "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic", + "sp-runtime", "sp-std", ] @@ -7433,14 +6867,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd8cfe04e8c3f9ca8342ac785f2b1aee6140e1809546fc6f3a99fad20a8dfbf9" dependencies = [ "bitvec", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic", + "sp-core", + "sp-runtime", "sp-std", ] @@ -7450,37 +6884,17 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00fd06f2d719f5bb16ab3e836c6b053bbd92631ba694f8c2bf810013b2548167" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-bounties", - "pallet-treasury 28.0.0", - "parity-scale-codec", - "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "pallet-collator-selection" -version = "9.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4199122c135e161d2e2f4cbc9339c54a11ac4b11e0beb67e53b49a3c90d566b" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "pallet-authorship 28.0.0", - "pallet-session 28.0.0", + "pallet-treasury", "parity-scale-codec", - "rand", "scale-info", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", ] @@ -7490,35 +6904,17 @@ version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59b5ad46601c613396e92292a24c5b5d76e904c456ece9deb10913f6ea2e2999" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-authorship 29.0.0", - "pallet-session 29.0.0", + "pallet-authorship", + "pallet-session", "parity-scale-codec", "rand", "scale-info", - "sp-runtime 32.0.0", - "sp-staking 27.0.0", - "sp-std", -] - -[[package]] -name = "pallet-collective" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ed22cf9d91c120695063cfa95ae0ffabcadefdf2581657ddb5fd68555b3a2e0" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-runtime", + "sp-staking", "sp-std", ] @@ -7528,15 +6924,15 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c362a0b8f30895c15ecc7d8c24b0d94bb586c4b9bbd37ac8053b4629d9cc80b" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", ] @@ -7547,14 +6943,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6aee3a8b6fcde893f862993f9d45eb0fcd492dde0967fd56ef78d79fc7b53dc0" dependencies = [ "assert_matches", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", "serde", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io", + "sp-runtime", "sp-std", ] @@ -7564,42 +6960,18 @@ version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c596f690afabed04954b52de0cf4ae3e05fd388d2fce2f64f0d6766c62e8e260" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-ranked-collective", "parity-scale-codec", "scale-info", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "pallet-election-provider-multi-phase" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc5e1f80bb4ce08b27f5a8a733d5c2d72d083a7d48afa4bdbb1ef3594a31e353" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "pallet-election-provider-support-benchmarking 27.0.0", - "parity-scale-codec", - "rand", - "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", - "strum 0.24.1", ] [[package]] @@ -7608,257 +6980,222 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b54d1d3fe9ae61a144d581147e699b7c3009169de0019a0f87cca0bed82681e7" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-election-provider-support 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", "log", - "pallet-election-provider-support-benchmarking 28.0.0", + "pallet-election-provider-support-benchmarking", "parity-scale-codec", "rand", "scale-info", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-npos-elections 27.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-npos-elections", + "sp-runtime", "sp-std", "strum 0.24.1", ] -[[package]] -name = "pallet-election-provider-support-benchmarking" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193a8592c5fd534d56d07b2abe14e830d23947fb66f31867083e4f3ef80c8caa" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-system 28.0.0", - "parity-scale-codec", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", - "sp-std", -] - [[package]] name = "pallet-election-provider-support-benchmarking" version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46ec87816a1e32a1ab6deececa99e21e6684b111efe87b11b8298328dbbefd01" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-election-provider-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-system", "parity-scale-codec", - "sp-npos-elections 27.0.0", - "sp-runtime 32.0.0", + "sp-npos-elections", + "sp-runtime", "sp-std", ] [[package]] name = "pallet-encointer-balances" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3abd8385b727858b9eac996991bb6bc2967ee51a5f1bdfd178455f073b1985c5" +checksum = "d3e315674885628d9255be6ef76d3a50ef5dbaeaa377955d683754d5b6552a49" dependencies = [ "approx", "encointer-primitives", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-asset-tx-payment 28.0.0", - "pallet-transaction-payment 28.0.0", + "pallet-asset-tx-payment", + "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std", ] [[package]] name = "pallet-encointer-bazaar" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59c2f8fd0131a9e1c997e9f634c04e40af131a1c62c75ecd22d4f2fe25d6d1c0" +checksum = "f9ef596e3cd3ef64c238452dbed148a6f021a1861ad9917183099b9ed59c2e55" dependencies = [ "encointer-primitives", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-encointer-communities", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core", "sp-std", ] [[package]] name = "pallet-encointer-bazaar-rpc-runtime-api" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca4fe43766549ed1261113039bbe44bc4b429fdd32db2848213e1918587134d" +checksum = "ef7ad75291b1b151855c615a5cf4036f1468e22d635585f412d10e0453a94948" dependencies = [ "encointer-primitives", - "frame-support 28.0.0", + "frame-support", "parity-scale-codec", - "sp-api 26.0.0", + "sp-api", "sp-std", ] [[package]] name = "pallet-encointer-ceremonies" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4638e64ecc2823182d42fb3e26f280c4f5c7c15a03e76de5a4471509268ef7e" +checksum = "91d55a3cd08fdce58f6a92b373decc3709e5908f490a6e2e59aee7036776a64b" dependencies = [ "encointer-ceremonies-assignment", "encointer-meetup-validation", "encointer-primitives", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-encointer-balances", "pallet-encointer-communities", "pallet-encointer-scheduler", - "pallet-timestamp 27.0.0", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", ] [[package]] name = "pallet-encointer-ceremonies-rpc-runtime-api" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9649454f58e1ce8019d33b733ef82098d8830d3e629d13a73e25013246e59ce2" +checksum = "6a7655dd964c160eef8af3cc90a8acb235a4695530ff8e81df5176fd34107b84" dependencies = [ "encointer-primitives", - "frame-support 28.0.0", + "frame-support", "parity-scale-codec", - "sp-api 26.0.0", + "sp-api", "sp-std", ] [[package]] name = "pallet-encointer-communities" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f07f8f9108f2527999c88a935e3e8a4dff693dc41fe03ae537e0654f06d1e76b" +checksum = "4163b2b572515e0424d80deef6582e0b8663f75de2058394700ff0a1f7f5dd2f" dependencies = [ "encointer-primitives", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-encointer-balances", "pallet-encointer-scheduler", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std", ] [[package]] name = "pallet-encointer-communities-rpc-runtime-api" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b6fc07a3baa660dd2522b00c8ca9959fd56145852c84700c83472c0328c061" +checksum = "fc071c9227da132fe57ad496e615695ebcd6a892cc5d2a66d79eb4c3fac5902a" dependencies = [ "encointer-primitives", "parity-scale-codec", - "sp-api 26.0.0", + "sp-api", "sp-std", ] [[package]] name = "pallet-encointer-faucet" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f315745473e6572629cf27cf41f29994b945116b516b2fb6503ab7bb784f05" +checksum = "86e8faead921402e8ebd73272054a0974af2526e30e74bfb43fccb077aa93149" dependencies = [ "approx", "encointer-primitives", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-encointer-communities", "pallet-encointer-reputation-commitments", - "pallet-treasury 27.0.0", + "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core", + "sp-runtime", "sp-std", ] [[package]] name = "pallet-encointer-reputation-commitments" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f89a194a51ec7326ac10908ea4a8840270a9bc0c3a12ae80cea46995f49c73d" +checksum = "5777f365c18c93579880107b08299e77c85254076501130891a71b9be018690a" dependencies = [ "approx", "encointer-primitives", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-encointer-ceremonies", "pallet-encointer-communities", "pallet-encointer-scheduler", - "pallet-timestamp 27.0.0", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core", + "sp-runtime", "sp-std", ] [[package]] name = "pallet-encointer-scheduler" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5804270f9ad33a67317bd52be71eca756d7307026ba399b096e1f3e330be4c" +checksum = "26dc40684ab501ad233e5e6da4215a546392b503837a004d97153c482aaa561c" dependencies = [ "encointer-primitives", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", - "pallet-timestamp 27.0.0", - "parity-scale-codec", - "scale-info", - "sp-runtime 31.0.1", - "sp-std", -] - -[[package]] -name = "pallet-fast-unstake" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd6e0b51b82075b046792cdde2d4a2f6c9301f3deba44c26d30ab152060b9028" -dependencies = [ - "docify", - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-runtime", "sp-std", ] @@ -7869,16 +7206,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2222607a0dba10a9d57cab5360a6549b5fda925181c3c7af481246c0964998df" dependencies = [ "docify", - "frame-benchmarking 29.0.0", - "frame-election-provider-support 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-staking 27.0.0", + "sp-io", + "sp-runtime", + "sp-staking", "sp-std", ] @@ -7889,15 +7226,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81f2b2f49d42832bfc2320fb34d606065c0fd1c326a65f9075e5edd354ed2be2" dependencies = [ "blake2 0.10.6", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", ] @@ -7907,39 +7244,21 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5b20be8592eed7ebca2ee661fc43450088552ebe0bd483d7b101cf5968ab12d" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-authorship 29.0.0", - "pallet-session 29.0.0", + "pallet-authorship", + "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto 31.0.0", + "sp-application-crypto", "sp-consensus-grandpa", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-session 28.0.0", - "sp-staking 27.0.0", - "sp-std", -] - -[[package]] -name = "pallet-identity" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3259bb87d50529027fa40267c3662dc80c683f253f121f391c032b019c88fcb" -dependencies = [ - "enumflags2", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", "sp-std", ] @@ -7950,14 +7269,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9e1cae19e30e7dc822c419988b30bb1318d79a8d5da92733822d0e84fe760ca" dependencies = [ "enumflags2", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io", + "sp-runtime", "sp-std", ] @@ -7967,18 +7286,18 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "598ea5c87351edc953d1f455f32ff456cf2f1daf7bbada1f1e03be8e384852ab" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-authorship 29.0.0", + "pallet-authorship", "parity-scale-codec", "scale-info", - "sp-application-crypto 31.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-staking 27.0.0", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", "sp-std", ] @@ -7988,70 +7307,49 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e880ebdb429ca76fb400b1b361ed7fce018a5ea2fc2da4764de5156fffdfa73" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", + "sp-core", + "sp-io", "sp-keyring", - "sp-runtime 32.0.0", + "sp-runtime", "sp-std", ] [[package]] name = "pallet-insecure-randomness-collective-flip" -version = "16.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3812708354757694bf127a89ab043ce80b2016a3b4d1eda2f762fbc4da9904" +checksum = "d2d1abf59195719d739c65178f65f7fda6ddd0eaacd8e2273ca44f3a9b86d27a" dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-support", + "frame-system", "parity-scale-codec", "safe-mix", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std", ] [[package]] name = "pallet-membership" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2dfdff5a7e5b21355b34245312ba2ea687444d9003960e7b876e1df518dab" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-std", -] - -[[package]] -name = "pallet-message-queue" -version = "31.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab6302efb264a65fd175f3082b72004df125f646a3c68b72fd08e657a468c0d6" +checksum = "ad901cdf3de23daf23ff8b092ab318b13faebfc1aa4d84263f2fdc84feaf3e9b" dependencies = [ - "environmental", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", - "sp-weights 27.0.0", ] [[package]] @@ -8061,18 +7359,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ccb23dee70b184a214d729db550117a0965a69107d466d35181d60a6feede38" dependencies = [ "environmental", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", - "sp-weights 28.0.0", + "sp-weights", ] [[package]] @@ -8081,16 +7379,16 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6f1f23a70764dad2b4094d8be12ebbb82df210f2e80dd36fa941a5ac191c6cd" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", + "sp-core", + "sp-io", "sp-mmr-primitives", - "sp-runtime 32.0.0", + "sp-runtime", "sp-std", ] @@ -8100,14 +7398,14 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "176f6a5c170185f892a047c0ae189bc52eb390f2c0b94d4261ed0ebc7f82a548" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io", + "sp-runtime", "sp-std", ] @@ -8117,15 +7415,15 @@ version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4225c31beb3a10235dd165c78f340c344ee78f6ebccd7c99d62a71fb76d2e39" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-assets 30.0.0", + "pallet-assets", "pallet-nfts", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime", "sp-std", ] @@ -8136,15 +7434,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3a8978bd9c43ac5ebaa7a26e5bd0c130b037d7cde97189e1a62fa64e5ee1ef1" dependencies = [ "enumflags2", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", ] @@ -8156,7 +7454,7 @@ checksum = "c412ca82207d43e651ef80a3be837220b82ad0d6c3174922c369ef301ea0e5af" dependencies = [ "pallet-nfts", "parity-scale-codec", - "sp-api 27.0.0", + "sp-api", "sp-std", ] @@ -8166,14 +7464,14 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a64a0e80dec2c60d5962dd249061a47dc4356db440f26cdec50b8acaded1d3" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic", + "sp-core", + "sp-runtime", "sp-std", ] @@ -8183,16 +7481,16 @@ version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f14519c1c613d2f8c95c27015864c11a37969a23deeba9f6dbaff4276e1b81c" dependencies = [ - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-support", + "frame-system", "log", - "pallet-balances 29.0.0", + "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-staking 27.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", "sp-std", "sp-tracing", ] @@ -8203,18 +7501,18 @@ version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18a1eba3078e2492cad15e4695f90eb3fc570386d9f71f8b81f709c7123fc6b5" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-election-provider-support 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", "pallet-bags-list", "pallet-nomination-pools", - "pallet-staking 29.0.0", + "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", - "sp-runtime-interface 25.0.0", - "sp-staking 27.0.0", + "sp-runtime", + "sp-runtime-interface", + "sp-staking", "sp-std", ] @@ -8226,7 +7524,7 @@ checksum = "bc5b35e6c471a669437b987ff02e11e2283412c9ebaeec5334dec3f73bcea652" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", - "sp-api 27.0.0", + "sp-api", "sp-std", ] @@ -8236,15 +7534,15 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b5bcfdc4f6032d7570929094fd459de12d840c440c395fb4d365d679e13eda" dependencies = [ - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-support", + "frame-system", "log", - "pallet-balances 29.0.0", + "pallet-balances", "parity-scale-codec", "scale-info", "serde", - "sp-runtime 32.0.0", - "sp-staking 27.0.0", + "sp-runtime", + "sp-staking", "sp-std", ] @@ -8254,22 +7552,22 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbc33e3086c19235cb903cbbbde1bc1c4f428519ad4c23446dc84c75d0061582" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-election-provider-support 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", "log", - "pallet-babe 29.0.0", - "pallet-balances 29.0.0", + "pallet-babe", + "pallet-balances", "pallet-grandpa", "pallet-im-online", "pallet-offences", - "pallet-session 29.0.0", - "pallet-staking 29.0.0", + "pallet-session", + "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", - "sp-staking 27.0.0", + "sp-runtime", + "sp-staking", "sp-std", ] @@ -8279,31 +7577,15 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7344a30c304771beb90aec34604100185e47cdc0366e268ad18922de602a0c7e" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "pallet-proxy" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3162924576a70509136eb4d8513497fb640a8b3ea753883fe29bd454c511485" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "parity-scale-codec", - "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", ] @@ -8313,13 +7595,13 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7aa31a0b91e8060b808c3e3407e4578a5e94503b174b9e99769147b24fb2c56" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io", + "sp-runtime", "sp-std", ] @@ -8329,17 +7611,17 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3733dbfc44d8f5e1a08287a9064e5794e9d0e92b1bd68cdad2e22202b1964528" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", ] @@ -8349,13 +7631,13 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "797b554ddc87082c18223440d61a81cf35ccab6573321ce473a099e7a709a760" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io", + "sp-runtime", "sp-std", ] @@ -8366,16 +7648,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da850889e7101b63cadb980b7f39df67feb6d63bc6092769b9b708e9eb596db1" dependencies = [ "assert_matches", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 24.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic", + "sp-io", + "sp-runtime", "sp-std", ] @@ -8385,78 +7667,37 @@ version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "433048af0ba0aae9f8c5a03e3b1b54b6628809a7d2af671a9c0cc54611dae093" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-ranked-collective", "parity-scale-codec", "scale-info", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", ] [[package]] name = "pallet-scheduler" -version = "29.0.0" +version = "30.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc26a27b77170c18261af7be04a6569e3d0d58788255b9f283ccd089aac37887" +checksum = "45e2a4ebe6a5f98b14a26deed8d7a1ea28bb2c2d3ad4d6dc129a725523a2042d" dependencies = [ "docify", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std", - "sp-weights 27.0.0", -] - -[[package]] -name = "pallet-scheduler" -version = "30.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45e2a4ebe6a5f98b14a26deed8d7a1ea28bb2c2d3ad4d6dc129a725523a2042d" -dependencies = [ - "docify", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-std", - "sp-weights 28.0.0", -] - -[[package]] -name = "pallet-session" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e23ca2bfcffb5194de952050557bdd1fe9bce18b2bc81e8f8c01c8a3c3c3e5d8" -dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", - "impl-trait-for-tuples", - "log", - "pallet-timestamp 27.0.0", - "parity-scale-codec", - "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", - "sp-state-machine 0.35.0", - "sp-std", - "sp-trie 29.0.0", + "sp-weights", ] [[package]] @@ -8465,21 +7706,21 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7412ac59247b300feee53709f7009a23d1c6f8c70528599f48f44e102d896d03" dependencies = [ - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", - "pallet-timestamp 28.0.0", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-session 28.0.0", - "sp-staking 27.0.0", - "sp-state-machine 0.36.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-state-machine", "sp-std", - "sp-trie 30.0.0", + "sp-trie", ] [[package]] @@ -8488,15 +7729,15 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9c2731415381020db1e78db8b40207f8423a16099e78f2fde599cbcb57ea8db" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "pallet-session 29.0.0", - "pallet-staking 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-session", + "pallet-staking", "parity-scale-codec", "rand", - "sp-runtime 32.0.0", - "sp-session 28.0.0", + "sp-runtime", + "sp-session", "sp-std", ] @@ -8506,40 +7747,16 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dba64f96619c25ae7a0b41f4a5111c2d3102e8b8c6cbce80ece6955e825f9de2" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "log", - "parity-scale-codec", - "rand_chacha 0.2.2", - "scale-info", - "sp-arithmetic 24.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "pallet-staking" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8883bbca2bd6ee41f81382418372ce44fd771ac53591ce9be4018ea43f8c5eda" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-authorship 28.0.0", - "pallet-session 28.0.0", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", - "serde", - "sp-application-crypto 30.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-arithmetic", + "sp-io", + "sp-runtime", "sp-std", ] @@ -8549,21 +7766,21 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a94127295cf027a26e933ea6788b0824e9fedd90740013673e2d36b5d707efe" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-election-provider-support 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", "log", - "pallet-authorship 29.0.0", - "pallet-session 29.0.0", + "pallet-authorship", + "pallet-session", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", "serde", - "sp-application-crypto 31.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-staking 27.0.0", + "sp-application-crypto", + "sp-io", + "sp-runtime", + "sp-staking", "sp-std", ] @@ -8579,16 +7796,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "pallet-staking-reward-fn" -version = "19.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e23336e4da87101633f95f9932946564c926ca7f87499654b38923b1579c605e" -dependencies = [ - "log", - "sp-arithmetic 23.0.0", -] - [[package]] name = "pallet-staking-reward-fn" version = "20.0.0" @@ -8596,7 +7803,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "505d45e08bad052f55fb51f00a6b6244d23ee46ffdc8091f6cddf4e3a880319d" dependencies = [ "log", - "sp-arithmetic 24.0.0", + "sp-arithmetic", ] [[package]] @@ -8606,8 +7813,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "237d7b5a10cb6cba727c3e957fb241776302aa3cce589e6759ba53f50129c1a5" dependencies = [ "parity-scale-codec", - "sp-api 27.0.0", - "sp-staking 27.0.0", + "sp-api", + "sp-staking", ] [[package]] @@ -8616,15 +7823,15 @@ version = "30.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d76e52dedc146b7a9c3b7c5a6ff4c4c442a8ab8cc58ec30e90e1e98cdc51ad34" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", ] @@ -8635,35 +7842,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6d02f7855d411913e77e57126f4a8b8a32d90d9bf47d0b747e367a1301729c3" dependencies = [ "docify", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "parity-scale-codec", - "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "pallet-timestamp" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688b89bdd377609b592bd094b304ebca33f4767fe72935465e2fd7db0e797968" -dependencies = [ - "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io", + "sp-runtime", "sp-std", - "sp-storage 19.0.0", - "sp-timestamp 26.0.0", ] [[package]] @@ -8673,35 +7859,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b8810ddfb254c7fb8cd7698229cce513d309a43ff117b38798dae6120f477b" dependencies = [ "docify", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-inherents 27.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-std", - "sp-storage 20.0.0", - "sp-timestamp 27.0.0", -] - -[[package]] -name = "pallet-transaction-payment" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18b4ca7a1af9b1f091900a354a96319c7614d7a32106ba86cb7f0b6f90239065" -dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-inherents", + "sp-io", + "sp-runtime", "sp-std", + "sp-storage", + "sp-timestamp", ] [[package]] @@ -8710,14 +7879,14 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39f690f5c287ad34b28ca951ef7fae80b08cc9218d970723b7a70e4d29396872" dependencies = [ - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", "serde", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", ] @@ -8728,27 +7897,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08ef209d2d5d077e325bf49b024fd2eff109a5c2ca0d84ce0d50a65839e6b026" dependencies = [ "jsonrpsee", - "pallet-transaction-payment-rpc-runtime-api 29.0.0", + "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", - "sp-api 27.0.0", + "sp-api", "sp-blockchain", - "sp-core 29.0.0", + "sp-core", "sp-rpc", - "sp-runtime 32.0.0", - "sp-weights 28.0.0", -] - -[[package]] -name = "pallet-transaction-payment-rpc-runtime-api" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdfd7c882439b8198c99ece57b5bf785965545a6fa6d0bb7b56b264df1e437a" -dependencies = [ - "pallet-transaction-payment 28.0.0", - "parity-scale-codec", - "sp-api 26.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "sp-runtime", + "sp-weights", ] [[package]] @@ -8757,31 +7913,11 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c78bcba80c7c61712b98a6b5640975ebd25ceb688c18e975af78a0fac81785b0" dependencies = [ - "pallet-transaction-payment 29.0.0", - "parity-scale-codec", - "sp-api 27.0.0", - "sp-runtime 32.0.0", - "sp-weights 28.0.0", -] - -[[package]] -name = "pallet-treasury" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75cb7498228e1a150fa09ce64acafe7105ff39b75dae1c266ba58b7e3eb225e" -dependencies = [ - "docify", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "impl-trait-for-tuples", - "pallet-balances 28.0.0", + "pallet-transaction-payment", "parity-scale-codec", - "scale-info", - "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-std", + "sp-api", + "sp-runtime", + "sp-weights", ] [[package]] @@ -8791,16 +7927,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1605eb5083a2cd172544f33c6e59eca2e23ac49f02f13d1562b1b8a409df9c60" dependencies = [ "docify", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "impl-trait-for-tuples", - "pallet-balances 29.0.0", + "pallet-balances", "parity-scale-codec", "scale-info", "serde", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", "sp-std", ] @@ -8810,30 +7946,13 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac9449d6e2cdcc4456466eff97a065c43dde678620551f5fd79072dec3b9f560" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "pallet-utility" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384c1d740c019410f6b40586cc387726c2e3c417c0e3e6f7e4774cd46bc6c1d0" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "parity-scale-codec", - "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-runtime", "sp-std", ] @@ -8843,30 +7962,14 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "954f15b98c3fdebb763bb5cea4ec6803fd180d540ec5b07a9fcb2c118251d52c" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "pallet-vesting" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55f3ac517a10c14beee86a737b9ea5d592af9ab21cc5354474bc5f7019210358" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-runtime 31.0.1", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", ] @@ -8876,13 +7979,13 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4525f3038cdf078fea39d913c563ca626f09a615e7724f0c9eac97743c75ff44" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime", "sp-std", ] @@ -8892,38 +7995,14 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da0ad4ce05688bdddcdb682cbed2f3edff0ee5349f0b745ebacc27d179582432" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "parity-scale-codec", - "scale-info", - "sp-api 27.0.0", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "pallet-xcm" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee3520e03ac679125e8dcaa00ce4afeeb106a9623e79b5acf970d72af7f5d02" -dependencies = [ - "bounded-collections 0.1.9", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "pallet-balances 28.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-api", + "sp-runtime", "sp-std", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", ] [[package]] @@ -8932,42 +8011,22 @@ version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b0bade2eb6ce40af35a5af150692b4e150638f7f68c15735ab9cdf79650d68e" dependencies = [ - "bounded-collections 0.2.0", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "bounded-collections", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-balances 29.0.0", + "pallet-balances", "parity-scale-codec", "scale-info", "serde", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-std", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", - "staging-xcm-executor 8.0.1", -] - -[[package]] -name = "pallet-xcm-benchmarks" -version = "7.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da15171c2dc870ad636fcdb16d9aa37eb84cfe6001c3f1c77cf2c97446ebfbe5" -dependencies = [ - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] @@ -8976,18 +8035,18 @@ version = "8.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c10e1c92086ce2069a3d2387d9431f48660b6ec92054c4d0a4e30a9f54e7ad3" dependencies = [ - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io", + "sp-runtime", "sp-std", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", - "staging-xcm-executor 8.0.1", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] @@ -9000,18 +8059,18 @@ dependencies = [ "bp-runtime", "bp-xcm-bridge-hub", "bridge-runtime-common", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-support", + "frame-system", "log", "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", "sp-std", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", - "staging-xcm-executor 8.0.1", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] @@ -9020,56 +8079,18 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd5bd3947da7f031c86904f12b6690bbecd2efa122906a8dd838499150fe4322" dependencies = [ - "bp-xcm-bridge-hub-router 0.7.0", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "log", - "parity-scale-codec", - "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "sp-std", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", -] - -[[package]] -name = "parachains-common" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceadd4f51620023871ece5eeda64734acd17d84d49b45473d335e900a012fdde" -dependencies = [ - "cumulus-primitives-core 0.7.0", - "cumulus-primitives-utility 0.7.3", - "frame-support 28.0.0", - "frame-system 28.0.0", + "bp-xcm-bridge-hub-router", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "num-traits", - "pallet-asset-tx-payment 28.0.0", - "pallet-assets 29.0.0", - "pallet-authorship 28.0.0", - "pallet-balances 28.0.0", - "pallet-collator-selection 9.0.0", - "pallet-message-queue 31.0.0", - "pallet-xcm 7.0.0", "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-primitives 7.0.0", - "rococo-runtime-constants 7.0.0", "scale-info", - "smallvec", - "sp-consensus-aura 0.32.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core", + "sp-runtime", "sp-std", - "staging-parachain-info 0.7.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "substrate-wasm-builder 17.0.0", - "westend-runtime-constants 7.0.0", + "staging-xcm", + "staging-xcm-builder", ] [[package]] @@ -9078,30 +8099,30 @@ version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34aa00981a24a2b772afaa49e258f9bcd6bb372db060a05614becc1c74d4456" dependencies = [ - "cumulus-primitives-core 0.8.0", - "cumulus-primitives-utility 0.8.1", - "frame-support 29.0.0", - "frame-system 29.0.0", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-support", + "frame-system", "log", - "pallet-asset-tx-payment 29.0.0", - "pallet-assets 30.0.0", - "pallet-authorship 29.0.0", - "pallet-balances 29.0.0", - "pallet-collator-selection 10.0.0", - "pallet-message-queue 32.0.0", - "pallet-xcm 8.0.1", + "pallet-asset-tx-payment", + "pallet-assets", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-message-queue", + "pallet-xcm", "parity-scale-codec", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "scale-info", - "sp-consensus-aura 0.33.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-consensus-aura", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", - "staging-parachain-info 0.8.0", - "staging-xcm 8.0.0", - "staging-xcm-executor 8.0.1", - "substrate-wasm-builder 18.0.0", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-executor", + "substrate-wasm-builder", ] [[package]] @@ -9110,29 +8131,29 @@ version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d295b9c391ce15f68ddcd7b0d428eb2d3338643a4d1f471b3dd8a15538865e17" dependencies = [ - "cumulus-pallet-parachain-system 0.8.1", - "cumulus-pallet-xcmp-queue 0.8.0", - "cumulus-primitives-core 0.8.0", - "cumulus-primitives-parachain-inherent 0.8.0", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", "cumulus-test-relay-sproof-builder", - "frame-support 29.0.0", - "frame-system 29.0.0", - "pallet-balances 29.0.0", - "pallet-collator-selection 10.0.0", - "pallet-session 29.0.0", - "pallet-xcm 8.0.1", - "parity-scale-codec", - "polkadot-parachain-primitives 7.0.0", - "sp-consensus-aura 0.33.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "frame-support", + "frame-system", + "pallet-balances", + "pallet-collator-selection", + "pallet-session", + "pallet-xcm", + "parity-scale-codec", + "polkadot-parachain-primitives", + "sp-consensus-aura", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", "sp-tracing", - "staging-parachain-info 0.8.0", - "staging-xcm 8.0.0", - "staging-xcm-executor 8.0.1", - "substrate-wasm-builder 18.0.0", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-executor", + "substrate-wasm-builder", ] [[package]] @@ -9318,14 +8339,14 @@ dependencies = [ name = "penpal-emulated-chain" version = "1.0.0" dependencies = [ - "cumulus-primitives-core 0.8.0", + "cumulus-primitives-core", "emulated-integration-tests-common", - "frame-support 29.0.0", + "frame-support", "kusama-emulated-chain", - "parachains-common 8.0.0", + "parachains-common", "penpal-runtime", "polkadot-emulated-chain", - "sp-core 29.0.0", + "sp-core", ] [[package]] @@ -9335,59 +8356,59 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c804f33306e47153a4bad6a9cd33bbd537fa4b5f9434d505c8a6fc321a0bb71a" dependencies = [ "assets-common", - "cumulus-pallet-aura-ext 0.8.0", - "cumulus-pallet-parachain-system 0.8.1", + "cumulus-pallet-aura-ext", + "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm 0.8.0", - "cumulus-pallet-xcmp-queue 0.8.0", - "cumulus-primitives-core 0.8.0", - "cumulus-primitives-utility 0.8.1", - "frame-benchmarking 29.0.0", - "frame-executive 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", - "frame-system-benchmarking 29.0.0", - "frame-system-rpc-runtime-api 27.0.0", - "frame-try-runtime 0.35.0", - "log", - "pallet-asset-tx-payment 29.0.0", - "pallet-assets 30.0.0", - "pallet-aura 28.0.0", - "pallet-authorship 29.0.0", - "pallet-balances 29.0.0", - "pallet-collator-selection 10.0.0", - "pallet-message-queue 32.0.0", - "pallet-session 29.0.0", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "log", + "pallet-asset-tx-payment", + "pallet-assets", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-message-queue", + "pallet-session", "pallet-sudo", - "pallet-timestamp 28.0.0", - "pallet-transaction-payment 29.0.0", - "pallet-transaction-payment-rpc-runtime-api 29.0.0", - "pallet-xcm 8.0.1", - "parachains-common 8.0.0", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-xcm", + "parachains-common", "parity-scale-codec", - "polkadot-parachain-primitives 7.0.0", - "polkadot-primitives 8.0.1", - "polkadot-runtime-common 8.0.1", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-common", "scale-info", "smallvec", - "sp-api 27.0.0", - "sp-block-builder 27.0.0", - "sp-consensus-aura 0.33.0", - "sp-core 29.0.0", - "sp-genesis-builder 0.8.0", - "sp-inherents 27.0.0", - "sp-offchain 27.0.0", - "sp-runtime 32.0.0", - "sp-session 28.0.0", - "sp-std", - "sp-storage 20.0.0", - "sp-transaction-pool 27.0.0", - "sp-version 30.0.0", - "staging-parachain-info 0.8.0", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", - "staging-xcm-executor 8.0.1", - "substrate-wasm-builder 18.0.0", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", "testnet-parachains-constants", ] @@ -9528,7 +8549,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "rand", "tracing-gum", ] @@ -9545,7 +8566,7 @@ dependencies = [ "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "rand", "tracing-gum", ] @@ -9565,11 +8586,11 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "rand", "schnellru", - "sp-core 29.0.0", - "sp-keystore 0.35.0", + "sp-core", + "sp-keystore", "thiserror", "tracing-gum", ] @@ -9589,7 +8610,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "rand", "sc-network", "schnellru", @@ -9612,28 +8633,15 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.1", - "sp-core 29.0.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", + "polkadot-primitives", + "sp-core", + "sp-keystore", + "sp-runtime", "thiserror", "tokio-util", "tracing-gum", ] -[[package]] -name = "polkadot-core-primitives" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda2b0f0c580c38f12445a4af10e0a23acf48381b2a95653e0be48ba787e10e5" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-std", -] - [[package]] name = "polkadot-core-primitives" version = "8.0.0" @@ -9642,8 +8650,8 @@ checksum = "b6a08e4e014c853b252ecbbe3ccd67b2d33d78e46988d309b8cccf4ac06e25ef" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", "sp-std", ] @@ -9664,11 +8672,11 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "sc-network", "schnellru", - "sp-application-crypto 31.0.0", - "sp-keystore 0.35.0", + "sp-application-crypto", + "sp-keystore", "thiserror", "tracing-gum", ] @@ -9679,17 +8687,17 @@ version = "1.0.0" dependencies = [ "emulated-integration-tests-common", "pallet-im-online", - "pallet-staking 29.0.0", - "parachains-common 8.0.0", - "polkadot-primitives 8.0.1", + "pallet-staking", + "parachains-common", + "polkadot-primitives", "polkadot-runtime", "polkadot-runtime-constants", "sc-consensus-grandpa", - "sp-authority-discovery 27.0.0", - "sp-consensus-babe 0.33.0", + "sp-authority-discovery", + "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", ] [[package]] @@ -9700,10 +8708,10 @@ checksum = "1b10514ace3272d38b602e1795a5a340b265285c4af875473d682a5c9d6c831c" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "reed-solomon-novelpoly", - "sp-core 29.0.0", - "sp-trie 30.0.0", + "sp-core", + "sp-trie", "thiserror", ] @@ -9718,15 +8726,15 @@ dependencies = [ "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "rand", "rand_chacha 0.3.1", "sc-network", "sc-network-common", - "sp-application-crypto 31.0.0", - "sp-core 29.0.0", + "sp-application-crypto", + "sp-core", "sp-crypto-hashing", - "sp-keystore 0.35.0", + "sp-keystore", "tracing-gum", ] @@ -9747,7 +8755,7 @@ dependencies = [ "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "sc-network", "sp-consensus", "thiserror", @@ -9766,8 +8774,8 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.1", - "sp-core 29.0.0", + "polkadot-primitives", + "sp-core", "sp-maybe-compressed-blob", "thiserror", "tracing-gum", @@ -9792,17 +8800,17 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "rand", "rand_chacha 0.3.1", "rand_core 0.6.4", "sc-keystore", "schnellru", "schnorrkel 0.11.4", - "sp-application-crypto 31.0.0", + "sp-application-crypto", "sp-consensus", - "sp-consensus-slots 0.33.0", - "sp-runtime 32.0.0", + "sp-consensus-slots", + "sp-runtime", "thiserror", "tracing-gum", ] @@ -9824,7 +8832,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "sp-consensus", "thiserror", "tracing-gum", @@ -9843,10 +8851,10 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "polkadot-statement-table", "schnellru", - "sp-keystore 0.35.0", + "sp-keystore", "thiserror", "tracing-gum", ] @@ -9860,8 +8868,8 @@ dependencies = [ "futures", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.1", - "sp-keystore 0.35.0", + "polkadot-primitives", + "sp-keystore", "thiserror", "tracing-gum", "wasm-timer", @@ -9883,8 +8891,8 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-parachain-primitives 7.0.0", - "polkadot-primitives 8.0.1", + "polkadot-parachain-primitives", + "polkadot-primitives", "sp-maybe-compressed-blob", "tracing-gum", ] @@ -9917,7 +8925,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "thiserror", "tracing-gum", ] @@ -9935,7 +8943,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "sc-keystore", "schnellru", "thiserror", @@ -9953,9 +8961,9 @@ dependencies = [ "futures-timer", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "sp-blockchain", - "sp-inherents 27.0.0", + "sp-inherents", "thiserror", "tracing-gum", ] @@ -9973,7 +8981,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "thiserror", "tracing-gum", ] @@ -9991,7 +8999,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "thiserror", "tracing-gum", ] @@ -10012,16 +9020,16 @@ dependencies = [ "libc", "parity-scale-codec", "pin-project", - "polkadot-core-primitives 8.0.0", + "polkadot-core-primitives", "polkadot-node-core-pvf-common", "polkadot-node-metrics", "polkadot-node-primitives", "polkadot-node-subsystem", - "polkadot-parachain-primitives 7.0.0", - "polkadot-primitives 8.0.1", + "polkadot-parachain-primitives", + "polkadot-primitives", "rand", "slotmap", - "sp-core 29.0.0", + "sp-core", "sp-maybe-compressed-blob", "sp-wasm-interface", "tempfile", @@ -10041,8 +9049,8 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-primitives 8.0.1", - "sp-keystore 0.35.0", + "polkadot-primitives", + "sp-keystore", "thiserror", "tracing-gum", ] @@ -10060,16 +9068,16 @@ dependencies = [ "libc", "nix 0.27.1", "parity-scale-codec", - "polkadot-parachain-primitives 7.0.0", - "polkadot-primitives 8.0.1", + "polkadot-parachain-primitives", + "polkadot-primitives", "sc-executor", "sc-executor-common", "sc-executor-wasmtime", "seccompiler", - "sp-core 29.0.0", + "sp-core", "sp-crypto-hashing", - "sp-externalities 0.26.0", - "sp-io 31.0.0", + "sp-externalities", + "sp-io", "sp-tracing", "thiserror", "tracing-gum", @@ -10085,9 +9093,9 @@ dependencies = [ "polkadot-node-metrics", "polkadot-node-subsystem", "polkadot-node-subsystem-types", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "schnellru", - "sp-consensus-babe 0.33.0", + "sp-consensus-babe", "tracing-gum", ] @@ -10103,9 +9111,9 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "polkadot-node-primitives", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "sc-network", - "sp-core 29.0.0", + "sp-core", "thiserror", "tokio", ] @@ -10121,7 +9129,7 @@ dependencies = [ "futures-timer", "log", "parity-scale-codec", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "prioritized-metered-channel", "sc-cli", "sc-service", @@ -10146,7 +9154,7 @@ dependencies = [ "parity-scale-codec", "polkadot-node-jaeger", "polkadot-node-primitives", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "rand", "sc-authority-discovery", "sc-network", @@ -10165,16 +9173,16 @@ dependencies = [ "bounded-vec", "futures", "parity-scale-codec", - "polkadot-parachain-primitives 7.0.0", - "polkadot-primitives 8.0.1", + "polkadot-parachain-primitives", + "polkadot-primitives", "schnorrkel 0.11.4", "serde", - "sp-application-crypto 31.0.0", - "sp-consensus-babe 0.33.0", - "sp-core 29.0.0", - "sp-keystore 0.35.0", + "sp-application-crypto", + "sp-consensus-babe", + "sp-core", + "sp-keystore", "sp-maybe-compressed-blob", - "sp-runtime 32.0.0", + "sp-runtime", "thiserror", "zstd 0.12.4", ] @@ -10204,17 +9212,17 @@ dependencies = [ "polkadot-node-jaeger", "polkadot-node-network-protocol", "polkadot-node-primitives", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "polkadot-statement-table", "sc-client-api", "sc-network", "sc-transaction-pool-api", "smallvec", - "sp-api 27.0.0", - "sp-authority-discovery 27.0.0", + "sp-api", + "sp-authority-discovery", "sp-blockchain", - "sp-consensus-babe 0.33.0", - "sp-runtime 32.0.0", + "sp-consensus-babe", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] @@ -10243,14 +9251,14 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-types", "polkadot-overseer", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "prioritized-metered-channel", "rand", "sc-client-api", "schnellru", - "sp-application-crypto 31.0.0", - "sp-core 29.0.0", - "sp-keystore 0.35.0", + "sp-application-crypto", + "sp-core", + "sp-keystore", "thiserror", "tracing-gum", ] @@ -10270,75 +9278,30 @@ dependencies = [ "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem-types", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "sc-client-api", - "sp-api 27.0.0", - "sp-core 29.0.0", + "sp-api", + "sp-core", "tikv-jemalloc-ctl", "tracing-gum", ] -[[package]] -name = "polkadot-parachain-primitives" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b37c55955147479e7b2f3c2e5385db4846ac3e3b997cd4a4ad52344524b5447" -dependencies = [ - "bounded-collections 0.1.9", - "derive_more", - "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "scale-info", - "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-std", - "sp-weights 27.0.0", -] - [[package]] name = "polkadot-parachain-primitives" version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "248ab090959a92e61493277e33b7e85104280a4beb4cb0815137d3c8c50a07f4" dependencies = [ - "bounded-collections 0.2.0", + "bounded-collections", "derive_more", "parity-scale-codec", - "polkadot-core-primitives 8.0.0", - "scale-info", - "serde", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "sp-std", - "sp-weights 28.0.0", -] - -[[package]] -name = "polkadot-primitives" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8aefd230a654f5b2aee18ebbd9c081835def0e1898ee6c018501dd77c18f5929" -dependencies = [ - "bitvec", - "hex-literal", - "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", + "polkadot-core-primitives", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-authority-discovery 26.0.0", - "sp-consensus-slots 0.32.0", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", + "sp-core", + "sp-runtime", "sp-std", + "sp-weights", ] [[package]] @@ -10351,21 +9314,21 @@ dependencies = [ "hex-literal", "log", "parity-scale-codec", - "polkadot-core-primitives 8.0.0", - "polkadot-parachain-primitives 7.0.0", + "polkadot-core-primitives", + "polkadot-parachain-primitives", "scale-info", "serde", - "sp-api 27.0.0", - "sp-application-crypto 31.0.0", - "sp-arithmetic 24.0.0", - "sp-authority-discovery 27.0.0", - "sp-consensus-slots 0.33.0", - "sp-core 29.0.0", - "sp-inherents 27.0.0", - "sp-io 31.0.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", - "sp-staking 27.0.0", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-authority-discovery", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-staking", "sp-std", ] @@ -10378,7 +9341,7 @@ dependencies = [ "jsonrpsee", "mmr-rpc", "pallet-transaction-payment-rpc", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "sc-chain-spec", "sc-client-api", "sc-consensus-babe", @@ -10392,13 +9355,13 @@ dependencies = [ "sc-rpc-spec-v2", "sc-sync-state-rpc", "sc-transaction-pool-api", - "sp-api 27.0.0", - "sp-block-builder 27.0.0", + "sp-api", + "sp-block-builder", "sp-blockchain", "sp-consensus", - "sp-consensus-babe 0.33.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", + "sp-consensus-babe", + "sp-keystore", + "sp-runtime", "substrate-frame-rpc-system", "substrate-state-trie-migration-rpc", ] @@ -10408,35 +9371,35 @@ name = "polkadot-runtime" version = "1.0.0" dependencies = [ "binary-merkle-tree", - "frame-benchmarking 29.0.0", - "frame-election-provider-support 29.0.0", - "frame-executive 29.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-executive", "frame-remote-externalities", - "frame-support 29.0.0", - "frame-system 29.0.0", - "frame-system-benchmarking 29.0.0", - "frame-system-rpc-runtime-api 27.0.0", - "frame-try-runtime 0.35.0", - "log", - "pallet-asset-rate 8.0.0", - "pallet-authority-discovery 29.0.0", - "pallet-authorship 29.0.0", - "pallet-babe 29.0.0", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "log", + "pallet-asset-rate", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", "pallet-bags-list", - "pallet-balances 29.0.0", + "pallet-balances", "pallet-beefy", "pallet-beefy-mmr", "pallet-bounties", "pallet-child-bounties", "pallet-conviction-voting", - "pallet-election-provider-multi-phase 28.0.0", - "pallet-election-provider-support-benchmarking 28.0.0", - "pallet-fast-unstake 28.0.0", + "pallet-election-provider-multi-phase", + "pallet-election-provider-support-benchmarking", + "pallet-fast-unstake", "pallet-grandpa", - "pallet-identity 29.0.0", + "pallet-identity", "pallet-im-online", "pallet-indices", - "pallet-message-queue 32.0.0", + "pallet-message-queue", "pallet-mmr", "pallet-multisig", "pallet-nomination-pools", @@ -10445,116 +9408,63 @@ dependencies = [ "pallet-offences", "pallet-offences-benchmarking", "pallet-preimage", - "pallet-proxy 29.0.0", + "pallet-proxy", "pallet-referenda", - "pallet-scheduler 30.0.0", - "pallet-session 29.0.0", + "pallet-scheduler", + "pallet-session", "pallet-session-benchmarking", - "pallet-staking 29.0.0", + "pallet-staking", "pallet-staking-reward-curve", - "pallet-staking-reward-fn 20.0.0", + "pallet-staking-reward-fn", "pallet-staking-runtime-api", - "pallet-timestamp 28.0.0", - "pallet-transaction-payment 29.0.0", - "pallet-transaction-payment-rpc-runtime-api 29.0.0", - "pallet-treasury 28.0.0", - "pallet-utility 29.0.0", - "pallet-vesting 29.0.0", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", "pallet-whitelist", - "pallet-xcm 8.0.1", - "pallet-xcm-benchmarks 8.0.2", + "pallet-xcm", + "pallet-xcm-benchmarks", "parity-scale-codec", - "polkadot-primitives 8.0.1", - "polkadot-runtime-common 8.0.1", + "polkadot-primitives", + "polkadot-runtime-common", "polkadot-runtime-constants", - "polkadot-runtime-parachains 8.0.1", + "polkadot-runtime-parachains", "scale-info", "separator", "serde_json", - "sp-api 27.0.0", - "sp-application-crypto 31.0.0", - "sp-arithmetic 24.0.0", - "sp-authority-discovery 27.0.0", - "sp-block-builder 27.0.0", - "sp-consensus-babe 0.33.0", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 29.0.0", + "sp-core", "sp-debug-derive", - "sp-genesis-builder 0.8.0", - "sp-inherents 27.0.0", - "sp-io 31.0.0", + "sp-genesis-builder", + "sp-inherents", + "sp-io", "sp-keyring", - "sp-npos-elections 27.0.0", - "sp-offchain 27.0.0", - "sp-runtime 32.0.0", - "sp-session 28.0.0", - "sp-staking 27.0.0", + "sp-npos-elections", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", "sp-std", - "sp-storage 20.0.0", + "sp-storage", "sp-tracing", - "sp-transaction-pool 27.0.0", - "sp-trie 30.0.0", - "sp-version 30.0.0", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", - "staging-xcm-executor 8.0.1", - "substrate-wasm-builder 18.0.0", + "sp-transaction-pool", + "sp-trie", + "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", "tokio", ] -[[package]] -name = "polkadot-runtime-common" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4641a850b7415a42e56bd262aba243ed77a9280cb2b825a427c425bdc8961d70" -dependencies = [ - "bitvec", - "frame-benchmarking 28.0.0", - "frame-election-provider-support 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "impl-trait-for-tuples", - "libsecp256k1", - "log", - "pallet-asset-rate 7.0.0", - "pallet-authorship 28.0.0", - "pallet-babe 28.0.0", - "pallet-balances 28.0.0", - "pallet-broker 0.6.0", - "pallet-election-provider-multi-phase 27.0.0", - "pallet-fast-unstake 27.0.0", - "pallet-identity 28.0.0", - "pallet-session 28.0.0", - "pallet-staking 28.0.0", - "pallet-staking-reward-fn 19.0.0", - "pallet-timestamp 27.0.0", - "pallet-transaction-payment 28.0.0", - "pallet-treasury 27.0.0", - "pallet-vesting 28.0.0", - "pallet-xcm-benchmarks 7.0.4", - "parity-scale-codec", - "polkadot-primitives 7.0.0", - "polkadot-runtime-parachains 7.0.0", - "rustc-hex", - "scale-info", - "serde", - "serde_derive", - "slot-range-helper 7.0.0", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-npos-elections 26.0.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", - "sp-std", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", - "staging-xcm-executor 7.0.3", - "static_assertions", -] - [[package]] name = "polkadot-runtime-common" version = "8.0.1" @@ -10562,48 +9472,48 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06afbb3bd10245ad1907242a98ddffc3c0c1e209738b8382bc5bcfc1f28c0429" dependencies = [ "bitvec", - "frame-benchmarking 29.0.0", - "frame-election-provider-support 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", "impl-trait-for-tuples", "libsecp256k1", "log", - "pallet-asset-rate 8.0.0", - "pallet-authorship 29.0.0", - "pallet-babe 29.0.0", - "pallet-balances 29.0.0", - "pallet-broker 0.7.0", - "pallet-election-provider-multi-phase 28.0.0", - "pallet-fast-unstake 28.0.0", - "pallet-identity 29.0.0", - "pallet-session 29.0.0", - "pallet-staking 29.0.0", - "pallet-staking-reward-fn 20.0.0", - "pallet-timestamp 28.0.0", - "pallet-transaction-payment 29.0.0", - "pallet-treasury 28.0.0", - "pallet-vesting 29.0.0", - "parity-scale-codec", - "polkadot-primitives 8.0.1", - "polkadot-runtime-parachains 8.0.1", + "pallet-asset-rate", + "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", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-treasury", + "pallet-vesting", + "parity-scale-codec", + "polkadot-primitives", + "polkadot-runtime-parachains", "rustc-hex", "scale-info", "serde", "serde_derive", - "slot-range-helper 8.0.0", - "sp-api 27.0.0", - "sp-core 29.0.0", - "sp-inherents 27.0.0", - "sp-io 31.0.0", - "sp-npos-elections 27.0.0", - "sp-runtime 32.0.0", - "sp-session 28.0.0", - "sp-staking 27.0.0", - "sp-std", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", - "staging-xcm-executor 8.0.1", + "slot-range-helper", + "sp-api", + "sp-core", + "sp-inherents", + "sp-io", + "sp-npos-elections", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", ] @@ -10611,28 +9521,14 @@ dependencies = [ name = "polkadot-runtime-constants" version = "1.0.0" dependencies = [ - "frame-support 29.0.0", - "polkadot-primitives 8.0.1", - "polkadot-runtime-common 8.0.1", + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", "smallvec", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "sp-weights 28.0.0", - "staging-xcm-builder 8.0.1", -] - -[[package]] -name = "polkadot-runtime-metrics" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac3c6ee03f38556274b26049c51c5c7095abfd4ebfd11cd492918a4344f2851" -dependencies = [ - "bs58 0.5.0", - "frame-benchmarking 28.0.0", - "parity-scale-codec", - "polkadot-primitives 7.0.0", - "sp-std", - "sp-tracing", + "sp-core", + "sp-runtime", + "sp-weights", + "staging-xcm-builder", ] [[package]] @@ -10642,63 +9538,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3566c6fd0c21b5dd555309427c984cf506f875ee90f710acea295b478fecbe0" dependencies = [ "bs58 0.5.0", - "frame-benchmarking 29.0.0", + "frame-benchmarking", "parity-scale-codec", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "sp-std", "sp-tracing", ] -[[package]] -name = "polkadot-runtime-parachains" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d253ef2952097398d98ed12729e47f9328bcd1baa92c3acc1524a4baca7d1ac" -dependencies = [ - "bitflags 1.3.2", - "bitvec", - "derive_more", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "impl-trait-for-tuples", - "log", - "pallet-authority-discovery 28.0.0", - "pallet-authorship 28.0.0", - "pallet-babe 28.0.0", - "pallet-balances 28.0.0", - "pallet-broker 0.6.0", - "pallet-message-queue 31.0.0", - "pallet-session 28.0.0", - "pallet-staking 28.0.0", - "pallet-timestamp 27.0.0", - "pallet-vesting 28.0.0", - "parity-scale-codec", - "polkadot-core-primitives 7.0.0", - "polkadot-parachain-primitives 6.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-metrics 7.0.0", - "rand", - "rand_chacha 0.3.1", - "rustc-hex", - "scale-info", - "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-session 27.0.0", - "sp-staking 26.0.0", - "sp-std", - "staging-xcm 7.0.0", - "staging-xcm-executor 7.0.3", - "static_assertions", -] - [[package]] name = "polkadot-runtime-parachains" version = "8.0.1" @@ -10708,45 +9554,45 @@ dependencies = [ "bitflags 1.3.2", "bitvec", "derive_more", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", - "pallet-authority-discovery 29.0.0", - "pallet-authorship 29.0.0", - "pallet-babe 29.0.0", - "pallet-balances 29.0.0", - "pallet-broker 0.7.0", - "pallet-message-queue 32.0.0", - "pallet-session 29.0.0", - "pallet-staking 29.0.0", - "pallet-timestamp 28.0.0", - "pallet-vesting 29.0.0", - "parity-scale-codec", - "polkadot-core-primitives 8.0.0", - "polkadot-parachain-primitives 7.0.0", - "polkadot-primitives 8.0.1", - "polkadot-runtime-metrics 8.0.0", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-balances", + "pallet-broker", + "pallet-message-queue", + "pallet-session", + "pallet-staking", + "pallet-timestamp", + "pallet-vesting", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-metrics", "rand", "rand_chacha 0.3.1", "rustc-hex", "scale-info", "serde", - "sp-api 27.0.0", - "sp-application-crypto 31.0.0", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-inherents 27.0.0", - "sp-io 31.0.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", - "sp-session 28.0.0", - "sp-staking 27.0.0", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-session", + "sp-staking", "sp-std", "sp-tracing", - "staging-xcm 8.0.0", - "staging-xcm-executor 8.0.1", + "staging-xcm", + "staging-xcm-executor", "static_assertions", ] @@ -10757,11 +9603,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2fd665185877bec296588c7cf1ec0ef75e0545050b5e1d42d94240a284149da" dependencies = [ "async-trait", - "frame-benchmarking 29.0.0", + "frame-benchmarking", "frame-benchmarking-cli", - "frame-support 29.0.0", - "frame-system 29.0.0", - "frame-system-rpc-runtime-api 27.0.0", + "frame-support", + "frame-system", + "frame-system-rpc-runtime-api", "futures", "hex-literal", "is_executable", @@ -10769,11 +9615,11 @@ dependencies = [ "kvdb-rocksdb", "log", "mmr-gadget", - "pallet-babe 29.0.0", + "pallet-babe", "pallet-im-online", - "pallet-staking 29.0.0", - "pallet-transaction-payment 29.0.0", - "pallet-transaction-payment-rpc-runtime-api 29.0.0", + "pallet-staking", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", "parity-db", "parity-scale-codec", "parking_lot 0.12.1", @@ -10782,7 +9628,7 @@ dependencies = [ "polkadot-availability-distribution", "polkadot-availability-recovery", "polkadot-collator-protocol", - "polkadot-core-primitives 8.0.0", + "polkadot-core-primitives", "polkadot-dispute-distribution", "polkadot-gossip-support", "polkadot-network-bridge", @@ -10807,10 +9653,10 @@ dependencies = [ "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-parachain-primitives 7.0.0", - "polkadot-primitives 8.0.1", + "polkadot-parachain-primitives", + "polkadot-primitives", "polkadot-rpc", - "polkadot-runtime-parachains 8.0.1", + "polkadot-runtime-parachains", "polkadot-statement-distribution", "sc-authority-discovery", "sc-basic-authorship", @@ -10838,29 +9684,29 @@ dependencies = [ "schnellru", "serde", "serde_json", - "sp-api 27.0.0", - "sp-authority-discovery 27.0.0", - "sp-block-builder 27.0.0", + "sp-api", + "sp-authority-discovery", + "sp-block-builder", "sp-blockchain", "sp-consensus", - "sp-consensus-babe 0.33.0", + "sp-consensus-babe", "sp-consensus-beefy", "sp-consensus-grandpa", - "sp-core 29.0.0", - "sp-inherents 27.0.0", - "sp-io 31.0.0", + "sp-core", + "sp-inherents", + "sp-io", "sp-keyring", - "sp-keystore 0.35.0", + "sp-keystore", "sp-mmr-primitives", - "sp-offchain 27.0.0", - "sp-runtime 32.0.0", - "sp-session 28.0.0", - "sp-state-machine 0.36.0", - "sp-storage 20.0.0", - "sp-timestamp 27.0.0", - "sp-transaction-pool 27.0.0", - "sp-version 30.0.0", - "sp-weights 28.0.0", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-state-machine", + "sp-storage", + "sp-timestamp", + "sp-transaction-pool", + "sp-version", + "sp-weights", "substrate-prometheus-endpoint", "thiserror", "tracing-gum", @@ -10883,9 +9729,9 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-primitives 8.0.1", - "sp-keystore 0.35.0", - "sp-staking 27.0.0", + "polkadot-primitives", + "sp-keystore", + "sp-staking", "thiserror", "tracing-gum", ] @@ -10897,8 +9743,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de5e010da3c6a65d8f263d0f825a04d995ffc8a37f886f674fcbbc73bf158d01" dependencies = [ "parity-scale-codec", - "polkadot-primitives 8.0.1", - "sp-core 29.0.0", + "polkadot-primitives", + "sp-core", "tracing-gum", ] @@ -11618,38 +10464,21 @@ dependencies = [ "librocksdb-sys", ] -[[package]] -name = "rococo-runtime-constants" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b5b507493a19b5061eb2860c394847261216c7ea7f8f62ba2cb02e55c27d611" -dependencies = [ - "frame-support 28.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", - "smallvec", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", -] - [[package]] name = "rococo-runtime-constants" version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b45c21ccb0f8777512a65510c106aeee4b59682944b9a5cb31cd7b8ed4ccb47" dependencies = [ - "frame-support 29.0.0", - "polkadot-primitives 8.0.1", - "polkadot-runtime-common 8.0.1", + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", "smallvec", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "sp-weights 28.0.0", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", + "sp-core", + "sp-runtime", + "sp-weights", + "staging-xcm", + "staging-xcm-builder", ] [[package]] @@ -11878,7 +10707,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357127c91373ed6d1ae582f6e3300ab5b13bcde43bbf270a891f44194ef48b70" dependencies = [ "log", - "sp-core 29.0.0", + "sp-core", "sp-wasm-interface", "thiserror", ] @@ -11903,12 +10732,12 @@ dependencies = [ "rand", "sc-client-api", "sc-network", - "sp-api 27.0.0", - "sp-authority-discovery 27.0.0", + "sp-api", + "sp-authority-discovery", "sp-blockchain", - "sp-core 29.0.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] @@ -11927,12 +10756,12 @@ dependencies = [ "sc-proposer-metrics", "sc-telemetry", "sc-transaction-pool-api", - "sp-api 27.0.0", + "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 29.0.0", - "sp-inherents 27.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-inherents", + "sp-runtime", "substrate-prometheus-endpoint", ] @@ -11943,13 +10772,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e8b0640994965c6ff3afa13242d95a61611b83da21fd86ac2b1ebd03e241a02" dependencies = [ "parity-scale-codec", - "sp-api 27.0.0", - "sp-block-builder 27.0.0", + "sp-api", + "sp-block-builder", "sp-blockchain", - "sp-core 29.0.0", - "sp-inherents 27.0.0", - "sp-runtime 32.0.0", - "sp-trie 30.0.0", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-trie", ] [[package]] @@ -11971,12 +10800,12 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core 29.0.0", + "sp-core", "sp-crypto-hashing", - "sp-genesis-builder 0.8.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-genesis-builder", + "sp-io", + "sp-runtime", + "sp-state-machine", ] [[package]] @@ -12023,12 +10852,12 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core 29.0.0", + "sp-core", "sp-keyring", - "sp-keystore 0.35.0", + "sp-keystore", "sp-panic-handler", - "sp-runtime 32.0.0", - "sp-version 30.0.0", + "sp-runtime", + "sp-version", "thiserror", "tokio", ] @@ -12047,17 +10876,17 @@ dependencies = [ "sc-executor", "sc-transaction-pool-api", "sc-utils", - "sp-api 27.0.0", + "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 29.0.0", + "sp-core", "sp-database", - "sp-externalities 0.26.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-externalities", + "sp-runtime", + "sp-state-machine", "sp-statement-store", - "sp-storage 20.0.0", - "sp-trie 30.0.0", + "sp-storage", + "sp-trie", "substrate-prometheus-endpoint", ] @@ -12079,13 +10908,13 @@ dependencies = [ "sc-client-api", "sc-state-db", "schnellru", - "sp-arithmetic 24.0.0", + "sp-arithmetic", "sp-blockchain", - "sp-core 29.0.0", + "sp-core", "sp-database", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", - "sp-trie 30.0.0", + "sp-runtime", + "sp-state-machine", + "sp-trie", ] [[package]] @@ -12104,12 +10933,12 @@ dependencies = [ "sc-client-api", "sc-utils", "serde", - "sp-api 27.0.0", + "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-core", + "sp-runtime", + "sp-state-machine", "substrate-prometheus-endpoint", "thiserror", ] @@ -12135,18 +10964,18 @@ dependencies = [ "sc-consensus-slots", "sc-telemetry", "sc-transaction-pool-api", - "sp-api 27.0.0", - "sp-application-crypto 31.0.0", - "sp-block-builder 27.0.0", + "sp-api", + "sp-application-crypto", + "sp-block-builder", "sp-blockchain", "sp-consensus", - "sp-consensus-babe 0.33.0", - "sp-consensus-slots 0.33.0", - "sp-core 29.0.0", + "sp-consensus-babe", + "sp-consensus-slots", + "sp-core", "sp-crypto-hashing", - "sp-inherents 27.0.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", + "sp-inherents", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] @@ -12163,14 +10992,14 @@ dependencies = [ "sc-consensus-epochs", "sc-rpc-api", "serde", - "sp-api 27.0.0", - "sp-application-crypto 31.0.0", + "sp-api", + "sp-application-crypto", "sp-blockchain", "sp-consensus", - "sp-consensus-babe 0.33.0", - "sp-core 29.0.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", + "sp-consensus-babe", + "sp-core", + "sp-keystore", + "sp-runtime", "thiserror", ] @@ -12194,17 +11023,17 @@ dependencies = [ "sc-network-gossip", "sc-network-sync", "sc-utils", - "sp-api 27.0.0", - "sp-application-crypto 31.0.0", - "sp-arithmetic 24.0.0", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", "sp-blockchain", "sp-consensus", "sp-consensus-beefy", - "sp-core 29.0.0", + "sp-core", "sp-crypto-hashing", - "sp-keystore 0.35.0", + "sp-keystore", "sp-mmr-primitives", - "sp-runtime 32.0.0", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", "tokio", @@ -12226,8 +11055,8 @@ dependencies = [ "sc-rpc", "serde", "sp-consensus-beefy", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", "thiserror", ] @@ -12242,7 +11071,7 @@ dependencies = [ "sc-client-api", "sc-consensus", "sp-blockchain", - "sp-runtime 32.0.0", + "sp-runtime", ] [[package]] @@ -12275,16 +11104,16 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde_json", - "sp-api 27.0.0", - "sp-application-crypto 31.0.0", - "sp-arithmetic 24.0.0", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", - "sp-core 29.0.0", + "sp-core", "sp-crypto-hashing", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] @@ -12305,8 +11134,8 @@ dependencies = [ "sc-rpc", "serde", "sp-blockchain", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", "thiserror", ] @@ -12324,14 +11153,14 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-arithmetic 24.0.0", + "sp-arithmetic", "sp-blockchain", "sp-consensus", - "sp-consensus-slots 0.33.0", - "sp-core 29.0.0", - "sp-inherents 27.0.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", ] [[package]] @@ -12345,14 +11174,14 @@ dependencies = [ "sc-executor-common", "sc-executor-wasmtime", "schnellru", - "sp-api 27.0.0", - "sp-core 29.0.0", - "sp-externalities 0.26.0", - "sp-io 31.0.0", + "sp-api", + "sp-core", + "sp-externalities", + "sp-io", "sp-panic-handler", - "sp-runtime-interface 25.0.0", - "sp-trie 30.0.0", - "sp-version 30.0.0", + "sp-runtime-interface", + "sp-trie", + "sp-version", "sp-wasm-interface", "tracing", ] @@ -12384,7 +11213,7 @@ dependencies = [ "rustix 0.36.17", "sc-allocator", "sc-executor-common", - "sp-runtime-interface 25.0.0", + "sp-runtime-interface", "sp-wasm-interface", "wasmtime", ] @@ -12404,7 +11233,7 @@ dependencies = [ "sc-network-common", "sc-network-sync", "sp-blockchain", - "sp-runtime 32.0.0", + "sp-runtime", ] [[package]] @@ -12416,9 +11245,9 @@ dependencies = [ "array-bytes 6.2.2", "parking_lot 0.12.1", "serde_json", - "sp-application-crypto 31.0.0", - "sp-core 29.0.0", - "sp-keystore 0.35.0", + "sp-application-crypto", + "sp-core", + "sp-keystore", "thiserror", ] @@ -12443,12 +11272,12 @@ dependencies = [ "sc-client-api", "sc-network", "sc-transaction-pool-api", - "sp-api 27.0.0", + "sp-api", "sp-consensus", - "sp-core 29.0.0", - "sp-keystore 0.35.0", + "sp-core", + "sp-keystore", "sp-mixnet", - "sp-runtime 32.0.0", + "sp-runtime", "thiserror", ] @@ -12483,10 +11312,10 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-arithmetic 24.0.0", + "sp-arithmetic", "sp-blockchain", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", "tokio", @@ -12512,7 +11341,7 @@ dependencies = [ "sc-client-api", "sc-network", "sp-blockchain", - "sp-runtime 32.0.0", + "sp-runtime", "thiserror", "unsigned-varint", ] @@ -12532,7 +11361,7 @@ dependencies = [ "sc-consensus", "sp-consensus", "sp-consensus-grandpa", - "sp-runtime 32.0.0", + "sp-runtime", ] [[package]] @@ -12550,7 +11379,7 @@ dependencies = [ "sc-network-common", "sc-network-sync", "schnellru", - "sp-runtime 32.0.0", + "sp-runtime", "substrate-prometheus-endpoint", "tracing", ] @@ -12572,8 +11401,8 @@ dependencies = [ "sc-client-api", "sc-network", "sp-blockchain", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", "thiserror", ] @@ -12602,12 +11431,12 @@ dependencies = [ "sc-utils", "schnellru", "smallvec", - "sp-arithmetic 24.0.0", + "sp-arithmetic", "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", "tokio", @@ -12630,7 +11459,7 @@ dependencies = [ "sc-network-sync", "sc-utils", "sp-consensus", - "sp-runtime 32.0.0", + "sp-runtime", "substrate-prometheus-endpoint", ] @@ -12659,12 +11488,12 @@ dependencies = [ "sc-network-common", "sc-transaction-pool-api", "sc-utils", - "sp-api 27.0.0", - "sp-core 29.0.0", - "sp-externalities 0.26.0", - "sp-keystore 0.35.0", - "sp-offchain 27.0.0", - "sp-runtime 32.0.0", + "sp-api", + "sp-core", + "sp-externalities", + "sp-keystore", + "sp-offchain", + "sp-runtime", "threadpool", "tracing", ] @@ -12699,16 +11528,16 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde_json", - "sp-api 27.0.0", + "sp-api", "sp-blockchain", - "sp-core 29.0.0", - "sp-keystore 0.35.0", - "sp-offchain 27.0.0", + "sp-core", + "sp-keystore", + "sp-offchain", "sp-rpc", - "sp-runtime 32.0.0", - "sp-session 28.0.0", + "sp-runtime", + "sp-session", "sp-statement-store", - "sp-version 30.0.0", + "sp-version", "tokio", ] @@ -12726,10 +11555,10 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-core 29.0.0", + "sp-core", "sp-rpc", - "sp-runtime 32.0.0", - "sp-version 30.0.0", + "sp-runtime", + "sp-version", "thiserror", ] @@ -12769,12 +11598,12 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde", - "sp-api 27.0.0", + "sp-api", "sp-blockchain", - "sp-core 29.0.0", + "sp-core", "sp-rpc", - "sp-runtime 32.0.0", - "sp-version 30.0.0", + "sp-runtime", + "sp-version", "thiserror", "tokio", "tokio-stream", @@ -12821,20 +11650,20 @@ dependencies = [ "sc-utils", "serde", "serde_json", - "sp-api 27.0.0", + "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 29.0.0", - "sp-externalities 0.26.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", - "sp-session 28.0.0", - "sp-state-machine 0.36.0", - "sp-storage 20.0.0", - "sp-transaction-pool 27.0.0", + "sp-core", + "sp-externalities", + "sp-keystore", + "sp-runtime", + "sp-session", + "sp-state-machine", + "sp-storage", + "sp-transaction-pool", "sp-transaction-storage-proof", - "sp-trie 30.0.0", - "sp-version 30.0.0", + "sp-trie", + "sp-version", "static_init", "substrate-prometheus-endpoint", "tempfile", @@ -12853,7 +11682,7 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sp-core 29.0.0", + "sp-core", ] [[package]] @@ -12872,7 +11701,7 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-runtime 32.0.0", + "sp-runtime", "thiserror", ] @@ -12892,9 +11721,9 @@ dependencies = [ "sc-telemetry", "serde", "serde_json", - "sp-core 29.0.0", + "sp-core", "sp-crypto-hashing", - "sp-io 31.0.0", + "sp-io", "sp-std", ] @@ -12937,11 +11766,11 @@ dependencies = [ "sc-client-api", "sc-tracing-proc-macro", "serde", - "sp-api 27.0.0", + "sp-api", "sp-blockchain", - "sp-core 29.0.0", + "sp-core", "sp-rpc", - "sp-runtime 32.0.0", + "sp-runtime", "sp-tracing", "thiserror", "tracing", @@ -12978,13 +11807,13 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde", - "sp-api 27.0.0", + "sp-api", "sp-blockchain", - "sp-core 29.0.0", + "sp-core", "sp-crypto-hashing", - "sp-runtime 32.0.0", + "sp-runtime", "sp-tracing", - "sp-transaction-pool 27.0.0", + "sp-transaction-pool", "substrate-prometheus-endpoint", "thiserror", ] @@ -13001,8 +11830,8 @@ dependencies = [ "parity-scale-codec", "serde", "sp-blockchain", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", "thiserror", ] @@ -13019,7 +11848,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "prometheus", - "sp-arithmetic 24.0.0", + "sp-arithmetic", ] [[package]] @@ -13430,19 +12259,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" -[[package]] -name = "slot-range-helper" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d9bb569dc58f1e139c20f532a2ad13d54795060c0000c2c49dc812b17684197" -dependencies = [ - "enumn", - "parity-scale-codec", - "paste", - "sp-runtime 31.0.1", - "sp-std", -] - [[package]] name = "slot-range-helper" version = "8.0.0" @@ -13452,7 +12268,7 @@ dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime 32.0.0", + "sp-runtime", "sp-std", ] @@ -13533,45 +12349,23 @@ dependencies = [ [[package]] name = "sp-api" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dea138c6dbf282ab57756492f0232ea0a08575ca9cbe2b7b1ead49000f238a7" +checksum = "6ef42aa652381ade883c14ffbbb5c0fec36d382d2217b5bace01b8a0e8634778" dependencies = [ "hash-db", "log", "parity-scale-codec", "scale-info", "sp-api-proc-macro", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "sp-core", + "sp-externalities", "sp-metadata-ir", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-runtime", + "sp-state-machine", "sp-std", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "thiserror", -] - -[[package]] -name = "sp-api" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef42aa652381ade883c14ffbbb5c0fec36d382d2217b5bace01b8a0e8634778" -dependencies = [ - "hash-db", - "log", - "parity-scale-codec", - "scale-info", - "sp-api-proc-macro", - "sp-core 29.0.0", - "sp-externalities 0.26.0", - "sp-metadata-ir", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", - "sp-std", - "sp-trie 30.0.0", - "sp-version 30.0.0", + "sp-trie", + "sp-version", "thiserror", ] @@ -13590,20 +12384,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "sp-application-crypto" -version = "30.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4fe7a9b7fa9da76272b201e2fb3c7900d97d32a46b66af9a04dad457f73c71" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-std", -] - [[package]] name = "sp-application-crypto" version = "31.0.0" @@ -13613,26 +12393,11 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 29.0.0", - "sp-io 31.0.0", + "sp-core", + "sp-io", "sp-std", ] -[[package]] -name = "sp-arithmetic" -version = "23.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f42721f072b421f292a072e8f52a3b3c0fbc27428f0c9fe24067bc47046bad63" -dependencies = [ - "integer-sqrt", - "num-traits", - "parity-scale-codec", - "scale-info", - "serde", - "sp-std", - "static_assertions", -] - [[package]] name = "sp-arithmetic" version = "24.0.0" @@ -13648,20 +12413,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "sp-authority-discovery" -version = "26.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a740c05e9096eb17e93b5ab6aa5fe8ce0c9b4243777826d92133b3dd682e14" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-runtime 31.0.1", - "sp-std", -] - [[package]] name = "sp-authority-discovery" version = "27.0.0" @@ -13670,21 +12421,9 @@ checksum = "c92b177c72b5d2973c36d60f6ef942d791d9fd91eae8b08c71882e4118d4fbfc" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 27.0.0", - "sp-application-crypto 31.0.0", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "sp-block-builder" -version = "26.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d2aa0943101367b955f5806c3ecea2e23df7c90059708107470dbfb9d3d7ab" -dependencies = [ - "sp-api 26.0.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", + "sp-api", + "sp-application-crypto", + "sp-runtime", "sp-std", ] @@ -13694,9 +12433,9 @@ version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b36ce171caa7eb2bbe682c089f755fdefa71d3702e4fb1ba30d10146aef99d5" dependencies = [ - "sp-api 27.0.0", - "sp-inherents 27.0.0", - "sp-runtime 32.0.0", + "sp-api", + "sp-inherents", + "sp-runtime", "sp-std", ] @@ -13711,11 +12450,11 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "schnellru", - "sp-api 27.0.0", + "sp-api", "sp-consensus", "sp-database", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-runtime", + "sp-state-machine", "thiserror", ] @@ -13728,31 +12467,13 @@ dependencies = [ "async-trait", "futures", "log", - "sp-core 29.0.0", - "sp-inherents 27.0.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", "thiserror", ] -[[package]] -name = "sp-consensus-aura" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8e878a116b0885eaefd068235657737cb72fdce60a8c080dfd092f7d645cc" -dependencies = [ - "async-trait", - "parity-scale-codec", - "scale-info", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-consensus-slots 0.32.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", - "sp-std", - "sp-timestamp 26.0.0", -] - [[package]] name = "sp-consensus-aura" version = "0.33.0" @@ -13762,33 +12483,13 @@ dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-api 27.0.0", - "sp-application-crypto 31.0.0", - "sp-consensus-slots 0.33.0", - "sp-inherents 27.0.0", - "sp-runtime 32.0.0", - "sp-std", - "sp-timestamp 27.0.0", -] - -[[package]] -name = "sp-consensus-babe" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebfedfdea5b22fb3625cd664e72503dcbd1087373181d5be0d092b3e7b4c61f5" -dependencies = [ - "async-trait", - "parity-scale-codec", - "scale-info", - "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-consensus-slots 0.32.0", - "sp-core 28.0.0", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", + "sp-inherents", + "sp-runtime", "sp-std", - "sp-timestamp 26.0.0", + "sp-timestamp", ] [[package]] @@ -13801,14 +12502,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 27.0.0", - "sp-application-crypto 31.0.0", - "sp-consensus-slots 0.33.0", - "sp-core 29.0.0", - "sp-inherents 27.0.0", - "sp-runtime 32.0.0", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-runtime", "sp-std", - "sp-timestamp 27.0.0", + "sp-timestamp", ] [[package]] @@ -13821,13 +12522,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 27.0.0", - "sp-application-crypto 31.0.0", - "sp-core 29.0.0", + "sp-api", + "sp-application-crypto", + "sp-core", "sp-crypto-hashing", - "sp-io 31.0.0", + "sp-io", "sp-mmr-primitives", - "sp-runtime 32.0.0", + "sp-runtime", "sp-std", "strum 0.24.1", ] @@ -13843,27 +12544,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 27.0.0", - "sp-application-crypto 31.0.0", - "sp-core 29.0.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-keystore", + "sp-runtime", "sp-std", ] -[[package]] -name = "sp-consensus-slots" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc5c1620d81196391daa15e78ea20cc11c59f08c509381c276d5d6a3d4d36af" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-std", - "sp-timestamp 26.0.0", -] - [[package]] name = "sp-consensus-slots" version = "0.33.0" @@ -13874,53 +12562,7 @@ dependencies = [ "scale-info", "serde", "sp-std", - "sp-timestamp 27.0.0", -] - -[[package]] -name = "sp-core" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f230cb12575455070da0fc174815958423a0b9a641d5e304a9457113c7cb4007" -dependencies = [ - "array-bytes 6.2.2", - "bip39", - "bitflags 1.3.2", - "blake2 0.10.6", - "bounded-collections 0.1.9", - "bs58 0.5.0", - "dyn-clonable", - "ed25519-zebra", - "futures", - "hash-db", - "hash256-std-hasher", - "impl-serde", - "itertools 0.10.5", - "libsecp256k1", - "log", - "merlin 3.0.0", - "parity-scale-codec", - "parking_lot 0.12.1", - "paste", - "primitive-types", - "rand", - "scale-info", - "schnorrkel 0.11.4", - "secp256k1", - "secrecy", - "serde", - "sp-core-hashing", - "sp-debug-derive", - "sp-externalities 0.25.0", - "sp-runtime-interface 24.0.0", - "sp-std", - "sp-storage 19.0.0", - "ss58-registry", - "substrate-bip39", - "thiserror", - "tracing", - "w3f-bls", - "zeroize", + "sp-timestamp", ] [[package]] @@ -13933,7 +12575,7 @@ dependencies = [ "bip39", "bitflags 1.3.2", "blake2 0.10.6", - "bounded-collections 0.2.0", + "bounded-collections", "bs58 0.5.0", "dyn-clonable", "ed25519-zebra", @@ -13957,10 +12599,10 @@ dependencies = [ "serde", "sp-crypto-hashing", "sp-debug-derive", - "sp-externalities 0.26.0", - "sp-runtime-interface 25.0.0", + "sp-externalities", + "sp-runtime-interface", "sp-std", - "sp-storage 20.0.0", + "sp-storage", "ss58-registry", "substrate-bip39", "thiserror", @@ -13969,31 +12611,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "sp-core-hashing" -version = "15.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0f4990add7b2cefdeca883c0efa99bb4d912cb2196120e1500c0cc099553b0" -dependencies = [ - "blake2b_simd", - "byteorder", - "digest 0.10.7", - "sha2 0.10.8", - "sha3", - "twox-hash", -] - -[[package]] -name = "sp-core-hashing-proc-macro" -version = "15.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7527f8dda7667c41009b2cd0efaddcb81709b9741bd5ee6d17b11bad835cc698" -dependencies = [ - "quote", - "sp-core-hashing", - "syn 2.0.48", -] - [[package]] name = "sp-crypto-hashing" version = "0.1.0" @@ -14040,18 +12657,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "sp-externalities" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63867ec85950ced90d4ab1bba902a47db1b1efdf2829f653945669b2bb470a9c" -dependencies = [ - "environmental", - "parity-scale-codec", - "sp-std", - "sp-storage 19.0.0", -] - [[package]] name = "sp-externalities" version = "0.26.0" @@ -14061,19 +12666,7 @@ dependencies = [ "environmental", "parity-scale-codec", "sp-std", - "sp-storage 20.0.0", -] - -[[package]] -name = "sp-genesis-builder" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfdc79df83221ec5a279cbbd08fd6f8be164b9b081c8e84593ce2c2ebd5d66c0" -dependencies = [ - "serde_json", - "sp-api 26.0.0", - "sp-runtime 31.0.1", - "sp-std", + "sp-storage", ] [[package]] @@ -14083,26 +12676,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd865540ec19479c7349b584ccd78cc34c3f3a628a2a69dbb6365ceec36295ee" dependencies = [ "serde_json", - "sp-api 27.0.0", - "sp-runtime 32.0.0", + "sp-api", + "sp-runtime", "sp-std", ] -[[package]] -name = "sp-inherents" -version = "26.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3caf2d1288549d7e6c32b453f2d4855d498bb88600101011e35653e022a6f2" -dependencies = [ - "async-trait", - "impl-trait-for-tuples", - "parity-scale-codec", - "scale-info", - "sp-runtime 31.0.1", - "sp-std", - "thiserror", -] - [[package]] name = "sp-inherents" version = "27.0.0" @@ -14113,36 +12691,11 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime", "sp-std", "thiserror", ] -[[package]] -name = "sp-io" -version = "30.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55f26d89feedaf0faf81688b6e1e1e81329cd8b4c6a4fd6c5b97ed9dd068b8a" -dependencies = [ - "bytes", - "ed25519-dalek", - "libsecp256k1", - "log", - "parity-scale-codec", - "rustversion", - "secp256k1", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-keystore 0.34.0", - "sp-runtime-interface 24.0.0", - "sp-state-machine 0.35.0", - "sp-std", - "sp-tracing", - "sp-trie 29.0.0", - "tracing", - "tracing-core", -] - [[package]] name = "sp-io" version = "31.0.0" @@ -14156,15 +12709,15 @@ dependencies = [ "parity-scale-codec", "rustversion", "secp256k1", - "sp-core 29.0.0", + "sp-core", "sp-crypto-hashing", - "sp-externalities 0.26.0", - "sp-keystore 0.35.0", - "sp-runtime-interface 25.0.0", - "sp-state-machine 0.36.0", + "sp-externalities", + "sp-keystore", + "sp-runtime-interface", + "sp-state-machine", "sp-std", "sp-tracing", - "sp-trie 30.0.0", + "sp-trie", "tracing", "tracing-core", ] @@ -14175,24 +12728,11 @@ version = "32.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cf0a2f881958466fc92bc9b39bbc2c0d815ded4a21f8f953372b0ac2e11b02" dependencies = [ - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", "strum 0.24.1", ] -[[package]] -name = "sp-keystore" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96806a28a62ed9ddecd0b28857b1344d029390f7c5c42a2ff9199cbf5638635c" -dependencies = [ - "parity-scale-codec", - "parking_lot 0.12.1", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "thiserror", -] - [[package]] name = "sp-keystore" version = "0.35.0" @@ -14201,8 +12741,8 @@ checksum = "444f2d53968b1ce5e908882710ff1f3873fcf3e95f59d57432daf685bbacb959" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "sp-core 29.0.0", - "sp-externalities 0.26.0", + "sp-core", + "sp-externalities", "thiserror", ] @@ -14236,8 +12776,8 @@ checksum = "7bebd44b915c65aeb7e7eeaea466aba3b27cdd915c83ea83d4643c54f21ffbbf" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 27.0.0", - "sp-application-crypto 31.0.0", + "sp-api", + "sp-application-crypto", "sp-std", ] @@ -14252,29 +12792,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 27.0.0", - "sp-core 29.0.0", + "sp-api", + "sp-core", "sp-debug-derive", - "sp-runtime 32.0.0", + "sp-runtime", "sp-std", "thiserror", ] -[[package]] -name = "sp-npos-elections" -version = "26.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8efff28b504b4b928288976e5f72c00c7ece9d2348a7ca2496c77849dd4c8f" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-std", -] - [[package]] name = "sp-npos-elections" version = "27.0.0" @@ -14284,32 +12809,21 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic", + "sp-core", + "sp-runtime", "sp-std", ] -[[package]] -name = "sp-offchain" -version = "26.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb45b3e397dc9c7b81cb2d8d641d0bcb1f525b60e83835783413ba73b3f61ac9" -dependencies = [ - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", -] - [[package]] name = "sp-offchain" version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d83b955dce0b6d143bec3f60571311168f362b1c16cf044da7037a407b66c19" dependencies = [ - "sp-api 27.0.0", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-api", + "sp-core", + "sp-runtime", ] [[package]] @@ -14331,32 +12845,7 @@ checksum = "9af4b73fe7ddd88b1641cca90048c4e525e721763199e6fd29c4f590884f4d16" dependencies = [ "rustc-hash", "serde", - "sp-core 29.0.0", -] - -[[package]] -name = "sp-runtime" -version = "31.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3bb49a4475d390198dfd3d41bef4564ab569fbaf1b5e38ae69b35fc01199d91" -dependencies = [ - "docify", - "either", - "hash256-std-hasher", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "paste", - "rand", - "scale-info", - "serde", - "simple-mermaid", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-std", - "sp-weights 27.0.0", + "sp-core", ] [[package]] @@ -14376,31 +12865,12 @@ dependencies = [ "scale-info", "serde", "simple-mermaid", - "sp-application-crypto 31.0.0", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-std", - "sp-weights 28.0.0", -] - -[[package]] -name = "sp-runtime-interface" -version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f66b66d8cec3d785fa6289336c1d9cbd4305d5d84f7134378c4d79ed7983e6fb" -dependencies = [ - "bytes", - "impl-trait-for-tuples", - "parity-scale-codec", - "primitive-types", - "sp-externalities 0.25.0", - "sp-runtime-interface-proc-macro", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-io", "sp-std", - "sp-storage 19.0.0", - "sp-tracing", - "sp-wasm-interface", - "static_assertions", + "sp-weights", ] [[package]] @@ -14413,10 +12883,10 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities 0.26.0", + "sp-externalities", "sp-runtime-interface-proc-macro", "sp-std", - "sp-storage 20.0.0", + "sp-storage", "sp-tracing", "sp-wasm-interface", "static_assertions", @@ -14436,22 +12906,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "sp-session" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8048981db53d4f5171e6003f5e11fbfc27a8c196b0827619907a4214746a623b" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-staking 26.0.0", - "sp-std", -] - [[package]] name = "sp-session" version = "28.0.0" @@ -14460,26 +12914,11 @@ checksum = "3b86531090cc04d2ab3535df07146258e2fb3ab6257b0a77ef14aa08282c3d4a" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 27.0.0", - "sp-core 29.0.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", - "sp-staking 27.0.0", - "sp-std", -] - -[[package]] -name = "sp-staking" -version = "26.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0e68be3fff84dd8ee552f9d13dd2e9eab3663e0bddfc6c6c88de02aaca1e311" -dependencies = [ - "impl-trait-for-tuples", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-api", + "sp-core", + "sp-keystore", + "sp-runtime", + "sp-staking", "sp-std", ] @@ -14493,33 +12932,11 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", "sp-std", ] -[[package]] -name = "sp-state-machine" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718c779ad1d6fcc0be64c7ce030b33fa44b5c8914b3a1319ef63bb5f27fb98df" -dependencies = [ - "hash-db", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "rand", - "smallvec", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-panic-handler", - "sp-std", - "sp-trie 29.0.0", - "thiserror", - "tracing", - "trie-db", -] - [[package]] name = "sp-state-machine" version = "0.36.0" @@ -14532,11 +12949,11 @@ dependencies = [ "parking_lot 0.12.1", "rand", "smallvec", - "sp-core 29.0.0", - "sp-externalities 0.26.0", + "sp-core", + "sp-externalities", "sp-panic-handler", "sp-std", - "sp-trie 30.0.0", + "sp-trie", "thiserror", "tracing", "trie-db", @@ -14556,13 +12973,13 @@ dependencies = [ "rand", "scale-info", "sha2 0.10.8", - "sp-api 27.0.0", - "sp-application-crypto 31.0.0", - "sp-core 29.0.0", + "sp-api", + "sp-application-crypto", + "sp-core", "sp-crypto-hashing", - "sp-externalities 0.26.0", - "sp-runtime 32.0.0", - "sp-runtime-interface 25.0.0", + "sp-externalities", + "sp-runtime", + "sp-runtime-interface", "sp-std", "thiserror", "x25519-dalek 2.0.0", @@ -14574,20 +12991,6 @@ version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" -[[package]] -name = "sp-storage" -version = "19.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb92d7b24033a8a856d6e20dd980b653cbd7af7ec471cc988b1b7c1d2e3a32b" -dependencies = [ - "impl-serde", - "parity-scale-codec", - "ref-cast", - "serde", - "sp-debug-derive", - "sp-std", -] - [[package]] name = "sp-storage" version = "20.0.0" @@ -14602,20 +13005,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "sp-timestamp" -version = "26.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "347eaddd5b07856ccec69ac3300e72e392a5efc3aea5fb4b7230888a0b447b9e" -dependencies = [ - "async-trait", - "parity-scale-codec", - "sp-inherents 26.0.0", - "sp-runtime 31.0.1", - "sp-std", - "thiserror", -] - [[package]] name = "sp-timestamp" version = "27.0.0" @@ -14624,8 +13013,8 @@ checksum = "249cd06624f2edb53b25af528ab216a508dc9d0870e158b43caac3a97e86699f" dependencies = [ "async-trait", "parity-scale-codec", - "sp-inherents 27.0.0", - "sp-runtime 32.0.0", + "sp-inherents", + "sp-runtime", "sp-std", "thiserror", ] @@ -14643,24 +13032,14 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "sp-transaction-pool" -version = "26.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97c4052e69eacdb7a411e050c56a838f460b8a879071125451e9bb2d4814df34" -dependencies = [ - "sp-api 26.0.0", - "sp-runtime 31.0.1", -] - [[package]] name = "sp-transaction-pool" version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9742861c5330bdcb42856a6eed3d3745b58ee1c92ca4c9260032ff4e6c387165" dependencies = [ - "sp-api 27.0.0", - "sp-runtime 32.0.0", + "sp-api", + "sp-runtime", ] [[package]] @@ -14672,36 +13051,11 @@ dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-inherents 27.0.0", - "sp-runtime 32.0.0", - "sp-std", - "sp-trie 30.0.0", -] - -[[package]] -name = "sp-trie" -version = "29.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e4d24d84a0beb44a71dcac1b41980e1edf7fb722c7f3046710136a283cd479b" -dependencies = [ - "ahash 0.8.8", - "hash-db", - "lazy_static", - "memory-db", - "nohash-hasher", - "parity-scale-codec", - "parking_lot 0.12.1", - "rand", - "scale-info", - "schnellru", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "sp-core", + "sp-inherents", + "sp-runtime", "sp-std", - "thiserror", - "tracing", - "trie-db", - "trie-root", + "sp-trie", ] [[package]] @@ -14720,8 +13074,8 @@ dependencies = [ "rand", "scale-info", "schnellru", - "sp-core 29.0.0", - "sp-externalities 0.26.0", + "sp-core", + "sp-externalities", "sp-std", "thiserror", "tracing", @@ -14729,24 +13083,6 @@ dependencies = [ "trie-root", ] -[[package]] -name = "sp-version" -version = "29.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afd1b053394347e22f541696bca4a9ac3ec848b50d1b86f5018d2b771f39f11a" -dependencies = [ - "impl-serde", - "parity-scale-codec", - "parity-wasm", - "scale-info", - "serde", - "sp-core-hashing-proc-macro", - "sp-runtime 31.0.1", - "sp-std", - "sp-version-proc-macro", - "thiserror", -] - [[package]] name = "sp-version" version = "30.0.0" @@ -14759,7 +13095,7 @@ dependencies = [ "scale-info", "serde", "sp-crypto-hashing-proc-macro", - "sp-runtime 32.0.0", + "sp-runtime", "sp-std", "sp-version-proc-macro", "thiserror", @@ -14791,34 +13127,18 @@ dependencies = [ "wasmtime", ] -[[package]] -name = "sp-weights" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e874bdf9dd3fd3242f5b7867a4eaedd545b02f29041a46d222a9d9d5caaaa5c" -dependencies = [ - "bounded-collections 0.1.9", - "parity-scale-codec", - "scale-info", - "serde", - "smallvec", - "sp-arithmetic 23.0.0", - "sp-debug-derive", - "sp-std", -] - [[package]] name = "sp-weights" version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3be30aec904994451dcacf841a9168cfbbaf817de6b24b6a1c1418cbf1af2fe" dependencies = [ - "bounded-collections 0.2.0", + "bounded-collections", "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-arithmetic 24.0.0", + "sp-arithmetic", "sp-debug-derive", "sp-std", ] @@ -14882,37 +13202,37 @@ name = "staging-kusama-runtime" version = "1.0.0" dependencies = [ "binary-merkle-tree", - "frame-benchmarking 29.0.0", - "frame-election-provider-support 29.0.0", - "frame-executive 29.0.0", + "frame-benchmarking", + "frame-election-provider-support", + "frame-executive", "frame-remote-externalities", - "frame-support 29.0.0", - "frame-system 29.0.0", - "frame-system-benchmarking 29.0.0", - "frame-system-rpc-runtime-api 27.0.0", - "frame-try-runtime 0.35.0", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-rate 8.0.0", - "pallet-authority-discovery 29.0.0", - "pallet-authorship 29.0.0", - "pallet-babe 29.0.0", + "pallet-asset-rate", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", "pallet-bags-list", - "pallet-balances 29.0.0", + "pallet-balances", "pallet-beefy", "pallet-beefy-mmr", "pallet-bounties", "pallet-child-bounties", "pallet-conviction-voting", - "pallet-election-provider-multi-phase 28.0.0", - "pallet-election-provider-support-benchmarking 28.0.0", - "pallet-fast-unstake 28.0.0", + "pallet-election-provider-multi-phase", + "pallet-election-provider-support-benchmarking", + "pallet-fast-unstake", "pallet-grandpa", - "pallet-identity 29.0.0", + "pallet-identity", "pallet-im-online", "pallet-indices", - "pallet-message-queue 32.0.0", + "pallet-message-queue", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -14922,112 +13242,78 @@ dependencies = [ "pallet-offences", "pallet-offences-benchmarking", "pallet-preimage", - "pallet-proxy 29.0.0", + "pallet-proxy", "pallet-ranked-collective", "pallet-recovery", "pallet-referenda", - "pallet-scheduler 30.0.0", - "pallet-session 29.0.0", + "pallet-scheduler", + "pallet-session", "pallet-session-benchmarking", "pallet-society", - "pallet-staking 29.0.0", + "pallet-staking", "pallet-staking-runtime-api", "pallet-state-trie-migration", - "pallet-timestamp 28.0.0", - "pallet-transaction-payment 29.0.0", - "pallet-transaction-payment-rpc-runtime-api 29.0.0", - "pallet-treasury 28.0.0", - "pallet-utility 29.0.0", - "pallet-vesting 29.0.0", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", "pallet-whitelist", - "pallet-xcm 8.0.1", - "pallet-xcm-benchmarks 8.0.2", + "pallet-xcm", + "pallet-xcm-benchmarks", "parity-scale-codec", - "polkadot-primitives 8.0.1", - "polkadot-runtime-common 8.0.1", - "polkadot-runtime-parachains 8.0.1", + "polkadot-primitives", + "polkadot-runtime-common", + "polkadot-runtime-parachains", "scale-info", "separator", "serde_json", - "sp-api 27.0.0", - "sp-arithmetic 24.0.0", - "sp-authority-discovery 27.0.0", - "sp-block-builder 27.0.0", - "sp-consensus-babe 0.33.0", + "sp-api", + "sp-arithmetic", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 29.0.0", + "sp-core", "sp-debug-derive", - "sp-genesis-builder 0.8.0", - "sp-inherents 27.0.0", - "sp-io 31.0.0", + "sp-genesis-builder", + "sp-inherents", + "sp-io", "sp-keyring", - "sp-npos-elections 27.0.0", - "sp-offchain 27.0.0", - "sp-runtime 32.0.0", - "sp-session 28.0.0", - "sp-staking 27.0.0", + "sp-npos-elections", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", "sp-std", - "sp-storage 20.0.0", + "sp-storage", "sp-tracing", - "sp-transaction-pool 27.0.0", - "sp-trie 30.0.0", - "sp-version 30.0.0", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", - "staging-xcm-executor 8.0.1", - "substrate-wasm-builder 18.0.0", + "sp-transaction-pool", + "sp-trie", + "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", "tokio", ] -[[package]] -name = "staging-parachain-info" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad554ffd27fbcafd82e234d7e7188e458e51bfe2b3b5000dd236dce762e3e95f" -dependencies = [ - "cumulus-primitives-core 0.7.0", - "frame-support 28.0.0", - "frame-system 28.0.0", - "parity-scale-codec", - "scale-info", - "sp-runtime 31.0.1", - "sp-std", -] - [[package]] name = "staging-parachain-info" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da7dc139d104f676a18c13380a09c3f72d59450a7471116387cbf8cb5f845a0e" dependencies = [ - "cumulus-primitives-core 0.8.0", - "frame-support 29.0.0", - "frame-system 29.0.0", + "cumulus-primitives-core", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime", "sp-std", ] -[[package]] -name = "staging-xcm" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0df18af00766d22926916bb443f14742c65cc6b2f0fe997b8f26da0d0f9ee9ca" -dependencies = [ - "array-bytes 6.2.2", - "bounded-collections 0.1.9", - "derivative", - "environmental", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-weights 27.0.0", - "xcm-procedural 7.0.0", -] - [[package]] name = "staging-xcm" version = "8.0.0" @@ -15035,7 +13321,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ccecaeae5eca8453760e96fcf65481b19898459971842004732e88cd3570741" dependencies = [ "array-bytes 6.2.2", - "bounded-collections 0.2.0", + "bounded-collections", "derivative", "environmental", "impl-trait-for-tuples", @@ -15043,31 +13329,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-weights 28.0.0", - "xcm-procedural 8.0.0", -] - -[[package]] -name = "staging-xcm-builder" -version = "7.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ba4f214fe99d79ffcc266f431abbb32d3596788327b925d469c7bb6a3c84d3c" -dependencies = [ - "frame-support 28.0.0", - "frame-system 28.0.0", - "impl-trait-for-tuples", - "log", - "pallet-transaction-payment 28.0.0", - "parity-scale-codec", - "polkadot-parachain-primitives 6.0.0", - "scale-info", - "sp-arithmetic 23.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-std", - "sp-weights 27.0.0", - "staging-xcm 7.0.0", - "staging-xcm-executor 7.0.3", + "sp-weights", + "xcm-procedural", ] [[package]] @@ -15076,43 +13339,21 @@ version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f6cfc27c1d45f9a67e20ed3f7e60296299688825350291606add10bf3bbff2" dependencies = [ - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", - "pallet-transaction-payment 29.0.0", + "pallet-transaction-payment", "parity-scale-codec", - "polkadot-parachain-primitives 7.0.0", + "polkadot-parachain-primitives", "scale-info", - "sp-arithmetic 24.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic", + "sp-io", + "sp-runtime", "sp-std", - "sp-weights 28.0.0", - "staging-xcm 8.0.0", - "staging-xcm-executor 8.0.1", -] - -[[package]] -name = "staging-xcm-executor" -version = "7.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f1dea1e33eefee513c197c24255670951a2c515a6ce2c7049fe86385400074f" -dependencies = [ - "environmental", - "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-std", - "sp-weights 27.0.0", - "staging-xcm 7.0.0", + "sp-weights", + "staging-xcm", + "staging-xcm-executor", ] [[package]] @@ -15122,19 +13363,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a638f4c8735cc04b5c93920a1f59e679f48b131315a07d146798e0decebf7720" dependencies = [ "environmental", - "frame-benchmarking 29.0.0", - "frame-support 29.0.0", + "frame-benchmarking", + "frame-support", "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", "sp-std", - "sp-weights 28.0.0", - "staging-xcm 8.0.0", + "sp-weights", + "staging-xcm", ] [[package]] @@ -15262,18 +13503,18 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "332f903d2f34703204f0003136c9abbc569d691028279996a1daf8f248a7369f" dependencies = [ - "frame-system-rpc-runtime-api 27.0.0", + "frame-system-rpc-runtime-api", "futures", "jsonrpsee", "log", "parity-scale-codec", "sc-rpc-api", "sc-transaction-pool-api", - "sp-api 27.0.0", - "sp-block-builder 27.0.0", + "sp-api", + "sp-block-builder", "sp-blockchain", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core", + "sp-runtime", ] [[package]] @@ -15311,7 +13552,7 @@ dependencies = [ "log", "sc-rpc-api", "serde", - "sp-runtime 32.0.0", + "sp-runtime", ] [[package]] @@ -15325,10 +13566,10 @@ dependencies = [ "sc-client-api", "sc-rpc-api", "serde", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", - "sp-trie 30.0.0", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-trie", "trie-db", ] @@ -15342,25 +13583,6 @@ dependencies = [ "scale-info", ] -[[package]] -name = "substrate-wasm-builder" -version = "17.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac08d23ff4da66fe6cb0300f249be010d78e5abeafef0390cae39736a374e6cd" -dependencies = [ - "ansi_term", - "build-helper", - "cargo_metadata", - "filetime", - "parity-wasm", - "sp-maybe-compressed-blob", - "strum 0.24.1", - "tempfile", - "toml 0.8.10", - "walkdir", - "wasm-opt", -] - [[package]] name = "substrate-wasm-builder" version = "18.0.0" @@ -15451,14 +13673,14 @@ dependencies = [ name = "system-parachains-constants" version = "1.0.0" dependencies = [ - "frame-support 29.0.0", + "frame-support", "kusama-runtime-constants", - "parachains-common 8.0.0", - "polkadot-core-primitives 8.0.0", - "polkadot-primitives 8.0.1", + "parachains-common", + "polkadot-core-primitives", + "polkadot-primitives", "polkadot-runtime-constants", "smallvec", - "sp-runtime 32.0.0", + "sp-runtime", ] [[package]] @@ -15517,13 +13739,13 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ff23c25f39d64b930ab9d721643d0c780a66201c7f1da34fac6982752626bf5" dependencies = [ - "frame-support 29.0.0", - "polkadot-core-primitives 8.0.0", - "rococo-runtime-constants 8.0.0", + "frame-support", + "polkadot-core-primitives", + "rococo-runtime-constants", "smallvec", - "sp-runtime 32.0.0", - "staging-xcm 8.0.0", - "westend-runtime-constants 8.0.0", + "sp-runtime", + "staging-xcm", + "westend-runtime-constants", ] [[package]] @@ -15907,7 +14129,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9690af7fe11d125786fa1b5ca802192f631b61a4411277865c8e0581c887e286" dependencies = [ "coarsetime", - "polkadot-primitives 8.0.1", + "polkadot-primitives", "tracing", "tracing-gum-proc-macro", ] @@ -16621,38 +14843,21 @@ dependencies = [ "webpki", ] -[[package]] -name = "westend-runtime-constants" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c410b8a17b87e5228f9c27ba4a8020e7ece4a8afb0f452b989834623afe84a2" -dependencies = [ - "frame-support 28.0.0", - "polkadot-primitives 7.0.0", - "polkadot-runtime-common 7.0.0", - "smallvec", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", - "staging-xcm 7.0.0", - "staging-xcm-builder 7.0.3", -] - [[package]] name = "westend-runtime-constants" version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b080c193714605ce1033311d85035247adca170181cd68a3ad7e3ca87755a14" dependencies = [ - "frame-support 29.0.0", - "polkadot-primitives 8.0.1", - "polkadot-runtime-common 8.0.1", + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", "smallvec", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "sp-weights 28.0.0", - "staging-xcm 8.0.0", - "staging-xcm-builder 8.0.1", + "sp-core", + "sp-runtime", + "sp-weights", + "staging-xcm", + "staging-xcm-builder", ] [[package]] @@ -17015,45 +15220,33 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b49681988880dd6d08a4d5f6b7cb612a0f12172270349655c1e2f870b3526fd" dependencies = [ - "cumulus-pallet-parachain-system 0.8.1", - "cumulus-pallet-xcmp-queue 0.8.0", - "cumulus-primitives-core 0.8.0", - "cumulus-primitives-parachain-inherent 0.8.0", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", "cumulus-test-relay-sproof-builder", - "frame-support 29.0.0", - "frame-system 29.0.0", + "frame-support", + "frame-system", "impl-trait-for-tuples", "lazy_static", "log", - "pallet-balances 29.0.0", - "pallet-message-queue 32.0.0", - "parachains-common 8.0.0", + "pallet-balances", + "pallet-message-queue", + "parachains-common", "parity-scale-codec", "paste", - "polkadot-parachain-primitives 7.0.0", - "polkadot-primitives 8.0.1", - "polkadot-runtime-parachains 8.0.1", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-parachains", + "sp-arithmetic", + "sp-core", "sp-crypto-hashing", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io", + "sp-runtime", "sp-std", "sp-tracing", - "staging-xcm 8.0.0", - "staging-xcm-executor 8.0.1", -] - -[[package]] -name = "xcm-procedural" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7998facd751c42ec9b11a4cf71fcdb41fb147c5c8db8bcd1281fe84f8760d515" -dependencies = [ - "Inflector", - "proc-macro2", - "quote", - "syn 2.0.48", + "staging-xcm", + "staging-xcm-executor", ] [[package]] diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml index c54c555759..80e9012b40 100644 --- a/system-parachains/encointer/Cargo.toml +++ b/system-parachains/encointer/Cargo.toml @@ -20,80 +20,81 @@ scale-info = { version = "2.10.0", default-features = false, features = [ smallvec = "1.13.1" # encointer deps -encointer-balances-tx-payment = { default-features = false, version = "5.0.0" } -encointer-balances-tx-payment-rpc-runtime-api = { default-features = false, version = "5.0.0" } -encointer-primitives = { default-features = false, version = "5.0.0" } -pallet-encointer-balances = { default-features = false, version = "5.0.0" } -pallet-encointer-bazaar = { default-features = false, version = "5.0.0" } -pallet-encointer-bazaar-rpc-runtime-api = { default-features = false, version = "5.0.0" } -pallet-encointer-ceremonies = { default-features = false, version = "5.0.0" } -pallet-encointer-ceremonies-rpc-runtime-api = { default-features = false, version = "5.0.0" } -pallet-encointer-communities = { default-features = false, version = "5.0.0" } -pallet-encointer-communities-rpc-runtime-api = { default-features = false, version = "5.0.0" } -pallet-encointer-faucet = { default-features = false, version = "5.0.0" } -pallet-encointer-reputation-commitments = { default-features = false, version = "5.0.0" } -pallet-encointer-scheduler = { default-features = false, version = "5.0.0" } +encointer-balances-tx-payment = { default-features = false, version = "6.0.0" } +encointer-balances-tx-payment-rpc-runtime-api = { default-features = false, version = "6.0.0" } +encointer-primitives = { default-features = false, version = "6.0.2" } +pallet-encointer-balances = { default-features = false, version = "6.0.0" } +pallet-encointer-bazaar = { default-features = false, version = "6.0.0" } +pallet-encointer-bazaar-rpc-runtime-api = { default-features = false, version = "6.0.0" } +pallet-encointer-ceremonies = { default-features = false, version = "6.0.0" } +pallet-encointer-ceremonies-rpc-runtime-api = { default-features = false, version = "6.0.0" } +pallet-encointer-communities = { default-features = false, version = "6.0.0" } +pallet-encointer-communities-rpc-runtime-api = { default-features = false, version = "6.0.0" } +pallet-encointer-faucet = { default-features = false, version = "6.0.0" } +pallet-encointer-reputation-commitments = { default-features = false, version = "6.0.0" } +pallet-encointer-scheduler = { default-features = false, version = "6.0.0" } + # Substrate -frame-benchmarking = { default-features = false, optional = true, version = "28.0.0" } -frame-executive = { default-features = false, version = "28.0.0" } -frame-support = { default-features = false, version = "28.0.0" } -frame-system = { default-features = false, version = "28.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "28.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "26.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.34.0" } -pallet-asset-tx-payment = { default-features = false, version = "28.0.0" } -pallet-aura = { default-features = false, version = "27.0.0" } -pallet-balances = { default-features = false, version = "28.0.0" } -pallet-collective = { default-features = false, version = "28.0.0" } -pallet-insecure-randomness-collective-flip = { default-features = false, version = "16.0.0" } -pallet-membership = { default-features = false, version = "28.0.0" } -pallet-message-queue = { default-features = false, version = "31.0.0" } -pallet-proxy = { default-features = false, version = "28.0.0" } -pallet-scheduler = { default-features = false, version = "29.0.0" } -pallet-timestamp = { default-features = false, version = "27.0.0" } -pallet-transaction-payment = { default-features = false, version = "28.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "28.0.0" } -pallet-treasury = { default-features = false, version = "27.0.0" } -pallet-utility = { default-features = false, version = "28.0.0" } -sp-api = { default-features = false, version = "26.0.0" } -sp-block-builder = { default-features = false, version = "26.0.0" } -sp-consensus-aura = { default-features = false, version = "0.32.0" } -sp-core = { default-features = false, version = "28.0.0" } -sp-inherents = { default-features = false, version = "26.0.0" } -sp-offchain = { default-features = false, version = "26.0.0" } -sp-runtime = { default-features = false, version = "31.0.0" } -sp-session = { default-features = false, version = "27.0.0" } +frame-benchmarking = { default-features = false, optional = true, version = "29.0.0" } +frame-executive = { default-features = false, version = "29.0.0" } +frame-support = { default-features = false, version = "29.0.0" } +frame-system = { default-features = false, version = "29.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "29.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "27.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.35.0" } +pallet-asset-tx-payment = { default-features = false, version = "29.0.0" } +pallet-aura = { default-features = false, version = "28.0.0" } +pallet-balances = { default-features = false, version = "29.0.0" } +pallet-collective = { default-features = false, version = "29.0.0" } +pallet-insecure-randomness-collective-flip = { default-features = false, version = "17.0.0" } +pallet-membership = { default-features = false, version = "29.0.0" } +pallet-message-queue = { default-features = false, version = "32.0.0" } +pallet-proxy = { default-features = false, version = "29.0.0" } +pallet-scheduler = { default-features = false, version = "30.0.0" } +pallet-timestamp = { default-features = false, version = "28.0.0" } +pallet-transaction-payment = { default-features = false, version = "29.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "29.0.0" } +pallet-treasury = { default-features = false, version = "28.0.0" } +pallet-utility = { default-features = false, version = "29.0.0" } +sp-api = { default-features = false, version = "27.0.0" } +sp-block-builder = { default-features = false, version = "27.0.0" } +sp-consensus-aura = { default-features = false, version = "0.33.0" } +sp-core = { default-features = false, version = "29.0.0" } +sp-inherents = { default-features = false, version = "27.0.0" } +sp-offchain = { default-features = false, version = "27.0.0" } +sp-runtime = { default-features = false, version = "32.0.0" } +sp-session = { default-features = false, version = "28.0.0" } sp-std = { default-features = false, version = "14.0.0" } -sp-transaction-pool = { default-features = false, version = "26.0.0" } -sp-version = { default-features = false, version = "29.0.0" } -sp-genesis-builder = { default-features = false, version = "0.7.0" } +sp-transaction-pool = { default-features = false, version = "27.0.0" } +sp-version = { default-features = false, version = "30.0.0" } +sp-genesis-builder = { default-features = false, version = "0.8.0" } # Polkadot dependencies -pallet-xcm = { default-features = false, version = "7.0.0" } -polkadot-parachain-primitives = { default-features = false, version = "6.0.0" } -polkadot-runtime-common = { default-features = false, version = "7.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "7.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "7.0.3" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "7.0.3" } +pallet-xcm = { default-features = false, version = "8.0.1" } +polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } +polkadot-runtime-common = { default-features = false, version = "8.0.1" } +xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.1" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } # Cumulus dependencies -cumulus-pallet-aura-ext = { default-features = false, version = "0.7.0" } -cumulus-pallet-dmp-queue = { default-features = false, version = "0.7.0" } +cumulus-pallet-aura-ext = { default-features = false, version = "0.8.0" } +cumulus-pallet-dmp-queue = { default-features = false, version = "0.8.0" } cumulus-pallet-parachain-system = { default-features = false, features = [ "parameterized-consensus-hook", -], version = "0.7.0" } -cumulus-pallet-xcm = { default-features = false, version = "0.7.0" } -cumulus-pallet-xcmp-queue = { default-features = false, version = "0.7.0" } -cumulus-primitives-core = { default-features = false, version = "0.7.0" } -cumulus-primitives-utility = { default-features = false, version = "0.7.0" } -parachain-info = { package = "staging-parachain-info", default-features = false, version = "0.7.0" } -parachains-common = { default-features = false, version = "7.0.0" } -polkadot-core-primitives = { default-features = false, version = "7.0.0" } -polkadot-primitives = { default-features = false, version = "7.0.0" } +], version = "0.8.1" } +cumulus-pallet-xcm = { default-features = false, version = "0.8.0" } +cumulus-pallet-xcmp-queue = { default-features = false, version = "0.8.0" } +cumulus-primitives-core = { default-features = false, version = "0.8.0" } +cumulus-primitives-utility = { default-features = false, version = "0.8.1" } +parachain-info = { package = "staging-parachain-info", default-features = false, version = "0.8.0" } +parachains-common = { default-features = false, version = "8.0.0" } +polkadot-core-primitives = { default-features = false, version = "8.0.0" } +polkadot-primitives = { default-features = false, version = "8.0.1" } [build-dependencies] -substrate-wasm-builder = { optional = true, version = "17.0.0" } +substrate-wasm-builder = { optional = true, version = "18.0.0" } [dev-dependencies] # The Encointer pallets might not have compatible versions of `polkadot-sdk` with the rest of the system parachains, @@ -152,7 +153,7 @@ std = [ "frame-support/std", "frame-system-rpc-runtime-api/std", "frame-system/std", - "frame-try-runtime/std", + "frame-try-runtime?/std", "log/std", "pallet-asset-tx-payment/std", "pallet-aura/std", @@ -239,3 +240,4 @@ experimental = ["pallet-aura/experimental"] # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. on-chain-release-build = ["sp-api/disable-logging"] + diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 7b89827999..f2c82fc325 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -100,7 +100,7 @@ use system_parachains_constants::{ SLOT_DURATION, }; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; -use xcm::{latest::BodyId, v3::AssetId as XcmAssetId}; +use xcm::latest::prelude::{AssetId as XcmAssetId, BodyId}; use xcm_config::{KsmLocation, XcmOriginToTransactDispatchOrigin}; @@ -307,7 +307,6 @@ impl pallet_balances::Config for Runtime { type RuntimeHoldReason = (); type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; } @@ -440,7 +439,7 @@ impl cumulus_pallet_aura_ext::Config for Runtime {} parameter_types! { pub const ExecutiveBody: BodyId = BodyId::Executive; /// The asset ID for the asset that we use to pay for message delivery fees. - pub FeeAssetId: XcmAssetId = XcmAssetId::Concrete(xcm_config::KsmLocation::get()); + pub FeeAssetId: XcmAssetId = XcmAssetId(xcm_config::KsmLocation::get()); /// The base fee for the message delivery fees. pub const ToSiblingBaseDeliveryFee: u128 = CENTS.saturating_mul(3); pub const ToParentBaseDeliveryFee: u128 = CENTS.saturating_mul(3); @@ -706,10 +705,7 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic, - // also here we're actually too late with applying the migration. however, the migration does + // we're actually too late with applying the migration. however, the migration does // work as-is. pallet_xcm::migration::v1::VersionUncheckedMigrateToV1, // balances are more tricky. We missed to do the migration to V1 and now we have inconsistent @@ -721,6 +717,8 @@ pub type Migrations = ( //then apply the proper migration as we should have done earlier pallet_balances::migration::MigrateToTrackInactive, cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, + // permanent + pallet_xcm::migration::MigrateToLatestXcmVersion, ); /// Executive: handles dispatch to the various modules. diff --git a/system-parachains/encointer/src/weights/pallet_balances.rs b/system-parachains/encointer/src/weights/pallet_balances.rs index 449621b5aa..c32d3f9d7d 100644 --- a/system-parachains/encointer/src/weights/pallet_balances.rs +++ b/system-parachains/encointer/src/weights/pallet_balances.rs @@ -1,25 +1,40 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("encointer-rococo-local-dev"), DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("../asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// target/release/encointer-collator +// ./target/production/polkadot // benchmark // pallet -// --chain=encointer-rococo-local-dev +// --chain=../asset-hub-kusama-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_balances // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=polkadot-parachains/encointer-runtime/src/weights/pallet_balances.rs +// --output=./asset-hub-kusama-weights +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,104 +47,115 @@ use core::marker::PhantomData; /// Weight functions for `pallet_balances`. pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_allow_death() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 51_062_000 picoseconds. - Weight::from_parts(52_242_000, 0) + // Minimum execution time: 43_860_000 picoseconds. + Weight::from_parts(44_224_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_keep_alive() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 38_442_000 picoseconds. - Weight::from_parts(38_796_000, 0) + // Minimum execution time: 34_240_000 picoseconds. + Weight::from_parts(34_659_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_set_balance_creating() -> Weight { // Proof Size summary in bytes: - // Measured: `103` + // Measured: `174` // Estimated: `3593` - // Minimum execution time: 12_980_000 picoseconds. - Weight::from_parts(13_172_000, 0) + // Minimum execution time: 14_009_000 picoseconds. + Weight::from_parts(14_639_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_set_balance_killing() -> Weight { // Proof Size summary in bytes: - // Measured: `103` + // Measured: `174` // Estimated: `3593` - // Minimum execution time: 19_468_000 picoseconds. - Weight::from_parts(19_763_000, 0) + // Minimum execution time: 18_844_000 picoseconds. + Weight::from_parts(19_518_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 51_765_000 picoseconds. - Weight::from_parts(52_610_000, 0) + // Minimum execution time: 46_279_000 picoseconds. + Weight::from_parts(47_441_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_all() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 47_586_000 picoseconds. - Weight::from_parts(48_295_000, 0) + // Minimum execution time: 42_457_000 picoseconds. + Weight::from_parts(42_914_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_unreserve() -> Weight { // Proof Size summary in bytes: - // Measured: `103` + // Measured: `174` // Estimated: `3593` - // Minimum execution time: 15_891_000 picoseconds. - Weight::from_parts(16_204_000, 0) + // Minimum execution time: 16_297_000 picoseconds. + Weight::from_parts(16_925_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: System Account (r:999 w:999) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:999 w:999) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `u` is `[1, 1000]`. fn upgrade_accounts(u: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + u * (135 ±0)` + // Measured: `0 + u * (136 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 15_647_000 picoseconds. - Weight::from_parts(15_952_000, 0) + // Minimum execution time: 15_740_000 picoseconds. + Weight::from_parts(15_870_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 99_031 - .saturating_add(Weight::from_parts(15_553_741, 0).saturating_mul(u.into())) + // Standard Error: 15_344 + .saturating_add(Weight::from_parts(13_532_274, 0).saturating_mul(u.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).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 { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1501` + // Minimum execution time: 5_208_000 picoseconds. + Weight::from_parts(5_619_000, 0) + .saturating_add(Weight::from_parts(0, 1501)) + .saturating_add(T::DbWeight::get().reads(1)) + } } diff --git a/system-parachains/encointer/src/xcm_config.rs b/system-parachains/encointer/src/xcm_config.rs index 4b796026b9..cc828e7546 100644 --- a/system-parachains/encointer/src/xcm_config.rs +++ b/system-parachains/encointer/src/xcm_config.rs @@ -20,37 +20,37 @@ use super::{ RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ - match_types, parameter_types, - traits::{Everything, Nothing}, + parameter_types, + traits::{Contains, Everything, Nothing}, weights::Weight, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use parachains_common::xcm_config::ConcreteAssetFromSystem; +use parachains_common::xcm_config::{ConcreteAssetFromSystem, ParentRelayOrSiblingParachains}; use polkadot_parachain_primitives::primitives::Sibling; use sp_core::ConstU32; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, DenyReserveTransferToRelayChain, + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, DescribeTerminus, EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, HashedDescription, IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, + TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, }; use xcm_executor::XcmExecutor; 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 Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); + pub Ancestry: Location = Parachain(ParachainInfo::parachain_id().into()).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); - pub UniversalLocation: InteriorMultiLocation = - X2(GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())); + pub UniversalLocation: InteriorLocation = + [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())].into(); } /// Type for specifying how a `Location` can be converted into an `AccountId`. This is used @@ -111,15 +111,11 @@ 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 type ParentOrSiblings: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(_) } - }; +pub struct ParentOrParentsPlurality; +impl Contains for ParentOrParentsPlurality { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, []) | (1, [Plurality { .. }])) + } } pub type Barrier = TrailingSetTopicAsId< @@ -127,16 +123,27 @@ pub type Barrier = TrailingSetTopicAsId< DenyReserveTransferToRelayChain, ( TakeWeightCredit, - AllowTopLevelPaidExecutionFrom, - // Parent and its exec plurality get free execution - AllowUnpaidExecutionFrom, // Expected responses are OK. AllowKnownQueryResponses, - // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, + // Allow XCMs with some computed origins to pass through. + WithComputedOrigin< + ( + // If the message is one that immediately attempts to pay for execution, then + // allow it. + AllowTopLevelPaidExecutionFrom, + // Parent, its pluralities (i.e. governance bodies), parent's treasury and + // sibling bridge hub get free execution. + AllowExplicitUnpaidExecutionFrom<(ParentOrParentsPlurality,)>, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, ), >, >; + pub struct SafeCallFilter; impl frame_support::traits::Contains for SafeCallFilter { fn contains(_call: &RuntimeCall) -> bool { @@ -148,7 +155,7 @@ impl frame_support::traits::Contains for SafeCallFilter { parameter_types! { pub const MaxAssetsIntoHolding: u32 = 64; - pub const KsmRelayLocation: MultiLocation = MultiLocation::parent(); + pub const KsmRelayLocation: Location = Location::parent(); } /// Cases where a remote origin is accepted as trusted Teleporter for a given asset: @@ -201,7 +208,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 { From c95c5073f553a5f7775cf50737f91b28c8ac189d Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 29 Feb 2024 09:11:49 +0200 Subject: [PATCH 224/316] update --- Cargo.lock | 864 ++++++++++++++++++++++++++++++++++-- docs/removing-migrations.md | 2 +- 2 files changed, 840 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e50b95f8fb..9edf3a2697 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -110,6 +110,77 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +[[package]] +name = "alloy-primitives" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0628ec0ba5b98b3370bb6be17b12f23bfce8ee4ad83823325a20546d9b03b78" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "proptest", + "rand", + "ruint", + "serde", + "tiny-keccak", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" +dependencies = [ + "alloy-rlp-derive", + "arrayvec 0.7.4", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a98ad1696a2e17f010ae8e43e9f2a1e930ed176a8e3ff77acfeff6dfb07b42c" +dependencies = [ + "const-hex", + "dunce", + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.48", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-types" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98d7107bed88e8f09f0ddcc3335622d87bfb6821f3e0c7473329fb1cfad5e015" +dependencies = [ + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + [[package]] name = "always-assert" version = "0.1.3" @@ -224,8 +295,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" dependencies = [ "ark-ec", - "ark-ff", - "ark-std", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -235,9 +306,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" dependencies = [ "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -246,10 +317,10 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" dependencies = [ - "ark-ff", + "ark-ff 0.4.2", "ark-poly", - "ark-serialize", - "ark-std", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", "itertools 0.10.5", @@ -257,16 +328,34 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + [[package]] name = "ark-ff" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "digest 0.10.7", "itertools 0.10.5", @@ -277,6 +366,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-asm" version = "0.4.2" @@ -287,6 +386,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-macros" version = "0.4.2" @@ -306,13 +417,23 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", ] +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + [[package]] name = "ark-serialize" version = "0.4.2" @@ -320,7 +441,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ "ark-serialize-derive", - "ark-std", + "ark-std 0.4.0", "digest 0.10.7", "num-bigint", ] @@ -336,6 +457,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand", +] + [[package]] name = "ark-std" version = "0.4.0" @@ -520,6 +651,7 @@ dependencies = [ "polkadot-runtime-constants", "primitive-types", "scale-info", + "snowbridge-router-primitives", "sp-api", "sp-block-builder", "sp-consensus-aura", @@ -640,6 +772,7 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-constants", "scale-info", + "snowbridge-router-primitives", "sp-api", "sp-block-builder", "sp-consensus-aura", @@ -791,6 +924,17 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -904,6 +1048,21 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitcoin_hashes" version = "0.11.0" @@ -1301,6 +1460,24 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "bridge-hub-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e69c25ec3db0ef22ae409cc60f5c42364124264ce6640e17dbcfc0280e4b5dd9" +dependencies = [ + "cumulus-primitives-core", + "frame-support", + "pallet-message-queue", + "parity-scale-codec", + "scale-info", + "snowbridge-core", + "sp-core", + "sp-runtime", + "sp-std", + "staging-xcm", +] + [[package]] name = "bridge-hub-kusama-emulated-chain" version = "1.0.0" @@ -1352,6 +1529,7 @@ dependencies = [ "bp-polkadot-core", "bp-relayers", "bp-runtime", + "bridge-hub-common", "bridge-hub-test-utils", "bridge-runtime-common", "cumulus-pallet-aura-ext", @@ -1391,6 +1569,7 @@ dependencies = [ "pallet-xcm-benchmarks", "pallet-xcm-bridge-hub", "parachains-common", + "parachains-runtimes-test-utils", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", @@ -1398,6 +1577,18 @@ dependencies = [ "polkadot-runtime-constants", "scale-info", "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-ethereum-client-fixtures", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-runtime-common", + "snowbridge-runtime-test-common", + "snowbridge-system-runtime-api", "sp-api", "sp-block-builder", "sp-consensus-aura", @@ -1472,6 +1663,7 @@ dependencies = [ "bp-polkadot-core", "bp-relayers", "bp-runtime", + "bridge-hub-common", "bridge-hub-test-utils", "bridge-runtime-common", "cumulus-pallet-aura-ext", @@ -1511,6 +1703,7 @@ dependencies = [ "pallet-xcm-benchmarks", "pallet-xcm-bridge-hub", "parachains-common", + "parachains-runtimes-test-utils", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", @@ -1518,6 +1711,18 @@ dependencies = [ "polkadot-runtime-constants", "scale-info", "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-ethereum-client-fixtures", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-runtime-common", + "snowbridge-runtime-test-common", + "snowbridge-system-runtime-api", "sp-api", "sp-block-builder", "sp-consensus-aura", @@ -2099,6 +2304,19 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "const-hex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efbd12d49ab0eaf8193ba9175e45f56bbc2e4b27d57b8cfe62aa47942a46b9a9" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + [[package]] name = "const-oid" version = "0.9.5" @@ -2965,6 +3183,12 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + [[package]] name = "dyn-clonable" version = "0.9.0" @@ -3359,6 +3583,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "ethabi-decode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d398648d65820a727d6a81e58b962f874473396a047e4c30bafe3240953417" +dependencies = [ + "ethereum-types", + "tiny-keccak", +] + [[package]] name = "ethbloom" version = "0.13.0" @@ -3367,8 +3601,10 @@ checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", + "scale-info", "tiny-keccak", ] @@ -3380,9 +3616,11 @@ checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ "ethbloom", "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", "primitive-types", + "scale-info", "uint", ] @@ -3465,6 +3703,17 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec 0.7.4", + "auto_impl", + "bytes", +] + [[package]] name = "fatality" version = "0.0.6" @@ -8156,6 +8405,12 @@ dependencies = [ "substrate-wasm-builder", ] +[[package]] +name = "parity-bytes" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b56e3a2420138bdb970f84dfb9c774aea80fa0e7371549eedec0d80c209c67" + [[package]] name = "parity-db" version = "0.4.13" @@ -10005,6 +10260,26 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.4.1", + "lazy_static", + "num-traits", + "rand", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax 0.8.2", + "rusty-fork", + "tempfile", + "unarray", +] + [[package]] name = "prost" version = "0.11.9" @@ -10231,6 +10506,15 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -10523,6 +10807,36 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ruint" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b1d9521f889713d1221270fdd63370feca7e5c71a18745343402fa86e4f04f" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -10550,6 +10864,15 @@ dependencies = [ "semver 0.9.0", ] +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + [[package]] name = "rustc_version" version = "0.4.0" @@ -10656,6 +10979,18 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -12033,7 +12368,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", ] [[package]] @@ -12042,7 +12377,16 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser 0.10.2", ] [[package]] @@ -12060,6 +12404,15 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + [[package]] name = "separator" version = "0.4.1" @@ -12075,6 +12428,15 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-big-array" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd31f59f6fe2b0c055371bb2f16d7f0aa7d8881676c04a55b1596d1a17cd10a4" +dependencies = [ + "serde", +] + [[package]] name = "serde_bytes" version = "0.11.14" @@ -12311,13 +12673,414 @@ dependencies = [ ] [[package]] -name = "socket2" -version = "0.4.10" +name = "snowbridge-amcl" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +checksum = "460a9ed63cdf03c1b9847e8a12a5f5ba19c4efd5869e4a737e05be25d7c427e5" dependencies = [ - "libc", - "winapi", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "snowbridge-beacon-primitives" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a73ef707257064bc4ecce8323cdb7c30e8ecd1ce74aa89a6e82e81fa8b9970" +dependencies = [ + "byte-slice-cast", + "frame-support", + "frame-system", + "hex", + "parity-scale-codec", + "rlp", + "scale-info", + "serde", + "snowbridge-ethereum", + "snowbridge-milagro-bls", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "ssz_rs", + "ssz_rs_derive", + "static_assertions", +] + +[[package]] +name = "snowbridge-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d3615664be8525d6f23e42dce1c314abc7f961a7f862b74012444e16d5dde5c" +dependencies = [ + "ethabi-decode", + "frame-support", + "frame-system", + "hex-literal", + "parity-scale-codec", + "polkadot-parachain-primitives", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-builder", +] + +[[package]] +name = "snowbridge-ethereum" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "315ad74f081734cb51f48bb10cd18a3f83cfec3c09a551bc936027708635e808" +dependencies = [ + "ethabi-decode", + "ethbloom", + "ethereum-types", + "hex-literal", + "parity-bytes", + "parity-scale-codec", + "rlp", + "rustc-hex", + "scale-info", + "serde", + "serde-big-array", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "snowbridge-milagro-bls" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "026aa8638f690a53e3f7676024b9e913b1cab0111d1b7b92669d40a188f9d7e6" +dependencies = [ + "hex", + "lazy_static", + "parity-scale-codec", + "rand", + "scale-info", + "snowbridge-amcl", + "zeroize", +] + +[[package]] +name = "snowbridge-outbound-queue-merkle-tree" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5382cf77aeb8a92a142751949cdea1f230b7864e1ea687352c28439faabcf69d" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "snowbridge-outbound-queue-runtime-api" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4933810488df1660cf60f53a7952ce1dff6aaef72d9fc740e1274e937136444e" +dependencies = [ + "frame-support", + "parity-scale-codec", + "snowbridge-core", + "snowbridge-outbound-queue-merkle-tree", + "sp-api", + "sp-core", + "sp-std", + "staging-xcm", +] + +[[package]] +name = "snowbridge-pallet-ethereum-client" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0fd437cd5db8b7d16cdd4da110d674d245532afa31df10108a11858a07844a6" +dependencies = [ + "bp-runtime", + "byte-slice-cast", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal", + "log", + "pallet-timestamp", + "parity-scale-codec", + "rlp", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-ethereum", + "snowbridge-pallet-ethereum-client-fixtures", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "ssz_rs", + "ssz_rs_derive", + "static_assertions", +] + +[[package]] +name = "snowbridge-pallet-ethereum-client-fixtures" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3d5b4b7e17eaadbc52ac3fc9fbcce63dfc60c05a1b19604cd009d6595c1175e" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal", + "snowbridge-beacon-primitives", + "snowbridge-core", + "sp-core", + "sp-std", +] + +[[package]] +name = "snowbridge-pallet-inbound-queue" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79c1fbfd32dbba082a9312c02c3ef35de929741f78f48e88b7668909350ef9e2" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal", + "log", + "num-traits", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-ethereum", + "snowbridge-pallet-inbound-queue-fixtures", + "snowbridge-router-primitives", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "snowbridge-pallet-inbound-queue-fixtures" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d8fff63b0a64d1dd06571ad074e664594bd9392481cd3489edde36e1d2dcc96" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal", + "snowbridge-beacon-primitives", + "snowbridge-core", + "sp-core", + "sp-std", +] + +[[package]] +name = "snowbridge-pallet-outbound-queue" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c7498ba5bc2b15e1d032b3e44659cd117cad24eab457a40dc5e17acfaac0aff" +dependencies = [ + "bridge-hub-common", + "ethabi-decode", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-core", + "snowbridge-outbound-queue-merkle-tree", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", +] + +[[package]] +name = "snowbridge-pallet-system" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6a410d9312bdcc3ba5944abb7d21f6b25065b32c7f8b39b9c7a4b0bd0dacfb4" +dependencies = [ + "ethabi-decode", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "snowbridge-core", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "snowbridge-router-primitives" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee5cc8e156f033971c5435676be92ab6f70a926b3497ca9c28c0dde9697b8da9" +dependencies = [ + "ethabi-decode", + "frame-support", + "frame-system", + "hex-literal", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-core", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "snowbridge-runtime-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d751007be1c9c68b075b0b1f9b02c25a02f458903a2c7893ba6e4231a00c24a" +dependencies = [ + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "snowbridge-core", + "sp-arithmetic", + "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "snowbridge-runtime-test-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bce50af98162e76b5ae50a2beb215bcde2a199eb5ea579ba4752b91278e655b1" +dependencies = [ + "assets-common", + "cumulus-pallet-aura-ext", + "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-message-queue", + "pallet-multisig", + "pallet-session", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parachains-common", + "parachains-runtimes-test-utils", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-common", + "scale-info", + "serde", + "smallvec", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-ethereum-client-fixtures", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-system-runtime-api", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "snowbridge-system-runtime-api" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5c3c4e6e87b76ae1f9639bbc1528e1ae4e5a8d6a16d02d8d48e56d4a89f4ca" +dependencies = [ + "parity-scale-codec", + "snowbridge-core", + "sp-api", + "sp-core", + "sp-std", + "staging-xcm", +] + +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", ] [[package]] @@ -13191,6 +13954,29 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "ssz_rs" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "057291e5631f280978fa9c8009390663ca4613359fc1318e36a8c24c392f6d1f" +dependencies = [ + "bitvec", + "num-bigint", + "sha2 0.9.9", + "ssz_rs_derive", +] + +[[package]] +name = "ssz_rs_derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f07d54c4d01a1713eb363b55ba51595da15f6f1211435b71466460da022aa140" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -13636,6 +14422,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn-solidity" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b837ef12ab88835251726eb12237655e61ec8dc8a280085d1961cdc3dfd047" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "synstructure" version = "0.12.6" @@ -13681,6 +14479,7 @@ dependencies = [ "polkadot-runtime-constants", "smallvec", "sp-runtime", + "staging-xcm", ] [[package]] @@ -14307,6 +15106,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + [[package]] name = "unicode-bidi" version = "0.3.14" @@ -14424,8 +15229,8 @@ dependencies = [ "ark-bls12-377", "ark-bls12-381", "ark-ec", - "ark-ff", - "ark-serialize", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", "ark-serialize-derive", "arrayref", "constcat", @@ -14439,6 +15244,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + [[package]] name = "walkdir" version = "2.4.0" diff --git a/docs/removing-migrations.md b/docs/removing-migrations.md index e3b0dc3a6f..43a3812c6a 100644 --- a/docs/removing-migrations.md +++ b/docs/removing-migrations.md @@ -22,4 +22,4 @@ For some chain runtime `spec_version: a_bcd_efg,` (e.g. `spec_version: 1_000_001 ## Automation -Currently, all of the above is done manually, but (at least parts of) it could be automated. Prerequisites can definitely be automated, so could the branches/patches dance. Code changes would easily be done manually and that's it. \ No newline at end of file +Currently, all of the above is done manually, but (at least parts of) it could be automated. Prerequisites can definitely be automated, so could the branches/patches dance. Code changes would easily be done manually and that's it. From b12ddb2ef3e6c5e56879cfbbe074d4ae56102181 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 29 Feb 2024 10:36:19 +0200 Subject: [PATCH 225/316] snowbridge.rs integration tests --- Cargo.lock | 4 +- .../bridges/bridge-hub-kusama/Cargo.toml | 2 +- .../bridges/bridge-hub-kusama/src/lib.rs | 2 +- .../bridges/bridge-hub-polkadot/Cargo.toml | 2 +- .../bridges/bridge-hub-polkadot/src/lib.rs | 2 +- .../bridge-hub-kusama/src/tests/mod.rs | 1 + .../bridge-hub-kusama/src/tests/snowbridge.rs | 537 ++++++++++++++++++ .../bridge-hub-polkadot/tests/snowbridge.rs | 2 +- 8 files changed, 545 insertions(+), 7 deletions(-) create mode 100644 integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs diff --git a/Cargo.lock b/Cargo.lock index 9edf3a2697..ef7ad7fe3a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1482,8 +1482,8 @@ dependencies = [ name = "bridge-hub-kusama-emulated-chain" version = "1.0.0" dependencies = [ + "bridge-hub-common", "bridge-hub-kusama-runtime", - "cumulus-primitives-core", "emulated-integration-tests-common", "frame-support", "parachains-common", @@ -1617,8 +1617,8 @@ dependencies = [ name = "bridge-hub-polkadot-emulated-chain" version = "1.0.0" dependencies = [ + "bridge-hub-common", "bridge-hub-polkadot-runtime", - "cumulus-primitives-core", "emulated-integration-tests-common", "frame-support", "parachains-common", diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml index 089dfe898c..83accaf328 100644 --- a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml @@ -15,7 +15,7 @@ frame-support = { version = "29.0.0" } # Cumulus parachains-common = { version = "8.0.0" } -cumulus-primitives-core = { version = "0.8.0" } +bridge-hub-common = { version = "0.1.0" } emulated-integration-tests-common = { version = "4.0.0" } # Runtimes diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/lib.rs b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/lib.rs index 1504f90852..808c2fb894 100644 --- a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/lib.rs +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/lib.rs @@ -36,7 +36,7 @@ decl_test_parachains! { XcmpMessageHandler: bridge_hub_kusama_runtime::XcmpQueue, LocationToAccountId: bridge_hub_kusama_runtime::xcm_config::LocationToAccountId, ParachainInfo: bridge_hub_kusama_runtime::ParachainInfo, - MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, + MessageOrigin: bridge_hub_common::AggregateMessageOrigin, }, pallets = { PolkadotXcm: bridge_hub_kusama_runtime::PolkadotXcm, diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/Cargo.toml b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/Cargo.toml index b9ff11a527..da7e86c7a3 100644 --- a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/Cargo.toml @@ -15,7 +15,7 @@ frame-support = { version = "29.0.0" } # Cumulus parachains-common = { version = "8.0.0" } -cumulus-primitives-core = { version = "0.8.0" } +bridge-hub-common = { version = "0.1.0" } emulated-integration-tests-common = { version = "4.0.0" } # Runtimes diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/lib.rs b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/lib.rs index c448eb7f98..b530b760ef 100644 --- a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/lib.rs +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/lib.rs @@ -36,7 +36,7 @@ decl_test_parachains! { XcmpMessageHandler: bridge_hub_polkadot_runtime::XcmpQueue, LocationToAccountId: bridge_hub_polkadot_runtime::xcm_config::LocationToAccountId, ParachainInfo: bridge_hub_polkadot_runtime::ParachainInfo, - MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, + MessageOrigin: bridge_hub_common::AggregateMessageOrigin, }, pallets = { PolkadotXcm: bridge_hub_polkadot_runtime::PolkadotXcm, diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/mod.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/mod.rs index 4bd2c77fc2..272fb1d8cf 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/mod.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/mod.rs @@ -17,6 +17,7 @@ use crate::*; mod asset_transfers; mod send_xcm; +mod snowbridge; mod teleport; pub(crate) fn asset_hub_polkadot_location() -> Location { diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs new file mode 100644 index 0000000000..73a050bc7a --- /dev/null +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -0,0 +1,537 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +use crate::*; +use bridge_hub_kusama_runtime::{EthereumBeaconClient, EthereumInboundQueue, RuntimeOrigin}; +use codec::{Decode, Encode}; +use emulated_integration_tests_common::xcm_emulator::ConvertLocation; +use frame_support::pallet_prelude::TypeInfo; +use hex_literal::hex; +use kusama_system_emulated_network::BridgeHubKusamaParaSender as BridgeHubKusamaSender; +use snowbridge_core::outbound::OperatingMode; +use snowbridge_pallet_inbound_queue_fixtures::{ + register_token::make_register_token_message, + register_token_with_insufficient_fee::make_register_token_with_infufficient_fee_message, + send_token::make_send_token_message, send_token_to_penpal::make_send_token_to_penpal_message, + InboundQueueFixture, +}; +use snowbridge_pallet_system; +use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; +use sp_core::H256; +use sp_runtime::{ArithmeticError::Underflow, DispatchError::Arithmetic}; +use system_parachains_constants::kusama::snowbridge::EthereumNetwork; + +const INITIAL_FUND: u128 = 5_000_000_000 * KUSAMA_ED; +const CHAIN_ID: u64 = 11155111; +const TREASURY_ACCOUNT: [u8; 32] = + hex!("6d6f646c70792f74727372790000000000000000000000000000000000000000"); +const WETH: [u8; 20] = hex!("87d1f7fdfEe7f651FaBc8bFCB6E086C278b77A7d"); +const ETHEREUM_DESTINATION_ADDRESS: [u8; 20] = hex!("44a57ee2f2FCcb85FDa2B0B18EBD0D8D2333700e"); + +#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] +pub enum ControlCall { + #[codec(index = 3)] + CreateAgent, + #[codec(index = 4)] + CreateChannel { mode: OperatingMode }, +} + +#[allow(clippy::large_enum_variant)] +#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] +pub enum SnowbridgeControl { + #[codec(index = 83)] + Control(ControlCall), +} + +pub fn send_inbound_message(fixture: InboundQueueFixture) -> DispatchResult { + EthereumBeaconClient::store_execution_header( + fixture.message.proof.block_hash, + fixture.execution_header, + 0, + H256::default(), + ); + + EthereumInboundQueue::submit( + RuntimeOrigin::signed(BridgeHubKusamaSender::get()), + fixture.message, + ) +} + +/// Create an agent on Ethereum. An agent is a representation of an entity in the Polkadot +/// ecosystem (like a parachain) on Ethereum. +#[test] +#[ignore] +fn create_agent() { + let origin_para: u32 = 1001; + // Fund the origin parachain sovereign account so that it can pay execution fees. + BridgeHubKusama::fund_para_sovereign(origin_para.into(), INITIAL_FUND); + + let sudo_origin = ::RuntimeOrigin::root(); + let destination = Kusama::child_location_of(BridgeHubKusama::para_id()).into(); + + let create_agent_call = SnowbridgeControl::Control(ControlCall::CreateAgent {}); + // Construct XCM to create an agent for para 1001 + let remote_xcm = VersionedXcm::from(Xcm(vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + DescendOrigin(Parachain(origin_para).into()), + Transact { + require_weight_at_most: 3000000000.into(), + origin_kind: OriginKind::Xcm, + call: create_agent_call.encode().into(), + }, + ])); + + // Kusama Global Consensus + // Send XCM message from Relay Chain to Bridge Hub source Parachain + Kusama::execute_with(|| { + assert_ok!(::XcmPallet::send( + sudo_origin, + bx!(destination), + bx!(remote_xcm), + )); + + type RuntimeEvent = ::RuntimeEvent; + // Check that the Transact message was sent + assert_expected_events!( + Kusama, + vec![ + RuntimeEvent::XcmPallet(pallet_xcm::Event::Sent { .. }) => {}, + ] + ); + }); + + BridgeHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + // Check that a message was sent to Ethereum to create the agent + assert_expected_events!( + BridgeHubKusama, + vec![ + RuntimeEvent::EthereumSystem(snowbridge_pallet_system::Event::CreateAgent { + .. + }) => {}, + ] + ); + }); +} + +/// Create a channel for a consensus system. A channel is a bidirectional messaging channel +/// between BridgeHub and Ethereum. +#[test] +#[ignore] +fn create_channel() { + let origin_para: u32 = 1001; + // Fund AssetHub sovereign account so that it can pay execution fees. + BridgeHubKusama::fund_para_sovereign(origin_para.into(), INITIAL_FUND); + + let sudo_origin = ::RuntimeOrigin::root(); + let destination: VersionedLocation = + Kusama::child_location_of(BridgeHubKusama::para_id()).into(); + + let create_agent_call = SnowbridgeControl::Control(ControlCall::CreateAgent {}); + // Construct XCM to create an agent for para 1001 + let create_agent_xcm = VersionedXcm::from(Xcm(vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + DescendOrigin(Parachain(origin_para).into()), + Transact { + require_weight_at_most: 3000000000.into(), + origin_kind: OriginKind::Xcm, + call: create_agent_call.encode().into(), + }, + ])); + + let create_channel_call = + SnowbridgeControl::Control(ControlCall::CreateChannel { mode: OperatingMode::Normal }); + // Construct XCM to create a channel for para 1001 + let create_channel_xcm = VersionedXcm::from(Xcm(vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + DescendOrigin(Parachain(origin_para).into()), + Transact { + require_weight_at_most: 3000000000.into(), + origin_kind: OriginKind::Xcm, + call: create_channel_call.encode().into(), + }, + ])); + + // Kusama Global Consensus + // Send XCM message from Relay Chain to Bridge Hub source Parachain + Kusama::execute_with(|| { + assert_ok!(::XcmPallet::send( + sudo_origin.clone(), + bx!(destination.clone()), + bx!(create_agent_xcm), + )); + + assert_ok!(::XcmPallet::send( + sudo_origin, + bx!(destination), + bx!(create_channel_xcm), + )); + + type RuntimeEvent = ::RuntimeEvent; + + assert_expected_events!( + Kusama, + vec![ + RuntimeEvent::XcmPallet(pallet_xcm::Event::Sent { .. }) => {}, + ] + ); + }); + + BridgeHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + // Check that the Channel was created + assert_expected_events!( + BridgeHubKusama, + vec![ + RuntimeEvent::EthereumSystem(snowbridge_pallet_system::Event::CreateChannel { + .. + }) => {}, + ] + ); + }); +} + +/// Tests the registering of a token as an asset on AssetHub. +#[test] +fn register_weth_token_from_ethereum_to_asset_hub() { + // Fund AssetHub sovereign account so that it can pay execution fees. + BridgeHubKusama::fund_para_sovereign(AssetHubKusama::para_id().into(), INITIAL_FUND); + + BridgeHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + // Construct RegisterToken message and sent to inbound queue + let register_token_message = make_register_token_message(); + send_inbound_message(register_token_message.clone()).unwrap(); + + assert_expected_events!( + BridgeHubKusama, + vec![ + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {}, + ] + ); + }); + + AssetHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + assert_expected_events!( + AssetHubKusama, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Created { .. }) => {}, + ] + ); + }); +} + +/// Tests sending a token to a 3rd party parachain, called PenPal. The token reserve is +/// still located on AssetHub. +#[test] +fn send_token_from_ethereum_to_penpal() { + let asset_hub_sovereign = BridgeHubKusama::sovereign_account_id_of(Location::new( + 1, + [Parachain(AssetHubKusama::para_id().into())], + )); + // Fund AssetHub sovereign account so it can pay execution fees for the asset transfer + BridgeHubKusama::fund_accounts(vec![(asset_hub_sovereign.clone(), INITIAL_FUND)]); + + // Fund PenPal sender and receiver + PenpalA::fund_accounts(vec![ + (PenpalAReceiver::get(), INITIAL_FUND), + (PenpalASender::get(), INITIAL_FUND), + ]); + + // The Weth asset location, identified by the contract address on Ethereum + let weth_asset_location: Location = + (Parent, Parent, EthereumNetwork::get(), AccountKey20 { network: None, key: WETH }).into(); + // Converts the Weth asset location into an asset ID + let weth_asset_id: v3::Location = weth_asset_location.try_into().unwrap(); + + let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); + + // Fund ethereum sovereign on AssetHub + let ethereum_sovereign: AccountId = + GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location) + .unwrap(); + AssetHubKusama::fund_accounts(vec![(ethereum_sovereign.clone(), INITIAL_FUND)]); + + // Create asset on the Penpal parachain. + PenpalA::execute_with(|| { + assert_ok!(::ForeignAssets::create( + ::RuntimeOrigin::signed(PenpalASender::get()), + weth_asset_id, + asset_hub_sovereign.into(), + 1000, + )); + + assert!(::ForeignAssets::asset_exists(weth_asset_id)); + }); + + BridgeHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + // Construct RegisterToken message and sent to inbound queue + send_inbound_message(make_register_token_message()).unwrap(); + + // Construct SendToken message and sent to inbound queue + send_inbound_message(make_send_token_to_penpal_message()).unwrap(); + + assert_expected_events!( + BridgeHubKusama, + vec![ + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {}, + ] + ); + }); + + AssetHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + // Check that the assets were issued on AssetHub + assert_expected_events!( + AssetHubKusama, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { .. }) => {}, + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {}, + ] + ); + }); + + PenpalA::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + // Check that the assets were issued on PenPal + assert_expected_events!( + PenpalA, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { .. }) => {}, + ] + ); + }); +} + +/// Tests the registering of a token as an asset on AssetHub, and then subsequently sending +/// a token from Ethereum to AssetHub. +#[test] +fn send_token_from_ethereum_to_asset_hub() { + BridgeHubKusama::fund_para_sovereign(AssetHubKusama::para_id().into(), INITIAL_FUND); + + // Fund ethereum sovereign on AssetHub + AssetHubKusama::fund_accounts(vec![(AssetHubKusamaReceiver::get(), INITIAL_FUND)]); + + BridgeHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + // Construct RegisterToken message and sent to inbound queue + send_inbound_message(make_register_token_message()).unwrap(); + + // Construct SendToken message and sent to inbound queue + send_inbound_message(make_send_token_message()).unwrap(); + + // Check that the message was sent + assert_expected_events!( + BridgeHubKusama, + vec![ + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {}, + ] + ); + }); + + AssetHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + // Check that the token was received and issued as a foreign asset on AssetHub + assert_expected_events!( + AssetHubKusama, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { .. }) => {}, + ] + ); + }); +} + +/// Tests the full cycle of token transfers: +/// - registering a token on AssetHub +/// - sending a token to AssetHub +/// - returning the token to Ethereum +#[test] +fn send_weth_asset_from_asset_hub_to_ethereum() { + use asset_hub_kusama_runtime::xcm_config::bridging::to_ethereum::DefaultBridgeHubEthereumBaseFee; + let assethub_sovereign = BridgeHubKusama::sovereign_account_id_of(Location::new( + 1, + [Parachain(AssetHubKusama::para_id().into())], + )); + + AssetHubKusama::force_default_xcm_version(Some(XCM_VERSION)); + BridgeHubKusama::force_default_xcm_version(Some(XCM_VERSION)); + AssetHubKusama::force_xcm_version( + Location::new(2, [GlobalConsensus(Ethereum { chain_id: CHAIN_ID })]), + XCM_VERSION, + ); + + BridgeHubKusama::fund_accounts(vec![(assethub_sovereign.clone(), INITIAL_FUND)]); + AssetHubKusama::fund_accounts(vec![(AssetHubKusamaReceiver::get(), INITIAL_FUND)]); + + const WETH_AMOUNT: u128 = 1_000_000_000; + + BridgeHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + // Construct RegisterToken message and sent to inbound queue + send_inbound_message(make_register_token_message()).unwrap(); + + // Check that the register token message was sent using xcm + assert_expected_events!( + BridgeHubKusama, + vec![ + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {}, + ] + ); + + // Construct SendToken message and sent to inbound queue + send_inbound_message(make_send_token_message()).unwrap(); + + // Check that the send token message was sent using xcm + assert_expected_events!( + BridgeHubKusama, + vec![ + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {}, + ] + ); + }); + + AssetHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + type RuntimeOrigin = ::RuntimeOrigin; + + // Check that AssetHub has issued the foreign asset + assert_expected_events!( + AssetHubKusama, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { .. }) => {}, + ] + ); + let assets = vec![Asset { + id: AssetId(Location::new( + 2, + [ + GlobalConsensus(Ethereum { chain_id: CHAIN_ID }), + AccountKey20 { network: None, key: WETH }, + ], + )), + fun: Fungible(WETH_AMOUNT), + }]; + let multi_assets = VersionedAssets::V4(Assets::from(assets)); + + let destination = VersionedLocation::V4(Location::new( + 2, + [GlobalConsensus(Ethereum { chain_id: CHAIN_ID })], + )); + + let beneficiary = VersionedLocation::V4(Location::new( + 0, + [AccountKey20 { network: None, key: ETHEREUM_DESTINATION_ADDRESS.into() }], + )); + + let free_balance_before = ::Balances::free_balance( + AssetHubKusamaReceiver::get(), + ); + // Send the Weth back to Ethereum + ::PolkadotXcm::reserve_transfer_assets( + RuntimeOrigin::signed(AssetHubKusamaReceiver::get()), + Box::new(destination), + Box::new(beneficiary), + Box::new(multi_assets), + 0, + ) + .unwrap(); + let free_balance_after = ::Balances::free_balance( + AssetHubKusamaReceiver::get(), + ); + // Assert at least DefaultBridgeHubEthereumBaseFee charged from the sender + let free_balance_diff = free_balance_before - free_balance_after; + assert!(free_balance_diff > DefaultBridgeHubEthereumBaseFee::get()); + }); + + BridgeHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + // Check that the transfer token back to Ethereum message was queue in the Ethereum + // Outbound Queue + assert_expected_events!( + BridgeHubKusama, + vec![ + RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageQueued {..}) => {}, + ] + ); + let events = BridgeHubKusama::events(); + // Check that the local fee was credited to the Snowbridge sovereign account + assert!( + events.iter().any(|event| matches!( + event, + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) + if *who == TREASURY_ACCOUNT.into() && *amount == 16903333 + )), + "Snowbridge sovereign takes local fee." + ); + // Check that the remote fee was credited to the AssetHub sovereign account + assert!( + events.iter().any(|event| matches!( + event, + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) + if *who == assethub_sovereign && *amount == 2680000000000, + )), + "AssetHub sovereign takes remote fee." + ); + }); +} + +#[test] +fn register_weth_token_in_asset_hub_fail_for_insufficient_fee() { + BridgeHubKusama::fund_para_sovereign(AssetHubKusama::para_id().into(), INITIAL_FUND); + + BridgeHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + // Construct RegisterToken message and sent to inbound queue + let message = make_register_token_with_infufficient_fee_message(); + send_inbound_message(message).unwrap(); + + assert_expected_events!( + BridgeHubKusama, + vec![ + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {}, + ] + ); + }); + + AssetHubKusama::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + assert_expected_events!( + AssetHubKusama, + vec![ + RuntimeEvent::MessageQueue(pallet_message_queue::Event::Processed { success:false, .. }) => {}, + ] + ); + }); +} + +#[test] +fn send_token_from_ethereum_to_asset_hub_fail_for_insufficient_fund() { + // Insufficient fund + BridgeHubKusama::fund_para_sovereign(AssetHubKusama::para_id().into(), 1_000); + + BridgeHubKusama::execute_with(|| { + assert_err!(send_inbound_message(make_register_token_message()), Arithmetic(Underflow)); + }); +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs index 4a01635081..56bbe27350 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs @@ -215,7 +215,7 @@ fn construct_extrinsic( ), frame_system::CheckWeight::::new(), pallet_transaction_payment::ChargeTransactionPayment::::from(0), - BridgeRejectObsoleteHeadersAndMessages::default(), + BridgeRejectObsoleteHeadersAndMessages, (RefundBridgeHubKusamaMessages::default()), ); let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); From 80dea433020ffdb550ebcd79e33f124ced83c87f Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 29 Feb 2024 09:52:42 +0100 Subject: [PATCH 226/316] Update system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- .../collectives/collectives-polkadot/src/fellowship/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs index 0100de040d..069f6a0e96 100644 --- a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs @@ -146,7 +146,7 @@ impl pallet_ranked_collective::Config for Runtime // - the Fellows origin type ExchangeOrigin = EitherOf< frame_system::EnsureRootWithSuccess>, - frame_system::EnsureRootWithSuccess>, + Fellows, >; type Polls = FellowshipReferenda; type MinRankOfClass = tracks::MinRankOfClass; From b22d8c71c63d9feba9289d3358a46826cfb764af Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 29 Feb 2024 09:56:30 +0100 Subject: [PATCH 227/316] Update system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index a52aebedbe..e3ac59404e 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -141,7 +141,7 @@ pub type ForeignFungiblesTransactor = FungiblesAdapter< ForeignAssets, // Use this currency when it is a fungible asset matching the given location or name: ForeignAssetsConvertedConcreteId, - // Convert an XCM Location 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, From 4c741800bd3bdb4b91ff16b87ff6cef807bc8022 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 29 Feb 2024 09:56:42 +0100 Subject: [PATCH 228/316] Update system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index e3ac59404e..e4dfcdcef4 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -109,7 +109,7 @@ pub type FungiblesTransactor = FungiblesAdapter< Assets, // Use this currency when it is a fungible asset matching the given location or name: TrustBackedAssetsConvertedConcreteId, - // Convert an XCM Location 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, From d77f4af1ba4d7647511ab0fe265c1bfd2548218f Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 29 Feb 2024 09:56:52 +0100 Subject: [PATCH 229/316] Update system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index e4dfcdcef4..a29a8b27b2 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -91,7 +91,7 @@ pub type FungibleTransactor = FungibleAdapter< Balances, // Use this currency when it is a fungible asset matching the given location or name: IsConcrete, - // Convert an XCM Location 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, From 1b87d8460650dafe907b0dd7ac7ca0bf6d85db85 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 29 Feb 2024 09:57:08 +0100 Subject: [PATCH 230/316] Update relay/polkadot/src/xcm_config.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- relay/polkadot/src/xcm_config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index a1f79da297..93fc46e84b 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -85,7 +85,7 @@ pub type LocalAssetTransactor = FungibleAdapter< Balances, // Use this currency when it is a fungible asset matching the given location or name: IsConcrete, - // We can convert the Locations with our converter above: + // We can convert the `Location`s with our converter above: SovereignAccountOf, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, From 72c2ba6c662900ed658fd85ea736a39ddc90a3db Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 29 Feb 2024 10:01:21 +0100 Subject: [PATCH 231/316] Apply Joe's suggestion to the others + fmt --- .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 8 ++++---- .../collectives-polkadot/src/fellowship/mod.rs | 6 ++---- .../collectives/collectives-polkadot/src/xcm_config.rs | 2 +- system-parachains/encointer/src/xcm_config.rs | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index dd0c2df0da..148dbb8338 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -100,7 +100,7 @@ pub type FungibleTransactor = FungibleAdapter< Balances, // Use this currency when it is a fungible asset matching the given location or name: IsConcrete, - // Convert an XCM Location 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, @@ -118,7 +118,7 @@ pub type FungiblesTransactor = FungiblesAdapter< Assets, // Use this currency when it is a fungible asset matching the given location or name: TrustBackedAssetsConvertedConcreteId, - // Convert an XCM Location 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, @@ -150,7 +150,7 @@ pub type ForeignFungiblesTransactor = FungiblesAdapter< ForeignAssets, // Use this currency when it is a fungible asset matching the given location or name: ForeignAssetsConvertedConcreteId, - // Convert an XCM Location 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, @@ -170,7 +170,7 @@ pub type PoolFungiblesTransactor = FungiblesAdapter< PoolAssets, // Use this currency when it is a fungible asset matching the given location or name: PoolAssetsConvertedConcreteId, - // Convert an XCM Location 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, diff --git a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs index 069f6a0e96..55c3257837 100644 --- a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs @@ -144,10 +144,8 @@ impl pallet_ranked_collective::Config for Runtime // Exchange is by any of: // - Root can exchange arbitrarily. // - the Fellows origin - type ExchangeOrigin = EitherOf< - frame_system::EnsureRootWithSuccess>, - Fellows, - >; + type ExchangeOrigin = + EitherOf>, Fellows>; type Polls = FellowshipReferenda; type MinRankOfClass = tracks::MinRankOfClass; type MemberSwappedHandler = (crate::FellowshipCore, crate::FellowshipSalary); diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index b07aaa6735..e6ebbd8687 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -85,7 +85,7 @@ pub type FungibleTransactor = FungibleAdapter< Balances, // Use this currency when it is a fungible asset matching the given location or name: IsConcrete, - // Convert an XCM Location 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, diff --git a/system-parachains/encointer/src/xcm_config.rs b/system-parachains/encointer/src/xcm_config.rs index cc828e7546..c50c5c6b69 100644 --- a/system-parachains/encointer/src/xcm_config.rs +++ b/system-parachains/encointer/src/xcm_config.rs @@ -73,7 +73,7 @@ pub type FungibleTransactor = FungibleAdapter< Balances, // Use this currency when it is a fungible asset matching the given location or name: IsConcrete, - // Convert an XCM Location 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, From e29df7978de0049931f694d3a2f48c490b39e1ff Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 29 Feb 2024 10:02:49 +0100 Subject: [PATCH 232/316] Removed: `// TODO:(PR#187)(PR#2587): check ExchangeOriginTODO` --- .../collectives/collectives-polkadot/src/fellowship/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs index 55c3257837..fc6ee446cd 100644 --- a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs @@ -140,7 +140,6 @@ impl pallet_ranked_collective::Config for Runtime Replace>, >, >; - // TODO:(PR#187)(PR#2587): check ExchangeOrigin // Exchange is by any of: // - Root can exchange arbitrarily. // - the Fellows origin From 395a7730f9bb7a5abbc4ebf32870164ebd3eb5bf Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 29 Feb 2024 10:57:37 +0100 Subject: [PATCH 233/316] Removed one more TODO for `ExchangeOrigin` --- relay/kusama/src/governance/fellowship.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/relay/kusama/src/governance/fellowship.rs b/relay/kusama/src/governance/fellowship.rs index 1e141df3db..2c0b0f70ac 100644 --- a/relay/kusama/src/governance/fellowship.rs +++ b/relay/kusama/src/governance/fellowship.rs @@ -352,7 +352,6 @@ impl pallet_ranked_collective::Config for Runtime TryMapSuccess>>, >, >; - // TODO:(PR#187)(PR#2587): check ExchangeOrigin // Exchange is by any of: // - Root can exchange arbitrarily. // - the Fellows origin From 515cdade805eb04ee5c403fd0b46a25843153ba4 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 29 Feb 2024 11:13:21 +0100 Subject: [PATCH 234/316] More tests for AH / BH --- .../asset-hub-kusama/tests/tests.rs | 36 ++++++++++++++--- .../asset-hub-polkadot/tests/tests.rs | 40 +++++++++++++++---- .../bridge-hub-kusama/tests/tests.rs | 27 +++++++++++++ .../bridge-hub-polkadot/tests/tests.rs | 27 +++++++++++++ 4 files changed, 117 insertions(+), 13 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index 0e6984a056..602b8e23be 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -67,11 +67,7 @@ fn collator_session_key(account: [u8; 32]) -> CollatorSessionKey { } fn collator_session_keys() -> CollatorSessionKeys { - CollatorSessionKeys::new( - AccountId::from(ALICE), - AccountId::from(ALICE), - SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, - ) + CollatorSessionKeys::default().add(collator_session_key(ALICE)) } fn slot_durations() -> SlotDurations { @@ -785,6 +781,36 @@ fn receive_reserve_asset_deposited_dot_from_asset_hub_polkadot_fees_paid_by_suff ) } +#[test] +fn reserve_transfer_native_asset_to_non_teleport_para_works() { + asset_test_utils::test_cases::reserve_transfer_native_asset_to_non_teleport_para_works::< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + ParachainSystem, + XcmpQueue, + LocationToAccountId, + >( + collator_session_keys(), + slot_durations(), + ExistentialDeposit::get(), + AccountId::from(ALICE), + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::PolkadotXcm(event)) => Some(event), + _ => None, + } + }), + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::XcmpQueue(event)) => Some(event), + _ => None, + } + }), + WeightLimit::Unlimited, + ); +} + #[test] fn report_bridge_status_from_xcm_bridge_router_for_polkadot_works() { asset_test_utils::test_cases_over_bridge::report_bridge_status_from_xcm_bridge_router_works::< diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index e7a7de6729..1355cb2370 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -60,9 +60,6 @@ type AssetIdForTrustBackedAssetsConvertLatest = type RuntimeHelper = asset_test_utils::RuntimeHelper; -// TODO:(PR#187) needs patched generic test not requiring pallet_asset_conversion (remove also -// #[allow(dead_code)] -#[allow(dead_code)] fn collator_session_key(account: [u8; 32]) -> CollatorSessionKey { CollatorSessionKey::new( AccountId::from(account), @@ -72,11 +69,7 @@ fn collator_session_key(account: [u8; 32]) -> CollatorSessionKey { } fn collator_session_keys() -> CollatorSessionKeys { - CollatorSessionKeys::new( - AccountId::from(ALICE), - AccountId::from(ALICE), - SessionKeys { aura: AuraId::from(sp_core::ed25519::Public::from_raw(ALICE)) }, - ) + CollatorSessionKeys::default().add(collator_session_key(ALICE)) } fn slot_durations() -> SlotDurations { @@ -799,6 +792,37 @@ fn receive_reserve_asset_deposited_ksm_from_asset_hub_kusama_fees_paid_by_suffic ) } + +#[test] +fn reserve_transfer_native_asset_to_non_teleport_para_works() { + asset_test_utils::test_cases::reserve_transfer_native_asset_to_non_teleport_para_works::< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + ParachainSystem, + XcmpQueue, + LocationToAccountId, + >( + collator_session_keys(), + slot_durations(), + ExistentialDeposit::get(), + AccountId::from(ALICE), + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::PolkadotXcm(event)) => Some(event), + _ => None, + } + }), + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::XcmpQueue(event)) => Some(event), + _ => None, + } + }), + WeightLimit::Unlimited, + ); +} + #[test] fn report_bridge_status_from_xcm_bridge_router_for_kusama_works() { asset_test_utils::test_cases_over_bridge::report_bridge_status_from_xcm_bridge_router_works::< diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index a51288756c..b0856de882 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -154,6 +154,33 @@ fn initialize_bridge_by_governance_works() { >(collator_session_keys(), bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID) } +#[test] +fn change_bridge_grandpa_pallet_mode_by_governance_works() { + // for Polkadot finality + bridge_hub_test_utils::test_cases::change_bridge_grandpa_pallet_mode_by_governance_works::< + Runtime, + BridgeGrandpaPolkadotInstance, + >(collator_session_keys(), bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID) +} + +#[test] +fn change_bridge_parachains_pallet_mode_by_governance_works() { + // for Polkadot parachains finality + bridge_hub_test_utils::test_cases::change_bridge_parachains_pallet_mode_by_governance_works::< + Runtime, + BridgeParachainPolkadotInstance, + >(collator_session_keys(), bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID) +} + +#[test] +fn change_bridge_messages_pallet_mode_by_governance_works() { + // for Polkadot messages + bridge_hub_test_utils::test_cases::change_bridge_messages_pallet_mode_by_governance_works::< + Runtime, + WithBridgeHubPolkadotMessagesInstance, + >(collator_session_keys(), bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID) +} + #[test] fn change_delivery_reward_by_governance_works() { bridge_hub_test_utils::test_cases::change_storage_constant_by_governance_works::< diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index 492ca96769..e1081d3eee 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -155,6 +155,33 @@ fn initialize_bridge_by_governance_works() { >(collator_session_keys(), bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID) } +#[test] +fn change_bridge_grandpa_pallet_mode_by_governance_works() { + // for Kusama finality + bridge_hub_test_utils::test_cases::change_bridge_grandpa_pallet_mode_by_governance_works::< + Runtime, + BridgeGrandpaKusamaInstance, + >(collator_session_keys(), bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID) +} + +#[test] +fn change_bridge_parachains_pallet_mode_by_governance_works() { + // for Kusama parachains finality + bridge_hub_test_utils::test_cases::change_bridge_parachains_pallet_mode_by_governance_works::< + Runtime, + BridgeParachainKusamaInstance, + >(collator_session_keys(), bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID) +} + +#[test] +fn change_bridge_messages_pallet_mode_by_governance_works() { + // for Kusama messages + bridge_hub_test_utils::test_cases::change_bridge_messages_pallet_mode_by_governance_works::< + Runtime, + WithBridgeHubKusamaMessagesInstance, + >(collator_session_keys(), bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID) +} + #[test] fn change_delivery_reward_by_governance_works() { bridge_hub_test_utils::test_cases::change_storage_constant_by_governance_works::< From ea3ebe4d0f98b25d67c49772a2a727e3f4f675e0 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 29 Feb 2024 13:36:36 +0100 Subject: [PATCH 235/316] Removed unnecessary `PoolAssetsPalletLocationV3` and `LocalTeleportableToAssetHubV3` --- .../parachains/testing/penpal/src/lib.rs | 2 +- .../assets/asset-hub-kusama/src/tests/swap.rs | 29 +++++++++++++------ .../asset-hub-kusama/src/tests/teleport.rs | 5 ++-- .../asset-hub-polkadot/src/tests/teleport.rs | 5 ++-- relay/kusama/src/xcm_config.rs | 4 +-- .../asset-hub-kusama/src/xcm_config.rs | 2 -- .../asset-hub-polkadot/tests/tests.rs | 1 - 7 files changed, 29 insertions(+), 19 deletions(-) diff --git a/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs b/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs index c73c13bb0e..30d6e7bfad 100644 --- a/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs +++ b/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs @@ -15,7 +15,7 @@ mod genesis; pub use genesis::{genesis, ED, PARA_ID_A, PARA_ID_B}; -pub use penpal_runtime::xcm_config::{LocalTeleportableToAssetHubV3, XcmConfig}; +pub use penpal_runtime::xcm_config::{LocalTeleportableToAssetHub, XcmConfig}; // Substrate use frame_support::traits::OnInitialize; diff --git a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/swap.rs b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/swap.rs index e277ecccde..16e7b0d2ae 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/swap.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/swap.rs @@ -14,13 +14,16 @@ // limitations under the License. use crate::*; -use kusama_system_emulated_network::penpal_emulated_chain::LocalTeleportableToAssetHubV3 as PenpalLocalTeleportableToAssetHubV3; +use kusama_system_emulated_network::penpal_emulated_chain::LocalTeleportableToAssetHub as PenpalLocalTeleportableToAssetHub; use sp_runtime::ModuleError; use system_parachains_constants::kusama::currency::SYSTEM_PARA_EXISTENTIAL_DEPOSIT; #[test] fn swap_locally_on_chain_using_local_assets() { - let asset_native = Box::new(asset_hub_kusama_runtime::xcm_config::KsmLocationV3::get()); + let asset_native = Box::new( + v3::Location::try_from(asset_hub_kusama_runtime::xcm_config::KsmLocation::get()) + .expect("conversion works"), + ); let asset_one = Box::new(v3::Location::new( 0, [ @@ -116,9 +119,14 @@ fn swap_locally_on_chain_using_local_assets() { #[test] fn swap_locally_on_chain_using_foreign_assets() { - let asset_native = Box::new(asset_hub_kusama_runtime::xcm_config::KsmLocationV3::get()); + let asset_native = Box::new( + v3::Location::try_from(asset_hub_kusama_runtime::xcm_config::KsmLocation::get()) + .expect("conversion works"), + ); + let ah_as_seen_by_penpal = PenpalA::sibling_location_of(AssetHubKusama::para_id()); - let asset_location_on_penpal = PenpalLocalTeleportableToAssetHubV3::get(); + let asset_location_on_penpal = + v3::Location::try_from(PenpalLocalTeleportableToAssetHub::get()).expect("conversion works"); let asset_id_on_penpal = match asset_location_on_penpal.last() { Some(v3::Junction::GeneralIndex(id)) => *id as u32, _ => unreachable!(), @@ -242,11 +250,14 @@ fn swap_locally_on_chain_using_foreign_assets() { #[test] fn cannot_create_pool_from_pool_assets() { - let asset_native = asset_hub_kusama_runtime::xcm_config::KsmLocationV3::get(); - let mut asset_one = asset_hub_kusama_runtime::xcm_config::PoolAssetsPalletLocationV3::get(); - asset_one - .append_with(v3::Junction::GeneralIndex(ASSET_ID.into())) - .expect("pool assets"); + let asset_native = asset_hub_kusama_runtime::xcm_config::KsmLocation::get() + .try_into() + .expect("conversion works"); + let asset_one = asset_hub_kusama_runtime::xcm_config::PoolAssetsPalletLocation::get() + .appended_with(GeneralIndex(ASSET_ID.into())) + .expect("valid location") + .try_into() + .expect("conversion works"); AssetHubKusama::execute_with(|| { let pool_owner_account_id = asset_hub_kusama_runtime::AssetConversionOrigin::get(); diff --git a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/teleport.rs b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/teleport.rs index 66dc57d4a1..5d9af97d50 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/teleport.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/teleport.rs @@ -17,7 +17,7 @@ use crate::*; use asset_hub_kusama_runtime::xcm_config::XcmConfig as AssetHubKusamaXcmConfig; use emulated_integration_tests_common::xcm_helpers::non_fee_asset; use kusama_runtime::xcm_config::XcmConfig as KusamaXcmConfig; -use kusama_system_emulated_network::penpal_emulated_chain::LocalTeleportableToAssetHubV3 as PenpalLocalTeleportableToAssetHubV3; +use kusama_system_emulated_network::penpal_emulated_chain::LocalTeleportableToAssetHub as PenpalLocalTeleportableToAssetHub; fn relay_origin_assertions(t: RelayToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; @@ -559,7 +559,8 @@ fn teleport_to_other_system_parachains_works() { #[test] fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { let ah_as_seen_by_penpal = PenpalA::sibling_location_of(AssetHubKusama::para_id()); - let asset_location_on_penpal = PenpalLocalTeleportableToAssetHubV3::get(); + let asset_location_on_penpal = + v3::Location::try_from(PenpalLocalTeleportableToAssetHub::get()).expect("conversion works"); let asset_id_on_penpal = match asset_location_on_penpal.last() { Some(v3::Junction::GeneralIndex(id)) => *id as u32, _ => unreachable!(), diff --git a/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/teleport.rs b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/teleport.rs index e8c350d50d..e5a6c3ea5a 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/teleport.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/teleport.rs @@ -17,7 +17,7 @@ use crate::*; use asset_hub_polkadot_runtime::xcm_config::XcmConfig as AssetHubPolkadotXcmConfig; use emulated_integration_tests_common::xcm_helpers::non_fee_asset; use polkadot_runtime::xcm_config::XcmConfig as PolkadotXcmConfig; -use polkadot_system_emulated_network::penpal_emulated_chain::LocalTeleportableToAssetHubV3 as PenpalLocalTeleportableToAssetHubV3; +use polkadot_system_emulated_network::penpal_emulated_chain::LocalTeleportableToAssetHub as PenpalLocalTeleportableToAssetHub; fn relay_origin_assertions(t: RelayToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; @@ -559,7 +559,8 @@ fn teleport_to_other_system_parachains_works() { #[test] fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { let ah_as_seen_by_penpal = PenpalB::sibling_location_of(AssetHubPolkadot::para_id()); - let asset_location_on_penpal = PenpalLocalTeleportableToAssetHubV3::get(); + let asset_location_on_penpal = + v3::Location::try_from(PenpalLocalTeleportableToAssetHub::get()).expect("conversion works"); let asset_id_on_penpal = match asset_location_on_penpal.last() { Some(v3::Junction::GeneralIndex(id)) => *id as u32, _ => unreachable!(), diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index f41454eddc..99c8b8364e 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -307,9 +307,9 @@ fn karura_liquid_staking_xcm_has_sane_weight_upper_limt() { panic!("can't decode XCM blob") }; let old_xcm_v3: xcm::v3::Xcm = - old_xcm_v2.try_into().expect("conversion from v2 to v3 failed"); + old_xcm_v2.try_into().expect("conversion from v2 to v3 works"); let mut xcm: Xcm = - old_xcm_v3.try_into().expect("conversion from v3 to latest failed"); + old_xcm_v3.try_into().expect("conversion from v3 to latest works"); let weight = ::Weigher::weight(&mut xcm) .expect("weighing XCM failed"); diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 148dbb8338..b742464e20 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -68,8 +68,6 @@ parameter_types! { PalletInstance(::index() as u8).into(); pub PoolAssetsPalletLocation: Location = PalletInstance(::index() as u8).into(); - pub PoolAssetsPalletLocationV3: xcm::v3::Location = - xcm::v3::Junction::PalletInstance(::index() as u8).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); pub const GovernanceLocation: Location = Location::parent(); pub const FellowshipLocation: Location = Location::parent(); diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index 1355cb2370..5ffc407a30 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -792,7 +792,6 @@ fn receive_reserve_asset_deposited_ksm_from_asset_hub_kusama_fees_paid_by_suffic ) } - #[test] fn reserve_transfer_native_asset_to_non_teleport_para_works() { asset_test_utils::test_cases::reserve_transfer_native_asset_to_non_teleport_para_works::< From 48331b9ea8dd7e522eb71455aee62b44e2ca066f Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 29 Feb 2024 13:38:36 +0100 Subject: [PATCH 236/316] Removed approved `// TODO:(PR#187)(PR#3156): check MemberSwappedHandler/BenchmarkSetup` --- relay/kusama/src/governance/fellowship.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/relay/kusama/src/governance/fellowship.rs b/relay/kusama/src/governance/fellowship.rs index 2c0b0f70ac..b353ff5e3d 100644 --- a/relay/kusama/src/governance/fellowship.rs +++ b/relay/kusama/src/governance/fellowship.rs @@ -359,7 +359,6 @@ impl pallet_ranked_collective::Config for Runtime EitherOf>, Fellows>; type Polls = FellowshipReferenda; type MinRankOfClass = sp_runtime::traits::Identity; - // TODO:(PR#187)(PR#3156): check MemberSwappedHandler/BenchmarkSetup type MemberSwappedHandler = (); type VoteWeight = pallet_ranked_collective::Geometric; #[cfg(feature = "runtime-benchmarks")] From 59114decaa21ec3df958b65abf0f1af068901366 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 29 Feb 2024 21:51:20 +0200 Subject: [PATCH 237/316] integration tests --- Cargo.lock | 147 +++-- .../bridges/bridge-hub-kusama/src/genesis.rs | 5 + .../bridges/bridge-hub-kusama/src/lib.rs | 3 + .../bridge-hub-polkadot/src/genesis.rs | 6 + .../bridges/bridge-hub-polkadot/src/lib.rs | 3 + .../bridges/bridge-hub-kusama/Cargo.toml | 15 + .../bridge-hub-kusama/src/tests/snowbridge.rs | 71 ++- .../bridges/bridge-hub-polkadot/Cargo.toml | 16 + .../bridges/bridge-hub-polkadot/src/lib.rs | 7 +- .../bridge-hub-polkadot/src/tests/mod.rs | 1 + .../src/tests/snowbridge.rs | 600 ++++++++++++++++++ .../asset-hub-kusama/src/xcm_config.rs | 5 +- .../asset-hub-polkadot/src/xcm_config.rs | 5 +- 13 files changed, 815 insertions(+), 69 deletions(-) create mode 100644 integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs diff --git a/Cargo.lock b/Cargo.lock index ef7ad7fe3a..b677f50f81 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -149,7 +149,7 @@ checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -164,7 +164,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", "syn-solidity", "tiny-keccak", ] @@ -285,7 +285,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -908,7 +908,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -932,7 +932,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -1032,7 +1032,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -1494,11 +1494,13 @@ dependencies = [ name = "bridge-hub-kusama-integration-tests" version = "1.0.0" dependencies = [ + "asset-hub-kusama-runtime", "bp-messages", "bridge-hub-kusama-runtime", "cumulus-pallet-xcmp-queue", "emulated-integration-tests-common", "frame-support", + "hex-literal", "integration-tests-helpers", "kusama-polkadot-system-emulated-network", "kusama-system-emulated-network", @@ -1508,9 +1510,20 @@ dependencies = [ "pallet-message-queue", "pallet-xcm", "parachains-common", + "parity-scale-codec", + "scale-info", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-inbound-queue-fixtures", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "sp-core", "sp-runtime", "staging-xcm", "staging-xcm-executor", + "system-parachains-constants", ] [[package]] @@ -1629,11 +1642,13 @@ dependencies = [ name = "bridge-hub-polkadot-integration-tests" version = "1.0.0" dependencies = [ + "asset-hub-polkadot-runtime", "bp-messages", "bridge-hub-polkadot-runtime", "cumulus-pallet-xcmp-queue", "emulated-integration-tests-common", "frame-support", + "hex-literal", "integration-tests-helpers", "kusama-polkadot-system-emulated-network", "pallet-assets", @@ -1642,9 +1657,21 @@ dependencies = [ "pallet-message-queue", "pallet-xcm", "parachains-common", + "parity-scale-codec", + "polkadot-system-emulated-network", + "scale-info", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-inbound-queue-fixtures", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "sp-core", "sp-runtime", "staging-xcm", "staging-xcm-executor", + "system-parachains-constants", ] [[package]] @@ -2144,7 +2171,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -2721,7 +2748,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -2914,7 +2941,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -2941,7 +2968,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -2958,7 +2985,7 @@ checksum = "587663dd5fb3d10932c8aecfe7c844db1bcf0aee93eeab08fac13dc1212c2e7f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -3141,7 +3168,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -3165,7 +3192,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.48", + "syn 2.0.52", "termcolor", "toml 0.8.10", "walkdir", @@ -3516,7 +3543,7 @@ checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -3527,7 +3554,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -3682,7 +3709,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -3955,7 +3982,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -4089,7 +4116,7 @@ dependencies = [ "proc-macro2", "quote", "sp-crypto-hashing", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -4102,7 +4129,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -4113,7 +4140,7 @@ checksum = "68672b9ec6fe72d259d3879dc212c5e42e977588cdac830c76f54d9f492aeb58" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -4268,7 +4295,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -5978,7 +6005,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -5992,7 +6019,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -6003,7 +6030,7 @@ checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -6014,7 +6041,7 @@ checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -8042,7 +8069,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -8704,7 +8731,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -8745,7 +8772,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -10117,7 +10144,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ "proc-macro2", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -10211,7 +10238,7 @@ checksum = "9b698b0b09d40e9b7c1a47b132d66a8b54bcd20583d9b6d06e4535e383b4405c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -10257,7 +10284,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -10345,7 +10372,7 @@ dependencies = [ "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -10611,7 +10638,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -11152,7 +11179,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -12122,7 +12149,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -12421,9 +12448,9 @@ checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -12448,20 +12475,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "itoa", "ryu", @@ -13144,7 +13171,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -13396,7 +13423,7 @@ checksum = "b85d0f1f1e44bd8617eb2a48203ee854981229e3e79e6f468c7175d5fd37489b" dependencies = [ "quote", "sp-crypto-hashing", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -13417,7 +13444,7 @@ checksum = "48d09fa0a5f7299fb81ee25ae3853d26200f7a348148aed6de76be905c007dbe" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -13666,7 +13693,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -13873,7 +13900,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -14255,7 +14282,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -14413,9 +14440,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" dependencies = [ "proc-macro2", "quote", @@ -14431,7 +14458,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -14564,7 +14591,7 @@ checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -14706,7 +14733,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -14898,7 +14925,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -14943,7 +14970,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -15314,7 +15341,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", "wasm-bindgen-shared", ] @@ -15348,7 +15375,7 @@ checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -16072,7 +16099,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -16115,7 +16142,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -16135,7 +16162,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/genesis.rs b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/genesis.rs index f2d00f7304..20d0805c11 100644 --- a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/genesis.rs +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/genesis.rs @@ -65,6 +65,11 @@ pub fn genesis() -> Storage { owner: Some(get_account_id_from_seed::(accounts::BOB)), ..Default::default() }, + ethereum_system: bridge_hub_kusama_runtime::EthereumSystemConfig { + para_id: PARA_ID.into(), + asset_hub_para_id: ASSETHUB_PARA_ID.into(), + ..Default::default() + }, ..Default::default() }; diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/lib.rs b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/lib.rs index 808c2fb894..038b6e7a44 100644 --- a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/lib.rs +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/lib.rs @@ -41,6 +41,9 @@ decl_test_parachains! { pallets = { PolkadotXcm: bridge_hub_kusama_runtime::PolkadotXcm, Balances: bridge_hub_kusama_runtime::Balances, + EthereumSystem: bridge_hub_kusama_runtime::EthereumSystem, + EthereumInboundQueue: bridge_hub_kusama_runtime::EthereumInboundQueue, + EthereumOutboundQueue: bridge_hub_kusama_runtime::EthereumOutboundQueue, } }, } diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/genesis.rs b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/genesis.rs index c5d4ec1929..229ddaee17 100644 --- a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/genesis.rs +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/genesis.rs @@ -22,6 +22,7 @@ use emulated_integration_tests_common::{ }; use parachains_common::Balance; +pub const ASSETHUB_PARA_ID: u32 = 1000; pub const PARA_ID: u32 = 1002; pub const ED: Balance = bridge_hub_polkadot_runtime::ExistentialDeposit::get(); @@ -64,6 +65,11 @@ pub fn genesis() -> Storage { owner: Some(get_account_id_from_seed::(accounts::BOB)), ..Default::default() }, + ethereum_system: bridge_hub_polkadot_runtime::EthereumSystemConfig { + para_id: PARA_ID.into(), + asset_hub_para_id: ASSETHUB_PARA_ID.into(), + ..Default::default() + }, ..Default::default() }; diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/lib.rs b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/lib.rs index b530b760ef..cf50845853 100644 --- a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/lib.rs +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/lib.rs @@ -41,6 +41,9 @@ decl_test_parachains! { pallets = { PolkadotXcm: bridge_hub_polkadot_runtime::PolkadotXcm, Balances: bridge_hub_polkadot_runtime::Balances, + EthereumSystem: bridge_hub_polkadot_runtime::EthereumSystem, + EthereumInboundQueue: bridge_hub_polkadot_runtime::EthereumInboundQueue, + EthereumOutboundQueue: bridge_hub_polkadot_runtime::EthereumOutboundQueue, } }, } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml index bf134f8400..34586bb153 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml @@ -8,8 +8,12 @@ description = "Bridge Hub Kusama runtime integration tests with xcm-emulator" publish = false [dependencies] +codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +hex-literal = "0.4.1" # Substrate +sp-core = { version = "29.0.0" } sp-runtime = { version = "32.0.0" } frame-support = { version = "29.0.0" } pallet-balances = { version = "29.0.0" } @@ -32,6 +36,17 @@ pallet-bridge-messages = { version = "0.8.0" } # Local bridge-hub-kusama-runtime = { path = "../../../../../system-parachains/bridge-hubs/bridge-hub-kusama" } +asset-hub-kusama-runtime = { path = "../../../../../system-parachains/asset-hubs/asset-hub-kusama" } integration-tests-helpers = { path = "../../../helpers" } kusama-polkadot-system-emulated-network = { path = "../../../networks/kusama-polkadot-system" } kusama-system-emulated-network = { path = "../../../networks/kusama-system" } +system-parachains-constants = { path = "../../../../../system-parachains/constants" } + +# Snowbridge +snowbridge-beacon-primitives = { default-features = false , version = "0.1.0" } +snowbridge-core = { version = "0.1.0" } +snowbridge-router-primitives = { version = "0.1.0" } +snowbridge-pallet-system = { version = "0.1.0" } +snowbridge-pallet-outbound-queue = { version = "0.1.0" } +snowbridge-pallet-inbound-queue = { version = "0.1.0" } +snowbridge-pallet-inbound-queue-fixtures = { version = "0.9.0" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index 73a050bc7a..4dec57fb2b 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -14,6 +14,7 @@ // limitations under the License. use crate::*; use bridge_hub_kusama_runtime::{EthereumBeaconClient, EthereumInboundQueue, RuntimeOrigin}; +use snowbridge_beacon_primitives::CompactExecutionHeader; use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; use frame_support::pallet_prelude::TypeInfo; @@ -21,9 +22,8 @@ use hex_literal::hex; use kusama_system_emulated_network::BridgeHubKusamaParaSender as BridgeHubKusamaSender; use snowbridge_core::outbound::OperatingMode; use snowbridge_pallet_inbound_queue_fixtures::{ - register_token::make_register_token_message, register_token_with_insufficient_fee::make_register_token_with_infufficient_fee_message, - send_token::make_send_token_message, send_token_to_penpal::make_send_token_to_penpal_message, + send_token_to_penpal::make_send_token_to_penpal_message, InboundQueueFixture, }; use snowbridge_pallet_system; @@ -31,9 +31,10 @@ use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; use sp_core::H256; use sp_runtime::{ArithmeticError::Underflow, DispatchError::Arithmetic}; use system_parachains_constants::kusama::snowbridge::EthereumNetwork; +use snowbridge_core::inbound::{Log, Message, Proof}; const INITIAL_FUND: u128 = 5_000_000_000 * KUSAMA_ED; -const CHAIN_ID: u64 = 11155111; +const CHAIN_ID: u64 = 1; const TREASURY_ACCOUNT: [u8; 32] = hex!("6d6f646c70792f74727372790000000000000000000000000000000000000000"); const WETH: [u8; 20] = hex!("87d1f7fdfEe7f651FaBc8bFCB6E086C278b77A7d"); @@ -479,7 +480,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { events.iter().any(|event| matches!( event, RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) - if *who == TREASURY_ACCOUNT.into() && *amount == 16903333 + if *who == TREASURY_ACCOUNT.into() && *amount == 169033333 )), "Snowbridge sovereign takes local fee." ); @@ -535,3 +536,65 @@ fn send_token_from_ethereum_to_asset_hub_fail_for_insufficient_fund() { assert_err!(send_inbound_message(make_register_token_message()), Arithmetic(Underflow)); }); } + +pub fn make_register_token_message() -> InboundQueueFixture { + InboundQueueFixture { + execution_header: CompactExecutionHeader{ + parent_hash: hex!("d5de3dd02c96dbdc8aaa4db70a1e9fdab5ded5f4d52f18798acd56a3d37d1ad6").into(), + block_number: 772, + state_root: hex!("49cba2a79b23ad74cefe80c3a96699825d1cda0f75bfceb587c5549211c86245").into(), + receipts_root: hex!("ac9cf067acc72a958a0d7c572c7b66ba6e232f65bbbd09078d7c7123f87ede64").into(), + }, + message: Message { + event_log: Log { + address: hex!("eda338e4dc46038493b885327842fd3e301cab39").into(), + topics: vec![ + hex!("7153f9357c8ea496bba60bf82e67143e27b64462b49041f8e689e1b05728f84f").into(), + hex!("c173fac324158e77fb5840738a1a541f633cbec8884c6a601c567d2b376a0539").into(), + hex!("5f7060e971b0dc81e63f0aa41831091847d97c1a4693ac450cc128c7214e65e0").into(), + ], + data: hex!("00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002e0001000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7d00e40b54020000000000000000000000000000000000000000000000000000000000").into(), + }, + proof: Proof { + block_hash: hex!("392182a385b3a417e8ddea8b252953ee81e6ec0fb09d9056c96c89fbeb703a3f").into(), + tx_index: 0, + data: (vec![ + hex!("7b1f61b9714c080ef0be014e01657a15f45f0304b477beebc7ca5596c8033095").to_vec(), + ], vec![ + hex!("f9028e822080b9028802f90284018301d205b9010000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000080000000000000000000000000000004000000000080000000000000000000000000000000000010100000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000040004000000000000002000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000200000000000010f90179f85894eda338e4dc46038493b885327842fd3e301cab39e1a0f78bb28d4b1d7da699e5c0bc2be29c2b04b5aab6aacf6298fe5304f9db9c6d7ea000000000000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7df9011c94eda338e4dc46038493b885327842fd3e301cab39f863a07153f9357c8ea496bba60bf82e67143e27b64462b49041f8e689e1b05728f84fa0c173fac324158e77fb5840738a1a541f633cbec8884c6a601c567d2b376a0539a05f7060e971b0dc81e63f0aa41831091847d97c1a4693ac450cc128c7214e65e0b8a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002e0001000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7d00e40b54020000000000000000000000000000000000000000000000000000000000").to_vec(), + ]), + }, + }, + } +} + +pub fn make_send_token_message() -> InboundQueueFixture { + InboundQueueFixture { + execution_header: CompactExecutionHeader{ + parent_hash: hex!("920cecde45d428e3a77590b70f8533cf4c2c36917b8a7b74c915e7fa3dae7075").into(), + block_number: 1148, + state_root: hex!("bbc6ba0e9940d641afecbbaf3f97abd2b9ffaf2f6bd4879c4a71e659eca89978").into(), + receipts_root: hex!("717d6f476c17511fe96543b914cf08f19352567e10188f7f6c6c2f4528806c9c").into(), + }, + message: Message { + event_log: Log { + address: hex!("eda338e4dc46038493b885327842fd3e301cab39").into(), + topics: vec![ + hex!("7153f9357c8ea496bba60bf82e67143e27b64462b49041f8e689e1b05728f84f").into(), + hex!("c173fac324158e77fb5840738a1a541f633cbec8884c6a601c567d2b376a0539").into(), + hex!("c8eaf22f2cb07bac4679df0a660e7115ed87fcfd4e32ac269f6540265bbbd26f").into(), + ], + data: hex!("00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005f0001000000000000000187d1f7fdfee7f651fabc8bfcb6e086c278b77a7d008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48000064a7b3b6e00d000000000000000000e40b5402000000000000000000000000").into(), + }, + proof: Proof { + block_hash: hex!("d3c155f123c3cbff22f3d7869283e02179edea9ffa7a5e9a4d8414c2a6b8991f").into(), + tx_index: 0, + data: (vec![ + hex!("9f3340b57eddc1f86de30776db57faeca80269a3dd459031741988dec240ce34").to_vec(), + ], vec![ + hex!("f90451822080b9044b02f90447018301bcb9b9010000800000000000000000000020000000000000000000004000000000000000000400000000000000000000001000000010000000000000000000000008000000200000000000000001000008000000000000000000000000000000008000080000000000200000000000000000000000000100000000000000000011000000000000020200000000000000000000000000003000000040080008000000000000000000040044000021000000002000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000200800000000000f9033cf89b9487d1f7fdfee7f651fabc8bfcb6e086c278b77a7df863a0ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa000000000000000000000000090a987b944cb1dcce5564e5fdecd7a54d3de27fea000000000000000000000000057a2d4ff0c3866d96556884bf09fecdd7ccd530ca00000000000000000000000000000000000000000000000000de0b6b3a7640000f9015d94eda338e4dc46038493b885327842fd3e301cab39f884a024c5d2de620c6e25186ae16f6919eba93b6e2c1a33857cc419d9f3a00d6967e9a000000000000000000000000090a987b944cb1dcce5564e5fdecd7a54d3de27fea000000000000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7da000000000000000000000000000000000000000000000000000000000000003e8b8c000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000208eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48f9013c94eda338e4dc46038493b885327842fd3e301cab39f863a07153f9357c8ea496bba60bf82e67143e27b64462b49041f8e689e1b05728f84fa0c173fac324158e77fb5840738a1a541f633cbec8884c6a601c567d2b376a0539a0c8eaf22f2cb07bac4679df0a660e7115ed87fcfd4e32ac269f6540265bbbd26fb8c000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005f0001000000000000000187d1f7fdfee7f651fabc8bfcb6e086c278b77a7d008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48000064a7b3b6e00d000000000000000000e40b5402000000000000000000000000").to_vec(), + ]), + }, + }, + } +} diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml index 18026e77e3..29749645ab 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml @@ -8,8 +8,12 @@ description = "Bridge Hub Polkadot runtime integration tests with xcm-emulator" publish = false [dependencies] +codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +hex-literal = "0.4.1" # Substrate +sp-core = { version = "29.0.0" } sp-runtime = { version = "32.0.0" } frame-support = { version = "29.0.0" } pallet-balances = { version = "29.0.0" } @@ -32,5 +36,17 @@ pallet-bridge-messages = { version = "0.8.0" } # Runtimes bridge-hub-polkadot-runtime = { path = "../../../../../system-parachains/bridge-hubs/bridge-hub-polkadot" } +asset-hub-polkadot-runtime = { path = "../../../../../system-parachains/asset-hubs/asset-hub-polkadot" } integration-tests-helpers = { path = "../../../helpers" } kusama-polkadot-system-emulated-network = { path = "../../../networks/kusama-polkadot-system" } +polkadot-system-emulated-network = { path = "../../../networks/polkadot-system" } +system-parachains-constants = { path = "../../../../../system-parachains/constants" } + +# Snowbridge +snowbridge-beacon-primitives = { default-features = false , version = "0.1.0" } +snowbridge-core = { version = "0.1.0" } +snowbridge-router-primitives = { version = "0.1.0" } +snowbridge-pallet-system = { version = "0.1.0" } +snowbridge-pallet-outbound-queue = { version = "0.1.0" } +snowbridge-pallet-inbound-queue = { version = "0.1.0" } +snowbridge-pallet-inbound-queue-fixtures = { version = "0.9.0" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs index 31eac92781..86c6757bfb 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs @@ -53,7 +53,7 @@ pub use kusama_polkadot_system_emulated_network::{ genesis::ED as BRIDGE_HUB_POLKADOT_ED, BridgeHubPolkadotParaPallet as BridgeHubPolkadotPallet, }, - polkadot_emulated_chain::PolkadotRelayPallet as PolkadotPallet, + polkadot_emulated_chain::{genesis::ED as POLKADOT_ED, PolkadotRelayPallet as PolkadotPallet}, AssetHubKusamaPara as AssetHubKusama, AssetHubKusamaParaReceiver as AssetHubKusamaReceiver, AssetHubPolkadotPara as AssetHubPolkadot, AssetHubPolkadotParaReceiver as AssetHubPolkadotReceiver, @@ -61,6 +61,11 @@ pub use kusama_polkadot_system_emulated_network::{ BridgeHubPolkadotPara as BridgeHubPolkadot, BridgeHubPolkadotParaSender as BridgeHubPolkadotSender, PolkadotRelay as Polkadot, }; +pub use polkadot_system_emulated_network::{ + penpal_emulated_chain::PenpalAParaPallet as PenpalAPallet, + BridgeHubPolkadotParaReceiver as BridgeHubPolkadotReceiver, PenpalAPara as PenpalA, + PenpalAParaReceiver as PenpalAReceiver, PenpalAParaSender as PenpalASender, +}; pub use parachains_common::{AccountId, Balance}; pub const ASSET_ID: u32 = 1; diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/mod.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/mod.rs index 1884e8cc2d..da1998bccf 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/mod.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/mod.rs @@ -17,6 +17,7 @@ use crate::*; mod asset_transfers; mod send_xcm; +mod snowbridge; mod teleport; pub(crate) fn asset_hub_kusama_location() -> Location { diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs new file mode 100644 index 0000000000..a635436d89 --- /dev/null +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -0,0 +1,600 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +use crate::*; +use bridge_hub_polkadot_runtime::{EthereumBeaconClient, EthereumInboundQueue, RuntimeOrigin}; +use snowbridge_beacon_primitives::CompactExecutionHeader; +use codec::{Decode, Encode}; +use emulated_integration_tests_common::xcm_emulator::ConvertLocation; +use frame_support::pallet_prelude::TypeInfo; +use hex_literal::hex; +use polkadot_system_emulated_network::BridgeHubPolkadotParaSender as BridgeHubPolkadotSender; +use snowbridge_core::outbound::OperatingMode; +use snowbridge_pallet_inbound_queue_fixtures::{ + register_token_with_insufficient_fee::make_register_token_with_infufficient_fee_message, + send_token_to_penpal::make_send_token_to_penpal_message, + InboundQueueFixture, +}; +use snowbridge_pallet_system; +use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; +use sp_core::H256; +use sp_runtime::{ArithmeticError::Underflow, DispatchError::Arithmetic}; +use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; +use snowbridge_core::inbound::{Log, Message, Proof}; + +const INITIAL_FUND: u128 = 5_000_000_000 * POLKADOT_ED; +const CHAIN_ID: u64 = 1; +const TREASURY_ACCOUNT: [u8; 32] = + hex!("6d6f646c70792f74727372790000000000000000000000000000000000000000"); +const WETH: [u8; 20] = hex!("87d1f7fdfEe7f651FaBc8bFCB6E086C278b77A7d"); +const ETHEREUM_DESTINATION_ADDRESS: [u8; 20] = hex!("44a57ee2f2FCcb85FDa2B0B18EBD0D8D2333700e"); + +#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] +pub enum ControlCall { + #[codec(index = 3)] + CreateAgent, + #[codec(index = 4)] + CreateChannel { mode: OperatingMode }, +} + +#[allow(clippy::large_enum_variant)] +#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] +pub enum SnowbridgeControl { + #[codec(index = 83)] + Control(ControlCall), +} + +pub fn send_inbound_message(fixture: InboundQueueFixture) -> DispatchResult { + EthereumBeaconClient::store_execution_header( + fixture.message.proof.block_hash, + fixture.execution_header, + 0, + H256::default(), + ); + + EthereumInboundQueue::submit( + RuntimeOrigin::signed(BridgeHubPolkadotSender::get()), + fixture.message, + ) +} + +/// Create an agent on Ethereum. An agent is a representation of an entity in the Polkadot +/// ecosystem (like a parachain) on Ethereum. +#[test] +#[ignore] +fn create_agent() { + let origin_para: u32 = 1001; + // Fund the origin parachain sovereign account so that it can pay execution fees. + BridgeHubPolkadot::fund_para_sovereign(origin_para.into(), INITIAL_FUND); + + let sudo_origin = ::RuntimeOrigin::root(); + let destination = Polkadot::child_location_of(BridgeHubPolkadot::para_id()).into(); + + let create_agent_call = SnowbridgeControl::Control(ControlCall::CreateAgent {}); + // Construct XCM to create an agent for para 1001 + let remote_xcm = VersionedXcm::from(Xcm(vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + DescendOrigin(Parachain(origin_para).into()), + Transact { + require_weight_at_most: 3000000000.into(), + origin_kind: OriginKind::Xcm, + call: create_agent_call.encode().into(), + }, + ])); + + // Polkadot Global Consensus + // Send XCM message from Relay Chain to Bridge Hub source Parachain + Polkadot::execute_with(|| { + assert_ok!(::XcmPallet::send( + sudo_origin, + bx!(destination), + bx!(remote_xcm), + )); + + type RuntimeEvent = ::RuntimeEvent; + // Check that the Transact message was sent + assert_expected_events!( + Polkadot, + vec![ + RuntimeEvent::XcmPallet(pallet_xcm::Event::Sent { .. }) => {}, + ] + ); + }); + + BridgeHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + // Check that a message was sent to Ethereum to create the agent + assert_expected_events!( + BridgeHubPolkadot, + vec![ + RuntimeEvent::EthereumSystem(snowbridge_pallet_system::Event::CreateAgent { + .. + }) => {}, + ] + ); + }); +} + +/// Create a channel for a consensus system. A channel is a bidirectional messaging channel +/// between BridgeHub and Ethereum. +#[test] +#[ignore] +fn create_channel() { + let origin_para: u32 = 1001; + // Fund AssetHub sovereign account so that it can pay execution fees. + BridgeHubPolkadot::fund_para_sovereign(origin_para.into(), INITIAL_FUND); + + let sudo_origin = ::RuntimeOrigin::root(); + let destination: VersionedLocation = + Polkadot::child_location_of(BridgeHubPolkadot::para_id()).into(); + + let create_agent_call = SnowbridgeControl::Control(ControlCall::CreateAgent {}); + // Construct XCM to create an agent for para 1001 + let create_agent_xcm = VersionedXcm::from(Xcm(vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + DescendOrigin(Parachain(origin_para).into()), + Transact { + require_weight_at_most: 3000000000.into(), + origin_kind: OriginKind::Xcm, + call: create_agent_call.encode().into(), + }, + ])); + + let create_channel_call = + SnowbridgeControl::Control(ControlCall::CreateChannel { mode: OperatingMode::Normal }); + // Construct XCM to create a channel for para 1001 + let create_channel_xcm = VersionedXcm::from(Xcm(vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + DescendOrigin(Parachain(origin_para).into()), + Transact { + require_weight_at_most: 3000000000.into(), + origin_kind: OriginKind::Xcm, + call: create_channel_call.encode().into(), + }, + ])); + + // Polkadot Global Consensus + // Send XCM message from Relay Chain to Bridge Hub source Parachain + Polkadot::execute_with(|| { + assert_ok!(::XcmPallet::send( + sudo_origin.clone(), + bx!(destination.clone()), + bx!(create_agent_xcm), + )); + + assert_ok!(::XcmPallet::send( + sudo_origin, + bx!(destination), + bx!(create_channel_xcm), + )); + + type RuntimeEvent = ::RuntimeEvent; + + assert_expected_events!( + Polkadot, + vec![ + RuntimeEvent::XcmPallet(pallet_xcm::Event::Sent { .. }) => {}, + ] + ); + }); + + BridgeHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + // Check that the Channel was created + assert_expected_events!( + BridgeHubPolkadot, + vec![ + RuntimeEvent::EthereumSystem(snowbridge_pallet_system::Event::CreateChannel { + .. + }) => {}, + ] + ); + }); +} + +/// Tests the registering of a token as an asset on AssetHub. +#[test] +fn register_weth_token_from_ethereum_to_asset_hub() { + // Fund AssetHub sovereign account so that it can pay execution fees. + BridgeHubPolkadot::fund_para_sovereign(AssetHubPolkadot::para_id().into(), INITIAL_FUND); + + BridgeHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + // Construct RegisterToken message and sent to inbound queue + let register_token_message = make_register_token_message(); + send_inbound_message(register_token_message.clone()).unwrap(); + + assert_expected_events!( + BridgeHubPolkadot, + vec![ + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {}, + ] + ); + }); + + AssetHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + assert_expected_events!( + AssetHubPolkadot, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Created { .. }) => {}, + ] + ); + }); +} + +/// Tests sending a token to a 3rd party parachain, called PenPal. The token reserve is +/// still located on AssetHub. +#[test] +fn send_token_from_ethereum_to_penpal() { + let asset_hub_sovereign = BridgeHubPolkadot::sovereign_account_id_of(Location::new( + 1, + [Parachain(AssetHubPolkadot::para_id().into())], + )); + // Fund AssetHub sovereign account so it can pay execution fees for the asset transfer + BridgeHubPolkadot::fund_accounts(vec![(asset_hub_sovereign.clone(), INITIAL_FUND)]); + + // Fund PenPal sender and receiver + PenpalA::fund_accounts(vec![ + (PenpalAReceiver::get(), INITIAL_FUND), + (PenpalASender::get(), INITIAL_FUND), + ]); + + // The Weth asset location, identified by the contract address on Ethereum + let weth_asset_location: Location = + (Parent, Parent, EthereumNetwork::get(), AccountKey20 { network: None, key: WETH }).into(); + // Converts the Weth asset location into an asset ID + let weth_asset_id: v3::Location = weth_asset_location.try_into().unwrap(); + + let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); + + // Fund ethereum sovereign on AssetHub + let ethereum_sovereign: AccountId = + GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location) + .unwrap(); + AssetHubPolkadot::fund_accounts(vec![(ethereum_sovereign.clone(), INITIAL_FUND)]); + + // Create asset on the Penpal parachain. + PenpalA::execute_with(|| { + assert_ok!(::ForeignAssets::create( + ::RuntimeOrigin::signed(PenpalASender::get()), + weth_asset_id, + asset_hub_sovereign.into(), + 1000, + )); + + assert!(::ForeignAssets::asset_exists(weth_asset_id)); + }); + + BridgeHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + // Construct RegisterToken message and sent to inbound queue + send_inbound_message(make_register_token_message()).unwrap(); + + // Construct SendToken message and sent to inbound queue + send_inbound_message(make_send_token_to_penpal_message()).unwrap(); + + assert_expected_events!( + BridgeHubPolkadot, + vec![ + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {}, + ] + ); + }); + + AssetHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + // Check that the assets were issued on AssetHub + assert_expected_events!( + AssetHubPolkadot, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { .. }) => {}, + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {}, + ] + ); + }); + + PenpalA::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + // Check that the assets were issued on PenPal + assert_expected_events!( + PenpalA, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { .. }) => {}, + ] + ); + }); +} + +/// Tests the registering of a token as an asset on AssetHub, and then subsequently sending +/// a token from Ethereum to AssetHub. +#[test] +fn send_token_from_ethereum_to_asset_hub() { + BridgeHubPolkadot::fund_para_sovereign(AssetHubPolkadot::para_id().into(), INITIAL_FUND); + + // Fund ethereum sovereign on AssetHub + AssetHubPolkadot::fund_accounts(vec![(AssetHubPolkadotReceiver::get(), INITIAL_FUND)]); + + BridgeHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + // Construct RegisterToken message and sent to inbound queue + send_inbound_message(make_register_token_message()).unwrap(); + + // Construct SendToken message and sent to inbound queue + send_inbound_message(make_send_token_message()).unwrap(); + + // Check that the message was sent + assert_expected_events!( + BridgeHubPolkadot, + vec![ + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {}, + ] + ); + }); + + AssetHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + // Check that the token was received and issued as a foreign asset on AssetHub + assert_expected_events!( + AssetHubPolkadot, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { .. }) => {}, + ] + ); + }); +} + +/// Tests the full cycle of token transfers: +/// - registering a token on AssetHub +/// - sending a token to AssetHub +/// - returning the token to Ethereum +#[test] +fn send_weth_asset_from_asset_hub_to_ethereum() { + use asset_hub_polkadot_runtime::xcm_config::bridging::to_ethereum::DefaultBridgeHubEthereumBaseFee; + let assethub_sovereign = BridgeHubPolkadot::sovereign_account_id_of(Location::new( + 1, + [Parachain(AssetHubPolkadot::para_id().into())], + )); + + AssetHubPolkadot::force_default_xcm_version(Some(XCM_VERSION)); + BridgeHubPolkadot::force_default_xcm_version(Some(XCM_VERSION)); + AssetHubPolkadot::force_xcm_version( + Location::new(2, [GlobalConsensus(Ethereum { chain_id: CHAIN_ID })]), + XCM_VERSION, + ); + + BridgeHubPolkadot::fund_accounts(vec![(assethub_sovereign.clone(), INITIAL_FUND)]); + AssetHubPolkadot::fund_accounts(vec![(AssetHubPolkadotReceiver::get(), INITIAL_FUND)]); + + const WETH_AMOUNT: u128 = 1_000_000_000; + + BridgeHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + // Construct RegisterToken message and sent to inbound queue + send_inbound_message(make_register_token_message()).unwrap(); + + // Check that the register token message was sent using xcm + assert_expected_events!( + BridgeHubPolkadot, + vec![ + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {}, + ] + ); + + // Construct SendToken message and sent to inbound queue + send_inbound_message(make_send_token_message()).unwrap(); + + // Check that the send token message was sent using xcm + assert_expected_events!( + BridgeHubPolkadot, + vec![ + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {}, + ] + ); + }); + + AssetHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + type RuntimeOrigin = ::RuntimeOrigin; + + // Check that AssetHub has issued the foreign asset + assert_expected_events!( + AssetHubPolkadot, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { .. }) => {}, + ] + ); + let assets = vec![Asset { + id: AssetId(Location::new( + 2, + [ + GlobalConsensus(Ethereum { chain_id: CHAIN_ID }), + AccountKey20 { network: None, key: WETH }, + ], + )), + fun: Fungible(WETH_AMOUNT), + }]; + let multi_assets = VersionedAssets::V4(Assets::from(assets)); + + let destination = VersionedLocation::V4(Location::new( + 2, + [GlobalConsensus(Ethereum { chain_id: CHAIN_ID })], + )); + + let beneficiary = VersionedLocation::V4(Location::new( + 0, + [AccountKey20 { network: None, key: ETHEREUM_DESTINATION_ADDRESS.into() }], + )); + + let free_balance_before = ::Balances::free_balance( + AssetHubPolkadotReceiver::get(), + ); + // Send the Weth back to Ethereum + ::PolkadotXcm::reserve_transfer_assets( + RuntimeOrigin::signed(AssetHubPolkadotReceiver::get()), + Box::new(destination), + Box::new(beneficiary), + Box::new(multi_assets), + 0, + ) + .unwrap(); + let free_balance_after = ::Balances::free_balance( + AssetHubPolkadotReceiver::get(), + ); + // Assert at least DefaultBridgeHubEthereumBaseFee charged from the sender + let free_balance_diff = free_balance_before - free_balance_after; + assert!(free_balance_diff > DefaultBridgeHubEthereumBaseFee::get()); + }); + + BridgeHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + // Check that the transfer token back to Ethereum message was queue in the Ethereum + // Outbound Queue + assert_expected_events!( + BridgeHubPolkadot, + vec![ + RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageQueued {..}) => {}, + ] + ); + let events = BridgeHubPolkadot::events(); + // Check that the local fee was credited to the Snowbridge sovereign account + assert!( + events.iter().any(|event| matches!( + event, + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) + if *who == TREASURY_ACCOUNT.into() && *amount == 169033333 + )), + "Snowbridge sovereign takes local fee." + ); + // Check that the remote fee was credited to the AssetHub sovereign account + assert!( + events.iter().any(|event| matches!( + event, + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) + if *who == assethub_sovereign && *amount == 2680000000000, + )), + "AssetHub sovereign takes remote fee." + ); + }); +} + +#[test] +fn register_weth_token_in_asset_hub_fail_for_insufficient_fee() { + BridgeHubPolkadot::fund_para_sovereign(AssetHubPolkadot::para_id().into(), INITIAL_FUND); + + BridgeHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + // Construct RegisterToken message and sent to inbound queue + let message = make_register_token_with_infufficient_fee_message(); + send_inbound_message(message).unwrap(); + + assert_expected_events!( + BridgeHubPolkadot, + vec![ + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {}, + ] + ); + }); + + AssetHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + assert_expected_events!( + AssetHubPolkadot, + vec![ + RuntimeEvent::MessageQueue(pallet_message_queue::Event::Processed { success:false, .. }) => {}, + ] + ); + }); +} + +#[test] +fn send_token_from_ethereum_to_asset_hub_fail_for_insufficient_fund() { + // Insufficient fund + BridgeHubKusama::fund_para_sovereign(AssetHubKusama::para_id().into(), 1_000); + + BridgeHubPolkadot::execute_with(|| { + assert_err!(send_inbound_message(make_register_token_message()), Arithmetic(Underflow)); + }); +} + +pub fn make_register_token_message() -> InboundQueueFixture { + InboundQueueFixture { + execution_header: CompactExecutionHeader{ + parent_hash: hex!("d5de3dd02c96dbdc8aaa4db70a1e9fdab5ded5f4d52f18798acd56a3d37d1ad6").into(), + block_number: 772, + state_root: hex!("49cba2a79b23ad74cefe80c3a96699825d1cda0f75bfceb587c5549211c86245").into(), + receipts_root: hex!("ac9cf067acc72a958a0d7c572c7b66ba6e232f65bbbd09078d7c7123f87ede64").into(), + }, + message: Message { + event_log: Log { + address: hex!("eda338e4dc46038493b885327842fd3e301cab39").into(), + topics: vec![ + hex!("7153f9357c8ea496bba60bf82e67143e27b64462b49041f8e689e1b05728f84f").into(), + hex!("c173fac324158e77fb5840738a1a541f633cbec8884c6a601c567d2b376a0539").into(), + hex!("5f7060e971b0dc81e63f0aa41831091847d97c1a4693ac450cc128c7214e65e0").into(), + ], + data: hex!("00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002e0001000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7d00e40b54020000000000000000000000000000000000000000000000000000000000").into(), + }, + proof: Proof { + block_hash: hex!("392182a385b3a417e8ddea8b252953ee81e6ec0fb09d9056c96c89fbeb703a3f").into(), + tx_index: 0, + data: (vec![ + hex!("7b1f61b9714c080ef0be014e01657a15f45f0304b477beebc7ca5596c8033095").to_vec(), + ], vec![ + hex!("f9028e822080b9028802f90284018301d205b9010000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000080000000000000000000000000000004000000000080000000000000000000000000000000000010100000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000040004000000000000002000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000200000000000010f90179f85894eda338e4dc46038493b885327842fd3e301cab39e1a0f78bb28d4b1d7da699e5c0bc2be29c2b04b5aab6aacf6298fe5304f9db9c6d7ea000000000000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7df9011c94eda338e4dc46038493b885327842fd3e301cab39f863a07153f9357c8ea496bba60bf82e67143e27b64462b49041f8e689e1b05728f84fa0c173fac324158e77fb5840738a1a541f633cbec8884c6a601c567d2b376a0539a05f7060e971b0dc81e63f0aa41831091847d97c1a4693ac450cc128c7214e65e0b8a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002e0001000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7d00e40b54020000000000000000000000000000000000000000000000000000000000").to_vec(), + ]), + }, + }, + } +} + +pub fn make_send_token_message() -> InboundQueueFixture { + InboundQueueFixture { + execution_header: CompactExecutionHeader{ + parent_hash: hex!("920cecde45d428e3a77590b70f8533cf4c2c36917b8a7b74c915e7fa3dae7075").into(), + block_number: 1148, + state_root: hex!("bbc6ba0e9940d641afecbbaf3f97abd2b9ffaf2f6bd4879c4a71e659eca89978").into(), + receipts_root: hex!("717d6f476c17511fe96543b914cf08f19352567e10188f7f6c6c2f4528806c9c").into(), + }, + message: Message { + event_log: Log { + address: hex!("eda338e4dc46038493b885327842fd3e301cab39").into(), + topics: vec![ + hex!("7153f9357c8ea496bba60bf82e67143e27b64462b49041f8e689e1b05728f84f").into(), + hex!("c173fac324158e77fb5840738a1a541f633cbec8884c6a601c567d2b376a0539").into(), + hex!("c8eaf22f2cb07bac4679df0a660e7115ed87fcfd4e32ac269f6540265bbbd26f").into(), + ], + data: hex!("00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005f0001000000000000000187d1f7fdfee7f651fabc8bfcb6e086c278b77a7d008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48000064a7b3b6e00d000000000000000000e40b5402000000000000000000000000").into(), + }, + proof: Proof { + block_hash: hex!("d3c155f123c3cbff22f3d7869283e02179edea9ffa7a5e9a4d8414c2a6b8991f").into(), + tx_index: 0, + data: (vec![ + hex!("9f3340b57eddc1f86de30776db57faeca80269a3dd459031741988dec240ce34").to_vec(), + ], vec![ + hex!("f90451822080b9044b02f90447018301bcb9b9010000800000000000000000000020000000000000000000004000000000000000000400000000000000000000001000000010000000000000000000000008000000200000000000000001000008000000000000000000000000000000008000080000000000200000000000000000000000000100000000000000000011000000000000020200000000000000000000000000003000000040080008000000000000000000040044000021000000002000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000200800000000000f9033cf89b9487d1f7fdfee7f651fabc8bfcb6e086c278b77a7df863a0ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa000000000000000000000000090a987b944cb1dcce5564e5fdecd7a54d3de27fea000000000000000000000000057a2d4ff0c3866d96556884bf09fecdd7ccd530ca00000000000000000000000000000000000000000000000000de0b6b3a7640000f9015d94eda338e4dc46038493b885327842fd3e301cab39f884a024c5d2de620c6e25186ae16f6919eba93b6e2c1a33857cc419d9f3a00d6967e9a000000000000000000000000090a987b944cb1dcce5564e5fdecd7a54d3de27fea000000000000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7da000000000000000000000000000000000000000000000000000000000000003e8b8c000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000208eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48f9013c94eda338e4dc46038493b885327842fd3e301cab39f863a07153f9357c8ea496bba60bf82e67143e27b64462b49041f8e689e1b05728f84fa0c173fac324158e77fb5840738a1a541f633cbec8884c6a601c567d2b376a0539a0c8eaf22f2cb07bac4679df0a660e7115ed87fcfd4e32ac269f6540265bbbd26fb8c000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005f0001000000000000000187d1f7fdfee7f651fabc8bfcb6e086c278b77a7d008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48000064a7b3b6e00d000000000000000000e40b5402000000000000000000000000").to_vec(), + ]), + }, + }, + } +} diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index cffcdb9ff3..3c02dbbeab 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -780,10 +780,11 @@ pub mod bridging { parameter_types! { /// User fee for ERC20 token transfer back to Ethereum. /// Configure the fee to max Balance so that it is disabled. - pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX; + /// pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX; + pub const DefaultBridgeHubEthereumBaseFee: Balance = 2_750_872_500_000; pub storage BridgeHubEthereumBaseFee: Balance = DefaultBridgeHubEthereumBaseFee::get(); pub SiblingBridgeHubWithEthereumInboundQueueInstance: Location = Location::new( - 2, + 1, [ Parachain(SiblingBridgeHubParaId::get()), PalletInstance(system_parachains_constants::kusama::snowbridge::INBOUND_QUEUE_PALLET_INDEX), diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 687fdf686b..9556b93edc 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -728,10 +728,11 @@ pub mod bridging { parameter_types! { /// User fee for ERC20 token transfer back to Ethereum. /// Configure the fee to max Balance so that it is disabled. - pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX; + //pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX; + pub const DefaultBridgeHubEthereumBaseFee: Balance = 27_508_725_000; pub storage BridgeHubEthereumBaseFee: Balance = DefaultBridgeHubEthereumBaseFee::get(); pub SiblingBridgeHubWithEthereumInboundQueueInstance: Location = Location::new( - 2, + 1, [ Parachain(SiblingBridgeHubParaId::get()), PalletInstance(system_parachains_constants::polkadot::snowbridge::INBOUND_QUEUE_PALLET_INDEX), From 5cbc42827776dde12c673739acc72b8f38dcbfe6 Mon Sep 17 00:00:00 2001 From: ron Date: Fri, 1 Mar 2024 13:20:07 +0800 Subject: [PATCH 238/316] Update snowbridge test --- .../bridge-hub-kusama/src/tests/snowbridge.rs | 62 +++++++++++++++---- 1 file changed, 50 insertions(+), 12 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index 4dec57fb2b..4793e00ee3 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -14,24 +14,27 @@ // limitations under the License. use crate::*; use bridge_hub_kusama_runtime::{EthereumBeaconClient, EthereumInboundQueue, RuntimeOrigin}; -use snowbridge_beacon_primitives::CompactExecutionHeader; use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; use frame_support::pallet_prelude::TypeInfo; use hex_literal::hex; use kusama_system_emulated_network::BridgeHubKusamaParaSender as BridgeHubKusamaSender; -use snowbridge_core::outbound::OperatingMode; +use snowbridge_beacon_primitives::CompactExecutionHeader; +use snowbridge_core::{ + inbound::{Log, Message, Proof}, + outbound::OperatingMode, +}; use snowbridge_pallet_inbound_queue_fixtures::{ register_token_with_insufficient_fee::make_register_token_with_infufficient_fee_message, - send_token_to_penpal::make_send_token_to_penpal_message, InboundQueueFixture, }; use snowbridge_pallet_system; -use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; +use snowbridge_router_primitives::inbound::{ + Command, Destination, GlobalConsensusEthereumConvertsFor, MessageV1, VersionedMessage, +}; use sp_core::H256; use sp_runtime::{ArithmeticError::Underflow, DispatchError::Arithmetic}; use system_parachains_constants::kusama::snowbridge::EthereumNetwork; -use snowbridge_core::inbound::{Log, Message, Proof}; const INITIAL_FUND: u128 = 5_000_000_000 * KUSAMA_ED; const CHAIN_ID: u64 = 1; @@ -245,8 +248,6 @@ fn send_token_from_ethereum_to_penpal() { 1, [Parachain(AssetHubKusama::para_id().into())], )); - // Fund AssetHub sovereign account so it can pay execution fees for the asset transfer - BridgeHubKusama::fund_accounts(vec![(asset_hub_sovereign.clone(), INITIAL_FUND)]); // Fund PenPal sender and receiver PenpalA::fund_accounts(vec![ @@ -273,21 +274,58 @@ fn send_token_from_ethereum_to_penpal() { assert_ok!(::ForeignAssets::create( ::RuntimeOrigin::signed(PenpalASender::get()), weth_asset_id, - asset_hub_sovereign.into(), + asset_hub_sovereign.clone().into(), 1000, )); assert!(::ForeignAssets::asset_exists(weth_asset_id)); }); + AssetHubKusama::execute_with(|| { + assert_ok!(::ForeignAssets::force_create( + ::RuntimeOrigin::root(), + weth_asset_id, + asset_hub_sovereign.clone().into(), + true, + 1000, + )); + + assert!(::ForeignAssets::asset_exists( + weth_asset_id + )); + }); + BridgeHubKusama::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; - // Construct RegisterToken message and sent to inbound queue - send_inbound_message(make_register_token_message()).unwrap(); + type RuntimeOrigin = ::RuntimeOrigin; - // Construct SendToken message and sent to inbound queue - send_inbound_message(make_send_token_to_penpal_message()).unwrap(); + // Fund AssetHub sovereign account so it can pay execution fees for the asset transfer + ::Balances::force_set_balance( + RuntimeOrigin::root(), + asset_hub_sovereign.clone().into(), + INITIAL_FUND, + ) + .unwrap(); + + let message_id: H256 = [1; 32].into(); + let message = VersionedMessage::V1(MessageV1 { + chain_id: CHAIN_ID, + command: Command::SendToken { + token: WETH.into(), + destination: Destination::ForeignAccountId32 { + para_id: PenpalA::para_id().into(), + id: PenpalAReceiver::get().into(), + fee: 40_000_000_000, + }, + amount: 1_000_000, + fee: 40_000_000_000, + }, + }); + // Convert the message to XCM + let (xcm, _) = EthereumInboundQueue::do_convert(message_id, message).unwrap(); + // Send the XCM + let _ = EthereumInboundQueue::send_xcm(xcm, AssetHubKusama::para_id()).unwrap(); assert_expected_events!( BridgeHubKusama, From 0f75e575f133b0dc87b57d6458f291b60963fe01 Mon Sep 17 00:00:00 2001 From: ron Date: Fri, 1 Mar 2024 13:33:08 +0800 Subject: [PATCH 239/316] Fix error with FundsUnavailable --- .../tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index 4793e00ee3..722cbd270c 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -33,7 +33,7 @@ use snowbridge_router_primitives::inbound::{ Command, Destination, GlobalConsensusEthereumConvertsFor, MessageV1, VersionedMessage, }; use sp_core::H256; -use sp_runtime::{ArithmeticError::Underflow, DispatchError::Arithmetic}; +use sp_runtime::{DispatchError::Token, TokenError::FundsUnavailable}; use system_parachains_constants::kusama::snowbridge::EthereumNetwork; const INITIAL_FUND: u128 = 5_000_000_000 * KUSAMA_ED; @@ -571,7 +571,7 @@ fn send_token_from_ethereum_to_asset_hub_fail_for_insufficient_fund() { BridgeHubKusama::fund_para_sovereign(AssetHubKusama::para_id().into(), 1_000); BridgeHubKusama::execute_with(|| { - assert_err!(send_inbound_message(make_register_token_message()), Arithmetic(Underflow)); + assert_err!(send_inbound_message(make_register_token_message()), Token(FundsUnavailable)); }); } From 5ab6686742297f2bf3ed72c76c266d26052fbe41 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Fri, 1 Mar 2024 09:26:51 +0200 Subject: [PATCH 240/316] adds temp penpal runtime --- Cargo.lock | 59 +- .../parachains/testing/penpal/Cargo.toml | 2 +- integration-tests/emulated/penpal/Cargo.toml | 192 ++++ integration-tests/emulated/penpal/build.rs | 27 + integration-tests/emulated/penpal/src/lib.rs | 911 ++++++++++++++++++ .../penpal/src/weights/block_weights.rs | 53 + .../penpal/src/weights/extrinsic_weights.rs | 53 + .../emulated/penpal/src/weights/mod.rs | 27 + .../penpal/src/weights/paritydb_weights.rs | 63 ++ .../penpal/src/weights/rocksdb_weights.rs | 63 ++ .../emulated/penpal/src/xcm_config.rs | 407 ++++++++ 11 files changed, 1801 insertions(+), 56 deletions(-) create mode 100644 integration-tests/emulated/penpal/Cargo.toml create mode 100644 integration-tests/emulated/penpal/build.rs create mode 100644 integration-tests/emulated/penpal/src/lib.rs create mode 100644 integration-tests/emulated/penpal/src/weights/block_weights.rs create mode 100644 integration-tests/emulated/penpal/src/weights/extrinsic_weights.rs create mode 100644 integration-tests/emulated/penpal/src/weights/mod.rs create mode 100644 integration-tests/emulated/penpal/src/weights/paritydb_weights.rs create mode 100644 integration-tests/emulated/penpal/src/weights/rocksdb_weights.rs create mode 100644 integration-tests/emulated/penpal/src/xcm_config.rs diff --git a/Cargo.lock b/Cargo.lock index b677f50f81..90fd4bc6c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8626,16 +8626,14 @@ dependencies = [ "frame-support", "kusama-emulated-chain", "parachains-common", - "penpal-runtime", + "penpal-runtime-dotsama", "polkadot-emulated-chain", "sp-core", ] [[package]] -name = "penpal-runtime" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c804f33306e47153a4bad6a9cd33bbd537fa4b5f9434d505c8a6fc321a0bb71a" +name = "penpal-runtime-dotsama" +version = "0.14.0" dependencies = [ "assets-common", "cumulus-pallet-aura-ext", @@ -8652,6 +8650,7 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", + "hex-literal", "log", "pallet-asset-tx-payment", "pallet-assets", @@ -8691,7 +8690,6 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", - "testnet-parachains-constants", ] [[package]] @@ -10775,23 +10773,6 @@ dependencies = [ "librocksdb-sys", ] -[[package]] -name = "rococo-runtime-constants" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b45c21ccb0f8777512a65510c106aeee4b59682944b9a5cb31cd7b8ed4ccb47" -dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", - "staging-xcm", - "staging-xcm-builder", -] - [[package]] name = "route-recognizer" version = "0.3.1" @@ -14559,21 +14540,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" -[[package]] -name = "testnet-parachains-constants" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ff23c25f39d64b930ab9d721643d0c780a66201c7f1da34fac6982752626bf5" -dependencies = [ - "frame-support", - "polkadot-core-primitives", - "rococo-runtime-constants", - "smallvec", - "sp-runtime", - "staging-xcm", - "westend-runtime-constants", -] - [[package]] name = "thiserror" version = "1.0.56" @@ -15684,23 +15650,6 @@ dependencies = [ "webpki", ] -[[package]] -name = "westend-runtime-constants" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b080c193714605ce1033311d85035247adca170181cd68a3ad7e3ca87755a14" -dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", - "staging-xcm", - "staging-xcm-builder", -] - [[package]] name = "which" version = "4.4.2" diff --git a/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml b/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml index 63f26d7552..b90772d8aa 100644 --- a/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml @@ -17,7 +17,7 @@ frame-support = { version = "29.0.0" } parachains-common = { version = "8.0.0" } cumulus-primitives-core = { version = "0.8.0" } emulated-integration-tests-common = { version = "4.0.0" } -penpal-runtime = { version = "0.15.0" } +penpal-runtime = { package="penpal-runtime-dotsama", path = "../../../../penpal" } # Runtimes kusama-emulated-chain = { path = "../../../relays/kusama" } diff --git a/integration-tests/emulated/penpal/Cargo.toml b/integration-tests/emulated/penpal/Cargo.toml new file mode 100644 index 0000000000..7833c7fb8d --- /dev/null +++ b/integration-tests/emulated/penpal/Cargo.toml @@ -0,0 +1,192 @@ +[package] +name = "penpal-runtime-dotsama" +version = "0.14.0" +authors = ["Anonymous"] +description = "A parachain for communication back and forth with XCM of assets and uniques." +license = "Unlicense" +homepage = "https://substrate.io" +repository.workspace = true +edition.workspace = true + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[build-dependencies] +substrate-wasm-builder = { optional = true , version = "18.0.0" } + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +hex-literal = { version = "0.4.1", optional = true } +log = { version = "0.4.20", default-features = false } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +smallvec = "1.11.0" + +# Substrate +frame-benchmarking = { default-features = false, optional = true, version = "29.0.0" } +frame-executive = { default-features = false, version = "29.0.0" } +frame-support = { default-features = false, version = "29.0.0" } +frame-system = { default-features = false, version = "29.0.0" } +frame-system-benchmarking = { default-features = false, optional = true, version = "29.0.0" } +frame-system-rpc-runtime-api = { default-features = false, version = "27.0.0" } +frame-try-runtime = { default-features = false, optional = true, version = "0.35.0" } +pallet-aura = { default-features = false, version = "28.0.0" } +pallet-authorship = { default-features = false, version = "29.0.0" } +pallet-balances = { default-features = false, version = "29.0.0" } +pallet-session = { default-features = false, version = "29.0.0" } +pallet-sudo = { default-features = false, optional = true, version = "29.0.0" } +pallet-timestamp = { default-features = false, version = "28.0.0" } +pallet-transaction-payment = { default-features = false, version = "29.0.0" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "29.0.0" } +pallet-asset-tx-payment = { default-features = false, version = "29.0.0" } +pallet-assets = { default-features = false, version = "30.0.0" } +sp-api = { default-features = false, version = "27.0.0" } +sp-block-builder = { default-features = false, version = "27.0.0" } +sp-consensus-aura = { default-features = false, version = "0.33.0" } +sp-core = { default-features = false, version = "29.0.0" } +sp-genesis-builder = { default-features = false , version = "0.8.0" } +sp-inherents = { default-features = false, version = "27.0.0" } +sp-offchain = { default-features = false, version = "27.0.0" } +sp-runtime = { default-features = false, version = "32.0.0" } +sp-session = { default-features = false, version = "28.0.0" } +sp-std = { default-features = false, version = "14.0.0" } +sp-storage = { default-features = false, version = "20.0.0" } +sp-transaction-pool = { default-features = false, version = "27.0.0" } +sp-version = { default-features = false, version = "30.0.0" } + +# Polkadot +polkadot-primitives = { default-features = false , version = "8.0.1" } +pallet-xcm = { version = "8.0.1", default-features = false } +polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } +polkadot-runtime-common = { default-features = false, version = "8.0.1" } +xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } +xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.1" } +xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } + +# Cumulus +cumulus-pallet-aura-ext = { default-features = false , version = "0.8.0" } +pallet-message-queue = { default-features = false , version = "32.0.0" } +cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.1" } +cumulus-pallet-session-benchmarking = { default-features = false, version = "10.0.0" } +cumulus-pallet-xcm = { default-features = false , version = "0.8.0" } +cumulus-pallet-xcmp-queue = { default-features = false , version = "0.8.0" } +cumulus-primitives-core = { default-features = false , version = "0.8.0" } +cumulus-primitives-utility = { default-features = false , version = "0.8.1" } +pallet-collator-selection = { default-features = false , version = "10.0.0" } +parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.8.0" } +parachains-common = { default-features = false , version = "8.0.0" } +assets-common = { default-features = false , version = "0.8.0" } + +[features] +default = ["std"] +std = [ + "assets-common/std", + "codec/std", + "cumulus-pallet-aura-ext/std", + "cumulus-pallet-parachain-system/std", + "cumulus-pallet-session-benchmarking/std", + "cumulus-pallet-xcm/std", + "cumulus-pallet-xcmp-queue/std", + "cumulus-primitives-core/std", + "cumulus-primitives-utility/std", + "frame-benchmarking?/std", + "frame-executive/std", + "frame-support/std", + "frame-system-benchmarking?/std", + "frame-system-rpc-runtime-api/std", + "frame-system/std", + "frame-try-runtime?/std", + "log/std", + "pallet-asset-tx-payment/std", + "pallet-assets/std", + "pallet-aura/std", + "pallet-authorship/std", + "pallet-balances/std", + "pallet-collator-selection/std", + "pallet-message-queue/std", + "pallet-session/std", + "pallet-sudo/std", + "pallet-timestamp/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", + "pallet-xcm/std", + "parachain-info/std", + "parachains-common/std", + "polkadot-parachain-primitives/std", + "polkadot-primitives/std", + "polkadot-runtime-common/std", + "scale-info/std", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-aura/std", + "sp-core/std", + "sp-genesis-builder/std", + "sp-inherents/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-storage/std", + "sp-transaction-pool/std", + "sp-version/std", + "substrate-wasm-builder", + "xcm-builder/std", + "xcm-executor/std", + "xcm/std", +] + +runtime-benchmarks = [ + "assets-common/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-pallet-session-benchmarking/runtime-benchmarks", + "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system-benchmarking/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "hex-literal", + "pallet-asset-tx-payment/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-collator-selection/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", + "pallet-sudo/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "parachains-common/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", + "polkadot-primitives/runtime-benchmarks", + "polkadot-runtime-common/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", + "xcm-executor/runtime-benchmarks", +] + +try-runtime = [ + "cumulus-pallet-aura-ext/try-runtime", + "cumulus-pallet-parachain-system/try-runtime", + "cumulus-pallet-xcm/try-runtime", + "cumulus-pallet-xcmp-queue/try-runtime", + "frame-executive/try-runtime", + "frame-support/try-runtime", + "frame-system/try-runtime", + "frame-try-runtime/try-runtime", + "pallet-asset-tx-payment/try-runtime", + "pallet-assets/try-runtime", + "pallet-aura/try-runtime", + "pallet-authorship/try-runtime", + "pallet-balances/try-runtime", + "pallet-collator-selection/try-runtime", + "pallet-message-queue/try-runtime", + "pallet-session/try-runtime", + "pallet-sudo/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-transaction-payment/try-runtime", + "pallet-xcm/try-runtime", + "parachain-info/try-runtime", + "polkadot-runtime-common/try-runtime", + "sp-runtime/try-runtime", +] + +experimental = ["pallet-aura/experimental"] diff --git a/integration-tests/emulated/penpal/build.rs b/integration-tests/emulated/penpal/build.rs new file mode 100644 index 0000000000..9c9cde9a25 --- /dev/null +++ b/integration-tests/emulated/penpal/build.rs @@ -0,0 +1,27 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +#[cfg(feature = "std")] +fn main() { + substrate_wasm_builder::WasmBuilder::new() + .with_current_project() + .export_heap_base() + .import_memory() + .build() +} + +#[cfg(not(feature = "std"))] +fn main() {} diff --git a/integration-tests/emulated/penpal/src/lib.rs b/integration-tests/emulated/penpal/src/lib.rs new file mode 100644 index 0000000000..bf8dcbc24c --- /dev/null +++ b/integration-tests/emulated/penpal/src/lib.rs @@ -0,0 +1,911 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +//! The PenPal runtime is designed as a test runtime that can be created with an arbitrary `ParaId`, +//! such that multiple instances of the parachain can be on the same parent relay. Ensure that you +//! have enough nodes running to support this or you will get scheduling errors. +//! +//! The PenPal runtime's primary use is for testing interactions between System parachains and +//! other chains that are not trusted teleporters. + +#![cfg_attr(not(feature = "std"), no_std)] +// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. +#![recursion_limit = "256"] + +// Make the WASM binary available. +#[cfg(feature = "std")] +include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); + +mod weights; +pub mod xcm_config; + +use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; +use frame_support::{ + construct_runtime, derive_impl, + dispatch::DispatchClass, + genesis_builder_helper::{build_config, create_default_config}, + pallet_prelude::Weight, + parameter_types, + traits::{ + AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, ConstU8, Everything, TransformOrigin, + }, + weights::{ + constants::WEIGHT_REF_TIME_PER_SECOND, ConstantMultiplier, FeePolynomial, + WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, + }, + PalletId, +}; +use frame_system::{ + limits::{BlockLength, BlockWeights}, + EnsureRoot, EnsureSigned, +}; +use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; +use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery; +use smallvec::smallvec; +use sp_api::impl_runtime_apis; +pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; +use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; +use sp_runtime::{ + create_runtime_str, generic, impl_opaque_keys, + traits::{AccountIdLookup, BlakeTwo256, Block as BlockT}, + transaction_validity::{TransactionSource, TransactionValidity}, + ApplyExtrinsicResult, +}; +pub use sp_runtime::{traits::ConvertInto, MultiAddress, Perbill, Permill}; +use sp_std::prelude::*; +#[cfg(feature = "std")] +use sp_version::NativeVersion; +use sp_version::RuntimeVersion; +use xcm_config::{AssetsToBlockAuthor, XcmOriginToTransactDispatchOrigin}; + +#[cfg(any(feature = "std", test))] +pub use sp_runtime::BuildStorage; + +// Polkadot imports +use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; + +use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; + +// XCM Imports +use parachains_common::{AccountId, Signature}; +use xcm::latest::prelude::BodyId; + +/// Balance of an account. +pub type Balance = u128; + +/// Index of a transaction in the chain. +pub type Nonce = u32; + +/// A hash of some data used by the chain. +pub type Hash = sp_core::H256; + +/// An index to a block. +pub type BlockNumber = u32; + +/// The address format for describing accounts. +pub type Address = MultiAddress; + +/// Block header type as expected by this runtime. +pub type Header = generic::Header; + +/// Block type as expected by this runtime. +pub type Block = generic::Block; + +/// A Block signed with a Justification +pub type SignedBlock = generic::SignedBlock; + +/// BlockId type as expected by this runtime. +pub type BlockId = generic::BlockId; + +// Id used for identifying assets. +pub type AssetId = u32; + +/// The SignedExtension to the basic transaction logic. +pub type SignedExtra = ( + frame_system::CheckNonZeroSender, + frame_system::CheckSpecVersion, + frame_system::CheckTxVersion, + frame_system::CheckGenesis, + frame_system::CheckEra, + frame_system::CheckNonce, + frame_system::CheckWeight, + pallet_asset_tx_payment::ChargeAssetTxPayment, +); + +/// Unchecked extrinsic type as expected by this runtime. +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; + +pub type Migrations = ( + pallet_balances::migration::MigrateToTrackInactive, + pallet_collator_selection::migration::v1::MigrateToV1, +); + +/// Executive: handles dispatch to the various modules. +pub type Executive = frame_executive::Executive< + Runtime, + Block, + frame_system::ChainContext, + Runtime, + AllPalletsWithSystem, + Migrations, +>; + +/// Handles converting a weight scalar to a fee value, based on the scale and granularity of the +/// node's balance type. +/// +/// This should typically create a mapping between the following ranges: +/// - `[0, MAXIMUM_BLOCK_WEIGHT]` +/// - `[Balance::min, Balance::max]` +/// +/// Yet, it can be used for any other sort of change to weight-fee. Some examples being: +/// - Setting it to `0` will essentially disable the weight fee. +/// - Setting it to `1` will cause the literal `#[weight = x]` values to be charged. +pub struct WeightToFee; +impl frame_support::weights::WeightToFee for WeightToFee { + type Balance = Balance; + + fn weight_to_fee(weight: &Weight) -> Self::Balance { + let time_poly: FeePolynomial = RefTimeToFee::polynomial().into(); + let proof_poly: FeePolynomial = ProofSizeToFee::polynomial().into(); + + // Take the maximum instead of the sum to charge by the more scarce resource. + time_poly.eval(weight.ref_time()).max(proof_poly.eval(weight.proof_size())) + } +} + +/// Maps the reference time component of `Weight` to a fee. +pub struct RefTimeToFee; +impl WeightToFeePolynomial for RefTimeToFee { + type Balance = Balance; + fn polynomial() -> WeightToFeeCoefficients { + let p = MILLIUNIT / 10; + let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); + + smallvec![WeightToFeeCoefficient { + degree: 1, + negative: false, + coeff_frac: Perbill::from_rational(p % q, q), + coeff_integer: p / q, + }] + } +} + +/// Maps the proof size component of `Weight` to a fee. +pub struct ProofSizeToFee; +impl WeightToFeePolynomial for ProofSizeToFee { + type Balance = Balance; + fn polynomial() -> WeightToFeeCoefficients { + // Map 10kb proof to 1 CENT. + let p = MILLIUNIT / 10; + let q = 10_000; + + smallvec![WeightToFeeCoefficient { + degree: 1, + negative: false, + coeff_frac: Perbill::from_rational(p % q, q), + coeff_integer: p / q, + }] + } +} +/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know +/// the specifics of the runtime. They can then be made to be agnostic over specific formats +/// of data like extrinsics, allowing for them to continue syncing the network through upgrades +/// to even the core data structures. +pub mod opaque { + use super::*; + use sp_runtime::{generic, traits::BlakeTwo256}; + + pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; + /// Opaque block header type. + pub type Header = generic::Header; + /// Opaque block type. + pub type Block = generic::Block; + /// Opaque block identifier type. + pub type BlockId = generic::BlockId; +} + +impl_opaque_keys! { + pub struct SessionKeys { + pub aura: Aura, + } +} + +#[sp_version::runtime_version] +pub const VERSION: RuntimeVersion = RuntimeVersion { + spec_name: create_runtime_str!("penpal-parachain"), + impl_name: create_runtime_str!("penpal-parachain"), + authoring_version: 1, + spec_version: 1, + impl_version: 0, + apis: RUNTIME_API_VERSIONS, + transaction_version: 1, + state_version: 1, +}; + +/// This determines the average expected block time that we are targeting. +/// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`. +/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked +/// up by `pallet_aura` to implement `fn slot_duration()`. +/// +/// Change this to adjust the block time. +pub const MILLISECS_PER_BLOCK: u64 = 12000; + +// NOTE: Currently it is not possible to change the slot duration after the chain has started. +// Attempting to do so will brick block production. +pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; + +// Time is measured by number of blocks. +pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); +pub const HOURS: BlockNumber = MINUTES * 60; +pub const DAYS: BlockNumber = HOURS * 24; + +// Unit = the base number of indivisible units for balances +pub const UNIT: Balance = 1_000_000_000_000; +pub const MILLIUNIT: Balance = 1_000_000_000; +pub const MICROUNIT: Balance = 1_000_000; + +/// The existential deposit. Set to 1/10 of the Connected Relay Chain. +pub const EXISTENTIAL_DEPOSIT: Balance = MILLIUNIT; + +/// We assume that ~5% of the block weight is consumed by `on_initialize` handlers. This is +/// used to limit the maximal weight of a single extrinsic. +const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(5); + +/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used by +/// `Operational` extrinsics. +const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); + +/// We allow for 0.5 of a second of compute with a 12 second average block time. +const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts( + WEIGHT_REF_TIME_PER_SECOND.saturating_div(2), + cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64, +); + +/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included +/// into the relay chain. +const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1; +/// How many parachain blocks are processed by the relay chain per parent. Limits the +/// number of blocks authored per slot. +const BLOCK_PROCESSING_VELOCITY: u32 = 1; +/// Relay chain slot duration, in milliseconds. +const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000; + +/// The version information used to identify this runtime when compiled natively. +#[cfg(feature = "std")] +pub fn native_version() -> NativeVersion { + NativeVersion { runtime_version: VERSION, can_author_with: Default::default() } +} + +parameter_types! { + pub const Version: RuntimeVersion = VERSION; + + // This part is copied from Substrate's `bin/node/runtime/src/lib.rs`. + // The `RuntimeBlockLength` and `RuntimeBlockWeights` exist here because the + // `DeletionWeightLimit` and `DeletionQueueDepth` depend on those to parameterize + // the lazy contract deletion. + pub RuntimeBlockLength: BlockLength = + BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); + pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder() + .base_block(BlockExecutionWeight::get()) + .for_class(DispatchClass::all(), |weights| { + weights.base_extrinsic = ExtrinsicBaseWeight::get(); + }) + .for_class(DispatchClass::Normal, |weights| { + weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); + }) + .for_class(DispatchClass::Operational, |weights| { + weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT); + // Operational transactions have some extra reserved space, so that they + // are included even if block reached `MAXIMUM_BLOCK_WEIGHT`. + weights.reserved = Some( + MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT + ); + }) + .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) + .build_or_panic(); + pub const SS58Prefix: u16 = 42; +} + +// Configure FRAME pallets to include in runtime. + +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] +impl frame_system::Config for Runtime { + /// The identifier used to distinguish between accounts. + type AccountId = AccountId; + /// The aggregated dispatch type that is available for extrinsics. + type RuntimeCall = RuntimeCall; + /// The lookup mechanism to get account ID from whatever is passed in dispatchers. + type Lookup = AccountIdLookup; + /// The index type for storing how many extrinsics an account has signed. + type Nonce = Nonce; + /// The type for hashing blocks and tries. + type Hash = Hash; + /// The hashing algorithm used. + type Hashing = BlakeTwo256; + /// The block type. + type Block = Block; + /// The ubiquitous event type. + type RuntimeEvent = RuntimeEvent; + /// The ubiquitous origin type. + type RuntimeOrigin = RuntimeOrigin; + /// Maximum number of block number to block hash mappings to keep (oldest pruned first). + type BlockHashCount = BlockHashCount; + /// Runtime version. + type Version = Version; + /// Converts a module to an index of this module in the runtime. + type PalletInfo = PalletInfo; + /// The data to be stored in an account. + type AccountData = pallet_balances::AccountData; + /// What to do if a new account is created. + type OnNewAccount = (); + /// What to do if an account is fully reaped from the system. + type OnKilledAccount = (); + /// The weight of database operations that the runtime can invoke. + type DbWeight = RocksDbWeight; + /// The basic call filter to use in dispatchable. + type BaseCallFilter = Everything; + /// Weight information for the extrinsics of this pallet. + type SystemWeightInfo = (); + /// Block & extrinsics weights: base values and limits. + type BlockWeights = RuntimeBlockWeights; + /// The maximum length of a block (in bytes). + type BlockLength = RuntimeBlockLength; + /// This is used as an identifier of the chain. 42 is the generic substrate prefix. + type SS58Prefix = SS58Prefix; + /// The action to take on a Runtime Upgrade + type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; + type MaxConsumers = frame_support::traits::ConstU32<16>; +} + +impl pallet_timestamp::Config for Runtime { + /// A timestamp: milliseconds since the unix epoch. + type Moment = u64; + type OnTimestampSet = Aura; + type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; + type WeightInfo = (); +} + +impl pallet_authorship::Config for Runtime { + type FindAuthor = pallet_session::FindAccountFromAuthorIndex; + type EventHandler = (CollatorSelection,); +} + +parameter_types! { + pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT; +} + +impl pallet_balances::Config for Runtime { + type MaxLocks = ConstU32<50>; + /// The type for recording an account's balance. + type Balance = Balance; + /// The ubiquitous event type. + type RuntimeEvent = RuntimeEvent; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type WeightInfo = pallet_balances::weights::SubstrateWeight; + type MaxReserves = ConstU32<50>; + type ReserveIdentifier = [u8; 8]; + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; + type FreezeIdentifier = (); + type MaxFreezes = ConstU32<0>; +} + +parameter_types! { + /// Relay Chain `TransactionByteFee` / 10 + pub const TransactionByteFee: Balance = 10 * MICROUNIT; +} + +impl pallet_transaction_payment::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; + type WeightToFee = WeightToFee; + type LengthToFee = ConstantMultiplier; + type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; + type OperationalFeeMultiplier = ConstU8<5>; +} + +parameter_types! { + pub const AssetDeposit: Balance = 0; + pub const AssetAccountDeposit: Balance = 0; + pub const ApprovalDeposit: Balance = 0; + pub const AssetsStringLimit: u32 = 50; + pub const MetadataDepositBase: Balance = 0; + pub const MetadataDepositPerByte: Balance = 0; +} + +// /// We allow root and the Relay Chain council to execute privileged asset operations. +// pub type AssetsForceOrigin = +// EnsureOneOf, EnsureXcm>>; + +impl pallet_assets::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Balance = Balance; + type AssetId = AssetId; + type AssetIdParameter = codec::Compact; + type Currency = Balances; + type CreateOrigin = AsEnsureOriginWithArg>; + type ForceOrigin = EnsureRoot; + type AssetDeposit = AssetDeposit; + type MetadataDepositBase = MetadataDepositBase; + type MetadataDepositPerByte = MetadataDepositPerByte; + type ApprovalDeposit = ApprovalDeposit; + type StringLimit = AssetsStringLimit; + type Freezer = (); + type Extra = (); + type WeightInfo = pallet_assets::weights::SubstrateWeight; + type CallbackHandle = (); + type AssetAccountDeposit = AssetAccountDeposit; + type RemoveItemsLimit = frame_support::traits::ConstU32<1000>; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); +} + +parameter_types! { + // we just reuse the same deposits + pub const ForeignAssetsAssetDeposit: Balance = AssetDeposit::get(); + pub const ForeignAssetsAssetAccountDeposit: Balance = AssetAccountDeposit::get(); + pub const ForeignAssetsApprovalDeposit: Balance = ApprovalDeposit::get(); + pub const ForeignAssetsAssetsStringLimit: u32 = AssetsStringLimit::get(); + pub const ForeignAssetsMetadataDepositBase: Balance = MetadataDepositBase::get(); + pub const ForeignAssetsMetadataDepositPerByte: Balance = MetadataDepositPerByte::get(); +} + +/// Another pallet assets instance to store foreign assets from bridgehub. +pub type ForeignAssetsInstance = pallet_assets::Instance2; +impl pallet_assets::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Balance = Balance; + type AssetId = xcm::v3::Location; + type AssetIdParameter = xcm::v3::Location; + type Currency = Balances; + type CreateOrigin = AsEnsureOriginWithArg>; + type ForceOrigin = EnsureRoot; + type AssetDeposit = ForeignAssetsAssetDeposit; + type MetadataDepositBase = ForeignAssetsMetadataDepositBase; + type MetadataDepositPerByte = ForeignAssetsMetadataDepositPerByte; + type ApprovalDeposit = ForeignAssetsApprovalDeposit; + type StringLimit = ForeignAssetsAssetsStringLimit; + type Freezer = (); + type Extra = (); + type WeightInfo = pallet_assets::weights::SubstrateWeight; + type CallbackHandle = (); + type AssetAccountDeposit = ForeignAssetsAssetAccountDeposit; + type RemoveItemsLimit = frame_support::traits::ConstU32<1000>; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = xcm_config::XcmBenchmarkHelper; +} + +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 WeightInfo = (); + type RuntimeEvent = RuntimeEvent; + type OnSystemEvent = (); + type SelfParaId = parachain_info::Pallet; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; + type ReservedDmpWeight = ReservedDmpWeight; + type OutboundXcmpMessageSource = XcmpQueue; + type XcmpMessageHandler = XcmpQueue; + type ReservedXcmpWeight = ReservedXcmpWeight; + type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases; + type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< + Runtime, + RELAY_CHAIN_SLOT_DURATION_MILLIS, + BLOCK_PROCESSING_VELOCITY, + UNINCLUDED_SEGMENT_CAPACITY, + >; +} + +impl parachain_info::Config for Runtime {} + +parameter_types! { + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = (); + type MessageProcessor = xcm_builder::ProcessXcmMessage< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >; + type Size = u32; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; +} + +impl cumulus_pallet_aura_ext::Config for Runtime {} + +impl cumulus_pallet_xcmp_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ChannelInfo = ParachainSystem; + type VersionWrapper = PolkadotXcm; + // Enqueue XCMP messages from siblings for later processing. + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; + type ControllerOrigin = EnsureRoot; + type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; + type WeightInfo = (); + type PriceForSiblingDelivery = NoPriceForMessageDelivery; +} + +parameter_types! { + pub const Period: u32 = 6 * HOURS; + pub const Offset: u32 = 0; +} + +impl pallet_session::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ValidatorId = ::AccountId; + // we don't have stash and controller, thus we don't need the convert as well. + type ValidatorIdOf = pallet_collator_selection::IdentityCollator; + type ShouldEndSession = pallet_session::PeriodicSessions; + type NextSessionRotation = pallet_session::PeriodicSessions; + type SessionManager = CollatorSelection; + // Essentially just Aura, but let's be pedantic. + type SessionHandler = ::KeyTypeIdProviders; + type Keys = SessionKeys; + type WeightInfo = (); +} + +impl pallet_aura::Config for Runtime { + type AuthorityId = AuraId; + type DisabledValidators = (); + type MaxAuthorities = ConstU32<100_000>; + type AllowMultipleBlocksPerSlot = ConstBool; + #[cfg(feature = "experimental")] + type SlotDuration = pallet_aura::MinimumPeriodTimesTwo; +} + +parameter_types! { + pub const PotId: PalletId = PalletId(*b"PotStake"); + pub const SessionLength: BlockNumber = 6 * HOURS; + pub const ExecutiveBody: BodyId = BodyId::Executive; +} + +// We allow root only to execute privileged collator selection operations. +pub type CollatorSelectionUpdateOrigin = EnsureRoot; + +impl pallet_collator_selection::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type UpdateOrigin = CollatorSelectionUpdateOrigin; + type PotId = PotId; + type MaxCandidates = ConstU32<100>; + type MinEligibleCollators = ConstU32<4>; + type MaxInvulnerables = ConstU32<20>; + // should be a multiple of session or things will get inconsistent + type KickThreshold = Period; + type ValidatorId = ::AccountId; + type ValidatorIdOf = pallet_collator_selection::IdentityCollator; + type ValidatorRegistration = Session; + type WeightInfo = (); +} + +impl pallet_asset_tx_payment::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Fungibles = Assets; + type OnChargeAssetTransaction = pallet_asset_tx_payment::FungiblesAdapter< + pallet_assets::BalanceToAssetBalance< + Balances, + Runtime, + ConvertInto, + pallet_assets::Instance1, + >, + AssetsToBlockAuthor, + >; +} + +impl pallet_sudo::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type WeightInfo = pallet_sudo::weights::SubstrateWeight; +} + +// Create the runtime by composing the FRAME pallets that were previously configured. +construct_runtime!( + pub enum Runtime + { + // System support stuff. + System: frame_system = 0, + ParachainSystem: cumulus_pallet_parachain_system = 1, + Timestamp: pallet_timestamp = 2, + ParachainInfo: parachain_info = 3, + + // Monetary stuff. + Balances: pallet_balances = 10, + TransactionPayment: pallet_transaction_payment = 11, + AssetTxPayment: pallet_asset_tx_payment = 12, + + // Collator support. The order of these 4 are important and shall not change. + Authorship: pallet_authorship = 20, + CollatorSelection: pallet_collator_selection = 21, + Session: pallet_session = 22, + Aura: pallet_aura = 23, + AuraExt: cumulus_pallet_aura_ext = 24, + + // XCM helpers. + XcmpQueue: cumulus_pallet_xcmp_queue = 30, + PolkadotXcm: pallet_xcm = 31, + CumulusXcm: cumulus_pallet_xcm = 32, + MessageQueue: pallet_message_queue = 34, + + // The main stage. + Assets: pallet_assets:: = 50, + ForeignAssets: pallet_assets:: = 51, + + Sudo: pallet_sudo = 255, + } +); + +#[cfg(feature = "runtime-benchmarks")] +mod benches { + frame_benchmarking::define_benchmarks!( + [frame_system, SystemBench::] + [pallet_balances, Balances] + [pallet_message_queue, MessageQueue] + [pallet_session, SessionBench::] + [pallet_sudo, Sudo] + [pallet_timestamp, Timestamp] + [pallet_collator_selection, CollatorSelection] + [cumulus_pallet_parachain_system, ParachainSystem] + [cumulus_pallet_xcmp_queue, XcmpQueue] + ); +} + +impl_runtime_apis! { + impl sp_consensus_aura::AuraApi for Runtime { + fn slot_duration() -> sp_consensus_aura::SlotDuration { + sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration()) + } + + fn authorities() -> Vec { + Aura::authorities().into_inner() + } + } + + impl sp_api::Core for Runtime { + fn version() -> RuntimeVersion { + VERSION + } + + fn execute_block(block: Block) { + Executive::execute_block(block) + } + + fn initialize_block(header: &::Header) { + Executive::initialize_block(header) + } + } + + impl sp_api::Metadata for Runtime { + fn metadata() -> OpaqueMetadata { + OpaqueMetadata::new(Runtime::metadata().into()) + } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } + } + + impl sp_block_builder::BlockBuilder for Runtime { + fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { + Executive::apply_extrinsic(extrinsic) + } + + fn finalize_block() -> ::Header { + Executive::finalize_block() + } + + fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { + data.create_extrinsics() + } + + fn check_inherents( + block: Block, + data: sp_inherents::InherentData, + ) -> sp_inherents::CheckInherentsResult { + data.check_extrinsics(&block) + } + } + + impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { + fn validate_transaction( + source: TransactionSource, + tx: ::Extrinsic, + block_hash: ::Hash, + ) -> TransactionValidity { + Executive::validate_transaction(source, tx, block_hash) + } + } + + impl sp_offchain::OffchainWorkerApi for Runtime { + fn offchain_worker(header: &::Header) { + Executive::offchain_worker(header) + } + } + + impl sp_session::SessionKeys for Runtime { + fn generate_session_keys(seed: Option>) -> Vec { + SessionKeys::generate(seed) + } + + fn decode_session_keys( + encoded: Vec, + ) -> Option, KeyTypeId)>> { + SessionKeys::decode_into_raw_public_keys(&encoded) + } + } + + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { + fn account_nonce(account: AccountId) -> Nonce { + System::account_nonce(account) + } + } + + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime { + fn query_info( + uxt: ::Extrinsic, + len: u32, + ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo { + TransactionPayment::query_info(uxt, len) + } + fn query_fee_details( + uxt: ::Extrinsic, + len: u32, + ) -> pallet_transaction_payment::FeeDetails { + TransactionPayment::query_fee_details(uxt, len) + } + fn query_weight_to_fee(weight: Weight) -> Balance { + TransactionPayment::weight_to_fee(weight) + } + fn query_length_to_fee(length: u32) -> Balance { + TransactionPayment::length_to_fee(length) + } + } + + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi + for Runtime + { + fn query_call_info( + call: RuntimeCall, + len: u32, + ) -> pallet_transaction_payment::RuntimeDispatchInfo { + TransactionPayment::query_call_info(call, len) + } + fn query_call_fee_details( + call: RuntimeCall, + len: u32, + ) -> pallet_transaction_payment::FeeDetails { + TransactionPayment::query_call_fee_details(call, len) + } + fn query_weight_to_fee(weight: Weight) -> Balance { + TransactionPayment::weight_to_fee(weight) + } + fn query_length_to_fee(length: u32) -> Balance { + TransactionPayment::length_to_fee(length) + } + } + + impl cumulus_primitives_core::CollectCollationInfo for Runtime { + fn collect_collation_info(header: &::Header) -> cumulus_primitives_core::CollationInfo { + ParachainSystem::collect_collation_info(header) + } + } + + #[cfg(feature = "try-runtime")] + impl frame_try_runtime::TryRuntime for Runtime { + fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { + let weight = Executive::try_runtime_upgrade(checks).unwrap(); + (weight, RuntimeBlockWeights::get().max_block) + } + + fn execute_block( + block: Block, + state_root_check: bool, + signature_check: bool, + select: frame_try_runtime::TryStateSelect, + ) -> Weight { + // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to + // have a backtrace here. + Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap() + } + } + + #[cfg(feature = "runtime-benchmarks")] + impl frame_benchmarking::Benchmark for Runtime { + fn benchmark_metadata(extra: bool) -> ( + Vec, + Vec, + ) { + use frame_benchmarking::{Benchmarking, BenchmarkList}; + use frame_support::traits::StorageInfoTrait; + use frame_system_benchmarking::Pallet as SystemBench; + use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + + let mut list = Vec::::new(); + list_benchmarks!(list, extra); + + let storage_info = AllPalletsWithSystem::storage_info(); + (list, storage_info) + } + + fn dispatch_benchmark( + config: frame_benchmarking::BenchmarkConfig + ) -> Result, sp_runtime::RuntimeString> { + use frame_benchmarking::{Benchmarking, BenchmarkBatch}; + use sp_storage::TrackedStorageKey; + + use frame_system_benchmarking::Pallet as SystemBench; + impl frame_system_benchmarking::Config for Runtime {} + + use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + impl cumulus_pallet_session_benchmarking::Config for Runtime {} + + let whitelist: Vec = vec![ + // Block Number + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), + // Total Issuance + hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(), + // Execution Phase + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(), + // Event Count + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(), + // System Events + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(), + ]; + + let mut batches = Vec::::new(); + let params = (&config, &whitelist); + add_benchmarks!(params, batches); + + if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } + Ok(batches) + } + } + + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } +} + +cumulus_pallet_parachain_system::register_validate_block! { + Runtime = Runtime, + BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::, +} diff --git a/integration-tests/emulated/penpal/src/weights/block_weights.rs b/integration-tests/emulated/penpal/src/weights/block_weights.rs new file mode 100644 index 0000000000..e7fdb2aae2 --- /dev/null +++ b/integration-tests/emulated/penpal/src/weights/block_weights.rs @@ -0,0 +1,53 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod constants { + use frame_support::{ + parameter_types, + weights::{constants, Weight}, + }; + + parameter_types! { + /// Importing a block with 0 Extrinsics. + pub const BlockExecutionWeight: Weight = + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0); + } + + #[cfg(test)] + mod test_weights { + use frame_support::weights::constants; + + /// Checks that the weight exists and is sane. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn sane() { + let w = super::constants::BlockExecutionWeight::get(); + + // At least 100 µs. + assert!( + w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + "Weight should be at least 100 µs." + ); + // At most 50 ms. + assert!( + w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, + "Weight should be at most 50 ms." + ); + } + } +} diff --git a/integration-tests/emulated/penpal/src/weights/extrinsic_weights.rs b/integration-tests/emulated/penpal/src/weights/extrinsic_weights.rs new file mode 100644 index 0000000000..1a4adb968b --- /dev/null +++ b/integration-tests/emulated/penpal/src/weights/extrinsic_weights.rs @@ -0,0 +1,53 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod constants { + use frame_support::{ + parameter_types, + weights::{constants, Weight}, + }; + + parameter_types! { + /// Executing a NO-OP `System::remarks` Extrinsic. + pub const ExtrinsicBaseWeight: Weight = + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0); + } + + #[cfg(test)] + mod test_weights { + use frame_support::weights::constants; + + /// Checks that the weight exists and is sane. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn sane() { + let w = super::constants::ExtrinsicBaseWeight::get(); + + // At least 10 µs. + assert!( + w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + "Weight should be at least 10 µs." + ); + // At most 1 ms. + assert!( + w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Weight should be at most 1 ms." + ); + } + } +} diff --git a/integration-tests/emulated/penpal/src/weights/mod.rs b/integration-tests/emulated/penpal/src/weights/mod.rs new file mode 100644 index 0000000000..b473d49e20 --- /dev/null +++ b/integration-tests/emulated/penpal/src/weights/mod.rs @@ -0,0 +1,27 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Expose the auto generated weight files. + +pub mod block_weights; +pub mod extrinsic_weights; +pub mod paritydb_weights; +pub mod rocksdb_weights; + +pub use block_weights::constants::BlockExecutionWeight; +pub use extrinsic_weights::constants::ExtrinsicBaseWeight; +pub use rocksdb_weights::constants::RocksDbWeight; diff --git a/integration-tests/emulated/penpal/src/weights/paritydb_weights.rs b/integration-tests/emulated/penpal/src/weights/paritydb_weights.rs new file mode 100644 index 0000000000..2567970383 --- /dev/null +++ b/integration-tests/emulated/penpal/src/weights/paritydb_weights.rs @@ -0,0 +1,63 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod constants { + use frame_support::{ + parameter_types, + weights::{constants, RuntimeDbWeight}, + }; + + parameter_types! { + /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights + /// are available for brave runtime engineers who may want to try this out as default. + pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { + read: 8_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + }; + } + + #[cfg(test)] + mod test_db_weights { + use super::constants::ParityDbWeight as W; + use frame_support::weights::constants; + + /// Checks that all weights exist and have sane values. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn sane() { + // At least 1 µs. + assert!( + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Read weight should be at least 1 µs." + ); + assert!( + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Write weight should be at least 1 µs." + ); + // At most 1 ms. + assert!( + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Read weight should be at most 1 ms." + ); + assert!( + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Write weight should be at most 1 ms." + ); + } + } +} diff --git a/integration-tests/emulated/penpal/src/weights/rocksdb_weights.rs b/integration-tests/emulated/penpal/src/weights/rocksdb_weights.rs new file mode 100644 index 0000000000..3dd817aa6f --- /dev/null +++ b/integration-tests/emulated/penpal/src/weights/rocksdb_weights.rs @@ -0,0 +1,63 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod constants { + use frame_support::{ + parameter_types, + weights::{constants, RuntimeDbWeight}, + }; + + parameter_types! { + /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout + /// the runtime. + pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { + read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + }; + } + + #[cfg(test)] + mod test_db_weights { + use super::constants::RocksDbWeight as W; + use frame_support::weights::constants; + + /// Checks that all weights exist and have sane values. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn sane() { + // At least 1 µs. + assert!( + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Read weight should be at least 1 µs." + ); + assert!( + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Write weight should be at least 1 µs." + ); + // At most 1 ms. + assert!( + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Read weight should be at most 1 ms." + ); + assert!( + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Write weight should be at most 1 ms." + ); + } + } +} diff --git a/integration-tests/emulated/penpal/src/xcm_config.rs b/integration-tests/emulated/penpal/src/xcm_config.rs new file mode 100644 index 0000000000..f4da680711 --- /dev/null +++ b/integration-tests/emulated/penpal/src/xcm_config.rs @@ -0,0 +1,407 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +//! Holds the XCM specific configuration that would otherwise be in lib.rs +//! +//! This configuration dictates how the Penpal chain will communicate with other chains. +//! +//! One of the main uses of the penpal chain will be to be a benefactor of reserve asset transfers +//! with Asset Hub as the reserve. At present no derivative tokens are minted on receipt of a +//! `ReserveAssetTransferDeposited` message but that will but the intension will be to support this +//! soon. +use super::{ + AccountId, AllPalletsWithSystem, AssetId as AssetIdPalletAssets, Assets, Balance, Balances, + ForeignAssets, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, + RuntimeOrigin, WeightToFee, XcmpQueue, +}; +use core::marker::PhantomData; +use frame_support::{ + parameter_types, + traits::{ + fungibles::{self, Balanced, Credit}, + ConstU32, Contains, ContainsPair, Everything, Get, Nothing, + }, + weights::Weight, +}; +use frame_system::EnsureRoot; +use pallet_asset_tx_payment::HandleCredit; +use pallet_assets::Instance1; +use pallet_xcm::XcmPassthrough; +use polkadot_parachain_primitives::primitives::Sibling; +use polkadot_runtime_common::impls::ToAuthor; +use sp_runtime::traits::Zero; +use xcm::latest::prelude::*; +use xcm_builder::{ + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AsPrefixedGeneralIndex, + ConvertedConcreteId, EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, + FungibleAdapter, FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, NoChecking, + ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, StartsWith, TakeWeightCredit, TrailingSetTopicAsId, + UsingComponents, WithComputedOrigin, WithUniqueTopic, +}; +use xcm_executor::{traits::JustTry, XcmExecutor}; + +parameter_types! { + pub const RelayLocation: Location = Location::parent(); + pub const RelayNetwork: Option = None; + pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); + pub UniversalLocation: InteriorLocation = [Parachain(ParachainInfo::parachain_id().into())].into(); +} + +/// 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 = ( + // The parent (Relay-chain) origin converts to the parent `AccountId`. + ParentIsPreset, + // Sibling parachain origins convert to AccountId via the `ParaId::into`. + SiblingParachainConvertsVia, + // Straight up local `AccountId32` origins just alias directly to `AccountId`. + AccountId32Aliases, +); + +/// Means for transacting assets on this chain. +pub type CurrencyTransactor = FungibleAdapter< + // Use this currency: + Balances, + // Use this currency when it is a fungible asset matching the given location or name: + IsConcrete, + // 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, + // We don't track any teleports. + (), +>; + +/// Means for transacting assets besides the native currency on this chain. +pub type FungiblesTransactor = FungiblesAdapter< + // Use this fungibles implementation: + Assets, + // Use this currency when it is a fungible asset matching the given location or name: + ( + ConvertedConcreteId< + AssetIdPalletAssets, + Balance, + AsPrefixedGeneralIndex, + JustTry, + >, + ConvertedConcreteId< + AssetIdPalletAssets, + Balance, + AsPrefixedGeneralIndex< + SystemAssetHubAssetsPalletLocation, + AssetIdPalletAssets, + JustTry, + >, + JustTry, + >, + ), + // 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, + // We only want to allow teleports of known assets. We use non-zero issuance as an indication + // that this asset is known. + LocalMint>, + // The account to use for tracking teleports. + CheckingAccount, +>; + +/// `AssetId/Balance` converter for `TrustBackedAssets` +pub type ForeignAssetsConvertedConcreteId = + assets_common::ForeignAssetsConvertedConcreteId, Balance>; + +/// Means for transacting foreign assets from different global consensus. +pub type ForeignFungiblesTransactor = FungiblesAdapter< + // Use this fungibles implementation: + ForeignAssets, + // Use this currency when it is a fungible asset matching the given location or name: + ForeignAssetsConvertedConcreteId, + // 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, + // We dont need to check teleports here. + NoChecking, + // The account to use for tracking teleports. + CheckingAccount, +>; + +/// Means for transacting assets on this chain. +pub type AssetTransactors = (CurrencyTransactor, ForeignFungiblesTransactor, FungiblesTransactor); + +/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, +/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can +/// biases the kind of local `Origin` it will become. +pub type XcmOriginToTransactDispatchOrigin = ( + // Sovereign account converter; this attempts to derive an `AccountId` from the origin location + // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for + // foreign chains who want to have a local sovereign account on this chain which they control. + SovereignSignedViaLocation, + // Native converter for Relay-chain (Parent) location; will convert to a `Relay` origin when + // recognized. + RelayChainAsNative, + // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when + // recognized. + SiblingParachainAsNative, + // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a + // transaction from the Root origin. + ParentAsSuperuser, + // Native signed account converter; this just converts an `AccountId32` origin into a normal + // `RuntimeOrigin::Signed` origin of the same 32-byte value. + SignedAccountId32AsNative, + // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. + XcmPassthrough, +); + +parameter_types! { + // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. + pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024); + pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; +} + +pub struct ParentOrParentsExecutivePlurality; +impl Contains for ParentOrParentsExecutivePlurality { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, []) | (1, [Plurality { id: BodyId::Executive, .. }])) + } +} + +pub struct CommonGoodAssetsParachain; +impl Contains for CommonGoodAssetsParachain { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, [Parachain(1000)])) + } +} + +pub type Barrier = TrailingSetTopicAsId<( + TakeWeightCredit, + // Expected responses are OK. + AllowKnownQueryResponses, + // Allow XCMs with some computed origins to pass through. + WithComputedOrigin< + ( + // If the message is one that immediately attempts to pay for execution, then + // allow it. + AllowTopLevelPaidExecutionFrom, + // System Assets parachain, parent and its exec plurality get free + // execution + AllowExplicitUnpaidExecutionFrom<( + CommonGoodAssetsParachain, + ParentOrParentsExecutivePlurality, + )>, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, +)>; + +/// Type alias to conveniently refer to `frame_system`'s `Config::AccountId`. +pub type AccountIdOf = ::AccountId; + +/// Asset filter that allows all assets from a certain location matching asset id. +pub struct AssetPrefixFrom(PhantomData<(Prefix, Origin)>); +impl ContainsPair for AssetPrefixFrom +where + Prefix: Get, + Origin: Get, +{ + fn contains(asset: &Asset, origin: &Location) -> bool { + let loc = Origin::get(); + &loc == origin && + matches!(asset, Asset { id: AssetId(asset_loc), fun: Fungible(_a) } + if asset_loc.starts_with(&Prefix::get())) + } +} + +type AssetsFrom = AssetPrefixFrom; + +/// Asset filter that allows native/relay asset if coming from a certain location. +pub struct NativeAssetFrom(PhantomData); +impl> ContainsPair for NativeAssetFrom { + fn contains(asset: &Asset, origin: &Location) -> bool { + let loc = T::get(); + &loc == origin && + matches!(asset, Asset { id: AssetId(asset_loc), fun: Fungible(_a) } + if *asset_loc == Location::from(Parent)) + } +} + +/// Allow checking in assets that have issuance > 0. +pub struct NonZeroIssuance(PhantomData<(AccountId, Assets)>); +impl Contains<>::AssetId> + for NonZeroIssuance +where + Assets: fungibles::Inspect, +{ + fn contains(id: &>::AssetId) -> bool { + !Assets::total_issuance(id.clone()).is_zero() + } +} + +/// A `HandleCredit` implementation that naively transfers the fees to the block author. +/// Will drop and burn the assets in case the transfer fails. +pub struct AssetsToBlockAuthor(PhantomData); +impl HandleCredit, pallet_assets::Pallet> for AssetsToBlockAuthor +where + R: pallet_authorship::Config + pallet_assets::Config, + AccountIdOf: From + Into, +{ + fn handle_credit(credit: Credit, pallet_assets::Pallet>) { + if let Some(author) = pallet_authorship::Pallet::::author() { + // In case of error: Will drop the result triggering the `OnDrop` of the imbalance. + let _ = pallet_assets::Pallet::::resolve(&author, credit); + } + } +} + +// This asset can be added to AH as ForeignAsset and teleported between Penpal and AH +pub const TELEPORTABLE_ASSET_ID: u32 = 2; +parameter_types! { + /// The location that this chain recognizes as the Relay network's Asset Hub. + pub SystemAssetHubLocation: Location = Location::new(1, [Parachain(1000)]); + // ALWAYS ensure that the index in PalletInstance stays up-to-date with + // the Relay Chain's Asset Hub's Assets pallet index + pub SystemAssetHubAssetsPalletLocation: Location = + Location::new(1, [Parachain(1000), PalletInstance(50)]); + pub AssetsPalletLocation: Location = + Location::new(0, [PalletInstance(50)]); + pub CheckingAccount: AccountId = PolkadotXcm::check_account(); + pub LocalTeleportableToAssetHub: Location = Location::new( + 0, + [PalletInstance(50), GeneralIndex(TELEPORTABLE_ASSET_ID.into())] + ); + pub LocalTeleportableToAssetHubV3: xcm::v3::Location = xcm::v3::Location::new( + 0, + [xcm::v3::Junction::PalletInstance(50), xcm::v3::Junction::GeneralIndex(TELEPORTABLE_ASSET_ID.into())] + ); + pub EthereumLocation: Location = Location::new(2, [GlobalConsensus(NetworkId::Ethereum { chain_id: 1 })]); +} + +/// Accepts asset with ID `AssetLocation` and is coming from `Origin` chain. +pub struct AssetFromChain(PhantomData<(AssetLocation, Origin)>); +impl, Origin: Get> ContainsPair + for AssetFromChain +{ + fn contains(asset: &Asset, origin: &Location) -> bool { + log::trace!(target: "xcm::contains", "AssetFromChain asset: {:?}, origin: {:?}", asset, origin); + *origin == Origin::get() && + matches!(asset.id.clone(), AssetId(id) if id == AssetLocation::get()) + } +} + +pub type Reserves = ( + NativeAsset, + AssetsFrom, + NativeAssetFrom, + AssetPrefixFrom, +); +pub type TrustedTeleporters = + (AssetFromChain,); + +pub struct XcmConfig; +impl xcm_executor::Config for XcmConfig { + type RuntimeCall = RuntimeCall; + type XcmSender = XcmRouter; + // How to withdraw and deposit an asset. + type AssetTransactor = AssetTransactors; + type OriginConverter = XcmOriginToTransactDispatchOrigin; + type IsReserve = Reserves; + // no teleport trust established with other chains + type IsTeleporter = TrustedTeleporters; + type UniversalLocation = UniversalLocation; + type Barrier = Barrier; + type Weigher = FixedWeightBounds; + type Trader = + UsingComponents>; + type ResponseHandler = PolkadotXcm; + type AssetTrap = PolkadotXcm; + type AssetClaims = PolkadotXcm; + type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = AllPalletsWithSystem; + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = RuntimeCall; + type SafeCallFilter = Everything; + type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; +} + +/// No local origins on this chain are allowed to dispatch XCM sends/executions. +pub type LocalOriginToLocation = SignedToAccountId32; + +/// The means for routing XCM messages which are not for local execution into the right message +/// queues. +pub type XcmRouter = WithUniqueTopic<( + // Two routers - use UMP to communicate with the relay chain: + cumulus_primitives_utility::ParentAsUmp, + // ..and XCMP to communicate with the sibling chains. + XcmpQueue, +)>; + +impl pallet_xcm::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = EnsureXcmOrigin; + type XcmRouter = XcmRouter; + type ExecuteXcmOrigin = EnsureXcmOrigin; + type XcmExecuteFilter = Nothing; + // ^ Disable dispatchable execute on the XCM pallet. + // Needs to be `Everything` for local testing. + type XcmExecutor = XcmExecutor; + type XcmTeleportFilter = Everything; + type XcmReserveTransferFilter = Everything; + type Weigher = FixedWeightBounds; + type UniversalLocation = UniversalLocation; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + + const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + // ^ Override for AdvertisedXcmVersion default + type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; + type Currency = Balances; + type CurrencyMatcher = (); + type TrustedLockers = (); + type SovereignAccountOf = LocationToAccountId; + type MaxLockers = ConstU32<8>; + type WeightInfo = pallet_xcm::TestWeightInfo; + type AdminOrigin = EnsureRoot; + type MaxRemoteLockConsumers = ConstU32<0>; + type RemoteLockConsumerIdentifier = (); +} + +impl cumulus_pallet_xcm::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type XcmExecutor = XcmExecutor; +} + +/// Simple conversion of `u32` into an `AssetId` for use in benchmarking. +pub struct XcmBenchmarkHelper; +#[cfg(feature = "runtime-benchmarks")] +impl pallet_assets::BenchmarkHelper for XcmBenchmarkHelper { + fn create_asset_id_parameter(id: u32) -> xcm::v3::Location { + xcm::v3::Location::new(1, [xcm::v3::Junction::Parachain(id)]) + } +} From 3b54eae52753f20eb8d8fc0f7cf9f4fa409c5111 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Fri, 1 Mar 2024 11:24:28 +0200 Subject: [PATCH 241/316] polkadot tests --- Cargo.lock | 3 +- .../parachains/testing/penpal/Cargo.toml | 1 + .../bridges/bridge-hub-polkadot/src/lib.rs | 2 +- .../src/tests/snowbridge.rs | 179 +++++++++++++++--- 4 files changed, 157 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 90fd4bc6c5..c67af31b62 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -744,7 +744,8 @@ dependencies = [ "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-tx-payment", + "pallet-asset-conversion", + "pallet-asset-conversion-tx-payment", "pallet-assets", "pallet-aura", "pallet-authorship", diff --git a/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml b/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml index b90772d8aa..51bbd12460 100644 --- a/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml @@ -17,6 +17,7 @@ frame-support = { version = "29.0.0" } parachains-common = { version = "8.0.0" } cumulus-primitives-core = { version = "0.8.0" } emulated-integration-tests-common = { version = "4.0.0" } +# temp crate until EthereumNetwork is extracted from penpal definition penpal-runtime = { package="penpal-runtime-dotsama", path = "../../../../penpal" } # Runtimes diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs index 86c6757bfb..f69ac506c3 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs @@ -61,12 +61,12 @@ pub use kusama_polkadot_system_emulated_network::{ BridgeHubPolkadotPara as BridgeHubPolkadot, BridgeHubPolkadotParaSender as BridgeHubPolkadotSender, PolkadotRelay as Polkadot, }; +pub use parachains_common::{AccountId, Balance}; pub use polkadot_system_emulated_network::{ penpal_emulated_chain::PenpalAParaPallet as PenpalAPallet, BridgeHubPolkadotParaReceiver as BridgeHubPolkadotReceiver, PenpalAPara as PenpalA, PenpalAParaReceiver as PenpalAReceiver, PenpalAParaSender as PenpalASender, }; -pub use parachains_common::{AccountId, Balance}; pub const ASSET_ID: u32 = 1; pub const ASSET_MIN_BALANCE: u128 = 1000; diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index a635436d89..34392841ef 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -14,26 +14,34 @@ // limitations under the License. use crate::*; use bridge_hub_polkadot_runtime::{EthereumBeaconClient, EthereumInboundQueue, RuntimeOrigin}; -use snowbridge_beacon_primitives::CompactExecutionHeader; use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; use frame_support::pallet_prelude::TypeInfo; use hex_literal::hex; use polkadot_system_emulated_network::BridgeHubPolkadotParaSender as BridgeHubPolkadotSender; -use snowbridge_core::outbound::OperatingMode; +use snowbridge_beacon_primitives::CompactExecutionHeader; +use snowbridge_core::{ + inbound::{Log, Message, Proof}, + outbound::OperatingMode, +}; use snowbridge_pallet_inbound_queue_fixtures::{ register_token_with_insufficient_fee::make_register_token_with_infufficient_fee_message, - send_token_to_penpal::make_send_token_to_penpal_message, InboundQueueFixture, }; use snowbridge_pallet_system; -use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; +use snowbridge_router_primitives::inbound::{ + Command, Destination, GlobalConsensusEthereumConvertsFor, MessageV1, VersionedMessage, +}; use sp_core::H256; -use sp_runtime::{ArithmeticError::Underflow, DispatchError::Arithmetic}; +use sp_runtime::{ + ArithmeticError::Underflow, + DispatchError::{Arithmetic, Token}, + TokenError::FundsUnavailable, +}; use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; -use snowbridge_core::inbound::{Log, Message, Proof}; +use frame_support::traits::Currency; -const INITIAL_FUND: u128 = 5_000_000_000 * POLKADOT_ED; +const INITIAL_FUND: u128 = 10_000_000_000_000 * POLKADOT_ED; const CHAIN_ID: u64 = 1; const TREASURY_ACCOUNT: [u8; 32] = hex!("6d6f646c70792f74727372790000000000000000000000000000000000000000"); @@ -208,14 +216,46 @@ fn create_channel() { #[test] fn register_weth_token_from_ethereum_to_asset_hub() { // Fund AssetHub sovereign account so that it can pay execution fees. - BridgeHubPolkadot::fund_para_sovereign(AssetHubPolkadot::para_id().into(), INITIAL_FUND); + //BridgeHubPolkadot::fund_para_sovereign(AssetHubPolkadot::para_id().into(), INITIAL_FUND); + + let asset_hub_sovereign = BridgeHubPolkadot::sovereign_account_id_of(Location::new( + 1, + [Parachain(AssetHubPolkadot::para_id().into())], + )); BridgeHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; - // Construct RegisterToken message and sent to inbound queue - let register_token_message = make_register_token_message(); - send_inbound_message(register_token_message.clone()).unwrap(); + type RuntimeOrigin = ::RuntimeOrigin; + + // Fund AssetHub sovereign account so it can pay execution fees for the asset transfer + ::Balances::force_set_balance( + RuntimeOrigin::root(), + asset_hub_sovereign.clone().into(), + 60_000_000_000_000_000_000, + ) + .unwrap(); + + let minimum_balance = ::Balances::minimum_balance(); + let total_balance = ::Balances::total_balance( + &asset_hub_sovereign.into() + ); + + println!("MINIMUM: {:?}", minimum_balance); + println!("TOTAL: {:?}", total_balance); + + let message_id: H256 = [1; 32].into(); + let message = VersionedMessage::V1(MessageV1 { + chain_id: CHAIN_ID, + command: Command::RegisterToken { + token: WETH.into(), + fee: 40_000_000_000, + }, + }); + // Convert the message to XCM + let (xcm, _) = EthereumInboundQueue::do_convert(message_id, message).unwrap(); + // Send the XCM + let _ = EthereumInboundQueue::send_xcm(xcm, AssetHubPolkadot::para_id()).unwrap(); assert_expected_events!( BridgeHubPolkadot, @@ -245,8 +285,6 @@ fn send_token_from_ethereum_to_penpal() { 1, [Parachain(AssetHubPolkadot::para_id().into())], )); - // Fund AssetHub sovereign account so it can pay execution fees for the asset transfer - BridgeHubPolkadot::fund_accounts(vec![(asset_hub_sovereign.clone(), INITIAL_FUND)]); // Fund PenPal sender and receiver PenpalA::fund_accounts(vec![ @@ -273,21 +311,58 @@ fn send_token_from_ethereum_to_penpal() { assert_ok!(::ForeignAssets::create( ::RuntimeOrigin::signed(PenpalASender::get()), weth_asset_id, - asset_hub_sovereign.into(), + asset_hub_sovereign.clone().into(), 1000, )); assert!(::ForeignAssets::asset_exists(weth_asset_id)); }); + AssetHubPolkadot::execute_with(|| { + assert_ok!(::ForeignAssets::force_create( + ::RuntimeOrigin::root(), + weth_asset_id, + asset_hub_sovereign.clone().into(), + true, + 1000, + )); + + assert!(::ForeignAssets::asset_exists( + weth_asset_id + )); + }); + BridgeHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; - // Construct RegisterToken message and sent to inbound queue - send_inbound_message(make_register_token_message()).unwrap(); + type RuntimeOrigin = ::RuntimeOrigin; - // Construct SendToken message and sent to inbound queue - send_inbound_message(make_send_token_to_penpal_message()).unwrap(); + // Fund AssetHub sovereign account so it can pay execution fees for the asset transfer + ::Balances::force_set_balance( + RuntimeOrigin::root(), + asset_hub_sovereign.clone().into(), + INITIAL_FUND, + ) + .unwrap(); + + let message_id: H256 = [1; 32].into(); + let message = VersionedMessage::V1(MessageV1 { + chain_id: CHAIN_ID, + command: Command::SendToken { + token: WETH.into(), + destination: Destination::ForeignAccountId32 { + para_id: PenpalA::para_id().into(), + id: PenpalAReceiver::get().into(), + fee: 40_000_000_000, + }, + amount: 1_000_000, + fee: 40_000_000_000, + }, + }); + // Convert the message to XCM + let (xcm, _) = EthereumInboundQueue::do_convert(message_id, message).unwrap(); + // Send the XCM + let _ = EthereumInboundQueue::send_xcm(xcm, AssetHubPolkadot::para_id()).unwrap(); assert_expected_events!( BridgeHubPolkadot, @@ -330,6 +405,31 @@ fn send_token_from_ethereum_to_asset_hub() { // Fund ethereum sovereign on AssetHub AssetHubPolkadot::fund_accounts(vec![(AssetHubPolkadotReceiver::get(), INITIAL_FUND)]); + let asset_hub_sovereign = BridgeHubPolkadot::sovereign_account_id_of(Location::new( + 1, + [Parachain(AssetHubPolkadot::para_id().into())], + )); + + // The Weth asset location, identified by the contract address on Ethereum + let weth_asset_location: Location = + (Parent, Parent, EthereumNetwork::get(), AccountKey20 { network: None, key: WETH }).into(); + // Converts the Weth asset location into an asset ID + let weth_asset_id: v3::Location = weth_asset_location.try_into().unwrap(); + + AssetHubPolkadot::execute_with(|| { + assert_ok!(::ForeignAssets::force_create( + ::RuntimeOrigin::root(), + weth_asset_id, + asset_hub_sovereign.clone().into(), + true, + 1000, + )); + + assert!(::ForeignAssets::asset_exists( + weth_asset_id + )); + }); + BridgeHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; @@ -385,6 +485,31 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { const WETH_AMOUNT: u128 = 1_000_000_000; + let asset_hub_sovereign = BridgeHubPolkadot::sovereign_account_id_of(Location::new( + 1, + [Parachain(AssetHubPolkadot::para_id().into())], + )); + + // The Weth asset location, identified by the contract address on Ethereum + let weth_asset_location: Location = + (Parent, Parent, EthereumNetwork::get(), AccountKey20 { network: None, key: WETH }).into(); + // Converts the Weth asset location into an asset ID + let weth_asset_id: v3::Location = weth_asset_location.try_into().unwrap(); + + AssetHubPolkadot::execute_with(|| { + assert_ok!(::ForeignAssets::force_create( + ::RuntimeOrigin::root(), + weth_asset_id, + asset_hub_sovereign.clone().into(), + true, + 1000, + )); + + assert!(::ForeignAssets::asset_exists( + weth_asset_id + )); + }); + BridgeHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; @@ -444,9 +569,10 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { [AccountKey20 { network: None, key: ETHEREUM_DESTINATION_ADDRESS.into() }], )); - let free_balance_before = ::Balances::free_balance( - AssetHubPolkadotReceiver::get(), - ); + let free_balance_before = + ::Balances::free_balance( + AssetHubPolkadotReceiver::get(), + ); // Send the Weth back to Ethereum ::PolkadotXcm::reserve_transfer_assets( RuntimeOrigin::signed(AssetHubPolkadotReceiver::get()), @@ -456,9 +582,10 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { 0, ) .unwrap(); - let free_balance_after = ::Balances::free_balance( - AssetHubPolkadotReceiver::get(), - ); + let free_balance_after = + ::Balances::free_balance( + AssetHubPolkadotReceiver::get(), + ); // Assert at least DefaultBridgeHubEthereumBaseFee charged from the sender let free_balance_diff = free_balance_before - free_balance_after; assert!(free_balance_diff > DefaultBridgeHubEthereumBaseFee::get()); @@ -530,10 +657,10 @@ fn register_weth_token_in_asset_hub_fail_for_insufficient_fee() { #[test] fn send_token_from_ethereum_to_asset_hub_fail_for_insufficient_fund() { // Insufficient fund - BridgeHubKusama::fund_para_sovereign(AssetHubKusama::para_id().into(), 1_000); + BridgeHubPolkadot::fund_para_sovereign(AssetHubPolkadot::para_id().into(), 1_000); BridgeHubPolkadot::execute_with(|| { - assert_err!(send_inbound_message(make_register_token_message()), Arithmetic(Underflow)); + assert_err!(send_inbound_message(make_register_token_message()), Token(FundsUnavailable)); }); } From 3fed2c774f4d683557051545efbc2b53a4c305e7 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Fri, 1 Mar 2024 11:28:05 +0200 Subject: [PATCH 242/316] fmt and update lock file --- Cargo.lock | 3 +-- .../bridge-hub-polkadot/src/tests/snowbridge.rs | 15 ++++++--------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b3e3f52723..56b865669b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -744,8 +744,7 @@ dependencies = [ "hex-literal", "kusama-runtime-constants", "log", - "pallet-asset-conversion", - "pallet-asset-conversion-tx-payment", + "pallet-asset-tx-payment", "pallet-assets", "pallet-aura", "pallet-authorship", diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index 34392841ef..c1268f68ab 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -16,7 +16,7 @@ use crate::*; use bridge_hub_polkadot_runtime::{EthereumBeaconClient, EthereumInboundQueue, RuntimeOrigin}; use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; -use frame_support::pallet_prelude::TypeInfo; +use frame_support::{pallet_prelude::TypeInfo, traits::Currency}; use hex_literal::hex; use polkadot_system_emulated_network::BridgeHubPolkadotParaSender as BridgeHubPolkadotSender; use snowbridge_beacon_primitives::CompactExecutionHeader; @@ -39,7 +39,6 @@ use sp_runtime::{ TokenError::FundsUnavailable, }; use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; -use frame_support::traits::Currency; const INITIAL_FUND: u128 = 10_000_000_000_000 * POLKADOT_ED; const CHAIN_ID: u64 = 1; @@ -234,11 +233,12 @@ fn register_weth_token_from_ethereum_to_asset_hub() { asset_hub_sovereign.clone().into(), 60_000_000_000_000_000_000, ) - .unwrap(); + .unwrap(); - let minimum_balance = ::Balances::minimum_balance(); + let minimum_balance = + ::Balances::minimum_balance(); let total_balance = ::Balances::total_balance( - &asset_hub_sovereign.into() + &asset_hub_sovereign.into(), ); println!("MINIMUM: {:?}", minimum_balance); @@ -247,10 +247,7 @@ fn register_weth_token_from_ethereum_to_asset_hub() { let message_id: H256 = [1; 32].into(); let message = VersionedMessage::V1(MessageV1 { chain_id: CHAIN_ID, - command: Command::RegisterToken { - token: WETH.into(), - fee: 40_000_000_000, - }, + command: Command::RegisterToken { token: WETH.into(), fee: 40_000_000_000 }, }); // Convert the message to XCM let (xcm, _) = EthereumInboundQueue::do_convert(message_id, message).unwrap(); From 817f944fbf3ffb9fe582e57aa897c3b2dcd4f616 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 1 Mar 2024 10:29:11 +0100 Subject: [PATCH 243/316] Bump `spec_version` to `1_002_000` --- system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs | 4 ++-- system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs | 2 +- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 2 +- system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 2 +- system-parachains/collectives/collectives-polkadot/src/lib.rs | 2 +- system-parachains/encointer/src/lib.rs | 2 +- system-parachains/gluttons/glutton-kusama/src/lib.rs | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 44f3bc19b4..7c5ded40cd 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -110,7 +110,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemine"), impl_name: create_runtime_str!("statemine"), authoring_version: 1, - spec_version: 1_001_001, + spec_version: 1_002_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 14, @@ -126,7 +126,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemine"), impl_name: create_runtime_str!("statemine"), authoring_version: 1, - spec_version: 1_001_001, + spec_version: 1_002_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 14, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 7897012857..539bb55fd2 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -140,7 +140,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemint"), impl_name: create_runtime_str!("statemint"), authoring_version: 1, - spec_version: 1_001_001, + spec_version: 1_002_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 14, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 773f242dd0..19d181363a 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -151,7 +151,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("bridge-hub-kusama"), impl_name: create_runtime_str!("bridge-hub-kusama"), authoring_version: 1, - spec_version: 1_001_000, + spec_version: 1_002_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 4, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 7ea0b32089..6ccbd55d46 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -152,7 +152,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("bridge-hub-polkadot"), impl_name: create_runtime_str!("bridge-hub-polkadot"), authoring_version: 1, - spec_version: 1_001_000, + spec_version: 1_002_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 3, diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 05e9f550c6..b87991bd42 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -113,7 +113,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("collectives"), impl_name: create_runtime_str!("collectives"), authoring_version: 1, - spec_version: 1_001_000, + spec_version: 1_002_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 6, diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index f2c82fc325..87e3310e76 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -122,7 +122,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("encointer-parachain"), impl_name: create_runtime_str!("encointer-parachain"), authoring_version: 1, - spec_version: 1_001_000, + spec_version: 1_002_000, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 3, diff --git a/system-parachains/gluttons/glutton-kusama/src/lib.rs b/system-parachains/gluttons/glutton-kusama/src/lib.rs index 6fa8bfe0b5..040ff6ea0a 100644 --- a/system-parachains/gluttons/glutton-kusama/src/lib.rs +++ b/system-parachains/gluttons/glutton-kusama/src/lib.rs @@ -89,7 +89,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("glutton"), impl_name: create_runtime_str!("glutton"), authoring_version: 1, - spec_version: 1_001_000, + spec_version: 1_002_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, From a51907128c330a4d1adc13180b55b2c96b32ab71 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Fri, 1 Mar 2024 13:37:43 +0200 Subject: [PATCH 244/316] fix tests --- .../src/tests/snowbridge.rs | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index c1268f68ab..2bca164e45 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -28,16 +28,11 @@ use snowbridge_pallet_inbound_queue_fixtures::{ register_token_with_insufficient_fee::make_register_token_with_infufficient_fee_message, InboundQueueFixture, }; -use snowbridge_pallet_system; use snowbridge_router_primitives::inbound::{ Command, Destination, GlobalConsensusEthereumConvertsFor, MessageV1, VersionedMessage, }; use sp_core::H256; -use sp_runtime::{ - ArithmeticError::Underflow, - DispatchError::{Arithmetic, Token}, - TokenError::FundsUnavailable, -}; +use sp_runtime::{DispatchError::Token, TokenError::FundsUnavailable}; use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; const INITIAL_FUND: u128 = 10_000_000_000_000 * POLKADOT_ED; @@ -214,14 +209,19 @@ fn create_channel() { /// Tests the registering of a token as an asset on AssetHub. #[test] fn register_weth_token_from_ethereum_to_asset_hub() { - // Fund AssetHub sovereign account so that it can pay execution fees. - //BridgeHubPolkadot::fund_para_sovereign(AssetHubPolkadot::para_id().into(), INITIAL_FUND); - let asset_hub_sovereign = BridgeHubPolkadot::sovereign_account_id_of(Location::new( 1, [Parachain(AssetHubPolkadot::para_id().into())], )); + let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); + + // Fund ethereum sovereign on AssetHub + let ethereum_sovereign: AccountId = + GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location) + .unwrap(); + AssetHubPolkadot::fund_accounts(vec![(ethereum_sovereign.clone(), INITIAL_FUND)]); + BridgeHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; @@ -477,7 +477,10 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { XCM_VERSION, ); - BridgeHubPolkadot::fund_accounts(vec![(assethub_sovereign.clone(), INITIAL_FUND)]); + BridgeHubPolkadot::fund_accounts(vec![ + (assethub_sovereign.clone(), INITIAL_FUND), + (TREASURY_ACCOUNT.into(), INITIAL_FUND), + ]); AssetHubPolkadot::fund_accounts(vec![(AssetHubPolkadotReceiver::get(), INITIAL_FUND)]); const WETH_AMOUNT: u128 = 1_000_000_000; @@ -604,7 +607,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { events.iter().any(|event| matches!( event, RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) - if *who == TREASURY_ACCOUNT.into() && *amount == 169033333 + if *who == TREASURY_ACCOUNT.into() && *amount == 50710000 )), "Snowbridge sovereign takes local fee." ); @@ -613,7 +616,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { events.iter().any(|event| matches!( event, RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) - if *who == assethub_sovereign && *amount == 2680000000000, + if *who == assethub_sovereign && *amount == 26800000000, )), "AssetHub sovereign takes remote fee." ); From 0a372942ed1544cf27d7141bd02e2ef74c38ef5a Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 4 Mar 2024 13:45:52 +0200 Subject: [PATCH 245/316] fix polkadot penpal test --- Cargo.lock | 1 + .../kusama-polkadot-system/src/lib.rs | 3 +- .../bridges/bridge-hub-polkadot/Cargo.toml | 1 + .../bridges/bridge-hub-polkadot/src/lib.rs | 6 +- .../src/tests/snowbridge.rs | 62 ++++++++++++++----- 5 files changed, 55 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 56b865669b..31e0137e4e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1658,6 +1658,7 @@ dependencies = [ "pallet-xcm", "parachains-common", "parity-scale-codec", + "polkadot-runtime-constants", "polkadot-system-emulated-network", "scale-info", "snowbridge-beacon-primitives", diff --git a/integration-tests/emulated/networks/kusama-polkadot-system/src/lib.rs b/integration-tests/emulated/networks/kusama-polkadot-system/src/lib.rs index dbdb453718..247ace6b3e 100644 --- a/integration-tests/emulated/networks/kusama-polkadot-system/src/lib.rs +++ b/integration-tests/emulated/networks/kusama-polkadot-system/src/lib.rs @@ -26,7 +26,7 @@ use asset_hub_polkadot_emulated_chain::AssetHubPolkadot; use bridge_hub_kusama_emulated_chain::BridgeHubKusama; use bridge_hub_polkadot_emulated_chain::BridgeHubPolkadot; use kusama_emulated_chain::Kusama; -use penpal_emulated_chain::PenpalA; +use penpal_emulated_chain::{PenpalA, PenpalB}; use polkadot_emulated_chain::Polkadot; // Cumulus @@ -55,6 +55,7 @@ decl_test_networks! { parachains = vec![ AssetHubPolkadot, BridgeHubPolkadot, + PenpalB, ], bridge = PolkadotKusamaMockBridge }, diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml index 29749645ab..22342143e2 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml @@ -41,6 +41,7 @@ integration-tests-helpers = { path = "../../../helpers" } kusama-polkadot-system-emulated-network = { path = "../../../networks/kusama-polkadot-system" } polkadot-system-emulated-network = { path = "../../../networks/polkadot-system" } system-parachains-constants = { path = "../../../../../system-parachains/constants" } +polkadot-runtime-constants = { path = "../../../../../relay/polkadot/constants" } # Snowbridge snowbridge-beacon-primitives = { default-features = false , version = "0.1.0" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs index f69ac506c3..1093b256e1 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs @@ -63,9 +63,9 @@ pub use kusama_polkadot_system_emulated_network::{ }; pub use parachains_common::{AccountId, Balance}; pub use polkadot_system_emulated_network::{ - penpal_emulated_chain::PenpalAParaPallet as PenpalAPallet, - BridgeHubPolkadotParaReceiver as BridgeHubPolkadotReceiver, PenpalAPara as PenpalA, - PenpalAParaReceiver as PenpalAReceiver, PenpalAParaSender as PenpalASender, + penpal_emulated_chain::PenpalBParaPallet as PenpalBPallet, + BridgeHubPolkadotParaReceiver as BridgeHubPolkadotReceiver, PenpalBPara as PenpalB, + PenpalBParaReceiver as PenpalBReceiver, PenpalBParaSender as PenpalBSender, }; pub const ASSET_ID: u32 = 1; diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index 2bca164e45..8505afeed9 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -15,6 +15,7 @@ use crate::*; use bridge_hub_polkadot_runtime::{EthereumBeaconClient, EthereumInboundQueue, RuntimeOrigin}; use codec::{Decode, Encode}; +use emulated_integration_tests_common::impl_hrmp_channels_helpers_for_relay_chain; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; use frame_support::{pallet_prelude::TypeInfo, traits::Currency}; use hex_literal::hex; @@ -284,17 +285,28 @@ fn send_token_from_ethereum_to_penpal() { )); // Fund PenPal sender and receiver - PenpalA::fund_accounts(vec![ - (PenpalAReceiver::get(), INITIAL_FUND), - (PenpalASender::get(), INITIAL_FUND), - ]); + /*PenpalB::fund_accounts(vec![ + (PenpalBReceiver::get(), INITIAL_FUND), + (PenpalBSender::get(), INITIAL_FUND), + ]);*/ + + println!("CHOOOOP"); + + /*emulated_integration_tests_common::include_penpal_create_foreign_asset_on_asset_hub!( + PenpalB, + AssetHubPolkadot, + POLKADOT_ED, + polkadot_runtime_constants::fee::WeightToFee + );*/ + + //impl_hrmp_channels_helpers_for_relay_chain!(Polkadot); // The Weth asset location, identified by the contract address on Ethereum let weth_asset_location: Location = (Parent, Parent, EthereumNetwork::get(), AccountKey20 { network: None, key: WETH }).into(); // Converts the Weth asset location into an asset ID let weth_asset_id: v3::Location = weth_asset_location.try_into().unwrap(); - + let ah_as_seen_by_penpal = PenpalB::sibling_location_of(AssetHubPolkadot::para_id()); let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); // Fund ethereum sovereign on AssetHub @@ -303,18 +315,32 @@ fn send_token_from_ethereum_to_penpal() { .unwrap(); AssetHubPolkadot::fund_accounts(vec![(ethereum_sovereign.clone(), INITIAL_FUND)]); + /*penpal_create_foreign_asset_on_asset_hub( + 1, + weth_asset_id, + ah_as_seen_by_penpal, + true, + asset_hub_sovereign.clone().into(), + 1000 + );*/ + + println!("CREATED ASSET"); + // Create asset on the Penpal parachain. - PenpalA::execute_with(|| { - assert_ok!(::ForeignAssets::create( - ::RuntimeOrigin::signed(PenpalASender::get()), + PenpalB::execute_with(|| { + assert_ok!(::ForeignAssets::force_create( + ::RuntimeOrigin::root(), weth_asset_id, asset_hub_sovereign.clone().into(), + true, 1000, )); - assert!(::ForeignAssets::asset_exists(weth_asset_id)); + assert!(::ForeignAssets::asset_exists(weth_asset_id)); }); + println!("CREATED ASSET 2"); + AssetHubPolkadot::execute_with(|| { assert_ok!(::ForeignAssets::force_create( ::RuntimeOrigin::root(), @@ -329,6 +355,13 @@ fn send_token_from_ethereum_to_penpal() { )); }); + println!("CREATED ASSET 3"); + + Polkadot::execute_with(|| { + //::init_open_channel_call(PenpalB::para_id().into(), 900000, 90000); + }); + + BridgeHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; @@ -348,8 +381,8 @@ fn send_token_from_ethereum_to_penpal() { command: Command::SendToken { token: WETH.into(), destination: Destination::ForeignAccountId32 { - para_id: PenpalA::para_id().into(), - id: PenpalAReceiver::get().into(), + para_id: PenpalB::para_id().into(), + id: PenpalBReceiver::get().into(), fee: 40_000_000_000, }, amount: 1_000_000, @@ -361,6 +394,7 @@ fn send_token_from_ethereum_to_penpal() { // Send the XCM let _ = EthereumInboundQueue::send_xcm(xcm, AssetHubPolkadot::para_id()).unwrap(); + println!("SEND 1"); assert_expected_events!( BridgeHubPolkadot, vec![ @@ -381,11 +415,11 @@ fn send_token_from_ethereum_to_penpal() { ); }); - PenpalA::execute_with(|| { - type RuntimeEvent = ::RuntimeEvent; + PenpalB::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; // Check that the assets were issued on PenPal assert_expected_events!( - PenpalA, + PenpalB, vec![ RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { .. }) => {}, ] From 9347501b97cc8b0df61eda3bbf2639165ab51ede Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 4 Mar 2024 14:06:33 +0200 Subject: [PATCH 246/316] cleanup --- Cargo.lock | 1 - .../bridges/bridge-hub-polkadot/Cargo.toml | 1 - .../src/tests/snowbridge.rs | 39 ------------------- 3 files changed, 41 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4f8c74e7fe..1c647b4a5f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1660,7 +1660,6 @@ dependencies = [ "pallet-xcm", "parachains-common", "parity-scale-codec", - "polkadot-runtime-constants", "polkadot-system-emulated-network", "scale-info", "snowbridge-beacon-primitives", diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml index 22342143e2..29749645ab 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml @@ -41,7 +41,6 @@ integration-tests-helpers = { path = "../../../helpers" } kusama-polkadot-system-emulated-network = { path = "../../../networks/kusama-polkadot-system" } polkadot-system-emulated-network = { path = "../../../networks/polkadot-system" } system-parachains-constants = { path = "../../../../../system-parachains/constants" } -polkadot-runtime-constants = { path = "../../../../../relay/polkadot/constants" } # Snowbridge snowbridge-beacon-primitives = { default-features = false , version = "0.1.0" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index 8505afeed9..c6b8d3309f 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -15,7 +15,6 @@ use crate::*; use bridge_hub_polkadot_runtime::{EthereumBeaconClient, EthereumInboundQueue, RuntimeOrigin}; use codec::{Decode, Encode}; -use emulated_integration_tests_common::impl_hrmp_channels_helpers_for_relay_chain; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; use frame_support::{pallet_prelude::TypeInfo, traits::Currency}; use hex_literal::hex; @@ -284,23 +283,6 @@ fn send_token_from_ethereum_to_penpal() { [Parachain(AssetHubPolkadot::para_id().into())], )); - // Fund PenPal sender and receiver - /*PenpalB::fund_accounts(vec![ - (PenpalBReceiver::get(), INITIAL_FUND), - (PenpalBSender::get(), INITIAL_FUND), - ]);*/ - - println!("CHOOOOP"); - - /*emulated_integration_tests_common::include_penpal_create_foreign_asset_on_asset_hub!( - PenpalB, - AssetHubPolkadot, - POLKADOT_ED, - polkadot_runtime_constants::fee::WeightToFee - );*/ - - //impl_hrmp_channels_helpers_for_relay_chain!(Polkadot); - // The Weth asset location, identified by the contract address on Ethereum let weth_asset_location: Location = (Parent, Parent, EthereumNetwork::get(), AccountKey20 { network: None, key: WETH }).into(); @@ -315,17 +297,6 @@ fn send_token_from_ethereum_to_penpal() { .unwrap(); AssetHubPolkadot::fund_accounts(vec![(ethereum_sovereign.clone(), INITIAL_FUND)]); - /*penpal_create_foreign_asset_on_asset_hub( - 1, - weth_asset_id, - ah_as_seen_by_penpal, - true, - asset_hub_sovereign.clone().into(), - 1000 - );*/ - - println!("CREATED ASSET"); - // Create asset on the Penpal parachain. PenpalB::execute_with(|| { assert_ok!(::ForeignAssets::force_create( @@ -339,8 +310,6 @@ fn send_token_from_ethereum_to_penpal() { assert!(::ForeignAssets::asset_exists(weth_asset_id)); }); - println!("CREATED ASSET 2"); - AssetHubPolkadot::execute_with(|| { assert_ok!(::ForeignAssets::force_create( ::RuntimeOrigin::root(), @@ -355,13 +324,6 @@ fn send_token_from_ethereum_to_penpal() { )); }); - println!("CREATED ASSET 3"); - - Polkadot::execute_with(|| { - //::init_open_channel_call(PenpalB::para_id().into(), 900000, 90000); - }); - - BridgeHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; @@ -394,7 +356,6 @@ fn send_token_from_ethereum_to_penpal() { // Send the XCM let _ = EthereumInboundQueue::send_xcm(xcm, AssetHubPolkadot::para_id()).unwrap(); - println!("SEND 1"); assert_expected_events!( BridgeHubPolkadot, vec![ From 8c8c34809e889d5425903de4e48f9278ae321f74 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 4 Mar 2024 14:36:24 +0200 Subject: [PATCH 247/316] cleanup and clippy --- system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml | 3 --- .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 3 +-- system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml | 6 ++---- .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 3 +-- .../bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs | 2 +- 5 files changed, 5 insertions(+), 12 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index 7fcfaae577..d716a0b87a 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -146,8 +146,6 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", - "cumulus-primitives-core/runtime-benchmarks", - "parachains-common/runtime-benchmarks" ] try-runtime = [ "cumulus-pallet-aura-ext/try-runtime", @@ -257,7 +255,6 @@ std = [ "xcm-builder/std", "xcm-executor/std", "xcm/std", - "primitive-types/std" ] experimental = [ "pallet-aura/experimental" ] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 7c9a35bd73..229afe56ca 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -838,8 +838,7 @@ pub mod bridging { } }, ); - assert!(alias.is_some(), "we expect here BridgeHubKusama to Polkadot mapping at least"); - Some(alias.unwrap()) + Some(alias.expect("we expect here BridgeHubKusama to Polkadot mapping at least")) } } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index de39d5d38f..dfa21dc87e 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -129,12 +129,10 @@ runtime-benchmarks = [ "pallet-xcm/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", + "snowbridge-router-primitives/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", - "cumulus-primitives-core/runtime-benchmarks", - "parachains-common/runtime-benchmarks", - "snowbridge-router-primitives/runtime-benchmarks" ] try-runtime = [ "cumulus-pallet-aura-ext/try-runtime", @@ -218,6 +216,7 @@ std = [ "polkadot-runtime-common/std", "polkadot-runtime-constants/std", "scale-info/std", + "snowbridge-router-primitives/std", "sp-api/std", "sp-block-builder/std", "sp-consensus-aura/std", @@ -237,7 +236,6 @@ std = [ "xcm-builder/std", "xcm-executor/std", "xcm/std", - "snowbridge-router-primitives/std" ] experimental = [ "pallet-aura/experimental" ] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 06d5072792..d6eeddd5c1 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -787,8 +787,7 @@ pub mod bridging { false => None, } }); - assert!(alias.is_some(), "we expect here BridgeHubPolkadot to Kusama mapping at least"); - Some(alias.unwrap()) + Some(alias.expect("we expect here BridgeHubPolkadot to Kusama mapping at least")) } } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs index 058b88f5bf..f3703f7a02 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs @@ -215,7 +215,7 @@ fn construct_extrinsic( ), frame_system::CheckWeight::::new(), pallet_transaction_payment::ChargeTransactionPayment::::from(0), - BridgeRejectObsoleteHeadersAndMessages::default(), + BridgeRejectObsoleteHeadersAndMessages, (RefundBridgeHubPolkadotMessages::default()), ); let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); From 48270b3d4ec3d80274ac7707bf42687cdcc28fbe Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 4 Mar 2024 15:25:00 +0200 Subject: [PATCH 248/316] fix asset hub tests --- .../parachains/testing/penpal/Cargo.toml | 1 + integration-tests/emulated/penpal/src/lib.rs | 2 +- .../penpal/src/weights/paritydb_weights.rs | 12 +++---- .../emulated/penpal/src/xcm_config.rs | 36 ++++++++++--------- 4 files changed, 27 insertions(+), 24 deletions(-) diff --git a/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml b/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml index 51bbd12460..8b667451c0 100644 --- a/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml @@ -19,6 +19,7 @@ cumulus-primitives-core = { version = "0.8.0" } emulated-integration-tests-common = { version = "4.0.0" } # temp crate until EthereumNetwork is extracted from penpal definition penpal-runtime = { package="penpal-runtime-dotsama", path = "../../../../penpal" } +#penpal-runtime = { version = "0.15.0" } # Runtimes kusama-emulated-chain = { path = "../../../relays/kusama" } diff --git a/integration-tests/emulated/penpal/src/lib.rs b/integration-tests/emulated/penpal/src/lib.rs index bf8dcbc24c..6a0e45497b 100644 --- a/integration-tests/emulated/penpal/src/lib.rs +++ b/integration-tests/emulated/penpal/src/lib.rs @@ -128,7 +128,7 @@ pub type SignedExtra = ( /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = - generic::UncheckedExtrinsic; +generic::UncheckedExtrinsic; pub type Migrations = ( pallet_balances::migration::MigrateToTrackInactive, diff --git a/integration-tests/emulated/penpal/src/weights/paritydb_weights.rs b/integration-tests/emulated/penpal/src/weights/paritydb_weights.rs index 2567970383..3dd817aa6f 100644 --- a/integration-tests/emulated/penpal/src/weights/paritydb_weights.rs +++ b/integration-tests/emulated/penpal/src/weights/paritydb_weights.rs @@ -22,17 +22,17 @@ pub mod constants { }; parameter_types! { - /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights - /// are available for brave runtime engineers who may want to try this out as default. - pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 8_000 * constants::WEIGHT_REF_TIME_PER_NANOS, - write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout + /// the runtime. + pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { + read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS, }; } #[cfg(test)] mod test_db_weights { - use super::constants::ParityDbWeight as W; + use super::constants::RocksDbWeight as W; use frame_support::weights::constants; /// Checks that all weights exist and have sane values. diff --git a/integration-tests/emulated/penpal/src/xcm_config.rs b/integration-tests/emulated/penpal/src/xcm_config.rs index f4da680711..02d712bf49 100644 --- a/integration-tests/emulated/penpal/src/xcm_config.rs +++ b/integration-tests/emulated/penpal/src/xcm_config.rs @@ -44,11 +44,12 @@ use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_common::impls::ToAuthor; use sp_runtime::traits::Zero; use xcm::latest::prelude::*; +#[allow(deprecated)] use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, - FungibleAdapter, FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, NoChecking, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, + FrameTransactionalProcessor, FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, StartsWith, TakeWeightCredit, TrailingSetTopicAsId, @@ -76,7 +77,8 @@ pub type LocationToAccountId = ( ); /// Means for transacting assets on this chain. -pub type CurrencyTransactor = FungibleAdapter< +#[allow(deprecated)] +pub type CurrencyTransactor = CurrencyAdapter< // Use this currency: Balances, // Use this currency when it is a fungible asset matching the given location or name: @@ -125,7 +127,7 @@ pub type FungiblesTransactor = FungiblesAdapter< /// `AssetId/Balance` converter for `TrustBackedAssets` pub type ForeignAssetsConvertedConcreteId = - assets_common::ForeignAssetsConvertedConcreteId, Balance>; +assets_common::ForeignAssetsConvertedConcreteId, Balance>; /// Means for transacting foreign assets from different global consensus. pub type ForeignFungiblesTransactor = FungiblesAdapter< @@ -133,7 +135,7 @@ pub type ForeignFungiblesTransactor = FungiblesAdapter< ForeignAssets, // Use this currency when it is a fungible asset matching the given location or name: ForeignAssetsConvertedConcreteId, - // Convert an XCM Location into a local account id: + // Convert an XCM MultiLocation into a local account id: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, @@ -221,9 +223,9 @@ pub type AccountIdOf = ::AccountId; /// Asset filter that allows all assets from a certain location matching asset id. pub struct AssetPrefixFrom(PhantomData<(Prefix, Origin)>); impl ContainsPair for AssetPrefixFrom -where - Prefix: Get, - Origin: Get, + where + Prefix: Get, + Origin: Get, { fn contains(asset: &Asset, origin: &Location) -> bool { let loc = Origin::get(); @@ -249,9 +251,9 @@ impl> ContainsPair for NativeAssetFrom { /// Allow checking in assets that have issuance > 0. pub struct NonZeroIssuance(PhantomData<(AccountId, Assets)>); impl Contains<>::AssetId> - for NonZeroIssuance -where - Assets: fungibles::Inspect, +for NonZeroIssuance + where + Assets: fungibles::Inspect, { fn contains(id: &>::AssetId) -> bool { !Assets::total_issuance(id.clone()).is_zero() @@ -262,9 +264,9 @@ where /// Will drop and burn the assets in case the transfer fails. pub struct AssetsToBlockAuthor(PhantomData); impl HandleCredit, pallet_assets::Pallet> for AssetsToBlockAuthor -where - R: pallet_authorship::Config + pallet_assets::Config, - AccountIdOf: From + Into, + where + R: pallet_authorship::Config + pallet_assets::Config, + AccountIdOf: From + Into, { fn handle_credit(credit: Credit, pallet_assets::Pallet>) { if let Some(author) = pallet_authorship::Pallet::::author() { @@ -300,7 +302,7 @@ parameter_types! { /// Accepts asset with ID `AssetLocation` and is coming from `Origin` chain. pub struct AssetFromChain(PhantomData<(AssetLocation, Origin)>); impl, Origin: Get> ContainsPair - for AssetFromChain +for AssetFromChain { fn contains(asset: &Asset, origin: &Location) -> bool { log::trace!(target: "xcm::contains", "AssetFromChain asset: {:?}, origin: {:?}", asset, origin); @@ -316,7 +318,7 @@ pub type Reserves = ( AssetPrefixFrom, ); pub type TrustedTeleporters = - (AssetFromChain,); +(AssetFromChain,); pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { @@ -332,7 +334,7 @@ impl xcm_executor::Config for XcmConfig { type Barrier = Barrier; type Weigher = FixedWeightBounds; type Trader = - UsingComponents>; + UsingComponents>; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; From 820153cb11bcfffccaedf2d708021235c28e0952 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 4 Mar 2024 15:30:17 +0200 Subject: [PATCH 249/316] fmt --- integration-tests/emulated/penpal/src/lib.rs | 2 +- .../emulated/penpal/src/xcm_config.rs | 26 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/integration-tests/emulated/penpal/src/lib.rs b/integration-tests/emulated/penpal/src/lib.rs index 6a0e45497b..bf8dcbc24c 100644 --- a/integration-tests/emulated/penpal/src/lib.rs +++ b/integration-tests/emulated/penpal/src/lib.rs @@ -128,7 +128,7 @@ pub type SignedExtra = ( /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = -generic::UncheckedExtrinsic; + generic::UncheckedExtrinsic; pub type Migrations = ( pallet_balances::migration::MigrateToTrackInactive, diff --git a/integration-tests/emulated/penpal/src/xcm_config.rs b/integration-tests/emulated/penpal/src/xcm_config.rs index 02d712bf49..b9cf0a1892 100644 --- a/integration-tests/emulated/penpal/src/xcm_config.rs +++ b/integration-tests/emulated/penpal/src/xcm_config.rs @@ -127,7 +127,7 @@ pub type FungiblesTransactor = FungiblesAdapter< /// `AssetId/Balance` converter for `TrustBackedAssets` pub type ForeignAssetsConvertedConcreteId = -assets_common::ForeignAssetsConvertedConcreteId, Balance>; + assets_common::ForeignAssetsConvertedConcreteId, Balance>; /// Means for transacting foreign assets from different global consensus. pub type ForeignFungiblesTransactor = FungiblesAdapter< @@ -223,9 +223,9 @@ pub type AccountIdOf = ::AccountId; /// Asset filter that allows all assets from a certain location matching asset id. pub struct AssetPrefixFrom(PhantomData<(Prefix, Origin)>); impl ContainsPair for AssetPrefixFrom - where - Prefix: Get, - Origin: Get, +where + Prefix: Get, + Origin: Get, { fn contains(asset: &Asset, origin: &Location) -> bool { let loc = Origin::get(); @@ -251,9 +251,9 @@ impl> ContainsPair for NativeAssetFrom { /// Allow checking in assets that have issuance > 0. pub struct NonZeroIssuance(PhantomData<(AccountId, Assets)>); impl Contains<>::AssetId> -for NonZeroIssuance - where - Assets: fungibles::Inspect, + for NonZeroIssuance +where + Assets: fungibles::Inspect, { fn contains(id: &>::AssetId) -> bool { !Assets::total_issuance(id.clone()).is_zero() @@ -264,9 +264,9 @@ for NonZeroIssuance /// Will drop and burn the assets in case the transfer fails. pub struct AssetsToBlockAuthor(PhantomData); impl HandleCredit, pallet_assets::Pallet> for AssetsToBlockAuthor - where - R: pallet_authorship::Config + pallet_assets::Config, - AccountIdOf: From + Into, +where + R: pallet_authorship::Config + pallet_assets::Config, + AccountIdOf: From + Into, { fn handle_credit(credit: Credit, pallet_assets::Pallet>) { if let Some(author) = pallet_authorship::Pallet::::author() { @@ -302,7 +302,7 @@ parameter_types! { /// Accepts asset with ID `AssetLocation` and is coming from `Origin` chain. pub struct AssetFromChain(PhantomData<(AssetLocation, Origin)>); impl, Origin: Get> ContainsPair -for AssetFromChain + for AssetFromChain { fn contains(asset: &Asset, origin: &Location) -> bool { log::trace!(target: "xcm::contains", "AssetFromChain asset: {:?}, origin: {:?}", asset, origin); @@ -318,7 +318,7 @@ pub type Reserves = ( AssetPrefixFrom, ); pub type TrustedTeleporters = -(AssetFromChain,); + (AssetFromChain,); pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { @@ -334,7 +334,7 @@ impl xcm_executor::Config for XcmConfig { type Barrier = Barrier; type Weigher = FixedWeightBounds; type Trader = - UsingComponents>; + UsingComponents>; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; From b618536ff69f1092157d21277d69341e9c224e40 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 4 Mar 2024 20:11:56 +0200 Subject: [PATCH 250/316] unused var --- .../tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index c6b8d3309f..b0236b5f4a 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -288,7 +288,6 @@ fn send_token_from_ethereum_to_penpal() { (Parent, Parent, EthereumNetwork::get(), AccountKey20 { network: None, key: WETH }).into(); // Converts the Weth asset location into an asset ID let weth_asset_id: v3::Location = weth_asset_location.try_into().unwrap(); - let ah_as_seen_by_penpal = PenpalB::sibling_location_of(AssetHubPolkadot::para_id()); let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); // Fund ethereum sovereign on AssetHub From 540313af507b931080d78e7682cb329462650b8a Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 5 Mar 2024 07:50:30 +0200 Subject: [PATCH 251/316] merge --- Cargo.lock | 954 ++++++++++++++++-- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 5 +- .../bridge-hub-kusama/tests/tests.rs | 7 +- .../bridge-hub-polkadot/tests/tests.rs | 7 +- 4 files changed, 884 insertions(+), 89 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2aa42c95c7..41389e7f4f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -110,6 +110,77 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +[[package]] +name = "alloy-primitives" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0628ec0ba5b98b3370bb6be17b12f23bfce8ee4ad83823325a20546d9b03b78" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "proptest", + "rand", + "ruint", + "serde", + "tiny-keccak", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" +dependencies = [ + "alloy-rlp-derive", + "arrayvec 0.7.4", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a98ad1696a2e17f010ae8e43e9f2a1e930ed176a8e3ff77acfeff6dfb07b42c" +dependencies = [ + "const-hex", + "dunce", + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.48", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-types" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98d7107bed88e8f09f0ddcc3335622d87bfb6821f3e0c7473329fb1cfad5e015" +dependencies = [ + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + [[package]] name = "always-assert" version = "0.1.3" @@ -224,8 +295,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" dependencies = [ "ark-ec", - "ark-ff", - "ark-std", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -235,9 +306,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" dependencies = [ "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -246,10 +317,10 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" dependencies = [ - "ark-ff", + "ark-ff 0.4.2", "ark-poly", - "ark-serialize", - "ark-std", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", "itertools 0.10.5", @@ -257,16 +328,34 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + [[package]] name = "ark-ff" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "digest 0.10.7", "itertools 0.10.5", @@ -277,6 +366,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-asm" version = "0.4.2" @@ -287,6 +386,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-macros" version = "0.4.2" @@ -306,13 +417,23 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", ] +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + [[package]] name = "ark-serialize" version = "0.4.2" @@ -320,7 +441,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ "ark-serialize-derive", - "ark-std", + "ark-std 0.4.0", "digest 0.10.7", "num-bigint", ] @@ -336,6 +457,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand", +] + [[package]] name = "ark-std" version = "0.4.0" @@ -520,6 +651,7 @@ dependencies = [ "polkadot-runtime-constants", "primitive-types", "scale-info", + "snowbridge-router-primitives", "sp-api", "sp-block-builder", "sp-consensus-aura", @@ -640,6 +772,7 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-constants", "scale-info", + "snowbridge-router-primitives", "sp-api", "sp-block-builder", "sp-consensus-aura", @@ -791,6 +924,17 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -904,6 +1048,21 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitcoin_hashes" version = "0.11.0" @@ -1303,6 +1462,24 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "bridge-hub-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e69c25ec3db0ef22ae409cc60f5c42364124264ce6640e17dbcfc0280e4b5dd9" +dependencies = [ + "cumulus-primitives-core", + "frame-support", + "pallet-message-queue", + "parity-scale-codec", + "scale-info", + "snowbridge-core", + "sp-core", + "sp-runtime", + "sp-std", + "staging-xcm", +] + [[package]] name = "bridge-hub-kusama-emulated-chain" version = "1.0.0" @@ -1319,11 +1496,13 @@ dependencies = [ name = "bridge-hub-kusama-integration-tests" version = "1.0.0" dependencies = [ + "asset-hub-kusama-runtime", "bp-messages", "bridge-hub-kusama-runtime", "cumulus-pallet-xcmp-queue", "emulated-integration-tests-common", "frame-support", + "hex-literal", "integration-tests-helpers", "kusama-polkadot-system-emulated-network", "kusama-system-emulated-network", @@ -1333,9 +1512,20 @@ dependencies = [ "pallet-message-queue", "pallet-xcm", "parachains-common", + "parity-scale-codec", + "scale-info", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-inbound-queue-fixtures", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "sp-core", "sp-runtime", "staging-xcm", "staging-xcm-executor", + "system-parachains-constants", ] [[package]] @@ -1354,6 +1544,7 @@ dependencies = [ "bp-polkadot-core", "bp-relayers", "bp-runtime", + "bridge-hub-common", "bridge-hub-test-utils", "bridge-runtime-common", "cumulus-pallet-aura-ext", @@ -1393,6 +1584,7 @@ dependencies = [ "pallet-xcm-benchmarks", "pallet-xcm-bridge-hub", "parachains-common", + "parachains-runtimes-test-utils", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", @@ -1400,6 +1592,18 @@ dependencies = [ "polkadot-runtime-constants", "scale-info", "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-ethereum-client-fixtures", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-runtime-common", + "snowbridge-runtime-test-common", + "snowbridge-system-runtime-api", "sp-api", "sp-block-builder", "sp-consensus-aura", @@ -1428,8 +1632,8 @@ dependencies = [ name = "bridge-hub-polkadot-emulated-chain" version = "1.0.0" dependencies = [ + "bridge-hub-common", "bridge-hub-polkadot-runtime", - "cumulus-primitives-core", "emulated-integration-tests-common", "frame-support", "parachains-common", @@ -1440,11 +1644,13 @@ dependencies = [ name = "bridge-hub-polkadot-integration-tests" version = "1.0.0" dependencies = [ + "asset-hub-polkadot-runtime", "bp-messages", "bridge-hub-polkadot-runtime", "cumulus-pallet-xcmp-queue", "emulated-integration-tests-common", "frame-support", + "hex-literal", "integration-tests-helpers", "kusama-polkadot-system-emulated-network", "pallet-assets", @@ -1453,9 +1659,21 @@ dependencies = [ "pallet-message-queue", "pallet-xcm", "parachains-common", + "parity-scale-codec", + "polkadot-system-emulated-network", + "scale-info", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-inbound-queue-fixtures", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "sp-core", "sp-runtime", "staging-xcm", "staging-xcm-executor", + "system-parachains-constants", ] [[package]] @@ -1474,6 +1692,7 @@ dependencies = [ "bp-polkadot-core", "bp-relayers", "bp-runtime", + "bridge-hub-common", "bridge-hub-test-utils", "bridge-runtime-common", "cumulus-pallet-aura-ext", @@ -1513,6 +1732,7 @@ dependencies = [ "pallet-xcm-benchmarks", "pallet-xcm-bridge-hub", "parachains-common", + "parachains-runtimes-test-utils", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", @@ -1520,6 +1740,18 @@ dependencies = [ "polkadot-runtime-constants", "scale-info", "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-ethereum-client-fixtures", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-runtime-common", + "snowbridge-runtime-test-common", + "snowbridge-system-runtime-api", "sp-api", "sp-block-builder", "sp-consensus-aura", @@ -2100,6 +2332,19 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "const-hex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efbd12d49ab0eaf8193ba9175e45f56bbc2e4b27d57b8cfe62aa47942a46b9a9" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + [[package]] name = "const-oid" version = "0.9.5" @@ -2966,6 +3211,12 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + [[package]] name = "dyn-clonable" version = "0.9.0" @@ -3360,6 +3611,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "ethabi-decode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d398648d65820a727d6a81e58b962f874473396a047e4c30bafe3240953417" +dependencies = [ + "ethereum-types", + "tiny-keccak", +] + [[package]] name = "ethbloom" version = "0.13.0" @@ -3368,8 +3629,10 @@ checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", + "scale-info", "tiny-keccak", ] @@ -3381,9 +3644,11 @@ checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ "ethbloom", "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", "primitive-types", + "scale-info", "uint", ] @@ -3466,6 +3731,17 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec 0.7.4", + "auto_impl", + "bytes", +] + [[package]] name = "fatality" version = "0.0.6" @@ -8156,6 +8432,12 @@ dependencies = [ "substrate-wasm-builder", ] +[[package]] +name = "parity-bytes" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b56e3a2420138bdb970f84dfb9c774aea80fa0e7371549eedec0d80c209c67" + [[package]] name = "parity-db" version = "0.4.13" @@ -8344,16 +8626,14 @@ dependencies = [ "frame-support", "kusama-emulated-chain", "parachains-common", - "penpal-runtime", + "penpal-runtime-dotsama", "polkadot-emulated-chain", "sp-core", ] [[package]] -name = "penpal-runtime" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c804f33306e47153a4bad6a9cd33bbd537fa4b5f9434d505c8a6fc321a0bb71a" +name = "penpal-runtime-dotsama" +version = "0.14.0" dependencies = [ "assets-common", "cumulus-pallet-aura-ext", @@ -8370,6 +8650,7 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", + "hex-literal", "log", "pallet-asset-tx-payment", "pallet-assets", @@ -8409,7 +8690,6 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", - "testnet-parachains-constants", ] [[package]] @@ -10004,6 +10284,26 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.4.1", + "lazy_static", + "num-traits", + "rand", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax 0.8.2", + "rusty-fork", + "tempfile", + "unarray", +] + [[package]] name = "prost" version = "0.11.9" @@ -10230,6 +10530,15 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -10463,23 +10772,6 @@ dependencies = [ "librocksdb-sys", ] -[[package]] -name = "rococo-runtime-constants" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b45c21ccb0f8777512a65510c106aeee4b59682944b9a5cb31cd7b8ed4ccb47" -dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", - "staging-xcm", - "staging-xcm-builder", -] - [[package]] name = "route-recognizer" version = "0.3.1" @@ -10522,6 +10814,36 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ruint" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b1d9521f889713d1221270fdd63370feca7e5c71a18745343402fa86e4f04f" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -10549,6 +10871,15 @@ dependencies = [ "semver 0.9.0", ] +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + [[package]] name = "rustc_version" version = "0.4.0" @@ -10656,15 +10987,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] -name = "rw-stream-sink" +name = "rusty-fork" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" dependencies = [ - "futures", - "pin-project", - "static_assertions", -] + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "rw-stream-sink" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04" +dependencies = [ + "futures", + "pin-project", + "static_assertions", +] [[package]] name = "ryu" @@ -12032,7 +12375,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", ] [[package]] @@ -12041,7 +12384,16 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser 0.10.2", ] [[package]] @@ -12059,6 +12411,15 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + [[package]] name = "separator" version = "0.4.1" @@ -12074,6 +12435,15 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-big-array" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd31f59f6fe2b0c055371bb2f16d7f0aa7d8881676c04a55b1596d1a17cd10a4" +dependencies = [ + "serde", +] + [[package]] name = "serde_bytes" version = "0.11.14" @@ -12309,6 +12679,407 @@ dependencies = [ "subtle 2.5.0", ] +[[package]] +name = "snowbridge-amcl" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460a9ed63cdf03c1b9847e8a12a5f5ba19c4efd5869e4a737e05be25d7c427e5" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "snowbridge-beacon-primitives" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a73ef707257064bc4ecce8323cdb7c30e8ecd1ce74aa89a6e82e81fa8b9970" +dependencies = [ + "byte-slice-cast", + "frame-support", + "frame-system", + "hex", + "parity-scale-codec", + "rlp", + "scale-info", + "serde", + "snowbridge-ethereum", + "snowbridge-milagro-bls", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "ssz_rs", + "ssz_rs_derive", + "static_assertions", +] + +[[package]] +name = "snowbridge-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d3615664be8525d6f23e42dce1c314abc7f961a7f862b74012444e16d5dde5c" +dependencies = [ + "ethabi-decode", + "frame-support", + "frame-system", + "hex-literal", + "parity-scale-codec", + "polkadot-parachain-primitives", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-builder", +] + +[[package]] +name = "snowbridge-ethereum" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "315ad74f081734cb51f48bb10cd18a3f83cfec3c09a551bc936027708635e808" +dependencies = [ + "ethabi-decode", + "ethbloom", + "ethereum-types", + "hex-literal", + "parity-bytes", + "parity-scale-codec", + "rlp", + "rustc-hex", + "scale-info", + "serde", + "serde-big-array", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "snowbridge-milagro-bls" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "026aa8638f690a53e3f7676024b9e913b1cab0111d1b7b92669d40a188f9d7e6" +dependencies = [ + "hex", + "lazy_static", + "parity-scale-codec", + "rand", + "scale-info", + "snowbridge-amcl", + "zeroize", +] + +[[package]] +name = "snowbridge-outbound-queue-merkle-tree" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5382cf77aeb8a92a142751949cdea1f230b7864e1ea687352c28439faabcf69d" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "snowbridge-outbound-queue-runtime-api" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4933810488df1660cf60f53a7952ce1dff6aaef72d9fc740e1274e937136444e" +dependencies = [ + "frame-support", + "parity-scale-codec", + "snowbridge-core", + "snowbridge-outbound-queue-merkle-tree", + "sp-api", + "sp-core", + "sp-std", + "staging-xcm", +] + +[[package]] +name = "snowbridge-pallet-ethereum-client" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0fd437cd5db8b7d16cdd4da110d674d245532afa31df10108a11858a07844a6" +dependencies = [ + "bp-runtime", + "byte-slice-cast", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal", + "log", + "pallet-timestamp", + "parity-scale-codec", + "rlp", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-ethereum", + "snowbridge-pallet-ethereum-client-fixtures", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "ssz_rs", + "ssz_rs_derive", + "static_assertions", +] + +[[package]] +name = "snowbridge-pallet-ethereum-client-fixtures" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3d5b4b7e17eaadbc52ac3fc9fbcce63dfc60c05a1b19604cd009d6595c1175e" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal", + "snowbridge-beacon-primitives", + "snowbridge-core", + "sp-core", + "sp-std", +] + +[[package]] +name = "snowbridge-pallet-inbound-queue" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79c1fbfd32dbba082a9312c02c3ef35de929741f78f48e88b7668909350ef9e2" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal", + "log", + "num-traits", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-ethereum", + "snowbridge-pallet-inbound-queue-fixtures", + "snowbridge-router-primitives", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "snowbridge-pallet-inbound-queue-fixtures" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d8fff63b0a64d1dd06571ad074e664594bd9392481cd3489edde36e1d2dcc96" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal", + "snowbridge-beacon-primitives", + "snowbridge-core", + "sp-core", + "sp-std", +] + +[[package]] +name = "snowbridge-pallet-outbound-queue" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c7498ba5bc2b15e1d032b3e44659cd117cad24eab457a40dc5e17acfaac0aff" +dependencies = [ + "bridge-hub-common", + "ethabi-decode", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-core", + "snowbridge-outbound-queue-merkle-tree", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", +] + +[[package]] +name = "snowbridge-pallet-system" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6a410d9312bdcc3ba5944abb7d21f6b25065b32c7f8b39b9c7a4b0bd0dacfb4" +dependencies = [ + "ethabi-decode", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "snowbridge-core", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "snowbridge-router-primitives" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee5cc8e156f033971c5435676be92ab6f70a926b3497ca9c28c0dde9697b8da9" +dependencies = [ + "ethabi-decode", + "frame-support", + "frame-system", + "hex-literal", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-core", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "snowbridge-runtime-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d751007be1c9c68b075b0b1f9b02c25a02f458903a2c7893ba6e4231a00c24a" +dependencies = [ + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "snowbridge-core", + "sp-arithmetic", + "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "snowbridge-runtime-test-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bce50af98162e76b5ae50a2beb215bcde2a199eb5ea579ba4752b91278e655b1" +dependencies = [ + "assets-common", + "cumulus-pallet-aura-ext", + "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-message-queue", + "pallet-multisig", + "pallet-session", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parachains-common", + "parachains-runtimes-test-utils", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-common", + "scale-info", + "serde", + "smallvec", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-ethereum-client-fixtures", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-system-runtime-api", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "snowbridge-system-runtime-api" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5c3c4e6e87b76ae1f9639bbc1528e1ae4e5a8d6a16d02d8d48e56d4a89f4ca" +dependencies = [ + "parity-scale-codec", + "snowbridge-core", + "sp-api", + "sp-core", + "sp-std", + "staging-xcm", +] + [[package]] name = "socket2" version = "0.4.10" @@ -13190,6 +13961,29 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "ssz_rs" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "057291e5631f280978fa9c8009390663ca4613359fc1318e36a8c24c392f6d1f" +dependencies = [ + "bitvec", + "num-bigint", + "sha2 0.9.9", + "ssz_rs_derive", +] + +[[package]] +name = "ssz_rs_derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f07d54c4d01a1713eb363b55ba51595da15f6f1211435b71466460da022aa140" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -13635,6 +14429,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn-solidity" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b837ef12ab88835251726eb12237655e61ec8dc8a280085d1961cdc3dfd047" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "synstructure" version = "0.12.6" @@ -13680,6 +14486,7 @@ dependencies = [ "polkadot-runtime-constants", "smallvec", "sp-runtime", + "staging-xcm", ] [[package]] @@ -13732,21 +14539,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" -[[package]] -name = "testnet-parachains-constants" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ff23c25f39d64b930ab9d721643d0c780a66201c7f1da34fac6982752626bf5" -dependencies = [ - "frame-support", - "polkadot-core-primitives", - "rococo-runtime-constants", - "smallvec", - "sp-runtime", - "staging-xcm", - "westend-runtime-constants", -] - [[package]] name = "thiserror" version = "1.0.56" @@ -14306,6 +15098,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + [[package]] name = "unicode-bidi" version = "0.3.14" @@ -14423,8 +15221,8 @@ dependencies = [ "ark-bls12-377", "ark-bls12-381", "ark-ec", - "ark-ff", - "ark-serialize", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", "ark-serialize-derive", "arrayref", "constcat", @@ -14438,6 +15236,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + [[package]] name = "walkdir" version = "2.4.0" @@ -14842,23 +15649,6 @@ dependencies = [ "webpki", ] -[[package]] -name = "westend-runtime-constants" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b080c193714605ce1033311d85035247adca170181cd68a3ad7e3ca87755a14" -dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", - "staging-xcm", - "staging-xcm-builder", -] - [[package]] name = "which" version = "4.4.2" diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index f522cc585c..ccd55bb8d7 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -62,7 +62,10 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); mod weights; pub mod xcm_config; -use assets_common::{foreign_creators::ForeignCreators, matching::{FromNetwork, FromSiblingParachain}}; +use assets_common::{ + foreign_creators::ForeignCreators, + matching::{FromNetwork, FromSiblingParachain}, +}; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use sp_api::impl_runtime_apis; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index 6d59fe20ed..427a19f48c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -24,9 +24,10 @@ use bridge_hub_kusama_runtime::{ WithBridgeHubPolkadotMessagesInstance, XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, }, xcm_config::{KsmRelayLocation, RelayNetwork, XcmConfig}, - AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, EthereumGatewayAddress, Executive, ExistentialDeposit, - ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, - SignedExtra, TransactionPayment, UncheckedExtrinsic, SLOT_DURATION, + AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, EthereumGatewayAddress, + Executive, ExistentialDeposit, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, + RuntimeEvent, RuntimeOrigin, SessionKeys, SignedExtra, TransactionPayment, UncheckedExtrinsic, + SLOT_DURATION, }; use bridge_hub_test_utils::{test_cases::from_parachain, SlotDurations}; use codec::{Decode, Encode}; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index ca6d63950d..488312b10b 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -25,9 +25,10 @@ use bridge_hub_polkadot_runtime::{ XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, }, xcm_config::{DotRelayLocation, RelayNetwork, XcmConfig}, - AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, EthereumGatewayAddress, ExistentialDeposit, - ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, - SignedExtra, TransactionPayment, UncheckedExtrinsic, SLOT_DURATION, + AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, EthereumGatewayAddress, + Executive, ExistentialDeposit, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, + RuntimeEvent, RuntimeOrigin, SessionKeys, SignedExtra, TransactionPayment, UncheckedExtrinsic, + SLOT_DURATION, }; use bridge_hub_test_utils::{test_cases::from_parachain, SlotDurations}; use codec::{Decode, Encode}; From 99db33d64a827c2dd893ec92463645f6d8f1bf1d Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 5 Mar 2024 08:07:19 +0200 Subject: [PATCH 252/316] fix dep --- Cargo.lock | 2 +- .../chains/parachains/bridges/bridge-hub-kusama/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 41389e7f4f..393449afd6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1484,8 +1484,8 @@ dependencies = [ name = "bridge-hub-kusama-emulated-chain" version = "1.0.0" dependencies = [ + "bridge-hub-common", "bridge-hub-kusama-runtime", - "cumulus-primitives-core", "emulated-integration-tests-common", "frame-support", "parachains-common", diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml index 089dfe898c..83accaf328 100644 --- a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml @@ -15,7 +15,7 @@ frame-support = { version = "29.0.0" } # Cumulus parachains-common = { version = "8.0.0" } -cumulus-primitives-core = { version = "0.8.0" } +bridge-hub-common = { version = "0.1.0" } emulated-integration-tests-common = { version = "4.0.0" } # Runtimes From 1458558d60ff92559a0ffa91ef6779c4397a4f97 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 5 Mar 2024 08:22:14 +0200 Subject: [PATCH 253/316] changelog and increase eth header ring buffer size --- CHANGELOG.md | 1 + system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 3 +-- system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa688224a6..8e64c1987a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Feature for enabling debug prints in the Polkadot and Kusama runtime ([polkadot-fellows/runtimes#85](https://github.com/polkadot-fellows/runtimes/pull/85)) - Added new "Wish for Change" track ([polkadot-fellows/runtimes#184](https://github.com/polkadot-fellows/runtimes/pull/184)) - Enable Coretime and on-demand on Kusama ([polkadot-fellows/runtimes#159](https://github.com/polkadot-fellows/runtimes/pull/159) +- Adds Snowbridge to Kusama and Polkadot ([polkadot-fellows/runtimes#130](https://github.com/polkadot-fellows/runtimes/pull/130) ### Changed diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 4832bac886..231e1aca34 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -91,7 +91,6 @@ use parachains_common::{ }; pub use system_parachains_constants::SLOT_DURATION; -use polkadot_runtime_common::prod_or_fast; use system_parachains_constants::{ kusama::{consensus::*, currency::*, fee::WeightToFee}, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, @@ -657,7 +656,7 @@ parameter_types! { } parameter_types! { - pub const MaxExecutionHeadersToKeep: u32 = prod_or_fast!(8192 * 2, 1000); + pub const MaxExecutionHeadersToKeep: u32 = 8192 * 20; } impl snowbridge_pallet_ethereum_client::Config for Runtime { diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index dc6ce411d0..7b737d4389 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -92,7 +92,6 @@ use parachains_common::{ }; pub use system_parachains_constants::SLOT_DURATION; -use polkadot_runtime_common::prod_or_fast; use system_parachains_constants::{ polkadot::{consensus::*, currency::*, fee::WeightToFee}, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, @@ -658,7 +657,7 @@ parameter_types! { } parameter_types! { - pub const MaxExecutionHeadersToKeep: u32 = prod_or_fast!(8192 * 2, 1000); + pub const MaxExecutionHeadersToKeep: u32 = 8192 * 20; } impl snowbridge_pallet_ethereum_client::Config for Runtime { From effb4af2d84ade587e1338220da452dab572ce40 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 5 Mar 2024 10:14:20 +0200 Subject: [PATCH 254/316] cleanup tests --- .../bridge-hub-kusama/src/tests/snowbridge.rs | 13 +++++++++--- .../src/tests/snowbridge.rs | 21 +++++++++---------- .../asset-hub-kusama/src/xcm_config.rs | 4 ++-- .../asset-hub-polkadot/src/xcm_config.rs | 4 ++-- 4 files changed, 24 insertions(+), 18 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index 722cbd270c..6b43a1b0cc 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -13,6 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. use crate::*; +use asset_hub_kusama_runtime::xcm_config::bridging::to_ethereum::BridgeHubEthereumBaseFee; use bridge_hub_kusama_runtime::{EthereumBeaconClient, EthereumInboundQueue, RuntimeOrigin}; use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; @@ -28,7 +29,6 @@ use snowbridge_pallet_inbound_queue_fixtures::{ register_token_with_insufficient_fee::make_register_token_with_infufficient_fee_message, InboundQueueFixture, }; -use snowbridge_pallet_system; use snowbridge_router_primitives::inbound::{ Command, Destination, GlobalConsensusEthereumConvertsFor, MessageV1, VersionedMessage, }; @@ -405,7 +405,6 @@ fn send_token_from_ethereum_to_asset_hub() { /// - returning the token to Ethereum #[test] fn send_weth_asset_from_asset_hub_to_ethereum() { - use asset_hub_kusama_runtime::xcm_config::bridging::to_ethereum::DefaultBridgeHubEthereumBaseFee; let assethub_sovereign = BridgeHubKusama::sovereign_account_id_of(Location::new( 1, [Parachain(AssetHubKusama::para_id().into())], @@ -422,6 +421,14 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { AssetHubKusama::fund_accounts(vec![(AssetHubKusamaReceiver::get(), INITIAL_FUND)]); const WETH_AMOUNT: u128 = 1_000_000_000; + let base_fee = 2_750_872_500_000u128; + + AssetHubKusama::execute_with(|| { + ::System::set_storage( + ::RuntimeOrigin::root(), + vec![(BridgeHubEthereumBaseFee::key().to_vec(), base_fee.encode())], + ).unwrap(); + }); BridgeHubKusama::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; @@ -499,7 +506,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { ); // Assert at least DefaultBridgeHubEthereumBaseFee charged from the sender let free_balance_diff = free_balance_before - free_balance_after; - assert!(free_balance_diff > DefaultBridgeHubEthereumBaseFee::get()); + assert!(free_balance_diff > base_fee); }); BridgeHubKusama::execute_with(|| { diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index b0236b5f4a..153a804e4a 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -13,6 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. use crate::*; +use asset_hub_polkadot_runtime::xcm_config::bridging::to_ethereum::BridgeHubEthereumBaseFee; use bridge_hub_polkadot_runtime::{EthereumBeaconClient, EthereumInboundQueue, RuntimeOrigin}; use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; @@ -235,15 +236,6 @@ fn register_weth_token_from_ethereum_to_asset_hub() { ) .unwrap(); - let minimum_balance = - ::Balances::minimum_balance(); - let total_balance = ::Balances::total_balance( - &asset_hub_sovereign.into(), - ); - - println!("MINIMUM: {:?}", minimum_balance); - println!("TOTAL: {:?}", total_balance); - let message_id: H256 = [1; 32].into(); let message = VersionedMessage::V1(MessageV1 { chain_id: CHAIN_ID, @@ -458,7 +450,6 @@ fn send_token_from_ethereum_to_asset_hub() { /// - returning the token to Ethereum #[test] fn send_weth_asset_from_asset_hub_to_ethereum() { - use asset_hub_polkadot_runtime::xcm_config::bridging::to_ethereum::DefaultBridgeHubEthereumBaseFee; let assethub_sovereign = BridgeHubPolkadot::sovereign_account_id_of(Location::new( 1, [Parachain(AssetHubPolkadot::para_id().into())], @@ -478,6 +469,14 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { AssetHubPolkadot::fund_accounts(vec![(AssetHubPolkadotReceiver::get(), INITIAL_FUND)]); const WETH_AMOUNT: u128 = 1_000_000_000; + let base_fee = 2_750_872_500_000u128; + + AssetHubPolkadot::execute_with(|| { + ::System::set_storage( + ::RuntimeOrigin::root(), + vec![(BridgeHubEthereumBaseFee::key().to_vec(), base_fee.encode())], + ).unwrap(); + }); let asset_hub_sovereign = BridgeHubPolkadot::sovereign_account_id_of(Location::new( 1, @@ -582,7 +581,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { ); // Assert at least DefaultBridgeHubEthereumBaseFee charged from the sender let free_balance_diff = free_balance_before - free_balance_after; - assert!(free_balance_diff > DefaultBridgeHubEthereumBaseFee::get()); + assert!(free_balance_diff > base_fee); }); BridgeHubPolkadot::execute_with(|| { diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 229afe56ca..a46ad6d79b 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -778,8 +778,8 @@ pub mod bridging { parameter_types! { /// User fee for ERC20 token transfer back to Ethereum. /// Configure the fee to max Balance so that it is disabled. - /// pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX; - pub const DefaultBridgeHubEthereumBaseFee: Balance = 2_750_872_500_000; + /// Sensible value was 2_750_872_500_000. + pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX; pub storage BridgeHubEthereumBaseFee: Balance = DefaultBridgeHubEthereumBaseFee::get(); pub SiblingBridgeHubWithEthereumInboundQueueInstance: Location = Location::new( 1, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index d6eeddd5c1..856bf944e9 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -728,8 +728,8 @@ pub mod bridging { parameter_types! { /// User fee for ERC20 token transfer back to Ethereum. /// Configure the fee to max Balance so that it is disabled. - //pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX; - pub const DefaultBridgeHubEthereumBaseFee: Balance = 27_508_725_000; + /// Sensible value was 27_508_725_000. + pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX; pub storage BridgeHubEthereumBaseFee: Balance = DefaultBridgeHubEthereumBaseFee::get(); pub SiblingBridgeHubWithEthereumInboundQueueInstance: Location = Location::new( 1, From d44fa3305087752131d651adf120a1390a222667 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 5 Mar 2024 10:18:28 +0200 Subject: [PATCH 255/316] fmt and update ksm price --- .../tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs | 3 ++- .../tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs | 3 ++- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index 6b43a1b0cc..89aef689a0 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -427,7 +427,8 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { ::System::set_storage( ::RuntimeOrigin::root(), vec![(BridgeHubEthereumBaseFee::key().to_vec(), base_fee.encode())], - ).unwrap(); + ) + .unwrap(); }); BridgeHubKusama::execute_with(|| { diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index 153a804e4a..b7d2a76027 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -475,7 +475,8 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { ::System::set_storage( ::RuntimeOrigin::root(), vec![(BridgeHubEthereumBaseFee::key().to_vec(), base_fee.encode())], - ).unwrap(); + ) + .unwrap(); }); let asset_hub_sovereign = BridgeHubPolkadot::sovereign_account_id_of(Location::new( diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 231e1aca34..9173ef43c8 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -517,7 +517,7 @@ parameter_types! { pub const CreateAssetDeposit: u128 = (UNITS / 10) + EXISTENTIAL_DEPOSIT; pub const InboundQueuePalletInstance: u8 = system_parachains_constants::kusama::snowbridge::INBOUND_QUEUE_PALLET_INDEX; pub Parameters: PricingParameters = PricingParameters { - exchange_rate: FixedU128::from_rational(1, 400), + exchange_rate: FixedU128::from_rational(1, 75), fee_per_gas: gwei(20), rewards: Rewards { local: 1 * UNITS, remote: meth(1) } }; From f37bcd1ab87fe0510385815af837a5169560bcba Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 5 Mar 2024 11:11:17 +0200 Subject: [PATCH 256/316] fix tests --- .../bridge-hub-kusama/src/tests/snowbridge.rs | 11 +++- .../src/tests/snowbridge.rs | 51 ++++++------------- 2 files changed, 25 insertions(+), 37 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index 89aef689a0..be3b9e9ca7 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -210,8 +210,10 @@ fn create_channel() { /// Tests the registering of a token as an asset on AssetHub. #[test] fn register_weth_token_from_ethereum_to_asset_hub() { - // Fund AssetHub sovereign account so that it can pay execution fees. + // Fund AH sovereign account on BH so that it can pay execution fees. BridgeHubKusama::fund_para_sovereign(AssetHubKusama::para_id().into(), INITIAL_FUND); + // Fund ethereum sovereign account on AssetHub. + AssetHubKusama::fund_accounts(vec![(ethereum_sovereign_account(), INITIAL_FUND)]); BridgeHubKusama::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; @@ -535,7 +537,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { events.iter().any(|event| matches!( event, RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) - if *who == assethub_sovereign && *amount == 2680000000000, + if *who == assethub_sovereign && *amount == 502500000000, )), "AssetHub sovereign takes remote fee." ); @@ -583,6 +585,11 @@ fn send_token_from_ethereum_to_asset_hub_fail_for_insufficient_fund() { }); } +fn ethereum_sovereign_account() -> AccountId { + let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); + GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location).unwrap() +} + pub fn make_register_token_message() -> InboundQueueFixture { InboundQueueFixture { execution_header: CompactExecutionHeader{ diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index b7d2a76027..0a212cde8d 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -17,7 +17,7 @@ use asset_hub_polkadot_runtime::xcm_config::bridging::to_ethereum::BridgeHubEthe use bridge_hub_polkadot_runtime::{EthereumBeaconClient, EthereumInboundQueue, RuntimeOrigin}; use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; -use frame_support::{pallet_prelude::TypeInfo, traits::Currency}; +use frame_support::pallet_prelude::TypeInfo; use hex_literal::hex; use polkadot_system_emulated_network::BridgeHubPolkadotParaSender as BridgeHubPolkadotSender; use snowbridge_beacon_primitives::CompactExecutionHeader; @@ -36,7 +36,7 @@ use sp_core::H256; use sp_runtime::{DispatchError::Token, TokenError::FundsUnavailable}; use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; -const INITIAL_FUND: u128 = 10_000_000_000_000 * POLKADOT_ED; +const INITIAL_FUND: u128 = 5_000_000_000 * POLKADOT_ED; const CHAIN_ID: u64 = 1; const TREASURY_ACCOUNT: [u8; 32] = hex!("6d6f646c70792f74727372790000000000000000000000000000000000000000"); @@ -210,41 +210,17 @@ fn create_channel() { /// Tests the registering of a token as an asset on AssetHub. #[test] fn register_weth_token_from_ethereum_to_asset_hub() { - let asset_hub_sovereign = BridgeHubPolkadot::sovereign_account_id_of(Location::new( - 1, - [Parachain(AssetHubPolkadot::para_id().into())], - )); - - let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); - - // Fund ethereum sovereign on AssetHub - let ethereum_sovereign: AccountId = - GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location) - .unwrap(); - AssetHubPolkadot::fund_accounts(vec![(ethereum_sovereign.clone(), INITIAL_FUND)]); + // Fund AH sovereign account on BH so that it can pay execution fees. + BridgeHubPolkadot::fund_para_sovereign(AssetHubKusama::para_id().into(), INITIAL_FUND); + // Fund ethereum sovereign account on AssetHub. + AssetHubPolkadot::fund_accounts(vec![(ethereum_sovereign_account(), INITIAL_FUND)]); BridgeHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; - type RuntimeOrigin = ::RuntimeOrigin; - - // Fund AssetHub sovereign account so it can pay execution fees for the asset transfer - ::Balances::force_set_balance( - RuntimeOrigin::root(), - asset_hub_sovereign.clone().into(), - 60_000_000_000_000_000_000, - ) - .unwrap(); - - let message_id: H256 = [1; 32].into(); - let message = VersionedMessage::V1(MessageV1 { - chain_id: CHAIN_ID, - command: Command::RegisterToken { token: WETH.into(), fee: 40_000_000_000 }, - }); - // Convert the message to XCM - let (xcm, _) = EthereumInboundQueue::do_convert(message_id, message).unwrap(); - // Send the XCM - let _ = EthereumInboundQueue::send_xcm(xcm, AssetHubPolkadot::para_id()).unwrap(); + // Construct RegisterToken message and sent to inbound queue + let register_token_message = make_register_token_message(); + send_inbound_message(register_token_message.clone()).unwrap(); assert_expected_events!( BridgeHubPolkadot, @@ -658,7 +634,12 @@ fn send_token_from_ethereum_to_asset_hub_fail_for_insufficient_fund() { }); } -pub fn make_register_token_message() -> InboundQueueFixture { +fn ethereum_sovereign_account() -> AccountId { + let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); + GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location).unwrap() +} + +fn make_register_token_message() -> InboundQueueFixture { InboundQueueFixture { execution_header: CompactExecutionHeader{ parent_hash: hex!("d5de3dd02c96dbdc8aaa4db70a1e9fdab5ded5f4d52f18798acd56a3d37d1ad6").into(), @@ -689,7 +670,7 @@ pub fn make_register_token_message() -> InboundQueueFixture { } } -pub fn make_send_token_message() -> InboundQueueFixture { +fn make_send_token_message() -> InboundQueueFixture { InboundQueueFixture { execution_header: CompactExecutionHeader{ parent_hash: hex!("920cecde45d428e3a77590b70f8533cf4c2c36917b8a7b74c915e7fa3dae7075").into(), From 6db3c7aaffa38d9b36135f4530c75089cc549e9a Mon Sep 17 00:00:00 2001 From: Clara van Staden Date: Tue, 5 Mar 2024 14:38:03 +0200 Subject: [PATCH 257/316] Update system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs Co-authored-by: Svyatoslav Nikolsky --- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 9173ef43c8..0b4695bf44 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -516,7 +516,7 @@ parameter_types! { pub const CreateAssetCall: [u8;2] = [53, 0]; pub const CreateAssetDeposit: u128 = (UNITS / 10) + EXISTENTIAL_DEPOSIT; pub const InboundQueuePalletInstance: u8 = system_parachains_constants::kusama::snowbridge::INBOUND_QUEUE_PALLET_INDEX; - pub Parameters: PricingParameters = PricingParameters { + pub Parameters: PricingParameters = PricingParameters { exchange_rate: FixedU128::from_rational(1, 75), fee_per_gas: gwei(20), rewards: Rewards { local: 1 * UNITS, remote: meth(1) } From 575155243e4f0d4b92af7907f231ac48baa901fb Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 5 Mar 2024 14:38:26 +0200 Subject: [PATCH 258/316] remove rococo nonces reset calls --- .../bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 5 +---- .../bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 3125f690a9..1685315916 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -153,10 +153,7 @@ impl Contains for SafeCallFilter { if items.iter().all(|(k, _)| { k.eq(&DeliveryRewardInBalance::key()) || k.eq(&RequiredStakeForStakeAndSlash::key()) || - k.eq(&EthereumGatewayAddress::key()) || - // Allow resetting of Ethereum nonces in Rococo only. - k.starts_with(&snowbridge_pallet_inbound_queue::Nonce::::final_prefix()) || - k.starts_with(&snowbridge_pallet_outbound_queue::Nonce::::final_prefix()) + k.eq(&EthereumGatewayAddress::key()) }) => return true, _ => (), diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index f6d13f397f..09c6141b67 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -170,10 +170,7 @@ impl Contains for SafeCallFilter { if items.iter().all(|(k, _)| { k.eq(&DeliveryRewardInBalance::key()) || k.eq(&RequiredStakeForStakeAndSlash::key()) || - k.eq(&EthereumGatewayAddress::key()) || - // Allow resetting of Ethereum nonces in Rococo only. - k.starts_with(&snowbridge_pallet_inbound_queue::Nonce::::final_prefix()) || - k.starts_with(&snowbridge_pallet_outbound_queue::Nonce::::final_prefix()) + k.eq(&EthereumGatewayAddress::key()) }) => return true, _ => (), From 6900ea26e02d20859761441f1582be8123808e0b Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 5 Mar 2024 15:47:49 +0200 Subject: [PATCH 259/316] adds create call index test --- .../bridge-hub-kusama/src/tests/snowbridge.rs | 26 +++++++++++++++++ .../src/tests/snowbridge.rs | 28 ++++++++++++++++++- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index be3b9e9ca7..ca5c625763 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -585,6 +585,32 @@ fn send_token_from_ethereum_to_asset_hub_fail_for_insufficient_fund() { }); } +#[test] +fn asset_hub_foreign_account_pallet_is_configured_correctly_in_bridge_hub() { + let assethub_sovereign = BridgeHubKusama::sovereign_account_id_of(Location::new( + 1, + [Parachain(AssetHubKusama::para_id().into())], + )); + + let call_create_foreign_assets = + ::RuntimeCall::ForeignAssets(pallet_assets::Call::< + ::Runtime, + pallet_assets::Instance2, + >::create { + id: v3::Location::default(), + min_balance: ASSET_MIN_BALANCE, + admin: assethub_sovereign.into(), + }) + .encode(); + + let bridge_hub_inbound_queue_assets_pallet_call_index = + bridge_hub_kusama_runtime::CreateAssetCall::get(); + + assert!( + call_create_foreign_assets.starts_with(&bridge_hub_inbound_queue_assets_pallet_call_index) + ); +} + fn ethereum_sovereign_account() -> AccountId { let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location).unwrap() diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index 0a212cde8d..a5d021a0d5 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -211,7 +211,7 @@ fn create_channel() { #[test] fn register_weth_token_from_ethereum_to_asset_hub() { // Fund AH sovereign account on BH so that it can pay execution fees. - BridgeHubPolkadot::fund_para_sovereign(AssetHubKusama::para_id().into(), INITIAL_FUND); + BridgeHubPolkadot::fund_para_sovereign(AssetHubPolkadot::para_id().into(), INITIAL_FUND); // Fund ethereum sovereign account on AssetHub. AssetHubPolkadot::fund_accounts(vec![(ethereum_sovereign_account(), INITIAL_FUND)]); @@ -634,6 +634,32 @@ fn send_token_from_ethereum_to_asset_hub_fail_for_insufficient_fund() { }); } +#[test] +fn asset_hub_foreign_account_pallet_is_configured_correctly_in_bridge_hub() { + let assethub_sovereign = BridgeHubPolkadot::sovereign_account_id_of(Location::new( + 1, + [Parachain(AssetHubPolkadot::para_id().into())], + )); + + let call_create_foreign_assets = + ::RuntimeCall::ForeignAssets(pallet_assets::Call::< + ::Runtime, + pallet_assets::Instance2, + >::create { + id: v3::Location::default(), + min_balance: ASSET_MIN_BALANCE, + admin: assethub_sovereign.into(), + }) + .encode(); + + let bridge_hub_inbound_queue_assets_pallet_call_index = + bridge_hub_polkadot_runtime::CreateAssetCall::get(); + + assert!( + call_create_foreign_assets.starts_with(&bridge_hub_inbound_queue_assets_pallet_call_index) + ); +} + fn ethereum_sovereign_account() -> AccountId { let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location).unwrap() From cdf9e245b8c888d83a8a35150c0ab3d6d893091c Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 5 Mar 2024 15:49:39 +0200 Subject: [PATCH 260/316] adds placeholder for 1.8.0 tests --- .../bridges/bridge-hub-polkadot/src/tests/snowbridge.rs | 2 +- .../bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs | 5 +++++ .../bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index a5d021a0d5..29b674eca1 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -650,7 +650,7 @@ fn asset_hub_foreign_account_pallet_is_configured_correctly_in_bridge_hub() { min_balance: ASSET_MIN_BALANCE, admin: assethub_sovereign.into(), }) - .encode(); + .encode(); let bridge_hub_inbound_queue_assets_pallet_call_index = bridge_hub_polkadot_runtime::CreateAssetCall::get(); diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs index f3703f7a02..85d47597d6 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs @@ -199,6 +199,11 @@ fn ethereum_to_polkadot_message_extrinsics_work() { ); } +#[test] +fn ethereum_outbound_queue_processes_messages_before_message_queue_works() { + // TODO: add test after dependencies are upgraded to >= 1.8 +} + fn construct_extrinsic( sender: sp_keyring::AccountKeyring, call: RuntimeCall, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs index 56bbe27350..c47f1b47dc 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs @@ -199,6 +199,11 @@ fn ethereum_to_polkadot_message_extrinsics_work() { ); } +#[test] +fn ethereum_outbound_queue_processes_messages_before_message_queue_works() { + // TODO: add test after dependencies are upgraded to >= 1.8 +} + fn construct_extrinsic( sender: sp_keyring::AccountKeyring, call: RuntimeCall, From 30e14149b4590faf52f113917647ab20ec004651 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 5 Mar 2024 15:52:46 +0200 Subject: [PATCH 261/316] adds comment --- .../tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs | 2 ++ .../tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index ca5c625763..6aeec8507b 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -585,6 +585,8 @@ fn send_token_from_ethereum_to_asset_hub_fail_for_insufficient_fund() { }); } +/// Tests that the EthereumInboundQueue CreateAssetCall parameter on BridgeHub matches +/// the ForeignAssets::create call on AsseHub. #[test] fn asset_hub_foreign_account_pallet_is_configured_correctly_in_bridge_hub() { let assethub_sovereign = BridgeHubKusama::sovereign_account_id_of(Location::new( diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index 29b674eca1..52992e681c 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -634,6 +634,8 @@ fn send_token_from_ethereum_to_asset_hub_fail_for_insufficient_fund() { }); } +/// Tests that the EthereumInboundQueue CreateAssetCall parameter on BridgeHub matches +/// the ForeignAssets::create call on AsseHub. #[test] fn asset_hub_foreign_account_pallet_is_configured_correctly_in_bridge_hub() { let assethub_sovereign = BridgeHubPolkadot::sovereign_account_id_of(Location::new( From 998a15620b3ff2f486a350e911c90983e18eb983 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Wed, 6 Mar 2024 09:12:29 +0200 Subject: [PATCH 262/316] set gateway address to 0 --- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 3 ++- system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 0b4695bf44..a199f7e40e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -509,7 +509,8 @@ impl pallet_utility::Config for Runtime { // Ethereum Bridge parameter_types! { - pub storage EthereumGatewayAddress: H160 = H160(hex_literal::hex!("EDa338E4dC46038493b885327842fD3E301CaB39")); + // The gateway address is set by governance. + pub storage EthereumGatewayAddress: H160 = H160::zero(); } parameter_types! { diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 7b737d4389..0ccdcbcbfa 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -510,7 +510,8 @@ impl pallet_utility::Config for Runtime { // Ethereum Bridge parameter_types! { - pub storage EthereumGatewayAddress: H160 = H160(hex_literal::hex!("EDa338E4dC46038493b885327842fD3E301CaB39")); + // The gateway address is set by governance. + pub storage EthereumGatewayAddress: H160 = H160::zero();; } parameter_types! { From 96913f97d740e5768511d9bd93443bfc6603e652 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Wed, 6 Mar 2024 09:53:16 +0200 Subject: [PATCH 263/316] remove double semi colon --- system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 0ccdcbcbfa..c4f5541817 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -511,7 +511,7 @@ impl pallet_utility::Config for Runtime { // Ethereum Bridge parameter_types! { // The gateway address is set by governance. - pub storage EthereumGatewayAddress: H160 = H160::zero();; + pub storage EthereumGatewayAddress: H160 = H160::zero(); } parameter_types! { From 0f182364072a637f2800cdde25209551dfc4c066 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Wed, 6 Mar 2024 12:21:36 +0200 Subject: [PATCH 264/316] fix tests --- .../bridge-hub-kusama/src/tests/snowbridge.rs | 69 ++++++---- .../src/tests/snowbridge.rs | 120 +++++++----------- .../bridge-hub-kusama/src/xcm_config.rs | 1 - .../bridge-hub-polkadot/src/xcm_config.rs | 1 - 4 files changed, 93 insertions(+), 98 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index 6aeec8507b..72c4a269e6 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -14,7 +14,9 @@ // limitations under the License. use crate::*; use asset_hub_kusama_runtime::xcm_config::bridging::to_ethereum::BridgeHubEthereumBaseFee; -use bridge_hub_kusama_runtime::{EthereumBeaconClient, EthereumInboundQueue, RuntimeOrigin}; +use bridge_hub_kusama_runtime::{ + EthereumBeaconClient, EthereumGatewayAddress, EthereumInboundQueue, RuntimeOrigin, +}; use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; use frame_support::pallet_prelude::TypeInfo; @@ -32,7 +34,7 @@ use snowbridge_pallet_inbound_queue_fixtures::{ use snowbridge_router_primitives::inbound::{ Command, Destination, GlobalConsensusEthereumConvertsFor, MessageV1, VersionedMessage, }; -use sp_core::H256; +use sp_core::{H160, H256}; use sp_runtime::{DispatchError::Token, TokenError::FundsUnavailable}; use system_parachains_constants::kusama::snowbridge::EthereumNetwork; @@ -42,6 +44,7 @@ const TREASURY_ACCOUNT: [u8; 32] = hex!("6d6f646c70792f74727372790000000000000000000000000000000000000000"); const WETH: [u8; 20] = hex!("87d1f7fdfEe7f651FaBc8bFCB6E086C278b77A7d"); const ETHEREUM_DESTINATION_ADDRESS: [u8; 20] = hex!("44a57ee2f2FCcb85FDa2B0B18EBD0D8D2333700e"); +const GATEWAY_ADDRESS: [u8; 20] = hex!("EDa338E4dC46038493b885327842fD3E301CaB39"); #[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] pub enum ControlCall { @@ -218,6 +221,10 @@ fn register_weth_token_from_ethereum_to_asset_hub() { BridgeHubKusama::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![(EthereumGatewayAddress::key().to_vec(), H160(GATEWAY_ADDRESS).encode())], + )); // Construct RegisterToken message and sent to inbound queue let register_token_message = make_register_token_message(); send_inbound_message(register_token_message.clone()).unwrap(); @@ -251,25 +258,14 @@ fn send_token_from_ethereum_to_penpal() { [Parachain(AssetHubKusama::para_id().into())], )); - // Fund PenPal sender and receiver - PenpalA::fund_accounts(vec![ - (PenpalAReceiver::get(), INITIAL_FUND), - (PenpalASender::get(), INITIAL_FUND), - ]); - // The Weth asset location, identified by the contract address on Ethereum let weth_asset_location: Location = (Parent, Parent, EthereumNetwork::get(), AccountKey20 { network: None, key: WETH }).into(); // Converts the Weth asset location into an asset ID let weth_asset_id: v3::Location = weth_asset_location.try_into().unwrap(); - let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); - // Fund ethereum sovereign on AssetHub - let ethereum_sovereign: AccountId = - GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location) - .unwrap(); - AssetHubKusama::fund_accounts(vec![(ethereum_sovereign.clone(), INITIAL_FUND)]); + AssetHubKusama::fund_accounts(vec![(ethereum_sovereign_account(), INITIAL_FUND)]); // Create asset on the Penpal parachain. PenpalA::execute_with(|| { @@ -366,13 +362,17 @@ fn send_token_from_ethereum_to_penpal() { #[test] fn send_token_from_ethereum_to_asset_hub() { BridgeHubKusama::fund_para_sovereign(AssetHubKusama::para_id().into(), INITIAL_FUND); - - // Fund ethereum sovereign on AssetHub - AssetHubKusama::fund_accounts(vec![(AssetHubKusamaReceiver::get(), INITIAL_FUND)]); + // Fund ethereum sovereign account on AssetHub. + AssetHubKusama::fund_accounts(vec![(ethereum_sovereign_account(), INITIAL_FUND)]); BridgeHubKusama::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![(EthereumGatewayAddress::key().to_vec(), H160(GATEWAY_ADDRESS).encode())], + )); + // Construct RegisterToken message and sent to inbound queue send_inbound_message(make_register_token_message()).unwrap(); @@ -419,8 +419,14 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { XCM_VERSION, ); - BridgeHubKusama::fund_accounts(vec![(assethub_sovereign.clone(), INITIAL_FUND)]); - AssetHubKusama::fund_accounts(vec![(AssetHubKusamaReceiver::get(), INITIAL_FUND)]); + BridgeHubKusama::fund_accounts(vec![ + (assethub_sovereign.clone(), INITIAL_FUND), + (TREASURY_ACCOUNT.into(), INITIAL_FUND), + ]); + AssetHubKusama::fund_accounts(vec![ + (AssetHubPolkadotReceiver::get(), INITIAL_FUND), + (ethereum_sovereign_account(), INITIAL_FUND), + ]); const WETH_AMOUNT: u128 = 1_000_000_000; let base_fee = 2_750_872_500_000u128; @@ -436,6 +442,11 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { BridgeHubKusama::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![(EthereumGatewayAddress::key().to_vec(), H160(GATEWAY_ADDRESS).encode())], + )); + // Construct RegisterToken message and sent to inbound queue send_inbound_message(make_register_token_message()).unwrap(); @@ -496,14 +507,14 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { AssetHubKusamaReceiver::get(), ); // Send the Weth back to Ethereum - ::PolkadotXcm::reserve_transfer_assets( + assert_ok!(::PolkadotXcm::reserve_transfer_assets( RuntimeOrigin::signed(AssetHubKusamaReceiver::get()), Box::new(destination), Box::new(beneficiary), Box::new(multi_assets), 0, - ) - .unwrap(); + )); + let free_balance_after = ::Balances::free_balance( AssetHubKusamaReceiver::get(), ); @@ -551,6 +562,11 @@ fn register_weth_token_in_asset_hub_fail_for_insufficient_fee() { BridgeHubKusama::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![(EthereumGatewayAddress::key().to_vec(), H160(GATEWAY_ADDRESS).encode())], + )); + // Construct RegisterToken message and sent to inbound queue let message = make_register_token_with_infufficient_fee_message(); send_inbound_message(message).unwrap(); @@ -581,6 +597,11 @@ fn send_token_from_ethereum_to_asset_hub_fail_for_insufficient_fund() { BridgeHubKusama::fund_para_sovereign(AssetHubKusama::para_id().into(), 1_000); BridgeHubKusama::execute_with(|| { + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![(EthereumGatewayAddress::key().to_vec(), H160(GATEWAY_ADDRESS).encode())], + )); + assert_err!(send_inbound_message(make_register_token_message()), Token(FundsUnavailable)); }); } @@ -618,7 +639,7 @@ fn ethereum_sovereign_account() -> AccountId { GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location).unwrap() } -pub fn make_register_token_message() -> InboundQueueFixture { +fn make_register_token_message() -> InboundQueueFixture { InboundQueueFixture { execution_header: CompactExecutionHeader{ parent_hash: hex!("d5de3dd02c96dbdc8aaa4db70a1e9fdab5ded5f4d52f18798acd56a3d37d1ad6").into(), @@ -649,7 +670,7 @@ pub fn make_register_token_message() -> InboundQueueFixture { } } -pub fn make_send_token_message() -> InboundQueueFixture { +fn make_send_token_message() -> InboundQueueFixture { InboundQueueFixture { execution_header: CompactExecutionHeader{ parent_hash: hex!("920cecde45d428e3a77590b70f8533cf4c2c36917b8a7b74c915e7fa3dae7075").into(), diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index 52992e681c..ae550b785e 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -14,7 +14,9 @@ // limitations under the License. use crate::*; use asset_hub_polkadot_runtime::xcm_config::bridging::to_ethereum::BridgeHubEthereumBaseFee; -use bridge_hub_polkadot_runtime::{EthereumBeaconClient, EthereumInboundQueue, RuntimeOrigin}; +use bridge_hub_polkadot_runtime::{ + EthereumBeaconClient, EthereumGatewayAddress, EthereumInboundQueue, RuntimeOrigin, +}; use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; use frame_support::pallet_prelude::TypeInfo; @@ -32,7 +34,7 @@ use snowbridge_pallet_inbound_queue_fixtures::{ use snowbridge_router_primitives::inbound::{ Command, Destination, GlobalConsensusEthereumConvertsFor, MessageV1, VersionedMessage, }; -use sp_core::H256; +use sp_core::{H160, H256}; use sp_runtime::{DispatchError::Token, TokenError::FundsUnavailable}; use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; @@ -42,6 +44,7 @@ const TREASURY_ACCOUNT: [u8; 32] = hex!("6d6f646c70792f74727372790000000000000000000000000000000000000000"); const WETH: [u8; 20] = hex!("87d1f7fdfEe7f651FaBc8bFCB6E086C278b77A7d"); const ETHEREUM_DESTINATION_ADDRESS: [u8; 20] = hex!("44a57ee2f2FCcb85FDa2B0B18EBD0D8D2333700e"); +const GATEWAY_ADDRESS: [u8; 20] = hex!("EDa338E4dC46038493b885327842fD3E301CaB39"); #[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] pub enum ControlCall { @@ -218,6 +221,10 @@ fn register_weth_token_from_ethereum_to_asset_hub() { BridgeHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![(EthereumGatewayAddress::key().to_vec(), H160(GATEWAY_ADDRESS).encode())], + )); // Construct RegisterToken message and sent to inbound queue let register_token_message = make_register_token_message(); send_inbound_message(register_token_message.clone()).unwrap(); @@ -256,21 +263,16 @@ fn send_token_from_ethereum_to_penpal() { (Parent, Parent, EthereumNetwork::get(), AccountKey20 { network: None, key: WETH }).into(); // Converts the Weth asset location into an asset ID let weth_asset_id: v3::Location = weth_asset_location.try_into().unwrap(); - let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); // Fund ethereum sovereign on AssetHub - let ethereum_sovereign: AccountId = - GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location) - .unwrap(); - AssetHubPolkadot::fund_accounts(vec![(ethereum_sovereign.clone(), INITIAL_FUND)]); + AssetHubPolkadot::fund_accounts(vec![(ethereum_sovereign_account(), INITIAL_FUND)]); // Create asset on the Penpal parachain. PenpalB::execute_with(|| { - assert_ok!(::ForeignAssets::force_create( - ::RuntimeOrigin::root(), + assert_ok!(::ForeignAssets::create( + ::RuntimeOrigin::signed(PenpalBSender::get()), weth_asset_id, asset_hub_sovereign.clone().into(), - true, 1000, )); @@ -360,38 +362,17 @@ fn send_token_from_ethereum_to_penpal() { #[test] fn send_token_from_ethereum_to_asset_hub() { BridgeHubPolkadot::fund_para_sovereign(AssetHubPolkadot::para_id().into(), INITIAL_FUND); - - // Fund ethereum sovereign on AssetHub - AssetHubPolkadot::fund_accounts(vec![(AssetHubPolkadotReceiver::get(), INITIAL_FUND)]); - - let asset_hub_sovereign = BridgeHubPolkadot::sovereign_account_id_of(Location::new( - 1, - [Parachain(AssetHubPolkadot::para_id().into())], - )); - - // The Weth asset location, identified by the contract address on Ethereum - let weth_asset_location: Location = - (Parent, Parent, EthereumNetwork::get(), AccountKey20 { network: None, key: WETH }).into(); - // Converts the Weth asset location into an asset ID - let weth_asset_id: v3::Location = weth_asset_location.try_into().unwrap(); - - AssetHubPolkadot::execute_with(|| { - assert_ok!(::ForeignAssets::force_create( - ::RuntimeOrigin::root(), - weth_asset_id, - asset_hub_sovereign.clone().into(), - true, - 1000, - )); - - assert!(::ForeignAssets::asset_exists( - weth_asset_id - )); - }); + // Fund ethereum sovereign account on AssetHub. + AssetHubPolkadot::fund_accounts(vec![(ethereum_sovereign_account(), INITIAL_FUND)]); BridgeHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![(EthereumGatewayAddress::key().to_vec(), H160(GATEWAY_ADDRESS).encode())], + )); + // Construct RegisterToken message and sent to inbound queue send_inbound_message(make_register_token_message()).unwrap(); @@ -442,7 +423,10 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { (assethub_sovereign.clone(), INITIAL_FUND), (TREASURY_ACCOUNT.into(), INITIAL_FUND), ]); - AssetHubPolkadot::fund_accounts(vec![(AssetHubPolkadotReceiver::get(), INITIAL_FUND)]); + AssetHubPolkadot::fund_accounts(vec![ + (AssetHubPolkadotReceiver::get(), INITIAL_FUND), + (ethereum_sovereign_account(), INITIAL_FUND), + ]); const WETH_AMOUNT: u128 = 1_000_000_000; let base_fee = 2_750_872_500_000u128; @@ -455,34 +439,14 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { .unwrap(); }); - let asset_hub_sovereign = BridgeHubPolkadot::sovereign_account_id_of(Location::new( - 1, - [Parachain(AssetHubPolkadot::para_id().into())], - )); - - // The Weth asset location, identified by the contract address on Ethereum - let weth_asset_location: Location = - (Parent, Parent, EthereumNetwork::get(), AccountKey20 { network: None, key: WETH }).into(); - // Converts the Weth asset location into an asset ID - let weth_asset_id: v3::Location = weth_asset_location.try_into().unwrap(); - - AssetHubPolkadot::execute_with(|| { - assert_ok!(::ForeignAssets::force_create( - ::RuntimeOrigin::root(), - weth_asset_id, - asset_hub_sovereign.clone().into(), - true, - 1000, - )); - - assert!(::ForeignAssets::asset_exists( - weth_asset_id - )); - }); - BridgeHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![(EthereumGatewayAddress::key().to_vec(), H160(GATEWAY_ADDRESS).encode())], + )); + // Construct RegisterToken message and sent to inbound queue send_inbound_message(make_register_token_message()).unwrap(); @@ -544,14 +508,16 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { AssetHubPolkadotReceiver::get(), ); // Send the Weth back to Ethereum - ::PolkadotXcm::reserve_transfer_assets( - RuntimeOrigin::signed(AssetHubPolkadotReceiver::get()), - Box::new(destination), - Box::new(beneficiary), - Box::new(multi_assets), - 0, - ) - .unwrap(); + assert_ok!( + ::PolkadotXcm::reserve_transfer_assets( + RuntimeOrigin::signed(AssetHubPolkadotReceiver::get()), + Box::new(destination), + Box::new(beneficiary), + Box::new(multi_assets), + 0, + ) + ); + let free_balance_after = ::Balances::free_balance( AssetHubPolkadotReceiver::get(), @@ -600,6 +566,11 @@ fn register_weth_token_in_asset_hub_fail_for_insufficient_fee() { BridgeHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![(EthereumGatewayAddress::key().to_vec(), H160(GATEWAY_ADDRESS).encode())], + )); + // Construct RegisterToken message and sent to inbound queue let message = make_register_token_with_infufficient_fee_message(); send_inbound_message(message).unwrap(); @@ -630,6 +601,11 @@ fn send_token_from_ethereum_to_asset_hub_fail_for_insufficient_fund() { BridgeHubPolkadot::fund_para_sovereign(AssetHubPolkadot::para_id().into(), 1_000); BridgeHubPolkadot::execute_with(|| { + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![(EthereumGatewayAddress::key().to_vec(), H160(GATEWAY_ADDRESS).encode())], + )); + assert_err!(send_inbound_message(make_register_token_message()), Token(FundsUnavailable)); }); } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 1685315916..d32346778f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -25,7 +25,6 @@ use super::{ use frame_support::{ parameter_types, traits::{ConstU32, Contains, Equals, Everything, Nothing}, - StoragePrefixedMap, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 09c6141b67..a748d97586 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -25,7 +25,6 @@ use super::{ use frame_support::{ parameter_types, traits::{ConstU32, Contains, Equals, Everything, Nothing}, - StoragePrefixedMap, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; From 042aa1b6f3ea74bf7118b42ed86254f9acdd7f47 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Wed, 6 Mar 2024 13:32:34 +0200 Subject: [PATCH 265/316] decrease kusama local reward --- .../tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs | 5 ++++- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index 72c4a269e6..d35cd4d5f1 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -213,6 +213,9 @@ fn create_channel() { /// Tests the registering of a token as an asset on AssetHub. #[test] fn register_weth_token_from_ethereum_to_asset_hub() { + let parameters = bridge_hub_kusama_runtime::Parameters::get(); + + println!("LOCAL: {:?}", parameters.rewards.local); // Fund AH sovereign account on BH so that it can pay execution fees. BridgeHubKusama::fund_para_sovereign(AssetHubKusama::para_id().into(), INITIAL_FUND); // Fund ethereum sovereign account on AssetHub. @@ -227,7 +230,7 @@ fn register_weth_token_from_ethereum_to_asset_hub() { )); // Construct RegisterToken message and sent to inbound queue let register_token_message = make_register_token_message(); - send_inbound_message(register_token_message.clone()).unwrap(); + assert_ok!(send_inbound_message(register_token_message.clone())); assert_expected_events!( BridgeHubKusama, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index a199f7e40e..5c65941f50 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -43,7 +43,7 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, Keccak256}, transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, FixedU128, + ApplyExtrinsicResult, FixedPointNumber, FixedU128, }; use sp_std::prelude::*; @@ -520,7 +520,7 @@ parameter_types! { pub Parameters: PricingParameters = PricingParameters { exchange_rate: FixedU128::from_rational(1, 75), fee_per_gas: gwei(20), - rewards: Rewards { local: 1 * UNITS, remote: meth(1) } + rewards: Rewards { local: 1 * UNITS / 100, remote: meth(1) } // 0.01 KSM }; } From 2ccc22fe7455fc372c258c132b305536f3265c30 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Wed, 6 Mar 2024 13:33:13 +0200 Subject: [PATCH 266/316] remove print --- .../tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index d35cd4d5f1..e81cd19cf1 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -213,9 +213,6 @@ fn create_channel() { /// Tests the registering of a token as an asset on AssetHub. #[test] fn register_weth_token_from_ethereum_to_asset_hub() { - let parameters = bridge_hub_kusama_runtime::Parameters::get(); - - println!("LOCAL: {:?}", parameters.rewards.local); // Fund AH sovereign account on BH so that it can pay execution fees. BridgeHubKusama::fund_para_sovereign(AssetHubKusama::para_id().into(), INITIAL_FUND); // Fund ethereum sovereign account on AssetHub. From ea8def4c39b9f462202279fe81e229635bb6171f Mon Sep 17 00:00:00 2001 From: Clara van Staden Date: Wed, 6 Mar 2024 13:39:09 +0200 Subject: [PATCH 267/316] Update integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml Co-authored-by: Branislav Kontur --- .../emulated/chains/parachains/testing/penpal/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml b/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml index 8b667451c0..72ccb5d5e8 100644 --- a/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml @@ -17,6 +17,7 @@ frame-support = { version = "29.0.0" } parachains-common = { version = "8.0.0" } cumulus-primitives-core = { version = "0.8.0" } emulated-integration-tests-common = { version = "4.0.0" } +# TODO: remove `penpal-runtime-dotsama` with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) # temp crate until EthereumNetwork is extracted from penpal definition penpal-runtime = { package="penpal-runtime-dotsama", path = "../../../../penpal" } #penpal-runtime = { version = "0.15.0" } From c2cebc2e2b063cf74cb9389fd54c42e9846fa6be Mon Sep 17 00:00:00 2001 From: Clara van Staden Date: Wed, 6 Mar 2024 13:39:17 +0200 Subject: [PATCH 268/316] Update integration-tests/emulated/penpal/Cargo.toml Co-authored-by: Branislav Kontur --- integration-tests/emulated/penpal/Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integration-tests/emulated/penpal/Cargo.toml b/integration-tests/emulated/penpal/Cargo.toml index 7833c7fb8d..f7e6c1efed 100644 --- a/integration-tests/emulated/penpal/Cargo.toml +++ b/integration-tests/emulated/penpal/Cargo.toml @@ -2,7 +2,8 @@ name = "penpal-runtime-dotsama" version = "0.14.0" authors = ["Anonymous"] -description = "A parachain for communication back and forth with XCM of assets and uniques." +description = "TODO: remove `penpal-runtime-dotsama` with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) - A parachain for communication back and forth with XCM of assets and uniques." +publish = false license = "Unlicense" homepage = "https://substrate.io" repository.workspace = true From b7fe301e8f84b555912c683bf0645d0c3d8950fc Mon Sep 17 00:00:00 2001 From: Clara van Staden Date: Wed, 6 Mar 2024 13:39:23 +0200 Subject: [PATCH 269/316] Update integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml Co-authored-by: Branislav Kontur --- .../emulated/tests/bridges/bridge-hub-kusama/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml index ec59ffe70e..f91b8e001c 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml @@ -8,7 +8,7 @@ description = "Bridge Hub Kusama runtime integration tests with xcm-emulator" publish = false [dependencies] -codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false } +codec = { package = "parity-scale-codec", version = "3.6.9" } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } hex-literal = "0.4.1" From 841df0e5c288d044af82a03799c8b76d83d250fb Mon Sep 17 00:00:00 2001 From: Clara van Staden Date: Wed, 6 Mar 2024 13:39:29 +0200 Subject: [PATCH 270/316] Update integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml Co-authored-by: Branislav Kontur --- .../emulated/tests/bridges/bridge-hub-kusama/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml index f91b8e001c..7b24c1df33 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml @@ -43,7 +43,7 @@ kusama-system-emulated-network = { path = "../../../networks/kusama-system" } system-parachains-constants = { path = "../../../../../system-parachains/constants" } # Snowbridge -snowbridge-beacon-primitives = { default-features = false , version = "0.1.0" } +snowbridge-beacon-primitives = { version = "0.1.0" } snowbridge-core = { version = "0.1.0" } snowbridge-router-primitives = { version = "0.1.0" } snowbridge-pallet-system = { version = "0.1.0" } From eef1d6d78c390bc012a3b95a29aa68a5e0a2d35b Mon Sep 17 00:00:00 2001 From: Clara van Staden Date: Wed, 6 Mar 2024 13:39:37 +0200 Subject: [PATCH 271/316] Update integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml Co-authored-by: Branislav Kontur --- .../emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml index 995c4197b2..5346d56d3f 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml @@ -8,7 +8,7 @@ description = "Bridge Hub Polkadot runtime integration tests with xcm-emulator" publish = false [dependencies] -codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false } +codec = { package = "parity-scale-codec", version = "3.6.9" } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } hex-literal = "0.4.1" From f27977bc86004a974c8afa40063a89d5d9f11e99 Mon Sep 17 00:00:00 2001 From: Clara van Staden Date: Wed, 6 Mar 2024 13:39:45 +0200 Subject: [PATCH 272/316] Update integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml Co-authored-by: Branislav Kontur --- .../emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml index 5346d56d3f..13e1c44f81 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml @@ -43,7 +43,7 @@ polkadot-system-emulated-network = { path = "../../../networks/polkadot-system" system-parachains-constants = { path = "../../../../../system-parachains/constants" } # Snowbridge -snowbridge-beacon-primitives = { default-features = false , version = "0.1.0" } +snowbridge-beacon-primitives = { version = "0.1.0" } snowbridge-core = { version = "0.1.0" } snowbridge-router-primitives = { version = "0.1.0" } snowbridge-pallet-system = { version = "0.1.0" } From dfeb4b2984e1d06ba1d1e9486c6a5bdff99f37d3 Mon Sep 17 00:00:00 2001 From: Clara van Staden Date: Wed, 6 Mar 2024 13:39:58 +0200 Subject: [PATCH 273/316] Update integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs Co-authored-by: Branislav Kontur --- .../tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index e81cd19cf1..5ffff1ea6c 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -374,10 +374,10 @@ fn send_token_from_ethereum_to_asset_hub() { )); // Construct RegisterToken message and sent to inbound queue - send_inbound_message(make_register_token_message()).unwrap(); + assert_ok!(send_inbound_message(make_register_token_message())); // Construct SendToken message and sent to inbound queue - send_inbound_message(make_send_token_message()).unwrap(); + assert_ok!(send_inbound_message(make_send_token_message())); // Check that the message was sent assert_expected_events!( From fdea2730c3a36229f273e6c8f2d0393e03730206 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Wed, 6 Mar 2024 13:54:28 +0200 Subject: [PATCH 274/316] replace unwrap with assert_ok --- .../bridge-hub-kusama/src/tests/snowbridge.rs | 16 ++++++-------- .../src/tests/snowbridge.rs | 22 +++++++++---------- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index 5ffff1ea6c..0347db5161 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -299,12 +299,11 @@ fn send_token_from_ethereum_to_penpal() { type RuntimeOrigin = ::RuntimeOrigin; // Fund AssetHub sovereign account so it can pay execution fees for the asset transfer - ::Balances::force_set_balance( + assert_ok!(::Balances::force_set_balance( RuntimeOrigin::root(), asset_hub_sovereign.clone().into(), INITIAL_FUND, - ) - .unwrap(); + )); let message_id: H256 = [1; 32].into(); let message = VersionedMessage::V1(MessageV1 { @@ -432,11 +431,10 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { let base_fee = 2_750_872_500_000u128; AssetHubKusama::execute_with(|| { - ::System::set_storage( + assert_ok!(::System::set_storage( ::RuntimeOrigin::root(), vec![(BridgeHubEthereumBaseFee::key().to_vec(), base_fee.encode())], - ) - .unwrap(); + )); }); BridgeHubKusama::execute_with(|| { @@ -448,7 +446,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { )); // Construct RegisterToken message and sent to inbound queue - send_inbound_message(make_register_token_message()).unwrap(); + assert_ok!(send_inbound_message(make_register_token_message())); // Check that the register token message was sent using xcm assert_expected_events!( @@ -459,7 +457,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { ); // Construct SendToken message and sent to inbound queue - send_inbound_message(make_send_token_message()).unwrap(); + assert_ok!(send_inbound_message(make_send_token_message())); // Check that the send token message was sent using xcm assert_expected_events!( @@ -569,7 +567,7 @@ fn register_weth_token_in_asset_hub_fail_for_insufficient_fee() { // Construct RegisterToken message and sent to inbound queue let message = make_register_token_with_infufficient_fee_message(); - send_inbound_message(message).unwrap(); + assert_ok!(send_inbound_message(message)); assert_expected_events!( BridgeHubKusama, diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index ae550b785e..b24757eb9e 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -227,7 +227,7 @@ fn register_weth_token_from_ethereum_to_asset_hub() { )); // Construct RegisterToken message and sent to inbound queue let register_token_message = make_register_token_message(); - send_inbound_message(register_token_message.clone()).unwrap(); + assert_ok!(send_inbound_message(register_token_message.clone())); assert_expected_events!( BridgeHubPolkadot, @@ -299,12 +299,11 @@ fn send_token_from_ethereum_to_penpal() { type RuntimeOrigin = ::RuntimeOrigin; // Fund AssetHub sovereign account so it can pay execution fees for the asset transfer - ::Balances::force_set_balance( + assert_ok!(::Balances::force_set_balance( RuntimeOrigin::root(), asset_hub_sovereign.clone().into(), INITIAL_FUND, - ) - .unwrap(); + )); let message_id: H256 = [1; 32].into(); let message = VersionedMessage::V1(MessageV1 { @@ -374,10 +373,10 @@ fn send_token_from_ethereum_to_asset_hub() { )); // Construct RegisterToken message and sent to inbound queue - send_inbound_message(make_register_token_message()).unwrap(); + assert_ok!(send_inbound_message(make_register_token_message())); // Construct SendToken message and sent to inbound queue - send_inbound_message(make_send_token_message()).unwrap(); + assert_ok!(send_inbound_message(make_send_token_message())); // Check that the message was sent assert_expected_events!( @@ -432,11 +431,10 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { let base_fee = 2_750_872_500_000u128; AssetHubPolkadot::execute_with(|| { - ::System::set_storage( + assert_ok!(::System::set_storage( ::RuntimeOrigin::root(), vec![(BridgeHubEthereumBaseFee::key().to_vec(), base_fee.encode())], - ) - .unwrap(); + )); }); BridgeHubPolkadot::execute_with(|| { @@ -448,7 +446,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { )); // Construct RegisterToken message and sent to inbound queue - send_inbound_message(make_register_token_message()).unwrap(); + assert_ok!(send_inbound_message(make_register_token_message())); // Check that the register token message was sent using xcm assert_expected_events!( @@ -459,7 +457,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { ); // Construct SendToken message and sent to inbound queue - send_inbound_message(make_send_token_message()).unwrap(); + assert_ok!(send_inbound_message(make_send_token_message())); // Check that the send token message was sent using xcm assert_expected_events!( @@ -573,7 +571,7 @@ fn register_weth_token_in_asset_hub_fail_for_insufficient_fee() { // Construct RegisterToken message and sent to inbound queue let message = make_register_token_with_infufficient_fee_message(); - send_inbound_message(message).unwrap(); + assert_ok!(send_inbound_message(message)); assert_expected_events!( BridgeHubPolkadot, From 9c17c3ab94631516a50fd8ad734484c88819c8fd Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Wed, 6 Mar 2024 13:58:40 +0200 Subject: [PATCH 275/316] update penpal versions --- integration-tests/emulated/penpal/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-tests/emulated/penpal/Cargo.toml b/integration-tests/emulated/penpal/Cargo.toml index f7e6c1efed..4276fb2486 100644 --- a/integration-tests/emulated/penpal/Cargo.toml +++ b/integration-tests/emulated/penpal/Cargo.toml @@ -16,11 +16,11 @@ targets = ["x86_64-unknown-linux-gnu"] substrate-wasm-builder = { optional = true , version = "18.0.0" } [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive"] } hex-literal = { version = "0.4.1", optional = true } log = { version = "0.4.20", default-features = false } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } -smallvec = "1.11.0" +smallvec = "1.13.1" # Substrate frame-benchmarking = { default-features = false, optional = true, version = "29.0.0" } From e27594631f1d3d6c7b6b4dbbad7b4a6b0d905636 Mon Sep 17 00:00:00 2001 From: Clara van Staden Date: Wed, 6 Mar 2024 15:03:31 +0200 Subject: [PATCH 276/316] Update system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs Co-authored-by: Svyatoslav Nikolsky --- system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index c4f5541817..73f3262bef 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -518,7 +518,7 @@ parameter_types! { pub const CreateAssetCall: [u8;2] = [53, 0]; pub const CreateAssetDeposit: u128 = (UNITS / 10) + EXISTENTIAL_DEPOSIT; pub const InboundQueuePalletInstance: u8 = system_parachains_constants::polkadot::snowbridge::INBOUND_QUEUE_PALLET_INDEX; - pub Parameters: PricingParameters = PricingParameters { + pub Parameters: PricingParameters = PricingParameters { exchange_rate: FixedU128::from_rational(1, 400), fee_per_gas: gwei(20), rewards: Rewards { local: 1 * UNITS, remote: meth(1) } From e8e66a3298d77b6a60647d580434dceacb1dc8e0 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Wed, 6 Mar 2024 15:16:10 +0200 Subject: [PATCH 277/316] adds check foreign asset deposit test --- .../bridge-hub-kusama/src/tests/snowbridge.rs | 19 +++++++++++++++++-- .../src/tests/snowbridge.rs | 18 ++++++++++++++++-- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index 0347db5161..5afa029626 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -605,9 +605,9 @@ fn send_token_from_ethereum_to_asset_hub_fail_for_insufficient_fund() { } /// Tests that the EthereumInboundQueue CreateAssetCall parameter on BridgeHub matches -/// the ForeignAssets::create call on AsseHub. +/// the ForeignAssets::create call on AssetHub. #[test] -fn asset_hub_foreign_account_pallet_is_configured_correctly_in_bridge_hub() { +fn asset_hub_foreign_assets_pallet_is_configured_correctly_in_bridge_hub() { let assethub_sovereign = BridgeHubKusama::sovereign_account_id_of(Location::new( 1, [Parachain(AssetHubKusama::para_id().into())], @@ -632,6 +632,21 @@ fn asset_hub_foreign_account_pallet_is_configured_correctly_in_bridge_hub() { ); } + +/// Tests that the EthereumInboundQueue CreateAssetDeposit on BridgeHub is larger than the +/// ForeignAssets AssetDeposit config on AssetHub. +#[test] +fn bridge_hub_inbound_queue_deposit_config_is_larger_than_asset_hub_foreign_asset_pallet_deposit() { + let asset_deposit = asset_hub_kusama_runtime::ForeignAssetsAssetDeposit::get(); + + let bridge_hub_inbound_queue_asset_deposit = + bridge_hub_kusama_runtime::CreateAssetDeposit::get(); + + assert!( + bridge_hub_inbound_queue_asset_deposit > asset_deposit + ); +} + fn ethereum_sovereign_account() -> AccountId { let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location).unwrap() diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index b24757eb9e..7458c6a89a 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -609,9 +609,9 @@ fn send_token_from_ethereum_to_asset_hub_fail_for_insufficient_fund() { } /// Tests that the EthereumInboundQueue CreateAssetCall parameter on BridgeHub matches -/// the ForeignAssets::create call on AsseHub. +/// the ForeignAssets::create call on AssetHub. #[test] -fn asset_hub_foreign_account_pallet_is_configured_correctly_in_bridge_hub() { +fn asset_hub_foreign_assets_pallet_is_configured_correctly_in_bridge_hub() { let assethub_sovereign = BridgeHubPolkadot::sovereign_account_id_of(Location::new( 1, [Parachain(AssetHubPolkadot::para_id().into())], @@ -636,6 +636,20 @@ fn asset_hub_foreign_account_pallet_is_configured_correctly_in_bridge_hub() { ); } +/// Tests that the EthereumInboundQueue CreateAssetDeposit on BridgeHub is larger than the +/// ForeignAssets AssetDeposit config on AssetHub. +#[test] +fn bridge_hub_inbound_queue_deposit_config_is_larger_than_asset_hub_foreign_asset_pallet_deposit() { + let asset_deposit = asset_hub_polkadot_runtime::ForeignAssetsAssetDeposit::get(); + + let bridge_hub_inbound_queue_asset_deposit = + bridge_hub_polkadot_runtime::CreateAssetDeposit::get(); + + assert!( + bridge_hub_inbound_queue_asset_deposit > asset_deposit + ); +} + fn ethereum_sovereign_account() -> AccountId { let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location).unwrap() From 952ec643f1d8a492188694569d1f5826977c8603 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Wed, 6 Mar 2024 15:20:38 +0200 Subject: [PATCH 278/316] fmt --- .../bridges/bridge-hub-kusama/src/tests/snowbridge.rs | 5 +---- .../bridges/bridge-hub-polkadot/src/tests/snowbridge.rs | 4 +--- .../bridge-hubs/bridge-hub-kusama/tests/tests.rs | 7 ++++--- .../bridge-hubs/bridge-hub-polkadot/tests/tests.rs | 7 ++++--- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index 5afa029626..5ee4fbbec4 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -632,7 +632,6 @@ fn asset_hub_foreign_assets_pallet_is_configured_correctly_in_bridge_hub() { ); } - /// Tests that the EthereumInboundQueue CreateAssetDeposit on BridgeHub is larger than the /// ForeignAssets AssetDeposit config on AssetHub. #[test] @@ -642,9 +641,7 @@ fn bridge_hub_inbound_queue_deposit_config_is_larger_than_asset_hub_foreign_asse let bridge_hub_inbound_queue_asset_deposit = bridge_hub_kusama_runtime::CreateAssetDeposit::get(); - assert!( - bridge_hub_inbound_queue_asset_deposit > asset_deposit - ); + assert!(bridge_hub_inbound_queue_asset_deposit > asset_deposit); } fn ethereum_sovereign_account() -> AccountId { diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index 7458c6a89a..6f7052c614 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -645,9 +645,7 @@ fn bridge_hub_inbound_queue_deposit_config_is_larger_than_asset_hub_foreign_asse let bridge_hub_inbound_queue_asset_deposit = bridge_hub_polkadot_runtime::CreateAssetDeposit::get(); - assert!( - bridge_hub_inbound_queue_asset_deposit > asset_deposit - ); + assert!(bridge_hub_inbound_queue_asset_deposit > asset_deposit); } fn ethereum_sovereign_account() -> AccountId { diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index 249d7308ce..0fc9e4208f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -27,9 +27,10 @@ use bridge_hub_kusama_runtime::{ KsmRelayLocation, LocationToAccountId, RelayNetwork, RelayTreasuryLocation, RelayTreasuryPalletAccount, XcmConfig, }, - AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, EthereumGatewayAddress, Executive, ExistentialDeposit, - ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, - SignedExtra, TransactionPayment, UncheckedExtrinsic, SLOT_DURATION, + AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, EthereumGatewayAddress, + Executive, ExistentialDeposit, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, + RuntimeEvent, RuntimeOrigin, SessionKeys, SignedExtra, TransactionPayment, UncheckedExtrinsic, + SLOT_DURATION, }; use bridge_hub_test_utils::{test_cases::from_parachain, SlotDurations}; use codec::{Decode, Encode}; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index 2fd629b233..b89fedf188 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -28,9 +28,10 @@ use bridge_hub_polkadot_runtime::{ DotRelayLocation, LocationToAccountId, RelayNetwork, RelayTreasuryLocation, RelayTreasuryPalletAccount, XcmConfig, }, - AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, EthereumGatewayAddress, Executive, ExistentialDeposit, - ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, - SignedExtra, TransactionPayment, UncheckedExtrinsic, SLOT_DURATION, + AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, EthereumGatewayAddress, + Executive, ExistentialDeposit, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, + RuntimeEvent, RuntimeOrigin, SessionKeys, SignedExtra, TransactionPayment, UncheckedExtrinsic, + SLOT_DURATION, }; use bridge_hub_test_utils::{test_cases::from_parachain, SlotDurations}; use codec::{Decode, Encode}; From 4a0d841746256bf7878f2c1fd64c4a2b868438f0 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Wed, 6 Mar 2024 15:36:02 +0200 Subject: [PATCH 279/316] simplify bridging table param --- .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 5 +---- .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 6043cd73ac..2aaa7d3bd5 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -699,10 +699,7 @@ pub mod bridging { .chain(to_polkadot::BridgeTable::get()) .collect(); - pub EthereumBridgeTable: sp_std::vec::Vec = - sp_std::vec::Vec::new().into_iter() - .chain(to_ethereum::BridgeTable::get()) - .collect(); + pub EthereumBridgeTable: sp_std::vec::Vec = to_ethereum::BridgeTable::get(); } pub type NetworkExportTable = xcm_builder::NetworkExportTable; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 48338622ad..45f7e39b17 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -649,10 +649,7 @@ pub mod bridging { .chain(to_kusama::BridgeTable::get()) .collect(); - pub EthereumBridgeTable: sp_std::vec::Vec = - sp_std::vec::Vec::new().into_iter() - .chain(to_ethereum::BridgeTable::get()) - .collect(); + pub EthereumBridgeTable: sp_std::vec::Vec = to_ethereum::BridgeTable::get(); } pub type NetworkExportTable = xcm_builder::NetworkExportTable; From c00fc1442d472949e0feeb1bf1c5f918f2b58d87 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Wed, 6 Mar 2024 15:46:02 +0200 Subject: [PATCH 280/316] adds pallet index check --- .../bridge-hub-kusama/src/tests/snowbridge.rs | 14 +++++++++++++- .../bridge-hub-polkadot/src/tests/snowbridge.rs | 14 +++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index 5ee4fbbec4..a210512a4c 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -19,7 +19,7 @@ use bridge_hub_kusama_runtime::{ }; use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; -use frame_support::pallet_prelude::TypeInfo; +use frame_support::{pallet_prelude::TypeInfo, traits::PalletInfoAccess}; use hex_literal::hex; use kusama_system_emulated_network::BridgeHubKusamaParaSender as BridgeHubKusamaSender; use snowbridge_beacon_primitives::CompactExecutionHeader; @@ -644,6 +644,18 @@ fn bridge_hub_inbound_queue_deposit_config_is_larger_than_asset_hub_foreign_asse assert!(bridge_hub_inbound_queue_asset_deposit > asset_deposit); } +/// Tests the EthereumInboundQueue pallet index matches the pallet constant. +#[test] +fn bridge_hub_inbound_queue_pallet_index_is_correct() { + let inbound_queue_inbound_queue_pallet_index = + ::EthereumInboundQueue::index(); + + assert_eq!( + inbound_queue_inbound_queue_pallet_index as u8, + system_parachains_constants::kusama::snowbridge::INBOUND_QUEUE_PALLET_INDEX + ); +} + fn ethereum_sovereign_account() -> AccountId { let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location).unwrap() diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index 6f7052c614..3dc05b7146 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -19,7 +19,7 @@ use bridge_hub_polkadot_runtime::{ }; use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; -use frame_support::pallet_prelude::TypeInfo; +use frame_support::{pallet_prelude::TypeInfo, traits::PalletInfoAccess}; use hex_literal::hex; use polkadot_system_emulated_network::BridgeHubPolkadotParaSender as BridgeHubPolkadotSender; use snowbridge_beacon_primitives::CompactExecutionHeader; @@ -648,6 +648,18 @@ fn bridge_hub_inbound_queue_deposit_config_is_larger_than_asset_hub_foreign_asse assert!(bridge_hub_inbound_queue_asset_deposit > asset_deposit); } +/// Tests the EthereumInboundQueue pallet index matches the pallet constant. +#[test] +fn bridge_hub_inbound_queue_pallet_index_is_correct() { + let inbound_queue_inbound_queue_pallet_index = + ::EthereumInboundQueue::index(); + + assert_eq!( + inbound_queue_inbound_queue_pallet_index as u8, + system_parachains_constants::polkadot::snowbridge::INBOUND_QUEUE_PALLET_INDEX + ); +} + fn ethereum_sovereign_account() -> AccountId { let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location).unwrap() From 9d53d6fd30093a5cc25c38026599cb572760ceba Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 7 Mar 2024 10:02:56 +0200 Subject: [PATCH 281/316] removed unused var --- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 5c65941f50..d692172cb1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -43,7 +43,7 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, Keccak256}, transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, FixedPointNumber, FixedU128, + ApplyExtrinsicResult, FixedU128, }; use sp_std::prelude::*; From 90ec4421ecbbad3fe151b8386288a1fe2edb7629 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 7 Mar 2024 10:13:06 +0200 Subject: [PATCH 282/316] update treasury accounts --- .../tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs | 2 +- .../tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index a210512a4c..f2309ac41f 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -41,7 +41,7 @@ use system_parachains_constants::kusama::snowbridge::EthereumNetwork; const INITIAL_FUND: u128 = 5_000_000_000 * KUSAMA_ED; const CHAIN_ID: u64 = 1; const TREASURY_ACCOUNT: [u8; 32] = - hex!("6d6f646c70792f74727372790000000000000000000000000000000000000000"); + hex!("da5026b2e34b876343bd6becae58eb5af71ec727633bfb972641fa7a89ff4988"); const WETH: [u8; 20] = hex!("87d1f7fdfEe7f651FaBc8bFCB6E086C278b77A7d"); const ETHEREUM_DESTINATION_ADDRESS: [u8; 20] = hex!("44a57ee2f2FCcb85FDa2B0B18EBD0D8D2333700e"); const GATEWAY_ADDRESS: [u8; 20] = hex!("EDa338E4dC46038493b885327842fD3E301CaB39"); diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index 3dc05b7146..106819acfa 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -41,7 +41,7 @@ use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; const INITIAL_FUND: u128 = 5_000_000_000 * POLKADOT_ED; const CHAIN_ID: u64 = 1; const TREASURY_ACCOUNT: [u8; 32] = - hex!("6d6f646c70792f74727372790000000000000000000000000000000000000000"); + hex!("af3e7da28608e13e4399cc7d14a57bdb154dde5f3d546f5f293994ef36ef7f11"); const WETH: [u8; 20] = hex!("87d1f7fdfEe7f651FaBc8bFCB6E086C278b77A7d"); const ETHEREUM_DESTINATION_ADDRESS: [u8; 20] = hex!("44a57ee2f2FCcb85FDa2B0B18EBD0D8D2333700e"); const GATEWAY_ADDRESS: [u8; 20] = hex!("EDa338E4dC46038493b885327842fD3E301CaB39"); From eed8cd9341914cb869328ea79d79cc9e52d27daf Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 7 Mar 2024 10:22:16 +0200 Subject: [PATCH 283/316] remove ethereum bridge constant --- .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 4 +--- .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 2aaa7d3bd5..91d5132a86 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -698,13 +698,11 @@ pub mod bridging { sp_std::vec::Vec::new().into_iter() .chain(to_polkadot::BridgeTable::get()) .collect(); - - pub EthereumBridgeTable: sp_std::vec::Vec = to_ethereum::BridgeTable::get(); } pub type NetworkExportTable = xcm_builder::NetworkExportTable; - pub type EthereumNetworkExportTable = xcm_builder::NetworkExportTable; + pub type EthereumNetworkExportTable = xcm_builder::NetworkExportTable; pub mod to_polkadot { use super::*; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 45f7e39b17..bbca46d472 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -648,13 +648,11 @@ pub mod bridging { sp_std::vec::Vec::new().into_iter() .chain(to_kusama::BridgeTable::get()) .collect(); - - pub EthereumBridgeTable: sp_std::vec::Vec = to_ethereum::BridgeTable::get(); } pub type NetworkExportTable = xcm_builder::NetworkExportTable; - pub type EthereumNetworkExportTable = xcm_builder::NetworkExportTable; + pub type EthereumNetworkExportTable = xcm_builder::NetworkExportTable; pub mod to_kusama { use super::*; From 3bc7a566730eff282f1a74ac07d370e12c0fe9e0 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 7 Mar 2024 10:30:48 +0200 Subject: [PATCH 284/316] remove ethereum bridge constant part2 --- .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 4 +--- .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 91d5132a86..13823c334c 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -613,7 +613,7 @@ pub type XcmRouter = WithUniqueTopic<( ToPolkadotXcmRouter, // Router which wraps and sends xcm to BridgeHub to be delivered to the Ethereum // GlobalConsensus - SovereignPaidRemoteExporter, + SovereignPaidRemoteExporter, XcmpQueue, UniversalLocation>, )>; impl pallet_xcm::Config for Runtime { @@ -702,8 +702,6 @@ pub mod bridging { pub type NetworkExportTable = xcm_builder::NetworkExportTable; - pub type EthereumNetworkExportTable = xcm_builder::NetworkExportTable; - pub mod to_polkadot { use super::*; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index bbca46d472..b5fd11c279 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -563,7 +563,7 @@ pub type XcmRouter = WithUniqueTopic<( ToKusamaXcmRouter, // Router which wraps and sends xcm to BridgeHub to be delivered to the Ethereum // GlobalConsensus - SovereignPaidRemoteExporter, + SovereignPaidRemoteExporter, XcmpQueue, UniversalLocation>, )>; impl pallet_xcm::Config for Runtime { @@ -652,8 +652,6 @@ pub mod bridging { pub type NetworkExportTable = xcm_builder::NetworkExportTable; - pub type EthereumNetworkExportTable = xcm_builder::NetworkExportTable; - pub mod to_kusama { use super::*; From b69de858eb603125cc4ae280f2255174b78cd206 Mon Sep 17 00:00:00 2001 From: Clara van Staden Date: Fri, 8 Mar 2024 09:10:03 +0200 Subject: [PATCH 285/316] Update CHANGELOG.md Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c35906d74..4d29f5933d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Feature for enabling debug prints in the Polkadot and Kusama runtime ([polkadot-fellows/runtimes#85](https://github.com/polkadot-fellows/runtimes/pull/85)) - Added new "Wish for Change" track ([polkadot-fellows/runtimes#184](https://github.com/polkadot-fellows/runtimes/pull/184)) - Enable Coretime and on-demand on Kusama ([polkadot-fellows/runtimes#159](https://github.com/polkadot-fellows/runtimes/pull/159) -- Adds Snowbridge to Kusama and Polkadot ([polkadot-fellows/runtimes#130](https://github.com/polkadot-fellows/runtimes/pull/130) +- Adds Snowbridge to Kusama and Polkadot ([polkadot-fellows/runtimes#130](https://github.com/polkadot-fellows/runtimes/pull/130)) ### Changed From bfa5e2066b51aa9f4ff2d397a0235ab29d1d1642 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Fri, 8 Mar 2024 09:24:33 +0200 Subject: [PATCH 286/316] adds tests for network table --- .../asset-hub-kusama/src/xcm_config.rs | 9 ++- .../asset-hub-kusama/tests/snowbridge.rs | 61 +++++++++++++++++++ .../asset-hub-polkadot/src/xcm_config.rs | 6 +- .../asset-hub-polkadot/tests/snowbridge.rs | 61 +++++++++++++++++++ 4 files changed, 134 insertions(+), 3 deletions(-) create mode 100644 system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs create mode 100644 system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 13823c334c..b39d21f545 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -613,7 +613,11 @@ pub type XcmRouter = WithUniqueTopic<( ToPolkadotXcmRouter, // Router which wraps and sends xcm to BridgeHub to be delivered to the Ethereum // GlobalConsensus - SovereignPaidRemoteExporter, XcmpQueue, UniversalLocation>, + SovereignPaidRemoteExporter< + xcm_builder::NetworkExportTable, + XcmpQueue, + UniversalLocation, + >, )>; impl pallet_xcm::Config for Runtime { @@ -780,7 +784,8 @@ pub mod bridging { /// User fee for ERC20 token transfer back to Ethereum. /// Configure the fee to max Balance so that it is disabled. /// Sensible value was 2_750_872_500_000. - pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX; + //pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX; + pub const DefaultBridgeHubEthereumBaseFee: Balance = 2_750_872_500_000; pub storage BridgeHubEthereumBaseFee: Balance = DefaultBridgeHubEthereumBaseFee::get(); pub SiblingBridgeHubWithEthereumInboundQueueInstance: Location = Location::new( 1, diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs new file mode 100644 index 0000000000..0aeb451a90 --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs @@ -0,0 +1,61 @@ +use asset_hub_kusama_runtime::xcm_config::bridging::{ + to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable}, + SiblingBridgeHub, XcmBridgeHubRouterFeeAssetId, +}; +use frame_support::ensure; +use parachains_common::AccountId; +use sp_core::H160; +use sp_std::prelude::*; +use system_parachains_constants::kusama::snowbridge::EthereumNetwork; +use xcm::prelude::*; +use xcm_builder::{ExporterFor, NetworkExportTable, NetworkExportTableItem}; + +#[test] +fn network_export_table_works() { + sp_io::TestExternalities::default().execute_with(|| { + let test_data: Vec<(NetworkId, InteriorLocation, Option<(Location, Option)>)> = vec![ + // From Ethereum (from GlobalConsensus(Ethereum) is routed to BridgeHub, with a fee, + // matched. + ( + EthereumNetwork::get(), + Junctions::Here, + Some(( + SiblingBridgeHub::get().into(), + Some(Asset { + id: XcmBridgeHubRouterFeeAssetId::get(), + fun: Fungible(BridgeHubEthereumBaseFee::get()), + }), + )), + ), + // From Ethereum with a random parachain ID filter, not matched. + (EthereumNetwork::get(), [Parachain(4321)].into(), None), + // From Ethereum with a account ID added to the Ethereum Network, not matched. + ( + EthereumNetwork::get(), + [ + GlobalConsensus(EthereumNetwork::get()), + AccountKey20 { network: None, key: H160::random().into() }, + ] + .into(), + None, + ), + // From Ethereum with the Sepolia chain ID instead of Mainnet, not matched. + (NetworkId::Ethereum { chain_id: 11155111 }, Junctions::Here, None), + ]; + + for (network, remote_location, expected_result) in test_data { + assert_eq!( + NetworkExportTable::::exporter_for( + &network, + &remote_location, + &Xcm::default() + ), + expected_result, + "expected_result: {:?} not matched for network: {:?} and remote_location: {:?}", + expected_result, + network, + remote_location, + ) + } + }); +} diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index b5fd11c279..ca5edd1efb 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -563,7 +563,11 @@ pub type XcmRouter = WithUniqueTopic<( ToKusamaXcmRouter, // Router which wraps and sends xcm to BridgeHub to be delivered to the Ethereum // GlobalConsensus - SovereignPaidRemoteExporter, XcmpQueue, UniversalLocation>, + SovereignPaidRemoteExporter< + xcm_builder::NetworkExportTable, + XcmpQueue, + UniversalLocation, + >, )>; impl pallet_xcm::Config for Runtime { diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs new file mode 100644 index 0000000000..822951f378 --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs @@ -0,0 +1,61 @@ +use asset_hub_polkadot_runtime::xcm_config::bridging::{ + to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable}, + SiblingBridgeHub, XcmBridgeHubRouterFeeAssetId, +}; +use frame_support::ensure; +use parachains_common::AccountId; +use sp_core::H160; +use sp_std::prelude::*; +use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; +use xcm::prelude::*; +use xcm_builder::{ExporterFor, NetworkExportTable, NetworkExportTableItem}; + +#[test] +fn network_export_table_works() { + sp_io::TestExternalities::default().execute_with(|| { + let test_data: Vec<(NetworkId, InteriorLocation, Option<(Location, Option)>)> = vec![ + // From Ethereum (from GlobalConsensus(Ethereum) is routed to BridgeHub, with a fee, + // matched. + ( + EthereumNetwork::get(), + Junctions::Here, + Some(( + SiblingBridgeHub::get().into(), + Some(Asset { + id: XcmBridgeHubRouterFeeAssetId::get(), + fun: Fungible(BridgeHubEthereumBaseFee::get()), + }), + )), + ), + // From Ethereum with a random parachain ID filter, not matched. + (EthereumNetwork::get(), [Parachain(4321)].into(), None), + // From Ethereum with a account ID added to the Ethereum Network, not matched. + ( + EthereumNetwork::get(), + [ + GlobalConsensus(EthereumNetwork::get()), + AccountKey20 { network: None, key: H160::random().into() }, + ] + .into(), + None, + ), + // From Ethereum with the Sepolia chain ID instead of Mainnet, not matched. + (NetworkId::Ethereum { chain_id: 11155111 }, Junctions::Here, None), + ]; + + for (network, remote_location, expected_result) in test_data { + assert_eq!( + NetworkExportTable::::exporter_for( + &network, + &remote_location, + &Xcm::default() + ), + expected_result, + "expected_result: {:?} not matched for network: {:?} and remote_location: {:?}", + expected_result, + network, + remote_location, + ) + } + }); +} From c4c2995ba409ea739c6219994cb343be5bb5418d Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Fri, 8 Mar 2024 09:30:52 +0200 Subject: [PATCH 287/316] revert base fee --- .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index b39d21f545..82ef2a67bc 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -784,8 +784,7 @@ pub mod bridging { /// User fee for ERC20 token transfer back to Ethereum. /// Configure the fee to max Balance so that it is disabled. /// Sensible value was 2_750_872_500_000. - //pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX; - pub const DefaultBridgeHubEthereumBaseFee: Balance = 2_750_872_500_000; + pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX; pub storage BridgeHubEthereumBaseFee: Balance = DefaultBridgeHubEthereumBaseFee::get(); pub SiblingBridgeHubWithEthereumInboundQueueInstance: Location = Location::new( 1, From 0c6e184afa829c55e242623fb923defff61dcf2c Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 11 Mar 2024 22:45:18 +0200 Subject: [PATCH 288/316] various pr comments --- Cargo.lock | 4 +++ .../bridges/bridge-hub-kusama/src/genesis.rs | 4 +-- .../bridge-hub-polkadot/src/genesis.rs | 4 +-- .../bridges/bridge-hub-kusama/Cargo.toml | 1 + .../bridge-hub-kusama/src/tests/snowbridge.rs | 18 ++++++------- .../bridges/bridge-hub-polkadot/Cargo.toml | 1 + .../src/tests/snowbridge.rs | 20 +++++++-------- .../asset-hub-kusama/src/xcm_config.rs | 3 ++- .../asset-hub-kusama/tests/snowbridge.rs | 17 +++++++++++++ .../asset-hub-polkadot/src/xcm_config.rs | 5 ++-- .../asset-hub-polkadot/tests/snowbridge.rs | 17 +++++++++++++ .../bridge-hub-kusama/primitives/Cargo.toml | 3 +++ .../bridge-hub-kusama/primitives/src/lib.rs | 23 +++++++++++++++++ .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 25 +++++-------------- .../bridge-hub-kusama/src/xcm_config.rs | 3 +++ .../bridge-hub-polkadot/primitives/Cargo.toml | 2 ++ .../bridge-hub-polkadot/primitives/src/lib.rs | 23 +++++++++++++++++ .../bridge-hub-polkadot/src/lib.rs | 23 ++++------------- .../bridge-hub-polkadot/src/xcm_config.rs | 3 +++ system-parachains/constants/src/kusama.rs | 3 --- system-parachains/constants/src/polkadot.rs | 3 --- 21 files changed, 134 insertions(+), 71 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 393449afd6..38f70d1b63 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1260,6 +1260,7 @@ dependencies = [ "frame-support", "kusama-runtime-constants", "polkadot-runtime-constants", + "snowbridge-core", "sp-api", "sp-runtime", "sp-std", @@ -1276,6 +1277,7 @@ dependencies = [ "frame-support", "kusama-runtime-constants", "polkadot-runtime-constants", + "snowbridge-core", "sp-api", "sp-runtime", "sp-std", @@ -1497,6 +1499,7 @@ name = "bridge-hub-kusama-integration-tests" version = "1.0.0" dependencies = [ "asset-hub-kusama-runtime", + "bp-bridge-hub-kusama", "bp-messages", "bridge-hub-kusama-runtime", "cumulus-pallet-xcmp-queue", @@ -1645,6 +1648,7 @@ name = "bridge-hub-polkadot-integration-tests" version = "1.0.0" dependencies = [ "asset-hub-polkadot-runtime", + "bp-bridge-hub-polkadot", "bp-messages", "bridge-hub-polkadot-runtime", "cumulus-pallet-xcmp-queue", diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/genesis.rs b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/genesis.rs index 20d0805c11..f835a319c6 100644 --- a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/genesis.rs +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/genesis.rs @@ -22,7 +22,7 @@ use emulated_integration_tests_common::{ }; use parachains_common::Balance; -pub const ASSETHUB_PARA_ID: u32 = 1000; +pub const ASSET_HUB_PARA_ID: u32 = 1000; pub const PARA_ID: u32 = 1002; pub const ED: Balance = bridge_hub_kusama_runtime::ExistentialDeposit::get(); @@ -67,7 +67,7 @@ pub fn genesis() -> Storage { }, ethereum_system: bridge_hub_kusama_runtime::EthereumSystemConfig { para_id: PARA_ID.into(), - asset_hub_para_id: ASSETHUB_PARA_ID.into(), + asset_hub_para_id: ASSET_HUB_PARA_ID.into(), ..Default::default() }, ..Default::default() diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/genesis.rs b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/genesis.rs index 229ddaee17..85b48a2661 100644 --- a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/genesis.rs +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/genesis.rs @@ -22,7 +22,7 @@ use emulated_integration_tests_common::{ }; use parachains_common::Balance; -pub const ASSETHUB_PARA_ID: u32 = 1000; +pub const ASSET_HUB_PARA_ID: u32 = 1000; pub const PARA_ID: u32 = 1002; pub const ED: Balance = bridge_hub_polkadot_runtime::ExistentialDeposit::get(); @@ -67,7 +67,7 @@ pub fn genesis() -> Storage { }, ethereum_system: bridge_hub_polkadot_runtime::EthereumSystemConfig { para_id: PARA_ID.into(), - asset_hub_para_id: ASSETHUB_PARA_ID.into(), + asset_hub_para_id: ASSET_HUB_PARA_ID.into(), ..Default::default() }, ..Default::default() diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml index 7b24c1df33..a7aa517d5b 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml @@ -35,6 +35,7 @@ bp-messages = { version = "0.8.0" } pallet-bridge-messages = { version = "0.8.0" } # Local +bp-bridge-hub-kusama = { path = "../../../../../system-parachains/bridge-hubs/bridge-hub-kusama/primitives"} bridge-hub-kusama-runtime = { path = "../../../../../system-parachains/bridge-hubs/bridge-hub-kusama" } asset-hub-kusama-runtime = { path = "../../../../../system-parachains/asset-hubs/asset-hub-kusama" } integration-tests-helpers = { path = "../../../helpers" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index f2309ac41f..fd8cbe586a 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -14,6 +14,9 @@ // limitations under the License. use crate::*; use asset_hub_kusama_runtime::xcm_config::bridging::to_ethereum::BridgeHubEthereumBaseFee; +use bp_bridge_hub_kusama::snowbridge::{ + CreateAssetCall, CreateAssetDeposit, InboundQueuePalletInstance, +}; use bridge_hub_kusama_runtime::{ EthereumBeaconClient, EthereumGatewayAddress, EthereumInboundQueue, RuntimeOrigin, }; @@ -624,8 +627,7 @@ fn asset_hub_foreign_assets_pallet_is_configured_correctly_in_bridge_hub() { }) .encode(); - let bridge_hub_inbound_queue_assets_pallet_call_index = - bridge_hub_kusama_runtime::CreateAssetCall::get(); + let bridge_hub_inbound_queue_assets_pallet_call_index = CreateAssetCall::get(); assert!( call_create_foreign_assets.starts_with(&bridge_hub_inbound_queue_assets_pallet_call_index) @@ -635,13 +637,12 @@ fn asset_hub_foreign_assets_pallet_is_configured_correctly_in_bridge_hub() { /// Tests that the EthereumInboundQueue CreateAssetDeposit on BridgeHub is larger than the /// ForeignAssets AssetDeposit config on AssetHub. #[test] -fn bridge_hub_inbound_queue_deposit_config_is_larger_than_asset_hub_foreign_asset_pallet_deposit() { +fn bridge_hub_inbound_queue_deposit_config_is_equal_to_asset_hub_foreign_asset_pallet_deposit() { let asset_deposit = asset_hub_kusama_runtime::ForeignAssetsAssetDeposit::get(); - let bridge_hub_inbound_queue_asset_deposit = - bridge_hub_kusama_runtime::CreateAssetDeposit::get(); + let bridge_hub_inbound_queue_asset_deposit = CreateAssetDeposit::get(); - assert!(bridge_hub_inbound_queue_asset_deposit > asset_deposit); + assert_eq!(bridge_hub_inbound_queue_asset_deposit, asset_deposit); } /// Tests the EthereumInboundQueue pallet index matches the pallet constant. @@ -650,10 +651,7 @@ fn bridge_hub_inbound_queue_pallet_index_is_correct() { let inbound_queue_inbound_queue_pallet_index = ::EthereumInboundQueue::index(); - assert_eq!( - inbound_queue_inbound_queue_pallet_index as u8, - system_parachains_constants::kusama::snowbridge::INBOUND_QUEUE_PALLET_INDEX - ); + assert_eq!(inbound_queue_inbound_queue_pallet_index as u8, InboundQueuePalletInstance::get()); } fn ethereum_sovereign_account() -> AccountId { diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml index 13e1c44f81..40478429a1 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml @@ -35,6 +35,7 @@ bp-messages = { version = "0.8.0" } pallet-bridge-messages = { version = "0.8.0" } # Runtimes +bp-bridge-hub-polkadot = { path = "../../../../../system-parachains/bridge-hubs/bridge-hub-polkadot/primitives"} bridge-hub-polkadot-runtime = { path = "../../../../../system-parachains/bridge-hubs/bridge-hub-polkadot" } asset-hub-polkadot-runtime = { path = "../../../../../system-parachains/asset-hubs/asset-hub-polkadot" } integration-tests-helpers = { path = "../../../helpers" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index 106819acfa..6aa7791d24 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -14,6 +14,9 @@ // limitations under the License. use crate::*; use asset_hub_polkadot_runtime::xcm_config::bridging::to_ethereum::BridgeHubEthereumBaseFee; +use bp_bridge_hub_polkadot::snowbridge::{ + CreateAssetCall, CreateAssetDeposit, InboundQueuePalletInstance, +}; use bridge_hub_polkadot_runtime::{ EthereumBeaconClient, EthereumGatewayAddress, EthereumInboundQueue, RuntimeOrigin, }; @@ -550,7 +553,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { events.iter().any(|event| matches!( event, RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) - if *who == assethub_sovereign && *amount == 26800000000, + if *who == assethub_sovereign && *amount == 5025000000, )), "AssetHub sovereign takes remote fee." ); @@ -628,8 +631,7 @@ fn asset_hub_foreign_assets_pallet_is_configured_correctly_in_bridge_hub() { }) .encode(); - let bridge_hub_inbound_queue_assets_pallet_call_index = - bridge_hub_polkadot_runtime::CreateAssetCall::get(); + let bridge_hub_inbound_queue_assets_pallet_call_index = CreateAssetCall::get(); assert!( call_create_foreign_assets.starts_with(&bridge_hub_inbound_queue_assets_pallet_call_index) @@ -639,13 +641,12 @@ fn asset_hub_foreign_assets_pallet_is_configured_correctly_in_bridge_hub() { /// Tests that the EthereumInboundQueue CreateAssetDeposit on BridgeHub is larger than the /// ForeignAssets AssetDeposit config on AssetHub. #[test] -fn bridge_hub_inbound_queue_deposit_config_is_larger_than_asset_hub_foreign_asset_pallet_deposit() { +fn bridge_hub_inbound_queue_deposit_config_is_equal_to_asset_hub_foreign_asset_pallet_deposit() { let asset_deposit = asset_hub_polkadot_runtime::ForeignAssetsAssetDeposit::get(); - let bridge_hub_inbound_queue_asset_deposit = - bridge_hub_polkadot_runtime::CreateAssetDeposit::get(); + let bridge_hub_inbound_queue_asset_deposit = CreateAssetDeposit::get(); - assert!(bridge_hub_inbound_queue_asset_deposit > asset_deposit); + assert_eq!(bridge_hub_inbound_queue_asset_deposit, asset_deposit); } /// Tests the EthereumInboundQueue pallet index matches the pallet constant. @@ -654,10 +655,7 @@ fn bridge_hub_inbound_queue_pallet_index_is_correct() { let inbound_queue_inbound_queue_pallet_index = ::EthereumInboundQueue::index(); - assert_eq!( - inbound_queue_inbound_queue_pallet_index as u8, - system_parachains_constants::polkadot::snowbridge::INBOUND_QUEUE_PALLET_INDEX - ); + assert_eq!(inbound_queue_inbound_queue_pallet_index as u8, InboundQueuePalletInstance::get()); } fn ethereum_sovereign_account() -> AccountId { diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 82ef2a67bc..33aec1817c 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -21,6 +21,7 @@ use super::{ }; use crate::{ForeignAssets, ForeignAssetsInstance}; use assets_common::matching::{FromNetwork, FromSiblingParachain, IsForeignConcreteAsset}; +use bp_bridge_hub_kusama::snowbridge::InboundQueuePalletInstance; use frame_support::{ parameter_types, traits::{ConstU32, Contains, Equals, Everything, Nothing, PalletInfoAccess}, @@ -790,7 +791,7 @@ pub mod bridging { 1, [ Parachain(SiblingBridgeHubParaId::get()), - PalletInstance(system_parachains_constants::kusama::snowbridge::INBOUND_QUEUE_PALLET_INDEX), + PalletInstance(InboundQueuePalletInstance::get()), ] ); diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs index 0aeb451a90..26ccb2b483 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs @@ -1,3 +1,20 @@ +// This file is part of Cumulus. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + use asset_hub_kusama_runtime::xcm_config::bridging::{ to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable}, SiblingBridgeHub, XcmBridgeHubRouterFeeAssetId, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index ca5edd1efb..585d577962 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -21,6 +21,7 @@ use super::{ }; use crate::ForeignAssetsInstance; use assets_common::matching::{FromNetwork, FromSiblingParachain, IsForeignConcreteAsset}; +use bp_bridge_hub_polkadot::snowbridge::InboundQueuePalletInstance; use frame_support::{ parameter_types, traits::{ConstU32, Contains, Equals, Everything, Nothing, PalletInfoAccess}, @@ -740,8 +741,8 @@ pub mod bridging { 1, [ Parachain(SiblingBridgeHubParaId::get()), - PalletInstance(system_parachains_constants::polkadot::snowbridge::INBOUND_QUEUE_PALLET_INDEX), - ], + PalletInstance(InboundQueuePalletInstance::get()), + ] ); /// Set up exporters configuration. diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs index 822951f378..7d22e33787 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs @@ -1,3 +1,20 @@ +// This file is part of Cumulus. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + use asset_hub_polkadot_runtime::xcm_config::bridging::{ to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable}, SiblingBridgeHub, XcmBridgeHubRouterFeeAssetId, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml index ab1deb9797..cceec60b14 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml @@ -25,6 +25,8 @@ sp-api = { default-features = false, version = "27.0.0" } sp-runtime = { default-features = false, version = "32.0.0" } sp-std = { default-features = false , version = "14.0.0" } +snowbridge-core = { default-features = false , version = "0.1.0" } + [features] default = [ "std" ] std = [ @@ -34,6 +36,7 @@ std = [ "frame-support/std", "kusama-runtime-constants/std", "polkadot-runtime-constants/std", + "snowbridge-core/std", "sp-api/std", "sp-runtime/std", "sp-std/std", diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs index bb3f03e1aa..f043eef108 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs @@ -158,6 +158,29 @@ fn convert_from_udot_to_uksm(price_in_udot: Balance) -> Balance { FixedU128::DIV } +pub mod snowbridge { + use crate::Balance; + use frame_support::parameter_types; + use kusama_runtime_constants::currency::UNITS; + use snowbridge_core::{gwei, meth, PricingParameters, Rewards}; + use sp_runtime::FixedU128; + + parameter_types! { + /// Should match the ForeignAssets::create index on AssetHub + pub const CreateAssetCall: [u8;2] = [53, 0]; + /// Should match the AssetDeposit of the ForeignAssets pallet on AssetHub + pub const CreateAssetDeposit: u128 = UNITS / 10; + /// The pallet index of the Ethereum inbound queue pallet in the BridgeHub runtime. + pub const InboundQueuePalletInstance: u8 = 80; + /// Pricing parameters used for fees. + pub Parameters: PricingParameters = PricingParameters { + exchange_rate: FixedU128::from_rational(1, 75), + fee_per_gas: gwei(20), + rewards: Rewards { local: 1 * UNITS / 100, remote: meth(1) } // 0.01 KSM + }; + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index d692172cb1..83825d74cb 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -27,15 +27,16 @@ pub mod bridge_to_polkadot_config; mod weights; pub mod xcm_config; +use bp_bridge_hub_kusama::snowbridge::{ + CreateAssetCall, CreateAssetDeposit, InboundQueuePalletInstance, Parameters, +}; use bridge_hub_common::message_queue::{ AggregateMessageOrigin, NarrowOriginToSibling, ParaIdToSibling, }; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::ParaId; use snowbridge_beacon_primitives::{Fork, ForkVersions}; -use snowbridge_core::{ - gwei, meth, outbound::Message, AgentId, AllowSiblingsOnly, PricingParameters, Rewards, -}; +use snowbridge_core::{outbound::Message, AgentId, AllowSiblingsOnly}; use snowbridge_router_primitives::inbound::MessageToXcm; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H160}; @@ -43,7 +44,7 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, Keccak256}, transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, FixedU128, + ApplyExtrinsicResult, }; use sp_std::prelude::*; @@ -78,10 +79,7 @@ use xcm_config::{ #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; -use kusama_runtime_constants::{ - currency::EXISTENTIAL_DEPOSIT, - system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}, -}; +use kusama_runtime_constants::system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; @@ -513,17 +511,6 @@ parameter_types! { pub storage EthereumGatewayAddress: H160 = H160::zero(); } -parameter_types! { - pub const CreateAssetCall: [u8;2] = [53, 0]; - pub const CreateAssetDeposit: u128 = (UNITS / 10) + EXISTENTIAL_DEPOSIT; - pub const InboundQueuePalletInstance: u8 = system_parachains_constants::kusama::snowbridge::INBOUND_QUEUE_PALLET_INDEX; - pub Parameters: PricingParameters = PricingParameters { - exchange_rate: FixedU128::from_rational(1, 75), - fee_per_gas: gwei(20), - rewards: Rewards { local: 1 * UNITS / 100, remote: meth(1) } // 0.01 KSM - }; -} - #[cfg(feature = "runtime-benchmarks")] pub mod benchmark_helpers { use crate::{EthereumBeaconClient, Runtime, RuntimeOrigin}; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 9c67f612a9..aa4db73fbf 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -372,6 +372,9 @@ fn treasury_pallet_account_not_none() { ) } +/// A `FeeManager` implementation that forces fees for any message delivered to Ethereum. +/// Otherwise, it permits the specified `WaivedLocations` to not pay for fees and uses the provided +/// `HandleFee` implementation. pub struct XcmFeeManagerFromComponentsBridgeHub( PhantomData<(WaivedLocations, HandleFee)>, ); diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml index faaa3dace9..c532610ab3 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml @@ -25,6 +25,8 @@ sp-api = { default-features = false, version = "27.0.0" } sp-runtime = { default-features = false, version = "32.0.0" } sp-std = { default-features = false , version = "14.0.0" } +snowbridge-core = { default-features = false , version = "0.1.0" } + [features] default = [ "std" ] std = [ diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs index 1e93bbf2af..127c6fe0fe 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs @@ -149,6 +149,29 @@ fn convert_from_uksm_to_udot(price_in_uksm: Balance) -> Balance { FixedU128::DIV } +pub mod snowbridge { + use crate::Balance; + use frame_support::parameter_types; + use polkadot_runtime_constants::currency::UNITS; + use snowbridge_core::{gwei, meth, PricingParameters, Rewards}; + use sp_runtime::FixedU128; + + parameter_types! { + /// Should match the ForeignAssets::create index on AssetHub + pub const CreateAssetCall: [u8;2] = [53, 0]; + /// Should match the AssetDeposit of the ForeignAssets pallet on AssetHub + pub const CreateAssetDeposit: u128 = 10 * UNITS; + /// The pallet index of the Ethereum inbound queue pallet in the BridgeHub runtime. + pub const InboundQueuePalletInstance: u8 = 80; + /// Pricing parameters used for fees. + pub Parameters: PricingParameters = PricingParameters { + exchange_rate: FixedU128::from_rational(1, 75), + fee_per_gas: gwei(20), + rewards: Rewards { local: 1 * UNITS / 100, remote: meth(1) } // 0.01 KSM + }; + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 73f3262bef..52e3bc8677 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -27,15 +27,16 @@ pub mod bridge_to_kusama_config; mod weights; pub mod xcm_config; +use bp_bridge_hub_kusama::snowbridge::{ + CreateAssetCall, CreateAssetDeposit, InboundQueuePalletInstance, Parameters, +}; use bridge_hub_common::message_queue::{ AggregateMessageOrigin, NarrowOriginToSibling, ParaIdToSibling, }; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_primitives_core::ParaId; use snowbridge_beacon_primitives::{Fork, ForkVersions}; -use snowbridge_core::{ - gwei, meth, outbound::Message, AgentId, AllowSiblingsOnly, PricingParameters, Rewards, -}; +use snowbridge_core::{outbound::Message, AgentId, AllowSiblingsOnly}; use snowbridge_router_primitives::inbound::MessageToXcm; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H160}; @@ -80,10 +81,7 @@ pub use sp_runtime::BuildStorage; // Polkadot imports use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; -use polkadot_runtime_constants::{ - currency::EXISTENTIAL_DEPOSIT, - system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}, -}; +use polkadot_runtime_constants::system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; @@ -514,17 +512,6 @@ parameter_types! { pub storage EthereumGatewayAddress: H160 = H160::zero(); } -parameter_types! { - pub const CreateAssetCall: [u8;2] = [53, 0]; - pub const CreateAssetDeposit: u128 = (UNITS / 10) + EXISTENTIAL_DEPOSIT; - pub const InboundQueuePalletInstance: u8 = system_parachains_constants::polkadot::snowbridge::INBOUND_QUEUE_PALLET_INDEX; - pub Parameters: PricingParameters = PricingParameters { - exchange_rate: FixedU128::from_rational(1, 400), - fee_per_gas: gwei(20), - rewards: Rewards { local: 1 * UNITS, remote: meth(1) } - }; -} - #[cfg(feature = "runtime-benchmarks")] pub mod benchmark_helpers { use crate::{EthereumBeaconClient, Runtime, RuntimeOrigin}; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index e651b52c0d..98c6e8efda 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -383,6 +383,9 @@ impl cumulus_pallet_xcm::Config for Runtime { type XcmExecutor = XcmExecutor; } +/// A `FeeManager` implementation that forces fees for any message delivered to Ethereum. +/// Otherwise, it permits the specified `WaivedLocations` to not pay for fees and uses the provided +/// `HandleFee` implementation. pub struct XcmFeeManagerFromComponentsBridgeHub( PhantomData<(WaivedLocations, HandleFee)>, ); diff --git a/system-parachains/constants/src/kusama.rs b/system-parachains/constants/src/kusama.rs index 997bba9769..9aa17fceed 100644 --- a/system-parachains/constants/src/kusama.rs +++ b/system-parachains/constants/src/kusama.rs @@ -138,9 +138,6 @@ pub mod snowbridge { use frame_support::parameter_types; use xcm::opaque::lts::NetworkId; - /// The pallet index of the Ethereum inbound queue pallet in the bridge hub runtime. - pub const INBOUND_QUEUE_PALLET_INDEX: u8 = 80; - parameter_types! { /// Network and location for the Ethereum chain. On Kusama, the Ethereum chain bridged /// to is the Ethereum Main network, with chain ID 1. diff --git a/system-parachains/constants/src/polkadot.rs b/system-parachains/constants/src/polkadot.rs index 03d04755c4..ec8004446a 100644 --- a/system-parachains/constants/src/polkadot.rs +++ b/system-parachains/constants/src/polkadot.rs @@ -156,9 +156,6 @@ pub mod snowbridge { use frame_support::parameter_types; use xcm::opaque::lts::NetworkId; - /// The pallet index of the Ethereum inbound queue pallet in the bridge hub runtime. - pub const INBOUND_QUEUE_PALLET_INDEX: u8 = 80; - parameter_types! { /// Network and location for the Ethereum chain. On Polkadot, the Ethereum chain bridged /// to is the Ethereum Main network, with chain ID 1. From e3f9a37d9970350fb4ad1fd290852bc4dcd18a3c Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 11 Mar 2024 23:19:18 +0200 Subject: [PATCH 289/316] remove unused vars --- .../asset-hubs/asset-hub-kusama/tests/snowbridge.rs | 2 -- .../asset-hubs/asset-hub-polkadot/tests/snowbridge.rs | 2 -- system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs index 26ccb2b483..f8150c17db 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs @@ -19,8 +19,6 @@ use asset_hub_kusama_runtime::xcm_config::bridging::{ to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable}, SiblingBridgeHub, XcmBridgeHubRouterFeeAssetId, }; -use frame_support::ensure; -use parachains_common::AccountId; use sp_core::H160; use sp_std::prelude::*; use system_parachains_constants::kusama::snowbridge::EthereumNetwork; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs index 7d22e33787..9b6470a210 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs @@ -19,8 +19,6 @@ use asset_hub_polkadot_runtime::xcm_config::bridging::{ to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable}, SiblingBridgeHub, XcmBridgeHubRouterFeeAssetId, }; -use frame_support::ensure; -use parachains_common::AccountId; use sp_core::H160; use sp_std::prelude::*; use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 52e3bc8677..500ba4a9d6 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -44,7 +44,7 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, Keccak256}, transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, FixedU128, + ApplyExtrinsicResult, }; use sp_std::prelude::*; From 7488384342f8fff8f2117ed23da4300ba67b01db Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 12 Mar 2024 07:48:53 +0200 Subject: [PATCH 290/316] remove unused vars --- .../asset-hubs/asset-hub-kusama/tests/snowbridge.rs | 2 +- .../asset-hubs/asset-hub-polkadot/tests/snowbridge.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs index f8150c17db..4571d1bef8 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs @@ -23,7 +23,7 @@ use sp_core::H160; use sp_std::prelude::*; use system_parachains_constants::kusama::snowbridge::EthereumNetwork; use xcm::prelude::*; -use xcm_builder::{ExporterFor, NetworkExportTable, NetworkExportTableItem}; +use xcm_builder::{ExporterFor, NetworkExportTable}; #[test] fn network_export_table_works() { diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs index 9b6470a210..56bf6b2b66 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs @@ -23,7 +23,7 @@ use sp_core::H160; use sp_std::prelude::*; use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; use xcm::prelude::*; -use xcm_builder::{ExporterFor, NetworkExportTable, NetworkExportTableItem}; +use xcm_builder::{ExporterFor, NetworkExportTable}; #[test] fn network_export_table_works() { From e86c2000396f9880619243661ffe2d5789a94426 Mon Sep 17 00:00:00 2001 From: Clara van Staden Date: Tue, 12 Mar 2024 09:08:23 +0200 Subject: [PATCH 291/316] Update CHANGELOG.md Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af0e316374..9d56b413d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Refund any leases that are not migrated to Coretime (have holes in them/have not yet started) ([polkadot-fellows/runtimes#206](https://github.com/polkadot-fellows/runtimes/pull/206)) - Enable Elastic Scaling node side feature for Kusama ([polkadot-fellows/runtimes#205](https://github.com/polkadot-fellows/runtimes/pull/205)) - Cancel Parachain Auctions ([polkadot-fellows/runtimes#215](https://github.com/polkadot-fellows/runtimes/pull/215)) -- Enable Coretime and on-demand on Kusama ([polkadot-fellows/runtimes#159](https://github.com/polkadot-fellows/runtimes/pull/159) - Adds Snowbridge to Kusama and Polkadot ([polkadot-fellows/runtimes#130](https://github.com/polkadot-fellows/runtimes/pull/130)) ### Changed From 6076a1b1b0ced03d28388e798d5ed372b5f32725 Mon Sep 17 00:00:00 2001 From: Clara van Staden Date: Tue, 12 Mar 2024 09:08:32 +0200 Subject: [PATCH 292/316] Update system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- .../bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs index 127c6fe0fe..99ee2ff101 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs @@ -157,11 +157,11 @@ pub mod snowbridge { use sp_runtime::FixedU128; parameter_types! { - /// Should match the ForeignAssets::create index on AssetHub + /// Should match the `ForeignAssets::create` index on Asset Hub. pub const CreateAssetCall: [u8;2] = [53, 0]; - /// Should match the AssetDeposit of the ForeignAssets pallet on AssetHub + /// Should match the `AssetDeposit` of the `ForeignAssets` pallet on Asset Hub. pub const CreateAssetDeposit: u128 = 10 * UNITS; - /// The pallet index of the Ethereum inbound queue pallet in the BridgeHub runtime. + /// The pallet index of the Ethereum inbound queue pallet in the Bridge Hub runtime. pub const InboundQueuePalletInstance: u8 = 80; /// Pricing parameters used for fees. pub Parameters: PricingParameters = PricingParameters { From e9924c526b89d3ff515181831ed86eba729a8604 Mon Sep 17 00:00:00 2001 From: Clara van Staden Date: Tue, 12 Mar 2024 09:08:41 +0200 Subject: [PATCH 293/316] Update system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- .../bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs index f043eef108..bac0f0ef9c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs @@ -166,11 +166,11 @@ pub mod snowbridge { use sp_runtime::FixedU128; parameter_types! { - /// Should match the ForeignAssets::create index on AssetHub + /// Should match the `ForeignAssets::create` index on Asset Hub. pub const CreateAssetCall: [u8;2] = [53, 0]; - /// Should match the AssetDeposit of the ForeignAssets pallet on AssetHub + /// Should match the `AssetDeposit` of the `ForeignAssets` pallet on Asset Hub. pub const CreateAssetDeposit: u128 = UNITS / 10; - /// The pallet index of the Ethereum inbound queue pallet in the BridgeHub runtime. + /// The pallet index of the Ethereum inbound queue pallet in the Bridge Hub runtime. pub const InboundQueuePalletInstance: u8 = 80; /// Pricing parameters used for fees. pub Parameters: PricingParameters = PricingParameters { From a501b345e010f8a071ee3b2b126fcdafb952059f Mon Sep 17 00:00:00 2001 From: Clara van Staden Date: Tue, 12 Mar 2024 09:08:49 +0200 Subject: [PATCH 294/316] Update system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 83825d74cb..354e719ae2 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -342,8 +342,8 @@ impl parachain_info::Config for Runtime {} parameter_types! { /// Amount of weight that can be spent per block to service messages. This was increased /// from 35% to 60% of the max block weight to accommodate the Ethereum beacon light client - /// extrinsics. The force_checkpoint and submit extrinsics (for submit, optionally) includes - /// the sync committee's pubkeys (512 x 48 bytes) + /// extrinsics. The `force_checkpoint` and `submit` extrinsics (for submit, optionally) includes + /// the sync committee's pubkeys (512 x 48 bytes). pub MessageQueueServiceWeight: Weight = Perbill::from_percent(60) * RuntimeBlockWeights::get().max_block; } From c517bda0b53d92ec9e3c16292181386887291a18 Mon Sep 17 00:00:00 2001 From: Clara van Staden Date: Tue, 12 Mar 2024 09:08:58 +0200 Subject: [PATCH 295/316] Update system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 500ba4a9d6..d12162af40 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -343,8 +343,8 @@ impl parachain_info::Config for Runtime {} parameter_types! { /// Amount of weight that can be spent per block to service messages. This was increased /// from 35% to 60% of the max block weight to accommodate the Ethereum beacon light client - /// extrinsics. The force_checkpoint and submit extrinsics (for submit, optionally) includes - /// the sync committee's pubkeys (512 x 48 bytes) + /// extrinsics. The `force_checkpoint` and `submit` extrinsics (for submit, optionally) includes + /// the sync committee's pubkeys (512 x 48 bytes). pub MessageQueueServiceWeight: Weight = Perbill::from_percent(60) * RuntimeBlockWeights::get().max_block; } From 13958a1b655532e5f859261f5b0b2a4a42d6665f Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 12 Mar 2024 11:26:25 +0200 Subject: [PATCH 296/316] remove copied penpal crate and replace with patched version from polkadot-sdk --- Cargo.lock | 9 +- .../parachains/testing/penpal/Cargo.toml | 5 +- integration-tests/emulated/penpal/Cargo.toml | 193 ---- integration-tests/emulated/penpal/build.rs | 27 - integration-tests/emulated/penpal/src/lib.rs | 911 ------------------ .../penpal/src/weights/block_weights.rs | 53 - .../penpal/src/weights/extrinsic_weights.rs | 53 - .../emulated/penpal/src/weights/mod.rs | 27 - .../penpal/src/weights/paritydb_weights.rs | 63 -- .../penpal/src/weights/rocksdb_weights.rs | 63 -- .../emulated/penpal/src/xcm_config.rs | 409 -------- 11 files changed, 6 insertions(+), 1807 deletions(-) delete mode 100644 integration-tests/emulated/penpal/Cargo.toml delete mode 100644 integration-tests/emulated/penpal/build.rs delete mode 100644 integration-tests/emulated/penpal/src/lib.rs delete mode 100644 integration-tests/emulated/penpal/src/weights/block_weights.rs delete mode 100644 integration-tests/emulated/penpal/src/weights/extrinsic_weights.rs delete mode 100644 integration-tests/emulated/penpal/src/weights/mod.rs delete mode 100644 integration-tests/emulated/penpal/src/weights/paritydb_weights.rs delete mode 100644 integration-tests/emulated/penpal/src/weights/rocksdb_weights.rs delete mode 100644 integration-tests/emulated/penpal/src/xcm_config.rs diff --git a/Cargo.lock b/Cargo.lock index 0141df1178..45eca73c48 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8637,14 +8637,16 @@ dependencies = [ "frame-support", "kusama-emulated-chain", "parachains-common", - "penpal-runtime-dotsama", + "penpal-runtime", "polkadot-emulated-chain", "sp-core", ] [[package]] -name = "penpal-runtime-dotsama" -version = "0.14.0" +name = "penpal-runtime" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec559654c03e2c39b3b6921e4baddb34df06feaf37fac1432e277158233345b5" dependencies = [ "assets-common", "cumulus-pallet-aura-ext", @@ -8661,7 +8663,6 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", - "hex-literal", "log", "pallet-asset-tx-payment", "pallet-assets", diff --git a/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml b/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml index 72ccb5d5e8..a50f52318f 100644 --- a/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml @@ -17,10 +17,7 @@ frame-support = { version = "29.0.0" } parachains-common = { version = "8.0.0" } cumulus-primitives-core = { version = "0.8.0" } emulated-integration-tests-common = { version = "4.0.0" } -# TODO: remove `penpal-runtime-dotsama` with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) -# temp crate until EthereumNetwork is extracted from penpal definition -penpal-runtime = { package="penpal-runtime-dotsama", path = "../../../../penpal" } -#penpal-runtime = { version = "0.15.0" } +penpal-runtime = { version = "0.15.1" } # Runtimes kusama-emulated-chain = { path = "../../../relays/kusama" } diff --git a/integration-tests/emulated/penpal/Cargo.toml b/integration-tests/emulated/penpal/Cargo.toml deleted file mode 100644 index 4276fb2486..0000000000 --- a/integration-tests/emulated/penpal/Cargo.toml +++ /dev/null @@ -1,193 +0,0 @@ -[package] -name = "penpal-runtime-dotsama" -version = "0.14.0" -authors = ["Anonymous"] -description = "TODO: remove `penpal-runtime-dotsama` with 1.3.0 (https://github.com/polkadot-fellows/runtimes/issues/186) - A parachain for communication back and forth with XCM of assets and uniques." -publish = false -license = "Unlicense" -homepage = "https://substrate.io" -repository.workspace = true -edition.workspace = true - -[package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] - -[build-dependencies] -substrate-wasm-builder = { optional = true , version = "18.0.0" } - -[dependencies] -codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive"] } -hex-literal = { version = "0.4.1", optional = true } -log = { version = "0.4.20", default-features = false } -scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } -smallvec = "1.13.1" - -# Substrate -frame-benchmarking = { default-features = false, optional = true, version = "29.0.0" } -frame-executive = { default-features = false, version = "29.0.0" } -frame-support = { default-features = false, version = "29.0.0" } -frame-system = { default-features = false, version = "29.0.0" } -frame-system-benchmarking = { default-features = false, optional = true, version = "29.0.0" } -frame-system-rpc-runtime-api = { default-features = false, version = "27.0.0" } -frame-try-runtime = { default-features = false, optional = true, version = "0.35.0" } -pallet-aura = { default-features = false, version = "28.0.0" } -pallet-authorship = { default-features = false, version = "29.0.0" } -pallet-balances = { default-features = false, version = "29.0.0" } -pallet-session = { default-features = false, version = "29.0.0" } -pallet-sudo = { default-features = false, optional = true, version = "29.0.0" } -pallet-timestamp = { default-features = false, version = "28.0.0" } -pallet-transaction-payment = { default-features = false, version = "29.0.0" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "29.0.0" } -pallet-asset-tx-payment = { default-features = false, version = "29.0.0" } -pallet-assets = { default-features = false, version = "30.0.0" } -sp-api = { default-features = false, version = "27.0.0" } -sp-block-builder = { default-features = false, version = "27.0.0" } -sp-consensus-aura = { default-features = false, version = "0.33.0" } -sp-core = { default-features = false, version = "29.0.0" } -sp-genesis-builder = { default-features = false , version = "0.8.0" } -sp-inherents = { default-features = false, version = "27.0.0" } -sp-offchain = { default-features = false, version = "27.0.0" } -sp-runtime = { default-features = false, version = "32.0.0" } -sp-session = { default-features = false, version = "28.0.0" } -sp-std = { default-features = false, version = "14.0.0" } -sp-storage = { default-features = false, version = "20.0.0" } -sp-transaction-pool = { default-features = false, version = "27.0.0" } -sp-version = { default-features = false, version = "30.0.0" } - -# Polkadot -polkadot-primitives = { default-features = false , version = "8.0.1" } -pallet-xcm = { version = "8.0.1", default-features = false } -polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } -polkadot-runtime-common = { default-features = false, version = "8.0.1" } -xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } -xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "8.0.1" } -xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } - -# Cumulus -cumulus-pallet-aura-ext = { default-features = false , version = "0.8.0" } -pallet-message-queue = { default-features = false , version = "32.0.0" } -cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.8.1" } -cumulus-pallet-session-benchmarking = { default-features = false, version = "10.0.0" } -cumulus-pallet-xcm = { default-features = false , version = "0.8.0" } -cumulus-pallet-xcmp-queue = { default-features = false , version = "0.8.0" } -cumulus-primitives-core = { default-features = false , version = "0.8.0" } -cumulus-primitives-utility = { default-features = false , version = "0.8.1" } -pallet-collator-selection = { default-features = false , version = "10.0.0" } -parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.8.0" } -parachains-common = { default-features = false , version = "8.0.0" } -assets-common = { default-features = false , version = "0.8.0" } - -[features] -default = ["std"] -std = [ - "assets-common/std", - "codec/std", - "cumulus-pallet-aura-ext/std", - "cumulus-pallet-parachain-system/std", - "cumulus-pallet-session-benchmarking/std", - "cumulus-pallet-xcm/std", - "cumulus-pallet-xcmp-queue/std", - "cumulus-primitives-core/std", - "cumulus-primitives-utility/std", - "frame-benchmarking?/std", - "frame-executive/std", - "frame-support/std", - "frame-system-benchmarking?/std", - "frame-system-rpc-runtime-api/std", - "frame-system/std", - "frame-try-runtime?/std", - "log/std", - "pallet-asset-tx-payment/std", - "pallet-assets/std", - "pallet-aura/std", - "pallet-authorship/std", - "pallet-balances/std", - "pallet-collator-selection/std", - "pallet-message-queue/std", - "pallet-session/std", - "pallet-sudo/std", - "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-xcm/std", - "parachain-info/std", - "parachains-common/std", - "polkadot-parachain-primitives/std", - "polkadot-primitives/std", - "polkadot-runtime-common/std", - "scale-info/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-aura/std", - "sp-core/std", - "sp-genesis-builder/std", - "sp-inherents/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-storage/std", - "sp-transaction-pool/std", - "sp-version/std", - "substrate-wasm-builder", - "xcm-builder/std", - "xcm-executor/std", - "xcm/std", -] - -runtime-benchmarks = [ - "assets-common/runtime-benchmarks", - "cumulus-pallet-parachain-system/runtime-benchmarks", - "cumulus-pallet-session-benchmarking/runtime-benchmarks", - "cumulus-pallet-xcmp-queue/runtime-benchmarks", - "cumulus-primitives-core/runtime-benchmarks", - "cumulus-primitives-utility/runtime-benchmarks", - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system-benchmarking/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "hex-literal", - "pallet-asset-tx-payment/runtime-benchmarks", - "pallet-assets/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-collator-selection/runtime-benchmarks", - "pallet-message-queue/runtime-benchmarks", - "pallet-sudo/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "parachains-common/runtime-benchmarks", - "polkadot-parachain-primitives/runtime-benchmarks", - "polkadot-primitives/runtime-benchmarks", - "polkadot-runtime-common/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", - "xcm-executor/runtime-benchmarks", -] - -try-runtime = [ - "cumulus-pallet-aura-ext/try-runtime", - "cumulus-pallet-parachain-system/try-runtime", - "cumulus-pallet-xcm/try-runtime", - "cumulus-pallet-xcmp-queue/try-runtime", - "frame-executive/try-runtime", - "frame-support/try-runtime", - "frame-system/try-runtime", - "frame-try-runtime/try-runtime", - "pallet-asset-tx-payment/try-runtime", - "pallet-assets/try-runtime", - "pallet-aura/try-runtime", - "pallet-authorship/try-runtime", - "pallet-balances/try-runtime", - "pallet-collator-selection/try-runtime", - "pallet-message-queue/try-runtime", - "pallet-session/try-runtime", - "pallet-sudo/try-runtime", - "pallet-timestamp/try-runtime", - "pallet-transaction-payment/try-runtime", - "pallet-xcm/try-runtime", - "parachain-info/try-runtime", - "polkadot-runtime-common/try-runtime", - "sp-runtime/try-runtime", -] - -experimental = ["pallet-aura/experimental"] diff --git a/integration-tests/emulated/penpal/build.rs b/integration-tests/emulated/penpal/build.rs deleted file mode 100644 index 9c9cde9a25..0000000000 --- a/integration-tests/emulated/penpal/build.rs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Cumulus. - -// Substrate is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Substrate is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Cumulus. If not, see . - -#[cfg(feature = "std")] -fn main() { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() - .build() -} - -#[cfg(not(feature = "std"))] -fn main() {} diff --git a/integration-tests/emulated/penpal/src/lib.rs b/integration-tests/emulated/penpal/src/lib.rs deleted file mode 100644 index bf8dcbc24c..0000000000 --- a/integration-tests/emulated/penpal/src/lib.rs +++ /dev/null @@ -1,911 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Cumulus. - -// Cumulus is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Cumulus is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Cumulus. If not, see . - -//! The PenPal runtime is designed as a test runtime that can be created with an arbitrary `ParaId`, -//! such that multiple instances of the parachain can be on the same parent relay. Ensure that you -//! have enough nodes running to support this or you will get scheduling errors. -//! -//! The PenPal runtime's primary use is for testing interactions between System parachains and -//! other chains that are not trusted teleporters. - -#![cfg_attr(not(feature = "std"), no_std)] -// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. -#![recursion_limit = "256"] - -// Make the WASM binary available. -#[cfg(feature = "std")] -include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); - -mod weights; -pub mod xcm_config; - -use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; -use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; -use frame_support::{ - construct_runtime, derive_impl, - dispatch::DispatchClass, - genesis_builder_helper::{build_config, create_default_config}, - pallet_prelude::Weight, - parameter_types, - traits::{ - AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, ConstU8, Everything, TransformOrigin, - }, - weights::{ - constants::WEIGHT_REF_TIME_PER_SECOND, ConstantMultiplier, FeePolynomial, - WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, - }, - PalletId, -}; -use frame_system::{ - limits::{BlockLength, BlockWeights}, - EnsureRoot, EnsureSigned, -}; -use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; -use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery; -use smallvec::smallvec; -use sp_api::impl_runtime_apis; -pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; -use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; -use sp_runtime::{ - create_runtime_str, generic, impl_opaque_keys, - traits::{AccountIdLookup, BlakeTwo256, Block as BlockT}, - transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, -}; -pub use sp_runtime::{traits::ConvertInto, MultiAddress, Perbill, Permill}; -use sp_std::prelude::*; -#[cfg(feature = "std")] -use sp_version::NativeVersion; -use sp_version::RuntimeVersion; -use xcm_config::{AssetsToBlockAuthor, XcmOriginToTransactDispatchOrigin}; - -#[cfg(any(feature = "std", test))] -pub use sp_runtime::BuildStorage; - -// Polkadot imports -use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; - -use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; - -// XCM Imports -use parachains_common::{AccountId, Signature}; -use xcm::latest::prelude::BodyId; - -/// Balance of an account. -pub type Balance = u128; - -/// Index of a transaction in the chain. -pub type Nonce = u32; - -/// A hash of some data used by the chain. -pub type Hash = sp_core::H256; - -/// An index to a block. -pub type BlockNumber = u32; - -/// The address format for describing accounts. -pub type Address = MultiAddress; - -/// Block header type as expected by this runtime. -pub type Header = generic::Header; - -/// Block type as expected by this runtime. -pub type Block = generic::Block; - -/// A Block signed with a Justification -pub type SignedBlock = generic::SignedBlock; - -/// BlockId type as expected by this runtime. -pub type BlockId = generic::BlockId; - -// Id used for identifying assets. -pub type AssetId = u32; - -/// The SignedExtension to the basic transaction logic. -pub type SignedExtra = ( - frame_system::CheckNonZeroSender, - frame_system::CheckSpecVersion, - frame_system::CheckTxVersion, - frame_system::CheckGenesis, - frame_system::CheckEra, - frame_system::CheckNonce, - frame_system::CheckWeight, - pallet_asset_tx_payment::ChargeAssetTxPayment, -); - -/// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = - generic::UncheckedExtrinsic; - -pub type Migrations = ( - pallet_balances::migration::MigrateToTrackInactive, - pallet_collator_selection::migration::v1::MigrateToV1, -); - -/// Executive: handles dispatch to the various modules. -pub type Executive = frame_executive::Executive< - Runtime, - Block, - frame_system::ChainContext, - Runtime, - AllPalletsWithSystem, - Migrations, ->; - -/// Handles converting a weight scalar to a fee value, based on the scale and granularity of the -/// node's balance type. -/// -/// This should typically create a mapping between the following ranges: -/// - `[0, MAXIMUM_BLOCK_WEIGHT]` -/// - `[Balance::min, Balance::max]` -/// -/// Yet, it can be used for any other sort of change to weight-fee. Some examples being: -/// - Setting it to `0` will essentially disable the weight fee. -/// - Setting it to `1` will cause the literal `#[weight = x]` values to be charged. -pub struct WeightToFee; -impl frame_support::weights::WeightToFee for WeightToFee { - type Balance = Balance; - - fn weight_to_fee(weight: &Weight) -> Self::Balance { - let time_poly: FeePolynomial = RefTimeToFee::polynomial().into(); - let proof_poly: FeePolynomial = ProofSizeToFee::polynomial().into(); - - // Take the maximum instead of the sum to charge by the more scarce resource. - time_poly.eval(weight.ref_time()).max(proof_poly.eval(weight.proof_size())) - } -} - -/// Maps the reference time component of `Weight` to a fee. -pub struct RefTimeToFee; -impl WeightToFeePolynomial for RefTimeToFee { - type Balance = Balance; - fn polynomial() -> WeightToFeeCoefficients { - let p = MILLIUNIT / 10; - let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); - - smallvec![WeightToFeeCoefficient { - degree: 1, - negative: false, - coeff_frac: Perbill::from_rational(p % q, q), - coeff_integer: p / q, - }] - } -} - -/// Maps the proof size component of `Weight` to a fee. -pub struct ProofSizeToFee; -impl WeightToFeePolynomial for ProofSizeToFee { - type Balance = Balance; - fn polynomial() -> WeightToFeeCoefficients { - // Map 10kb proof to 1 CENT. - let p = MILLIUNIT / 10; - let q = 10_000; - - smallvec![WeightToFeeCoefficient { - degree: 1, - negative: false, - coeff_frac: Perbill::from_rational(p % q, q), - coeff_integer: p / q, - }] - } -} -/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know -/// the specifics of the runtime. They can then be made to be agnostic over specific formats -/// of data like extrinsics, allowing for them to continue syncing the network through upgrades -/// to even the core data structures. -pub mod opaque { - use super::*; - use sp_runtime::{generic, traits::BlakeTwo256}; - - pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; - /// Opaque block header type. - pub type Header = generic::Header; - /// Opaque block type. - pub type Block = generic::Block; - /// Opaque block identifier type. - pub type BlockId = generic::BlockId; -} - -impl_opaque_keys! { - pub struct SessionKeys { - pub aura: Aura, - } -} - -#[sp_version::runtime_version] -pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("penpal-parachain"), - impl_name: create_runtime_str!("penpal-parachain"), - authoring_version: 1, - spec_version: 1, - impl_version: 0, - apis: RUNTIME_API_VERSIONS, - transaction_version: 1, - state_version: 1, -}; - -/// This determines the average expected block time that we are targeting. -/// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`. -/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked -/// up by `pallet_aura` to implement `fn slot_duration()`. -/// -/// Change this to adjust the block time. -pub const MILLISECS_PER_BLOCK: u64 = 12000; - -// NOTE: Currently it is not possible to change the slot duration after the chain has started. -// Attempting to do so will brick block production. -pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; - -// Time is measured by number of blocks. -pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); -pub const HOURS: BlockNumber = MINUTES * 60; -pub const DAYS: BlockNumber = HOURS * 24; - -// Unit = the base number of indivisible units for balances -pub const UNIT: Balance = 1_000_000_000_000; -pub const MILLIUNIT: Balance = 1_000_000_000; -pub const MICROUNIT: Balance = 1_000_000; - -/// The existential deposit. Set to 1/10 of the Connected Relay Chain. -pub const EXISTENTIAL_DEPOSIT: Balance = MILLIUNIT; - -/// We assume that ~5% of the block weight is consumed by `on_initialize` handlers. This is -/// used to limit the maximal weight of a single extrinsic. -const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(5); - -/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used by -/// `Operational` extrinsics. -const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); - -/// We allow for 0.5 of a second of compute with a 12 second average block time. -const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts( - WEIGHT_REF_TIME_PER_SECOND.saturating_div(2), - cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64, -); - -/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included -/// into the relay chain. -const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1; -/// How many parachain blocks are processed by the relay chain per parent. Limits the -/// number of blocks authored per slot. -const BLOCK_PROCESSING_VELOCITY: u32 = 1; -/// Relay chain slot duration, in milliseconds. -const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000; - -/// The version information used to identify this runtime when compiled natively. -#[cfg(feature = "std")] -pub fn native_version() -> NativeVersion { - NativeVersion { runtime_version: VERSION, can_author_with: Default::default() } -} - -parameter_types! { - pub const Version: RuntimeVersion = VERSION; - - // This part is copied from Substrate's `bin/node/runtime/src/lib.rs`. - // The `RuntimeBlockLength` and `RuntimeBlockWeights` exist here because the - // `DeletionWeightLimit` and `DeletionQueueDepth` depend on those to parameterize - // the lazy contract deletion. - pub RuntimeBlockLength: BlockLength = - BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); - pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder() - .base_block(BlockExecutionWeight::get()) - .for_class(DispatchClass::all(), |weights| { - weights.base_extrinsic = ExtrinsicBaseWeight::get(); - }) - .for_class(DispatchClass::Normal, |weights| { - weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); - }) - .for_class(DispatchClass::Operational, |weights| { - weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT); - // Operational transactions have some extra reserved space, so that they - // are included even if block reached `MAXIMUM_BLOCK_WEIGHT`. - weights.reserved = Some( - MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT - ); - }) - .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) - .build_or_panic(); - pub const SS58Prefix: u16 = 42; -} - -// Configure FRAME pallets to include in runtime. - -#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] -impl frame_system::Config for Runtime { - /// The identifier used to distinguish between accounts. - type AccountId = AccountId; - /// The aggregated dispatch type that is available for extrinsics. - type RuntimeCall = RuntimeCall; - /// The lookup mechanism to get account ID from whatever is passed in dispatchers. - type Lookup = AccountIdLookup; - /// The index type for storing how many extrinsics an account has signed. - type Nonce = Nonce; - /// The type for hashing blocks and tries. - type Hash = Hash; - /// The hashing algorithm used. - type Hashing = BlakeTwo256; - /// The block type. - type Block = Block; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - /// The ubiquitous origin type. - type RuntimeOrigin = RuntimeOrigin; - /// Maximum number of block number to block hash mappings to keep (oldest pruned first). - type BlockHashCount = BlockHashCount; - /// Runtime version. - type Version = Version; - /// Converts a module to an index of this module in the runtime. - type PalletInfo = PalletInfo; - /// The data to be stored in an account. - type AccountData = pallet_balances::AccountData; - /// What to do if a new account is created. - type OnNewAccount = (); - /// What to do if an account is fully reaped from the system. - type OnKilledAccount = (); - /// The weight of database operations that the runtime can invoke. - type DbWeight = RocksDbWeight; - /// The basic call filter to use in dispatchable. - type BaseCallFilter = Everything; - /// Weight information for the extrinsics of this pallet. - type SystemWeightInfo = (); - /// Block & extrinsics weights: base values and limits. - type BlockWeights = RuntimeBlockWeights; - /// The maximum length of a block (in bytes). - type BlockLength = RuntimeBlockLength; - /// This is used as an identifier of the chain. 42 is the generic substrate prefix. - type SS58Prefix = SS58Prefix; - /// The action to take on a Runtime Upgrade - type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; - type MaxConsumers = frame_support::traits::ConstU32<16>; -} - -impl pallet_timestamp::Config for Runtime { - /// A timestamp: milliseconds since the unix epoch. - type Moment = u64; - type OnTimestampSet = Aura; - type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; - type WeightInfo = (); -} - -impl pallet_authorship::Config for Runtime { - type FindAuthor = pallet_session::FindAccountFromAuthorIndex; - type EventHandler = (CollatorSelection,); -} - -parameter_types! { - pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT; -} - -impl pallet_balances::Config for Runtime { - type MaxLocks = ConstU32<50>; - /// The type for recording an account's balance. - type Balance = Balance; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type WeightInfo = pallet_balances::weights::SubstrateWeight; - type MaxReserves = ConstU32<50>; - type ReserveIdentifier = [u8; 8]; - type RuntimeHoldReason = RuntimeHoldReason; - type RuntimeFreezeReason = RuntimeFreezeReason; - type FreezeIdentifier = (); - type MaxFreezes = ConstU32<0>; -} - -parameter_types! { - /// Relay Chain `TransactionByteFee` / 10 - pub const TransactionByteFee: Balance = 10 * MICROUNIT; -} - -impl pallet_transaction_payment::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; - type WeightToFee = WeightToFee; - type LengthToFee = ConstantMultiplier; - type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; - type OperationalFeeMultiplier = ConstU8<5>; -} - -parameter_types! { - pub const AssetDeposit: Balance = 0; - pub const AssetAccountDeposit: Balance = 0; - pub const ApprovalDeposit: Balance = 0; - pub const AssetsStringLimit: u32 = 50; - pub const MetadataDepositBase: Balance = 0; - pub const MetadataDepositPerByte: Balance = 0; -} - -// /// We allow root and the Relay Chain council to execute privileged asset operations. -// pub type AssetsForceOrigin = -// EnsureOneOf, EnsureXcm>>; - -impl pallet_assets::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Balance = Balance; - type AssetId = AssetId; - type AssetIdParameter = codec::Compact; - type Currency = Balances; - type CreateOrigin = AsEnsureOriginWithArg>; - type ForceOrigin = EnsureRoot; - type AssetDeposit = AssetDeposit; - type MetadataDepositBase = MetadataDepositBase; - type MetadataDepositPerByte = MetadataDepositPerByte; - type ApprovalDeposit = ApprovalDeposit; - type StringLimit = AssetsStringLimit; - type Freezer = (); - type Extra = (); - type WeightInfo = pallet_assets::weights::SubstrateWeight; - type CallbackHandle = (); - type AssetAccountDeposit = AssetAccountDeposit; - type RemoveItemsLimit = frame_support::traits::ConstU32<1000>; - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = (); -} - -parameter_types! { - // we just reuse the same deposits - pub const ForeignAssetsAssetDeposit: Balance = AssetDeposit::get(); - pub const ForeignAssetsAssetAccountDeposit: Balance = AssetAccountDeposit::get(); - pub const ForeignAssetsApprovalDeposit: Balance = ApprovalDeposit::get(); - pub const ForeignAssetsAssetsStringLimit: u32 = AssetsStringLimit::get(); - pub const ForeignAssetsMetadataDepositBase: Balance = MetadataDepositBase::get(); - pub const ForeignAssetsMetadataDepositPerByte: Balance = MetadataDepositPerByte::get(); -} - -/// Another pallet assets instance to store foreign assets from bridgehub. -pub type ForeignAssetsInstance = pallet_assets::Instance2; -impl pallet_assets::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Balance = Balance; - type AssetId = xcm::v3::Location; - type AssetIdParameter = xcm::v3::Location; - type Currency = Balances; - type CreateOrigin = AsEnsureOriginWithArg>; - type ForceOrigin = EnsureRoot; - type AssetDeposit = ForeignAssetsAssetDeposit; - type MetadataDepositBase = ForeignAssetsMetadataDepositBase; - type MetadataDepositPerByte = ForeignAssetsMetadataDepositPerByte; - type ApprovalDeposit = ForeignAssetsApprovalDeposit; - type StringLimit = ForeignAssetsAssetsStringLimit; - type Freezer = (); - type Extra = (); - type WeightInfo = pallet_assets::weights::SubstrateWeight; - type CallbackHandle = (); - type AssetAccountDeposit = ForeignAssetsAssetAccountDeposit; - type RemoveItemsLimit = frame_support::traits::ConstU32<1000>; - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = xcm_config::XcmBenchmarkHelper; -} - -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 WeightInfo = (); - type RuntimeEvent = RuntimeEvent; - type OnSystemEvent = (); - type SelfParaId = parachain_info::Pallet; - type DmpQueue = frame_support::traits::EnqueueWithOrigin; - type ReservedDmpWeight = ReservedDmpWeight; - type OutboundXcmpMessageSource = XcmpQueue; - type XcmpMessageHandler = XcmpQueue; - type ReservedXcmpWeight = ReservedXcmpWeight; - type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases; - type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< - Runtime, - RELAY_CHAIN_SLOT_DURATION_MILLIS, - BLOCK_PROCESSING_VELOCITY, - UNINCLUDED_SEGMENT_CAPACITY, - >; -} - -impl parachain_info::Config for Runtime {} - -parameter_types! { - pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; -} - -impl pallet_message_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); - type MessageProcessor = xcm_builder::ProcessXcmMessage< - AggregateMessageOrigin, - xcm_executor::XcmExecutor, - RuntimeCall, - >; - type Size = u32; - // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: - type QueueChangeHandler = NarrowOriginToSibling; - type QueuePausedQuery = NarrowOriginToSibling; - type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; - type MaxStale = sp_core::ConstU32<8>; - type ServiceWeight = MessageQueueServiceWeight; -} - -impl cumulus_pallet_aura_ext::Config for Runtime {} - -impl cumulus_pallet_xcmp_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type ChannelInfo = ParachainSystem; - type VersionWrapper = PolkadotXcm; - // Enqueue XCMP messages from siblings for later processing. - type XcmpQueue = TransformOrigin; - type MaxInboundSuspended = sp_core::ConstU32<1_000>; - type ControllerOrigin = EnsureRoot; - type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; - type WeightInfo = (); - type PriceForSiblingDelivery = NoPriceForMessageDelivery; -} - -parameter_types! { - pub const Period: u32 = 6 * HOURS; - pub const Offset: u32 = 0; -} - -impl pallet_session::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type ValidatorId = ::AccountId; - // we don't have stash and controller, thus we don't need the convert as well. - type ValidatorIdOf = pallet_collator_selection::IdentityCollator; - type ShouldEndSession = pallet_session::PeriodicSessions; - type NextSessionRotation = pallet_session::PeriodicSessions; - type SessionManager = CollatorSelection; - // Essentially just Aura, but let's be pedantic. - type SessionHandler = ::KeyTypeIdProviders; - type Keys = SessionKeys; - type WeightInfo = (); -} - -impl pallet_aura::Config for Runtime { - type AuthorityId = AuraId; - type DisabledValidators = (); - type MaxAuthorities = ConstU32<100_000>; - type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] - type SlotDuration = pallet_aura::MinimumPeriodTimesTwo; -} - -parameter_types! { - pub const PotId: PalletId = PalletId(*b"PotStake"); - pub const SessionLength: BlockNumber = 6 * HOURS; - pub const ExecutiveBody: BodyId = BodyId::Executive; -} - -// We allow root only to execute privileged collator selection operations. -pub type CollatorSelectionUpdateOrigin = EnsureRoot; - -impl pallet_collator_selection::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type UpdateOrigin = CollatorSelectionUpdateOrigin; - type PotId = PotId; - type MaxCandidates = ConstU32<100>; - type MinEligibleCollators = ConstU32<4>; - type MaxInvulnerables = ConstU32<20>; - // should be a multiple of session or things will get inconsistent - type KickThreshold = Period; - type ValidatorId = ::AccountId; - type ValidatorIdOf = pallet_collator_selection::IdentityCollator; - type ValidatorRegistration = Session; - type WeightInfo = (); -} - -impl pallet_asset_tx_payment::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Fungibles = Assets; - type OnChargeAssetTransaction = pallet_asset_tx_payment::FungiblesAdapter< - pallet_assets::BalanceToAssetBalance< - Balances, - Runtime, - ConvertInto, - pallet_assets::Instance1, - >, - AssetsToBlockAuthor, - >; -} - -impl pallet_sudo::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type WeightInfo = pallet_sudo::weights::SubstrateWeight; -} - -// Create the runtime by composing the FRAME pallets that were previously configured. -construct_runtime!( - pub enum Runtime - { - // System support stuff. - System: frame_system = 0, - ParachainSystem: cumulus_pallet_parachain_system = 1, - Timestamp: pallet_timestamp = 2, - ParachainInfo: parachain_info = 3, - - // Monetary stuff. - Balances: pallet_balances = 10, - TransactionPayment: pallet_transaction_payment = 11, - AssetTxPayment: pallet_asset_tx_payment = 12, - - // Collator support. The order of these 4 are important and shall not change. - Authorship: pallet_authorship = 20, - CollatorSelection: pallet_collator_selection = 21, - Session: pallet_session = 22, - Aura: pallet_aura = 23, - AuraExt: cumulus_pallet_aura_ext = 24, - - // XCM helpers. - XcmpQueue: cumulus_pallet_xcmp_queue = 30, - PolkadotXcm: pallet_xcm = 31, - CumulusXcm: cumulus_pallet_xcm = 32, - MessageQueue: pallet_message_queue = 34, - - // The main stage. - Assets: pallet_assets:: = 50, - ForeignAssets: pallet_assets:: = 51, - - Sudo: pallet_sudo = 255, - } -); - -#[cfg(feature = "runtime-benchmarks")] -mod benches { - frame_benchmarking::define_benchmarks!( - [frame_system, SystemBench::] - [pallet_balances, Balances] - [pallet_message_queue, MessageQueue] - [pallet_session, SessionBench::] - [pallet_sudo, Sudo] - [pallet_timestamp, Timestamp] - [pallet_collator_selection, CollatorSelection] - [cumulus_pallet_parachain_system, ParachainSystem] - [cumulus_pallet_xcmp_queue, XcmpQueue] - ); -} - -impl_runtime_apis! { - impl sp_consensus_aura::AuraApi for Runtime { - fn slot_duration() -> sp_consensus_aura::SlotDuration { - sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration()) - } - - fn authorities() -> Vec { - Aura::authorities().into_inner() - } - } - - impl sp_api::Core for Runtime { - fn version() -> RuntimeVersion { - VERSION - } - - fn execute_block(block: Block) { - Executive::execute_block(block) - } - - fn initialize_block(header: &::Header) { - Executive::initialize_block(header) - } - } - - impl sp_api::Metadata for Runtime { - fn metadata() -> OpaqueMetadata { - OpaqueMetadata::new(Runtime::metadata().into()) - } - - fn metadata_at_version(version: u32) -> Option { - Runtime::metadata_at_version(version) - } - - fn metadata_versions() -> sp_std::vec::Vec { - Runtime::metadata_versions() - } - } - - impl sp_block_builder::BlockBuilder for Runtime { - fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { - Executive::apply_extrinsic(extrinsic) - } - - fn finalize_block() -> ::Header { - Executive::finalize_block() - } - - fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { - data.create_extrinsics() - } - - fn check_inherents( - block: Block, - data: sp_inherents::InherentData, - ) -> sp_inherents::CheckInherentsResult { - data.check_extrinsics(&block) - } - } - - impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { - fn validate_transaction( - source: TransactionSource, - tx: ::Extrinsic, - block_hash: ::Hash, - ) -> TransactionValidity { - Executive::validate_transaction(source, tx, block_hash) - } - } - - impl sp_offchain::OffchainWorkerApi for Runtime { - fn offchain_worker(header: &::Header) { - Executive::offchain_worker(header) - } - } - - impl sp_session::SessionKeys for Runtime { - fn generate_session_keys(seed: Option>) -> Vec { - SessionKeys::generate(seed) - } - - fn decode_session_keys( - encoded: Vec, - ) -> Option, KeyTypeId)>> { - SessionKeys::decode_into_raw_public_keys(&encoded) - } - } - - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Nonce { - System::account_nonce(account) - } - } - - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime { - fn query_info( - uxt: ::Extrinsic, - len: u32, - ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo { - TransactionPayment::query_info(uxt, len) - } - fn query_fee_details( - uxt: ::Extrinsic, - len: u32, - ) -> pallet_transaction_payment::FeeDetails { - TransactionPayment::query_fee_details(uxt, len) - } - fn query_weight_to_fee(weight: Weight) -> Balance { - TransactionPayment::weight_to_fee(weight) - } - fn query_length_to_fee(length: u32) -> Balance { - TransactionPayment::length_to_fee(length) - } - } - - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi - for Runtime - { - fn query_call_info( - call: RuntimeCall, - len: u32, - ) -> pallet_transaction_payment::RuntimeDispatchInfo { - TransactionPayment::query_call_info(call, len) - } - fn query_call_fee_details( - call: RuntimeCall, - len: u32, - ) -> pallet_transaction_payment::FeeDetails { - TransactionPayment::query_call_fee_details(call, len) - } - fn query_weight_to_fee(weight: Weight) -> Balance { - TransactionPayment::weight_to_fee(weight) - } - fn query_length_to_fee(length: u32) -> Balance { - TransactionPayment::length_to_fee(length) - } - } - - impl cumulus_primitives_core::CollectCollationInfo for Runtime { - fn collect_collation_info(header: &::Header) -> cumulus_primitives_core::CollationInfo { - ParachainSystem::collect_collation_info(header) - } - } - - #[cfg(feature = "try-runtime")] - impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { - let weight = Executive::try_runtime_upgrade(checks).unwrap(); - (weight, RuntimeBlockWeights::get().max_block) - } - - fn execute_block( - block: Block, - state_root_check: bool, - signature_check: bool, - select: frame_try_runtime::TryStateSelect, - ) -> Weight { - // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to - // have a backtrace here. - Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap() - } - } - - #[cfg(feature = "runtime-benchmarks")] - impl frame_benchmarking::Benchmark for Runtime { - fn benchmark_metadata(extra: bool) -> ( - Vec, - Vec, - ) { - use frame_benchmarking::{Benchmarking, BenchmarkList}; - use frame_support::traits::StorageInfoTrait; - use frame_system_benchmarking::Pallet as SystemBench; - use cumulus_pallet_session_benchmarking::Pallet as SessionBench; - - let mut list = Vec::::new(); - list_benchmarks!(list, extra); - - let storage_info = AllPalletsWithSystem::storage_info(); - (list, storage_info) - } - - fn dispatch_benchmark( - config: frame_benchmarking::BenchmarkConfig - ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch}; - use sp_storage::TrackedStorageKey; - - use frame_system_benchmarking::Pallet as SystemBench; - impl frame_system_benchmarking::Config for Runtime {} - - use cumulus_pallet_session_benchmarking::Pallet as SessionBench; - impl cumulus_pallet_session_benchmarking::Config for Runtime {} - - let whitelist: Vec = vec![ - // Block Number - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), - // Total Issuance - hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(), - // Execution Phase - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(), - // Event Count - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(), - // System Events - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(), - ]; - - let mut batches = Vec::::new(); - let params = (&config, &whitelist); - add_benchmarks!(params, batches); - - if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } - Ok(batches) - } - } - - impl sp_genesis_builder::GenesisBuilder for Runtime { - fn create_default_config() -> Vec { - create_default_config::() - } - - fn build_config(config: Vec) -> sp_genesis_builder::Result { - build_config::(config) - } - } -} - -cumulus_pallet_parachain_system::register_validate_block! { - Runtime = Runtime, - BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::, -} diff --git a/integration-tests/emulated/penpal/src/weights/block_weights.rs b/integration-tests/emulated/penpal/src/weights/block_weights.rs deleted file mode 100644 index e7fdb2aae2..0000000000 --- a/integration-tests/emulated/penpal/src/weights/block_weights.rs +++ /dev/null @@ -1,53 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -pub mod constants { - use frame_support::{ - parameter_types, - weights::{constants, Weight}, - }; - - parameter_types! { - /// Importing a block with 0 Extrinsics. - pub const BlockExecutionWeight: Weight = - Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0); - } - - #[cfg(test)] - mod test_weights { - use frame_support::weights::constants; - - /// Checks that the weight exists and is sane. - // NOTE: If this test fails but you are sure that the generated values are fine, - // you can delete it. - #[test] - fn sane() { - let w = super::constants::BlockExecutionWeight::get(); - - // At least 100 µs. - assert!( - w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, - "Weight should be at least 100 µs." - ); - // At most 50 ms. - assert!( - w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, - "Weight should be at most 50 ms." - ); - } - } -} diff --git a/integration-tests/emulated/penpal/src/weights/extrinsic_weights.rs b/integration-tests/emulated/penpal/src/weights/extrinsic_weights.rs deleted file mode 100644 index 1a4adb968b..0000000000 --- a/integration-tests/emulated/penpal/src/weights/extrinsic_weights.rs +++ /dev/null @@ -1,53 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -pub mod constants { - use frame_support::{ - parameter_types, - weights::{constants, Weight}, - }; - - parameter_types! { - /// Executing a NO-OP `System::remarks` Extrinsic. - pub const ExtrinsicBaseWeight: Weight = - Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0); - } - - #[cfg(test)] - mod test_weights { - use frame_support::weights::constants; - - /// Checks that the weight exists and is sane. - // NOTE: If this test fails but you are sure that the generated values are fine, - // you can delete it. - #[test] - fn sane() { - let w = super::constants::ExtrinsicBaseWeight::get(); - - // At least 10 µs. - assert!( - w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, - "Weight should be at least 10 µs." - ); - // At most 1 ms. - assert!( - w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Weight should be at most 1 ms." - ); - } - } -} diff --git a/integration-tests/emulated/penpal/src/weights/mod.rs b/integration-tests/emulated/penpal/src/weights/mod.rs deleted file mode 100644 index b473d49e20..0000000000 --- a/integration-tests/emulated/penpal/src/weights/mod.rs +++ /dev/null @@ -1,27 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//! Expose the auto generated weight files. - -pub mod block_weights; -pub mod extrinsic_weights; -pub mod paritydb_weights; -pub mod rocksdb_weights; - -pub use block_weights::constants::BlockExecutionWeight; -pub use extrinsic_weights::constants::ExtrinsicBaseWeight; -pub use rocksdb_weights::constants::RocksDbWeight; diff --git a/integration-tests/emulated/penpal/src/weights/paritydb_weights.rs b/integration-tests/emulated/penpal/src/weights/paritydb_weights.rs deleted file mode 100644 index 3dd817aa6f..0000000000 --- a/integration-tests/emulated/penpal/src/weights/paritydb_weights.rs +++ /dev/null @@ -1,63 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -pub mod constants { - use frame_support::{ - parameter_types, - weights::{constants, RuntimeDbWeight}, - }; - - parameter_types! { - /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout - /// the runtime. - pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS, - write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS, - }; - } - - #[cfg(test)] - mod test_db_weights { - use super::constants::RocksDbWeight as W; - use frame_support::weights::constants; - - /// Checks that all weights exist and have sane values. - // NOTE: If this test fails but you are sure that the generated values are fine, - // you can delete it. - #[test] - fn sane() { - // At least 1 µs. - assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, - "Read weight should be at least 1 µs." - ); - assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, - "Write weight should be at least 1 µs." - ); - // At most 1 ms. - assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Read weight should be at most 1 ms." - ); - assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Write weight should be at most 1 ms." - ); - } - } -} diff --git a/integration-tests/emulated/penpal/src/weights/rocksdb_weights.rs b/integration-tests/emulated/penpal/src/weights/rocksdb_weights.rs deleted file mode 100644 index 3dd817aa6f..0000000000 --- a/integration-tests/emulated/penpal/src/weights/rocksdb_weights.rs +++ /dev/null @@ -1,63 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -pub mod constants { - use frame_support::{ - parameter_types, - weights::{constants, RuntimeDbWeight}, - }; - - parameter_types! { - /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout - /// the runtime. - pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { - read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS, - write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS, - }; - } - - #[cfg(test)] - mod test_db_weights { - use super::constants::RocksDbWeight as W; - use frame_support::weights::constants; - - /// Checks that all weights exist and have sane values. - // NOTE: If this test fails but you are sure that the generated values are fine, - // you can delete it. - #[test] - fn sane() { - // At least 1 µs. - assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, - "Read weight should be at least 1 µs." - ); - assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, - "Write weight should be at least 1 µs." - ); - // At most 1 ms. - assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Read weight should be at most 1 ms." - ); - assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Write weight should be at most 1 ms." - ); - } - } -} diff --git a/integration-tests/emulated/penpal/src/xcm_config.rs b/integration-tests/emulated/penpal/src/xcm_config.rs deleted file mode 100644 index b9cf0a1892..0000000000 --- a/integration-tests/emulated/penpal/src/xcm_config.rs +++ /dev/null @@ -1,409 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Cumulus. - -// Cumulus is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Cumulus is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Cumulus. If not, see . - -//! Holds the XCM specific configuration that would otherwise be in lib.rs -//! -//! This configuration dictates how the Penpal chain will communicate with other chains. -//! -//! One of the main uses of the penpal chain will be to be a benefactor of reserve asset transfers -//! with Asset Hub as the reserve. At present no derivative tokens are minted on receipt of a -//! `ReserveAssetTransferDeposited` message but that will but the intension will be to support this -//! soon. -use super::{ - AccountId, AllPalletsWithSystem, AssetId as AssetIdPalletAssets, Assets, Balance, Balances, - ForeignAssets, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, - RuntimeOrigin, WeightToFee, XcmpQueue, -}; -use core::marker::PhantomData; -use frame_support::{ - parameter_types, - traits::{ - fungibles::{self, Balanced, Credit}, - ConstU32, Contains, ContainsPair, Everything, Get, Nothing, - }, - weights::Weight, -}; -use frame_system::EnsureRoot; -use pallet_asset_tx_payment::HandleCredit; -use pallet_assets::Instance1; -use pallet_xcm::XcmPassthrough; -use polkadot_parachain_primitives::primitives::Sibling; -use polkadot_runtime_common::impls::ToAuthor; -use sp_runtime::traits::Zero; -use xcm::latest::prelude::*; -#[allow(deprecated)] -use xcm_builder::{ - AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, - FrameTransactionalProcessor, FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, NoChecking, - ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, StartsWith, TakeWeightCredit, TrailingSetTopicAsId, - UsingComponents, WithComputedOrigin, WithUniqueTopic, -}; -use xcm_executor::{traits::JustTry, XcmExecutor}; - -parameter_types! { - pub const RelayLocation: Location = Location::parent(); - pub const RelayNetwork: Option = None; - pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub UniversalLocation: InteriorLocation = [Parachain(ParachainInfo::parachain_id().into())].into(); -} - -/// 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 = ( - // The parent (Relay-chain) origin converts to the parent `AccountId`. - ParentIsPreset, - // Sibling parachain origins convert to AccountId via the `ParaId::into`. - SiblingParachainConvertsVia, - // Straight up local `AccountId32` origins just alias directly to `AccountId`. - AccountId32Aliases, -); - -/// Means for transacting assets on this chain. -#[allow(deprecated)] -pub type CurrencyTransactor = CurrencyAdapter< - // Use this currency: - Balances, - // Use this currency when it is a fungible asset matching the given location or name: - IsConcrete, - // 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, - // We don't track any teleports. - (), ->; - -/// Means for transacting assets besides the native currency on this chain. -pub type FungiblesTransactor = FungiblesAdapter< - // Use this fungibles implementation: - Assets, - // Use this currency when it is a fungible asset matching the given location or name: - ( - ConvertedConcreteId< - AssetIdPalletAssets, - Balance, - AsPrefixedGeneralIndex, - JustTry, - >, - ConvertedConcreteId< - AssetIdPalletAssets, - Balance, - AsPrefixedGeneralIndex< - SystemAssetHubAssetsPalletLocation, - AssetIdPalletAssets, - JustTry, - >, - JustTry, - >, - ), - // 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, - // We only want to allow teleports of known assets. We use non-zero issuance as an indication - // that this asset is known. - LocalMint>, - // The account to use for tracking teleports. - CheckingAccount, ->; - -/// `AssetId/Balance` converter for `TrustBackedAssets` -pub type ForeignAssetsConvertedConcreteId = - assets_common::ForeignAssetsConvertedConcreteId, Balance>; - -/// Means for transacting foreign assets from different global consensus. -pub type ForeignFungiblesTransactor = FungiblesAdapter< - // Use this fungibles implementation: - ForeignAssets, - // Use this currency when it is a fungible asset matching the given location or name: - ForeignAssetsConvertedConcreteId, - // Convert an XCM MultiLocation into a local account id: - LocationToAccountId, - // Our chain's account ID type (we can't get away without mentioning it explicitly): - AccountId, - // We dont need to check teleports here. - NoChecking, - // The account to use for tracking teleports. - CheckingAccount, ->; - -/// Means for transacting assets on this chain. -pub type AssetTransactors = (CurrencyTransactor, ForeignFungiblesTransactor, FungiblesTransactor); - -/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, -/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can -/// biases the kind of local `Origin` it will become. -pub type XcmOriginToTransactDispatchOrigin = ( - // Sovereign account converter; this attempts to derive an `AccountId` from the origin location - // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for - // foreign chains who want to have a local sovereign account on this chain which they control. - SovereignSignedViaLocation, - // Native converter for Relay-chain (Parent) location; will convert to a `Relay` origin when - // recognized. - RelayChainAsNative, - // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when - // recognized. - SiblingParachainAsNative, - // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a - // transaction from the Root origin. - ParentAsSuperuser, - // Native signed account converter; this just converts an `AccountId32` origin into a normal - // `RuntimeOrigin::Signed` origin of the same 32-byte value. - SignedAccountId32AsNative, - // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. - XcmPassthrough, -); - -parameter_types! { - // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024); - pub const MaxInstructions: u32 = 100; - pub const MaxAssetsIntoHolding: u32 = 64; -} - -pub struct ParentOrParentsExecutivePlurality; -impl Contains for ParentOrParentsExecutivePlurality { - fn contains(location: &Location) -> bool { - matches!(location.unpack(), (1, []) | (1, [Plurality { id: BodyId::Executive, .. }])) - } -} - -pub struct CommonGoodAssetsParachain; -impl Contains for CommonGoodAssetsParachain { - fn contains(location: &Location) -> bool { - matches!(location.unpack(), (1, [Parachain(1000)])) - } -} - -pub type Barrier = TrailingSetTopicAsId<( - TakeWeightCredit, - // Expected responses are OK. - AllowKnownQueryResponses, - // Allow XCMs with some computed origins to pass through. - WithComputedOrigin< - ( - // If the message is one that immediately attempts to pay for execution, then - // allow it. - AllowTopLevelPaidExecutionFrom, - // System Assets parachain, parent and its exec plurality get free - // execution - AllowExplicitUnpaidExecutionFrom<( - CommonGoodAssetsParachain, - ParentOrParentsExecutivePlurality, - )>, - // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, - ), - UniversalLocation, - ConstU32<8>, - >, -)>; - -/// Type alias to conveniently refer to `frame_system`'s `Config::AccountId`. -pub type AccountIdOf = ::AccountId; - -/// Asset filter that allows all assets from a certain location matching asset id. -pub struct AssetPrefixFrom(PhantomData<(Prefix, Origin)>); -impl ContainsPair for AssetPrefixFrom -where - Prefix: Get, - Origin: Get, -{ - fn contains(asset: &Asset, origin: &Location) -> bool { - let loc = Origin::get(); - &loc == origin && - matches!(asset, Asset { id: AssetId(asset_loc), fun: Fungible(_a) } - if asset_loc.starts_with(&Prefix::get())) - } -} - -type AssetsFrom = AssetPrefixFrom; - -/// Asset filter that allows native/relay asset if coming from a certain location. -pub struct NativeAssetFrom(PhantomData); -impl> ContainsPair for NativeAssetFrom { - fn contains(asset: &Asset, origin: &Location) -> bool { - let loc = T::get(); - &loc == origin && - matches!(asset, Asset { id: AssetId(asset_loc), fun: Fungible(_a) } - if *asset_loc == Location::from(Parent)) - } -} - -/// Allow checking in assets that have issuance > 0. -pub struct NonZeroIssuance(PhantomData<(AccountId, Assets)>); -impl Contains<>::AssetId> - for NonZeroIssuance -where - Assets: fungibles::Inspect, -{ - fn contains(id: &>::AssetId) -> bool { - !Assets::total_issuance(id.clone()).is_zero() - } -} - -/// A `HandleCredit` implementation that naively transfers the fees to the block author. -/// Will drop and burn the assets in case the transfer fails. -pub struct AssetsToBlockAuthor(PhantomData); -impl HandleCredit, pallet_assets::Pallet> for AssetsToBlockAuthor -where - R: pallet_authorship::Config + pallet_assets::Config, - AccountIdOf: From + Into, -{ - fn handle_credit(credit: Credit, pallet_assets::Pallet>) { - if let Some(author) = pallet_authorship::Pallet::::author() { - // In case of error: Will drop the result triggering the `OnDrop` of the imbalance. - let _ = pallet_assets::Pallet::::resolve(&author, credit); - } - } -} - -// This asset can be added to AH as ForeignAsset and teleported between Penpal and AH -pub const TELEPORTABLE_ASSET_ID: u32 = 2; -parameter_types! { - /// The location that this chain recognizes as the Relay network's Asset Hub. - pub SystemAssetHubLocation: Location = Location::new(1, [Parachain(1000)]); - // ALWAYS ensure that the index in PalletInstance stays up-to-date with - // the Relay Chain's Asset Hub's Assets pallet index - pub SystemAssetHubAssetsPalletLocation: Location = - Location::new(1, [Parachain(1000), PalletInstance(50)]); - pub AssetsPalletLocation: Location = - Location::new(0, [PalletInstance(50)]); - pub CheckingAccount: AccountId = PolkadotXcm::check_account(); - pub LocalTeleportableToAssetHub: Location = Location::new( - 0, - [PalletInstance(50), GeneralIndex(TELEPORTABLE_ASSET_ID.into())] - ); - pub LocalTeleportableToAssetHubV3: xcm::v3::Location = xcm::v3::Location::new( - 0, - [xcm::v3::Junction::PalletInstance(50), xcm::v3::Junction::GeneralIndex(TELEPORTABLE_ASSET_ID.into())] - ); - pub EthereumLocation: Location = Location::new(2, [GlobalConsensus(NetworkId::Ethereum { chain_id: 1 })]); -} - -/// Accepts asset with ID `AssetLocation` and is coming from `Origin` chain. -pub struct AssetFromChain(PhantomData<(AssetLocation, Origin)>); -impl, Origin: Get> ContainsPair - for AssetFromChain -{ - fn contains(asset: &Asset, origin: &Location) -> bool { - log::trace!(target: "xcm::contains", "AssetFromChain asset: {:?}, origin: {:?}", asset, origin); - *origin == Origin::get() && - matches!(asset.id.clone(), AssetId(id) if id == AssetLocation::get()) - } -} - -pub type Reserves = ( - NativeAsset, - AssetsFrom, - NativeAssetFrom, - AssetPrefixFrom, -); -pub type TrustedTeleporters = - (AssetFromChain,); - -pub struct XcmConfig; -impl xcm_executor::Config for XcmConfig { - type RuntimeCall = RuntimeCall; - type XcmSender = XcmRouter; - // How to withdraw and deposit an asset. - type AssetTransactor = AssetTransactors; - type OriginConverter = XcmOriginToTransactDispatchOrigin; - type IsReserve = Reserves; - // no teleport trust established with other chains - type IsTeleporter = TrustedTeleporters; - type UniversalLocation = UniversalLocation; - type Barrier = Barrier; - type Weigher = FixedWeightBounds; - type Trader = - UsingComponents>; - type ResponseHandler = PolkadotXcm; - type AssetTrap = PolkadotXcm; - type AssetClaims = PolkadotXcm; - type SubscriptionService = PolkadotXcm; - type PalletInstancesInfo = AllPalletsWithSystem; - type MaxAssetsIntoHolding = MaxAssetsIntoHolding; - type AssetLocker = (); - type AssetExchanger = (); - type FeeManager = (); - type MessageExporter = (); - type UniversalAliases = Nothing; - type CallDispatcher = RuntimeCall; - type SafeCallFilter = Everything; - type Aliasers = Nothing; - type TransactionalProcessor = FrameTransactionalProcessor; -} - -/// No local origins on this chain are allowed to dispatch XCM sends/executions. -pub type LocalOriginToLocation = SignedToAccountId32; - -/// The means for routing XCM messages which are not for local execution into the right message -/// queues. -pub type XcmRouter = WithUniqueTopic<( - // Two routers - use UMP to communicate with the relay chain: - cumulus_primitives_utility::ParentAsUmp, - // ..and XCMP to communicate with the sibling chains. - XcmpQueue, -)>; - -impl pallet_xcm::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type SendXcmOrigin = EnsureXcmOrigin; - type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; - type XcmExecuteFilter = Nothing; - // ^ Disable dispatchable execute on the XCM pallet. - // Needs to be `Everything` for local testing. - type XcmExecutor = XcmExecutor; - type XcmTeleportFilter = Everything; - type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; - type UniversalLocation = UniversalLocation; - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - - const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - // ^ Override for AdvertisedXcmVersion default - type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; - type Currency = Balances; - type CurrencyMatcher = (); - type TrustedLockers = (); - type SovereignAccountOf = LocationToAccountId; - type MaxLockers = ConstU32<8>; - type WeightInfo = pallet_xcm::TestWeightInfo; - type AdminOrigin = EnsureRoot; - type MaxRemoteLockConsumers = ConstU32<0>; - type RemoteLockConsumerIdentifier = (); -} - -impl cumulus_pallet_xcm::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; -} - -/// Simple conversion of `u32` into an `AssetId` for use in benchmarking. -pub struct XcmBenchmarkHelper; -#[cfg(feature = "runtime-benchmarks")] -impl pallet_assets::BenchmarkHelper for XcmBenchmarkHelper { - fn create_asset_id_parameter(id: u32) -> xcm::v3::Location { - xcm::v3::Location::new(1, [xcm::v3::Junction::Parachain(id)]) - } -} From 253ea2f30d8516632a8d7646f7d5e6a6c797cd88 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 12 Mar 2024 11:32:17 +0200 Subject: [PATCH 297/316] fix tests --- .../bridge-hub-kusama/src/tests/snowbridge.rs | 16 ++++++++++++++-- .../bridge-hub-polkadot/src/tests/snowbridge.rs | 14 +++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index fd8cbe586a..a48b3fcb06 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -24,7 +24,10 @@ use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; use frame_support::{pallet_prelude::TypeInfo, traits::PalletInfoAccess}; use hex_literal::hex; -use kusama_system_emulated_network::BridgeHubKusamaParaSender as BridgeHubKusamaSender; +use kusama_system_emulated_network::{ + penpal_emulated_chain::CustomizableAssetFromSystemAssetHub, + BridgeHubKusamaParaSender as BridgeHubKusamaSender, +}; use snowbridge_beacon_primitives::CompactExecutionHeader; use snowbridge_core::{ inbound::{Log, Message, Proof}, @@ -270,8 +273,17 @@ fn send_token_from_ethereum_to_penpal() { // Fund ethereum sovereign on AssetHub AssetHubKusama::fund_accounts(vec![(ethereum_sovereign_account(), INITIAL_FUND)]); - // Create asset on the Penpal parachain. PenpalA::execute_with(|| { + // Set the trusted asset location from AH, in this case, Ethereum. + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![( + CustomizableAssetFromSystemAssetHub::key().to_vec(), + Location::new(2, [GlobalConsensus(Ethereum { chain_id: CHAIN_ID })]).encode(), + )], + )); + + // Create asset on the Penpal parachain. assert_ok!(::ForeignAssets::create( ::RuntimeOrigin::signed(PenpalASender::get()), weth_asset_id, diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index 6aa7791d24..aa74fa7c4a 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -24,7 +24,10 @@ use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; use frame_support::{pallet_prelude::TypeInfo, traits::PalletInfoAccess}; use hex_literal::hex; -use polkadot_system_emulated_network::BridgeHubPolkadotParaSender as BridgeHubPolkadotSender; +use polkadot_system_emulated_network::{ + penpal_emulated_chain::CustomizableAssetFromSystemAssetHub, + BridgeHubPolkadotParaSender as BridgeHubPolkadotSender, +}; use snowbridge_beacon_primitives::CompactExecutionHeader; use snowbridge_core::{ inbound::{Log, Message, Proof}, @@ -272,6 +275,15 @@ fn send_token_from_ethereum_to_penpal() { // Create asset on the Penpal parachain. PenpalB::execute_with(|| { + // Set the trusted asset location from AH, in this case, Ethereum. + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![( + CustomizableAssetFromSystemAssetHub::key().to_vec(), + Location::new(2, [GlobalConsensus(Ethereum { chain_id: CHAIN_ID })]).encode(), + )], + )); + assert_ok!(::ForeignAssets::create( ::RuntimeOrigin::signed(PenpalBSender::get()), weth_asset_id, From dac6d5f0ff18651fe47b1b783571810895c4bd34 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 12 Mar 2024 13:04:45 +0200 Subject: [PATCH 298/316] adds CustomizableAssetFromSystemAssetHub to penpal emulated chain --- .../emulated/chains/parachains/testing/penpal/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs b/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs index 30d6e7bfad..2a8001126c 100644 --- a/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs +++ b/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs @@ -15,7 +15,9 @@ mod genesis; pub use genesis::{genesis, ED, PARA_ID_A, PARA_ID_B}; -pub use penpal_runtime::xcm_config::{LocalTeleportableToAssetHub, XcmConfig}; +pub use penpal_runtime::xcm_config::{ + CustomizableAssetFromSystemAssetHub, LocalTeleportableToAssetHub, XcmConfig, +}; // Substrate use frame_support::traits::OnInitialize; From 82626eb868e90bd97721a784691f44ee6f77ace6 Mon Sep 17 00:00:00 2001 From: Vincent Geddes Date: Mon, 18 Mar 2024 20:53:58 +0200 Subject: [PATCH 299/316] Better defaults for pricing parameters --- .../bridge-hub-kusama/primitives/src/lib.rs | 21 ++++++++++++++----- .../bridge-hub-polkadot/primitives/src/lib.rs | 21 ++++++++++++++----- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs index bac0f0ef9c..3575dc860f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs @@ -162,7 +162,7 @@ pub mod snowbridge { use crate::Balance; use frame_support::parameter_types; use kusama_runtime_constants::currency::UNITS; - use snowbridge_core::{gwei, meth, PricingParameters, Rewards}; + use snowbridge_core::{PricingParameters, Rewards, U256}; use sp_runtime::FixedU128; parameter_types! { @@ -172,11 +172,22 @@ pub mod snowbridge { pub const CreateAssetDeposit: u128 = UNITS / 10; /// The pallet index of the Ethereum inbound queue pallet in the Bridge Hub runtime. pub const InboundQueuePalletInstance: u8 = 80; - /// Pricing parameters used for fees. + /// Default pricing parameters used to calculate bridging fees. Initialized to unit values, + /// as it is intended that these parameters should be updated with more + /// accurate values prior to bridge activation. This can be performed + /// using the `EthereumSystem::set_pricing_parameters` governance extrinsic. pub Parameters: PricingParameters = PricingParameters { - exchange_rate: FixedU128::from_rational(1, 75), - fee_per_gas: gwei(20), - rewards: Rewards { local: 1 * UNITS / 100, remote: meth(1) } // 0.01 KSM + // ETH/DOT exchange rate + exchange_rate: FixedU128::from_rational(1, 1), + // Ether fee per gas unit + fee_per_gas: U256::one(), + // Relayer rewards + rewards: Rewards { + // Reward for submitting a message to BridgeHub + local: 1, + // Reward for submitting a message to the Gateway contract on Ethereum + remote: U256::one(), + } }; } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs index 99ee2ff101..dac465843f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs @@ -153,7 +153,7 @@ pub mod snowbridge { use crate::Balance; use frame_support::parameter_types; use polkadot_runtime_constants::currency::UNITS; - use snowbridge_core::{gwei, meth, PricingParameters, Rewards}; + use snowbridge_core::{PricingParameters, Rewards, U256}; use sp_runtime::FixedU128; parameter_types! { @@ -163,11 +163,22 @@ pub mod snowbridge { pub const CreateAssetDeposit: u128 = 10 * UNITS; /// The pallet index of the Ethereum inbound queue pallet in the Bridge Hub runtime. pub const InboundQueuePalletInstance: u8 = 80; - /// Pricing parameters used for fees. + /// Default pricing parameters used to calculate bridging fees. Initialized to unit values, + /// as it is intended that these parameters should be updated with more + /// accurate values prior to bridge activation. This can be performed + /// using the `EthereumSystem::set_pricing_parameters` governance extrinsic. pub Parameters: PricingParameters = PricingParameters { - exchange_rate: FixedU128::from_rational(1, 75), - fee_per_gas: gwei(20), - rewards: Rewards { local: 1 * UNITS / 100, remote: meth(1) } // 0.01 KSM + // ETH/DOT exchange rate + exchange_rate: FixedU128::from_rational(1, 1), + // Ether fee per gas unit + fee_per_gas: U256::one(), + // Relayer rewards + rewards: Rewards { + // Reward for submitting a message to BridgeHub + local: 1, + // Reward for submitting a message to the Gateway contract on Ethereum + remote: U256::one(), + } }; } } From 7710e4f1926e281c5a1a82ec28411517b6e8b031 Mon Sep 17 00:00:00 2001 From: Clara van Staden Date: Tue, 19 Mar 2024 12:21:30 +0200 Subject: [PATCH 300/316] Update system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs Co-authored-by: Adrian Catangiu --- .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 33aec1817c..a877871195 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -255,8 +255,8 @@ impl Contains for SafeCallFilter { match call { RuntimeCall::System(frame_system::Call::set_storage { items }) if items.iter().all(|(k, _)| { - k.eq(&bridging::XcmBridgeHubRouterByteFee::key()) | - k.eq(&bridging::XcmBridgeHubRouterBaseFee::key()) | + k.eq(&bridging::XcmBridgeHubRouterByteFee::key()) || + k.eq(&bridging::XcmBridgeHubRouterBaseFee::key()) || k.eq(&bridging::to_ethereum::BridgeHubEthereumBaseFee::key()) }) => return true, From edaa8ea8ce123d51d73fb2302d9bac08f3f7a3df Mon Sep 17 00:00:00 2001 From: Clara van Staden Date: Tue, 19 Mar 2024 12:21:38 +0200 Subject: [PATCH 301/316] Update system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs Co-authored-by: Adrian Catangiu --- .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 0ebc0ea0a6..303c344bbd 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -258,8 +258,8 @@ impl Contains for SafeCallFilter { match call { RuntimeCall::System(frame_system::Call::set_storage { items }) if items.iter().all(|(k, _)| { - k.eq(&bridging::XcmBridgeHubRouterByteFee::key()) | - k.eq(&bridging::XcmBridgeHubRouterBaseFee::key()) | + k.eq(&bridging::XcmBridgeHubRouterByteFee::key()) || + k.eq(&bridging::XcmBridgeHubRouterBaseFee::key()) || k.eq(&bridging::to_ethereum::BridgeHubEthereumBaseFee::key()) }) => return true, From 1694e6696bdea1deb1edd7c4f2fe550bce772667 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 19 Mar 2024 12:31:49 +0200 Subject: [PATCH 302/316] merge damage --- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 4 +--- system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 2c3a926761..478abff03b 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -27,15 +27,13 @@ pub mod bridge_to_polkadot_config; mod weights; pub mod xcm_config; -use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; -use cumulus_primitives_core::ParaId; use bp_bridge_hub_kusama::snowbridge::{ CreateAssetCall, CreateAssetDeposit, InboundQueuePalletInstance, Parameters, }; use bridge_hub_common::message_queue::{ AggregateMessageOrigin, NarrowOriginToSibling, ParaIdToSibling, }; -use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; use cumulus_primitives_core::ParaId; use snowbridge_beacon_primitives::{Fork, ForkVersions}; use snowbridge_core::{outbound::Message, AgentId, AllowSiblingsOnly}; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 14d8b98054..aa0fc3c777 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -27,14 +27,13 @@ pub mod bridge_to_kusama_config; mod weights; pub mod xcm_config; -use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; -use cumulus_primitives_core::ParaId; use bp_bridge_hub_kusama::snowbridge::{ CreateAssetCall, CreateAssetDeposit, InboundQueuePalletInstance, Parameters, }; use bridge_hub_common::message_queue::{ AggregateMessageOrigin, NarrowOriginToSibling, ParaIdToSibling, }; +use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; use cumulus_primitives_core::ParaId; use snowbridge_beacon_primitives::{Fork, ForkVersions}; use snowbridge_core::{outbound::Message, AgentId, AllowSiblingsOnly}; From 890f49dce1235be9652b7a088190da2b83394359 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 19 Mar 2024 15:20:47 +0200 Subject: [PATCH 303/316] fix runtime tests --- .../bridge-hub-kusama/tests/snowbridge.rs | 41 ++++++++++++++++--- .../bridge-hub-polkadot/tests/snowbridge.rs | 41 ++++++++++++++++--- 2 files changed, 72 insertions(+), 10 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs index 85d47597d6..c34e873532 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs @@ -30,20 +30,24 @@ use frame_support::{ traits::{OnFinalize, OnInitialize}, }; use frame_system::pallet_prelude::BlockNumberFor; +use kusama_runtime_constants::currency::UNITS; use parachains_common::{AccountId, AuraId, Balance}; pub use parachains_runtimes_test_utils::test_cases::change_storage_constant_by_governance_works; use parachains_runtimes_test_utils::{ AccountIdOf, CollatorSessionKeys, ExtBuilder, XcmReceivedFrom, }; -use snowbridge_core::{ChannelId, ParaId}; +use snowbridge_core::{gwei, meth, ChannelId, ParaId, Rewards}; use snowbridge_pallet_ethereum_client::WeightInfo; +use snowbridge_pallet_system::{ + BalanceOf, PricingParameters, PricingParametersOf, WeightInfo as EthereumSystemWeightInfo, +}; use snowbridge_runtime_test_common::initial_fund; -use sp_core::H160; +use sp_core::{H160, U256}; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ generic::{Era, SignedPayload}, traits::Header, - AccountId32, Saturating, + AccountId32, FixedU128, Saturating, }; use xcm::{latest::prelude::*, v3::Error}; use xcm_executor::XcmExecutor; @@ -103,6 +107,7 @@ pub fn transfer_token_to_ethereum_fee_not_enough() { H160::random(), // fee not enough 1_000_000_000, + Box::new(|call| RuntimeCall::EthereumSystem(call).encode()), NotHoldingFees, ) } @@ -117,6 +122,7 @@ pub fn transfer_token_to_ethereum_insufficient_fund() { H160::random(), H160::random(), DefaultBridgeHubEthereumBaseFee::get(), + Box::new(|call| RuntimeCall::EthereumSystem(call).encode()), FailedToTransactAsset("Funds are unavailable"), ) } @@ -130,6 +136,7 @@ pub fn send_transfer_token_message_failure( weth_contract_address: H160, destination_address: H160, fee_amount: u128, + system_call_encode: Box) -> Vec>, expected_error: Error, ) where Runtime: frame_system::Config @@ -143,6 +150,7 @@ pub fn send_transfer_token_message_failure( + snowbridge_pallet_system::Config, XcmConfig: xcm_executor::Config, ValidatorIdOf: From>, + <::Token as frame_support::traits::fungible::Inspect<::AccountId>>::Balance: From { ExtBuilder::::default() .with_collators(collator_session_key.collators()) @@ -151,11 +159,34 @@ pub fn send_transfer_token_message_failure( .with_tracing() .build() .execute_with(|| { - >::initialize( + assert_ok!(>::initialize( runtime_para_id.into(), assethub_parachain_id.into(), + )); + + let require_weight_at_most = + ::WeightInfo::set_pricing_parameters(); + + let set_pricing_parameters_call = system_call_encode(snowbridge_pallet_system::Call::< + Runtime, + >::set_pricing_parameters { + params: { + PricingParametersOf:: { + exchange_rate: FixedU128::from_rational(1, 75), + fee_per_gas: gwei(20), + rewards: Rewards { + local: (1 * UNITS / 100).into(), // 0.01 KSM + remote: meth(1), + }, + } + }, + }); + + assert_ok!(RuntimeHelper::::execute_as_governance( + set_pricing_parameters_call, + require_weight_at_most ) - .unwrap(); + .ensure_complete()); // fund asset hub sovereign account enough so it can pay fees initial_fund::(assethub_parachain_id, initial_amount); diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs index c47f1b47dc..0f29ba0f34 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs @@ -30,20 +30,24 @@ use frame_support::{ traits::{OnFinalize, OnInitialize}, }; use frame_system::pallet_prelude::BlockNumberFor; +use polkadot_runtime_constants::currency::UNITS; use parachains_common::{AccountId, AuraId, Balance}; pub use parachains_runtimes_test_utils::test_cases::change_storage_constant_by_governance_works; use parachains_runtimes_test_utils::{ AccountIdOf, CollatorSessionKeys, ExtBuilder, XcmReceivedFrom, }; -use snowbridge_core::{ChannelId, ParaId}; +use snowbridge_core::{gwei, meth, ChannelId, ParaId, Rewards}; use snowbridge_pallet_ethereum_client::WeightInfo; +use snowbridge_pallet_system::{ + BalanceOf, PricingParameters, PricingParametersOf, WeightInfo as EthereumSystemWeightInfo, +}; use snowbridge_runtime_test_common::initial_fund; -use sp_core::H160; +use sp_core::{H160, U256}; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ generic::{Era, SignedPayload}, traits::Header, - AccountId32, Saturating, + AccountId32, FixedU128, Saturating, }; use xcm::{latest::prelude::*, v3::Error}; use xcm_executor::XcmExecutor; @@ -103,6 +107,7 @@ pub fn transfer_token_to_ethereum_fee_not_enough() { H160::random(), // fee not enough 1_000_000_000, + Box::new(|call| RuntimeCall::EthereumSystem(call).encode()), NotHoldingFees, ) } @@ -117,6 +122,7 @@ pub fn transfer_token_to_ethereum_insufficient_fund() { H160::random(), H160::random(), DefaultBridgeHubEthereumBaseFee::get(), + Box::new(|call| RuntimeCall::EthereumSystem(call).encode()), FailedToTransactAsset("Funds are unavailable"), ) } @@ -130,6 +136,7 @@ pub fn send_transfer_token_message_failure( weth_contract_address: H160, destination_address: H160, fee_amount: u128, + system_call_encode: Box) -> Vec>, expected_error: Error, ) where Runtime: frame_system::Config @@ -143,6 +150,7 @@ pub fn send_transfer_token_message_failure( + snowbridge_pallet_system::Config, XcmConfig: xcm_executor::Config, ValidatorIdOf: From>, + <::Token as frame_support::traits::fungible::Inspect<::AccountId>>::Balance: From { ExtBuilder::::default() .with_collators(collator_session_key.collators()) @@ -151,11 +159,34 @@ pub fn send_transfer_token_message_failure( .with_tracing() .build() .execute_with(|| { - >::initialize( + assert_ok!(>::initialize( runtime_para_id.into(), assethub_parachain_id.into(), + )); + + let require_weight_at_most = + ::WeightInfo::set_pricing_parameters(); + + let set_pricing_parameters_call = system_call_encode(snowbridge_pallet_system::Call::< + Runtime, + >::set_pricing_parameters { + params: { + PricingParametersOf:: { + exchange_rate: FixedU128::from_rational(1, 75), + fee_per_gas: gwei(20), + rewards: Rewards { + local: (1 * UNITS / 100).into(), // 0.01 KSM + remote: meth(1), + }, + } + }, + }); + + assert_ok!(RuntimeHelper::::execute_as_governance( + set_pricing_parameters_call, + require_weight_at_most ) - .unwrap(); + .ensure_complete()); // fund asset hub sovereign account enough so it can pay fees initial_fund::(assethub_parachain_id, initial_amount); From 3bd0619b30c97a6d80cd7bbb33afd206935c1b36 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Tue, 19 Mar 2024 16:11:38 +0200 Subject: [PATCH 304/316] fix integration tests --- .../bridge-hub-kusama/src/tests/snowbridge.rs | 24 ++++++++++++++++--- .../src/tests/snowbridge.rs | 24 ++++++++++++++++--- .../bridge-hub-polkadot/tests/snowbridge.rs | 4 ++-- 3 files changed, 44 insertions(+), 8 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index a48b3fcb06..56f1c851a2 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -18,7 +18,7 @@ use bp_bridge_hub_kusama::snowbridge::{ CreateAssetCall, CreateAssetDeposit, InboundQueuePalletInstance, }; use bridge_hub_kusama_runtime::{ - EthereumBeaconClient, EthereumGatewayAddress, EthereumInboundQueue, RuntimeOrigin, + EthereumBeaconClient, EthereumGatewayAddress, EthereumInboundQueue, Runtime, RuntimeOrigin, }; use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; @@ -30,19 +30,23 @@ use kusama_system_emulated_network::{ }; use snowbridge_beacon_primitives::CompactExecutionHeader; use snowbridge_core::{ + gwei, inbound::{Log, Message, Proof}, + meth, outbound::OperatingMode, + Rewards, }; use snowbridge_pallet_inbound_queue_fixtures::{ register_token_with_insufficient_fee::make_register_token_with_infufficient_fee_message, InboundQueueFixture, }; +use snowbridge_pallet_system::PricingParametersOf; use snowbridge_router_primitives::inbound::{ Command, Destination, GlobalConsensusEthereumConvertsFor, MessageV1, VersionedMessage, }; use sp_core::{H160, H256}; -use sp_runtime::{DispatchError::Token, TokenError::FundsUnavailable}; -use system_parachains_constants::kusama::snowbridge::EthereumNetwork; +use sp_runtime::{DispatchError::Token, FixedU128, TokenError::FundsUnavailable}; +use system_parachains_constants::kusama::{currency::UNITS, snowbridge::EthereumNetwork}; const INITIAL_FUND: u128 = 5_000_000_000 * KUSAMA_ED; const CHAIN_ID: u64 = 1; @@ -455,6 +459,20 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { BridgeHubKusama::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; + assert_ok!( + ::EthereumSystem::set_pricing_parameters( + ::RuntimeOrigin::root(), + PricingParametersOf:: { + exchange_rate: FixedU128::from_rational(1, 75), + fee_per_gas: gwei(20), + rewards: Rewards { + local: (1 * UNITS / 100).into(), // 0.01 KSM + remote: meth(1), + }, + } + ) + ); + assert_ok!(::System::set_storage( ::RuntimeOrigin::root(), vec![(EthereumGatewayAddress::key().to_vec(), H160(GATEWAY_ADDRESS).encode())], diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index aa74fa7c4a..af5c515d90 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -18,7 +18,7 @@ use bp_bridge_hub_polkadot::snowbridge::{ CreateAssetCall, CreateAssetDeposit, InboundQueuePalletInstance, }; use bridge_hub_polkadot_runtime::{ - EthereumBeaconClient, EthereumGatewayAddress, EthereumInboundQueue, RuntimeOrigin, + EthereumBeaconClient, EthereumGatewayAddress, EthereumInboundQueue, Runtime, RuntimeOrigin, }; use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; @@ -30,19 +30,23 @@ use polkadot_system_emulated_network::{ }; use snowbridge_beacon_primitives::CompactExecutionHeader; use snowbridge_core::{ + gwei, inbound::{Log, Message, Proof}, + meth, outbound::OperatingMode, + Rewards, }; use snowbridge_pallet_inbound_queue_fixtures::{ register_token_with_insufficient_fee::make_register_token_with_infufficient_fee_message, InboundQueueFixture, }; +use snowbridge_pallet_system::PricingParametersOf; use snowbridge_router_primitives::inbound::{ Command, Destination, GlobalConsensusEthereumConvertsFor, MessageV1, VersionedMessage, }; use sp_core::{H160, H256}; -use sp_runtime::{DispatchError::Token, TokenError::FundsUnavailable}; -use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; +use sp_runtime::{DispatchError::Token, FixedU128, TokenError::FundsUnavailable}; +use system_parachains_constants::polkadot::{currency::UNITS, snowbridge::EthereumNetwork}; const INITIAL_FUND: u128 = 5_000_000_000 * POLKADOT_ED; const CHAIN_ID: u64 = 1; @@ -455,6 +459,20 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { BridgeHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; + assert_ok!( + ::EthereumSystem::set_pricing_parameters( + ::RuntimeOrigin::root(), + PricingParametersOf:: { + exchange_rate: FixedU128::from_rational(1, 75), + fee_per_gas: gwei(20), + rewards: Rewards { + local: (1 * UNITS / 100).into(), // 0.01 DOT + remote: meth(1), + }, + } + ) + ); + assert_ok!(::System::set_storage( ::RuntimeOrigin::root(), vec![(EthereumGatewayAddress::key().to_vec(), H160(GATEWAY_ADDRESS).encode())], diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs index 0f29ba0f34..3738d4affc 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs @@ -30,12 +30,12 @@ use frame_support::{ traits::{OnFinalize, OnInitialize}, }; use frame_system::pallet_prelude::BlockNumberFor; -use polkadot_runtime_constants::currency::UNITS; use parachains_common::{AccountId, AuraId, Balance}; pub use parachains_runtimes_test_utils::test_cases::change_storage_constant_by_governance_works; use parachains_runtimes_test_utils::{ AccountIdOf, CollatorSessionKeys, ExtBuilder, XcmReceivedFrom, }; +use polkadot_runtime_constants::currency::UNITS; use snowbridge_core::{gwei, meth, ChannelId, ParaId, Rewards}; use snowbridge_pallet_ethereum_client::WeightInfo; use snowbridge_pallet_system::{ @@ -175,7 +175,7 @@ pub fn send_transfer_token_message_failure( exchange_rate: FixedU128::from_rational(1, 75), fee_per_gas: gwei(20), rewards: Rewards { - local: (1 * UNITS / 100).into(), // 0.01 KSM + local: (1 * UNITS / 100).into(), // 0.01 DOT remote: meth(1), }, } From fb7a5d4015032108a400bb4df7ff55e23f6bfec8 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 19 Mar 2024 15:46:28 +0100 Subject: [PATCH 305/316] Constants moving around --- Cargo.lock | 5 ++--- .../tests/bridges/bridge-hub-kusama/Cargo.toml | 1 - .../bridge-hub-kusama/src/tests/snowbridge.rs | 5 +++-- .../tests/bridges/bridge-hub-polkadot/Cargo.toml | 1 - .../bridge-hub-polkadot/src/tests/snowbridge.rs | 5 +++-- .../asset-hubs/asset-hub-kusama/src/lib.rs | 8 ++++++-- .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 5 +++-- .../asset-hubs/asset-hub-kusama/tests/snowbridge.rs | 3 +-- .../asset-hubs/asset-hub-polkadot/src/lib.rs | 8 ++++++-- .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 5 +++-- .../asset-hub-polkadot/tests/snowbridge.rs | 3 +-- .../bridge-hub-kusama/primitives/Cargo.toml | 5 ++++- .../bridge-hub-kusama/primitives/src/lib.rs | 6 ++++++ .../src/bridge_to_ethereum_config.rs | 2 +- .../bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 3 ++- .../bridge-hub-polkadot/primitives/Cargo.toml | 5 ++++- .../bridge-hub-polkadot/primitives/src/lib.rs | 6 ++++++ .../src/bridge_to_ethereum_config.rs | 2 +- .../bridge-hub-polkadot/src/xcm_config.rs | 3 ++- .../bridge-hub-polkadot/tests/snowbridge.rs | 2 +- system-parachains/constants/Cargo.toml | 2 -- system-parachains/constants/src/kusama.rs | 13 ------------- system-parachains/constants/src/polkadot.rs | 13 ------------- 23 files changed, 55 insertions(+), 56 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 17b28a3a00..f12a66e2f3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1271,6 +1271,7 @@ dependencies = [ "sp-api", "sp-runtime", "sp-std", + "staging-xcm", "system-parachains-constants", ] @@ -1288,6 +1289,7 @@ dependencies = [ "sp-api", "sp-runtime", "sp-std", + "staging-xcm", "system-parachains-constants", ] @@ -1536,7 +1538,6 @@ dependencies = [ "sp-runtime", "staging-xcm", "staging-xcm-executor", - "system-parachains-constants", ] [[package]] @@ -1687,7 +1688,6 @@ dependencies = [ "sp-runtime", "staging-xcm", "staging-xcm-executor", - "system-parachains-constants", ] [[package]] @@ -14625,7 +14625,6 @@ dependencies = [ "polkadot-runtime-constants", "smallvec", "sp-runtime", - "staging-xcm", ] [[package]] diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml index 0fa2d98188..79ffee0a22 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml @@ -42,7 +42,6 @@ asset-hub-kusama-runtime = { path = "../../../../../system-parachains/asset-hubs integration-tests-helpers = { path = "../../../helpers" } kusama-polkadot-system-emulated-network = { path = "../../../networks/kusama-polkadot-system" } kusama-system-emulated-network = { path = "../../../networks/kusama-system" } -system-parachains-constants = { path = "../../../../../system-parachains/constants" } # Snowbridge snowbridge-beacon-primitives = { version = "0.1.0" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index a48b3fcb06..e83d602a9b 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -13,7 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. use crate::*; -use asset_hub_kusama_runtime::xcm_config::bridging::to_ethereum::BridgeHubEthereumBaseFee; +use asset_hub_kusama_runtime::xcm_config::bridging::to_ethereum::{ + BridgeHubEthereumBaseFee, EthereumNetwork, +}; use bp_bridge_hub_kusama::snowbridge::{ CreateAssetCall, CreateAssetDeposit, InboundQueuePalletInstance, }; @@ -42,7 +44,6 @@ use snowbridge_router_primitives::inbound::{ }; use sp_core::{H160, H256}; use sp_runtime::{DispatchError::Token, TokenError::FundsUnavailable}; -use system_parachains_constants::kusama::snowbridge::EthereumNetwork; const INITIAL_FUND: u128 = 5_000_000_000 * KUSAMA_ED; const CHAIN_ID: u64 = 1; diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml index dc2889c6f3..4e07741e5c 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml @@ -42,7 +42,6 @@ asset-hub-polkadot-runtime = { path = "../../../../../system-parachains/asset-hu integration-tests-helpers = { path = "../../../helpers" } kusama-polkadot-system-emulated-network = { path = "../../../networks/kusama-polkadot-system" } polkadot-system-emulated-network = { path = "../../../networks/polkadot-system" } -system-parachains-constants = { path = "../../../../../system-parachains/constants" } # Snowbridge snowbridge-beacon-primitives = { version = "0.1.0" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index aa74fa7c4a..44e5496598 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -13,7 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. use crate::*; -use asset_hub_polkadot_runtime::xcm_config::bridging::to_ethereum::BridgeHubEthereumBaseFee; +use asset_hub_polkadot_runtime::xcm_config::bridging::to_ethereum::{ + BridgeHubEthereumBaseFee, EthereumNetwork, +}; use bp_bridge_hub_polkadot::snowbridge::{ CreateAssetCall, CreateAssetDeposit, InboundQueuePalletInstance, }; @@ -42,7 +44,6 @@ use snowbridge_router_primitives::inbound::{ }; use sp_core::{H160, H256}; use sp_runtime::{DispatchError::Token, TokenError::FundsUnavailable}; -use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; const INITIAL_FUND: u128 = 5_000_000_000 * POLKADOT_ED; const CHAIN_ID: u64 = 1; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index b6b052c43b..8229748360 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -76,7 +76,7 @@ use parachains_common::{ use sp_runtime::RuntimeDebug; pub use system_parachains_constants::SLOT_DURATION; use system_parachains_constants::{ - kusama::{consensus::*, currency::*, fee::WeightToFee, snowbridge::EthereumNetwork}, + kusama::{consensus::*, currency::*, fee::WeightToFee}, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, }; use xcm::latest::prelude::{AssetId, BodyId}; @@ -398,7 +398,11 @@ impl pallet_assets::Config for Runtime { type CreateOrigin = ForeignCreators< ( FromSiblingParachain, xcm::v3::Location>, - FromNetwork, + FromNetwork< + xcm_config::UniversalLocation, + xcm_config::bridging::to_ethereum::EthereumNetwork, + xcm::v3::Location, + >, ), ForeignCreatorsSovereignAccountOf, AccountId, diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index b101d1ae02..6addf4c657 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -24,7 +24,6 @@ use assets_common::{ matching::{FromNetwork, FromSiblingParachain, IsForeignConcreteAsset}, TrustBackedAssetsAsLocation, }; -use bp_bridge_hub_kusama::snowbridge::InboundQueuePalletInstance; use frame_support::{ parameter_types, traits::{ @@ -44,7 +43,7 @@ use parachains_common::{ use polkadot_parachain_primitives::primitives::Sibling; use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; -use system_parachains_constants::{kusama::snowbridge::EthereumNetwork, TREASURY_PALLET_ID}; +use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, @@ -801,6 +800,8 @@ pub mod bridging { pub mod to_ethereum { use super::*; + pub use bp_bridge_hub_kusama::snowbridge::EthereumNetwork; + use bp_bridge_hub_kusama::snowbridge::InboundQueuePalletInstance; parameter_types! { /// User fee for ERC20 token transfer back to Ethereum. diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs index 4571d1bef8..0d8e946e83 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs @@ -16,12 +16,11 @@ // limitations under the License. use asset_hub_kusama_runtime::xcm_config::bridging::{ - to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable}, + to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable, EthereumNetwork}, SiblingBridgeHub, XcmBridgeHubRouterFeeAssetId, }; use sp_core::H160; use sp_std::prelude::*; -use system_parachains_constants::kusama::snowbridge::EthereumNetwork; use xcm::prelude::*; use xcm_builder::{ExporterFor, NetworkExportTable}; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index f59c55282d..39399b2100 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -113,7 +113,7 @@ use parachains_common::{ use sp_runtime::RuntimeDebug; pub use system_parachains_constants::SLOT_DURATION; use system_parachains_constants::{ - polkadot::{consensus::*, currency::*, fee::WeightToFee, snowbridge::EthereumNetwork}, + polkadot::{consensus::*, currency::*, fee::WeightToFee}, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, }; use xcm::latest::prelude::{AssetId, BodyId}; @@ -328,7 +328,11 @@ impl pallet_assets::Config for Runtime { type CreateOrigin = ForeignCreators< ( FromSiblingParachain, xcm::v3::Location>, - FromNetwork, + FromNetwork< + xcm_config::UniversalLocation, + xcm_config::bridging::to_ethereum::EthereumNetwork, + xcm::v3::Location, + >, ), ForeignCreatorsSovereignAccountOf, AccountId, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 07ea679c87..b23f5d410c 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -24,7 +24,6 @@ use assets_common::{ matching::{FromNetwork, FromSiblingParachain, IsForeignConcreteAsset}, TrustBackedAssetsAsLocation, }; -use bp_bridge_hub_polkadot::snowbridge::InboundQueuePalletInstance; use frame_support::{ parameter_types, traits::{ @@ -45,7 +44,7 @@ use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_constants::system_parachain; use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; -use system_parachains_constants::{polkadot::snowbridge::EthereumNetwork, TREASURY_PALLET_ID}; +use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, @@ -795,6 +794,8 @@ pub mod bridging { pub mod to_ethereum { use super::*; + pub use bp_bridge_hub_polkadot::snowbridge::EthereumNetwork; + use bp_bridge_hub_polkadot::snowbridge::InboundQueuePalletInstance; parameter_types! { /// User fee for ERC20 token transfer back to Ethereum. diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs index 56bf6b2b66..77f7054726 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs @@ -16,12 +16,11 @@ // limitations under the License. use asset_hub_polkadot_runtime::xcm_config::bridging::{ - to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable}, + to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable, EthereumNetwork}, SiblingBridgeHub, XcmBridgeHubRouterFeeAssetId, }; use sp_core::H160; use sp_std::prelude::*; -use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; use xcm::prelude::*; use xcm_builder::{ExporterFor, NetworkExportTable}; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml index cceec60b14..fbef882772 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml @@ -18,6 +18,7 @@ system-parachains-constants = { path = "../../../constants", default-features = bp-bridge-hub-cumulus = { default-features = false , version = "0.8.0" } bp-runtime = { default-features = false , version = "0.8.0" } bp-messages = { default-features = false , version = "0.8.0" } +snowbridge-core = { default-features = false , version = "0.1.0" } # Substrate Based Dependencies frame-support = { default-features = false, version = "29.0.0" } @@ -25,7 +26,8 @@ sp-api = { default-features = false, version = "27.0.0" } sp-runtime = { default-features = false, version = "32.0.0" } sp-std = { default-features = false , version = "14.0.0" } -snowbridge-core = { default-features = false , version = "0.1.0" } +# Polkadot +xcm = { package = "staging-xcm", default-features = false, version = "8.0.1" } [features] default = [ "std" ] @@ -41,4 +43,5 @@ std = [ "sp-runtime/std", "sp-std/std", "system-parachains-constants/std", + "xcm/std", ] diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs index 3575dc860f..5f0ca1f9b6 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs @@ -164,6 +164,7 @@ pub mod snowbridge { use kusama_runtime_constants::currency::UNITS; use snowbridge_core::{PricingParameters, Rewards, U256}; use sp_runtime::FixedU128; + use xcm::latest::NetworkId; parameter_types! { /// Should match the `ForeignAssets::create` index on Asset Hub. @@ -189,6 +190,11 @@ pub mod snowbridge { remote: U256::one(), } }; + /// Network and location for the Ethereum chain. On Kusama, the Ethereum chain bridged + /// to is the Ethereum Main network, with chain ID 1. + /// + /// + pub EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 1 }; } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs index 1b883feed3..dc940f797c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs @@ -15,8 +15,8 @@ // along with Cumulus. If not, see . use crate::{xcm_config::UniversalLocation, Runtime}; +pub use bp_bridge_hub_kusama::snowbridge::EthereumNetwork; use snowbridge_router_primitives::outbound::EthereumBlobExporter; -use system_parachains_constants::kusama::snowbridge::EthereumNetwork; /// Exports message to the Ethereum Gateway contract. pub type SnowbridgeExporter = EthereumBlobExporter< diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index aa4db73fbf..56588e8320 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -15,6 +15,7 @@ // along with Cumulus. If not, see . use super::{ + bridge_to_ethereum_config::EthereumNetwork, bridge_to_polkadot_config::{ DeliveryRewardInBalance, RequiredStakeForStakeAndSlash, ToBridgeHubPolkadotHaulBlobExporter, }, @@ -39,7 +40,7 @@ use polkadot_parachain_primitives::primitives::Sibling; use snowbridge_runtime_common::XcmExportFeeToSibling; use sp_runtime::traits::AccountIdConversion; use sp_std::marker::PhantomData; -use system_parachains_constants::{kusama::snowbridge::EthereumNetwork, TREASURY_PALLET_ID}; +use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml index c532610ab3..6787337771 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml @@ -18,6 +18,7 @@ system-parachains-constants = { path = "../../../constants", default-features = bp-bridge-hub-cumulus = { default-features = false , version = "0.8.0" } bp-runtime = { default-features = false , version = "0.8.0" } bp-messages = { default-features = false , version = "0.8.0" } +snowbridge-core = { default-features = false , version = "0.1.0" } # Substrate Based Dependencies frame-support = { default-features = false, version = "29.0.0" } @@ -25,7 +26,8 @@ sp-api = { default-features = false, version = "27.0.0" } sp-runtime = { default-features = false, version = "32.0.0" } sp-std = { default-features = false , version = "14.0.0" } -snowbridge-core = { default-features = false , version = "0.1.0" } +# Polkadot +xcm = { package = "staging-xcm", default-features = false, version = "8.0.1" } [features] default = [ "std" ] @@ -40,4 +42,5 @@ std = [ "sp-runtime/std", "sp-std/std", "system-parachains-constants/std", + "xcm/std", ] diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs index dac465843f..08d13349d4 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs @@ -155,6 +155,7 @@ pub mod snowbridge { use polkadot_runtime_constants::currency::UNITS; use snowbridge_core::{PricingParameters, Rewards, U256}; use sp_runtime::FixedU128; + use xcm::latest::NetworkId; parameter_types! { /// Should match the `ForeignAssets::create` index on Asset Hub. @@ -180,6 +181,11 @@ pub mod snowbridge { remote: U256::one(), } }; + /// Network and location for the Ethereum chain. On Polkadot, the Ethereum chain bridged + /// to is the Ethereum Main network, with chain ID 1. + /// + /// + pub EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 1 }; } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs index c8108f189f..5803366ef1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs @@ -15,8 +15,8 @@ // along with Cumulus. If not, see . use crate::{xcm_config::UniversalLocation, Runtime}; +pub use bp_bridge_hub_polkadot::snowbridge::EthereumNetwork; use snowbridge_router_primitives::outbound::EthereumBlobExporter; -use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; /// Exports message to the Ethereum Gateway contract. pub type SnowbridgeExporter = EthereumBlobExporter< diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 98c6e8efda..bfef8a7cda 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -15,6 +15,7 @@ // along with Cumulus. If not, see . use super::{ + bridge_to_ethereum_config::EthereumNetwork, bridge_to_kusama_config::{ DeliveryRewardInBalance, RequiredStakeForStakeAndSlash, ToBridgeHubKusamaHaulBlobExporter, }, @@ -40,7 +41,7 @@ use polkadot_runtime_constants::system_parachain; use snowbridge_runtime_common::XcmExportFeeToSibling; use sp_runtime::traits::AccountIdConversion; use sp_std::marker::PhantomData; -use system_parachains_constants::{polkadot::snowbridge::EthereumNetwork, TREASURY_PALLET_ID}; +use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs index 0f29ba0f34..ed25d41e8c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs @@ -30,12 +30,12 @@ use frame_support::{ traits::{OnFinalize, OnInitialize}, }; use frame_system::pallet_prelude::BlockNumberFor; -use polkadot_runtime_constants::currency::UNITS; use parachains_common::{AccountId, AuraId, Balance}; pub use parachains_runtimes_test_utils::test_cases::change_storage_constant_by_governance_works; use parachains_runtimes_test_utils::{ AccountIdOf, CollatorSessionKeys, ExtBuilder, XcmReceivedFrom, }; +use polkadot_runtime_constants::currency::UNITS; use snowbridge_core::{gwei, meth, ChannelId, ParaId, Rewards}; use snowbridge_pallet_ethereum_client::WeightInfo; use snowbridge_pallet_system::{ diff --git a/system-parachains/constants/Cargo.toml b/system-parachains/constants/Cargo.toml index 4f13f25e9d..89c581e95b 100644 --- a/system-parachains/constants/Cargo.toml +++ b/system-parachains/constants/Cargo.toml @@ -17,7 +17,6 @@ polkadot-core-primitives = { default-features = false, version = "8.0.0"} polkadot-primitives = { default-features = false , version = "8.0.1" } polkadot-runtime-constants = { path = "../../relay/polkadot/constants", default-features = false} sp-runtime = { default-features = false , version = "32.0.0" } -xcm = { package = "staging-xcm", default-features = false, version = "8.0.0" } [features] default = [ "std" ] @@ -29,5 +28,4 @@ std = [ "polkadot-primitives/std", "polkadot-runtime-constants/std", "sp-runtime/std", - "xcm/std", ] diff --git a/system-parachains/constants/src/kusama.rs b/system-parachains/constants/src/kusama.rs index 9aa17fceed..97ef0f189b 100644 --- a/system-parachains/constants/src/kusama.rs +++ b/system-parachains/constants/src/kusama.rs @@ -133,16 +133,3 @@ pub mod fee { ::weight_to_fee(weight) } } - -pub mod snowbridge { - use frame_support::parameter_types; - use xcm::opaque::lts::NetworkId; - - parameter_types! { - /// Network and location for the Ethereum chain. On Kusama, the Ethereum chain bridged - /// to is the Ethereum Main network, with chain ID 1. - /// - /// - pub EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 1 }; - } -} diff --git a/system-parachains/constants/src/polkadot.rs b/system-parachains/constants/src/polkadot.rs index ec8004446a..028784270c 100644 --- a/system-parachains/constants/src/polkadot.rs +++ b/system-parachains/constants/src/polkadot.rs @@ -151,16 +151,3 @@ pub mod fee { } } } - -pub mod snowbridge { - use frame_support::parameter_types; - use xcm::opaque::lts::NetworkId; - - parameter_types! { - /// Network and location for the Ethereum chain. On Polkadot, the Ethereum chain bridged - /// to is the Ethereum Main network, with chain ID 1. - /// - /// - pub EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 1 }; - } -} From d326e77d582f8e6f1b72f8c0b7c6c290909568f6 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 19 Mar 2024 16:09:10 +0100 Subject: [PATCH 306/316] Move `bridge_hub_inbound_queue_pallet_index_is_correct` to the runtimes --- .../bridge-hub-kusama/src/tests/snowbridge.rs | 13 +------------ .../bridge-hub-polkadot/src/tests/snowbridge.rs | 13 +------------ .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 8 ++++++++ .../bridge-hub-kusama/tests/snowbridge.rs | 6 ++---- .../bridge-hubs/bridge-hub-polkadot/src/lib.rs | 8 ++++++++ .../bridge-hub-polkadot/tests/snowbridge.rs | 6 ++---- 6 files changed, 22 insertions(+), 32 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index 3346c3f045..7cf5122831 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -16,9 +16,7 @@ use crate::*; use asset_hub_kusama_runtime::xcm_config::bridging::to_ethereum::{ BridgeHubEthereumBaseFee, EthereumNetwork, }; -use bp_bridge_hub_kusama::snowbridge::{ - CreateAssetCall, CreateAssetDeposit, InboundQueuePalletInstance, -}; +use bp_bridge_hub_kusama::snowbridge::{CreateAssetCall, CreateAssetDeposit}; use bridge_hub_kusama_runtime::{ EthereumBeaconClient, EthereumGatewayAddress, EthereumInboundQueue, Runtime, RuntimeOrigin, }; @@ -677,15 +675,6 @@ fn bridge_hub_inbound_queue_deposit_config_is_equal_to_asset_hub_foreign_asset_p assert_eq!(bridge_hub_inbound_queue_asset_deposit, asset_deposit); } -/// Tests the EthereumInboundQueue pallet index matches the pallet constant. -#[test] -fn bridge_hub_inbound_queue_pallet_index_is_correct() { - let inbound_queue_inbound_queue_pallet_index = - ::EthereumInboundQueue::index(); - - assert_eq!(inbound_queue_inbound_queue_pallet_index as u8, InboundQueuePalletInstance::get()); -} - fn ethereum_sovereign_account() -> AccountId { let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location).unwrap() diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index 00aaaf9029..cffde4a941 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -16,9 +16,7 @@ use crate::*; use asset_hub_polkadot_runtime::xcm_config::bridging::to_ethereum::{ BridgeHubEthereumBaseFee, EthereumNetwork, }; -use bp_bridge_hub_polkadot::snowbridge::{ - CreateAssetCall, CreateAssetDeposit, InboundQueuePalletInstance, -}; +use bp_bridge_hub_polkadot::snowbridge::{CreateAssetCall, CreateAssetDeposit}; use bridge_hub_polkadot_runtime::{ EthereumBeaconClient, EthereumGatewayAddress, EthereumInboundQueue, Runtime, RuntimeOrigin, }; @@ -681,15 +679,6 @@ fn bridge_hub_inbound_queue_deposit_config_is_equal_to_asset_hub_foreign_asset_p assert_eq!(bridge_hub_inbound_queue_asset_deposit, asset_deposit); } -/// Tests the EthereumInboundQueue pallet index matches the pallet constant. -#[test] -fn bridge_hub_inbound_queue_pallet_index_is_correct() { - let inbound_queue_inbound_queue_pallet_index = - ::EthereumInboundQueue::index(); - - assert_eq!(inbound_queue_inbound_queue_pallet_index as u8, InboundQueuePalletInstance::get()); -} - fn ethereum_sovereign_account() -> AccountId { let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location).unwrap() diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 478abff03b..a7dc80393a 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -1369,6 +1369,14 @@ cumulus_pallet_parachain_system::register_validate_block! { mod tests { use super::*; + #[test] + fn bridge_hub_inbound_queue_pallet_index_is_correct() { + assert_eq!( + InboundQueuePalletInstance::get(), + ::index() as u8 + ); + } + #[test] fn test_transasction_byte_fee_is_one_tenth_of_relay() { let relay_tbf = kusama_runtime_constants::fee::TRANSACTION_BYTE_FEE; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs index c34e873532..cf2de79777 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs @@ -38,11 +38,9 @@ use parachains_runtimes_test_utils::{ }; use snowbridge_core::{gwei, meth, ChannelId, ParaId, Rewards}; use snowbridge_pallet_ethereum_client::WeightInfo; -use snowbridge_pallet_system::{ - BalanceOf, PricingParameters, PricingParametersOf, WeightInfo as EthereumSystemWeightInfo, -}; +use snowbridge_pallet_system::{PricingParametersOf, WeightInfo as EthereumSystemWeightInfo}; use snowbridge_runtime_test_common::initial_fund; -use sp_core::{H160, U256}; +use sp_core::H160; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ generic::{Era, SignedPayload}, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index aa0fc3c777..f8c36c91f7 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -1370,6 +1370,14 @@ cumulus_pallet_parachain_system::register_validate_block! { mod tests { use super::*; + #[test] + fn bridge_hub_inbound_queue_pallet_index_is_correct() { + assert_eq!( + InboundQueuePalletInstance::get(), + ::index() as u8 + ); + } + #[test] fn test_transasction_byte_fee_is_one_tenth_of_relay() { let relay_tbf = polkadot_runtime_constants::fee::TRANSACTION_BYTE_FEE; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs index 3738d4affc..703ef69a69 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs @@ -38,11 +38,9 @@ use parachains_runtimes_test_utils::{ use polkadot_runtime_constants::currency::UNITS; use snowbridge_core::{gwei, meth, ChannelId, ParaId, Rewards}; use snowbridge_pallet_ethereum_client::WeightInfo; -use snowbridge_pallet_system::{ - BalanceOf, PricingParameters, PricingParametersOf, WeightInfo as EthereumSystemWeightInfo, -}; +use snowbridge_pallet_system::{PricingParametersOf, WeightInfo as EthereumSystemWeightInfo}; use snowbridge_runtime_test_common::initial_fund; -use sp_core::{H160, U256}; +use sp_core::H160; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ generic::{Era, SignedPayload}, From 115c3ffaab2ac60ef4236e915bd1a2bb5dd78092 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 19 Mar 2024 16:20:20 +0100 Subject: [PATCH 307/316] Move `bridge_hub_inbound_queue_deposit_config_is_equal_to_asset_hub_foreign_asset_pallet_deposit` to the AH runtimes --- .../bridge-hub-kusama/src/tests/snowbridge.rs | 13 +------------ .../src/tests/snowbridge.rs | 13 +------------ .../asset-hub-kusama/tests/snowbridge.rs | 19 ++++++++++++++++--- .../asset-hub-polkadot/tests/snowbridge.rs | 19 ++++++++++++++++--- 4 files changed, 34 insertions(+), 30 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index 7cf5122831..6a3c64fc5a 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -16,7 +16,7 @@ use crate::*; use asset_hub_kusama_runtime::xcm_config::bridging::to_ethereum::{ BridgeHubEthereumBaseFee, EthereumNetwork, }; -use bp_bridge_hub_kusama::snowbridge::{CreateAssetCall, CreateAssetDeposit}; +use bp_bridge_hub_kusama::snowbridge::CreateAssetCall; use bridge_hub_kusama_runtime::{ EthereumBeaconClient, EthereumGatewayAddress, EthereumInboundQueue, Runtime, RuntimeOrigin, }; @@ -664,17 +664,6 @@ fn asset_hub_foreign_assets_pallet_is_configured_correctly_in_bridge_hub() { ); } -/// Tests that the EthereumInboundQueue CreateAssetDeposit on BridgeHub is larger than the -/// ForeignAssets AssetDeposit config on AssetHub. -#[test] -fn bridge_hub_inbound_queue_deposit_config_is_equal_to_asset_hub_foreign_asset_pallet_deposit() { - let asset_deposit = asset_hub_kusama_runtime::ForeignAssetsAssetDeposit::get(); - - let bridge_hub_inbound_queue_asset_deposit = CreateAssetDeposit::get(); - - assert_eq!(bridge_hub_inbound_queue_asset_deposit, asset_deposit); -} - fn ethereum_sovereign_account() -> AccountId { let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location).unwrap() diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index cffde4a941..bb48b47972 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -16,7 +16,7 @@ use crate::*; use asset_hub_polkadot_runtime::xcm_config::bridging::to_ethereum::{ BridgeHubEthereumBaseFee, EthereumNetwork, }; -use bp_bridge_hub_polkadot::snowbridge::{CreateAssetCall, CreateAssetDeposit}; +use bp_bridge_hub_polkadot::snowbridge::CreateAssetCall; use bridge_hub_polkadot_runtime::{ EthereumBeaconClient, EthereumGatewayAddress, EthereumInboundQueue, Runtime, RuntimeOrigin, }; @@ -668,17 +668,6 @@ fn asset_hub_foreign_assets_pallet_is_configured_correctly_in_bridge_hub() { ); } -/// Tests that the EthereumInboundQueue CreateAssetDeposit on BridgeHub is larger than the -/// ForeignAssets AssetDeposit config on AssetHub. -#[test] -fn bridge_hub_inbound_queue_deposit_config_is_equal_to_asset_hub_foreign_asset_pallet_deposit() { - let asset_deposit = asset_hub_polkadot_runtime::ForeignAssetsAssetDeposit::get(); - - let bridge_hub_inbound_queue_asset_deposit = CreateAssetDeposit::get(); - - assert_eq!(bridge_hub_inbound_queue_asset_deposit, asset_deposit); -} - fn ethereum_sovereign_account() -> AccountId { let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location).unwrap() diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs index 0d8e946e83..4d37f99f74 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs @@ -15,15 +15,28 @@ // See the License for the specific language governing permissions and // limitations under the License. -use asset_hub_kusama_runtime::xcm_config::bridging::{ - to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable, EthereumNetwork}, - SiblingBridgeHub, XcmBridgeHubRouterFeeAssetId, +use asset_hub_kusama_runtime::{ + xcm_config::bridging::{ + to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable, EthereumNetwork}, + SiblingBridgeHub, XcmBridgeHubRouterFeeAssetId, + }, + ForeignAssetsAssetDeposit, }; use sp_core::H160; use sp_std::prelude::*; use xcm::prelude::*; use xcm_builder::{ExporterFor, NetworkExportTable}; +/// Tests that the EthereumInboundQueue CreateAssetDeposit on BridgeHub is larger than the +/// ForeignAssets AssetDeposit config on AssetHub. +#[test] +fn bridge_hub_inbound_queue_deposit_config_is_equal_to_asset_hub_foreign_asset_pallet_deposit() { + assert!( + bp_bridge_hub_kusama::snowbridge::CreateAssetDeposit::get() >= + ForeignAssetsAssetDeposit::get() + ); +} + #[test] fn network_export_table_works() { sp_io::TestExternalities::default().execute_with(|| { diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs index 77f7054726..a4927cac42 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs @@ -15,15 +15,28 @@ // See the License for the specific language governing permissions and // limitations under the License. -use asset_hub_polkadot_runtime::xcm_config::bridging::{ - to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable, EthereumNetwork}, - SiblingBridgeHub, XcmBridgeHubRouterFeeAssetId, +use asset_hub_polkadot_runtime::{ + xcm_config::bridging::{ + to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable, EthereumNetwork}, + SiblingBridgeHub, XcmBridgeHubRouterFeeAssetId, + }, + ForeignAssetsAssetDeposit, }; use sp_core::H160; use sp_std::prelude::*; use xcm::prelude::*; use xcm_builder::{ExporterFor, NetworkExportTable}; +/// Tests that the EthereumInboundQueue CreateAssetDeposit on BridgeHub is larger than the +/// ForeignAssets AssetDeposit config on AssetHub. +#[test] +fn bridge_hub_inbound_queue_deposit_config_is_equal_to_asset_hub_foreign_asset_pallet_deposit() { + assert!( + bp_bridge_hub_polkadot::snowbridge::CreateAssetDeposit::get() >= + ForeignAssetsAssetDeposit::get() + ); +} + #[test] fn network_export_table_works() { sp_io::TestExternalities::default().execute_with(|| { From 853d17dc5392b4e6749d1cbb815b15263993090c Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 19 Mar 2024 16:47:18 +0100 Subject: [PATCH 308/316] Move `CreateAssetDeposit` around --- Cargo.lock | 2 ++ .../asset-hub-kusama/primitives/Cargo.toml | 4 ++++ .../asset-hub-kusama/primitives/src/lib.rs | 5 +++++ .../asset-hubs/asset-hub-kusama/src/lib.rs | 8 ++++++++ .../asset-hub-kusama/tests/snowbridge.rs | 19 +++---------------- .../asset-hub-polkadot/primitives/Cargo.toml | 4 ++++ .../asset-hub-polkadot/primitives/src/lib.rs | 5 +++++ .../asset-hubs/asset-hub-polkadot/src/lib.rs | 8 ++++++++ .../asset-hub-polkadot/tests/snowbridge.rs | 19 +++---------------- .../bridge-hub-kusama/primitives/src/lib.rs | 3 --- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 6 ++---- .../bridge-hub-polkadot/primitives/src/lib.rs | 3 --- .../bridge-hub-polkadot/src/lib.rs | 6 ++---- 13 files changed, 46 insertions(+), 46 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f12a66e2f3..40acd6e470 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1227,6 +1227,7 @@ dependencies = [ "scale-info", "sp-std", "staging-xcm", + "system-parachains-constants", ] [[package]] @@ -1239,6 +1240,7 @@ dependencies = [ "scale-info", "sp-std", "staging-xcm", + "system-parachains-constants", ] [[package]] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml index 102c205335..81aa14b93b 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml @@ -11,6 +11,9 @@ license.workspace = true codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +# Local +system-parachains-constants = { path = "../../../constants", default-features = false } + # Bridge Dependencies bp-xcm-bridge-hub-router = { default-features = false , version = "0.7.0" } @@ -29,5 +32,6 @@ std = [ "frame-support/std", "scale-info/std", "sp-std/std", + "system-parachains-constants/std", "xcm/std" ] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs index cce3b111bf..3112b297dc 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs @@ -24,6 +24,8 @@ use xcm::prelude::*; pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall; +use system_parachains_constants::kusama::currency::UNITS; + /// `AssetHubKusama` Runtime `Call` enum. /// /// The enum represents a subset of possible `Call`s we can send to `AssetHubKusama` chain. @@ -48,6 +50,9 @@ frame_support::parameter_types! { pub CongestedMessage: Xcm<()> = build_congestion_message(true).into(); /// Message that is sent to the sibling Kusama Asset Hub when the with-Polkadot bridge becomes uncongested. pub UncongestedMessage: Xcm<()> = build_congestion_message(false).into(); + + /// Should match the `AssetDeposit` of the `ForeignAssets` pallet on Asset Hub. + pub const CreateForeignAssetDeposit: u128 = UNITS / 10; } fn build_congestion_message(is_congested: bool) -> sp_std::vec::Vec> { diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 8229748360..8070b827bf 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -1764,4 +1764,12 @@ mod tests { let parachain_tbf = TransactionByteFee::get(); assert_eq!(relay_tbf / 10, parachain_tbf); } + + #[test] + fn create_foreign_asset_deposit_is_equal_to_asset_hub_foreign_asset_pallet_deposit() { + assert_eq!( + bp_asset_hub_kusama::CreateForeignAssetDeposit::get(), + ForeignAssetsAssetDeposit::get() + ); + } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs index 4d37f99f74..0d8e946e83 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/snowbridge.rs @@ -15,28 +15,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use asset_hub_kusama_runtime::{ - xcm_config::bridging::{ - to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable, EthereumNetwork}, - SiblingBridgeHub, XcmBridgeHubRouterFeeAssetId, - }, - ForeignAssetsAssetDeposit, +use asset_hub_kusama_runtime::xcm_config::bridging::{ + to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable, EthereumNetwork}, + SiblingBridgeHub, XcmBridgeHubRouterFeeAssetId, }; use sp_core::H160; use sp_std::prelude::*; use xcm::prelude::*; use xcm_builder::{ExporterFor, NetworkExportTable}; -/// Tests that the EthereumInboundQueue CreateAssetDeposit on BridgeHub is larger than the -/// ForeignAssets AssetDeposit config on AssetHub. -#[test] -fn bridge_hub_inbound_queue_deposit_config_is_equal_to_asset_hub_foreign_asset_pallet_deposit() { - assert!( - bp_bridge_hub_kusama::snowbridge::CreateAssetDeposit::get() >= - ForeignAssetsAssetDeposit::get() - ); -} - #[test] fn network_export_table_works() { sp_io::TestExternalities::default().execute_with(|| { diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml index 8fd8267b69..a91d4846d8 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml @@ -11,6 +11,9 @@ license.workspace = true codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +# Local +system-parachains-constants = { path = "../../../constants", default-features = false } + # Bridge Dependencies bp-xcm-bridge-hub-router = { default-features = false , version = "0.7.0" } @@ -29,5 +32,6 @@ std = [ "frame-support/std", "scale-info/std", "sp-std/std", + "system-parachains-constants/std", "xcm/std" ] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs index 023454b710..1573499291 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs @@ -24,6 +24,8 @@ use xcm::prelude::*; pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall; +use system_parachains_constants::polkadot::currency::UNITS; + /// `AssetHubPolkadot` Runtime `Call` enum. /// /// The enum represents a subset of possible `Call`s we can send to `AssetHubPolkadot` chain. @@ -48,6 +50,9 @@ frame_support::parameter_types! { pub CongestedMessage: Xcm<()> = build_congestion_message(true).into(); /// Message that is sent to the sibling Kusama Asset Hub when the with-Polkadot bridge becomes uncongested. pub UncongestedMessage: Xcm<()> = build_congestion_message(false).into(); + + /// Should match the `AssetDeposit` of the `ForeignAssets` pallet on Asset Hub. + pub const CreateForeignAssetDeposit: u128 = 10 * UNITS; } fn build_congestion_message(is_congested: bool) -> sp_std::vec::Vec> { diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 39399b2100..9b4ef06108 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -1721,4 +1721,12 @@ mod tests { let parachain_tbf = TransactionByteFee::get(); assert_eq!(relay_tbf / 10, parachain_tbf); } + + #[test] + fn create_foreign_asset_deposit_is_equal_to_asset_hub_foreign_asset_pallet_deposit() { + assert_eq!( + bp_asset_hub_polkadot::CreateForeignAssetDeposit::get(), + ForeignAssetsAssetDeposit::get() + ); + } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs index a4927cac42..77f7054726 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/snowbridge.rs @@ -15,28 +15,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -use asset_hub_polkadot_runtime::{ - xcm_config::bridging::{ - to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable, EthereumNetwork}, - SiblingBridgeHub, XcmBridgeHubRouterFeeAssetId, - }, - ForeignAssetsAssetDeposit, +use asset_hub_polkadot_runtime::xcm_config::bridging::{ + to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable, EthereumNetwork}, + SiblingBridgeHub, XcmBridgeHubRouterFeeAssetId, }; use sp_core::H160; use sp_std::prelude::*; use xcm::prelude::*; use xcm_builder::{ExporterFor, NetworkExportTable}; -/// Tests that the EthereumInboundQueue CreateAssetDeposit on BridgeHub is larger than the -/// ForeignAssets AssetDeposit config on AssetHub. -#[test] -fn bridge_hub_inbound_queue_deposit_config_is_equal_to_asset_hub_foreign_asset_pallet_deposit() { - assert!( - bp_bridge_hub_polkadot::snowbridge::CreateAssetDeposit::get() >= - ForeignAssetsAssetDeposit::get() - ); -} - #[test] fn network_export_table_works() { sp_io::TestExternalities::default().execute_with(|| { diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs index 5f0ca1f9b6..f24fbaae31 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs @@ -161,7 +161,6 @@ fn convert_from_udot_to_uksm(price_in_udot: Balance) -> Balance { pub mod snowbridge { use crate::Balance; use frame_support::parameter_types; - use kusama_runtime_constants::currency::UNITS; use snowbridge_core::{PricingParameters, Rewards, U256}; use sp_runtime::FixedU128; use xcm::latest::NetworkId; @@ -169,8 +168,6 @@ pub mod snowbridge { parameter_types! { /// Should match the `ForeignAssets::create` index on Asset Hub. pub const CreateAssetCall: [u8;2] = [53, 0]; - /// Should match the `AssetDeposit` of the `ForeignAssets` pallet on Asset Hub. - pub const CreateAssetDeposit: u128 = UNITS / 10; /// The pallet index of the Ethereum inbound queue pallet in the Bridge Hub runtime. pub const InboundQueuePalletInstance: u8 = 80; /// Default pricing parameters used to calculate bridging fees. Initialized to unit values, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index a7dc80393a..1c04ad1d62 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -27,9 +27,7 @@ pub mod bridge_to_polkadot_config; mod weights; pub mod xcm_config; -use bp_bridge_hub_kusama::snowbridge::{ - CreateAssetCall, CreateAssetDeposit, InboundQueuePalletInstance, Parameters, -}; +use bp_bridge_hub_kusama::snowbridge::{CreateAssetCall, InboundQueuePalletInstance, Parameters}; use bridge_hub_common::message_queue::{ AggregateMessageOrigin, NarrowOriginToSibling, ParaIdToSibling, }; @@ -564,7 +562,7 @@ impl snowbridge_pallet_inbound_queue::Config for Runtime { type Helper = Runtime; type MessageConverter = MessageToXcm< CreateAssetCall, - CreateAssetDeposit, + bp_asset_hub_kusama::CreateForeignAssetDeposit, InboundQueuePalletInstance, AccountId, Balance, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs index 08d13349d4..62675bb0b1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs @@ -152,7 +152,6 @@ fn convert_from_uksm_to_udot(price_in_uksm: Balance) -> Balance { pub mod snowbridge { use crate::Balance; use frame_support::parameter_types; - use polkadot_runtime_constants::currency::UNITS; use snowbridge_core::{PricingParameters, Rewards, U256}; use sp_runtime::FixedU128; use xcm::latest::NetworkId; @@ -160,8 +159,6 @@ pub mod snowbridge { parameter_types! { /// Should match the `ForeignAssets::create` index on Asset Hub. pub const CreateAssetCall: [u8;2] = [53, 0]; - /// Should match the `AssetDeposit` of the `ForeignAssets` pallet on Asset Hub. - pub const CreateAssetDeposit: u128 = 10 * UNITS; /// The pallet index of the Ethereum inbound queue pallet in the Bridge Hub runtime. pub const InboundQueuePalletInstance: u8 = 80; /// Default pricing parameters used to calculate bridging fees. Initialized to unit values, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index f8c36c91f7..f4f3df924c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -27,9 +27,7 @@ pub mod bridge_to_kusama_config; mod weights; pub mod xcm_config; -use bp_bridge_hub_kusama::snowbridge::{ - CreateAssetCall, CreateAssetDeposit, InboundQueuePalletInstance, Parameters, -}; +use bp_bridge_hub_kusama::snowbridge::{CreateAssetCall, InboundQueuePalletInstance, Parameters}; use bridge_hub_common::message_queue::{ AggregateMessageOrigin, NarrowOriginToSibling, ParaIdToSibling, }; @@ -565,7 +563,7 @@ impl snowbridge_pallet_inbound_queue::Config for Runtime { type Helper = Runtime; type MessageConverter = MessageToXcm< CreateAssetCall, - CreateAssetDeposit, + bp_asset_hub_polkadot::CreateForeignAssetDeposit, InboundQueuePalletInstance, AccountId, Balance, From 336acb042e7aa6d0cb76681dfc25eb59333795b2 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Wed, 20 Mar 2024 14:03:13 +0200 Subject: [PATCH 309/316] fix xcm fee manager impl and adds tests --- .../bridge-hub-kusama/src/xcm_config.rs | 20 +++--- .../bridge-hub-kusama/tests/snowbridge.rs | 71 ++++++++++++++++++- .../bridge-hub-polkadot/src/xcm_config.rs | 4 +- .../bridge-hub-polkadot/tests/snowbridge.rs | 71 ++++++++++++++++++- 4 files changed, 150 insertions(+), 16 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index aa4db73fbf..f3f5404504 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -364,14 +364,6 @@ impl cumulus_pallet_xcm::Config for Runtime { type XcmExecutor = XcmExecutor; } -#[test] -fn treasury_pallet_account_not_none() { - assert_eq!( - RelayTreasuryPalletAccount::get(), - LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() - ) -} - /// A `FeeManager` implementation that forces fees for any message delivered to Ethereum. /// Otherwise, it permits the specified `WaivedLocations` to not pay for fees and uses the provided /// `HandleFee` implementation. @@ -384,7 +376,9 @@ impl, FeeHandler: HandleFee> FeeManager fn is_waived(origin: Option<&Location>, fee_reason: FeeReason) -> bool { let Some(loc) = origin else { return false }; if let Export { network, destination: Here } = fee_reason { - return !(network == EthereumNetwork::get()) + if network == EthereumNetwork::get() { + return false + } } WaivedLocations::contains(loc) } @@ -393,3 +387,11 @@ impl, FeeHandler: HandleFee> FeeManager FeeHandler::handle_fee(fee, context, reason); } } + +#[test] +fn treasury_pallet_account_not_none() { + assert_eq!( + RelayTreasuryPalletAccount::get(), + LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() + ) +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs index c34e873532..1da83a5b2d 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs @@ -18,7 +18,8 @@ use bp_polkadot_core::Signature; use bridge_hub_kusama_runtime::{ - bridge_to_polkadot_config::RefundBridgeHubPolkadotMessages, xcm_config::XcmConfig, + bridge_to_polkadot_config::RefundBridgeHubPolkadotMessages, + xcm_config::{XcmConfig, XcmFeeManagerFromComponentsBridgeHub}, BridgeRejectObsoleteHeadersAndMessages, Executive, MessageQueueServiceWeight, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, UncheckedExtrinsic, }; @@ -27,7 +28,7 @@ use codec::{Decode, Encode}; use cumulus_primitives_core::XcmError::{FailedToTransactAsset, NotHoldingFees}; use frame_support::{ assert_err, assert_ok, parameter_types, - traits::{OnFinalize, OnInitialize}, + traits::{Contains, OnFinalize, OnInitialize}, }; use frame_system::pallet_prelude::BlockNumberFor; use kusama_runtime_constants::currency::UNITS; @@ -49,8 +50,13 @@ use sp_runtime::{ traits::Header, AccountId32, FixedU128, Saturating, }; +use system_parachains_constants::kusama::snowbridge::EthereumNetwork; use xcm::{latest::prelude::*, v3::Error}; -use xcm_executor::XcmExecutor; +use xcm_builder::HandleFee; +use xcm_executor::{ + traits::{FeeManager, FeeReason}, + XcmExecutor, +}; type RuntimeHelper = parachains_runtimes_test_utils::RuntimeHelper; @@ -127,6 +133,65 @@ pub fn transfer_token_to_ethereum_insufficient_fund() { ) } +/// Fee is not waived when origin is none. +#[test] +fn test_xcm_fee_manager_from_components_bh_origin_none() { + assert!(!TestXcmFeeManager::is_waived(None, FeeReason::ChargeFees)); +} + +/// Fee is not waived when origin is not in waived location. +#[test] +fn test_xcm_fee_manager_from_components_bh_origin_not_in_waived_locations() { + assert!(!TestXcmFeeManager::is_waived( + Some(&Location::new(1, [Parachain(1)])), + FeeReason::DepositReserveAsset + )); +} + +/// Fee is waived when origin is in waived location. +#[test] +fn test_xcm_fee_manager_from_components_bh_origin_in_waived_locations() { + assert!(TestXcmFeeManager::is_waived( + Some(&Location::new(1, [Parachain(2)])), + FeeReason::DepositReserveAsset + )); +} + +/// Fee is waived when origin is in waived location with Export message, but not to Ethereum. +#[test] +fn test_xcm_fee_manager_from_components_bh_origin_in_waived_locations_with_export_to_polkadot_reason( +) { + assert!(TestXcmFeeManager::is_waived( + Some(&Location::new(1, [Parachain(2)])), + FeeReason::Export { network: Polkadot, destination: Here } + )); +} + +/// Fee is not waived when origin is in waived location but exported to Ethereum. +#[test] +fn test_xcm_fee_manager_from_components_bh_in_waived_locations_with_export_to_ethereum_reason() { + assert!(!TestXcmFeeManager::is_waived( + Some(&Location::new(1, [Parachain(1)])), + FeeReason::Export { network: EthereumNetwork::get(), destination: Here } + )); +} + +struct MockWaivedLocations; +impl Contains for MockWaivedLocations { + fn contains(loc: &Location) -> bool { + loc == &Location::new(1, [Parachain(2)]) + } +} + +struct MockFeeHandler; +impl HandleFee for MockFeeHandler { + fn handle_fee(fee: Assets, _context: Option<&XcmContext>, _reason: FeeReason) -> Assets { + fee + } +} + +type TestXcmFeeManager = XcmFeeManagerFromComponentsBridgeHub; + #[allow(clippy::too_many_arguments)] pub fn send_transfer_token_message_failure( collator_session_key: CollatorSessionKeys, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 98c6e8efda..37b3770bcb 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -395,7 +395,9 @@ impl, FeeHandler: HandleFee> FeeManager fn is_waived(origin: Option<&Location>, fee_reason: FeeReason) -> bool { let Some(loc) = origin else { return false }; if let Export { network, destination: Here } = fee_reason { - return !(network == EthereumNetwork::get()) + if network == EthereumNetwork::get() { + return false + } } WaivedLocations::contains(loc) } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs index 3738d4affc..71cbf8988e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs @@ -18,7 +18,8 @@ use bp_polkadot_core::Signature; use bridge_hub_polkadot_runtime::{ - bridge_to_kusama_config::RefundBridgeHubKusamaMessages, xcm_config::XcmConfig, + bridge_to_kusama_config::RefundBridgeHubKusamaMessages, + xcm_config::{XcmConfig, XcmFeeManagerFromComponentsBridgeHub}, BridgeRejectObsoleteHeadersAndMessages, Executive, MessageQueueServiceWeight, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, UncheckedExtrinsic, }; @@ -27,7 +28,7 @@ use codec::{Decode, Encode}; use cumulus_primitives_core::XcmError::{FailedToTransactAsset, NotHoldingFees}; use frame_support::{ assert_err, assert_ok, parameter_types, - traits::{OnFinalize, OnInitialize}, + traits::{Contains, OnFinalize, OnInitialize}, }; use frame_system::pallet_prelude::BlockNumberFor; use parachains_common::{AccountId, AuraId, Balance}; @@ -49,8 +50,13 @@ use sp_runtime::{ traits::Header, AccountId32, FixedU128, Saturating, }; +use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; use xcm::{latest::prelude::*, v3::Error}; -use xcm_executor::XcmExecutor; +use xcm_builder::HandleFee; +use xcm_executor::{ + traits::{FeeManager, FeeReason}, + XcmExecutor, +}; type RuntimeHelper = parachains_runtimes_test_utils::RuntimeHelper; @@ -127,6 +133,65 @@ pub fn transfer_token_to_ethereum_insufficient_fund() { ) } +/// Fee is not waived when origin is none. +#[test] +fn test_xcm_fee_manager_from_components_bh_origin_none() { + assert!(!TestXcmFeeManager::is_waived(None, FeeReason::ChargeFees)); +} + +/// Fee is not waived when origin is not in waived location. +#[test] +fn test_xcm_fee_manager_from_components_bh_origin_not_in_waived_locations() { + assert!(!TestXcmFeeManager::is_waived( + Some(&Location::new(1, [Parachain(1)])), + FeeReason::DepositReserveAsset + )); +} + +/// Fee is waived when origin is in waived location. +#[test] +fn test_xcm_fee_manager_from_components_bh_origin_in_waived_locations() { + assert!(TestXcmFeeManager::is_waived( + Some(&Location::new(1, [Parachain(2)])), + FeeReason::DepositReserveAsset + )); +} + +/// Fee is waived when origin is in waived location with Export message, but not to Ethereum. +#[test] +fn test_xcm_fee_manager_from_components_bh_origin_in_waived_locations_with_export_to_polkadot_reason( +) { + assert!(TestXcmFeeManager::is_waived( + Some(&Location::new(1, [Parachain(2)])), + FeeReason::Export { network: Polkadot, destination: Here } + )); +} + +/// Fee is not waived when origin is in waived location but exported to Ethereum. +#[test] +fn test_xcm_fee_manager_from_components_bh_in_waived_locations_with_export_to_ethereum_reason() { + assert!(!TestXcmFeeManager::is_waived( + Some(&Location::new(1, [Parachain(1)])), + FeeReason::Export { network: EthereumNetwork::get(), destination: Here } + )); +} + +struct MockWaivedLocations; +impl Contains for MockWaivedLocations { + fn contains(loc: &Location) -> bool { + loc == &Location::new(1, [Parachain(2)]) + } +} + +struct MockFeeHandler; +impl HandleFee for MockFeeHandler { + fn handle_fee(fee: Assets, _context: Option<&XcmContext>, _reason: FeeReason) -> Assets { + fee + } +} + +type TestXcmFeeManager = XcmFeeManagerFromComponentsBridgeHub; + #[allow(clippy::too_many_arguments)] pub fn send_transfer_token_message_failure( collator_session_key: CollatorSessionKeys, From 85b39f3ac6c03df51d38f9a2e4585821fafe84f0 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 20 Mar 2024 14:06:01 +0100 Subject: [PATCH 310/316] Fixes --- Cargo.lock | 4 ---- .../emulated/tests/bridges/bridge-hub-kusama/Cargo.toml | 1 - .../emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml | 1 - system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml | 3 --- .../bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs | 2 +- system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml | 3 --- .../bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs | 2 +- 7 files changed, 2 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c2dd7cadce..98c89eeb72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1531,7 +1531,6 @@ dependencies = [ "scale-info", "snowbridge-beacon-primitives", "snowbridge-core", - "snowbridge-pallet-inbound-queue", "snowbridge-pallet-inbound-queue-fixtures", "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", @@ -1611,7 +1610,6 @@ dependencies = [ "snowbridge-core", "snowbridge-outbound-queue-runtime-api", "snowbridge-pallet-ethereum-client", - "snowbridge-pallet-ethereum-client-fixtures", "snowbridge-pallet-inbound-queue", "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", @@ -1681,7 +1679,6 @@ dependencies = [ "scale-info", "snowbridge-beacon-primitives", "snowbridge-core", - "snowbridge-pallet-inbound-queue", "snowbridge-pallet-inbound-queue-fixtures", "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", @@ -1761,7 +1758,6 @@ dependencies = [ "snowbridge-core", "snowbridge-outbound-queue-runtime-api", "snowbridge-pallet-ethereum-client", - "snowbridge-pallet-ethereum-client-fixtures", "snowbridge-pallet-inbound-queue", "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml index d5026de550..0020e6ded6 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml @@ -49,5 +49,4 @@ snowbridge-core = { version = "0.1.0" } snowbridge-router-primitives = { version = "0.1.0" } snowbridge-pallet-system = { version = "0.1.0" } snowbridge-pallet-outbound-queue = { version = "0.1.0" } -snowbridge-pallet-inbound-queue = { version = "0.1.0" } snowbridge-pallet-inbound-queue-fixtures = { version = "0.9.0" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml index a33deaa4aa..9ff3bf18f4 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml @@ -49,5 +49,4 @@ snowbridge-core = { version = "0.1.0" } snowbridge-router-primitives = { version = "0.1.0" } snowbridge-pallet-system = { version = "0.1.0" } snowbridge-pallet-outbound-queue = { version = "0.1.0" } -snowbridge-pallet-inbound-queue = { version = "0.1.0" } snowbridge-pallet-inbound-queue-fixtures = { version = "0.9.0" } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index a7b2bd66a2..02ced15d47 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -107,7 +107,6 @@ snowbridge-pallet-system = { default-features = false , version = "0.1.0" } snowbridge-system-runtime-api = { default-features = false , version = "0.1.0" } snowbridge-core = { default-features = false , version = "0.1.0" } snowbridge-pallet-ethereum-client = { default-features = false , version = "0.1.0" } -snowbridge-pallet-ethereum-client-fixtures = { default-features = false , version = "0.9.0" } snowbridge-pallet-inbound-queue = { default-features = false , version = "0.1.0" } snowbridge-pallet-outbound-queue = { default-features = false , version = "0.1.0" } snowbridge-outbound-queue-runtime-api = { default-features = false , version = "0.1.0" } @@ -187,7 +186,6 @@ std = [ "snowbridge-beacon-primitives/std", "snowbridge-core/std", "snowbridge-pallet-ethereum-client/std", - "snowbridge-pallet-ethereum-client-fixtures/std", "snowbridge-pallet-inbound-queue/std", "snowbridge-outbound-queue-runtime-api/std", "snowbridge-pallet-outbound-queue/std", @@ -246,7 +244,6 @@ runtime-benchmarks = [ "polkadot-runtime-common/runtime-benchmarks", "snowbridge-core/runtime-benchmarks", "snowbridge-pallet-ethereum-client/runtime-benchmarks", - "snowbridge-pallet-ethereum-client-fixtures/runtime-benchmarks", "snowbridge-pallet-inbound-queue/runtime-benchmarks", "snowbridge-pallet-outbound-queue/runtime-benchmarks", "snowbridge-router-primitives/runtime-benchmarks", diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs index b997006074..18ad72c0a4 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs @@ -18,6 +18,7 @@ use bp_polkadot_core::Signature; use bridge_hub_kusama_runtime::{ + bridge_to_ethereum_config::EthereumNetwork, bridge_to_polkadot_config::RefundBridgeHubPolkadotMessages, xcm_config::{XcmConfig, XcmFeeManagerFromComponentsBridgeHub}, BridgeRejectObsoleteHeadersAndMessages, Executive, MessageQueueServiceWeight, Runtime, @@ -48,7 +49,6 @@ use sp_runtime::{ traits::Header, AccountId32, FixedU128, Saturating, }; -use system_parachains_constants::kusama::snowbridge::EthereumNetwork; use xcm::{latest::prelude::*, v3::Error}; use xcm_builder::HandleFee; use xcm_executor::{ diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 56b6d46e66..2533ea4ed3 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -107,7 +107,6 @@ snowbridge-pallet-system = { default-features = false , version = "0.1.0" } snowbridge-system-runtime-api = { default-features = false , version = "0.1.0" } snowbridge-core = { default-features = false , version = "0.1.0" } snowbridge-pallet-ethereum-client = { default-features = false , version = "0.1.0" } -snowbridge-pallet-ethereum-client-fixtures = { default-features = false , version = "0.9.0" } snowbridge-pallet-inbound-queue = { default-features = false , version = "0.1.0" } snowbridge-pallet-outbound-queue = { default-features = false , version = "0.1.0" } snowbridge-outbound-queue-runtime-api = { default-features = false , version = "0.1.0" } @@ -187,7 +186,6 @@ std = [ "snowbridge-beacon-primitives/std", "snowbridge-core/std", "snowbridge-pallet-ethereum-client/std", - "snowbridge-pallet-ethereum-client-fixtures/std", "snowbridge-pallet-inbound-queue/std", "snowbridge-outbound-queue-runtime-api/std", "snowbridge-pallet-outbound-queue/std", @@ -246,7 +244,6 @@ runtime-benchmarks = [ "polkadot-runtime-common/runtime-benchmarks", "snowbridge-core/runtime-benchmarks", "snowbridge-pallet-ethereum-client/runtime-benchmarks", - "snowbridge-pallet-ethereum-client-fixtures/runtime-benchmarks", "snowbridge-pallet-inbound-queue/runtime-benchmarks", "snowbridge-pallet-outbound-queue/runtime-benchmarks", "snowbridge-router-primitives/runtime-benchmarks", diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs index 221c925a23..be84c05cf3 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs @@ -18,6 +18,7 @@ use bp_polkadot_core::Signature; use bridge_hub_polkadot_runtime::{ + bridge_to_ethereum_config::EthereumNetwork, bridge_to_kusama_config::RefundBridgeHubKusamaMessages, xcm_config::{XcmConfig, XcmFeeManagerFromComponentsBridgeHub}, BridgeRejectObsoleteHeadersAndMessages, Executive, MessageQueueServiceWeight, Runtime, @@ -48,7 +49,6 @@ use sp_runtime::{ traits::Header, AccountId32, FixedU128, Saturating, }; -use system_parachains_constants::polkadot::snowbridge::EthereumNetwork; use xcm::{latest::prelude::*, v3::Error}; use xcm_builder::HandleFee; use xcm_executor::{ From e7f9bb5f6b7c76855931aae9652d0a2dea1b41f5 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 20 Mar 2024 14:11:31 +0100 Subject: [PATCH 311/316] Revert back deps --- Cargo.lock | 2 ++ .../emulated/tests/bridges/bridge-hub-kusama/Cargo.toml | 1 + .../emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 98c89eeb72..d26eacaaba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1539,6 +1539,7 @@ dependencies = [ "sp-runtime", "staging-xcm", "staging-xcm-executor", + "system-parachains-constants", ] [[package]] @@ -1687,6 +1688,7 @@ dependencies = [ "sp-runtime", "staging-xcm", "staging-xcm-executor", + "system-parachains-constants", ] [[package]] diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml index 0020e6ded6..b4a9ae2cb7 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml @@ -42,6 +42,7 @@ asset-hub-kusama-runtime = { path = "../../../../../system-parachains/asset-hubs integration-tests-helpers = { path = "../../../helpers" } kusama-polkadot-system-emulated-network = { path = "../../../networks/kusama-polkadot-system" } kusama-system-emulated-network = { path = "../../../networks/kusama-system" } +system-parachains-constants = { path = "../../../../../system-parachains/constants" } # Snowbridge snowbridge-beacon-primitives = { version = "0.1.0" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml index 9ff3bf18f4..d7fa7a7aa8 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml @@ -35,13 +35,14 @@ cumulus-pallet-xcmp-queue = { version = "0.8.0" } bp-messages = { version = "0.8.0" } pallet-bridge-messages = { version = "0.8.0" } -# Runtimes +# Local bp-bridge-hub-polkadot = { path = "../../../../../system-parachains/bridge-hubs/bridge-hub-polkadot/primitives"} bridge-hub-polkadot-runtime = { path = "../../../../../system-parachains/bridge-hubs/bridge-hub-polkadot" } asset-hub-polkadot-runtime = { path = "../../../../../system-parachains/asset-hubs/asset-hub-polkadot" } integration-tests-helpers = { path = "../../../helpers" } kusama-polkadot-system-emulated-network = { path = "../../../networks/kusama-polkadot-system" } polkadot-system-emulated-network = { path = "../../../networks/polkadot-system" } +system-parachains-constants = { path = "../../../../../system-parachains/constants" } # Snowbridge snowbridge-beacon-primitives = { version = "0.1.0" } From dc9e6bce39a4ce5c8ee481fffb867cb013a7f0fc Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 20 Mar 2024 14:14:20 +0100 Subject: [PATCH 312/316] Unused import --- .../tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs | 2 +- .../tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index 6a3c64fc5a..1e55bcc7bb 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -22,7 +22,7 @@ use bridge_hub_kusama_runtime::{ }; use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; -use frame_support::{pallet_prelude::TypeInfo, traits::PalletInfoAccess}; +use frame_support::pallet_prelude::TypeInfo; use hex_literal::hex; use kusama_system_emulated_network::{ penpal_emulated_chain::CustomizableAssetFromSystemAssetHub, diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index bb48b47972..3cbeadf3f7 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -22,7 +22,7 @@ use bridge_hub_polkadot_runtime::{ }; use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; -use frame_support::{pallet_prelude::TypeInfo, traits::PalletInfoAccess}; +use frame_support::pallet_prelude::TypeInfo; use hex_literal::hex; use polkadot_system_emulated_network::{ penpal_emulated_chain::CustomizableAssetFromSystemAssetHub, From 3cf807ad718ad3ee64dce72d7c8c8417146a01cf Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 20 Mar 2024 15:37:04 +0100 Subject: [PATCH 313/316] Remove import and use directly --- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 9 ++------- .../bridge-hubs/bridge-hub-polkadot/src/lib.rs | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 1c04ad1d62..466d8bc94a 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -68,8 +68,6 @@ use frame_system::{ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; -#[cfg(not(feature = "runtime-benchmarks"))] -use xcm_config::XcmRouter; use xcm_config::{ FellowshipLocation, GovernanceLocation, TreasuryAccount, XcmOriginToTransactDispatchOrigin, }; @@ -95,9 +93,6 @@ use system_parachains_constants::{ // XCM Imports use xcm::prelude::*; -#[cfg(feature = "runtime-benchmarks")] -use benchmark_helpers::DoNothingRouter; - /// The address format for describing accounts. pub type Address = MultiAddress; @@ -553,9 +548,9 @@ impl snowbridge_pallet_inbound_queue::Config for Runtime { type Verifier = snowbridge_pallet_ethereum_client::Pallet; type Token = Balances; #[cfg(not(feature = "runtime-benchmarks"))] - type XcmSender = XcmRouter; + type XcmSender = xcm_config::XcmRouter; #[cfg(feature = "runtime-benchmarks")] - type XcmSender = DoNothingRouter; + type XcmSender = benchmark_helpers::DoNothingRouter; type ChannelLookup = EthereumSystem; type GatewayAddress = EthereumGatewayAddress; #[cfg(feature = "runtime-benchmarks")] diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index f4f3df924c..6280cd7150 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -68,8 +68,6 @@ use frame_system::{ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; -#[cfg(not(feature = "runtime-benchmarks"))] -use xcm_config::XcmRouter; use xcm_config::{ FellowshipLocation, GovernanceLocation, TreasuryAccount, XcmOriginToTransactDispatchOrigin, }; @@ -96,9 +94,6 @@ use system_parachains_constants::{ // XCM Imports use xcm::prelude::*; -#[cfg(feature = "runtime-benchmarks")] -use benchmark_helpers::DoNothingRouter; - /// The address format for describing accounts. pub type Address = MultiAddress; @@ -554,9 +549,9 @@ impl snowbridge_pallet_inbound_queue::Config for Runtime { type Verifier = snowbridge_pallet_ethereum_client::Pallet; type Token = Balances; #[cfg(not(feature = "runtime-benchmarks"))] - type XcmSender = XcmRouter; + type XcmSender = xcm_config::XcmRouter; #[cfg(feature = "runtime-benchmarks")] - type XcmSender = DoNothingRouter; + type XcmSender = benchmark_helpers::DoNothingRouter; type ChannelLookup = EthereumSystem; type GatewayAddress = EthereumGatewayAddress; #[cfg(feature = "runtime-benchmarks")] From b3d97cf5738902417c0bdecb4e926e10d593359d Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 21 Mar 2024 08:00:16 +0200 Subject: [PATCH 314/316] correct comment --- .../asset-hubs/asset-hub-kusama/src/xcm_config.rs | 6 +++--- .../asset-hubs/asset-hub-polkadot/src/xcm_config.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 6addf4c657..f6139a3061 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -804,9 +804,9 @@ pub mod bridging { use bp_bridge_hub_kusama::snowbridge::InboundQueuePalletInstance; parameter_types! { - /// User fee for ERC20 token transfer back to Ethereum. - /// Configure the fee to max Balance so that it is disabled. - /// Sensible value was 2_750_872_500_000. + /// User fee for transfers from Kusama to Ethereum. + /// The fee is set to max Balance to disable the bridge until a fee is set by + /// governance. pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX; pub storage BridgeHubEthereumBaseFee: Balance = DefaultBridgeHubEthereumBaseFee::get(); pub SiblingBridgeHubWithEthereumInboundQueueInstance: Location = Location::new( diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index b23f5d410c..e043c8b1a9 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -798,9 +798,9 @@ pub mod bridging { use bp_bridge_hub_polkadot::snowbridge::InboundQueuePalletInstance; parameter_types! { - /// User fee for ERC20 token transfer back to Ethereum. - /// Configure the fee to max Balance so that it is disabled. - /// Sensible value was 27_508_725_000. + /// User fee for transfers from Polkadot to Ethereum. + /// The fee is set to max Balance to disable the bridge until a fee is set by + /// governance. pub const DefaultBridgeHubEthereumBaseFee: Balance = Balance::MAX; pub storage BridgeHubEthereumBaseFee: Balance = DefaultBridgeHubEthereumBaseFee::get(); pub SiblingBridgeHubWithEthereumInboundQueueInstance: Location = Location::new( From 59b35027a6df62c6a6224714cd1a7f560dc96b26 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 21 Mar 2024 08:02:06 +0200 Subject: [PATCH 315/316] move snowbridge migrations to unreleased comment --- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 4 ++-- system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 1c04ad1d62..dbb9145e26 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -142,13 +142,13 @@ pub type UncheckedExtrinsic = pub type Migrations = ( // unreleased cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, - // permanent - pallet_xcm::migration::MigrateToLatestXcmVersion, snowbridge_pallet_system::migration::v0::InitializeOnUpgrade< Runtime, ConstU32, ConstU32, >, + // permanent + pallet_xcm::migration::MigrateToLatestXcmVersion, ); /// Executive: handles dispatch to the various modules. diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index f4f3df924c..396b6410cf 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -143,13 +143,13 @@ pub type UncheckedExtrinsic = pub type Migrations = ( // unreleased cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, - // permanent - pallet_xcm::migration::MigrateToLatestXcmVersion, snowbridge_pallet_system::migration::v0::InitializeOnUpgrade< Runtime, ConstU32, ConstU32, >, + // permanent + pallet_xcm::migration::MigrateToLatestXcmVersion, ); /// Executive: handles dispatch to the various modules. From 756d00b6acb67908e866a258e2cc45c792ade930 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 21 Mar 2024 08:24:57 +0200 Subject: [PATCH 316/316] move test --- .../bridge-hub-kusama/tests/snowbridge.rs | 16 +++++++++++-- .../bridge-hub-kusama/tests/tests.rs | 23 +++---------------- .../bridge-hub-polkadot/tests/snowbridge.rs | 16 +++++++++++-- .../bridge-hub-polkadot/tests/tests.rs | 23 +++---------------- 4 files changed, 34 insertions(+), 44 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs index 18ad72c0a4..160ccbb27c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs @@ -21,8 +21,9 @@ use bridge_hub_kusama_runtime::{ bridge_to_ethereum_config::EthereumNetwork, bridge_to_polkadot_config::RefundBridgeHubPolkadotMessages, xcm_config::{XcmConfig, XcmFeeManagerFromComponentsBridgeHub}, - BridgeRejectObsoleteHeadersAndMessages, Executive, MessageQueueServiceWeight, Runtime, - RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, UncheckedExtrinsic, + BridgeRejectObsoleteHeadersAndMessages, EthereumGatewayAddress, Executive, + MessageQueueServiceWeight, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, + UncheckedExtrinsic, }; use bridge_hub_test_utils::ValidatorIdOf; use codec::{Decode, Encode}; @@ -131,6 +132,17 @@ pub fn transfer_token_to_ethereum_insufficient_fund() { ) } +#[test] +fn change_ethereum_gateway_by_governance_works() { + change_storage_constant_by_governance_works::( + collator_session_keys(), + bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, + Box::new(|call| RuntimeCall::System(call).encode()), + || (EthereumGatewayAddress::key().to_vec(), EthereumGatewayAddress::get()), + |_| [1; 20].into(), + ) +} + /// Fee is not waived when origin is none. #[test] fn test_xcm_fee_manager_from_components_bh_origin_none() { diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index 0fc9e4208f..74e0f4c4a2 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -27,17 +27,15 @@ use bridge_hub_kusama_runtime::{ KsmRelayLocation, LocationToAccountId, RelayNetwork, RelayTreasuryLocation, RelayTreasuryPalletAccount, XcmConfig, }, - AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, EthereumGatewayAddress, - Executive, ExistentialDeposit, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, - RuntimeEvent, RuntimeOrigin, SessionKeys, SignedExtra, TransactionPayment, UncheckedExtrinsic, - SLOT_DURATION, + AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, + ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, + SignedExtra, TransactionPayment, UncheckedExtrinsic, SLOT_DURATION, }; use bridge_hub_test_utils::{test_cases::from_parachain, SlotDurations}; use codec::{Decode, Encode}; use frame_support::{dispatch::GetDispatchInfo, parameter_types, traits::ConstU8}; use parachains_common::{AccountId, AuraId, Balance}; use sp_consensus_aura::SlotDuration; -use sp_core::H160; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ generic::{Era, SignedPayload}, @@ -328,21 +326,6 @@ pub fn can_calculate_weight_for_paid_export_message_with_reserve_transfer() { ) } -#[test] -fn change_ethereum_gateway_by_governance_works() { - bridge_hub_test_utils::test_cases::change_storage_constant_by_governance_works::< - Runtime, - EthereumGatewayAddress, - H160, - >( - collator_session_keys(), - bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, - Box::new(|call| RuntimeCall::System(call).encode()), - || (EthereumGatewayAddress::key().to_vec(), EthereumGatewayAddress::get()), - |_| [1; 20].into(), - ) -} - #[test] pub fn can_calculate_fee_for_complex_message_delivery_transaction() { check_sane_fees_values( diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs index be84c05cf3..29f8ad5ad4 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs @@ -21,8 +21,9 @@ use bridge_hub_polkadot_runtime::{ bridge_to_ethereum_config::EthereumNetwork, bridge_to_kusama_config::RefundBridgeHubKusamaMessages, xcm_config::{XcmConfig, XcmFeeManagerFromComponentsBridgeHub}, - BridgeRejectObsoleteHeadersAndMessages, Executive, MessageQueueServiceWeight, Runtime, - RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, UncheckedExtrinsic, + BridgeRejectObsoleteHeadersAndMessages, EthereumGatewayAddress, Executive, + MessageQueueServiceWeight, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, + UncheckedExtrinsic, }; use bridge_hub_test_utils::ValidatorIdOf; use codec::{Decode, Encode}; @@ -131,6 +132,17 @@ pub fn transfer_token_to_ethereum_insufficient_fund() { ) } +#[test] +fn change_ethereum_gateway_by_governance_works() { + change_storage_constant_by_governance_works::( + collator_session_keys(), + bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, + Box::new(|call| RuntimeCall::System(call).encode()), + || (EthereumGatewayAddress::key().to_vec(), EthereumGatewayAddress::get()), + |_| [1; 20].into(), + ) +} + /// Fee is not waived when origin is none. #[test] fn test_xcm_fee_manager_from_components_bh_origin_none() { diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index b89fedf188..0f03bd3415 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -28,17 +28,15 @@ use bridge_hub_polkadot_runtime::{ DotRelayLocation, LocationToAccountId, RelayNetwork, RelayTreasuryLocation, RelayTreasuryPalletAccount, XcmConfig, }, - AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, EthereumGatewayAddress, - Executive, ExistentialDeposit, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, - RuntimeEvent, RuntimeOrigin, SessionKeys, SignedExtra, TransactionPayment, UncheckedExtrinsic, - SLOT_DURATION, + AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, + ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, + SignedExtra, TransactionPayment, UncheckedExtrinsic, SLOT_DURATION, }; use bridge_hub_test_utils::{test_cases::from_parachain, SlotDurations}; use codec::{Decode, Encode}; use frame_support::{dispatch::GetDispatchInfo, parameter_types, traits::ConstU8}; use parachains_common::{AccountId, AuraId, Balance}; use sp_consensus_aura::SlotDuration; -use sp_core::H160; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ generic::{Era, SignedPayload}, @@ -329,21 +327,6 @@ pub fn can_calculate_weight_for_paid_export_message_with_reserve_transfer() { ) } -#[test] -fn change_ethereum_gateway_by_governance_works() { - bridge_hub_test_utils::test_cases::change_storage_constant_by_governance_works::< - Runtime, - EthereumGatewayAddress, - H160, - >( - collator_session_keys(), - bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, - Box::new(|call| RuntimeCall::System(call).encode()), - || (EthereumGatewayAddress::key().to_vec(), EthereumGatewayAddress::get()), - |_| [1; 20].into(), - ) -} - #[test] pub fn can_calculate_fee_for_complex_message_delivery_transaction() { check_sane_fees_values(