diff --git a/.github/resources/frame-weight-template.hbs b/.github/resources/frame-weight-template.hbs index beed8c8ba..31fd5bc2f 100644 --- a/.github/resources/frame-weight-template.hbs +++ b/.github/resources/frame-weight-template.hbs @@ -27,6 +27,7 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] +#![allow(double_parens)] #![allow(unused_imports)] #![allow(missing_docs)] diff --git a/.github/workflows/benchmark_tests.yaml b/.github/workflows/benchmark_tests.yaml index 5eb4287d8..db4757272 100644 --- a/.github/workflows/benchmark_tests.yaml +++ b/.github/workflows/benchmark_tests.yaml @@ -62,8 +62,8 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install 1.71.0 - rustup default 1.71.0 + rustup toolchain install 1.74.0 + rustup default 1.74.0 rustup target add wasm32-unknown-unknown - name: cache cargo uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index e4a5268a0..410b42b80 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -52,8 +52,8 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup update - rustup toolchain install 1.71.0 - rustup default 1.71.0 + rustup toolchain install 1.74.0 + rustup default 1.74.0 rustup target add wasm32-unknown-unknown - name: cache cargo uses: Swatinem/rust-cache@v2 @@ -93,8 +93,8 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup update - rustup toolchain install 1.71.0 - rustup default 1.71.0 + rustup toolchain install 1.74.0 + rustup default 1.74.0 rustup target add wasm32-unknown-unknown echo "$HOME/.local/bin" >> $GITHUB_PATH echo "$HOME/.cargo/bin" >> $GITHUB_PATH diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index 468fa6ad1..0f8b655a9 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -71,8 +71,8 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install 1.71.0 - rustup default 1.71.0 + rustup toolchain install 1.74.0 + rustup default 1.74.0 rustup target add wasm32-unknown-unknown - name: cache cargo uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index 721b1435f..a3163d41d 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -67,8 +67,8 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install 1.71.0 - rustup default 1.71.0 + rustup toolchain install 1.74.0 + rustup default 1.74.0 rustup target add wasm32-unknown-unknown - name: cache cargo uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/metadata_diff.yml b/.github/workflows/metadata_diff.yml index 3009133f2..663fdf25b 100644 --- a/.github/workflows/metadata_diff.yml +++ b/.github/workflows/metadata_diff.yml @@ -59,8 +59,8 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install 1.71.0 - rustup default 1.71.0 + rustup toolchain install 1.74.0 + rustup default 1.74.0 rustup target add wasm32-unknown-unknown - name: cache cargo uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/publish_draft_releases.yml b/.github/workflows/publish_draft_releases.yml index b072645a1..19a1c6ab8 100644 --- a/.github/workflows/publish_draft_releases.yml +++ b/.github/workflows/publish_draft_releases.yml @@ -114,8 +114,8 @@ jobs: rustup default stable rustup update rustup target add wasm32-unknown-unknown - rustup install 1.71.0 - rustup target add wasm32-unknown-unknown --toolchain 1.71.0 + rustup install 1.74.0 + rustup target add wasm32-unknown-unknown --toolchain 1.74.0 - name: cache cargo uses: Swatinem/rust-cache@v2 - name: build @@ -127,7 +127,7 @@ jobs: SCCACHE_DIR: ~/.cache/sccache run: | source ${HOME}/.cargo/env - RUSTC_BOOTSTRAP=1 cargo +1.71.0 build --profile production --verbose + RUSTC_BOOTSTRAP=1 cargo +1.74.0 build --profile production --verbose - name: stop sccache server run: sccache --stop-server || true - if: always() diff --git a/.github/workflows/run_all_benchmarks.yml b/.github/workflows/run_all_benchmarks.yml index 11c107ce0..e25046dab 100644 --- a/.github/workflows/run_all_benchmarks.yml +++ b/.github/workflows/run_all_benchmarks.yml @@ -54,8 +54,8 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install 1.71.0 - rustup default 1.71.0 + rustup toolchain install 1.74.0 + rustup default 1.74.0 rustup target add wasm32-unknown-unknown - name: cache cargo uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/run_linters.yml b/.github/workflows/run_linters.yml index 2c864c712..26e8f32de 100644 --- a/.github/workflows/run_linters.yml +++ b/.github/workflows/run_linters.yml @@ -53,8 +53,8 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install 1.71.0 - rustup default 1.71.0 + rustup toolchain install 1.74.0 + rustup default 1.74.0 cargo install taplo-cli --locked - name: cache cargo uses: Swatinem/rust-cache@v2 @@ -77,9 +77,10 @@ jobs: SCCACHE_CACHE_SIZE: 2G SCCACHE_DIR: ~/.cache/sccache shell: bash + # It's pointless to use no-default features. run: | source ${HOME}/.cargo/env - SKIP_WASM_BUILD=1 cargo check --no-default-features + SKIP_WASM_BUILD=1 cargo check --all-targets --all-features SKIP_WASM_BUILD=1 cargo clippy --all-targets --all-features -- -D warnings - name: stop sccache server run: sccache --stop-server || true diff --git a/.github/workflows/try-runtime-mainnet.yml b/.github/workflows/try-runtime-mainnet.yml index 7cdeb9a1d..073ea14ca 100644 --- a/.github/workflows/try-runtime-mainnet.yml +++ b/.github/workflows/try-runtime-mainnet.yml @@ -51,8 +51,8 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install 1.71.0 - rustup default 1.71.0 + rustup toolchain install 1.74.0 + rustup default 1.74.0 rustup target add wasm32-unknown-unknown - name: cache cargo uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 96207c237..ed7dfb940 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -52,8 +52,8 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup update - rustup toolchain install 1.71.0 - rustup default 1.71.0 + rustup toolchain install 1.74.0 + rustup default 1.74.0 rustup target add wasm32-unknown-unknown - name: cache cargo uses: Swatinem/rust-cache@v2 diff --git a/Cargo.lock b/Cargo.lock index be45ac150..ff2041cfa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -89,7 +89,7 @@ dependencies = [ "cipher 0.3.0", "ctr 0.8.0", "ghash 0.4.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -103,7 +103,7 @@ dependencies = [ "cipher 0.4.4", "ctr 0.9.2", "ghash 0.5.0", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -139,6 +139,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "always-assert" version = "0.1.3" @@ -171,9 +177,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", @@ -219,9 +225,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "approx" @@ -232,15 +238,78 @@ dependencies = [ "num-traits", ] +[[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.57", +] + +[[package]] +name = "ark-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c7021f180a0cbea0380eba97c2af3c57074cdaffe0eef7e840e1c9f2841e55" +dependencies = [ + "ark-bls12-377", + "ark-ec 0.4.2", + "ark-models-ext", + "ark-std 0.4.0", +] + [[package]] name = "ark-bls12-381" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65be532f9dd1e98ad0150b037276cde464c6f371059e6dd02c0222395761f6aa" dependencies = [ - "ark-ec", - "ark-ff", - "ark-std", + "ark-ec 0.3.0", + "ark-ff 0.3.0", + "ark-std 0.3.0", +] + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-bls12-381-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1dc4b3d08f19e8ec06e949712f95b8361e43f1391d94f65e4234df03480631c" +dependencies = [ + "ark-bls12-381 0.4.0", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-models-ext", + "ark-serialize 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -249,9 +318,34 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea691771ebbb28aea556c044e2e5c5227398d840cee0c34d4d20fa8eb2689e8c" dependencies = [ - "ark-ec", - "ark-ff", - "ark-std", + "ark-ec 0.3.0", + "ark-ff 0.3.0", + "ark-std 0.3.0", +] + +[[package]] +name = "ark-bw6-761" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e0605daf0cc5aa2034b78d008aaf159f56901d92a52ee4f6ecdfdac4f426700" +dependencies = [ + "ark-bls12-377", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-bw6-761-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccee5fba47266f460067588ee1bf070a9c760bf2050c1c509982c5719aadb4f2" +dependencies = [ + "ark-bw6-761", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-models-ext", + "ark-std 0.4.0", ] [[package]] @@ -260,12 +354,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff773c0ef8c655c98071d3026a63950798a66b2f45baef22d8334c1756f1bd18" dependencies = [ - "ark-ec", - "ark-ff", + "ark-ec 0.3.0", + "ark-ff 0.3.0", "ark-relations", - "ark-serialize", + "ark-serialize 0.3.0", "ark-snark", - "ark-std", + "ark-std 0.3.0", "blake2 0.9.2", "derivative", "digest 0.9.0", @@ -277,25 +371,93 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dea978406c4b1ca13c2db2373b05cc55429c3575b8b21f1b9ee859aa5b03dd42" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff 0.4.2", + "ark-poly 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", "num-traits", + "rayon", "zeroize", ] +[[package]] +name = "ark-ed-on-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b10d901b9ac4b38f9c32beacedfadcdd64e46f8d7f8e88c1ae1060022cf6f6c6" +dependencies = [ + "ark-bls12-377", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-ed-on-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524a4fb7540df2e1a8c2e67a83ba1d1e6c3947f4f9342cc2359fc2e789ad731d" +dependencies = [ + "ark-ec 0.4.2", + "ark-ed-on-bls12-377", + "ark-ff 0.4.2", + "ark-models-ext", + "ark-std 0.4.0", +] + [[package]] name = "ark-ed-on-bls12-381" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43b7ada17db3854f5994e74e60b18e10e818594935ee7e1d329800c117b32970" dependencies = [ - "ark-bls12-381", - "ark-ec", - "ark-ff", + "ark-bls12-381 0.3.0", + "ark-ec 0.3.0", + "ark-ff 0.3.0", "ark-r1cs-std", - "ark-std", + "ark-std 0.3.0", +] + +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9cde0f2aa063a2a5c28d39b47761aa102bda7c13c84fc118a61b87c7b2f785c" +dependencies = [ + "ark-bls12-381 0.4.0", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15185f1acb49a07ff8cbe5f11a1adc5a93b19e211e325d826ae98e98e124346" +dependencies = [ + "ark-ec 0.4.2", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff 0.4.2", + "ark-models-ext", + "ark-std 0.4.0", ] [[package]] @@ -305,10 +467,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fdc786b806fdbff4abebb08ec2fcb50cfe3941918e57120ab121228452903fd" dependencies = [ "ark-bn254", - "ark-ec", - "ark-ff", + "ark-ec 0.3.0", + "ark-ff 0.3.0", "ark-r1cs-std", - "ark-std", + "ark-std 0.3.0", ] [[package]] @@ -317,10 +479,10 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", + "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", @@ -329,6 +491,26 @@ dependencies = [ "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 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", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.0", + "zeroize", +] + [[package]] name = "ark-ff-asm" version = "0.3.0" @@ -339,6 +521,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-macros" version = "0.3.0" @@ -351,6 +543,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-groth16" version = "0.3.0" @@ -358,12 +563,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38f8fff7468e947130b5caf9bdd27de8b913cf30e15104b4f0cd301726b3d897" dependencies = [ "ark-crypto-primitives", - "ark-ec", - "ark-ff", - "ark-poly", + "ark-ec 0.3.0", + "ark-ff 0.3.0", + "ark-poly 0.3.0", "ark-relations", - "ark-serialize", - "ark-std", + "ark-serialize 0.3.0", + "ark-std 0.3.0", +] + +[[package]] +name = "ark-models-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e9eab5d4b5ff2f228b763d38442adc9b084b0a465409b059fac5c2308835ec2" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", ] [[package]] @@ -372,23 +590,36 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b0f78f47537c2f15706db7e98fe64cc1711dbf9def81218194e17239e53e5aa" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", "derivative", "hashbrown 0.11.2", ] +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", +] + [[package]] name = "ark-r1cs-std" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22e8fdacb1931f238a0d866ced1e916a49d36de832fd8b83dc916b718ae72893" dependencies = [ - "ark-ec", - "ark-ff", + "ark-ec 0.3.0", + "ark-ff 0.3.0", "ark-relations", - "ark-std", + "ark-std 0.3.0", "derivative", "num-bigint", "num-traits", @@ -401,10 +632,39 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cba4c1c99792a6834bd97f7fd76578ec2cd58d2afc5139a17e1d1bec65b38f6" dependencies = [ - "ark-ff", - "ark-std", + "ark-ff 0.3.0", + "ark-std 0.3.0", "tracing", - "tracing-subscriber", + "tracing-subscriber 0.2.25", +] + +[[package]] +name = "ark-scale" +version = "0.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f69c00b3b529be29528a6f2fd5fa7b1790f8bed81b9cdca17e326538545a179" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "ark-secret-scalar" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "ark-transcript", + "digest 0.10.7", + "getrandom_or_panic", + "zeroize", ] [[package]] @@ -413,11 +673,23 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" dependencies = [ - "ark-serialize-derive", - "ark-std", + "ark-serialize-derive 0.3.0", + "ark-std 0.3.0", "digest 0.9.0", ] +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive 0.4.2", + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] + [[package]] name = "ark-serialize-derive" version = "0.3.0" @@ -429,15 +701,26 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-snark" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc3dff1a5f67a9c0b34df32b079752d8dd17f1e9d06253da0453db6c1b7cc8a" dependencies = [ - "ark-ff", + "ark-ff 0.3.0", "ark-relations", - "ark-std", + "ark-std 0.3.0", ] [[package]] @@ -447,7 +730,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" dependencies = [ "num-traits", - "rand 0.8.5", + "rand", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand", + "rayon", +] + +[[package]] +name = "ark-transcript" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" +dependencies = [ + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "digest 0.10.7", + "rand_core 0.6.4", + "sha3", ] [[package]] @@ -468,6 +775,15 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + [[package]] name = "arrayvec" version = "0.5.2" @@ -525,6 +841,15 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" +[[package]] +name = "async-backing-primitives" +version = "0.9.0" +source = "git+https://github.com/Manta-Network/moonkit.git?branch=manta-polkadot-1.6.0#f426837a93b3d72b96c7fd07ab09a9163fe85ee6" +dependencies = [ + "sp-api", + "sp-consensus-slots", +] + [[package]] name = "async-channel" version = "1.9.0" @@ -536,6 +861,65 @@ dependencies = [ "futures-core", ] +[[package]] +name = "async-channel" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" +dependencies = [ + "concurrent-queue", + "event-listener 4.0.0", + "event-listener-strategy", + "futures-core", + "pin-project-lite 0.2.13", +] + +[[package]] +name = "async-executor" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +dependencies = [ + "async-lock 3.2.0", + "async-task", + "concurrent-queue", + "fastrand 2.0.1", + "futures-lite 2.1.0", + "slab", +] + +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "async-io" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-lite 1.13.0", + "log", + "parking", + "polling 2.8.0", + "rustix 0.37.27", + "slab", + "socket2 0.4.10", + "waker-fn", +] + [[package]] name = "async-io" version = "2.2.1" @@ -546,9 +930,9 @@ dependencies = [ "cfg-if", "concurrent-queue", "futures-io", - "futures-lite", + "futures-lite 2.1.0", "parking", - "polling", + "polling 3.3.1", "rustix 0.38.26", "slab", "tracing", @@ -576,16 +960,57 @@ dependencies = [ ] [[package]] -name = "async-recursion" -version = "1.0.5" +name = "async-net" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" +checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", + "async-io 1.13.0", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "async-process" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +dependencies = [ + "async-io 1.13.0", + "async-lock 2.8.0", + "async-signal", + "blocking", + "cfg-if", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.26", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-signal" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +dependencies = [ + "async-io 2.2.1", + "async-lock 2.8.0", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.26", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", ] +[[package]] +name = "async-task" +version = "4.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" + [[package]] name = "async-trait" version = "0.1.74" @@ -594,7 +1019,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -610,6 +1035,18 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[package]] +name = "atomic-take" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8ab6b55fe97976e46f91ddbed8d147d966475dc29b2032757ba47e02376fbc3" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "attohttpc" version = "0.24.1" @@ -623,17 +1060,6 @@ dependencies = [ "url", ] -[[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" @@ -655,6 +1081,29 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "bandersnatch_vrfs" +version = "0.0.4" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" +dependencies = [ + "ark-bls12-381 0.4.0", + "ark-ec 0.4.2", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "dleq_vrf", + "fflonk", + "merlin 3.0.0", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "ring 0.1.0", + "sha2 0.10.8", + "sp-ark-bls12-381", + "sp-ark-ed-on-bls12-381-bandersnatch", + "zeroize", +] + [[package]] name = "base-x" version = "0.2.11" @@ -675,15 +1124,9 @@ checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.20.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" @@ -709,7 +1152,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "hash-db", "log", @@ -742,7 +1185,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -751,7 +1194,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b30ed1d6f8437a487a266c8293aeb95b61a23261273e3e02912cdb8b68bf798b" dependencies = [ - "bs58", + "bs58 0.4.0", "hmac 0.12.1", "k256 0.11.6", "once_cell", @@ -759,10 +1202,29 @@ dependencies = [ "rand_core 0.6.4", "ripemd", "sha2 0.10.8", - "subtle", + "subtle 2.4.1", "zeroize", ] +[[package]] +name = "bip39" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +dependencies = [ + "bitcoin_hashes", + "rand", + "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" @@ -783,10 +1245,23 @@ checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ "funty", "radium", + "serde", "tap", "wyz", ] +[[package]] +name = "blake2" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330" +dependencies = [ + "byte-tools", + "crypto-mac 0.7.0", + "digest 0.8.1", + "opaque-debug 0.2.3", +] + [[package]] name = "blake2" version = "0.9.2" @@ -807,6 +1282,16 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" +dependencies = [ + "arrayvec 0.4.12", + "constant_time_eq 0.1.5", +] + [[package]] name = "blake2b_simd" version = "1.0.2" @@ -815,7 +1300,7 @@ checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -826,7 +1311,7 @@ checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -839,7 +1324,7 @@ dependencies = [ "arrayvec 0.7.4", "cc", "cfg-if", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -881,6 +1366,22 @@ dependencies = [ "byte-tools", ] +[[package]] +name = "blocking" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +dependencies = [ + "async-channel 2.1.1", + "async-lock 3.2.0", + "async-task", + "fastrand 2.0.1", + "futures-io", + "futures-lite 2.1.0", + "piper", + "tracing", +] + [[package]] name = "bounded-collections" version = "0.1.9" @@ -902,6 +1403,17 @@ dependencies = [ "thiserror", ] +[[package]] +name = "bp-xcm-bridge-hub-router" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", +] + [[package]] name = "bs58" version = "0.4.0" @@ -911,6 +1423,15 @@ dependencies = [ "sha2 0.9.9", ] +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "tinyvec", +] + [[package]] name = "bstr" version = "0.2.17" @@ -988,10 +1509,21 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "c2-chacha" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27dae93fe7b1e0424dc57179ac396908c26b035a87234809f5c4dfd1b47dc80" +dependencies = [ + "cipher 0.2.5", + "ppv-lite86", +] + [[package]] name = "calamari-runtime" version = "4.6.2" dependencies = [ + "async-backing-primitives", "calamari-vesting", "csv", "cumulus-pallet-dmp-queue", @@ -1006,18 +1538,19 @@ dependencies = [ "cumulus-test-relay-sproof-builder", "frame-benchmarking", "frame-executive", + "frame-metadata", "frame-support", "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", - "hex-literal 0.3.4", + "hex-literal", "lazy_static", "log", "manta-collator-selection", "manta-primitives", "nimbus-primitives", - "orml-traits 0.4.1-dev (git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.43)", + "orml-traits", "orml-xtokens", "pallet-asset-manager", "pallet-assets", @@ -1036,6 +1569,7 @@ dependencies = [ "pallet-manta-sbt", "pallet-manta-support", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-name-service", "pallet-parachain-staking", @@ -1053,11 +1587,12 @@ dependencies = [ "pallet-utility", "pallet-xcm", "pallet-xcm-benchmarks", - "parachain-info", + "parachains-common", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", + "polkadot-runtime-common", "polkadot-runtime-parachains", "reqwest", "runtime-common", @@ -1065,6 +1600,7 @@ dependencies = [ "serde", "serde_json", "session-key-primitives", + "session-keys-primitives", "smallvec", "sp-api", "sp-application-crypto", @@ -1077,15 +1613,16 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0", "sp-transaction-pool", "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "substrate-fixed", "substrate-wasm-builder", "version-compare", - "xcm", - "xcm-builder", - "xcm-executor", "xcm-simulator", "zenlink-protocol", "zenlink-protocol-runtime-api", @@ -1107,7 +1644,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -1182,6 +1719,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "chacha" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddf3c081b5fba1e5615640aae998e0fbd10c24cbd897ee39ed754a77601a4862" +dependencies = [ + "byteorder", + "keystream", +] + [[package]] name = "chacha20" version = "0.9.1" @@ -1222,17 +1769,26 @@ dependencies = [ [[package]] name = "cid" -version = "0.8.6" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ed9c8b2d17acb8110c46f1da5bf4a696d745e1474a16db0cd2b49cd0249bf2" +checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" dependencies = [ "core2", "multibase", - "multihash 0.16.3", + "multihash 0.17.0", "serde", "unsigned-varint", ] +[[package]] +name = "cipher" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +dependencies = [ + "generic-array 0.14.7", +] + [[package]] name = "cipher" version = "0.3.0" @@ -1275,24 +1831,34 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.11" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" +checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" dependencies = [ "clap_builder", "clap_derive", ] +[[package]] +name = "clap-num" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e063d263364859dc54fb064cedb7c122740cd4733644b14b176c097f51e8ab7" +dependencies = [ + "num-traits", +] + [[package]] name = "clap_builder" -version = "4.4.11" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" +checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" dependencies = [ "anstream", "anstyle", "clap_lex", "strsim", + "terminal_size", ] [[package]] @@ -1304,7 +1870,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -1343,15 +1909,37 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "comfy-table" -version = "6.2.0" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e959d788268e3bf9d35ace83e81b124190378e4c91c9067524675e33394b8ba" +checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" dependencies = [ - "strum", - "strum_macros", + "strum 0.25.0", + "strum_macros 0.25.3", "unicode-width", ] +[[package]] +name = "common" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof#b273d33f9981e2bb3375ab45faeb537f7ee35224" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-poly 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "fflonk", + "getrandom_or_panic", + "merlin 3.0.0", + "rand_chacha 0.3.1", +] + +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" + [[package]] name = "concurrent-queue" version = "2.4.0" @@ -1380,12 +1968,44 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +[[package]] +name = "const-random" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom 0.2.11", + "once_cell", + "tiny-keccak", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + [[package]] name = "constant_time_eq" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +[[package]] +name = "constcat" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd7e35aee659887cbfb97aaf227ac12cad1a9d7c71e55ff3376839ed4e282d08" + [[package]] name = "convert_case" version = "0.4.0" @@ -1619,7 +2239,7 @@ checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -1631,7 +2251,7 @@ checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -1646,6 +2266,16 @@ dependencies = [ "typenum 1.17.0", ] +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +dependencies = [ + "generic-array 0.12.4", + "subtle 1.0.0", +] + [[package]] name = "crypto-mac" version = "0.8.0" @@ -1653,7 +2283,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -1663,7 +2293,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -1708,13 +2338,15 @@ dependencies = [ [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "clap", "parity-scale-codec", "sc-chain-spec", "sc-cli", + "sc-client-api", "sc-service", + "sp-blockchain", "sp-core", "sp-runtime", "url", @@ -1723,7 +2355,7 @@ dependencies = [ [[package]] name = "cumulus-client-collator" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", @@ -1746,25 +2378,29 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "cumulus-client-collator", "cumulus-client-consensus-common", "cumulus-client-consensus-proposer", + "cumulus-client-parachain-inherent", + "cumulus-primitives-aura", "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", "cumulus-relay-chain-interface", "futures 0.3.29", "parity-scale-codec", "polkadot-node-primitives", + "polkadot-node-subsystem", "polkadot-overseer", "polkadot-primitives", "sc-client-api", "sc-consensus", "sc-consensus-aura", + "sc-consensus-babe", "sc-consensus-slots", "sc-telemetry", + "schnellru", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -1784,7 +2420,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "cumulus-client-pov-recovery", @@ -1797,11 +2433,14 @@ dependencies = [ "polkadot-primitives", "sc-client-api", "sc-consensus", + "sc-consensus-babe", "schnellru", "sp-blockchain", "sp-consensus", + "sp-consensus-slots", "sp-core", "sp-runtime", + "sp-timestamp", "sp-trie", "substrate-prometheus-endpoint", "tracing", @@ -1810,7 +2449,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-proposer" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "anyhow", "async-trait", @@ -1825,7 +2464,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-relay-chain" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -1848,7 +2487,7 @@ dependencies = [ [[package]] name = "cumulus-client-network" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -1857,7 +2496,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "polkadot-node-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "sc-client-api", "sp-blockchain", @@ -1868,10 +2507,34 @@ dependencies = [ "tracing", ] +[[package]] +name = "cumulus-client-parachain-inherent" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "async-trait", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-relay-chain-interface", + "cumulus-test-relay-sproof-builder", + "parity-scale-codec", + "sc-client-api", + "scale-info", + "sp-api", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-trie", + "tracing", +] + [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1883,7 +2546,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-overseer", "polkadot-primitives", - "rand 0.8.5", + "rand", "sc-client-api", "sc-consensus", "sp-consensus", @@ -1895,7 +2558,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -1903,6 +2566,7 @@ dependencies = [ "cumulus-client-network", "cumulus-client-pov-recovery", "cumulus-primitives-core", + "cumulus-primitives-proof-size-hostfunction", "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", "cumulus-relay-chain-minimal-node", @@ -1930,9 +2594,10 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "cumulus-primitives-core", + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -1940,54 +2605,59 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", - "xcm", + "sp-std 8.0.0", + "staging-xcm", ] [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", + "cumulus-primitives-proof-size-hostfunction", "environmental", + "frame-benchmarking", "frame-support", "frame-system", "impl-trait-for-tuples", "log", + "pallet-message-queue", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", + "polkadot-runtime-parachains", "scale-info", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-inherents", "sp-io", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 8.0.0", "sp-trie", "sp-version", - "xcm", + "staging-xcm", + "trie-db", ] [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] name = "cumulus-pallet-session-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -1995,13 +2665,13 @@ dependencies = [ "pallet-session", "parity-scale-codec", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2010,106 +2680,128 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", - "xcm", + "sp-std 8.0.0", + "staging-xcm", ] [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "bounded-collections", + "bp-xcm-bridge-hub-router", "cumulus-primitives-core", "frame-benchmarking", "frame-support", "frame-system", "log", + "pallet-message-queue", "parity-scale-codec", "polkadot-runtime-common", - "rand_chacha 0.3.1", + "polkadot-runtime-parachains", "scale-info", + "sp-core", "sp-io", "sp-runtime", - "sp-std", - "xcm", - "xcm-executor", + "sp-std 8.0.0", + "staging-xcm", + "staging-xcm-executor", +] + +[[package]] +name = "cumulus-primitives-aura" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-primitives", + "sp-api", + "sp-consensus-aura", + "sp-runtime", + "sp-std 8.0.0", ] [[package]] name = "cumulus-primitives-core" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "scale-info", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-trie", - "xcm", + "staging-xcm", ] [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "cumulus-primitives-core", - "cumulus-relay-chain-interface", - "cumulus-test-relay-sproof-builder", "parity-scale-codec", - "sc-client-api", "scale-info", - "sp-api", "sp-core", "sp-inherents", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-trie", +] + +[[package]] +name = "cumulus-primitives-proof-size-hostfunction" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "sp-externalities 0.19.0", + "sp-runtime-interface 17.0.0", "sp-trie", - "tracing", ] [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "cumulus-primitives-core", "futures 0.3.29", "parity-scale-codec", "sp-inherents", - "sp-std", + "sp-std 8.0.0", "sp-timestamp", ] [[package]] name = "cumulus-primitives-utility" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "cumulus-primitives-core", "frame-support", "log", + "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-runtime-common", + "polkadot-runtime-parachains", "sp-io", "sp-runtime", - "sp-std", - "xcm", - "xcm-builder", - "xcm-executor", + "sp-std 8.0.0", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] name = "cumulus-relay-chain-inprocess-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2117,7 +2809,6 @@ dependencies = [ "futures 0.3.29", "futures-timer", "polkadot-cli", - "polkadot-client", "polkadot-service", "sc-cli", "sc-client-api", @@ -2134,7 +2825,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2152,7 +2843,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-minimal-node" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "array-bytes 6.2.2", "async-trait", @@ -2160,12 +2851,14 @@ dependencies = [ "cumulus-relay-chain-interface", "cumulus-relay-chain-rpc-interface", "futures 0.3.29", - "lru 0.9.0", + "parking_lot 0.12.1", "polkadot-availability-recovery", "polkadot-collator-protocol", "polkadot-core-primitives", "polkadot-network-bridge", "polkadot-node-collation-generation", + "polkadot-node-core-chain-api", + "polkadot-node-core-prospective-parachains", "polkadot-node-core-runtime-api", "polkadot-node-network-protocol", "polkadot-node-subsystem-util", @@ -2183,6 +2876,7 @@ dependencies = [ "sp-consensus", "sp-consensus-babe", "sp-runtime", + "substrate-prometheus-endpoint", "tokio", "tracing", ] @@ -2190,29 +2884,38 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-rpc-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", + "either", "futures 0.3.29", "futures-timer", "jsonrpsee", - "lru 0.9.0", "parity-scale-codec", + "pin-project", "polkadot-overseer", + "rand", "sc-client-api", "sc-rpc-api", "sc-service", + "schnellru", "serde", "serde_json", + "smoldot", + "smoldot-light", "sp-api", "sp-authority-discovery", "sp-consensus-babe", "sp-core", + "sp-runtime", "sp-state-machine", - "sp-storage", + "sp-storage 13.0.0", + "sp-version", + "thiserror", "tokio", + "tokio-util", "tracing", "url", ] @@ -2220,14 +2923,15 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", "polkadot-primitives", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 8.0.0", + "sp-trie", ] [[package]] @@ -2239,7 +2943,7 @@ dependencies = [ "byteorder", "digest 0.8.1", "rand_core 0.5.1", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2252,7 +2956,7 @@ dependencies = [ "byteorder", "digest 0.9.0", "rand_core 0.5.1", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2267,9 +2971,9 @@ dependencies = [ "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", - "platforms 3.2.0", + "platforms", "rustc_version 0.4.0", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2281,7 +2985,20 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", +] + +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.6.4", + "subtle-ng", + "zeroize", ] [[package]] @@ -2308,7 +3025,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -2325,7 +3042,7 @@ checksum = "587663dd5fb3d10932c8aecfe7c844db1bcf0aee93eeab08fac13dc1212c2e7f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -2499,14 +3216,14 @@ dependencies = [ "block-buffer 0.10.4", "const-oid", "crypto-common", - "subtle", + "subtle 2.4.1", ] [[package]] name = "directories" -version = "4.0.1" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" +checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" dependencies = [ "dirs-sys", ] @@ -2523,13 +3240,14 @@ dependencies = [ [[package]] name = "dirs-sys" -version = "0.3.7" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", + "option-ext", "redox_users", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -2551,7 +3269,50 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", +] + +[[package]] +name = "dleq_vrf" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-scale", + "ark-secret-scalar", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "ark-transcript", + "arrayvec 0.7.4", + "zeroize", +] + +[[package]] +name = "docify" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cc4fd38aaa9fb98ac70794c82a00360d1e165a87fbf96a8a91f9dfc602aaee2" +dependencies = [ + "docify_macros", +] + +[[package]] +name = "docify_macros" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63fa215f3a0d40fb2a221b3aa90d8e1fbb8379785a990cb60d62ac71ebdc6460" +dependencies = [ + "common-path", + "derive-syn-parse", + "once_cell", + "proc-macro2", + "quote", + "regex", + "syn 2.0.57", + "termcolor", + "toml 0.8.8", + "walkdir", ] [[package]] @@ -2670,7 +3431,7 @@ dependencies = [ "rand_core 0.6.4", "serde", "sha2 0.10.8", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2688,6 +3449,21 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ed25519-zebra" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" +dependencies = [ + "curve25519-dalek 4.1.1", + "ed25519 2.2.3", + "hashbrown 0.14.3", + "hex", + "rand_core 0.6.4", + "sha2 0.10.8", + "zeroize", +] + [[package]] name = "either" version = "1.9.0" @@ -2709,7 +3485,7 @@ dependencies = [ "group 0.12.1", "rand_core 0.6.4", "sec1 0.3.0", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2728,7 +3504,7 @@ dependencies = [ "pkcs8", "rand_core 0.6.4", "sec1 0.7.3", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2776,7 +3552,7 @@ checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -2787,7 +3563,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -2831,6 +3607,17 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "event-listener" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite 0.2.13", +] + [[package]] name = "event-listener" version = "4.0.0" @@ -2873,31 +3660,6 @@ dependencies = [ "quote", ] -[[package]] -name = "expander" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3774182a5df13c3d1690311ad32fbe913feef26baba609fa2dd5f72042bd2ab6" -dependencies = [ - "blake2 0.10.6", - "fs-err", - "proc-macro2", - "quote", -] - -[[package]] -name = "expander" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84" -dependencies = [ - "blake2 0.10.6", - "fs-err", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "expander" version = "2.0.0" @@ -2908,7 +3670,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -2923,6 +3685,15 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" 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.1" @@ -2956,11 +3727,12 @@ dependencies = [ [[package]] name = "fdlimit" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b" +checksum = "e182f7dbc2ef73d9ef67351c5fbbea084729c48362d3ce9dd44c28e32e277fe5" dependencies = [ "libc", + "thiserror", ] [[package]] @@ -2970,7 +3742,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -2980,7 +3752,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", +] + +[[package]] +name = "fflonk" +version = "0.1.0" +source = "git+https://github.com/w3f/fflonk#1e854f35e9a65d08b11a86291405cdc95baa0a35" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-poly 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "merlin 3.0.0", ] [[package]] @@ -3034,7 +3819,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand 0.8.5", + "rand", "rustc-hex", "static_assertions", ] @@ -3089,7 +3874,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "parity-scale-codec", ] @@ -3112,7 +3897,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-support", "frame-support-procedural", @@ -3128,19 +3913,19 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", "static_assertions", ] [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "Inflector", - "array-bytes 4.2.0", + "array-bytes 6.2.2", "chrono", "clap", "comfy-table", @@ -3154,7 +3939,7 @@ dependencies = [ "linked-hash-map", "log", "parity-scale-codec", - "rand 0.8.5", + "rand", "rand_pcg", "sc-block-builder", "sc-cli", @@ -3169,14 +3954,15 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-database", - "sp-externalities", + "sp-externalities 0.19.0", "sp-inherents", + "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-std", - "sp-storage", + "sp-storage 13.0.0", "sp-trie", + "sp-wasm-interface 14.0.0", "thiserror", "thousands", ] @@ -3184,18 +3970,18 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3206,31 +3992,32 @@ dependencies = [ "sp-core", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-support", "frame-system", "frame-try-runtime", + "log", "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] name = "frame-metadata" -version = "15.1.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" +checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" dependencies = [ "cfg-if", "parity-scale-codec", @@ -3241,9 +4028,8 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "async-recursion", "futures 0.3.29", "indicatif", "jsonrpsee", @@ -3253,6 +4039,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", + "sp-state-machine", "spinners", "substrate-rpc-client", "tokio", @@ -3262,81 +4049,92 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "aquamarine", + "array-bytes 6.2.2", "bitflags 1.3.2", + "docify", "environmental", "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", "k256 0.13.2", "log", - "once_cell", + "macro_magic", "parity-scale-codec", "paste", "scale-info", "serde", + "serde_json", "smallvec", "sp-api", "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", - "sp-debug-derive", + "sp-debug-derive 8.0.0", + "sp-genesis-builder", "sp-inherents", "sp-io", + "sp-metadata-ir", "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "sp-weights", + "static_assertions", "tt-call", ] [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" 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", - "syn 2.0.39", + "sp-core-hashing", + "syn 2.0.57", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "cfg-if", + "docify", "frame-support", "log", "parity-scale-codec", @@ -3345,7 +4143,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-version", "sp-weights", ] @@ -3353,7 +4151,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -3362,13 +4160,13 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "parity-scale-codec", "sp-api", @@ -3377,13 +4175,13 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-support", "parity-scale-codec", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -3407,9 +4205,9 @@ dependencies = [ [[package]] name = "fs4" -version = "0.6.6" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" +checksum = "29f9df8a11882c4e3335eb2d18a0137c505d9ca927470b0cac9c6f0ae07d28f7" dependencies = [ "rustix 0.38.26", "windows-sys 0.48.0", @@ -3491,13 +4289,31 @@ version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +[[package]] +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite 0.2.13", + "waker-fn", +] + [[package]] name = "futures-lite" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" dependencies = [ + "fastrand 2.0.1", "futures-core", + "futures-io", + "parking", "pin-project-lite 0.2.13", ] @@ -3509,7 +4325,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -3621,6 +4437,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", + "rand_core 0.6.4", +] + [[package]] name = "ghash" version = "0.4.4" @@ -3694,7 +4520,7 @@ checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff 0.12.1", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -3705,7 +4531,7 @@ checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff 0.13.0", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -3788,21 +4614,26 @@ name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash 0.8.6", + "allocator-api2", + "serde", +] [[package]] -name = "heck" -version = "0.4.1" +name = "hashlink" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown 0.14.3", +] [[package]] -name = "hermit-abi" -version = "0.1.19" +name = "heck" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" @@ -3818,15 +4649,18 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hex-literal" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] -name = "hex-literal" -version = "0.4.1" +name = "hkdf" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac 0.12.1", +] [[package]] name = "hmac" @@ -3958,21 +4792,6 @@ dependencies = [ "want", ] -[[package]] -name = "hyper-rustls" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" -dependencies = [ - "http", - "hyper", - "log", - "rustls 0.20.9", - "rustls-native-certs", - "tokio", - "tokio-rustls 0.23.4", -] - [[package]] name = "hyper-rustls" version = "0.24.2" @@ -3986,7 +4805,7 @@ dependencies = [ "rustls 0.21.9", "rustls-native-certs", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", "webpki-roots 0.25.3", ] @@ -4069,7 +4888,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ - "async-io", + "async-io 2.2.1", "core-foundation", "fnv", "futures 0.3.29", @@ -4111,6 +4930,25 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "include_dir" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +dependencies = [ + "proc-macro2", + "quote", +] + [[package]] name = "indexmap" version = "1.9.3" @@ -4132,6 +4970,12 @@ dependencies = [ "hashbrown 0.14.3", ] +[[package]] +name = "indexmap-nostd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" + [[package]] name = "indicatif" version = "0.17.7" @@ -4198,6 +5042,7 @@ dependencies = [ "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "cumulus-test-relay-sproof-builder", + "frame-metadata", "frame-support", "frame-system", "lazy_static", @@ -4205,7 +5050,7 @@ dependencies = [ "manta-primitives", "manta-runtime", "nimbus-primitives", - "orml-traits 0.4.1-dev (git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.43)", + "orml-traits", "orml-xcm-support", "orml-xtokens", "pallet-asset-manager", @@ -4225,10 +5070,11 @@ dependencies = [ "pallet-tx-pause", "pallet-utility", "pallet-xcm", - "parachain-info", + "parachains-common", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", + "polkadot-runtime-common", "polkadot-runtime-parachains", "runtime-common", "scale-info", @@ -4237,10 +5083,11 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "xcm", - "xcm-builder", - "xcm-executor", + "sp-std 8.0.0", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "xcm-simulator", ] @@ -4250,7 +5097,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", ] @@ -4285,11 +5132,20 @@ 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.26", "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" @@ -4362,7 +5218,7 @@ dependencies = [ "soketto", "thiserror", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", "tokio-util", "tracing", "webpki-roots 0.25.3", @@ -4386,7 +5242,7 @@ dependencies = [ "hyper", "jsonrpsee-types", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "rustc-hash", "serde", "serde_json", @@ -4404,7 +5260,7 @@ checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" dependencies = [ "async-trait", "hyper", - "hyper-rustls 0.24.2", + "hyper-rustls", "jsonrpsee-core", "jsonrpsee-types", "rustc-hash", @@ -4492,138 +5348,31 @@ dependencies = [ [[package]] name = "k256" version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" -dependencies = [ - "cfg-if", - "ecdsa 0.16.9", - "elliptic-curve 0.13.8", - "once_cell", - "sha2 0.10.8", -] - -[[package]] -name = "keccak" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "kusama-runtime" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" -dependencies = [ - "bitvec", - "frame-benchmarking", - "frame-election-provider-support", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "hex-literal 0.4.1", - "kusama-runtime-constants", - "log", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-bags-list", - "pallet-balances", - "pallet-bounties", - "pallet-child-bounties", - "pallet-collective", - "pallet-conviction-voting", - "pallet-democracy", - "pallet-election-provider-multi-phase", - "pallet-election-provider-support-benchmarking", - "pallet-elections-phragmen", - "pallet-fast-unstake", - "pallet-grandpa", - "pallet-identity", - "pallet-im-online", - "pallet-indices", - "pallet-membership", - "pallet-message-queue", - "pallet-multisig", - "pallet-nis", - "pallet-nomination-pools", - "pallet-nomination-pools-benchmarking", - "pallet-nomination-pools-runtime-api", - "pallet-offences", - "pallet-offences-benchmarking", - "pallet-preimage", - "pallet-proxy", - "pallet-ranked-collective", - "pallet-recovery", - "pallet-referenda", - "pallet-scheduler", - "pallet-session", - "pallet-session-benchmarking", - "pallet-society", - "pallet-staking", - "pallet-staking-runtime-api", - "pallet-timestamp", - "pallet-tips", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-vesting", - "pallet-whitelist", - "pallet-xcm", - "pallet-xcm-benchmarks", - "parity-scale-codec", - "polkadot-primitives", - "polkadot-runtime-common", - "polkadot-runtime-parachains", - "rustc-hex", - "scale-info", - "serde", - "serde_derive", - "smallvec", - "sp-api", - "sp-arithmetic", - "sp-authority-discovery", - "sp-block-builder", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-core", - "sp-inherents", - "sp-io", - "sp-mmr-primitives", - "sp-npos-elections", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "sp-transaction-pool", - "sp-version", - "static_assertions", - "substrate-wasm-builder", - "xcm", - "xcm-builder", - "xcm-executor", +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" +dependencies = [ + "cfg-if", + "ecdsa 0.16.9", + "elliptic-curve 0.13.8", + "once_cell", + "sha2 0.10.8", ] [[package]] -name = "kusama-runtime-constants" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +name = "keccak" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", + "cpufeatures", ] +[[package]] +name = "keystream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" + [[package]] name = "kvdb" version = "0.13.0" @@ -4657,6 +5406,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" @@ -4768,7 +5528,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "quick-protobuf", - "rand 0.8.5", + "rand", "rw-stream-sink", "smallvec", "thiserror", @@ -4818,13 +5578,13 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ - "bs58", + "bs58 0.4.0", "ed25519-dalek 2.1.0", "log", "multiaddr", "multihash 0.17.0", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.8", "thiserror", "zeroize", @@ -4849,7 +5609,7 @@ dependencies = [ "libp2p-swarm", "log", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.8", "smallvec", "thiserror", @@ -4871,7 +5631,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm", "log", - "rand 0.8.5", + "rand", "smallvec", "socket2 0.4.10", "tokio", @@ -4907,12 +5667,12 @@ dependencies = [ "log", "once_cell", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.8", "snow", "static_assertions", "thiserror", - "x25519-dalek", + "x25519-dalek 1.1.1", "zeroize", ] @@ -4929,7 +5689,7 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "rand 0.8.5", + "rand", "void", ] @@ -4949,7 +5709,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "quinn-proto", - "rand 0.8.5", + "rand", "rustls 0.20.9", "thiserror", "tokio", @@ -4967,7 +5727,7 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm", - "rand 0.8.5", + "rand", "smallvec", ] @@ -4986,7 +5746,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm-derive", "log", - "rand 0.8.5", + "rand", "smallvec", "tokio", "void", @@ -5123,7 +5883,7 @@ dependencies = [ "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", - "rand 0.8.5", + "rand", "serde", "sha2 0.9.9", "typenum 1.17.0", @@ -5137,7 +5897,7 @@ checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" dependencies = [ "crunchy", "digest 0.9.0", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -5208,12 +5968,30 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" 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.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +[[package]] +name = "lioness" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae926706ba42c425c9457121178330d75e273df2e82e28b758faf3de3a9acb9" +dependencies = [ + "arrayref", + "blake2 0.8.1", + "chacha", + "keystream", +] + [[package]] name = "lock_api" version = "0.4.11" @@ -5226,36 +6004,24 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "lru" -version = "0.8.1" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" -dependencies = [ - "hashbrown 0.12.3", -] +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "lru" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17" +checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" dependencies = [ "hashbrown 0.13.2", ] [[package]] name = "lru" -version = "0.10.1" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" -dependencies = [ - "hashbrown 0.13.2", -] +checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" [[package]] name = "lru-cache" @@ -5295,19 +6061,72 @@ dependencies = [ "libc", ] +[[package]] +name = "macro_magic" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e03844fc635e92f3a0067e25fa4bf3e3dbf3f2927bf3aa01bb7bc8f1c428949d" +dependencies = [ + "macro_magic_core", + "macro_magic_macros", + "quote", + "syn 2.0.57", +] + +[[package]] +name = "macro_magic_core" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "468155613a44cfd825f1fb0ffa532b018253920d404e6fca1e8d43155198a46d" +dependencies = [ + "const-random", + "derive-syn-parse", + "macro_magic_core_macros", + "proc-macro2", + "quote", + "syn 2.0.57", +] + +[[package]] +name = "macro_magic_core_macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.57", +] + +[[package]] +name = "macro_magic_macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" +dependencies = [ + "macro_magic_core", + "quote", + "syn 2.0.57", +] + [[package]] name = "manta" version = "4.6.2" dependencies = [ + "async-backing-primitives", "async-trait", "calamari-runtime", "cfg-if", "clap", + "clap-num", "cumulus-client-cli", + "cumulus-client-collator", "cumulus-client-consensus-aura", "cumulus-client-consensus-common", + "cumulus-client-consensus-proposer", "cumulus-client-consensus-relay-chain", "cumulus-client-network", + "cumulus-client-parachain-inherent", "cumulus-client-service", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", @@ -5317,8 +6136,11 @@ dependencies = [ "cumulus-relay-chain-rpc-interface", "frame-benchmarking", "frame-benchmarking-cli", + "frame-support", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "futures 0.3.29", - "hex-literal 0.3.4", + "hex-literal", "jsonrpsee", "log", "manta-primitives", @@ -5331,8 +6153,11 @@ dependencies = [ "pallet-lottery", "pallet-manta-pay", "pallet-manta-sbt", + "pallet-manta-support", "pallet-parachain-staking", + "pallet-transaction-payment", "pallet-transaction-payment-rpc", + "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "polkadot-cli", "polkadot-primitives", @@ -5359,6 +6184,7 @@ dependencies = [ "sc-transaction-pool-api", "serde", "session-key-primitives", + "session-keys-primitives", "sp-api", "sp-application-crypto", "sp-arithmetic", @@ -5373,13 +6199,15 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", + "sp-std 8.0.0", "sp-timestamp", "sp-transaction-pool", + "sp-version", + "staging-xcm", "substrate-build-script-utils", "substrate-frame-rpc-system", "substrate-prometheus-endpoint", "try-runtime-cli", - "xcm", "zenlink-protocol", "zenlink-protocol-rpc", "zenlink-protocol-runtime-api", @@ -5416,7 +6244,7 @@ dependencies = [ "pallet-session", "pallet-timestamp", "parity-scale-codec", - "rand 0.8.5", + "rand", "scale-info", "serde", "sp-arithmetic", @@ -5425,8 +6253,8 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] @@ -5434,23 +6262,23 @@ name = "manta-crypto" version = "0.5.15" source = "git+https://github.com/manta-network/manta-rs.git?tag=v0.5.15#d5fb3502f4d492deaeb376dde013d3a12a729ee5" dependencies = [ - "ark-bls12-381", + "ark-bls12-381 0.3.0", "ark-bn254", - "ark-ec", + "ark-ec 0.3.0", "ark-ed-on-bls12-381", "ark-ed-on-bn254", - "ark-ff", + "ark-ff 0.3.0", "ark-groth16", "ark-r1cs-std", "ark-relations", - "ark-serialize", + "ark-serialize 0.3.0", "ark-snark", - "ark-std", + "ark-std 0.3.0", "derivative", "ed25519-dalek 1.0.1", "manta-util", "num-integer", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "rand_core 0.6.4", ] @@ -5495,23 +6323,24 @@ dependencies = [ "frame-support", "frame-system", "log", - "orml-traits 0.4.1-dev (git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.43)", + "orml-traits", "parity-scale-codec", "scale-info", "smallvec", "sp-core", "sp-io", "sp-runtime", - "sp-std", - "xcm", - "xcm-builder", - "xcm-executor", + "sp-std 8.0.0", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] name = "manta-runtime" version = "4.6.2" dependencies = [ + "async-backing-primitives", "csv", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -5523,17 +6352,18 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", + "frame-metadata", "frame-support", "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", - "hex-literal 0.3.4", + "hex-literal", "log", "manta-collator-selection", "manta-primitives", "nimbus-primitives", - "orml-traits 0.4.1-dev (git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.43)", + "orml-traits", "orml-xtokens", "pallet-asset-manager", "pallet-assets", @@ -5550,6 +6380,7 @@ dependencies = [ "pallet-manta-sbt", "pallet-manta-support", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-name-service", "pallet-parachain-staking", @@ -5566,16 +6397,18 @@ dependencies = [ "pallet-utility", "pallet-xcm", "pallet-xcm-benchmarks", - "parachain-info", + "parachains-common", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", + "polkadot-runtime-common", "polkadot-runtime-parachains", "runtime-common", "scale-info", "serde", "session-key-primitives", + "session-keys-primitives", "smallvec", "sp-api", "sp-application-crypto", @@ -5588,14 +6421,15 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0", "sp-transaction-pool", "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "substrate-wasm-builder", "version-compare", - "xcm", - "xcm-builder", - "xcm-executor", "xcm-simulator", "zenlink-protocol", "zenlink-protocol-runtime-api", @@ -5632,6 +6466,15 @@ dependencies = [ "regex-automata 0.1.10", ] +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + [[package]] name = "matches" version = "0.1.10" @@ -5699,12 +6542,6 @@ dependencies = [ "hash-db", ] -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "merlin" version = "2.0.1" @@ -5717,6 +6554,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" @@ -5724,7 +6573,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532" dependencies = [ "futures 0.3.29", - "rand 0.8.5", + "rand", "thrift", ] @@ -5760,10 +6609,35 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "mixnet" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daa3eb39495d8e2e2947a1d862852c90cc6a4a8845f8b41c8829cb9fcc047f4a" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "bitflags 1.3.2", + "blake2 0.10.6", + "c2-chacha", + "curve25519-dalek 4.1.1", + "either", + "hashlink", + "lioness", + "log", + "parking_lot 0.12.1", + "rand", + "rand_chacha 0.3.1", + "rand_distr", + "subtle 2.4.1", + "thiserror", + "zeroize", +] + [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "futures 0.3.29", "log", @@ -5782,7 +6656,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "anyhow", "jsonrpsee", @@ -5854,16 +6728,16 @@ dependencies = [ [[package]] name = "multihash" -version = "0.16.3" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c346cf9999c631f002d8f977c4eaeaa0e6386f16007202308d0b3757522c2cc" +checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" dependencies = [ "blake2b_simd", "blake2s_simd", "blake3", "core2", "digest 0.10.7", - "multihash-derive", + "multihash-derive 0.8.0", "sha2 0.10.8", "sha3", "unsigned-varint", @@ -5871,17 +6745,47 @@ dependencies = [ [[package]] name = "multihash" -version = "0.17.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" +checksum = "cfd8a792c1694c6da4f68db0a9d707c72bd260994da179e6030a5dcee00bb815" dependencies = [ "core2", "digest 0.10.7", - "multihash-derive", + "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" @@ -5896,6 +6800,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" @@ -5928,7 +6857,7 @@ dependencies = [ "num-complex", "num-rational", "num-traits", - "rand 0.8.5", + "rand", "rand_distr", "simba 0.6.0", "typenum 1.17.0", @@ -5974,11 +6903,11 @@ dependencies = [ [[package]] name = "names" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d66043b25d4a6cccb23619d10c19c25304b355a7dccd4a8e11423dd2382146" +checksum = "7bddcd3bf5144b6392de80e04c347cd7fab2508f6df16a85fc496ecd5cec39bc" dependencies = [ - "rand 0.8.5", + "rand", ] [[package]] @@ -6074,17 +7003,25 @@ dependencies = [ [[package]] name = "nimbus-consensus" version = "0.9.0" -source = "git+https://github.com/manta-network/nimbus.git?branch=v4.6.1#054f60f7c7915f7bb9b86ce3e066b039dd677f9a" +source = "git+https://github.com/Manta-Network/moonkit.git?branch=manta-polkadot-1.6.0#f426837a93b3d72b96c7fd07ab09a9163fe85ee6" dependencies = [ + "async-backing-primitives", "async-trait", + "cumulus-client-collator", "cumulus-client-consensus-common", + "cumulus-client-consensus-proposer", + "cumulus-client-parachain-inherent", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", + "cumulus-relay-chain-interface", "futures 0.3.29", "log", "nimbus-primitives", "parity-scale-codec", "parking_lot 0.12.1", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-primitives", "sc-client-api", "sc-consensus", "sc-consensus-manual-seal", @@ -6093,10 +7030,12 @@ dependencies = [ "sp-block-builder", "sp-blockchain", "sp-consensus", + "sp-consensus-slots", "sp-core", "sp-inherents", "sp-keystore", "sp-runtime", + "sp-version", "substrate-prometheus-endpoint", "tracing", ] @@ -6104,7 +7043,7 @@ dependencies = [ [[package]] name = "nimbus-primitives" version = "0.9.0" -source = "git+https://github.com/manta-network/nimbus.git?branch=v4.6.1#054f60f7c7915f7bb9b86ce3e066b039dd677f9a" +source = "git+https://github.com/Manta-Network/moonkit.git?branch=manta-polkadot-1.6.0#f426837a93b3d72b96c7fd07ab09a9163fe85ee6" dependencies = [ "async-trait", "frame-benchmarking", @@ -6116,7 +7055,7 @@ dependencies = [ "sp-application-crypto", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -6130,6 +7069,18 @@ dependencies = [ "libc", ] +[[package]] +name = "no-std-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + [[package]] name = "nohash-hasher" version = "0.2.0" @@ -6152,6 +7103,16 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num-bigint" version = "0.4.4" @@ -6220,7 +7181,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", ] @@ -6301,7 +7262,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -6322,11 +7283,17 @@ dependencies = [ "vcpkg", ] +[[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.0.5" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "227585216d05ba65c7ab0a0450a3cf2cbd81a98862a54c4df8e14d5ac6adb015" +checksum = "2356622ffdfe72362a45a1e5e87bb113b8327e596e39b91f11f0ef4395c8da79" dependencies = [ "async-trait", "dyn-clonable", @@ -6334,19 +7301,20 @@ 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.0.5" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2871aadd82a2c216ee68a69837a526dfe788ecbe74c4c5038a6acdbff6653066" +checksum = "eedb646674596266dc9bb2b5c7eea7c36b32ecc7777eba0d510196972d72c4fd" dependencies = [ - "expander 0.0.6", - "itertools 0.10.5", + "expander 2.0.0", + "indexmap 2.1.0", + "itertools 0.11.0", "petgraph", "proc-macro-crate 1.3.1", "proc-macro2", @@ -6365,109 +7333,79 @@ dependencies = [ [[package]] name = "orml-tokens" -version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" +version = "0.7.0" +source = "git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v1.6.0#d691abb4d3859478413799057b8c719ad3b03b72" dependencies = [ "frame-support", "frame-system", - "orml-traits 0.4.1-dev (git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43)", - "parity-scale-codec", - "scale-info", - "serde", - "sp-arithmetic", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "orml-traits" -version = "0.4.1-dev" -source = "git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.43#909ab846ea6be8e5f5a164e21407d8bd057414f1" -dependencies = [ - "frame-support", - "impl-trait-for-tuples", - "num-traits", - "orml-utilities 0.4.1-dev (git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.43)", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "xcm", -] - -[[package]] -name = "orml-traits" -version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" -dependencies = [ - "frame-support", - "impl-trait-for-tuples", - "num-traits", - "orml-utilities 0.4.1-dev (git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43)", + "log", + "orml-traits", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", + "sp-arithmetic", "sp-runtime", - "sp-std", - "xcm", + "sp-std 8.0.0", ] [[package]] -name = "orml-utilities" -version = "0.4.1-dev" -source = "git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.43#909ab846ea6be8e5f5a164e21407d8bd057414f1" +name = "orml-traits" +version = "0.7.0" +source = "git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v1.6.0#d691abb4d3859478413799057b8c719ad3b03b72" dependencies = [ "frame-support", + "impl-trait-for-tuples", + "num-traits", + "orml-utilities", "parity-scale-codec", + "paste", "scale-info", "serde", + "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", + "staging-xcm", ] [[package]] name = "orml-utilities" -version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" +version = "0.7.0" +source = "git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v1.6.0#d691abb4d3859478413799057b8c719ad3b03b72" dependencies = [ "frame-support", "parity-scale-codec", "scale-info", "serde", + "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "orml-xcm-support" -version = "0.4.1-dev" -source = "git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.43#909ab846ea6be8e5f5a164e21407d8bd057414f1" +version = "0.7.0" +source = "git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v1.6.0#d691abb4d3859478413799057b8c719ad3b03b72" dependencies = [ "frame-support", - "orml-traits 0.4.1-dev (git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.43)", + "orml-traits", "parity-scale-codec", "sp-runtime", - "sp-std", - "xcm", - "xcm-executor", + "sp-std 8.0.0", + "staging-xcm", + "staging-xcm-executor", ] [[package]] name = "orml-xtokens" -version = "0.4.1-dev" -source = "git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.43#909ab846ea6be8e5f5a164e21407d8bd057414f1" +version = "0.7.0" +source = "git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v1.6.0#d691abb4d3859478413799057b8c719ad3b03b72" dependencies = [ - "cumulus-primitives-core", "frame-support", "frame-system", - "orml-traits 0.4.1-dev (git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.43)", + "log", + "orml-traits", "orml-xcm-support", "pallet-xcm", "parity-scale-codec", @@ -6475,11 +7413,17 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std", - "xcm", - "xcm-executor", + "sp-std 8.0.0", + "staging-xcm", + "staging-xcm-executor", ] +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "pallet-asset-manager" version = "4.6.2" @@ -6489,7 +7433,7 @@ dependencies = [ "frame-system", "log", "manta-primitives", - "orml-traits 0.4.1-dev (git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.43)", + "orml-traits", "pallet-assets", "pallet-balances", "parity-scale-codec", @@ -6498,45 +7442,80 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "xcm", + "sp-std 8.0.0", + "staging-xcm", +] + +[[package]] +name = "pallet-asset-rate" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std 8.0.0", +] + +[[package]] +name = "pallet-asset-tx-payment" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-transaction-payment", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0", ] [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-support", "frame-system", + "log", "pallet-timestamp", "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-consensus-aura", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-aura-style-filter" version = "0.9.0" -source = "git+https://github.com/manta-network/nimbus.git?branch=v4.6.1#054f60f7c7915f7bb9b86ce3e066b039dd677f9a" +source = "git+https://github.com/Manta-Network/moonkit.git?branch=manta-polkadot-1.6.0#f426837a93b3d72b96c7fd07ab09a9163fe85ee6" dependencies = [ "frame-support", "frame-system", @@ -6546,13 +7525,13 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-author-inherent" version = "0.9.0" -source = "git+https://github.com/manta-network/nimbus.git?branch=v4.6.1#054f60f7c7915f7bb9b86ce3e066b039dd677f9a" +source = "git+https://github.com/Manta-Network/moonkit.git?branch=manta-polkadot-1.6.0#f426837a93b3d72b96c7fd07ab09a9163fe85ee6" dependencies = [ "frame-benchmarking", "frame-support", @@ -6565,13 +7544,13 @@ dependencies = [ "sp-application-crypto", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-support", "frame-system", @@ -6581,13 +7560,13 @@ dependencies = [ "sp-application-crypto", "sp-authority-discovery", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-support", "frame-system", @@ -6595,13 +7574,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6619,14 +7598,16 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "aquamarine", + "docify", "frame-benchmarking", "frame-election-provider-support", "frame-support", @@ -6638,14 +7619,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6654,16 +7635,17 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-support", "frame-system", + "log", "pallet-authorship", "pallet-session", "parity-scale-codec", @@ -6673,15 +7655,15 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes 6.2.2", "binary-merkle-tree", "frame-support", "frame-system", @@ -6697,13 +7679,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-state-machine", + "sp-std 8.0.0", ] [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6715,13 +7698,30 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", +] + +[[package]] +name = "pallet-broker" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "bitvec", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-runtime", + "sp-std 8.0.0", ] [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6734,13 +7734,32 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", +] + +[[package]] +name = "pallet-collator-selection" +version = "3.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-authorship", + "pallet-session", + "parity-scale-codec", + "rand", + "scale-info", + "sp-runtime", + "sp-staking", + "sp-std 8.0.0", ] [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6751,13 +7770,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6768,13 +7787,13 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6786,13 +7805,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6801,21 +7820,21 @@ dependencies = [ "log", "pallet-election-provider-support-benchmarking", "parity-scale-codec", - "rand 0.8.5", + "rand", "scale-info", "sp-arithmetic", "sp-core", "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std", - "strum", + "sp-std 8.0.0", + "strum 0.24.1", ] [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6823,12 +7842,13 @@ dependencies = [ "parity-scale-codec", "sp-npos-elections", "sp-runtime", + "sp-std 8.0.0", ] [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6840,7 +7860,8 @@ dependencies = [ "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-staking", + "sp-std 8.0.0", ] [[package]] @@ -6850,10 +7871,10 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "hex-literal 0.3.4", + "hex-literal", "log", "manta-primitives", - "orml-traits 0.4.1-dev (git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.43)", + "orml-traits", "pallet-asset-manager", "pallet-assets", "pallet-balances", @@ -6863,8 +7884,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "xcm", + "sp-std 8.0.0", + "staging-xcm", ] [[package]] @@ -6890,14 +7911,15 @@ dependencies = [ "manta-primitives", "parity-scale-codec", "sp-api", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "docify", "frame-benchmarking", "frame-election-provider-support", "frame-support", @@ -6908,13 +7930,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6931,29 +7953,30 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "enumflags2", "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6967,13 +7990,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6984,7 +8007,7 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -7000,7 +8023,7 @@ dependencies = [ "log", "manta-collator-selection", "manta-primitives", - "orml-traits 0.4.1-dev (git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.43)", + "orml-traits", "pallet-asset-manager", "pallet-assets", "pallet-balances", @@ -7011,7 +8034,7 @@ dependencies = [ "pallet-scheduler", "pallet-transaction-payment", "parity-scale-codec", - "rand 0.8.5", + "rand", "runtime-common", "scale-info", "serde", @@ -7024,8 +8047,8 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", - "xcm", + "sp-std 8.0.0", + "staging-xcm", ] [[package]] @@ -7033,7 +8056,7 @@ name = "pallet-manta-pay" version = "4.6.2" dependencies = [ "anyhow", - "base64 0.20.0", + "base64 0.21.5", "frame-benchmarking", "frame-support", "frame-system", @@ -7058,9 +8081,9 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", + "staging-xcm", "tempfile", - "xcm", ] [[package]] @@ -7068,7 +8091,7 @@ name = "pallet-manta-sbt" version = "4.6.2" dependencies = [ "anyhow", - "base64 0.20.0", + "base64 0.21.5", "frame-benchmarking", "frame-support", "frame-system", @@ -7098,9 +8121,9 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", + "staging-xcm", "tempfile", - "xcm", ] [[package]] @@ -7108,7 +8131,7 @@ name = "pallet-manta-support" version = "4.6.2" dependencies = [ "anyhow", - "base64 0.20.0", + "base64 0.21.5", "frame-support", "frame-system", "indoc", @@ -7123,14 +8146,14 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "tempfile", ] [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7141,14 +8164,15 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-message-queue" version = "7.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "environmental", "frame-benchmarking", "frame-support", "frame-system", @@ -7159,31 +8183,32 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-weights", ] [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7193,7 +8218,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -7212,13 +8237,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7228,30 +8253,32 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-support", "frame-system", "log", + "pallet-balances", "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7263,26 +8290,26 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", "sp-api", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-support", "frame-system", @@ -7293,13 +8320,13 @@ dependencies = [ "serde", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7317,7 +8344,7 @@ dependencies = [ "scale-info", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -7341,14 +8368,14 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", "substrate-fixed", ] [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7359,13 +8386,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7374,7 +8401,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -7397,13 +8424,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7415,13 +8442,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7430,13 +8457,13 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "assert_matches", "frame-benchmarking", @@ -7449,14 +8476,30 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", +] + +[[package]] +name = "pallet-root-testing" +version = "1.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0", ] [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -7465,14 +8508,14 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-weights", ] [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-support", "frame-system", @@ -7486,44 +8529,50 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-state-machine", + "sp-std 8.0.0", "sp-trie", ] [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-session", "pallet-staking", - "rand 0.8.5", + "parity-scale-codec", + "rand", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", + "sp-arithmetic", + "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7540,24 +8589,24 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "log", "sp-arithmetic", @@ -7566,16 +8615,17 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "parity-scale-codec", "sp-api", + "sp-staking", ] [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7586,14 +8636,15 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -7601,14 +8652,15 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -7618,14 +8670,15 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-timestamp", ] [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7638,13 +8691,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-support", "frame-system", @@ -7654,13 +8707,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -7676,7 +8729,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -7688,8 +8741,9 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -7698,8 +8752,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", + "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -7710,19 +8765,23 @@ dependencies = [ "frame-support", "frame-system", "manta-primitives", + "pallet-asset-manager", + "pallet-assets", "pallet-balances", + "pallet-manta-support", "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", + "staging-xcm", ] [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7732,13 +8791,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7747,13 +8806,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7762,34 +8821,36 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-xcm" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "bounded-collections", "frame-benchmarking", "frame-support", "frame-system", "log", + "pallet-balances", "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std", - "xcm", - "xcm-executor", + "sp-std 8.0.0", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] name = "pallet-xcm-benchmarks" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7799,22 +8860,47 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", - "xcm", - "xcm-builder", - "xcm-executor", + "sp-std 8.0.0", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] -name = "parachain-info" -version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +name = "parachains-common" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "cumulus-primitives-core", + "cumulus-primitives-utility", "frame-support", "frame-system", + "log", + "num-traits", + "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", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", + "westend-runtime-constants", ] [[package]] @@ -7832,7 +8918,7 @@ dependencies = [ "lz4", "memmap2", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "siphasher", "snap", ] @@ -7960,6 +9046,15 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "peeking_take_while" version = "0.1.2" @@ -8012,7 +9107,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -8053,7 +9148,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -8074,6 +9169,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +dependencies = [ + "atomic-waker", + "fastrand 2.0.1", + "futures-io", +] + [[package]] name = "pkcs8" version = "0.10.2" @@ -8090,12 +9196,6 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" -[[package]] -name = "platforms" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" - [[package]] name = "platforms" version = "3.2.0" @@ -8104,43 +9204,48 @@ checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] name = "polkadot-approval-distribution" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "bitvec", "futures 0.3.29", + "futures-timer", + "itertools 0.10.5", "polkadot-node-jaeger", "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", + "polkadot-node-subsystem-util", "polkadot-primitives", - "rand 0.8.5", + "rand", "tracing-gum", ] [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "always-assert", "futures 0.3.29", + "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "rand 0.8.5", + "rand", "tracing-gum", ] [[package]] name = "polkadot-availability-distribution" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "derive_more", "fatality", "futures 0.3.29", - "lru 0.9.0", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -8148,7 +9253,8 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "rand 0.8.5", + "rand", + "schnellru", "sp-core", "sp-keystore", "thiserror", @@ -8157,12 +9263,12 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "async-trait", "fatality", "futures 0.3.29", - "lru 0.9.0", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -8170,24 +9276,26 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "rand 0.8.5", + "rand", "sc-network", + "schnellru", "thiserror", + "tokio", "tracing-gum", ] [[package]] name = "polkadot-cli" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "cfg-if", "clap", "frame-benchmarking-cli", "futures 0.3.29", "log", - "polkadot-client", - "polkadot-node-core-pvf-worker", "polkadot-node-metrics", + "polkadot-node-primitives", "polkadot-service", "sc-cli", "sc-executor", @@ -8204,54 +9312,11 @@ dependencies = [ "try-runtime-cli", ] -[[package]] -name = "polkadot-client" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" -dependencies = [ - "async-trait", - "frame-benchmarking", - "frame-benchmarking-cli", - "frame-system", - "frame-system-rpc-runtime-api", - "futures 0.3.29", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "polkadot-core-primitives", - "polkadot-node-core-parachains-inherent", - "polkadot-primitives", - "polkadot-runtime", - "polkadot-runtime-common", - "sc-client-api", - "sc-consensus", - "sc-executor", - "sc-service", - "sp-api", - "sp-authority-discovery", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-consensus-grandpa", - "sp-core", - "sp-inherents", - "sp-keyring", - "sp-mmr-primitives", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-storage", - "sp-timestamp", - "sp-transaction-pool", -] - [[package]] name = "polkadot-collator-protocol" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "always-assert", "bitvec", "fatality", "futures 0.3.29", @@ -8265,32 +9330,32 @@ dependencies = [ "sp-keystore", "sp-runtime", "thiserror", + "tokio-util", "tracing-gum", ] [[package]] name = "polkadot-core-primitives" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "parity-scale-codec", "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "polkadot-dispute-distribution" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "derive_more", "fatality", "futures 0.3.29", "futures-timer", "indexmap 1.9.3", - "lru 0.9.0", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -8299,6 +9364,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "sc-network", + "schnellru", "sp-application-crypto", "sp-keystore", "thiserror", @@ -8307,8 +9373,8 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -8321,8 +9387,8 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "futures 0.3.29", "futures-timer", @@ -8330,9 +9396,10 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "sc-network", + "sc-network-common", "sp-application-crypto", "sp-core", "sp-keystore", @@ -8341,8 +9408,8 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "always-assert", "async-trait", @@ -8364,8 +9431,8 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "futures 0.3.29", "parity-scale-codec", @@ -8382,16 +9449,16 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "bitvec", "derive_more", "futures 0.3.29", "futures-timer", + "itertools 0.10.5", "kvdb", - "lru 0.9.0", - "merlin", + "merlin 3.0.0", "parity-scale-codec", "polkadot-node-jaeger", "polkadot-node-primitives", @@ -8399,8 +9466,12 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", + "rand", + "rand_chacha 0.3.1", + "rand_core 0.6.4", "sc-keystore", - "schnorrkel", + "schnellru", + "schnorrkel 0.11.4", "sp-application-crypto", "sp-consensus", "sp-consensus-slots", @@ -8411,8 +9482,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "bitvec", "futures 0.3.29", @@ -8420,6 +9491,7 @@ dependencies = [ "kvdb", "parity-scale-codec", "polkadot-erasure-coding", + "polkadot-node-jaeger", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -8432,8 +9504,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "bitvec", "fatality", @@ -8451,8 +9523,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "futures 0.3.29", "polkadot-node-subsystem", @@ -8466,8 +9538,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "futures 0.3.29", @@ -8478,7 +9550,8 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-parachain", + "polkadot-overseer", + "polkadot-parachain-primitives", "polkadot-primitives", "sp-maybe-compressed-blob", "tracing-gum", @@ -8486,23 +9559,22 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "futures 0.3.29", "polkadot-node-metrics", "polkadot-node-subsystem", - "polkadot-primitives", + "polkadot-node-subsystem-types", "sc-client-api", "sc-consensus-babe", - "sp-blockchain", "tracing-gum", ] [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "futures 0.3.29", "futures-timer", @@ -8518,44 +9590,61 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "fatality", "futures 0.3.29", "kvdb", - "lru 0.9.0", "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sc-keystore", + "sc-keystore", + "schnellru", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-parachains-inherent" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "async-trait", + "futures 0.3.29", + "futures-timer", + "polkadot-node-subsystem", + "polkadot-overseer", + "polkadot-primitives", + "sp-blockchain", + "sp-inherents", "thiserror", "tracing-gum", ] [[package]] -name = "polkadot-node-core-parachains-inherent" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +name = "polkadot-node-core-prospective-parachains" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "async-trait", + "bitvec", + "fatality", "futures 0.3.29", - "futures-timer", + "parity-scale-codec", + "polkadot-node-primitives", "polkadot-node-subsystem", - "polkadot-overseer", + "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-blockchain", - "sp-inherents", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-provisioner" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "bitvec", "fatality", @@ -8565,42 +9654,47 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "rand 0.8.5", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "always-assert", + "array-bytes 6.2.2", + "blake3", + "cfg-if", "futures 0.3.29", "futures-timer", + "is_executable", "libc", "parity-scale-codec", "pin-project", "polkadot-core-primitives", + "polkadot-node-core-pvf-common", "polkadot-node-metrics", "polkadot-node-primitives", - "polkadot-parachain", + "polkadot-node-subsystem", + "polkadot-parachain-primitives", "polkadot-primitives", - "rand 0.8.5", + "rand", "slotmap", "sp-core", "sp-maybe-compressed-blob", - "sp-tracing", - "sp-wasm-interface", - "substrate-build-script-utils", + "sp-wasm-interface 14.0.0", + "tempfile", + "thiserror", "tokio", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf-checker" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "futures 0.3.29", "polkadot-node-primitives", @@ -8614,53 +9708,49 @@ dependencies = [ ] [[package]] -name = "polkadot-node-core-pvf-worker" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +name = "polkadot-node-core-pvf-common" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "assert_matches", + "cfg-if", "cpu-time", "futures 0.3.29", + "landlock", "libc", "parity-scale-codec", - "polkadot-node-core-pvf", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", - "rayon", "sc-executor", "sc-executor-common", "sc-executor-wasmtime", + "seccompiler", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-io", - "sp-maybe-compressed-blob", - "sp-tracing", - "substrate-build-script-utils", - "tempfile", - "tikv-jemalloc-ctl", - "tokio", + "sp-tracing 10.0.0", + "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-runtime-api" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "futures 0.3.29", - "lru 0.9.0", "polkadot-node-metrics", "polkadot-node-subsystem", "polkadot-node-subsystem-types", "polkadot-primitives", + "schnellru", "sp-consensus-babe", "tracing-gum", ] [[package]] name = "polkadot-node-jaeger" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "lazy_static", "log", @@ -8677,16 +9767,16 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "bs58", + "bs58 0.5.0", "futures 0.3.29", "futures-timer", "log", "parity-scale-codec", "polkadot-primitives", - "prioritized-metered-channel", + "prioritized-metered-channel 0.5.1", "sc-cli", "sc-service", "sc-tracing", @@ -8696,11 +9786,12 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "async-channel", + "async-channel 1.9.0", "async-trait", + "bitvec", "derive_more", "fatality", "futures 0.3.29", @@ -8709,25 +9800,26 @@ dependencies = [ "polkadot-node-jaeger", "polkadot-node-primitives", "polkadot-primitives", - "rand 0.8.5", + "rand", "sc-authority-discovery", "sc-network", - "strum", + "strum 0.24.1", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-primitives" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "bitvec", "bounded-vec", "futures 0.3.29", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", - "schnorrkel", + "schnorrkel 0.11.4", "serde", "sp-application-crypto", "sp-consensus-babe", @@ -8736,13 +9828,13 @@ dependencies = [ "sp-maybe-compressed-blob", "sp-runtime", "thiserror", - "zstd 0.11.2+zstd.1.5.2", + "zstd 0.12.4", ] [[package]] name = "polkadot-node-subsystem" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -8751,10 +9843,11 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", + "bitvec", "derive_more", "futures 0.3.29", "orchestra", @@ -8763,19 +9856,23 @@ dependencies = [ "polkadot-node-primitives", "polkadot-primitives", "polkadot-statement-table", + "sc-client-api", "sc-network", + "sc-transaction-pool-api", "smallvec", "sp-api", "sp-authority-discovery", + "sp-blockchain", "sp-consensus-babe", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "derive_more", @@ -8784,20 +9881,22 @@ dependencies = [ "futures-channel", "itertools 0.10.5", "kvdb", - "lru 0.9.0", "parity-db", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.1", "pin-project", "polkadot-node-jaeger", "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", + "polkadot-node-subsystem-types", "polkadot-overseer", "polkadot-primitives", - "prioritized-metered-channel", - "rand 0.8.5", + "prioritized-metered-channel 0.5.1", + "rand", + "sc-client-api", + "schnellru", "sp-application-crypto", "sp-core", "sp-keystore", @@ -8807,13 +9906,12 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "futures 0.3.29", "futures-timer", - "lru 0.9.0", "orchestra", "parking_lot 0.12.1", "polkadot-node-metrics", @@ -8829,32 +9927,32 @@ dependencies = [ ] [[package]] -name = "polkadot-parachain" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +name = "polkadot-parachain-primitives" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "bounded-collections", "derive_more", - "frame-support", "parity-scale-codec", "polkadot-core-primitives", "scale-info", "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", + "sp-weights", ] [[package]] name = "polkadot-primitives" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "bitvec", - "hex-literal 0.4.1", + "hex-literal", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "scale-info", "serde", "sp-api", @@ -8868,13 +9966,13 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "polkadot-rpc" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -8890,6 +9988,7 @@ dependencies = [ "sc-consensus-grandpa", "sc-consensus-grandpa-rpc", "sc-rpc", + "sc-rpc-spec-v2", "sc-sync-state-rpc", "sc-transaction-pool-api", "sp-api", @@ -8903,105 +10002,10 @@ dependencies = [ "substrate-state-trie-migration-rpc", ] -[[package]] -name = "polkadot-runtime" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" -dependencies = [ - "bitvec", - "frame-benchmarking", - "frame-election-provider-support", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "hex-literal 0.4.1", - "log", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-bags-list", - "pallet-balances", - "pallet-bounties", - "pallet-child-bounties", - "pallet-collective", - "pallet-conviction-voting", - "pallet-democracy", - "pallet-election-provider-multi-phase", - "pallet-election-provider-support-benchmarking", - "pallet-elections-phragmen", - "pallet-fast-unstake", - "pallet-grandpa", - "pallet-identity", - "pallet-im-online", - "pallet-indices", - "pallet-membership", - "pallet-message-queue", - "pallet-multisig", - "pallet-nomination-pools", - "pallet-nomination-pools-benchmarking", - "pallet-nomination-pools-runtime-api", - "pallet-offences", - "pallet-offences-benchmarking", - "pallet-preimage", - "pallet-proxy", - "pallet-referenda", - "pallet-scheduler", - "pallet-session", - "pallet-session-benchmarking", - "pallet-staking", - "pallet-staking-reward-curve", - "pallet-staking-runtime-api", - "pallet-timestamp", - "pallet-tips", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-vesting", - "pallet-whitelist", - "pallet-xcm", - "parity-scale-codec", - "polkadot-primitives", - "polkadot-runtime-common", - "polkadot-runtime-constants", - "polkadot-runtime-parachains", - "rustc-hex", - "scale-info", - "serde", - "serde_derive", - "smallvec", - "sp-api", - "sp-arithmetic", - "sp-authority-discovery", - "sp-block-builder", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-core", - "sp-inherents", - "sp-io", - "sp-mmr-primitives", - "sp-npos-elections", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "sp-transaction-pool", - "sp-version", - "static_assertions", - "substrate-wasm-builder", - "xcm", - "xcm-builder", - "xcm-executor", -] - [[package]] name = "polkadot-runtime-common" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "bitvec", "frame-benchmarking", @@ -9011,11 +10015,14 @@ dependencies = [ "impl-trait-for-tuples", "libsecp256k1", "log", + "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", @@ -9023,6 +10030,7 @@ dependencies = [ "pallet-transaction-payment", "pallet-treasury", "pallet-vesting", + "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-primitives", "polkadot-runtime-parachains", @@ -9039,41 +10047,30 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", - "xcm", -] - -[[package]] -name = "polkadot-runtime-constants" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" -dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", ] [[package]] name = "polkadot-runtime-metrics" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "bs58", + "bs58 0.5.0", + "frame-benchmarking", "parity-scale-codec", "polkadot-primitives", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] name = "polkadot-runtime-parachains" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "bitflags 1.3.2", "bitvec", @@ -9081,27 +10078,31 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "impl-trait-for-tuples", "log", "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-parachain", + "polkadot-core-primitives", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-metrics", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "rustc-hex", "scale-info", "serde", "sp-api", "sp-application-crypto", + "sp-arithmetic", "sp-core", "sp-inherents", "sp-io", @@ -9109,40 +10110,44 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0", + "staging-xcm", + "staging-xcm-executor", "static_assertions", - "xcm", - "xcm-executor", ] [[package]] name = "polkadot-service" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", + "frame-benchmarking", "frame-benchmarking-cli", "frame-support", + "frame-system", "frame-system-rpc-runtime-api", "futures 0.3.29", - "hex-literal 0.4.1", - "kusama-runtime", + "hex-literal", + "is_executable", "kvdb", "kvdb-rocksdb", "log", - "lru 0.9.0", "mmr-gadget", "pallet-babe", "pallet-im-online", "pallet-staking", + "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "parity-db", + "parity-scale-codec", + "parking_lot 0.12.1", "polkadot-approval-distribution", "polkadot-availability-bitfield-distribution", "polkadot-availability-distribution", "polkadot-availability-recovery", - "polkadot-client", "polkadot-collator-protocol", + "polkadot-core-primitives", "polkadot-dispute-distribution", "polkadot-gossip-support", "polkadot-network-bridge", @@ -9156,7 +10161,9 @@ dependencies = [ "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", @@ -9165,11 +10172,9 @@ dependencies = [ "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-rpc", - "polkadot-runtime", - "polkadot-runtime-constants", "polkadot-runtime-parachains", "polkadot-statement-distribution", "rococo-runtime", @@ -9195,6 +10200,8 @@ dependencies = [ "sc-sysinfo", "sc-telemetry", "sc-transaction-pool", + "sc-transaction-pool-api", + "schnellru", "serde", "serde_json", "sp-api", @@ -9208,16 +10215,18 @@ dependencies = [ "sp-core", "sp-inherents", "sp-io", + "sp-keyring", "sp-keystore", "sp-mmr-primitives", "sp-offchain", "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage", + "sp-storage 13.0.0", "sp-timestamp", "sp-transaction-pool", - "sp-trie", + "sp-version", + "sp-weights", "substrate-prometheus-endpoint", "thiserror", "tracing-gum", @@ -9226,12 +10235,14 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "arrayvec 0.5.2", + "arrayvec 0.7.4", + "bitvec", "fatality", "futures 0.3.29", + "futures-timer", "indexmap 1.9.3", "parity-scale-codec", "polkadot-node-network-protocol", @@ -9247,14 +10258,67 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "parity-scale-codec", "polkadot-primitives", "sp-core", ] +[[package]] +name = "polkavm-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d9428a5cfcc85c5d7b9fc4b6a18c4b802d0173d768182a51cc7751640f08b92" + +[[package]] +name = "polkavm-derive" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae8c4bea6f3e11cd89bb18bcdddac10bd9a24015399bd1c485ad68a985a19606" +dependencies = [ + "polkavm-derive-impl-macro", +] + +[[package]] +name = "polkavm-derive-impl" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c4fdfc49717fb9a196e74a5d28e0bc764eb394a2c803eb11133a31ac996c60c" +dependencies = [ + "polkavm-common", + "proc-macro2", + "quote", + "syn 2.0.57", +] + +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429" +dependencies = [ + "polkavm-derive-impl", + "syn 2.0.57", +] + +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", + "concurrent-queue", + "libc", + "log", + "pin-project-lite 0.2.13", + "windows-sys 0.48.0", +] + [[package]] name = "polling" version = "3.3.1" @@ -9369,7 +10433,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -9387,9 +10451,25 @@ dependencies = [ [[package]] name = "prioritized-metered-channel" -version = "0.2.0" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e99f0c89bd88f393aab44a4ab949351f7bc7e7e1179d11ecbfe50cbe4c47e342" +dependencies = [ + "coarsetime", + "crossbeam-queue", + "derive_more", + "futures 0.3.29", + "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 = "382698e48a268c832d0b181ed438374a6bb708a82a8ca273bb0f61c74cf209c4" +checksum = "a172e6cc603231f2cf004232eabcecccc0da53ba576ab286ef7baa0cfc7927ad" dependencies = [ "coarsetime", "crossbeam-queue", @@ -9415,9 +10495,18 @@ dependencies = [ name = "proc-macro-crate" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.7", +] + +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_edit 0.20.7", + "toml_edit 0.21.0", ] [[package]] @@ -9446,20 +10535,20 @@ dependencies = [ [[package]] name = "proc-macro-warning" -version = "0.3.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e99670bafb56b9a106419397343bdbc8b8742c3cc449fec6345f86173f47cd4" +checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] name = "proc-macro2" -version = "1.0.70" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -9498,7 +10587,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -9610,7 +10699,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", @@ -9623,9 +10712,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -9636,19 +10725,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" @@ -9706,16 +10782,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]] @@ -9824,7 +10891,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -9949,7 +11016,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ "hmac 0.12.1", - "subtle", + "subtle 2.4.1", +] + +[[package]] +name = "ring" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof#b273d33f9981e2bb3375ab45faeb537f7ee35224" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-poly 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "blake2 0.10.6", + "common", + "fflonk", + "merlin 3.0.0", ] [[package]] @@ -10002,8 +11085,8 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "binary-merkle-tree", "frame-benchmarking", @@ -10013,8 +11096,9 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", - "hex-literal 0.4.1", + "hex-literal", "log", + "pallet-asset-rate", "pallet-authority-discovery", "pallet-authorship", "pallet-babe", @@ -10024,6 +11108,7 @@ dependencies = [ "pallet-bounties", "pallet-child-bounties", "pallet-collective", + "pallet-conviction-voting", "pallet-democracy", "pallet-elections-phragmen", "pallet-grandpa", @@ -10038,7 +11123,10 @@ dependencies = [ "pallet-offences", "pallet-preimage", "pallet-proxy", + "pallet-ranked-collective", "pallet-recovery", + "pallet-referenda", + "pallet-root-testing", "pallet-scheduler", "pallet-session", "pallet-society", @@ -10052,10 +11140,11 @@ dependencies = [ "pallet-treasury", "pallet-utility", "pallet-vesting", + "pallet-whitelist", "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", @@ -10065,11 +11154,13 @@ dependencies = [ "serde_derive", "smallvec", "sp-api", + "sp-arithmetic", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-mmr-primitives", @@ -10077,20 +11168,21 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "xcm", - "xcm-builder", - "xcm-executor", ] [[package]] name = "rococo-runtime-constants" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-support", "polkadot-primitives", @@ -10099,6 +11191,8 @@ dependencies = [ "sp-core", "sp-runtime", "sp-weights", + "staging-xcm", + "staging-xcm-builder", ] [[package]] @@ -10151,7 +11245,7 @@ dependencies = [ "frame-system", "lazy_static", "manta-primitives", - "orml-traits 0.4.1-dev (git+https://github.com/manta-network/open-runtime-module-library.git?branch=polkadot-v0.9.43)", + "orml-traits", "orml-xtokens", "pallet-asset-manager", "pallet-assets", @@ -10159,10 +11253,9 @@ dependencies = [ "pallet-transaction-payment", "pallet-utility", "pallet-xcm", - "parachain-info", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-parachains", "reqwest", "scale-info", @@ -10170,10 +11263,11 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "xcm", - "xcm-builder", - "xcm-executor", + "sp-std 8.0.0", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "xcm-simulator", ] @@ -10236,6 +11330,20 @@ dependencies = [ "windows-sys 0.45.0", ] +[[package]] +name = "rustix" +version = "0.37.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +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.26" @@ -10310,6 +11418,17 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +[[package]] +name = "ruzstd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3ffab8f9715a0d455df4bbb9d21e91135aab3cd3ca187af0cd0c3c3f868fdc" +dependencies = [ + "byteorder", + "thiserror-core", + "twox-hash", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -10395,18 +11514,18 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "log", "sp-core", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0", "thiserror", ] [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "futures 0.3.29", @@ -10414,14 +11533,14 @@ dependencies = [ "ip_network", "libp2p", "log", - "multihash 0.17.0", + "multihash 0.18.1", + "multihash-codetable", "parity-scale-codec", "prost", "prost-build", - "rand 0.8.5", + "rand", "sc-client-api", "sc-network", - "sc-network-common", "sp-api", "sp-authority-discovery", "sp-blockchain", @@ -10435,14 +11554,13 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "futures 0.3.29", "futures-timer", "log", "parity-scale-codec", "sc-block-builder", - "sc-client-api", "sc-proposer-metrics", "sc-telemetry", "sc-transaction-pool-api", @@ -10458,24 +11576,28 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "parity-scale-codec", - "sc-client-api", "sp-api", "sp-block-builder", "sp-blockchain", "sp-core", "sp-inherents", "sp-runtime", + "sp-trie", ] [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "array-bytes 6.2.2", + "docify", + "log", "memmap2", + "parity-scale-codec", "sc-chain-spec-derive", "sc-client-api", "sc-executor", @@ -10485,6 +11607,8 @@ dependencies = [ "serde_json", "sp-blockchain", "sp-core", + "sp-genesis-builder", + "sp-io", "sp-runtime", "sp-state-machine", ] @@ -10492,36 +11616,38 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes 6.2.2", + "bip39", "chrono", "clap", "fdlimit", "futures 0.3.29", + "itertools 0.10.5", "libp2p-identity", "log", "names", "parity-scale-codec", - "rand 0.8.5", + "rand", "regex", "rpassword", "sc-client-api", "sc-client-db", "sc-keystore", + "sc-mixnet", "sc-network", - "sc-network-common", "sc-service", "sc-telemetry", "sc-tracing", @@ -10536,14 +11662,13 @@ dependencies = [ "sp-runtime", "sp-version", "thiserror", - "tiny-bip39", "tokio", ] [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "fnv", "futures 0.3.29", @@ -10558,19 +11683,19 @@ dependencies = [ "sp-consensus", "sp-core", "sp-database", - "sp-externalities", - "sp-keystore", + "sp-externalities 0.19.0", "sp-runtime", "sp-state-machine", "sp-statement-store", - "sp-storage", + "sp-storage 13.0.0", + "sp-trie", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "hash-db", "kvdb", @@ -10596,7 +11721,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "futures 0.3.29", @@ -10621,7 +11746,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "futures 0.3.29", @@ -10650,7 +11775,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "fork-tree", @@ -10665,9 +11790,8 @@ dependencies = [ "sc-consensus", "sc-consensus-epochs", "sc-consensus-slots", - "sc-keystore", "sc-telemetry", - "scale-info", + "sc-transaction-pool-api", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -10686,7 +11810,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "futures 0.3.29", "jsonrpsee", @@ -10708,10 +11832,10 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "array-bytes 4.2.0", - "async-channel", + "array-bytes 6.2.2", + "async-channel 1.9.0", "async-trait", "fnv", "futures 0.3.29", @@ -10720,9 +11844,7 @@ dependencies = [ "parking_lot 0.12.1", "sc-client-api", "sc-consensus", - "sc-keystore", "sc-network", - "sc-network-common", "sc-network-gossip", "sc-network-sync", "sc-utils", @@ -10738,13 +11860,14 @@ dependencies = [ "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "tokio", "wasm-timer", ] [[package]] name = "sc-consensus-beefy-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "futures 0.3.29", "jsonrpsee", @@ -10763,7 +11886,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "fork-tree", "parity-scale-codec", @@ -10776,10 +11899,10 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "ahash 0.8.6", - "array-bytes 4.2.0", + "array-bytes 6.2.2", "async-trait", "dyn-clone", "finality-grandpa", @@ -10789,7 +11912,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", @@ -10797,7 +11920,9 @@ dependencies = [ "sc-network", "sc-network-common", "sc-network-gossip", + "sc-network-sync", "sc-telemetry", + "sc-transaction-pool-api", "sc-utils", "serde_json", "sp-api", @@ -10816,7 +11941,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "finality-grandpa", "futures 0.3.29", @@ -10836,7 +11961,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "assert_matches", "async-trait", @@ -10871,7 +11996,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "futures 0.3.29", @@ -10894,33 +12019,33 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "lru 0.8.1", "parity-scale-codec", "parking_lot 0.12.1", "sc-executor-common", "sc-executor-wasmtime", + "schnellru", "sp-api", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-io", "sp-panic-handler", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0", "sp-trie", "sp-version", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0", "tracing", ] [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0", "thiserror", "wasm-instrument", ] @@ -10928,25 +12053,25 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "anyhow", "cfg-if", "libc", "log", - "once_cell", + "parking_lot 0.12.1", "rustix 0.36.17", "sc-allocator", "sc-executor-common", - "sp-runtime-interface", - "sp-wasm-interface", + "sp-runtime-interface 17.0.0", + "sp-wasm-interface 14.0.0", "wasmtime", ] [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "ansi_term", "futures 0.3.29", @@ -10955,6 +12080,7 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-common", + "sc-network-sync", "sp-blockchain", "sp-runtime", ] @@ -10962,9 +12088,9 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes 6.2.2", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -10973,13 +12099,42 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-mixnet" +version = "0.1.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "array-bytes 4.2.0", + "arrayvec 0.7.4", + "blake2 0.10.6", + "bytes", + "futures 0.3.29", + "futures-timer", + "libp2p-identity", + "log", + "mixnet", + "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", + "thiserror", +] + [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "array-bytes 4.2.0", - "async-channel", + "array-bytes 6.2.2", + "async-channel 1.9.0", "async-trait", "asynchronous-codec", "bytes", @@ -10991,39 +12146,37 @@ dependencies = [ "libp2p", "linked_hash_set", "log", - "lru 0.8.1", "mockall", "parity-scale-codec", "parking_lot 0.12.1", + "partial_sort", "pin-project", - "rand 0.8.5", - "sc-block-builder", + "rand", "sc-client-api", - "sc-consensus", "sc-network-common", - "sc-peerset", "sc-utils", "serde", "serde_json", "smallvec", - "snow", "sp-arithmetic", "sp-blockchain", - "sp-consensus", "sp-core", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "tokio", + "tokio-stream", "unsigned-varint", + "wasm-timer", "zeroize", ] [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "async-channel", + "async-channel 1.9.0", "cid", "futures 0.3.29", "libp2p-identity", @@ -11032,7 +12185,6 @@ dependencies = [ "prost-build", "sc-client-api", "sc-network", - "sc-network-common", "sp-blockchain", "sp-runtime", "thiserror", @@ -11042,45 +12194,34 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "array-bytes 4.2.0", "async-trait", "bitflags 1.3.2", - "bytes", "futures 0.3.29", - "futures-timer", "libp2p-identity", "parity-scale-codec", "prost-build", "sc-consensus", - "sc-peerset", - "sc-utils", - "serde", - "smallvec", - "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", - "zeroize", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "ahash 0.8.6", "futures 0.3.29", "futures-timer", "libp2p", "log", - "lru 0.8.1", "sc-network", "sc-network-common", - "sc-peerset", + "sc-network-sync", + "schnellru", "sp-runtime", "substrate-prometheus-endpoint", "tracing", @@ -11089,10 +12230,10 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "array-bytes 4.2.0", - "async-channel", + "array-bytes 6.2.2", + "async-channel 1.9.0", "futures 0.3.29", "libp2p-identity", "log", @@ -11101,8 +12242,6 @@ dependencies = [ "prost-build", "sc-client-api", "sc-network", - "sc-network-common", - "sc-peerset", "sp-blockchain", "sp-core", "sp-runtime", @@ -11112,17 +12251,16 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "array-bytes 4.2.0", - "async-channel", + "array-bytes 6.2.2", + "async-channel 1.9.0", "async-trait", "fork-tree", "futures 0.3.29", "futures-timer", "libp2p", "log", - "lru 0.8.1", "mockall", "parity-scale-codec", "prost", @@ -11131,8 +12269,8 @@ dependencies = [ "sc-consensus", "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", + "schnellru", "smallvec", "sp-arithmetic", "sp-blockchain", @@ -11142,22 +12280,23 @@ dependencies = [ "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "tokio", + "tokio-stream", ] [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes 6.2.2", "futures 0.3.29", "libp2p", "log", "parity-scale-codec", - "pin-project", "sc-network", "sc-network-common", - "sc-peerset", + "sc-network-sync", "sc-utils", "sp-consensus", "sp-runtime", @@ -11167,54 +12306,41 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes 6.2.2", "bytes", "fnv", "futures 0.3.29", "futures-timer", "hyper", - "hyper-rustls 0.23.2", + "hyper-rustls", "libp2p", + "log", "num_cpus", "once_cell", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "sc-client-api", "sc-network", "sc-network-common", - "sc-peerset", + "sc-transaction-pool-api", "sc-utils", "sp-api", "sp-core", + "sp-externalities 0.19.0", + "sp-keystore", "sp-offchain", "sp-runtime", "threadpool", "tracing", ] -[[package]] -name = "sc-peerset" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" -dependencies = [ - "futures 0.3.29", - "libp2p-identity", - "log", - "parking_lot 0.12.1", - "partial_sort", - "sc-utils", - "serde_json", - "sp-arithmetic", - "wasm-timer", -] - [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -11223,7 +12349,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "futures 0.3.29", "jsonrpsee", @@ -11233,6 +12359,7 @@ dependencies = [ "sc-block-builder", "sc-chain-spec", "sc-client-api", + "sc-mixnet", "sc-rpc-api", "sc-tracing", "sc-transaction-pool-api", @@ -11254,11 +12381,12 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "jsonrpsee", "parity-scale-codec", "sc-chain-spec", + "sc-mixnet", "sc-transaction-pool-api", "scale-info", "serde", @@ -11273,7 +12401,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "http", "jsonrpsee", @@ -11288,9 +12416,9 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes 6.2.2", "futures 0.3.29", "futures-util", "hex", @@ -11301,20 +12429,23 @@ dependencies = [ "sc-chain-spec", "sc-client-api", "sc-transaction-pool-api", + "sc-utils", "serde", "sp-api", "sp-blockchain", "sp-core", + "sp-rpc", "sp-runtime", "sp-version", "thiserror", + "tokio", "tokio-stream", ] [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "directories", @@ -11326,8 +12457,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "pin-project", - "rand 0.8.5", - "sc-block-builder", + "rand", "sc-chain-spec", "sc-client-api", "sc-client-db", @@ -11341,11 +12471,9 @@ dependencies = [ "sc-network-light", "sc-network-sync", "sc-network-transactions", - "sc-offchain", "sc-rpc", "sc-rpc-server", "sc-rpc-spec-v2", - "sc-storage-monitor", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -11358,12 +12486,12 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-keystore", "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage", + "sp-storage 13.0.0", "sp-transaction-pool", "sp-transaction-storage-proof", "sp-trie", @@ -11380,7 +12508,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "log", "parity-scale-codec", @@ -11391,14 +12519,11 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "clap", "fs4", - "futures 0.3.29", "log", - "sc-client-db", - "sc-utils", "sp-core", "thiserror", "tokio", @@ -11407,7 +12532,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -11426,12 +12551,13 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "derive_more", "futures 0.3.29", "libc", "log", - "rand 0.8.5", + "rand", "rand_pcg", "regex", "sc-telemetry", @@ -11439,13 +12565,13 @@ dependencies = [ "serde_json", "sp-core", "sp-io", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "chrono", "futures 0.3.29", @@ -11453,7 +12579,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "pin-project", - "rand 0.8.5", + "rand", "sc-utils", "serde", "serde_json", @@ -11464,20 +12590,19 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "ansi_term", - "atty", "chrono", + "is-terminal", "lazy_static", "libc", "log", - "once_cell", + "parity-scale-codec", "parking_lot 0.12.1", "regex", "rustc-hash", "sc-client-api", - "sc-rpc-server", "sc-tracing-proc-macro", "serde", "sp-api", @@ -11485,35 +12610,34 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "thiserror", "tracing", - "tracing-log", - "tracing-subscriber", + "tracing-log 0.1.4", + "tracing-subscriber 0.2.25", ] [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "futures 0.3.29", "futures-timer", "linked-hash-map", "log", - "num-traits", "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", @@ -11524,7 +12648,7 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "sp-transaction-pool", "substrate-prometheus-endpoint", "thiserror", @@ -11533,13 +12657,15 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "futures 0.3.29", "log", + "parity-scale-codec", "serde", "sp-blockchain", + "sp-core", "sp-runtime", "thiserror", ] @@ -11547,9 +12673,9 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "async-channel", + "async-channel 1.9.0", "futures 0.3.29", "futures-timer", "lazy_static", @@ -11614,12 +12740,45 @@ dependencies = [ "arrayref", "arrayvec 0.5.2", "curve25519-dalek 2.1.3", - "getrandom 0.1.16", - "merlin", - "rand 0.7.3", + "merlin 2.0.1", "rand_core 0.5.1", "sha2 0.8.2", - "subtle", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "schnorrkel" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "844b7645371e6ecdf61ff246ba1958c29e802881a749ae3fb1993675d210d28d" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek-ng", + "merlin 3.0.0", + "rand_core 0.6.4", + "sha2 0.9.9", + "subtle-ng", + "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.1", + "getrandom_or_panic", + "merlin 3.0.0", + "rand_core 0.6.4", + "serde_bytes", + "sha2 0.10.8", + "subtle 2.4.1", "zeroize", ] @@ -11654,7 +12813,7 @@ dependencies = [ "base16ct 0.1.1", "der 0.6.1", "generic-array 0.14.7", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -11668,24 +12827,33 @@ dependencies = [ "der 0.7.8", "generic-array 0.14.7", "pkcs8", - "subtle", + "subtle 2.4.1", "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" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" +checksum = "3f622567e3b4b38154fb8190bcf6b160d7a4301d70595a49195b48c116007a27" dependencies = [ "secp256k1-sys", ] [[package]] name = "secp256k1-sys" -version = "0.6.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" +checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb" dependencies = [ "cc", ] @@ -11766,9 +12934,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.193" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -11784,20 +12952,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ "itoa", "ryu", @@ -11864,6 +13032,26 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "session-keys-primitives" +version = "0.1.0" +source = "git+https://github.com/Manta-Network/moonkit.git?branch=manta-polkadot-1.6.0#f426837a93b3d72b96c7fd07ab09a9163fe85ee6" +dependencies = [ + "async-trait", + "frame-support", + "nimbus-primitives", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-consensus-babe", + "sp-core", + "sp-inherents", + "sp-keystore", + "sp-runtime", + "sp-std 8.0.0", +] + [[package]] name = "sha-1" version = "0.9.8" @@ -11877,6 +13065,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" @@ -12013,6 +13212,11 @@ dependencies = [ "similar", ] +[[package]] +name = "simple-mermaid" +version = "0.1.0" +source = "git+https://github.com/kianenigma/simple-mermaid.git?rev=e48b187bcfd5cc75111acd9d241f1bd36604344b#e48b187bcfd5cc75111acd9d241f1bd36604344b" + [[package]] name = "siphasher" version = "0.3.11" @@ -12036,14 +13240,14 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "enumn", "parity-scale-codec", "paste", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -12061,6 +13265,113 @@ version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +[[package]] +name = "smol" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" +dependencies = [ + "async-channel 1.9.0", + "async-executor", + "async-fs", + "async-io 1.13.0", + "async-lock 2.8.0", + "async-net", + "async-process", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "smoldot" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0bb30cf57b7b5f6109ce17c3164445e2d6f270af2cb48f6e4d31c2967c9a9f5" +dependencies = [ + "arrayvec 0.7.4", + "async-lock 2.8.0", + "atomic-take", + "base64 0.21.5", + "bip39", + "blake2-rfc", + "bs58 0.5.0", + "chacha20", + "crossbeam-queue", + "derive_more", + "ed25519-zebra 4.0.3", + "either", + "event-listener 2.5.3", + "fnv", + "futures-lite 1.13.0", + "futures-util", + "hashbrown 0.14.3", + "hex", + "hmac 0.12.1", + "itertools 0.11.0", + "libsecp256k1", + "merlin 3.0.0", + "no-std-net", + "nom", + "num-bigint", + "num-rational", + "num-traits", + "pbkdf2 0.12.2", + "pin-project", + "poly1305", + "rand", + "rand_chacha 0.3.1", + "ruzstd", + "schnorrkel 0.10.2", + "serde", + "serde_json", + "sha2 0.10.8", + "sha3", + "siphasher", + "slab", + "smallvec", + "soketto", + "twox-hash", + "wasmi", + "x25519-dalek 2.0.0", + "zeroize", +] + +[[package]] +name = "smoldot-light" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "256b5bad1d6b49045e95fe87492ce73d5af81545d8b4d8318a872d2007024c33" +dependencies = [ + "async-channel 1.9.0", + "async-lock 2.8.0", + "base64 0.21.5", + "blake2-rfc", + "derive_more", + "either", + "event-listener 2.5.3", + "fnv", + "futures-channel", + "futures-lite 1.13.0", + "futures-util", + "hashbrown 0.14.3", + "hex", + "itertools 0.11.0", + "log", + "lru 0.11.1", + "no-std-net", + "parking_lot 0.12.1", + "pin-project", + "rand", + "rand_chacha 0.3.1", + "serde", + "serde_json", + "siphasher", + "slab", + "smol", + "smoldot", + "zeroize", +] + [[package]] name = "snap" version = "1.1.1" @@ -12081,7 +13392,7 @@ dependencies = [ "ring 0.17.7", "rustc_version 0.4.0", "sha2 0.10.8", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -12117,14 +13428,14 @@ dependencies = [ "http", "httparse", "log", - "rand 0.8.5", + "rand", "sha-1", ] [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "hash-db", "log", @@ -12132,10 +13443,11 @@ dependencies = [ "scale-info", "sp-api-proc-macro", "sp-core", + "sp-externalities 0.19.0", "sp-metadata-ir", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 8.0.0", "sp-trie", "sp-version", "thiserror", @@ -12144,79 +13456,96 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "Inflector", "blake2 0.10.6", - "expander 1.0.0", - "proc-macro-crate 1.3.1", + "expander 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] name = "sp-application-crypto" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-arithmetic" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 8.0.0", "static_assertions", ] +[[package]] +name = "sp-ark-bls12-381" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-bls12-381-ext", + "sp-crypto-ec-utils", +] + +[[package]] +name = "sp-ark-ed-on-bls12-381-bandersnatch" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-ed-on-bls12-381-bandersnatch-ext", + "sp-crypto-ec-utils", +] + [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "parity-scale-codec", "sp-api", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "futures 0.3.29", "log", - "lru 0.8.1", "parity-scale-codec", "parking_lot 0.12.1", + "schnellru", "sp-api", "sp-consensus", "sp-database", @@ -12228,7 +13557,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "futures 0.3.29", @@ -12243,25 +13572,24 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", - "sp-consensus", "sp-consensus-slots", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-timestamp", ] [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "parity-scale-codec", @@ -12269,20 +13597,18 @@ dependencies = [ "serde", "sp-api", "sp-application-crypto", - "sp-consensus", "sp-consensus-slots", "sp-core", "sp-inherents", - "sp-keystore", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-timestamp", ] [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "lazy_static", "parity-scale-codec", @@ -12294,14 +13620,14 @@ dependencies = [ "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std", - "strum", + "sp-std 8.0.0", + "strum 0.24.1", ] [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "finality-grandpa", "log", @@ -12313,94 +13639,114 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 8.0.0", "sp-timestamp", ] [[package]] name = "sp-core" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "21.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes 6.2.2", + "bandersnatch_vrfs", + "bip39", "bitflags 1.3.2", "blake2 0.10.6", "bounded-collections", - "bs58", + "bs58 0.5.0", "dyn-clonable", - "ed25519-zebra", + "ed25519-zebra 3.1.0", "futures 0.3.29", "hash-db", "hash256-std-hasher", "impl-serde", - "lazy_static", + "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", - "regex", + "rand", "scale-info", - "schnorrkel", + "schnorrkel 0.11.4", "secp256k1", "secrecy", "serde", "sp-core-hashing", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-debug-derive 8.0.0", + "sp-externalities 0.19.0", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", "ss58-registry", "substrate-bip39", "thiserror", - "tiny-bip39", + "tracing", + "w3f-bls", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "9.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "blake2b_simd", "byteorder", "digest 0.10.7", "sha2 0.10.8", "sha3", - "sp-std", "twox-hash", ] [[package]] name = "sp-core-hashing-proc-macro" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "9.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "proc-macro2", "quote", "sp-core-hashing", - "syn 2.0.39", + "syn 2.0.57", +] + +[[package]] +name = "sp-crypto-ec-utils" +version = "0.10.0" +source = "git+https://github.com/paritytech/polkadot-sdk#76719da221d33117aadf6b7b9cc74e4fbeb25b34" +dependencies = [ + "ark-bls12-377", + "ark-bls12-377-ext", + "ark-bls12-381 0.4.0", + "ark-bls12-381-ext", + "ark-bw6-761", + "ark-bw6-761-ext", + "ark-ec 0.4.2", + "ark-ed-on-bls12-377", + "ark-ed-on-bls12-377-ext", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ed-on-bls12-381-bandersnatch-ext", + "ark-scale", + "sp-runtime-interface 24.0.0", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -12408,61 +13754,89 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.57", +] + +[[package]] +name = "sp-debug-derive" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#76719da221d33117aadf6b7b9cc74e4fbeb25b34" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] name = "sp-externalities" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "environmental", "parity-scale-codec", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", +] + +[[package]] +name = "sp-externalities" +version = "0.25.0" +source = "git+https://github.com/paritytech/polkadot-sdk#76719da221d33117aadf6b7b9cc74e4fbeb25b34" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-storage 19.0.0", +] + +[[package]] +name = "sp-genesis-builder" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "serde_json", + "sp-api", + "sp-runtime", + "sp-std 8.0.0", ] [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "thiserror", ] [[package]] name = "sp-io" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "bytes", - "ed25519 1.5.3", - "ed25519-dalek 1.0.1", - "futures 0.3.29", + "ed25519-dalek 2.1.0", "libsecp256k1", "log", "parity-scale-codec", "rustversion", "secp256k1", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-keystore", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0", "sp-state-machine", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "sp-trie", "tracing", "tracing-core", @@ -12470,33 +13844,30 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "lazy_static", "sp-core", "sp-runtime", - "strum", + "strum 0.24.1", ] [[package]] name = "sp-keystore" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "0.27.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "futures 0.3.29", "parity-scale-codec", "parking_lot 0.12.1", - "serde", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "thiserror", ] [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "thiserror", "zstd 0.12.4", @@ -12505,18 +13876,30 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-metadata", "parity-scale-codec", "scale-info", - "sp-std", + "sp-std 8.0.0", +] + +[[package]] +name = "sp-mixnet" +version = "0.1.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-std 8.0.0", ] [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -12525,16 +13908,16 @@ dependencies = [ "serde", "sp-api", "sp-core", - "sp-debug-derive", + "sp-debug-derive 8.0.0", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "thiserror", ] [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "parity-scale-codec", "scale-info", @@ -12542,13 +13925,13 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "sp-api", "sp-core", @@ -12557,8 +13940,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "backtrace", "lazy_static", @@ -12568,7 +13951,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "rustc-hash", "serde", @@ -12577,170 +13960,240 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "docify", "either", "hash256-std-hasher", "impl-trait-for-tuples", "log", "parity-scale-codec", "paste", - "rand 0.8.5", + "rand", "scale-info", "serde", + "simple-mermaid", "sp-application-crypto", "sp-arithmetic", "sp-core", "sp-io", - "sp-std", + "sp-std 8.0.0", "sp-weights", ] [[package]] name = "sp-runtime-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "bytes", "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.19.0", + "sp-runtime-interface-proc-macro 11.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-tracing 10.0.0", + "sp-wasm-interface 14.0.0", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#76719da221d33117aadf6b7b9cc74e4fbeb25b34" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "polkavm-derive", + "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", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "Inflector", - "proc-macro-crate 1.3.1", + "expander 2.0.0", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.57", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#76719da221d33117aadf6b7b9cc74e4fbeb25b34" +dependencies = [ + "Inflector", + "expander 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-core", + "sp-keystore", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-state-machine" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "0.28.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "hash-db", "log", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "smallvec", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-panic-handler", - "sp-std", + "sp-std 8.0.0", "sp-trie", "thiserror", "tracing", + "trie-db", ] [[package]] name = "sp-statement-store" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "log", + "aes-gcm 0.10.3", + "curve25519-dalek 4.1.1", + "ed25519-dalek 2.1.0", + "hkdf", "parity-scale-codec", + "rand", "scale-info", + "sha2 0.10.8", "sp-api", "sp-application-crypto", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-runtime", - "sp-runtime-interface", - "sp-std", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", "thiserror", + "x25519-dalek 2.0.0", ] [[package]] name = "sp-std" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" + +[[package]] +name = "sp-std" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#76719da221d33117aadf6b7b9cc74e4fbeb25b34" + +[[package]] +name = "sp-storage" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 8.0.0", + "sp-std 8.0.0", +] [[package]] name = "sp-storage" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#76719da221d33117aadf6b7b9cc74e4fbeb25b34" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 14.0.0", ] [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", - "futures-timer", - "log", "parity-scale-codec", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "thiserror", ] [[package]] name = "sp-tracing" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "parity-scale-codec", + "sp-std 8.0.0", + "tracing", + "tracing-core", + "tracing-subscriber 0.2.25", +] + +[[package]] +name = "sp-tracing" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#76719da221d33117aadf6b7b9cc74e4fbeb25b34" dependencies = [ "parity-scale-codec", - "sp-std", "tracing", "tracing-core", - "tracing-subscriber", + "tracing-subscriber 0.3.18", ] [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "sp-api", "sp-runtime", @@ -12749,36 +14202,36 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", - "log", "parity-scale-codec", "scale-info", "sp-core", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-trie", ] [[package]] name = "sp-trie" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "ahash 0.8.6", "hash-db", - "hashbrown 0.13.2", "lazy_static", "memory-db", "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", + "rand", "scale-info", "schnellru", "sp-core", - "sp-std", + "sp-externalities 0.19.0", + "sp-std 8.0.0", "thiserror", "tracing", "trie-db", @@ -12787,8 +14240,8 @@ dependencies = [ [[package]] name = "sp-version" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12797,49 +14250,58 @@ dependencies = [ "serde", "sp-core-hashing-proc-macro", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-version-proc-macro", "thiserror", ] [[package]] name = "sp-version-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] name = "sp-wasm-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std", - "wasmi", + "sp-std 8.0.0", "wasmtime", ] +[[package]] +name = "sp-wasm-interface" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#76719da221d33117aadf6b7b9cc74e4fbeb25b34" +dependencies = [ + "impl-trait-for-tuples", + "log", + "parity-scale-codec", +] + [[package]] name = "sp-weights" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "bounded-collections", "parity-scale-codec", "scale-info", "serde", "smallvec", "sp-arithmetic", - "sp-core", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 8.0.0", + "sp-std 8.0.0", ] [[package]] @@ -12862,7 +14324,7 @@ checksum = "a0ef947f358b9c238923f764c72a4a9d42f2d637c46e059dbd319d6e7cfb4f82" dependencies = [ "lazy_static", "maplit", - "strum", + "strum 0.24.1", ] [[package]] @@ -12891,10 +14353,85 @@ dependencies = [ ] [[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "staging-parachain-info" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "cumulus-primitives-core", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std 8.0.0", +] + +[[package]] +name = "staging-xcm" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "array-bytes 6.2.2", + "bounded-collections", + "derivative", + "environmental", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-weights", + "xcm-procedural", +] + +[[package]] +name = "staging-xcm-builder" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "pallet-transaction-payment", + "parity-scale-codec", + "polkadot-parachain-primitives", + "scale-info", + "sp-arithmetic", + "sp-io", + "sp-runtime", + "sp-std 8.0.0", + "sp-weights", + "staging-xcm", + "staging-xcm-executor", +] + +[[package]] +name = "staging-xcm-executor" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" +dependencies = [ + "environmental", + "frame-benchmarking", + "frame-support", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0", + "sp-weights", + "staging-xcm", +] [[package]] name = "static_assertions" @@ -12940,7 +14477,20 @@ dependencies = [ "lazy_static", "nalgebra 0.29.0", "num-traits", - "rand 0.8.5", + "rand", +] + +[[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]] @@ -12955,9 +14505,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" @@ -12971,6 +14527,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.57", +] + [[package]] name = "substrate-bip39" version = "0.4.5" @@ -12979,7 +14548,7 @@ checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", - "schnorrkel", + "schnorrkel 0.9.1", "sha2 0.9.9", "zeroize", ] @@ -12987,10 +14556,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" -dependencies = [ - "platforms 2.0.0", -] +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" [[package]] name = "substrate-fixed" @@ -13006,7 +14572,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.29", @@ -13025,7 +14591,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "hyper", "log", @@ -13037,7 +14603,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "jsonrpsee", @@ -13050,14 +14616,12 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "jsonrpsee", - "log", "parity-scale-codec", "sc-client-api", "sc-rpc-api", - "scale-info", "serde", "sp-core", "sp-runtime", @@ -13069,26 +14633,39 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "ansi_term", "build-helper", "cargo_metadata", "filetime", + "parity-wasm", "sp-maybe-compressed-blob", - "strum", + "strum 0.24.1", "tempfile", - "toml 0.7.8", + "toml 0.8.8", "walkdir", "wasm-opt", ] +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" + [[package]] name = "subtle" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + [[package]] name = "syn" version = "1.0.109" @@ -13102,9 +14679,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "11a6ae1e52eb25aab8f3fb9fca13be982a373b8f1157ca14b897a825ba4a2d35" dependencies = [ "proc-macro2", "quote", @@ -13163,7 +14740,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if", - "fastrand", + "fastrand 2.0.1", "redox_syscall 0.4.1", "rustix 0.38.26", "windows-sys 0.48.0", @@ -13178,6 +14755,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.26", + "windows-sys 0.48.0", +] + [[package]] name = "termtree" version = "0.4.1" @@ -13193,6 +14780,26 @@ dependencies = [ "thiserror-impl", ] +[[package]] +name = "thiserror-core" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c001ee18b7e5e3f62cbf58c7fe220119e68d902bb7443179c0c8aef30090e999" +dependencies = [ + "thiserror-core-impl", +] + +[[package]] +name = "thiserror-core-impl" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.57", +] + [[package]] name = "thiserror-impl" version = "1.0.50" @@ -13201,7 +14808,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -13293,22 +14900,12 @@ dependencies = [ ] [[package]] -name = "tiny-bip39" -version = "1.0.0" +name = "tiny-keccak" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" 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", + "crunchy", ] [[package]] @@ -13353,7 +14950,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -13373,19 +14970,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" dependencies = [ "pin-project", - "rand 0.8.5", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.23.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" -dependencies = [ - "rustls 0.20.9", + "rand", "tokio", - "webpki", ] [[package]] @@ -13436,14 +15022,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.8" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.19.15", + "toml_edit 0.21.0", ] [[package]] @@ -13462,8 +15048,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap 2.1.0", - "serde", - "serde_spanned", "toml_datetime", "winnow", ] @@ -13479,6 +15063,19 @@ 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", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + [[package]] name = "tower" version = "0.4.13" @@ -13522,11 +15119,10 @@ 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.13", "tracing-attributes", @@ -13541,14 +15137,14 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -13566,10 +15162,10 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ - "polkadot-node-jaeger", + "coarsetime", "polkadot-primitives", "tracing", "tracing-gum-proc-macro", @@ -13577,14 +15173,14 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "expander 2.0.0", - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -13598,6 +15194,17 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + [[package]] name = "tracing-serde" version = "0.1.3" @@ -13617,7 +15224,7 @@ dependencies = [ "ansi_term", "chrono", "lazy_static", - "matchers", + "matchers 0.0.1", "parking_lot 0.11.2", "regex", "serde", @@ -13627,15 +15234,33 @@ dependencies = [ "thread_local", "tracing", "tracing-core", - "tracing-log", + "tracing-log 0.1.4", "tracing-serde", ] +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers 0.1.0", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log 0.2.0", +] + [[package]] name = "trie-db" -version = "0.27.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" +checksum = "ff28e0f815c2fea41ebddf148e008b077d2faddb026c9555b29696114d602642" dependencies = [ "hash-db", "hashbrown 0.13.2", @@ -13669,7 +15294,7 @@ dependencies = [ "idna 0.2.3", "ipnet", "lazy_static", - "rand 0.8.5", + "rand", "smallvec", "socket2 0.4.10", "thiserror", @@ -13708,7 +15333,7 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "async-trait", "clap", @@ -13719,15 +15344,14 @@ dependencies = [ "parity-scale-codec", "sc-cli", "sc-executor", - "sc-service", "serde", "serde_json", "sp-api", "sp-consensus-aura", "sp-consensus-babe", "sp-core", - "sp-debug-derive", - "sp-externalities", + "sp-debug-derive 8.0.0", + "sp-externalities 0.19.0", "sp-inherents", "sp-io", "sp-keystore", @@ -13756,7 +15380,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.7", - "rand 0.8.5", + "rand", "static_assertions", ] @@ -13839,7 +15463,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -13849,7 +15473,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -13923,6 +15547,36 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "w3f-bls" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7335e4c132c28cc43caef6adb339789e599e39adbe78da0c4d547fad48cbc331" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381 0.4.0", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-serialize-derive 0.4.2", + "arrayref", + "constcat", + "digest 0.10.7", + "rand", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "sha2 0.10.8", + "sha3", + "thiserror", + "zeroize", +] + +[[package]] +name = "waker-fn" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" + [[package]] name = "walkdir" version = "2.4.0" @@ -13975,7 +15629,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", "wasm-bindgen-shared", ] @@ -14009,7 +15663,7 @@ checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -14031,14 +15685,14 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.112.0" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87fef6d0d508f08334e0ab0e6877feb4c0ecb3956bcf2cb950699b22fedf3e9c" +checksum = "fc942673e7684671f0c5708fc18993569d184265fd5223bb51fc8e5b9b6cfd52" dependencies = [ "anyhow", "libc", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", "tempfile", "thiserror", "wasm-opt-cxx-sys", @@ -14047,9 +15701,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.112.0" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc816bbc1596c8f2e8127e137a760c798023ef3d378f2ae51f0f1840e2dfa445" +checksum = "8c57b28207aa724318fcec6575fe74803c23f6f266fce10cbc9f3f116762f12e" dependencies = [ "anyhow", "cxx", @@ -14059,9 +15713,9 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.112.0" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40199e4f68ef1071b3c6d0bd8026a12b481865d4b9e49c156932ea9a6234dd14" +checksum = "8a1cce564dc768dacbdb718fc29df2dba80bd21cb47d8f77ae7e3d95ceb98cbe" dependencies = [ "anyhow", "cc", @@ -14086,35 +15740,33 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.13.2" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" +checksum = "77a8281d1d660cdf54c76a3efa9ddd0c270cada1383a995db3ccb43d166456c7" dependencies = [ - "parity-wasm", - "wasmi-validation", + "smallvec", + "spin 0.9.8", + "wasmi_arena", "wasmi_core", + "wasmparser-nostd", ] [[package]] -name = "wasmi-validation" -version = "0.5.0" +name = "wasmi_arena" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" -dependencies = [ - "parity-wasm", -] +checksum = "104a7f73be44570cac297b3035d76b169d6599637631cf37a1703326a0727073" [[package]] name = "wasmi_core" -version = "0.2.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" +checksum = "dcf1a7db34bff95b85c261002720c00c3a6168256dcb93041d3fa2054d19856a" dependencies = [ "downcast-rs", "libm", - "memory_units", - "num-rational", "num-traits", + "paste", ] [[package]] @@ -14127,6 +15779,15 @@ dependencies = [ "url", ] +[[package]] +name = "wasmparser-nostd" +version = "0.100.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9157cab83003221bfd385833ab587a039f5d6fa7304854042ba358a3b09e0724" +dependencies = [ + "indexmap-nostd", +] + [[package]] name = "wasmtime" version = "8.0.1" @@ -14302,7 +15963,7 @@ dependencies = [ "memfd", "memoffset 0.8.0", "paste", - "rand 0.8.5", + "rand", "rustix 0.36.17", "wasmtime-asm-macros", "wasmtime-environ", @@ -14359,9 +16020,10 @@ checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] name = "westend-runtime" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ + "binary-merkle-tree", "bitvec", "frame-benchmarking", "frame-election-provider-support", @@ -14371,14 +16033,18 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", - "hex-literal 0.4.1", + "hex-literal", "log", + "pallet-asset-rate", "pallet-authority-discovery", "pallet-authorship", "pallet-babe", "pallet-bags-list", "pallet-balances", + "pallet-beefy", + "pallet-beefy-mmr", "pallet-collective", + "pallet-conviction-voting", "pallet-democracy", "pallet-election-provider-multi-phase", "pallet-election-provider-support-benchmarking", @@ -14390,6 +16056,7 @@ dependencies = [ "pallet-indices", "pallet-membership", "pallet-message-queue", + "pallet-mmr", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -14399,6 +16066,8 @@ dependencies = [ "pallet-preimage", "pallet-proxy", "pallet-recovery", + "pallet-referenda", + "pallet-root-testing", "pallet-scheduler", "pallet-session", "pallet-session-benchmarking", @@ -14414,10 +16083,11 @@ dependencies = [ "pallet-treasury", "pallet-utility", "pallet-vesting", + "pallet-whitelist", "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", @@ -14427,11 +16097,14 @@ dependencies = [ "serde_derive", "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-mmr-primitives", @@ -14440,20 +16113,21 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "substrate-wasm-builder", "westend-runtime-constants", - "xcm", - "xcm-builder", - "xcm-executor", ] [[package]] name = "westend-runtime-constants" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-support", "polkadot-primitives", @@ -14462,6 +16136,8 @@ dependencies = [ "sp-core", "sp-runtime", "sp-weights", + "staging-xcm", + "staging-xcm-builder", ] [[package]] @@ -14779,6 +16455,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "x25519-dalek" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" +dependencies = [ + "curve25519-dalek 4.1.1", + "rand_core 0.6.4", + "serde", + "zeroize", +] + [[package]] name = "x509-parser" version = "0.14.0" @@ -14797,91 +16485,33 @@ dependencies = [ "time", ] -[[package]] -name = "xcm" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" -dependencies = [ - "bounded-collections", - "derivative", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-weights", - "xcm-procedural", -] - -[[package]] -name = "xcm-builder" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" -dependencies = [ - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "log", - "pallet-transaction-payment", - "parity-scale-codec", - "polkadot-parachain", - "scale-info", - "sp-arithmetic", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", - "xcm", - "xcm-executor", -] - -[[package]] -name = "xcm-executor" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" -dependencies = [ - "environmental", - "frame-benchmarking", - "frame-support", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", - "xcm", -] - [[package]] name = "xcm-procedural" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] name = "xcm-simulator" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.6.0#61801ce324f18eacb9c29e2f674f0d262a00bd4d" dependencies = [ "frame-support", "parity-scale-codec", "paste", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-parachains", "sp-io", - "sp-std", - "xcm", - "xcm-builder", - "xcm-executor", + "sp-std 8.0.0", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] @@ -14894,7 +16524,7 @@ dependencies = [ "log", "nohash-hasher", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "static_assertions", ] @@ -14910,7 +16540,7 @@ dependencies = [ [[package]] name = "zenlink-protocol" version = "0.4.4" -source = "git+https://github.com/manta-network/Zenlink?branch=polkadot-v0.9.43#8d8b2e49b79719139cd369c6442e88a3fce8bedd" +source = "git+https://github.com/manta-network/Zenlink?branch=polkadot-v1.6.0#e2d4a8029e3f122c6a5b0fade69270c4300da331" dependencies = [ "cumulus-primitives-core", "frame-benchmarking", @@ -14918,7 +16548,7 @@ dependencies = [ "frame-system", "log", "orml-tokens", - "orml-traits 0.4.1-dev (git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43)", + "orml-traits", "pallet-balances", "parity-scale-codec", "scale-info", @@ -14926,15 +16556,15 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std", - "xcm", - "xcm-executor", + "sp-std 8.0.0", + "staging-xcm", + "staging-xcm-executor", ] [[package]] name = "zenlink-protocol-rpc" version = "0.4.4" -source = "git+https://github.com/manta-network/Zenlink?branch=polkadot-v0.9.43#8d8b2e49b79719139cd369c6442e88a3fce8bedd" +source = "git+https://github.com/manta-network/Zenlink?branch=polkadot-v1.6.0#e2d4a8029e3f122c6a5b0fade69270c4300da331" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -14949,11 +16579,11 @@ dependencies = [ [[package]] name = "zenlink-protocol-runtime-api" version = "0.4.4" -source = "git+https://github.com/manta-network/Zenlink?branch=polkadot-v0.9.43#8d8b2e49b79719139cd369c6442e88a3fce8bedd" +source = "git+https://github.com/manta-network/Zenlink?branch=polkadot-v1.6.0#e2d4a8029e3f122c6a5b0fade69270c4300da331" dependencies = [ "parity-scale-codec", "sp-api", - "sp-std", + "sp-std 8.0.0", "zenlink-protocol", ] @@ -14974,7 +16604,7 @@ checksum = "86cd5ca076997b97ef09d3ad65efe811fa68c9e874cb636ccb211223a813b0c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] @@ -14994,7 +16624,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.57", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index c9cd58b58..5400b0bac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ edition = '2021' homepage = 'https://manta.network' license = 'GPL-3.0' repository = 'https://github.com/Manta-Network/Manta/' -rust-version = '1.71' +rust-version = '1.74' version = '4.6.2' [workspace] @@ -18,9 +18,6 @@ resolver = "2" [profile.production] codegen-units = 1 -features = [ - "on-chain-release-build", -] inherits = "release" lto = true strip = "symbols" @@ -34,27 +31,28 @@ inherits = "release" [workspace.dependencies] anyhow = { version = "1.0.55", default-features = false } -async-trait = "0.1.66" -base64 = { version = "0.20", default-features = false, features = ["alloc"] } +async-trait = "0.1.71" +base64 = { version = "0.21.5", default-features = false, features = ["alloc"] } cfg-if = "1.0.0" chrono = "0.4" clap = { version = "4.1.8", features = ["derive"] } +clap-num = "=1.1.1" csv = "1.2.1" derive_more = "0.99" function_name = "0.3" -futures = "0.3.26" +futures = "0.3.28" hex = { version = "0.4.3", default-features = false } -hex-literal = "0.3" +hex-literal = "0.4.1" indoc = { version = "2.0.1", default-features = false } lazy_static = "1.4.0" libsecp256k1 = { version = "0.7", default-features = false, features = ["hmac", "static-context"] } -log = { version = "0.4.16", default-features = false } +log = { version = "0.4.20", default-features = false } num_cpus = { version = "1.16.0" } rand = { version = "0.8.5", default-features = false } rand_chacha = { version = "0.3.1", default-features = false } reqwest = { version = "0.11.6", features = ["blocking"] } safe_regex = { package = "safe-regex", version = "0.2.5", default-features = false } -serde = { version = "1.0.140", default-features = false, features = ["alloc", "derive"] } +serde = { version = "1.0.193", default-features = false, features = ["alloc", "derive"] } serde_json = "1.0" sha3 = { version = "0.10.6", default-features = false } similar-asserts = "1.1.0" @@ -63,145 +61,155 @@ tempfile = { version = "3.3.0", default-features = false } version-compare = "0.1.1" # Benchmarking and rey-runtime stuff -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.43" } -frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.43" } -try-runtime-cli = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +try-runtime-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } # RPC related dependencies -frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43" } -frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -jsonrpsee = { version = "0.16.2" } +frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +jsonrpsee = { version = "0.16.2", features = ["server", "macros"] } pallet-farming-rpc-api = { path = "./pallets/farming/rpc" } pallet-farming-rpc-runtime-api = { path = "./pallets/farming/rpc/runtime-api", default-features = false } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43" } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -zenlink-protocol-rpc = { git = 'https://github.com/manta-network/Zenlink', branch = "polkadot-v0.9.43" } -zenlink-protocol-runtime-api = { git = 'https://github.com/manta-network/Zenlink', branch = "polkadot-v0.9.43", default-features = false } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +zenlink-protocol-rpc = { git = 'https://github.com/manta-network/Zenlink', branch = "polkadot-v1.6.0" } +zenlink-protocol-runtime-api = { git = 'https://github.com/manta-network/Zenlink', branch = "polkadot-v1.6.0", default-features = false } # Substrate pallets -frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -pallet-aura = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -pallet-collective = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -pallet-conviction-voting = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -pallet-democracy = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -pallet-membership = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -pallet-message-queue = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -pallet-preimage = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -pallet-ranked-collective = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -pallet-referenda = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -pallet-sudo = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -pallet-treasury = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } +frame-metadata = { version = "16.0.0", default-features = false, features = ["current"] } +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-conviction-voting = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-democracy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-membership = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-ranked-collective = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-referenda = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } # Substrate client dependencies -sc-basic-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -sc-chain-spec = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -sc-cli = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -sc-client-db = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -sc-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -sc-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -sc-consensus-manual-seal = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -sc-consensus-slots = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -sc-executor = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -sc-network = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43" } -sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -sc-sysinfo = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43" } -sc-telemetry = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -sc-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43" } +sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-client-db = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-consensus-manual-seal = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-consensus-slots = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } # Substrate primitives codec = { package = "parity-scale-codec", version = '3.4.0', default-features = false, features = ["derive", "max-encoded-len"] } -frame-executive = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.43" } -scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -sp-application-crypto = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -sp-keystore = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -sp-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -sp-staking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -sp-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -sp-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -sp-version = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43", default-features = false } -substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43" } -substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.43" } +frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-application-crypto = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-staking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } # Cumulus dependencies -cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.43" } -cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.43" } -cumulus-client-consensus-common = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.43" } -cumulus-client-consensus-relay-chain = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.43" } -cumulus-client-network = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.43" } -cumulus-client-service = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.43" } -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.43" } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.43" } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.43", default-features = false } -cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.43", default-features = false } -cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.43" } -cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.43" } -cumulus-relay-chain-inprocess-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.43" } -cumulus-relay-chain-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.43" } -cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } -cumulus-relay-chain-rpc-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.43" } -cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } -parachain-info = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.43" } +cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +cumulus-client-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +cumulus-client-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false, features = [ + "parameterized-consensus-hook", +] } +cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" } +cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +parachain-info = { package = "staging-parachain-info", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } # Nimbus dependencies -nimbus-consensus = { git = "https://github.com/manta-network/nimbus.git", branch = "v4.6.1" } -nimbus-primitives = { git = "https://github.com/manta-network/nimbus.git", branch = "v4.6.1", default-features = false } -pallet-aura-style-filter = { git = "https://github.com/manta-network/nimbus.git", branch = "v4.6.1", default-features = false } -pallet-author-inherent = { git = "https://github.com/manta-network/nimbus.git", branch = "v4.6.1", default-features = false } +async-backing-primitives = { git = "https://github.com/Manta-Network/moonkit.git", branch = "manta-polkadot-1.6.0", default-features = false } +nimbus-consensus = { git = "https://github.com/Manta-Network/moonkit.git", branch = "manta-polkadot-1.6.0" } +nimbus-primitives = { git = "https://github.com/Manta-Network/moonkit.git", branch = "manta-polkadot-1.6.0", default-features = false } +pallet-aura-style-filter = { git = "https://github.com/Manta-Network/moonkit.git", branch = "manta-polkadot-1.6.0", default-features = false } +pallet-author-inherent = { git = "https://github.com/Manta-Network/moonkit.git", branch = "manta-polkadot-1.6.0", default-features = false } +session-keys-primitives = { git = "https://github.com/Manta-Network/moonkit.git", branch = "manta-polkadot-1.6.0", default-features = false } # Polkadot dependencies -pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.43" } -pallet-xcm-benchmarks = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.43" } -polkadot-cli = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.43" } -polkadot-core-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.43", default-features = false } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.43" } -polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.43", default-features = false } -polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.43", default-features = false } -polkadot-service = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.43" } -xcm = { git = "https://github.com/paritytech/polkadot.git", default-features = false, branch = "release-v0.9.43" } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.43" } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.43" } -xcm-simulator = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.43" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +polkadot-cli = { git = 'https://github.com/paritytech/polkadot-sdk', branch = "release-polkadot-v1.6.0" } +polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +polkadot-service = { git = 'https://github.com/paritytech/polkadot-sdk', branch = "release-polkadot-v1.6.0" } +xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +xcm-simulator = { git = 'https://github.com/paritytech/polkadot-sdk', branch = "release-polkadot-v1.6.0" } # Orml dependencies -orml-traits = { git = "https://github.com/manta-network/open-runtime-module-library.git", default-features = false, branch = "polkadot-v0.9.43" } -orml-xcm-support = { git = "https://github.com/manta-network/open-runtime-module-library.git", branch = "polkadot-v0.9.43", default-features = false } -orml-xtokens = { git = 'https://github.com/manta-network/open-runtime-module-library.git', default-features = false, branch = "polkadot-v0.9.43" } +orml-traits = { git = "https://github.com/manta-network/open-runtime-module-library.git", default-features = false, branch = "polkadot-v1.6.0" } +orml-xcm-support = { git = "https://github.com/manta-network/open-runtime-module-library.git", branch = "polkadot-v1.6.0", default-features = false } +orml-xtokens = { git = 'https://github.com/manta-network/open-runtime-module-library.git', default-features = false, branch = "polkadot-v1.6.0" } # Two runtimes calamari-runtime = { path = './runtime/calamari', default-features = false } @@ -225,7 +233,7 @@ pallet-name-service = { path = './pallets/name-service', default-features = fals pallet-parachain-staking = { path = './pallets/parachain-staking', default-features = false } pallet-randomness = { path = './pallets/randomness', default-features = false } pallet-tx-pause = { path = './pallets/tx-pause', default-features = false } -zenlink-protocol = { git = 'https://github.com/manta-network/Zenlink', branch = "polkadot-v0.9.43", default-features = false } +zenlink-protocol = { git = 'https://github.com/manta-network/Zenlink', branch = "polkadot-v1.6.0", default-features = false } # Self dependencies manta-accounting = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.15", default-features = false } diff --git a/README.md b/README.md index 998edd0bb..9d935f86f 100644 --- a/README.md +++ b/README.md @@ -61,4 +61,4 @@ where: ## Minimum supported rust compiler -This project's MSRV is `rustc 1.62` +This project's MSRV is `rustc 1.74` diff --git a/node/Cargo.toml b/node/Cargo.toml index 457ff29a3..749e675d1 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -17,6 +17,7 @@ targets = ['x86_64-unknown-linux-gnu'] async-trait = { workspace = true } cfg-if = { workspace = true } clap = { workspace = true } +clap-num = { workspace = true } codec = { workspace = true } futures = { workspace = true } hex-literal = { workspace = true } @@ -24,8 +25,10 @@ log = { workspace = true } serde = { workspace = true } # Substrate frames -frame-benchmarking = { workspace = true } +frame-benchmarking = { workspace = true, features = ["std"] } frame-benchmarking-cli = { workspace = true } +frame-support = { workspace = true } +frame-try-runtime = { workspace = true, optional = true } try-runtime-cli = { workspace = true, optional = true } # RPC related dependencies @@ -34,8 +37,10 @@ jsonrpsee = { workspace = true, features = ["server"] } pallet-transaction-payment-rpc = { workspace = true } sc-transaction-pool-api = { workspace = true } +frame-system-rpc-runtime-api = { workspace = true } pallet-farming-rpc-api = { workspace = true } pallet-farming-rpc-runtime-api = { workspace = true } +pallet-transaction-payment-rpc-runtime-api = { workspace = true } zenlink-protocol = { workspace = true, features = ["std"] } zenlink-protocol-rpc = { workspace = true } zenlink-protocol-runtime-api = { workspace = true, features = ["std"] } @@ -62,6 +67,7 @@ sc-tracing = { workspace = true } sc-transaction-pool = { workspace = true } # Substrate primitives +pallet-transaction-payment = { workspace = true, features = ["std"] } sp-api = { workspace = true, features = ["std"] } sp-application-crypto = { workspace = true, features = ["std"] } sp-arithmetic = { workspace = true, features = ["std"] } @@ -76,16 +82,21 @@ sp-keystore = { workspace = true, features = ["std"] } sp-offchain = { workspace = true, features = ["std"] } sp-runtime = { workspace = true, features = ["std"] } sp-session = { workspace = true, features = ["std"] } +sp-std = { workspace = true, features = ["std"] } sp-timestamp = { workspace = true, features = ["std"] } sp-transaction-pool = { workspace = true, features = ["std"] } +sp-version = { workspace = true, features = ["std"] } substrate-prometheus-endpoint = { workspace = true } # Cumulus dependencies cumulus-client-cli = { workspace = true } +cumulus-client-collator = { workspace = true } cumulus-client-consensus-aura = { workspace = true } cumulus-client-consensus-common = { workspace = true } +cumulus-client-consensus-proposer = { workspace = true } cumulus-client-consensus-relay-chain = { workspace = true } cumulus-client-network = { workspace = true } +cumulus-client-parachain-inherent = { workspace = true } cumulus-client-service = { workspace = true } cumulus-primitives-core = { workspace = true, features = ["std"] } cumulus-primitives-parachain-inherent = { workspace = true, features = ["std"] } @@ -95,9 +106,11 @@ cumulus-relay-chain-minimal-node = { workspace = true } cumulus-relay-chain-rpc-interface = { workspace = true } # Nimbus dependencies +async-backing-primitives = { workspace = true, features = ["std"] } nimbus-consensus = { workspace = true } nimbus-primitives = { workspace = true, features = ["std"] } pallet-author-inherent = { workspace = true, features = ["std"] } +session-keys-primitives = { workspace = true, features = ["std"] } # Polkadot dependencies polkadot-cli = { workspace = true } @@ -106,9 +119,10 @@ polkadot-service = { workspace = true } xcm = { workspace = true, features = ["std"] } # Self dependencies -calamari-runtime = { workspace = true, features = ["std"] } -manta-primitives = { workspace = true, features = ["std"] } -manta-runtime = { workspace = true, features = ["std"] } +calamari-runtime = { workspace = true } +manta-primitives = { workspace = true } +manta-runtime = { workspace = true } +manta-support = { workspace = true, features = ["rpc", "serde"] } pallet-lottery = { workspace = true, features = ["rpc"] } pallet-manta-pay = { workspace = true, features = ["rpc", "runtime"] } pallet-manta-sbt = { workspace = true, features = ["rpc", "runtime"] } @@ -127,9 +141,18 @@ runtime-benchmarks = [ 'calamari-runtime/runtime-benchmarks', 'polkadot-service/runtime-benchmarks', 'manta-runtime/runtime-benchmarks', + 'manta-primitives/runtime-benchmarks', + 'polkadot-primitives/runtime-benchmarks', + 'sc-service/runtime-benchmarks', + 'sp-runtime/runtime-benchmarks', + 'polkadot-cli/runtime-benchmarks', + 'frame-benchmarking/runtime-benchmarks', + 'frame-benchmarking-cli/runtime-benchmarks', + 'cumulus-primitives-core/runtime-benchmarks', ] try-runtime = [ 'calamari-runtime/try-runtime', 'manta-runtime/try-runtime', 'try-runtime-cli/try-runtime', + 'frame-try-runtime/try-runtime', ] diff --git a/node/src/aura_or_nimbus_consensus.rs b/node/src/aura_or_nimbus_consensus.rs index e0263428c..59cfb2c3a 100644 --- a/node/src/aura_or_nimbus_consensus.rs +++ b/node/src/aura_or_nimbus_consensus.rs @@ -43,6 +43,7 @@ use sp_runtime::{ }; use std::sync::Arc; +use nimbus_consensus::NimbusBlockImport; use nimbus_primitives::CompatibleDigestItem as NimbusDigestItem; use sc_consensus_aura::CompatibleDigestItem as AuraDigestItem; @@ -105,8 +106,8 @@ where { async fn verify( &mut self, - block_params: BlockImportParams, - ) -> Result, String> { + block_params: BlockImportParams, + ) -> Result, String> { // We assume the outermost digest item is the block seal ( we have no two-step consensus ) let seal = block_params .header @@ -134,6 +135,7 @@ where } } +#[allow(missing_docs)] pub fn import_queue( client: Arc, block_import: InnerBI, @@ -141,10 +143,10 @@ pub fn import_queue( spawner: &impl sp_core::traits::SpawnEssentialNamed, registry: Option<&substrate_prometheus_endpoint::Registry>, telemetry: Option, -) -> ClientResult> + parachain: bool, +) -> ClientResult> where InnerBI: BlockImport + Send + Sync + 'static, - InnerBI::Transaction: Send, Client::Api: BlockBuilderApi, Client: ProvideRuntimeApi + Send + Sync + 'static, Client: sc_client_api::AuxStore + sc_client_api::UsageProvider, @@ -172,19 +174,31 @@ where }, telemetry, ); - Ok(BasicQueue::new( - verifier, - // NOTE: As of Aug2022, nimbus and aura simply delegate block import - // to cumulus. We're skipping wrapping both by using this directly. - // If in the future either of them diverge from this, - // we'll have to adapt to the change here and in - // node/src/service.rs:L467 aka. BuildNimbusConsensusParams - Box::new(cumulus_client_consensus_common::ParachainBlockImport::new( - block_import, - backend, - )), - None, - spawner, - registry, - )) + if parachain { + Ok(BasicQueue::new( + verifier, + // NOTE: As of Aug2022, nimbus and aura simply delegate block import + // to cumulus. We're skipping wrapping both by using this directly. + // If in the future either of them diverge from this, + // we'll have to adapt to the change here and in + // node/src/service.rs:L467 aka. BuildNimbusConsensusParams + Box::new( + cumulus_client_consensus_common::ParachainBlockImport::new_with_delayed_best_block( + block_import, + backend, + ), + ), + None, + spawner, + registry, + )) + } else { + Ok(BasicQueue::new( + verifier, + Box::new(NimbusBlockImport::new(block_import, false)), + None, + spawner, + registry, + )) + } } diff --git a/node/src/builder.rs b/node/src/builder.rs index 279f2410b..1a1d79c74 100644 --- a/node/src/builder.rs +++ b/node/src/builder.rs @@ -17,40 +17,17 @@ //! Service builder #![allow(clippy::too_many_arguments)] -use crate::{ - client::{RuntimeApiCommon, RuntimeApiNimbus}, - instant_finalize::InstantFinalizeBlockImport, - service::{Client, StateBackend, TransactionPool}, -}; -use std::future::Future; - -pub use manta_primitives::types::{AccountId, Balance, Block, Hash, Header, Index as Nonce}; +pub use manta_primitives::types::{AccountId, Balance, Block, Hash, Header, Nonce}; use polkadot_service::CollatorPair; -use session_key_primitives::AuraId; use std::sync::Arc; -use sc_consensus::LongestChain; -use sc_network::NetworkService; -use sc_service::{Configuration, Error, KeystoreContainer, TFullBackend, TaskManager}; -use sc_telemetry::{TelemetryHandle, TelemetryWorkerHandle}; -use sp_api::ConstructRuntimeApi; -use sp_blockchain::HeaderBackend; -use sp_keystore::KeystorePtr; -use substrate_prometheus_endpoint::Registry; +use sc_service::{Configuration, TaskManager}; +use sc_telemetry::TelemetryWorkerHandle; -use cumulus_client_cli::CollatorOptions; -use cumulus_client_consensus_common::ParachainConsensus; -use cumulus_primitives_core::ParaId; -use cumulus_primitives_parachain_inherent::{ - MockValidationDataInherentDataProvider, MockXcmConfig, -}; +use cumulus_client_cli::{CollatorOptions, RelayChainMode}; use cumulus_relay_chain_inprocess_interface::build_inprocess_relay_chain; use cumulus_relay_chain_interface::{RelayChainInterface, RelayChainResult}; -use cumulus_relay_chain_minimal_node::build_minimal_relay_chain_node; - -use nimbus_consensus::{ - BuildNimbusConsensusParams, NimbusConsensus, NimbusManualSealConsensusDataProvider, -}; +use cumulus_relay_chain_minimal_node::build_minimal_relay_chain_node_with_rpc; /// build relaychain interface for parachain mode pub async fn build_relay_chain_interface( @@ -59,180 +36,19 @@ pub async fn build_relay_chain_interface( telemetry_worker_handle: Option, task_manager: &mut TaskManager, collator_options: CollatorOptions, - hwbench: Option, ) -> RelayChainResult<( Arc<(dyn RelayChainInterface + 'static)>, Option, )> { - if !collator_options.relay_chain_rpc_urls.is_empty() { - build_minimal_relay_chain_node( - polkadot_config, - task_manager, - collator_options.relay_chain_rpc_urls, - ) - .await + if let RelayChainMode::ExternalRpc(rpc) = collator_options.relay_chain_mode { + build_minimal_relay_chain_node_with_rpc(polkadot_config, task_manager, rpc).await } else { build_inprocess_relay_chain( polkadot_config, parachain_config, telemetry_worker_handle, task_manager, - hwbench, + None, ) } } - -/// build parachain nimbus consensus -pub fn build_nimbus_consensus( - id: ParaId, - client: Arc>, - backend: Arc>, - prometheus_registry: Option<&Registry>, - telemetry: Option, - task_manager: &TaskManager, - relay_chain_interface: Arc, - transaction_pool: Arc>, - _sync_oracle: Arc>, - keystore: KeystorePtr, - force_authoring: bool, -) -> Result>, Error> -where - RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: RuntimeApiCommon - + RuntimeApiNimbus - + sp_consensus_aura::AuraApi, -{ - let spawn_handle = task_manager.spawn_handle(); - let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( - spawn_handle, - client.clone(), - transaction_pool, - prometheus_registry, - telemetry, - ); - - // NOTE: In nimbus, author_id is unused as it is the RuntimeAPI that identifies the block author - let provider = move |_, (relay_parent, validation_data, _author_id)| { - let relay_chain_interface = relay_chain_interface.clone(); - async move { - let parachain_inherent = - cumulus_primitives_parachain_inherent::ParachainInherentData::create_at( - relay_parent, - &relay_chain_interface, - &validation_data, - id, - ) - .await; - - let time = sp_timestamp::InherentDataProvider::from_system_time(); - - let parachain_inherent = parachain_inherent.ok_or_else(|| { - Box::::from( - "Failed to create parachain inherent", - ) - })?; - - let nimbus_inherent = nimbus_primitives::InherentDataProvider; - Ok((time, parachain_inherent, nimbus_inherent)) - } - }; - - Ok(NimbusConsensus::build(BuildNimbusConsensusParams { - additional_digests_provider: (), - para_id: id, - proposer_factory, - block_import: client.clone(), - backend, - parachain_client: client, - keystore, - skip_prediction: force_authoring, - create_inherent_data_providers: provider, - })) -} - -/// build standalone mode dev consensus using manual instant seal -pub fn build_dev_nimbus_consensus( - client: Arc>, - transaction_pool: Arc>, - keystore_container: &KeystoreContainer, - select_chain: LongestChain, Block>, - task_manager: &TaskManager, -) -> Result + Send + 'static, Error> -where - RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: RuntimeApiCommon + RuntimeApiNimbus, -{ - use futures::{Stream, StreamExt}; - use sc_consensus_manual_seal::{run_manual_seal, EngineCommand, ManualSealParams}; - - let proposer_factory = sc_basic_authorship::ProposerFactory::new( - task_manager.spawn_handle(), - client.clone(), - transaction_pool.clone(), - None, - None, - ); - - let commands_stream: Box> + Send + Sync + Unpin> = - Box::new( - // This bit cribbed from the implementation of instant seal. - transaction_pool - .pool() - .validated_pool() - .import_notification_stream() - .map(|_| EngineCommand::SealNewBlock { - create_empty: false, - finalize: false, - parent_hash: None, - sender: None, - }), - ); - - let client_set_aside_for_cidp = client.clone(); - - let consensus = run_manual_seal(ManualSealParams { - block_import: InstantFinalizeBlockImport::new(client.clone()), - env: proposer_factory, - client: client.clone(), - pool: transaction_pool, - commands_stream, - select_chain, - consensus_data_provider: Some(Box::new(NimbusManualSealConsensusDataProvider { - keystore: keystore_container.keystore(), - client, - additional_digests_provider: (), - _phantom: Default::default(), - })), - create_inherent_data_providers: move |block: Hash, ()| { - let current_para_block = client_set_aside_for_cidp - .number(block) - .expect("Header lookup should succeed") - .expect("Header passed in as parent should be present in backend."); - - let client_for_xcm = client_set_aside_for_cidp.clone(); - async move { - let time = sp_timestamp::InherentDataProvider::from_system_time(); - - let mocked_parachain = MockValidationDataInherentDataProvider { - current_para_block, - relay_offset: 1000, - relay_blocks_per_para_block: 2, - para_blocks_per_relay_epoch: 0, - relay_randomness_config: (), - xcm_config: MockXcmConfig::new( - &*client_for_xcm, - block, - Default::default(), - Default::default(), - ), - raw_downward_messages: vec![], - raw_horizontal_messages: vec![], - }; - - Ok((time, mocked_parachain)) - } - }, - }); - - Ok(consensus) -} diff --git a/node/src/chain_specs/calamari.rs b/node/src/chain_specs/calamari.rs index 52592263a..e02cc9351 100644 --- a/node/src/chain_specs/calamari.rs +++ b/node/src/chain_specs/calamari.rs @@ -20,10 +20,12 @@ use super::*; use crate::command::CALAMARI_PARACHAIN_ID; #[allow(unused_imports)] use calamari_runtime::{ - currency::KMA, opaque::SessionKeys, CouncilConfig, DemocracyConfig, GenesisConfig, - LotteryConfig, ParachainStakingConfig, TechnicalCommitteeConfig, + currency::KMA, opaque::SessionKeys, CouncilConfig, DemocracyConfig, LotteryConfig, + ParachainStakingConfig, Runtime, RuntimeGenesisConfig, TechnicalCommitteeConfig, WASM_BINARY, }; +use core::marker::PhantomData; use session_key_primitives::util::unchecked_account_id; + /// Calamari Protocol Identifier pub const CALAMARI_PROTOCOL_ID: &str = "calamari"; @@ -37,7 +39,7 @@ pub const KUSAMA_RELAYCHAIN_DEV_NET: &str = "kusama-dev"; pub const CALAMARI_SAFE_XCM_VERSION: u32 = 3; /// Calamari Chain Spec -pub type CalamariChainSpec = sc_service::GenericChainSpec; +pub type CalamariChainSpec = sc_service::GenericChainSpec; /// Returns the [`Properties`] for the Calamari parachain. pub fn calamari_properties() -> Properties { @@ -53,6 +55,7 @@ pub fn calamari_properties() -> Properties { /// Returns the Calamari development chainspec. pub fn calamari_development_config() -> CalamariChainSpec { + #[allow(deprecated)] CalamariChainSpec::from_genesis( "Calamari Parachain Development", "calamari_dev", @@ -82,6 +85,7 @@ pub fn calamari_development_config() -> CalamariChainSpec { relay_chain: KUSAMA_RELAYCHAIN_DEV_NET.into(), para_id: CALAMARI_PARACHAIN_ID, }, + WASM_BINARY.expect("WASM binary was not build, please build it!"), ) } @@ -92,6 +96,7 @@ pub fn calamari_local_config(localdev: bool) -> CalamariChainSpec { } else { "calamari_local" }; + #[allow(deprecated)] CalamariChainSpec::from_genesis( "Calamari Parachain Local", id, @@ -153,6 +158,7 @@ pub fn calamari_local_config(localdev: bool) -> CalamariChainSpec { relay_chain: KUSAMA_RELAYCHAIN_LOCAL_NET.into(), para_id: CALAMARI_PARACHAIN_ID, }, + WASM_BINARY.expect("WASM binary was not build, please build it!"), ) } @@ -160,12 +166,10 @@ fn calamari_dev_genesis( invulnerables: Vec<(AccountId, SessionKeys)>, delegations: Vec<(AccountId, AccountId, Balance)>, endowed_accounts: Vec, -) -> GenesisConfig { - GenesisConfig { +) -> RuntimeGenesisConfig { + RuntimeGenesisConfig { system: calamari_runtime::SystemConfig { - code: calamari_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), + _config: PhantomData::, }, balances: calamari_runtime::BalancesConfig { balances: endowed_accounts[..endowed_accounts.len() / 2] @@ -199,6 +203,7 @@ fn calamari_dev_genesis( }, parachain_info: calamari_runtime::ParachainInfoConfig { parachain_id: CALAMARI_PARACHAIN_ID.into(), + _config: PhantomData::, }, collator_selection: calamari_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), @@ -233,6 +238,7 @@ fn calamari_dev_genesis( parachain_system: Default::default(), polkadot_xcm: calamari_runtime::PolkadotXcmConfig { safe_xcm_version: Some(CALAMARI_SAFE_XCM_VERSION), + _config: PhantomData::, }, lottery: LotteryConfig { min_deposit: 5_000 * KMA, diff --git a/node/src/chain_specs/manta/local_testnets_geneses.rs b/node/src/chain_specs/manta/local_testnets_geneses.rs index f59b39f59..e1dc7a996 100644 --- a/node/src/chain_specs/manta/local_testnets_geneses.rs +++ b/node/src/chain_specs/manta/local_testnets_geneses.rs @@ -17,6 +17,7 @@ //! Manta Local Dev Network Configurations use super::*; +use manta_runtime::WASM_BINARY; use session_key_primitives::util::unchecked_account_id; pub fn genesis_spec_dev() -> MantaChainSpec { @@ -27,10 +28,11 @@ pub fn genesis_spec_dev() -> MantaChainSpec { )]; let genesis_collators_clone = genesis_collators.clone(); // so we can move it into the constructor closure + #[allow(deprecated)] MantaChainSpec::from_genesis( "Manta Parachain Dev", - "manta", - ChainType::Local, + "manta-dev", + ChainType::Development, move || manta_devnet_genesis(genesis_collators_clone.clone()), genesis_collators .into_iter() @@ -44,6 +46,7 @@ pub fn genesis_spec_dev() -> MantaChainSpec { relay_chain: POLKADOT_RELAYCHAIN_LOCAL_NET.into(), para_id: MANTA_PARACHAIN_ID, }, + WASM_BINARY.expect("WASM binary was not build, please build it!"), ) } @@ -89,6 +92,7 @@ pub fn genesis_spec_local(localdev: bool) -> MantaChainSpec { } else { "manta_local" }; + #[allow(deprecated)] MantaChainSpec::from_genesis( "Manta Parachain Local", id, @@ -106,5 +110,6 @@ pub fn genesis_spec_local(localdev: bool) -> MantaChainSpec { relay_chain: POLKADOT_RELAYCHAIN_LOCAL_NET.into(), para_id: MANTA_PARACHAIN_ID, }, + WASM_BINARY.expect("WASM binary was not build, please build it!"), ) } diff --git a/node/src/chain_specs/manta/mainnet_genesis.rs b/node/src/chain_specs/manta/mainnet_genesis.rs index 25d50a83f..8eb0ef186 100644 --- a/node/src/chain_specs/manta/mainnet_genesis.rs +++ b/node/src/chain_specs/manta/mainnet_genesis.rs @@ -33,7 +33,7 @@ impl Collator { } } -fn genesis_config(genesis_collators: Vec) -> GenesisConfig { +fn genesis_config(genesis_collators: Vec) -> RuntimeGenesisConfig { const TOTAL_ISSUANCE: Balance = 1_000_000_000 * MANTA; const INITIAL_CONTROLLER_BALANCE: Balance = 5_000 * MANTA; const INITIAL_COLLATOR_BALANCE: Balance = 100 * MANTA; @@ -83,7 +83,7 @@ fn genesis_config(genesis_collators: Vec) -> GenesisConfig { "won't be able to register collator, balance in account set too low" ); - GenesisConfig { + RuntimeGenesisConfig { system: manta_runtime::SystemConfig { code: manta_runtime::WASM_BINARY .expect("WASM binary was not build, please build it!") diff --git a/node/src/chain_specs/manta/mod.rs b/node/src/chain_specs/manta/mod.rs index ffa683124..f6c0bfa2c 100644 --- a/node/src/chain_specs/manta/mod.rs +++ b/node/src/chain_specs/manta/mod.rs @@ -18,9 +18,10 @@ use super::*; use crate::command::MANTA_PARACHAIN_ID; +use core::marker::PhantomData; use manta_runtime::{ opaque::SessionKeys, staking::NORMAL_COLLATOR_MINIMUM_STAKE, CouncilConfig, DemocracyConfig, - GenesisConfig, LotteryConfig, ParachainStakingConfig, PolkadotXcmConfig, + LotteryConfig, ParachainStakingConfig, PolkadotXcmConfig, Runtime, RuntimeGenesisConfig, TechnicalCommitteeConfig, }; use sc_service::config::MultiaddrWithPeerId; @@ -46,7 +47,8 @@ pub const POLKADOT_RELAYCHAIN_DEV_NET: &str = "polkadot-dev"; pub const MANTA_SAFE_XCM_VERSION: u32 = 3; /// Manta Chain Specification -pub type MantaChainSpec = sc_service::GenericChainSpec; +pub type MantaChainSpec = + sc_service::GenericChainSpec; #[derive(Clone)] struct Collator { @@ -90,7 +92,7 @@ pub fn manta_development_config() -> MantaChainSpec { } // common helper to create the above configs -fn manta_devnet_genesis(genesis_collators: Vec) -> GenesisConfig { +fn manta_devnet_genesis(genesis_collators: Vec) -> RuntimeGenesisConfig { let root_key = genesis_collators.first().unwrap().acc.clone(); const INITIAL_COLLATOR_BALANCE: Balance = 1_000_000_000 * MANTA; @@ -104,11 +106,9 @@ fn manta_devnet_genesis(genesis_collators: Vec) -> GenesisConfig { "won't be able to register collator, balance in account set too low" ); - GenesisConfig { + RuntimeGenesisConfig { system: manta_runtime::SystemConfig { - code: manta_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), + _config: PhantomData::, }, balances: manta_runtime::BalancesConfig { balances: endowments.clone(), @@ -134,6 +134,7 @@ fn manta_devnet_genesis(genesis_collators: Vec) -> GenesisConfig { }, parachain_info: manta_runtime::ParachainInfoConfig { parachain_id: MANTA_PARACHAIN_ID.into(), + _config: PhantomData::, }, collator_selection: manta_runtime::CollatorSelectionConfig { invulnerables: vec![], @@ -155,6 +156,7 @@ fn manta_devnet_genesis(genesis_collators: Vec) -> GenesisConfig { parachain_system: Default::default(), polkadot_xcm: PolkadotXcmConfig { safe_xcm_version: Some(MANTA_SAFE_XCM_VERSION), + _config: PhantomData::, }, asset_manager: Default::default(), democracy: DemocracyConfig::default(), diff --git a/node/src/chain_specs/manta/public_testnet_genesis.rs b/node/src/chain_specs/manta/public_testnet_genesis.rs index cbdcad127..640db7c91 100644 --- a/node/src/chain_specs/manta/public_testnet_genesis.rs +++ b/node/src/chain_specs/manta/public_testnet_genesis.rs @@ -21,6 +21,8 @@ use hex_literal::hex; use sc_telemetry::TelemetryEndpoints; use sp_core::crypto::UncheckedInto; +use manta_runtime::WASM_BINARY; + pub fn genesis_spec() -> MantaChainSpec { let genesis_collators: Vec = vec![ Collator::new( @@ -66,6 +68,7 @@ pub fn genesis_spec() -> MantaChainSpec { ]; let genesis_collators_clone = genesis_collators.clone(); // so we can move it into the constructor closure + #[allow(deprecated)] MantaChainSpec::from_genesis( "Manta Parachain Staging", "manta", @@ -89,5 +92,6 @@ pub fn genesis_spec() -> MantaChainSpec { relay_chain: POLKADOT_STAGING_NET.into(), para_id: MANTA_PARACHAIN_ID, }, + WASM_BINARY.expect("WASM binary was not build, please build it!"), ) } diff --git a/node/src/chain_specs/mod.rs b/node/src/chain_specs/mod.rs index 00ce3ce15..96433c1e8 100644 --- a/node/src/chain_specs/mod.rs +++ b/node/src/chain_specs/mod.rs @@ -46,8 +46,8 @@ pub const MANTA_ENDOWMENT: Balance = 100_000_000 * MANTA; /// Staging Telemetry URL pub const STAGING_TELEMETRY_URL: &str = "wss://api.telemetry.manta.systems/submit/"; -/// Manta Network Chain Spec -pub type ChainSpec = sc_service::GenericChainSpec; +/// Dummy Chain Spec +pub type ChainSpec = sc_service::GenericChainSpec<(), Extensions>; /// The extensions for the [`ChainSpec`]. #[derive( diff --git a/node/src/cli.rs b/node/src/cli.rs index 9362cb798..9ab693e51 100644 --- a/node/src/cli.rs +++ b/node/src/cli.rs @@ -19,7 +19,7 @@ use crate::chain_specs; use clap::Parser; -use std::path::PathBuf; +use std::{path::PathBuf, time::Duration}; /// Sub-commands supported by the collator. #[derive(Debug, clap::Subcommand)] @@ -46,7 +46,8 @@ pub enum Subcommand { PurgeChain(cumulus_client_cli::PurgeChainCmd), /// Export the genesis state of the parachain. - ExportGenesisState(cumulus_client_cli::ExportGenesisStateCommand), + #[command(alias = "export-genesis-state")] + ExportGenesisHead(cumulus_client_cli::ExportGenesisHeadCommand), /// Export the genesis wasm of the parachain. ExportGenesisWasm(cumulus_client_cli::ExportGenesisWasmCommand), @@ -95,6 +96,16 @@ pub struct Cli { /// Relay chain arguments #[arg(raw = true)] pub relaychain_args: Vec, + + /// Maximum duration in milliseconds to produce a block + #[clap(long, default_value = "1500", value_parser=block_authoring_duration_parser)] + pub block_authoring_duration: Duration, +} + +fn block_authoring_duration_parser(s: &str) -> Result { + Ok(Duration::from_millis(clap_num::number_range( + s, 250, 2_000, + )?)) } /// Relay Chain CLI diff --git a/node/src/client.rs b/node/src/client.rs index d2fc45aad..33b9b9dae 100644 --- a/node/src/client.rs +++ b/node/src/client.rs @@ -16,8 +16,13 @@ //! RuntimeApi for client -use manta_primitives::types::{AccountId, Balance, Block, Index as Nonce}; -use sp_runtime::traits::BlakeTwo256; +use async_backing_primitives::UnincludedSegmentApi; +use manta_primitives::types::{AccountId, Balance, Block, Nonce}; +use nimbus_primitives::{DigestsProvider, NimbusApi, NimbusId}; +use session_keys_primitives::VrfApi; +use sp_core::H256; +use sp_keystore::{Keystore, KeystorePtr}; +use std::sync::Arc; /// RuntimeApiCommon + RuntimeApiNimbus: nimbus /// @@ -31,19 +36,14 @@ pub trait RuntimeApiCommon: + sp_transaction_pool::runtime_api::TaggedTransactionQueue + pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi + frame_rpc_system::AccountNonceApi -where - >::StateBackend: sp_api::StateBackend, -{ -} - -/// Extend RuntimeApi trait bound for Nimbus -pub trait RuntimeApiNimbus: - cumulus_primitives_core::CollectCollationInfo + nimbus_primitives::NimbusApi + + cumulus_primitives_core::CollectCollationInfo + + VrfApi + + NimbusApi + + UnincludedSegmentApi { } -impl RuntimeApiCommon for Api -where +impl RuntimeApiCommon for Api where Api: sp_api::Metadata + sp_api::ApiExt + sp_block_builder::BlockBuilder @@ -51,12 +51,60 @@ where + sp_session::SessionKeys + sp_transaction_pool::runtime_api::TaggedTransactionQueue + pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi - + frame_rpc_system::AccountNonceApi, - >::StateBackend: sp_api::StateBackend, + + frame_rpc_system::AccountNonceApi + + cumulus_primitives_core::CollectCollationInfo + + VrfApi + + NimbusApi + + UnincludedSegmentApi { } -impl RuntimeApiNimbus for Api where - Api: cumulus_primitives_core::CollectCollationInfo + nimbus_primitives::NimbusApi +/// Uses the runtime API to get the VRF inputs and sign them with the VRF key that +/// corresponds to the authoring NimbusId. +pub fn vrf_pre_digest( + _client: &C, + _keystore: &KeystorePtr, + _nimbus_id: NimbusId, + _parent: H256, +) -> Option +where + B: sp_runtime::traits::Block, + C: sp_api::ProvideRuntimeApi, + C::Api: VrfApi, { + None +} + +/// Implementation for Vrf Digest call, our runtimes will just return None +pub struct VrfDigestsProvider { + /// client + pub client: Arc, + /// keystore + pub keystore: Arc, + _marker: std::marker::PhantomData, +} + +impl VrfDigestsProvider { + /// New instance of `VrfDigestsProvider` + pub fn new(client: Arc, keystore: Arc) -> Self { + Self { + client, + keystore, + _marker: Default::default(), + } + } +} + +impl DigestsProvider for VrfDigestsProvider +where + B: sp_runtime::traits::Block, + C: sp_api::ProvideRuntimeApi, + C::Api: VrfApi, +{ + type Digests = Option; + + // vrf is not used + fn provide_digests(&self, _nimbus_id: NimbusId, _parent: H256) -> Self::Digests { + None + } } diff --git a/node/src/command.rs b/node/src/command.rs index c089976df..01f760a40 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -19,28 +19,24 @@ use crate::{ chain_specs, cli::{Cli, RelayChainCli, Subcommand}, - rpc, - service::{new_partial, CalamariRuntimeExecutor, MantaRuntimeExecutor}, + rpc::{create_calamari_full, create_manta_full}, + service::new_partial, }; -use codec::Encode; -use cumulus_client_cli::generate_genesis_block; use cumulus_primitives_core::ParaId; use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE}; use log::info; use manta_primitives::types::Header; use sc_cli::{ ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams, - NetworkParams, RuntimeVersion, SharedParams, SubstrateCli, + NetworkParams, SharedParams, SubstrateCli, }; use sc_service::config::{BasePath, PrometheusConfig}; -use sp_core::hexdisplay::HexDisplay; -use sp_runtime::{ - generic, - traits::{AccountIdConversion, Block as BlockT}, - OpaqueExtrinsic, -}; +use sp_runtime::{generic, traits::AccountIdConversion, OpaqueExtrinsic}; use std::net::SocketAddr; +use calamari_runtime::RuntimeApi as CalamariRuntimeApi; +use manta_runtime::RuntimeApi as MantaRuntimeApi; + pub use sc_cli::Error; /// Result Type Alias with default [`Error`] Type @@ -150,16 +146,6 @@ impl SubstrateCli for Cli { fn load_spec(&self, id: &str) -> Result, String> { load_spec(id) } - - fn native_runtime_version(chain_spec: &Box) -> &'static RuntimeVersion { - if chain_spec.is_manta() { - &manta_runtime::VERSION - } else if chain_spec.is_calamari() { - &calamari_runtime::VERSION - } else { - panic!("invalid chain spec! should be one of manta, calamari chain specs") - } - } } impl SubstrateCli for RelayChainCli { @@ -196,20 +182,18 @@ impl SubstrateCli for RelayChainCli { fn load_spec(&self, id: &str) -> Result, String> { polkadot_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()).load_spec(id) } - - fn native_runtime_version(chain_spec: &Box) -> &'static RuntimeVersion { - polkadot_cli::Cli::native_runtime_version(chain_spec) - } } /// Creates partial components for the runtimes that are supported by the benchmarks. macro_rules! construct_benchmark_partials { ($config:expr, |$partials:ident| $code:expr) => { if $config.chain_spec.is_manta() { - let $partials = new_partial::(&$config)?; + let $partials = + new_partial::(&$config, $config.chain_spec.is_localdev())?; $code } else if $config.chain_spec.is_calamari() { - let $partials = new_partial::(&$config)?; + let $partials = + new_partial::(&$config, $config.chain_spec.is_localdev())?; $code } else { Err("The chain is not supported".into()) @@ -222,16 +206,18 @@ macro_rules! construct_async_run { let runner = $cli.create_runner($cmd)?; if runner.config().chain_spec.is_manta() { runner.async_run(|$config| { - let $components = crate::service::new_partial::( + let $components = crate::service::new_partial::( &$config, + $config.chain_spec.is_localdev(), )?; let task_manager = $components.task_manager; { $( $code )* }.map(|v| (v, task_manager)) }) } else if runner.config().chain_spec.is_calamari() { runner.async_run(|$config| { - let $components = new_partial::( + let $components = new_partial::( &$config, + $config.chain_spec.is_localdev(), )?; let task_manager = $components.task_manager; { $( $code )* }.map(|v| (v, task_manager)) @@ -295,12 +281,22 @@ pub fn run_with(cli: Cli) -> Result { cmd.run(config, polkadot_config) }) } - Some(Subcommand::ExportGenesisState(cmd)) => { + Some(Subcommand::ExportGenesisHead(cmd)) => { let runner = cli.create_runner(cmd)?; - runner.sync_run(|_config| { - let spec = cli.load_spec(&cmd.shared_params.chain.clone().unwrap_or_default())?; - let state_version = Cli::native_runtime_version(&spec).state_version(); - cmd.run::(&*spec, state_version) + runner.sync_run(|config| { + if config.chain_spec.is_manta() { + let partials = + new_partial::(&config, config.chain_spec.is_localdev())?; + cmd.run(partials.client) + } else if config.chain_spec.is_calamari() { + let partials = new_partial::( + &config, + config.chain_spec.is_localdev(), + )?; + cmd.run(partials.client) + } else { + Err("Must be either calamari or manta runtime".into()) + } }) } Some(Subcommand::ExportGenesisWasm(cmd)) => { @@ -317,15 +313,7 @@ pub fn run_with(cli: Cli) -> Result { match cmd { BenchmarkCmd::Pallet(cmd) => { if cfg!(feature = "runtime-benchmarks") { - runner.sync_run(|config| { - if config.chain_spec.is_manta() { - cmd.run::(config) - } else if config.chain_spec.is_calamari() { - cmd.run::(config) - } else { - Err("Chain doesn't support benchmarking".into()) - } - }) + runner.sync_run(|config| cmd.run::(config)) } else { Err("Benchmarking wasn't enabled when building the node. \ You can enable it with `--features runtime-benchmarks`." @@ -357,47 +345,7 @@ pub fn run_with(cli: Cli) -> Result { } } #[cfg(feature = "try-runtime")] - Some(Subcommand::TryRuntime(cmd)) => { - use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; - use try_runtime_cli::block_building_info::timestamp_with_aura_info; - - // grab the task manager. - let runner = cli.create_runner(cmd)?; - let registry = &runner - .config() - .prometheus_config - .as_ref() - .map(|cfg| &cfg.registry); - let task_manager = - sc_service::TaskManager::new(runner.config().tokio_handle.clone(), *registry) - .map_err(|e| format!("Error: {e:?}"))?; - - let info_provider = timestamp_with_aura_info(6000); - - if runner.config().chain_spec.is_manta() { - runner.async_run(|_config| { - Ok(( - cmd.run::::ExtendHostFunctions, - >, _>(Some(info_provider)), - task_manager, - )) - }) - } else if runner.config().chain_spec.is_calamari() { - runner.async_run(|_config| { - Ok(( - cmd.run::::ExtendHostFunctions, - >, _>(Some(info_provider)), - task_manager, - )) - }) - } else { - Err("Chain doesn't support try-runtime".into()) - } - } + Some(Subcommand::TryRuntime(_)) => Err(try_runtime_cli::DEPRECATION_NOTICE.into()), #[cfg(not(feature = "try-runtime"))] Some(Subcommand::TryRuntime) => Err("Try-runtime wasn't enabled when building the node. \ You can enable it with `--features try-runtime`." @@ -405,39 +353,10 @@ pub fn run_with(cli: Cli) -> Result { None => { let runner = cli.create_runner(&cli.run.normalize())?; let chain_spec = &runner.config().chain_spec; - let is_dev = chain_spec.is_localdev(); info!("id:{}", chain_spec.id()); let collator_options = cli.run.collator_options(); runner.run_node_until_exit(|config| async move { - if is_dev { - info!("⚠️ DEV STANDALONE MODE."); - if config.chain_spec.is_calamari() { - return crate::service::start_dev_nimbus_node::( - config, - rpc::create_calamari_full, - ).await - .map_err(Into::into); - } else if config.chain_spec.is_manta() { - return crate::service::start_dev_nimbus_node::( - config, - rpc::create_manta_full, - ).await - .map_err(Into::into); - } else { - return Err("Dev mode not support for current chain".into()); - } - } - - let hwbench = if !cli.no_hardware_benchmarks { - config.database.path().map(|database_path| { - let _ = std::fs::create_dir_all(database_path); - sc_sysinfo::gather_hwbench(Some(database_path)) - }) - } else { - None - }; - let para_id = crate::chain_specs::Extensions::try_get(&*config.chain_spec) .map(|e| e.para_id) .ok_or("Could not find parachain extension in chain-spec.")?; @@ -452,24 +371,14 @@ pub fn run_with(cli: Cli) -> Result { let id = ParaId::from(para_id); let parachain_account = - AccountIdConversion::::into_account_truncating(&id); - - let state_version = - RelayChainCli::native_runtime_version(&config.chain_spec).state_version(); - - let block: crate::service::Block = - generate_genesis_block(&*config.chain_spec, state_version) - .map_err(|e| format!("{e:?}"))?; - let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header().encode())); + AccountIdConversion::::into_account_truncating( + &id, + ); let tokio_handle = config.tokio_handle.clone(); - let polkadot_config = - SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, tokio_handle) - .map_err(|err| format!("Relay chain argument error: {err}"))?; info!("Parachain id: {:?}", id); info!("Parachain Account: {}", parachain_account); - info!("Parachain genesis state: {}", genesis_state); info!( "Is collating: {}", if config.role.is_authority() { @@ -479,30 +388,70 @@ pub fn run_with(cli: Cli) -> Result { } ); + // hard code async backing off + let async_backing = false; + let is_localdev = config.chain_spec.is_localdev(); + if config.chain_spec.is_manta() { - crate::service::start_parachain_node::( - config, - polkadot_config, - collator_options, - id, - hwbench, - rpc::create_manta_full, - ) - .await - .map(|r| r.0) - .map_err(Into::into) + if is_localdev { + crate::service::start_dev_node::( + config, + create_manta_full, + ) + .await + .map(|r| r.0) + .map_err(Into::into) + } else { + let polkadot_config = SubstrateCli::create_configuration( + &polkadot_cli, + &polkadot_cli, + tokio_handle, + ) + .map_err(|err| format!("Relay chain argument error: {err}"))?; + + crate::service::start_parachain_node::( + config, + polkadot_config, + collator_options, + id, + create_manta_full, + cli.block_authoring_duration, + async_backing, + ) + .await + .map(|r| r.0) + .map_err(Into::into) + } } else if config.chain_spec.is_calamari() { - crate::service::start_parachain_node::( - config, - polkadot_config, - collator_options, - id, - hwbench, - rpc::create_calamari_full, - ) - .await - .map(|r| r.0) - .map_err(Into::into) + if is_localdev { + crate::service::start_dev_node::( + config, + create_calamari_full, + ) + .await + .map(|r| r.0) + .map_err(Into::into) + } else { + let polkadot_config = SubstrateCli::create_configuration( + &polkadot_cli, + &polkadot_cli, + tokio_handle, + ) + .map_err(|err| format!("Relay chain argument error: {err}"))?; + + crate::service::start_parachain_node::( + config, + polkadot_config, + collator_options, + id, + create_calamari_full, + cli.block_authoring_duration, + async_backing, + ) + .await + .map(|r| r.0) + .map_err(Into::into) + } } else { Err("chain spec error: must be one of manta or calamari chain specs".into()) } diff --git a/node/src/fake_runtime_api.rs b/node/src/fake_runtime_api.rs new file mode 100644 index 000000000..e0fe51eab --- /dev/null +++ b/node/src/fake_runtime_api.rs @@ -0,0 +1,292 @@ +// Copyright 2020-2024 Manta Network. +// This file is part of Manta. +// +// Manta 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. +// +// Manta 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 Manta. If not, see . + +//! Fake Runtime API to use in place of native runtime + +use frame_support::weights::Weight; +use manta_primitives::types::{AccountId, Balance, Block, CalamariAssetId, Nonce, PoolId}; +use manta_support::manta_pay::{InitialSyncResponse, PullResponse, RawCheckpoint}; +use session_key_primitives::NimbusId; +use sp_consensus_aura::sr25519::AuthorityId as AuraId; +use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; +use sp_runtime::{ + traits::Block as BlockT, + transaction_validity::{TransactionSource, TransactionValidity}, + ApplyExtrinsicResult, +}; +use zenlink_protocol::{AssetBalance, AssetId as ZenlinkAssetId, PairInfo}; + +pub struct Runtime; + +sp_api::impl_runtime_apis! { + impl sp_api::Core for Runtime { + fn version() -> sp_version::RuntimeVersion { + unimplemented!() + } + + fn execute_block(_: Block) { + unimplemented!() + } + + fn initialize_block(_: &::Header) { + unimplemented!() + } + } + + impl sp_api::Metadata for Runtime { + fn metadata() -> OpaqueMetadata { + unimplemented!() + } + + fn metadata_at_version(_: u32) -> Option { + unimplemented!() + } + + fn metadata_versions() -> sp_std::vec::Vec { + unimplemented!() + } + } + + impl sp_consensus_aura::AuraApi for Runtime { + fn slot_duration() -> sp_consensus_aura::SlotDuration { + unimplemented!() + } + + fn authorities() -> Vec { + unimplemented!() + } + } + + impl sp_block_builder::BlockBuilder for Runtime { + fn apply_extrinsic(_: ::Extrinsic) -> ApplyExtrinsicResult { + unimplemented!() + } + + fn finalize_block() -> ::Header { + unimplemented!() + } + + fn inherent_extrinsics(_: sp_inherents::InherentData) -> Vec<::Extrinsic> { + unimplemented!() + } + + fn check_inherents(_: Block, _: sp_inherents::InherentData) -> sp_inherents::CheckInherentsResult { + unimplemented!() + } + } + + impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { + fn validate_transaction( + _: TransactionSource, + _: ::Extrinsic, + _: ::Hash, + ) -> TransactionValidity { + unimplemented!() + } + } + + impl sp_offchain::OffchainWorkerApi for Runtime { + fn offchain_worker(_: &::Header) { + unimplemented!() + } + } + + impl sp_session::SessionKeys for Runtime { + fn generate_session_keys(_: Option>) -> Vec { + unimplemented!() + } + + fn decode_session_keys( + _: Vec, + ) -> Option, KeyTypeId)>> { + unimplemented!() + } + } + + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime { + fn query_info( + _: ::Extrinsic, + _: u32, + ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo { + unimplemented!() + } + fn query_fee_details( + _: ::Extrinsic, + _: u32, + ) -> pallet_transaction_payment::FeeDetails { + unimplemented!() + } + fn query_weight_to_fee(_: Weight) -> Balance { + unimplemented!() + } + fn query_length_to_fee(_: u32) -> Balance { + unimplemented!() + } + } + + impl cumulus_primitives_core::CollectCollationInfo for Runtime { + fn collect_collation_info(_: &::Header) -> cumulus_primitives_core::CollationInfo { + unimplemented!() + } + } + + #[cfg(feature = "try-runtime")] + impl frame_try_runtime::TryRuntime for Runtime { + fn on_runtime_upgrade(_: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { + unimplemented!() + } + + fn execute_block( + _: Block, + _: bool, + _: bool, + _: frame_try_runtime::TryStateSelect, + ) -> Weight { + unimplemented!() + } + } + + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { + fn account_nonce(_: AccountId) -> Nonce { + unimplemented!() + } + } + + #[cfg(feature = "runtime-benchmarks")] + impl frame_benchmarking::Benchmark for Runtime { + fn benchmark_metadata(_: bool) -> ( + Vec, + Vec, + ) { + unimplemented!() + } + + fn dispatch_benchmark( + _: frame_benchmarking::BenchmarkConfig + ) -> Result, sp_runtime::RuntimeString> { + unimplemented!() + } + } + + impl pallet_lottery::runtime::LotteryApi for Runtime { + fn not_in_drawing_freezeout( + ) -> bool { + unimplemented!(); + } + fn current_prize_pool() -> u128 { + unimplemented!() + } + fn next_drawing_at() -> Option { + unimplemented!() + } + } + + impl pallet_manta_pay::runtime::PullLedgerDiffApi for Runtime { + fn pull_ledger_diff( + _checkpoint: RawCheckpoint, + _max_receiver: u64, + _max_sender: u64 + ) -> PullResponse { + unimplemented!() + } + fn pull_ledger_total_count() -> [u8; 16] { + unimplemented!() + } + fn initial_pull(_checkpoint: RawCheckpoint, _max_receiver: u64) -> InitialSyncResponse { + unimplemented!() + } + } + + impl pallet_manta_sbt::runtime::SBTPullLedgerDiffApi for Runtime { + fn sbt_pull_ledger_diff( + _checkpoint: RawCheckpoint, + _max_receiver: u64, + _max_sender: u64 + ) -> PullResponse { + unimplemented!() + } + fn sbt_pull_ledger_total_count() -> [u8; 16] { + unimplemented!() + } + } + + impl nimbus_primitives::NimbusApi for Runtime { + fn can_author(_author: NimbusId, _relay_parent: u32, _parent_header: &::Header) -> bool { + unimplemented!() + } + } + + // zenlink runtime outer apis + impl zenlink_protocol_runtime_api::ZenlinkProtocolApi for Runtime { + + fn get_balance( + _asset_id: ZenlinkAssetId, + _owner: AccountId + ) -> AssetBalance { + unimplemented!() + } + + fn get_pair_by_asset_id( + _asset_0: ZenlinkAssetId, + _asset_1: ZenlinkAssetId + ) -> Option> { + unimplemented!() + } + + fn get_amount_in_price( + _supply: AssetBalance, + _path: Vec + ) -> AssetBalance { + unimplemented!() + } + + fn get_amount_out_price( + _supply: AssetBalance, + _path: Vec + ) -> AssetBalance { + unimplemented!() + } + + fn get_estimate_lptoken( + _token_0: ZenlinkAssetId, + _token_1: ZenlinkAssetId, + _amount_0_desired: AssetBalance, + _amount_1_desired: AssetBalance, + _amount_0_min: AssetBalance, + _amount_1_min: AssetBalance, + ) -> AssetBalance{ + unimplemented!() + } + + fn calculate_remove_liquidity( + _asset_0: ZenlinkAssetId, + _asset_1: ZenlinkAssetId, + _amount: AssetBalance, + ) -> Option<(AssetBalance, AssetBalance)> { + unimplemented!() + } + } + + impl pallet_farming_rpc_runtime_api::FarmingRuntimeApi for Runtime { + fn get_farming_rewards(_who: AccountId, _pid: PoolId) -> Vec<(CalamariAssetId, Balance)> { + unimplemented!() + } + + fn get_gauge_rewards(_who: AccountId, _pid: PoolId) -> Vec<(CalamariAssetId, Balance)> { + unimplemented!() + } + } +} diff --git a/node/src/instant_finalize.rs b/node/src/instant_finalize.rs deleted file mode 100644 index 5d2ab0f36..000000000 --- a/node/src/instant_finalize.rs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2020-2024 Manta Network. -// This file is part of Manta. -// -// Manta 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. -// -// Manta 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 Manta. If not, see . - -//! Instant Seal - -use sc_consensus::BlockImport; -use sp_runtime::traits::Block as BlockT; - -pub struct InstantFinalizeBlockImport(I); - -impl InstantFinalizeBlockImport { - /// Create a new instance. - pub fn new(inner: I) -> Self { - Self(inner) - } -} - -#[async_trait::async_trait] -impl BlockImport for InstantFinalizeBlockImport -where - Block: BlockT, - I: BlockImport + Send, -{ - type Error = I::Error; - type Transaction = I::Transaction; - - async fn check_block( - &mut self, - block: sc_consensus::BlockCheckParams, - ) -> Result { - self.0.check_block(block).await - } - - async fn import_block( - &mut self, - mut block_import_params: sc_consensus::BlockImportParams, - ) -> Result { - block_import_params.finalized = true; - self.0.import_block(block_import_params).await - } -} diff --git a/node/src/lib.rs b/node/src/lib.rs index 37030283f..d7fe8c5a8 100644 --- a/node/src/lib.rs +++ b/node/src/lib.rs @@ -20,12 +20,12 @@ extern crate alloc; -mod aura_or_nimbus_consensus; +pub mod aura_or_nimbus_consensus; pub mod builder; pub mod chain_specs; pub mod cli; pub mod client; pub mod command; -mod instant_finalize; +mod fake_runtime_api; pub mod rpc; pub mod service; diff --git a/node/src/rpc/calamari.rs b/node/src/rpc/calamari.rs index 9174a7391..ed3ec566f 100644 --- a/node/src/rpc/calamari.rs +++ b/node/src/rpc/calamari.rs @@ -38,7 +38,9 @@ use zenlink_protocol_rpc::{ZenlinkProtocol, ZenlinkProtocolApiServer}; use zenlink_protocol_runtime_api::ZenlinkProtocolApi as ZenlinkProtocolRuntimeApi; /// Instantiate all RPC extensions for calamari. -pub fn create_calamari_full(deps: FullDeps) -> Result +pub fn create_calamari_full( + deps: FullDeps, +) -> Result where C: ProvideRuntimeApi + HeaderBackend @@ -57,7 +59,7 @@ where C::Api: ZenlinkProtocolRuntimeApi, P: TransactionPool + Sync + Send + 'static, { - use frame_rpc_system::{System, SystemApiServer}; + use frame_rpc_system::System; use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; let mut module = RpcExtension::new(()); @@ -65,6 +67,7 @@ where client, pool, deny_unsafe, + .. } = deps; module diff --git a/node/src/rpc/manta.rs b/node/src/rpc/manta.rs index 51e2e74ad..fac15cbc6 100644 --- a/node/src/rpc/manta.rs +++ b/node/src/rpc/manta.rs @@ -33,9 +33,10 @@ use zenlink_protocol_rpc::{ZenlinkProtocol, ZenlinkProtocolApiServer}; use zenlink_protocol_runtime_api::ZenlinkProtocolApi as ZenlinkProtocolRuntimeApi; /// Instantiate all RPC extensions for manta. -pub fn create_manta_full(deps: FullDeps) -> Result +pub fn create_manta_full(deps: FullDeps) -> Result where C: ProvideRuntimeApi + + sc_client_api::BlockBackend + HeaderBackend + AuxStore + HeaderMetadata @@ -51,7 +52,7 @@ where C::Api: ZenlinkProtocolRuntimeApi, P: TransactionPool + Sync + Send + 'static, { - use frame_rpc_system::{System, SystemApiServer}; + use frame_rpc_system::System; use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; let mut module = RpcExtension::new(()); @@ -59,6 +60,7 @@ where client, pool, deny_unsafe, + .. } = deps; module diff --git a/node/src/rpc/mod.rs b/node/src/rpc/mod.rs index e7c99f8d6..b0bebb95b 100644 --- a/node/src/rpc/mod.rs +++ b/node/src/rpc/mod.rs @@ -16,9 +16,12 @@ //! Parachain-specific RPCs implementation. -use manta_primitives::types::{AccountId, Balance, Block, Index as Nonce}; +use frame_rpc_system::SystemApiServer; +use manta_primitives::types::{AccountId, Balance, Block, Hash, Nonce}; +use polkadot_service::SubstrateServiceError; use sc_client_api::AuxStore; -pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor}; +use sc_consensus_manual_seal::rpc::EngineCommand; +pub use sc_rpc::{dev::Dev, DenyUnsafe, SubscriptionTaskExecutor}; use sc_transaction_pool_api::TransactionPool; use sp_api::ProvideRuntimeApi; use sp_block_builder::BlockBuilder; @@ -42,4 +45,6 @@ pub struct FullDeps { pub pool: Arc

, /// Whether to deny unsafe calls pub deny_unsafe: DenyUnsafe, + /// Manual seal command sink + pub command_sink: Option>>, } diff --git a/node/src/service.rs b/node/src/service.rs index 940146175..9d27f9441 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -16,38 +16,42 @@ //! Nimbus-based Parachain Node Service -use crate::{ - client::{RuntimeApiCommon, RuntimeApiNimbus}, - rpc, -}; -use codec::Decode; +use crate::{client::RuntimeApiCommon, rpc}; use cumulus_client_cli::CollatorOptions; -use cumulus_client_consensus_common::ParachainConsensus; -use cumulus_client_network::BlockAnnounceValidator; +use cumulus_client_collator::service::CollatorService; +use cumulus_client_consensus_common::ParachainBlockImport as TParachainBlockImport; +use cumulus_client_consensus_proposer::Proposer; +use cumulus_client_parachain_inherent::{MockValidationDataInherentDataProvider, MockXcmConfig}; use cumulus_client_service::{ - prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams, + build_network, prepare_node_config, start_relay_chain_tasks, CollatorSybilResistance, + DARecoveryProfile, StartRelayChainTasksParams, }; -use cumulus_primitives_core::ParaId; -use cumulus_relay_chain_interface::RelayChainInterface; -use futures::{channel::oneshot, FutureExt, StreamExt}; -use jsonrpsee::RpcModule; -pub use manta_primitives::types::{AccountId, Balance, Block, Hash, Header, Index as Nonce}; -use sc_consensus::ImportQueue; +use cumulus_primitives_core::{relay_chain::CollatorPair, ParaId}; +use cumulus_relay_chain_interface::{OverseerHandle, RelayChainInterface}; +use futures::{Stream, StreamExt}; +use hex_literal::hex; +pub use manta_primitives::types::{AccountId, Balance, Block, Hash, Header, Nonce}; +use nimbus_consensus::NimbusManualSealConsensusDataProvider; +use polkadot_service::HeaderBackend; +use sc_consensus::{ImportQueue, LongestChain}; +use sc_consensus_manual_seal::{run_manual_seal, EngineCommand, ManualSealParams}; use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY}; -use sc_network::{config::SyncMode, NetworkBlock, NetworkService}; +use sc_network::NetworkBlock; pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor}; -use sc_service::{ - Configuration, Error, SpawnTaskHandle, TFullBackend, TFullClient, TaskManager, WarpSyncParams, -}; +use sc_service::{Configuration, Error, TFullBackend, TFullClient, TaskManager}; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; -use session_key_primitives::AuraId; +use session_key_primitives::{AuraId, NimbusId}; use sp_api::ConstructRuntimeApi; +use sp_consensus::SyncOracle; +use sp_core::H256; use sp_keystore::KeystorePtr; -use sp_runtime::traits::Block as BlockT; -use std::sync::Arc; +use sp_runtime::traits::BlakeTwo256; +use std::{sync::Arc, time::Duration}; use substrate_prometheus_endpoint::Registry; -const LOG_TARGET_SYNC: &str = "sync::cumulus"; +/// Relaychain raw storage key for timestamp +pub const TIMESTAMP_NOW: &[u8] = + &hex!["f0c365c3cf59d671eb72da0e7a4113c49f1f0515f462cdcf84e0f1d6045dfcbb"]; #[cfg(not(feature = "runtime-benchmarks"))] type HostFunctions = sp_io::SubstrateHostFunctions; @@ -89,40 +93,50 @@ impl sc_executor::NativeExecutionDispatch for CalamariRuntimeExecutor { /// We use wasm executor only now. pub type DefaultExecutorType = WasmExecutor; +/// Backend Type +pub type FullBackend = TFullBackend; + /// Full Client Implementation Type -pub type Client = TFullClient; +pub type FullClient = TFullClient; /// Default Import Queue Type -pub type DefaultImportQueue = - sc_consensus::DefaultImportQueue>; +pub type DefaultImportQueue = sc_consensus::DefaultImportQueue; /// Full Transaction Pool Type -pub type TransactionPool = sc_transaction_pool::FullPool>; +pub type TransactionPool = sc_transaction_pool::FullPool>; + +/// Block Import type +pub type ParachainBlockImport = + TParachainBlockImport>, FullBackend>; /// Components Needed for Chain Ops Subcommands pub type PartialComponents = sc_service::PartialComponents< - Client, - TFullBackend, - (), - DefaultImportQueue, + FullClient, + FullBackend, + Option>, + DefaultImportQueue, TransactionPool, - (Option, Option), + ( + ParachainBlockImport, + Option, + Option, + ), >; /// State Backend Type -pub type StateBackend = sc_client_api::StateBackendFor, Block>; +pub type StateBackend = sc_client_api::StateBackendFor; /// Starts a `ServiceBuilder` for a full service. /// -/// Use this macro if you don't actually need the full service, but just the builder in order to +/// Use this function if you don't actually need the full service, but just the builder in order to /// be able to perform chain operations. pub fn new_partial( config: &Configuration, + local_dev_service: bool, ) -> Result, Error> where - RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: - RuntimeApiCommon + sp_consensus_aura::AuraApi, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi::RuntimeApi: RuntimeApiCommon + sp_consensus_aura::AuraApi, { let telemetry = config .telemetry_endpoints @@ -171,15 +185,42 @@ where client.clone(), ); - let import_queue = crate::aura_or_nimbus_consensus::import_queue( - // single step block import pipeline, after nimbus/aura seal, import block into client - client.clone(), - client.clone(), - backend.clone(), - &task_manager.spawn_essential_handle(), - config.prometheus_registry(), - telemetry.as_ref().map(|telemetry| telemetry.handle()), - )?; + let maybe_select_chain = if local_dev_service { + Some(sc_consensus::LongestChain::new(backend.clone())) + } else { + None + }; + + let (import_queue, block_import) = if local_dev_service { + let block_import = ParachainBlockImport::new(client.clone(), backend.clone()); + ( + crate::aura_or_nimbus_consensus::import_queue( + client.clone(), + client.clone(), + backend.clone(), + &task_manager.spawn_essential_handle(), + config.prometheus_registry(), + telemetry.as_ref().map(|telemetry| telemetry.handle()), + !local_dev_service, + )?, + block_import, + ) + } else { + let parachain_block_import = + ParachainBlockImport::new_with_delayed_best_block(client.clone(), backend.clone()); + ( + crate::aura_or_nimbus_consensus::import_queue( + client.clone(), + client.clone(), + backend.clone(), + &task_manager.spawn_essential_handle(), + config.prometheus_registry(), + telemetry.as_ref().map(|telemetry| telemetry.handle()), + !local_dev_service, + )?, + parachain_block_import, + ) + }; Ok(PartialComponents { backend, @@ -188,8 +229,8 @@ where keystore_container, task_manager, transaction_pool, - select_chain: (), - other: (telemetry, telemetry_worker_handle), + select_chain: maybe_select_chain, + other: (block_import, telemetry, telemetry_worker_handle), }) } @@ -197,42 +238,31 @@ where /// /// This is the actual implementation that is abstract over the executor and the runtime api. #[sc_tracing::logging::prefix_logs_with("Parachain")] -async fn start_node_impl( +#[allow(clippy::too_many_arguments)] +pub async fn start_parachain_node( parachain_config: Configuration, polkadot_config: Configuration, collator_options: CollatorOptions, id: ParaId, - full_rpc: FullRpc, - build_consensus: BIC, - hwbench: Option, -) -> sc_service::error::Result<(TaskManager, Arc>)> + rpc_ext_builder: RB, + block_authoring_duration: Duration, + async_backing: bool, +) -> sc_service::error::Result<(TaskManager, Arc>)> where - RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: RuntimeApiCommon - + RuntimeApiNimbus - + sp_consensus_aura::AuraApi, - FullRpc: Fn( - rpc::FullDeps, TransactionPool>, - ) -> Result, Error> + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi::RuntimeApi: RuntimeApiCommon + sp_consensus_aura::AuraApi, + RB: Fn( + rpc::FullDeps, TransactionPool>, + ) -> Result, sc_service::Error> + 'static, - BIC: FnOnce( - ParaId, - Arc>, - Arc>, - Option<&Registry>, - Option, - &TaskManager, - Arc, - Arc>, - Arc>, - KeystorePtr, - bool, - ) -> Result>, Error>, { let parachain_config = prepare_node_config(parachain_config); - let params = new_partial::(¶chain_config)?; - let (mut telemetry, telemetry_worker_handle) = params.other; + let params = new_partial::(¶chain_config, false)?; + let (block_import, mut telemetry, telemetry_worker_handle) = params.other; + + let client = params.client.clone(); + let backend = params.backend.clone(); let mut task_manager = params.task_manager; let (relay_chain_interface, collator_key) = crate::builder::build_relay_chain_interface( @@ -241,47 +271,30 @@ where telemetry_worker_handle, &mut task_manager, collator_options.clone(), - hwbench.clone(), ) .await .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; - let client = params.client.clone(); - let backend = params.backend.clone(); - let block_announce_validator = BlockAnnounceValidator::new(relay_chain_interface.clone(), id); - let force_authoring = parachain_config.force_authoring; let collator = parachain_config.role.is_authority(); let prometheus_registry = parachain_config.prometheus_registry().cloned(); let transaction_pool = params.transaction_pool.clone(); - let import_queue = params.import_queue.service(); + let import_queue_service = params.import_queue.service(); let net_config = sc_network::config::FullNetworkConfiguration::new(¶chain_config.network); - let warp_sync_params = match parachain_config.network.sync_mode { - SyncMode::Warp => { - let target_block = warp_sync_get::( - id, - relay_chain_interface.clone(), - task_manager.spawn_handle(), - ); - Some(WarpSyncParams::WaitForTarget(target_block)) - } - _ => None, - }; - let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = - sc_service::build_network(sc_service::BuildNetworkParams { - config: ¶chain_config, + build_network(cumulus_client_service::BuildNetworkParams { + parachain_config: ¶chain_config, + net_config, client: client.clone(), transaction_pool: transaction_pool.clone(), spawn_handle: task_manager.spawn_handle(), import_queue: params.import_queue, - block_announce_validator_builder: Some(Box::new(|_| { - Box::new(block_announce_validator) - })), - warp_sync_params, - net_config, - })?; + relay_chain_interface: relay_chain_interface.clone(), + para_id: id, + sybil_resistance_level: CollatorSybilResistance::Resistant, + }) + .await?; let rpc_builder = { let client = client.clone(); @@ -292,9 +305,10 @@ where client: client.clone(), pool: transaction_pool.clone(), deny_unsafe, + command_sink: None, }; - full_rpc(deps) + rpc_ext_builder(deps) }) }; @@ -319,215 +333,86 @@ where }; let overseer_handle = relay_chain_interface + .clone() .overseer_handle() .map_err(|e| sc_service::Error::Application(Box::new(e)))?; let relay_chain_slot_duration = core::time::Duration::from_secs(6); + + start_relay_chain_tasks(StartRelayChainTasksParams { + para_id: id, + announce_block: announce_block.clone(), + client: client.clone(), + task_manager: &mut task_manager, + da_recovery_profile: if collator { + DARecoveryProfile::Collator + } else { + DARecoveryProfile::FullNode + }, + relay_chain_interface: relay_chain_interface.clone(), + import_queue: import_queue_service, + relay_chain_slot_duration, + recovery_handle: Box::new(overseer_handle.clone()), + sync_service: sync_service.clone(), + })?; + if collator { - let parachain_consensus = build_consensus( - id, + start_consensus::( + async_backing, + backend.clone(), client.clone(), - backend, + block_import, prometheus_registry.as_ref(), telemetry.as_ref().map(|t| t.handle()), &task_manager, relay_chain_interface.clone(), transaction_pool, - network, params.keystore_container.keystore(), - force_authoring, - )?; - let spawner = task_manager.spawn_handle(); - start_collator(StartCollatorParams { - para_id: id, - block_status: client.clone(), - announce_block, - client: client.clone(), - task_manager: &mut task_manager, - relay_chain_interface, - spawner, - parachain_consensus, - import_queue, - collator_key: collator_key.expect("Command line arguments do not allow this. qed"), - relay_chain_slot_duration, - recovery_handle: Box::new(overseer_handle), - sync_service, - }) - .await?; - } else { - start_full_node(StartFullNodeParams { - client: client.clone(), + id, + collator_key.expect("Command line arguments do not allow this. qed"), + overseer_handle, announce_block, - task_manager: &mut task_manager, - para_id: id, - relay_chain_interface, + force_authoring, relay_chain_slot_duration, - import_queue, - recovery_handle: Box::new(overseer_handle), - sync_service, - })?; + block_authoring_duration, + sync_service.clone(), + )?; } start_network.start_network(); Ok((task_manager, client)) } -/// Creates a new background task to wait for the relay chain to sync up and retrieve the parachain header -fn warp_sync_get( - para_id: ParaId, - relay_chain_interface: RCInterface, - spawner: SpawnTaskHandle, -) -> oneshot::Receiver<::Header> -where - B: BlockT + 'static, - RCInterface: RelayChainInterface + 'static, -{ - let (sender, receiver) = oneshot::channel::(); - spawner.spawn( - "cumulus-parachain-wait-for-target-block", - None, - async move { - log::debug!( - target: "calamari-network", - "waiting for announce block in a background task...", - ); - - let _ = wait_for_target_block::(sender, para_id, relay_chain_interface) - .await - .map_err(|e| { - log::error!( - target: LOG_TARGET_SYNC, - "Unable to determine parachain target block {:?}", - e - ) - }); - } - .boxed(), - ); - - receiver -} - -/// Waits for the relay chain to have finished syncing and then gets the parachain header that corresponds to the last finalized relay chain block. -async fn wait_for_target_block( - sender: oneshot::Sender<::Header>, - para_id: ParaId, - relay_chain_interface: RCInterface, -) -> Result<(), Box> -where - B: BlockT + 'static, - RCInterface: RelayChainInterface + Send + 'static, -{ - let mut imported_blocks = relay_chain_interface - .import_notification_stream() - .await? - .fuse(); - while imported_blocks.next().await.is_some() { - let is_syncing = relay_chain_interface - .is_major_syncing() - .await - .map_err(|e| { - Box::::from(format!( - "Unable to determine sync status. {e}" - )) - })?; - - if !is_syncing { - let relay_chain_best_hash = relay_chain_interface - .finalized_block_hash() - .await - .map_err(|e| Box::new(e) as Box<_>)?; - - let validation_data = relay_chain_interface - .persisted_validation_data( - relay_chain_best_hash, - para_id, - polkadot_primitives::OccupiedCoreAssumption::TimedOut, - ) - .await - .map_err(|e| format!("{e:?}"))? - .ok_or("Could not find parachain head in relay chain")?; - - let target_block = B::Header::decode(&mut &validation_data.parent_head.0[..]) - .map_err(|e| format!("Failed to decode parachain head: {e}"))?; - - log::debug!( - target: LOG_TARGET_SYNC, - "Target block reached {:?}", - target_block - ); - let _ = sender.send(target_block); - return Ok(()); - } - } - - Err("Stopping following imported blocks. Could not determine parachain target block".into()) -} - -/// Start a calamari parachain node. -pub async fn start_parachain_node( +/// Start node with dev config +#[sc_tracing::logging::prefix_logs_with("Parachain")] +#[allow(clippy::too_many_arguments)] +pub async fn start_dev_node( parachain_config: Configuration, - polkadot_config: Configuration, - collator_options: CollatorOptions, - id: ParaId, - hwbench: Option, - full_rpc: FullRpc, -) -> sc_service::error::Result<(TaskManager, Arc>)> + rpc_ext_builder: RB, +) -> sc_service::error::Result<(TaskManager, Arc>)> where - RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: RuntimeApiCommon - + RuntimeApiNimbus - + sp_consensus_aura::AuraApi, - FullRpc: Fn( - rpc::FullDeps, TransactionPool>, - ) -> Result, Error> + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi::RuntimeApi: RuntimeApiCommon + sp_consensus_aura::AuraApi, + RB: Fn( + rpc::FullDeps, TransactionPool>, + ) -> Result, sc_service::Error> + 'static, { - start_node_impl::( - parachain_config, - polkadot_config, - collator_options, - id, - full_rpc, - crate::builder::build_nimbus_consensus, - hwbench, - ) - .await -} + let params = new_partial::(¶chain_config, true)?; + let (block_import, mut telemetry, _telemetry_worker_handle) = params.other; -/// Start a dev node using nimbus instant-sealing consensus without relaychain attached. -pub async fn start_dev_nimbus_node( - config: Configuration, - full_rpc: FullRpc, -) -> sc_service::error::Result -where - RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: RuntimeApiCommon - + RuntimeApiNimbus - + sp_consensus_aura::AuraApi, - FullRpc: Fn( - rpc::FullDeps, TransactionPool>, - ) -> Result, Error> - + 'static, -{ - use sc_consensus::LongestChain; - - let sc_service::PartialComponents { - client, - backend, - mut task_manager, - import_queue, - keystore_container, - select_chain: _maybe_select_chain, - transaction_pool, - other: (_, _), - } = new_partial::(&config)?; + let transaction_pool = params.transaction_pool.clone(); + let import_queue = params.import_queue; + let client = params.client.clone(); + let backend = params.backend.clone(); - let net_config = sc_network::config::FullNetworkConfiguration::new(&config.network); + let keystore_container = params.keystore_container; + let mut task_manager = params.task_manager; + let net_config = sc_network::config::FullNetworkConfiguration::new(¶chain_config.network); let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = sc_service::build_network(sc_service::BuildNetworkParams { - config: &config, + config: ¶chain_config, client: client.clone(), transaction_pool: transaction_pool.clone(), spawn_handle: task_manager.spawn_handle(), @@ -535,24 +420,107 @@ where block_announce_validator_builder: None, warp_sync_params: None, net_config, + block_relay: None, })?; - let role = config.role.clone(); - let select_chain = LongestChain::new(backend.clone()); + let prometheus_registry = parachain_config.prometheus_registry().cloned(); + let collator = parachain_config.role.is_authority(); - if role.is_authority() { - let dev_consensus = crate::builder::build_dev_nimbus_consensus( + if collator { + log::info!("Is running as Collator"); + let env = sc_basic_authorship::ProposerFactory::with_proof_recording( + task_manager.spawn_handle(), client.clone(), transaction_pool.clone(), - &keystore_container, - select_chain, - &task_manager, - )?; + prometheus_registry.as_ref(), + telemetry.as_ref().map(|x| x.handle()), + ); + + let commands_stream: Box> + Send + Sync + Unpin> = + Box::new( + // This bit cribbed from the implementation of instant seal. + transaction_pool + .pool() + .validated_pool() + .import_notification_stream() + .map(|_| EngineCommand::SealNewBlock { + create_empty: false, + finalize: false, + parent_hash: None, + sender: None, + }), + ); + + let select_chain = params.select_chain.expect( + "`new_partial` builds a `LongestChainRule` when building dev service.\ + We specified the dev service when calling `new_partial`.\ + Therefore, a `LongestChainRule` is present. qed.", + ); + + let client_set_aside_for_cidp = client.clone(); + let client_clone = client.clone(); + let keystore_clone = keystore_container.keystore().clone(); + + let maybe_provide_vrf_digest = + move |nimbus_id: NimbusId, parent: Hash| -> Option { + crate::client::vrf_pre_digest::>( + &client_clone, + &keystore_clone, + nimbus_id, + parent, + ) + }; task_manager.spawn_essential_handle().spawn_blocking( "authorship_task", Some("block-authoring"), - dev_consensus, + run_manual_seal(ManualSealParams { + block_import, + env, + client: client.clone(), + pool: transaction_pool.clone(), + commands_stream, + select_chain, + consensus_data_provider: Some(Box::new(NimbusManualSealConsensusDataProvider { + keystore: keystore_container.keystore(), + client: client.clone(), + additional_digests_provider: maybe_provide_vrf_digest, + _phantom: Default::default(), + })), + create_inherent_data_providers: move |block: H256, ()| { + let maybe_current_para_block = client_set_aside_for_cidp.number(block); + + let client_for_xcm = client_set_aside_for_cidp.clone(); + async move { + let time = sp_timestamp::InherentDataProvider::from_system_time(); + + let current_para_block = maybe_current_para_block? + .ok_or(sp_blockchain::Error::UnknownBlock(block.to_string()))?; + + let mocked_parachain = MockValidationDataInherentDataProvider { + current_para_block, + relay_offset: 1000, + relay_blocks_per_para_block: 2, + // TODO: Recheck + para_blocks_per_relay_epoch: 10, + relay_randomness_config: (), + xcm_config: MockXcmConfig::new( + &*client_for_xcm, + block, + Default::default(), + Default::default(), + ), + raw_downward_messages: Default::default(), + raw_horizontal_messages: Default::default(), + additional_key_values: None, + }; + + let randomness = session_key_primitives::inherent::InherentDataProvider; + + Ok((time, mocked_parachain, randomness)) + } + }, + }), ); } @@ -561,32 +529,182 @@ where let transaction_pool = transaction_pool.clone(); Box::new(move |deny_unsafe, _| { - let deps = rpc::FullDeps { + let deps = crate::rpc::FullDeps { client: client.clone(), pool: transaction_pool.clone(), deny_unsafe, + command_sink: None, }; - full_rpc(deps) + rpc_ext_builder(deps) }) }; sc_service::spawn_tasks(sc_service::SpawnTasksParams { rpc_builder, - client, - transaction_pool, + client: client.clone(), + transaction_pool: transaction_pool.clone(), task_manager: &mut task_manager, - config, + config: parachain_config, keystore: keystore_container.keystore(), - backend, - network, + backend: backend.clone(), + network: network.clone(), system_rpc_tx, tx_handler_controller, - telemetry: None, - sync_service, + telemetry: telemetry.as_mut(), + sync_service: sync_service.clone(), })?; + log::info!("⚠️ DEV STANDALONE MODE."); + network_starter.start_network(); + Ok((task_manager, client)) +} + +#[allow(clippy::too_many_arguments)] +fn start_consensus( + async_backing: bool, + backend: Arc, + client: Arc>, + block_import: ParachainBlockImport, + prometheus_registry: Option<&Registry>, + telemetry: Option, + task_manager: &TaskManager, + relay_chain_interface: Arc, + transaction_pool: Arc>>, + keystore: KeystorePtr, + para_id: ParaId, + collator_key: CollatorPair, + overseer_handle: OverseerHandle, + announce_block: Arc>) + Send + Sync>, + force_authoring: bool, + relay_chain_slot_duration: Duration, + block_authoring_duration: Duration, + sync_oracle: SO, +) -> Result<(), sc_service::Error> +where + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi::RuntimeApi: RuntimeApiCommon + sp_consensus_aura::AuraApi, + sc_client_api::StateBackendFor: sc_client_api::StateBackend, + SO: SyncOracle + Send + Sync + Clone + 'static, +{ + let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( + task_manager.spawn_handle(), + client.clone(), + transaction_pool, + prometheus_registry, + telemetry.clone(), + ); + + let proposer = Proposer::new(proposer_factory); + + let collator_service = CollatorService::new( + client.clone(), + Arc::new(task_manager.spawn_handle()), + announce_block, + client.clone(), + ); + + let create_inherent_data_providers = |_, _| async move { + let time = sp_timestamp::InherentDataProvider::from_system_time(); + + let nimbus = nimbus_primitives::InherentDataProvider; + + let session = session_key_primitives::inherent::InherentDataProvider; + + Ok((time, nimbus, session)) + }; + + let client_clone = client.clone(); + let keystore_clone = keystore.clone(); + let maybe_provide_vrf_digest = + move |nimbus_id: NimbusId, parent: Hash| -> Option { + crate::client::vrf_pre_digest::>( + &client_clone, + &keystore_clone, + nimbus_id, + parent, + ) + }; + + if async_backing { + log::info!("Collator started with asynchronous backing."); + let client_clone = client.clone(); + let code_hash_provider = move |block_hash| { + client_clone + .code_at(block_hash) + .ok() + .map(polkadot_primitives::ValidationCode) + .map(|c| c.hash()) + }; + task_manager.spawn_essential_handle().spawn( + "nimbus", + None, + nimbus_consensus::collators::lookahead::run::< + Block, + _, + _, + _, + FullBackend, + _, + _, + _, + _, + _, + _, + >(nimbus_consensus::collators::lookahead::Params { + additional_digests_provider: maybe_provide_vrf_digest, + authoring_duration: block_authoring_duration, + block_import, + code_hash_provider, + collator_key, + collator_service, + create_inherent_data_providers, + force_authoring, + keystore, + overseer_handle, + para_backend: backend, + para_client: client, + para_id, + proposer, + relay_chain_slot_duration, + relay_client: relay_chain_interface, + slot_duration: None, + sync_oracle, + }), + ); + } else { + log::info!("Collator started without asynchronous backing."); + task_manager.spawn_essential_handle().spawn( + "nimbus", + None, + nimbus_consensus::collators::basic::run::< + Block, + _, + _, + FullBackend, + FullClient, + _, + _, + _, + _, + >(nimbus_consensus::collators::basic::Params { + additional_digests_provider: maybe_provide_vrf_digest, + //authoring_duration: Duration::from_millis(500), + block_import, + collator_key, + collator_service, + create_inherent_data_providers, + force_authoring, + keystore, + overseer_handle, + para_id, + para_client: client, + proposer, + relay_client: relay_chain_interface, + }), + ); + }; - Ok(task_manager) + Ok(()) } diff --git a/pallets/asset-manager/src/benchmarking.rs b/pallets/asset-manager/src/benchmarking.rs index d40338965..d13a61f99 100644 --- a/pallets/asset-manager/src/benchmarking.rs +++ b/pallets/asset-manager/src/benchmarking.rs @@ -17,13 +17,18 @@ #![cfg(feature = "runtime-benchmarks")] use crate::{Call, Config, Pallet}; -use frame_benchmarking::{benchmarks, impl_benchmark_test_suite, vec, whitelisted_caller}; +use frame_benchmarking::{benchmarks, impl_benchmark_test_suite, whitelisted_caller}; use frame_support::traits::Get; use frame_system::{EventRecord, RawOrigin}; use manta_primitives::{ - assets::{AssetConfig, AssetRegistryMetadata, FungibleLedger, TestingDefault, UnitsPerSecond}, + assets::{ + AssetConfig, AssetRegistryMetadata, AssetStorageMetadata, FungibleLedger, TestingDefault, + UnitsPerSecond, + }, types::Balance, }; +use scale_info::prelude::*; +use sp_std::vec; use xcm::latest::prelude::*; fn assert_last_event(generic_event: ::RuntimeEvent) { @@ -33,6 +38,27 @@ fn assert_last_event(generic_event: ::RuntimeEvent) { assert_eq!(event, &system_event); } +pub fn register_asset_helper(location: MultiLocation, i: u32) { + let metadata = AssetRegistryMetadata:: { + metadata: AssetStorageMetadata { + name: format!("{}-name", i).into(), + symbol: format!("{}-symbol", i).into(), + decimals: 12, + is_frozen: false, + }, + min_balance: 1, + is_sufficient: true, + }; + Pallet::::register_asset(RawOrigin::Root.into(), location.into(), metadata) + .expect("Filed to register asset"); + Pallet::::set_units_per_second( + RawOrigin::Root.into(), + ::AssetId::from(i), + i.into(), + ) + .expect("Filed to set ups"); +} + benchmarks! { where_clause { where T::Location: From, ::AssetId: From } diff --git a/pallets/asset-manager/src/lib.rs b/pallets/asset-manager/src/lib.rs index 8f95c34c1..56e758e2e 100644 --- a/pallets/asset-manager/src/lib.rs +++ b/pallets/asset-manager/src/lib.rs @@ -27,8 +27,7 @@ #![cfg_attr(not(feature = "std"), no_std)] #[cfg(feature = "runtime-benchmarks")] -mod benchmarking; -pub mod migrations; +pub mod benchmarking; pub mod weights; #[cfg(test)] @@ -204,7 +203,6 @@ pub mod pallet { pub start_id: T::AssetId, } - #[cfg(feature = "std")] impl Default for GenesisConfig { #[inline] fn default() -> Self { @@ -215,7 +213,7 @@ pub mod pallet { } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { #[inline] fn build(&self) { assert!( diff --git a/pallets/asset-manager/src/migrations.rs b/pallets/asset-manager/src/migrations.rs deleted file mode 100644 index 331856595..000000000 --- a/pallets/asset-manager/src/migrations.rs +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2020-2024 Manta Network. -// This file is part of Manta. -// -// Manta 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. -// -// Manta 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 Manta. If not, see . - -//! Do storage migration for AllowedDestParaIds which records the count of associated assets for -//! each para id. - -use super::*; -use core::marker::PhantomData; -use frame_support::{ - dispatch::GetStorageVersion, - pallet_prelude::Weight, - traits::{Get, OnRuntimeUpgrade, PalletInfoAccess, StorageVersion}, -}; -use sp_runtime::DispatchError; -use sp_std::vec::Vec; - -/// Storage migration to populate the existing assets' -/// entries in the new AllowedDestParaIds storage item -pub struct AllowedDestParaIdsMigration(PhantomData); - -impl OnRuntimeUpgrade for AllowedDestParaIdsMigration -where - T: GetStorageVersion + Config + PalletInfoAccess, -{ - fn on_runtime_upgrade() -> Weight { - // currently, it's 0 on calamari. - let storage_version = ::on_chain_storage_version(); - if storage_version < 1 { - log::info!(target: "asset-manager", "Start to execute storage migration for asset-manager."); - let mut reads: u64 = 0; - let mut writes: u64 = 0; - LocationAssetId::::iter().for_each(|(location, _asset_id)| { - reads += 1; - if let Some(para_id) = - Pallet::::para_id_from_multilocation(location.into().as_ref()) - { - if *para_id != 2084 { - let _ = Pallet::::increase_count_of_associated_assets(*para_id); - reads += 1; // There's one read in method increase_count_of_associated_assets. - writes += 1; // There's one write in method increase_count_of_associated_assets. - } - } - }); - // Update storage version. - StorageVersion::new(1u16).put::(); - writes += 1; - T::DbWeight::get() - .reads(reads) - .saturating_add(T::DbWeight::get().writes(writes)) - } else { - log::info!("✅ no migration for asset-manager."); - // only 1 read - T::DbWeight::get().reads(1) - } - } - - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, DispatchError> { - let storage_version = ::on_chain_storage_version(); - if storage_version >= 1 { - return Err(DispatchError::Other( - "Storage version is >= 1, the migration won't be executed.", - )); - } - Ok(Vec::new()) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), DispatchError> { - let storage_version = ::on_chain_storage_version(); - if storage_version < 1 { - return Err(DispatchError::Other( - "Storage version is >= 1, the migration won't be executed.", - )); - } - let acala = (2000, 3); // karura has 3 asset locations on calamari. - let moonbeam = (2023, 1); // moonbean has 1 asset location on calamari. - let calamari = 2084; // our own asset location won't be counted. - if AllowedDestParaIds::::get(acala.0) == Some(acala.1) - && AllowedDestParaIds::::get(moonbeam.0) == Some(moonbeam.1) - && AllowedDestParaIds::::get(calamari).is_none() - { - log::info!("✅ Storage migration for asset-manager has been executed successfully."); - Ok(()) - } else { - Err(DispatchError::Other( - "Failed to executed storage migration for asset-manager.", - )) - } - } -} diff --git a/pallets/asset-manager/src/mock.rs b/pallets/asset-manager/src/mock.rs index b12378443..dcb20cf0e 100644 --- a/pallets/asset-manager/src/mock.rs +++ b/pallets/asset-manager/src/mock.rs @@ -20,12 +20,11 @@ //! Mock runtime for asset-manager use crate as pallet_asset_manager; -use crate::mock::sp_api_hidden_includes_construct_runtime::hidden_include::traits::GenesisBuild; use frame_support::{ - construct_runtime, + construct_runtime, derive_impl, pallet_prelude::DispatchResult, parameter_types, - traits::{AsEnsureOriginWithArg, ConstU128, ConstU32}, + traits::{AsEnsureOriginWithArg, ConstU128, ConstU32, ConstU64}, PalletId, }; use frame_system as system; @@ -36,10 +35,13 @@ use manta_primitives::{ AssetStorageMetadata, BalanceType, LocationType, NativeAndNonNative, }, constants::{ASSET_MANAGER_PALLET_ID, ASSET_STRING_LIMIT}, - types::{AccountId, Balance, BlockNumber, CalamariAssetId, Header}, + types::{AccountId, Balance, CalamariAssetId}, }; use sp_core::H256; -use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; +use sp_runtime::{ + traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, +}; use xcm::{ prelude::{Parachain, X1}, v3::MultiLocation, @@ -50,6 +52,7 @@ parameter_types! { pub const SS58Prefix: u8 = manta_primitives::constants::CALAMARI_SS58PREFIX; } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl system::Config for Runtime { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); @@ -57,15 +60,14 @@ impl system::Config for Runtime { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = BlockNumber; + type Nonce = u64; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; - type BlockHashCount = ConstU32<250>; + type BlockHashCount = ConstU64<250>; type Version = (); type PalletInfo = PalletInfo; type AccountData = pallet_balances::AccountData; @@ -125,7 +127,8 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); type MaxFreezes = ConstU32<1>; type MaxHolds = ConstU32<1>; @@ -235,27 +238,23 @@ impl pallet_asset_manager::Config for Runtime { type WeightInfo = (); } -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Runtime { - System: frame_system::{Pallet, Call, Storage, Config, Event} = 0, - Assets: pallet_assets::{Pallet, Storage, Event} = 1, - AssetManager: pallet_asset_manager::{Pallet, Call, Storage, Event} = 2, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 3, + System: frame_system = 0, + Assets: pallet_assets = 1, + AssetManager: pallet_asset_manager = 2, + Balances: pallet_balances = 3, } ); pub const PALLET_BALANCES_INDEX: u8 = 3; pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); pallet_asset_manager::GenesisConfig:: { start_id: >::StartNonNativeAssetId::get(), diff --git a/pallets/collator-selection/src/benchmarking.rs b/pallets/collator-selection/src/benchmarking.rs index 80e27777e..c75e5b8c2 100644 --- a/pallets/collator-selection/src/benchmarking.rs +++ b/pallets/collator-selection/src/benchmarking.rs @@ -20,15 +20,15 @@ use super::*; #[allow(unused)] use crate::Pallet as CollatorSelection; +use codec::Decode; use frame_benchmarking::{ account, benchmarks, impl_benchmark_test_suite, whitelisted_caller, BenchmarkError, }; use frame_support::{ assert_ok, - codec::Decode, traits::{Currency, EnsureOrigin, Get}, }; -use frame_system::{EventRecord, RawOrigin}; +use frame_system::{pallet_prelude::*, EventRecord, RawOrigin}; use pallet_authorship::EventHandler; use pallet_session::{self as session, SessionManager}; use sp_arithmetic::Percent; @@ -284,7 +284,7 @@ benchmarks! { T::Currency::minimum_balance() * 4u32.into(), ); let author = account("author", 0, SEED); - let new_block: T::BlockNumber = 10u32.into(); + let new_block: BlockNumberFor = 10u32.into(); frame_system::Pallet::::set_block_number(new_block); assert!(T::Currency::free_balance(&author) == 0u32.into()); diff --git a/pallets/collator-selection/src/lib.rs b/pallets/collator-selection/src/lib.rs index d9b1323f1..c5e22949d 100644 --- a/pallets/collator-selection/src/lib.rs +++ b/pallets/collator-selection/src/lib.rs @@ -72,7 +72,6 @@ mod tests; #[cfg(feature = "runtime-benchmarks")] mod benchmarking; -pub mod migrations; pub mod weights; #[frame_support::pallet] @@ -81,7 +80,6 @@ pub mod pallet { use core::ops::Div; use frame_support::{ dispatch::{DispatchClass, DispatchResultWithPostInfo}, - inherent::Vec, pallet_prelude::*, sp_runtime::{ traits::{AccountIdConversion, CheckedSub, Convert, One, Zero}, @@ -98,6 +96,7 @@ pub mod pallet { use pallet_session::SessionManager; use sp_arithmetic::Percent; use sp_staking::SessionIndex; + use sp_std::vec::Vec; type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; @@ -235,7 +234,6 @@ pub mod pallet { pub desired_candidates: u32, } - #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { Self { @@ -249,12 +247,12 @@ pub mod pallet { } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { let duplicate_invulnerables = self .invulnerables .iter() - .collect::>(); + .collect::>(); assert!( duplicate_invulnerables.len() == self.invulnerables.len(), "duplicate invulnerables in genesis." @@ -750,7 +748,7 @@ pub mod pallet { /// Keep track of number of authored blocks per authority, uncles are counted as well since /// they're a valid proof of being online. impl - pallet_authorship::EventHandler for Pallet + pallet_authorship::EventHandler> for Pallet { fn note_author(author: T::AccountId) { let pot = Self::account_id(); diff --git a/pallets/collator-selection/src/migrations.rs b/pallets/collator-selection/src/migrations.rs deleted file mode 100644 index c82d9221d..000000000 --- a/pallets/collator-selection/src/migrations.rs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2020-2024 Manta Network. -// This file is part of Manta. -// -// Manta 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. -// -// Manta 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 Manta. If not, see . - -#![cfg_attr(not(feature = "std"), no_std)] - -use super::*; -#[allow(deprecated)] -use frame_support::migration::remove_storage_prefix; -use frame_support::{ - dispatch::GetStorageVersion, - migration::{have_storage_value, storage_key_iter}, - pallet_prelude::Weight, - traits::{Get, PalletInfoAccess, StorageVersion}, - Twox64Concat, -}; - -/// This migrates the pallet from the standard version by parity to our modified storage. -impl Pallet { - pub fn migrate_v0_to_v1() -> frame_support::weights::Weight { - // Storage migrations should use storage versions for safety. - if Self::on_chain_storage_version() < 1 { - log::info!("Executing collator-selection V0->V1 migration!"); - - // Drain all keys from the old (now unused) map - let iter_map = storage_key_iter::( - Self::name().as_bytes(), - b"LastAuthoredBlock", - ) - .drain(); - let mut dropcount = 0; - for _ in iter_map { - dropcount += 1; - } - log::info!(" >>> Cleaned {} keys from LastAuthoredBlock", dropcount); - #[allow(deprecated)] - remove_storage_prefix(Self::name().as_bytes(), b"LastAuthoredBlock", &[]); - log::info!(" >>> Removed LastAuthoredBlock from storage"); - - // Update storage version. - StorageVersion::new(1).put::(); - - // Remove KickThreshold if customized - if have_storage_value(Self::name().as_bytes(), b"KickThreshold", &[]) { - #[allow(deprecated)] - remove_storage_prefix(Self::name().as_bytes(), b"KickThreshold", &[]); - log::info!(" >>> Removed KickThreshold"); - } else { - log::warn!(" !!! Chain did not have KickThreshold in storage. This is unexpected but is possible if the genesis config was never changed"); - } - - // Return the weight consumed by the migration. - T::DbWeight::get().reads_writes(1, dropcount + 1) - } else { - log::debug!("collator-selection V0->V1 migration not needed!"); - Weight::zero() - } - } - pub fn pre_migrate_v0_to_v1() -> Result<(), &'static str> { - let chainver = Self::on_chain_storage_version(); - if chainver >= 1 { - return Err("Migration to V1 does not apply"); - } - if !have_storage_value(Self::name().as_bytes(), b"KickThreshold", &[]) { - log::warn!("Precheck: KickThreshold does not exist"); - } - if storage_key_iter::( - Self::name().as_bytes(), - b"LastAuthoredBlock", - ) - .count() - == 0 - { - return Err("LastAuthoredBlock does not exist"); - } - Ok(()) - } - - pub fn post_migrate_v0_to_v1() -> Result<(), &'static str> { - if Self::on_chain_storage_version() != 1 { - return Err("storage version not upgraded"); - } - if have_storage_value(Self::name().as_bytes(), b"KickThreshold", &[]) { - return Err("KickThreshold wasn't removed"); - } - if storage_key_iter::( - Self::name().as_bytes(), - b"LastAuthoredBlock", - ) - .count() - > 0 - { - return Err("LastAuthoredBlock wasn't removed"); - } - Ok(()) - } -} diff --git a/pallets/collator-selection/src/mock.rs b/pallets/collator-selection/src/mock.rs index 36dcb1e77..a732108da 100644 --- a/pallets/collator-selection/src/mock.rs +++ b/pallets/collator-selection/src/mock.rs @@ -17,42 +17,37 @@ use super::*; use crate as collator_selection; use frame_support::{ - ord_parameter_types, parameter_types, - traits::{ - ConstU16, ConstU32, ConstU64, FindAuthor, GenesisBuild, ValidatorRegistration, ValidatorSet, - }, + derive_impl, ord_parameter_types, parameter_types, + traits::{ConstU16, ConstU32, ConstU64, FindAuthor, ValidatorRegistration, ValidatorSet}, PalletId, }; use frame_system::EnsureSignedBy; -use manta_primitives::types::{BlockNumber, Header}; +use manta_primitives::types::BlockNumber; use sp_arithmetic::Percent; use sp_core::H256; use sp_runtime::{ testing::UintAuthorityId, traits::{BlakeTwo256, IdentityLookup, OpaqueKeys}, - RuntimeAppPublic, + BuildStorage, RuntimeAppPublic, }; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - Authorship: pallet_authorship::{Pallet, Storage}, - Session: pallet_session::{Pallet, Call, Storage, Event, Config}, - CollatorSelection: collator_selection::{Pallet, Call, Storage, Event}, - Aura: pallet_aura::{Pallet, Storage, Config}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, + System: frame_system, + Timestamp: pallet_timestamp, + Authorship: pallet_authorship, + Session: pallet_session, + CollatorSelection: collator_selection, + Aura: pallet_aura, + Balances: pallet_balances, } ); +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); @@ -60,15 +55,14 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = BlockNumber; + type Nonce = u64; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; - type BlockHashCount = ConstU32<250>; + type BlockHashCount = ConstU64<250>; type Version = (); type PalletInfo = PalletInfo; type AccountData = pallet_balances::AccountData; @@ -90,7 +84,8 @@ impl pallet_balances::Config for Test { type MaxLocks = (); type MaxReserves = ConstU32<50>; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); type MaxFreezes = ConstU32<1>; type MaxHolds = ConstU32<1>; @@ -122,6 +117,7 @@ impl pallet_aura::Config for Test { type AuthorityId = sp_consensus_aura::sr25519::AuthorityId; type MaxAuthorities = ConstU32<100_000>; type DisabledValidators = (); + type AllowMultipleBlocksPerSlot = (); } sp_runtime::impl_opaque_keys! { @@ -149,7 +145,7 @@ impl pallet_session::SessionHandler for TestSessionHandler { SessionHandlerCollators::set(keys.iter().map(|(a, _)| *a).collect::>()) } fn on_new_session(_: bool, keys: &[(u64, Ks)], _: &[(u64, Ks)]) { - SessionChangeBlock::set(System::block_number() as u64); + SessionChangeBlock::set(System::block_number()); SessionHandlerCollators::set(keys.iter().map(|(a, _)| *a).collect::>()) } fn on_before_session_ending() {} @@ -217,8 +213,8 @@ impl Config for Test { pub fn new_test_ext() -> sp_io::TestExternalities { sp_tracing::try_init_simple(); - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let invulnerables = vec![1, 2]; let keys = invulnerables @@ -254,10 +250,12 @@ pub fn new_test_ext() -> sp_io::TestExternalities { } pub fn initialize_to_block(n: BlockNumber) { - for i in System::block_number() + 1..=n { - System::set_block_number(i); - >::on_initialize( - i, + for i in System::block_number() + 1..=n.into() { + let i_u32: u32 = i.try_into().unwrap(); + + System::set_block_number(i_u32.into()); + >::on_initialize( + i_u32.into(), ); } } diff --git a/pallets/collator-selection/src/tests.rs b/pallets/collator-selection/src/tests.rs index 866a49d64..fd6dcd56c 100644 --- a/pallets/collator-selection/src/tests.rs +++ b/pallets/collator-selection/src/tests.rs @@ -21,11 +21,11 @@ use crate::{ }; use frame_support::{ assert_noop, assert_ok, - traits::{Currency, GenesisBuild, OnInitialize, ReservableCurrency}, + traits::{Currency, OnInitialize, ReservableCurrency}, }; use pallet_balances::Error as BalancesError; use sp_arithmetic::Percent; -use sp_runtime::{testing::UintAuthorityId, traits::BadOrigin}; +use sp_runtime::{testing::UintAuthorityId, traits::BadOrigin, BuildStorage}; const ALICE: u64 = 1; const BOB: u64 = 2; @@ -742,8 +742,8 @@ fn manta_dont_kick_collator_at_tolerance() { #[should_panic = "duplicate invulnerables in genesis."] fn cannot_set_genesis_value_twice() { sp_tracing::try_init_simple(); - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let invulnerables = vec![1, 1]; diff --git a/pallets/farming/rpc/Cargo.toml b/pallets/farming/rpc/Cargo.toml index a671c25cb..33f239299 100644 --- a/pallets/farming/rpc/Cargo.toml +++ b/pallets/farming/rpc/Cargo.toml @@ -9,14 +9,14 @@ version.workspace = true [dependencies] codec = { workspace = true } -jsonrpsee = { workspace = true, features = ["server", "macros"] } +jsonrpsee = { workspace = true } serde = { workspace = true, features = ["derive"] } -sp-api = { workspace = true } +sp-api = { workspace = true, features = ["std"] } sp-blockchain = { workspace = true } -sp-core = { workspace = true } +sp-core = { workspace = true, features = ["std"] } sp-rpc = { workspace = true } -sp-runtime = { workspace = true } +sp-runtime = { workspace = true, features = ["std"] } -manta-primitives = { workspace = true } -pallet-farming-rpc-runtime-api = { workspace = true } +manta-primitives = { workspace = true, features = ["std"] } +pallet-farming-rpc-runtime-api = { workspace = true, features = ["std"] } diff --git a/pallets/farming/src/benchmarking.rs b/pallets/farming/src/benchmarking.rs index 0247880cf..72d531350 100644 --- a/pallets/farming/src/benchmarking.rs +++ b/pallets/farming/src/benchmarking.rs @@ -18,7 +18,7 @@ #![cfg(feature = "runtime-benchmarks")] use crate::{Pallet as Farming, *}; -use frame_benchmarking::{benchmarks, vec, whitelisted_caller}; +use frame_benchmarking::{benchmarks, whitelisted_caller}; use frame_support::{assert_ok, sp_runtime::traits::UniqueSaturatedFrom}; use frame_system::{Pallet as System, RawOrigin}; use manta_primitives::{ @@ -26,12 +26,13 @@ use manta_primitives::{ types::Balance, }; use pallet_asset_manager::Pallet as AssetManager; +use sp_std::vec; pub const INITIAL_VALUE: u128 = 1_000_000_000_000_000_000_000u128; benchmarks! { where_clause { where T: pallet_assets::Config + pallet_asset_manager::Config, ::AssetId: From } - on_initialize {}:{Farming::::on_initialize(T::BlockNumber::from(10u32));} + on_initialize {}:{Farming::::on_initialize(BlockNumberFor::::from(10u32));} create_farming_pool { let ksm_asset_id = CurrencyIdOf::::unique_saturated_from(8u128); diff --git a/pallets/farming/src/mock.rs b/pallets/farming/src/mock.rs index 9f2629fc4..77f78afd4 100644 --- a/pallets/farming/src/mock.rs +++ b/pallets/farming/src/mock.rs @@ -20,9 +20,10 @@ #![allow(non_upper_case_globals)] use frame_support::{ + derive_impl, dispatch::DispatchResult, ord_parameter_types, parameter_types, - traits::{AsEnsureOriginWithArg, EitherOfDiverse, GenesisBuild}, + traits::{AsEnsureOriginWithArg, EitherOfDiverse}, PalletId, }; use frame_system::{EnsureNever, EnsureRoot, EnsureSignedBy}; @@ -37,9 +38,8 @@ use manta_primitives::{ }; use sp_core::{ConstU128, ConstU32, H256}; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, - AccountId32, + AccountId32, BuildStorage, }; use xcm::{ prelude::{Parachain, X1}, @@ -61,40 +61,37 @@ pub const CHARLIE: AccountId = AccountId32::new([3u8; 32]); pub const TREASURY_ACCOUNT: AccountId = AccountId32::new([9u8; 32]); frame_support::construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Runtime { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Assets: pallet_assets::{Pallet, Storage, Config, Event}, - AssetManager: pallet_asset_manager::{Pallet, Call, Storage, Event}, - Farming: pallet_farming::{Pallet, Call, Storage, Event} + System: frame_system, + Balances: pallet_balances, + Assets: pallet_assets, + AssetManager: pallet_asset_manager, + Farming: pallet_farming, } ); -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; parameter_types! { pub const BlockHashCount: u64 = 250; } + +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountId; type BaseCallFilter = frame_support::traits::Everything; type BlockHashCount = BlockHashCount; type BlockLength = (); - type BlockNumber = u64; type BlockWeights = (); type RuntimeCall = RuntimeCall; type DbWeight = (); type RuntimeEvent = RuntimeEvent; type Hash = H256; type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; + type Nonce = u64; + type Block = Block; type Lookup = IdentityLookup; type OnKilledAccount = (); type OnNewAccount = (); @@ -120,7 +117,8 @@ impl pallet_balances::Config for Runtime { type MaxReserves = (); type ReserveIdentifier = [u8; 8]; type WeightInfo = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); type MaxFreezes = ConstU32<1>; type MaxHolds = ConstU32<1>; @@ -324,8 +322,8 @@ impl ExtBuilder { } pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let initial_asset_accounts = self diff --git a/pallets/manta-pay/src/mock.rs b/pallets/manta-pay/src/mock.rs index 2b0d136f7..fb5d9b15e 100644 --- a/pallets/manta-pay/src/mock.rs +++ b/pallets/manta-pay/src/mock.rs @@ -15,6 +15,7 @@ // along with Manta. If not, see . use frame_support::{ + derive_impl, pallet_prelude::DispatchResult, parameter_types, traits::{AsEnsureOriginWithArg, ConstU128, ConstU32, IsInVec}, @@ -27,12 +28,12 @@ use manta_primitives::{ AssetStorageMetadata, BalanceType, LocationType, NativeAndNonNative, }, constants::{ASSET_MANAGER_PALLET_ID, MANTA_PAY_PALLET_ID}, - types::{Balance, BlockNumber, Header}, + types::{Balance, BlockNumber}, }; use sp_core::H256; use sp_runtime::{ traits::{BlakeTwo256, IdentityLookup}, - AccountId32, + AccountId32, BuildStorage, }; use xcm::{ prelude::{Parachain, X1}, @@ -42,21 +43,17 @@ use xcm::{ use crate::StandardAssetId; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - MantaPay: crate::{Pallet, Call, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Assets: pallet_assets::{Pallet, Storage, Event}, - AssetManager: pallet_asset_manager::{Pallet, Call, Storage, Event}, - TransactionPause: pallet_tx_pause::{Pallet, Storage, Call, Event}, + System: frame_system, + MantaPay: crate, + Balances: pallet_balances, + Assets: pallet_assets, + AssetManager: pallet_asset_manager, + TransactionPause: pallet_tx_pause, } ); @@ -65,6 +62,7 @@ parameter_types! { pub const SS58Prefix: u8 = manta_primitives::constants::CALAMARI_SS58PREFIX; } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); @@ -72,13 +70,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = BlockNumber; + type Nonce = u64; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId32; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -108,7 +105,8 @@ impl pallet_balances::Config for Test { type WeightInfo = (); type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); type MaxFreezes = ConstU32<1>; type MaxHolds = ConstU32<1>; @@ -290,8 +288,8 @@ impl pallet_tx_pause::Config for Test { } pub fn new_test_ext() -> sp_io::TestExternalities { - let t = frame_system::GenesisConfig::default() - .build_storage::() + let t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); t.into() diff --git a/pallets/manta-pay/src/test/payment.rs b/pallets/manta-pay/src/test/payment.rs index 9ee1d9bb2..b08482b64 100644 --- a/pallets/manta-pay/src/test/payment.rs +++ b/pallets/manta-pay/src/test/payment.rs @@ -42,6 +42,7 @@ use manta_support::manta_pay::{ TransferPost as PalletTransferPost, }; +use base64::engine::{general_purpose::STANDARD as BASE64, Engine as _}; use manta_crypto::accumulator::Accumulator; use manta_pay::config::{Asset, Authorization, FullParametersRef, Receiver, ToPrivate, ToPublic}; use manta_primitives::{ @@ -773,12 +774,12 @@ fn pull_ledger_diff_should_work() { let dense_pull_response: manta_support::manta_pay::DensePullResponse = runtime_pull_response.clone().into(); - let dense_receivers = base64::decode(dense_pull_response.receivers).unwrap(); + let dense_receivers = BASE64.decode(dense_pull_response.receivers).unwrap(); let mut slice_of = dense_receivers.as_slice(); let decoded_receivers = ::decode(&mut slice_of).unwrap(); assert_eq!(runtime_pull_response.receivers, decoded_receivers); - let dense_senders = base64::decode(dense_pull_response.senders).unwrap(); + let dense_senders = BASE64.decode(dense_pull_response.senders).unwrap(); let mut slice_of = dense_senders.as_slice(); let decoded_senders = ::decode(&mut slice_of).unwrap(); assert_eq!(runtime_pull_response.senders, decoded_senders); diff --git a/pallets/manta-sbt/src/benchmark/mod.rs b/pallets/manta-sbt/src/benchmark/mod.rs index 3b7076f17..bff1b742a 100644 --- a/pallets/manta-sbt/src/benchmark/mod.rs +++ b/pallets/manta-sbt/src/benchmark/mod.rs @@ -18,11 +18,12 @@ use crate::{ AccountId, Box, Call, Config, EvmAddress, Pallet, Pallet as MantaSBTPallet, TransferPost, }; use codec::Decode; -use frame_benchmarking::{benchmarks, vec, whitelisted_caller}; +use frame_benchmarking::{benchmarks, whitelisted_caller}; use frame_support::traits::{Currency, Get}; use frame_system::RawOrigin; use sp_core::H160; use sp_io::hashing::keccak_256; +use sp_std::vec; const MINTS_OFFSET: usize = 4; const MINT_SIZE: usize = 553; diff --git a/pallets/manta-sbt/src/lib.rs b/pallets/manta-sbt/src/lib.rs index 90398bc86..3b0b9e151 100644 --- a/pallets/manta-sbt/src/lib.rs +++ b/pallets/manta-sbt/src/lib.rs @@ -1315,7 +1315,7 @@ where domain_seperator_msg.extend_from_slice(&sha3_256("1")); // version domain_seperator_msg.extend_from_slice(&to_bytes(chain_id)); // chain id domain_seperator_msg.extend_from_slice( - frame_system::Pallet::::block_hash(T::BlockNumber::zero()).as_ref(), + frame_system::Pallet::::block_hash(BlockNumberFor::::zero()).as_ref(), ); // genesis block hash keccak_256(domain_seperator_msg.as_slice()) } diff --git a/pallets/manta-sbt/src/mock.rs b/pallets/manta-sbt/src/mock.rs index 6e0eae296..aa26fbb65 100644 --- a/pallets/manta-sbt/src/mock.rs +++ b/pallets/manta-sbt/src/mock.rs @@ -17,11 +17,8 @@ //! Mock for MantaSbt use frame_support::{ - parameter_types, - traits::{ - AsEnsureOriginWithArg, ConstU128, ConstU16, ConstU32, ConstU64, Everything, GenesisBuild, - IsInVec, - }, + derive_impl, parameter_types, + traits::{AsEnsureOriginWithArg, ConstU128, ConstU16, ConstU32, ConstU64, Everything, IsInVec}, weights::RuntimeDbWeight, PalletId, }; @@ -33,12 +30,12 @@ use manta_primitives::{ AssetStorageMetadata, BalanceType, LocationType, NativeAndNonNative, }, constants::{ASSET_MANAGER_PALLET_ID, MANTA_PAY_PALLET_ID, MANTA_SBT_PALLET_ID}, - types::{Balance, BlockNumber, Header}, + types::{Balance, BlockNumber}, }; use sp_core::H256; use sp_runtime::{ traits::{BlakeTwo256, IdentityLookup}, - AccountId32, DispatchResult, MultiSignature, MultiSigner, + AccountId32, BuildStorage, DispatchResult, MultiSignature, MultiSigner, }; use xcm::{ prelude::{Parachain, X1}, @@ -50,23 +47,19 @@ use crate::StandardAssetId; pub const ALICE: AccountId32 = sp_runtime::AccountId32::new([0u8; 32]); -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - MantaSBTPallet: crate::{Pallet, Call, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Assets: pallet_assets::{Pallet, Storage, Event}, - AssetManager: pallet_asset_manager::{Pallet, Call, Storage, Event}, - TransactionPause: pallet_tx_pause::{Pallet, Storage, Call, Event}, - MantaPay: pallet_manta_pay::{Pallet, Call, Storage, Event}, + System: frame_system, + Timestamp: pallet_timestamp, + MantaSBTPallet: crate, + Balances: pallet_balances, + Assets: pallet_assets, + AssetManager: pallet_asset_manager, + TransactionPause: pallet_tx_pause, + MantaPay: pallet_manta_pay, } ); @@ -79,6 +72,7 @@ parameter_types! { }; } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Test { type BaseCallFilter = Everything; type BlockWeights = (); @@ -86,13 +80,12 @@ impl frame_system::Config for Test { type DbWeight = MockRocksDbWeight; type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = BlockNumber; + type Nonce = u64; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId32; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -122,7 +115,8 @@ impl pallet_balances::Config for Test { type WeightInfo = (); type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); type MaxFreezes = ConstU32<1>; type MaxHolds = ConstU32<1>; @@ -326,8 +320,8 @@ impl pallet_timestamp::Config for Test { } pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); pallet_asset_manager::GenesisConfig::::default() diff --git a/pallets/manta-support/src/manta_pay.rs b/pallets/manta-support/src/manta_pay.rs index 472b24bf0..cade5ae07 100644 --- a/pallets/manta-support/src/manta_pay.rs +++ b/pallets/manta-support/src/manta_pay.rs @@ -17,6 +17,7 @@ //! Type Definitions for Manta Pay use alloc::{boxed::Box, vec::Vec}; +use base64::engine::{general_purpose::STANDARD as BASE64, Engine as _}; use codec::{Decode, Encode, Error, MaxEncodedLen}; use core::ops::Add; use frame_support::sp_runtime::traits::Zero; @@ -998,8 +999,8 @@ impl From for DenseInitialSyncResponse { fn from(resp: InitialSyncResponse) -> DenseInitialSyncResponse { Self { should_continue: resp.should_continue, - utxo_data: base64::encode(resp.utxo_data.encode()), - membership_proof_data: base64::encode(resp.membership_proof_data.encode()), + utxo_data: BASE64.encode(resp.utxo_data.encode()), + membership_proof_data: BASE64.encode(resp.membership_proof_data.encode()), nullifier_count: resp.nullifier_count, } } @@ -1069,8 +1070,8 @@ impl From for DensePullResponse { fn from(resp: PullResponse) -> DensePullResponse { Self { should_continue: resp.should_continue, - receivers: base64::encode(resp.receivers.encode()), - senders: base64::encode(resp.senders.encode()), + receivers: BASE64.encode(resp.receivers.encode()), + senders: BASE64.encode(resp.senders.encode()), senders_receivers_total: resp.senders_receivers_total, next_checkpoint: None, } diff --git a/pallets/name-service/src/benchmarking.rs b/pallets/name-service/src/benchmarking.rs index 3ea5f73ba..ceec97c3a 100644 --- a/pallets/name-service/src/benchmarking.rs +++ b/pallets/name-service/src/benchmarking.rs @@ -21,7 +21,7 @@ use crate::{Call, Config, Event, Pallet}; use frame_benchmarking::{benchmarks, impl_benchmark_test_suite, whitelisted_caller}; use frame_support::traits::{Currency, Get}; -use frame_system::RawOrigin; +use frame_system::{pallet_prelude::*, RawOrigin}; use manta_support::manta_pay::AccountId; use sp_runtime::traits::Hash; use sp_std::prelude::*; @@ -68,7 +68,7 @@ benchmarks! { Pallet::::register(origin.clone().into(), username.clone(), caller.clone().into())?; // move blocknumber forward so pending register is available to move to records - let new_block: T::BlockNumber = 10u32.into(); + let new_block: BlockNumberFor = 10u32.into(); frame_system::Pallet::::set_block_number(new_block); }: accept_register( @@ -92,7 +92,7 @@ benchmarks! { Pallet::::register(origin.clone().into(), username.clone(), caller.clone().into())?; // move blocknumber forward so pending register is available to move to records - let new_block: T::BlockNumber = 10u32.into(); + let new_block: BlockNumberFor = 10u32.into(); frame_system::Pallet::::set_block_number(new_block); Pallet::::accept_register(origin.clone().into(), username.clone(), caller.clone().into())?; @@ -117,7 +117,7 @@ benchmarks! { Pallet::::register(origin.clone().into(), username.clone(), caller.clone().into())?; // move blocknumber forward so pending register is available to move to records - let new_block: T::BlockNumber = 10u32.into(); + let new_block: BlockNumberFor = 10u32.into(); frame_system::Pallet::::set_block_number(new_block); }: cancel_pending_register( @@ -141,7 +141,7 @@ benchmarks! { Pallet::::register(origin.clone().into(), username.clone(), caller.clone().into())?; // move blocknumber forward so pending register is available to move to records - let new_block: T::BlockNumber = 10u32.into(); + let new_block: BlockNumberFor = 10u32.into(); frame_system::Pallet::::set_block_number(new_block); Pallet::::accept_register(origin.clone().into(), username.clone(), caller.clone().into())?; diff --git a/pallets/name-service/src/lib.rs b/pallets/name-service/src/lib.rs index 602bf1339..abe4e7204 100644 --- a/pallets/name-service/src/lib.rs +++ b/pallets/name-service/src/lib.rs @@ -69,7 +69,7 @@ pub mod pallet { type Currency: ReservableCurrency; #[pallet::constant] - type RegisterWaitingPeriod: Get; + type RegisterWaitingPeriod: Get>; #[pallet::constant] type RegisterPrice: Get>; @@ -134,7 +134,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn pending_register)] pub type PendingRegister = - StorageMap<_, Twox64Concat, T::Hash, (T::Hash, T::BlockNumber), OptionQuery>; + StorageMap<_, Twox64Concat, T::Hash, (T::Hash, BlockNumberFor), OptionQuery>; /// Primary Records, 1 AccountID may have only one primary name #[pallet::storage] @@ -148,7 +148,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::hooks] - impl Hooks for Pallet {} + impl Hooks> for Pallet {} #[pallet::call] impl Pallet { diff --git a/pallets/name-service/src/mock.rs b/pallets/name-service/src/mock.rs index 7c4fee18f..6b1a51be4 100644 --- a/pallets/name-service/src/mock.rs +++ b/pallets/name-service/src/mock.rs @@ -20,37 +20,34 @@ use super::*; use frame_support::{ - construct_runtime, parameter_types, - traits::{ConstU128, ConstU32, Everything}, + construct_runtime, derive_impl, parameter_types, + traits::{ConstU128, ConstU32, ConstU64, Everything}, PalletId, }; -use manta_primitives::{ - constants::NAME_SERVICE_PALLET_ID, - types::{Balance, BlockNumber, Header}, -}; +use manta_primitives::{constants::NAME_SERVICE_PALLET_ID, types::Balance}; use sp_core::H256; use sp_runtime::{ traits::{BlakeTwo256, IdentityLookup}, - AccountId32, + AccountId32, BuildStorage, }; mod name_service { pub use super::super::*; } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; - type Index = u64; - type BlockNumber = BlockNumber; + type Nonce = u64; + type Block = Block; type RuntimeCall = RuntimeCall; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId32; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; - type BlockHashCount = ConstU32<250>; + type BlockHashCount = ConstU64<250>; type BlockWeights = (); type BlockLength = (); type Version = (); @@ -82,7 +79,8 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); type MaxFreezes = ConstU32<1>; type MaxHolds = ConstU32<1>; @@ -95,24 +93,20 @@ parameter_types! { impl Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; - type RegisterWaitingPeriod = ConstU32<2>; + type RegisterWaitingPeriod = ConstU64<2>; type RegisterPrice = ConstU128<0>; type PalletId = NameServicePalletId; type WeightInfo = (); } -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic + pub enum Runtime { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - NameService: name_service::{Pallet, Storage, Call, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, + System: frame_system, + NameService: name_service, + Balances: pallet_balances, } ); @@ -126,8 +120,8 @@ impl Default for ExtBuilder { impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { - let t = frame_system::GenesisConfig::default() - .build_storage::() + let t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); t.into() diff --git a/pallets/pallet-lottery/Cargo.toml b/pallets/pallet-lottery/Cargo.toml index 8e1ba53cb..669abb4bc 100644 --- a/pallets/pallet-lottery/Cargo.toml +++ b/pallets/pallet-lottery/Cargo.toml @@ -14,7 +14,7 @@ function_name = { workspace = true } jsonrpsee = { workspace = true, features = ["server", "macros"], optional = true } log = { workspace = true } scale-info = { workspace = true } -serde = { workspace = true, optional = true } +serde = { workspace = true } # Substrate dependencies frame-support = { workspace = true } diff --git a/pallets/pallet-lottery/src/benchmarks.rs b/pallets/pallet-lottery/src/benchmarks.rs index 316c89151..0f5e86565 100644 --- a/pallets/pallet-lottery/src/benchmarks.rs +++ b/pallets/pallet-lottery/src/benchmarks.rs @@ -18,17 +18,17 @@ //! Benchmarking use crate::{Call, Config, Pallet, Request}; -use frame_benchmarking::{benchmarks, impl_benchmark_test_suite, Zero}; +use frame_benchmarking::{benchmarks, impl_benchmark_test_suite}; use frame_support::{ assert_ok, traits::{Currency, EstimateCallFee, Get, OnFinalize, OnInitialize}, }; -use frame_system::RawOrigin; +use frame_system::{pallet_prelude::BlockNumberFor, RawOrigin}; use pallet_parachain_staking::{ benchmarks::{create_funded_collator, create_funded_user, parachain_staking_on_finalize}, BalanceOf, Pallet as Staking, }; -use sp_runtime::Saturating; +use sp_runtime::{traits::Zero, Saturating}; const MAX_COLLATOR_COUNT: u32 = 63; const USER_SEED: u32 = 696969; @@ -36,7 +36,7 @@ const USER_SEED: u32 = 696969; /// Run to end block and author fn roll_rounds_and_author(rounds: u32) { let total_rounds = rounds + 1u32; - let round_length: T::BlockNumber = Staking::::round().length.into(); + let round_length: BlockNumberFor = Staking::::round().length.into(); let mut now = >::block_number() + 1u32.into(); let end = Staking::::round().first + (round_length * total_rounds.into()); while now < end { diff --git a/pallets/pallet-lottery/src/lib.rs b/pallets/pallet-lottery/src/lib.rs index b87ebcc85..0d55ded13 100644 --- a/pallets/pallet-lottery/src/lib.rs +++ b/pallets/pallet-lottery/src/lib.rs @@ -94,7 +94,7 @@ pub mod pallet { use super::*; pub use ::function_name::named; use frame_support::{ - ensure, log, + ensure, pallet_prelude::*, traits::{ schedule::{v2::Named as ScheduleNamed, DispatchTime, MaybeHashed, LOWEST_PRIORITY}, @@ -107,7 +107,6 @@ pub mod pallet { use manta_primitives::types::PoolId; use orml_traits::MultiCurrency; use pallet_parachain_staking::BalanceOf; - #[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use sp_arithmetic::traits::SaturatedConversion; use sp_core::U256; @@ -132,7 +131,7 @@ pub mod pallet { type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// The Scheduler. type Scheduler: ScheduleNamed< - Self::BlockNumber, + BlockNumberFor, CallOf, Self::PalletsOrigin, Hash = Self::Hash, @@ -145,7 +144,7 @@ pub mod pallet { >>::Balance, > + From>; /// Randomness source to use for determining lottery winner - type RandomnessSource: Randomness; + type RandomnessSource: Randomness>; /// Something that can estimate the cost of sending an extrinsic type EstimateCallFee: frame_support::traits::EstimateCallFee< pallet_parachain_staking::Call, @@ -160,15 +159,15 @@ pub mod pallet { type LotteryPot: Get; /// Time in blocks between lottery drawings #[pallet::constant] - type DrawingInterval: Get; + type DrawingInterval: Get>; /// Time in blocks *before* a drawing in /// Depending on the randomness source, the winner might be established before the drawing, this prevents modification of the eligible winning set after the winner /// has been established but before it is selected by [`Call::draw_lottery`] which modifications of the win-eligble pool are prevented #[pallet::constant] - type DrawingFreezeout: Get; + type DrawingFreezeout: Get>; /// Time in blocks until a collator is done unstaking #[pallet::constant] - type UnstakeLockTime: Get; // XXX: could maybe alculate this from staking LeaveDelayRounds * DefaultBlocksPerRound + type UnstakeLockTime: Get>; // XXX: could maybe alculate this from staking LeaveDelayRounds * DefaultBlocksPerRound /// Weight information for extrinsics in this pallet. type WeightInfo: WeightInfo; } @@ -250,7 +249,7 @@ pub mod pallet { #[pallet::storage] pub(super) type UnstakingCollators = - StorageValue<_, Vec>, ValueQuery>; + StorageValue<_, Vec>>, ValueQuery>; /// This is balance unstaked from a collator that is not needed to service user's withdrawal requests /// Incremented on initiation of a collator unstake in [`Call::request_withdraw`] @@ -269,7 +268,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn withdrawal_request_queue)] pub(super) type WithdrawalRequestQueue = - StorageValue<_, Vec>>, ValueQuery>; + StorageValue<_, Vec, BalanceOf>>, ValueQuery>; /// Incremented whenever delegating tokens to a collator /// Collators are removed from here when their funds are unlocked in [`Call::finish_unstaking_collators`] @@ -278,8 +277,7 @@ pub mod pallet { pub(super) type StakedCollators = StorageMap<_, Blake2_128Concat, T::AccountId, BalanceOf, ValueQuery>; - #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] - #[derive(Clone, Copy, Encode, Decode, TypeInfo, Default)] + #[derive(Clone, Copy, Encode, Decode, TypeInfo, Default, Serialize, Deserialize)] pub struct FarmingParams { pub mint_farming_token: bool, pub destroy_farming_token: bool, @@ -302,7 +300,6 @@ pub mod pallet { pub farming_pool_params: FarmingParamsOf, } - #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { Self { @@ -320,7 +317,7 @@ pub mod pallet { } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { #[inline] fn build(&self) { GasReserve::::set(self.gas_reserve); @@ -970,7 +967,7 @@ pub mod pallet { let mut rnd = [0u8; 32]; rng.fill_bytes(&mut rnd); let randomness = T::Hashing::hash(&rnd); - random = (randomness, ::BlockNumber::zero()); + random = (randomness, BlockNumberFor::::zero()); log::debug!("select-winner using randomness {:?}", random); } #[cfg(not(feature = "runtime-benchmarks"))] @@ -1105,7 +1102,7 @@ pub mod pallet { let delegation_requests_against_this_collator = pallet_parachain_staking::Pallet::::delegation_scheduled_requests(collator.account.clone()); let balance_to_unstake = match delegation_requests_against_this_collator.iter().find(|request|request.delegator == Self::account_id()){ Some(our_request) if matches!(our_request.action, pallet_parachain_staking::DelegationAction::Revoke(_)) => { - if T::BlockNumber::from(our_request.when_executable) > now { + if BlockNumberFor::::from(our_request.when_executable) > now { log::error!("Collator {:?} finished lottery unstaking timelock but not the pallet_parachain_staking one. leaving in queue", collator.account.clone()); return true; }; @@ -1289,7 +1286,7 @@ pub mod pallet { impl Pallet { // public getters for lottery state /// Returns the block the next drawing will execute, if any - pub fn next_drawing_at() -> Option { + pub fn next_drawing_at() -> Option> { T::Scheduler::next_dispatch_time(Self::lottery_schedule_id()).ok() } /// funds in the lottery that are not staked, unstaked-pending-restaking or assigned to previous winners ( can be used to pay TX fees ) diff --git a/pallets/pallet-lottery/src/mock.rs b/pallets/pallet-lottery/src/mock.rs index 507d30b3b..5df478e63 100644 --- a/pallets/pallet-lottery/src/mock.rs +++ b/pallets/pallet-lottery/src/mock.rs @@ -21,11 +21,12 @@ use crate as pallet_lottery; use crate::{pallet, Config, FarmingParamsOf}; use calamari_runtime::currency::KMA; use frame_support::{ - assert_ok, construct_runtime, ord_parameter_types, + assert_ok, construct_runtime, derive_impl, ord_parameter_types, pallet_prelude::*, parameter_types, traits::{ - AsEnsureOriginWithArg, ConstU128, ConstU32, EitherOfDiverse, Everything, GenesisBuild, + fungible::HoldConsideration, AsEnsureOriginWithArg, ConstU128, ConstU32, EitherOfDiverse, + Everything, LinearStoragePrice, }, weights::Weight, }; @@ -37,14 +38,14 @@ use manta_primitives::{ }, constants::ASSET_MANAGER_PALLET_ID, currencies::Currencies, - types::{BlockNumber, CalamariAssetId, Header, PoolId}, + types::{BlockNumber, CalamariAssetId, PoolId}, }; use pallet_parachain_staking::{InflationInfo, Range}; use sp_core::H256; use sp_runtime::{ traits::{BlakeTwo256, Hash, IdentityLookup}, - Perbill, Percent, + BuildStorage, Perbill, Percent, }; use xcm::{ prelude::{Junctions, Parachain, X1}, @@ -78,27 +79,23 @@ pub const JUMBO_ID: CalamariAssetId = 9; pub const POOL_ID: PoolId = 0; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - ParachainStaking: pallet_parachain_staking::{Pallet, Call, Storage, Config, Event}, - Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event}, - BlockAuthor: block_author::{Pallet, Storage}, - CollatorSelection: manta_collator_selection::{Pallet, Call, Storage, Config, Event}, - Lottery: pallet_lottery::{Pallet, Call, Storage, Event, Config}, - Preimage: pallet_preimage::{Pallet, Call, Storage, Event}, - Assets: pallet_assets::{Pallet, Storage, Config, Event}, - AssetManager: pallet_asset_manager::{Pallet, Call, Storage, Event}, - Farming: pallet_farming::{Pallet, Call, Storage, Event} + System: frame_system, + Balances: pallet_balances, + ParachainStaking: pallet_parachain_staking, + Scheduler: pallet_scheduler, + BlockAuthor: block_author, + CollatorSelection: manta_collator_selection, + Lottery: pallet_lottery, + Preimage: pallet_preimage, + Assets: pallet_assets, + AssetManager: pallet_asset_manager, + Farming: pallet_farming, } ); @@ -128,18 +125,19 @@ parameter_types! { pub const AvailableBlockRatio: Perbill = Perbill::one(); pub const SS58Prefix: u8 = manta_primitives::constants::CALAMARI_SS58PREFIX; } + +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Test { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; - type Index = u64; - type BlockNumber = BlockNumber; + type Nonce = u64; + type Block = Block; type RuntimeCall = RuntimeCall; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -167,7 +165,8 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type WeightInfo = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); type MaxFreezes = ConstU32<1>; type MaxHolds = ConstU32<1>; @@ -177,6 +176,9 @@ parameter_types! { // Our NORMAL_DISPATCH_RATIO is 70% of the 5MB limit // So anything more than 3.5MB doesn't make sense here pub const PreimageMaxSize: u32 = 3584 * 1024; + pub const PreimageBaseDeposit: Balance = KMA; + pub const PreimageByteDeposit: Balance = KMA; + pub const PreimageHoldReason: RuntimeHoldReason = RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage); } impl pallet_preimage::Config for Test { @@ -184,19 +186,11 @@ impl pallet_preimage::Config for Test { type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRoot; - // The sum of the below 2 amounts will get reserved every time someone submits a preimage. - // Their sum will be unreserved when the preimage is requested, i.e. when it is going to be used. - type BaseDeposit = ConstU128< - { - /* 1 */ - KMA - }, - >; - type ByteDeposit = ConstU128< - { - /* 1 */ - KMA - }, + type Consideration = HoldConsideration< + AccountId, + Balances, + PreimageHoldReason, + LinearStoragePrice, >; } use sp_std::cmp::Ordering; @@ -630,8 +624,8 @@ impl ExtBuilder { } pub(crate) fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .expect("Frame system builds valid default genesis config"); pallet_balances::GenesisConfig:: { @@ -810,7 +804,7 @@ pub mod from_bench { } /// Rolls forward one block. Returns the new block number. -pub(crate) fn roll_one_block() -> u32 { +pub(crate) fn roll_one_block() -> u64 { Balances::on_finalize(System::block_number()); System::on_finalize(System::block_number()); System::set_block_number(System::block_number() + 1); @@ -822,7 +816,7 @@ pub(crate) fn roll_one_block() -> u32 { } /// Rolls to the desired block. Returns the number of blocks played. -pub(crate) fn roll_to(n: u32) -> u32 { +pub(crate) fn roll_to(n: u64) -> u64 { let mut num_blocks = 0; let mut block = System::block_number(); while block < n { @@ -835,15 +829,19 @@ pub(crate) fn roll_to(n: u32) -> u32 { /// Rolls block-by-block to the beginning of the specified round. /// This will complete the block in which the round change occurs. /// Returns the number of blocks played. -pub(crate) fn roll_to_round_begin(round: u32) -> u32 { - let block = (round - 1) * DefaultBlocksPerRound::get(); +pub(crate) fn roll_to_round_begin(round: u32) -> u64 { + let block = ((round - 1) * DefaultBlocksPerRound::get()) + .try_into() + .unwrap(); roll_to(block) } /// Rolls block-by-block to the end of the specified round. /// The block following will be the one in which the specified round change occurs. -pub(crate) fn roll_to_round_end(round: u32) -> u32 { - let block = round * DefaultBlocksPerRound::get() - 1; +pub(crate) fn roll_to_round_end(round: u32) -> u64 { + let block = (round * DefaultBlocksPerRound::get() - 1) + .try_into() + .unwrap(); roll_to(block) } diff --git a/pallets/pallet-lottery/src/staking/mod.rs b/pallets/pallet-lottery/src/staking/mod.rs index 298dca3eb..b37a6cd2b 100644 --- a/pallets/pallet-lottery/src/staking/mod.rs +++ b/pallets/pallet-lottery/src/staking/mod.rs @@ -19,6 +19,7 @@ mod withdraw_strategies; use super::*; use frame_support::{dispatch::RawOrigin, ensure, traits::EstimateCallFee}; +use frame_system::pallet_prelude::*; use pallet_parachain_staking::BalanceOf; use sp_runtime::{ traits::{Saturating, Zero}, @@ -364,7 +365,7 @@ impl Pallet { #[named] pub(crate) fn do_unstake_collator( - now: T::BlockNumber, + now: BlockNumberFor, some_collator: T::AccountId, ) -> DispatchResult { log::trace!(function_name!()); diff --git a/pallets/pallet-lottery/src/tests.rs b/pallets/pallet-lottery/src/tests.rs index 3c6770571..37d48cd3b 100644 --- a/pallets/pallet-lottery/src/tests.rs +++ b/pallets/pallet-lottery/src/tests.rs @@ -128,7 +128,8 @@ fn depositing_and_withdrawing_in_freezeout_should_not_work() { assert_ok!(Lottery::start_lottery(RawOrigin::Root.into(),)); assert!(Lottery::not_in_drawing_freezeout()); roll_to( - Lottery::next_drawing_at().unwrap() - ::DrawingFreezeout::get(), + Lottery::next_drawing_at().unwrap() + - >::into(::DrawingFreezeout::get()), ); assert!(!Lottery::not_in_drawing_freezeout()); assert_noop!( @@ -504,7 +505,7 @@ fn winner_distribution_should_be_equality_with_equal_deposits() { <::MinDelegatorStk as frame_support::traits::Get>>::get(); let deposit_amount: pallet_parachain_staking::BalanceOf = min_delegator_bond * 10_000u128; for user in 0..NUMBER_OF_USERS { - System::set_block_number(user); + System::set_block_number(user.into()); let (depositor, _) = crate::mock::from_bench::create_funded_user::("depositor", USER_SEED - 1 - user, deposit_amount); assert_ok!(Lottery::deposit( @@ -515,7 +516,7 @@ fn winner_distribution_should_be_equality_with_equal_deposits() { // loop 10000 times, starting from block 5000 to hopefully be outside of drawing freezeout for x in 5_000..5_000+NUMBER_OF_DRAWINGS { // advance block number to reseed RNG - System::set_block_number(NUMBER_OF_USERS + x); + System::set_block_number((NUMBER_OF_USERS + x).into()); // simulate accrued staking rewards assert_ok!(Balances::deposit_into_existing( &Lottery::account_id(), diff --git a/pallets/parachain-staking/Cargo.toml b/pallets/parachain-staking/Cargo.toml index e849dddfa..2877de087 100644 --- a/pallets/parachain-staking/Cargo.toml +++ b/pallets/parachain-staking/Cargo.toml @@ -10,7 +10,7 @@ version.workspace = true [dependencies] log = { workspace = true } -serde = { workspace = true, optional = true } +serde = { workspace = true } # Substrate codec = { workspace = true } diff --git a/pallets/parachain-staking/src/benchmarks.rs b/pallets/parachain-staking/src/benchmarks.rs index 602bd81aa..627ba7788 100644 --- a/pallets/parachain-staking/src/benchmarks.rs +++ b/pallets/parachain-staking/src/benchmarks.rs @@ -21,14 +21,14 @@ use crate::{ AwardedPts, BalanceOf, Call, CandidateBondLessRequest, Config, DelegationAction, Pallet, Points, Range, Round, ScheduledRequest, }; -use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite, vec}; +use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite}; use frame_support::traits::{ tokens::{fungible::Inspect, Fortitude, Preservation}, Currency, Get, OnFinalize, OnInitialize, }; -use frame_system::RawOrigin; +use frame_system::{pallet_prelude::*, RawOrigin}; use sp_runtime::{Perbill, Percent}; -use sp_std::{collections::btree_map::BTreeMap, vec::Vec}; +use sp_std::{collections::btree_map::BTreeMap, vec, vec::Vec}; /// Minimum collator candidate stake pub fn min_candidate_stk() -> BalanceOf { @@ -116,7 +116,7 @@ pub fn parachain_staking_on_finalize(author: T::AccountId) { /// Run to end block and author pub fn roll_to_and_author(round_delay: u32, author: T::AccountId) { let total_rounds = round_delay + 1u32; - let round_length: T::BlockNumber = Pallet::::round().length.into(); + let round_length: BlockNumberFor = Pallet::::round().length.into(); let mut now = >::block_number() + 1u32.into(); let end = Pallet::::round().first + (round_length * total_rounds.into()); while now < end { @@ -940,7 +940,7 @@ benchmarks! { )> = delegators.iter().map(|x| (x.clone(), ::Currency::free_balance(&x))).collect(); // PREPARE RUN_TO_BLOCK LOOP let before_running_round_index = Pallet::::round().current; - let round_length: T::BlockNumber = Pallet::::round().length.into(); + let round_length: BlockNumberFor = Pallet::::round().length.into(); let reward_delay = <::RewardPaymentDelay as Get>::get() + 2u32; let mut now = >::block_number() + 1u32.into(); let mut counter = 0usize; @@ -1097,10 +1097,11 @@ mod tests { use crate::{benchmarks::*, mock::Test}; use frame_support::assert_ok; use sp_io::TestExternalities; + use sp_runtime::BuildStorage; pub fn new_test_ext() -> TestExternalities { - let t = frame_system::GenesisConfig::default() - .build_storage::() + let t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); TestExternalities::new(t) } diff --git a/pallets/parachain-staking/src/delegation_requests.rs b/pallets/parachain-staking/src/delegation_requests.rs index 054a1758a..ae62d84c5 100644 --- a/pallets/parachain-staking/src/delegation_requests.rs +++ b/pallets/parachain-staking/src/delegation_requests.rs @@ -24,9 +24,9 @@ use crate::{ Delegator, DelegatorStatus, }; use codec::{Decode, Encode}; -use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, traits::Get, RuntimeDebug}; +use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, traits::Get}; use scale_info::TypeInfo; -use sp_runtime::traits::Saturating; +use sp_runtime::{traits::Saturating, RuntimeDebug}; use sp_std::{vec, vec::Vec}; /// An action that can be performed upon a delegation diff --git a/pallets/parachain-staking/src/inflation.rs b/pallets/parachain-staking/src/inflation.rs index 039a0ca1e..e58939f51 100644 --- a/pallets/parachain-staking/src/inflation.rs +++ b/pallets/parachain-staking/src/inflation.rs @@ -19,7 +19,6 @@ use crate::pallet::{BalanceOf, Config, Pallet}; use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::traits::Currency; use scale_info::TypeInfo; -#[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use sp_runtime::{PerThing, Perbill, RuntimeDebug}; use substrate_fixed::{transcendental::pow as floatpow, types::I64F64}; @@ -33,9 +32,19 @@ fn rounds_per_year() -> u32 { BLOCKS_PER_YEAR / blocks_per_round } -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] #[derive( - Eq, PartialEq, Clone, Copy, Encode, Decode, Default, RuntimeDebug, MaxEncodedLen, TypeInfo, + Eq, + PartialEq, + Clone, + Copy, + Encode, + Decode, + Default, + RuntimeDebug, + MaxEncodedLen, + TypeInfo, + Serialize, + Deserialize, )] pub struct Range { pub min: T, @@ -97,8 +106,9 @@ pub fn round_issuance_range(round: Range) -> Range { /// Staking expectations pub expect: Range, diff --git a/pallets/parachain-staking/src/lib.rs b/pallets/parachain-staking/src/lib.rs index 0a8ec1658..1284732f4 100644 --- a/pallets/parachain-staking/src/lib.rs +++ b/pallets/parachain-staking/src/lib.rs @@ -252,7 +252,7 @@ pub mod pallet { pub enum Event { /// Started new round. NewRound { - starting_block: T::BlockNumber, + starting_block: BlockNumberFor, round: RoundIndex, selected_collators_number: u32, total_balance: BalanceOf, @@ -423,7 +423,7 @@ pub mod pallet { /// Set blocks per round BlocksPerRoundSet { current_round: RoundIndex, - first_block: T::BlockNumber, + first_block: BlockNumberFor, old: u32, new: u32, new_per_round_inflation_min: Perbill, @@ -434,7 +434,7 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { - fn on_initialize(n: T::BlockNumber) -> Weight { + fn on_initialize(n: BlockNumberFor) -> Weight { let mut weight = ::WeightInfo::base_on_initialize(); let mut round = >::get(); @@ -478,7 +478,7 @@ pub mod pallet { ); weight } - fn on_finalize(_n: T::BlockNumber) { + fn on_finalize(_n: BlockNumberFor) { Self::award_points_to_block_author(); } } @@ -502,7 +502,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn round)] /// Current round index and next round scheduled transition - pub(crate) type Round = StorageValue<_, RoundInfo, ValueQuery>; + pub(crate) type Round = StorageValue<_, RoundInfo>, ValueQuery>; #[pallet::storage] #[pallet::getter(fn delegator_state)] @@ -625,7 +625,6 @@ pub mod pallet { pub inflation_config: InflationInfo>, } - #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { Self { @@ -637,7 +636,7 @@ pub mod pallet { } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { >::put(self.inflation_config.clone()); let mut candidate_count = 0u32; @@ -711,13 +710,13 @@ pub mod pallet { // Choose top TotalSelected collator candidates let (v_count, _, total_staked) = >::select_top_candidates(1u32); // Start Round 1 at Block 0 - let round: RoundInfo = + let round: RoundInfo> = RoundInfo::new(1u32, 0u32.into(), T::DefaultBlocksPerRound::get()); >::put(round); // Snapshot total stake >::insert(1u32, >::get()); >::deposit_event(Event::NewRound { - starting_block: T::BlockNumber::zero(), + starting_block: BlockNumberFor::::zero(), round: 1u32, selected_collators_number: v_count, total_balance: total_staked, @@ -1405,7 +1404,7 @@ pub mod pallet { } /// One-off fn that initializes pallet parameters to onboard the pallet after genesis pub fn initialize_pallet( - starting_block: ::BlockNumber, + starting_block: BlockNumberFor, candidates: Vec, inflation: InflationInfo>, ) -> Result<(), Error> { @@ -1465,7 +1464,7 @@ pub mod pallet { // Choose top TotalSelected collator candidates let (v_count, _, total_staked) = >::select_top_candidates(1u32); // Start Round 1 at the given starting block - let round: RoundInfo = + let round: RoundInfo> = RoundInfo::new(1u32, starting_block, T::DefaultBlocksPerRound::get()); >::put(round); // Snapshot total stake diff --git a/pallets/parachain-staking/src/mock.rs b/pallets/parachain-staking/src/mock.rs index 7d93855f8..80fd3618b 100644 --- a/pallets/parachain-staking/src/mock.rs +++ b/pallets/parachain-staking/src/mock.rs @@ -20,37 +20,33 @@ use crate::{ pallet, AwardedPts, Config, InflationInfo, Points, Range, COLLATOR_LOCK_ID, DELEGATOR_LOCK_ID, }; use frame_support::{ - construct_runtime, parameter_types, - traits::{Everything, GenesisBuild, LockIdentifier, OnFinalize, OnInitialize}, + construct_runtime, derive_impl, parameter_types, + traits::{Everything, LockIdentifier, OnFinalize, OnInitialize}, }; -use manta_primitives::types::{BlockNumber, Header}; +use manta_primitives::types::BlockNumber; use sp_core::H256; use sp_io; use sp_runtime::{ traits::{BlakeTwo256, IdentityLookup}, - Perbill, Percent, + BuildStorage, Perbill, Percent, }; pub type AccountId = u64; pub type Balance = u128; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. // WHITELIST: Remove Session and CollatorSelection after end of whitelist-period construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - ParachainStaking: pallet_parachain_staking::{Pallet, Call, Storage, Config, Event}, - BlockAuthor: block_author::{Pallet, Storage}, - Session: pallet_session::{Pallet, Call, Storage, Event, Config}, - CollatorSelection: manta_collator_selection::{Pallet, Call, Storage, Config, Event}, + System: frame_system, + Balances: pallet_balances, + ParachainStaking: pallet_parachain_staking, + BlockAuthor: block_author, + Session: pallet_session, + CollatorSelection: manta_collator_selection, } ); @@ -61,18 +57,19 @@ parameter_types! { pub const AvailableBlockRatio: Perbill = Perbill::one(); pub const SS58Prefix: u8 = manta_primitives::constants::CALAMARI_SS58PREFIX; } + +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Test { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; - type Index = u64; - type BlockNumber = BlockNumber; + type Nonce = u64; + type Block = Block; type RuntimeCall = RuntimeCall; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -100,7 +97,8 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type WeightInfo = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); type MaxFreezes = ConstU32<1>; type MaxHolds = ConstU32<1>; @@ -318,8 +316,8 @@ impl ExtBuilder { } pub(crate) fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .expect("Frame system builds valid default genesis config"); pallet_balances::GenesisConfig:: { @@ -342,7 +340,7 @@ impl ExtBuilder { } /// Rolls forward one block. Returns the new block number. -pub(crate) fn roll_one_block() -> u32 { +pub(crate) fn roll_one_block() -> u64 { Balances::on_finalize(System::block_number()); System::on_finalize(System::block_number()); System::set_block_number(System::block_number() + 1); @@ -353,7 +351,7 @@ pub(crate) fn roll_one_block() -> u32 { } /// Rolls to the desired block. Returns the number of blocks played. -pub(crate) fn roll_to(n: u32) -> u32 { +pub(crate) fn roll_to(n: u64) -> u64 { let mut num_blocks = 0; let mut block = System::block_number(); while block < n { @@ -366,16 +364,16 @@ pub(crate) fn roll_to(n: u32) -> u32 { /// Rolls block-by-block to the beginning of the specified round. /// This will complete the block in which the round change occurs. /// Returns the number of blocks played. -pub(crate) fn roll_to_round_begin(round: u32) -> u32 { +pub(crate) fn roll_to_round_begin(round: u32) -> u64 { let block = (round - 1) * DefaultBlocksPerRound::get(); - roll_to(block) + roll_to(block.try_into().unwrap()) } /// Rolls block-by-block to the end of the specified round. /// The block following will be the one in which the specified round change occurs. -pub(crate) fn roll_to_round_end(round: u32) -> u32 { +pub(crate) fn roll_to_round_end(round: u32) -> u64 { let block = round * DefaultBlocksPerRound::get() - 1; - roll_to(block) + roll_to(block.try_into().unwrap()) } pub(crate) fn last_event() -> RuntimeEvent { diff --git a/pallets/parachain-staking/src/set.rs b/pallets/parachain-staking/src/set.rs index 36802df81..b912b2763 100644 --- a/pallets/parachain-staking/src/set.rs +++ b/pallets/parachain-staking/src/set.rs @@ -17,14 +17,14 @@ /* TODO: use orml_utilities::OrderedSet without leaking substrate v2.0 dependencies*/ use codec::{Decode, Encode}; use scale_info::TypeInfo; -#[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use sp_runtime::RuntimeDebug; use sp_std::prelude::*; /// An ordered set backed by `Vec` -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] -#[derive(RuntimeDebug, PartialEq, Eq, Encode, Decode, Default, Clone, TypeInfo)] +#[derive( + RuntimeDebug, PartialEq, Eq, Encode, Decode, Default, Clone, TypeInfo, Serialize, Deserialize, +)] pub struct OrderedSet(pub Vec); impl OrderedSet { diff --git a/pallets/parachain-staking/src/tests.rs b/pallets/parachain-staking/src/tests.rs index 93a794882..235e1f5b7 100644 --- a/pallets/parachain-staking/src/tests.rs +++ b/pallets/parachain-staking/src/tests.rs @@ -7650,7 +7650,7 @@ fn deferred_payment_steady_state_event_flow() { total_exposed_amount: 400, }, Event::NewRound { - starting_block: (round - 1) * 5, + starting_block: (>::into(round) - 1) * 5, round, selected_collators_number: 4, total_balance: 1600, diff --git a/pallets/randomness/src/benchmarks.rs b/pallets/randomness/src/benchmarks.rs index 547d54cda..becfc6c3a 100644 --- a/pallets/randomness/src/benchmarks.rs +++ b/pallets/randomness/src/benchmarks.rs @@ -57,10 +57,11 @@ benchmarks! { mod tests { use crate::mock::Test; use sp_io::TestExternalities; + use sp_runtime::BuildStorage; pub fn new_test_ext() -> TestExternalities { - let t = frame_system::GenesisConfig::default() - .build_storage::() + let t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); TestExternalities::new(t) } diff --git a/pallets/randomness/src/mock.rs b/pallets/randomness/src/mock.rs index 8860ac516..74180f882 100644 --- a/pallets/randomness/src/mock.rs +++ b/pallets/randomness/src/mock.rs @@ -17,31 +17,28 @@ //! A minimal runtime including the pallet-randomness pallet use super::*; use crate as pallet_randomness; -use frame_support::{construct_runtime, parameter_types, traits::Everything, weights::Weight}; +use frame_support::{ + construct_runtime, derive_impl, parameter_types, traits::Everything, weights::Weight, +}; use sp_core::{H160, H256}; use sp_runtime::{ traits::{BlakeTwo256, IdentityLookup}, - Perbill, + BuildStorage, Perbill, }; use sp_std::convert::{TryFrom, TryInto}; pub type AccountId = H160; pub type Balance = u128; -pub type BlockNumber = u32; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Randomness: pallet_randomness::{Pallet, Call, Storage, Inherent}, + System: frame_system, + Balances: pallet_balances, + Randomness: pallet_randomness, } ); @@ -52,18 +49,19 @@ parameter_types! { pub const AvailableBlockRatio: Perbill = Perbill::one(); pub const SS58Prefix: u8 = 42; } + +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Test { type BaseCallFilter = Everything; type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; - type Index = u64; - type BlockNumber = BlockNumber; + type Nonce = u64; + type Block = Block; type RuntimeCall = RuntimeCall; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = sp_runtime::generic::Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -92,7 +90,8 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type WeightInfo = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); type MaxFreezes = frame_support::traits::ConstU32<1>; type MaxHolds = frame_support::traits::ConstU32<1>; @@ -135,8 +134,8 @@ impl ExtBuilder { #[allow(dead_code)] pub(crate) fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .expect("Frame system builds valid default genesis config"); pallet_balances::GenesisConfig:: { diff --git a/pallets/tx-pause/Cargo.toml b/pallets/tx-pause/Cargo.toml index 5ae795334..55aa759dc 100644 --- a/pallets/tx-pause/Cargo.toml +++ b/pallets/tx-pause/Cargo.toml @@ -18,9 +18,13 @@ sp-std = { workspace = true } [dev-dependencies] manta-primitives = { workspace = true, features = ["std"] } +manta-support = { workspace = true, features = ["std"] } +pallet-asset-manager = { workspace = true, features = ["std"] } +pallet-assets = { workspace = true, features = ["std"] } pallet-balances = { workspace = true, features = ["std"] } sp-core = { workspace = true } sp-io = { workspace = true } +xcm = { workspace = true, features = ["std"] } [features] default = ["std"] diff --git a/pallets/tx-pause/src/lib.rs b/pallets/tx-pause/src/lib.rs index 144068586..ba8ff64e7 100644 --- a/pallets/tx-pause/src/lib.rs +++ b/pallets/tx-pause/src/lib.rs @@ -24,9 +24,8 @@ mod benchmarking; use frame_support::{ - dispatch::{CallMetadata, GetCallMetadata}, pallet_prelude::*, - traits::{Contains, PalletInfoAccess}, + traits::{CallMetadata, Contains, GetCallMetadata, PalletInfoAccess}, transactional, }; use frame_system::pallet_prelude::*; @@ -107,7 +106,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::hooks] - impl Hooks for Pallet {} + impl Hooks> for Pallet {} #[pallet::call] impl Pallet { diff --git a/pallets/tx-pause/src/mock.rs b/pallets/tx-pause/src/mock.rs index a50597d4d..8f70dfb31 100644 --- a/pallets/tx-pause/src/mock.rs +++ b/pallets/tx-pause/src/mock.rs @@ -23,14 +23,30 @@ use super::*; use frame_support::{ - construct_runtime, ord_parameter_types, parameter_types, - traits::{ConstU32, IsInVec}, + construct_runtime, derive_impl, ord_parameter_types, parameter_types, + traits::{AsEnsureOriginWithArg, ConstU128, ConstU32, ConstU64, IsInVec}, + PalletId, }; -use frame_system::EnsureRoot; -use manta_primitives::types::{Balance, BlockNumber, Header}; - +use frame_system::{EnsureNever, EnsureRoot}; +use manta_primitives::{ + assets::{ + AssetConfig, AssetIdType, AssetLocation, AssetRegistry, AssetRegistryMetadata, + AssetStorageMetadata, BalanceType, LocationType, NativeAndNonNative, + }, + constants::ASSET_MANAGER_PALLET_ID, + types::Balance, +}; +use manta_support::manta_pay::StandardAssetId; use sp_core::H256; -use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; +use sp_runtime::{ + traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, +}; +use xcm::{ + prelude::{Parachain, X1}, + v3::MultiLocation, + VersionedMultiLocation, +}; pub type AccountId = u128; @@ -46,18 +62,18 @@ impl Contains for BaseFilter { } } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; - type Index = u64; - type BlockNumber = BlockNumber; + type Nonce = u64; + type Block = Block; type RuntimeCall = RuntimeCall; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; - type BlockHashCount = ConstU32<250>; + type BlockHashCount = ConstU64<250>; type BlockWeights = (); type BlockLength = (); type Version = (); @@ -87,12 +103,163 @@ impl pallet_balances::Config for Runtime { type MaxReserves = ConstU32<50>; type ReserveIdentifier = (); type WeightInfo = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); type MaxFreezes = ConstU32<1>; type MaxHolds = ConstU32<1>; } +parameter_types! { + // Does not really matter as this will be only called by root + 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; +} + +impl pallet_assets::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Balance = Balance; + type AssetId = StandardAssetId; + type Currency = Balances; + type ForceOrigin = EnsureRoot; + type AssetDeposit = AssetDeposit; + type AssetAccountDeposit = AssetAccountDeposit; + type MetadataDepositBase = MetadataDepositBase; + type MetadataDepositPerByte = MetadataDepositPerByte; + type ApprovalDeposit = ApprovalDeposit; + type StringLimit = AssetsStringLimit; + type Freezer = (); + type Extra = (); + type WeightInfo = pallet_assets::weights::SubstrateWeight; + type RemoveItemsLimit = ConstU32<1000>; + type AssetIdParameter = StandardAssetId; + type CreateOrigin = AsEnsureOriginWithArg>; + type CallbackHandle = (); + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); +} + +pub struct MantaAssetRegistry; +impl BalanceType for MantaAssetRegistry { + type Balance = Balance; +} +impl AssetIdType for MantaAssetRegistry { + type AssetId = StandardAssetId; +} +impl AssetRegistry for MantaAssetRegistry { + type Metadata = AssetStorageMetadata; + type Error = sp_runtime::DispatchError; + + fn create_asset( + asset_id: StandardAssetId, + metadata: AssetStorageMetadata, + min_balance: Balance, + is_sufficient: bool, + ) -> DispatchResult { + Assets::force_create( + RuntimeOrigin::root(), + asset_id, + AssetManager::account_id(), + is_sufficient, + min_balance, + )?; + + Assets::force_set_metadata( + RuntimeOrigin::root(), + asset_id, + metadata.name, + metadata.symbol, + metadata.decimals, + metadata.is_frozen, + )?; + + Assets::force_asset_status( + RuntimeOrigin::root(), + asset_id, + AssetManager::account_id(), + AssetManager::account_id(), + AssetManager::account_id(), + AssetManager::account_id(), + min_balance, + is_sufficient, + metadata.is_frozen, + ) + } + + fn update_asset_metadata( + asset_id: &StandardAssetId, + metadata: AssetStorageMetadata, + ) -> DispatchResult { + Assets::force_set_metadata( + RuntimeOrigin::root(), + *asset_id, + metadata.name, + metadata.symbol, + metadata.decimals, + metadata.is_frozen, + ) + } +} + +parameter_types! { + pub const DummyAssetId: StandardAssetId = 0; + pub const NativeAssetId: StandardAssetId = 1; + pub const StartNonNativeAssetId: StandardAssetId = 8; + pub NativeAssetLocation: AssetLocation = AssetLocation( + VersionedMultiLocation::V3(MultiLocation::new(1, X1(Parachain(1024))))); + pub NativeAssetMetadata: AssetRegistryMetadata = AssetRegistryMetadata { + metadata: AssetStorageMetadata { + name: b"Calamari".to_vec(), + symbol: b"KMA".to_vec(), + decimals: 18, + is_frozen: false, + }, + min_balance: 1u128, + is_sufficient: true, + }; + pub const AssetManagerPalletId: PalletId = ASSET_MANAGER_PALLET_ID; +} + +/// AssetConfig implementations for this runtime +#[derive(Clone, Eq, PartialEq)] +pub struct MantaAssetConfig; +impl LocationType for MantaAssetConfig { + type Location = AssetLocation; +} +impl AssetIdType for MantaAssetConfig { + type AssetId = StandardAssetId; +} +impl BalanceType for MantaAssetConfig { + type Balance = Balance; +} +impl AssetConfig for MantaAssetConfig { + type NativeAssetId = NativeAssetId; + type StartNonNativeAssetId = StartNonNativeAssetId; + type NativeAssetLocation = NativeAssetLocation; + type NativeAssetMetadata = NativeAssetMetadata; + type AssetRegistry = MantaAssetRegistry; + type FungibleLedger = NativeAndNonNative; +} + +impl pallet_asset_manager::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type AssetId = StandardAssetId; + type Location = AssetLocation; + type AssetConfig = MantaAssetConfig; + type ModifierOrigin = EnsureRoot; + type SuspenderOrigin = EnsureRoot; + type PalletId = AssetManagerPalletId; + type WeightInfo = (); + type PermissionlessStartId = ConstU128<100>; + type TokenNameMaxLen = ConstU32<100>; + type TokenSymbolMaxLen = ConstU32<100>; + type PermissionlessAssetRegistryCost = ConstU128<1000>; +} + ord_parameter_types! { pub const One: AccountId = 1; } @@ -111,18 +278,16 @@ impl Config for Runtime { type WeightInfo = (); } -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic + pub enum Runtime { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - TransactionPause: tx_pause::{Pallet, Storage, Call, Event}, - Balances: pallet_balances::{Pallet, Storage, Call, Event}, + System: frame_system, + TransactionPause: tx_pause, + Balances: pallet_balances, + Assets: pallet_assets, + AssetManager: pallet_asset_manager, } ); @@ -136,8 +301,8 @@ impl Default for ExtBuilder { impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { - let t = frame_system::GenesisConfig::default() - .build_storage::() + let t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); t.into() diff --git a/pallets/tx-pause/src/tests.rs b/pallets/tx-pause/src/tests.rs index 000e08e72..ecb6f6154 100644 --- a/pallets/tx-pause/src/tests.rs +++ b/pallets/tx-pause/src/tests.rs @@ -33,6 +33,12 @@ const REMARK_CALL: &::RuntimeCall = const SETCODE_CALL: &::RuntimeCall = &mock::RuntimeCall::System(frame_system::Call::set_code { code: vec![] }); +const SET_UNITS_CALL: &::RuntimeCall = + &mock::RuntimeCall::AssetManager(pallet_asset_manager::Call::set_units_per_second { + asset_id: 0, + units_per_second: 1_000, + }); + #[test] fn pause_transaction_work() { ExtBuilder.build().execute_with(|| { @@ -261,47 +267,44 @@ fn pause_unpause_pallets_work() { // Although we can pause System in testcase, but BaseCallFilter still works because System is in front of TransactionPause. assert_ok!(TransactionPause::pause_pallets( RawOrigin::Root.into(), - vec![b"System".to_vec()] + vec![b"AssetManager".to_vec()] )); System::assert_last_event(Event::TransactionPause(crate::Event::PalletPaused( - b"System".to_vec(), + b"AssetManager".to_vec(), ))); assert_eq!( - TransactionPause::paused_transactions((b"System".to_vec(), b"remark".to_vec())), - Some(()) - ); - assert_eq!( - TransactionPause::paused_transactions((b"System".to_vec(), b"set_code".to_vec())), + TransactionPause::paused_transactions(( + b"AssetManager".to_vec(), + b"set_units_per_second".to_vec() + )), Some(()) ); - assert!(!::BaseCallFilter::contains(REMARK_CALL)); - assert!(!::BaseCallFilter::contains(SETCODE_CALL)); + assert!(!::BaseCallFilter::contains(SET_UNITS_CALL)); // unpause pallets assert_noop!( - TransactionPause::unpause_pallets(RuntimeOrigin::signed(1), vec![b"System".to_vec()],), + TransactionPause::unpause_pallets( + RuntimeOrigin::signed(1), + vec![b"AssetManager".to_vec()], + ), BadOrigin ); assert_ok!(TransactionPause::unpause_pallets( RawOrigin::Root.into(), - vec![b"System".to_vec()], + vec![b"AssetManager".to_vec()], )); System::assert_last_event(Event::TransactionPause(crate::Event::PalletUnpaused( - b"System".to_vec(), + b"AssetManager".to_vec(), ))); assert_eq!( - TransactionPause::paused_transactions((b"System".to_vec(), b"remark".to_vec())), - None - ); - assert_eq!( - TransactionPause::paused_transactions((b"System".to_vec(), b"set_code".to_vec())), + TransactionPause::paused_transactions(( + b"AssetManager".to_vec(), + b"set_units_per_second".to_vec() + )), None ); assert!(::BaseCallFilter::contains( - REMARK_CALL - )); - assert!(::BaseCallFilter::contains( - SETCODE_CALL + SET_UNITS_CALL )); }); } @@ -310,7 +313,7 @@ fn pause_unpause_pallets_work() { fn pause_pallets_weight_works() { ExtBuilder.build().execute_with(|| { let ps: DispatchResultWithPostInfo = - TransactionPause::pause_pallets(RawOrigin::Root.into(), vec![b"System".to_vec()]); + TransactionPause::pause_pallets(RawOrigin::Root.into(), vec![b"AssetManager".to_vec()]); let size: u32 = PausedTransactions::::iter().map(|_x| 1).sum(); let max_call_len: u32 = @@ -323,8 +326,10 @@ fn pause_pallets_weight_works() { assert_eq!(actual_weight, weight_per_tx.saturating_mul(size as u64)); assert!(actual_weight.ref_time() < initial_weight.ref_time()); - let ps2: DispatchResultWithPostInfo = - TransactionPause::unpause_pallets(RawOrigin::Root.into(), vec![b"System".to_vec()]); + let ps2: DispatchResultWithPostInfo = TransactionPause::unpause_pallets( + RawOrigin::Root.into(), + vec![b"AssetManager".to_vec()], + ); let ps2 = ps2.unwrap(); let actual_weight2 = ps2.actual_weight.unwrap(); assert_eq!(actual_weight, actual_weight2); @@ -367,17 +372,17 @@ fn paused_transaction_filter_work() { // pause pallet assert_ok!(TransactionPause::pause_pallets( RawOrigin::Root.into(), - vec![b"System".to_vec()] + vec![b"AssetManager".to_vec()] )); - assert!(PausedTransactionFilter::::contains(REMARK_CALL)); - assert!(PausedTransactionFilter::::contains(SETCODE_CALL)); + assert!(PausedTransactionFilter::::contains(SET_UNITS_CALL)); // unpause pallet assert_ok!(TransactionPause::unpause_pallets( RawOrigin::Root.into(), - vec![b"System".to_vec()] + vec![b"AssetManager".to_vec()] + )); + assert!(!PausedTransactionFilter::::contains( + SET_UNITS_CALL )); - assert!(!PausedTransactionFilter::::contains(REMARK_CALL)); - assert!(!PausedTransactionFilter::::contains(SETCODE_CALL)); }); } diff --git a/pallets/vesting/Cargo.toml b/pallets/vesting/Cargo.toml index f385e354d..05c6c2023 100644 --- a/pallets/vesting/Cargo.toml +++ b/pallets/vesting/Cargo.toml @@ -35,6 +35,8 @@ runtime-benchmarks = [ 'frame-system/runtime-benchmarks', 'pallet-timestamp/runtime-benchmarks', 'pallet-balances/runtime-benchmarks', + 'sp-runtime/runtime-benchmarks', + 'manta-primitives/runtime-benchmarks', ] std = [ "codec/std", diff --git a/pallets/vesting/src/mock.rs b/pallets/vesting/src/mock.rs index 1396edae1..6a614bad8 100644 --- a/pallets/vesting/src/mock.rs +++ b/pallets/vesting/src/mock.rs @@ -16,12 +16,16 @@ use super::*; use crate as calamari_vesting; -use frame_support::{parameter_types, traits::ConstU32}; -use manta_primitives::types::{BlockNumber, Header}; +use frame_support::{ + derive_impl, parameter_types, + traits::{ConstU32, ConstU64}, +}; use sp_core::H256; -use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; +use sp_runtime::{ + traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, +}; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; pub type AccountId = u128; @@ -32,15 +36,12 @@ pub const BOB: AccountId = 2; pub const ALICE_DEPOSIT: Balance = 10_000; frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - CalamariVesting: calamari_vesting::{Pallet, Call, Storage, Event}, + System: frame_system, + Timestamp: pallet_timestamp, + Balances: pallet_balances, + CalamariVesting: calamari_vesting, } ); @@ -48,21 +49,22 @@ parameter_types! { pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights::simple_max(Weight::from_parts(1024, 0)); } + +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Test { type AccountData = pallet_balances::AccountData; type AccountId = AccountId; type BaseCallFilter = frame_support::traits::Everything; - type BlockHashCount = ConstU32<250>; + type BlockHashCount = ConstU64<250>; type BlockLength = (); - type BlockNumber = BlockNumber; + type Block = Block; type BlockWeights = (); type RuntimeCall = RuntimeCall; type DbWeight = (); type RuntimeEvent = RuntimeEvent; type Hash = H256; type Hashing = BlakeTwo256; - type Header = Header; - type Index = u64; + type Nonce = u64; type Lookup = IdentityLookup; type OnKilledAccount = (); type OnNewAccount = (); @@ -85,7 +87,8 @@ impl pallet_balances::Config for Test { type MaxReserves = (); type ReserveIdentifier = [u8; 8]; type WeightInfo = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type FreezeIdentifier = (); type MaxFreezes = ConstU32<1>; type MaxHolds = ConstU32<1>; @@ -135,8 +138,8 @@ impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { EXISTENTIAL_DEPOSIT.with(|v| *v.borrow_mut() = self.existential_deposit); - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); pallet_balances::GenesisConfig:: { balances: vec![(ALICE, ALICE_DEPOSIT * self.existential_deposit)], @@ -154,6 +157,6 @@ impl ExtBuilder { } } -pub(crate) fn run_to_block(n: BlockNumber) { +pub(crate) fn run_to_block(n: u64) { System::set_block_number(n); } diff --git a/pallets/vesting/src/tests.rs b/pallets/vesting/src/tests.rs index a8856c464..f5db1e38e 100644 --- a/pallets/vesting/src/tests.rs +++ b/pallets/vesting/src/tests.rs @@ -94,14 +94,15 @@ fn alice_vesting_for_bob_should_work() { ))); assert_noop!( - Balances::transfer(RuntimeOrigin::signed(BOB), ALICE, vested + 1), + Balances::transfer(&BOB, &ALICE, vested + 1, ExistenceRequirement::AllowDeath), TokenError::Frozen, ); assert_ok!(Balances::transfer( - RuntimeOrigin::signed(BOB), - ALICE, - vested + &BOB, + &ALICE, + vested, + ExistenceRequirement::AllowDeath, )); assert_eq!( Balances::free_balance(ALICE), @@ -125,9 +126,10 @@ fn alice_vesting_for_bob_should_work() { // Now, Bob can transfer all his tokens. assert_ok!(Balances::transfer( - RuntimeOrigin::signed(BOB), - ALICE, - unvested - vested + &BOB, + &ALICE, + unvested - vested, + ExistenceRequirement::AllowDeath, )); assert_eq!(Balances::free_balance(ALICE), ALICE_DEPOSIT); assert_eq!(Balances::free_balance(BOB), 0); @@ -180,14 +182,15 @@ fn alice_vesting_for_bob_claim_slowly_should_work() { .fold(Percent::from_percent(0), |acc, p| acc.saturating_add(p)) * unvested; assert_noop!( - Balances::transfer(RuntimeOrigin::signed(BOB), ALICE, vested + 1), + Balances::transfer(&BOB, &ALICE, vested + 1, ExistenceRequirement::AllowDeath), TokenError::Frozen, ); assert_ok!(Balances::transfer( - RuntimeOrigin::signed(BOB), - ALICE, - vested + &BOB, + &ALICE, + vested, + ExistenceRequirement::AllowDeath )); assert_eq!( Balances::free_balance(ALICE), @@ -233,14 +236,15 @@ fn alice_vesting_for_bob_claim_arbitrarily_should_work() { ))); assert_noop!( - Balances::transfer(RuntimeOrigin::signed(BOB), ALICE, vested_1 + 1), + Balances::transfer(&BOB, &ALICE, vested_1 + 1, ExistenceRequirement::AllowDeath), TokenError::Frozen, ); assert_ok!(Balances::transfer( - RuntimeOrigin::signed(BOB), - ALICE, - vested_1 + &BOB, + &ALICE, + vested_1, + ExistenceRequirement::AllowDeath )); assert_eq!( Balances::free_balance(ALICE), @@ -264,9 +268,10 @@ fn alice_vesting_for_bob_claim_arbitrarily_should_work() { * unvested; assert_noop!( Balances::transfer( - RuntimeOrigin::signed(BOB), - ALICE, - vested_0_to_4 + 1 - vested_1 + &BOB, + &ALICE, + vested_0_to_4 + 1 - vested_1, + ExistenceRequirement::AllowDeath, ), TokenError::Frozen, ); @@ -284,9 +289,10 @@ fn alice_vesting_for_bob_claim_arbitrarily_should_work() { ); assert_ok!(Balances::transfer( - RuntimeOrigin::signed(BOB), - ALICE, - vested_0_to_4 - vested_1 + &BOB, + &ALICE, + vested_0_to_4 - vested_1, + ExistenceRequirement::AllowDeath )); assert_eq!(Balances::free_balance(ALICE), ALICE_DEPOSIT - vested_5); assert_eq!(Balances::free_balance(BOB), vested_5); @@ -321,7 +327,7 @@ fn vesting_complete_should_work() { // Now Bob cannot transfer locked tokens. assert_noop!( - Balances::transfer(RuntimeOrigin::signed(BOB), ALICE, 1), + Balances::transfer(&BOB, &ALICE, 1, ExistenceRequirement::AllowDeath), TokenError::Frozen, ); @@ -342,9 +348,10 @@ fn vesting_complete_should_work() { // Now, Bob can transfer all his tokens. assert_ok!(Balances::transfer( - RuntimeOrigin::signed(BOB), - ALICE, - vested + &BOB, + &ALICE, + vested, + ExistenceRequirement::AllowDeath )); assert_eq!(Balances::free_balance(ALICE), ALICE_DEPOSIT); assert_eq!(Balances::free_balance(BOB), 0); diff --git a/primitives/manta/src/assets.rs b/primitives/manta/src/assets.rs index b1c4fe5ca..4e3cbdf10 100644 --- a/primitives/manta/src/assets.rs +++ b/primitives/manta/src/assets.rs @@ -20,7 +20,6 @@ use alloc::vec::Vec; use codec::{Decode, Encode}; use core::{borrow::Borrow, marker::PhantomData}; use frame_support::{ - dispatch::DispatchError, pallet_prelude::Get, traits::tokens::{ currency::Currency, @@ -32,11 +31,11 @@ use frame_support::{ }; use frame_system::Config; use scale_info::TypeInfo; +use sp_runtime::{traits::MaybeEquivalence, DispatchError}; use xcm::{ v3::{Junctions, MultiLocation}, VersionedMultiLocation, }; -use xcm_executor::traits::Convert; /// Asset Id pub trait AssetIdType { @@ -301,22 +300,20 @@ pub trait UnitsPerSecond: AssetIdType { /// Converter struct implementing `Convert`. MultiLocation to AssetId and the reverse. pub struct AssetIdLocationConvert(PhantomData); -impl Convert for AssetIdLocationConvert +impl MaybeEquivalence for AssetIdLocationConvert where M: AssetIdLocationMap, M::AssetId: Clone, M::Location: Clone + From + Into>, { #[inline] - fn convert_ref(location: impl Borrow) -> Result { - M::asset_id(&(*location.borrow()).into()).ok_or(()) + fn convert(location: &MultiLocation) -> Option { + M::asset_id(&(*location).into()) } #[inline] - fn reverse_ref(asset_id: impl Borrow) -> Result { - M::location(asset_id.borrow()) - .and_then(Into::into) - .ok_or(()) + fn convert_back(asset_id: &M::AssetId) -> Option { + M::location(asset_id.borrow()).and_then(Into::into) } } diff --git a/primitives/manta/src/currencies.rs b/primitives/manta/src/currencies.rs index a1d28b320..777399644 100644 --- a/primitives/manta/src/currencies.rs +++ b/primitives/manta/src/currencies.rs @@ -47,12 +47,15 @@ where A: AssetConfig, A::AssetId: Parameter + Member + Copy + MaybeSerializeDeserialize + Ord + TypeInfo + MaxEncodedLen, - A::Balance: AtLeast32BitUnsigned + A::Balance: 'static + + AtLeast32BitUnsigned + FullCodec + Copy + MaybeSerializeDeserialize + Debug + Default + + Sync + + Send + scale_info::TypeInfo + MaxEncodedLen, Native: fungible::Inspect diff --git a/primitives/manta/src/types.rs b/primitives/manta/src/types.rs index 1b93db9b0..2e9e8ee8a 100644 --- a/primitives/manta/src/types.rs +++ b/primitives/manta/src/types.rs @@ -51,7 +51,7 @@ pub type CalamariAssetId = u128; pub type Balance = u128; /// Transaction Index Type -pub type Index = u32; +pub type Nonce = u32; /// A hash of some data used by the chain. pub type Hash = H256; diff --git a/primitives/manta/src/xcm.rs b/primitives/manta/src/xcm.rs index 79abc6fd1..389495209 100644 --- a/primitives/manta/src/xcm.rs +++ b/primitives/manta/src/xcm.rs @@ -52,8 +52,8 @@ use xcm::{ use xcm_builder::TakeRevenue; use xcm_executor::{ traits::{ - Convert as XcmConvert, MatchesFungible, MatchesFungibles, ShouldExecute, TransactAsset, - WeightTrader, + ConvertLocation, MatchesFungible, MatchesFungibles, Properties, ShouldExecute, + TransactAsset, WeightTrader, }, Assets, }; @@ -152,12 +152,18 @@ where /// Buys weight for XCM execution. We always return the [`TooExpensive`](XcmError::TooExpensive) /// error if this fails. #[inline] - fn buy_weight(&mut self, weight: XcmWeight, payment: Assets) -> Result { + fn buy_weight( + &mut self, + weight: XcmWeight, + payment: Assets, + context: &XcmContext, + ) -> Result { log::debug!( target: "FirstAssetTrader::buy_weight", - "weight: {:?}, payment: {:?}", + "weight: {:?}, payment: {:?}, context: {:?}", weight, - payment + payment, + context, ); let first_asset = payment.fungible_assets_iter().next().ok_or({ @@ -262,7 +268,7 @@ where /// #[inline] - fn refund_weight(&mut self, weight: XcmWeight) -> Option { + fn refund_weight(&mut self, weight: XcmWeight, _context: &XcmContext) -> Option { if let Some((id, prev_amount, units_per_second)) = &mut self.refund_cache { let weight = weight.min(self.weight); self.weight = self.weight.saturating_sub(weight); @@ -300,6 +306,7 @@ pub struct XcmFeesToAccount(PhantomData<(AccountId, A, M, R) impl TakeRevenue for XcmFeesToAccount where + AccountId: Eq, A: Mutate, M: MatchesFungibles, R: Get, @@ -352,7 +359,7 @@ impl where T: Config, A: AssetConfig, - AccountIdConverter: XcmConvert, + AccountIdConverter: ConvertLocation, Native: MatchesFungible, NonNative: MatchesFungibles, { @@ -365,7 +372,7 @@ where asset: &MultiAsset, location: &MultiLocation, ) -> Result<(A::AssetId, T::AccountId, A::Balance)> { - let receiver = AccountIdConverter::convert_ref(location).map_err(|_| { + let receiver = AccountIdConverter::convert_location(location).ok_or({ XcmError::FailedToTransactAsset("Failed Location to AccountId Conversion") })?; let (asset_id, amount) = match ( @@ -390,7 +397,7 @@ where A: AssetConfig, A::AssetId: Clone, A::Balance: Clone, - AccountIdConverter: XcmConvert, + AccountIdConverter: ConvertLocation, Native: MatchesFungible, NonNative: MatchesFungibles, { @@ -398,7 +405,7 @@ where fn deposit_asset( asset: &MultiAsset, location: &MultiLocation, - _context: &XcmContext, + _context: Option<&XcmContext>, ) -> Result { log::debug!( target: "xcm::multi_asset_adapter", @@ -451,7 +458,7 @@ impl> ShouldExecute for AllowTopLevelPaidExecutionFro origin: &MultiLocation, message: &mut [Instruction], max_weight: Weight, - _weight_credit: &mut Weight, + _weight_credit: &mut Properties, ) -> Result<(), ProcessMessageError> { log::trace!( target: "xcm::barriers", @@ -501,7 +508,7 @@ impl> ShouldExecute for AllowTopLevelPaidExecutionDes origin: &MultiLocation, message: &mut [Instruction], max_weight: Weight, - _weight_credit: &mut Weight, + _weight_credit: &mut Properties, ) -> Result<(), ProcessMessageError> { log::trace!( target: "xcm::barriers", diff --git a/primitives/session-keys/src/inherent.rs b/primitives/session-keys/src/inherent.rs index 4f31bff88..f70819d9f 100644 --- a/primitives/session-keys/src/inherent.rs +++ b/primitives/session-keys/src/inherent.rs @@ -1,18 +1,18 @@ -// Copyright 2019-2022 PureStake Inc. -// This file is part of Moonbeam. - -// Moonbeam is free software: you can redistribute it and/or modify +// Copyright 2020-2024 Manta Network. +// This file is part of Manta. +// +// Manta 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. - -// Moonbeam is distributed in the hope that it will be useful, +// +// Manta 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 Moonbeam. If not, see . +// along with Manta. If not, see . //! Inherents used for randomness use codec::{Decode, Encode}; diff --git a/runtime/calamari/Cargo.toml b/runtime/calamari/Cargo.toml index fb053d59a..5d02673aa 100644 --- a/runtime/calamari/Cargo.toml +++ b/runtime/calamari/Cargo.toml @@ -35,6 +35,7 @@ sp-version = { workspace = true } # Substrate frames frame-benchmarking = { workspace = true, optional = true } frame-executive = { workspace = true } +frame-metadata = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-benchmarking = { workspace = true, optional = true } @@ -49,6 +50,7 @@ pallet-balances = { workspace = true } pallet-collective = { workspace = true } pallet-democracy = { workspace = true } pallet-membership = { workspace = true } +pallet-message-queue = { workspace = true } pallet-multisig = { workspace = true } pallet-preimage = { workspace = true } pallet-scheduler = { workspace = true } @@ -66,7 +68,7 @@ pallet-referenda = { workspace = true } # Cumulus dependencies cumulus-pallet-dmp-queue = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } +cumulus-pallet-parachain-system = { workspace = true, features = ["parameterized-consensus-hook"] } cumulus-pallet-session-benchmarking = { workspace = true, optional = true } cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcmp-queue = { workspace = true } @@ -76,15 +78,19 @@ cumulus-primitives-utility = { workspace = true } parachain-info = { workspace = true } # Nimbus Dependencies +async-backing-primitives = { workspace = true } nimbus-primitives = { workspace = true } pallet-aura-style-filter = { workspace = true } pallet-author-inherent = { workspace = true } +session-keys-primitives = { workspace = true } # Polkadot dependencies pallet-xcm = { workspace = true } pallet-xcm-benchmarks = { workspace = true, optional = true } -polkadot-parachain = { workspace = true } +parachains-common = { workspace = true } +polkadot-parachain-primitives = { workspace = true } polkadot-primitives = { workspace = true } +polkadot-runtime-common = { workspace = true } xcm = { workspace = true } xcm-builder = { workspace = true } xcm-executor = { workspace = true } @@ -153,7 +159,6 @@ runtime-benchmarks = [ 'manta-collator-selection/runtime-benchmarks', 'nimbus-primitives/runtime-benchmarks', 'pallet-author-inherent/runtime-benchmarks', - 'pallet-aura-style-filter/runtime-benchmarks', 'pallet-balances/runtime-benchmarks', 'pallet-multisig/runtime-benchmarks', 'pallet-scheduler/runtime-benchmarks', @@ -184,6 +189,7 @@ runtime-benchmarks = [ "pallet-conviction-voting/runtime-benchmarks", "pallet-referenda/runtime-benchmarks", "pallet-ranked-collective/runtime-benchmarks", + 'parachains-common/runtime-benchmarks', ] try-runtime = [ 'frame-try-runtime/try-runtime', @@ -238,6 +244,8 @@ std = [ 'pallet-aura/std', 'sp-api/std', 'sp-arithmetic/std', + 'session-keys-primitives/std', + 'async-backing-primitives/std', 'sp-std/std', 'sp-io/std', 'sp-core/std', @@ -253,12 +261,14 @@ std = [ 'sp-inherents/std', 'frame-support/std', 'frame-executive/std', + 'frame-metadata/std', 'frame-system/std', 'frame-system-rpc-runtime-api/std', 'frame-try-runtime/std', 'frame-benchmarking/std', 'pallet-authorship/std', 'pallet-balances/std', + 'pallet-message-queue/std', 'pallet-multisig/std', 'pallet-parachain-staking/std', 'substrate-fixed/std', @@ -287,12 +297,14 @@ std = [ 'pallet-aura-style-filter/std', 'session-key-primitives/std', 'scale-info/std', - 'polkadot-parachain/std', + 'polkadot-parachain-primitives/std', 'log/std', 'xcm/std', 'xcm-builder/std', 'xcm-executor/std', 'polkadot-primitives/std', + 'polkadot-runtime-common/std', + 'parachains-common/std', 'manta-collator-selection/std', 'calamari-vesting/std', 'pallet-tx-pause/std', diff --git a/runtime/calamari/src/diff_tx_fees.rs b/runtime/calamari/src/diff_tx_fees.rs index bd28169fa..2eef296e1 100644 --- a/runtime/calamari/src/diff_tx_fees.rs +++ b/runtime/calamari/src/diff_tx_fees.rs @@ -28,7 +28,7 @@ use pallet_transaction_payment::Multiplier; use runtime_common::MinimumMultiplier; use sp_runtime::{ traits::{Saturating, Zero}, - AccountId32, FixedPointNumber, MultiAddress, Perbill, Percent, + AccountId32, BuildStorage, FixedPointNumber, MultiAddress, Perbill, Percent, }; use std::str::FromStr; use xcm::prelude::*; @@ -103,7 +103,7 @@ fn diff_tx_fees() { test_runner.execute_with(|| { let opaque_metadata = crate::Runtime::metadata(); let pallets = match opaque_metadata.1 { - frame_support::metadata::RuntimeMetadata::V14(metadata) => metadata.pallets, + frame_metadata::RuntimeMetadata::V15(metadata) => metadata.pallets, _ => unreachable!(), }; assert_eq!(pallets.len(), 39); @@ -191,8 +191,8 @@ fn calculate_all_current_extrinsic_tx_fee() -> ( Vec<(&'static str, &'static str, DispatchInfo, u32)>, sp_io::TestExternalities, ) { - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::default() - .build_storage::() + let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() + .build_storage() .unwrap() .into(); @@ -331,6 +331,8 @@ fn calculate_all_current_extrinsic_tx_fee() -> ( let call = crate::RuntimeCall::Treasury(pallet_treasury::Call::spend { amount: 8, beneficiary: ALICE.into(), + asset_kind: Box::new(()), + valid_from: Some(0), }); let (dispatch_info, call_len) = get_call_details(&call); calamari_runtime_calls.push(("pallet_treasury", "spend", dispatch_info, call_len)); @@ -820,19 +822,6 @@ fn calculate_all_current_extrinsic_tx_fee() -> ( 9, "Please update new extrinsic here." ); - // service_overweight - let call = - crate::RuntimeCall::XcmpQueue(cumulus_pallet_xcmp_queue::Call::service_overweight { - index: 1, - weight_limit: 64.into(), - }); - let (dispatch_info, call_len) = get_call_details(&call); - calamari_runtime_calls.push(( - "cumulus_pallet_xcmp_queue", - "service_overweight", - dispatch_info, - call_len, - )); // suspend_xcm_execution let call = crate::RuntimeCall::XcmpQueue( @@ -892,42 +881,6 @@ fn calculate_all_current_extrinsic_tx_fee() -> ( dispatch_info, call_len, )); - - // update_threshold_weight - let call = crate::RuntimeCall::XcmpQueue( - cumulus_pallet_xcmp_queue::Call::update_threshold_weight { new: 64.into() }, - ); - let (dispatch_info, call_len) = get_call_details(&call); - calamari_runtime_calls.push(( - "cumulus_pallet_xcmp_queue", - "update_threshold_weight", - dispatch_info, - call_len, - )); - - // update_weight_restrict_decay - let call = crate::RuntimeCall::XcmpQueue( - cumulus_pallet_xcmp_queue::Call::update_weight_restrict_decay { new: 64.into() }, - ); - let (dispatch_info, call_len) = get_call_details(&call); - calamari_runtime_calls.push(( - "cumulus_pallet_xcmp_queue", - "update_weight_restrict_decay", - dispatch_info, - call_len, - )); - - // update_xcmp_max_individual_weight - let call = crate::RuntimeCall::XcmpQueue( - cumulus_pallet_xcmp_queue::Call::update_xcmp_max_individual_weight { new: 64.into() }, - ); - let (dispatch_info, call_len) = get_call_details(&call); - calamari_runtime_calls.push(( - "cumulus_pallet_xcmp_queue", - "update_xcmp_max_individual_weight", - dispatch_info, - call_len, - )); } // orml_xtokens diff --git a/runtime/calamari/src/fee.rs b/runtime/calamari/src/fee.rs index 70eb37d0e..c9bf53d09 100644 --- a/runtime/calamari/src/fee.rs +++ b/runtime/calamari/src/fee.rs @@ -46,6 +46,7 @@ mod multiplier_tests { use manta_primitives::constants::time::DAYS; use pallet_transaction_payment::Multiplier; use runtime_common::MinimumMultiplier; + use sp_runtime::BuildStorage; fn fetch_kma_price() -> Result { let body = reqwest::blocking::get( @@ -89,8 +90,8 @@ mod multiplier_tests { ..Default::default() }; - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::default() - .build_storage::() + let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() + .build_storage() .unwrap() .into(); // set the minimum @@ -160,8 +161,8 @@ mod multiplier_tests { let mut multiplier = Multiplier::from_u32(1); let mut blocks = 0; - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::default() - .build_storage::() + let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() + .build_storage() .unwrap() .into(); diff --git a/runtime/calamari/src/lib.rs b/runtime/calamari/src/lib.rs index 5e4ab5ad8..367731ebc 100644 --- a/runtime/calamari/src/lib.rs +++ b/runtime/calamari/src/lib.rs @@ -29,7 +29,7 @@ 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}, + traits::{AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, IdentityLookup}, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, Perbill, Percent, Permill, }; @@ -45,15 +45,17 @@ use frame_support::{ dispatch::DispatchClass, parameter_types, traits::{ - ConstU128, ConstU32, ConstU8, Contains, Currency, EitherOfDiverse, IsInVec, - NeverEnsureOrigin, PrivilegeCmp, + fungible::HoldConsideration, + tokens::{PayFromAccount, UnityAssetBalanceConversion}, + ConstBool, ConstU128, ConstU32, ConstU8, Contains, Currency, EitherOfDiverse, IsInVec, + LinearStoragePrice, PrivilegeCmp, }, weights::{ConstantMultiplier, Weight}, PalletId, }; use frame_system::{ limits::{BlockLength, BlockWeights}, - EnsureRoot, EnsureSigned, + EnsureRoot, EnsureSigned, EnsureWithSuccess, }; use manta_primitives::{ constants::{ @@ -62,7 +64,7 @@ use manta_primitives::{ }, currencies::Currencies, types::{ - AccountId, Balance, BlockNumber, CalamariAssetId, Hash, Header, Index, PoolId, Signature, + AccountId, Balance, BlockNumber, CalamariAssetId, Hash, Header, Nonce, PoolId, Signature, }, }; use manta_support::manta_pay::{InitialSyncResponse, PullResponse, RawCheckpoint}; @@ -75,9 +77,6 @@ use runtime_common::{ use session_key_primitives::{AuraId, NimbusId, VrfId}; use zenlink_protocol::{AssetBalance, AssetId as ZenlinkAssetId, MultiAssetsHandler, PairInfo}; -#[cfg(any(feature = "std", test))] -pub use sp_runtime::BuildStorage; - use xcm::latest::prelude::*; pub mod assets_config; @@ -356,17 +355,17 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; type RuntimeCall = RuntimeCall; type Lookup = AccountIdLookup; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = Hash; type Hashing = BlakeTwo256; - type Header = Header; type RuntimeEvent = RuntimeEvent; type RuntimeOrigin = RuntimeOrigin; type BlockHashCount = BlockHashCount; type DbWeight = RocksDbWeight; type Version = Version; type PalletInfo = PalletInfo; + type RuntimeTask = RuntimeTask; type OnNewAccount = (); type OnKilledAccount = (); type AccountData = pallet_balances::AccountData; @@ -472,6 +471,14 @@ impl pallet_authorship::Config for Runtime { parameter_types! { pub const NativeTokenExistentialDeposit: u128 = 10 * cKMA; // 0.1 KMA } + +// It's for fixing benchmarking pallet-treasury, 100 will be deposited into an +// account in the pallet_treasury::payout, so we have to set a smaller ED. +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub const BenchmarksNativeTokenExistentialDeposit: u128 = 10; +} + impl pallet_balances::Config for Runtime { type MaxLocks = ConstU32<50>; type MaxReserves = ConstU32<50>; @@ -479,12 +486,16 @@ impl pallet_balances::Config for Runtime { type Balance = Balance; type DustRemoval = (); type RuntimeEvent = RuntimeEvent; + #[cfg(not(feature = "runtime-benchmarks"))] type ExistentialDeposit = NativeTokenExistentialDeposit; + #[cfg(feature = "runtime-benchmarks")] + type ExistentialDeposit = BenchmarksNativeTokenExistentialDeposit; type AccountStore = frame_system::Pallet; type WeightInfo = weights::pallet_balances::SubstrateWeight; type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type MaxHolds = ConstU32<50>; } @@ -668,6 +679,8 @@ parameter_types! { pub SpendPeriod: BlockNumber = prod_or_fast!(6 * DAYS, 2 * MINUTES, "CALAMARI_SPEND_PERIOD"); pub const Burn: Permill = Permill::from_percent(0); pub const TreasuryPalletId: PalletId = TREASURY_PALLET_ID; + pub const PayoutSpendPeriod: BlockNumber = 30 * DAYS; + pub const MaxBalance: Balance = Balance::max_value(); } type EnsureRootOrThreeFifthsCouncil = EitherOfDiverse< @@ -698,7 +711,15 @@ impl pallet_treasury::Config for Runtime { type SpendFunds = (); // Expects an implementation of `EnsureOrigin` with a `Success` generic, // which is the the maximum amount that this origin is allowed to spend at a time. - type SpendOrigin = NeverEnsureOrigin; + type SpendOrigin = EnsureWithSuccess, AccountId, MaxBalance>; + type Beneficiary = AccountId; + type BeneficiaryLookup = IdentityLookup; + type Paymaster = PayFromAccount; + type BalanceConverter = UnityAssetBalanceConversion; + type PayoutPeriod = PayoutSpendPeriod; + type AssetKind = (); + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); } impl pallet_aura_style_filter::Config for Runtime { @@ -819,6 +840,8 @@ parameter_types! { // So anything more than 3.5MB doesn't make sense here pub const PreimageMaxSize: u32 = 3584 * 1024; pub const PreimageBaseDeposit: Balance = 1 * KMA; + pub const PreimageHoldReason: RuntimeHoldReason = + RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage); } impl pallet_preimage::Config for Runtime { @@ -826,10 +849,12 @@ impl pallet_preimage::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRoot; - // The sum of the below 2 amounts will get reserved every time someone submits a preimage. - // Their sum will be unreserved when the preimage is requested, i.e. when it is going to be used. - type BaseDeposit = PreimageBaseDeposit; - type ByteDeposit = PreimageByteDeposit; + type Consideration = HoldConsideration< + AccountId, + Balances, + PreimageHoldReason, + LinearStoragePrice, + >; } parameter_types! { @@ -866,6 +891,9 @@ impl pallet_aura::Config for Runtime { type AuthorityId = AuraId; type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; + // false means async backing is disabled + // https://forum.polkadot.network/t/polkadot-release-analysis-v1-0-0/3585#pallet-aura-allow-multiple-blocks-per-slot-12 + type AllowMultipleBlocksPerSlot = ConstBool; } parameter_types! { @@ -905,11 +933,19 @@ parameter_types! { pub const MinVestedTransfer: Balance = KMA; } +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub const BenchmarksMinVestedTransfer: Balance = 10; +} + impl calamari_vesting::Config for Runtime { type Currency = Balances; type RuntimeEvent = RuntimeEvent; type Timestamp = Timestamp; + #[cfg(not(feature = "runtime-benchmarks"))] type MinVestedTransfer = MinVestedTransfer; + #[cfg(feature = "runtime-benchmarks")] + type MinVestedTransfer = BenchmarksMinVestedTransfer; type MaxScheduleLength = ConstU32<6>; type WeightInfo = weights::calamari_vesting::SubstrateWeight; } @@ -952,6 +988,7 @@ impl pallet_name_service::Config for Runtime { } struct CheckInherents; +#[allow(deprecated)] impl cumulus_pallet_parachain_system::CheckInherents for CheckInherents { fn check_inherents( block: &Block, @@ -975,18 +1012,15 @@ impl cumulus_pallet_parachain_system::CheckInherents for CheckInherents { // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = opaque::Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Runtime { // System support stuff. - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, + System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, ParachainSystem: cumulus_pallet_parachain_system::{ - Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, + Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, } = 1, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, + ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, TransactionPause: pallet_tx_pause::{Pallet, Call, Storage, Event} = 9, // Monetary stuff. @@ -1015,16 +1049,17 @@ construct_runtime!( Treasury: pallet_treasury::{Pallet, Call, Storage, Event} = 26, // Preimage registry. - Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 28, + Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 28, // System scheduler Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event} = 29, // XCM helpers. XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, - PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, + PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 33, XTokens: orml_xtokens::{Pallet, Call, Event, Storage} = 34, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 35, // Handy utilities. Utility: pallet_utility::{Pallet, Call, Event} = 40, @@ -1077,7 +1112,7 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -1088,10 +1123,6 @@ pub type Executive = frame_executive::Executive< OnRuntimeUpgradeHooks, >; -#[cfg(feature = "runtime-benchmarks")] -#[macro_use] -extern crate frame_benchmarking; - #[cfg(feature = "runtime-benchmarks")] mod benches { frame_benchmarking::define_benchmarks!( @@ -1100,7 +1131,7 @@ mod benches { [pallet_multisig, Multisig] // always get this error ValidationDataNotAvailable while benchmarking // we disable frame_system in this release, and will fix it in next release - // [frame_system, SystemBench::] + [frame_system, SystemBench::] [pallet_timestamp, Timestamp] [pallet_utility, Utility] [pallet_democracy, Democracy] @@ -1127,16 +1158,15 @@ mod benches { // we disable zenlink in this release, and will fix it in next release // [zenlink_protocol, ZenlinkProtocol] [pallet_farming, Farming] - // XCM - [pallet_xcm, PolkadotXcm] [cumulus_pallet_xcmp_queue, XcmpQueue] // always get this error(Unimplemented) while benchmarking pallet_xcm_benchmarks::fungible::initiate_teleport // so this time we will use statemint's fungible weights // and actually we don't support teleport now + // [pallet_xcm_benchmarks::generic, XcmGeneric] // [pallet_xcm_benchmarks::fungible, pallet_xcm_benchmarks::fungible::Pallet::] - [pallet_xcm_benchmarks::generic, pallet_xcm_benchmarks::generic::Pallet::] + // [pallet_xcm_benchmarks::generic, pallet_xcm_benchmarks::generic::Pallet::] // Nimbus pallets - [pallet_author_inherent, AuthorInherent] + // [pallet_author_inherent, AuthorInherent] ); } @@ -1230,8 +1260,8 @@ impl_runtime_apis! { } } - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Index { + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { + fn account_nonce(account: AccountId) -> Nonce { System::account_nonce(account) } } @@ -1332,6 +1362,11 @@ impl_runtime_apis! { fn can_author(author: NimbusId, relay_parent: u32, parent_header: &::Header) -> bool { let next_block_number = parent_header.number + 1; let slot = relay_parent; + if cumulus_pallet_parachain_system::Pallet::::last_relay_block_number() + 1 == relay_parent { + log::debug!("Cannot Author blocks on consecutive slots"); + return false + } + // Because the staking solution calculates the next staking set at the beginning // of the first block in the new round, the only way to accurately predict the // authors is to compute the selection during prediction. @@ -1360,6 +1395,30 @@ impl_runtime_apis! { } } + impl session_keys_primitives::VrfApi for Runtime { + fn get_last_vrf_output() -> Option<::Hash> { + // We dont use vrf for our consensus for now + None + } + fn vrf_key_lookup( + _nimbus_id: nimbus_primitives::NimbusId + ) -> Option { + // We don't use vrf in consensus + None + } + } + + impl async_backing_primitives::UnincludedSegmentApi for Runtime { + fn can_build_upon( + _included_hash: ::Hash, + _slot: async_backing_primitives::Slot, + ) -> bool { + // This runtime API can be called only when asynchronous backing is enabled client-side + // We return false here to force the client to not use async backing. + false + } + } + // zenlink runtime outer apis impl zenlink_protocol_runtime_api::ZenlinkProtocolApi for Runtime { @@ -1458,6 +1517,10 @@ impl_runtime_apis! { use frame_benchmarking::{Benchmarking, BenchmarkList}; use frame_support::traits::StorageInfoTrait; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + use frame_system_benchmarking::Pallet as SystemBench; + + //type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; + //type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; let mut list = Vec::::new(); list_benchmarks!(list, extra); @@ -1470,9 +1533,20 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, BenchmarkError}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; + use frame_support::traits::TrackedStorageKey; + use frame_system_benchmarking::Pallet as SystemBench; + + impl frame_system_benchmarking::Config for Runtime { + fn setup_set_code_requirements(code: &sp_std::vec::Vec) -> Result<(), BenchmarkError> { + ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32); + Ok(()) + } - impl frame_system_benchmarking::Config for Runtime {} + fn verify_set_code() { + System::assert_last_event(cumulus_pallet_parachain_system::Event::::ValidationFunctionStored.into()); + } + } use cumulus_pallet_session_benchmarking::Pallet as SessionBench; impl cumulus_pallet_session_benchmarking::Config for Runtime {} @@ -1490,11 +1564,20 @@ impl_runtime_apis! { pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; pub const KsmLocation: MultiLocation = MultiLocation::parent(); pub KmaLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into()))); + pub ExistentialDepositAsset: Option = Some(MultiAsset { + id: Concrete(MultiLocation::parent()), + fun: Fungible(NativeTokenExistentialDeposit::get()) + }); } impl pallet_xcm_benchmarks::Config for Runtime { type XcmConfig = XcmExecutorConfig; type AccountIdConverter = LocationToAccountId; + type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper< + XcmExecutorConfig, + ExistentialDepositAsset, + (), + >; fn valid_destination() -> Result { Ok(KsmLocation::get()) @@ -1532,6 +1615,7 @@ impl_runtime_apis! { type CheckedAccount = CheckedAccount; type TrustedTeleporter = TrustedTeleporter; + type TrustedReserve = TrustedReserve; fn get_multi_asset() -> MultiAsset { MultiAsset { @@ -1543,6 +1627,7 @@ impl_runtime_apis! { impl pallet_xcm_benchmarks::generic::Config for Runtime { type RuntimeCall = RuntimeCall; + type TransactAsset = Balances; fn worst_case_response() -> (u64, Response) { (0u64, Response::Version(Default::default())) @@ -1579,8 +1664,15 @@ impl_runtime_apis! { ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { Err(BenchmarkError::Skip) } + + fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { + Err(BenchmarkError::Skip) + } } + //type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; + //type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; + let whitelist: Vec = vec![ // Block Number hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), @@ -1610,5 +1702,5 @@ impl_runtime_apis! { cumulus_pallet_parachain_system::register_validate_block! { Runtime = Runtime, BlockExecutor = pallet_author_inherent::BlockExecutor::, - CheckInherents = CheckInherents, + CheckInherents = CheckInherents } diff --git a/runtime/calamari/src/migrations/asset_id.rs b/runtime/calamari/src/migrations/asset_id.rs deleted file mode 100644 index caca93ce1..000000000 --- a/runtime/calamari/src/migrations/asset_id.rs +++ /dev/null @@ -1,764 +0,0 @@ -// Copyright 2020-2024 Manta Network. -// This file is part of Manta. -// -// Manta 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. -// -// Manta 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 Manta. If not, see . - -#![allow(clippy::unnecessary_cast)] - -use crate::sp_api_hidden_includes_construct_runtime::hidden_include::StorageHasher; -use codec::{Decode, Encode}; -use core::marker::PhantomData; -#[allow(deprecated)] -use frame_support::migration::{ - get_storage_value, put_storage_value, storage_key_iter, take_storage_value, -}; -use frame_support::{ - dispatch::GetStorageVersion, - pallet_prelude::Weight, - storage_alias, - traits::{Currency, Get, OnRuntimeUpgrade, StorageVersion}, - Blake2_128Concat, -}; -use manta_primitives::{ - assets::{AssetLocation, AssetRegistryMetadata, AssetStorageMetadata}, - types::Balance, -}; -use scale_info::TypeInfo; -use sp_core::H160; -use sp_runtime::BoundedVec; -use sp_runtime::DispatchError; -use sp_std::vec::Vec; - -pub type DepositBalanceOf = <>::Currency as Currency< - ::AccountId, ->>::Balance; -pub type AssetAccountOf = pallet_assets::AssetAccount< - >::Balance, - DepositBalanceOf, - >::Extra, ->; - -type OldAssetId = u32; -type NewAssetId = u128; - -pub mod old { - use crate::migrations::asset_id::OldAssetId; - use frame_support::{storage_alias, Blake2_128Concat}; - - #[storage_alias] - pub type Account, I: 'static = ()> = StorageDoubleMap< - Assets, - Blake2_128Concat, - OldAssetId, - Blake2_128Concat, - ::AccountId, - super::AssetAccountOf, - >; -} - -#[storage_alias] -type Account, I: 'static = ()> = StorageDoubleMap< - Assets, - Blake2_128Concat, - NewAssetId, - Blake2_128Concat, - ::AccountId, - AssetAccountOf, ->; - -type AssetMapKVP = ( - OldAssetId, - pallet_assets::AssetDetails< - ::Balance, - ::AccountId, - DepositBalanceOf, - >, -); - -type MetadataMapKVP = ( - OldAssetId, - pallet_assets::AssetMetadata< - DepositBalanceOf, - BoundedVec::StringLimit>, - >, -); - -#[derive(Clone, Debug, Decode, Encode, Eq, Hash, Ord, PartialEq, PartialOrd, TypeInfo)] -pub struct OldAssetRegistrarMetadata { - pub name: Vec, - pub symbol: Vec, - pub decimals: u8, - pub evm_address: Option, - pub is_frozen: bool, - pub min_balance: Balance, - pub is_sufficient: bool, -} - -type PreUpgradeTypes = ( - Vec<(OldAssetId, AssetLocation)>, - Vec<(AssetLocation, OldAssetId)>, - Vec<(OldAssetId, OldAssetRegistrarMetadata)>, - Vec<(OldAssetId, u128)>, - u32, - Vec>, - Vec<( - OldAssetId, - ::AccountId, - AssetAccountOf, - )>, - Vec>, -); - -pub const INITIAL_PALLET_ASSETS_MANAGER_VERSION: u16 = 1; -pub const INITIAL_PALLET_ASSETS_VERSION: u16 = 0; - -pub struct AssetIdMigration(PhantomData); -impl OnRuntimeUpgrade for AssetIdMigration -where - T: pallet_asset_manager::Config + pallet_assets::Config, -{ - fn on_runtime_upgrade() -> Weight { - let mut num_reads = 0; - let mut num_writes = 0; - - let asset_manager_storage_version = - as GetStorageVersion>::on_chain_storage_version(); - let assets_storage_version = - as GetStorageVersion>::on_chain_storage_version(); - num_reads += 2; - if asset_manager_storage_version != INITIAL_PALLET_ASSETS_MANAGER_VERSION - || assets_storage_version != INITIAL_PALLET_ASSETS_VERSION - { - log::info!("Aborting migration due to unexpected on-chain storage versions for pallet-assets-manager: {:?} and pallet-assets: {:?}. Expectation was: {:?} and {:?}.", asset_manager_storage_version, assets_storage_version, INITIAL_PALLET_ASSETS_MANAGER_VERSION, INITIAL_PALLET_ASSETS_VERSION ); - return T::DbWeight::get().reads(num_reads); - } - - // AssetIdLocation - - log::info!(target: "asset-manager", "Starting migration for AssetManager..."); - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"AssetIdLocation"; - let stored_data: Vec<_> = storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .drain() - .collect(); - for (old_key, value) in stored_data { - let new_key: NewAssetId = old_key as NewAssetId; - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&new_key.encode()), - value, - ); - num_reads += 1; - num_writes += 1; - } - log::info!( - target: "asset-manager", "Storage migration for AssetManager's AssetIdLocation storage item has been executed." - ); - - // LocationAssetId - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"LocationAssetId"; - let stored_data: Vec<_> = storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .drain() - .collect(); - for (old_key, value) in stored_data { - let new_key: NewAssetId = value as NewAssetId; - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&old_key.encode()), - new_key, - ); - num_reads += 1; - num_writes += 1; - } - log::info!( - target: "asset-manager", "Storage migration for AssetManager's LocationAssetId storage item has been executed." - ); - - // AssetIdMetadata - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"AssetIdMetadata"; - let stored_data: Vec<_> = storage_key_iter::< - OldAssetId, - OldAssetRegistrarMetadata, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - for (old_key, old_value) in stored_data { - let new_key: NewAssetId = old_key as NewAssetId; - let new_value: AssetRegistryMetadata = AssetRegistryMetadata { - metadata: AssetStorageMetadata { - name: old_value.name, - symbol: old_value.symbol, - decimals: old_value.decimals, - is_frozen: old_value.is_frozen, - }, - min_balance: old_value.min_balance, - is_sufficient: old_value.is_sufficient, - }; - - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&new_key.encode()), - new_value, - ); - num_reads += 1; - num_writes += 1; - } - log::info!( - target: "asset-manager", "Storage migration for AssetManager's AssetIdMetadata storage item has been executed." - ); - - // UnitsPerSecond - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"UnitsPerSecond"; - let stored_data: Vec<_> = storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .drain() - .collect(); - for (old_key, value) in stored_data { - let new_key: NewAssetId = old_key as NewAssetId; - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&new_key.encode()), - value, - ); - num_reads += 1; - num_writes += 1; - } - log::info!( - target: "asset-manager", "Storage migration for AssetManager's UnitsPerSecond storage item has been executed." - ); - - // NextAssetId - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"NextAssetId"; - num_reads += 1; - num_writes += 1; - let value = match take_storage_value::(pallet_prefix, storage_item_prefix, &[]) - { - Some(value) => value, - None => { - return T::DbWeight::get() - .reads(num_reads) - .saturating_add(T::DbWeight::get().writes(num_writes as u64)); - } - }; - let new_value: NewAssetId = value as NewAssetId; - put_storage_value(pallet_prefix, storage_item_prefix, &[], new_value); - log::info!( - target: "asset-manager", "Storage migration for AssetManager's NextAssetId storage item has been executed." - ); - - StorageVersion::new(INITIAL_PALLET_ASSETS_MANAGER_VERSION + 1) - .put::>(); - - log::info!(target: "asset-manager", "✅ Storage migration for AssetManager has been executed successfully and storage version has been update to: {:?}.", INITIAL_PALLET_ASSETS_MANAGER_VERSION + 1); - - log::info!(target: "assets", "Starting migration for pallet-assets..."); - - // Asset - - let pallet_prefix: &[u8] = b"Assets"; - let storage_item_prefix: &[u8] = b"Asset"; - let stored_data: Vec<_> = storage_key_iter::< - OldAssetId, - pallet_assets::AssetDetails< - ::Balance, - ::AccountId, - DepositBalanceOf, - >, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - for (old_key, value) in stored_data { - let new_key: NewAssetId = old_key as NewAssetId; - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&new_key.encode()), - value, - ); - num_reads += 1; - num_writes += 1; - } - log::info!( - target: "assets", "Storage migration for Assets' Asset storage item has been executed." - ); - - // Account - - let mut stored_data: Vec<_> = Vec::new(); - old::Account::::drain().for_each(|(asset_id_key, account_id_key, value)| { - let new_asset_id_key: NewAssetId = asset_id_key as NewAssetId; - stored_data.push((new_asset_id_key, account_id_key, value)); - }); - stored_data - .iter() - .for_each(|(new_asset_id_key, account_id_key, value)| { - Account::::insert(new_asset_id_key, account_id_key, value); - }); - log::info!( - target: "assets", "Storage migration for Assets' Account storage item has been executed." - ); - - // Metadata - - let pallet_prefix: &[u8] = b"Assets"; - let storage_item_prefix: &[u8] = b"Metadata"; - let stored_data: Vec<_> = storage_key_iter::< - OldAssetId, - pallet_assets::AssetMetadata< - DepositBalanceOf, - BoundedVec::StringLimit>, - >, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - for (asset_id_key, value) in stored_data { - let new_key: NewAssetId = asset_id_key as NewAssetId; - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&new_key.encode()), - value, - ); - num_reads += 1; - num_writes += 1; - } - log::info!( - target: "assets", "Storage migration for Assets' Metadata storage item has been executed." - ); - - StorageVersion::new(INITIAL_PALLET_ASSETS_VERSION + 1).put::>(); - - log::info!(target: "assets", "✅ Storage migration for Assets has been executed successfully and storage version has been update to: {:?}.", INITIAL_PALLET_ASSETS_VERSION + 1); - - T::DbWeight::get() - .reads(num_reads) - .saturating_add(T::DbWeight::get().writes(num_writes as u64)) - } - - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, DispatchError> { - let asset_manager_storage_version = - as GetStorageVersion>::on_chain_storage_version(); - if asset_manager_storage_version != INITIAL_PALLET_ASSETS_MANAGER_VERSION { - return Err(DispatchError::Other("AssetManager storage version is not 1, the migration won't be executed.")); - } - - let assets_storage_version = - as GetStorageVersion>::on_chain_storage_version(); - if assets_storage_version != INITIAL_PALLET_ASSETS_VERSION { - return Err(DispatchError::Other("Assets storage version is not 0, the migration won't be executed.")); - } - - // We want to test that: - // There are no entries in the new storage beforehand - // The same number of mappings exist before and after - // - // We have to manually check that there are no entries - // with the old storage keys, as the new u128 asset-id - // would still decode into the old u32 values. - - // AssetIdLocation - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"AssetIdLocation"; - assert_eq!( - storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .count(), - 0 - ); - let asset_id_location_stored_data_old: Vec<_> = - storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .collect(); - - // LocationAssetId - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"LocationAssetId"; - assert_eq!( - storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .count(), - 0 - ); - let location_asset_id_stored_data_old: Vec<_> = - storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .collect(); - - // AssetIdMetadata - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"AssetIdMetadata"; - assert_eq!( - storage_key_iter::, Blake2_128Concat>( - pallet_prefix, - storage_item_prefix - ) - .count(), - 0 - ); - let asset_id_metadata_stored_data_old: Vec<_> = - storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .collect(); - - // UnitsPerSecond - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"UnitsPerSecond"; - assert_eq!( - storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .count(), - 0 - ); - let units_per_sec_stored_data_old: Vec<_> = storage_key_iter::< - OldAssetId, - u128, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .collect(); - - // NextAssetId - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"NextAssetId"; - assert!(get_storage_value::(pallet_prefix, storage_item_prefix, &[]).is_none()); - let old_next_asset_id: OldAssetId = - get_storage_value::(pallet_prefix, storage_item_prefix, &[]).unwrap(); - - // Asset - - let pallet_prefix: &[u8] = b"Assets"; - let storage_item_prefix: &[u8] = b"Asset"; - assert_eq!( - storage_key_iter::< - NewAssetId, - pallet_assets::AssetDetails< - ::Balance, - ::AccountId, - DepositBalanceOf, - >, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .count(), - 0 - ); - let asset_map_stored_data_old: Vec<_> = storage_key_iter::< - OldAssetId, - pallet_assets::AssetDetails< - ::Balance, - ::AccountId, - DepositBalanceOf, - >, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .collect(); - - // Account - - let mut stored_data_new: Vec<_> = Vec::new(); - Account::::iter().for_each(|kvp| { - stored_data_new.push(kvp); - }); - assert_eq!(stored_data_new.len(), 0); - let mut account_map_stored_data_old: Vec<_> = Vec::new(); - old::Account::::iter().for_each(|kvp| { - account_map_stored_data_old.push(kvp); - }); - - // Metadata - - let pallet_prefix: &[u8] = b"Assets"; - let storage_item_prefix: &[u8] = b"Metadata"; - assert_eq!( - storage_key_iter::< - NewAssetId, - pallet_assets::AssetMetadata< - DepositBalanceOf, - BoundedVec::StringLimit>, - >, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .count(), - 0 - ); - let metadata_map_stored_data_old: Vec<_> = storage_key_iter::< - OldAssetId, - pallet_assets::AssetMetadata< - DepositBalanceOf, - BoundedVec::StringLimit>, - >, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .collect(); - - Ok(( - asset_id_location_stored_data_old, - location_asset_id_stored_data_old, - asset_id_metadata_stored_data_old, - units_per_sec_stored_data_old, - old_next_asset_id, - asset_map_stored_data_old, - account_map_stored_data_old, - metadata_map_stored_data_old, - ) - .encode()) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), DispatchError> { - let asset_manager_storage_version = - as GetStorageVersion>::on_chain_storage_version(); - if asset_manager_storage_version != INITIAL_PALLET_ASSETS_MANAGER_VERSION + 1 { - return Err(DispatchError::Other("AssetManager storage version is not 2, the migration wasn't executed.")); - } - - let assets_storage_version = - as GetStorageVersion>::on_chain_storage_version(); - if assets_storage_version != INITIAL_PALLET_ASSETS_VERSION + 1 { - return Err(DispatchError::Other("Assets storage version is not 1, the migration wasn't executed.")); - } - - // We want to test that: - // There are no entries in the new storage beforehand - // The same number of mappings exist before and after - // - // We have to manually check that there are no entries - // with the old storage keys, as the new u128 asset-id - // would still decode into the old u32 values. - - let ( - asset_id_location_stored_data_old, - location_asset_id_stored_data_old, - asset_id_metadata_stored_data_old, - units_per_sec_stored_data_old, - old_next_asset_id, - asset_map_stored_data_old, - account_map_stored_data_old, - metadata_map_stored_data_old, - ): PreUpgradeTypes = - Decode::decode(&mut &state[..]).expect("pre_upgrade provides a valid state; qed"); - // AssetIdLocation - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"AssetIdLocation"; - let stored_data_new: Vec<_> = - storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .collect(); - assert_eq!( - asset_id_location_stored_data_old.len(), - stored_data_new.len() - ); - asset_id_location_stored_data_old - .iter() - .for_each(|(key, value)| { - let check = (*key as NewAssetId, value.clone()); - assert!(stored_data_new.contains(&check)); - }); - log::info!("✅ Storage migration for AssetManager's AssetIdLocation storage item has been executed successfully."); - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"LocationAssetId"; - let stored_data_new: Vec<_> = - storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .collect(); - assert_eq!( - location_asset_id_stored_data_old.len(), - stored_data_new.len() - ); - location_asset_id_stored_data_old - .iter() - .for_each(|(key, value)| { - let check = (key.clone(), *value as NewAssetId); - assert!(stored_data_new.contains(&check)); - }); - log::info!("✅ Storage migration for AssetManager's LocationAssetId storage item has been executed successfully."); - - // AssetIdMetadata - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"AssetIdMetadata"; - let stored_data_new: Vec<_> = storage_key_iter::< - NewAssetId, - AssetRegistryMetadata, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .collect(); - assert_eq!( - asset_id_metadata_stored_data_old.len(), - stored_data_new.len() - ); - asset_id_metadata_stored_data_old - .iter() - .for_each(|(key, value)| { - let new_storage = ( - *key as NewAssetId, - AssetRegistryMetadata { - metadata: AssetStorageMetadata { - name: value.name.clone(), - symbol: value.symbol.clone(), - decimals: value.decimals, - is_frozen: value.is_frozen, - }, - min_balance: value.min_balance, - is_sufficient: value.is_sufficient, - }, - ); - assert!(stored_data_new.contains(&new_storage)); - }); - log::info!("✅ Storage migration for AssetManager's AssetIdMetadata storage item has been executed successfully."); - - // UnitsPerSecond - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"UnitsPerSecond"; - let stored_data_new: Vec<_> = storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .collect(); - assert_eq!(units_per_sec_stored_data_old.len(), stored_data_new.len()); - units_per_sec_stored_data_old - .iter() - .for_each(|(key, value)| { - let check = (*key as NewAssetId, *value); - assert!(stored_data_new.contains(&check)); - }); - log::info!("✅ Storage migration for AssetManager's UnitsPerSecond storage item has been executed successfully."); - - // NextAssetId - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"NextAssetId"; - let next_asset_id: NewAssetId = - get_storage_value::(pallet_prefix, storage_item_prefix, &[]).unwrap(); - assert_eq!(old_next_asset_id as u128, next_asset_id); - log::info!("✅ Storage migration for AssetManager's NextAssetId storage item has been executed successfully."); - - // Asset - - let pallet_prefix: &[u8] = b"Assets"; - let storage_item_prefix: &[u8] = b"Asset"; - let stored_data_new: Vec<_> = storage_key_iter::< - NewAssetId, - pallet_assets::AssetDetails< - ::Balance, - ::AccountId, - DepositBalanceOf, - >, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .collect(); - assert_eq!(asset_map_stored_data_old.len(), stored_data_new.len()); - asset_map_stored_data_old.iter().for_each(|(key, value)| { - let check = (*key as NewAssetId, value.clone()); - assert!(stored_data_new.contains(&check)); - }); - log::info!( - "✅ Storage migration for Assets' Asset storage item has been executed successfully." - ); - - // Account - - let mut stored_data_new: Vec<_> = Vec::new(); - Account::::iter().for_each(|(asset_id_key, account_id_key, value)| { - stored_data_new.push((asset_id_key, account_id_key, value)); - }); - assert_eq!(account_map_stored_data_old.len(), stored_data_new.len()); - account_map_stored_data_old - .iter() - .for_each(|(asset_id_key, account_id_key, value)| { - let check = ( - *asset_id_key as NewAssetId, - account_id_key.clone(), - value.clone(), - ); - assert!(stored_data_new.contains(&check)); - }); - log::info!( - "✅ Storage migration for Assets' Account storage item has been executed successfully." - ); - - // Metadata - - let pallet_prefix: &[u8] = b"Assets"; - let storage_item_prefix: &[u8] = b"Metadata"; - let stored_data_new: Vec<_> = storage_key_iter::< - NewAssetId, - pallet_assets::AssetMetadata< - DepositBalanceOf, - BoundedVec::StringLimit>, - >, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .collect(); - assert_eq!(metadata_map_stored_data_old.len(), stored_data_new.len()); - metadata_map_stored_data_old - .iter() - .for_each(|(key, value)| { - let check = (*key as NewAssetId, value.clone()); - assert!(stored_data_new.contains(&check)); - }); - log::info!( - "✅ Storage migration for Assets' Metadata storage item has been executed successfully." - ); - - Ok(()) - } -} diff --git a/runtime/calamari/src/migrations/asset_manager.rs b/runtime/calamari/src/migrations/asset_manager.rs deleted file mode 100644 index 5318b6df2..000000000 --- a/runtime/calamari/src/migrations/asset_manager.rs +++ /dev/null @@ -1,830 +0,0 @@ -// Copyright 2020-2024 Manta Network. -// This file is part of Manta. -// -// Manta 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. -// -// Manta 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 Manta. If not, see . - -#![allow(clippy::unnecessary_cast)] - -use core::marker::PhantomData; -use frame_support::{ - dispatch::GetStorageVersion, - migration::{put_storage_value, storage_key_iter}, - pallet_prelude::{StorageVersion, Weight}, - traits::{Get, OnRuntimeUpgrade}, - Blake2_128Concat, StorageHasher, -}; -use sp_runtime::{traits::ConstU32, DispatchError, WeakBoundedVec}; -use sp_std::vec::Vec; -use xcm::{ - v3::{Junction, Junctions, MultiLocation}, - VersionedMultiLocation, -}; - -use codec::{Decode, Encode, MaxEncodedLen}; -use manta_primitives::types::CalamariAssetId; -use scale_info::TypeInfo; -use xcm_v1::*; - -pub mod xcm_v1 { - use super::*; - - pub mod v0 { - use super::*; - - #[derive( - Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, scale_info::TypeInfo, - )] - pub enum MultiLocation { - /// The interpreting consensus system. - Null, - /// A relative path comprising 1 junction. - X1(Junction), - /// A relative path comprising 2 junctions. - X2(Junction, Junction), - /// A relative path comprising 3 junctions. - X3(Junction, Junction, Junction), - /// A relative path comprising 4 junctions. - X4(Junction, Junction, Junction, Junction), - /// A relative path comprising 5 junctions. - X5(Junction, Junction, Junction, Junction, Junction), - /// A relative path comprising 6 junctions. - X6(Junction, Junction, Junction, Junction, Junction, Junction), - /// A relative path comprising 7 junctions. - X7( - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - ), - /// A relative path comprising 8 junctions. - X8( - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - ), - } - - #[derive( - Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo, MaxEncodedLen, - )] - pub enum Junction { - /// The consensus system of which the context is a member and state-wise super-set. - /// - /// NOTE: This item is *not* a sub-consensus item: a consensus system may not identify itself trustlessly as - /// a location that includes this junction. - Parent, - /// An indexed parachain belonging to and operated by the context. - /// - /// Generally used when the context is a Polkadot Relay-chain. - Parachain(#[codec(compact)] u32), - /// A 32-byte identifier for an account of a specific network that is respected as a sovereign endpoint within - /// the context. - /// - /// Generally used when the context is a Substrate-based chain. - AccountId32 { network: NetworkId, id: [u8; 32] }, - /// An 8-byte index for an account of a specific network that is respected as a sovereign endpoint within - /// the context. - /// - /// May be used when the context is a Frame-based chain and includes e.g. an indices pallet. - AccountIndex64 { - network: NetworkId, - #[codec(compact)] - index: u64, - }, - /// A 20-byte identifier for an account of a specific network that is respected as a sovereign endpoint within - /// the context. - /// - /// May be used when the context is an Ethereum or Bitcoin chain or smart-contract. - AccountKey20 { network: NetworkId, key: [u8; 20] }, - /// An instanced, indexed pallet that forms a constituent part of the context. - /// - /// Generally used when the context is a Frame-based chain. - PalletInstance(u8), - /// A non-descript index within the context location. - /// - /// Usage will vary widely owing to its generality. - /// - /// NOTE: Try to avoid using this and instead use a more specific item. - GeneralIndex(#[codec(compact)] u128), - /// A nondescript datum acting as a key within the context location. - /// - /// Usage will vary widely owing to its generality. - /// - /// NOTE: Try to avoid using this and instead use a more specific item. - GeneralKey(WeakBoundedVec>), - /// The unambiguous child. - /// - /// Not currently used except as a fallback when deriving ancestry. - OnlyChild, - /// A pluralistic body existing within consensus. - /// - /// Typical to be used to represent a governance origin of a chain, but could in principle be used to represent - /// things such as multisigs also. - Plurality { id: BodyId, part: BodyPart }, - } - - #[derive( - Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo, MaxEncodedLen, - )] - pub enum NetworkId { - /// Unidentified/any. - Any, - /// Some named network. - Named(WeakBoundedVec>), - /// The Polkadot Relay chain - Polkadot, - /// Kusama. - Kusama, - } - - #[derive( - Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo, MaxEncodedLen, - )] - pub enum BodyId { - /// The only body in its context. - Unit, - /// A named body. - Named(WeakBoundedVec>), - /// An indexed body. - Index(#[codec(compact)] u32), - /// The unambiguous executive body (for Polkadot, this would be the Polkadot council). - Executive, - /// The unambiguous technical body (for Polkadot, this would be the Technical Committee). - Technical, - /// The unambiguous legislative body (for Polkadot, this could be considered the opinion of a majority of - /// lock-voters). - Legislative, - /// The unambiguous judicial body (this doesn't exist on Polkadot, but if it were to get a "grand oracle", it - /// may be considered as that). - Judicial, - /// The unambiguous defense body (for Polkadot, an opinion on the topic given via a public referendum - /// on the `staking_admin` track). - Defense, - /// The unambiguous administration body (for Polkadot, an opinion on the topic given via a public referendum - /// on the `general_admin` track). - Administration, - /// The unambiguous treasury body (for Polkadot, an opinion on the topic given via a public referendum - /// on the `treasurer` track). - Treasury, - } - - #[derive( - Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo, MaxEncodedLen, - )] - pub enum BodyPart { - /// The body's declaration, under whatever means it decides. - Voice, - /// A given number of members of the body. - Members { - #[codec(compact)] - count: u32, - }, - /// A given number of members of the body, out of some larger caucus. - Fraction { - #[codec(compact)] - nom: u32, - #[codec(compact)] - denom: u32, - }, - /// No less than the given proportion of members of the body. - AtLeastProportion { - #[codec(compact)] - nom: u32, - #[codec(compact)] - denom: u32, - }, - /// More than than the given proportion of members of the body. - MoreThanProportion { - #[codec(compact)] - nom: u32, - #[codec(compact)] - denom: u32, - }, - } - } - - pub mod v1 { - use super::*; - - #[derive( - Clone, Decode, Encode, Eq, PartialEq, Ord, PartialOrd, Debug, TypeInfo, MaxEncodedLen, - )] - pub struct MultiLocation { - /// The number of parent junctions at the beginning of this `MultiLocation`. - pub parents: u8, - /// The interior (i.e. non-parent) junctions that this `MultiLocation` contains. - pub interior: Junctions, - } - - #[derive( - Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo, MaxEncodedLen, - )] - pub enum Junctions { - /// The interpreting consensus system. - Here, - /// A relative path comprising 1 junction. - X1(Junction), - /// A relative path comprising 2 junctions. - X2(Junction, Junction), - /// A relative path comprising 3 junctions. - X3(Junction, Junction, Junction), - /// A relative path comprising 4 junctions. - X4(Junction, Junction, Junction, Junction), - /// A relative path comprising 5 junctions. - X5(Junction, Junction, Junction, Junction, Junction), - /// A relative path comprising 6 junctions. - X6(Junction, Junction, Junction, Junction, Junction, Junction), - /// A relative path comprising 7 junctions. - X7( - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - ), - /// A relative path comprising 8 junctions. - X8( - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - ), - } - - #[derive( - Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo, MaxEncodedLen, - )] - pub enum Junction { - /// An indexed parachain belonging to and operated by the context. - /// - /// Generally used when the context is a Polkadot Relay-chain. - Parachain(#[codec(compact)] u32), - /// A 32-byte identifier for an account of a specific network that is respected as a sovereign endpoint within - /// the context. - /// - /// Generally used when the context is a Substrate-based chain. - AccountId32 { - network: super::v0::NetworkId, - id: [u8; 32], - }, - /// An 8-byte index for an account of a specific network that is respected as a sovereign endpoint within - /// the context. - /// - /// May be used when the context is a Frame-based chain and includes e.g. an indices pallet. - AccountIndex64 { - network: super::v0::NetworkId, - #[codec(compact)] - index: u64, - }, - /// A 20-byte identifier for an account of a specific network that is respected as a sovereign endpoint within - /// the context. - /// - /// May be used when the context is an Ethereum or Bitcoin chain or smart-contract. - AccountKey20 { - network: super::v0::NetworkId, - key: [u8; 20], - }, - /// An instanced, indexed pallet that forms a constituent part of the context. - /// - /// Generally used when the context is a Frame-based chain. - PalletInstance(u8), - /// A non-descript index within the context location. - /// - /// Usage will vary widely owing to its generality. - /// - /// NOTE: Try to avoid using this and instead use a more specific item. - GeneralIndex(#[codec(compact)] u128), - /// A nondescript datum acting as a key within the context location. - /// - /// Usage will vary widely owing to its generality. - /// - /// NOTE: Try to avoid using this and instead use a more specific item. - GeneralKey(WeakBoundedVec>), - /// The unambiguous child. - /// - /// Not currently used except as a fallback when deriving ancestry. - OnlyChild, - /// A pluralistic body existing within consensus. - /// - /// Typical to be used to represent a governance origin of a chain, but could in principle be used to represent - /// things such as multisigs also. - // v1 reuses v0's BodyId and BodyPart - Plurality { - id: super::v0::BodyId, - part: super::v0::BodyPart, - }, - } - } - - #[derive(Encode, Debug, Decode, TypeInfo)] - #[codec(encode_bound())] - #[codec(decode_bound())] - pub enum VersionedMultiLocation { - V0(v0::MultiLocation), - V1(v1::MultiLocation), - } - - /// Asset Location - #[derive(Decode, Debug, Encode, TypeInfo)] - pub struct AssetLocation(pub VersionedMultiLocation); -} - -pub struct XcmV1ToV3(PhantomData); -impl OnRuntimeUpgrade for XcmV1ToV3 { - fn on_runtime_upgrade() -> Weight { - let mut writes = 0; - let mut reads = 0; - - // AssetIdLocation - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"AssetIdLocation"; - let asset_id_location: Vec<_> = storage_key_iter::< - CalamariAssetId, - AssetLocation, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - - reads += asset_id_location.len(); - writes += asset_id_location.len(); - - for (asset_id, v1_location) in asset_id_location { - if let xcm_v1::AssetLocation(xcm_v1::VersionedMultiLocation::V1(v1::MultiLocation { - parents, - interior, - })) = v1_location - { - match interior { - // kusama location - v1::Junctions::Here => { - let v3_junctions = Junctions::Here; - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&asset_id.encode()), - v3_location, - ); - } - // we have two X1::Junction::Parachain: 2004 and 2084 - // { Parachain }: 2 - v1::Junctions::X1(v1::Junction::Parachain(para_id)) => { - let v3_junctions = Junctions::X1(Junction::Parachain(para_id)); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&asset_id.encode()), - v3_location, - ); - } - // { Parachain, GeneralKey }: 16 - v1::Junctions::X2( - v1::Junction::Parachain(para_id), - v1::Junction::GeneralKey(general_key), - ) => { - let v3_general_key = { - let mut data = [0u8; 32]; - data[..general_key.len()].copy_from_slice(&general_key[..]); - Junction::GeneralKey { - length: general_key.len() as u8, - data, - } - }; - let v3_junctions = - Junctions::X2(Junction::Parachain(para_id), v3_general_key); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&asset_id.encode()), - v3_location, - ); - } - // { Parachain, PalletInstance }: 1 - v1::Junctions::X2( - v1::Junction::Parachain(para_id), - v1::Junction::PalletInstance(pallet_index), - ) => { - let v3_junctions = Junctions::X2( - Junction::Parachain(para_id), - Junction::PalletInstance(pallet_index), - ); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&asset_id.encode()), - v3_location, - ); - } - // { Parachain, PalletInstance, GeneralIndex }: 1 - v1::Junctions::X3( - v1::Junction::Parachain(para_id), - v1::Junction::PalletInstance(pallet_index), - v1::Junction::GeneralIndex(general_index), - ) => { - let v3_junctions = Junctions::X3( - Junction::Parachain(para_id), - Junction::PalletInstance(pallet_index), - Junction::GeneralIndex(general_index), - ); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&asset_id.encode()), - v3_location, - ); - } - _ => (), - } - } - } - log::info!(target: "OnRuntimeUpgrade", "✅ AssetManager's AssetIdLocation has been updated to xcm v3."); - - // LocationAssetId - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"LocationAssetId"; - let location_asset_id: Vec<_> = storage_key_iter::< - AssetLocation, - CalamariAssetId, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - - reads += location_asset_id.len(); - writes += location_asset_id.len(); - - for (v1_location, asset_id) in location_asset_id { - if let xcm_v1::AssetLocation(xcm_v1::VersionedMultiLocation::V1(v1::MultiLocation { - parents, - interior, - })) = v1_location - { - match interior { - // kusama location - v1::Junctions::Here => { - let v3_junctions = Junctions::Here; - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&v3_location.encode()), - asset_id, - ); - } - // we have two X1::Junction::Parachain: 2004 and 2084 - // { Parachain }: 2 - v1::Junctions::X1(v1::Junction::Parachain(para_id)) => { - let v3_junctions = Junctions::X1(Junction::Parachain(para_id)); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&v3_location.encode()), - asset_id, - ); - } - // { Parachain, GeneralKey }: 16 - v1::Junctions::X2( - v1::Junction::Parachain(para_id), - v1::Junction::GeneralKey(general_key), - ) => { - let v3_general_key = { - let mut data = [0u8; 32]; - data[..general_key.len()].copy_from_slice(&general_key[..]); - Junction::GeneralKey { - length: general_key.len() as u8, - data, - } - }; - let v3_junctions = - Junctions::X2(Junction::Parachain(para_id), v3_general_key); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&v3_location.encode()), - asset_id, - ); - } - // { Parachain, PalletInstance }: 1 - v1::Junctions::X2( - v1::Junction::Parachain(para_id), - v1::Junction::PalletInstance(pallet_index), - ) => { - let v3_junctions = Junctions::X2( - Junction::Parachain(para_id), - Junction::PalletInstance(pallet_index), - ); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&v3_location.encode()), - asset_id, - ); - } - // { Parachain, PalletInstance, GeneralIndex }: 1 - v1::Junctions::X3( - v1::Junction::Parachain(para_id), - v1::Junction::PalletInstance(pallet_index), - v1::Junction::GeneralIndex(general_index), - ) => { - let v3_junctions = Junctions::X3( - Junction::Parachain(para_id), - Junction::PalletInstance(pallet_index), - Junction::GeneralIndex(general_index), - ); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&v3_location.encode()), - asset_id, - ); - } - _ => (), - } - } - } - log::info!(target: "OnRuntimeUpgrade", "✅ AssetManager's LocationAssetId has been updated to xcm v3."); - - // MinXcmFee - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"MinXcmFee"; - let min_xcm_fee: Vec<_> = storage_key_iter::< - AssetLocation, - CalamariAssetId, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - - reads += min_xcm_fee.len(); - writes += min_xcm_fee.len(); - - for (v1_location, fees) in min_xcm_fee { - if let xcm_v1::AssetLocation(xcm_v1::VersionedMultiLocation::V1(v1::MultiLocation { - parents, - interior, - })) = v1_location - { - match interior { - // kusama location - v1::Junctions::Here => { - let v3_junctions = Junctions::Here; - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&v3_location.encode()), - fees, - ); - } - // we have two X1::Junction::Parachain: 2004 and 2084 - // { Parachain }: 2 - v1::Junctions::X1(v1::Junction::Parachain(para_id)) => { - let v3_junctions = Junctions::X1(Junction::Parachain(para_id)); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&v3_location.encode()), - fees, - ); - } - // { Parachain, GeneralKey }: 16 - v1::Junctions::X2( - v1::Junction::Parachain(para_id), - v1::Junction::GeneralKey(general_key), - ) => { - let v3_general_key = { - let mut data = [0u8; 32]; - data[..general_key.len()].copy_from_slice(&general_key[..]); - Junction::GeneralKey { - length: general_key.len() as u8, - data, - } - }; - let v3_junctions = - Junctions::X2(Junction::Parachain(para_id), v3_general_key); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&v3_location.encode()), - fees, - ); - } - // { Parachain, PalletInstance }: 1 - v1::Junctions::X2( - v1::Junction::Parachain(para_id), - v1::Junction::PalletInstance(pallet_index), - ) => { - let v3_junctions = Junctions::X2( - Junction::Parachain(para_id), - Junction::PalletInstance(pallet_index), - ); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&v3_location.encode()), - fees, - ); - } - // { Parachain, PalletInstance, GeneralIndex }: 1 - v1::Junctions::X3( - v1::Junction::Parachain(para_id), - v1::Junction::PalletInstance(pallet_index), - v1::Junction::GeneralIndex(general_index), - ) => { - let v3_junctions = Junctions::X3( - Junction::Parachain(para_id), - Junction::PalletInstance(pallet_index), - Junction::GeneralIndex(general_index), - ); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&v3_location.encode()), - fees, - ); - } - _ => (), - } - } - } - log::info!(target: "OnRuntimeUpgrade", "✅ AssetManager's MinXcmFee has been updated to xcm v3."); - - // pallet version - if crate::AssetManager::on_chain_storage_version() < 3 { - StorageVersion::new(3).put::>(); - writes += 1; - log::info!(target: "OnRuntimeUpgrade", "✅ AssetManager's version has been updated to 3."); - } - reads += 1; - - T::DbWeight::get() - .reads(reads as u64) - .saturating_add(T::DbWeight::get().writes(writes as u64)) - } - - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, DispatchError> { - // AssetIdLocation - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"AssetIdLocation"; - let asset_id_location: Vec<_> = storage_key_iter::< - CalamariAssetId, - AssetLocation, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - log::info!(target: "AssetIdLocation", "storage items count: {}.", asset_id_location.len()); - for (asset_id, v1_location) in asset_id_location { - log::info!(target: "AssetIdLocation", "asset id: {asset_id}, location: {v1_location:?}."); - } - - // LocationAssetId - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"LocationAssetId"; - let location_asset_id: Vec<_> = storage_key_iter::< - AssetLocation, - CalamariAssetId, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - log::info!(target: "LocationAssetId", "storage items count: {}.", location_asset_id.len()); - for (v1_location, asset_id) in location_asset_id { - log::info!(target: "LocationAssetId", "location: {v1_location:?}, asset id: {asset_id}."); - } - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"MinXcmFee"; - let min_xcm_fee: Vec<_> = storage_key_iter::< - AssetLocation, - CalamariAssetId, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - log::info!(target: "MinXcmFee", "storage items count: {}.", min_xcm_fee.len()); - for (v1_location, fees) in min_xcm_fee { - log::info!(target: "MinXcmFee", "location: {v1_location:?}, min xcm fees: {fees}."); - } - - let version = crate::AssetManager::on_chain_storage_version(); - log::info!(target: "StorageVersion", "version: {version:?}."); - - Ok(Vec::new()) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), DispatchError> { - use manta_primitives::assets::AssetLocation; - - if crate::AssetManager::on_chain_storage_version() != 3 { - return Err(DispatchError::Other( - "AssetManager storage version is not 3, the migration wasn't executed.", - )); - } - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"AssetIdLocation"; - let asset_id_location: Vec<_> = storage_key_iter::< - CalamariAssetId, - AssetLocation, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - log::info!(target: "AssetIdLocation", "storage items count: {}.", asset_id_location.len()); - for (index, (_asset_id, v3_location)) in asset_id_location.iter().enumerate() { - if let AssetLocation(VersionedMultiLocation::V3(MultiLocation { .. })) = v3_location { - log::info!(target: "AssetIdLocation", "storage item: {index} has been updated to xcm v3."); - } - } - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"LocationAssetId"; - let location_asset_id: Vec<_> = storage_key_iter::< - AssetLocation, - CalamariAssetId, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - log::info!(target: "LocationAssetId", "storage items count: {}.", location_asset_id.len()); - for (index, (v3_location, _asset_id)) in location_asset_id.iter().enumerate() { - if let AssetLocation(VersionedMultiLocation::V3(MultiLocation { .. })) = v3_location { - log::info!(target: "LocationAssetId", "storage item: {index} has been updated to xcm v3."); - } - } - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"MinXcmFee"; - let min_xcm_fee: Vec<_> = storage_key_iter::< - AssetLocation, - CalamariAssetId, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - log::info!(target: "MinXcmFee", "storage items count: {}.", min_xcm_fee.len()); - for (index, (v3_location, _asset_id)) in min_xcm_fee.iter().enumerate() { - if let AssetLocation(VersionedMultiLocation::V3(MultiLocation { .. })) = v3_location { - log::info!(target: "MinXcmFee", "storage item: {index} has been updated to xcm v3."); - } - } - - Ok(()) - } -} diff --git a/runtime/calamari/src/migrations/mod.rs b/runtime/calamari/src/migrations/mod.rs index 611b9ef9f..cbb525359 100644 --- a/runtime/calamari/src/migrations/mod.rs +++ b/runtime/calamari/src/migrations/mod.rs @@ -14,7 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Manta. If not, see . -//pub mod asset_id; -pub mod asset_manager; -pub mod staking; -pub mod sudo; +// put runtime migrations here. View git history for old migrations diff --git a/runtime/calamari/src/migrations/staking.rs b/runtime/calamari/src/migrations/staking.rs deleted file mode 100644 index 54f6aa87f..000000000 --- a/runtime/calamari/src/migrations/staking.rs +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright 2020-2024 Manta Network. -// This file is part of Manta. -// -// Manta 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. -// -// Manta 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 Manta. If not, see . - -use crate::{ - sp_api_hidden_includes_construct_runtime::hidden_include::traits::{Currency, OriginTrait}, - Balance, Vec, Weight, -}; -use core::marker::PhantomData; -use frame_support::traits::{Get, OnRuntimeUpgrade}; -use sp_runtime::{traits::UniqueSaturatedInto, DispatchError}; - -/// Migration to move old invulnerables to the staking set on upgrade -pub struct InitializeStakingPallet(PhantomData); -const INITIAL_MAX_ACTIVE_COLLATORS: u32 = 63; -impl OnRuntimeUpgrade for InitializeStakingPallet -where - T: frame_system::Config - + pallet_parachain_staking::Config - + pallet_session::Config - + manta_collator_selection::Config, - <::RuntimeOrigin as OriginTrait>::AccountId: - From<::AccountId>, - pallet_parachain_staking::BalanceOf: Into + From, - <::Currency as Currency< - ::AccountId, - >>::Balance: From< - <::Currency as Currency< - ::AccountId, - >>::Balance, - >, -{ - fn on_runtime_upgrade() -> Weight - where - <::RuntimeOrigin as OriginTrait>::AccountId: - From<::AccountId>, - pallet_parachain_staking::BalanceOf: Into + From, - { - log::info!( - target: "InitializeStakingPallet", - "Migrating invulnerables from manta_collator_selection to - pallet_parachain_staking" - ); - - // 1. Find current invulnerables - let invulnerables = manta_collator_selection::Pallet::::invulnerables(); - - // 2. Clear the invulnerables list - let _ = manta_collator_selection::Pallet::::set_invulnerables( - ::RuntimeOrigin::root(), - Vec::new(), - ); - - // 3. Register invulnerables to whitelist - // 3.1 Ensure DesiredCandidates can take the additional invulnerables - let n_of_candidates = manta_collator_selection::Pallet::::candidates().len() as u32; - let new_n_of_candidates = n_of_candidates + invulnerables.len() as u32; - let desired_candidates = manta_collator_selection::Pallet::::desired_candidates(); - if new_n_of_candidates > desired_candidates { - let _ = manta_collator_selection::Pallet::::set_desired_candidates( - ::RuntimeOrigin::root(), - new_n_of_candidates, - ); - } - // 3.2 Ensure the candidacy bond for collator_selection is actually 400k - // NOTE: This is needed to migrate already deployed testnets like Baikal - let _ = manta_collator_selection::Pallet::::set_candidacy_bond( - ::RuntimeOrigin::root(), - T::MinWhitelistCandidateStk::get().unique_saturated_into(), - ); - - // 3.3 onboard with manta_collator_selection::registerCandidate - for invuln in invulnerables.clone() { - log::info!( - "Migrating account {:?} with initial free_balance {:?}", - invuln.clone(), - ::Currency::free_balance(&invuln) - ); - let _ = manta_collator_selection::Pallet::::register_candidate( - ::RuntimeOrigin::root(), - invuln.clone(), - ); - log::info!( - "Migrating account {:?} with free_balance after collator_selection::candidates {:?}", - invuln.clone(), - ::Currency::free_balance(&invuln) - ); - } - - // 4. Initialize parachain staking pallet to genesis-equivalent state - // and onboard invulnerables to staking with 400k lock - - // +1 because migrations execute before this is updated in the on_initialize hook - let current_block = frame_system::Pallet::::block_number() + 1u32.into(); - pallet_parachain_staking::Pallet::::initialize_pallet( - current_block, - invulnerables, - crate::staking::inflation_config::(), - ) - .unwrap_or_else(|err| { - log::error!( - "pallet_parachain_staking initialization failed with {:?}. Chain is likely effed", - err - ); - }); - - // Setting total_selected will take effect at the beginning of the next round, so for the first 6 hours - // our invulnerables will be the only collators - let _ = pallet_parachain_staking::Pallet::::set_total_selected( - ::RuntimeOrigin::root(), - INITIAL_MAX_ACTIVE_COLLATORS, - ); - - T::BlockWeights::get().max_block // simply use the whole block - } - - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, DispatchError> { - // Before beginning the migration invulnerables must have 400k KMA in free balance - let invulnerables = manta_collator_selection::Pallet::::invulnerables(); - for invulnerable in invulnerables.clone() { - assert!( - ::Currency::free_balance(&invulnerable) - >= T::MinWhitelistCandidateStk::get() - ); - } - - // Also ensure there's enough space in collator_selection's Candidates to add all invulnerables - assert!( - ::MaxCandidates::get() - >= (manta_collator_selection::Pallet::::candidates().len() + invulnerables.len()) - as u32 - ); - - Ok(Vec::new()) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), DispatchError> { - // Invulnerables were migrated correctly - let invulnerables = manta_collator_selection::Pallet::::invulnerables(); - for invuln in invulnerables { - assert!( - !manta_collator_selection::Pallet::::candidates() - .iter() - .any(|x| x.who == invuln), - "invulnerables must no longer be candidates with collator_selection", - ); - let bond = pallet_parachain_staking::Bond { - owner: invuln.clone(), - amount: T::MinWhitelistCandidateStk::get(), - }; - assert!( - pallet_parachain_staking::Pallet::::candidate_pool().contains(&bond), - "invulnerables must now be candidates", - ); - assert!( - pallet_parachain_staking::Pallet::::selected_candidates().contains(&invuln), - "invulnerables must be active collators for the first round", - ); - } - // Other pallet parameters are set - // Inflation is set to 3% - use sp_arithmetic::{PerThing, Perbill}; - let infla = pallet_parachain_staking::Range { - min: Perbill::from_rational_with_rounding(5u32, 200u32, sp_arithmetic::Rounding::Down) - .expect("constant denom is not 0. qed"), // = 2.5% - ideal: Perbill::from_percent(3), - max: Perbill::from_percent(3), - }; - assert_eq!( - pallet_parachain_staking::Pallet::::inflation_config().annual, - infla - ); - - // TotalSelected is 63 - assert_eq!( - pallet_parachain_staking::Pallet::::total_selected(), - INITIAL_MAX_ACTIVE_COLLATORS - ); - - // Round is 1 - let current_block = frame_system::Pallet::::block_number() + 1u32.into(); - let round_info = pallet_parachain_staking::Pallet::::round(); - assert_eq!(round_info.current, 1u32); - assert_eq!(round_info.first, current_block); - - Ok(()) - } -} diff --git a/runtime/calamari/src/migrations/sudo.rs b/runtime/calamari/src/migrations/sudo.rs deleted file mode 100644 index d88102c84..000000000 --- a/runtime/calamari/src/migrations/sudo.rs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2020-2024 Manta Network. -// This file is part of Manta. -// -// Manta 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. -// -// Manta 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 Manta. If not, see . - -#![allow(clippy::unnecessary_cast)] - -use core::marker::PhantomData; -#[allow(deprecated)] -use frame_support::migration::remove_storage_prefix; -use frame_support::{ - migration::have_storage_value, - pallet_prelude::Weight, - traits::{Get, OnRuntimeUpgrade}, -}; -use sp_runtime::DispatchError; -use sp_std::vec::Vec; - -pub struct RemoveSudo(PhantomData); -impl OnRuntimeUpgrade for RemoveSudo { - fn on_runtime_upgrade() -> Weight { - if have_storage_value(b"Sudo", b"Key", b"") { - #[allow(deprecated)] - remove_storage_prefix(b"Sudo", b"Key", b""); - #[allow(deprecated)] - remove_storage_prefix(b"Sudo", b":__STORAGE_VERSION__:", b""); - log::info!(target: "OnRuntimeUpgrade", "✅ Sudo key has been removed."); - log::info!(target: "OnRuntimeUpgrade", "✅ The pallet version has been removed."); - T::DbWeight::get() - .reads(1) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } else { - T::DbWeight::get().reads(1) - } - } - - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, DispatchError> { - if have_storage_value(b"Sudo", b"Key", b"") { - log::info!(target: "OnRuntimeUpgrade", "✅ Sudo key will be removed soon."); - log::info!(target: "OnRuntimeUpgrade", "✅ The pallet version will be removed soon."); - Ok(Vec::new()) - } else { - Err(DispatchError::Other("Sudo doesn't exist.")) - } - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), DispatchError> { - if have_storage_value(b"Sudo", b"Key", b"") { - Err(DispatchError::Other("Failed to remove sudo module.")) - } else { - Ok(()) - } - } -} diff --git a/runtime/calamari/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/calamari/src/weights/cumulus_pallet_xcmp_queue.rs index 1b1758a66..8631e5c40 100644 --- a/runtime/calamari/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/calamari/src/weights/cumulus_pallet_xcmp_queue.rs @@ -46,7 +46,12 @@ use core::marker::PhantomData; /// Weight functions needed for cumulus_pallet_xcmp_queue. pub trait WeightInfo { fn set_config_with_u32() -> Weight; - fn set_config_with_weight() -> Weight; + fn enqueue_xcmp_message() -> Weight; + fn suspend_channel() -> Weight; + fn resume_channel() -> Weight; + fn take_first_concatenated_xcm() -> Weight; + fn on_idle_good_msg() -> Weight; + fn on_idle_large_msg() -> Weight; } /// Weights for cumulus_pallet_xcmp_queue using the Substrate node and recommended hardware. @@ -65,12 +70,67 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for Substrat } /// 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 { + fn enqueue_xcmp_message() -> Weight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 5_628_000 picoseconds. - Weight::from_parts(5_795_000, 1594) + // Minimum execution time: 5_584_000 picoseconds. + Weight::from_parts(5_779_000, 1594) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn suspend_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 5_584_000 picoseconds. + Weight::from_parts(5_779_000, 1594) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn resume_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 5_584_000 picoseconds. + Weight::from_parts(5_779_000, 1594) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn take_first_concatenated_xcm() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 5_584_000 picoseconds. + Weight::from_parts(5_779_000, 1594) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn on_idle_good_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 5_584_000 picoseconds. + Weight::from_parts(5_779_000, 1594) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 5_584_000 picoseconds. + Weight::from_parts(5_779_000, 1594) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -91,12 +151,67 @@ impl WeightInfo for () { } /// 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 { + fn enqueue_xcmp_message() -> Weight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 5_628_000 picoseconds. - Weight::from_parts(5_795_000, 1594) + // Minimum execution time: 5_584_000 picoseconds. + Weight::from_parts(5_779_000, 1594) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn suspend_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 5_584_000 picoseconds. + Weight::from_parts(5_779_000, 1594) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn resume_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 5_584_000 picoseconds. + Weight::from_parts(5_779_000, 1594) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn take_first_concatenated_xcm() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 5_584_000 picoseconds. + Weight::from_parts(5_779_000, 1594) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn on_idle_good_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 5_584_000 picoseconds. + Weight::from_parts(5_779_000, 1594) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 5_584_000 picoseconds. + Weight::from_parts(5_779_000, 1594) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/runtime/calamari/src/weights/frame_system.rs b/runtime/calamari/src/weights/frame_system.rs index 9338ba68f..653599085 100644 --- a/runtime/calamari/src/weights/frame_system.rs +++ b/runtime/calamari/src/weights/frame_system.rs @@ -53,6 +53,8 @@ pub trait WeightInfo { fn set_storage(i: u32, ) -> Weight; fn kill_storage(i: u32, ) -> Weight; fn kill_prefix(p: u32, ) -> Weight; + fn authorize_upgrade() -> Weight; + fn apply_authorized_upgrade() -> Weight; } /// Weights for frame_system using the Substrate node and recommended hardware. @@ -116,6 +118,24 @@ impl frame_system::WeightInfo for SubstrateWeight { .saturating_add(Weight::from_parts(1_158_786, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[0, 1000]`. + fn authorize_upgrade() -> Weight { + // Minimum execution time: 17_856 nanoseconds. + Weight::from_parts(18_373_000, 0) + // Standard Error: 1_613 + .saturating_add(Weight::from_parts(1_158_786, 0)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[0, 1000]`. + fn apply_authorized_upgrade() -> Weight { + // Minimum execution time: 17_856 nanoseconds. + Weight::from_parts(18_373_000, 0) + // Standard Error: 1_613 + .saturating_add(Weight::from_parts(1_158_786, 0)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } } // For backwards compatibility and tests @@ -178,4 +198,22 @@ impl WeightInfo for () { .saturating_add(Weight::from_parts(1_158_786, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(p.into()))) } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[0, 1000]`. + fn authorize_upgrade() -> Weight { + // Minimum execution time: 17_856 nanoseconds. + Weight::from_parts(18_373_000, 0) + // Standard Error: 1_613 + .saturating_add(Weight::from_parts(1_158_786, 0)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[0, 1000]`. + fn apply_authorized_upgrade() -> Weight { + // Minimum execution time: 17_856 nanoseconds. + Weight::from_parts(18_373_000, 0) + // Standard Error: 1_613 + .saturating_add(Weight::from_parts(1_158_786, 0)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } } diff --git a/runtime/calamari/src/weights/pallet_preimage.rs b/runtime/calamari/src/weights/pallet_preimage.rs index 90e92f7c0..5908c8c36 100644 --- a/runtime/calamari/src/weights/pallet_preimage.rs +++ b/runtime/calamari/src/weights/pallet_preimage.rs @@ -57,6 +57,7 @@ pub trait WeightInfo { fn unrequest_preimage() -> Weight; fn unrequest_unnoted_preimage() -> Weight; fn unrequest_multi_referenced_preimage() -> Weight; + fn ensure_updated(s: u32, ) -> Weight; } /// Weights for pallet_preimage using the Substrate node and recommended hardware. @@ -215,6 +216,17 @@ impl pallet_preimage::WeightInfo for SubstrateWeight .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + fn ensure_updated(_s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `140` + // Estimated: `3556` + // Minimum execution time: 9_631_000 picoseconds. + Weight::from_parts(9_884_000, 3556) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } } // For backwards compatibility and tests @@ -372,4 +384,15 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + fn ensure_updated(_s: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `140` + // Estimated: `3556` + // Minimum execution time: 9_631_000 picoseconds. + Weight::from_parts(9_884_000, 3556) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } } \ No newline at end of file diff --git a/runtime/calamari/src/weights/pallet_treasury.rs b/runtime/calamari/src/weights/pallet_treasury.rs index ab68507d7..38c7a3a27 100644 --- a/runtime/calamari/src/weights/pallet_treasury.rs +++ b/runtime/calamari/src/weights/pallet_treasury.rs @@ -51,6 +51,10 @@ pub trait WeightInfo { fn approve_proposal(p: u32, ) -> Weight; fn remove_approval() -> Weight; fn on_initialize_proposals(p: u32, ) -> Weight; + fn spend_local() -> Weight; + fn payout() -> Weight; + fn check_status() -> Weight; + fn void_spend() -> Weight; } /// Weights for pallet_treasury using the Substrate node and recommended hardware. @@ -141,6 +145,50 @@ impl pallet_treasury::WeightInfo for SubstrateWeight .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 5206).saturating_mul(p.into())) } + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + fn spend_local() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1887` + // Minimum execution time: 7_926_000 picoseconds. + Weight::from_parts(8_195_000, 1887) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + fn payout() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1887` + // Minimum execution time: 7_926_000 picoseconds. + Weight::from_parts(8_195_000, 1887) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + fn check_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1887` + // Minimum execution time: 7_926_000 picoseconds. + Weight::from_parts(8_195_000, 1887) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + fn void_spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1887` + // Minimum execution time: 7_926_000 picoseconds. + Weight::from_parts(8_195_000, 1887) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } } // For backwards compatibility and tests @@ -230,4 +278,48 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 5206).saturating_mul(p.into())) } + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + fn spend_local() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1887` + // Minimum execution time: 7_926_000 picoseconds. + Weight::from_parts(8_195_000, 1887) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + fn payout() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1887` + // Minimum execution time: 7_926_000 picoseconds. + Weight::from_parts(8_195_000, 1887) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + fn check_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1887` + // Minimum execution time: 7_926_000 picoseconds. + Weight::from_parts(8_195_000, 1887) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + fn void_spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1887` + // Minimum execution time: 7_926_000 picoseconds. + Weight::from_parts(8_195_000, 1887) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } } \ No newline at end of file diff --git a/runtime/calamari/src/weights/pallet_xcm.rs b/runtime/calamari/src/weights/pallet_xcm.rs index 3a64a026b..0833d7a6a 100644 --- a/runtime/calamari/src/weights/pallet_xcm.rs +++ b/runtime/calamari/src/weights/pallet_xcm.rs @@ -61,6 +61,9 @@ pub trait WeightInfo { fn notify_target_migration_fail() -> Weight; fn migrate_version_notify_targets() -> Weight; fn migrate_and_notify_old_targets() -> Weight; + fn transfer_assets() -> Weight; + fn new_query() -> Weight; + fn take_response() -> Weight; } /// Weights for pallet_xcm using the Substrate node and recommended hardware. @@ -285,6 +288,36 @@ impl pallet_xcm::WeightInfo for SubstrateWeight { .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } + /// Storage: PolkadotXcm VersionNotifyTargets (r:5 w:0) + /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `240` + // Estimated: `13605` + // Minimum execution time: 20_251_000 picoseconds. + Weight::from_parts(20_720_000, 13605) + .saturating_add(T::DbWeight::get().reads(5_u64)) + } + /// Storage: PolkadotXcm VersionNotifyTargets (r:5 w:0) + /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `240` + // Estimated: `13605` + // Minimum execution time: 20_251_000 picoseconds. + Weight::from_parts(20_720_000, 13605) + .saturating_add(T::DbWeight::get().reads(5_u64)) + } + /// Storage: PolkadotXcm VersionNotifyTargets (r:5 w:0) + /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `240` + // Estimated: `13605` + // Minimum execution time: 20_251_000 picoseconds. + Weight::from_parts(20_720_000, 13605) + .saturating_add(T::DbWeight::get().reads(5_u64)) + } } // For backwards compatibility and tests @@ -508,4 +541,34 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } + /// Storage: PolkadotXcm VersionNotifyTargets (r:5 w:0) + /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `240` + // Estimated: `13605` + // Minimum execution time: 20_251_000 picoseconds. + Weight::from_parts(20_720_000, 13605) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + } + /// Storage: PolkadotXcm VersionNotifyTargets (r:5 w:0) + /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `240` + // Estimated: `13605` + // Minimum execution time: 20_251_000 picoseconds. + Weight::from_parts(20_720_000, 13605) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + } + /// Storage: PolkadotXcm VersionNotifyTargets (r:5 w:0) + /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `240` + // Estimated: `13605` + // Minimum execution time: 20_251_000 picoseconds. + Weight::from_parts(20_720_000, 13605) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + } } \ No newline at end of file diff --git a/runtime/calamari/src/xcm_config.rs b/runtime/calamari/src/xcm_config.rs index 3e9cfb909..141eea7ba 100644 --- a/runtime/calamari/src/xcm_config.rs +++ b/runtime/calamari/src/xcm_config.rs @@ -15,16 +15,19 @@ // along with Manta. If not, see . use super::{ - assets_config::CalamariAssetConfig, AssetManager, Assets, Balances, DmpQueue, - EnsureRootOrMoreThanHalfCouncil, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, - RuntimeCall, RuntimeEvent, RuntimeOrigin, Treasury, XcmpQueue, MAXIMUM_BLOCK_WEIGHT, + assets_config::CalamariAssetConfig, AssetManager, Assets, Balances, + EnsureRootOrMoreThanHalfCouncil, MessageQueue, ParachainInfo, ParachainSystem, PolkadotXcm, + Runtime, RuntimeBlockWeights, RuntimeCall, RuntimeEvent, RuntimeOrigin, Treasury, XcmpQueue, }; use codec::{Decode, Encode}; use core::marker::PhantomData; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use frame_support::{ match_types, parameter_types, - traits::{ConstU32, Contains, Currency, Everything, Nothing}, + traits::{ + ConstU32, Contains, Currency, EnqueueWithOrigin, Everything, Nothing, TransformOrigin, + }, weights::Weight, }; use frame_system::EnsureRoot; @@ -39,9 +42,11 @@ use manta_primitives::{ }; use orml_traits::location::AbsoluteReserveProvider; use pallet_xcm::XcmPassthrough; -use polkadot_parachain::primitives::Sibling; +use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; +use polkadot_parachain_primitives::primitives::Sibling; +use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery; use scale_info::TypeInfo; -use sp_runtime::traits::Convert; +use sp_runtime::{traits::Convert, Perbill}; use sp_std::prelude::*; use xcm::latest::prelude::*; use xcm_builder::{ @@ -57,20 +62,22 @@ use xcm_executor::{traits::JustTry, Config, XcmExecutor}; pub use sp_runtime::BuildStorage; parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub ReservedDmpWeight: Weight = RuntimeBlockWeights::get().max_block.saturating_div(4); + pub ReservedXcmpWeight: Weight = RuntimeBlockWeights::get().max_block.saturating_div(4); } impl cumulus_pallet_parachain_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SelfParaId = parachain_info::Pallet; - type DmpMessageHandler = DmpQueue; + type DmpQueue = EnqueueWithOrigin; type ReservedDmpWeight = ReservedDmpWeight; type OutboundXcmpMessageSource = XcmpQueue; type XcmpMessageHandler = XcmpQueue; type ReservedXcmpWeight = ReservedXcmpWeight; type OnSystemEvent = (); type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases; + type WeightInfo = cumulus_pallet_parachain_system::weights::SubstrateWeight; + type ConsensusHook = cumulus_pallet_parachain_system::ExpectParentIncluded; } impl parachain_info::Config for Runtime {} @@ -249,6 +256,7 @@ impl Config for XcmExecutorConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type FeeManager = (); + type Aliasers = Nothing; } /// Converts a Signed Local Origin into a MultiLocation @@ -263,11 +271,6 @@ pub type XcmRouter = ( XcmpQueue, ); -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; @@ -297,8 +300,6 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type MaxLockers = ConstU32<8>; type RemoteLockConsumerIdentifier = (); - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type WeightInfo = crate::weights::pallet_xcm::SubstrateWeight; } @@ -309,20 +310,50 @@ impl cumulus_pallet_xcm::Config for Runtime { impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRoot; type ControllerOrigin = EnsureRootOrMoreThanHalfCouncil; type ControllerOriginConverter = XcmOriginToCallOrigin; type WeightInfo = crate::weights::cumulus_pallet_xcmp_queue::SubstrateWeight; - type PriceForSiblingDelivery = (); + type PriceForSiblingDelivery = NoPriceForMessageDelivery; + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = ConstU32<1_000>; +} + +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 = (); + #[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! { + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; } impl cumulus_pallet_dmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRoot; + type DmpSink = EnqueueWithOrigin; + type WeightInfo = cumulus_pallet_dmp_queue::weights::SubstrateWeight; } /// We wrap AssetId for XToken @@ -338,14 +369,11 @@ pub struct CurrencyIdtoMultiLocation(PhantomData sp_runtime::traits::Convert> for CurrencyIdtoMultiLocation where - AssetXConverter: xcm_executor::traits::Convert, + AssetXConverter: sp_runtime::traits::MaybeEquivalence, { fn convert(currency: CurrencyId) -> Option { match currency { - CurrencyId::MantaCurrency(asset_id) => match AssetXConverter::reverse_ref(asset_id) { - Ok(location) => Some(location), - Err(_) => None, - }, + CurrencyId::MantaCurrency(asset_id) => AssetXConverter::convert_back(&asset_id), } } } diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 6c7703afd..201296f9a 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -39,7 +39,7 @@ sp-std = { workspace = true, features = ["std"] } # Polkadot dependencies pallet-xcm = { workspace = true, features = ["std"] } polkadot-core-primitives = { workspace = true, features = ["std"] } -polkadot-parachain = { workspace = true, features = ["std"] } +polkadot-parachain-primitives = { workspace = true, features = ["std"] } polkadot-runtime-parachains = { workspace = true, features = ["std"] } xcm = { workspace = true, features = ["std"] } xcm-builder = { workspace = true, features = ["std"] } diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 813252b17..00879e1a7 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -19,8 +19,6 @@ #![allow(clippy::upper_case_acronyms)] #![cfg_attr(not(feature = "std"), no_std)] -pub mod migration; - #[cfg(feature = "test-helpers")] pub mod test_helpers; diff --git a/runtime/common/src/migration.rs b/runtime/common/src/migration.rs deleted file mode 100644 index d726965f5..000000000 --- a/runtime/common/src/migration.rs +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright 2020-2024 Manta Network. -// This file is part of Manta. -// -// Manta 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. -// -// Manta 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 Manta. If not, see . - -//! Migration creates some helper function to make storage migration more convenient. - -#![cfg_attr(not(feature = "std"), no_std)] - -use manta_primitives::constants::RocksDbWeight; - -use frame_support::{ - dispatch::Weight, - migrations::{ - migrate_from_pallet_version_to_storage_version, PalletVersionToStorageVersionHelper, - }, - traits::{GetStorageVersion, OnRuntimeUpgrade, PalletInfoAccess}, -}; -#[cfg(feature = "try-runtime")] -use frame_support::{ensure, traits::StorageVersion}; - -use sp_std::{marker::PhantomData, vec::Vec}; - -/// MigratePalletPv2Sv means a wrapped handler to automatically upgrade our pallet -/// from PalletVersion(Pv) to StorageVersion(Sv). -/// -/// It's actually a simple rewriting about storage flag: delete [pallet_name] + '__STORAGE_VERSION__' key -/// and reset [pallet_name] + '__PALLET_VERSION__' key. -/// So It's a one-time job, and should be removed soon to minimize runtime size. -pub struct MigratePalletPv2Sv(PhantomData); - -impl OnRuntimeUpgrade for MigratePalletPv2Sv -where - T: GetStorageVersion + PalletInfoAccess + PalletVersionToStorageVersionHelper, -{ - fn on_runtime_upgrade() -> Weight { - let db_weight = RocksDbWeight::get(); - migrate_from_pallet_version_to_storage_version::(&db_weight) - } - - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::DispatchError> { - let storage_version = StorageVersion::get::(); - frame_support::debug(&"----PreUpgrade----"); - frame_support::debug(&T::module_name()); - frame_support::debug(&T::name()); - frame_support::debug(&storage_version); - Ok(Vec::new()) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), sp_runtime::DispatchError> { - let storage_version = StorageVersion::get::(); - frame_support::debug(&"----PostUpgrade----"); - frame_support::debug(&T::module_name()); - frame_support::debug(&T::name()); - frame_support::debug(&storage_version); - ensure!(storage_version == StorageVersion::new(1), T::module_name()); - Ok(()) - } -} - -#[cfg(test)] -mod test { - use super::*; - use frame_support::traits::{CrateVersion, StorageInstance, StorageVersion}; - use sp_io::TestExternalities; - - pub struct DummyPrefix; - - impl StorageInstance for DummyPrefix { - fn pallet_prefix() -> &'static str { - "test_pv2sv" - } - - const STORAGE_PREFIX: &'static str = "foo"; - } - - // just used for below migration test. - // avoiding declare a huge Runtime part. - struct MockForMigrationTesting {} - - impl GetStorageVersion for MockForMigrationTesting { - type CurrentStorageVersion = StorageVersion; - - fn current_storage_version() -> StorageVersion { - StorageVersion::new(10) - } - - fn on_chain_storage_version() -> StorageVersion { - StorageVersion::get::() - } - } - - impl PalletInfoAccess for MockForMigrationTesting { - fn index() -> usize { - 0 - } - - fn name() -> &'static str { - "test_pv_2_sv" - } - - fn module_name() -> &'static str { - "test_module_name" - } - - fn crate_version() -> CrateVersion { - CrateVersion { - major: 4, - minor: 0, - patch: 0, - } - } - } - - #[test] - fn test_pv_2_sv_works() { - // 1. write old pallet version into storage. - // 2. call utility - // 3. test whether it works. - const PALLET_VERSION_STORAGE_KEY_POSTFIX: &[u8] = b":__PALLET_VERSION__:"; - fn pallet_version_key(name: &str) -> [u8; 32] { - frame_support::storage::storage_prefix( - name.as_bytes(), - PALLET_VERSION_STORAGE_KEY_POSTFIX, - ) - } - - let mut db = TestExternalities::default(); - db.execute_with(|| { - sp_io::storage::set( - &pallet_version_key(MockForMigrationTesting::name()), - &[1, 0, 0], - ); - assert_eq!( - MockForMigrationTesting::on_chain_storage_version(), - StorageVersion::new(0) - ); - let weight = MigratePalletPv2Sv::::on_runtime_upgrade(); - assert_eq!(Weight::from_parts(100_000 * 1000 * 2, 0), weight); - assert!( - sp_io::storage::get(&pallet_version_key(MockForMigrationTesting::name())).is_none() - ); - assert_eq!( - MockForMigrationTesting::on_chain_storage_version(), - StorageVersion::new(10) - ); - }) - } -} diff --git a/runtime/integration-tests/Cargo.toml b/runtime/integration-tests/Cargo.toml index 03ca63b70..5ea660fff 100644 --- a/runtime/integration-tests/Cargo.toml +++ b/runtime/integration-tests/Cargo.toml @@ -14,6 +14,7 @@ manta-runtime = { workspace = true, optional = true, features = ["std"] } [dev-dependencies] codec = { workspace = true } +frame-metadata = { workspace = true, features = ["std"] } frame-support = { workspace = true, features = ["std"] } frame-system = { workspace = true, features = ["std"] } lazy_static = { workspace = true } @@ -38,8 +39,10 @@ xcm = { workspace = true } xcm-builder = { workspace = true } xcm-executor = { workspace = true } +parachains-common = { workspace = true, features = ["std"] } polkadot-core-primitives = { workspace = true, features = ["std"] } -polkadot-parachain = { workspace = true, features = ["std"] } +polkadot-parachain-primitives = { workspace = true, features = ["std"] } +polkadot-runtime-common = { workspace = true, features = ["std"] } polkadot-runtime-parachains = { workspace = true, features = ["std"] } xcm-simulator = { workspace = true } diff --git a/runtime/integration-tests/src/integrations_mock/mock.rs b/runtime/integration-tests/src/integrations_mock/mock.rs index 8bd2b54fc..f2feec8a9 100644 --- a/runtime/integration-tests/src/integrations_mock/mock.rs +++ b/runtime/integration-tests/src/integrations_mock/mock.rs @@ -17,12 +17,14 @@ #![cfg(test)] use super::{ALICE, ALICE_SESSION_KEYS, *}; -use frame_support::traits::{GenesisBuild, OnFinalize, OnInitialize}; +use core::marker::PhantomData; +use frame_support::traits::{OnFinalize, OnInitialize}; use manta_primitives::{ assets::AssetConfig, types::{AccountId, Balance}, }; use sp_arithmetic::Perbill; +use sp_runtime::BuildStorage; pub struct ExtBuilder { balances: Vec<(AccountId, Balance)>, @@ -108,8 +110,8 @@ impl ExtBuilder { } pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); pallet_balances::GenesisConfig:: { @@ -160,9 +162,10 @@ impl ExtBuilder { .assimilate_storage(&mut t) .unwrap(); - >::assimilate_storage( + pallet_xcm::GenesisConfig::::assimilate_storage( &pallet_xcm::GenesisConfig { safe_xcm_version: self.safe_xcm_version, + _config: PhantomData::, }, &mut t, ) diff --git a/runtime/integration-tests/src/integrations_mock/test_calamari.rs b/runtime/integration-tests/src/integrations_mock/test_calamari.rs index 9ae4d2f34..5cc52b3bd 100644 --- a/runtime/integration-tests/src/integrations_mock/test_calamari.rs +++ b/runtime/integration-tests/src/integrations_mock/test_calamari.rs @@ -19,14 +19,13 @@ use super::{mock::ExtBuilder, *}; use frame_support::{ assert_ok, - dispatch::Dispatchable, traits::{Get, PalletInfo, StorageInfo, StorageInfoTrait}, StorageHasher, Twox128, }; use manta_support::manta_pay::{asset_value_encode, field_from_id, Asset}; use pallet_transaction_payment::ChargeTransactionPayment; use sp_runtime::{ - traits::{Header as HeaderT, SignedExtension}, + traits::{Dispatchable, Header as HeaderT, SignedExtension}, Percent, }; @@ -185,7 +184,7 @@ fn verify_pallet_prefixes() { storage_name: b"Holds".to_vec(), prefix: prefix(b"Balances", b"Holds"), max_values: None, - max_size: Some(849), + max_size: Some(949), }, StorageInfo { pallet_name: b"Balances".to_vec(), @@ -320,7 +319,7 @@ fn verify_calamari_pallet_indices() { // Check removed pallets. ExtBuilder::default().build().execute_with(|| { - use frame_support::metadata::{v14::META_RESERVED, RuntimeMetadata}; + use frame_metadata::{RuntimeMetadata, META_RESERVED}; let runtime_metadata = calamari_runtime::Runtime::metadata(); assert_eq!(runtime_metadata.0, META_RESERVED); @@ -363,7 +362,7 @@ fn reward_fees_to_block_author_and_treasury() { System::initialize(&1, &Default::default(), header.digest()); assert_eq!(Authorship::author().unwrap(), author); - let call = RuntimeCall::Balances(pallet_balances::Call::transfer { + let call = RuntimeCall::Balances(pallet_balances::Call::transfer_keep_alive { dest: sp_runtime::MultiAddress::Id(CHARLIE.clone()), value: 10 * KMA, }); diff --git a/runtime/integration-tests/src/integrations_mock/test_common.rs b/runtime/integration-tests/src/integrations_mock/test_common.rs index df661c58d..aeea8a093 100644 --- a/runtime/integration-tests/src/integrations_mock/test_common.rs +++ b/runtime/integration-tests/src/integrations_mock/test_common.rs @@ -20,13 +20,14 @@ #![allow(clippy::identity_op)] // keep e.g. 1 * DAYS for legibility use super::{mock::*, *}; +use codec::Encode; use frame_support::{ assert_err, assert_noop, assert_ok, error::BadOrigin, traits::{ fungibles::Inspect, tokens::{ExistenceRequirement, Provenance}, - Get, PalletsInfoAccess, + Currency, Get, PalletsInfoAccess, }, }; use runtime_common::test_helpers::{ @@ -336,9 +337,10 @@ fn balances_operations_should_work() { // Basic transfer should work assert_ok!(Balances::transfer( - RuntimeOrigin::signed(ALICE.clone()), - sp_runtime::MultiAddress::Id(CHARLIE.clone()), + &ALICE, + &CHARLIE, transfer_amount, + ExistenceRequirement::AllowDeath, )); assert_eq!( Balances::free_balance(ALICE.clone()), @@ -1139,7 +1141,7 @@ fn test_sender_side_xcm_weights() { mod governance_tests { use super::{super::mock::ExtBuilder, *}; - use frame_support::{codec::Encode, traits::StorePreimage}; + use frame_support::traits::StorePreimage; use sp_core::H256; use sp_runtime::traits::{BlakeTwo256, Hash}; diff --git a/runtime/integration-tests/src/integrations_mock/test_manta.rs b/runtime/integration-tests/src/integrations_mock/test_manta.rs index b3533034c..34d73b650 100644 --- a/runtime/integration-tests/src/integrations_mock/test_manta.rs +++ b/runtime/integration-tests/src/integrations_mock/test_manta.rs @@ -18,13 +18,12 @@ use super::{mock::ExtBuilder, *}; use frame_support::{ - dispatch::Dispatchable, traits::{PalletInfo, StorageInfo, StorageInfoTrait}, StorageHasher, Twox128, }; use pallet_transaction_payment::ChargeTransactionPayment; use sp_runtime::{ - traits::{Header as HeaderT, SignedExtension}, + traits::{Dispatchable, Header as HeaderT, SignedExtension}, Percent, }; @@ -146,7 +145,7 @@ fn verify_pallet_prefixes() { storage_name: b"Holds".to_vec(), prefix: prefix(b"Balances", b"Holds"), max_values: None, - max_size: Some(849), + max_size: Some(949), }, StorageInfo { pallet_name: b"Balances".to_vec(), @@ -236,7 +235,7 @@ fn reward_fees_to_block_author_and_treasury() { System::initialize(&1, &Default::default(), header.digest()); assert_eq!(Authorship::author().unwrap(), author); - let call = RuntimeCall::Balances(pallet_balances::Call::transfer { + let call = RuntimeCall::Balances(pallet_balances::Call::transfer_allow_death { dest: sp_runtime::MultiAddress::Id(CHARLIE.clone()), value: 10 * MANTA, }); diff --git a/runtime/integration-tests/src/xcm_mock/mod.rs b/runtime/integration-tests/src/xcm_mock/mod.rs index 1af758d16..28324aa34 100644 --- a/runtime/integration-tests/src/xcm_mock/mod.rs +++ b/runtime/integration-tests/src/xcm_mock/mod.rs @@ -20,9 +20,9 @@ pub mod parachain; pub mod relay_chain; pub mod xcm_tests; -use frame_support::traits::GenesisBuild; -use polkadot_parachain::primitives::Id as ParaId; -use sp_runtime::traits::AccountIdConversion; +use core::marker::PhantomData; +use cumulus_primitives_core::ParaId; +use sp_runtime::{traits::AccountIdConversion, BuildStorage}; use xcm::latest::prelude::*; use xcm_simulator::{decl_test_network, decl_test_parachain, decl_test_relay_chain, TestExt}; pub const ALICE: sp_runtime::AccountId32 = sp_runtime::AccountId32::new([0u8; 32]); @@ -34,7 +34,7 @@ pub const PARA_C_ID: u32 = 3; decl_test_parachain! { pub struct ParaA { Runtime = parachain::Runtime, - XcmpMessageHandler = parachain::XcmpQueue, + XcmpMessageHandler = parachain::MsgQueue, DmpMessageHandler = parachain::MsgQueue, new_ext = para_ext(PARA_A_ID), } @@ -43,7 +43,7 @@ decl_test_parachain! { decl_test_parachain! { pub struct ParaB { Runtime = parachain::Runtime, - XcmpMessageHandler = parachain::XcmpQueue, + XcmpMessageHandler = parachain::MsgQueue, DmpMessageHandler = parachain::MsgQueue, new_ext = para_ext(PARA_B_ID), } @@ -52,7 +52,7 @@ decl_test_parachain! { decl_test_parachain! { pub struct ParaC { Runtime = parachain::Runtime, - XcmpMessageHandler = parachain::XcmpQueue, + XcmpMessageHandler = parachain::MsgQueue, DmpMessageHandler = parachain::MsgQueue, new_ext = para_ext(PARA_C_ID), } @@ -88,8 +88,8 @@ pub fn para_account_id(id: u32) -> relay_chain::AccountId { pub fn para_ext(para_id: u32) -> sp_io::TestExternalities { use parachain::{MsgQueue, Runtime, System}; - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); pallet_balances::GenesisConfig:: { @@ -100,12 +100,10 @@ pub fn para_ext(para_id: u32) -> sp_io::TestExternalities { let parachain_info_config = parachain_info::GenesisConfig { parachain_id: para_id.into(), + _config: PhantomData::, }; - >::assimilate_storage( - ¶chain_info_config, - &mut t, - ) - .unwrap(); + parachain_info::GenesisConfig::::assimilate_storage(¶chain_info_config, &mut t) + .unwrap(); let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| { @@ -118,8 +116,8 @@ pub fn para_ext(para_id: u32) -> sp_io::TestExternalities { pub fn relay_ext() -> sp_io::TestExternalities { use relay_chain::{Runtime, System}; - let mut t = frame_system::GenesisConfig::default() - .build_storage::() + let mut t = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); pallet_balances::GenesisConfig:: { diff --git a/runtime/integration-tests/src/xcm_mock/parachain.rs b/runtime/integration-tests/src/xcm_mock/parachain.rs index 3ddbda73e..ff6149032 100644 --- a/runtime/integration-tests/src/xcm_mock/parachain.rs +++ b/runtime/integration-tests/src/xcm_mock/parachain.rs @@ -20,11 +20,15 @@ use codec::{Decode, Encode}; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_primitives_core::AggregateMessageOrigin; use frame_support::{ assert_ok, construct_runtime, match_types, pallet_prelude::DispatchResult, parameter_types, - traits::{AsEnsureOriginWithArg, ConstU128, ConstU32, Contains, Currency, Everything, Nothing}, + traits::{ + AsEnsureOriginWithArg, ConstU128, ConstU32, Contains, Currency, EnqueueWithOrigin, + Everything, Nothing, + }, weights::Weight, PalletId, }; @@ -37,15 +41,14 @@ use sp_runtime::{ }; use sp_std::prelude::*; -#[cfg(feature = "runtime-benchmarks")] -use super::ReachableDest; +use cumulus_primitives_core::ParaId; use manta_primitives::{ assets::{ AssetConfig, AssetIdLocationConvert, AssetIdType, AssetLocation, AssetRegistry, AssetRegistryMetadata, AssetStorageMetadata, BalanceType, LocationType, NativeAndNonNative, }, constants::{ASSET_MANAGER_PALLET_ID, CALAMARI_DECIMAL, WEIGHT_PER_SECOND}, - types::{BlockNumber, CalamariAssetId, Header}, + types::{BlockNumber, CalamariAssetId}, xcm::{ AccountIdToMultiLocation, AllowTopLevelPaidExecutionDescendOriginFirst, AllowTopLevelPaidExecutionFrom, FirstAssetTrader, IsNativeConcrete, MultiAssetAdapter, @@ -54,9 +57,10 @@ use manta_primitives::{ }; use pallet_xcm::XcmPassthrough; use polkadot_core_primitives::BlockNumber as RelayBlockNumber; -use polkadot_parachain::primitives::{ - DmpMessageHandler, Id as ParaId, Sibling, XcmpMessageFormat, XcmpMessageHandler, +use polkadot_parachain_primitives::primitives::{ + DmpMessageHandler, Sibling, XcmpMessageFormat, XcmpMessageHandler, }; +use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery; use xcm::{latest::prelude::*, Version as XcmVersion, VersionedMultiLocation, VersionedXcm}; use xcm_builder::{ Account32Hash, AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, @@ -94,13 +98,13 @@ parameter_types! { impl frame_system::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = BlockNumber; + type Nonce = u64; + type Block = Block; + type RuntimeTask = RuntimeTask; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type BlockWeights = (); @@ -136,7 +140,8 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type MaxHolds = ConstU32<50>; } @@ -343,18 +348,23 @@ impl Config for XcmExecutorConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type FeeManager = (); + type Aliasers = (); +} + +parameter_types! { + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; } 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 = EnsureRoot; type ControllerOriginConverter = XcmOriginToCallOrigin; type WeightInfo = (); - type PriceForSiblingDelivery = (); + type PriceForSiblingDelivery = NoPriceForMessageDelivery; + type MaxInboundSuspended = ConstU32<1_000>; + type XcmpQueue = (); } #[frame_support::pallet] @@ -510,13 +520,15 @@ impl mock_msg_queue::Config for Runtime { impl cumulus_pallet_parachain_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SelfParaId = parachain_info::Pallet; - type DmpMessageHandler = MsgQueue; + type DmpQueue = EnqueueWithOrigin<(), RelayOrigin>; type ReservedDmpWeight = ReservedDmpWeight; type OutboundXcmpMessageSource = XcmpQueue; type XcmpMessageHandler = XcmpQueue; type ReservedXcmpWeight = ReservedXcmpWeight; type OnSystemEvent = (); type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases; + type ConsensusHook = cumulus_pallet_parachain_system::ExpectParentIncluded; + type WeightInfo = (); } pub type LocalOriginToLocation = SignedToAccountId32; @@ -546,8 +558,6 @@ impl pallet_xcm::Config for Runtime { type MaxLockers = ConstU32<8>; type RemoteLockConsumerIdentifier = (); type WeightInfo = PalletXcmWeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; } parameter_types! { @@ -680,14 +690,11 @@ pub struct CurrencyIdtoMultiLocation(sp_std::marker::PhantomDat impl sp_runtime::traits::Convert> for CurrencyIdtoMultiLocation where - AssetXConverter: xcm_executor::traits::Convert, + AssetXConverter: sp_runtime::traits::MaybeEquivalence, { fn convert(currency: CurrencyId) -> Option { match currency { - CurrencyId::MantaCurrency(asset_id) => match AssetXConverter::reverse_ref(asset_id) { - Ok(location) => Some(location), - Err(_) => None, - }, + CurrencyId::MantaCurrency(asset_id) => AssetXConverter::convert_back(&asset_id), } } } @@ -726,18 +733,14 @@ impl orml_xtokens::Config for Runtime { impl parachain_info::Config for Runtime {} -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; pub const PALLET_ASSET_INDEX: u8 = 1; construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Runtime { - System: frame_system::{Pallet, Call, Storage, Config, Event} = 0, + System: frame_system::{Pallet, Call, Storage, Config, Event} = 0, Assets: pallet_assets::{Pallet, Storage, Event} = 1, AssetManager: pallet_asset_manager::{Pallet, Call, Storage, Event} = 2, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 3, @@ -745,9 +748,9 @@ construct_runtime!( PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin} = 5, XTokens: orml_xtokens::{Pallet, Call, Event, Storage} = 6, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 7, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 8, + ParachainInfo: parachain_info::{Pallet, Storage, Config} = 8, XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 9, - ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned} = 10, + ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned} = 10, } ); @@ -764,7 +767,7 @@ pub(crate) fn on_runtime_upgrade() { PolkadotXcm::on_runtime_upgrade(); } -pub(crate) fn para_roll_to(n: u32) { +pub(crate) fn para_roll_to(n: u64) { while System::block_number() < n { PolkadotXcm::on_finalize(System::block_number()); Balances::on_finalize(System::block_number()); diff --git a/runtime/integration-tests/src/xcm_mock/relay_chain.rs b/runtime/integration-tests/src/xcm_mock/relay_chain.rs index 878fb5dc5..c7056dc40 100644 --- a/runtime/integration-tests/src/xcm_mock/relay_chain.rs +++ b/runtime/integration-tests/src/xcm_mock/relay_chain.rs @@ -30,13 +30,8 @@ use sp_runtime::{ AccountId32, }; -#[cfg(feature = "runtime-benchmarks")] -use super::ReachableDest; -use manta_primitives::{ - types::{BlockNumber, Header}, - xcm::AllowTopLevelPaidExecutionFrom, -}; -use polkadot_parachain::primitives::Id as ParaId; +use cumulus_primitives_core::ParaId; +use manta_primitives::{types::BlockNumber, xcm::AllowTopLevelPaidExecutionFrom}; use polkadot_runtime_parachains::{ configuration, inclusion::{AggregateMessageOrigin, UmpQueueId}, @@ -46,7 +41,7 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowUnpaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, ChildSystemParachainAsSuperuser, - CurrencyAdapter as XcmCurrencyAdapter, FixedRateOfFungible, FixedWeightBounds, IsConcrete, + FixedRateOfFungible, FixedWeightBounds, FungibleAdapter as XcmCurrencyAdapter, IsConcrete, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, }; use xcm_executor::{Config, XcmExecutor}; @@ -69,13 +64,13 @@ parameter_types! { impl frame_system::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = BlockNumber; + type Nonce = u64; + type Block = Block; + type RuntimeTask = RuntimeTask; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type BlockWeights = (); @@ -111,7 +106,8 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type MaxHolds = ConstU32<50>; } @@ -195,6 +191,7 @@ impl Config for XcmExecutorConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type FeeManager = (); + type Aliasers = (); } pub type LocalOriginToLocation = SignedToAccountId32; @@ -224,8 +221,6 @@ impl pallet_xcm::Config for Runtime { type MaxLockers = ConstU32<8>; type RemoteLockConsumerIdentifier = (); type WeightInfo = PalletXcmWeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; } parameter_types! { @@ -242,6 +237,7 @@ impl pallet_message_queue::Config for Runtime { type MaxStale = MessageQueueMaxStale; type ServiceWeight = MessageQueueServiceWeight; type MessageProcessor = MessageProcessor; + type QueuePausedQuery = (); type QueueChangeHandler = (); type WeightInfo = (); } @@ -274,16 +270,12 @@ parameter_types! { impl origin::Config for Runtime {} -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Runtime { - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, ParasOrigin: origin::{Pallet, Origin}, XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin}, @@ -301,7 +293,7 @@ pub(crate) fn relay_events() -> Vec { } use frame_support::traits::{OnFinalize, OnInitialize}; -pub(crate) fn relay_roll_to(n: BlockNumber) { +pub(crate) fn relay_roll_to(n: u64) { while System::block_number() < n { XcmPallet::on_finalize(System::block_number()); Balances::on_finalize(System::block_number()); diff --git a/runtime/integration-tests/src/xcm_mock/xcm_tests.rs b/runtime/integration-tests/src/xcm_mock/xcm_tests.rs index e6cc1a1af..be22aab8e 100644 --- a/runtime/integration-tests/src/xcm_mock/xcm_tests.rs +++ b/runtime/integration-tests/src/xcm_mock/xcm_tests.rs @@ -21,7 +21,9 @@ use crate::xcm_mock::parachain::XcmFeesAccount; use codec::Encode; use frame_support::{ - assert_err, assert_noop, assert_ok, traits::tokens::fungibles::Mutate, weights::Weight, + assert_err, assert_noop, assert_ok, + traits::{tokens::fungibles::Mutate, Currency, ExistenceRequirement}, + weights::Weight, }; use parachain::{RuntimeEvent, System}; @@ -32,7 +34,7 @@ use runtime_common::test_helpers::{ to_reserve_xcm_message_sender_side, ADVERTISED_DEST_WEIGHT, }; use xcm::{latest::prelude::*, VersionedMultiLocation, WrapVersion}; -use xcm_executor::traits::{Convert, WeightBounds}; +use xcm_executor::traits::{ConvertLocation, WeightBounds}; use xcm_simulator::TestExt; use super::{ @@ -197,7 +199,7 @@ fn xcmp_transact_from_sibling_tests() { id: ALICE.into(), }); let alice_derived_account_on_b = - xcm_builder::Account32Hash::::convert_ref(MultiLocation { + xcm_builder::Account32Hash::::convert_location(&MultiLocation { parents: 1, interior: X2( Parachain(PARA_A_ID), @@ -266,13 +268,13 @@ fn xcmp_transact_from_sibling_tests() { ParaB::execute_with(|| { use parachain::{RuntimeEvent, System}; + assert!(System::events().iter().any(|r| matches!( r.event, - RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::Fail { - message_hash: _, - error: XcmError::Barrier, - weight: _ - }) + RuntimeEvent::MsgQueue(crate::xcm_mock::parachain::mock_msg_queue::Event::Fail( + _, + XcmError::Barrier, + )) ))); }); } @@ -659,13 +661,13 @@ fn send_para_a_native_asset_to_para_b_barriers_should_work() { // should not let the transfer through ParaB::execute_with(|| { use parachain::{RuntimeEvent, System}; + assert!(System::events().iter().any(|r| matches!( r.event, - RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::Fail { - message_hash: Some(_), - error: xcm_simulator::XcmError::Barrier, - weight: _ - }) + RuntimeEvent::MsgQueue(crate::xcm_mock::parachain::mock_msg_queue::Event::Fail( + _, + XcmError::Barrier, + )) ))); }); @@ -887,16 +889,13 @@ fn send_para_a_native_asset_to_para_b_must_fail_cases() { ParaB::execute_with(|| { use parachain::{RuntimeEvent, System}; - assert!(System::events().iter().any(|r| { - matches!( - r.event, - RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::Fail { - message_hash: Some(_), - error: xcm_simulator::XcmError::TooExpensive, - weight: _ - }) - ) - })); + assert!(System::events().iter().any(|r| matches!( + r.event, + RuntimeEvent::MsgQueue(crate::xcm_mock::parachain::mock_msg_queue::Event::Fail( + _, + XcmError::TooExpensive, + )) + ))); }); // Make sure B didn't receive the token @@ -1279,9 +1278,9 @@ fn receive_relay_asset_with_trader_on_parachain() { let relay_asset_metadata = create_asset_metadata("Kusama", "KSM", 12, 1, false, true); let para_a_asset_metadata = create_asset_metadata("ParaA", "ParaA", 12, 1, false, true); - let amount = 666u128; + let amount = 10_000_000_000u128; // We charge 10^9 as units per second on ParaA - let units_per_second = 1_000_000_000u128; + let units_per_second = 100_000_000_000u128; let fee = calculate_fee(units_per_second, RESERVE_TRANSFER_WEIGHT_ON_RELAY); assert!(fee > 0); @@ -1319,15 +1318,13 @@ fn receive_relay_asset_with_trader_on_parachain() { }); ParaA::execute_with(|| { - // ALICE gets amount - fee - assert_eq!( - parachain::Assets::balance(relay_asset_id_on_a, &ALICE), - amount - fee - ); + let alice_amount = parachain::Assets::balance(relay_asset_id_on_a, &ALICE); + // ALICE gets number greater than 0 but less then amount + assert!(0 < alice_amount && alice_amount < amount - fee); // Fee sink gets fee assert_eq!( parachain::Assets::balance(relay_asset_id_on_a, XcmFeesAccount::get()), - fee + amount - alice_amount ); }); } @@ -1465,8 +1462,8 @@ fn send_para_b_asset_to_para_b_with_trader_and_fee() { ), }; - let para_a_account = - polkadot_parachain::primitives::Sibling::from(PARA_A_ID).into_account_truncating(); + let para_a_account = polkadot_parachain_primitives::primitives::Sibling::from(PARA_A_ID) + .into_account_truncating(); ParaB::execute_with(|| { use frame_support::traits::Currency; @@ -2082,9 +2079,10 @@ fn receive_insufficient_relay_asset_on_parachain() { // Send native token to fresh_account ParaA::execute_with(|| { assert_ok!(parachain::Balances::transfer( - parachain::RuntimeOrigin::signed(ALICE), - new_account.into(), - fresh_account_amount + &ALICE, + &new_account.into(), + fresh_account_amount, + ExistenceRequirement::AllowDeath, )); }); @@ -2345,13 +2343,13 @@ fn test_versioning_on_runtime_upgrade_with_relay() { }); let expected_supported_version: relay_chain::RuntimeEvent = - pallet_xcm::Event::SupportedVersionChanged( - MultiLocation { + pallet_xcm::Event::SupportedVersionChanged { + location: MultiLocation { parents: 0, interior: X1(Parachain(PARA_A_ID)), }, - 1, - ) + version: 1, + } .into(); Relay::execute_with(|| { @@ -2359,17 +2357,6 @@ fn test_versioning_on_runtime_upgrade_with_relay() { assert!(relay_chain::relay_events().contains(&expected_supported_version)); }); - let expected_version_notified: parachain::RuntimeEvent = - pallet_xcm::Event::VersionChangeNotified( - MultiLocation { - parents: 1, - interior: Here, - }, - 2, - MultiAssets::default(), - ) - .into(); - // ParaA changes version to 2, and calls on_runtime_upgrade. This should notify the targets // of the new version change ParaA::execute_with(|| { @@ -2379,19 +2366,28 @@ fn test_versioning_on_runtime_upgrade_with_relay() { parachain::on_runtime_upgrade(); // Initialize block, to call on_initialize and notify targets parachain::para_roll_to(2); - // Expect the event in the parachain - assert!(parachain::para_events().contains(&expected_version_notified)); + assert!(parachain::para_events().iter().any(|r| matches!( + r, + RuntimeEvent::PolkadotXcm(pallet_xcm::Event::VersionNotifyStarted { + destination: MultiLocation { + parents: 1, + interior: Here, + }, + cost: _, + message_id: _, + }) + ))); }); // This event should have been seen in the relay let expected_supported_version_2: relay_chain::RuntimeEvent = - pallet_xcm::Event::SupportedVersionChanged( - MultiLocation { + pallet_xcm::Event::SupportedVersionChanged { + location: MultiLocation { parents: 0, interior: X1(Parachain(PARA_A_ID)), }, - 2, - ) + version: 1, + } .into(); Relay::execute_with(|| { @@ -2475,13 +2471,13 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { }); let expected_supported_version: parachain::RuntimeEvent = - pallet_xcm::Event::SupportedVersionChanged( - MultiLocation { + pallet_xcm::Event::SupportedVersionChanged { + location: MultiLocation { parents: 1, interior: X1(Parachain(PARA_B_ID)), }, - 0, - ) + version: 0, + } .into(); ParaA::execute_with(|| { @@ -2522,17 +2518,6 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { assert_eq!(parachain::Assets::balance(a_asset_id_on_b, &ALICE), 100); }); - let expected_version_notified: parachain::RuntimeEvent = - pallet_xcm::Event::VersionChangeNotified( - MultiLocation { - parents: 1, - interior: X1(Parachain(PARA_A_ID)), - }, - 2, - MultiAssets::default(), - ) - .into(); - // ParaB changes version to 2, and calls on_runtime_upgrade. This should notify the targets // of the new version change ParaB::execute_with(|| { @@ -2542,19 +2527,28 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { parachain::on_runtime_upgrade(); // Initialize block, to call on_initialize and notify targets parachain::para_roll_to(2); - // Expect the event in the parachain - assert!(parachain::para_events().contains(&expected_version_notified)); + assert!(parachain::para_events().iter().any(|r| matches!( + r, + RuntimeEvent::PolkadotXcm(pallet_xcm::Event::VersionNotifyStarted { + destination: MultiLocation { + parents: 1, + interior: X1(Parachain(PARA_A_ID)), + }, + cost: _, + message_id: _, + }) + ))); }); // This event should have been seen in para A let expected_supported_version_2: parachain::RuntimeEvent = - pallet_xcm::Event::SupportedVersionChanged( - MultiLocation { + pallet_xcm::Event::SupportedVersionChanged { + location: MultiLocation { parents: 1, interior: X1(Parachain(PARA_B_ID)), }, - 2, - ) + version: 0, + } .into(); // Para A should have received the version change @@ -3107,8 +3101,8 @@ fn transfer_multicurrencies_should_work_scenarios() { // Parachain A sovereign account on Parachain B should receive: 0 // because transfer_multicurrencies uses Teleport in this case - let para_a_sovereign_on_para_b = parachain::LocationToAccountId::convert_ref( - MultiLocation::new(1, X1(Parachain(para_a_id))), + let para_a_sovereign_on_para_b = parachain::LocationToAccountId::convert_location( + &MultiLocation::new(1, X1(Parachain(para_a_id))), ) .unwrap(); assert_eq!( @@ -3456,8 +3450,8 @@ fn transfer_multicurrencies_should_fail_scenarios() { ParaB::execute_with(|| { // Parachain A sovereign account on Parachain B should receive: 0 // because transfer_multicurrencies uses Teleport in this case - let para_a_sovereign_on_para_b = parachain::LocationToAccountId::convert_ref( - MultiLocation::new(1, X1(Parachain(para_a_id))), + let para_a_sovereign_on_para_b = parachain::LocationToAccountId::convert_location( + &MultiLocation::new(1, X1(Parachain(para_a_id))), ) .unwrap(); assert_eq!( diff --git a/runtime/manta/Cargo.toml b/runtime/manta/Cargo.toml index f7c28ce88..b39725117 100644 --- a/runtime/manta/Cargo.toml +++ b/runtime/manta/Cargo.toml @@ -34,6 +34,7 @@ sp-version = { workspace = true } # Substrate frames frame-benchmarking = { workspace = true, optional = true } frame-executive = { workspace = true } +frame-metadata = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-benchmarking = { workspace = true, optional = true } @@ -48,6 +49,7 @@ pallet-balances = { workspace = true } pallet-collective = { workspace = true } pallet-democracy = { workspace = true } pallet-membership = { workspace = true } +pallet-message-queue = { workspace = true } pallet-multisig = { workspace = true } pallet-preimage = { workspace = true } pallet-scheduler = { workspace = true } @@ -71,15 +73,20 @@ cumulus-primitives-utility = { workspace = true } parachain-info = { workspace = true } # Nimbus Dependencies +async-backing-primitives = { workspace = true } nimbus-primitives = { workspace = true } pallet-aura-style-filter = { workspace = true } pallet-author-inherent = { workspace = true } +session-keys-primitives = { workspace = true } + # Polkadot dependencies pallet-xcm = { workspace = true } pallet-xcm-benchmarks = { workspace = true, optional = true } -polkadot-parachain = { workspace = true } +parachains-common = { workspace = true } +polkadot-parachain-primitives = { workspace = true } polkadot-primitives = { workspace = true } +polkadot-runtime-common = { workspace = true } xcm = { workspace = true } xcm-builder = { workspace = true } xcm-executor = { workspace = true } @@ -137,7 +144,6 @@ runtime-benchmarks = [ 'pallet-author-inherent/runtime-benchmarks', 'pallet-balances/runtime-benchmarks', 'pallet-sudo/runtime-benchmarks', - 'pallet-aura-style-filter/runtime-benchmarks', 'pallet-collective/runtime-benchmarks', 'pallet-democracy/runtime-benchmarks', 'pallet-membership/runtime-benchmarks', @@ -162,6 +168,7 @@ runtime-benchmarks = [ 'pallet-name-service/runtime-benchmarks', "zenlink-protocol/runtime-benchmarks", 'pallet-farming/runtime-benchmarks', + 'parachains-common/runtime-benchmarks', ] try-runtime = [ 'frame-try-runtime/try-runtime', @@ -227,8 +234,11 @@ std = [ 'sp-transaction-pool/std', 'sp-inherents/std', 'nimbus-primitives/std', + 'session-keys-primitives/std', + 'async-backing-primitives/std', 'frame-support/std', 'frame-executive/std', + 'frame-metadata/std', 'frame-system/std', 'frame-system-rpc-runtime-api/std', 'frame-try-runtime/std', @@ -268,7 +278,9 @@ std = [ 'scale-info/std', 'log/std', 'cumulus-pallet-session-benchmarking/std', - 'polkadot-parachain/std', + 'polkadot-parachain-primitives/std', + 'polkadot-runtime-common/std', + 'parachains-common/std', 'xcm/std', 'xcm-builder/std', 'xcm-executor/std', diff --git a/runtime/manta/src/diff_tx_fees.rs b/runtime/manta/src/diff_tx_fees.rs index d6f85af02..199ec53a7 100644 --- a/runtime/manta/src/diff_tx_fees.rs +++ b/runtime/manta/src/diff_tx_fees.rs @@ -28,7 +28,7 @@ use pallet_transaction_payment::Multiplier; use runtime_common::MinimumMultiplier; use sp_runtime::{ traits::{Saturating, Zero}, - AccountId32, FixedPointNumber, MultiAddress, Perbill, Percent, + AccountId32, BuildStorage, FixedPointNumber, MultiAddress, Perbill, Percent, }; use std::str::FromStr; use xcm::prelude::*; @@ -103,7 +103,7 @@ fn diff_tx_fees() { test_runner.execute_with(|| { let opaque_metadata = crate::Runtime::metadata(); let pallets = match opaque_metadata.1 { - frame_support::metadata::RuntimeMetadata::V14(metadata) => metadata.pallets, + frame_metadata::RuntimeMetadata::V15(metadata) => metadata.pallets, _ => unreachable!(), }; assert_eq!(pallets.len(), 39); @@ -191,8 +191,8 @@ fn calculate_all_current_extrinsic_tx_fee() -> ( Vec<(&'static str, &'static str, DispatchInfo, u32)>, sp_io::TestExternalities, ) { - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::default() - .build_storage::() + let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() + .build_storage() .unwrap() .into(); @@ -331,6 +331,8 @@ fn calculate_all_current_extrinsic_tx_fee() -> ( let call = crate::RuntimeCall::Treasury(pallet_treasury::Call::spend { amount: 8, beneficiary: ALICE.into(), + asset_kind: Box::new(()), + valid_from: Some(0), }); let (dispatch_info, call_len) = get_call_details(&call); calamari_runtime_calls.push(("pallet_treasury", "spend", dispatch_info, call_len)); @@ -820,19 +822,6 @@ fn calculate_all_current_extrinsic_tx_fee() -> ( 9, "Please update new extrinsic here." ); - // service_overweight - let call = - crate::RuntimeCall::XcmpQueue(cumulus_pallet_xcmp_queue::Call::service_overweight { - index: 1, - weight_limit: 64.into(), - }); - let (dispatch_info, call_len) = get_call_details(&call); - calamari_runtime_calls.push(( - "cumulus_pallet_xcmp_queue", - "service_overweight", - dispatch_info, - call_len, - )); // suspend_xcm_execution let call = crate::RuntimeCall::XcmpQueue( @@ -892,42 +881,6 @@ fn calculate_all_current_extrinsic_tx_fee() -> ( dispatch_info, call_len, )); - - // update_threshold_weight - let call = crate::RuntimeCall::XcmpQueue( - cumulus_pallet_xcmp_queue::Call::update_threshold_weight { new: 64.into() }, - ); - let (dispatch_info, call_len) = get_call_details(&call); - calamari_runtime_calls.push(( - "cumulus_pallet_xcmp_queue", - "update_threshold_weight", - dispatch_info, - call_len, - )); - - // update_weight_restrict_decay - let call = crate::RuntimeCall::XcmpQueue( - cumulus_pallet_xcmp_queue::Call::update_weight_restrict_decay { new: 64.into() }, - ); - let (dispatch_info, call_len) = get_call_details(&call); - calamari_runtime_calls.push(( - "cumulus_pallet_xcmp_queue", - "update_weight_restrict_decay", - dispatch_info, - call_len, - )); - - // update_xcmp_max_individual_weight - let call = crate::RuntimeCall::XcmpQueue( - cumulus_pallet_xcmp_queue::Call::update_xcmp_max_individual_weight { new: 64.into() }, - ); - let (dispatch_info, call_len) = get_call_details(&call); - calamari_runtime_calls.push(( - "cumulus_pallet_xcmp_queue", - "update_xcmp_max_individual_weight", - dispatch_info, - call_len, - )); } // orml_xtokens @@ -1596,26 +1549,6 @@ fn calculate_all_current_extrinsic_tx_fee() -> ( 9, "Please update new extrinsic here." ); - // transfer, 1 token - let call = crate::RuntimeCall::Balances(pallet_balances::Call::transfer { - dest: ALICE.into(), - value: 1, - }); - let (dispatch_info, call_len) = get_call_details(&call); - calamari_runtime_calls.push(("pallet_balances", "transfer-1", dispatch_info, call_len)); - - // transfer, 1M tokens - let call = crate::RuntimeCall::Balances(pallet_balances::Call::transfer { - dest: ALICE.into(), - value: 1_000_000, - }); - let (dispatch_info, call_len) = get_call_details(&call); - calamari_runtime_calls.push(( - "pallet_balances", - "transfer-1000_000", - dispatch_info, - call_len, - )); // set_balance let call = crate::RuntimeCall::Balances(pallet_balances::Call::force_set_balance { diff --git a/runtime/manta/src/fee.rs b/runtime/manta/src/fee.rs index 0a72f40e8..cc0dcf2a7 100644 --- a/runtime/manta/src/fee.rs +++ b/runtime/manta/src/fee.rs @@ -43,6 +43,7 @@ mod multiplier_tests { use manta_primitives::constants::time::DAYS; use pallet_transaction_payment::Multiplier; use runtime_common::MinimumMultiplier; + use sp_runtime::BuildStorage; fn fetch_manta_price() -> f32 { 0.36 @@ -76,8 +77,8 @@ mod multiplier_tests { ..Default::default() }; - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::default() - .build_storage::() + let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() + .build_storage() .unwrap() .into(); // set the minimum @@ -147,8 +148,8 @@ mod multiplier_tests { let mut multiplier = Multiplier::from_u32(1); let mut blocks = 0; - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::default() - .build_storage::() + let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() + .build_storage() .unwrap() .into(); diff --git a/runtime/manta/src/lib.rs b/runtime/manta/src/lib.rs index 4c60cc297..db2a0a597 100644 --- a/runtime/manta/src/lib.rs +++ b/runtime/manta/src/lib.rs @@ -30,7 +30,7 @@ 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}, + traits::{AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, IdentityLookup}, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, Perbill, Percent, Permill, }; @@ -41,16 +41,17 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; use cumulus_pallet_parachain_system::{ - register_validate_block, CheckInherents, ParachainSetCode, RelayChainStateProof, - RelaychainDataProvider, + register_validate_block, ParachainSetCode, RelayChainStateProof, RelaychainDataProvider, }; use frame_support::{ construct_runtime, dispatch::DispatchClass, parameter_types, traits::{ - ConstU128, ConstU32, ConstU8, Contains, Currency, EitherOfDiverse, NeverEnsureOrigin, - PrivilegeCmp, + fungible::HoldConsideration, + tokens::{PayFromAccount, UnityAssetBalanceConversion}, + ConstBool, ConstU128, ConstU32, ConstU8, Contains, Currency, EitherOfDiverse, + LinearStoragePrice, PrivilegeCmp, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -58,14 +59,14 @@ use frame_support::{ use frame_system::{ limits::{BlockLength, BlockWeights}, - EnsureRoot, EnsureSigned, + EnsureRoot, EnsureSigned, EnsureWithSuccess, }; use manta_primitives::{ constants::{ time::*, RocksDbWeight, LOTTERY_PALLET_ID, NAME_SERVICE_PALLET_ID, STAKING_PALLET_ID, TREASURY_PALLET_ID, WEIGHT_PER_SECOND, }, - types::{AccountId, Balance, BlockNumber, Hash, Header, Index, PoolId, Signature}, + types::{AccountId, Balance, BlockNumber, Hash, Header, Nonce, PoolId, Signature}, }; use manta_support::manta_pay::{PullResponse, RawCheckpoint}; pub use pallet_parachain_staking::{InflationInfo, Range}; @@ -301,13 +302,13 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; type RuntimeCall = RuntimeCall; type Lookup = AccountIdLookup; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = Hash; type Hashing = BlakeTwo256; - type Header = Header; type RuntimeEvent = RuntimeEvent; type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type BlockHashCount = BlockHashCount; type DbWeight = RocksDbWeight; type Version = Version; @@ -439,6 +440,11 @@ parameter_types! { pub const NativeTokenExistentialDeposit: u128 = 10 * cMANTA; // 0.1 MANTA } +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub const BenchmarksNativeTokenExistentialDeposit: u128 = 10; +} + impl pallet_balances::Config for Runtime { type MaxLocks = ConstU32<50>; type MaxReserves = ConstU32<50>; @@ -446,12 +452,16 @@ impl pallet_balances::Config for Runtime { type Balance = Balance; type DustRemoval = (); type RuntimeEvent = RuntimeEvent; + #[cfg(not(feature = "runtime-benchmarks"))] type ExistentialDeposit = NativeTokenExistentialDeposit; + #[cfg(feature = "runtime-benchmarks")] + type ExistentialDeposit = BenchmarksNativeTokenExistentialDeposit; type AccountStore = frame_system::Pallet; type WeightInfo = weights::pallet_balances::SubstrateWeight; type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type MaxHolds = ConstU32<50>; } @@ -619,6 +629,8 @@ parameter_types! { pub const PreimageBaseDeposit: Balance = 40 * mMANTA; // One cent: $10,000 / MB pub const PreimageByteDeposit: Balance = 400 * uMANTA; + pub const PreimageHoldReason: RuntimeHoldReason = + RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage); } impl pallet_preimage::Config for Runtime { @@ -626,8 +638,12 @@ impl pallet_preimage::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRoot; - type BaseDeposit = PreimageBaseDeposit; - type ByteDeposit = PreimageByteDeposit; + type Consideration = HoldConsideration< + AccountId, + Balances, + PreimageHoldReason, + LinearStoragePrice, + >; } // NOTE: pallet_parachain_staking rounds are now used, @@ -663,6 +679,9 @@ impl pallet_aura::Config for Runtime { type AuthorityId = AuraId; type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; + // false means async backing is disabled + // https://forum.polkadot.network/t/polkadot-release-analysis-v1-0-0/3585#pallet-aura-allow-multiple-blocks-per-slot-12 + type AllowMultipleBlocksPerSlot = ConstBool; } parameter_types! { @@ -831,6 +850,8 @@ parameter_types! { pub SpendPeriod: BlockNumber = prod_or_fast!(14 * DAYS, 2 * MINUTES, "MANTA_SPEND_PERIOD"); pub const Burn: Permill = Permill::from_percent(0); pub const TreasuryPalletId: PalletId = TREASURY_PALLET_ID; + pub const PayoutSpendPeriod: BlockNumber = 30 * DAYS; + pub const MaxBalance: Balance = Balance::max_value(); } type EnsureRootOrThreeFifthsCouncil = EitherOfDiverse< @@ -861,7 +882,15 @@ impl pallet_treasury::Config for Runtime { type SpendFunds = (); // Expects an implementation of `EnsureOrigin` with a `Success` generic, // which is the the maximum amount that this origin is allowed to spend at a time. - type SpendOrigin = NeverEnsureOrigin; + type SpendOrigin = EnsureWithSuccess, AccountId, MaxBalance>; + type Beneficiary = AccountId; + type BeneficiaryLookup = IdentityLookup; + type Paymaster = PayFromAccount; + type BalanceConverter = UnityAssetBalanceConversion; + type PayoutPeriod = PayoutSpendPeriod; + type AssetKind = (); + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); } parameter_types! { @@ -904,7 +933,8 @@ impl pallet_name_service::Config for Runtime { impl parachain_info::Config for Runtime {} struct CheckInherentsStruct; -impl CheckInherents for CheckInherentsStruct { +#[allow(deprecated)] +impl cumulus_pallet_parachain_system::CheckInherents for CheckInherentsStruct { fn check_inherents( block: &Block, relay_state_proof: &RelayChainStateProof, @@ -927,18 +957,15 @@ impl CheckInherents for CheckInherentsStruct { // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = opaque::Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Runtime { // System support stuff. - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, + System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, ParachainSystem: cumulus_pallet_parachain_system::{ - Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, + Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, } = 1, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, + ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, TransactionPause: pallet_tx_pause::{Pallet, Call, Storage, Event} = 9, // Monetary stuff. @@ -965,15 +992,16 @@ construct_runtime!( Treasury: pallet_treasury::{Pallet, Call, Storage, Event} = 26, // Preimage registry. - Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 28, + Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 28, Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event} = 29, // XCM helpers. XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, - PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, + PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 33, XTokens: orml_xtokens::{Pallet, Call, Event, Storage} = 34, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 35, // Handy utilities. Utility: pallet_utility::{Pallet, Call, Event} = 40, @@ -1024,7 +1052,7 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -1035,10 +1063,6 @@ pub type Executive = frame_executive::Executive< OnRuntimeUpgradeHooks, >; -#[cfg(feature = "runtime-benchmarks")] -#[macro_use] -extern crate frame_benchmarking; - #[cfg(feature = "runtime-benchmarks")] mod benches { frame_benchmarking::define_benchmarks!( @@ -1050,7 +1074,7 @@ mod benches { [pallet_multisig, Multisig] // always get this error ValidationDataNotAvailable while benchmarking // we disable frame_system in this release, and will fix it in next release - // [frame_system, SystemBench::] + [frame_system, SystemBench::] [pallet_timestamp, Timestamp] [pallet_utility, Utility] [pallet_preimage, Preimage] @@ -1061,11 +1085,10 @@ mod benches { [pallet_sudo, Sudo] // XCM [cumulus_pallet_xcmp_queue, XcmpQueue] - [pallet_xcm, PolkadotXcm] // always get this error(Unimplemented) while benchmarking pallet_xcm_benchmarks::fungible::initiate_teleport // so this time we will use statemint's fungible weights // [pallet_xcm_benchmarks::fungible, XcmBalances] - [pallet_xcm_benchmarks::generic, XcmGeneric] + // [pallet_xcm_benchmarks::generic, XcmGeneric] [pallet_session, SessionBench::] // Manta pallets [pallet_tx_pause, TransactionPause] @@ -1080,7 +1103,7 @@ mod benches { // [zenlink_protocol, ZenlinkProtocol] [pallet_farming, Farming] // Nimbus pallets - [pallet_author_inherent, AuthorInherent] + // [pallet_author_inherent, AuthorInherent] ); } @@ -1174,8 +1197,8 @@ impl_runtime_apis! { } } - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Index { + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { + fn account_nonce(account: AccountId) -> Nonce { System::account_nonce(account) } } @@ -1247,6 +1270,11 @@ impl_runtime_apis! { fn can_author(author: NimbusId, relay_parent: u32, parent_header: &::Header) -> bool { let next_block_number = parent_header.number + 1; let slot = relay_parent; + if cumulus_pallet_parachain_system::Pallet::::last_relay_block_number() + 1 == relay_parent { + log::debug!("Cannot Author blocks on consecutive slots"); + return false + } + // Because the staking solution calculates the next staking set at the beginning // of the first block in the new round, the only way to accurately predict the // authors is to compute the selection during prediction. @@ -1283,6 +1311,30 @@ impl_runtime_apis! { } } + impl session_keys_primitives::VrfApi for Runtime { + fn get_last_vrf_output() -> Option<::Hash> { + // We don't use vrf in consensus right now + None + } + fn vrf_key_lookup( + _nimbus_id: nimbus_primitives::NimbusId + ) -> Option { + // no vrf used in consensus + None + } + } + + impl async_backing_primitives::UnincludedSegmentApi for Runtime { + fn can_build_upon( + _included_hash: ::Hash, + _slot: async_backing_primitives::Slot, + ) -> bool { + // This runtime API can be called only when asynchronous backing is enabled client-side + // We return false here to force the client to not use async backing. + false + } + } + impl pallet_manta_sbt::runtime::SBTPullLedgerDiffApi for Runtime { fn sbt_pull_ledger_diff( checkpoint: RawCheckpoint, @@ -1394,9 +1446,10 @@ impl_runtime_apis! { use frame_benchmarking::{Benchmarking, BenchmarkList}; use frame_support::traits::StorageInfoTrait; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + use frame_system_benchmarking::Pallet as SystemBench; - // type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; - type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; + //type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; + //type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; let mut list = Vec::::new(); list_benchmarks!(list, extra); @@ -1408,9 +1461,20 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, BenchmarkError}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; + use frame_support::traits::TrackedStorageKey; + + use frame_system_benchmarking::Pallet as SystemBench; + impl frame_system_benchmarking::Config for Runtime { + fn setup_set_code_requirements(code: &sp_std::vec::Vec) -> Result<(), BenchmarkError> { + ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32); + Ok(()) + } - impl frame_system_benchmarking::Config for Runtime {} + fn verify_set_code() { + System::assert_last_event(cumulus_pallet_parachain_system::Event::::ValidationFunctionStored.into()); + } + } use cumulus_pallet_session_benchmarking::Pallet as SessionBench; impl cumulus_pallet_session_benchmarking::Config for Runtime {} @@ -1431,11 +1495,21 @@ impl_runtime_apis! { pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; pub const DotLocation: MultiLocation = MultiLocation::parent(); pub MantaLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into()))); + pub ExistentialDepositAsset: Option = Some(MultiAsset { + id: Concrete(MultiLocation::parent()), + fun: Fungible(NativeTokenExistentialDeposit::get()) + }); + } impl pallet_xcm_benchmarks::Config for Runtime { type XcmConfig = XcmExecutorConfig; type AccountIdConverter = LocationToAccountId; + type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper< + XcmExecutorConfig, + ExistentialDepositAsset, + (), + >; fn valid_destination() -> Result { Ok(DotLocation::get()) @@ -1470,9 +1544,9 @@ impl_runtime_apis! { impl pallet_xcm_benchmarks::fungible::Config for Runtime { type TransactAsset = Balances; - type CheckedAccount = CheckedAccount; type TrustedTeleporter = TrustedTeleporter; + type TrustedReserve = TrustedReserve; fn get_multi_asset() -> MultiAsset { MultiAsset { @@ -1484,6 +1558,7 @@ impl_runtime_apis! { impl pallet_xcm_benchmarks::generic::Config for Runtime { type RuntimeCall = RuntimeCall; + type TransactAsset = Balances; fn worst_case_response() -> (u64, Response) { (0u64, Response::Version(Default::default())) @@ -1520,10 +1595,14 @@ impl_runtime_apis! { ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { Err(BenchmarkError::Skip) } + + fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { + Err(BenchmarkError::Skip) + } } - // type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; - type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; + //type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; + //type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; let whitelist: Vec = vec![ // Block Number @@ -1554,5 +1633,5 @@ impl_runtime_apis! { register_validate_block! { Runtime = Runtime, BlockExecutor = pallet_author_inherent::BlockExecutor::, - CheckInherents = CheckInherentsStruct, + CheckInherents = CheckInherentsStruct } diff --git a/runtime/manta/src/migrations/asset_manager.rs b/runtime/manta/src/migrations/asset_manager.rs deleted file mode 100644 index c4dda50c0..000000000 --- a/runtime/manta/src/migrations/asset_manager.rs +++ /dev/null @@ -1,760 +0,0 @@ -// Copyright 2020-2024 Manta Network. -// This file is part of Manta. -// -// Manta 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. -// -// Manta 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 Manta. If not, see . - -#![allow(clippy::unnecessary_cast)] - -use core::marker::PhantomData; -use frame_support::{ - dispatch::GetStorageVersion, - migration::{put_storage_value, storage_key_iter}, - pallet_prelude::{StorageVersion, Weight}, - traits::{Get, OnRuntimeUpgrade}, - Blake2_128Concat, StorageHasher, -}; -use sp_runtime::{traits::ConstU32, DispatchError, WeakBoundedVec}; -use sp_std::vec::Vec; -use xcm::{ - v3::{Junction, Junctions, MultiLocation}, - VersionedMultiLocation, -}; - -use codec::{Decode, Encode, MaxEncodedLen}; -use manta_primitives::types::CalamariAssetId; -use scale_info::TypeInfo; -use xcm_v1::*; - -pub mod xcm_v1 { - use super::*; - - pub mod v0 { - use super::*; - - #[derive( - Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, scale_info::TypeInfo, - )] - pub enum MultiLocation { - /// The interpreting consensus system. - Null, - /// A relative path comprising 1 junction. - X1(Junction), - /// A relative path comprising 2 junctions. - X2(Junction, Junction), - /// A relative path comprising 3 junctions. - X3(Junction, Junction, Junction), - /// A relative path comprising 4 junctions. - X4(Junction, Junction, Junction, Junction), - /// A relative path comprising 5 junctions. - X5(Junction, Junction, Junction, Junction, Junction), - /// A relative path comprising 6 junctions. - X6(Junction, Junction, Junction, Junction, Junction, Junction), - /// A relative path comprising 7 junctions. - X7( - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - ), - /// A relative path comprising 8 junctions. - X8( - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - ), - } - - #[derive( - Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo, MaxEncodedLen, - )] - pub enum Junction { - /// The consensus system of which the context is a member and state-wise super-set. - /// - /// NOTE: This item is *not* a sub-consensus item: a consensus system may not identify itself trustlessly as - /// a location that includes this junction. - Parent, - /// An indexed parachain belonging to and operated by the context. - /// - /// Generally used when the context is a Polkadot Relay-chain. - Parachain(#[codec(compact)] u32), - /// A 32-byte identifier for an account of a specific network that is respected as a sovereign endpoint within - /// the context. - /// - /// Generally used when the context is a Substrate-based chain. - AccountId32 { network: NetworkId, id: [u8; 32] }, - /// An 8-byte index for an account of a specific network that is respected as a sovereign endpoint within - /// the context. - /// - /// May be used when the context is a Frame-based chain and includes e.g. an indices pallet. - AccountIndex64 { - network: NetworkId, - #[codec(compact)] - index: u64, - }, - /// A 20-byte identifier for an account of a specific network that is respected as a sovereign endpoint within - /// the context. - /// - /// May be used when the context is an Ethereum or Bitcoin chain or smart-contract. - AccountKey20 { network: NetworkId, key: [u8; 20] }, - /// An instanced, indexed pallet that forms a constituent part of the context. - /// - /// Generally used when the context is a Frame-based chain. - PalletInstance(u8), - /// A non-descript index within the context location. - /// - /// Usage will vary widely owing to its generality. - /// - /// NOTE: Try to avoid using this and instead use a more specific item. - GeneralIndex(#[codec(compact)] u128), - /// A nondescript datum acting as a key within the context location. - /// - /// Usage will vary widely owing to its generality. - /// - /// NOTE: Try to avoid using this and instead use a more specific item. - GeneralKey(WeakBoundedVec>), - /// The unambiguous child. - /// - /// Not currently used except as a fallback when deriving ancestry. - OnlyChild, - /// A pluralistic body existing within consensus. - /// - /// Typical to be used to represent a governance origin of a chain, but could in principle be used to represent - /// things such as multisigs also. - Plurality { id: BodyId, part: BodyPart }, - } - - #[derive( - Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo, MaxEncodedLen, - )] - pub enum NetworkId { - /// Unidentified/any. - Any, - /// Some named network. - Named(WeakBoundedVec>), - /// The Polkadot Relay chain - Polkadot, - /// Kusama. - Kusama, - } - - #[derive( - Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo, MaxEncodedLen, - )] - pub enum BodyId { - /// The only body in its context. - Unit, - /// A named body. - Named(WeakBoundedVec>), - /// An indexed body. - Index(#[codec(compact)] u32), - /// The unambiguous executive body (for Polkadot, this would be the Polkadot council). - Executive, - /// The unambiguous technical body (for Polkadot, this would be the Technical Committee). - Technical, - /// The unambiguous legislative body (for Polkadot, this could be considered the opinion of a majority of - /// lock-voters). - Legislative, - /// The unambiguous judicial body (this doesn't exist on Polkadot, but if it were to get a "grand oracle", it - /// may be considered as that). - Judicial, - /// The unambiguous defense body (for Polkadot, an opinion on the topic given via a public referendum - /// on the `staking_admin` track). - Defense, - /// The unambiguous administration body (for Polkadot, an opinion on the topic given via a public referendum - /// on the `general_admin` track). - Administration, - /// The unambiguous treasury body (for Polkadot, an opinion on the topic given via a public referendum - /// on the `treasurer` track). - Treasury, - } - - #[derive( - Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo, MaxEncodedLen, - )] - pub enum BodyPart { - /// The body's declaration, under whatever means it decides. - Voice, - /// A given number of members of the body. - Members { - #[codec(compact)] - count: u32, - }, - /// A given number of members of the body, out of some larger caucus. - Fraction { - #[codec(compact)] - nom: u32, - #[codec(compact)] - denom: u32, - }, - /// No less than the given proportion of members of the body. - AtLeastProportion { - #[codec(compact)] - nom: u32, - #[codec(compact)] - denom: u32, - }, - /// More than than the given proportion of members of the body. - MoreThanProportion { - #[codec(compact)] - nom: u32, - #[codec(compact)] - denom: u32, - }, - } - } - - pub mod v1 { - use super::*; - - #[derive( - Clone, Decode, Encode, Eq, PartialEq, Ord, PartialOrd, Debug, TypeInfo, MaxEncodedLen, - )] - pub struct MultiLocation { - /// The number of parent junctions at the beginning of this `MultiLocation`. - pub parents: u8, - /// The interior (i.e. non-parent) junctions that this `MultiLocation` contains. - pub interior: Junctions, - } - - #[derive( - Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo, MaxEncodedLen, - )] - pub enum Junctions { - /// The interpreting consensus system. - Here, - /// A relative path comprising 1 junction. - X1(Junction), - /// A relative path comprising 2 junctions. - X2(Junction, Junction), - /// A relative path comprising 3 junctions. - X3(Junction, Junction, Junction), - /// A relative path comprising 4 junctions. - X4(Junction, Junction, Junction, Junction), - /// A relative path comprising 5 junctions. - X5(Junction, Junction, Junction, Junction, Junction), - /// A relative path comprising 6 junctions. - X6(Junction, Junction, Junction, Junction, Junction, Junction), - /// A relative path comprising 7 junctions. - X7( - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - ), - /// A relative path comprising 8 junctions. - X8( - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - Junction, - ), - } - - #[derive( - Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, TypeInfo, MaxEncodedLen, - )] - pub enum Junction { - /// An indexed parachain belonging to and operated by the context. - /// - /// Generally used when the context is a Polkadot Relay-chain. - Parachain(#[codec(compact)] u32), - /// A 32-byte identifier for an account of a specific network that is respected as a sovereign endpoint within - /// the context. - /// - /// Generally used when the context is a Substrate-based chain. - AccountId32 { - network: super::v0::NetworkId, - id: [u8; 32], - }, - /// An 8-byte index for an account of a specific network that is respected as a sovereign endpoint within - /// the context. - /// - /// May be used when the context is a Frame-based chain and includes e.g. an indices pallet. - AccountIndex64 { - network: super::v0::NetworkId, - #[codec(compact)] - index: u64, - }, - /// A 20-byte identifier for an account of a specific network that is respected as a sovereign endpoint within - /// the context. - /// - /// May be used when the context is an Ethereum or Bitcoin chain or smart-contract. - AccountKey20 { - network: super::v0::NetworkId, - key: [u8; 20], - }, - /// An instanced, indexed pallet that forms a constituent part of the context. - /// - /// Generally used when the context is a Frame-based chain. - PalletInstance(u8), - /// A non-descript index within the context location. - /// - /// Usage will vary widely owing to its generality. - /// - /// NOTE: Try to avoid using this and instead use a more specific item. - GeneralIndex(#[codec(compact)] u128), - /// A nondescript datum acting as a key within the context location. - /// - /// Usage will vary widely owing to its generality. - /// - /// NOTE: Try to avoid using this and instead use a more specific item. - GeneralKey(WeakBoundedVec>), - /// The unambiguous child. - /// - /// Not currently used except as a fallback when deriving ancestry. - OnlyChild, - /// A pluralistic body existing within consensus. - /// - /// Typical to be used to represent a governance origin of a chain, but could in principle be used to represent - /// things such as multisigs also. - // v1 reuses v0's BodyId and BodyPart - Plurality { - id: super::v0::BodyId, - part: super::v0::BodyPart, - }, - } - } - - #[derive(Encode, Debug, Decode, TypeInfo)] - #[codec(encode_bound())] - #[codec(decode_bound())] - pub enum VersionedMultiLocation { - V0(v0::MultiLocation), - V1(v1::MultiLocation), - } - - /// Asset Location - #[derive(Decode, Debug, Encode, TypeInfo)] - pub struct AssetLocation(pub VersionedMultiLocation); -} - -pub struct XcmV1ToV3(PhantomData); -impl OnRuntimeUpgrade for XcmV1ToV3 { - fn on_runtime_upgrade() -> Weight { - let mut writes = 0; - let mut reads = 0; - - // AssetIdLocation - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"AssetIdLocation"; - let asset_id_location: Vec<_> = storage_key_iter::< - CalamariAssetId, - AssetLocation, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - - reads += asset_id_location.len(); - writes += asset_id_location.len(); - - for (asset_id, v1_location) in asset_id_location { - if let xcm_v1::AssetLocation(xcm_v1::VersionedMultiLocation::V1(v1::MultiLocation { - parents, - interior, - })) = v1_location - { - match interior { - // polkadot location - v1::Junctions::Here => { - let v3_junctions = Junctions::Here; - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&asset_id.encode()), - v3_location, - ); - } - // we have two X1::Junction::Parachain: 2004 and 2084 - // { Parachain }: 2 - v1::Junctions::X1(v1::Junction::Parachain(para_id)) => { - let v3_junctions = Junctions::X1(Junction::Parachain(para_id)); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&asset_id.encode()), - v3_location, - ); - } - // { Parachain, GeneralKey }: 16 - v1::Junctions::X2( - v1::Junction::Parachain(para_id), - v1::Junction::GeneralKey(general_key), - ) => { - let v3_general_key = { - let mut data = [0u8; 32]; - data[..general_key.len()].copy_from_slice(&general_key[..]); - Junction::GeneralKey { - length: general_key.len() as u8, - data, - } - }; - let v3_junctions = - Junctions::X2(Junction::Parachain(para_id), v3_general_key); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&asset_id.encode()), - v3_location, - ); - } - // { Parachain, PalletInstance }: 1 - v1::Junctions::X2( - v1::Junction::Parachain(para_id), - v1::Junction::PalletInstance(pallet_index), - ) => { - let v3_junctions = Junctions::X2( - Junction::Parachain(para_id), - Junction::PalletInstance(pallet_index), - ); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&asset_id.encode()), - v3_location, - ); - } - // { Parachain, PalletInstance, GeneralIndex }: 1 - v1::Junctions::X3( - v1::Junction::Parachain(para_id), - v1::Junction::PalletInstance(pallet_index), - v1::Junction::GeneralIndex(general_index), - ) => { - let v3_junctions = Junctions::X3( - Junction::Parachain(para_id), - Junction::PalletInstance(pallet_index), - Junction::GeneralIndex(general_index), - ); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&asset_id.encode()), - v3_location, - ); - } - // { Parachain, PalletInstance, AccountKey20 }: 5 - v1::Junctions::X3( - v1::Junction::Parachain(para_id), - v1::Junction::PalletInstance(pallet_index), - v1::Junction::AccountKey20 { key, .. }, - ) => { - let v3_account_key20 = Junction::AccountKey20 { network: None, key }; - let v3_junctions = Junctions::X3( - Junction::Parachain(para_id), - Junction::PalletInstance(pallet_index), - v3_account_key20, - ); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&asset_id.encode()), - v3_location, - ); - } - _ => (), - } - } - } - log::info!(target: "OnRuntimeUpgrade", "✅ AssetManager's AssetIdLocation has been updated to xcm v3."); - - // LocationAssetId - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"LocationAssetId"; - let location_asset_id: Vec<_> = storage_key_iter::< - AssetLocation, - CalamariAssetId, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - - reads += location_asset_id.len(); - writes += location_asset_id.len(); - - for (v1_location, asset_id) in location_asset_id { - if let xcm_v1::AssetLocation(xcm_v1::VersionedMultiLocation::V1(v1::MultiLocation { - parents, - interior, - })) = v1_location - { - match interior { - // polkadot location - v1::Junctions::Here => { - let v3_junctions = Junctions::Here; - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&v3_location.encode()), - asset_id, - ); - } - // we have 1 X1::Junction::Parachain: 2104 - // { Parachain }: 1 - v1::Junctions::X1(v1::Junction::Parachain(para_id)) => { - let v3_junctions = Junctions::X1(Junction::Parachain(para_id)); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&v3_location.encode()), - asset_id, - ); - } - // { Parachain, GeneralKey }: 20 - v1::Junctions::X2( - v1::Junction::Parachain(para_id), - v1::Junction::GeneralKey(general_key), - ) => { - let v3_general_key = { - let mut data = [0u8; 32]; - data[..general_key.len()].copy_from_slice(&general_key[..]); - Junction::GeneralKey { - length: general_key.len() as u8, - data, - } - }; - let v3_junctions = - Junctions::X2(Junction::Parachain(para_id), v3_general_key); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&v3_location.encode()), - asset_id, - ); - } - // { Parachain, PalletInstance }: 1 - v1::Junctions::X2( - v1::Junction::Parachain(para_id), - v1::Junction::PalletInstance(pallet_index), - ) => { - let v3_junctions = Junctions::X2( - Junction::Parachain(para_id), - Junction::PalletInstance(pallet_index), - ); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&v3_location.encode()), - asset_id, - ); - } - // { Parachain, PalletInstance, GeneralIndex }: 1 - v1::Junctions::X3( - v1::Junction::Parachain(para_id), - v1::Junction::PalletInstance(pallet_index), - v1::Junction::GeneralIndex(general_index), - ) => { - let v3_junctions = Junctions::X3( - Junction::Parachain(para_id), - Junction::PalletInstance(pallet_index), - Junction::GeneralIndex(general_index), - ); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&v3_location.encode()), - asset_id, - ); - } - // { Parachain, PalletInstance, AccountKey20 }: 5 - v1::Junctions::X3( - v1::Junction::Parachain(para_id), - v1::Junction::PalletInstance(pallet_index), - v1::Junction::AccountKey20 { key, .. }, - ) => { - let v3_account_key20 = Junction::AccountKey20 { network: None, key }; - let v3_junctions = Junctions::X3( - Junction::Parachain(para_id), - Junction::PalletInstance(pallet_index), - v3_account_key20, - ); - let v3_location = - VersionedMultiLocation::V3(MultiLocation::new(parents, v3_junctions)); - put_storage_value( - pallet_prefix, - storage_item_prefix, - &Blake2_128Concat::hash(&v3_location.encode()), - asset_id, - ); - } - _ => (), - } - } - } - log::info!(target: "OnRuntimeUpgrade", "✅ AssetManager's LocationAssetId has been updated to xcm v3."); - - // MinXcmFee, no storage on manta - - // pallet version - if crate::AssetManager::on_chain_storage_version() < 2 { - StorageVersion::new(2).put::>(); - writes += 1; - log::info!(target: "OnRuntimeUpgrade", "✅ AssetManager's version has been updated to 2."); - } - reads += 1; - - T::DbWeight::get() - .reads(reads as u64) - .saturating_add(T::DbWeight::get().writes(writes as u64)) - } - - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - // AssetIdLocation - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"AssetIdLocation"; - let asset_id_location: Vec<_> = storage_key_iter::< - CalamariAssetId, - AssetLocation, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - log::info!(target: "AssetIdLocation", "storage items count: {}.", asset_id_location.len()); - for (asset_id, v1_location) in asset_id_location { - log::info!(target: "AssetIdLocation", "asset id: {asset_id}, location: {v1_location:?}."); - } - - // LocationAssetId - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"LocationAssetId"; - let location_asset_id: Vec<_> = storage_key_iter::< - AssetLocation, - CalamariAssetId, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - log::info!(target: "LocationAssetId", "storage items count: {}.", location_asset_id.len()); - for (v1_location, asset_id) in location_asset_id { - log::info!(target: "LocationAssetId", "location: {v1_location:?}, asset id: {asset_id}."); - } - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"MinXcmFee"; - let min_xcm_fee: Vec<_> = storage_key_iter::< - AssetLocation, - CalamariAssetId, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - log::info!(target: "MinXcmFee", "storage items count: {}.", min_xcm_fee.len()); - for (v1_location, fees) in min_xcm_fee { - log::info!(target: "MinXcmFee", "location: {v1_location:?}, min xcm fees: {fees}."); - } - - let version = crate::AssetManager::on_chain_storage_version(); - log::info!(target: "StorageVersion", "version: {version:?}."); - - Ok(Vec::new()) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { - use manta_primitives::assets::AssetLocation; - - if crate::AssetManager::on_chain_storage_version() != 2 { - return Err(DispatchError::Other( - "AssetManager storage version is not 2, the migration wasn't executed.", - )); - } - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"AssetIdLocation"; - let asset_id_location: Vec<_> = storage_key_iter::< - CalamariAssetId, - AssetLocation, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - log::info!(target: "AssetIdLocation", "storage items count: {}.", asset_id_location.len()); - for (index, (_asset_id, v3_location)) in asset_id_location.iter().enumerate() { - if let AssetLocation(VersionedMultiLocation::V3(MultiLocation { .. })) = v3_location { - log::info!(target: "AssetIdLocation", "storage item: {index} has been updated to xcm v3."); - } - } - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"LocationAssetId"; - let location_asset_id: Vec<_> = storage_key_iter::< - AssetLocation, - CalamariAssetId, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - log::info!(target: "LocationAssetId", "storage items count: {}.", location_asset_id.len()); - for (index, (v3_location, _asset_id)) in location_asset_id.iter().enumerate() { - if let AssetLocation(VersionedMultiLocation::V3(MultiLocation { .. })) = v3_location { - log::info!(target: "LocationAssetId", "storage item: {index} has been updated to xcm v3."); - } - } - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"MinXcmFee"; - let min_xcm_fee: Vec<_> = storage_key_iter::< - AssetLocation, - CalamariAssetId, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - .collect(); - log::info!(target: "MinXcmFee", "storage items count: {}.", min_xcm_fee.len()); - for (index, (v3_location, _asset_id)) in min_xcm_fee.iter().enumerate() { - if let AssetLocation(VersionedMultiLocation::V3(MultiLocation { .. })) = v3_location { - log::info!(target: "MinXcmFee", "storage item: {index} has been updated to xcm v3."); - } - } - - Ok(()) - } -} diff --git a/runtime/manta/src/migrations/assets_genesis.rs b/runtime/manta/src/migrations/assets_genesis.rs deleted file mode 100644 index 744f9bd2c..000000000 --- a/runtime/manta/src/migrations/assets_genesis.rs +++ /dev/null @@ -1,406 +0,0 @@ -// Copyright 2020-2024 Manta Network. -// This file is part of Manta. -// -// Manta 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. -// -// Manta 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 Manta. If not, see . - -#![allow(clippy::unnecessary_cast)] - -use crate::sp_api_hidden_includes_construct_runtime::hidden_include::StorageHasher; -use codec::Encode; -use core::marker::PhantomData; -use cumulus_primitives_core::ParaId; -#[allow(deprecated)] -use frame_support::migration::{ - clear_storage_prefix, get_storage_value, put_storage_value, storage_key_iter, -}; -use frame_support::{ - dispatch::GetStorageVersion, - pallet_prelude::Weight, - traits::{Currency, Get, OnRuntimeUpgrade, StorageVersion}, - Blake2_128Concat, -}; -use manta_primitives::{ - assets::{AssetConfig, AssetLocation, AssetRegistryMetadata}, - types::{Balance, MantaAssetId}, -}; -use sp_runtime::{BoundedVec, DispatchError}; -use sp_std::vec::Vec; - -pub type DepositBalanceOf = <>::Currency as Currency< - ::AccountId, ->>::Balance; - -pub const INITIAL_PALLET_ASSETS_MANAGER_VERSION: u16 = 0; -pub const INITIAL_PALLET_ASSETS_VERSION: u16 = 0; - -pub struct AssetsGenesis(PhantomData); -impl OnRuntimeUpgrade for AssetsGenesis -where - T: pallet_asset_manager::Config + pallet_assets::Config, - u128: From<::AssetId>, -{ - fn on_runtime_upgrade() -> Weight { - let asset_manager_storage_version = - as GetStorageVersion>::on_chain_storage_version(); - let assets_storage_version = - as GetStorageVersion>::on_chain_storage_version(); - if asset_manager_storage_version != INITIAL_PALLET_ASSETS_MANAGER_VERSION - || assets_storage_version != INITIAL_PALLET_ASSETS_VERSION - { - log::info!("Aborting migration due to unexpected on-chain storage versions for pallet-assets-manager: {:?} and pallet-assets: {:?}. Expectation was: {:?} and {:?}.", asset_manager_storage_version, assets_storage_version, INITIAL_PALLET_ASSETS_MANAGER_VERSION, INITIAL_PALLET_ASSETS_VERSION ); - return T::DbWeight::get().reads(2); - } - - log::info!(target: "asset-manager", "Starting migration for AssetManager..."); - - let pallet_prefix: &[u8] = b"AssetManager"; - let _ = clear_storage_prefix(pallet_prefix, b"AssetIdLocation", b"", None, None); - let _ = clear_storage_prefix(pallet_prefix, b"LocationAssetId", b"", None, None); - let _ = clear_storage_prefix(pallet_prefix, b"AssetIdMetadata", b"", None, None); - let _ = clear_storage_prefix(pallet_prefix, b"UnitsPerSecond", b"", None, None); - let _ = clear_storage_prefix(pallet_prefix, b"MinXcmFee", b"", None, None); - let _ = clear_storage_prefix(pallet_prefix, b"AllowedDestParaIds", b"", None, None); - - put_storage_value( - pallet_prefix, - b"NextAssetId", - b"", - >::StartNonNativeAssetId::get(), - ); - let asset_id = >::NativeAssetId::get(); - let metadata = >::NativeAssetMetadata::get(); - let location = >::NativeAssetLocation::get(); - put_storage_value( - pallet_prefix, - b"AssetIdLocation", - &Blake2_128Concat::hash(&asset_id.encode()), - location.clone(), - ); - put_storage_value( - pallet_prefix, - b"LocationAssetId", - &Blake2_128Concat::hash(&location.encode()), - asset_id, - ); - put_storage_value( - pallet_prefix, - b"AssetIdMetadata", - &Blake2_128Concat::hash(&asset_id.encode()), - metadata, - ); - - StorageVersion::new(INITIAL_PALLET_ASSETS_MANAGER_VERSION + 1) - .put::>(); - - log::info!(target: "asset-manager", "✅ Storage migration for AssetManager has been executed successfully and storage version has been update to: {:?}.", INITIAL_PALLET_ASSETS_MANAGER_VERSION + 1); - - log::info!(target: "assets", "Starting migration for pallet-assets..."); - - let pallet_prefix: &[u8] = b"Assets"; - let _ = clear_storage_prefix(pallet_prefix, b"Asset", b"", None, None); - let _ = clear_storage_prefix(pallet_prefix, b"Metadata", b"", None, None); - let _ = clear_storage_prefix(pallet_prefix, b"Account", b"", None, None); - let _ = clear_storage_prefix(pallet_prefix, b"Approval", b"", None, None); - - log::info!(target: "assets", "✅ Storage migration for Assets has been executed successfully and storage version has been update to: {:?}.", INITIAL_PALLET_ASSETS_MANAGER_VERSION + 1); - - StorageVersion::new(INITIAL_PALLET_ASSETS_VERSION + 1).put::>(); - - T::BlockWeights::get().max_block // simply use the whole block - } - - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, DispatchError> { - let asset_manager_storage_version = - as GetStorageVersion>::on_chain_storage_version(); - if asset_manager_storage_version != INITIAL_PALLET_ASSETS_MANAGER_VERSION { - return Err(DispatchError::Other( - "AssetManager storage version is not 0, the migration won't be executed.", - )); - } - - let assets_storage_version = - as GetStorageVersion>::on_chain_storage_version(); - if assets_storage_version != INITIAL_PALLET_ASSETS_VERSION { - return Err(DispatchError::Other( - "Assets storage version is not 0, the migration won't be executed.", - )); - } - - // AssetIdLocation - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"AssetIdLocation"; - assert_eq!( - storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .count(), - 2 - ); - - // LocationAssetId - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"LocationAssetId"; - assert_eq!( - storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .count(), - 2 - ); - - // AssetIdMetadata - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"AssetIdMetadata"; - assert_eq!( - storage_key_iter::, Blake2_128Concat>( - pallet_prefix, - storage_item_prefix - ) - .count(), - 2 - ); - - // UnitsPerSecond - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"UnitsPerSecond"; - assert_eq!( - storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .count(), - 0 - ); - - // MinXcmFee - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"MinXcmFee"; - assert_eq!( - storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .count(), - 0 - ); - - // AllowedDestParaIds - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"AllowedDestParaIds"; - assert_eq!( - storage_key_iter::(pallet_prefix, storage_item_prefix,) - .count(), - 1 - ); - - // NextAssetId - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"NextAssetId"; - assert_eq!( - get_storage_value::(pallet_prefix, storage_item_prefix, &[]).unwrap(), - 2 - ); - - // Asset - - let pallet_prefix: &[u8] = b"Assets"; - let storage_item_prefix: &[u8] = b"Asset"; - assert_eq!( - storage_key_iter::< - MantaAssetId, - pallet_assets::AssetDetails< - ::Balance, - ::AccountId, - DepositBalanceOf, - >, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .count(), - 2 - ); - - // Metadata - - let pallet_prefix: &[u8] = b"Assets"; - let storage_item_prefix: &[u8] = b"Metadata"; - assert_eq!( - storage_key_iter::< - MantaAssetId, - pallet_assets::AssetMetadata< - DepositBalanceOf, - BoundedVec::StringLimit>, - >, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .count(), - 2 - ); - - log::info!(target: "assets", "✅ Migrations pre checks finished!"); - - Ok(().encode()) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), DispatchError> { - let asset_manager_storage_version = - as GetStorageVersion>::on_chain_storage_version(); - if asset_manager_storage_version != INITIAL_PALLET_ASSETS_MANAGER_VERSION + 1 { - return Err(DispatchError::Other( - "AssetManager storage version is not 1, the migration was not executed.", - )); - } - - let assets_storage_version = - as GetStorageVersion>::on_chain_storage_version(); - if assets_storage_version != INITIAL_PALLET_ASSETS_VERSION + 1 { - return Err(DispatchError::Other( - "Assets storage version is not 1, the migration was not executed.", - )); - } - - // AssetIdLocation - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"AssetIdLocation"; - assert_eq!( - storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .count(), - 1 - ); - - // LocationAssetId - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"LocationAssetId"; - assert_eq!( - storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .count(), - 1 - ); - - // AssetIdMetadata - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"AssetIdMetadata"; - assert_eq!( - storage_key_iter::, Blake2_128Concat>( - pallet_prefix, - storage_item_prefix - ) - .count(), - 1 - ); - - // UnitsPerSecond - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"UnitsPerSecond"; - assert_eq!( - storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .count(), - 0 - ); - - // MinXcmFee - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"MinXcmFee"; - assert_eq!( - storage_key_iter::( - pallet_prefix, - storage_item_prefix, - ) - .count(), - 0 - ); - - // AllowedDestParaIds - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"AllowedDestParaIds"; - assert_eq!( - storage_key_iter::(pallet_prefix, storage_item_prefix,) - .count(), - 0 - ); - - // NextAssetId - - let pallet_prefix: &[u8] = b"AssetManager"; - let storage_item_prefix: &[u8] = b"NextAssetId"; - assert_eq!( - get_storage_value::(pallet_prefix, storage_item_prefix, &[]).unwrap(), - u128::from(>::StartNonNativeAssetId::get()) - ); - - // Asset - - let pallet_prefix: &[u8] = b"Assets"; - let storage_item_prefix: &[u8] = b"Asset"; - assert_eq!( - storage_key_iter::< - MantaAssetId, - pallet_assets::AssetDetails< - ::Balance, - ::AccountId, - DepositBalanceOf, - >, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .count(), - 0 - ); - - // Metadata - - let pallet_prefix: &[u8] = b"Assets"; - let storage_item_prefix: &[u8] = b"Metadata"; - assert_eq!( - storage_key_iter::< - MantaAssetId, - pallet_assets::AssetMetadata< - DepositBalanceOf, - BoundedVec::StringLimit>, - >, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .count(), - 0 - ); - - log::info!(target: "assets", "✅ Migrations post checks finished!"); - - Ok(()) - } -} diff --git a/runtime/manta/src/migrations/mod.rs b/runtime/manta/src/migrations/mod.rs index fa15756f9..4bc5b4143 100644 --- a/runtime/manta/src/migrations/mod.rs +++ b/runtime/manta/src/migrations/mod.rs @@ -13,6 +13,3 @@ // // You should have received a copy of the GNU General Public License // along with Manta. If not, see . - -pub mod asset_manager; -pub mod assets_genesis; diff --git a/runtime/manta/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/manta/src/weights/cumulus_pallet_xcmp_queue.rs index 7df10e8ca..d98a941bd 100644 --- a/runtime/manta/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/manta/src/weights/cumulus_pallet_xcmp_queue.rs @@ -46,7 +46,12 @@ use core::marker::PhantomData; /// Weight functions needed for cumulus_pallet_xcmp_queue. pub trait WeightInfo { fn set_config_with_u32() -> Weight; - fn set_config_with_weight() -> Weight; + fn enqueue_xcmp_message() -> Weight; + fn suspend_channel() -> Weight; + fn resume_channel() -> Weight; + fn take_first_concatenated_xcm() -> Weight; + fn on_idle_good_msg() -> Weight; + fn on_idle_large_msg() -> Weight; } /// Weights for cumulus_pallet_xcmp_queue using the Substrate node and recommended hardware. @@ -62,15 +67,70 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for Substrat Weight::from_parts(6_559_000, 1594) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn enqueue_xcmp_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 6_338_000 picoseconds. + Weight::from_parts(6_559_000, 1594) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn suspend_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 6_338_000 picoseconds. + Weight::from_parts(6_559_000, 1594) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn resume_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 6_338_000 picoseconds. + Weight::from_parts(6_559_000, 1594) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn take_first_concatenated_xcm() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 6_338_000 picoseconds. + Weight::from_parts(6_559_000, 1594) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } /// 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 { + fn on_idle_good_msg() -> Weight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 6_365_000 picoseconds. - Weight::from_parts(6_583_000, 1594) + // Minimum execution time: 6_338_000 picoseconds. + Weight::from_parts(6_559_000, 1594) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 6_338_000 picoseconds. + Weight::from_parts(6_559_000, 1594) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -91,12 +151,67 @@ impl WeightInfo for () { } /// 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 { + fn enqueue_xcmp_message() -> Weight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 6_365_000 picoseconds. - Weight::from_parts(6_583_000, 1594) + // Minimum execution time: 6_338_000 picoseconds. + Weight::from_parts(6_559_000, 1594) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn suspend_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 6_338_000 picoseconds. + Weight::from_parts(6_559_000, 1594) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn resume_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 6_338_000 picoseconds. + Weight::from_parts(6_559_000, 1594) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn take_first_concatenated_xcm() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 6_338_000 picoseconds. + Weight::from_parts(6_559_000, 1594) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn on_idle_good_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 6_338_000 picoseconds. + Weight::from_parts(6_559_000, 1594) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: XcmpQueue QueueConfig (r:1 w:1) + /// Proof Skipped: XcmpQueue QueueConfig (max_values: Some(1), max_size: None, mode: Measured) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 6_338_000 picoseconds. + Weight::from_parts(6_559_000, 1594) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/runtime/manta/src/weights/frame_system.rs b/runtime/manta/src/weights/frame_system.rs index 1c0dc8eeb..79059a18c 100644 --- a/runtime/manta/src/weights/frame_system.rs +++ b/runtime/manta/src/weights/frame_system.rs @@ -53,6 +53,8 @@ pub trait WeightInfo { fn set_storage(i: u32, ) -> Weight; fn kill_storage(i: u32, ) -> Weight; fn kill_prefix(p: u32, ) -> Weight; + fn authorize_upgrade() -> Weight; + fn apply_authorized_upgrade() -> Weight; } /// Weights for frame_system using the Substrate node and recommended hardware. @@ -116,6 +118,24 @@ impl frame_system::WeightInfo for SubstrateWeight { .saturating_add(Weight::from_parts(1_158_786, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[0, 1000]`. + fn authorize_upgrade() -> Weight { + // Minimum execution time: 17_856 nanoseconds. + Weight::from_parts(18_373_000, 0) + // Standard Error: 1_613 + .saturating_add(Weight::from_parts(1_158_786, 0)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[0, 1000]`. + fn apply_authorized_upgrade() -> Weight { + // Minimum execution time: 17_856 nanoseconds. + Weight::from_parts(18_373_000, 0) + // Standard Error: 1_613 + .saturating_add(Weight::from_parts(1_158_786, 0)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } } // For backwards compatibility and tests @@ -178,4 +198,22 @@ impl WeightInfo for () { .saturating_add(Weight::from_parts(1_158_786, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(p.into()))) } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[0, 1000]`. + fn authorize_upgrade() -> Weight { + // Minimum execution time: 17_856 nanoseconds. + Weight::from_parts(18_373_000, 0) + // Standard Error: 1_613 + .saturating_add(Weight::from_parts(1_158_786, 0)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + // Storage: Skipped Metadata (r:0 w:0) + /// The range of component `p` is `[0, 1000]`. + fn apply_authorized_upgrade() -> Weight { + // Minimum execution time: 17_856 nanoseconds. + Weight::from_parts(18_373_000, 0) + // Standard Error: 1_613 + .saturating_add(Weight::from_parts(1_158_786, 0)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } } diff --git a/runtime/manta/src/weights/pallet_preimage.rs b/runtime/manta/src/weights/pallet_preimage.rs index 8fba4cd35..b5050e749 100644 --- a/runtime/manta/src/weights/pallet_preimage.rs +++ b/runtime/manta/src/weights/pallet_preimage.rs @@ -57,6 +57,7 @@ pub trait WeightInfo { fn unrequest_preimage() -> Weight; fn unrequest_unnoted_preimage() -> Weight; fn unrequest_multi_referenced_preimage() -> Weight; + fn ensure_updated(s: u32, ) -> Weight; } /// Weights for pallet_preimage using the Substrate node and recommended hardware. @@ -215,6 +216,22 @@ impl pallet_preimage::WeightInfo for SubstrateWeight .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Preimage PreimageFor (r:0 w:1) + /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// The range of component `s` is `[0, 4194304]`. + fn ensure_updated(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `140` + // Estimated: `3556` + // Minimum execution time: 17_136_000 picoseconds. + Weight::from_parts(17_519_000, 3556) + // Standard Error: 6 + .saturating_add(Weight::from_parts(2_496, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } } // For backwards compatibility and tests @@ -372,4 +389,20 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } + /// Storage: Preimage StatusFor (r:1 w:1) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Preimage PreimageFor (r:0 w:1) + /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// The range of component `s` is `[0, 4194304]`. + fn ensure_updated(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `140` + // Estimated: `3556` + // Minimum execution time: 17_136_000 picoseconds. + Weight::from_parts(17_519_000, 3556) + // Standard Error: 6 + .saturating_add(Weight::from_parts(2_496, 0).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) + } } diff --git a/runtime/manta/src/weights/pallet_sudo.rs b/runtime/manta/src/weights/pallet_sudo.rs index 2c48d64e5..27c5e9aab 100644 --- a/runtime/manta/src/weights/pallet_sudo.rs +++ b/runtime/manta/src/weights/pallet_sudo.rs @@ -48,6 +48,7 @@ pub trait WeightInfo { fn set_key() -> Weight; fn sudo() -> Weight; fn sudo_as() -> Weight; + fn remove_key() -> Weight; } /// Weights for pallet_sudo using the Substrate node and recommended hardware. @@ -84,6 +85,17 @@ impl pallet_sudo::WeightInfo for SubstrateWeight { Weight::from_parts(15_376_000, 1517) .saturating_add(T::DbWeight::get().reads(1_u64)) } + /// Storage: Sudo Key (r:1 w:1) + /// Proof: Sudo Key (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + fn remove_key() -> Weight { + // Proof Size summary in bytes: + // Measured: `98` + // Estimated: `1517` + // Minimum execution time: 13_882_000 picoseconds. + Weight::from_parts(14_149_000, 1517) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } } // For backwards compatibility and tests @@ -119,4 +131,15 @@ impl WeightInfo for () { Weight::from_parts(15_376_000, 1517) .saturating_add(RocksDbWeight::get().reads(1_u64)) } + /// Storage: Sudo Key (r:1 w:1) + /// Proof: Sudo Key (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + fn remove_key() -> Weight { + // Proof Size summary in bytes: + // Measured: `98` + // Estimated: `1517` + // Minimum execution time: 13_882_000 picoseconds. + Weight::from_parts(14_149_000, 1517) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } } diff --git a/runtime/manta/src/weights/pallet_treasury.rs b/runtime/manta/src/weights/pallet_treasury.rs index a010b99f1..6aadf016a 100644 --- a/runtime/manta/src/weights/pallet_treasury.rs +++ b/runtime/manta/src/weights/pallet_treasury.rs @@ -51,6 +51,10 @@ pub trait WeightInfo { fn approve_proposal(p: u32, ) -> Weight; fn remove_approval() -> Weight; fn on_initialize_proposals(p: u32, ) -> Weight; + fn spend_local() -> Weight; + fn payout() -> Weight; + fn check_status() -> Weight; + fn void_spend() -> Weight; } /// Weights for pallet_treasury using the Substrate node and recommended hardware. @@ -141,6 +145,50 @@ impl pallet_treasury::WeightInfo for SubstrateWeight .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 5206).saturating_mul(p.into())) } + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + fn spend_local() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1887` + // Minimum execution time: 8_923_000 picoseconds. + Weight::from_parts(9_183_000, 1887) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + fn payout() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1887` + // Minimum execution time: 8_923_000 picoseconds. + Weight::from_parts(9_183_000, 1887) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + fn check_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1887` + // Minimum execution time: 8_923_000 picoseconds. + Weight::from_parts(9_183_000, 1887) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + fn void_spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1887` + // Minimum execution time: 8_923_000 picoseconds. + Weight::from_parts(9_183_000, 1887) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } } // For backwards compatibility and tests @@ -230,4 +278,48 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 5206).saturating_mul(p.into())) } + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + fn spend_local() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1887` + // Minimum execution time: 8_923_000 picoseconds. + Weight::from_parts(9_183_000, 1887) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + fn payout() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1887` + // Minimum execution time: 8_923_000 picoseconds. + Weight::from_parts(9_183_000, 1887) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + fn check_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1887` + // Minimum execution time: 8_923_000 picoseconds. + Weight::from_parts(9_183_000, 1887) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: Treasury Approvals (r:1 w:1) + /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + fn void_spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1887` + // Minimum execution time: 8_923_000 picoseconds. + Weight::from_parts(9_183_000, 1887) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } } diff --git a/runtime/manta/src/weights/pallet_xcm.rs b/runtime/manta/src/weights/pallet_xcm.rs index e6560bc2d..e1720b69d 100644 --- a/runtime/manta/src/weights/pallet_xcm.rs +++ b/runtime/manta/src/weights/pallet_xcm.rs @@ -61,6 +61,9 @@ pub trait WeightInfo { fn notify_target_migration_fail() -> Weight; fn migrate_version_notify_targets() -> Weight; fn migrate_and_notify_old_targets() -> Weight; + fn transfer_assets() -> Weight; + fn new_query() -> Weight; + fn take_response() -> Weight; } /// Weights for pallet_xcm using the Substrate node and recommended hardware. @@ -285,6 +288,69 @@ impl pallet_xcm::WeightInfo for SubstrateWeight { .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } + /// Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) + /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem HostConfiguration (r:1 w:0) + /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `278` + // Estimated: `6218` + // Minimum execution time: 33_577_000 picoseconds. + Weight::from_parts(34_417_000, 6218) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + /// Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) + /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem HostConfiguration (r:1 w:0) + /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `278` + // Estimated: `6218` + // Minimum execution time: 33_577_000 picoseconds. + Weight::from_parts(34_417_000, 6218) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + /// Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) + /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem HostConfiguration (r:1 w:0) + /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `278` + // Estimated: `6218` + // Minimum execution time: 33_577_000 picoseconds. + Weight::from_parts(34_417_000, 6218) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } } // For backwards compatibility and tests @@ -508,4 +574,67 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } + /// Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) + /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem HostConfiguration (r:1 w:0) + /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `278` + // Estimated: `6218` + // Minimum execution time: 33_577_000 picoseconds. + Weight::from_parts(34_417_000, 6218) + .saturating_add(RocksDbWeight::get().reads(7_u64)) + .saturating_add(RocksDbWeight::get().writes(3_u64)) + } + /// Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) + /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem HostConfiguration (r:1 w:0) + /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `278` + // Estimated: `6218` + // Minimum execution time: 33_577_000 picoseconds. + Weight::from_parts(34_417_000, 6218) + .saturating_add(RocksDbWeight::get().reads(7_u64)) + .saturating_add(RocksDbWeight::get().writes(3_u64)) + } + /// Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) + /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem HostConfiguration (r:1 w:0) + /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `278` + // Estimated: `6218` + // Minimum execution time: 33_577_000 picoseconds. + Weight::from_parts(34_417_000, 6218) + .saturating_add(RocksDbWeight::get().reads(7_u64)) + .saturating_add(RocksDbWeight::get().writes(3_u64)) + } } diff --git a/runtime/manta/src/xcm_config.rs b/runtime/manta/src/xcm_config.rs index b594abd64..c170e1cb8 100644 --- a/runtime/manta/src/xcm_config.rs +++ b/runtime/manta/src/xcm_config.rs @@ -15,16 +15,19 @@ // along with Manta. If not, see . use super::{ - assets_config::MantaAssetConfig, AssetManager, Assets, Balance, Balances, DmpQueue, - ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, - Treasury, XcmpQueue, MAXIMUM_BLOCK_WEIGHT, + assets_config::MantaAssetConfig, AssetManager, Assets, Balance, Balances, MessageQueue, + ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeBlockWeights, RuntimeCall, + RuntimeEvent, RuntimeOrigin, Treasury, XcmpQueue, }; use codec::{Decode, Encode}; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use frame_support::{ match_types, parameter_types, - traits::{ConstU32, Contains, Currency, Everything, Nothing}, + traits::{ + ConstU32, Contains, Currency, EnqueueWithOrigin, Everything, Nothing, TransformOrigin, + }, weights::Weight, }; use frame_system::EnsureRoot; @@ -39,9 +42,11 @@ use manta_primitives::{ }; use orml_traits::location::AbsoluteReserveProvider; use pallet_xcm::XcmPassthrough; -use polkadot_parachain::primitives::Sibling; +use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; +use polkadot_parachain_primitives::primitives::Sibling; +use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery; use scale_info::TypeInfo; -use sp_runtime::traits::Convert; +use sp_runtime::{traits::Convert, Perbill}; use sp_std::marker::PhantomData; use xcm::latest::prelude::*; use xcm_builder::{ @@ -54,20 +59,22 @@ use xcm_builder::{ use xcm_executor::{traits::JustTry, Config, XcmExecutor}; parameter_types! { - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub ReservedDmpWeight: Weight = RuntimeBlockWeights::get().max_block.saturating_div(4); + pub ReservedXcmpWeight: Weight = RuntimeBlockWeights::get().max_block.saturating_div(4); } impl cumulus_pallet_parachain_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SelfParaId = parachain_info::Pallet; - type DmpMessageHandler = DmpQueue; + type DmpQueue = EnqueueWithOrigin; type ReservedDmpWeight = ReservedDmpWeight; type OutboundXcmpMessageSource = XcmpQueue; type XcmpMessageHandler = XcmpQueue; type ReservedXcmpWeight = ReservedXcmpWeight; type OnSystemEvent = (); + type ConsensusHook = cumulus_pallet_parachain_system::ExpectParentIncluded; type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases; + type WeightInfo = cumulus_pallet_parachain_system::weights::SubstrateWeight; } parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Polkadot; @@ -242,6 +249,7 @@ impl Config for XcmExecutorConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type FeeManager = (); + type Aliasers = Nothing; } /// Converts a Signed Local Origin into a MultiLocation @@ -256,11 +264,6 @@ pub type XcmRouter = ( XcmpQueue, ); -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - impl pallet_xcm::Config for Runtime { const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type RuntimeOrigin = RuntimeOrigin; @@ -289,15 +292,17 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type MaxLockers = ConstU32<8>; type RemoteLockConsumerIdentifier = (); - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type WeightInfo = crate::weights::pallet_xcm::SubstrateWeight; } +parameter_types! { + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; +} + impl cumulus_pallet_dmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRoot; + type DmpSink = EnqueueWithOrigin; + type WeightInfo = cumulus_pallet_dmp_queue::weights::SubstrateWeight; } impl cumulus_pallet_xcm::Config for Runtime { @@ -307,14 +312,40 @@ impl cumulus_pallet_xcm::Config for Runtime { impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRoot; type ControllerOrigin = EnsureRoot; type ControllerOriginConverter = XcmOriginToCallOrigin; type WeightInfo = crate::weights::cumulus_pallet_xcmp_queue::SubstrateWeight; - type PriceForSiblingDelivery = (); + type PriceForSiblingDelivery = NoPriceForMessageDelivery; + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = ConstU32<1_000>; +} + +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 = pallet_message_queue::weights::SubstrateWeight; + #[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; } /// We wrap AssetId for XToken @@ -330,14 +361,11 @@ pub struct CurrencyIdtoMultiLocation(PhantomData Convert> for CurrencyIdtoMultiLocation where - AssetXConverter: xcm_executor::traits::Convert, + AssetXConverter: sp_runtime::traits::MaybeEquivalence, { fn convert(currency: CurrencyId) -> Option { match currency { - CurrencyId::MantaCurrency(asset_id) => match AssetXConverter::reverse_ref(asset_id) { - Ok(location) => Some(location), - Err(_) => None, - }, + CurrencyId::MantaCurrency(asset_id) => AssetXConverter::convert_back(&asset_id), } } } diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 000000000..9c6ff81de --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,4 @@ +[toolchain] +channel = "1.74.0" +components = ["rust-src", "rustfmt", "clippy"] +targets = ["wasm32-unknown-unknown"] diff --git a/tests/rpc_correctness_test.ts b/tests/rpc_correctness_test.ts index ea8faeab0..3d7e4bd29 100644 --- a/tests/rpc_correctness_test.ts +++ b/tests/rpc_correctness_test.ts @@ -19,7 +19,7 @@ const test_config = { timeout: 2000000 } -describe('Node RPC Test', () => { +describe('Node RPC Test', () => { it('Check RPC result', async () => { let nodeAddress = ""; @@ -32,7 +32,7 @@ describe('Node RPC Test', () => { console.log("using address %s", nodeAddress); const wsProvider = new WsProvider(nodeAddress); - const api = await ApiPromise.create({ + const api = await ApiPromise.create({ provider: wsProvider, types: manta_pay_types, rpc: rpc_api}); @@ -46,11 +46,11 @@ describe('Node RPC Test', () => { data.receivers.forEach((value: any, index:number) => { let is_transparent = 0; let payload = new Uint8Array([ - ...numberToU8a(is_transparent), + ...numberToU8a(is_transparent), ...value[0].public_asset.id, ...value[0].public_asset.value, - ...value[0].commitment, - ...numberToU8a(value[1].address_partition, 1 * 8), + ...value[0].commitment, + ...numberToU8a(value[1].address_partition, 1 * 8), ... value[1].incoming_note.ephemeral_public_key, ... value[1].incoming_note.tag, ... value[1].incoming_note.ciphertext[0], @@ -68,7 +68,7 @@ describe('Node RPC Test', () => { }); expect(data.senders.length).to.not.equal(0); data.senders.forEach((value: any, index: number)=>{ - let payload = new Uint8Array([...value[0], ...value[1].ephemeral_public_key, ...value[1].ciphertext[0], ...value[1].ciphertext[1]]); + let payload = new Uint8Array([...value[0], ...value[1].ephemeral_public_key, ...value[1].ciphertext[0], ...value[1].ciphertext[1]]); expect(payload).to.deep.equal(generate_nullifier_set_entry(index)); }); api.disconnect(); diff --git a/tests/tests/test-dex.ts b/tests/tests/test-dex.ts index 0cdacdca3..16994ab8e 100644 --- a/tests/tests/test-dex.ts +++ b/tests/tests/test-dex.ts @@ -34,7 +34,7 @@ describeWithManta("Manta RPC (Dex)", (context) => { callData = api.tx.zenlinkProtocol.createPair([parachainId,2,8], [parachainId,2,9]); await executeTx(context, callData, true); - callData = api.tx.balances.transfer(bob, MANTA_1K); + callData = api.tx.balances.transferAllowDeath(bob, MANTA_1K); await executeTx(context, callData); callData = api.tx.assetManager.mintAsset(8, alice, USDT_20M); diff --git a/tests/tests/util.ts b/tests/tests/util.ts index 37e4a1b10..964133658 100644 --- a/tests/tests/util.ts +++ b/tests/tests/util.ts @@ -33,7 +33,6 @@ export async function startMantaNode(): Promise<{ binary: ChildProcess; } & Test `--chain=manta-localdev`, `--alice`, `-lruntime=debug`, - `--execution=native`, // Faster execution using native `--no-telemetry`, `--no-prometheus`, `--port=${P2P_PORT}`, @@ -50,7 +49,7 @@ export async function startMantaNode(): Promise<{ binary: ChildProcess; } & Test binary.on("error", (err) => { if ((err as any).errno == "ENOENT") { console.error( - `\x1b[31mMissing Acala binary (${BINARY_PATH}).\nPlease compile the Acala project:\nmake test-ts\x1b[0m` + `\x1b[31mMissing Manta binary (${BINARY_PATH}).\nPlease compile the Manta project:\nmake test-ts\x1b[0m` ); } else { console.error(err); @@ -61,7 +60,7 @@ export async function startMantaNode(): Promise<{ binary: ChildProcess; } & Test const binaryLogs = [] as any; const { api, alice, bob } = await new Promise((resolve, reject) => { const timer = setTimeout(() => { - console.error(`\x1b[31m Failed to start Acala Node.\x1b[0m`); + console.error(`\x1b[31m Failed to start Manta Node.\x1b[0m`); console.error(`Command: ${cmd} ${args.join(" ")}`); console.error(`Logs:`); console.error(binaryLogs.map((chunk: any) => chunk.toString()).join("\n")); @@ -136,7 +135,7 @@ export const getTestUtils = async ( const api = await ApiPromise.create({provider: provider}); await cryptoWaitReady(); await api.isReady; - + const alice = new Keyring({type: 'sr25519'}).addFromUri("//Alice"); const bob = new Keyring({type: 'sr25519'}).addFromUri("//Bob");